rcaneill / xnemogcm

Interface to open NEMO global circulation model output dataset with xarray and create a xgcm grid.
https://xnemogcm.readthedocs.io/
MIT License
21 stars 10 forks source link

Change open options #27

Closed rcaneill closed 2 years ago

rcaneill commented 2 years ago

A little comment to organize my ideas. Here is a list of what xnemogcm should be able to handle:

A. Open

  1. Give it files named grid_X, and open_nemo will open the files and will know how to place each variable on the proper grid point
  2. Give it random file names, and open_nemo will open the files and will know how to place each variable on the proper grid point based on the 'description' attribute
  3. Give it random file names, with a dictionary of what file is on what grid point, and open_nemo will open the files and place each variable on the proper grid point

B. Process

  1. Give it datasets that have the 'description' attribute and let xnemogcm set each variable
  2. Give it datasets with a dictionary on where to set each dataset (e.g. {'T':[ds1, ds2], 'U':ds3}) (or a list of tuple, e.g. [(ds1, 'T'), (ds2, 'U')])

How to do?

For A1, A2, and A3, could simply be 1) open and 2) process with method B2.

For B1, could create the dict and then call B2

rcaneill commented 2 years ago

Roadmap

rcaneill commented 2 years ago

I will not implement A3, in case in a (more or less) future I implement an automatic grid detection based on the domcfg