-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to convert sigma level vertical velocity to pressure level? #69
Comments
I believe to_nodal and to_modal only operate on 2D arrays. If you want to transform a higher dimensional field, wrap the transformations in jax.vmap. |
Thanks to mention the dimension. 2.Running like this xarray_utils.save_netcdf(xarray.DataArray(omega).to_dataset(name="omega"),"omega.nc") could save to a netcdf file, but it's not easy be read to Grads (it's a popular and easy ). While using neural_gcm_model.data_to_xarray(preditcions,times=times).to_netcdf('*.nc') is much better, its format is well defined. Do you have a better way to 1.solve the dimension problem, 2. save to netcdf like neural_gcm_model.data_to_xarray? |
Please double check, but I believe sigma level vertical velocity may already be defined in "nodal" space already (on the Gaussian grid), and hence does not need the
You should use |
@shoyer I don't understand the codes whether it outputs sigma level or pressure level. Please have a look at compute_vertical_velocity: |
Vertical velocity (and everything inside the dynamical core) is output on sigma levels. If you want it on pressure levels, you can use the vertical interpolation routines from |
Vertical velocity is really important to analyse weather, please make a easy api to output it in the same way as p_e or other variables. Thank you! |
Another option is to calculate vertical velcoity as a diagnosed variable from an output dataset on pressure levels with the WeatherBench2 code: https://weatherbench2.readthedocs.io/en/latest/_autosummary/weatherbench2.derived_variables.VerticalVelocity.html#weatherbench2.derived_variables.VerticalVelocity |
Thanks to @shoyer in #68 , I've got sigma level vertical velocity.
So I try to use model.model_coords.horizontal.to_nodal(vertical_velocity) as @shoyer said in #8.
However it works with this error:
size of label '1' for operand 1 (65) does not match previous terms (64).
I've searched and can't fix it by myself.
And as in #8, when running model.model_coords.horizontal.to_nodal(advanced.state.temperature_variation) is ok.
The full traceback is like this:
The text was updated successfully, but these errors were encountered: