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

What happens when fx_files are needed but not found? #103

Closed
ledm opened this issue Jun 19, 2019 · 4 comments
Closed

What happens when fx_files are needed but not found? #103

ledm opened this issue Jun 19, 2019 · 4 comments

Comments

@ledm
Copy link
Contributor

ledm commented Jun 19, 2019

At the moment, some of the preprocessors use fx_files (like masking, the area/volume statistics and the upcoming zonal/meridional statitistics).

It's not obvious what should happen when fx_files are absent. In the case of model data, I think that the preprocessor should fail without fx_files.

In the case of observational data, if fx_files are absent, then the tool should be able to estimate the grid's area or volume.

This is complicated by the fact that the statistics tools can apply several operators:

  • The mean and the sum operations require the area/volume fields.
  • The sum operations can sometimes require the area/volume fields and sometimes doesn't need it.
  • The minimum, maximum operations do not require the area/volume.
  • The standard deviation, variance and median operators in iris are not weighted aggregators, but should require the area/volume.

It's a bit confusing!

@valeriupredoi
Copy link
Contributor

the fallback option for preprocessor function (mask landsea) when no fx files are available or they're broken (sometimes they are!) is to use Natural Earth shapefiles (for masking land at a higher resolution and seas at a lower resolution, but both resolutions much higher than the highest model resolution ie 10m and 50m << 1km). This option is straightforward and precise (even more precise than the fx files themselves, which may not necessarily be a good thing though) BUT it's not implemented for irregular grids and will spit a ValueError if masking with NE files is attempted on irregular grids.

Can you not use the masking functions before doing any statistical operations on the data? Or you actually need the fx files in your diagnostic to manipulate different ratios and stuff

@ledm
Copy link
Contributor Author

ledm commented Jun 19, 2019

The area_statistics and volume_statistics operators are independent of the masking preprocessor.

In order to calculate an average over the data, we need to weight the mean by the size of the grid cells. We can't use the natural earth shape files to describe the grid area or volume as they are grid specific.

@valeriupredoi
Copy link
Contributor

ok, makes sense, dunno really, not sure what can be done if the fx files are not there at all, do however see the comment #24 (comment) since that will take care of about 90% of the problem 😁

@valeriupredoi
Copy link
Contributor

#230 #297 #170 should have fixed this; please reopen if still in the bogs 🍺

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

2 participants