-
Notifications
You must be signed in to change notification settings - Fork 3
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
mnlevy1981
wants to merge
29
commits into
marbl-ecosys:master
Choose a base branch
from
mnlevy1981:MOM_ic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
MOM support #9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding notebooks to generate initial condition and forcing files we need for the MOM driver.