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

Add snowtable implementation #3

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

apcraig
Copy link

@apcraig apcraig commented Jun 10, 2021

PR checklist

  • Short (1 sentence) summary of your PR:
    Add snowtable implementation
  • Developer(s):
    apcraig
  • Suggest PR reviewers from list in the column to the right.
  • Please copy the PR test results link or provide a summary of testing completed below.
    Tested on cheyenne intel with Icepack isnow1tc2 mods. All results pass but not bit-for-bit with the current consortium master. https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#8a90b84895c3a42806db0345a4183e22715ee066. Answers here should not be changed relative to current snow1 branch.
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on Icepack or any other models?
    • Yes, needs isnow1tc2 mods
    • No
  • Does this PR add any new test cases?
    • Yes
    • No
  • Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/. A test build of the technical docs will be performed as part of the PR testing.)
    • Yes, but more needs to be done for snow.
    • No, does the documentation need to be updated at a later time?
      • Yes
      • No
  • Please provide any additional information or relevant details below:

The new implementation has the following options

snw_aging_table="test", internally sets the snow table to be the 5x5x1 dataset.

snw_aging_table="snicar", reads the tau, kappa, and drdt0 3D fields from the snw_filename file, reading snw_tau_fname, snw_kappa_fname, and snw_drdt0_fname fields. The one dimensional fields that support the table lookup are hardwired in icepack (and not totally consistent with the snicar data).

snw_aging_table="file", read the tau, kappa, and drdt0 3D fields from the snw_filename file, reading snw_tau_fname, snw_kappa_fname, and snw_drdt0_fname fields. In addition, the 1D rhos, Tgrd, and T fields are read from the same file using the snw_rhos_fname, snw_Tgrd_fname, and snw_T_fname field names.

The icepack table lookup only supports tables that have 1D regularly spaces dimensions. A place holder for non-regularly dimensions is in Icepack, but not yet developed. Many checks were added to Icepack to ensure the data sizes and regularity are consistent with the implementation.

Minimal documentation on the namelist are added, but more may be needed before merging with master.

Copy link

@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.

This all looks good to me, though I have some questions below. For CICE, I think we should only have the 'file' option, not 'snicar'. For Icepack maybe we should keep both in the code but only offer 'file' officially, so that MPAS can use the 'snicar' approach if necessary.

@@ -1,7 +1,17 @@
tr_snow = .true.
snwgrain = .true.

Choose a reason for hiding this comment

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

snwgrain and use_smliq_pnd should not be set here - my mistake

Choose a reason for hiding this comment

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

Both set_nml.nsw30percent and set_nml.nswITDrdg control wind redistribution of snow, which is fundamentally a separate process from the snow grain metamorphism. What I had in mind is to be able to set the processes individually (with others turned off) as -s snw30percent or -s snwITDrdg, or together as e.g. -s snwITDrdg,snwgrain. So I don't think we should have snw_aging_table etc in the snow redistribution options, but it should be in snwgrain. In the case where we want to run both, that should set snw_aging_table appropriately regardless of the order -s snwITDrdg,snwgrain or -s snwgrain,snwITDrdg, right?

tr_snow = .true.
snwgrain = .true.
tr_snow = .true.
snwredist = 'ITDrdg'

Choose a reason for hiding this comment

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

snwredist should probably not be set here

Copy link
Author

Choose a reason for hiding this comment

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

I leave it to you to review and update the snw set_nml settings. I updated the defaults, so all the snw flags were basically off. So the set_nml.snw* files needed to be updated.

Choose a reason for hiding this comment

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

I will change the option file appropriately.

deallocate(snowage_drdt0)

else
! read everything and pass it in

Choose a reason for hiding this comment

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

I'm in favor of just reading everything in, if it's all available in the file anyhow. What is different in the file from the coded version? I'm wondering if I don't have the most up-to-date file.

Copy link
Author

Choose a reason for hiding this comment

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

See the icepack PR. I set the mode to "file" in the set_nml files because I agree it's the right way to do it. Also, I have not implemented any table reading in Icepack. That functionality could be ported there, but I thought Icepack was just going to use the "test" data.

Choose a reason for hiding this comment

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

Icepack will only use the 'test' data. If we have both 'snicar' and 'file' in Icepack and remove 'snicar' from CICE, then 'snicar' in Icepack won't get tested. I'm in favor of removing it completely. Will wait for N's response.

@eclare108213 eclare108213 merged commit 86c1be9 into Arctic-InteRFACE:snow1 Jun 11, 2021
@apcraig apcraig deleted the snow1tc2 branch August 17, 2022 20:58
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.

2 participants