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

update icepack to support snowtable better #1

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:
    Update Icepack to support the snowtable better
  • 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 with CICE changes, full test suite on cheyenne with intel has all tests pass but are not bit-for-bit with the current Consortium master (expected). https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#8a90b84895c3a42806db0345a4183e22715ee066. This code should be bit-for-bit with the base though.
  • 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 CICE or any other models?
    • Yes
    • 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/.)
    • Yes, but more is needed 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:

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.

Looks great. Again, a few comments/questions that can be addressed later. Approving now so I can merge/test.

columnphysics/icepack_parameters.F90 Show resolved Hide resolved
! if snw_aging_table = 'file'
! all data has to be passed into icepack_parameters

! tcraig, should be 223.15 and 243.15 below

Choose a reason for hiding this comment

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

Ah, this is what's different with when reading the file. I think these should be fixed here, now.
If we do that, then is there any reason to have the 'snicar' option? Speed?

Copy link
Author

Choose a reason for hiding this comment

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

Actually, the documentation isn't quite correct. The 11 temperatures goe from 223 to 273 by 5 while on the actual snicar file they go from 223.15 to 273.15 by 5. That is the "bug" in the hardwired "snicar" values.

The only reason to keep snicar is if there are table input file that do not have the 1D data on them. Or if we want to preserve the old 1D values which may not be correct.

Choose a reason for hiding this comment

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

@njeffery
@apcraig turned up an inconsistency between the snow aging file that I gave him (which was the most recent one on LANL IC machines, snicar_drdt_bst_fit_60_c04262019.nc), where the code uses 223.0 as the starting T index but the file has 223.15. My inclination is to fix this in the code, but I want to make sure that the file I'm using is correct.

Alternatively, we can dispense with the index calculation in the code completely, and just read it from the file. That's much better from a software perspective. Thoughts?

Choose a reason for hiding this comment

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

I double checked the snicar file and it's correct. Also, the ELM code uses an integer 223 in this expression, not 223.15.

endif

! boundary check:
rhos_idx = min(isnw_rhos, max(1,rhos_idx))

Choose a reason for hiding this comment

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

These indices are different by +1. Is this a bug in the original code?

Copy link
Author

Choose a reason for hiding this comment

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

I moved the +1 into the index calculation. If you look at the previous implementation, it was part of the index check in the next code block. I thought it was clearer to put the +1 in the computation of the index then check the index cleanly vs min/max after.

doc/source/icepack_index.rst Show resolved Hide resolved
@eclare108213
Copy link

Should probably also update icepack_in and set_nml.snw* to be consistent with CICE's. Will make a note to do that...

@eclare108213 eclare108213 merged commit 4a42672 into Arctic-InteRFACE:isnow1 Jun 11, 2021
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.

3 participants