From 8c2afecf334f8c3b4f6c7f0155a83e3666d94efa Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Mon, 16 Dec 2024 15:40:54 +0000 Subject: [PATCH 01/33] Moved fluxr computation from GFS_rrtmg_post to dcyc2t3 to provide correct sub-fhswr/fhlwr bucket radiation values --- .../UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 | 174 +------------ .../UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta | 230 ------------------ .../Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f | 177 +++++++++++++- .../UFS_SCM_NEPTUNE/dcyc2t3.meta | 198 +++++++++++++++ 4 files changed, 374 insertions(+), 405 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 index 76ee18ec2..379e7c8dd 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 @@ -18,190 +18,28 @@ module GFS_rrtmg_post !> \section arg_table_GFS_rrtmg_post_run Argument Table !! \htmlinclude GFS_rrtmg_post_run.html !! - subroutine GFS_rrtmg_post_run (im, km, kmp1, lm, ltp, kt, kb, kd, nspc1, & - nfxr, nday, lsswr, lslwr, lssav, fhlwr, fhswr, raddt, coszen, & - coszdg, prsi, tgrs, aerodp, cldsa, mtopa, mbota, clouds1, & - cldtaulw, cldtausw, sfcflw, sfcfsw, topflw, topfsw, scmpsw, & - fluxr, total_albedo, errmsg, errflg) + subroutine GFS_rrtmg_post_run(im, lsswr, topfsw, total_albedo, errmsg, errflg) use machine, only: kind_phys - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & - cmpfsw_type - use module_radlw_parameters, only: topflw_type, sfcflw_type + use module_radsw_parameters, only: topfsw_type implicit none ! Interface variables - integer, intent(in) :: im, km, kmp1, lm, ltp, kt, kb, kd, & - nspc1, nfxr, nday - logical, intent(in) :: lsswr, lslwr, lssav - real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr - - real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg - - real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi - real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs - - real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp - real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa - integer, dimension(im,3), intent(in) :: mbota, mtopa - real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: clouds1 - real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtausw - real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtaulw + integer, intent(in) :: im + logical, intent(in) :: lsswr real(kind=kind_phys), dimension(im), intent(inout) :: total_albedo - type(sfcflw_type), dimension(im), intent(in) :: sfcflw - type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw - type(cmpfsw_type), dimension(im), intent(in) :: scmpsw - type(topflw_type), dimension(im), intent(in) :: topflw type(topfsw_type), dimension(im), intent(in) :: topfsw - real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr - character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg - ! Local variables - integer :: i, j, k, k1, itop, ibtc - real(kind=kind_phys) :: tem0d, tem1, tem2 - ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - - if (.not. (lsswr .or. lslwr)) return - -! - For time averaged output quantities (including total-sky and -! clear-sky SW and LW fluxes at TOA and surface; conventional -! 3-domain cloud amount, cloud top and base pressure, and cloud top -! temperature; aerosols AOD, etc.), store computed results in -! corresponding slots of array fluxr with appropriate time weights. - -! --- ... collect the fluxr data for wrtsfc - - if (lssav) then - if (lsswr) then - do i=1,im -! fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm -! fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm -! fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm -! fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm -! fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm -! fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm - fluxr(i,34) = aerodp(i,1) ! total aod at 550nm - fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm - fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm - fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm - fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm - fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm - enddo - endif - -! --- save lw toa and sfc fluxes - if (lslwr) then - do i=1,im -! --- lw total-sky fluxes - fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * topflw(i)%upfxc ! total sky top lw up - fluxr(i,19) = fluxr(i,19) + fhlwr * sfcflw(i)%dnfxc ! total sky sfc lw dn - fluxr(i,20) = fluxr(i,20) + fhlwr * sfcflw(i)%upfxc ! total sky sfc lw up -! --- lw clear-sky fluxes - fluxr(i,28) = fluxr(i,28) + fhlwr * topflw(i)%upfx0 ! clear sky top lw up - fluxr(i,30) = fluxr(i,30) + fhlwr * sfcflw(i)%dnfx0 ! clear sky sfc lw dn - fluxr(i,33) = fluxr(i,33) + fhlwr * sfcflw(i)%upfx0 ! clear sky sfc lw up - enddo - endif - -! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight -! part of sw calling interval, while coszdg= mean cosz over entire interval - if (lsswr) then - do i = 1, IM - if (coszen(i) > 0.) then -! --- sw total-sky fluxes -! ------------------- - tem0d = fhswr * coszdg(i) / coszen(i) - fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up - fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn -! --- sw uv-b fluxes -! -------------- - fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn -! --- sw toa incoming fluxes -! ---------------------- - fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn -! --- sw sfc flux components -! ---------------------- - fluxr(i,24) = fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - fluxr(i,25) = fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - fluxr(i,26) = fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - fluxr(i,27) = fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn -! --- sw clear-sky fluxes -! ------------------- - fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d ! clear sky top sw up - fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn - endif - enddo - endif - -! --- save total and boundary layer clouds - - if (lsswr .or. lslwr) then - do i=1,im - fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) - fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) - enddo - -! --- save cld frac,toplyr,botlyr and top temp, note that the order -! of h,m,l cloud is reversed for the fluxr output. -! --- save interface pressure (pa) of top/bot - - do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd - fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d - fluxr(i,11-j) = fluxr(i,11-j) + tem0d * prsi(i,itop+kt) - fluxr(i,14-j) = fluxr(i,14-j) + tem0d * prsi(i,ibtc+kb) - fluxr(i,17-j) = fluxr(i,17-j) + tem0d * tgrs(i,itop) - enddo - enddo - -! Anning adds optical depth and emissivity output - if (lsswr .and. (nday > 0)) then - do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd - tem1 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 um channel - enddo - fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 - enddo - enddo - endif - - if (lslwr) then - do j = 1, 3 - do i = 1, IM - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - kd - ibtc = mbota(i,j) - kd - tem2 = 0. - do k=ibtc,itop - tem2 = tem2 + cldtaulw(i,k) ! approx 10. um channel - enddo - fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) - enddo - enddo - endif - - endif - - endif ! end_if_lssav + + if (.not. lsswr) return ! --- The total sky (with clouds) shortwave albedo total_albedo = 0.0 diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta index b387c3e33..49a3c071d 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta @@ -16,76 +16,6 @@ dimensions = () type = integer intent = in -[km] - standard_name = vertical_layer_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in -[kmp1] - standard_name = vertical_interface_dimension - long_name = number of vertical levels plus one - units = count - dimensions = () - type = integer - intent = in -[lm] - standard_name = vertical_dimension_for_radiation - long_name = number of vertical layers for radiation calculation - units = count - dimensions = () - type = integer - intent = in -[ltp] - standard_name = extra_top_layer - long_name = extra top layers - units = count - dimensions = () - type = integer - intent = in -[kt] - standard_name = vertical_index_difference_between_layer_and_upper_bound - long_name = vertical index difference between layer and upper bound - units = index - dimensions = () - type = integer - intent = in -[kb] - standard_name = vertical_index_difference_between_layer_and_lower_bound - long_name = vertical index difference between layer and lower bound - units = index - dimensions = () - type = integer - intent = in -[kd] - standard_name = vertical_index_difference_between_inout_and_local - long_name = vertical index difference between in/out and local - units = index - dimensions = () - type = integer - intent = in -[nspc1] - standard_name = number_of_species_for_aerosol_optical_depth - long_name = number of species for output aerosol optical depth plus total - units = count - dimensions = () - type = integer - intent = in -[nfxr] - standard_name = number_of_diagnostics_variables_for_radiation - long_name = number of variables stored in the fluxr array - units = count - dimensions = () - type = integer - intent = in -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer - intent = in [lsswr] standard_name = flag_for_calling_shortwave_radiation long_name = logical flags for sw radiation calls @@ -93,151 +23,6 @@ dimensions = () type = logical intent = in -[lslwr] - standard_name = flag_for_calling_longwave_radiation - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in -[lssav] - standard_name = flag_for_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in -[fhlwr] - standard_name = period_of_longwave_radiation_calls - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[fhswr] - standard_name = period_of_shortwave_radiation_calls - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[raddt] - standard_name = time_step_for_radiation - long_name = radiation time step - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[coszen] - standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[coszdg] - standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[prsi] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - intent = in -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = in -[cldsa] - standard_name = cloud_area_fraction_for_radiation - long_name = fraction of clouds for low, middle, high, total and BL - units = frac - dimensions = (horizontal_loop_extent,5) - type = real - kind = kind_phys - intent = in -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[clouds1] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in -[cldtaulw] - standard_name = cloud_optical_depth_layers_at_10mu_band - long_name = approx 10mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in -[cldtausw] - standard_name = cloud_optical_depth_layers_at_0p55mu_band - long_name = approx .55mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in -[sfcflw] - standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep - long_name = lw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcflw_type - intent = in -[sfcfsw] - standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcfsw_type - intent = in -[topflw] - standard_name = lw_fluxes_top_atmosphere - long_name = lw radiation fluxes at top - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topflw_type - intent = in [topfsw] standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa @@ -245,21 +30,6 @@ dimensions = (horizontal_loop_extent) type = topfsw_type intent = in -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_loop_extent) - type = cmpfsw_type - intent = in -[fluxr] - standard_name = cumulative_radiation_diagnostic - long_name = time-accumulated 2D radiation-related diagnostic fields - units = mixed - dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) - type = real - kind = kind_phys - intent = inout [total_albedo] standard_name = total_sky_albedo long_name = total sky albedo at toa diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f index b42352f32..8f9c83bf5 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f @@ -185,11 +185,18 @@ subroutine dcyc2t3_run & & adjsfculw_lnd,adjsfculw_ice,adjsfculw_wat,xmu,xcosz, & & adjnirbmu,adjnirdfu,adjvisbmu,adjvisdfu, & & adjnirbmd,adjnirdfd,adjvisbmd,adjvisdfd, & + & lslwr,fluxr,fhlwr,topflw,sfcflw,lsswr,coszdg,topfsw,sfcfsw,& + & scmpsw,raddt,cldsa,mtopa,mbota,cldtausw,cldtaulw,tgrs, & + & aerodp, nfxr, lm, ltp, nday, kb, kd , kt, lssav, nspc1, & & errmsg,errflg & & ) ! use machine, only : kind_phys - + use module_radsw_parameters, only: topfsw_type, & + & sfcfsw_type, & + & cmpfsw_type + use module_radlw_parameters, only: topflw_type, & + & sfcflw_type implicit none ! ! --- constant parameters: @@ -201,13 +208,13 @@ subroutine dcyc2t3_run & & czlimt = 0.0001_kind_phys ! ~ cos(89.99427) ! --- inputs: - integer, intent(in) :: im, levs + integer, intent(in) :: im, kb, kd, kt, levs, nday, nspc1 ! integer, intent(in) :: ipr ! logical lprnt logical, dimension(:), intent(in) :: dry, icy, wet logical, intent(in) :: use_LW_jacobian, damp_LW_fluxadj, & - & pert_radtend, use_med_flux + & pert_radtend, use_med_flux, lssav logical, intent(in) :: do_sppt,ca_global real(kind=kind_phys), intent(in) :: solhr, slag, cdec, sdec, & & deltim, fhswr, lfnc_k, lfnc_p0 @@ -236,13 +243,34 @@ subroutine dcyc2t3_run & & con_pi, con_sbc real(kind_phys) :: pid12 - + + logical, intent(in) :: lsswr, lslwr + real(kind=kind_phys), intent(in) :: raddt, fhlwr + integer, intent(in) :: lm, ltp, nfxr + real(kind=kind_phys), dimension(im), intent(in) :: coszdg + + real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa + integer, dimension(im,3), intent(in) :: mbota + integer, dimension(im,3), intent(in) :: mtopa + + real(kind=kind_phys), dimension(im,lm+LTP),intent(in) :: cldtausw + real(kind=kind_phys), dimension(im,lm+LTP),intent(in) :: cldtaulw + + real(kind=kind_phys), dimension(im,levs), intent(in) :: tgrs + + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw + type(cmpfsw_type), dimension(im), intent(in) :: scmpsw + type(topflw_type), dimension(im), intent(in) :: topflw + type(topfsw_type), dimension(im), intent(in) :: topfsw + + real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp ! --- input/output: real(kind=kind_phys), dimension(:,:), intent(inout) :: dtdt real(kind=kind_phys), dimension(:,:), intent(inout), optional :: & & dtdtnp, htrlw - + real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr ! --- outputs: real(kind=kind_phys), dimension(:), intent(out) :: & & adjsfcdsw, adjsfcnsw, adjsfcdlw, xmu, xcosz, & @@ -256,9 +284,9 @@ subroutine dcyc2t3_run & integer, intent(out) :: errflg ! --- locals: - integer :: i, k, nstp, nstl, it, istsun(im),iSFC,iTOA + integer :: i, j, k, nstp, nstl, it, istsun(im),iSFC,iTOA,itop,ibtc real(kind=kind_phys) :: cns, coszn, tem1, tem2, anginc, & - & rstl, solang, dT + & rstl, solang, dT, tem0d real(kind=kind_phys), dimension(im,levs+1) :: flxlwup_adj, & & flxlwdn_adj real(kind=kind_phys) :: fluxlwnet_adj,fluxlwnet,dT_sfc, & @@ -289,6 +317,141 @@ subroutine dcyc2t3_run & nstp = max(6, nint(tem1)) nstl = max(1, nint(nstp/tem1)) pid12 = con_pi / hour12 + +! - For time averaged output quantities (including total-sky and +! clear-sky SW and LW fluxes at TOA and surface; conventional +! 3-domain cloud amount, cloud top and base pressure, and cloud top +! temperature; aerosols AOD, etc.), store computed results in +! corresponding slots of array fluxr with appropriate time weights. + +! --- ... collect the fluxr data for wrtsfc + + if (lssav) then + !if (lsswr) then + do i=1,im +! fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm +! fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm +! fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm +! fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm +! fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm +! fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm + fluxr(i,34) = aerodp(i,1) ! total aod at 550nm + fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm + fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm + fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm + fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm + fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm + enddo + !endif + +! --- save lw toa and sfc fluxes + !if (lslwr) then + do i=1,im +! --- lw total-sky fluxes + fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * topflw(i)%upfxc ! total sky top lw up + fluxr(i,19) = fluxr(i,19) + fhlwr * sfcflw(i)%dnfxc ! total sky sfc lw dn + fluxr(i,20) = fluxr(i,20) + fhlwr * sfcflw(i)%upfxc ! total sky sfc lw up +! --- lw clear-sky fluxes + fluxr(i,28) = fluxr(i,28) + fhlwr * topflw(i)%upfx0 ! clear sky top lw up + fluxr(i,30) = fluxr(i,30) + fhlwr * sfcflw(i)%dnfx0 ! clear sky sfc lw dn + fluxr(i,33) = fluxr(i,33) + fhlwr * sfcflw(i)%upfx0 ! clear sky sfc lw up + enddo + !endif + +! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight +! part of sw calling interval, while coszdg= mean cosz over entire interval + !if (lsswr) then + do i = 1, IM + if (coszen(i) > 0.) then +! --- sw total-sky fluxes +! ------------------- + tem0d = fhswr * coszdg(i) / coszen(i) + fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up + fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up + fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn +! --- sw uv-b fluxes +! -------------- + fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn +! --- sw toa incoming fluxes +! ---------------------- + fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn +! --- sw sfc flux components +! ---------------------- + fluxr(i,24) = fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + fluxr(i,25) = fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + fluxr(i,26) = fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + fluxr(i,27) = fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn +! --- sw clear-sky fluxes +! ------------------- + fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d ! clear sky top sw up + fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up + fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + endif + enddo + !endif + +! --- save total and boundary layer clouds + + !if (lsswr .or. lslwr) then + do i=1,im + fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) + fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) + enddo + +! --- save cld frac,toplyr,botlyr and top temp, note that the order +! of h,m,l cloud is reversed for the fluxr output. +! --- save interface pressure (pa) of top/bot + + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d + fluxr(i,11-j) = fluxr(i,11-j) + tem0d * p_lev(i,itop+kt) + fluxr(i,14-j) = fluxr(i,14-j) + tem0d * p_lev(i,ibtc+kb) + fluxr(i,17-j) = fluxr(i,17-j) + tem0d * tgrs(i,itop) + enddo + enddo + +! Anning adds optical depth and emissivity output + !if (lsswr .and. (nday > 0)) then + if (nday > 0) then + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + tem1 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 um channel + enddo + fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 + enddo + enddo + endif + + !if (lslwr) then + do j = 1, 3 + do i = 1, IM + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) - kd + ibtc = mbota(i,j) - kd + tem2 = 0. + do k=ibtc,itop + tem2 = tem2 + cldtaulw(i,k) ! approx 10. um channel + enddo + fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + enddo + enddo + !endif + + !endif + + endif ! end_if_lssav + + ! ! --- ... sw time-step adjustment for current cosine of zenith angle ! ---------------------------------------------------------- diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta index b2187f0c5..4c0a8e611 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.meta @@ -135,6 +135,14 @@ type = real kind = kind_phys intent = in +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in [tsflw] standard_name = air_temperature_at_surface_adjacent_layer_on_radiation_timestep long_name = surface (first layer) air temperature saved in longwave radiation call @@ -635,6 +643,196 @@ type = real kind = kind_phys intent = out +[lslwr] + standard_name = flag_for_calling_longwave_radiation + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = mixed + dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) + type = real + kind = kind_phys + intent = inout +[fhlwr] + standard_name = period_of_longwave_radiation_calls + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in +[topflw] + standard_name = lw_fluxes_top_atmosphere + long_name = lw radiation fluxes at top + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topflw_type + intent = in +[sfcflw] + standard_name = surface_lw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcflw_type + intent = in +[coszdg] + standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topfsw_type + intent = in +[sfcfsw] + standard_name = surface_sw_fluxes_assuming_total_and_clear_sky_on_radiation_timestep + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcfsw_type + intent = in +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_loop_extent) + type = cmpfsw_type + intent = in +[raddt] + standard_name = time_step_for_radiation + long_name = radiation time step + units = s + dimensions = () + type = real + kind = kind_phys + intent = in +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_loop_extent,5) + type = real + kind = kind_phys + intent = in +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = in +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_loop_extent,3) + type = integer + intent = in +[cldtaulw] + standard_name = cloud_optical_depth_layers_at_10mu_band + long_name = approx 10mu band layer cloud optical depth + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in +[cldtausw] + standard_name = cloud_optical_depth_layers_at_0p55mu_band + long_name = approx .55mu band layer cloud optical depth + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys + intent = in +[nfxr] + standard_name = number_of_diagnostics_variables_for_radiation + long_name = number of variables stored in the fluxr array + units = count + dimensions = () + type = integer + intent = in +[lm] + standard_name = vertical_dimension_for_radiation + long_name = number of vertical layers for radiation calculation + units = count + dimensions = () + type = integer + intent = in +[ltp] + standard_name = extra_top_layer + long_name = extra top layers + units = count + dimensions = () + type = integer + intent = in +[kb] + standard_name = vertical_index_difference_between_layer_and_lower_bound + long_name = vertical index difference between layer and lower bound + units = index + dimensions = () + type = integer + intent = in +[kd] + standard_name = vertical_index_difference_between_inout_and_local + long_name = vertical index difference between in/out and local + units = index + dimensions = () + type = integer + intent = in +[kt] + standard_name = vertical_index_difference_between_layer_and_upper_bound + long_name = vertical index difference between layer and upper bound + units = index + dimensions = () + type = integer + intent = in +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in +[lssav] + standard_name = flag_for_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 739b1740eb3a7041fad4c9f3b07e59d9fc19675c Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Tue, 17 Dec 2024 19:05:25 +0000 Subject: [PATCH 02/33] Remove fluxr calculation from RRTMG post routine. --- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 | 132 +----------------- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta | 109 --------------- 2 files changed, 4 insertions(+), 237 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 index 34dc7de86..75b47e175 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 @@ -33,11 +33,10 @@ module GFS_rrtmgp_post !! \section GFS_rrtmgp_post_run ! ######################################################################################## subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, doSWrad, & - do_lw_clrsky_hr, do_sw_clrsky_hr, save_diag, fhlwr, fhswr, sfc_alb_nir_dir, & - sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, p_lev, tsfa, coszen, coszdg, & + do_lw_clrsky_hr, do_sw_clrsky_hr, sfc_alb_nir_dir, & + sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, p_lev, tsfa, & fluxlwDOWN_clrsky, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & - fluxswDOWN_clrsky, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, & - raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, cldtausw, scmpsw, fluxr, & + fluxswDOWN_clrsky, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, scmpsw, & sfcdlw, sfculw, sfcflw, tsflw, htrlw, htrlwu, topflw, nirbmdi, nirdfdi, visbmdi, & visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, sfcdsw, htrsw, sfcfsw, topfsw, & htrswc, htrlwc, errmsg, errflg) @@ -51,22 +50,13 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d iTOA ! Vertical index for TOA level integer, intent(in), dimension(:) :: & idxday ! Index array for daytime points - integer, intent(in), dimension(:,:) :: & - mbota, & ! Vertical indices for low, middle and high cloud tops - mtopa ! ertical indices for low, middle and high cloud bases logical, intent(in) :: & doLWrad, & ! Logical flags for lw radiation calls doSWrad, & ! Logical flags for sw radiation calls do_lw_clrsky_hr, & ! Output clear-sky LW heating-rate? - do_sw_clrsky_hr, & ! Output clear-sky SW heating-rate? - save_diag ! Output radiation diagnostics? - real(kind_phys), intent(in) :: & - fhlwr, & ! Frequency for LW radiation calls - fhswr ! Frequency for SW radiation calls + do_sw_clrsky_hr ! Output clear-sky SW heating-rate? real(kind_phys), dimension(:), intent(in) :: & tsfa, & ! Lowest model layer air temperature for radiation (K) - coszen, & ! Cosine(SZA) - coszdg, & ! Cosine(SZA), daytime sfc_alb_nir_dir, & ! Surface albedo (direct) sfc_alb_nir_dif, & ! Surface albedo (diffuse) sfc_alb_uvvis_dir, & ! Surface albedo (direct) @@ -81,14 +71,6 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d fluxswDOWN_allsky, & ! RRTMGP shortwave all-sky flux (W/m2) fluxswUP_clrsky, & ! RRTMGP shortwave clear-sky flux (W/m2) fluxswDOWN_clrsky ! RRTMGP shortwave clear-sky flux (W/m2) - real(kind_phys), intent(in) :: & - raddt ! Radiation time step - real(kind_phys), dimension(:,:), intent(in) :: & - aerodp, & ! Vertical integrated optical depth for various aerosol species - cldsa, & ! Fraction of clouds for low, middle, high, total and BL - cld_frac, & ! Total cloud fraction in each layer - cldtaulw, & ! approx 10.mu band layer cloud optical depth - cldtausw ! approx .55mu band layer cloud optical depth type(cmpfsw_type), dimension(:), intent(in) :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) @@ -98,9 +80,6 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) - - real(kind=kind_phys), dimension(:,:), intent(inout) :: fluxr - ! Outputs (mandatory) real(kind_phys), dimension(:), intent(inout) :: & tsflw, & ! LW sfc air temp during calculation (K) @@ -196,43 +175,6 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d ! Heating-rate at radiation timestep, used for adjustment between radiation calls. htrlwu = htrlw - ! ####################################################################################### - ! Save LW diagnostics - ! - For time averaged output quantities (including total-sky and clear-sky SW and LW - ! fluxes at TOA and surface; conventional 3-domain cloud amount, cloud top and base - ! pressure, and cloud top temperature; aerosols AOD, etc.), store computed results in - ! corresponding slots of array fluxr with appropriate time weights. - ! - Collect the fluxr data for wrtsfc - ! ####################################################################################### - if (save_diag) then - do i=1,nCol - ! LW all-sky fluxes - fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up - fluxr(i,19) = fluxr(i,19) + fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn - fluxr(i,20) = fluxr(i,20) + fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up - ! LW clear-sky fluxes - fluxr(i,28) = fluxr(i,28) + fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up - fluxr(i,30) = fluxr(i,30) + fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn - fluxr(i,33) = fluxr(i,33) + fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up - enddo - - ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud is reversed for - ! the fluxr output. save interface pressure (pa) of top/bot - do j = 1, 3 - do i = 1, nCol - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - - ! Add optical depth and emissivity output - tem2 = 0. - do k=ibtc,itop - tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel - enddo - fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) - enddo - enddo - endif endif ! ####################################################################################### ! ####################################################################################### @@ -323,72 +265,6 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d sfcdsw(i) = sfcfsw(i)%dnfxc enddo - ! ################################################################################# - ! Save SW diagnostics - ! - For time averaged output quantities (including total-sky and clear-sky SW and LW - ! fluxes at TOA and surface; conventional 3-domain cloud amount, cloud top and base - ! pressure, and cloud top temperature; aerosols AOD, etc.), store computed results in - ! corresponding slots of array fluxr with appropriate time weights. - ! - Collect the fluxr data for wrtsfc - ! ################################################################################# - if (save_diag) then - do i=1,nCol - fluxr(i,34) = aerodp(i,1) ! total aod at 550nm - fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm - fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm - fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm - fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm - fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm - if (coszen(i) > 0.) then - ! SW all-sky fluxes - tem0d = fhswr * coszdg(i) / coszen(i) - fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up - fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d - fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn - ! SW uv-b fluxes - fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn - ! SW TOA incoming fluxes - fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn - ! SW SFC flux components - fluxr(i,24) = fluxr(i,24) + visbmdi(i) * tem0d ! uv/vis beam sw dn - fluxr(i,25) = fluxr(i,25) + visdfdi(i) * tem0d ! uv/vis diff sw dn - fluxr(i,26) = fluxr(i,26) + nirbmdi(i) * tem0d ! nir beam sw dn - fluxr(i,27) = fluxr(i,27) + nirdfdi(i) * tem0d ! nir diff sw dn - ! SW clear-sky fluxes - fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d - fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d - fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d - endif - enddo - - ! Save total and boundary-layer clouds - do i=1,nCol - fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) - fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) - enddo - - ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud - ! is reversed for the fluxr output. save interface pressure (pa) of top/bot - do j = 1, 3 - do i = 1, nCol - tem0d = raddt * cldsa(i,j) - itop = mtopa(i,j) - ibtc = mbota(i,j) - fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d - fluxr(i,11-j) = fluxr(i,11-j) + tem0d * p_lev(i,itop) - fluxr(i,14-j) = fluxr(i,14-j) + tem0d * p_lev(i,ibtc) - fluxr(i,17-j) = fluxr(i,17-j) + tem0d * p_lev(i,itop) - - ! Add optical depth and emissivity output - tem1 = 0. - do k=ibtc,itop - tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel - enddo - fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 - enddo - enddo - endif endif end subroutine GFS_rrtmgp_post_run diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta index 5d67afcd8..28fb84591 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta @@ -79,45 +79,6 @@ dimensions = () type = logical intent = in -[save_diag] - standard_name = flag_for_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in -[fhlwr] - standard_name = period_of_longwave_radiation_calls - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[fhswr] - standard_name = period_of_shortwave_radiation_calls - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[coszen] - standard_name = cosine_of_solar_zenith_angle_for_daytime_points_on_radiation_timestep - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[coszdg] - standard_name = cosine_of_solar_zenith_angle_on_radiation_timestep - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in [sfc_alb_nir_dir] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam @@ -239,68 +200,6 @@ kind = kind_phys intent = in optional = True -[raddt] - standard_name = time_step_for_radiation - long_name = radiation time step - units = s - dimensions = () - type = real - kind = kind_phys - intent = in -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys - intent = in -[cldsa] - standard_name = cloud_area_fraction_for_radiation - long_name = fraction of clouds for low, middle, high, total and BL - units = frac - dimensions = (horizontal_loop_extent,5) - type = real - kind = kind_phys - intent = in -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_loop_extent,3) - type = integer - intent = in -[cld_frac] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in -[cldtaulw] - standard_name = cloud_optical_depth_layers_at_10mu_band - long_name = approx 10mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in -[cldtausw] - standard_name = cloud_optical_depth_layers_at_0p55mu_band - long_name = approx .55mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - intent = in [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes @@ -308,14 +207,6 @@ dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in -[fluxr] - standard_name = cumulative_radiation_diagnostic - long_name = time-accumulated 2D radiation-related diagnostic fields - units = mixed - dimensions = (horizontal_loop_extent,number_of_diagnostics_variables_for_radiation) - type = real - kind = kind_phys - intent = inout [sfcdlw] standard_name = surface_downwelling_longwave_flux_on_radiation_timestep long_name = total sky sfc downward lw flux From f20c5a455336ad8535810d2faed3b4ec3f584e17 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Tue, 17 Dec 2024 19:47:50 +0000 Subject: [PATCH 03/33] Update documentation of dcyc2t3 to account for the variables moved from *_post routines --- .../Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f index 8f9c83bf5..6729a1c6d 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f @@ -87,6 +87,40 @@ module dcyc2t3 ! levs - integer, vertical layer dimension ! ! deltim - real, physics time step in seconds ! ! fhswr - real, Short wave radiation time step in seconds ! +! fhlwr - real, Long wave radiation time step in seconds ! +! lslwr - logical, flag for sw radiation calls ! +! fluxr (im, nfxr) - real, time-accum 2d rad diag fields ! +! topflw (im) - topfsw_type, lw radiation fluxes at toa ! +! sfcflw (im) - sfcflw_type, lw radiation fluxes at sfc ! +! lsswr - logical, flag for lw radiation calls ! +! coszdg - real, Cosine(SZA), daytime ! +! topfsw (im) - topfsw_type, sw radiation fluxes at TOA ! +! sfcfsw (im) - sfcfsw_type, sw radiation fluxes at sfc ! +! scmpsw (im) - cmpfsw_type, special components of sw down fluxes ! +! raddt - real, radiation timestep ! +! cldsa (im,5) - real, frac of clouds in low, mid, high, total, BL ! +! mtopa (im,3) - integer, Vertical indices for low, middle and high ! +! cloud bases ! +! mbota (im,3) - integer, Vertical indices for low, middle and high ! +! cloud tops ! +! cldtausw (im, im+LTP) - real, approx .55mu band layer cloud ! +! optical depth ! +! cldtaulw (im, im+LTP) - real, approx 10 mu band layer cloud ! +! optical depth ! +! tgrs (im,levs) - real, model layer mean temperature ! +! aerodp (im, nspc1) - real, Vertical integrated optical depth for ! +! various aerosol species ! +! nfxr - integer, num variables stored in fluxr array ! +! lm - integer, number vertical layers for rad calc ! +! ltp - integer, extra top layers ! +! nday - integer, daytime points dimension ! +! kb - integer, vertical index diff. b/w layer and lower ! +! bound ! +! kd - integer, vertical index diff. b/w in/out and local ! +! kt - integer, vertical index diff. b/w in/out and upper ! +! bound +! lssav - logical, flag for storing radiation diagnostics ! +! nspc1 - logical, num. species for optical dept plus total ! ! dry - logical, true over land ! ! icy - logical, true over ice ! ! wet - logical, true over water ! @@ -158,6 +192,8 @@ module dcyc2t3 !!- Mar 2019 s. moorthi - modify xmu calculation in a time centered !! way and add more accuracy when physics !! time step is close to radiation time step +!!- Dec 2024 l. reames - move fluxr calculations from *_post +!! routines to dcyc3t3_run !> \section arg_table_dcyc2t3_run Argument Table !! \htmlinclude dcyc2t3_run.html !! @@ -177,6 +213,9 @@ subroutine dcyc2t3_run & & use_LW_jacobian, sfculw, use_med_flux, sfculw_med, & & fluxlwUP_jac, t_lay, p_lay, p_lev, flux2D_lwUP, & & flux2D_lwDOWN,pert_radtend,do_sppt,ca_global,tsfc_radtime, & + & lslwr,fluxr,fhlwr,topflw,sfcflw,lsswr,coszdg,topfsw,sfcfsw,& + & scmpsw,raddt,cldsa,mtopa,mbota,cldtausw,cldtaulw,tgrs, & + & aerodp, nfxr, lm, ltp, nday, kb, kd , kt, lssav, nspc1, & ! & dry, icy, wet, lprnt, ipr, & ! --- input/output: & dtdt,dtdtnp,htrlw, & @@ -185,9 +224,6 @@ subroutine dcyc2t3_run & & adjsfculw_lnd,adjsfculw_ice,adjsfculw_wat,xmu,xcosz, & & adjnirbmu,adjnirdfu,adjvisbmu,adjvisdfu, & & adjnirbmd,adjnirdfd,adjvisbmd,adjvisdfd, & - & lslwr,fluxr,fhlwr,topflw,sfcflw,lsswr,coszdg,topfsw,sfcfsw,& - & scmpsw,raddt,cldsa,mtopa,mbota,cldtausw,cldtaulw,tgrs, & - & aerodp, nfxr, lm, ltp, nday, kb, kd , kt, lssav, nspc1, & & errmsg,errflg & & ) ! From 9d251bae8023b47d01ede411c96ae5ee471a2db5 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 19 Dec 2024 19:10:03 +0000 Subject: [PATCH 04/33] Combined GFS_rrtmg/rrtmgp_post.F90 in to GFS_radiation_post.F90 --- ...rrtmgp_post.F90 => GFS_radiation_post.F90} | 124 +++++++++--------- ...tmgp_post.meta => GFS_radiation_post.meta} | 19 ++- .../UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 | 52 -------- .../UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta | 55 -------- 4 files changed, 82 insertions(+), 168 deletions(-) rename physics/Interstitials/UFS_SCM_NEPTUNE/{GFS_rrtmgp_post.F90 => GFS_radiation_post.F90} (76%) rename physics/Interstitials/UFS_SCM_NEPTUNE/{GFS_rrtmgp_post.meta => GFS_radiation_post.meta} (96%) delete mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 delete mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 similarity index 76% rename from physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 rename to physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 index 75b47e175..475fdc4bf 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 @@ -1,10 +1,10 @@ -!> \file GFS_rrtmgp_post.F90 +!> \file GFS_radiation_post.F90 !! -!> \defgroup GFS_rrtmgp_post GFS_rrtmgp_post.F90 +!> \defgroup GFS_radiation_post GFS_rrtmgp_post.F90 !! !! \brief RRTMGP post-processing routine. !! -module GFS_rrtmgp_post +module GFS_radiation_post use machine, only: kind_phys use module_radlw_parameters, only: topflw_type, sfcflw_type use module_radsw_parameters, only: topfsw_type, sfcfsw_type, cmpfsw_type @@ -12,34 +12,32 @@ module GFS_rrtmgp_post use radiation_tools, only: check_error_msg implicit none - public GFS_rrtmgp_post_run + public GFS_radiation_post_run contains ! ######################################################################################## -!>\defgroup gfs_rrtmgp_post_mod GFS RRTMGP Post Module -!> \section arg_table_GFS_rrtmgp_post_run -!! \htmlinclude GFS_rrtmgp_post.html +!>\defgroup gfs_radiation_post_mod GFS Radiation Post Module +!> \section arg_table_GFS_radiation_post_run +!! \htmlinclude GFS_radiation_post.html !! -!! \ingroup GFS_rrtmgp_post +!! \ingroup GFS_radiation_post !! !! \brief The all-sky radiation tendency is computed, the clear-sky tendency is computed !! if requested. !! !! RRTMGP surface and TOA fluxes are copied to fields that persist between radiation/physics !! calls. -!! -!! (optional) Save additional diagnostics. !! -!! \section GFS_rrtmgp_post_run +!! \section GFS_radiation_post_run ! ######################################################################################## - subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, doSWrad, & - do_lw_clrsky_hr, do_sw_clrsky_hr, sfc_alb_nir_dir, & + subroutine GFS_radiation_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, doSWrad, & + do_lw_clrsky_hr, do_sw_clrsky_hr, do_RRTMGP, sfc_alb_nir_dir, & sfc_alb_nir_dif, sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, p_lev, tsfa, & fluxlwDOWN_clrsky, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & fluxswDOWN_clrsky, fluxswUP_allsky, fluxswDOWN_allsky, fluxswUP_clrsky, scmpsw, & sfcdlw, sfculw, sfcflw, tsflw, htrlw, htrlwu, topflw, nirbmdi, nirdfdi, visbmdi, & visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, sfcdsw, htrsw, sfcfsw, topfsw, & - htrswc, htrlwc, errmsg, errflg) + htrswc, htrlwc, total_albedo, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -54,7 +52,8 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d doLWrad, & ! Logical flags for lw radiation calls doSWrad, & ! Logical flags for sw radiation calls do_lw_clrsky_hr, & ! Output clear-sky LW heating-rate? - do_sw_clrsky_hr ! Output clear-sky SW heating-rate? + do_sw_clrsky_hr, & ! Output clear-sky SW heating-rate? + do_RRTMGP ! Flag for using RRTMGP scheme real(kind_phys), dimension(:), intent(in) :: & tsfa, & ! Lowest model layer air temperature for radiation (K) sfc_alb_nir_dir, & ! Surface albedo (direct) @@ -98,6 +97,8 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d real(kind_phys), dimension(:,:), intent(inout) :: & htrlw, & ! LW all-sky heating rate (K/s) htrsw ! SW all-sky heating rate (K/s) + real(kind_phys), dimension(nCol), intent(inout) :: & + total_albedo ! Total sky albedo at TOA (W/m2) real(kind_phys), dimension(:,:), intent(inout), optional :: & htrlwu ! LW all-sky heating-rate updated in-between radiation calls. type(sfcflw_type), dimension(:), intent(inout) :: & @@ -130,51 +131,56 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d if (.not. (doLWrad .or. doSWrad)) return if (doLWRad) then - ! ####################################################################################### - ! Compute LW heating-rates. - ! ####################################################################################### + if (do_RRTMGP) then + ! ####################################################################################### + ! Compute LW heating-rates. + ! ####################################################################################### - ! Clear-sky heating-rate (optional) - if (do_lw_clrsky_hr) then - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) - fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) - p_lev, & ! IN - Pressure @ layer-interfaces (Pa) - htrlwc)) ! OUT - Longwave clear-sky heating rate (K/sec) - endif + ! Clear-sky heating-rate (optional) + if (do_lw_clrsky_hr) then + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) + fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + htrlwc)) ! OUT - Longwave clear-sky heating rate (K/sec) + endif - ! All-sky heating-rate (mandatory) - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & - fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) - fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) - p_lev, & ! IN - Pressure @ layer-interfaces (Pa) - htrlw)) ! OUT - Longwave all-sky heating rate (K/sec) + ! All-sky heating-rate (mandatory) + call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) + fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) + p_lev, & ! IN - Pressure @ layer-interfaces (Pa) + htrlw)) ! OUT - Longwave all-sky heating rate (K/sec) - ! ####################################################################################### - ! Save LW outputs. - ! (Copy fluxes from RRTMGP types into model radiation types.) - ! ####################################################################################### - ! TOA fluxes + ! ####################################################################################### + ! Save LW outputs. + ! (Copy fluxes from RRTMGP types into model radiation types.) + ! ####################################################################################### + ! TOA fluxes - topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) - topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) - - ! Surface fluxes - sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) - sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) - sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) - sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) - - ! Save surface air temp for diurnal adjustment at model t-steps - tsflw (:) = tsfa(:) - - ! Radiation fluxes for other physics processes - sfcdlw(:) = sfcflw(:)%dnfxc - sfculw(:) = sfcflw(:)%upfxc - - ! Heating-rate at radiation timestep, used for adjustment between radiation calls. - htrlwu = htrlw - + topflw(:)%upfxc = fluxlwUP_allsky(:,iTOA) + topflw(:)%upfx0 = fluxlwUP_clrsky(:,iTOA) + + ! Surface fluxes + sfcflw(:)%upfxc = fluxlwUP_allsky(:,iSFC) + sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) + sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) + sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) + + ! Save surface air temp for diurnal adjustment at model t-steps + tsflw (:) = tsfa(:) + + ! Radiation fluxes for other physics processes + sfcdlw(:) = sfcflw(:)%dnfxc + sfculw(:) = sfcflw(:)%upfxc + + ! Heating-rate at radiation timestep, used for adjustment between radiation calls. + htrlwu = htrlw + endif + +! --- The total sky (with clouds) shortwave albedo + total_albedo = 0.0 + where(topfsw(:)%dnfxc>0) total_albedo(:) = topfsw(:)%upfxc/topfsw(:)%dnfxc endif ! ####################################################################################### ! ####################################################################################### @@ -182,7 +188,7 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d ! ####################################################################################### ! ####################################################################################### ! ####################################################################################### - if (doSWRad) then + if (doSWRad .and. do_RRTMGP) then if (nDay .gt. 0) then ! ################################################################################# ! Compute SW heating-rates @@ -267,5 +273,5 @@ subroutine GFS_rrtmgp_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad, d endif - end subroutine GFS_rrtmgp_post_run -end module GFS_rrtmgp_post + end subroutine GFS_radiation_post_run +end module GFS_radiation_post diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta similarity index 96% rename from physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta rename to physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta index 28fb84591..9dad5ff3c 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta @@ -1,5 +1,5 @@ [ccpp-table-properties] - name = GFS_rrtmgp_post + name = GFS_radiation_post type = scheme relative_path = ../../ dependencies = hooks/machine.F,Radiation/radiation_aerosols.f @@ -7,7 +7,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_rrtmgp_post_run + name = GFS_radiation_post_run type = scheme [nCol] standard_name = horizontal_loop_extent @@ -79,6 +79,13 @@ dimensions = () type = logical intent = in +[do_RRTMGP] + standard_name = flag_for_rrtmgp_radiation_scheme + long_name = flag for RRTMGP scheme + units = flag + dimensions = () + type = logical + intent = in [sfc_alb_nir_dir] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam @@ -380,6 +387,14 @@ type = real kind = kind_phys intent = inout +[total_albedo] + standard_name = total_sky_albedo + long_name = total sky albedo at toa + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 deleted file mode 100644 index 379e7c8dd..000000000 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 +++ /dev/null @@ -1,52 +0,0 @@ -!>\file GFS_rrtmg_post.F90 -!! This file contains the calculation of time averaged output quantities (including total-sky and -!! clear-sky SW and LW fluxes at TOA and surface; conventional -!! 3-domain cloud amount, cloud top and base pressure, and cloud top -!! temperature; aerosols AOD, etc.), store computed results in -!! corresponding slots of array fluxr with appropriate time weights. - - module GFS_rrtmg_post - contains - -!>\defgroup GFS_rrtmg_post_mod GFS RRTMG Scheme Post -!! This module calculate time averaged output quantities (including total-sky and -!! clear-sky SW and LW fluxes at TOA and surface; conventional -!! 3-domain cloud amount, cloud top and base pressure, and cloud top -!! temperature; aerosols AOD, etc.), store computed results in -!! corresponding slots of array fluxr with appropriate time weights. -!> @{ -!> \section arg_table_GFS_rrtmg_post_run Argument Table -!! \htmlinclude GFS_rrtmg_post_run.html -!! - subroutine GFS_rrtmg_post_run(im, lsswr, topfsw, total_albedo, errmsg, errflg) - - use machine, only: kind_phys - use module_radsw_parameters, only: topfsw_type - - implicit none - - ! Interface variables - integer, intent(in) :: im - logical, intent(in) :: lsswr - real(kind=kind_phys), dimension(im), intent(inout) :: total_albedo - - type(topfsw_type), dimension(im), intent(in) :: topfsw - - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (.not. lsswr) return - -! --- The total sky (with clouds) shortwave albedo - total_albedo = 0.0 - if (lsswr) then - where(topfsw(:)%dnfxc>0) total_albedo(:) = topfsw(:)%upfxc/topfsw(:)%dnfxc - endif -! - end subroutine GFS_rrtmg_post_run -!> @} - end module GFS_rrtmg_post diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta deleted file mode 100644 index 49a3c071d..000000000 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.meta +++ /dev/null @@ -1,55 +0,0 @@ -[ccpp-table-properties] - name = GFS_rrtmg_post - type = scheme - relative_path = ../../ - dependencies = hooks/machine.F - dependencies = Radiation/radiation_aerosols.f,Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f - -######################################################################## -[ccpp-arg-table] - name = GFS_rrtmg_post_run - type = scheme -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in -[lsswr] - standard_name = flag_for_calling_shortwave_radiation - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in -[topfsw] - standard_name = sw_fluxes_top_atmosphere - long_name = sw radiation fluxes at toa - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topfsw_type - intent = in -[total_albedo] - standard_name = total_sky_albedo - long_name = total sky albedo at toa - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout -[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 - dimensions = () - type = integer - intent = out From b876e1e4a47dd6caded4f430aeceb2f829e06761 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Fri, 10 Jan 2025 20:30:20 +0000 Subject: [PATCH 05/33] Replaced 'rrtmg' in warning/error message with 'radiation' to avoid confusion. --- physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 index 475fdc4bf..e1b5211f1 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.F90 @@ -138,7 +138,7 @@ subroutine GFS_radiation_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad ! Clear-sky heating-rate (optional) if (do_lw_clrsky_hr) then - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + call check_error_msg('GFS_radiation_post',compute_heating_rate( & fluxlwUP_clrsky, & ! IN - RRTMGP upward longwave clear-sky flux profiles (W/m2) fluxlwDOWN_clrsky, & ! IN - RRTMGP downward longwave clear-sky flux profiles (W/m2) p_lev, & ! IN - Pressure @ layer-interfaces (Pa) @@ -146,7 +146,7 @@ subroutine GFS_radiation_post_run (nCol, nLev, nDay, iSFC, iTOA, idxday, doLWrad endif ! All-sky heating-rate (mandatory) - call check_error_msg('GFS_rrtmgp_post',compute_heating_rate( & + call check_error_msg('GFS_radiation_post',compute_heating_rate( & fluxlwUP_allsky, & ! IN - RRTMGP upward longwave all-sky flux profiles (W/m2) fluxlwDOWN_allsky, & ! IN - RRTMGP downward longwave all-sky flux profiles (W/m2) p_lev, & ! IN - Pressure @ layer-interfaces (Pa) From 868dadbf5c7e972b1d729f68fd791069ab4ad900 Mon Sep 17 00:00:00 2001 From: rhaesung Date: Fri, 3 Jan 2025 20:59:16 +0000 Subject: [PATCH 06/33] 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 ba78577aa0f843330b40fac4432f7e74ce60dc5d Mon Sep 17 00:00:00 2001 From: rhaesung Date: Mon, 6 Jan 2025 20:04:39 +0000 Subject: [PATCH 07/33] 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 f3fe9cadb181a4785b5a06f560fdcde4f650174d Mon Sep 17 00:00:00 2001 From: rhaesung Date: Tue, 21 Jan 2025 22:43:50 +0000 Subject: [PATCH 08/33] 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 1635966e4894c253357cfe62f5c35b6f1944f92e Mon Sep 17 00:00:00 2001 From: rhaesung Date: Wed, 22 Jan 2025 18:32:13 +0000 Subject: [PATCH 09/33] 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 6619587ae9d6ecd5c9f45b24da0a48cf40648e8b Mon Sep 17 00:00:00 2001 From: rhaesung Date: Wed, 22 Jan 2025 19:02:32 +0000 Subject: [PATCH 10/33] 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 From 3b2a01a8f1e3afd88892277a74569a2f5dc22e65 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Thu, 7 Nov 2024 22:59:45 -0600 Subject: [PATCH 11/33] 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 d4971efd9..46749e5bb 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 @@ -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, & @@ -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] @@ -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 do i = 1, im diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta index 7d1150c80..1c08d9ab5 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta @@ -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 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 311055749c791d4706e6f8a585c5d7c5a00fa0b4 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Fri, 6 Dec 2024 10:45:45 -0600 Subject: [PATCH 12/33] 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 48278a5a3d23f17e00d5956ab96873ff3116f15d Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Thu, 19 Dec 2024 12:48:43 -0600 Subject: [PATCH 13/33] 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 73e032e89908cfdcf1a03814c31d49aec91491d0 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Thu, 19 Dec 2024 14:14:48 -0600 Subject: [PATCH 14/33] 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 08857a81945816c40edb966e2b476166358d784f Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Mon, 23 Dec 2024 13:58:06 -0600 Subject: [PATCH 15/33] 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 c25d36c0cb2a22e7b2bf8a7293bfea72993abb29 Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Fri, 27 Dec 2024 17:29:59 -0600 Subject: [PATCH 16/33] 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 6b40c48e6bb234a4afacb512e9531f57f2240c7a Mon Sep 17 00:00:00 2001 From: Ufuk Turuncoglu Date: Tue, 7 Jan 2025 13:35:28 -0600 Subject: [PATCH 17/33] 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 5c3886a1ad2d35aa5b9da6042ae7509bfcc21577 Mon Sep 17 00:00:00 2001 From: Jili Dong Date: Thu, 22 Aug 2024 15:13:01 +0000 Subject: [PATCH 18/33] 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 4c558e1e16409a75b7d4bc1fffefda0602b52910 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 19 Dec 2024 14:43:55 -0700 Subject: [PATCH 19/33] 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 428ebdb3090603eab4c14b8bad9a299a98e55d5c Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:30:05 +0000 Subject: [PATCH 20/33] Revert "Update physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.*: support multiple instances by making is_initialized a host-model variable" This reverts commit 4c558e1e16409a75b7d4bc1fffefda0602b52910. --- .../GFS_phys_time_vary.fv3.F90 | 39 +++++++++++++------ .../GFS_phys_time_vary.fv3.meta | 39 +++++++++---------- 2 files changed, 47 insertions(+), 31 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 0c90478be..b556af06f 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,7 +44,9 @@ module GFS_phys_time_vary private - public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize + 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. real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys @@ -93,8 +95,7 @@ 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, is_initialized, errmsg, & - errflg) + lakefrac_threshold, lakedepth_threshold, ozphys, h2ophys, errmsg, errflg) implicit none @@ -192,7 +193,6 @@ 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,8 +713,7 @@ 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, is_initialized, & - errmsg, errflg) + do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg) implicit none @@ -763,7 +762,6 @@ 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 @@ -933,17 +931,36 @@ 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(is_initialized, errmsg, errflg) + subroutine GFS_phys_time_vary_finalize(errmsg, errflg) implicit none ! Interface variables - logical, intent(inout) :: is_initialized - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + 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 d0c5e80ec..44a5b92f9 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,13 +1042,6 @@ 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 @@ -1069,13 +1062,6 @@ [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 @@ -2069,13 +2055,26 @@ 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 +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none dimensions = () - type = logical - intent = in + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out + +######################################################################## +[ccpp-arg-table] + name = GFS_phys_time_vary_timestep_finalize + type = scheme [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From a5b7c0f25c7ff3ce53911be5775818754941cb02 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:30:13 +0000 Subject: [PATCH 21/33] Revert "add a new parameter to control if G-F cold starts or not" This reverts commit 5c3886a1ad2d35aa5b9da6042ae7509bfcc21577. --- 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, 5 insertions(+), 20 deletions(-) diff --git a/physics/CONV/Grell_Freitas/cu_gf_driver.F90 b/physics/CONV/Grell_Freitas/cu_gf_driver.F90 index f951029ad..76bbf52e7 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, gf_coldstart, & + subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& 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, gf_co 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, gf_coldstart + logical, intent(in ) :: flag_init, flag_restart, do_mynnedmf 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, gf_co ccn_m(i) = 0. ! set aod and ccn - if ((flag_init .and. .not.flag_restart) .or. gf_coldstart) then + if (flag_init .and. .not.flag_restart) 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 4a645b4ab..f76d0c30c 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver.meta +++ b/physics/CONV/Grell_Freitas/cu_gf_driver.meta @@ -588,13 +588,6 @@ 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 7e022d983..1bc9aed34 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, gf_coldstart, kdt, fhour, dtp, t, q, prevst, prevsq, & + subroutine cu_gf_driver_pre_run (flag_init, flag_restart, 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,7 +26,6 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, gf_coldstart, kdt, fho 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 @@ -60,7 +59,7 @@ subroutine cu_gf_driver_pre_run (flag_init, flag_restart, gf_coldstart, kdt, fho ! 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) .or. gf_coldstart) then + if(flag_init .and. .not.flag_restart) 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 397c42f8c..105461758 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta +++ b/physics/CONV/Grell_Freitas/cu_gf_driver_pre.meta @@ -130,13 +130,6 @@ 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 09c97a50138b1cce0996753ae240309f46f95e7f Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:30:22 +0000 Subject: [PATCH 22/33] Revert "fix space issue" This reverts commit 6b40c48e6bb234a4afacb512e9531f57f2240c7a. --- physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 index d4971efd9..431ff3576 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 @@ -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, 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 00cf6e7ae0716afae23990251e03062c30afb2d3 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:30:33 +0000 Subject: [PATCH 23/33] Revert "correction for flux calculation" This reverts commit c25d36c0cb2a22e7b2bf8a7293bfea72993abb29. --- physics/SFC_Models/Land/sfc_land.F90 | 44 +++++------------------ physics/SFC_Models/Land/sfc_land.meta | 52 ++------------------------- 2 files changed, 10 insertions(+), 86 deletions(-) diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index 1661c5c40..51a63cdae 100644 --- a/physics/SFC_Models/Land/sfc_land.F90 +++ b/physics/SFC_Models/Land/sfc_land.F90 @@ -31,12 +31,10 @@ 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, & - dlwflx, dswsfc, sfalb, sfcemis, & - rd, eps, epsm1, rvrdm1, hvap, cp, con_sbc, & - sncovr1_lnd, qsurf_lnd, & + 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, slc, & + 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) @@ -60,17 +58,12 @@ 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(:) @@ -84,7 +77,6 @@ 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(:) @@ -107,14 +99,11 @@ 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, & - & slc_min = 0.05_kind_phys, & ! estimate dry limit for soil moisture - & slc_max = 0.50_kind_phys ! estimate saturated limit for soil moisture + & qmin = 1.0e-8_kind_phys ! 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 @@ -133,11 +122,6 @@ 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)) @@ -146,23 +130,11 @@ 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)) ! 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 + 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 ! convert to expected units + evap(i) = evap(i)*(1.0/rho(i))*hvapi 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 b443c7efb..b24a6f8af 100644 --- a/physics/SFC_Models/Land/sfc_land.meta +++ b/physics/SFC_Models/Land/sfc_land.meta @@ -128,38 +128,6 @@ 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 @@ -208,14 +176,6 @@ 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 @@ -268,7 +228,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 @@ -313,7 +273,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = out optional = True [chh_lnd] standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land_from_land @@ -333,14 +293,6 @@ 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 2811f8c37e8fb69b6e76a35e0c8cce3dff986fb0 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:30:41 +0000 Subject: [PATCH 24/33] Revert "remove flag_init" This reverts commit 08857a81945816c40edb966e2b476166358d784f. --- physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 | 5 +++-- physics/SFC_Models/Land/Noahmp/noahmpdrv.meta | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 index 431ff3576..46749e5bb 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, ps, u1, v1, t1, q1, & + ( 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,& @@ -527,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] @@ -987,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 do i = 1, im diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta index 7d1150c80..1c08d9ab5 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta @@ -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 From 4d40d7e7659923bd94411bc60b7db776d5ed44ea Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:30:52 +0000 Subject: [PATCH 25/33] Revert "fix minor issue" This reverts commit 73e032e89908cfdcf1a03814c31d49aec91491d0. --- 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 51a63cdae..d606054ed 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) + errmsg, errflg, naux2d, aux2d) implicit none From db663425c16aa2d698dbd2338ba87e3c844e8d37 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:31:01 +0000 Subject: [PATCH 26/33] Revert "add simple land flux calculation that is used in the initial time step" This reverts commit 48278a5a3d23f17e00d5956ab96873ff3116f15d. --- physics/SFC_Models/Land/sfc_land.F90 | 113 ++++++------------------ physics/SFC_Models/Land/sfc_land.meta | 122 +------------------------- 2 files changed, 28 insertions(+), 207 deletions(-) diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index d606054ed..e222115f7 100644 --- a/physics/SFC_Models/Land/sfc_land.F90 +++ b/physics/SFC_Models/Land/sfc_land.F90 @@ -10,7 +10,6 @@ module sfc_land use machine, only : kind_phys - use funcphys, only : fpvs contains @@ -30,40 +29,23 @@ module sfc_land !! \section detailed Detailed Algorithm !! @{ 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, & + 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, naux2d, aux2d) + errmsg, errflg) 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(:) - 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 + 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), optional :: sncovr1_lnd(:) real(kind=kind_phys), intent(in), optional :: qsurf_lnd(:) real(kind=kind_phys), intent(in), optional :: evap_lnd(:) @@ -95,76 +77,35 @@ 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) 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 + 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 end subroutine sfc_land_run diff --git a/physics/SFC_Models/Land/sfc_land.meta b/physics/SFC_Models/Land/sfc_land.meta index b24a6f8af..13ddab00a 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 = ../../tools/funcphys.f90,../../hooks/machine.F + dependencies = ../../hooks/machine.F ######################################################################## [ccpp-arg-table] @@ -56,126 +56,6 @@ 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 770e1937a95506a4751121b3bb7a8a22be3f6086 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:31:14 +0000 Subject: [PATCH 27/33] Revert "minor fix for restart" This reverts commit 311055749c791d4706e6f8a585c5d7c5a00fa0b4. --- physics/SFC_Models/Land/sfc_land.F90 | 12 ++++-------- physics/SFC_Models/Land/sfc_land.meta | 7 ------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index e222115f7..36bdcdc09 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, flag_restart, & - 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, 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,7 +41,6 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & ! 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(:) @@ -85,10 +84,7 @@ subroutine sfc_land_run(im, flag_init, flag_restart, & errflg = 0 ! 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 + 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 13ddab00a..84c4ccdce 100644 --- a/physics/SFC_Models/Land/sfc_land.meta +++ b/physics/SFC_Models/Land/sfc_land.meta @@ -21,13 +21,6 @@ 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 15161d9917dae219546647717751435d7e88f31e Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:31:24 +0000 Subject: [PATCH 28/33] Revert "skip land component for first time step" This reverts commit 3b2a01a8f1e3afd88892277a74569a2f5dc22e65. --- 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, 5 insertions(+), 22 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 index 46749e5bb..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, flag_init, 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, & @@ -527,7 +526,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 +986,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 diff --git a/physics/SFC_Models/Land/sfc_land.F90 b/physics/SFC_Models/Land/sfc_land.F90 index 36bdcdc09..a85e8b787 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, flag_init, cpllnd, cpllnd2atm, & - flag_iter, dry, sncovr1_lnd, qsurf_lnd, evap_lnd, hflx_lnd, & + 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, & @@ -40,7 +40,6 @@ subroutine sfc_land_run(im, flag_init, cpllnd, cpllnd2atm, & ! Inputs integer , intent(in) :: im - logical , intent(in) :: flag_init logical , intent(in) :: cpllnd logical , intent(in) :: cpllnd2atm logical , intent(in) :: flag_iter(:) @@ -84,7 +83,7 @@ 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 ! 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..15790145e 100644 --- a/physics/SFC_Models/Land/sfc_land.meta +++ b/physics/SFC_Models/Land/sfc_land.meta @@ -14,13 +14,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 [cpllnd] standard_name = flag_for_land_coupling long_name = flag controlling cpllnd collection (default off) From f32a01e2f4b1b2ab52608dae0597ccebbc4aaf4f Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:31:35 +0000 Subject: [PATCH 29/33] Revert "update module_sf_noahmplsm.F90" This reverts commit 6619587ae9d6ecd5c9f45b24da0a48cf40648e8b. --- physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 index 3f27636ff..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) then + if(cosz > 0) ! weight reflectance/transmittance by lai and sai @@ -3044,6 +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 + end if ! ground surface albedo @@ -3084,7 +3085,8 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in wl = ext end if fsun = wl - end if + +100 continue end subroutine albedo From c37e2d2c415b24b431296949ebeb559bd7fbbd27 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:31:47 +0000 Subject: [PATCH 30/33] Revert "update module_sf_noahmplsm.F90" This reverts commit 1635966e4894c253357cfe62f5c35b6f1944f92e. --- physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 | 5 +++-- 1 file changed, 3 insertions(+), 2 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..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) + if(cosz <= 0) ! weight reflectance/transmittance by lai and sai @@ -3044,7 +3044,8 @@ 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 + +100 continue ! ground surface albedo From 1a55e3bcad29ae743672619010b99bbd6254758c Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:32:00 +0000 Subject: [PATCH 31/33] Revert "update module_sf_noahmp_glacier.F90 and module_sf_noahmplsm.F90 according to review" This reverts commit f3fe9cadb181a4785b5a06f560fdcde4f650174d. --- .../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 3906a53d6..fcbe40a70 100644 --- a/physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90 +++ b/physics/SFC_Models/Land/Noahmp/module_sf_noahmp_glacier.F90 @@ -842,14 +842,12 @@ 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 80ffdf62c..7ab496ddc 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) goto 100 ! weight reflectance/transmittance by lai and sai @@ -3045,8 +3045,6 @@ 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 @@ -9145,6 +9143,10 @@ 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 75f72bb394c0128eaa5f5a727862da2985463a62 Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:32:13 +0000 Subject: [PATCH 32/33] Revert "update radiation_clouds.f according to the review" This reverts commit ba78577aa0f843330b40fac4432f7e74ce60dc5d. --- physics/Radiation/radiation_clouds.f | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/physics/Radiation/radiation_clouds.f b/physics/Radiation/radiation_clouds.f index ccebdf6cf..d1518bfcb 100644 --- a/physics/Radiation/radiation_clouds.f +++ b/physics/Radiation/radiation_clouds.f @@ -197,10 +197,9 @@ 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 - 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 @@ -2165,13 +2164,8 @@ 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) then - if(nint(slmsk(i))==1) then - rei(i,k)=creice_def - else - rei(i,k)=reice_def - endif - endif + if(tem2 > 1.e-12 .and. clw(i,k,ntiw) < 1.e-12) + & rei(i,k)=reice_def 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 8a96ec2474574e7532e0ba8e3b8e9d0659d651ae Mon Sep 17 00:00:00 2001 From: "larissa.reames@noaa.gov" Date: Thu, 6 Feb 2025 21:32:27 +0000 Subject: [PATCH 33/33] Revert "update cloud/radiation/land" This reverts commit 868dadbf5c7e972b1d729f68fd791069ab4ad900. --- physics/MP/Thompson/module_mp_thompson.F90 | 2 +- physics/Radiation/radiation_clouds.f | 2 +- .../Land/Noahmp/module_sf_noahmplsm.F90 | 29 ++++--------------- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/physics/MP/Thompson/module_mp_thompson.F90 b/physics/MP/Thompson/module_mp_thompson.F90 index 5d4495ae0..3114859b5 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 = 150.e6 + real(wp), parameter :: Nt_c_l = 100.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 d1518bfcb..979405cdb 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 = 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 diff --git a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 index 7ab496ddc..a76a354e6 100644 --- a/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 +++ b/physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 @@ -2511,19 +2511,7 @@ 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 @@ -2542,11 +2530,6 @@ 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 @@ -3020,10 +3003,6 @@ 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 @@ -3036,6 +3015,10 @@ 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) & @@ -9145,9 +9128,7 @@ 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) -! tried one suggesteed by gy niu - ka = 0.5*(hk(iwt)+parameters%dksat(iwt)*1.0e3) + ka = 2.0*(hk(iwt)*parameters%dksat(iwt)*1.0e3) / (hk(iwt)+parameters%dksat(iwt)*1.0e3) wh_zwt = - zwt * 1.e3 !(mm) wh = smpfz - znode(iwt)*1.e3 !(mm)