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

add interpolate_mpasOcean_to_mali.py #568

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

alexolinhager
Copy link
Contributor

Creates new script that interpolates MPAS-Ocean thermal forcing and sub ice shelf melt rates to a MALI mesh for one way coupling. Still a work in progress at this point

Creates new script that interpolates MPAS-Ocean thermal forcing and sub
ice shelf melt rates to a MALI mesh for one way coupling. Still a work
in progress at this point
@alexolinhager
Copy link
Contributor Author

@matthewhoffman, opening this now so you can get a sense of the script so far. I added "To Do" notes where needed

alexolinhager and others added 16 commits May 7, 2024 17:03
Implements the thermal forcing calculation, as well as reorganizes
script to object oriented. Further work is labeled with "<< TO DO >>:"
Finishes to-do list of interpolation script. Script capabilities are
now all complete, but script still needs to be tested and likely debugged
Two changes to get xtime written correctly:
* when the char array is generated, pad it to 64 characters
* fix a bug in that the return code to encoding.update was being
  assigned to xtime
Previous code was giving an error when landIceFreshwaterFlux exists.
minLevelCell does not exist in older meshes, which assumed it was 1.
…al attr

The global attribute version could sometimes have the value 'file'.
@matthewhoffman
Copy link
Member

Verification testing

melt

As a reference for the melt field, I time averaged one year of SORRM monthly output files in one directory:
ncra -v timeMonthly_avg_landIceFreshwaterFlux * avg_FWF_2000.nc
And then looked at the field in Paraview with:
timeMonthly_avg_landIceFreshwaterFlux/910*3.15e7
image

I compare this against the output of the script applied to that same set of files. There is a sign convention error that I will push a fix for, but otherwise results look the same (floatingBasalMassBal/910*3.15e7 - note there should be a negative sign there):
image

So I think this verifies both the time averaging code and the grid remapping code.

TF

Top layer of thermal forcing in the output:
image

23rd layer:
image

While the spatial patterns look appropriate for the melt field, the values seem off, with most of the continent having negative values. Also, at shallow layers, there is some strange scalloping in the open ocean regions. I can't think of a straightforward comparison to the MPAS-Ocean data here. There could be issues with either the TF calculations, the vertical remapping, or both.

matthewhoffman and others added 5 commits July 3, 2024 14:42
… files

There will likely be other files in output directories, so ensure we are
only working with the relevant ones.
Reorders script to first create separate files containing the
interpolated thermal forcing and ice shelf melt for each year. Then
reopens each annual file and concatenates into the final output file at
the end. Done to save memory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants