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

fix: potential temp to temp conversion for MOM6 model_interpolate #782

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hkershaw-brown
Copy link
Member

Description:

All temperature observations were failing the forward operator for MOM6 because model_interpolate was only doing interpolation if the QTY was in the state & QTY_TEMPERATURE is not part of the model state.
MOM6 has QTY_POTENTIAL_TEMPERATURE so this needs converting to QTY_TEMPERATURE

Following the method in the POP model_mod. I haven't generalized the code across both model_mods 1) because the salinity units are different between the models 2) POP has depth of grid points static across the ensemble vs thickness in the state for MOM6, 3) I don't want to mess with the POP model_mod

pseudo code:

pressure = f(depth)
pot_temp = f(QTY_POTENTIAL_TEMPERATURE, QTY_SALINITY, pressure) 

Need to double check the units on pressure (dbars vs bars) and salinity (MSU vs PSU)
Note sure of the best name for the conversion routine "sensible_temp" or "in-situ_temp" or whatever.
Note sure what references need to be in the depth to pressure calculation (plop in the three that are in the pop model_mod?)

Also has fix 360.0_r8 for numbers that were missing _r8.

Fixes issue

fixes #773

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Documentation changes needed?

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.

Tests

model_mod_check interpolate compare to values at grid points for variables that are in the state QTY_POTENTIAL_TEMPERATURE, QTY_SALINITY (in python notebook)
See unit notes above - need to check.

Checklist for merging

  • Updated changelog entry
  • Documentation updated
  • Update conf.py

Checklist for release

  • Merge into main
  • Create release from the main branch with appropriate tag
  • Delete feature-branch

Testing Datasets

  • Dataset needed for testing available upon request
  • Dataset download instructions included
  • No dataset needed

fixes #773
Converts potential_temp (model) to in-situ temp (obs)
Following method in POP model_mod: #773 (comment)
Uses element function -  need to check with fortran standard has elemental.
@hkershaw-brown hkershaw-brown added the mom6 Modular Ocean Model label Dec 11, 2024
@johnsonbk
Copy link
Collaborator

@hkershaw-brown Do you have a testing dataset sitting somewhere on glade?

@hkershaw-brown
Copy link
Member Author

NWA regional:
/glade/derecho/scratch/hkershaw/DART/Crocodile/Enrico/filter_run

@johnsonbk
Copy link
Collaborator

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mom6 Modular Ocean Model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Feat request : MOM6 temperature interpolation
2 participants