ocean-eddy-cpt / gcm-filters

Diffusion-based Spatial Filtering of Gridded Data
https://gcm-filters.readthedocs.io/
Other
37 stars 24 forks source link

[FEATURE] Add ICON (unstructured) grid #159

Open yangminah opened 1 year ago

yangminah commented 1 year ago

Hello, My research group is interested in using this method for our ICON (Icosahedral Nonhydrostatic Weather and Climate Model) dataset. If there is an interest, I would like to help out with this process, and we have contacted the MPI ICON developer for additional support. For now, this link shows the license agreement needed to access the source code: https://code.mpimet.mpg.de/projects/iconpublic/wiki/How%20to%20obtain%20the%20model%20code

iangrooms commented 1 year ago

Great! To use gcm-filters with output from the ICON model, you'll need to code up a Laplacian kernel for the ICON grid. I recommend porting the Laplacian that exists within ICON rather than trying to develop a new discretization from scratch.

NoraLoose commented 1 year ago

Does ICON use an unstructured grid? If so, we will have to think a little bit about how to integrate it into gcm-filters.

So far all grids are rectangular, locally orthogonal grids, and we leverage xarray which is really great for those kind of grids. I wonder if UXarray could be a way forward, but as far as I know that package is still under development.

yangminah commented 1 year ago

Hi, sorry for the slow response. Yes, the ICON grid is unstructured. The DWD tutorial says: it “originates from an icosahedron whose edges have been initially divided into n parts, followed by k subsequent edge bisections”. The grid cells are triangles in an icosahedron. An illustration can be found [here](https://www.dwd.de/SharedDocs/downloads/DE/modelldokumentationen/nwv/icon/icon_dbbeschr_aktuell.html) The grid information is described here: http://icon-downloads.mpimet.mpg.de/readme.html And a link to some of the grids is here: http://icon-downloads.mpimet.mpg.de/dwd_grids.xml

The grids in netcdf format store various quantities about the nodes(vertices) and edges, as well as the parent/child relationship of the vertices between grids, and neighboring nodes for a grid.

The laplacian kernel is located in the source code here: [dir]/src/shr_horizontal/mo_math_laplace.f90