fix: potential temp to temp conversion for MOM6 model_interpolate #782
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.
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:
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
Documentation changes needed?
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
Checklist for release
Testing Datasets