MOM6-examples icon indicating copy to clipboard operation
MOM6-examples copied to clipboard

Patches to MIDAS and mkmf for OM4_025 preprocessing

Open jkrasting opened this issue 1 year ago • 5 comments

  • MIDAS environment patches for running on GFDL HPC
  • Generalized NetCDF include and lib paths in mkmf.template

In addition to these patches, one must first activate a Python v2.7 environment

Closes #414

jkrasting avatar Aug 10 '23 21:08 jkrasting

This edit will also require a similar patch be made to https://github.com/adcroft/OM4_025_grid.git since it is a submodule in the preprocessing directory.

jkrasting avatar Aug 10 '23 22:08 jkrasting

I was finally able to get the MIDAS tool to compile. The 0.25º grid generation is failing on a slice operation within create_grids.py.

See: https://github.com/adcroft/OM4_025_grid/issues/1

jkrasting avatar Aug 10 '23 22:08 jkrasting

There is also a deep down issue with MIDAS: https://github.com/mjharriso/MIDAS/issues/20

jkrasting avatar Aug 10 '23 22:08 jkrasting

Thanks for doing this @jkrasting. I updated the package on my work Github account several months ago. There is a Python3 branch which gets rid of the FMS dependency which I believe you are referring to.This greatly simplifies the build process and netcdf shared executable conflicts. Preprocessing were being used to generate initial condition netCDF files which were (almost) bitwise identical to the online generated initial conditions. Additionally, input fields such as Chlorophyll were using the FMS tools as well (This was done before packages such as xesmf were robust ).

Given the maintenance issues, I though it best to drop the FMS dependency, which while potentially useful from a code testing perspective, proved too difficult to manage. I don't think these functions are needed since better supported packages, such as xesmf are available (@raphaeldussin and I have discussed using xesmf remapping weights online in MOM6 as an alternative to the existing online FMS tool which does not support more complex grids). Thanks for taking the time to rebuild in the GFDL environment, this is painful and I wish I had a better solution.

The slicing issue is addressed on my branch. I suggest that you switch to that code which may have answer divergence due to glibc changes. I can create a Python2 branch as well if needed. This will allow for the grid/topo procedures and as I mentioned, the preprocessed regridding for other forcing files will be more painful and should perhaps be considered for replacement.

MJHarrison-GFDL avatar Aug 10 '23 23:08 MJHarrison-GFDL

What's the action going to be here?

adcroft avatar Feb 06 '24 15:02 adcroft