Option to read horizontally varying KHTH from file#236
Conversation
* Adds the option to set the diffusivity KHTH as horizontally varying * Can be enabled via READ_KHTH = True, filename is provided by user via KHTH_FILE * Will return error if user sets both READ_KHTH = True and KHTH > 0
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #236 +/- ##
============================================
- Coverage 37.09% 37.09% -0.01%
============================================
Files 263 263
Lines 73368 73388 +20
Branches 13672 13677 +5
============================================
+ Hits 27219 27220 +1
- Misses 41121 41136 +15
- Partials 5028 5032 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hallberg-NOAA
left a comment
There was a problem hiding this comment.
Thank you for this useful contribution. I think that it will be a valuable new capability for users.
However before this is accepted, there are several modifications (described separately below) that I would strongly encourage to follow the patterns used elsewhere in the MOM6 code when reading in variables from files. These should not be very onerous to make, but would help users by providing some of the constructs that they might expect.
In addition, this is really an isopycnal height diffusivity or an interface height diffusivity that is being read in, and not a thickness diffusivity (although these are the same in the limit of flat topography and vertically uniform diffusivities). I have regretting using the terminology "thickness diffusion", and perhaps we could consider modifying some of the new comments to read "isopycnal height diffusivity" (your choice) rather than "thickness diffusivity".
* full file path is now set as INPUTDIR/KHTH_FILE, where both INPUTDIR and KHTH_FILE are runtime parameters
thickness diffusivity --> isopycnal height diffusivity
|
Thanks for your comments, @Hallberg-NOAA! I have addressed the 3 points you made via 3 more commits. |
|
Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/jobs/89375 ✔️ 🟡 New parameter:
|
READ_KHTH= True, filename is provided by user viaKHTH_FILEREAD_KHTH= True andKHTH> 0I tested the functionality of this new option in the CPT NeverWorld2 setup.
Left: Prescribed spatially (here: latitudinally) varying KHTH, read from netcdf file.
Middle: Diagnosed KHTH via diagnostic
KHTH_tRight: Difference.
Small differences are expected since
KH_u,KH_vare computed as arithmetic means from the read-inKHTH, where the latter is assumed to live on tracer points;KHTH_tis computed fromKH_u,KH_vweighted by the thickness fluxes (rather than being computed as a simple arithmetic mean).