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

Skip using fluxes provided by land component for first time step #234

Open
wants to merge 5 commits into
base: ufs/dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
6 changes: 4 additions & 2 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ end subroutine noahmpdrv_finalize
subroutine noahmpdrv_run &
!...................................
! --- inputs:
( im, km, lsnowl, itime, ps, u1, v1, t1, q1, soiltyp,soilcol,&
( im, km, lsnowl, itime, flag_init, ps, u1, v1, t1, q1, &
soiltyp,soilcol, &
vegtype, sigmaf, dlwflx, dswsfc, snet, delt, tg3, cm, ch, &
prsl1, prslk1, prslki, prsik1, zf,pblh, dry, wind, slopetyp,&
shdmin, shdmax, snoalb, sfalb, flag_iter,con_g, &
Expand Down Expand Up @@ -526,6 +527,7 @@ subroutine noahmpdrv_run &
integer , intent(in) :: km ! vertical soil layer dimension
integer , intent(in) :: lsnowl ! lower bound for snow level arrays
integer , intent(in) :: itime ! NOT USED
logical , intent(in) :: flag_init ! flag signaling first time step
real(kind=kind_phys), dimension(:) , intent(in) :: ps ! surface pressure [Pa]
real(kind=kind_phys), dimension(:) , intent(in) :: u1 ! u-component of wind [m/s]
real(kind=kind_phys), dimension(:) , intent(in) :: v1 ! u-component of wind [m/s]
Expand Down Expand Up @@ -986,7 +988,7 @@ subroutine noahmpdrv_run &
!
! --- Just return if external land component is activated for two-way interaction
!
if (cpllnd .and. cpllnd2atm) return
if (cpllnd .and. cpllnd2atm .and. (.not. flag_init)) return
Copy link
Collaborator

@barlage barlage Dec 19, 2024

Choose a reason for hiding this comment

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

@uturuncoglu I'm a little confused at the logic now. I thought with the new approach that we wouldn't need to call ccpp noahmp at all. Isn't this saying that with the land component, on the first time step we need to run the ccpp noahmp?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@barlage let me check this part again. I might need to remove (.not. flag_init) since I think it is not neccecary. The logic is that the sfc_land will calculate the fluxes internally in the initial step (if it is cold run) and after that will get the fluxes from component model.

Copy link
Collaborator

Choose a reason for hiding this comment

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

that was my main point, that the changes to noahmpdrv.F90 and .meta don't seem necessary anymore.


do i = 1, im

Expand Down
7 changes: 7 additions & 0 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@
dimensions = ()
type = integer
intent = in
[flag_init]
standard_name = flag_for_first_timestep
long_name = flag signaling first time step for time integration loop
units = flag
dimensions = ()
type = logical
intent = in
[ps]
standard_name = surface_air_pressure
long_name = surface pressure
Expand Down
11 changes: 8 additions & 3 deletions physics/SFC_Models/Land/sfc_land.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ module sfc_land
!! \section general General Algorithm
!! \section detailed Detailed Algorithm
!! @{
subroutine sfc_land_run(im, cpllnd, cpllnd2atm, flag_iter, dry, &
sncovr1_lnd, qsurf_lnd, evap_lnd, hflx_lnd, &
ep_lnd, t2mmp_lnd, q2mp_lnd, gflux_lnd, &
subroutine sfc_land_run(im, flag_init, flag_restart, &
cpllnd, cpllnd2atm, flag_iter, dry, sncovr1_lnd, qsurf_lnd, &
evap_lnd, hflx_lnd, ep_lnd, t2mmp_lnd, q2mp_lnd, gflux_lnd, &
runoff_lnd, drain_lnd, cmm_lnd, chh_lnd, zvfun_lnd, &
sncovr1, qsurf, evap, hflx, ep, t2mmp, q2mp, &
gflux, runoff, drain, cmm, chh, zvfun, &
Expand All @@ -40,6 +40,8 @@ subroutine sfc_land_run(im, cpllnd, cpllnd2atm, flag_iter, dry, &

! Inputs
integer , intent(in) :: im
logical , intent(in) :: flag_init
logical , intent(in) :: flag_restart
logical , intent(in) :: cpllnd
logical , intent(in) :: cpllnd2atm
logical , intent(in) :: flag_iter(:)
Expand Down Expand Up @@ -85,6 +87,9 @@ subroutine sfc_land_run(im, cpllnd, cpllnd2atm, flag_iter, dry, &
! Check coupling from component land to atmosphere
if (.not. cpllnd2atm) return

! Check if it is cold or warm run
if (flag_init .and. .not.flag_restart) return

! Fill variables
do i = 1, im
sncovr1(i) = sncovr1_lnd(i)
Expand Down
14 changes: 14 additions & 0 deletions physics/SFC_Models/Land/sfc_land.meta
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
dimensions = ()
type = integer
intent = in
[flag_init]
standard_name = flag_for_first_timestep
long_name = flag signaling first time step for time integration loop
units = flag
dimensions = ()
type = logical
intent = in
[flag_restart]
standard_name = flag_for_restart
long_name = flag for restart (warmstart) or coldstart
units = flag
dimensions = ()
type = logical
intent = in
[cpllnd]
standard_name = flag_for_land_coupling
long_name = flag controlling cpllnd collection (default off)
Expand Down