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

Precipitation needs to be adjusted to period #262

Open
norulz opened this issue Nov 13, 2020 · 5 comments
Open

Precipitation needs to be adjusted to period #262

norulz opened this issue Nov 13, 2020 · 5 comments

Comments

@norulz
Copy link
Collaborator

norulz commented Nov 13, 2020

APCP with a 3 hour time step grib is currently shown in XyGrib as mm/h when it is in fact mm/3hr.

The suggested fix should be to divide the grib value (which is mm of precipitation accumulated in the period) by the period to give average mm/hr over the period. This will allow for one unit with one colour scale.

@dominiquehausser
Copy link
Contributor

If it is easy, that's the best and comparable with usual data provided by metoffices.

@norulz
Copy link
Collaborator Author

norulz commented Dec 22, 2020

@did-g @dominiquehausser

Some thoughts on this...

Various grib files contain at least one of three options regarding measures of precipitation:

  • TOTAL precipitation for the period. This is measured in kg/m^2 (i.e the period amount usually in mm)
  • RATE instantaneous rate of fall measured in mm/hr or other time period
  • ACCUMULATED for the forecast increasing at every time step that has precipitation. This gives a "storm" total in mm

Currently XyGrib expresses precipitation as RATE showing mm/hr. This is only correct when the time step is one hour or else the grib file is giving RATE and not TOTAL.

I feel that XyGrib needs to cope with each of the possible inputs types above, and then to calculate the other two based on the input type. Presentation of precipitation will then be a user selected preference of Total/Rate/Accumulation. This should apply to both precipitation.

SNOW is a special case as SNOD - accumulated depth of snow is a function of not only fall, but run off and melting. So, it is not possible to calculate fall and accumulation, one from the other. No change is required here.

@did-g
Copy link
Contributor

did-g commented Dec 22, 2020

Hi

Are you sure about that? In my understanding Xygrib is already trying to convert whatever it get to mm/hr. cf.:
GribReader::computeAccumulationRecords

Have you a file wrongly decoded around ?

Regards
Didier

@norulz
Copy link
Collaborator Author

norulz commented Dec 22, 2020

Try this one.

norm.zip

@did-g
Copy link
Contributor

did-g commented Dec 22, 2020

Ha, it's a TODO. :(
We are reaching the limit of shoehorning GRIB2 time range in grib1 logic

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