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

The units for precipitation #12

Open
smartlixx opened this issue Oct 18, 2018 · 4 comments
Open

The units for precipitation #12

smartlixx opened this issue Oct 18, 2018 · 4 comments

Comments

@smartlixx
Copy link

Many thanks for your great work.

When I use this tool for rainfall data from observation, I surprisingly find that it requires a unit of kg m-2 d-1, and it can't take mm. I checked the code but can't find an option to change this requirement. Is it possible to make this controlled by a switch? After all, people may work on model outputs or observational datasets.

@rod-glover
Copy link

TL;DR: mm/d and kg/m2/d are the same unit, given that it is kg of water.

Our data is from model outputs, and kg m-2 d-1 is how the units of precipitation are expressed from them. It's a simplified (no fancy formatting) form of the more standard scientific units notation that reads kg m-2 d-1 or kg/m2/d.

I'm not sure if your problem is that the format of these units is not acceptable to some code you are using, or if you are concerned about the units themselves. However, the following explanation might help in either case:

kg m-2 d-1 or kg/m2/d is exactly equivalent to mm/d (of water):

1 kg of water has a volume of 1 l.
1 l = 0.001 m3
So, for water, 1 kg/m2 = 0.001 m3/m2 = 0.001 m = 1 mm
and 1 kg m-2 d-1 = 1 mm/d

Point being, these two units of measure are synonyms.

@corviday
Copy link
Contributor

corviday commented Oct 18, 2018

I believe the issue is that @smartlixx has observation-derived precipitation data with units in mm/day, and would like to calculate Climdex indices with that data using this package, but cannot do so because the package requires the units of the precipitation variable to be kg m-2 d-1.

@smartlixx, are you able to just rename the units in your data files and have it work?

@smartlixx
Copy link
Author

I believe the issue is that @smartlixx has observation-derived precipitation data with units in mm/day, and would like to calculate Climdex indices with that data using this package, but cannot do so because the package requires the units of the precipitation variable to be kg m-2 d-1.

@smartlixx, are you able to just rename the units in your data files and have it work?

Yes, you are right.

@corviday I just use nco to modify the units and it works now. But it would still be preferable to have a switch for this.

@corviday
Copy link
Contributor

Thanks, that's a good idea. Unfortunately, I probably won't have time to work on it for a while, so I'm glad you're able to make things work with nco for now.

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

No branches or pull requests

3 participants