Coder Social home page Coder Social logo

wrf_python_tutorial's Introduction

wrf_python_tutorial

Student Workbook Repository for the wrf-python Tutorial

wrf_python_tutorial's People

Contributors

michaelavs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wrf_python_tutorial's Issues

Failure of conda activate and init tcsh

In preparation of the tutorial, I tried to activate conda via: conda activate wp_env .

Got error msg:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>

Tried to init shell via: conda init tcsh .
Error output received per the attached file.
"An unexpected error has occurred."

Is something missing? What to do?
I couldn't run the jupyter notebook, as suggested in the e-mail about the tutorial.

Thanks.
conda_init.out.txt

assign lon on x-axis

I used vertcross to get a longitude-pressure cross section of vertical wind.

Set the start and end points at the specific latitude (28.718N)

start_point = CoordPair(lat=28.718, lon=76)
end_point = CoordPair(lat=28.718, lon=78)

w_cross = vertcross(w, z, wrfin=file, start_point=start_point,
end_point=end_point, latlon=True, meta=True)

After that I put height labels on y-axis using the following code:

Set the y-ticks to use height labels.

vert_vals = to_np(w_cross.coords["vertical"])
v_ticks = np.arange(vert_vals.shape[0])
ax.set_yticks(v_ticks[::20])
ax.set_yticklabels(vert_vals[::20], fontsize=13

Now I want to put lon labels on x-axis but the w_cross has coords vertical and xy_loc and xy_loc is a CoordPair of lat and lon values.

How to extract lon out of this coordpair and put it on the x-axis?

Thanks in advance for your help.

asign lon on x-axis

coord_pairs = to_np(w_cross.coords["xy_loc"])
x_ticks = np.arange(coord_pairs.shape[0])
x_labels = [pair.latlon_str() for pair in to_np(coord_pairs)]
thin = [int(x/6.) for x in x_ticks.shape] # Only keeping ~5 horizontal ticks
ax.set_xticks(x_ticks[1::thin[0]])
ax.set_xticklabels(x_labels[::thin[0]], rotation=45, fontsize=8)

I tried this, but it puts both lat and lon on x-axis. How can I put only lon on x-axis ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.