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

Changes for CLM lake to work in CCPP SCM #497

Merged
merged 8 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
branch = main
[submodule "ccpp-physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = main
url = https://github.com/dustinswales/ccpp-physics
branch = hotfix/clmlake_in_scm
[submodule "CMakeModules"]
path = CMakeModules
url = https://github.com/noaa-emc/CMakeModules
Expand Down
4 changes: 2 additions & 2 deletions scm/src/scm_type_defs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ subroutine physics_set(physics, scm_input, scm_state)
!
! Orographical data (2D)
!
if (scm_state%model_ics) then
if (scm_state%model_ics .or. scm_state%lsm_ics) then
Copy link
Collaborator

Choose a reason for hiding this comment

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

@dustinswales I don't understand why this is needed. If one is using only ICs for LSMs (i.e. the GABLS3 canned cases), you don't need all of the orographic data. Are you saying that we need landfrac, lakefrac and lakedepth as additional variables when importing LSM ICs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, if the LSM is coupled to a lake model, we need landfrac, lakefrac and lakedepth as ICs.
I didn't want to add a new flag for "lake_ics", so I did this. I'm open to alternatives.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's weird that these variables are included in the "oro" files rather than the "sfc" files. I'm going to push a commit to this that needs to be tested for both a canned GABLS3 case and a UFS lake case to make sure that it's doing the right thing. As-is, this will break the GABLS3 canned cases, I think.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm going to test it real quick before I try to "fix" anything.

Copy link
Collaborator

Choose a reason for hiding this comment

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

write(0,'(a)') "Setting internal physics variables from the orographic section of the case input file (scalars)..."
call conditionally_set_var(scm_input%input_stddev, physics%Sfcprop%hprime(i,1), "stddev", .true., missing_var(1))
call conditionally_set_var(scm_input%input_convexity, physics%Sfcprop%hprime(i,2), "convexity", .true., missing_var(2))
Expand Down Expand Up @@ -1203,7 +1203,7 @@ subroutine physics_set(physics, scm_input, scm_state)
! Derive physics quantities using surface model ICs.
!
if(scm_state%model_ics .or. scm_state%lsm_ics) then
if (physics%Sfcprop%stype(i) == 14 .or. physics%Sfcprop%stype(i)+0.5 <= 0) then
if (physics%Sfcprop%stype(i) == 14 .or. physics%Sfcprop%stype(i) <= 0) then
physics%Sfcprop%landfrac(i) = real_zero
physics%Sfcprop%stype(i) = 0
if (physics%Sfcprop%lakefrac(i) > real_zero) then
Expand Down
Loading