Skip to content

Option to read (spatially varying) KHTH from file#24

Closed
NoraLoose wants to merge 5 commits into
ocean-eddy-cpt:dev/cptfrom
NoraLoose:read-khth
Closed

Option to read (spatially varying) KHTH from file#24
NoraLoose wants to merge 5 commits into
ocean-eddy-cpt:dev/cptfrom
NoraLoose:read-khth

Conversation

@NoraLoose
Copy link
Copy Markdown
Member

@NoraLoose NoraLoose commented Aug 9, 2022

This adds the option to read a spatially varying GM interface height diffusivity (KHTH) from a netcdf file.

@NoraLoose NoraLoose marked this pull request as draft August 9, 2022 16:07
@NoraLoose
Copy link
Copy Markdown
Member Author

NoraLoose commented Aug 9, 2022

@gustavo-marques, I solved the previous problem. There was nothing wrong with the code, I just forgot to set THICKNESSDIFFUSE = True. I updated the comment above.

But I noticed another problem. Here is what I give the model versus what the diagnostic KHTH_t gives me:

KHTH_t

Is the spurious "tile structure" on the right implied by MOM_read_data?

@NoraLoose NoraLoose marked this pull request as ready for review August 9, 2022 19:36
@NoraLoose NoraLoose marked this pull request as draft August 9, 2022 19:50
@NoraLoose
Copy link
Copy Markdown
Member Author

Alistair (@adcroft), maybe you have seen the problem described in the previous comment before?

@adcroft
Copy link
Copy Markdown

adcroft commented Aug 9, 2022

That looks like a classic missing halo-update. I don't think MOM_read_data() fills the halo. You are interpolating to the edge of the compute domain which is using a halo value of zero (if initialized) rather than the correct value from the neighbouring processor. Try adding a pass_var() after reading the data.

@NoraLoose
Copy link
Copy Markdown
Member Author

Thanks @adcroft - this solved the problem!

@NoraLoose NoraLoose marked this pull request as ready for review August 9, 2022 20:36
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 9, 2022

Codecov Report

Merging #24 (31c35ce) into dev/cpt (d8fc2ef) will decrease coverage by 0.00%.
The diff coverage is 35.00%.

@@             Coverage Diff             @@
##           dev/cpt      #24      +/-   ##
===========================================
- Coverage    29.04%   29.04%   -0.01%     
===========================================
  Files          244      244              
  Lines        71849    71856       +7     
===========================================
+ Hits         20869    20870       +1     
- Misses       50980    50986       +6     
Impacted Files Coverage Δ
...arameterizations/lateral/MOM_thickness_diffuse.F90 31.34% <35.00%> (+0.03%) ⬆️
src/framework/MOM_restart.F90 25.68% <0.00%> (-0.27%) ⬇️
config_src/drivers/solo_driver/MOM_driver.F90 67.88% <0.00%> (-0.14%) ⬇️
src/ocean_data_assim/MOM_oda_driver.F90 0.00% <0.00%> (ø)
src/user/baroclinic_zone_initialization.F90 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@NoraLoose
Copy link
Copy Markdown
Member Author

@gustavo-marques @adcroft is this PR of interest for the MOM6 code (upstream)?

If so, it will take some work to merge it because I started from the dev/cpt branch, which has significantly diverged from the upstream master branch.

I successfully tested the new code for the NeverWorld2 setup, but I have to admit I have never compiled or run MOM6 in a more complex configuration. Gustavo, do you have a working (and up to date) setup on Cheyenne that we could use for testing?

@gustavo-marques
Copy link
Copy Markdown
Collaborator

Hi @NoraLoose: yes, I think we should merge this PR to the main branch eventually. I can take care of that and if I get conflicts related to the changes in this PR I will reach out to you. Thanks!

@NoraLoose
Copy link
Copy Markdown
Member Author

@gustavo-marques have you tried merging this yet? If not, I will try and reach out to you if I get stuck. Thanks!

@gustavo-marques
Copy link
Copy Markdown
Collaborator

No, I have not.

@NoraLoose
Copy link
Copy Markdown
Member Author

Closing this PR because I have opened it at NOAA/GFDL.

@NoraLoose NoraLoose closed this Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants