-
Notifications
You must be signed in to change notification settings - Fork 118
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
Units of pressure variables are not machine-readable #350
Comments
DWesl
changed the title
Make units of pressure variables machine-readable
Units of pressure variables are not machine-readable
Jul 12, 2024
@DWesl - are you planning to put in a PR for this issue? |
6 tasks
Created #355 |
Created #356 since I figured out how to make a PR with just the relevant commits. |
@DWesl - thanks for making the changes against the dev/emc branch and submitting a new PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The netCDF history outputs some pressure variables with units of "pa" or "mb". The netCDF Users' Guide and Climate and Forecast (CF) conventions both recommend making the
units
attribute of a netCDF variable machine-readable, specifically by the UDUNITS software package. This package interprets "pa" as picoannum, a unit of time roughly equal to a microsecond, and "mb" as millibarn, a unit of area used in atomic scattering, rather than as units of pressure.To Reproduce
Steps to reproduce the behavior:
Run the model and let it produce netCDF history files.
Inspect the
units
attribute of the pressure variables (surface pressure and vertical coordinate are the most likely).Ask udunits2 (or another unit-processing software package) to convert from one pressure unit to the other, or to a known pressure unit (atm, torr, or psi should work).
Expected behavior
I expected my unit-processing software package to be able to convert the surface pressure to the same coordinates as the pressure of the vertical layers.
System Environment
Describe the system environment, include:
Additional context
Either of the two following
sed
scripts should fix the units in the output files. I tried running these on my version of the repository in a NOAA-EMC/global-workflow clone and my software can convert the pressure variables to atm and torr without guidance from me.I couldn't figure out how to make a PR with just three commits instead of 50, so I saved the commits as patches with
git format-patch
and attached the result as updated_units_patch.zip. They should apply cleanly withgit am
.The text was updated successfully, but these errors were encountered: