Skip to content
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

New lat-lon variables recognized #196

Closed
wants to merge 2 commits into from
Closed

Conversation

anthony-ds
Copy link

I am using WRF-Python to create vertical cross-sections (using vertcross) on non-wrfout files. However, these files use "lat" or "lon" as coordinate names, not "XLAT" or "XLONG". I've added these in, in the file util.py.

Also, I commented "dy = 0.0" in latlonutils.py, as this produces an error when trying to create a projection from metadata instead of a file.

…uses error when dy is ~ to dx (i.e. non-zero)
… can be created as long as latlon coordinates are recognized by name in Datasets
@erogluorhan erogluorhan self-requested a review November 29, 2022 20:35
@erogluorhan
Copy link
Collaborator

Hi @anthony-ds , thank you very much for your contribution!

This proposed change looks very similar to the case proposed in Issue #171 ; please take a look. Even though we understand the convenience of adding the non-WRF variable naming options into the tool, we believe the tool should be kept specific to the WRF model variable naming conventions.

As you will see from Issue #171 though, you'd be able to make your dataset variables compatible with WRF-Python very easily with something like the following:

your_xarray_dataset = your_xarray_dataset.rename({'lat0':'XLAT', 'lon0':'XLONG'})

then execute WRF-Python functions.

Would this help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants