barlage / fv3_mapping

0 stars 2 forks source link

Generalise for multiple input data grids #3

Open ClaraDraper-NOAA opened 2 years ago

ClaraDraper-NOAA commented 2 years ago

@barlage I'd like to generalise this code to apply it to other applications (specifically SMAP, which is on an EASE grid).

I propose adding an input option for the data source, and then editing the block under "! Read source lat/lon" to read the lat/lon info from the selected data source. From glancing through the rest of the code, I think it's generalised to source_lon and source_lat so should work OK.

While I'm there, I'll make the FV3 resolution an input option too, rather than having to change it at compilation.

Does this sound OK to you?

barlage commented 2 years ago

@ClaraDraper-NOAA I think it's a good idea to generalize; I've actually been thinking whether this method is a good way to regrid some MODIS data I have too, but thinking maybe there is a better way. Youlong and I have been using esmf weights to regrid some of the other soil moisture products (on a friendlier grid) and that method recalculates the parent cell mean based on source missing data too. I was planning to test that method with the MODIS data to see how well ESMF handles the MODIS grid.

Would what you're proposing with EASE create a global mapping file from EASE to FV3? Or would you be creating swaths or subsets of EASE?

ClaraDraper-NOAA commented 2 years ago

@barlage I'm more or less proposing to repeat what we did for IMS, so with this code I'd create an index file mapping from the center point of a given EASE row/column to the FV3 grid cell that it falls in. We'd then use that (in code similar to IMS_proc) to aggregate all SMAP (swath) files for each assimilation window onto the FV3 grid. SMAP is EASE2 9km, but they have input files with grid info that are generic, so the same code could be re-used for other EASE grids. So for the current application it'd be a global mapping.