-
Notifications
You must be signed in to change notification settings - Fork 38
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
Extract odd-shaped (irregular) regions #44
Comments
@LisaBock it is very important from the implementation point of view to know which file format your regions are stored in - netCDF/Natural Earth/txt etc and what are the actual parameters of the region ie how it is defined in the file: like a mask of 0s and 1s, like a percentage that we apply a threshold on etc. Without this information I can not implement anything just yet. Cheers! |
With regards to the Natural Earth Shapefiles, I can't see anything that names specific marine regions. The closest dataset I can find is the marine indicators, but I suspect that this is simply the national sea boundaries at 200 nautical miles. I think that the best way to define the oceans right now would be to regrid CMIP models to a standard resolution in the preprocessor, then use an older regional definition mask file in the diagnostic. Do we have a definition file anywhere? |
|
I think @LisaBock simply needs to extract regions which are not rectangular, but more generally quadrilateral. No shapefiles should be required here, but only the possibility of specifying the coordinates of the four (or more) vertices which define the region. |
Indeed, for the continental regions it should look like this (polygons with four or five corners): But for the most diagnostics I would need a combination of this subregions. And for the oceanic regions, I do not know if they are polygons. I asked already for the definitions but have not received them yet. |
We already have the preprocessor function We also have a recipe that extracts regions based on shapefiles, recipe_shapeselect.yml. This could be used for the more complicated shapes, you will just need to define the shapefiles. You can then run this diagnostic before your own diagnostic, using the |
This would still be useftl in the preproc tho, to shrink the data and speed
up the other preproc steps that follow. I agree we can use the shp
extractor functionality we already have - Lisa, any chance you can define
these regions for me in terms of lat-lon points? Then I can add a shp
constructor function and use the shp masking we already have
Dr Valeriu Predoi.
Computational scientist
NCAS-CMS
University of Reading
Department of Meteorology
Reading RG6 6BB
United Kingdom
…On Fri, 8 Mar 2019, 10:14 Bouwe Andela, ***@***.***> wrote:
We already have the preprocessor function extract_region
<https://esmvaltool.readthedocs.io/en/version2_development/codedoc2/esmvaltool.preprocessor.html#esmvaltool.preprocessor.extract_region>
which is able to extract rectangular regions, so I think that should be
able to extract most regions.
We also have a recipe that extracts regions based on shapefiles,
recipe_shapeselect.yml
<https://github.com/ESMValGroup/ESMValTool/blob/version2_development/esmvaltool/recipes/recipe_shapeselect.yml>.
This could be used for the more complicated shapes, you will just need to
define the shapefiles. You can then run this diagnostic before your own
diagnostic, using the ancestors key in the recipe.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<https://github.com/ESMValGroup/ESMValTool/issues/943#issuecomment-470877029>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AbpCo1cyZo8bSLRBcL-pRXzDoL4XS2Afks5vUjf3gaJpZM4bjNIj>
.
|
actually here's how I see a least-effort/maximum-outcome path to solve this:
what say you @LisaBock |
Okay, I will try it like this. Thanks! (Just for clarification @valeriupredoi: you mean |
yes that one sorry, I am starting to pull function names out my arse 😁 |
hi @LisaBock - is this been done (by you) or you need any help implementing it? 🍺 |
@LisaBock is this solved? If yes, please close. |
closing since it looks to be solved, please re-open if need be 🍺 |
I would like to extract regions in the preprocessor of the ESMValTool which are not rectangular but as they are defined in the IPCC AR5 or AR6. For example to create the panels for a figure like this:
Is there a possibility to include this in the preprocessor functions?
At the moment I do not have the specific region definitions but I could share them when I received them.
The text was updated successfully, but these errors were encountered: