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

Change parameter name passed to read_grid in verify_spatial #20

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

j-fannon
Copy link

@j-fannon j-fannon commented Jun 4, 2024

As suggested by @andrew-MET. Solves problem when using "parameter = AccPcp3h" in verify_spatial.

@adeckmyn
Copy link
Collaborator

I'm not sure whether this might break for some file types. Some files might actually contain accumulated precipitation for some fixed accumulation time[s], and passing only $basename strips all accumulation information. But I'm having a closer look. For instance, at RMI, we store output as tar'ed FA files, and a single file contains all lead times, so read_grid can extract the correct accumulation. That is (usually) not the case with GRIB output, so there indeed something needs to fixed.

@j-fannon
Copy link
Author

Thanks @adeckmyn, feel free to close if this is not suitable.

@andrew-MET
Copy link
Contributor

andrew-MET commented Jun 14, 2024

There's certainly a problem here - especially given that a large number of institues are using grib files or FA files for single times. I think the cleanest solution would be to extract the precipitation from read_grid() as is and do any decumulation outside of the function - that way all bases are covered. For the edge cases where the precipitation has already been decumulated to the time periods you want you could have a force_param_name argument whereby fullname is passed to read_grid() rather than basename and no decumulation is done.

Ultimately I think harpSpatial should be using read_forecast() and read_analysis() and things like decumulation / accumulation would be handled by those functions. There's a lot of duplication of functionalities of these functions (e.g. file name generation, checking if files exist) in verify_spatial().

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.

3 participants