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

Updates for component land model #94

Merged
merged 25 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d290014
add sfc_land and allow sbs along with fully coupled
uturuncoglu Jan 10, 2023
7e29546
update sfc_land
uturuncoglu Feb 7, 2023
079e47a
Merge remote-tracking branch 'upstream/ufs/dev' into feature/noahmp
uturuncoglu Feb 7, 2023
40e092d
add runoff and drain to land coupling
uturuncoglu Feb 23, 2023
64fdd5a
add exchange coefficents
uturuncoglu Mar 7, 2023
91a9b44
add zvfun to land coupling
uturuncoglu Mar 8, 2023
9cfe116
Merge remote-tracking branch 'upstream/ufs/dev' into feature/noahmp
uturuncoglu Apr 5, 2023
8442a20
clean sfc_land
uturuncoglu Apr 5, 2023
8788aa8
Merge remote-tracking branch 'upstream/ufs/dev' into feature/noahmp
uturuncoglu Apr 8, 2023
87bd714
Merge remote-tracking branch 'upstream/ufs/dev' into feature/noahmp
uturuncoglu Apr 19, 2023
1afb8fc
Merge remote-tracking branch 'upstream/ufs/dev' into feature/noahmp
uturuncoglu Jul 25, 2023
9891fff
switch from in to inout for output variables
uturuncoglu Jul 31, 2023
70038f6
update meta file for sfc_land too
uturuncoglu Jul 31, 2023
6ec72e9
update sfc_land
uturuncoglu Jul 31, 2023
aaff49f
Merge remote-tracking branch 'upstream/ufs/dev' into feature/noahmp
uturuncoglu Sep 18, 2023
cd678c6
Merge remote-tracking branch 'upstream/ufs/dev' into feature/noahmp
uturuncoglu Oct 12, 2023
d75c657
Merge remote-tracking branch 'upsream/ufs/dev' into feature/noahmp
uturuncoglu Dec 20, 2023
36fc7d9
Merge remote-tracking branch 'upsream/ufs/dev' into feature/noahmp
uturuncoglu Jan 8, 2024
fe77e06
move sfc_land to new location
uturuncoglu Jan 8, 2024
09b0235
fix meta file
uturuncoglu Jan 8, 2024
ca1a6e3
Merge remote-tracking branch 'upsream/ufs/dev' into feature/noahmp
uturuncoglu Jan 16, 2024
02b3440
"Supplementary physics updates for RRFS code freeze"
haiqinli Jan 19, 2024
c0544c2
"update to address code reviewer's comments"
haiqinli Jan 23, 2024
a0acaed
"update to resolve code managers' comments"
haiqinli Jan 24, 2024
042d156
Merge remote-tracking branch 'haiqinli/ufs/dev-smoke-dust' into featu…
uturuncoglu Jan 24, 2024
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
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ physics/ysuvdif.* @Qingfu-Liu @WeiguoWang-NOAA
physics/zhaocarr_gscond.* @RuiyuSun @grantfirl @Qingfu-Liu @dustinswales
physics/zhaocarr_precpd.* @RuiyuSun @grantfirl @Qingfu-Liu @dustinswales

physics/sfc_land.* @uturuncoglu @barlage
Copy link
Collaborator

Choose a reason for hiding this comment

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

@uturuncoglu Since you're adding yourself to the CODEOWNERS, please accept the collaboration invitation for this repository that I just sent you so that you will be added as a reviewer automatically when these files are touched in a PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@grantfirl Sorry. I did not do it intentionally. I was just trying to follow the conventions in there. Since I am not doing to much development in CCPP side, you could remove me from the list. That is totally fine.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@uturuncoglu IMO, it's totally appropriate to add you since you're adding these files to the repository. If @barlage is OK with being the CODEOWNER by himself, that is OK too. I'll let you two decide what you'd prefer.


########################################################################

# Lines starting with '#' are comments.
Expand Down
12 changes: 10 additions & 2 deletions physics/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ subroutine noahmpdrv_run &
iopt_trs,iopt_diag,xlatin, xcoszin, iyrlen, julian, garea, &
rainn_mp, rainc_mp, snow_mp, graupel_mp, ice_mp, rhonewsn1,&
con_hvap, con_cp, con_jcal, rhoh2o, con_eps, con_epsm1, &
con_fvirt, con_rd, con_hfus, thsfc_loc, &
con_fvirt, con_rd, con_hfus, thsfc_loc, cpllnd, cpllnd2atm,&

! --- in/outs:
weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, &
Expand Down Expand Up @@ -310,6 +310,9 @@ subroutine noahmpdrv_run &

logical , intent(in) :: thsfc_loc ! Flag for reference pressure in theta calculation

logical , intent(in) :: cpllnd ! Flag for land coupling (atm->lnd)
logical , intent(in) :: cpllnd2atm ! Flag for land coupling (lnd->atm)

real(kind=kind_phys), dimension(:) , intent(inout) :: weasd ! water equivalent accumulated snow depth [mm]
real(kind=kind_phys), dimension(:) , intent(inout) :: snwdph ! snow depth [mm]
real(kind=kind_phys), dimension(:) , intent(inout) :: tskin ! ground surface skin temperature [K]
Expand Down Expand Up @@ -684,7 +687,12 @@ subroutine noahmpdrv_run &
errmsg = ''
errflg = 0

do i = 1, im
!
! --- Just return if external land component is activated for two-way interaction
!
if (cpllnd .and. cpllnd2atm) return

do i = 1, im

if (flag_iter(i) .and. dry(i)) then

Expand Down
14 changes: 14 additions & 0 deletions physics/noahmpdrv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,20 @@
dimensions = ()
type = logical
intent = in
[cpllnd]
standard_name = flag_for_land_coupling
Copy link
Collaborator

Choose a reason for hiding this comment

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

We've been moving to do_* rather than flag_for*, but since flag_for_land_coupling already exists and there are several others like it, it seems unfair to ask you to change it everywhere. This will have to be part of a separate standard name cleanup at some later point, I guess.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@grantfirl That is fine. I could fix them at least for land component coupling related once. When I look at to the examples for it, I found do_mynnsfclay but it's standard name is start with flag_for. Do you have any convention for it or just changing the argument name is fine at this point. Anyway, let me know what you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ya, I was talking about standard names only. I think that the variable names in the code are fine and the CCPP doesn't care. But, like I said, I wouldn't worry about changing it now since there is a lot of cleanup in other places to do anyway. The comment was more for the future, if you're going to be adding more on/off logicals, I think that having the standard names start with do_X is what the CCPP physics management committee prefers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@grantfirl Okay. I am not doing those changes at this point. Thanks.

long_name = flag controlling cpllnd collection (default off)
units = flag
dimensions = ()
type = logical
intent = in
[cpllnd2atm]
standard_name = flag_for_one_way_land_coupling_to_atmosphere
long_name = flag controlling land coupling to the atmosphere (default off)
units = flag
dimensions = ()
type = logical
intent = in
[weasd]
standard_name = water_equivalent_accumulated_snow_depth_over_land
long_name = water equiv of acc snow depth over land
Expand Down
108 changes: 108 additions & 0 deletions physics/sfc_land.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
!> \file sfc_land.F90
!! This file contains the code for coupling to land component

!> This module contains the CCPP-compliant GFS land post
!! interstitial codes, which returns updated surface
!! properties such as latent heat and sensible heat
!! provided by the component version of land model

!> This module contains the CCPP-compliant GFS land scheme.
module sfc_land

use machine, only : kind_phys

contains

!> \defgroup sfc_land for coupling to land
!! @{
!! \section diagram Calling Hierarchy Diagram
!! \section intraphysics Intraphysics Communication
!!
!> \brief Brief description of the subroutine
!!
!! \section arg_table_sfc_land_run Arguments
!! \htmlinclude sfc_land_run.html
!!

!!
!! \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, &
runoff_lnd, drain_lnd, cmm_lnd, chh_lnd, zvfun_lnd, &
sncovr1, qsurf, evap, hflx, ep, t2mmp, q2mp, &
gflux, runoff, drain, cmm, chh, zvfun, &
errmsg, errflg)

implicit none

! Inputs
integer , intent(in) :: im
logical , intent(in) :: cpllnd
logical , intent(in) :: cpllnd2atm
logical , intent(in) :: flag_iter(:)
logical , intent(in) :: dry(:)
real(kind=kind_phys), intent(in) :: sncovr1_lnd(:)
real(kind=kind_phys), intent(in) :: qsurf_lnd(:)
real(kind=kind_phys), intent(in) :: evap_lnd(:)
real(kind=kind_phys), intent(in) :: hflx_lnd(:)
real(kind=kind_phys), intent(in) :: ep_lnd(:)
real(kind=kind_phys), intent(in) :: t2mmp_lnd(:)
real(kind=kind_phys), intent(in) :: q2mp_lnd(:)
real(kind=kind_phys), intent(in) :: gflux_lnd(:)
real(kind=kind_phys), intent(in) :: runoff_lnd(:)
real(kind=kind_phys), intent(in) :: drain_lnd(:)
real(kind=kind_phys), intent(in) :: cmm_lnd(:)
real(kind=kind_phys), intent(in) :: chh_lnd(:)
real(kind=kind_phys), intent(in) :: zvfun_lnd(:)
! Inputs/Outputs
real(kind=kind_phys), intent(inout) :: sncovr1(:)
real(kind=kind_phys), intent(inout) :: qsurf(:)
real(kind=kind_phys), intent(inout) :: evap(:)
real(kind=kind_phys), intent(inout) :: hflx(:)
real(kind=kind_phys), intent(inout) :: ep(:)
real(kind=kind_phys), intent(inout) :: t2mmp(:)
real(kind=kind_phys), intent(inout) :: q2mp(:)
real(kind=kind_phys), intent(inout) :: gflux(:)
real(kind=kind_phys), intent(inout) :: runoff(:)
real(kind=kind_phys), intent(inout) :: drain(:)
real(kind=kind_phys), intent(inout) :: cmm(:)
real(kind=kind_phys), intent(inout) :: chh(:)
real(kind=kind_phys), intent(inout) :: zvfun(:)
! Outputs
character(len=*) , intent(out) :: errmsg
integer , intent(out) :: errflg

! Locals
integer :: i

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0

! Check coupling from component land to atmosphere
if (.not. cpllnd2atm) return

! Fill variables
do i = 1, im
sncovr1(i) = sncovr1_lnd(i)
qsurf(i) = qsurf_lnd(i)
hflx(i) = hflx_lnd(i)
evap(i) = evap_lnd(i)
ep(i) = ep_lnd(i)
t2mmp(i) = t2mmp_lnd(i)
q2mp(i) = q2mp_lnd(i)
gflux(i) = gflux_lnd(i)
drain(i) = drain_lnd(i)
runoff(i) = runoff_lnd(i)
cmm(i) = cmm_lnd(i)
chh(i) = chh_lnd(i)
zvfun(i) = zvfun_lnd(i)
enddo

end subroutine sfc_land_run

!> @}
end module sfc_land
Loading
Loading