From 41527dd33221e10952f9de0fdc30dcc22d4926c0 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Thu, 7 Nov 2024 22:59:45 -0600 Subject: [PATCH 01/14] skip land component for first time step --- physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 | 6 ++++-- physics/SFC_Models/Land/Noahmp/noahmpdrv.meta | 7 +++++++ physics/SFC_Models/Land/sfc_land.F90 | 7 ++++--- physics/SFC_Models/Land/sfc_land.meta | 7 +++++++ 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 index 1313e9ff3..56b2706b8 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 @@ -127,7 +127,8 @@ end subroutine noahmpdrv_init 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, & @@ -233,6 +234,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] @@ -693,7 +695,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 do i = 1, im diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta index 753550016..75bd4d7e1 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta @@ -129,6 +129,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 diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index a85e8b787..36bdcdc09 100644 --- a/physics/SFC_Models/Land/sfc_land.F90 +++ b/physics/SFC_Models/Land/sfc_land.F90 @@ -28,8 +28,8 @@ 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, & + subroutine sfc_land_run(im, flag_init, 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, & @@ -40,6 +40,7 @@ subroutine sfc_land_run(im, cpllnd, cpllnd2atm, flag_iter, dry, & ! Inputs integer , intent(in) :: im + logical , intent(in) :: flag_init logical , intent(in) :: cpllnd logical , intent(in) :: cpllnd2atm logical , intent(in) :: flag_iter(:) @@ -83,7 +84,7 @@ subroutine sfc_land_run(im, cpllnd, cpllnd2atm, flag_iter, dry, & errflg = 0 ! Check coupling from component land to atmosphere - if (.not. cpllnd2atm) return + if (flag_init .or. (.not. cpllnd2atm)) return ! Fill variables do i = 1, im diff --git a/physics/SFC_Models/Land/sfc_land.meta b/physics/SFC_Models/Land/sfc_land.meta index 15790145e..84c4ccdce 100644 --- a/physics/SFC_Models/Land/sfc_land.meta +++ b/physics/SFC_Models/Land/sfc_land.meta @@ -14,6 +14,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 [cpllnd] standard_name = flag_for_land_coupling long_name = flag controlling cpllnd collection (default off) From a1d1d23295692e3095853d05a58fd9e367bbc7f4 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Thu, 22 Aug 2024 15:13:01 +0000 Subject: [PATCH 02/14] add a new parameter to control if G-F cold starts or not --- physics/CONV/Grell_Freitas/cu_gf_driver.F90 | 6 +++--- physics/CONV/Grell_Freitas/cu_gf_driver.meta | 7 +++++++ physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90 | 5 +++-- physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta | 7 +++++++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/physics/CONV/Grell_Freitas/cu_gf_driver.F90 b/physics/CONV/Grell_Freitas/cu_gf_driver.F90 index 76bbf52e7..f951029ad 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver.F90 +++ b/physics/CONV/Grell_Freitas/cu_gf_driver.F90 @@ -56,7 +56,7 @@ end subroutine cu_gf_driver_init !! \htmlinclude cu_gf_driver_run.html !! !>\section gen_gf_driver Grell-Freitas Cumulus Scheme Driver General Algorithm - subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& + subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart, gf_coldstart, & cactiv,cactiv_m,g,cp,xlv,r_v,forcet,forceqv_spechum,phil,raincv, & qv_spechum,t,cld1d,us,vs,t2di,w,qv2di_spechum,p2di,psuri, & hbot,htop,kcnv,xland,hfx2,qfx2,aod_gf,cliw,clcw, & @@ -97,7 +97,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& integer :: its,ite, jts,jte, kts,kte integer, intent(in ) :: im,km,ntracer,nchem,kdt integer, intent(in ) :: ichoice_in,ichoicem_in,ichoice_s_in - logical, intent(in ) :: flag_init, flag_restart, do_mynnedmf + logical, intent(in ) :: flag_init, flag_restart, do_mynnedmf, gf_coldstart logical, intent(in ) :: flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend real (kind=kind_phys), intent(in) :: g,cp,xlv,r_v logical, intent(in ) :: ldiag3d @@ -431,7 +431,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& ccn_m(i) = 0. ! set aod and ccn - if (flag_init .and. .not.flag_restart) then + if ((flag_init .and. .not.flag_restart) .or. gf_coldstart) then aod_gf(i)=aodc0 else if((cactiv(i).eq.0) .and. (cactiv_m(i).eq.0))then diff --git a/physics/CONV/Grell_Freitas/cu_gf_driver.meta b/physics/CONV/Grell_Freitas/cu_gf_driver.meta index f76d0c30c..4a645b4ab 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver.meta +++ b/physics/CONV/Grell_Freitas/cu_gf_driver.meta @@ -588,6 +588,13 @@ dimensions = () type = logical intent = in +[gf_coldstart] + standard_name = flag_for_cold_start_gf + long_name = flag to cold start G-F + units = flag + dimensions = () + type = logical + intent = in [ichoice_in] standard_name = identifier_for_c3_or_gf_deep_convection_closure long_name = flag for C3 or GF deep convection closure diff --git a/physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90 b/physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90 index 1bc9aed34..7e022d983 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90 +++ b/physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90 @@ -15,7 +15,7 @@ module cu_gf_driver_pre !> \section arg_table_cu_gf_driver_pre_run Argument Table !! \htmlinclude cu_gf_driver_pre_run.html !! - subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q, prevst, prevsq, & + subroutine cu_gf_driver_pre_run (flag_init, flag_restart, gf_coldstart, kdt, fhour, dtp, t, q, prevst, prevsq, & forcet, forceq, cactiv, cactiv_m, conv_act, conv_act_m, & rrfs_sd, ntsmoke, ntdust, ntcoarsepm, chem3d, gq0, & errmsg, errflg) @@ -26,6 +26,7 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q, logical, intent(in) :: flag_init logical, intent(in) :: flag_restart + logical, intent(in) :: gf_coldstart logical, intent(in) :: rrfs_sd integer, intent(in) :: kdt real(kind_phys), intent(in) :: fhour @@ -59,7 +60,7 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, kdt, fhour, dtp, t, q, ! For restart runs, can assume that prevst and prevsq ! are read from the restart files beforehand, same ! for conv_act. - if(flag_init .and. .not.flag_restart) then + if((flag_init .and. .not.flag_restart) .or. gf_coldstart) then !$acc kernels forcet(:,:)=0.0 forceq(:,:)=0.0 diff --git a/physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta b/physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta index 105461758..397c42f8c 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta +++ b/physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta @@ -130,6 +130,13 @@ kind = kind_phys intent = in optional = True +[gf_coldstart] + standard_name = flag_for_cold_start_gf + long_name = flag to cold start G-F + units = flag + dimensions = () + type = logical + intent = in [rrfs_sd] standard_name = do_smoke_coupling long_name = flag controlling rrfs_sd collection From 727418758d115ae89bc49eaf84c4ee6acc50c975 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Fri, 6 Dec 2024 10:45:45 -0600 Subject: [PATCH 03/14] minor fix for restart --- physics/SFC_Models/Land/sfc_land.F90 | 12 ++++++++---- physics/SFC_Models/Land/sfc_land.meta | 7 +++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index 36bdcdc09..e222115f7 100644 --- a/physics/SFC_Models/Land/sfc_land.F90 +++ b/physics/SFC_Models/Land/sfc_land.F90 @@ -28,9 +28,9 @@ module sfc_land !! \section general General Algorithm !! \section detailed Detailed Algorithm !! @{ - subroutine sfc_land_run(im, flag_init, 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, & @@ -41,6 +41,7 @@ subroutine sfc_land_run(im, flag_init, cpllnd, cpllnd2atm, & ! 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(:) @@ -84,7 +85,10 @@ subroutine sfc_land_run(im, flag_init, cpllnd, cpllnd2atm, & errflg = 0 ! Check coupling from component land to atmosphere - if (flag_init .or. (.not. cpllnd2atm)) return + 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 diff --git a/physics/SFC_Models/Land/sfc_land.meta b/physics/SFC_Models/Land/sfc_land.meta index 84c4ccdce..13ddab00a 100644 --- a/physics/SFC_Models/Land/sfc_land.meta +++ b/physics/SFC_Models/Land/sfc_land.meta @@ -21,6 +21,13 @@ 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) From 2be44698e7b84e2276e2f0c9ca123ad8ebd6f660 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Thu, 19 Dec 2024 12:48:43 -0600 Subject: [PATCH 04/14] add simple land flux calculation that is used in the initial time step --- physics/SFC_Models/Land/sfc_land.F90 | 113 ++++++++++++++++++------ physics/SFC_Models/Land/sfc_land.meta | 122 +++++++++++++++++++++++++- 2 files changed, 207 insertions(+), 28 deletions(-) diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index e222115f7..d606054ed 100644 --- a/physics/SFC_Models/Land/sfc_land.F90 +++ b/physics/SFC_Models/Land/sfc_land.F90 @@ -10,6 +10,7 @@ module sfc_land use machine, only : kind_phys + use funcphys, only : fpvs contains @@ -29,23 +30,40 @@ module sfc_land !! \section detailed Detailed Algorithm !! @{ subroutine sfc_land_run(im, flag_init, flag_restart, & - cpllnd, cpllnd2atm, flag_iter, dry, sncovr1_lnd, qsurf_lnd, & + cpllnd, cpllnd2atm, flag_iter, dry, & + t1, q1, prsl1, prslki, ps, tskin, wind, cm, ch, rd, eps, epsm1, & + rvrdm1, hvap, cp, 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) + errmsg, errflg, naux2d, aux2d) implicit none ! 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(:) - logical , intent(in) :: dry(:) + 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(:) + logical , intent(in) :: dry(:) + real(kind=kind_phys), intent(in) :: t1(:) + real(kind=kind_phys), intent(in) :: q1(:) + real(kind=kind_phys), intent(in) :: prsl1(:) + real(kind=kind_phys), intent(in) :: prslki(:) + real(kind=kind_phys), intent(in) :: ps(:) + real(kind=kind_phys), intent(in) :: tskin(:) + real(kind=kind_phys), intent(in) :: wind(:) + real(kind=kind_phys), intent(in) :: cm(:) + real(kind=kind_phys), intent(in) :: ch(:) + real(kind=kind_phys), intent(in) :: rd + real(kind=kind_phys), intent(in) :: eps + real(kind=kind_phys), intent(in) :: epsm1 + real(kind=kind_phys), intent(in) :: rvrdm1 + real(kind=kind_phys), intent(in) :: hvap + real(kind=kind_phys), intent(in) :: cp real(kind=kind_phys), intent(in), optional :: sncovr1_lnd(:) real(kind=kind_phys), intent(in), optional :: qsurf_lnd(:) real(kind=kind_phys), intent(in), optional :: evap_lnd(:) @@ -77,35 +95,76 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & character(len=*) , intent(out) :: errmsg integer , intent(out) :: errflg + ! Constant parameters + real(kind=kind_phys), parameter :: & + & one = 1.0_kind_phys, & + & zero = 0.0_kind_phys, & + & qmin = 1.0e-8_kind_phys + ! Locals integer :: i + real(kind=kind_phys) :: qss, rch, tem, cpinv, hvapi, elocp + real(kind=kind_phys), dimension(im) :: rho, q0 ! Initialize CCPP error handling variables errmsg = '' errflg = 0 + cpinv = one/cp + hvapi = one/hvap + elocp = hvap/cp + ! 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) - 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 + if (flag_init .and. .not. flag_restart) then + ! Calculate fluxes internally + do i = 1, im + if (dry(i)) then + q0(i) = max(q1(i), qmin) + rho(i) = prsl1(i)/(rd*t1(i)*(one+rvrdm1*q0(i))) + qss = fpvs(tskin(i)) + qss = eps*qss/(ps(i)+epsm1*qss) + rch = rho(i)*cp*ch(i)*wind(i) + tem = ch(i)*wind(i) + sncovr1(i) = zero + qsurf(i) = qss + hflx(i) = rch*(tskin(i)-t1(i)*prslki(i)) + hflx(i) = hflx(i)*(1.0/rho(i))*cpinv + evap(i) = elocp*rch*(qss-q0(i)) + ep(i) = evap(i) + evap(i) = evap(i)*(1.0/rho(i))*hvapi + t2mmp(i) = tskin(i) + q2mp(i) = qsurf(i) + gflux(i) = zero + drain(i) = zero + runoff(i) = zero + cmm(i) = cm(i)*wind(i) + chh(i) = rho(i)*tem + zvfun(i) = one + end if + enddo + else + ! Use fluxes from land component model + do i = 1, im + if (dry(i)) then + 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) + end if + enddo + endif end subroutine sfc_land_run diff --git a/physics/SFC_Models/Land/sfc_land.meta b/physics/SFC_Models/Land/sfc_land.meta index 13ddab00a..b24a6f8af 100644 --- a/physics/SFC_Models/Land/sfc_land.meta +++ b/physics/SFC_Models/Land/sfc_land.meta @@ -1,7 +1,7 @@ [ccpp-table-properties] name = sfc_land type = scheme - dependencies = ../../hooks/machine.F + dependencies = ../../tools/funcphys.f90,../../hooks/machine.F ######################################################################## [ccpp-arg-table] @@ -56,6 +56,126 @@ dimensions = (horizontal_loop_extent) type = logical intent = in +[t1] + standard_name = air_temperature_at_surface_adjacent_layer + long_name = surface layer mean temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[q1] + standard_name = specific_humidity_at_surface_adjacent_layer + long_name = surface layer mean specific humidity + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[ps] + standard_name = surface_air_pressure + long_name = surface pressure + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[prsl1] + standard_name = air_pressure_at_surface_adjacent_layer + long_name = surface layer mean pressure + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[prslki] + standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + long_name = Exner function ratio bt midlayer and interface at 1st layer + units = ratio + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[tskin] + standard_name = surface_skin_temperature_over_land + long_name = surface skin temperature over land + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[wind] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[cm] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_land + long_name = surface exchange coeff for momentum over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[ch] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land + long_name = surface exchange coeff heat & moisture over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in +[epsm1] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + long_name = (rd/rv) - 1 + units = none + dimensions = () + type = real + kind = kind_phys + intent = in +[rvrdm1] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in +[rd] + standard_name = gas_constant_of_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in +[hvap] + standard_name = latent_heat_of_vaporization_of_water_at_0C + long_name = latent heat of evaporation/sublimation + units = J kg-1 + dimensions = () + type = real + kind = kind_phys + intent = in +[cp] + standard_name = specific_heat_of_dry_air_at_constant_pressure + long_name = specific heat of dry air at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in [sncovr1_lnd] standard_name = surface_snow_area_fraction_over_land_from_land long_name = surface snow area fraction over land for coupling From 491fbc3d77133cd02a44e2754040d7a195e9e11d Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Thu, 19 Dec 2024 14:14:48 -0600 Subject: [PATCH 05/14] fix minor issue --- physics/SFC_Models/Land/sfc_land.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index d606054ed..51a63cdae 100644 --- a/physics/SFC_Models/Land/sfc_land.F90 +++ b/physics/SFC_Models/Land/sfc_land.F90 @@ -37,7 +37,7 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & 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, naux2d, aux2d) + errmsg, errflg) implicit none From eab5725d79821de9b35e89fddf83f092ba2dd6d0 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 19 Dec 2024 14:43:55 -0700 Subject: [PATCH 06/14] Update physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.*: support multiple instances by making is_initialized a host-model variable --- .../GFS_phys_time_vary.fv3.F90 | 39 ++++++------------- .../GFS_phys_time_vary.fv3.meta | 39 ++++++++++--------- 2 files changed, 31 insertions(+), 47 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 index b556af06f..0c90478be 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 @@ -44,9 +44,7 @@ module GFS_phys_time_vary private - public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_timestep_finalize, GFS_phys_time_vary_finalize - - logical :: is_initialized = .false. + public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys @@ -95,7 +93,8 @@ subroutine GFS_phys_time_vary_init ( smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, & slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, lsm_cold_start, nthrds, & lkm, use_lake_model, lakefrac, lakedepth, iopt_lake, iopt_lake_clm, iopt_lake_flake, & - lakefrac_threshold, lakedepth_threshold, ozphys, h2ophys, errmsg, errflg) + lakefrac_threshold, lakedepth_threshold, ozphys, h2ophys, is_initialized, errmsg, & + errflg) implicit none @@ -193,6 +192,7 @@ subroutine GFS_phys_time_vary_init ( real(kind_phys), intent(in) :: con_t0c integer, intent(in) :: nthrds + logical, intent(inout) :: is_initialized character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -713,7 +713,8 @@ subroutine GFS_phys_time_vary_timestep_init ( tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, & zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype,scolor, shdmin, shdmax, snowd, & cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, ozphys, h2ophys, & - do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg) + do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, is_initialized, & + errmsg, errflg) implicit none @@ -762,6 +763,7 @@ subroutine GFS_phys_time_vary_timestep_init ( real(kind_phys), intent(inout), optional :: smois(:,:), sh2o(:,:), tslb(:,:), tref(:) integer, intent(inout) :: vtype(:), stype(:),scolor(:), slope(:) + logical, intent(in) :: is_initialized character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -931,36 +933,17 @@ subroutine GFS_phys_time_vary_timestep_init ( end subroutine GFS_phys_time_vary_timestep_init !> @} -!> \section arg_table_GFS_phys_time_vary_timestep_finalize Argument Table -!! \htmlinclude GFS_phys_time_vary_timestep_finalize.html -!! -!>\section gen_GFS_phys_time_vary_timestep_finalize GFS_phys_time_vary_timestep_finalize General Algorithm -!> @{ - subroutine GFS_phys_time_vary_timestep_finalize (errmsg, errflg) - - implicit none - - ! Interface variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - end subroutine GFS_phys_time_vary_timestep_finalize -!> @} - !> \section arg_table_GFS_phys_time_vary_finalize Argument Table !! \htmlinclude GFS_phys_time_vary_finalize.html !! - subroutine GFS_phys_time_vary_finalize(errmsg, errflg) + subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) implicit none ! Interface variables - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + logical, intent(inout) :: is_initialized + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Initialize CCPP error handling variables errmsg = '' diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta index 44a5b92f9..d0c5e80ec 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta @@ -1042,6 +1042,13 @@ dimensions = () type = ty_h2ophys intent = in +[is_initialized] + standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization + long_name = flag carrying interstitial initialization status + units = flag + dimensions = () + type = logical + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -1062,6 +1069,13 @@ [ccpp-arg-table] name = GFS_phys_time_vary_finalize type = scheme +[is_initialized] + standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization + long_name = flag carrying interstitial initialization status + units = flag + dimensions = () + type = logical + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -2055,26 +2069,13 @@ dimensions = () type = ty_h2ophys intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 +[is_initialized] + standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization + long_name = flag carrying interstitial initialization status + units = flag dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-arg-table] - name = GFS_phys_time_vary_timestep_finalize - type = scheme + type = logical + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 13f0f8dd0de9e9e3b57316e3685f22176e2d7b42 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Mon, 23 Dec 2024 13:58:06 -0600 Subject: [PATCH 07/14] remove flag_init --- physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 | 5 ++--- physics/SFC_Models/Land/Noahmp/noahmpdrv.meta | 7 ------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 index 46749e5bb..431ff3576 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 @@ -420,7 +420,7 @@ end subroutine noahmpdrv_finalize subroutine noahmpdrv_run & !................................... ! --- inputs: - ( im, km, lsnowl, itime, flag_init, ps, u1, v1, t1, q1, & + ( im, km, lsnowl, itime, 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,& @@ -527,7 +527,6 @@ 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] @@ -988,7 +987,7 @@ subroutine noahmpdrv_run & ! ! --- Just return if external land component is activated for two-way interaction ! - if (cpllnd .and. cpllnd2atm .and. (.not. flag_init)) return + if (cpllnd .and. cpllnd2atm) return do i = 1, im diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta index 1c08d9ab5..7d1150c80 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta @@ -356,13 +356,6 @@ 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 From 05e017a55c8d26a0014f50a4ac77ef966eb2498b Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Fri, 27 Dec 2024 17:29:59 -0600 Subject: [PATCH 08/14] correction for flux calculation --- physics/SFC_Models/Land/sfc_land.F90 | 44 ++++++++++++++++++----- physics/SFC_Models/Land/sfc_land.meta | 52 +++++++++++++++++++++++++-- 2 files changed, 86 insertions(+), 10 deletions(-) diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index 51a63cdae..1661c5c40 100644 --- a/physics/SFC_Models/Land/sfc_land.F90 +++ b/physics/SFC_Models/Land/sfc_land.F90 @@ -31,10 +31,12 @@ module sfc_land !! @{ subroutine sfc_land_run(im, flag_init, flag_restart, & cpllnd, cpllnd2atm, flag_iter, dry, & - t1, q1, prsl1, prslki, ps, tskin, wind, cm, ch, rd, eps, epsm1, & - rvrdm1, hvap, cp, sncovr1_lnd, qsurf_lnd, & + t1, q1, prsl1, prslki, ps, tskin, wind, cm, ch, & + dlwflx, dswsfc, sfalb, sfcemis, & + rd, eps, epsm1, rvrdm1, hvap, cp, con_sbc, & + 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, & + runoff_lnd, drain_lnd, cmm_lnd, chh_lnd, zvfun_lnd, slc, & sncovr1, qsurf, evap, hflx, ep, t2mmp, q2mp, & gflux, runoff, drain, cmm, chh, zvfun, & errmsg, errflg) @@ -58,12 +60,17 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & real(kind=kind_phys), intent(in) :: wind(:) real(kind=kind_phys), intent(in) :: cm(:) real(kind=kind_phys), intent(in) :: ch(:) + real(kind=kind_phys), intent(in) :: dlwflx(:) + real(kind=kind_phys), intent(in) :: dswsfc(:) + real(kind=kind_phys), intent(in) :: sfalb(:) + real(kind=kind_phys), intent(in) :: sfcemis(:) real(kind=kind_phys), intent(in) :: rd real(kind=kind_phys), intent(in) :: eps real(kind=kind_phys), intent(in) :: epsm1 real(kind=kind_phys), intent(in) :: rvrdm1 real(kind=kind_phys), intent(in) :: hvap real(kind=kind_phys), intent(in) :: cp + real(kind=kind_phys), intent(in) :: con_sbc real(kind=kind_phys), intent(in), optional :: sncovr1_lnd(:) real(kind=kind_phys), intent(in), optional :: qsurf_lnd(:) real(kind=kind_phys), intent(in), optional :: evap_lnd(:) @@ -77,6 +84,7 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & real(kind=kind_phys), intent(in), optional :: cmm_lnd(:) real(kind=kind_phys), intent(in), optional :: chh_lnd(:) real(kind=kind_phys), intent(in), optional :: zvfun_lnd(:) + real(kind=kind_phys), intent(in), optional :: slc(:,:) ! Inputs/Outputs real(kind=kind_phys), intent(inout) :: sncovr1(:) real(kind=kind_phys), intent(inout) :: qsurf(:) @@ -99,11 +107,14 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & real(kind=kind_phys), parameter :: & & one = 1.0_kind_phys, & & zero = 0.0_kind_phys, & - & qmin = 1.0e-8_kind_phys + & qmin = 1.0e-8_kind_phys, & + & slc_min = 0.05_kind_phys, & ! estimate dry limit for soil moisture + & slc_max = 0.50_kind_phys ! estimate saturated limit for soil moisture ! Locals integer :: i real(kind=kind_phys) :: qss, rch, tem, cpinv, hvapi, elocp + real(kind=kind_phys) :: available_energy, soil_stress_factor real(kind=kind_phys), dimension(im) :: rho, q0 ! Initialize CCPP error handling variables @@ -122,6 +133,11 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & ! Calculate fluxes internally do i = 1, im if (dry(i)) then + soil_stress_factor = (slc(i,1)-slc_min)/(slc_max-slc_min) + soil_stress_factor = min(max(zero,soil_stress_factor),one) + available_energy = dswsfc(i)*(one-sfalb(i))+dlwflx(i)*sfcemis(i) - & + sfcemis(i)*con_sbc*tskin(i)**4 + available_energy = min(max(-200.0,available_energy),1000.0) ! set some arbitrary limits q0(i) = max(q1(i), qmin) rho(i) = prsl1(i)/(rd*t1(i)*(one+rvrdm1*q0(i))) qss = fpvs(tskin(i)) @@ -130,11 +146,23 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & tem = ch(i)*wind(i) sncovr1(i) = zero qsurf(i) = qss - hflx(i) = rch*(tskin(i)-t1(i)*prslki(i)) - hflx(i) = hflx(i)*(1.0/rho(i))*cpinv - evap(i) = elocp*rch*(qss-q0(i)) + hflx(i) = rch*(tskin(i)-t1(i)*prslki(i)) ! first guess hflx [W/m2] + evap(i) = elocp*rch*(qss-q0(i)) ! first guess evap [W/m2] + evap(i) = evap(i)*soil_stress_factor ! reduce evap for soil moisture stress + hflx(i) = min(max(-100.0,hflx(i)),500.0) ! set some arbitrary limits + evap(i) = min(max(-100.0,evap(i)),500.0) ! set some arbitrary limits + if(evap(i) + hflx(i) /= zero) then + hflx(i) = available_energy * hflx(i) / (abs(evap(i)) + abs(hflx(i))) + evap(i) = available_energy * evap(i) / (abs(evap(i)) + abs(hflx(i))) + else + hflx(i) = zero + evap(i) = zero + end if + hflx(i) = min(max(-100.0,hflx(i)),500.0) ! set some arbitrary limits + evap(i) = min(max(-100.0,evap(i)),500.0) ! set some arbitrary limits + hflx(i) = hflx(i)*(1.0/rho(i))*cpinv ! convert to expected units ep(i) = evap(i) - evap(i) = evap(i)*(1.0/rho(i))*hvapi + evap(i) = evap(i)*(1.0/rho(i))*hvapi ! convert to expected units t2mmp(i) = tskin(i) q2mp(i) = qsurf(i) gflux(i) = zero diff --git a/physics/SFC_Models/Land/sfc_land.meta b/physics/SFC_Models/Land/sfc_land.meta index b24a6f8af..b443c7efb 100644 --- a/physics/SFC_Models/Land/sfc_land.meta +++ b/physics/SFC_Models/Land/sfc_land.meta @@ -128,6 +128,38 @@ type = real kind = kind_phys intent = in +[dlwflx] + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land + long_name = total sky surface downward longwave flux absorbed by the ground over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[dswsfc] + standard_name = surface_downwelling_shortwave_flux + long_name = total sky surface downward shortwave flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[sfalb] + standard_name = surface_albedo_for_diffused_shortwave_on_radiation_timestep + long_name = mean surface diffused shortwave albedo + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[sfcemis] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in [eps] standard_name = ratio_of_dry_air_to_water_vapor_gas_constants long_name = rd/rv @@ -176,6 +208,14 @@ type = real kind = kind_phys intent = in +[con_sbc] + standard_name = stefan_boltzmann_constant + long_name = Stefan-Boltzmann constant + units = W m-2 K-4 + dimensions = () + type = real + kind = kind_phys + intent = in [sncovr1_lnd] standard_name = surface_snow_area_fraction_over_land_from_land long_name = surface snow area fraction over land for coupling @@ -228,7 +268,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = in optional = True [q2mp_lnd] standard_name = specific_humidity_at_2m_over_land_from_land @@ -273,7 +313,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = in optional = True [chh_lnd] standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land_from_land @@ -293,6 +333,14 @@ kind = kind_phys intent = in optional = True +[slc] + standard_name = volume_fraction_of_unfrozen_water_in_soil + long_name = volume fraction of unfrozen soil moisture + units = frac + dimensions = (horizontal_loop_extent,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = in [sncovr1] standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction From 1ffea266b67849a59c5b30e9a7f2fd6722b38437 Mon Sep 17 00:00:00 2001 From: rhaesung Date: Fri, 3 Jan 2025 20:59:16 +0000 Subject: [PATCH 09/14] update cloud/radiation/land --- physics/MP/Thompson/module_mp_thompson.F90 | 2 +- physics/Radiation/radiation_clouds.f | 2 +- .../Land/Noahmp/module_sf_noahmplsm.F90 | 29 +++++++++++++++---- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/physics/MP/Thompson/module_mp_thompson.F90 b/physics/MP/Thompson/module_mp_thompson.F90 index 3114859b5..5d4495ae0 100644 --- a/physics/MP/Thompson/module_mp_thompson.F90 +++ b/physics/MP/Thompson/module_mp_thompson.F90 @@ -93,7 +93,7 @@ module module_mp_thompson !.. droplet number concentration. !real(wp), parameter :: Nt_c = 100.e6 real(wp), parameter :: Nt_c_o = 50.e6 - real(wp), parameter :: Nt_c_l = 100.e6 + real(wp), parameter :: Nt_c_l = 150.e6 real(wp), parameter, private :: Nt_c_max = 1999.e6 !..Declaration of constants for assumed CCN/IN aerosols when none in diff --git a/physics/Radiation/radiation_clouds.f b/physics/Radiation/radiation_clouds.f index 979405cdb..d1518bfcb 100644 --- a/physics/Radiation/radiation_clouds.f +++ b/physics/Radiation/radiation_clouds.f @@ -197,7 +197,7 @@ module module_radiation_clouds real (kind=kind_phys), parameter :: ovcst = 1.0 - 1.0e-8 real (kind=kind_phys), parameter :: reliq_def = 10.0 !< default liq radius to 10 micron - real (kind=kind_phys), parameter :: reice_def = 50.0 !< default ice radius to 50 micron + real (kind=kind_phys), parameter :: reice_def = 25.0 !< default ice radius to 50 micron real (kind=kind_phys), parameter :: rrain_def = 1000.0 !< default rain radius to 1000 micron real (kind=kind_phys), parameter :: rsnow_def = 250.0 !< default snow radius to 250 micron diff --git a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 index a76a354e6..7ab496ddc 100644 --- a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 +++ b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 @@ -2511,7 +2511,19 @@ subroutine thermoprop (parameters,nsoil ,nsnow ,isnow ,ist ,dzsnso , real (kind=kind_phys), dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) real (kind=kind_phys), dimension( 1:nsoil) :: sice !soil ice content real (kind=kind_phys), parameter :: sbeta = -2.0 + real (kind=kind_phys), dimension(4,20) :: soil_carbon ! soil carbon content [kg/m3] + real (kind=kind_phys), parameter :: soil_carbon_df = 0.25 ! soil carbon therm cond (Lawrence and Slater) + real (kind=kind_phys), parameter :: soil_carbon_hcpct = 2.5e6 ! soil carbon heat capacity (Lawrence and Slater) ! -------------------------------------------------------------------------------------------------- +! soil carbon [kg/m3] by vegetation type estimated from global PNNL soil carbon dataset +! and VIIRS surface type + + soil_carbon(1,:) = (/90,65,90,65,90,40,50,50,40,50,90,60,60,60,0,20,0,90,90,60/) + soil_carbon(2,:) = (/40,30,40,30,40,25,30,30,25,30,40,30,30,30,0,15,0,60,60,40/) + soil_carbon(3,:) = (/20,15,20,15,20,15,20,15,15,15,25,20,20,20,0,10,0,40,40,30/) + soil_carbon(4,:) = (/15,10,15,10,15,10,15,10,10,10,20,10,10,10,0,10,0,40,30,20/) + + soil_carbon = soil_carbon / 130.0 ! convert to soil carbon relative to peat ! compute snow thermal conductivity and heat capacity @@ -2530,6 +2542,11 @@ subroutine thermoprop (parameters,nsoil ,nsnow ,isnow ,ist ,dzsnso , hcpct(iz) = sh2o(iz)*cwat + (1.0-parameters%smcmax(iz))*parameters%csoil & + (parameters%smcmax(iz)-smc(iz))*cpair + sice(iz)*cice call tdfcnd (parameters,iz,df(iz), smc(iz), sh2o(iz)) + +! adjust for soil carbon organic content + +! hcpct(iz) = (1.0 - soil_carbon(iz,vegtyp)) * hcpct(iz) + soil_carbon(iz,vegtyp) * soil_carbon_hcpct + df(iz) = (1.0 - soil_carbon(iz,vegtyp)) * df(iz) + soil_carbon(iz,vegtyp) * soil_carbon_df end do if ( parameters%urban_flag ) then @@ -3003,6 +3020,10 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in if (ib.eq.1) fsun = 0. end do +! snow age + + call snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) + if(cosz <= 0) goto 100 ! weight reflectance/transmittance by lai and sai @@ -3015,10 +3036,6 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in tau(ib) = max(parameters%taul(ib)*wl+parameters%taus(ib)*ws, mpe) end do -! snow age - - call snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) - ! snow albedos: only if cosz > 0 and fsno > 0 if(opt_alb == 1) & @@ -9128,7 +9145,9 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in ! ka = hk(iwt) ! harmonic average, c.he changed based on gy niu's update - ka = 2.0*(hk(iwt)*parameters%dksat(iwt)*1.0e3) / (hk(iwt)+parameters%dksat(iwt)*1.0e3) +! ka = 2.0*(hk(iwt)*parameters%dksat(iwt)*1.0e3) / (hk(iwt)+parameters%dksat(iwt)*1.0e3) +! tried one suggesteed by gy niu + ka = 0.5*(hk(iwt)+parameters%dksat(iwt)*1.0e3) wh_zwt = - zwt * 1.e3 !(mm) wh = smpfz - znode(iwt)*1.e3 !(mm) From 80d5c40141cf0b441487392ca5fec2748cee2fde Mon Sep 17 00:00:00 2001 From: rhaesung Date: Mon, 6 Jan 2025 20:04:39 +0000 Subject: [PATCH 10/14] update radiation_clouds.f according to the review --- physics/Radiation/radiation_clouds.f | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/physics/Radiation/radiation_clouds.f b/physics/Radiation/radiation_clouds.f index d1518bfcb..ccebdf6cf 100644 --- a/physics/Radiation/radiation_clouds.f +++ b/physics/Radiation/radiation_clouds.f @@ -197,9 +197,10 @@ module module_radiation_clouds real (kind=kind_phys), parameter :: ovcst = 1.0 - 1.0e-8 real (kind=kind_phys), parameter :: reliq_def = 10.0 !< default liq radius to 10 micron - real (kind=kind_phys), parameter :: reice_def = 25.0 !< default ice radius to 50 micron + real (kind=kind_phys), parameter :: reice_def = 50.0 !< default ice radius to 50 micron real (kind=kind_phys), parameter :: rrain_def = 1000.0 !< default rain radius to 1000 micron real (kind=kind_phys), parameter :: rsnow_def = 250.0 !< default snow radius to 250 micron + real (kind=kind_phys), parameter :: creice_def = 25.0 !< default convective ice radius to 25 micron overland real (kind=kind_phys), parameter :: cldssa_def = 0.99 !< default cld single scat albedo real (kind=kind_phys), parameter :: cldasy_def = 0.84 !< default cld asymmetry factor @@ -2164,8 +2165,13 @@ subroutine progcld_thompson_wsm6 & cip(i,k) = max(0.0, (clw(i,k,ntiw) + & snow2ice*clw(i,k,ntsw) + tem2) * & gfac * delp(i,k)) - if(tem2 > 1.e-12 .and. clw(i,k,ntiw) < 1.e-12) - & rei(i,k)=reice_def + if(tem2 > 1.e-12 .and. clw(i,k,ntiw) < 1.e-12) then + if(nint(slmsk(i))==1) then + rei(i,k)=creice_def + else + rei(i,k)=reice_def + endif + endif crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) csp(i,k) = max(0.0, (1.-snow2ice)*clw(i,k,ntsw) * & gfac * delp(i,k)) From 0dbea49b47b2371738248afde26b97d8af9f6e78 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Tue, 7 Jan 2025 13:35:28 -0600 Subject: [PATCH 11/14] fix space issue --- physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 index 431ff3576..d4971efd9 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 @@ -420,8 +420,7 @@ end subroutine noahmpdrv_finalize subroutine noahmpdrv_run & !................................... ! --- inputs: - ( im, km, lsnowl, itime, ps, u1, v1, t1, q1, & - soiltyp,soilcol, & + ( im, km, lsnowl, itime, 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, & From 7f1a1d85d89f423edcef7c71775df3a8135e9242 Mon Sep 17 00:00:00 2001 From: rhaesung Date: Tue, 21 Jan 2025 22:43:50 +0000 Subject: [PATCH 12/14] update module_sf_noahmp_glacier.F90 and module_sf_noahmplsm.F90 according to review --- .../SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90 | 2 ++ physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90 b/physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90 index fcbe40a70..3906a53d6 100644 --- a/physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90 +++ b/physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90 @@ -842,12 +842,14 @@ subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in ! snow albedos: age even when sun is not present + if(cosz > 0) then if(opt_alb == 1) & call snowalb_bats_glacier (nband,cosz,fage,albsnd,albsni) if(opt_alb == 2) then call snowalb_class_glacier(nband,qsnow,dt,alb,albold,albsnd,albsni) albold = alb end if + end if ! zero summed solar fluxes diff --git a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 index 7ab496ddc..80ffdf62c 100644 --- a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 +++ b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 @@ -3024,7 +3024,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in call snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) - if(cosz <= 0) goto 100 + if(cosz <= 0) ! weight reflectance/transmittance by lai and sai @@ -3045,6 +3045,8 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in albold = alb end if +100 continue + ! ground surface albedo call groundalb (parameters,nsoil ,nband ,ice ,ist , & !in @@ -9143,10 +9145,6 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in ! recharge rate qin to groundwater -! ka = hk(iwt) -! harmonic average, c.he changed based on gy niu's update -! ka = 2.0*(hk(iwt)*parameters%dksat(iwt)*1.0e3) / (hk(iwt)+parameters%dksat(iwt)*1.0e3) -! tried one suggesteed by gy niu ka = 0.5*(hk(iwt)+parameters%dksat(iwt)*1.0e3) wh_zwt = - zwt * 1.e3 !(mm) From 93edbe1158ae57a63c64a2a40f5677fe7318ed81 Mon Sep 17 00:00:00 2001 From: rhaesung Date: Wed, 22 Jan 2025 18:32:13 +0000 Subject: [PATCH 13/14] update module_sf_noahmplsm.F90 --- physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 index 80ffdf62c..d02805f09 100644 --- a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 +++ b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 @@ -3024,7 +3024,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in call snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) - if(cosz <= 0) + if(cosz > 0) ! weight reflectance/transmittance by lai and sai @@ -3044,8 +3044,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in call snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,iloc,jloc) albold = alb end if - -100 continue + end if ! ground surface albedo From 3d828f59d86e19656046e6cf5423348bb233e3e5 Mon Sep 17 00:00:00 2001 From: rhaesung Date: Wed, 22 Jan 2025 19:02:32 +0000 Subject: [PATCH 14/14] update module_sf_noahmplsm.F90 --- physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 index d02805f09..3f27636ff 100644 --- a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 +++ b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 @@ -3024,7 +3024,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in call snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) - if(cosz > 0) + if(cosz > 0) then ! weight reflectance/transmittance by lai and sai @@ -3044,7 +3044,6 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in call snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,iloc,jloc) albold = alb end if - end if ! ground surface albedo @@ -3085,8 +3084,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in wl = ext end if fsun = wl - -100 continue + end if end subroutine albedo