Skip to content
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

MOM support #9

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft

MOM support #9

wants to merge 29 commits into from

Conversation

mnlevy1981
Copy link
Contributor

Adding notebooks to generate initial condition and forcing files we need for the MOM driver.

Running into version issues with esmlab, I think
Notebook plots NO3 to make sure it looks reasonable; still need to find SCRIP
grid file for 20 degree offset
Found the SCRIP grid file in /glade/work/mclong/regrid/grid_files (also using
the 180W offset from that directory). Plotting O2 (from 180W grid) and DIC
(from 20E grid)
Plot on both WOA grid and MOM grid
Use DEPTH, LAT, and LON instead of z_t, nlat, and nlon.

Also cleaned up the plotting calls to get a single colorbar per variable
Introduce LAT and LON coordinates, dump all the SCRIP variable names after
finishing all interpolation. Also cleaned up which vertical variables are
stored in the DataSet (just DEPTH, no need for dz or z_w or z_t_bounds).

Note that z_t_bounds is kept as a local data array for interpolation, but
doesn't need to be in ds_out.
Includes plots of all the fields coming from POP
Also, updated mask to include active cells in bottom level
I don't know how long these modified files have been sitting on disk
Also reran generating IC from a better environment
better to use the fv0.9 -> mom option
Replace NaNs with _FillValue, generated 1D lat / lon out of the box
Data that was mapped from a POP restart file didn't have a land mask applied to
it, so we were getting 0s included instead of ignoring nans over land
I'm not 100% sure what changed here, but I'm using the file generated by this
version of the notebook
1. need to apply mask (tracer = np.nan below KMT) because the restart file just
   writes 0s which then get mapped (ESMF map uses surface mask)
2. changing xr.where to np.where to do better job of handling pop-ups from
   overflow regions
3. Added a few additional plots from bottom layer
4. Print out some additional diagnostics (tracer min/max on native grid and MOM
   grid)
Also, set negative values to 0 and added consistency check (if any of Chl, C,
P, Fe, or Si are 0, they all are; so is CaCO3)
Reads in ESMF mapping file and uses scipy.sparse to apply it
1. More comments to the notebook to help explain what is going on
2. Support for rx1 -> tx0.66v1 mapping (useful for testing, at least)
3. Added more metadata to netCDF output
Pulled the actual mapping into its own class, hopefully will make it easier to
share (and easier to extend to the obs -> rof mapping)
Add support for 4p2z and also add ABIO tracers to initial condition file
Instead of running from July 1, 1900 - July 1, 2000, the river flux forcing
file now runs from Jan 1, 1900 - Jan 1, 2001 (where the Jan 1, 1900 data is
identical to July 1, 1900, and the Jan 1, 2001 data is identical to July 1,
2000). This is necessary for MOM, which can not be configured to use the first
time level for all dates preceding it.

I also added a script to generate the d14c forcing file for running with
abiotic DIC tracers. This script reads in forcing file generated for CTSM and
splits the three sectors [latitude bands] into scalar variables. This is
necessary since MOM6 can not perform time interpolation on 1D arrays. Similar
to the river fluxes, I also need to add Jan 1, 1850 (identical to July 1, 1850)
and Jan 1, 2016 (identical to July 1, 2015) for similar reasons.
I was able to use the NCAR/cgd-os scripts to generate river nutrients on the
r05 runoff grid, and now we can map that to t232 as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant