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

move deformation out of loop for B grid only #755

Merged
merged 4 commits into from
Sep 22, 2022

Conversation

TillRasmussen
Copy link
Contributor

@TillRasmussen TillRasmussen commented Aug 21, 2022

For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium,
please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers

PR checklist

  • Short (1 sentence) summary of your PR:
    This adress issue check whether ice strength is calculated at the correct location. Move to after last subcycle? #739
  • Developer(s):
    Till Rasmussen, DMI
  • [x ] Suggest PR reviewers from list in the column to the right. @apcraig, @eclare108213 , @JFLemieux73 , @phil-blain
  • Please copy the PR test results link or provide a summary of testing completed below.
    ENTER INFORMATION HERE
  • How much do the PR code changes differ from the unmodified code?
    • bit for bit
    • [ x] different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on Icepack or any other models?
    • Yes
    • [ x] No
  • Does this PR add any new test cases?
    • Yes
    • [ x] 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
    • [x ] No, does the documentation need to be updated at a later time?
      • Yes
      • [x ] No
  • Please provide any additional information or relevant details below:
    In order to address issue check whether ice strength is calculated at the correct location. Move to after last subcycle? #739 the call to deformation has been moved outside the subcycling loop. The results are expected not bit for bit however they pass qc test. Whether the original implementation or this is more correct is unclear to me but the deformations are called using the velocities at ksub=ndte instead of ndte-1

2 questions

1/ should I make the same test for c and c grid before this is merged.

2/ should we refactor the code so that it reads

if B grid
do sub cycling
end subcycling
else if C grid
do sub cycling
end subcycling
else if CD grid
do sub cycling
end subcycling
endif
As an alternative to the present
do subcycling
if B
else if C
else if CD
endif
enddo.

I would prefer the first but I will not do it before I have heard your opinion.
The qc test png files are attached below
ice_thickness_freya_intel_smoke_gx1_36x1_medium_qc qc_base
ice_thickness_freya_intel_smoke_gx1_36x1_medium_qc qc_base_minus_freya_intel_smoke_gx1_36x1_medium_qc qc_te
ice_thickness_freya_intel_smoke_gx1_36x1_medium_qc qc_te

@eclare108213
Copy link
Contributor

1/ should I make the same test for c and c grid before this is merged.

Yes, just for C grid. CD isn't working well enough yet to worry about.

2/ should we refactor the code

I'd prefer the former also. Seems like it ought to be more computationally efficient than having all those big conditionals in the subcycling loop.

@apcraig
Copy link
Contributor

apcraig commented Aug 24, 2022

This branch has a conflict with the merge of #756. Please review and update. Thanks.

@TillRasmussen
Copy link
Contributor Author

I updated the code and moved the calls to deformation. Attached are the qc test
First B grid. All pass the test
ice_thickness_gridb_base
ice_thickness_gridb_base_minus_gridb_te
ice_thickness_gridb_te

@TillRasmussen
Copy link
Contributor Author

Grid
ice_thickness_gridc_base
ice_thickness_gridc_base_minus_gridc_te
ice_thickness_gridc_te
C

@TillRasmussen
Copy link
Contributor Author

Grid CD
ice_thickness_gridcd_base
ice_thickness_gridcd_base_minus_gridcd_te
ice_thickness_gridcd_te

@apcraig
Copy link
Contributor

apcraig commented Sep 19, 2022

Looks like this PR is ready to merge. Sorry I haven't taken care of it before now. Unless anyone says it's not ready, I'll merge in the next day or two. Thanks.

@eclare108213
Copy link
Contributor

@apcraig I think it's ready but will let you merge it when you're ready to set up new baselines.

@apcraig
Copy link
Contributor

apcraig commented Sep 22, 2022

Just to be sure, I ran a full test suite on cheyenne with 3 compilers, https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks#d52704ceef4e003aae692e69424f5773a6bf6980. Everything runs fine and almost all answers change. Some of the box tests and eap/vp tests do not, as expected. The QC results pass for all three compilers vs current main, so that should provide verification that climate is the same,

PASS cheyenne_intel_qcchk_gx1_144x1_medium_qc_qcchk compare cice.007fbff9b1.220917-085008 -1 -1 -1
PASS cheyenne_pgi_qcchk_gx1_144x1_medium_qc_qcchk compare cice.007fbff9b1.220917-085008 -1 -1 -1
PASS cheyenne_gnu_qcchk_gx1_144x1_medium_qc_qcchk compare cice.007fbff9b1.220917-085008 -1 -1 -1

Will merge now.

@apcraig apcraig merged commit 6587995 into CICE-Consortium:main Sep 22, 2022
dabail10 pushed a commit to ESCOMP/CICE that referenced this pull request Oct 4, 2022
* move deformation out of loop for B grid only

* Moved C and CD grid deformations

* correct location of bgrid deformation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants