NCAR / wrf-python

A collection of diagnostic and interpolation routines for use with output from the Weather Research and Forecasting (WRF-ARW) Model.
https://wrf-python.readthedocs.io
Apache License 2.0
411 stars 155 forks source link

WRF does not require stand_lon to be set for Mercator #70

Closed bladwig1 closed 5 years ago

bladwig1 commented 6 years ago

WRF sets the stand_lon parameter to be 1e20 when it isn't specified for Mercator, and does not require users to set it. WRF-Python needs to handle this situation better.

As a workaround, users can specify the value in the projection attribute of their variables when xarray is enabled:

slp = getvar(f, "slp")
# Set stand_lon to center of domain
center_of_domain = -110.0
slp.attrs["projection"].stand_lon = center_of_domain