Skip to content

Option to read horizontally varying KHTH from file#236

Merged
marshallward merged 5 commits into
NOAA-GFDL:dev/gfdlfrom
NoraLoose:spatially_varying_khth
Nov 22, 2022
Merged

Option to read horizontally varying KHTH from file#236
marshallward merged 5 commits into
NOAA-GFDL:dev/gfdlfrom
NoraLoose:spatially_varying_khth

Conversation

@NoraLoose
Copy link
Copy Markdown

  • 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

I tested the functionality of this new option in the CPT NeverWorld2 setup.

KHTH_t

Left: Prescribed spatially (here: latitudinally) varying KHTH, read from netcdf file.
Middle: Diagnosed KHTH via diagnostic KHTH_t
Right: Difference.

Small differences are expected since

  1. the diffusivities at velocity points KH_u, KH_v are computed as arithmetic means from the read-in KHTH, where the latter is assumed to live on tracer points;
  2. the diagnostic KHTH_t is computed from KH_u, KH_v weighted by the thickness fluxes (rather than being computed as a simple arithmetic mean).

* 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
Copy link
Copy Markdown

codecov Bot commented Nov 11, 2022

Codecov Report

Merging #236 (a6039ba) into dev/gfdl (aa44c32) will decrease coverage by 0.00%.
The diff coverage is 24.00%.

@@             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     
Impacted Files Coverage Δ
...arameterizations/lateral/MOM_thickness_diffuse.F90 46.38% <24.00%> (-0.96%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment thread src/parameterizations/lateral/MOM_thickness_diffuse.F90 Outdated
Comment thread src/parameterizations/lateral/MOM_thickness_diffuse.F90
Copy link
Copy Markdown
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@NoraLoose
Copy link
Copy Markdown
Author

Thanks for your comments, @Hallberg-NOAA! I have addressed the 3 points you made via 3 more commits.

@Hallberg-NOAA Hallberg-NOAA added the enhancement New feature or request label Nov 15, 2022
@marshallward
Copy link
Copy Markdown
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/jobs/89375 ✔️ 🟡

New parameter:

  • READ_KHTH

@marshallward marshallward merged commit 2070175 into NOAA-GFDL:dev/gfdl Nov 22, 2022
marshallward pushed a commit that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants