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

Corrects thin ice/snow treatment of enthalpy and other tracers #454

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

apcraig
Copy link
Contributor

@apcraig apcraig commented Aug 28, 2023

PR checklist

Adopted from E3SM-Project/E3SM#5630

"This fix redistributes enthalpy and other tracers evenly in snow and ice when their respective thicknesses are < 1e-15 . Previously, these tracers were zero'd non-conservatively. Also corrects a bug in the zeroing of snow thicknesses, and removes snow in thickness_changes if the ice vanishes."

Adopted from E3SM-Project/E3SM#5630

"This fix redistributes enthalpy and other tracers evenly in snow and ice when their
respective thicknesses are < 1e-15 . Previously, these tracers were zero'd non-conservatively.
Also corrects a bug in the zeroing of snow thicknesses, and removes snow in thickness_changes
if the ice vanishes."
@apcraig
Copy link
Contributor Author

apcraig commented Aug 28, 2023

@eclare108213 @njeffery, please have a look at this implementation. I will complete testing and clean up the code once you agree it seems right. In particular, have a look at icepack_therm_vertical, lines 1714:1728. I show the old code from the E3SM columnphysics there as well. In the old code, there was a "tr_snow" and "tr_rsnw". We don't use that anymore. Is "snowgrain" the appropriate if-test for four lines of code in that section? Or is some other logic needed?

do k = 1, nslyr
fhocnn = fhocnn &
+ zqsn(k)*hsn/(real(nslyr,kind=dbl_kind)*dt)
zqsn(k) = -rhos*Lfresh
!tcx, tcraig, in columnphysics, this is
! is it correct that now everything is "if snwgrain"?
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think snwgrain is the correct wrapper for these variables.

@apcraig
Copy link
Contributor Author

apcraig commented Aug 29, 2023

@eclare108213
Copy link
Contributor

Is it worth running the QC tests on this, since it's not BFB? I think it's fine without them since the cases when the changes occur ought to be rare, but it would provide some extra confidence.

@apcraig
Copy link
Contributor Author

apcraig commented Aug 30, 2023

Good idea about QC. QC passes with very small differences (this is a standard test with snwgrain off)

INFO:__main__:Running QC test on the following directories:
INFO:__main__:  /glade/scratch/tcraig/CICE_RUNS/cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk.cne03
INFO:__main__:  /glade/scratch/tcraig/CICE_RUNS/cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk.T230826b
INFO:__main__:Number of files: 1825
INFO:__main__:2 Stage Test Passed
INFO:__main__:Quadratic Skill Test Passed for Northern Hemisphere
INFO:__main__:Quadratic Skill Test Passed for Southern Hemisphere
INFO:__main__:Creating map of the data (ice_thickness_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk.cne03.png)
INFO:__main__:Creating map of the data (ice_thickness_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk.T230826b.png)
INFO:__main__:Creating map of the data (ice_thickness_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk.cne03_minus_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk.T230826b.png)
INFO:__main__:
INFO:__main__:Quality Control Test PASSED

ice_thickness_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk cne03
ice_thickness_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk T230826b
ice_thickness_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk cne03_minus_cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk T230826b

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

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

Perfect, thanks for running the QC test.

@apcraig apcraig merged commit 23b6c12 into CICE-Consortium:main Aug 30, 2023
2 checks passed
phil-blain added a commit to phil-blain/Icepack that referenced this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants