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

Make dsnow and dsnown optional #506

Merged
merged 3 commits into from
Nov 15, 2024
Merged

Make dsnow and dsnown optional #506

merged 3 commits into from
Nov 15, 2024

Conversation

dabail10
Copy link
Contributor

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:
    Reopened this one. This solves issue Make dsnow and dsnown optional. #492
  • Developer(s):
    dabail10 (D. Bailey)
  • 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.
    https://github.com/CICE-Consortium/Test-Results/wiki/icepack_by_hash#286630fdecc8efc4dcf4bd7ecf2315101c69c391
  • 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
    • No, does the documentation need to be updated at a later time?
      • Yes
      • No
  • Please document the changes in detail, including why the changes are made. This will become part of the PR commit log.
    This is the icepack part of making both dsnow and dsnown optional. Later I can add some diagnostics for these in CICE.

Copy link
Contributor

@apcraig apcraig left a comment

Choose a reason for hiding this comment

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

Looks like you never copy l_dsnow and l_dsnown back into dsnow and dsnown(n) at the end of subroutine icepack_step_therm1. Or are these intent(in) only?

@apcraig
Copy link
Contributor

apcraig commented Nov 12, 2024

Before we merge here, maybe we should make sure they work properly with the Icepack driver and/or CICE with whatever changes might be implemented there.

@dabail10
Copy link
Contributor Author

I did run the base_suite here. Thanks for the heads up on the l_dsnow and l_dsnown.

@dabail10
Copy link
Contributor Author

Running a base_suite in CICE to make sure.

@dabail10
Copy link
Contributor Author

@@ -2589,7 +2601,8 @@ subroutine icepack_step_therm1(dt, &
meltbn (n) = c0
congeln(n) = c0
snoicen(n) = c0
dsnown (n) = c0
l_dsnown = c0
if (present(dsnown)) l_dsnown = dsnown (n)
Copy link
Contributor

Choose a reason for hiding this comment

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

If the old implementation, "dsnown(n)" was always set to zero before being passed into thermo_vertical. Now it is being initialized to the incoming value of "dsnown(n)". Is this correct? Why doesn't this change answers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This confused me as well, but dsnow and dsnown are both intent(inout). I guess the initialization to zero is automatically happening in the driver and we were never using it in the driver. I will fix this though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am thinking that dsnown should be intent out only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, dsnown (called dsnow) is initialized to zero in thermo_vertical. Again, it should really only be intent(out).

Copy link
Contributor

Choose a reason for hiding this comment

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

@dabail10, Please make updates ASAP if possible, would like to get this merged and into weekend testing as first steps to release. Thanks.

@dabail10
Copy link
Contributor Author

dabail10 commented Nov 15, 2024

I have just pushed the change.

@@ -2589,7 +2601,8 @@ subroutine icepack_step_therm1(dt, &
meltbn (n) = c0
congeln(n) = c0
snoicen(n) = c0
dsnown (n) = c0
l_dsnown = c0
if (present(dsnown)) dsnown(n) = c0
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is redundant, you should remove it.

@apcraig
Copy link
Contributor

apcraig commented Nov 15, 2024

I'm going to merge this then remove the redundant line when I update the version number.

@apcraig apcraig merged commit 8c3f26a into CICE-Consortium:main Nov 15, 2024
2 checks passed
apcraig added a commit to apcraig/Icepack that referenced this pull request Nov 15, 2024
Update interface documentation

Clean up redundant dsnown line in icepack_therm_vertical, see CICE-Consortium#506.
@apcraig apcraig mentioned this pull request Nov 15, 2024
16 tasks
apcraig added a commit that referenced this pull request Nov 15, 2024
Update interface documentation

Clean up redundant dsnown line in icepack_therm_vertical, see #506.
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