-
Notifications
You must be signed in to change notification settings - Fork 34
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
Changes from 13 commits
d290014
7e29546
079e47a
40e092d
64fdd5a
91a9b44
9cfe116
8442a20
8788aa8
87bd714
1afb8fc
9891fff
70038f6
6ec72e9
aaff49f
cd678c6
d75c657
36fc7d9
fe77e06
09b0235
ca1a6e3
02b3440
c0544c2
a0acaed
042d156
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -633,6 +633,20 @@ | |
dimensions = () | ||
type = logical | ||
intent = in | ||
[cpllnd] | ||
standard_name = flag_for_land_coupling | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've been moving to There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
!> \file sfc_land.f | ||
!! 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 | ||
|
||
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 & | ||
! --- inputs: | ||
& ( 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, & | ||
! --- outputs: | ||
& sncovr1, qsurf, evap, hflx, ep, t2mmp, q2mp, & | ||
& gflux, runoff, drain, cmm, chh, zvfun, & | ||
& errmsg, errflg | ||
& ) | ||
|
||
! ===================================================================== ! | ||
! description: ! | ||
! Dec 2022 -- Ufuk Turuncoglu created for coupling to land ! | ||
! ! | ||
! usage: ! | ||
! ! | ||
! call sfc_land ! | ||
! inputs: ! | ||
! ( 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, ! | ||
! outputs: ! | ||
! sncovr1, qsurf, evap, hflx, ep, t2mmp, q2mp, ! | ||
! gflux, runoff, drain, cmm, chh, zvfun, ! | ||
! errmsg, errflg) ! | ||
! ! | ||
! ==================== defination of variables ==================== ! | ||
! ! | ||
! inputs: | ||
! im - integer, horiz dimension | ||
! cpllnd - logical, flag for land coupling | ||
! cpllnd2atm - logical, flag for land coupling (lnd->atm) | ||
! flag_iter - logical, flag for iteration | ||
! dry - logical, eq T if a point with any land | ||
! sncovr1_lnd - real , surface snow area fraction | ||
! qsurf_lnd - real , specific humidity at sfc | ||
! evap_lnd - real , evaporation from latent heat | ||
! hflx_lnd - real , sensible heat | ||
! ep_lnd - real , surface upward potential latent heat flux | ||
! t2mmp_lnd - real , 2m temperature | ||
! q2mp_lnd - real , 2m specific humidity | ||
! gflux_lnd - real , soil heat flux over land | ||
! runoff_lnd - real , surface runoff | ||
! drain_lnd - real , subsurface runoff | ||
! cmm_lnd - real , surface drag wind speed for momentum | ||
! chh_lnd - real , surface drag mass flux for heat and moisture | ||
! zvfun_lnd - real , function of surface roughness length and green vegetation fraction | ||
! outputs: | ||
! sncovr1 - real , snow cover over land | ||
! qsurf - real , specific humidity at sfc | ||
! evap - real , evaporation from latent heat | ||
! hflx - real , sensible heat | ||
! ep - real , potential evaporation | ||
! t2mmp - real , temperature at 2m | ||
! q2mp - real , specific humidity at 2m | ||
! gflux - real , soil heat flux over land | ||
! runoff - real , surface runoff | ||
! drain - real , subsurface runoff | ||
! cmm - real , surface drag wind speed for momentum | ||
! chh - real , surface drag mass flux for heat and moisture | ||
! zvfun - real , function of surface roughness length and green vegetation fraction | ||
! ==================== end of description ===================== ! | ||
! | ||
! | ||
use machine , only : kind_phys | ||
implicit none | ||
|
||
! --- inputs: | ||
integer, intent(in) :: im | ||
logical, intent(in) :: cpllnd, cpllnd2atm | ||
logical, dimension(:), intent(in) :: flag_iter | ||
logical, dimension(:), intent(in) :: dry | ||
|
||
real (kind=kind_phys), dimension(:), intent(in) :: & | ||
& 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 | ||
|
||
! --- outputs: | ||
real (kind=kind_phys), dimension(:), intent(inout) :: & | ||
& sncovr1, qsurf, evap, hflx, ep, t2mmp, q2mp, gflux, & | ||
& runoff, drain, cmm, chh, zvfun | ||
! | ||
character(len=*), intent(out) :: errmsg | ||
integer, intent(out) :: errflg | ||
|
||
! --- locals: | ||
|
||
integer :: i | ||
|
||
! Initialize CCPP error handling variables | ||
errmsg = '' | ||
errflg = 0 | ||
! | ||
if (.not. cpllnd2atm) return | ||
! | ||
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 | ||
|
||
return | ||
!----------------------------------- | ||
end subroutine sfc_land_run | ||
!----------------------------------- | ||
|
||
!> @} | ||
end module sfc_land |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.