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

Check physical limits of nwp data when data is loaded #337

Open
peterdudfield opened this issue Jun 27, 2024 · 9 comments · May be fixed by #340
Open

Check physical limits of nwp data when data is loaded #337

peterdudfield opened this issue Jun 27, 2024 · 9 comments · May be fixed by #340
Assignees
Labels
good first issue Good for newcomers

Comments

@peterdudfield
Copy link
Contributor

Detailed Description

Would be good to check the physical limits of nwp data e.g check temperature is between -100 and 100.
This should be only used in inference

Context

  • nice to have clear errors, that fail hard
  • we could also add this in where the sample has been selected, but not normalized yet

Possible Implementation

@peterdudfield peterdudfield added the good first issue Good for newcomers label Jun 27, 2024
@glitch401
Copy link

hey @peterdudfield can I take up this issue?

@peterdudfield
Copy link
Contributor Author

yes please

@glitch401
Copy link

are we planning to have a dynamic setting for the limits or are we considering statically typing it in form of a dict like:

limits = {
            "temperature": (-100, 100),
            "specific_humidity": (0, 1),
            "pressure": (0, 2000),
            "u_wind": (-100, 100),
            "v_wind": (-100, 100),
            "geopotential": (0, 10000),
            "total_precipitation": (0, 100),
            "convective_precipitation": (0, 100),
            "snowfall": (0, 100),
            "graupel": (0, 100),
        }

@peterdudfield
Copy link
Contributor Author

I think a dictionary like that would be good

@peterdudfield
Copy link
Contributor Author

the means and stds are here. I wonder if you do mean - 5std, mean + 5std, and see what those umbers look like?

@glitch401
Copy link

makes sense
The mean and std I'm getting on UKV's values are: 280.0 and 2.023 hence appending the limits as (269.887, 290.112)

@peterdudfield
Copy link
Contributor Author

peterdudfield commented Jul 3, 2024

Hm, they seems a bit tight. 273 is 0 degrees, so the limits there are -4 degrees to 17 degrees. I wonder for temperature we should just do -20 deg up to 50 deg, or perhaps 250 to 330 to be safe.

Perhaps you could write out the other ones and I can try to review and see if any need adjusting

@glitch401
Copy link

gottcha, I'm placing a the limit range at (250, 330)
let me know impacts of the test

@peterdudfield
Copy link
Contributor Author

Great stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants