From 949ca840e63edd9dc43055d90f83c527b4d44e19 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Sat, 9 Oct 2021 20:07:58 -0400 Subject: [PATCH 01/45] reverting to my versions of GFS_rrtmgp_*post.F90 files --- physics/GFS_rrtmgp_lw_post.F90 | 72 +++++++++++++------------- physics/GFS_rrtmgp_sw_post.F90 | 92 ++++++++++++++++++---------------- physics/rte-rrtmgp | 2 +- 3 files changed, 85 insertions(+), 81 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index ff0346fe4..2e30fdbd0 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -1,4 +1,4 @@ -module GFS_rrtmgp_lw_post +module GFS_rrtmgp_lw_post use machine, only: kind_phys use module_radiation_aerosols, only: NSPC1 use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type @@ -6,9 +6,9 @@ module GFS_rrtmgp_lw_post use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use radiation_tools, only: check_error_msg + use radiation_tools, only: check_error_msg implicit none - + public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize contains @@ -29,16 +29,16 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag fluxlwDOWN_clrsky, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, fluxr, & sfcdlw, sfculw, sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) - ! Inputs - integer, intent(in) :: & + ! Inputs + integer, intent(in) :: & nCol, & ! Horizontal loop extent nLev ! Number of vertical layers - logical, intent(in) :: & + logical, intent(in) :: & lslwr, & ! Logical flags for lw radiation calls - do_lw_clrsky_hr, & ! Output clear-sky SW heating-rate? - save_diag ! Output radiation diagnostics? + do_lw_clrsky_hr, & ! Output clear-sky SW heating-rate? + save_diag ! Output radiation diagnostics? real(kind_phys), intent(in) :: & - fhlwr ! Frequency for SW radiation + fhlwr ! Frequency for SW radiation real(kind_phys), dimension(nCol), intent(in) :: & tsfa ! Lowest model layer air temperature for radiation (K) real(kind_phys), dimension(nCol, nLev), intent(in) :: & @@ -52,25 +52,25 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag real(kind_phys), intent(in) :: & raddt ! Radiation time step real(kind_phys), dimension(nCol,NSPC1), intent(in) :: & - aerodp ! Vertical integrated optical depth for various aerosol species + aerodp ! Vertical integrated optical depth for various aerosol species real(kind_phys), dimension(nCol,5), intent(in) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL + cldsa ! Fraction of clouds for low, middle, high, total and BL integer, dimension(nCol,3), intent(in) ::& mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases real(kind_phys), dimension(nCol,nLev), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer - cldtaulw ! approx 10.mu band layer cloud optical depth - + cldtaulw ! approx 10.mu band layer cloud optical depth + real(kind=kind_phys), dimension(:,:), intent(inout) :: fluxr - + ! Outputs (mandatory) real(kind_phys), dimension(nCol), intent(inout) :: & sfcdlw, & ! Total sky sfc downward lw flux (W/m2) sfculw, & ! Total sky sfc upward lw flux (W/m2) tsflw ! surface air temp during lw calculation (K) type(sfcflw_type), dimension(nCol), intent(inout) :: & - sfcflw ! LW radiation fluxes at sfc + sfcflw ! LW radiation fluxes at sfc real(kind_phys), dimension(nCol,nLev), intent(inout) :: & htrlw ! LW all-sky heating rate type(topflw_type), dimension(nCol), intent(out) :: & @@ -79,7 +79,7 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag errmsg integer, intent(out) :: & errflg - + ! Outputs (optional) type(proflw_type), dimension(nCol, nLev+1), optional, intent(inout) :: & flxprf_lw ! 2D radiative fluxes, components: @@ -89,7 +89,7 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag ! dnfx0 - clear sky dnward flux (W/m2) real(kind_phys),dimension(nCol, nLev),intent(inout),optional :: & htrlwc ! Longwave clear-sky heating-rate (K/sec) - + ! Local variables integer :: i, j, k, iSFC, iTOA, itop, ibtc logical :: l_fluxeslw2d, top_at_1 @@ -118,7 +118,7 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag endif ! ####################################################################################### - ! Compute LW heating-rates. + ! Compute LW heating-rates. ! ####################################################################################### ! Clear-sky heating-rate (optional) if (do_lw_clrsky_hr) then @@ -128,7 +128,7 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag 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) @@ -147,7 +147,7 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag sfcflw(:)%upfx0 = fluxlwUP_clrsky(:,iSFC) sfcflw(:)%dnfxc = fluxlwDOWN_allsky(:,iSFC) sfcflw(:)%dnfx0 = fluxlwDOWN_clrsky(:,iSFC) - + ! Optional outputs if(l_fluxeslw2d) then flxprf_lw%upfxc = fluxlwUP_allsky @@ -155,7 +155,7 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag flxprf_lw%upfx0 = fluxlwUP_clrsky flxprf_lw%dnfx0 = fluxlwDOWN_clrsky endif - + ! Save surface air temp for diurnal adjustment at model t-steps tsflw (:) = tsfa(:) @@ -165,8 +165,8 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag ! ####################################################################################### ! 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 + ! - 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 @@ -182,24 +182,24 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag 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 - - 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 + +! 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 * t_lay(i,itop) - +! 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 * t_lay(i,itop) + ! Add optical depth and emissivity output tem2 = 0. do k=ibtc,itop diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 23a681826..d8514650a 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -1,14 +1,14 @@ -module GFS_rrtmgp_sw_post +module GFS_rrtmgp_sw_post use machine, only: kind_phys use module_radiation_aerosols, only: NSPC1 use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_fluxes_byband, only: ty_fluxes_byband use mo_heating_rates, only: compute_heating_rate - use radiation_tools, only: check_error_msg + use radiation_tools, only: check_error_msg use rrtmgp_sw_gas_optics, only: sw_gas_props implicit none - + public GFS_rrtmgp_sw_post_init,GFS_rrtmgp_sw_post_run,GFS_rrtmgp_sw_post_finalize contains @@ -33,23 +33,23 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, & sfcdsw, htrsw, sfcfsw, topfsw, htrswc, flxprf_sw, scmpsw, errmsg, errflg) - ! Inputs - integer, intent(in) :: & - nCol, & ! Horizontal loop extent + ! Inputs + integer, intent(in) :: & + nCol, & ! Horizontal loop extent nLev, & ! Number of vertical layers nDay ! Number of daylit columns integer, intent(in), dimension(nday) :: & idxday ! Index array for daytime points - logical, intent(in) :: & - lsswr, & ! Call SW radiation? - do_sw_clrsky_hr, & ! Output clear-sky SW heating-rate? - save_diag ! Output radiation diagnostics? + logical, intent(in) :: & + lsswr, & ! Call SW radiation? + do_sw_clrsky_hr, & ! Output clear-sky SW heating-rate? + save_diag ! Output radiation diagnostics? real(kind_phys), intent(in) :: & fhswr ! Frequency for SW radiation real(kind_phys), dimension(nCol), intent(in) :: & t_lay, & ! Temperature at model layer centers (K) - coszen, & ! Cosine(SZA) - coszdg ! Cosine(SZA), daytime + coszen, & ! Cosine(SZA) + coszdg ! Cosine(SZA), daytime real(kind_phys), dimension(nCol, nLev+1), intent(in) :: & p_lev ! Pressure @ model layer-interfaces (Pa) real(kind_phys), dimension(sw_gas_props%get_nband(),ncol), intent(in) :: & @@ -65,17 +65,17 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky real(kind_phys), intent(in) :: & raddt ! Radiation time step real(kind_phys), dimension(nCol,NSPC1), intent(in) :: & - aerodp ! Vertical integrated optical depth for various aerosol species + aerodp ! Vertical integrated optical depth for various aerosol species real(kind_phys), dimension(nCol,5), intent(in) :: & - cldsa ! Fraction of clouds for low, middle, high, total and BL + cldsa ! Fraction of clouds for low, middle, high, total and BL integer, dimension(nCol,3), intent(in) ::& mbota, & ! vertical indices for low, middle and high cloud tops mtopa ! vertical indices for low, middle and high cloud bases real(kind_phys), dimension(nCol,nLev), intent(in) :: & cld_frac, & ! Total cloud fraction in each layer cldtausw ! approx .55mu band layer cloud optical depth - - ! Inputs (optional) + + ! Inputs (optional) type(cmpfsw_type), dimension(nCol), intent(inout), optional :: & scmpsw ! 2D surface fluxes, components: ! uvbfc - total sky downward uv-b flux at (W/m2) @@ -83,10 +83,10 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky ! nirbm - downward nir direct beam flux (W/m2) ! nirdf - downward nir diffused flux (W/m2) ! visbm - downward uv+vis direct beam flux (W/m2) - ! visdf - downward uv+vis diffused 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(nCol), intent(inout) :: & nirbmdi, & ! sfc nir beam sw downward flux (W/m2) @@ -96,7 +96,7 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky nirbmui, & ! sfc nir beam sw upward flux (W/m2) nirdfui, & ! sfc nir diff sw upward flux (W/m2) visbmui, & ! sfc uv+vis beam sw upward flux (W/m2) - visdfui, & ! sfc uv+vis diff sw upward flux (W/m2) + visdfui, & ! sfc uv+vis diff sw upward flux (W/m2) sfcnsw, & ! total sky sfc netsw flx into ground sfcdsw ! real(kind_phys), dimension(nCol,nLev), intent(inout) :: & @@ -119,7 +119,7 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky ! dnfx0 - clear sky dnward flux (W/m2) real(kind_phys),dimension(nCol, nLev),intent(inout),optional :: & htrswc ! Clear-sky heating rate (K/s) - + ! Local variables integer :: i, j, k, iSFC, iTOA, itop, ibtc real(kind_phys) :: tem0d, tem1, tem2 @@ -135,7 +135,7 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky ! Are any optional outputs requested? l_fluxessw2d = present(flxprf_sw) - + ! Are the components of the surface fluxes provided? l_scmpsw = present(scmpsw) @@ -150,7 +150,7 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky iSFC = 1 iTOA = nLev+1 endif - + ! ####################################################################################### ! Compute SW heating-rates ! ####################################################################################### @@ -194,10 +194,10 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky flxprf_sw(:,:)%upfx0 = fluxswUP_clrsky(:,:) flxprf_sw(:,:)%dnfx0 = fluxswDOWN_clrsky(:,:) endif - + ! Surface down and up spectral component fluxes ! - Save two spectral bands' surface downward and upward fluxes for output. - if (l_scmpsw) then + if (l_scmpsw) then do i=1,nCol nirbmdi(i) = scmpsw(i)%nirbm nirdfdi(i) = scmpsw(i)%nirdf @@ -209,15 +209,17 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky visdfui(i) = scmpsw(i)%visdf * sfc_alb_uvvis_dif(1,i) enddo else - nirbmdi(:) = 0.0 - nirdfdi(:) = 0.0 - visbmdi(:) = 0.0 - visdfdi(:) = 0.0 - nirbmui(:) = 0.0 - nirdfui(:) = 0.0 - visbmui(:) = 0.0 - visdfui(:) = 0.0 - endif + do i=1,nCol + nirbmdi(i) = 0.0 + nirdfdi(i) = 0.0 + visbmdi(i) = 0.0 + visdfdi(i) = 0.0 + nirbmui(i) = 0.0 + nirdfui(i) = 0.0 + visbmui(i) = 0.0 + visdfui(i) = 0.0 + enddo + endif else ! if_nday_block ! ####################################################################################### ! Dark everywhere @@ -225,15 +227,17 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky htrsw(:,:) = 0.0 sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) topfsw = topfsw_type( 0.0, 0.0, 0.0 ) - nirbmdi(:) = 0.0 - nirdfdi(:) = 0.0 - visbmdi(:) = 0.0 - visdfdi(:) = 0.0 - nirbmui(:) = 0.0 - nirdfui(:) = 0.0 - visbmui(:) = 0.0 - visdfui(:) = 0.0 - + do i=1,nCol + nirbmdi(i) = 0.0 + nirdfdi(i) = 0.0 + visbmdi(i) = 0.0 + visdfdi(i) = 0.0 + nirbmui(i) = 0.0 + nirdfui(i) = 0.0 + visbmui(i) = 0.0 + visdfui(i) = 0.0 + enddo + if (do_sw_clrsky_hr) then htrswc(:,:) = 0 endif @@ -279,7 +283,7 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky 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,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d endif enddo diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 9588c7bd8..d9594c46c 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 9588c7bd89e4f51a924f766e313bc42830fb4479 +Subproject commit d9594c46c877a2ab8001f5cd37961efdcf08ad8e From 215c80e4a8caa4032eb50f4df99a0414a8bbce09 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Fri, 15 Oct 2021 14:05:54 +0000 Subject: [PATCH 02/45] additional updates to emissivity calculation etc --- physics/GFS_debug.F90 | 2 +- physics/GFS_radiation_surface.F90 | 24 +++---- physics/GFS_radiation_surface.meta | 24 ++++++- physics/GFS_surface_composites.F90 | 27 +++---- physics/GFS_surface_composites.meta | 36 ---------- physics/radiation_surface.f | 107 +++++++++++----------------- 6 files changed, 89 insertions(+), 131 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index deb88458b..33e5beec0 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -1307,7 +1307,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%visdf ', Interstitial%scmpsw%visdf ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_ice ', Interstitial%semis_ice ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_land ', Interstitial%semis_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_water ', Interstitial%semis_water ) +! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%semis_water ', Interstitial%semis_water ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sfcalb ', Interstitial%sfcalb ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigma ', Interstitial%sigma ) call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmaf ', Interstitial%sigmaf ) diff --git a/physics/GFS_radiation_surface.F90 b/physics/GFS_radiation_surface.F90 index 02d0f1c57..d48bce332 100644 --- a/physics/GFS_radiation_surface.F90 +++ b/physics/GFS_radiation_surface.F90 @@ -58,11 +58,11 @@ end subroutine GFS_radiation_surface_init subroutine GFS_radiation_surface_run ( & im, frac_grid, lslwr, lsswr, lsm, lsm_noahmp, lsm_ruc, & xlat, xlon, slmsk, lndp_type, n_var_lndp, sfc_alb_pert, & - lndp_var_list, lndp_prt_list, landfrac, snowd, sncovr, & + lndp_var_list, lndp_prt_list, landfrac, snodl, snodi, sncovr, & sncovr_ice, fice, zorl, hprime, tsfg, tsfa, tisfc, coszen, & cplice, min_seaice, min_lakeice, lakefrac, use_flake, & alvsf, alnsf, alvwf, alnwf, facsf, facwf, & - semis_lnd, semis_ice, snoalb, use_cice_alb, & + semis_lnd, semis_ice, semis_wat, snoalb, use_cice_alb, & albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, & albdvis_ice, albdnir_ice, albivis_ice, albinir_ice, & semisbase, semis, sfcalb, sfc_alb_dif, errmsg, errflg) @@ -82,7 +82,7 @@ subroutine GFS_radiation_surface_run ( & real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, slmsk, & sfc_alb_pert, lndp_prt_list, & landfrac, lakefrac, & - snowd, sncovr, & + snodl, snodi, sncovr, & sncovr_ice, fice, zorl, & hprime, tsfg, tsfa, tisfc, & coszen, alvsf, alnsf, alvwf, & @@ -93,7 +93,7 @@ subroutine GFS_radiation_surface_run ( & real(kind=kind_phys), dimension(:), intent(inout) :: albdvis_lnd, albdnir_lnd, & albivis_lnd, albinir_lnd, & - semis_lnd, semis_ice + semis_lnd, semis_ice, semis_wat real(kind=kind_phys), dimension(:), intent(inout) :: semisbase, semis real(kind=kind_phys), dimension(:,:), intent(inout) :: sfcalb real(kind=kind_phys), dimension(:), intent(inout) :: sfc_alb_dif @@ -161,13 +161,13 @@ subroutine GFS_radiation_surface_run ( & if (lslwr) then !> - Call module_radiation_surface::setemis(),to set up surface !! emissivity for LW radiation. - call setemis (lsm, lsm_noahmp, lsm_ruc, frac_grid, cplice, & - use_flake, lakefrac, xlon, xlat, slmsk, & -! frac_grid, min_seaice, xlon, xlat, slmsk, & - snowd, sncovr, sncovr_ice, zorl, tsfg, tsfa, & - hprime, semis_lnd, semis_ice, im, & - fracl, fraco, fraci, icy, & ! --- inputs - semisbase, semis) ! --- outputs + call setemis (lsm, lsm_noahmp, lsm_ruc, frac_grid, cplice, & + use_flake, lakefrac, xlon, xlat, slmsk, & +! frac_grid, min_seaice, xlon, xlat, slmsk, & + snodl, snodi, sncovr, sncovr_ice, zorl, tsfg, & + tsfa, hprime, semis_lnd, semis_ice, semis_wat,& + im, fracl, fraco, fraci, icy, & ! --- inputs + semisbase, semis) ! --- outputs endif if (lsswr) then @@ -184,7 +184,7 @@ subroutine GFS_radiation_surface_run ( & !> - Call module_radiation_surface::setalb(),to set up surface !! albedor for SW radiation. - call setalb (slmsk, lsm, lsm_noahmp, lsm_ruc, use_cice_alb, snowd, sncovr, sncovr_ice, & + call setalb (slmsk, lsm, lsm_noahmp, lsm_ruc, use_cice_alb, snodl, sncovr, sncovr_ice, & snoalb, zorl, coszen, tsfg, tsfa, hprime, frac_grid, lakefrac, & ! snoalb, zorl, coszen, tsfg, tsfa, hprime, frac_grid, min_seaice, & alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, & diff --git a/physics/GFS_radiation_surface.meta b/physics/GFS_radiation_surface.meta index d360b37d8..5aa40ff1f 100644 --- a/physics/GFS_radiation_surface.meta +++ b/physics/GFS_radiation_surface.meta @@ -197,9 +197,18 @@ kind = kind_phys intent = in optional = F -[snowd] - standard_name = lwe_surface_snow - long_name = water equivalent snow depth +[snodl] + standard_name = surface_snow_thickness_water_equivalent_over_land + long_name = water equivalent snow depth over land + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[snodi] + standard_name = surface_snow_thickness_water_equivalent_over_ice + long_name = water equivalent snow depth over ice units = mm dimensions = (horizontal_loop_extent) type = real @@ -402,6 +411,15 @@ kind = kind_phys intent = in optional = F +[semis_wat] + standard_name = surface_longwave_emissivity_over_water + long_name = surface lw emissivity in fraction over water + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F [snoalb] standard_name = upper_bound_of_max_albedo_assuming_deep_snow long_name = maximum snow albedo diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index ca5ea2765..2ad6ef3d8 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -34,8 +34,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & weasd, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & tisfc, tsurf_wat, tsurf_lnd, tsurf_ice, & - gflx_ice, tgice, islmsk, islmsk_cice, slmsk, semis_wat, semis_lnd, semis_ice, & - qss, qss_wat, qss_lnd, qss_ice, & + gflx_ice, tgice, islmsk, islmsk_cice, slmsk, qss, qss_wat, qss_lnd, qss_ice, & min_lakeice, min_seaice, kdt, huge, errmsg, errflg) implicit none @@ -57,7 +56,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra qss_wat, qss_lnd, qss_ice, ep1d_ice, gflx_ice real(kind=kind_phys), intent(in ) :: tgice integer, dimension(:), intent(inout) :: islmsk, islmsk_cice - real(kind=kind_phys), dimension(:), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk + real(kind=kind_phys), dimension(:), intent(inout) :: slmsk real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice, huge ! real(kind=kind_phys), dimension(:), intent(inout) :: zorlo, zorll, zorli @@ -212,11 +211,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra uustar_wat(i) = uustar(i) tsfc_wat(i) = tsfco(i) tsurf_wat(i) = tsfco(i) - !-- reference emiss value for surface emissivity in setemis - ! 1-open water, 2-grass/shrub land, 3-bare soil, tundra, - ! 4-sandy desert, 5-rocky desert, 6-forest, 7-ice, 8-snow - !data emsref / 0.97, 0.95, 0.94, 0.90, 0.93, 0.96, 0.96, 0.99 / - semis_wat(i) = 0.97_kind_phys ! consistent with setemis ! DH* else zorlo(i) = huge @@ -325,8 +319,9 @@ end subroutine GFS_surface_composites_inter_finalize !> \section arg_table_GFS_surface_composites_inter_run Argument Table !! \htmlinclude GFS_surface_composites_inter_run.html !! - subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis_lnd, semis_ice, adjsfcdlw, & - gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat, & +! subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis_lnd, semis_ice, adjsfcdlw, & + subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_lnd, semis_ice, adjsfcdlw, & + gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat, & adjsfcusw, adjsfcdsw, adjsfcnsw, errmsg, errflg) implicit none @@ -334,7 +329,8 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis ! Interface variables integer, intent(in ) :: im logical, dimension(:), intent(in ) :: dry, icy, wet - real(kind=kind_phys), dimension(:), intent(in ) :: semis_wat, semis_lnd, semis_ice, adjsfcdlw, & +! real(kind=kind_phys), dimension(:), intent(in ) :: semis_wat, semis_lnd, semis_ice, adjsfcdlw, & + real(kind=kind_phys), dimension(:), intent(in ) :: semis_lnd, semis_ice, adjsfcdlw, & adjsfcdsw, adjsfcnsw real(kind=kind_phys), dimension(:), intent(inout) :: gabsbdlw_lnd, gabsbdlw_ice, gabsbdlw_wat real(kind=kind_phys), dimension(:), intent(out) :: adjsfcusw @@ -343,6 +339,13 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg +! + !-- reference emiss value for surface emissivity in setemis + ! 1-open water, 2-grass/shrub land, 3-bare soil, tundra, + ! 4-sandy desert, 5-rocky desert, 6-forest, 7-ice, 8-snow + !data emsref / 0.97, 0.95, 0.94, 0.90, 0.93, 0.96, 0.96, 0.99 / + real(kind=kind_phys), parameter :: semis_wat = 0.97_kind_phys ! consistent with setemis + ! Local variables integer :: i @@ -371,7 +374,7 @@ subroutine GFS_surface_composites_inter_run (im, dry, icy, wet, semis_wat, semis do i=1,im if (dry(i)) gabsbdlw_lnd(i) = semis_lnd(i) * adjsfcdlw(i) if (icy(i)) gabsbdlw_ice(i) = semis_ice(i) * adjsfcdlw(i) - if (wet(i)) gabsbdlw_wat(i) = semis_wat(i) * adjsfcdlw(i) + if (wet(i)) gabsbdlw_wat(i) = semis_wat * adjsfcdlw(i) adjsfcusw(i) = adjsfcdsw(i) - adjsfcnsw(i) enddo diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index a8f76e2ed..7d60d2b82 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -459,33 +459,6 @@ kind = kind_phys intent = inout optional = F -[semis_wat] - standard_name = surface_longwave_emissivity_over_water - long_name = surface lw emissivity in fraction over water - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[semis_lnd] - 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 = inout - optional = F -[semis_ice] - standard_name = surface_longwave_emissivity_over_ice - long_name = surface lw emissivity in fraction over ice - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F [qss] standard_name = surface_specific_humidity long_name = surface air saturation specific humidity @@ -617,15 +590,6 @@ type = logical intent = in optional = F -[semis_wat] - standard_name = surface_longwave_emissivity_over_water - long_name = surface lw emissivity in fraction over water - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F [semis_lnd] standard_name = surface_longwave_emissivity_over_land long_name = surface lw emissivity in fraction over land diff --git a/physics/radiation_surface.f b/physics/radiation_surface.f index 3bb53be73..29cae3992 100644 --- a/physics/radiation_surface.f +++ b/physics/radiation_surface.f @@ -298,7 +298,7 @@ end subroutine sfc_init !! \n 1) climatological surface albedo scheme (\cite briegleb_1992) !! \n 2) MODIS retrieval based scheme from Boston univ. !!\param slmsk (IMAX), sea(0),land(1),ice(2) mask on fcst model grid -!!\param snowf (IMAX), snow depth water equivalent in mm +!!\param snowf (IMAX), snow depth water equivalent in mm over land !!\param sncovr (IMAX), snow cover over land !!\param snoalb (IMAX), maximum snow albedo over land (for deep snow) !!\param zorlf (IMAX), surface roughness in cm @@ -712,7 +712,8 @@ end subroutine setalb !! or -pi -> +pi ranges !!\param xlat (IMAX), latitude in radiance, default to pi/2 -> !! -pi/2 range, otherwise see in-line comment -!!\param snowf (IMAX), snow depth water equivalent in mm +!!\param snodl (IMAX), snow depth water equivalent in mm land +!!\param snodi (IMAX), snow depth water equivalent in mm ice !!\param sncovr (IMAX), snow cover over land !!\param zorlf (IMAX), surface roughness in cm !!\param tsknf (IMAX), ground surface temperature in K @@ -725,9 +726,9 @@ end subroutine setalb !----------------------------------- subroutine setemis & & ( lsm,lsm_noahmp,lsm_ruc,frac_grid,cplice,use_flake, & ! --- inputs: - & lakefrac,xlon,xlat,slmsk,snowf,sncovr,sncovr_ice, & + & lakefrac,xlon,xlat,slmsk,snodl,snodi,sncovr,sncovr_ice, & & zorlf,tsknf,tairf,hprif, & - & semis_lnd,semis_ice,IMAX,fracl,fraco,fraci,icy, & + & semis_lnd,semis_ice,semis_wat,IMAX,fracl,fraco,fraci,icy, & & semisbase, sfcemis & ! --- outputs: & ) @@ -748,7 +749,8 @@ subroutine setemis & ! xlat (IMAX) - latitude in radiance, default to pi/2 -> -pi/2 ! ! range, otherwise see in-line comment ! ! slmsk (IMAX) - sea(0),land(1),ice(2) mask on fcst model grid ! -! snowf (IMAX) - snow depth water equivalent in mm ! +! snodl (IMAX) - snow depth water equivalent in mm over land ! +! snodi (IMAX) - snow depth water equivalent in mm over ice ! ! sncovr(IMAX) - ialbflg=1: snow cover over land in fraction ! ! sncovr_ice(IMAX) - snow cover over ice in fraction ! ! zorlf (IMAX) - surface roughness in cm ! @@ -757,6 +759,7 @@ subroutine setemis & ! hprif (IMAX) - topographic sdv in m ! ! semis_lnd (IMAX) - land emissivity ! ! semis_ice (IMAX) - ice emissivity ! +! semis_wat (IMAX) - water emissivity ! ! IMAX - array horizontal dimension ! ! ! ! outputs: ! @@ -787,12 +790,12 @@ subroutine setemis & real (kind=kind_phys), dimension(:), intent(in) :: lakefrac real (kind=kind_phys), dimension(:), intent(in) :: & - & xlon,xlat, slmsk, snowf,sncovr, sncovr_ice, & + & xlon,xlat, slmsk, snodl, snodi, sncovr, sncovr_ice, & & zorlf, tsknf, tairf, hprif real (kind=kind_phys), dimension(:), intent(in) :: & & fracl, fraco, fraci real (kind=kind_phys), dimension(:), intent(inout) :: & - & semis_lnd, semis_ice + & semis_lnd, semis_ice, semis_wat logical, dimension(:), intent(in) :: & & icy @@ -805,7 +808,7 @@ subroutine setemis & integer :: ivgtyp real (kind=kind_phys) :: dltg, hdlt, tmp1, tmp2, & - & asnow, argh, hrgh, fsno, fsnol, fsnoi, snowc + & asnow, argh, hrgh, fsno real (kind=kind_phys) :: sfcemis_land, sfcemis_ice ! --- reference emiss value for diff surface emiss index @@ -819,6 +822,8 @@ subroutine setemis & !===> ... begin here ! !> -# Set emissivity by surface type and conditions + + semis_wat = emsref(1) if ( iemslw == 1 ) then dltg = 360.0 / float(IMXEMS) @@ -830,20 +835,16 @@ subroutine setemis & lab_do_IMAX : do i = 1, IMAX - snowc = sncovr(i) * fracl(i) if (.not. cplice .or. lakefrac(i) > f_zero) then semis_ice(i) = emsref(7) - snowc = sncovr(i) + sncovr_ice(i)*fraci(i) endif if (fracl(i) < epsln) then ! no land if ( abs(fraco(i)-f_one) < epsln ) then ! open water point sfcemis(i) = emsref(1) elseif ( abs(fraci(i)-f_one) < epsln ) then ! complete sea/lake ice -! sfcemis(i) = emsref(7) sfcemis(i) = semis_ice(i) else !-- fractional sea ice -! sfcemis(i) = fraco(i)*emsref(1) + fraci(i)*emsref(7) sfcemis(i) = fraco(i)*emsref(1) + fraci(i)*semis_ice(i) endif @@ -889,65 +890,39 @@ subroutine setemis & semisbase(i) = sfcemis(i) semis_lnd(i) = emsref(idx) - endif ! end if_slmsk_block + endif !> - Check for snow covered area. +!> it is assume here that "sncovr" is the fraction of land covered by snow +!> and "sncovr_ice" is the fraction of ice coverd by snow - if (snowc > f_zero) then ! input land/ice area snow cover - -! it is assume here that "sncovr" is the fraction of land covered by snow -! and "sncovr_ice" is the fraction of ice coverd by snow - + if (fracl(i) > epsln) then if (sncovr(i) > f_zero) then semis_lnd(i) = semis_lnd(i) * (f_one - sncovr(i)) & & + emsref(8) * sncovr(i) + elseif (snodl(i) > f_zero) then + asnow = 0.02*snodl(i) + argh = min(0.50, max(.025, 0.01*zorlf(i))) + hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) ) + fsno = min(f_one, max(f_zero, asnow/(argh+asnow) * hrgh)) + semis_lnd(i) = semis_lnd(i)*(f_one-fsno) + emsref(8)*fsno endif - if (sncovr_ice(i) > f_zero .and. & - & (lakefrac(i) > f_zero .or. .not. cplice)) then + endif + if (fraci(i) > epsln .and. & + & (lakefrac(i) > f_zero .or. .not. cplice)) then + if (sncovr_ice(i) > f_zero) then semis_ice(i) = semis_ice(i) * (f_one - sncovr_ice(i)) & & + emsref(8) * sncovr_ice(i) - endif - sfcemis(i) = fracl(i)*semis_lnd(i) + fraco(i)*emsref(1) & - & + fraci(i)*semis_ice(i) - - else ! compute snow cover from snow depth - if (abs(fraco(i)-f_one) > epsln .and. & - & snowf(i) > f_zero) then - asnow = 0.02*snowf(i) + elseif (snodi(i) > f_zero) then + asnow = 0.02*snodi(i) argh = min(0.50, max(.025, 0.01*zorlf(i))) hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) ) - tmp1 = fracl(i) + fraci(i) - if (tmp1 > f_zero) then - fsno = min(tmp1, asnow / (argh + asnow) * hrgh) - tmp2 = fsno / tmp1 - fsnol = fracl(i) * tmp2 - fsnoi = fraci(i) * tmp2 - - if (fracl(i) > f_zero) then - if (fracl(i) <= fsnol) then - semis_lnd(i) = emsref(8) - else - tmp1 = (fracl(i)-fsnol) / fracl(i) - semis_lnd(i) = semis_lnd(i) * tmp1 & - & + emsref(8) * (f_one-tmp1) - endif - endif - if (fraci(i) > f_zero .and. & - & (lakefrac(i) > f_zero .or. .not. cplice)) then - if (fraci(i) <= fsnoi) then - semis_ice(i) = emsref(8) - else - tmp1 = (fraci(i)-fsnoi) / fraci(i) - semis_ice(i) = semis_ice(i) * tmp1 & - & + emsref(8) * (f_one-tmp1) - endif - endif - endif + fsno = min(f_one, max(f_zero, asnow/(argh+asnow) * hrgh)) + semis_ice(i) = semis_ice(i)*(f_one-fsno) + emsref(8)*fsno endif - sfcemis(i) = fracl(i)*semis_lnd(i) + fraco(i)*emsref(1) & - & + fraci(i)*semis_ice(i) - - endif ! end if_ialbflg + endif + sfcemis(i) = fracl(i)*semis_lnd(i) + fraco(i)*emsref(1) & + & + fraci(i)*semis_ice(i) enddo lab_do_IMAX @@ -964,13 +939,12 @@ subroutine setemis & if (sncovr_ice(i) > f_zero) then sfcemis_ice = emsref(7) * (f_one-sncovr_ice(i)) & & + emsref(8) * sncovr_ice(i) - elseif (snowf(i) > f_zero) then - asnow = 0.02*snowf(i) + elseif (snodi(i) > f_zero) then + asnow = 0.02*snodi(i) argh = min(0.50, max(.025,0.01*zorlf(i))) hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i))) fsno = asnow / (argh + asnow) * hrgh - fsnoi = min(f_one, fsno / (fraci(i)+fracl(i))) - sfcemis_ice = emsref(7)*(f_one-fsnoi)+emsref(8)*fsnoi + sfcemis_ice = emsref(7)*(f_one-fsno) + emsref(8)*fsno endif semis_ice(i) = sfcemis_ice else @@ -981,13 +955,12 @@ subroutine setemis & if (sncovr_ice(i) > f_zero) then sfcemis_ice = emsref(7) * (f_one-sncovr_ice(i)) & & + emsref(8) * sncovr_ice(i) - elseif (snowf(i) > f_zero) then - asnow = 0.02*snowf(i) + elseif (snodi(i) > f_zero) then + asnow = 0.02*snodi(i) argh = min(0.50, max(.025,0.01*zorlf(i))) hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i))) fsno = asnow / (argh + asnow) * hrgh - fsnoi = min(f_one, fsno / (fraci(i)+fracl(i))) - sfcemis_ice = emsref(7)*(f_one-fsnoi)+emsref(8)*fsnoi + sfcemis_ice = emsref(7)*(f_one-fsno) + emsref(8)*fsno endif semis_ice(i) = sfcemis_ice else From 3d9b79ce9a55c27dc3d88733828e142eb6d3c526 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 20 Oct 2021 08:01:08 -0400 Subject: [PATCH 03/45] updating .gitmodules --- .gitmodules | 6 +++--- physics/rte-rrtmgp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 5bcc65869..ec9a09abb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "physics/rte-rrtmgp"] - path = physics/rte-rrtmgp - url = https://github.com/earth-system-radiation/rte-rrtmgp - branch = dtc/ccpp + path = physics/rte-rrtmgp + url = https://github.com/earth-system-radiation/rte-rrtmgp + branch = dtc/ccpp diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index d9594c46c..9588c7bd8 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit d9594c46c877a2ab8001f5cd37961efdcf08ad8e +Subproject commit 9588c7bd89e4f51a924f766e313bc42830fb4479 From c4c8bad1e157672afeea5b5cb12b07ac2b06c4c5 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 20 Oct 2021 19:25:20 +0000 Subject: [PATCH 04/45] changes consistent with branch SM_Sept21_PR --- physics/radiation_surface.f | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/physics/radiation_surface.f b/physics/radiation_surface.f index 05e62ae88..066bcfbef 100644 --- a/physics/radiation_surface.f +++ b/physics/radiation_surface.f @@ -20,18 +20,22 @@ ! ! ! 'setalb' -- set up four-component surface albedoes ! ! inputs: ! -! (slmsk,snowf,sncovr,snoalb,zorlf,coszf,tsknf,tairf,hprif, ! +! (slmsk,snodi,sncovr,snoalb,zorlf,coszf,tsknf,tairf,hprif, ! ! alvsf,alnsf,alvwf,alnwf,facsf,facwf,fice,tisfc ! ! IMAX) ! ! outputs: ! ! (sfcalb) ! ! ! ! 'setemis' -- set up surface emissivity for lw radiation ! -! inputs: ! -! (xlon,xlat,slmsk,snowf,sncovr,zorlf,tsknf,tairf,hprif, ! -! IMAX) ! -! outputs: ! -! (sfcemis) ! +! ( lsm,lsm_noahmp,lsm_ruc,frac_grid,cplice,use_flake, ! +! --- inputs: +! lakefrac,xlon,xlat,slmsk,snodl,snodi,sncovr,sncovr_ice, ! +! zorlf,tsknf,tairf,hprif, ! +! semis_lnd,semis_ice,semis_wat,IMAX,fracl,fraco,fraci,icy, ! +! +! --- outputs: +! semisbase, sfcemis ! +! ! ! ! external modules referenced: ! ! ! @@ -298,7 +302,7 @@ end subroutine sfc_init !! \n 1) climatological surface albedo scheme (\cite briegleb_1992) !! \n 2) MODIS retrieval based scheme from Boston univ. !!\param slmsk (IMAX), sea(0),land(1),ice(2) mask on fcst model grid -!!\param snowf (IMAX), snow depth water equivalent in mm over land +!!\param snodi (IMAX), snow depth water equivalent in mm over ice !!\param sncovr (IMAX), snow cover over land !!\param snoalb (IMAX), maximum snow albedo over land (for deep snow) !!\param zorlf (IMAX), surface roughness in cm @@ -332,7 +336,7 @@ end subroutine sfc_init !! @{ !----------------------------------- subroutine setalb & - & ( slmsk,lsm,lsm_noahmp,lsm_ruc,use_cice_alb,snowf, & ! --- inputs: + & ( slmsk,lsm,lsm_noahmp,lsm_ruc,use_cice_alb,snodi, & ! --- inputs: & sncovr,sncovr_ice,snoalb,zorlf,coszf, & & tsknf,tairf,hprif,frac_grid, lakefrac, & & alvsf,alnsf,alvwf,alnwf,facsf,facwf,fice,tisfc, & @@ -358,7 +362,7 @@ subroutine setalb & ! ! ! inputs: ! ! slmsk (IMAX) - sea(0),land(1),ice(2) mask on fcst model grid ! -! snowf (IMAX) - snow depth water equivalent in mm ! +! snodi (IMAX) - snow depth water equivalent in mm over ice ! ! sncovr(IMAX) - ialgflg=0: not used ! ! ialgflg=1: snow cover over land in fraction ! ! sncovr_ice(IMAX) - ialgflg=0: not used ! @@ -410,7 +414,7 @@ subroutine setalb & real (kind=kind_phys), dimension(:), intent(in) :: & & lakefrac, & - & slmsk, snowf, zorlf, coszf, tsknf, tairf, hprif, & + & slmsk, snodi, zorlf, coszf, tsknf, tairf, hprif, & & alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, & & icealbdvis, icealbdnir, icealbivis, icealbinir, & & sncovr, sncovr_ice, snoalb, albPpert ! sfc-perts, mgehne @@ -478,7 +482,7 @@ subroutine setalb & asevb_ice = icealbdvis(i) asenb_ice = icealbdnir(i) else - asnow = 0.02*snowf(i) + asnow = 0.02*snodi(i) argh = min(0.50, max(.025, 0.01*zorlf(i))) hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i))) fsno0 = asnow / (argh + asnow) * hrgh ! snow fraction on ice @@ -614,7 +618,7 @@ subroutine setalb & asenb_ice = icealbdnir(i) else !-- Computation of ice albedo - asnow = 0.02*snowf(i) + asnow = 0.02*snodi(i) argh = min(0.50, max(.025, 0.01*zorlf(i))) hrgh = min(f_one,max(0.20,1.0577-1.1538e-3*hprif(i))) fsno0 = asnow / (argh + asnow) * hrgh @@ -750,7 +754,7 @@ subroutine setemis & ! range, otherwise see in-line comment ! ! slmsk (IMAX) - sea(0),land(1),ice(2) mask on fcst model grid ! ! snodl (IMAX) - snow depth water equivalent in mm over land ! -! snodi (IMAX) - snow depth water equivalent in mm over ice ! +! snodi (IMAX) - snow depth water equivalent in mm over ice ! ! sncovr(IMAX) - ialbflg=1: snow cover over land in fraction ! ! sncovr_ice(IMAX) - snow cover over ice in fraction ! ! zorlf (IMAX) - surface roughness in cm ! From 3233ebac0bd1ee938da11c6a4410c2117e2bbf9d Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 4 Nov 2021 16:23:05 +0000 Subject: [PATCH 05/45] after submodule sync --- physics/rte-rrtmgp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/rte-rrtmgp b/physics/rte-rrtmgp index 9588c7bd8..9c51cb7c3 160000 --- a/physics/rte-rrtmgp +++ b/physics/rte-rrtmgp @@ -1 +1 @@ -Subproject commit 9588c7bd89e4f51a924f766e313bc42830fb4479 +Subproject commit 9c51cb7c3e227c9e84c2bff29ce4f438c7a54ae6 From 1337aeb68955a3e1346a80f3f2cb230f7eabd89a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 23 Nov 2021 10:02:33 -0700 Subject: [PATCH 06/45] Fix dimensions of vertical eta level variables in several metadata files --- physics/GFS_rrtmg_setup.meta | 2 +- physics/GFS_rrtmgp_setup.meta | 2 +- physics/GFS_stochastics.meta | 2 +- physics/cires_ugwp.meta | 4 ++-- physics/ugwpv1_gsldrag.meta | 4 ++-- physics/unified_ugwp.meta | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index ecd849c48..d80faf8a5 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -12,7 +12,7 @@ standard_name = sigma_pressure_hybrid_vertical_coordinate long_name = vertical sigma coordinate for radiation initialization units = none - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index 4043392a9..ab9b0a49c 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -76,7 +76,7 @@ standard_name = sigma_pressure_hybrid_vertical_coordinate long_name = vertical sigma coordinate for radiation initialization units = none - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index 0b2c1da2f..c78dbe015 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -31,7 +31,7 @@ standard_name = sigma_pressure_hybrid_vertical_coordinate long_name = vertical sigma coordinate for radiation initialization units = none - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index fe0e82390..993516e4f 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -78,7 +78,7 @@ standard_name = sigma_pressure_hybrid_coordinate_a_coefficient long_name = a parameter for sigma pressure level calculations units = Pa - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -86,7 +86,7 @@ standard_name = sigma_pressure_hybrid_coordinate_b_coefficient long_name = b parameter for sigma pressure level calculations units = none - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in diff --git a/physics/ugwpv1_gsldrag.meta b/physics/ugwpv1_gsldrag.meta index 64d6b0d64..3ffcf909c 100644 --- a/physics/ugwpv1_gsldrag.meta +++ b/physics/ugwpv1_gsldrag.meta @@ -84,7 +84,7 @@ standard_name = sigma_pressure_hybrid_coordinate_a_coefficient long_name = a parameter for sigma pressure level calculations units = Pa - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -92,7 +92,7 @@ standard_name = sigma_pressure_hybrid_coordinate_b_coefficient long_name = b parameter for sigma pressure level calculations units = none - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index 547256681..246ca236e 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -86,7 +86,7 @@ standard_name = sigma_pressure_hybrid_coordinate_a_coefficient long_name = a parameter for sigma pressure level calculations units = Pa - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in @@ -94,7 +94,7 @@ standard_name = sigma_pressure_hybrid_coordinate_b_coefficient long_name = b parameter for sigma pressure level calculations units = none - dimensions = (vertical_interface_dimension_for_radiation) + dimensions = (vertical_interface_dimension) type = real kind = kind_phys intent = in From 98aba4a6b62e3600de76a9c74c4a09e0ce783ebe Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 23 Nov 2021 10:03:07 -0700 Subject: [PATCH 07/45] Suggested improvements for Thompson effective radii calculation and consistency checking --- physics/GFS_rrtmg_pre.F90 | 44 ++++++++++---------------- physics/module_mp_thompson.F90 | 10 ------ physics/mp_thompson.F90 | 58 ++++++++++++++++++++-------------- 3 files changed, 50 insertions(+), 62 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index ca3bf0e70..92f9d7122 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -193,9 +193,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & effrl, effri, effrr, effrs, rho, orho, plyrpa ! for Thompson MP - real(kind=kind_phys), dimension(im,lm+LTP) :: & - re_cloud, re_ice, re_snow, qv_mp, qc_mp, & - qi_mp, qs_mp, nc_mp, ni_mp, nwfa + real(kind=kind_phys), dimension(im,lm+LTP) :: & + qv_mp, qc_mp, qi_mp, qs_mp, & + nc_mp, ni_mp, nwfa real (kind=kind_phys), dimension(lm) :: cldfra1d, qv1d, & & qc1d, qi1d, qs1d, dz1d, p1d, t1d @@ -796,37 +796,25 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ! it will raise the low limit from 5 to 10, but the high limit will remain 125. call calc_effectRad (tlyr(i,:), plyr(i,:)*100., qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & - re_cloud(i,:), re_ice(i,:), re_snow(i,:), 1, lm ) + effrl(i,:), effri(i,:), effrs(i,:), 1, lm ) do k=1,lm - re_cloud(i,k) = MAX(re_qc_min, MIN(re_cloud(i,k), re_qc_max)) - re_ice(i,k) = MAX(re_qi_min, MIN(re_ice(i,k), re_qi_max)) - re_snow(i,k) = MAX(re_qs_min, MIN(re_snow(i,k), re_qs_max)) - end do - end do - ! Scale Thompson's effective radii from meter to micron - do k=1,lm - do i=1,im - re_cloud(i,k) = re_cloud(i,k)*1.e6 - re_ice(i,k) = re_ice(i,k)*1.e6 - re_snow(i,k) = re_snow(i,k)*1.e6 + effrl(i,k) = MAX(re_qc_min, MIN(effrl(i,k), re_qc_max)) + effri(i,k) = MAX(re_qi_min, MIN(effri(i,k), re_qi_max)) + effrr(i,k) = 1000. ! rrain_def=1000. + effrs(i,k) = MAX(re_qs_min, MIN(effrs(i,k), re_qs_max)) end do + effrl(i,lmk) = re_qc_min + effri(i,lmk) = re_qi_min + effrr(i,lmk) = 1000. ! rrain_def=1000. + effrs(i,lmk) = re_qs_min end do + ! Update global arrays, scale Thompson's effective radii from meter to micron do k=1,lm k1 = k + kd do i=1,im - effrl(i,k1) = re_cloud (i,k) - effri(i,k1) = re_ice (i,k) - effrr(i,k1) = 1000. ! rrain_def=1000. - effrs(i,k1) = re_snow(i,k) - enddo - enddo - ! Update global arrays - do k=1,lm - k1 = k + kd - do i=1,im - effrl_inout(i,k) = effrl(i,k1) - effri_inout(i,k) = effri(i,k1) - effrs_inout(i,k) = effrs(i,k1) + effrl_inout(i,k) = effrl(i,k1)*1.e6 + effri_inout(i,k) = effri(i,k1)*1.e6 + effrs_inout(i,k) = effrs(i,k1)*1.e6 enddo enddo else ! all other cases diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 353f83c78..3c7e6ec2b 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -1252,16 +1252,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, & ndt = max(nint(dt_in/dt_inner),1) dt = dt_in/ndt if(dt_in .le. dt_inner) dt= dt_in - if(nsteps>1 .and. ndt>1) then - if (present(errmsg) .and. present(errflg)) then - write(errmsg, '(a)') 'Logic error in mp_gt_driver: inner loop cannot be used with subcycling' - errflg = 1 - return - else - write(*,'(a)') 'Warning: inner loop cannot be used with subcycling, resetting ndt=1' - ndt = 1 - endif - endif do it = 1, ndt diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index d5a1fcaad..d5111cf63 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -379,6 +379,7 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & ! Reduced time step if subcycling is used real(kind_phys) :: dtstep + integer :: ndt ! Air density real(kind_phys) :: rho(1:ncol,1:nlev) !< kg m-3 ! Water vapor mixing ratio (instead of specific humidity) @@ -458,11 +459,39 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & errmsg = '' errflg = 0 - ! Check initialization state - if (.not.is_initialized) then - write(errmsg, fmt='((a))') 'mp_thompson_run called before mp_thompson_init' - errflg = 1 - return + if (first_time_step .and. istep==1 .and. blkno==1) then + ! Check initialization state + if (.not.is_initialized) then + write(errmsg, fmt='((a))') 'mp_thompson_run called before mp_thompson_init' + errflg = 1 + return + end if + ! Check forr optional arguments of aerosol-aware microphysics + if (is_aerosol_aware .and. .not. (present(nc) .and. & + present(nwfa) .and. & + present(nifa) .and. & + present(nwfa2d) .and. & + present(nifa2d) )) then + write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_run:', & + ' aerosol-aware microphysics require all of the', & + ' following optional arguments:', & + ' nc, nwfa, nifa, nwfa2d, nifa2d' + errflg = 1 + return + end if + ! Consistency cheecks - subcycling and inner loop at the same time are not supported + if (nsteps>1 .and. dt_inner < dtp) then + write(errmsg,'(*(a))') "Logic error: Subcycling and inner loop cannot be used at the same time" + errflg = 1 + return + else if (mpirank==mpiroot .and. nsteps>1) then + write(*,'(a,i0,a,a,f6.2,a)') 'Thompson MP is using ', nsteps, ' substep(s) per time step with an ', & + 'effective time step of ', dtp/real(nsteps, kind=kind_phys), ' seconds' + else if (mpirank==mpiroot .and. dt_inner < dtp) then + ndt = max(nint(dtp/dt_inner),1) + write(*,'(a,i0,a,a,f6.2,a)') 'Thompson MP is using ', ndt, ' inner loops per time step with an ', & + 'effective time step of ', dtp/real(ndt, kind=kind_phys), ' seconds' + end if end if ! Set reduced time step if subcycling is used @@ -471,25 +500,6 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & else dtstep = dtp end if - if (first_time_step .and. istep==1 .and. mpirank==mpiroot .and. blkno==1) then - write(*,'(a,i0,a,a,f6.2,a)') 'Thompson MP is using ', nsteps, ' substep(s) per time step', & - ' with an effective time step of ', dtstep, ' seconds' - end if - - if (first_time_step .and. istep==1) then - if (is_aerosol_aware .and. .not. (present(nc) .and. & - present(nwfa) .and. & - present(nifa) .and. & - present(nwfa2d) .and. & - present(nifa2d) )) then - write(errmsg,fmt='(*(a))') 'Logic error in mp_thompson_run:', & - ' aerosol-aware microphysics require all of the', & - ' following optional arguments:', & - ' nc, nwfa, nifa, nwfa2d, nifa2d' - errflg = 1 - return - end if - end if !> - Convert specific humidity to water vapor mixing ratio. !> - Also, hydrometeor variables are mass or number mixing ratio From 49bf5c4dd7fa0b4ef85f94611f02a417d1c3f8a9 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Wed, 24 Nov 2021 00:44:34 +0000 Subject: [PATCH 08/45] some cosmetic change in mg3 --- physics/micro_mg3_0.F90 | 222 ++++++++++++++++++++-------------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/physics/micro_mg3_0.F90 b/physics/micro_mg3_0.F90 index dde143c4d..bca005bc9 100644 --- a/physics/micro_mg3_0.F90 +++ b/physics/micro_mg3_0.F90 @@ -16,20 +16,20 @@ !! This version:https://svn-ccsm-models.cgd.ucar.edu/cam1/branch_tags/mg3_tags/mg3_33_cam5_4_153/ !! !! \version 2 history: Sep 2011: Development begun. -!!\n Feb 2013: Added of prognostic precipitation. -!!\n Aug 2015: Published and released version +!!\n Feb 2013: Added of prognostic precipitation. +!!\n Aug 2015: Published and released version !! !! Contributions from: Sean Santos, Peter Caldwell, Xiaohong Liu and Steve Ghan !! !! - Anning Cheng adopted mg2 for FV3GFS 9/29/2017 -!!\n add GMAO ice conversion and Liu et. al liquid water +!!\n add GMAO ice conversion and Liu et. al liquid water !!\n conversion in 10/12/2017 !! !! - Anning showed promising results for FV3GFS on 10/15/2017 !! - S. Moorthi - Oct/Nov 2017 - optimized the MG2 code !! - S. Moorthi - Nov 2017 - made the sedimentation quasi-implicit !! - S. Moorthi - Feb 2018 - updated to MG3 - modified graupel sedimentation -!! other modifications to eliminate blowup. +!! other modifications to eliminate blowup. !! - S. Moorthi - Mar 2018 - fixed a few bugs and added option to run as MG2 !! - S. Moorthi - Oct,29,2018 - change nlb from nlev/3 to levels with p/ps < 0.05 (nlball) !! @@ -1162,7 +1162,7 @@ subroutine micro_mg_tend ( & qsfm(i,k) = qsatfac(i,k) enddo enddo - end if + endif ! if (lprnt) write(0,*)' cldm=',cldm(1,nlev-20:nlev) ! if (lprnt) write(0,*)' liqcldf=',liqcldf(1,nlev-20:nlev) @@ -1234,8 +1234,8 @@ subroutine micro_mg_tend ( & ! esl(i,k) = qsfm(i,k) * esl(i,k) relhum(i,k) = max(zero, min(q(i,k)/max(qvl(i,k), qsmall), two)) - end do - end do + enddo + enddo !=============================================== @@ -1590,7 +1590,7 @@ subroutine micro_mg_tend ( & mnuccd = zero end where - end if + endif !============================================================================= @@ -1628,11 +1628,11 @@ subroutine micro_mg_tend ( & ns(i,k) = max(ns(i,k) - ninstsm(i,k), zero) qr(i,k) = max(qr(i,k) + minstsm(i,k), zero) nr(i,k) = max(nr(i,k) + ninstsm(i,k), zero) - end if - end if + endif + endif - end do - end do + enddo + enddo ! if (lprnt) write(0,*)' tlat1=',tlat(1,:)*deltat ! if (lprnt) write(0,*)' qg1=',qg(1,:) @@ -1670,11 +1670,11 @@ subroutine micro_mg_tend ( & ng(i,k) = max(ng(i,k) - ninstgm(i,k), zero) qr(i,k) = max(qr(i,k) + minstgm(i,k), zero) nr(i,k) = max(nr(i,k) + ninstgm(i,k), zero) - end if - end if + endif + endif - end do - end do + enddo + enddo endif ! if (lprnt) write(0,*)' tlat1g=',tlat(1,:)*deltat @@ -1719,10 +1719,10 @@ subroutine micro_mg_tend ( & end if !--ag - end if - end if - end do - end do + endif + endif + enddo + enddo ! if (lprnt) then ! write(0,*)' tlat2=',tlat(1,:)*deltat @@ -1750,11 +1750,11 @@ subroutine micro_mg_tend ( & ! specify droplet concentration if (nccons) then ncic(i,k) = ncnst * rhoinv(i,k) - end if + endif else qcic(i,k) = zero ncic(i,k) = zero - end if + endif ! if (qi(i,k) >= qsmall .and. icldm(i,k) > mincld) then if (qi(i,k) >= qsmall) then @@ -1766,14 +1766,14 @@ subroutine micro_mg_tend ( & ! switch for specification of cloud ice number if (nicons) then niic(i,k) = ninst * rhoinv(i,k) - end if + endif else qiic(i,k) = zero niic(i,k) = zero - end if + endif - end do - end do + enddo + enddo !======================================================================== @@ -1802,12 +1802,12 @@ subroutine micro_mg_tend ( & ! then leave precip_frac as cloud fraction at current level if (k /= 1) then !++ag -! where (qr(:,k-1) >= qsmall .or. qs(:,k-1) >= qsmall .or. qg(:,k-1) >= qsmall) +! where (qr(:,k-1) >= qsmall .or. qs(:,k-1) >= qsmall .or. qg(:,k-1) >= qsmall) !--ag where (qr(:,k-1) >= qsmall .or. qs(:,k-1) >= qsmall) precip_frac(:,k) = max(precip_frac(:,k-1), precip_frac(:,k)) end where - end if + endif endif @@ -1916,13 +1916,13 @@ subroutine micro_mg_tend ( & else call ice_autoconversion(t(:,k), qiic(:,k), lami(:,k), n0i(:,k), & dcs, ts_au_loc(:), prci(:,k), nprci(:,k), mgncol) - end if + endif !else ! Add in the particles that we have already converted to snow, and ! don't do any further autoconversion of ice. !prci(:,k) = tnd_qsnow(:,k) / cldm(:,k) !nprci(:,k) = tnd_nsnow(:,k) / cldm(:,k) - end if + endif ! note, currently we don't have this ! inside the do_cldice block, should be changed later @@ -2125,7 +2125,7 @@ subroutine micro_mg_tend ( & !mnudep(:,k) = zero !end where - end if + endif else do i=1,mgncol @@ -2136,7 +2136,7 @@ subroutine micro_mg_tend ( & mnudep(i,k) = zero nnudep(i,k) = zero enddo - end if + endif call snow_self_aggregation(t(:,k), rho(:,k), asn(:,k), rhosn, qsic(:,k), nsic(:,k), & nsagg(:,k), mgncol) @@ -2150,7 +2150,7 @@ subroutine micro_mg_tend ( & else nsacwi(:,k) = zero msacwi(:,k) = zero - end if + endif call accrete_rain_snow(t(:,k), rho(:,k), umr(:,k), ums(:,k), unr(:,k), uns(:,k), & qric(:,k), qsic(:,k), lamr(:,k), n0r(:,k), lams(:,k), n0s(:,k), & @@ -2175,7 +2175,7 @@ subroutine micro_mg_tend ( & else prai(:,k) = zero nprai(:,k) = zero - end if + endif !++ag Moved below graupel conditional, now two different versions ! if (.not. (do_hail .or. do_graupel)) then @@ -2223,9 +2223,9 @@ subroutine micro_mg_tend ( & ! all ql is removed (which is handled elsewhere) !in fact, nothing in this entire file makes nsubc nonzero. nsubc(i,k) = zero - end do + enddo - end if !do_cldice + endif !do_cldice !---PMC 12/3/12 !++ag Process rate calls for graupel here. @@ -2337,7 +2337,7 @@ subroutine micro_mg_tend ( & pre(:,k), prds(:,k), am_evp_st(:,k), mgncol) - end if ! end do_graupel/hail loop + endif ! end do_graupel/hail loop !--ag do i=1,mgncol @@ -2382,7 +2382,7 @@ subroutine micro_mg_tend ( & qcrat(i,k) = ratio else qcrat(i,k) = one - end if + endif ! if(lprnt) write(0,*)' bergs2=',bergs(1,k),' k=',k,' ratio=',ratio @@ -2391,9 +2391,9 @@ subroutine micro_mg_tend ( & !deposition for the remaining frac of the timestep. if (qc(i,k) >= qsmall) then vap_dep(i,k) = vap_dep(i,k) * (one-qcrat(i,k)) - end if + endif - end do + enddo do i=1,mgncol @@ -2419,10 +2419,10 @@ subroutine micro_mg_tend ( & dum1 = mnuccd(i,k) / (vap_dep(i,k)+mnuccd(i,k)) mnuccd(i,k) = dum*dum1 vap_dep(i,k) = dum - mnuccd(i,k) - end if - end if + endif + endif - end do + enddo do i=1,mgncol @@ -2492,9 +2492,9 @@ subroutine micro_mg_tend ( & pracs(i,k) = ratio * pracs(i,k) mnuccr(i,k) = ratio * mnuccr(i,k) mnuccri(i,k) = ratio * mnuccri(i,k) - end if + endif - end do + enddo do i=1,mgncol @@ -2507,9 +2507,9 @@ subroutine micro_mg_tend ( & nsubr(i,k) = dum*nr(i,k) * oneodt else nsubr(i,k) = zero - end if + endif - end do + enddo do i=1,mgncol @@ -2535,9 +2535,9 @@ subroutine micro_mg_tend ( & nnuccr(i,k) = ratio * nnuccr(i,k) nsubr(i,k) = ratio * nsubr(i,k) nnuccri(i,k) = ratio * nnuccri(i,k) - end if + endif - end do + enddo if (do_cldice) then @@ -2569,11 +2569,11 @@ subroutine micro_mg_tend ( & prci(i,k) = ratio * prci(i,k) prai(i,k) = ratio * prai(i,k) ice_sublim(i,k) = ratio * ice_sublim(i,k) - end if + endif - end do + enddo - end if + endif if (do_cldice) then @@ -2585,7 +2585,7 @@ subroutine micro_mg_tend ( & tmpfrz = nnuccc(i,k) else tmpfrz = zero - end if + endif !++ag dum1 = (nprci(i,k)+nprai(i,k)-nsubi(i,k))*icldm(i,k) ! dum2 = nnuccd(i,k)+(nnucct(i,k)+tmpfrz+nnudep(i,k)+nsacwi(i,k))*lcldm(i,k) & @@ -2601,11 +2601,11 @@ subroutine micro_mg_tend ( & nprci(i,k) = ratio * nprci(i,k) nprai(i,k) = ratio * nprai(i,k) nsubi(i,k) = ratio * nsubi(i,k) - end if + endif - end do + enddo - end if + endif do i=1,mgncol @@ -2648,9 +2648,9 @@ subroutine micro_mg_tend ( & ! ratio = (qs(i,k)*oneodt + dum2) / dum1 * omsm ! prds(i,k) = ratio * prds(i,k) -! end if +! endif - end do + enddo do i=1,mgncol @@ -2678,7 +2678,7 @@ subroutine micro_mg_tend ( & ratio = (ns(i,k)*oneodt + dum2) / dum1 * omsm nscng(i,k) = ratio * nscng(i,k) ngracs(i,k) = ratio * ngracs(i,k) - end if + endif else dum1 = precip_frac(i,k)* (-nsubs(i,k)-nsagg(i,k)) @@ -2692,7 +2692,7 @@ subroutine micro_mg_tend ( & nsubs(i,k) = ratio * nsubs(i,k) nsagg(i,k) = ratio * nsagg(i,k) - end do + enddo !++ag Graupel Conservation Checks !------------------------------------------------------------------- @@ -2714,13 +2714,13 @@ subroutine micro_mg_tend ( & prdg(i,k) = ratio * prdg(i,k) - end if + endif - end do + enddo ! conservation of graupel number: not needed, no sinks !------------------------------------------------------------------- - end if + endif !--ag @@ -2801,10 +2801,10 @@ subroutine micro_mg_tend ( & dum1 = one - dum1 - dum2 - dum3 !--ag ice_sublim(i,k) = dum*dum1*oneodt - end if - end if + endif + endif - end do + enddo ! Big "administration" loop enforces conservation, updates variables ! that accumulate over substeps, and sets output variables. @@ -2902,7 +2902,7 @@ subroutine micro_mg_tend ( & qstend(i,k) = qstend(i,k) + (prai(i,k)+prci(i,k))*icldm(i,k)+(psacws(i,k)+bergs(i,k))*lcldm(i,k) & + (prds(i,k)+pracs(i,k)+mnuccr(i,k))*precip_frac(i,k) - end if + endif !--ag @@ -2938,7 +2938,7 @@ subroutine micro_mg_tend ( & else prodsnow(i,k) = (prai(i,k)+prci(i,k))*icldm(i,k)+(psacws(i,k)+bergs(i,k))*lcldm(i,k)+ & (pracs(i,k)+mnuccr(i,k))*precip_frac(i,k) - end if + endif ! following are used to calculate 1st order conversion rate of cloud water ! to rain and snow (1/s), for later use in aerosol wet removal routine @@ -3013,7 +3013,7 @@ subroutine micro_mg_tend ( & + (nnucct(i,k)+tmpfrz+nnudep(i,k)+nsacwi(i,k)+nmultg(i,k))*lcldm(i,k) & + (nsubi(i,k)-nprci(i,k)-nprai(i,k))*icldm(i,k) & + (nnuccri(i,k)+nmultrg(i,k))*precip_frac(i,k) - end if + endif if(do_graupel.or.do_hail) then ! nstend(i,k) = nstend(i,k) + (nsubs(i,k)+nsagg(i,k)+nnuccr(i,k))*precip_frac(i,k) & @@ -3030,7 +3030,7 @@ subroutine micro_mg_tend ( & nstend(i,k) = nstend(i,k) + (nsubs(i,k)+nsagg(i,k)+nnuccr(i,k))*precip_frac(i,k) & + nprci(i,k)*icldm(i,k) - end if + endif ! nrtend(i,k) = nrtend(i,k) + nprc(i,k)*lcldm(i,k)+(nsubr(i,k)-npracs(i,k)-nnuccr(i,k) & ! - nnuccri(i,k)+nragg(i,k))*precip_frac(i,k) @@ -3047,9 +3047,9 @@ subroutine micro_mg_tend ( & if (do_cldice .and. nitend(i,k) > zero .and. ni(i,k)+nitend(i,k)*deltat > nimax(i,k)) then nitend(i,k) = max(zero, (nimax(i,k)-ni(i,k))*oneodt) - end if + endif - end do + enddo ! End of "administration" loop @@ -3298,7 +3298,7 @@ subroutine micro_mg_tend ( & else fi(i,k) = zero fni(i,k)= zero - end if + endif ! fallspeed for rain @@ -3318,7 +3318,7 @@ subroutine micro_mg_tend ( & else fr(i,k) = zero fnr(i,k) = zero - end if + endif ! fallspeed for snow @@ -3337,7 +3337,7 @@ subroutine micro_mg_tend ( & else fs(i,k) = zero fns(i,k) = zero - end if + endif if (do_graupel .or. do_hail) then !++ag @@ -3359,7 +3359,7 @@ subroutine micro_mg_tend ( & else fg(i,k) = zero fng(i,k) = zero - end if + endif endif ! redefine dummy variables - sedimentation is calculated over grid-scale @@ -3386,7 +3386,7 @@ subroutine micro_mg_tend ( & if (dumg(i,k) < qsmall) dumng(i,k) = zero enddo - end do !!! vertical loop + enddo !!! vertical loop do k=1,nlev do i=1,mgncol @@ -3488,8 +3488,8 @@ subroutine micro_mg_tend ( & prect(i) = prect(i) + falouti(nlev) * (tx3*0.001_r8) preci(i) = preci(i) + falouti(nlev) * (tx3*0.001_r8) - end do - end if + enddo + endif ! if (lprnt) write(0,*)' tlat4=',tlat(1,:)*deltat ! calculate number of split time steps to ensure courant stability criteria @@ -3559,7 +3559,7 @@ subroutine micro_mg_tend ( & tlat(i,k) = tlat(i,k) - dum2 * xxlv lflx(i,k+1) = lflx(i,k+1) + faloutc(k) * tx3 ! Liquid condensate flux here - end do + enddo prect(i) = prect(i) + faloutc(nlev) * (tx3*0.001_r8) @@ -3629,11 +3629,11 @@ subroutine micro_mg_tend ( & faloutnr(k) = fnr(i,k) * dumnr(i,k) rflx(i,k+1) = rflx(i,k+1) + faloutr(k) * tx3 ! Rain Flux - end do + enddo prect(i) = prect(i) + faloutr(nlev) * (tx3*0.001_r8) - end do + enddo ! if (lprnt) write(0,*)' prectaftrain=',prect(i),' preci=',preci(i) @@ -3698,7 +3698,7 @@ subroutine micro_mg_tend ( & prect(i) = prect(i) + falouts(nlev) * (tx3*0.001_r8) preci(i) = preci(i) + falouts(nlev) * (tx3*0.001_r8) - end do !! nstep loop + enddo !! nstep loop ! if (lprnt) write(0,*)' prectaftssno=',prect(i),' preci=',preci(i) ! if (lprnt) write(0,*)' qgtnd1=',qgtend(1,:) @@ -3761,7 +3761,7 @@ subroutine micro_mg_tend ( & faloutng(k) = fng(i,k) * dumng(i,k) gflx(i,k+1) = gflx(i,k+1) + faloutg(k) * tx3 ! Ice flux - end do + enddo ! units below are m/s ! sedimentation flux at surface is added to precip flux at surface @@ -3770,7 +3770,7 @@ subroutine micro_mg_tend ( & prect(i) = prect(i) + faloutg(nlev) * (tx3*0.001_r8) preci(i) = preci(i) + faloutg(nlev) * (tx3*0.001_r8) - end do !! nstep loop + enddo !! nstep loop endif ! if (lprnt) write(0,*)' qgtnds=',qgtend(1,:) !--ag @@ -3813,18 +3813,18 @@ subroutine micro_mg_tend ( & ! switch for specification of droplet and crystal number if (nccons) then dumnc(i,k) = ncnst*rhoinv(i,k)*lcldm(i,k) - end if + endif ! switch for specification of cloud ice number if (nicons) then dumni(i,k) = ninst*rhoinv(i,k)*icldm(i,k) - end if + endif !++ag ! switch for specification of graupel number if (ngcons) then dumng(i,k) = ngnst*rhoinv(i,k)*precip_frac(i,k) - end if + endif !--ag if (dumc(i,k) < qsmall) dumnc(i,k) = zero @@ -3868,8 +3868,8 @@ subroutine micro_mg_tend ( & dum1 = - xlf * tx2 * dums(i,k) tlat(i,k) = dum1 + tlat(i,k) meltsdttot(i,k) = dum1 + meltsdttot(i,k) - end if - end if + endif + endif enddo enddo @@ -3904,8 +3904,8 @@ subroutine micro_mg_tend ( & dum1 = - xlf*tx2*dumg(i,k) tlat(i,k) = dum1 + tlat(i,k) meltsdttot(i,k) = dum1 + meltsdttot(i,k) - end if - end if + endif + endif enddo enddo @@ -3957,8 +3957,8 @@ subroutine micro_mg_tend ( & frzrdttot(i,k) = dum1 + frzrdttot(i,k) tlat(i,k) = dum1 + tlat(i,k) - end if - end if + endif + endif enddo enddo @@ -3992,8 +3992,8 @@ subroutine micro_mg_tend ( & qitend(i,k) = ((one-dum)*dumi(i,k)-qi(i,k)) * oneodt nitend(i,k) = ((one-dum)*dumni(i,k)-ni(i,k)) * oneodt tlat(i,k) = tlat(i,k) - xlf*tx2*dumi(i,k) - end if - end if + endif + endif enddo enddo @@ -4029,8 +4029,8 @@ subroutine micro_mg_tend ( & qctend(i,k) = ((one-dum)*dumc(i,k)-qc(i,k)) * oneodt nctend(i,k) = ((one-dum)*dumnc(i,k)-nc(i,k)) * oneodt tlat(i,k) = tlat(i,k) + xlf*tx2 - end if - end if + endif + endif enddo enddo ! remove any excess over-saturation, which is possible due to non-linearity when adding @@ -4077,10 +4077,10 @@ subroutine micro_mg_tend ( & ! for output qvres(i,k) = -dum tlat(i,k) = tlat(i,k) + dum*tx1 - end if + endif enddo enddo - end if + endif ! if (lprnt) write(0,*)' tlat7=',tlat(1,:)*deltat @@ -4249,7 +4249,7 @@ subroutine micro_mg_tend ( & lamcrad(i,k) = zero pgamrad(i,k) = zero effc_fn(i,k) = ten - end if + endif enddo enddo ! recalculate 'final' rain size distribution parameters @@ -4266,9 +4266,9 @@ subroutine micro_mg_tend ( & if (dum /= dumnr(i,k)) then ! adjust number conc if needed to keep mean size in reasonable range nrtend(i,k) = (dumnr(i,k)*precip_frac(i,k)-nr(i,k)) *oneodt - end if + endif - end if + endif enddo enddo ! recalculate 'final' snow size distribution parameters @@ -4290,10 +4290,10 @@ subroutine micro_mg_tend ( & tx1 = (two*pi*1.e-2_r8) / (lams(i,k)*lams(i,k)*lams(i,k)) sadsnow(i,k) = tx1*dumns0*rho(i,k) ! m2/m3 -> cm2/cm3 - end if + endif - end do ! vertical k loop + enddo ! vertical k loop enddo do k=1,nlev do i=1,mgncol @@ -4307,9 +4307,9 @@ subroutine micro_mg_tend ( & if (qg(i,k)+qgtend(i,k)*deltat < qsmall) ngtend(i,k) = -ng(i,k) * oneodt !--ag - end do + enddo - end do + enddo ! DO STUFF FOR OUTPUT: !================================================== @@ -4459,10 +4459,10 @@ subroutine micro_mg_tend ( & else acsrfl(i,k) = zero fcsrfl(i,k) = zero - end if + endif - end do - end do + enddo + enddo do k=1,nlev do i = 1,mgncol @@ -4520,7 +4520,7 @@ subroutine calc_rercld(lamr, n0r, lamc, pgam, qric, qcic, ncic, rercld, mgncol,n if (Atmp > zero) then rercld(i,k) = rercld(i,k) + three *(qric(i,k) + qcic(i,k)) / (four * rhow * Atmp) - end if + endif enddo enddo end subroutine calc_rercld From c41612c39f57e570e9480ced8619c8a7c518edf8 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Tue, 30 Nov 2021 01:10:52 +0000 Subject: [PATCH 09/45] adding/removing some blanks in sfc_sice --- physics/sfc_sice.f | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/physics/sfc_sice.f b/physics/sfc_sice.f index 312c35dfa..b88178702 100644 --- a/physics/sfc_sice.f +++ b/physics/sfc_sice.f @@ -579,10 +579,10 @@ subroutine ice3lay ! !===> ... begin here ! - dt2 = delt + delt - dt4 = dt2 + dt2 - dt6 = dt2 + dt4 - dt2i = one / dt2 + dt2 = delt + delt + dt4 = dt2 + dt2 + dt6 = dt2 + dt4 + dt2i = one / dt2 do i = 1, im if (flag(i)) then From 4c62ee2baef6c168cf4b0bda360e5521b7c1f88c Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Sun, 5 Dec 2021 03:07:05 +0000 Subject: [PATCH 10/45] cleanup/fix GFS_surface_composites --- physics/GFS_surface_composites.F90 | 51 +++-------------------------- physics/GFS_surface_composites.meta | 48 --------------------------- 2 files changed, 5 insertions(+), 94 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 14bc48cd7..20e7a57b1 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -30,10 +30,8 @@ end subroutine GFS_surface_composites_pre_finalize subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, frac_grid, & flag_cice, cplflx, cplice, cplwav2atm, landfrac, lakefrac, lakedepth, oceanfrac, frland, & dry, icy, lake, use_flake, wet, hice, cice, zorlo, zorll, zorli, & - snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & - tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & - weasd, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & - tisfc, tsurf_wat, tsurf_lnd, tsurf_ice, & + tprcp, tprcp_wat, tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & + ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, tisfc, tsurf_wat, tsurf_lnd, tsurf_ice, & gflx_ice, tgice, islmsk, islmsk_cice, slmsk, qss, qss_wat, qss_lnd, qss_ice, & min_lakeice, min_seaice, kdt, huge, errmsg, errflg) @@ -47,12 +45,12 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra real(kind=kind_phys), dimension(:), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac real(kind=kind_phys), dimension(:), intent(inout) :: cice, hice real(kind=kind_phys), dimension(:), intent( out) :: frland - real(kind=kind_phys), dimension(:), intent(in ) :: snowd, tprcp, uustar, weasd, qss + real(kind=kind_phys), dimension(:), intent(in ) :: tprcp, uustar, qss real(kind=kind_phys), dimension(:), intent(inout) :: tsfc, tsfco, tsfcl, tisfc - real(kind=kind_phys), dimension(:), intent(inout) :: snowd_lnd, snowd_ice, tprcp_wat, & + real(kind=kind_phys), dimension(:), intent(inout) :: tprcp_wat, & tprcp_lnd, tprcp_ice, tsfc_wat, tsurf_wat,tsurf_lnd, tsurf_ice, & - uustar_wat, uustar_lnd, uustar_ice, weasd_lnd, weasd_ice, & + uustar_wat, uustar_lnd, uustar_ice, & qss_wat, qss_lnd, qss_ice, ep1d_ice, gflx_ice real(kind=kind_phys), intent(in ) :: tgice integer, dimension(:), intent(inout) :: islmsk, islmsk_cice @@ -218,7 +216,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif if (dry(i)) then ! Land uustar_lnd(i) = uustar(i) - weasd_lnd(i) = weasd(i) tsurf_lnd(i) = tsfcl(i) ! DH* else @@ -229,7 +226,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif if (icy(i)) then ! Ice uustar_ice(i) = uustar(i) - weasd_ice(i) = weasd(i) tsurf_ice(i) = tisfc(i) ep1d_ice(i) = zero gflx_ice(i) = zero @@ -256,43 +252,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif enddo ! - if (.not. cplflx .or. kdt == 1) then - if (frac_grid) then - do i=1,im - if (dry(i)) then - if (icy(i)) then - tem = one / (cice(i)*(one-frland(i))) - snowd_ice(i) = max(zero, (snowd(i) - snowd_lnd(i)*frland(i)) * tem) - weasd_ice(i) = max(zero, (weasd(i) - weasd_lnd(i)*frland(i)) * tem) - endif - elseif (icy(i)) then - tem = one / cice(i) - snowd_lnd(i) = zero - snowd_ice(i) = snowd(i) * tem - weasd_lnd(i) = zero - weasd_ice(i) = weasd(i) * tem - endif - enddo - else - do i=1,im - if (dry(i)) then - snowd_lnd(i) = snowd(i) - weasd_lnd(i) = weasd(i) - snowd_ice(i) = zero - weasd_ice(i) = zero - elseif (icy(i)) then - snowd_lnd(i) = zero - weasd_lnd(i) = zero - tem = one / cice(i) - snowd_ice(i) = snowd(i) * tem - weasd_ice(i) = weasd(i) * tem - endif - enddo - endif - endif - -! write(0,*)' minmax of ice snow=',minval(snowd_ice),maxval(snowd_ice) - end subroutine GFS_surface_composites_pre_run end module GFS_surface_composites_pre diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index fde52ed23..35f5552e9 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -185,30 +185,6 @@ type = real kind = kind_phys intent = inout -[snowd] - standard_name = lwe_surface_snow - long_name = water equivalent snow depth - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[snowd_lnd] - standard_name = surface_snow_thickness_water_equivalent_over_land - long_name = water equivalent snow depth over land - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout -[snowd_ice] - standard_name = surface_snow_thickness_water_equivalent_over_ice - long_name = water equivalent snow depth over ice - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout [tprcp] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step @@ -273,30 +249,6 @@ type = real kind = kind_phys intent = inout -[weasd] - standard_name = lwe_thickness_of_surface_snow_amount - long_name = water equiv of acc snow depth over land and sea ice - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[weasd_lnd] - standard_name = water_equivalent_accumulated_snow_depth_over_land - long_name = water equiv of acc snow depth over land - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout -[weasd_ice] - standard_name = water_equivalent_accumulated_snow_depth_over_ice - long_name = water equiv of acc snow depth over ice - units = mm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout [ep1d_ice] standard_name = surface_upward_potential_latent_heat_flux_over_ice long_name = surface upward potential latent heat flux over ice From 12ccaddd72fe83a9148eae9e4bd2f1a6282dea72 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 6 Dec 2021 08:19:30 -0700 Subject: [PATCH 11/45] Fix compile error in physics/radiation_clouds.f --- physics/radiation_clouds.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 3f6c54d5d..d8c6f9f59 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3139,10 +3139,10 @@ subroutine progcld6 & clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) if (.not. lmfshal) then - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 else - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan if (lmfdeep2) then tem1 = xrc3 / tem1 else From 7f444eea81e5f391ab8c119b5d70f7276e1ec0c9 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 9 Dec 2021 21:12:17 -0700 Subject: [PATCH 12/45] Revert Ruiyu's changes in this branch --- physics/GFS_rrtmg_pre.F90 | 10 +------ physics/radiation_clouds.f | 53 +++++++++++++++----------------------- 2 files changed, 22 insertions(+), 41 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index f2efd9d26..b8c2edd7f 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -864,14 +864,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & enddo endif - if(imp_physics == imp_physics_thompson) then - do k=1,lm - k1 = k + kd - do i=1,im - cnvw (i,k1) = cnvw_in(i,k) - enddo - enddo - endif if (imp_physics == imp_physics_zhao_carr) then ccnd(1:IM,1:LMK,1) = ccnd(1:IM,1:LMK,1) + cnvw(1:IM,1:LMK) @@ -1001,7 +993,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & - cldcov(:,1:LMK), cnvw, effrl_inout, & + cldcov(:,1:LMK), effrl_inout, & effri_inout, effrs_inout, & lwp_ex, iwp_ex, lwp_fc, iwp_fc, & dzb, xlat_d, julian, yearlen, & diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index b62f9f9e6..f58ec8d11 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -2881,7 +2881,7 @@ subroutine progcld6 & & xlat,xlon,slmsk,dz,delp, & & ntrac,ntcw,ntiw,ntrw,ntsw,ntgl, & & IX, NLAY, NLP1, & - & uni_cld, lmfshal, lmfdeep2, cldcov, cnvw, & + & uni_cld, lmfshal, lmfdeep2, cldcov, & & re_cloud,re_ice,re_snow, & & lwp_ex, iwp_ex, lwp_fc, iwp_fc, & & dzlay, latdeg, julian, yearlen, & @@ -2976,7 +2976,7 @@ subroutine progcld6 & real (kind=kind_phys), dimension(:,:), intent(in) :: plvl, plyr, & & tlyr, qlyr, qstl, rhly, cldcov, delp, dz, dzlay, & - & re_cloud, re_ice, re_snow, cnvw + & re_cloud, re_ice, re_snow real (kind=kind_phys), dimension(:), intent(inout) :: & & lwp_ex, iwp_ex, lwp_fc, iwp_fc @@ -3010,8 +3010,8 @@ subroutine progcld6 & integer :: i, k, id, nf ! --- constant values - real (kind=kind_phys), parameter :: xrc3 = 200. -! real (kind=kind_phys), parameter :: xrc3 = 100. +! real (kind=kind_phys), parameter :: xrc3 = 200. + real (kind=kind_phys), parameter :: xrc3 = 100. ! !===> ... begin here @@ -3065,7 +3065,6 @@ subroutine progcld6 & do k = 1, NLAY do i = 1, IX clwf(i,k) = clw(i,k,ntcw) + clw(i,k,ntiw) + clw(i,k,ntsw) - & +clw(i,k,ntrw) + cnvw(i,k) enddo enddo !> - Find top pressure for each cloud domain for given latitude. @@ -3092,9 +3091,8 @@ subroutine progcld6 & cwp(i,k) = max(0.0, clw(i,k,ntcw) * gfac * delp(i,k)) cip(i,k) = max(0.0, clw(i,k,ntiw) * gfac * delp(i,k)) crp(i,k) = max(0.0, clw(i,k,ntrw) * gfac * delp(i,k)) -! csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * & -! & gfac * delp(i,k)) - csp(i,k) = max(0.0, clw(i,k,ntsw) * gfac * delp(i,k)) + csp(i,k) = max(0.0, (clw(i,k,ntsw)+clw(i,k,ntgl)) * & + & gfac * delp(i,k)) enddo enddo @@ -3127,36 +3125,27 @@ subroutine progcld6 & clwmin = 0.0 do k = 1, NLAY-1 do i = 1, IX -! clwt = 1.0e-6 * (plyr(i,k)*0.001) -! clwt = 2.0e-6 * (plyr(i,k)*0.001) - clwt = 1.0e-10 * (plyr(i,k)*0.001) + clwt = 1.0e-6 * (plyr(i,k)*0.001) if (clwf(i,k) > clwt) then - if(rhly(i,k) > 1.) then - cldtot(i,k) = 1. - else - onemrh= max( 1.e-10, 1.0-rhly(i,k) ) - clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) + onemrh= max( 1.e-10, 1.0-rhly(i,k) ) + clwm = clwmin / max( 0.01, plyr(i,k)*0.001 ) - if (.not. lmfshal) then - tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) - tem1 = 2000.0 / tem1 + if (.not. lmfshal) then + tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0) + tem1 = 2000.0 / tem1 + else + tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan + if (lmfdeep2) then + tem1 = xrc3 / tem1 else - tem1 = min(max((onemrh*qstl(i,k))**0.49,0.0001),1.0) !jhan - if (lmfdeep2) then - tem1 = xrc3 / tem1 - else - tem1 = 100.0 / tem1 - endif -! - value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) - tem2 = sqrt( sqrt(rhly(i,k)) ) - - cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) + tem1 = 100.0 / tem1 endif endif - else - cldtot(i,k) = 0.0 + + value = max( min( tem1*(clwf(i,k)-clwm), 50.0 ), 0.0 ) + tem2 = sqrt( sqrt(rhly(i,k)) ) + cldtot(i,k) = max( tem2*(1.0-exp(-value)), 0.0 ) endif enddo enddo From 7aa8caa4060e50df5d9807eae3d75bac3bfa6c86 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Sat, 11 Dec 2021 01:19:40 +0000 Subject: [PATCH 13/45] some cosmetic change in a routine --- physics/cires_ugwp.F90 | 111 +++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/physics/cires_ugwp.F90 b/physics/cires_ugwp.F90 index 6efce96f5..c4f0a255d 100644 --- a/physics/cires_ugwp.F90 +++ b/physics/cires_ugwp.F90 @@ -241,54 +241,54 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr ! wrap everything in a do_ugwp 'if test' in order not to break the namelist functionality if (do_ugwp) then ! calling revised old GFS gravity wave drag - ! topo paras - ! w/ orographic effects - if(nmtvr == 14)then - ! calculate sgh30 for TOFD - sgh30 = abs(oro - oro_uf) - ! w/o orographic effects - else - sgh30 = 0. - endif - - zlwb(:) = 0. - - call GWDPS_V0(im, levs, lonr, do_tofd, Pdvdt, Pdudt, Pdtdt, Pkdis, & - ugrs, vgrs, tgrs, qgrs(:,:,1), kpbl, prsi,del,prsl, prslk, phii, phil, & - dtp, kdt, sgh30, hprime, oc, oa4, clx, theta, sigma, gamma, elvmax, & - dusfcg, dvsfcg, xlat_d, sinlat, coslat, area, cdmbgwd(1:2), & - me, master, rdxzb, con_g, con_omega, zmtb, zogw, tau_mtb, tau_ogw, & - tau_tofd, dudt_mtb, dudt_ogw, dudt_tms) - - else ! calling old GFS gravity wave drag as is - - do k=1,levs - do i=1,im - Pdvdt(i,k) = 0.0 - Pdudt(i,k) = 0.0 - Pdtdt(i,k) = 0.0 - Pkdis(i,k) = 0.0 - enddo - enddo - - if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then - call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & - ugrs, vgrs, tgrs, qgrs(:,:,1), & - kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & - hprime, oc, oa4, clx, theta, sigma, gamma, & - elvmax, dusfcg, dvsfcg, & - con_g, con_cp, con_rd, con_rv, lonr, & - nmtvr, cdmbgwd, me, lprnt, ipr, rdxzb, & - errmsg, errflg) - if (errflg/=0) return + ! topo paras + ! w/ orographic effects + if(nmtvr == 14)then + ! calculate sgh30 for TOFD + sgh30 = abs(oro - oro_uf) + ! w/o orographic effects + else + sgh30 = 0. endif - tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 - if (ldiag_ugwp) then - du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 - end if - - endif ! do_ugwp + zlwb(:) = 0. + + call GWDPS_V0(im, levs, lonr, do_tofd, Pdvdt, Pdudt, Pdtdt, Pkdis, & + ugrs, vgrs, tgrs, qgrs(:,:,1), kpbl, prsi,del,prsl, prslk, phii, phil, & + dtp, kdt, sgh30, hprime, oc, oa4, clx, theta, sigma, gamma, elvmax, & + dusfcg, dvsfcg, xlat_d, sinlat, coslat, area, cdmbgwd(1:2), & + me, master, rdxzb, con_g, con_omega, zmtb, zogw, tau_mtb, tau_ogw, & + tau_tofd, dudt_mtb, dudt_ogw, dudt_tms) + + else ! calling old GFS gravity wave drag as is + + do k=1,levs + do i=1,im + Pdvdt(i,k) = 0.0 + Pdudt(i,k) = 0.0 + Pdtdt(i,k) = 0.0 + Pkdis(i,k) = 0.0 + enddo + enddo + + if (cdmbgwd(1) > 0.0 .or. cdmbgwd(2) > 0.0) then + call gwdps_run(im, levs, Pdvdt, Pdudt, Pdtdt, & + ugrs, vgrs, tgrs, qgrs(:,:,1), & + kpbl, prsi, del, prsl, prslk, phii, phil, dtp, kdt, & + hprime, oc, oa4, clx, theta, sigma, gamma, & + elvmax, dusfcg, dvsfcg, & + con_g, con_cp, con_rd, con_rv, lonr, & + nmtvr, cdmbgwd, me, lprnt, ipr, rdxzb, & + errmsg, errflg) + if (errflg/=0) return + endif + + tau_mtb = 0.0 ; tau_ogw = 0.0 ; tau_tofd = 0.0 + if (ldiag_ugwp) then + du3dt_mtb = 0.0 ; du3dt_ogw = 0.0 ; du3dt_tms= 0.0 + endif + + endif ! do_ugwp if(ldiag3d .and. lssav .and. .not. flag_for_gwd_generic_tend) then @@ -348,19 +348,20 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr endif call fv3_ugwp_solv2_v0(im, levs, dtp, tgrs, ugrs, vgrs,qgrs(:,:,1), & - prsl, prsi, phil, xlat_d, sinlat, coslat, gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, & - tau_ngw, me, master, kdt) + prsl, prsi, phil, xlat_d, sinlat, coslat, & + gw_dudt, gw_dvdt, gw_dtdt, gw_kdis, tau_ngw, & + me, master, kdt) do k=1,levs do i=1,im - gw_dtdt(i,k) = pngw*gw_dtdt(i,k)+ pogw*Pdtdt(i,k) - gw_dudt(i,k) = pngw*gw_dudt(i,k)+ pogw*Pdudt(i,k) - gw_dvdt(i,k) = pngw*gw_dvdt(i,k)+ pogw*Pdvdt(i,k) - gw_kdis(i,k) = pngw*gw_kdis(i,k)+ pogw*Pkdis(i,k) + gw_dtdt(i,k) = pngw*gw_dtdt(i,k) + pogw*Pdtdt(i,k) + gw_dudt(i,k) = pngw*gw_dudt(i,k) + pogw*Pdudt(i,k) + gw_dvdt(i,k) = pngw*gw_dvdt(i,k) + pogw*Pdvdt(i,k) + gw_kdis(i,k) = pngw*gw_kdis(i,k) + pogw*Pkdis(i,k) ! accumulation of tendencies for CCPP to replicate EMC-physics updates (!! removed in latest code commit to VLAB) - !dudt(i,k) = dudt(i,k) +gw_dudt(i,k) - !dvdt(i,k) = dvdt(i,k) +gw_dvdt(i,k) - !dtdt(i,k) = dtdt(i,k) +gw_dtdt(i,k) + !dudt(i,k) = dudt(i,k) + gw_dudt(i,k) + !dvdt(i,k) = dvdt(i,k) + gw_dvdt(i,k) + !dtdt(i,k) = dtdt(i,k) + gw_dtdt(i,k) enddo enddo From 5ebe5dc62ae85946c9ff092203a304bd2740074d Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Mon, 13 Dec 2021 14:36:41 -0700 Subject: [PATCH 14/45] following early results by Anning, make fewer clouds, especially high clouds --- physics/GFS_rrtmg_pre.F90 | 4 +++- physics/radiation_clouds.f | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 3a3378e15..cb20e69fb 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -216,6 +216,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real (kind=kind_phys) :: max_relh integer :: iflag + integer :: ii_half integer :: ids, ide, jds, jde, kds, kde, & ims, ime, jms, jme, kms, kme, & its, ite, jts, jte, kts, kte @@ -236,7 +237,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & LP1 = LM + 1 ! num of in/out levels - gridkm = sqrt(2.0)*sqrt(dx(1)*0.001*dx(1)*0.001) + ii_half = nint(0.5*LM) + gridkm = sqrt(dx(1)*0.001*dx(ii_half)*0.001) if (imp_physics == imp_physics_thompson) then max_relh = 1.5 diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index f58ec8d11..84dfb2667 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3452,7 +3452,7 @@ subroutine progcld_thompson & do i = 1, IX cwp(i,k) = max(0.0, clw(i,k,ntcw) * dz(i,k)*1.E6) crp(i,k) = 0.0 - snow_mass_factor = 0.85 + snow_mass_factor = 0.90 cip(i,k) = max(0.0, (clw(i,k,ntiw) & & + (1.0-snow_mass_factor)*clw(i,k,ntsw))*dz(i,k)*1.E6) if (re_snow(i,k) .gt. snow_max_radius)then @@ -4532,8 +4532,8 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & DO k = kts,kte delz = MAX(100., dz(k)) - RH_00L = 0.74+MIN(0.25,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) - RH_00O = 0.82+MIN(0.17,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) + RH_00L = 0.77+MIN(0.22,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) + RH_00O = 0.85+MIN(0.14,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) RHUM = rh(k) if (qc(k).ge.1.E-5 .or. qi(k).ge.1.E-5 & @@ -4550,7 +4550,7 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & RH_00 = RH_00L ENDIF - tc = t(k) - 273.15 + tc = MAX(-80.0, t(k) - 273.15) if (tc .lt. -12.0) RH_00 = RH_00L if (tc .gt. 20.0) then @@ -4562,12 +4562,12 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & if (max_relh.gt.1.12 .or. (.NOT.(modify_qvapor)) ) then !..For HRRR model, the following look OK. RHUM = MIN(rh(k), 1.45) - RH_00 = RH_00 + (1.45-RH_00)*(-12.0-tc)/(-12.0+112.) + RH_00 = RH_00 + (1.45-RH_00)*(-12.0-tc)/(-12.0+85.) CLDFRA(K) = MAX(0.,1.0-SQRT((1.46-RHUM)/(1.46-RH_00))) else !..but for the GFS model, RH is way lower. RHUM = MIN(rh(k), 1.05) - RH_00 = RH_00 + (1.05-RH_00)*(-12.0-tc)/(-12.0+112.) + RH_00 = RH_00 + (1.05-RH_00)*(-12.0-tc)/(-12.0+85.) CLDFRA(K) = MAX(0.,1.0-SQRT((1.06-RHUM)/(1.06-RH_00))) endif endif From b7ddc451611c47779e5092d181d3631affbaa356 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 14 Dec 2021 16:02:27 -0700 Subject: [PATCH 15/45] add in less LWC and IWC in the partly cloudy boxes --- physics/radiation_clouds.f | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 84dfb2667..823575ddd 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -4789,9 +4789,9 @@ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte) max_iwc = ABS(qvs(k2)-qvs(k1)) do k = k1, k2 - max_iwc = MAX(1.E-5, max_iwc - (qi(k)+qs(k))) + max_iwc = MAX(1.E-6, max_iwc - (qi(k)+qs(k))) enddo - max_iwc = MIN(2.E-3, max_iwc) + max_iwc = MIN(1.E-4, max_iwc) this_dz = 0.0 do k = k1, k2 @@ -4801,7 +4801,7 @@ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte) this_dz = this_dz + dz(k) endif this_iwc = max_iwc*this_dz/tdz - iwc = MAX(5.E-6, this_iwc*(1.-entr)) + iwc = MAX(1.E-6, this_iwc*(1.-entr)) if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.203.16) then qi(k) = qi(k) + cfr(k)*cfr(k)*iwc endif @@ -4830,9 +4830,9 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) ! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz do k = k1, k2 - max_lwc = MAX(1.E-5, max_lwc - qc(k)) + max_lwc = MAX(1.E-6, max_lwc - qc(k)) enddo - max_lwc = MIN(2.E-3, max_lwc) + max_lwc = MIN(1.E-4, max_lwc) this_dz = 0.0 do k = k1, k2 @@ -4842,7 +4842,7 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) this_dz = this_dz + dz(k) endif this_lwc = max_lwc*this_dz/tdz - lwc = MAX(5.E-6, this_lwc*(1.-entr)) + lwc = MAX(1.E-6, this_lwc*(1.-entr)) if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.253.16) then qc(k) = qc(k) + cfr(k)*cfr(k)*lwc endif From a1ca10e804d68eeb8c97ff2f8c57d52ad65868d8 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 16 Dec 2021 10:18:35 -0700 Subject: [PATCH 16/45] bug fix, LM should have been IM --- physics/GFS_rrtmg_pre.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index cb20e69fb..cc68825e1 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -237,7 +237,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & LP1 = LM + 1 ! num of in/out levels - ii_half = nint(0.5*LM) + ii_half = nint(0.5*IM) gridkm = sqrt(dx(1)*0.001*dx(ii_half)*0.001) if (imp_physics == imp_physics_thompson) then From 79325a53d7ee77c9c378d59a1cfd506c5b0f78ee Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Fri, 17 Dec 2021 08:37:33 -0700 Subject: [PATCH 17/45] make gridkm even simpler --- physics/GFS_rrtmg_pre.F90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index cc68825e1..f08ff2752 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -216,7 +216,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & real (kind=kind_phys) :: max_relh integer :: iflag - integer :: ii_half integer :: ids, ide, jds, jde, kds, kde, & ims, ime, jms, jme, kms, kme, & its, ite, jts, jte, kts, kte @@ -237,8 +236,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & LP1 = LM + 1 ! num of in/out levels - ii_half = nint(0.5*IM) - gridkm = sqrt(dx(1)*0.001*dx(ii_half)*0.001) + gridkm = dx(nint(0.5*IM))*0.001 if (imp_physics == imp_physics_thompson) then max_relh = 1.5 From 20e3b7962495858506705e77294f1c51c38dad3b Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Fri, 17 Dec 2021 09:22:19 -0700 Subject: [PATCH 18/45] make gridkm array in X-dimension --- physics/GFS_rrtmg_pre.F90 | 7 +++---- physics/radiation_clouds.f | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index f08ff2752..f6f20487e 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -183,7 +183,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya,lyb - real(kind=kind_phys) :: es, qs, delt, tem0d, gridkm, pfac + real(kind=kind_phys) :: es, qs, delt, tem0d, pfac + real(kind=kind_phys), dimension(im) :: gridkm real(kind=kind_phys), dimension(im) :: cvt1, cvb1, tem1d, tskn, xland @@ -235,9 +236,6 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & LP1 = LM + 1 ! num of in/out levels - - gridkm = dx(nint(0.5*IM))*0.001 - if (imp_physics == imp_physics_thompson) then max_relh = 1.5 else @@ -245,6 +243,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & endif do i = 1, IM + gridkm(i) = dx(i)*0.001 lwp_ex(i) = 0.0 iwp_ex(i) = 0.0 lwp_fc(i) = 0.0 diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 823575ddd..87a9620b2 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3311,7 +3311,7 @@ subroutine progcld_thompson & ! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! ! dz (ix,nlay) : layer thickness (km) ! ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! -! gridkm : grid length in km ! +! gridkm (ix) : grid length in km ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! ! uni_cld : logical - true for cloud fraction from shoc ! @@ -3370,8 +3370,8 @@ subroutine progcld_thompson & real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk - real(kind=kind_phys), dimension(:), intent(in) :: latdeg - real(kind=kind_phys), intent(in) :: julian, gridkm + real(kind=kind_phys), dimension(:), intent(in) :: latdeg, gridkm + real(kind=kind_phys), intent(in) :: julian integer, intent(in) :: yearlen ! --- outputs @@ -3518,7 +3518,7 @@ subroutine progcld_thompson & endif call cal_cldfra3(cldfra1d, qv1d, qc1d, qi1d, qs1d, dz1d, & - & p1d, t1d, xland, gridkm, & + & p1d, t1d, xland, gridkm(i), & & .false., max_relh, 1, nlay, .false.) do k = 1, NLAY From c6bd0ad91723771f92147c791c5859ecda5b2e4c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 20 Dec 2021 17:08:44 -0700 Subject: [PATCH 19/45] Remove physics/rte-rrtmgp/rrtmgp/kernels-openacc/mo_gas_optics_kernels.F90 from list of RRTMGP schemes --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8cb88418..b59a8ef33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,7 +80,6 @@ set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_ ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_constants.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_util_reorder.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90 - ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels-openacc/mo_gas_optics_kernels.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_rrtmgp_util_string.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_gas_optics_kernels.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/kernels/mo_rrtmgp_util_reorder_kernels.F90 From 9a60c107c292101df106fcef41ad763ab1665c37 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 20 Dec 2021 17:09:31 -0700 Subject: [PATCH 20/45] Write diag messages to stdout instead of stderr, use standard _OPENMP CPP directive --- physics/GFS_debug.F90 | 20 ++++++++++---------- physics/GFS_phys_time_vary.fv3.F90 | 8 ++++---- physics/GFS_phys_time_vary.scm.F90 | 8 ++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/physics/GFS_debug.F90 b/physics/GFS_debug.F90 index 23d1be573..9d5d24aa8 100644 --- a/physics/GFS_debug.F90 +++ b/physics/GFS_debug.F90 @@ -390,7 +390,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, #ifdef MPI use mpi #endif -#ifdef OPENMP +#ifdef _OPENMP use omp_lib #endif use GFS_typedefs, only: GFS_control_type, GFS_statein_type, & @@ -437,7 +437,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, mpisize = 1 mpicomm = 0 #endif -#ifdef OPENMP +#ifdef _OPENMP omprank = OMP_GET_THREAD_NUM() ompsize = nthreads #else @@ -445,7 +445,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, ompsize = 1 #endif -#ifdef OPENMP +#ifdef _OPENMP !$OMP BARRIER #endif #ifdef MPI @@ -929,7 +929,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_tau', Grid%jindx2_tau ) endif end if -#ifdef OPENMP +#ifdef _OPENMP !$OMP BARRIER #endif end do @@ -938,7 +938,7 @@ subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, #endif end do -#ifdef OPENMP +#ifdef _OPENMP !$OMP BARRIER #endif #ifdef MPI @@ -1043,7 +1043,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup #ifdef MPI use mpi #endif -#ifdef OPENMP +#ifdef _OPENMP use omp_lib #endif use machine, only: kind_phys @@ -1092,7 +1092,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup mpisize = 1 mpicomm = 0 #endif -#ifdef OPENMP +#ifdef _OPENMP omprank = OMP_GET_THREAD_NUM() ompsize = nthreads #else @@ -1100,7 +1100,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup ompsize = 1 #endif -#ifdef OPENMP +#ifdef _OPENMP !$OMP BARRIER #endif #ifdef MPI @@ -1451,7 +1451,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%precip_overlap_param', Interstitial%precip_overlap_param ) end if end if -#ifdef OPENMP +#ifdef _OPENMP !$OMP BARRIER #endif end do @@ -1460,7 +1460,7 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup #endif end do -#ifdef OPENMP +#ifdef _OPENMP !$OMP BARRIER #endif #ifdef MPI diff --git a/physics/GFS_phys_time_vary.fv3.F90 b/physics/GFS_phys_time_vary.fv3.F90 index d6155e6b1..35fe08252 100644 --- a/physics/GFS_phys_time_vary.fv3.F90 +++ b/physics/GFS_phys_time_vary.fv3.F90 @@ -7,7 +7,7 @@ !> @{ module GFS_phys_time_vary -#ifdef OPENMP +#ifdef _OPENMP use omp_lib #endif @@ -355,7 +355,7 @@ subroutine GFS_phys_time_vary_init ( !$OMP section !--- if sncovr does not exist in the restart, need to create it if (all(sncovr < zero)) then - if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' + if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' !--- compute sncovr from existing variables !--- code taken directly from read_fix.f sncovr(:) = zero @@ -376,7 +376,7 @@ subroutine GFS_phys_time_vary_init ( !--- For RUC LSM: create sncovr_ice from sncovr if (lsm == lsm_ruc) then if (all(sncovr_ice < zero)) then - if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' + if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' sncovr_ice(:) = sncovr(:) endif endif @@ -396,7 +396,7 @@ subroutine GFS_phys_time_vary_init ( !--- land and ice - not for restart runs lsm_init: if (.not.flag_restart) then if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then - if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' + if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' do ix=1,im albdvis_lnd(ix) = 0.2_kind_phys albdnir_lnd(ix) = 0.2_kind_phys diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index b06e46cdc..514988a48 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -6,7 +6,7 @@ !! aerosol, IN&CCN and surface properties updates. !> @{ module GFS_phys_time_vary - + use machine, only : kind_phys use mersenne_twister, only: random_setseed, random_number @@ -313,7 +313,7 @@ subroutine GFS_phys_time_vary_init ( !--- if sncovr does not exist in the restart, need to create it if (all(sncovr < zero)) then - if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' + if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' !--- compute sncovr from existing variables !--- code taken directly from read_fix.f sncovr(:) = zero @@ -334,7 +334,7 @@ subroutine GFS_phys_time_vary_init ( !--- For RUC LSM: create sncovr_ice from sncovr if (lsm == lsm_ruc) then if (all(sncovr_ice < zero)) then - if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' + if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' sncovr_ice(:) = sncovr(:) endif endif @@ -351,7 +351,7 @@ subroutine GFS_phys_time_vary_init ( !--- land and ice - not for restart runs lsm_init: if (.not.flag_restart) then if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then - if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' + if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' do ix=1,im albdvis_lnd(ix) = 0.2_kind_phys albdnir_lnd(ix) = 0.2_kind_phys From f1a00a62373d7004b505f85f3dcaa604ba7aabf9 Mon Sep 17 00:00:00 2001 From: Samuel Trahan Date: Tue, 21 Dec 2021 00:54:11 +0000 Subject: [PATCH 21/45] HRRR-like radar-derived temperature tendencies --- physics/GFS_MP_generic.F90 | 76 ++++++++++++++++++++++++++++++++----- physics/GFS_MP_generic.meta | 60 +++++++++++++++++++++++++++++ physics/cu_gf_deep.F90 | 24 ++++++------ physics/cu_gf_driver.F90 | 30 ++++++++++++--- physics/cu_gf_driver.meta | 38 +++++++++++++++++++ 5 files changed, 201 insertions(+), 27 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 6a8d3bfcb..13453e9f0 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -13,12 +13,12 @@ end subroutine GFS_MP_generic_pre_init !! \htmlinclude GFS_MP_generic_pre_run.html !! subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, & - ntrac, gt0, gq0, save_t, save_q, errmsg, errflg) + ntrac, gt0, gq0, save_t, save_q, num_dfi_radar, errmsg, errflg) ! use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs, ntcw, nncl, ntrac + integer, intent(in) :: im, levs, ntcw, nncl, ntrac, num_dfi_radar logical, intent(in) :: ldiag3d, qdiag3d, do_aw real(kind=kind_phys), dimension(:,:), intent(in) :: gt0 real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0 @@ -35,12 +35,14 @@ subroutine GFS_MP_generic_pre_run(im, levs, ldiag3d, qdiag3d, do_aw, ntcw, nncl, errmsg = '' errflg = 0 - if (ldiag3d .or. do_aw) then + if (ldiag3d .or. do_aw .or. num_dfi_radar>0) then do k=1,levs do i=1,im save_t(i,k) = gt0(i,k) enddo enddo + endif + if (ldiag3d .or. do_aw) then if(qdiag3d) then do n=1,ntrac do k=1,levs @@ -92,27 +94,34 @@ subroutine GFS_MP_generic_post_run( totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, pwat, & drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, & graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, & - dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d, lssav, & - errmsg, errflg) + dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d, lssav, num_dfi_radar, fh_dfi_radar, & + index_of_process_dfi_radar, ix_dfi_radar, dfi_radar_tten, radar_tten_limits, fhour, errmsg, errflg) ! use machine, only: kind_phys implicit none - integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac + integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac, num_dfi_radar, index_of_process_dfi_radar integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm integer, intent(in) :: index_of_temperature,index_of_process_mp + real(kind=kind_phys), intent(in) :: fh_dfi_radar(5), fhour + real(kind=kind_phys), intent(in) :: radar_tten_limits(2) + integer :: ix_dfi_radar(4) + real(kind=kind_phys), dimension(im,levs), intent(inout) :: gt0 + real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin real(kind=kind_phys), dimension(:), intent(in) :: rain1, xlat, xlon, tsfc real(kind=kind_phys), dimension(:), intent(inout) :: ice, snow, graupel, rainc real(kind=kind_phys), dimension(:), intent(in) :: rain0, ice0, snow0, graupel0 real(kind=kind_phys), dimension(:,:), intent(in) :: rann - real(kind=kind_phys), dimension(:,:), intent(in) :: gt0, prsl, save_t, del + real(kind=kind_phys), dimension(:,:), intent(in) :: prsl, save_t, del real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, phii real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0, save_q + real(kind=kind_phys), dimension(:,:,:), pointer, intent(in) :: dfi_radar_tten + real(kind=kind_phys), dimension(:), intent(in ) :: sr real(kind=kind_phys), dimension(:), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & srflag, cnvprcp, totprcp, totice, totsnw, totgrp, cnvprcpb, & @@ -150,10 +159,10 @@ subroutine GFS_MP_generic_post_run( real(kind=kind_phys), parameter :: p850 = 85000.0_kind_phys ! *DH - integer :: i, k, ic, itrac, idtend + integer :: i, k, ic, itrac, idtend, itime, idtend_radar, idtend_mp real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys - real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip, tem1, tem2 + real(kind=kind_phys) :: crain, csnow, onebg, tem, total_precip, tem1, tem2, ttend real(kind=kind_phys), dimension(im) :: domr, domzr, domip, doms, t850, work1 ! Initialize CCPP error handling variables @@ -244,6 +253,55 @@ subroutine GFS_MP_generic_post_run( endif + do itime=1,num_dfi_radar + if(ix_dfi_radar(itime)<1) cycle + if(fhour=fh_dfi_radar(itime+1)) cycle + exit + enddo + if_radar: if(itime<=num_dfi_radar) then + radar_k: do k=3,levs-2 + radar_i: do i=1,im + ! if(dfi_radar_tten(i,k,itime)>-19) then + ! gt0(i,k) = save_t(i,k) + dfi_radar_tten(i,k,itime) + ! endif + ttend = dfi_radar_tten(i,k,itime) + if_active: if (ttend>-19) then + ttend = max(ttend,radar_tten_limits(1)) + ttend = min(ttend,radar_tten_limits(2)) + + ! add radar temp tendency + ! there is radar coverage + gt0(i,k) = save_t(i,k) + ttend*dtp + end if if_active + end do radar_i + end do radar_k + if(ldiag3d) then + idtend_radar = dtidx(index_of_temperature,index_of_process_dfi_radar) + idtend_mp = dtidx(index_of_temperature,index_of_process_mp) + if(idtend_radar>0 .or. idtend_mp>0) then + if(idtend_mp>0) then + dtend(:,1:2,idtend_mp) = dtend(:,1:2,idtend_mp) + (gt0(:,1:2)-save_t(:,1:2))*frain + endif + do k=3,levs-2 + do i=1,im + ttend = dfi_radar_tten(i,k,itime) + if (ttend>-19) then + if(idtend_radar>0) then + dtend(i,k,idtend_radar) = dtend(i,k,idtend_radar) + (gt0(i,k)-save_t(i,k)) * frain + endif + else if(idtend_mp>0) then + dtend(i,k,idtend_mp) = dtend(i,k,idtend_mp) + (gt0(i,k)-save_t(i,k)) * frain + endif + enddo + enddo + if(idtend_mp>0) then + dtend(:,levs-1:levs,idtend_mp) = dtend(:,levs-1:levs,idtend_mp) + (gt0(:,levs-1:levs)-save_t(:,levs-1:levs))*frain + endif + endif + endif + endif if_radar + t850(1:im) = gt0(1:im,1) do k = 1, levs-1 diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index d14c11baf..6603da411 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -95,6 +95,13 @@ type = real kind = kind_phys intent = inout +[num_dfi_radar] + standard_name = num_dfi_radar + long_name = number of time ranges with dfi radar tendencies + units = count + dimensions = () + type = integer + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -727,6 +734,59 @@ type = real kind = kind_phys intent = in +[num_dfi_radar] + standard_name = num_dfi_radar + long_name = number of time ranges with dfi radar tendencies + units = count + dimensions = () + type = integer + intent = in +[fh_dfi_radar] + standard_name = times_at_which_dfi_radar_tten_is_available + long_name = times at which dfi_radar_tten is available + units = h + dimensions = (5) + type = real + kind = kind_phys + intent = in +[ix_dfi_radar] + standard_name = time_indices_in_dfi_radar_tten + long_name = time indices in dfi radar tten + units = index + dimensions = (4) + type = integer + intent = in +[dfi_radar_tten] + standard_name = dfi_radar_tten + long_name = prescribed microphysics temperature tendency from radar data + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,num_dfi_radar) + type = real + kind = kind_phys + intent = in +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = in +[radar_tten_limits] + standard_name = allowed_bounds_of_radar_prescribed_tendencies + long_name = allowed bounds of prescribed microphysics temperature tendencies + units = K + dimensions = (2) + type = real + kind = kind_phys + intent = in +[index_of_process_dfi_radar] + standard_name = index_of_radar_mp_temperature_forcing_in_cumulative_change_index + long_name = index of radar mp temperature forcing in second dimension of array cumulative change index + units = index + dimensions = () + type = integer + intent = in [dtend] standard_name = cumulative_change_of_state_variables long_name = diagnostic tendencies for state variables diff --git a/physics/cu_gf_deep.F90 b/physics/cu_gf_deep.F90 index 102179bee..e26afef3e 100644 --- a/physics/cu_gf_deep.F90 +++ b/physics/cu_gf_deep.F90 @@ -111,9 +111,7 @@ subroutine cu_gf_deep_run( & !! more is possible, talk to developer or !! implement yourself. pattern is expected to be !! betwee -1 and +1 -#if ( wrf_dfi_radar == 1 ) ,do_capsuppress,cap_suppress_j & ! -#endif ,k22 & ! ,jmin,tropics) ! @@ -129,16 +127,8 @@ subroutine cu_gf_deep_run( & real(kind=kind_phys), dimension (its:ite) & ,intent (in ) :: rand_mom,rand_vmas -#if ( wrf_dfi_radar == 1 ) -! -! option of cap suppress: -! do_capsuppress = 1 do -! do_capsuppress = other don't -! -! - integer, intent(in ) ,optional :: do_capsuppress - real(kind=kind_phys), dimension( its:ite ) :: cap_suppress_j -#endif + integer, intent(in) :: do_capsuppress + real(kind=kind_phys), intent(in), optional, dimension(:) :: cap_suppress_j ! ! ! @@ -458,6 +448,16 @@ subroutine cu_gf_deep_run( & ztexec(:)=0 zqexec(:)=0 endif + if(do_capsuppress == 1) then + do i=its,itf + cap_max(i)=cap_maxs + if (abs(cap_suppress_j(i) - 1.0 ) < 0.1 ) then + cap_max(i)=cap_maxs+75. + elseif (abs(cap_suppress_j(i) - 0.0 ) < 0.1 ) then + cap_max(i)=10.0 + endif + enddo + endif ! !--- initial entrainment rate (these may be changed later on in the !--- program diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index d134b7d02..7bb127579 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -83,6 +83,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend, & dtend,dtidx,ntqv,ntiw,ntcw,index_of_temperature,index_of_x_wind, & index_of_y_wind,index_of_process_scnv,index_of_process_dcnv, & + fhour,fh_dfi_radar,ix_dfi_radar,num_dfi_radar,dfi_radar_tten, & ldiag3d,qci_conv,errmsg,errflg) !------------------------------------------------------------- implicit none @@ -125,6 +126,10 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& real(kind=kind_phys), allocatable :: clcw_save(:,:), cliw_save(:,:) + real(kind=kind_phys), intent(in) :: fhour, fh_dfi_radar(5) + integer, intent(in) :: num_dfi_radar, ix_dfi_radar(4) + real(kind=kind_phys), intent(in), pointer :: dfi_radar_tten(:,:,:) + integer, dimension (:), intent(out) :: hbot,htop,kcnv integer, dimension (:), intent(in) :: xland real(kind=kind_phys), dimension (:), intent(in) :: pbl @@ -213,6 +218,9 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& real(kind=kind_phys) :: cliw_deep,clcw_deep,tem_deep, clcw_both integer :: cliw_deep_idx, clcw_deep_idx, cliw_shal_idx, clcw_shal_idx + real(kind=kind_phys) :: cap_suppress_j(im) + integer :: itime, do_cap_suppress + !parameter (tf=243.16, tcr=270.16, tcrf=1.0/(tcr-tf)) ! FV3 original !parameter (tf=263.16, tcr=273.16, tcrf=1.0/(tcr-tf)) !parameter (tf=233.16, tcr=263.16, tcrf=1.0/(tcr-tf)) @@ -221,6 +229,20 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& errmsg = '' errflg = 0 + do itime=1,num_dfi_radar + if(ix_dfi_radar(itime)<1) cycle + if(fhour=fh_dfi_radar(itime+1)) cycle + exit + enddo + if_radar: if(itime<=num_dfi_radar) then + do_cap_suppress = 1 + cap_suppress_j = dfi_radar_tten(:,1,itime) + else + do_cap_suppress = 0 + cap_suppress_j = 0 + endif if_radar + if(ldiag3d) then if(flag_for_dcnv_generic_tend) then cliw_deep_idx=0 @@ -643,9 +665,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& ! more is possible, talk to developer or ! implement yourself. pattern is expected to be ! betwee -1 and +1 -#if ( wrf_dfi_radar == 1 ) - ,do_capsuppress,cap_suppress_j & -#endif + ,do_cap_suppress,cap_suppress_j & ,k22m & ,jminm,tropics) @@ -726,9 +746,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& ! more is possible, talk to developer or ! implement yourself. pattern is expected to be ! betwee -1 and +1 -#if ( wrf_dfi_radar == 1 ) - ,do_capsuppress,cap_suppress_j & -#endif + ,do_cap_suppress,cap_suppress_j & ,k22 & ,jmin,tropics) jpr=0 diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index 3a54a9ecc..7f324cf35 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -501,6 +501,44 @@ type = real kind = kind_phys intent = inout +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = in +[fh_dfi_radar] + standard_name = times_at_which_dfi_radar_tten_is_available + long_name = times at which dfi_radar_tten is available + units = h + dimensions = (5) + type = real + kind = kind_phys + intent = in +[ix_dfi_radar] + standard_name = time_indices_in_dfi_radar_tten + long_name = time indices in dfi radar tten + units = index + dimensions = (4) + type = integer + intent = in +[num_dfi_radar] + standard_name = num_dfi_radar + long_name = number of time ranges with dfi radar tendencies + units = count + dimensions = () + type = integer + intent = in +[dfi_radar_tten] + standard_name = dfi_radar_tten + long_name = prescribed microphysics temperature tendency from radar data + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,num_dfi_radar) + type = real + kind = kind_phys + intent = in [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From ebd9495b819fe590628d635c4cb641190c712063 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 22 Dec 2021 06:38:53 -0700 Subject: [PATCH 22/45] Remove more duplicate modules from SCHEMES_OPENMP_OFF list in CMakeLists.txt --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b59a8ef33..f16014cb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,8 +107,6 @@ set(SCHEMES_OPENMP_OFF ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rrtmgp/mo_ ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_sw.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_fluxes.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_lw.F90 - ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels-openacc/mo_rte_solver_kernels.F90 - ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels-openacc/mo_optical_props_kernels.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/mo_rte_util_array.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels/mo_rte_solver_kernels.F90 ${LOCAL_CURRENT_SOURCE_DIR}/physics/rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90 From c73a22a507c6d480e8ed2f34ab7436eaaccdcd51 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 22 Dec 2021 13:04:22 -0700 Subject: [PATCH 23/45] Move calculation fo effrr into its own loop --- physics/GFS_rrtmg_pre.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 615a83d0f..1252418c9 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -821,14 +821,16 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & do k=1,lm effrl(i,k) = MAX(re_qc_min, MIN(effrl(i,k), re_qc_max)) effri(i,k) = MAX(re_qi_min, MIN(effri(i,k), re_qi_max)) - effrr(i,k) = 1000. ! rrain_def=1000. effrs(i,k) = MAX(re_qs_min, MIN(effrs(i,k), re_qs_max)) end do effrl(i,lmk) = re_qc_min effri(i,lmk) = re_qi_min - effrr(i,lmk) = 1000. ! rrain_def=1000. effrs(i,lmk) = re_qs_min end do + do k=1,lm + k1 = k + kd + effrr(i,k1) = 1000. ! rrain_def=1000. + end do ! Update global arrays, scale Thompson's effective radii from meter to micron do k=1,lm k1 = k + kd From b6dcb52209056db5bd0b552f2ffa81c2cc23e725 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 22 Dec 2021 13:32:37 -0700 Subject: [PATCH 24/45] Add missing i-loop around effrr in physics/GFS_rrtmg_pre.F90 --- physics/GFS_rrtmg_pre.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 1252418c9..ced2d99a4 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -829,7 +829,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & end do do k=1,lm k1 = k + kd - effrr(i,k1) = 1000. ! rrain_def=1000. + do i=1,im + effrr(i,k1) = 1000. ! rrain_def=1000. + end do end do ! Update global arrays, scale Thompson's effective radii from meter to micron do k=1,lm From 84343332fa236e91c86da1021a2a0ed68eeb43ec Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Sat, 25 Dec 2021 01:47:33 +0000 Subject: [PATCH 25/45] testing with zorli related change --- physics/GFS_surface_composites.F90 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 20e7a57b1..b2c59d32c 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -209,6 +209,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra uustar_wat(i) = uustar(i) tsfc_wat(i) = tsfco(i) tsurf_wat(i) = tsfco(i) + zorlo(i) = max(1.0e-5, min(one, zorlo(i))) ! DH* else zorlo(i) = huge @@ -229,6 +230,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra tsurf_ice(i) = tisfc(i) ep1d_ice(i) = zero gflx_ice(i) = zero + zorli(i) = max(1.0e-5, min(one, zorli(i))) ! DH* else zorli(i) = huge From e96cc7f24eea992565b911a6ce30a3fceb0c469c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 29 Dec 2021 08:51:12 -0700 Subject: [PATCH 26/45] Remove commented line from physics/GFS_surface_composites.F90 --- physics/GFS_surface_composites.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 14bc48cd7..1bf963a54 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -410,8 +410,7 @@ subroutine GFS_surface_composites_post_run ( cmm, cmm_wat, cmm_lnd, cmm_ice, chh, chh_wat, chh_lnd, chh_ice, gflx, gflx_wat, gflx_lnd, gflx_ice, ep1d, ep1d_wat, & ep1d_lnd, ep1d_ice, weasd, weasd_lnd, weasd_ice, snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & tprcp_lnd, tprcp_ice, evap, evap_wat, evap_lnd, evap_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, qss, qss_wat, qss_lnd, & - qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tisfc, hice, cice, tiice, & -! qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tisfc, hice, cice, min_seaice, tiice, & + qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tisfc, hice, cice, tiice, & sigmaf, zvfun, lheatstrg, h0facu, h0facs, hflxq, hffac, stc, & grav, prsik1, prslk1, prslki, z1, ztmax_wat, ztmax_lnd, ztmax_ice, huge, errmsg, errflg) From 68e366d3471ccfdebf6d6cb63879e503dd117a6d Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 29 Dec 2021 08:51:59 -0700 Subject: [PATCH 27/45] Bug fixes for restart reproducibility in MYNNSFC --- physics/module_MYNNSFC_wrapper.F90 | 15 ++++++--- physics/module_sf_mynn.F90 | 53 +++++++++++++++++++----------- 2 files changed, 44 insertions(+), 24 deletions(-) diff --git a/physics/module_MYNNSFC_wrapper.F90 b/physics/module_MYNNSFC_wrapper.F90 index c8c5c1db4..4595bf163 100644 --- a/physics/module_MYNNSFC_wrapper.F90 +++ b/physics/module_MYNNSFC_wrapper.F90 @@ -201,7 +201,7 @@ SUBROUTINE mynnsfc_wrapper_run( & & CHS2, CQS2, rmol, zol, mol, ch, & & lh, wstar !LOCAL - real, dimension(im) :: & + real(kind=kind_phys), dimension(im) :: & & hfx, znt, psim, psih, & & chs, ck, cd, mavail, xland, GZ1OZ0, & & cpm, qgh, qfx, snowh_wat @@ -228,13 +228,19 @@ SUBROUTINE mynnsfc_wrapper_run( & ! endif ! prep MYNN-only variables + pattern_spp_pbl(:,:) = 0 + dz(:,:) = 0 + th(:,:) = 0 + qv(:,:) = 0 + hfx(:) = 0 + qfx(:) = 0 + rmol(:) = 0 do k=1,2 !levs do i=1,im dz(i,k)=(phii(i,k+1) - phii(i,k))*g_inv th(i,k)=t3d(i,k)/exner(i,k) !qc(i,k)=MAX(qgrs(i,k,ntcw),0.0) qv(i,k)=qvsh(i,k)/(1.0 - qvsh(i,k)) - pattern_spp_pbl(i,k)=0.0 enddo enddo do i=1,im @@ -333,8 +339,9 @@ SUBROUTINE mynnsfc_wrapper_run( & spp_pbl=spp_pbl,pattern_spp_pbl=pattern_spp_pbl, & ids=1,ide=im, jds=1,jde=1, kds=1,kde=levs, & ims=1,ime=im, jms=1,jme=1, kms=1,kme=levs, & - its=1,ite=im, jts=1,jte=1, kts=1,kte=levs ) - + its=1,ite=im, jts=1,jte=1, kts=1,kte=levs, & + errmsg=errmsg, errflg=errflg ) + if (errflg/=0) return !! POST MYNN SURFACE LAYER (INTERSTITIAL) WORK: !do i = 1, im diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index c98dc2169..e4251d75d 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -164,7 +164,8 @@ SUBROUTINE SFCLAY_mynn( & spp_pbl,pattern_spp_pbl, & ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte ) + its,ite, jts,jte, kts,kte, & + errmsg, errflg ) !------------------------------------------------------------------- IMPLICIT NONE !------------------------------------------------------------------- @@ -258,6 +259,8 @@ SUBROUTINE SFCLAY_mynn( & !-- jte end index for j in tile !-- kts start index for k in tile !-- kte end index for k in tile +!-- errmsg CCPP error message +!-- errflg CCPP error code !================================================================= ! SCALARS !=================================== @@ -352,9 +355,13 @@ SUBROUTINE SFCLAY_mynn( & & QFLX_wat, QFLX_lnd, QFLX_ice, & & qsfc_wat, qsfc_lnd, qsfc_ice +! CCPP error handling + character(len=*), intent(inout) :: errmsg + integer, intent(inout) :: errflg + !ADDITIONAL OUTPUT !JOE-begin - REAL, DIMENSION( ims:ime ) :: qstar + REAL, DIMENSION( ims:ime ) :: qstar !JOE-end !=================================== ! 1D LOCAL ARRAYS @@ -401,18 +408,13 @@ SUBROUTINE SFCLAY_mynn( & else rstoch1D(i)=0.0 endif + qstar(i)=0.0 ENDDO IF (itimestep==1 .AND. iter==1) THEN DO i=its,ite !Everything here is used before calculated - UST_WAT(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) - UST_LND(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) - UST_ICE(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) MOL(i)=0.0 - qstar(i)=0.0 - QFX(i)=0. - HFX(i)=0. QFLX(i)=0. HFLX(i)=0. if ( LSM == LSM_RUC ) then @@ -461,12 +463,12 @@ SUBROUTINE SFCLAY_mynn( & PSIM,PSIH, & HFLX,HFX,QFLX,QFX,LH,FLHC,FLQC, & QGH,QSFC,U10,V10,TH2,T2,Q2, & - GZ1OZ0,WSPD,wstar, & + GZ1OZ0,WSPD,wstar,qstar, & spp_pbl,rstoch1D, & ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte & - ) + its,ite, jts,jte, kts,kte, & + errmsg, errflg ) END SUBROUTINE SFCLAY_MYNN @@ -509,12 +511,12 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, & HFLX,HFX,QFLX,QFX,LH,FLHC,FLQC, & QGH,QSFC, & U10,V10,TH2,T2,Q2, & - GZ1OZ0,WSPD,wstar, & + GZ1OZ0,WSPD,wstar,qstar, & spp_pbl,rstoch1D, & ids,ide, jds,jde, kds,kde, & ims,ime, jms,jme, kms,kme, & - its,ite, jts,jte, kts,kte & - ) + its,ite, jts,jte, kts,kte, & + errmsg, errflg ) !------------------------------------------------------------------- IMPLICIT NONE @@ -563,9 +565,10 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, & dz8w1d, & dz2w1d - REAL, DIMENSION( ims:ime ), INTENT(INOUT) :: HFLX,HFX, & - QFLX,QFX,LH, & - MOL,RMOL, & + REAL, DIMENSION( ims:ime ), INTENT(OUT) :: QFX,HFX, & + RMOL + REAL, DIMENSION( ims:ime ), INTENT(INOUT) :: HFLX,QFLX, & + LH,MOL, & QGH,QSFC, & ZNT, & ZOL, & @@ -610,8 +613,13 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, & !-------------------------------------------- !JOE-additinal output - REAL, DIMENSION( ims:ime ) :: wstar,qstar + REAL, DIMENSION( ims:ime ), INTENT(OUT) :: wstar,qstar !JOE-end + +! CCPP error handling + character(len=*), intent(inout) :: errmsg + integer, intent(inout) :: errflg + !---------------------------------------------------------------- ! LOCAL VARS !---------------------------------------------------------------- @@ -661,8 +669,8 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, & !------------------------------------------------------------------- DO I=its,ite - ! PSFC ( in cmb) is used later in saturation checks - PSFC(I)=PSFCPA(I)/1000. + ! PSFC ( in cmb) is used later in saturation checks + PSFC(I)=PSFCPA(I)/1000. !tgs - do computations if flag_iter(i) = .true. if ( flag_iter(i) ) then @@ -1224,6 +1232,11 @@ SUBROUTINE SFCLAY1D_mynn(flag_iter, & CALL zilitinkevich_1995(ZNTstoch_lnd(i),ZT_lnd(i),ZQ_lnd(i),restar,& UST_lnd(I),KARMAN,1.0,IZ0TLND,spp_pbl,rstoch1D(i)) ELSEIF ( IZ0TLND .EQ. 2 ) THEN + ! DH note - at this point, qstar is either not initialized + ! or initialized to zero, but certainly not set correctly + errmsg = 'Logic error: qstar is not set correctly when calling Yang_2008' + errflg = 1 + return CALL Yang_2008(ZNTSTOCH_lnd(i),ZT_lnd(i),ZQ_lnd(i),UST_lnd(i),MOL(I),& qstar(I),restar,visc) ELSEIF ( IZ0TLND .EQ. 3 ) THEN From e687c0415c77363ac9315941580263449ef926bc Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Tue, 4 Jan 2022 23:49:47 +0000 Subject: [PATCH 28/45] changes requested by reviewers --- physics/GFS_MP_generic.F90 | 14 ++++++------ physics/GFS_MP_generic.meta | 41 ++++++++++++++++++++--------------- physics/cu_gf_driver.F90 | 43 +++++++++++++++++++++---------------- physics/cu_gf_driver.meta | 40 +++++++++++++++++++++++----------- 4 files changed, 81 insertions(+), 57 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 13453e9f0..36a02aa73 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -93,7 +93,7 @@ subroutine GFS_MP_generic_post_run( graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, & totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, pwat, & drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, & - graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, & + graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, dfi_radar_max_intervals, & dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d, lssav, num_dfi_radar, fh_dfi_radar, & index_of_process_dfi_radar, ix_dfi_radar, dfi_radar_tten, radar_tten_limits, fhour, errmsg, errflg) ! @@ -106,9 +106,10 @@ subroutine GFS_MP_generic_post_run( logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm integer, intent(in) :: index_of_temperature,index_of_process_mp - real(kind=kind_phys), intent(in) :: fh_dfi_radar(5), fhour + integer :: dfi_radar_max_intervals + real(kind=kind_phys), intent(in) :: fh_dfi_radar(dfi_radar_max_intervals+1), fhour real(kind=kind_phys), intent(in) :: radar_tten_limits(2) - integer :: ix_dfi_radar(4) + integer :: ix_dfi_radar(dfi_radar_max_intervals) real(kind=kind_phys), dimension(im,levs), intent(inout) :: gt0 real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin @@ -260,11 +261,8 @@ subroutine GFS_MP_generic_post_run( exit enddo if_radar: if(itime<=num_dfi_radar) then - radar_k: do k=3,levs-2 + radar_k: do k=3,levs-2 ! Avoid model top and bottom in case DA forgets to radar_i: do i=1,im - ! if(dfi_radar_tten(i,k,itime)>-19) then - ! gt0(i,k) = save_t(i,k) + dfi_radar_tten(i,k,itime) - ! endif ttend = dfi_radar_tten(i,k,itime) if_active: if (ttend>-19) then ttend = max(ttend,radar_tten_limits(1)) @@ -283,7 +281,7 @@ subroutine GFS_MP_generic_post_run( if(idtend_mp>0) then dtend(:,1:2,idtend_mp) = dtend(:,1:2,idtend_mp) + (gt0(:,1:2)-save_t(:,1:2))*frain endif - do k=3,levs-2 + do k=3,levs-2 ! Avoid model top and bottom in case DA forgets to do i=1,im ttend = dfi_radar_tten(i,k,itime) if (ttend>-19) then diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 6603da411..7d00573ab 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -96,8 +96,8 @@ kind = kind_phys intent = inout [num_dfi_radar] - standard_name = num_dfi_radar - long_name = number of time ranges with dfi radar tendencies + standard_name = number_of_radar_derived_temperature_or_convection_suppression_intervals + long_name = number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression units = count dimensions = () type = integer @@ -734,33 +734,40 @@ type = real kind = kind_phys intent = in +[dfi_radar_max_intervals] + standard_name = maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals + long_name = maximum allowed number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression + units = count + dimensions = () + type = integer + intent = in [num_dfi_radar] - standard_name = num_dfi_radar - long_name = number of time ranges with dfi radar tendencies + standard_name = number_of_radar_derived_temperature_or_convection_suppression_intervals + long_name = number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression units = count dimensions = () type = integer intent = in [fh_dfi_radar] - standard_name = times_at_which_dfi_radar_tten_is_available - long_name = times at which dfi_radar_tten is available + standard_name = forecast_lead_times_bounding_radar_derived_temperature_or_convection_suppression_intervals + long_name = forecast lead times bounding radar derived temperature or convection suppression intervals units = h - dimensions = (5) + dimensions = (maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals_plus_one) type = real kind = kind_phys intent = in [ix_dfi_radar] - standard_name = time_indices_in_dfi_radar_tten - long_name = time indices in dfi radar tten + standard_name = indices_with_radar_derived_temperature_or_convection_suppression_data + long_name = indices with radar derived temperature or convection suppression data units = index - dimensions = (4) + dimensions = (maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals) type = integer intent = in [dfi_radar_tten] - standard_name = dfi_radar_tten - long_name = prescribed microphysics temperature tendency from radar data - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,num_dfi_radar) + standard_name = radar_derived_microphysics_temperature_tendency + long_name = radar-derived microphysics temperature tendency + units = unitless + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_radar_derived_temperature_or_convection_suppression_intervals) type = real kind = kind_phys intent = in @@ -775,14 +782,14 @@ [radar_tten_limits] standard_name = allowed_bounds_of_radar_prescribed_tendencies long_name = allowed bounds of prescribed microphysics temperature tendencies - units = K + units = K s-1 dimensions = (2) type = real kind = kind_phys intent = in [index_of_process_dfi_radar] - standard_name = index_of_radar_mp_temperature_forcing_in_cumulative_change_index - long_name = index of radar mp temperature forcing in second dimension of array cumulative change index + standard_name = index_of_radar_derived_microphysics_temperature_forcing_in_cumulative_change_index + long_name = index of radar-derived microphysics temperature forcing in second dimension of array cumulative change index units = index dimensions = () type = integer diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index 7bb127579..be19f7482 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -83,8 +83,9 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& flag_for_scnv_generic_tend,flag_for_dcnv_generic_tend, & dtend,dtidx,ntqv,ntiw,ntcw,index_of_temperature,index_of_x_wind, & index_of_y_wind,index_of_process_scnv,index_of_process_dcnv, & - fhour,fh_dfi_radar,ix_dfi_radar,num_dfi_radar,dfi_radar_tten, & - ldiag3d,qci_conv,errmsg,errflg) + fhour,fh_dfi_radar,ix_dfi_radar,num_dfi_radar,cap_suppress, & + dfi_radar_max_intervals,ldiag3d,qci_conv,do_cap_suppress, & + errmsg,errflg) !------------------------------------------------------------- implicit none integer, parameter :: maxiens=1 @@ -99,6 +100,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& integer, parameter :: ichoicem=13 ! 0 2 5 13 integer, parameter :: ichoice_s=3 ! 0 1 2 3 + logical, intent(in) :: do_cap_suppress real(kind=kind_phys), parameter :: aodc0=0.14 real(kind=kind_phys), parameter :: aodreturn=30. real(kind=kind_phys) :: dts,fpi,fp @@ -126,9 +128,10 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& real(kind=kind_phys), allocatable :: clcw_save(:,:), cliw_save(:,:) - real(kind=kind_phys), intent(in) :: fhour, fh_dfi_radar(5) - integer, intent(in) :: num_dfi_radar, ix_dfi_radar(4) - real(kind=kind_phys), intent(in), pointer :: dfi_radar_tten(:,:,:) + integer, intent(in) :: dfi_radar_max_intervals + real(kind=kind_phys), intent(in) :: fhour, fh_dfi_radar(dfi_radar_max_intervals+1) + integer, intent(in) :: num_dfi_radar, ix_dfi_radar(dfi_radar_max_intervals) + real(kind=kind_phys), intent(in), pointer :: cap_suppress(:,:) integer, dimension (:), intent(out) :: hbot,htop,kcnv integer, dimension (:), intent(in) :: xland @@ -219,7 +222,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& integer :: cliw_deep_idx, clcw_deep_idx, cliw_shal_idx, clcw_shal_idx real(kind=kind_phys) :: cap_suppress_j(im) - integer :: itime, do_cap_suppress + integer :: itime, do_cap_suppress_here !parameter (tf=243.16, tcr=270.16, tcrf=1.0/(tcr-tf)) ! FV3 original !parameter (tf=263.16, tcr=273.16, tcrf=1.0/(tcr-tf)) @@ -229,19 +232,21 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& errmsg = '' errflg = 0 - do itime=1,num_dfi_radar - if(ix_dfi_radar(itime)<1) cycle - if(fhour=fh_dfi_radar(itime+1)) cycle - exit - enddo - if_radar: if(itime<=num_dfi_radar) then - do_cap_suppress = 1 - cap_suppress_j = dfi_radar_tten(:,1,itime) + if(do_cap_suppress) then + do itime=1,num_dfi_radar + if(ix_dfi_radar(itime)<1) cycle + if(fhour=fh_dfi_radar(itime+1)) cycle + exit + enddo + endif + if(do_cap_suppress .and. itime<=num_dfi_radar) then + do_cap_suppress_here = 1 + cap_suppress_j = cap_suppress(:,itime) else - do_cap_suppress = 0 + do_cap_suppress_here = 0 cap_suppress_j = 0 - endif if_radar + endif if(ldiag3d) then if(flag_for_dcnv_generic_tend) then @@ -665,7 +670,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& ! more is possible, talk to developer or ! implement yourself. pattern is expected to be ! betwee -1 and +1 - ,do_cap_suppress,cap_suppress_j & + ,do_cap_suppress_here,cap_suppress_j & ,k22m & ,jminm,tropics) @@ -746,7 +751,7 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& ! more is possible, talk to developer or ! implement yourself. pattern is expected to be ! betwee -1 and +1 - ,do_cap_suppress,cap_suppress_j & + ,do_cap_suppress_here,cap_suppress_j & ,k22 & ,jmin,tropics) jpr=0 diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index 7f324cf35..3fb9fe232 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -486,6 +486,13 @@ dimensions = () type = integer intent = in +[dfi_radar_max_intervals] + standard_name = maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals + long_name = maximum allowed number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression + units = count + dimensions = () + type = integer + intent = in [ldiag3d] standard_name = flag_for_diagnostics_3D long_name = flag for 3d diagnostic fields @@ -509,33 +516,40 @@ type = real kind = kind_phys intent = in +[do_cap_suppress] + standard_name = flag_for_radar_derived_convection_suppression + long_name = flag for radar-derived convection suppression + units = flag + dimensions = () + type = logical + intent = in [fh_dfi_radar] - standard_name = times_at_which_dfi_radar_tten_is_available - long_name = times at which dfi_radar_tten is available + standard_name = forecast_lead_times_bounding_radar_derived_temperature_or_convection_suppression_intervals + long_name = forecast lead times bounding radar derived temperature or convection suppression intervals units = h - dimensions = (5) + dimensions = (maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals_plus_one) type = real kind = kind_phys intent = in [ix_dfi_radar] - standard_name = time_indices_in_dfi_radar_tten - long_name = time indices in dfi radar tten + standard_name = indices_with_radar_derived_temperature_or_convection_suppression_data + long_name = indices with radar derived temperature or convection suppression data units = index - dimensions = (4) + dimensions = (maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals) type = integer intent = in [num_dfi_radar] - standard_name = num_dfi_radar - long_name = number of time ranges with dfi radar tendencies + standard_name = number_of_radar_derived_temperature_or_convection_suppression_intervals + long_name = number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression units = count dimensions = () type = integer intent = in -[dfi_radar_tten] - standard_name = dfi_radar_tten - long_name = prescribed microphysics temperature tendency from radar data - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,num_dfi_radar) +[cap_suppress] + standard_name = radar_derived_convection_suppression + long_name = radar-derived convection suppression + units = unitless + dimensions = (horizontal_loop_extent,number_of_radar_derived_temperature_or_convection_suppression_intervals) type = real kind = kind_phys intent = in From 037e5647de3a4137c1cd7bac3a2e6bafdb1f09d4 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Wed, 5 Jan 2022 00:29:09 +0000 Subject: [PATCH 29/45] add units to standard_name = radar_derived_microphysics_temperature_tendency variable --- physics/GFS_MP_generic.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 7d00573ab..1bcbf4ab1 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -766,7 +766,7 @@ [dfi_radar_tten] standard_name = radar_derived_microphysics_temperature_tendency long_name = radar-derived microphysics temperature tendency - units = unitless + units = K s-1 dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_radar_derived_temperature_or_convection_suppression_intervals) type = real kind = kind_phys From 88fcf4cbf8b41cfd5424782acf5edf5effc5ae45 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 6 Jan 2022 14:48:46 +0000 Subject: [PATCH 30/45] updating GFS_surface_composites to address crash in cpld_debug_p7 --- physics/GFS_surface_composites.F90 | 56 ++++++++++++++++++++++++----- physics/GFS_surface_composites.meta | 55 ++++++++++++++++++++++++---- 2 files changed, 95 insertions(+), 16 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index b2c59d32c..1175dac41 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -30,27 +30,29 @@ end subroutine GFS_surface_composites_pre_finalize subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, frac_grid, & flag_cice, cplflx, cplice, cplwav2atm, landfrac, lakefrac, lakedepth, oceanfrac, frland, & dry, icy, lake, use_flake, wet, hice, cice, zorlo, zorll, zorli, & - tprcp, tprcp_wat, tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & - ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, tisfc, tsurf_wat, tsurf_lnd, tsurf_ice, & + snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & + tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & + weasd, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & + tisfc, tsurf_wat, tsurf_lnd, tsurf_ice, & gflx_ice, tgice, islmsk, islmsk_cice, slmsk, qss, qss_wat, qss_lnd, qss_ice, & - min_lakeice, min_seaice, kdt, huge, errmsg, errflg) + min_lakeice, min_seaice, huge, errmsg, errflg) implicit none ! Interface variables - integer, intent(in ) :: im, lkm, kdt + integer, intent(in ) :: im, lkm logical, intent(in ) :: flag_init, flag_restart, frac_grid, cplflx, cplice, cplwav2atm logical, dimension(:), intent(inout) :: flag_cice logical, dimension(:), intent(inout) :: dry, icy, lake, use_flake, wet real(kind=kind_phys), dimension(:), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac real(kind=kind_phys), dimension(:), intent(inout) :: cice, hice real(kind=kind_phys), dimension(:), intent( out) :: frland - real(kind=kind_phys), dimension(:), intent(in ) :: tprcp, uustar, qss + real(kind=kind_phys), dimension(:), intent(in ) :: snowd, tprcp, uustar, weasd, qss real(kind=kind_phys), dimension(:), intent(inout) :: tsfc, tsfco, tsfcl, tisfc - real(kind=kind_phys), dimension(:), intent(inout) :: tprcp_wat, & + real(kind=kind_phys), dimension(:), intent(inout) :: snowd_lnd, snowd_ice, tprcp_wat, & tprcp_lnd, tprcp_ice, tsfc_wat, tsurf_wat,tsurf_lnd, tsurf_ice, & - uustar_wat, uustar_lnd, uustar_ice, & + uustar_wat, uustar_lnd, uustar_ice, weasd_lnd, weasd_ice, & qss_wat, qss_lnd, qss_ice, ep1d_ice, gflx_ice real(kind=kind_phys), intent(in ) :: tgice integer, dimension(:), intent(inout) :: islmsk, islmsk_cice @@ -62,6 +64,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra real(kind=kind_phys), parameter :: timin = 173.0_kind_phys ! minimum temperature allowed for snow/ice real(kind=kind_phys) :: tem + logical :: icy_old(im) ! CCPP error handling character(len=*), intent(out) :: errmsg @@ -74,6 +77,9 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra errmsg = '' errflg = 0 + do i=1,im + icy_old(i) = icy(i) + enddo if (frac_grid) then ! cice is ice fraction wrt water area do i=1,im frland(i) = landfrac(i) @@ -209,7 +215,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra uustar_wat(i) = uustar(i) tsfc_wat(i) = tsfco(i) tsurf_wat(i) = tsfco(i) - zorlo(i) = max(1.0e-5, min(one, zorlo(i))) + zorlo(i) = max(1.0e-5, min(one, zorlo(i))) ! DH* else zorlo(i) = huge @@ -217,6 +223,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif if (dry(i)) then ! Land uustar_lnd(i) = uustar(i) + weasd_lnd(i) = weasd(i) tsurf_lnd(i) = tsfcl(i) ! DH* else @@ -227,10 +234,11 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif if (icy(i)) then ! Ice uustar_ice(i) = uustar(i) + weasd_ice(i) = weasd(i) tsurf_ice(i) = tisfc(i) ep1d_ice(i) = zero gflx_ice(i) = zero - zorli(i) = max(1.0e-5, min(one, zorli(i))) + zorli(i) = max(1.0e-5, min(one, zorli(i))) ! DH* else zorli(i) = huge @@ -254,6 +262,36 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif enddo ! + if (frac_grid) then + do i=1,im + if (dry(i)) then + if (icy(i) .and. .not. icy_old(i)) then + tem = one / (cice(i)*(one-frland(i))) + snowd_ice(i) = max(zero, (snowd(i) - snowd_lnd(i)*frland(i)) * tem) + weasd_ice(i) = max(zero, (weasd(i) - weasd_lnd(i)*frland(i)) * tem) + endif + elseif (icy(i) .and. .not. icy_old(i)) then + tem = one / cice(i) + snowd_lnd(i) = zero + snowd_ice(i) = snowd(i) * tem + weasd_lnd(i) = zero + weasd_ice(i) = weasd(i) * tem + endif + enddo + else + do i=1,im + if (icy(i) .and. .not. icy_old(i)) then + snowd_lnd(i) = zero + weasd_lnd(i) = zero + tem = one / cice(i) + snowd_ice(i) = snowd(i) * tem + weasd_ice(i) = weasd(i) * tem + endif + enddo + endif + +! write(0,*)' minmax of ice snow=',minval(snowd_ice),maxval(snowd_ice) + end subroutine GFS_surface_composites_pre_run end module GFS_surface_composites_pre diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 35f5552e9..2f7b451b1 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -185,6 +185,30 @@ type = real kind = kind_phys intent = inout +[snowd] + standard_name = lwe_surface_snow + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[snowd_lnd] + standard_name = surface_snow_thickness_water_equivalent_over_land + long_name = water equivalent snow depth over land + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout +[snowd_ice] + standard_name = surface_snow_thickness_water_equivalent_over_ice + long_name = water equivalent snow depth over ice + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout [tprcp] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step @@ -249,6 +273,30 @@ type = real kind = kind_phys intent = inout +[weasd] + standard_name = lwe_thickness_of_surface_snow_amount + long_name = water equiv of acc snow depth over land and sea ice + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in +[weasd_lnd] + standard_name = water_equivalent_accumulated_snow_depth_over_land + long_name = water equiv of acc snow depth over land + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout +[weasd_ice] + standard_name = water_equivalent_accumulated_snow_depth_over_ice + long_name = water equiv of acc snow depth over ice + units = mm + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout [ep1d_ice] standard_name = surface_upward_potential_latent_heat_flux_over_ice long_name = surface upward potential latent heat flux over ice @@ -407,13 +455,6 @@ type = real kind = kind_phys intent = in -[kdt] - standard_name = index_of_timestep - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in [huge] standard_name = netcdf_float_fillvalue long_name = definition of NetCDF float FillValue From cd92c4c40a6dade4a1b5e7db1a307b7916a69ddf Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 6 Jan 2022 08:43:10 -0700 Subject: [PATCH 31/45] Put back initialization of ustar_{lnd,ice,wat} in physics/module_sf_mynn.F90 --- physics/module_sf_mynn.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/physics/module_sf_mynn.F90 b/physics/module_sf_mynn.F90 index e4251d75d..1eeefd2b1 100644 --- a/physics/module_sf_mynn.F90 +++ b/physics/module_sf_mynn.F90 @@ -414,6 +414,9 @@ SUBROUTINE SFCLAY_mynn( & IF (itimestep==1 .AND. iter==1) THEN DO i=its,ite !Everything here is used before calculated + UST_WAT(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + UST_LND(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) + UST_ICE(i)=MAX(0.04*SQRT(U1D(i)*U1D(i) + V1D(i)*V1D(i)),0.001) MOL(i)=0.0 QFLX(i)=0. HFLX(i)=0. From 01a91fa9f03b4e956a18423ccde6d6861ad8f682 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 6 Jan 2022 16:47:34 +0000 Subject: [PATCH 32/45] reverting some change --- physics/GFS_surface_composites.F90 | 60 ++++++++++++++--------------- physics/GFS_surface_composites.meta | 7 ++++ 2 files changed, 36 insertions(+), 31 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 1175dac41..057ec4946 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -35,12 +35,12 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra weasd, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & tisfc, tsurf_wat, tsurf_lnd, tsurf_ice, & gflx_ice, tgice, islmsk, islmsk_cice, slmsk, qss, qss_wat, qss_lnd, qss_ice, & - min_lakeice, min_seaice, huge, errmsg, errflg) + min_lakeice, min_seaice, kdt, huge, errmsg, errflg) implicit none ! Interface variables - integer, intent(in ) :: im, lkm + integer, intent(in ) :: im, lkm, kdt logical, intent(in ) :: flag_init, flag_restart, frac_grid, cplflx, cplice, cplwav2atm logical, dimension(:), intent(inout) :: flag_cice logical, dimension(:), intent(inout) :: dry, icy, lake, use_flake, wet @@ -64,7 +64,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra real(kind=kind_phys), parameter :: timin = 173.0_kind_phys ! minimum temperature allowed for snow/ice real(kind=kind_phys) :: tem - logical :: icy_old(im) ! CCPP error handling character(len=*), intent(out) :: errmsg @@ -77,9 +76,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra errmsg = '' errflg = 0 - do i=1,im - icy_old(i) = icy(i) - enddo if (frac_grid) then ! cice is ice fraction wrt water area do i=1,im frland(i) = landfrac(i) @@ -262,32 +258,34 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif enddo ! - if (frac_grid) then - do i=1,im - if (dry(i)) then - if (icy(i) .and. .not. icy_old(i)) then - tem = one / (cice(i)*(one-frland(i))) - snowd_ice(i) = max(zero, (snowd(i) - snowd_lnd(i)*frland(i)) * tem) - weasd_ice(i) = max(zero, (weasd(i) - weasd_lnd(i)*frland(i)) * tem) + if (.not. cplflx .or. kdt == 1) then + if (frac_grid) then + do i=1,im + if (dry(i)) then + if (icy(i)) then + tem = one / (cice(i)*(one-frland(i))) + snowd_ice(i) = max(zero, (snowd(i) - snowd_lnd(i)*frland(i)) * tem) + weasd_ice(i) = max(zero, (weasd(i) - weasd_lnd(i)*frland(i)) * tem) + endif + elseif (icy(i)) then + tem = one / cice(i) + snowd_lnd(i) = zero + snowd_ice(i) = snowd(i) * tem + weasd_lnd(i) = zero + weasd_ice(i) = weasd(i) * tem endif - elseif (icy(i) .and. .not. icy_old(i)) then - tem = one / cice(i) - snowd_lnd(i) = zero - snowd_ice(i) = snowd(i) * tem - weasd_lnd(i) = zero - weasd_ice(i) = weasd(i) * tem - endif - enddo - else - do i=1,im - if (icy(i) .and. .not. icy_old(i)) then - snowd_lnd(i) = zero - weasd_lnd(i) = zero - tem = one / cice(i) - snowd_ice(i) = snowd(i) * tem - weasd_ice(i) = weasd(i) * tem - endif - enddo + enddo + else + do i=1,im + if (icy(i)) then + snowd_lnd(i) = zero + weasd_lnd(i) = zero + tem = one / cice(i) + snowd_ice(i) = snowd(i) * tem + weasd_ice(i) = weasd(i) * tem + endif + enddo + endif endif ! write(0,*)' minmax of ice snow=',minval(snowd_ice),maxval(snowd_ice) diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index 2f7b451b1..fde52ed23 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -455,6 +455,13 @@ type = real kind = kind_phys intent = in +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in [huge] standard_name = netcdf_float_fillvalue long_name = definition of NetCDF float FillValue From 30a7afd6973547a78b5f1f8524e72b16c7674f71 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 6 Jan 2022 17:32:30 +0000 Subject: [PATCH 33/45] still more mods --- physics/GFS_surface_composites.F90 | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 057ec4946..ae30aa21f 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -258,34 +258,37 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif enddo ! - if (.not. cplflx .or. kdt == 1) then - if (frac_grid) then - do i=1,im - if (dry(i)) then - if (icy(i)) then + if (frac_grid) then + do i=1,im + if (dry(i)) then + if (icy(i)) then + if (kdt == 1 .or. (.not. cplflx .and. lakefrac(i) > zero)) then tem = one / (cice(i)*(one-frland(i))) snowd_ice(i) = max(zero, (snowd(i) - snowd_lnd(i)*frland(i)) * tem) weasd_ice(i) = max(zero, (weasd(i) - weasd_lnd(i)*frland(i)) * tem) endif - elseif (icy(i)) then + endif + elseif (icy(i)) then + if (kdt == 1 .or. (.not. cplflx .and. lakefrac(i) > zero)) then tem = one / cice(i) snowd_lnd(i) = zero snowd_ice(i) = snowd(i) * tem weasd_lnd(i) = zero weasd_ice(i) = weasd(i) * tem endif - enddo - else - do i=1,im - if (icy(i)) then + endif + enddo + do i=1,im + if (icy(i)) then + if (kdt == 1 .or. (.not. cplflx .and. lakefrac(i) > zero)) then snowd_lnd(i) = zero weasd_lnd(i) = zero tem = one / cice(i) snowd_ice(i) = snowd(i) * tem weasd_ice(i) = weasd(i) * tem endif - enddo - endif + endif + enddo endif ! write(0,*)' minmax of ice snow=',minval(snowd_ice),maxval(snowd_ice) From 7a708756e8f4cde4166191c72f559e1c847db33a Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Thu, 6 Jan 2022 17:44:25 +0000 Subject: [PATCH 34/45] yet more mods --- physics/GFS_surface_composites.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index ae30aa21f..bd61a0c4d 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -262,14 +262,14 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra do i=1,im if (dry(i)) then if (icy(i)) then - if (kdt == 1 .or. (.not. cplflx .and. lakefrac(i) > zero)) then + if (kdt == 1 .or. (.not. cplflx .or. lakefrac(i) > zero)) then tem = one / (cice(i)*(one-frland(i))) snowd_ice(i) = max(zero, (snowd(i) - snowd_lnd(i)*frland(i)) * tem) weasd_ice(i) = max(zero, (weasd(i) - weasd_lnd(i)*frland(i)) * tem) endif endif elseif (icy(i)) then - if (kdt == 1 .or. (.not. cplflx .and. lakefrac(i) > zero)) then + if (kdt == 1 .or. (.not. cplflx .or. lakefrac(i) > zero)) then tem = one / cice(i) snowd_lnd(i) = zero snowd_ice(i) = snowd(i) * tem @@ -280,7 +280,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra enddo do i=1,im if (icy(i)) then - if (kdt == 1 .or. (.not. cplflx .and. lakefrac(i) > zero)) then + if (kdt == 1 .or. (.not. cplflx .or. lakefrac(i) > zero)) then snowd_lnd(i) = zero weasd_lnd(i) = zero tem = one / cice(i) From 5a933125338806e4542f51d9912f513ee5a620c8 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jan 2022 11:09:29 -0700 Subject: [PATCH 35/45] alter aerosol surface emission based on a WRF change tested by Jimy Dudhia --- physics/mp_thompson.F90 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/physics/mp_thompson.F90 b/physics/mp_thompson.F90 index e96f0e112..d60b9f77f 100644 --- a/physics/mp_thompson.F90 +++ b/physics/mp_thompson.F90 @@ -91,7 +91,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, & real(kind_phys) :: orho(1:ncol,1:nlev) ! m3 kg-1 real(kind_phys) :: nc_local(1:ncol,1:nlev) ! needed because nc is only allocated if is_aerosol_aware is true ! - real (kind=kind_phys) :: h_01, airmass, niIN3, niCCN3 + real (kind=kind_phys) :: h_01, z1, niIN3, niCCN3 integer :: i, k ! Initialize the CCPP error handling variables @@ -192,8 +192,8 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, & endif niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 nwfa(i,1) = naCCN1+naCCN0*exp(-((hgt(i,2)-hgt(i,1))/1000.)*niCCN3) - airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*5.E-11) + z1 = hgt(i,2)-hgt(i,1) + nwfa2d(i) = nwfa(i,1) * 0.000196 * (50./z1) do k = 2, nlev nwfa(i,k) = naCCN1+naCCN0*exp(-((hgt(i,k)-hgt(i,1))/1000.)*niCCN3) enddo @@ -212,8 +212,8 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, & !+---+-----------------------------------------------------------------+ if (mpirank==mpiroot) write(*,*) ' Apparently there are no initial CCN aerosol surface emission rates.' do i = 1, ncol - airmass = 1./orho(i,1) * (hgt(i,2)-hgt(i,1))*area(i) ! kg - nwfa2d(i) = nwfa(i,1) * 0.000196 * (airmass*5.E-11) + z1 = hgt(i,2)-hgt(i,1) + nwfa2d(i) = nwfa(i,1) * 0.000196 * (50./z1) enddo else if (mpirank==mpiroot) write(*,*) ' Apparently initial CCN aerosol surface emission rates are present.' From a45d641173850a9aa7ec398a8176254d8f587bca Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jan 2022 11:19:59 -0700 Subject: [PATCH 36/45] one more tuning for reducing cloud ice amounts in partly cloudy boxes --- physics/radiation_clouds.f | 40 ++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 87a9620b2..3122a0c43 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3164,7 +3164,8 @@ subroutine progcld6 & enddo enddo - ! What portion of water and ice contents is associated with the partly cloudy boxes + ! What portion of water and ice contents is associated with the + ! partly cloudy boxes do i = 1, IX do k = 1, NLAY-1 if (cldtot(i,k).ge.climit .and. cldtot(i,k).lt.ovcst) then @@ -3311,7 +3312,7 @@ subroutine progcld_thompson & ! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! ! dz (ix,nlay) : layer thickness (km) ! ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! -! gridkm (ix) : grid length in km ! +! gridkm (IX) : grid length in km ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! ! uni_cld : logical - true for cloud fraction from shoc ! @@ -3445,14 +3446,14 @@ subroutine progcld_thompson & enddo !> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . -!> - Since using Thompson MP, assume 20 percent of snow is actually in +!> - Since using Thompson MP, assume 1 percent of snow is actually in !! ice sizes. do k = 1, NLAY-1 do i = 1, IX cwp(i,k) = max(0.0, clw(i,k,ntcw) * dz(i,k)*1.E6) crp(i,k) = 0.0 - snow_mass_factor = 0.90 + snow_mass_factor = 0.99 cip(i,k) = max(0.0, (clw(i,k,ntiw) & & + (1.0-snow_mass_factor)*clw(i,k,ntsw))*dz(i,k)*1.E6) if (re_snow(i,k) .gt. snow_max_radius)then @@ -4536,12 +4537,12 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & RH_00O = 0.85+MIN(0.14,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) RHUM = rh(k) - if (qc(k).ge.1.E-5 .or. qi(k).ge.1.E-5 & - & .or. (qs(k).gt.1.E-5 .and. t(k).lt.273.)) then + if (qc(k).ge.1.E-6 .or. qi(k).ge.1.E-7 & + & .or. (qs(k).gt.1.E-6 .and. t(k).lt.273.)) then CLDFRA(K) = 1.0 elseif (((qc(k)+qi(k)).gt.1.E-10) .and. & - & ((qc(k)+qi(k)).lt.1.E-5)) then - CLDFRA(K) = MIN(0.99, 0.20*(10.0 + log10(qc(k)+qi(k)))) + & ((qc(k)+qi(k)).lt.1.E-6)) then + CLDFRA(K) = MIN(0.99, 0.1*(11.0 + log10(qc(k)+qi(k)))) else IF ((XLAND-1.5).GT.0.) THEN !--- Ocean @@ -4585,15 +4586,6 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & call adjust_cloudFinal(cldfra, qc, qi, rhoa, dz, kts,kte) - if (debug_flag .and. ndebug.lt.25) then - do k = kts,kte - write(6,'(a,i3,f9.2,f7.1,f7.2,f6.1,f6.3,f12.7,f12.7,f12.7)') & - & ' DEBUG-GT: ', k, p(k)*0.01, dz(k), t(k)-273.15, & - & rh(k)*100., cldfra(k), qc(k)*1.E3, qi(k)*1.E3, qs(k)*1.E3 - enddo - ndebug = ndebug + 1 - endif - !..Intended for cold start model runs, we use modify_qvapor to ensure that cloudy !.. areas are actually saturated such that the inserted clouds do not evaporate a !.. timestep later. @@ -4735,9 +4727,9 @@ SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, Dz1d, entrmnt,& k = k - 1 ENDDO - k_cldb = k_m12C + 5 + k_cldb = k_m12C + 3 in_cloud = .false. - k = k_m12C + 4 + k = k_m12C + 2 DO WHILE (.not. in_cloud .AND. k.gt.kbot) k_cldt = 0 if (cfr1d(k).ge.0.01) then @@ -4786,7 +4778,8 @@ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte) do k = k1, k2 tdz = tdz + dz(k) enddo - max_iwc = ABS(qvs(k2)-qvs(k1)) +! max_iwc = ABS(qvs(k2)-qvs(k1)) + max_iwc = MAX(0.0, qvs(k1)-qvs(k2)) do k = k1, k2 max_iwc = MAX(1.E-6, max_iwc - (qi(k)+qs(k))) @@ -4826,7 +4819,8 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) do k = k1, k2 tdz = tdz + dz(k) enddo - max_lwc = ABS(qvs(k2)-qvs(k1)) +! max_lwc = ABS(qvs(k2)-qvs(k1)) + max_lwc = MAX(0.0, qvs(k1)-qvs(k2)) ! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz do k = k1, k2 @@ -4843,7 +4837,7 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) endif this_lwc = max_lwc*this_dz/tdz lwc = MAX(1.E-6, this_lwc*(1.-entr)) - if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.253.16) then + if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.258.16) then qc(k) = qc(k) + cfr(k)*cfr(k)*lwc endif enddo @@ -4895,6 +4889,6 @@ SUBROUTINE adjust_cloudFinal(cfr, qc, qi, Rho,dz, kts,kte) END SUBROUTINE adjust_cloudFinal !........................................! - end module module_radiation_clouds ! + end module module_radiation_clouds !! @} !========================================! From 2181d0c6e19df42ed0a50f195068519fa06b2a43 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Thu, 6 Jan 2022 11:22:31 -0700 Subject: [PATCH 37/45] reduce max ice number conc to fewer than 500 per liter of air --- physics/module_mp_thompson.F90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/physics/module_mp_thompson.F90 b/physics/module_mp_thompson.F90 index 3183ca4bf..c5bc99e17 100644 --- a/physics/module_mp_thompson.F90 +++ b/physics/module_mp_thompson.F90 @@ -2188,7 +2188,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & ni(k) = MAX(R2, ni1d(k)*rho(k)) if (ni(k).le. R2) then lami = cie(2)/5.E-6 - ni(k) = MIN(999.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) + ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) endif L_qi(k) = .true. lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi @@ -2196,7 +2196,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xDi = (bm_i + mu_i + 1.) * ilami if (xDi.lt. 5.E-6) then lami = cie(2)/5.E-6 - ni(k) = MIN(999.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) + ni(k) = MIN(499.D3, cig(1)*oig2*ri(k)/am_i*lami**bm_i) elseif (xDi.gt. 300.E-6) then lami = cie(2)/300.E-6 ni(k) = cig(1)*oig2*ri(k)/am_i*lami**bm_i @@ -2901,7 +2901,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & !> - Freezing of aqueous aerosols based on Koop et al (2001, Nature) xni = smo0(k)+ni(k) + (pni_rfz(k)+pni_wfz(k)+pni_inu(k))*dtsave - if (is_aerosol_aware .AND. homogIce .AND. (xni.le.999.E3) & + if (is_aerosol_aware .AND. homogIce .AND. (xni.le.499.E3) & & .AND.(temp(k).lt.238).AND.(ssati(k).ge.0.4) ) then xnc = iceKoop(temp(k),qv(k),qvs(k),nwfa(k), dtsave) pni_iha(k) = xnc*odts @@ -3237,7 +3237,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & xDi = (bm_i + mu_i + 1.) * ilami if (xDi.lt. 5.E-6) then lami = cie(2)/5.E-6 - xni = MIN(999.D3, cig(1)*oig2*xri/am_i*lami**bm_i) + xni = MIN(499.D3, cig(1)*oig2*xri/am_i*lami**bm_i) niten(k) = (xni-ni1d(k)*rho(k))*odts*orho elseif (xDi.gt. 300.E-6) then lami = cie(2)/300.E-6 @@ -3248,8 +3248,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & niten(k) = -ni1d(k)*odts endif xni=MAX(0.,(ni1d(k) + niten(k)*dtsave)*rho(k)) - if (xni.gt.999.E3) & - niten(k) = (999.E3-ni1d(k)*rho(k))*odts*orho + if (xni.gt.499.E3) & + niten(k) = (499.E3-ni1d(k)*rho(k))*odts*orho !> - Rain tendency qrten(k) = qrten(k) + (prr_wau(k) + prr_rcw(k) & @@ -4187,7 +4187,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, & lami = cie(2)/300.E-6 endif ni1d(k) = MIN(cig(1)*oig2*qi1d(k)/am_i*lami**bm_i, & - 999.D3/rho(k)) + 499.D3/rho(k)) endif qr1d(k) = qr1d(k) + qrten(k)*DT nr1d(k) = MAX(R2/rho(k), nr1d(k) + nrten(k)*DT) From 8d97f46a76c2f185cc365b6a380024bcc4e0efd7 Mon Sep 17 00:00:00 2001 From: "Shrinivas.Moorthi" Date: Fri, 7 Jan 2022 00:34:10 +0000 Subject: [PATCH 38/45] fix a typo --- physics/GFS_surface_composites.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/physics/GFS_surface_composites.F90 b/physics/GFS_surface_composites.F90 index 14fc3b520..510b3f427 100644 --- a/physics/GFS_surface_composites.F90 +++ b/physics/GFS_surface_composites.F90 @@ -278,6 +278,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra endif endif enddo + else do i=1,im if (icy(i)) then if (kdt == 1 .or. (.not. cplflx .or. lakefrac(i) > zero)) then From 7072fbe9a702dd9637e236868def83c40af4657d Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 7 Jan 2022 16:55:03 +0000 Subject: [PATCH 39/45] Switch from specified dimensions to implied shape ( (:,:) instead of (n,m) ) --- physics/GFS_MP_generic.F90 | 10 +++++----- physics/cu_gf_driver.F90 | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 36a02aa73..7831b2275 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -106,11 +106,11 @@ subroutine GFS_MP_generic_post_run( logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm integer, intent(in) :: index_of_temperature,index_of_process_mp - integer :: dfi_radar_max_intervals - real(kind=kind_phys), intent(in) :: fh_dfi_radar(dfi_radar_max_intervals+1), fhour - real(kind=kind_phys), intent(in) :: radar_tten_limits(2) - integer :: ix_dfi_radar(dfi_radar_max_intervals) - real(kind=kind_phys), dimension(im,levs), intent(inout) :: gt0 + integer :: dfi_radar_max_intervals + real(kind=kind_phys), intent(in) :: fh_dfi_radar(:), fhour + real(kind=kind_phys), intent(in) :: radar_tten_limits(:) + integer :: ix_dfi_radar(:) + real(kind=kind_phys), dimension(:,:), intent(inout) :: gt0 real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin real(kind=kind_phys), dimension(:), intent(in) :: rain1, xlat, xlon, tsfc diff --git a/physics/cu_gf_driver.F90 b/physics/cu_gf_driver.F90 index be19f7482..f83f673ba 100644 --- a/physics/cu_gf_driver.F90 +++ b/physics/cu_gf_driver.F90 @@ -129,9 +129,9 @@ subroutine cu_gf_driver_run(ntracer,garea,im,km,dt,flag_init,flag_restart,& real(kind=kind_phys), allocatable :: clcw_save(:,:), cliw_save(:,:) integer, intent(in) :: dfi_radar_max_intervals - real(kind=kind_phys), intent(in) :: fhour, fh_dfi_radar(dfi_radar_max_intervals+1) - integer, intent(in) :: num_dfi_radar, ix_dfi_radar(dfi_radar_max_intervals) - real(kind=kind_phys), intent(in), pointer :: cap_suppress(:,:) + real(kind=kind_phys), intent(in) :: fhour, fh_dfi_radar(:) + integer, intent(in) :: num_dfi_radar, ix_dfi_radar(:) + real(kind=kind_phys), intent(in) :: cap_suppress(:,:) integer, dimension (:), intent(out) :: hbot,htop,kcnv integer, dimension (:), intent(in) :: xland From 64d8f215453e358ec8749d229fc76934694312bc Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 7 Jan 2022 17:55:13 +0000 Subject: [PATCH 40/45] Remove a pointer --- physics/GFS_MP_generic.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GFS_MP_generic.F90 b/physics/GFS_MP_generic.F90 index 7831b2275..cb072068e 100644 --- a/physics/GFS_MP_generic.F90 +++ b/physics/GFS_MP_generic.F90 @@ -121,7 +121,7 @@ subroutine GFS_MP_generic_post_run( real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, phii real(kind=kind_phys), dimension(:,:,:), intent(in) :: gq0, save_q - real(kind=kind_phys), dimension(:,:,:), pointer, intent(in) :: dfi_radar_tten + real(kind=kind_phys), dimension(:,:,:), intent(in) :: dfi_radar_tten real(kind=kind_phys), dimension(:), intent(in ) :: sr real(kind=kind_phys), dimension(:), intent(inout) :: rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, & From 1a72e9891b8580537fa13e400c7850248b1e8bf4 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sun, 9 Jan 2022 09:08:15 -0700 Subject: [PATCH 41/45] Bugfix for cloud effective radii computation: scale local arrays from m to micron --- physics/GFS_rrtmg_pre.F90 | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 80caf766e..0e398b1b9 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -818,28 +818,24 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & call calc_effectRad (tlyr(i,:), plyr(i,:)*100., qv_mp(i,:), qc_mp(i,:), & nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), & effrl(i,:), effri(i,:), effrs(i,:), 1, lm ) + ! Scale Thompson's effective radii from meter to micron do k=1,lm - effrl(i,k) = MAX(re_qc_min, MIN(effrl(i,k), re_qc_max)) - effri(i,k) = MAX(re_qi_min, MIN(effri(i,k), re_qi_max)) - effrs(i,k) = MAX(re_qs_min, MIN(effrs(i,k), re_qs_max)) + effrl(i,k) = MAX(re_qc_min, MIN(effrl(i,k), re_qc_max))*1.e6 + effri(i,k) = MAX(re_qi_min, MIN(effri(i,k), re_qi_max))*1.e6 + effrs(i,k) = MAX(re_qs_min, MIN(effrs(i,k), re_qs_max))*1.e6 end do - effrl(i,lmk) = re_qc_min - effri(i,lmk) = re_qi_min - effrs(i,lmk) = re_qs_min + effrl(i,lmk) = re_qc_min*1.e6 + effri(i,lmk) = re_qi_min*1.e6 + effrs(i,lmk) = re_qs_min*1.e6 end do + effrr(:,:) = 1000. ! rrain_def=1000. + ! Update global arrays do k=1,lm k1 = k + kd do i=1,im - effrr(i,k1) = 1000. ! rrain_def=1000. - end do - end do - ! Update global arrays, scale Thompson's effective radii from meter to micron - do k=1,lm - k1 = k + kd - do i=1,im - effrl_inout(i,k) = effrl(i,k1)*1.e6 - effri_inout(i,k) = effri(i,k1)*1.e6 - effrs_inout(i,k) = effrs(i,k1)*1.e6 + effrl_inout(i,k) = effrl(i,k1) + effri_inout(i,k) = effri(i,k1) + effrs_inout(i,k) = effrs(i,k1) enddo enddo else ! all other cases @@ -964,8 +960,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & im, lm, lmp, uni_cld, lmfshal, lmfdeep2, & - cldcov(:,1:LM), effrl_inout, & - effri_inout, effrs_inout, & + cldcov(:,1:LM), effrl, effri, effrs, & lwp_ex, iwp_ex, lwp_fc, iwp_fc, & dzb, xlat_d, julian, yearlen, gridkm, & clouds, cldsa, mtopa ,mbota, de_lgth, alpha) ! --- outputs @@ -998,8 +993,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & im, lm, lmp, uni_cld, lmfshal, lmfdeep2, & - cldcov(:,1:LM), effrl_inout, & - effri_inout, effrs_inout, & + cldcov(:,1:LM), effrl, effri, effrs, & lwp_ex, iwp_ex, lwp_fc, iwp_fc, & dzb, xlat_d, julian, yearlen, gridkm, & clouds, cldsa, mtopa ,mbota, de_lgth, alpha) ! --- outputs @@ -1010,8 +1004,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & - cldcov(:,1:LMK), cnvw, effrl_inout, & - effri_inout, effrs_inout, & + cldcov(:,1:LMK), cnvw, effrl, effri, effrs,& lwp_ex, iwp_ex, lwp_fc, iwp_fc, & dzb, xlat_d, julian, yearlen, & clouds, cldsa, mtopa ,mbota, de_lgth, alpha) ! --- outputs From d1527d5f9678e29b7cb959a1a07cf0b816bb0c12 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Sun, 16 Jan 2022 06:23:19 -0700 Subject: [PATCH 42/45] Change standard_name and unit of CCPP error flag variable in all metadata files --- physics/GFS_DCNV_generic.meta | 12 ++--- physics/GFS_GWD_generic.meta | 12 ++--- physics/GFS_MP_generic.meta | 12 ++--- physics/GFS_PBL_generic.meta | 12 ++--- physics/GFS_SCNV_generic.meta | 12 ++--- physics/GFS_cloud_diagnostics.meta | 6 +-- physics/GFS_debug.meta | 66 +++++++++++------------ physics/GFS_phys_time_vary.fv3.meta | 24 ++++----- physics/GFS_phys_time_vary.scm.meta | 24 ++++----- physics/GFS_rad_time_vary.fv3.meta | 6 +-- physics/GFS_rad_time_vary.scm.meta | 6 +-- physics/GFS_radiation_surface.meta | 12 ++--- physics/GFS_rrtmg_post.meta | 6 +-- physics/GFS_rrtmg_pre.meta | 6 +-- physics/GFS_rrtmg_setup.meta | 18 +++---- physics/GFS_rrtmgp_cloud_overlap_pre.meta | 6 +-- physics/GFS_rrtmgp_gfdlmp_pre.meta | 6 +-- physics/GFS_rrtmgp_lw_post.meta | 6 +-- physics/GFS_rrtmgp_pre.meta | 12 ++--- physics/GFS_rrtmgp_setup.meta | 18 +++---- physics/GFS_rrtmgp_sw_post.meta | 6 +-- physics/GFS_rrtmgp_sw_pre.meta | 6 +-- physics/GFS_rrtmgp_thompsonmp_pre.meta | 6 +-- physics/GFS_rrtmgp_zhaocarr_pre.meta | 6 +-- physics/GFS_stochastics.meta | 12 ++--- physics/GFS_suite_interstitial.meta | 54 +++++++++---------- physics/GFS_surface_composites.meta | 18 +++---- physics/GFS_surface_generic.meta | 24 ++++----- physics/GFS_surface_loop_control.meta | 12 ++--- physics/GFS_time_vary_pre.fv3.meta | 18 +++---- physics/GFS_time_vary_pre.scm.meta | 18 +++---- physics/cires_ugwp.meta | 18 +++---- physics/cires_ugwp_post.meta | 6 +-- physics/cnvc90.meta | 6 +-- physics/cs_conv.meta | 18 +++---- physics/cs_conv_aw_adj.meta | 6 +-- physics/cu_gf_driver.meta | 12 ++--- physics/cu_gf_driver_post.meta | 6 +-- physics/cu_gf_driver_pre.meta | 6 +-- physics/cu_ntiedtke.meta | 12 ++--- physics/cu_ntiedtke_post.meta | 6 +-- physics/cu_ntiedtke_pre.meta | 6 +-- physics/dcyc2.meta | 6 +-- physics/drag_suite.meta | 12 ++--- physics/flake_driver.meta | 18 +++---- physics/gcm_shoc.meta | 12 ++--- physics/get_prs_fv3.meta | 12 ++--- physics/gfdl_cloud_microphys.meta | 18 +++---- physics/gfdl_fv_sat_adj.meta | 18 +++---- physics/gfdl_sfc_layer.meta | 12 ++--- physics/gscond.meta | 12 ++--- physics/gwdc.meta | 24 ++++----- physics/gwdps.meta | 6 +-- physics/h2ophys.meta | 12 ++--- physics/m_micro.meta | 12 ++--- physics/m_micro_interstitial.meta | 12 ++--- physics/maximum_hourly_diagnostics.meta | 6 +-- physics/module_MYJPBL_wrapper.meta | 12 ++--- physics/module_MYJSFC_wrapper.meta | 12 ++--- physics/module_MYNNPBL_wrapper.meta | 12 ++--- physics/module_MYNNSFC_wrapper.meta | 12 ++--- physics/module_SGSCloud_RadPost.meta | 6 +-- physics/module_SGSCloud_RadPre.meta | 6 +-- physics/moninedmf.meta | 12 ++--- physics/moninshoc.meta | 12 ++--- physics/mp_fer_hires.meta | 18 +++---- physics/mp_thompson.meta | 18 +++---- physics/mp_thompson_post.meta | 18 +++---- physics/mp_thompson_pre.meta | 6 +-- physics/ozphys.meta | 12 ++--- physics/ozphys_2015.meta | 12 ++--- physics/phys_tend.meta | 6 +-- physics/precpd.meta | 12 ++--- physics/radlw_main.meta | 6 +-- physics/radsw_main.meta | 6 +-- physics/rascnv.meta | 18 +++---- physics/rayleigh_damp.meta | 6 +-- physics/rrtmg_lw_post.meta | 6 +-- physics/rrtmg_lw_pre.meta | 6 +-- physics/rrtmg_sw_post.meta | 6 +-- physics/rrtmg_sw_pre.meta | 6 +-- physics/rrtmgp_lw_aerosol_optics.meta | 6 +-- physics/rrtmgp_lw_cloud_optics.meta | 12 ++--- physics/rrtmgp_lw_cloud_sampling.meta | 6 +-- physics/rrtmgp_lw_gas_optics.meta | 12 ++--- physics/rrtmgp_lw_pre.meta | 6 +-- physics/rrtmgp_lw_rte.meta | 6 +-- physics/rrtmgp_sw_aerosol_optics.meta | 6 +-- physics/rrtmgp_sw_cloud_optics.meta | 12 ++--- physics/rrtmgp_sw_cloud_sampling.meta | 6 +-- physics/rrtmgp_sw_gas_optics.meta | 12 ++--- physics/rrtmgp_sw_rte.meta | 6 +-- physics/samfdeepcnv.meta | 12 ++--- physics/samfshalcnv.meta | 12 ++--- physics/sascnvn.meta | 12 ++--- physics/satmedmfvdif.meta | 12 ++--- physics/satmedmfvdifq.meta | 12 ++--- physics/scm_sfc_flux_spec.meta | 12 ++--- physics/sfc_cice.meta | 6 +-- physics/sfc_diag.meta | 6 +-- physics/sfc_diag_post.meta | 6 +-- physics/sfc_diff.meta | 6 +-- physics/sfc_drv.meta | 18 +++---- physics/sfc_drv_ruc.meta | 18 +++---- physics/sfc_noahmp_drv.meta | 12 ++--- physics/sfc_nst.meta | 18 +++---- physics/sfc_ocean.meta | 6 +-- physics/sfc_sice.meta | 6 +-- physics/shalcnv.meta | 12 ++--- physics/shinhongvdif.meta | 12 ++--- physics/ugwpv1_gsldrag.meta | 18 +++---- physics/ugwpv1_gsldrag_post.meta | 6 +-- physics/unified_ugwp.meta | 18 +++---- physics/unified_ugwp_post.meta | 6 +-- physics/ysuvdif.meta | 12 ++--- 115 files changed, 675 insertions(+), 675 deletions(-) diff --git a/physics/GFS_DCNV_generic.meta b/physics/GFS_DCNV_generic.meta index c719ae96c..47fb65d9a 100644 --- a/physics/GFS_DCNV_generic.meta +++ b/physics/GFS_DCNV_generic.meta @@ -256,9 +256,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -708,9 +708,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_GWD_generic.meta b/physics/GFS_GWD_generic.meta index f761ac5bc..78b2ee970 100644 --- a/physics/GFS_GWD_generic.meta +++ b/physics/GFS_GWD_generic.meta @@ -229,9 +229,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -383,9 +383,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_MP_generic.meta b/physics/GFS_MP_generic.meta index 1bcbf4ab1..1526948e4 100644 --- a/physics/GFS_MP_generic.meta +++ b/physics/GFS_MP_generic.meta @@ -111,9 +111,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -853,9 +853,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_PBL_generic.meta b/physics/GFS_PBL_generic.meta index 3dcf81043..27c659c2c 100644 --- a/physics/GFS_PBL_generic.meta +++ b/physics/GFS_PBL_generic.meta @@ -368,9 +368,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1238,9 +1238,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_SCNV_generic.meta b/physics/GFS_SCNV_generic.meta index 90dc72d42..5cbda127c 100644 --- a/physics/GFS_SCNV_generic.meta +++ b/physics/GFS_SCNV_generic.meta @@ -249,9 +249,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -672,9 +672,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_cloud_diagnostics.meta b/physics/GFS_cloud_diagnostics.meta index 986548b5a..aab5387d0 100644 --- a/physics/GFS_cloud_diagnostics.meta +++ b/physics/GFS_cloud_diagnostics.meta @@ -137,9 +137,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_debug.meta b/physics/GFS_debug.meta index 2071a18c1..23175ce0f 100644 --- a/physics/GFS_debug.meta +++ b/physics/GFS_debug.meta @@ -37,9 +37,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -78,9 +78,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -189,9 +189,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -236,9 +236,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -277,9 +277,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -388,9 +388,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -428,9 +428,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -680,9 +680,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -764,9 +764,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -842,9 +842,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -927,9 +927,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_phys_time_vary.fv3.meta b/physics/GFS_phys_time_vary.fv3.meta index 0af6cda3c..e9dd388ce 100644 --- a/physics/GFS_phys_time_vary.fv3.meta +++ b/physics/GFS_phys_time_vary.fv3.meta @@ -897,9 +897,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -917,9 +917,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1855,9 +1855,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1875,9 +1875,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 9c836e323..52e002aa0 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -897,9 +897,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -917,9 +917,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1369,9 +1369,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1389,9 +1389,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rad_time_vary.fv3.meta b/physics/GFS_rad_time_vary.fv3.meta index 8a4938667..0e7c7c024 100644 --- a/physics/GFS_rad_time_vary.fv3.meta +++ b/physics/GFS_rad_time_vary.fv3.meta @@ -201,9 +201,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index 8a4938667..0e7c7c024 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -201,9 +201,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_radiation_surface.meta b/physics/GFS_radiation_surface.meta index 268edbb54..3fd851a40 100644 --- a/physics/GFS_radiation_surface.meta +++ b/physics/GFS_radiation_surface.meta @@ -37,9 +37,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -485,9 +485,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index 80bd5c22c..0f45a2126 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -275,9 +275,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index ced68890e..48fc31c49 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -1091,9 +1091,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmg_setup.meta b/physics/GFS_rrtmg_setup.meta index d80faf8a5..ae0da3a5e 100644 --- a/physics/GFS_rrtmg_setup.meta +++ b/physics/GFS_rrtmg_setup.meta @@ -172,9 +172,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -268,9 +268,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -288,9 +288,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_cloud_overlap_pre.meta b/physics/GFS_rrtmgp_cloud_overlap_pre.meta index a15f1a8bd..a4620cfa2 100644 --- a/physics/GFS_rrtmgp_cloud_overlap_pre.meta +++ b/physics/GFS_rrtmgp_cloud_overlap_pre.meta @@ -234,9 +234,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_gfdlmp_pre.meta b/physics/GFS_rrtmgp_gfdlmp_pre.meta index 1f0a7745b..c45054613 100644 --- a/physics/GFS_rrtmgp_gfdlmp_pre.meta +++ b/physics/GFS_rrtmgp_gfdlmp_pre.meta @@ -295,9 +295,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index 399f238d0..d458b25f3 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -245,9 +245,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_pre.meta b/physics/GFS_rrtmgp_pre.meta index 15ce6db1a..501dacfa1 100644 --- a/physics/GFS_rrtmgp_pre.meta +++ b/physics/GFS_rrtmgp_pre.meta @@ -40,9 +40,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -433,9 +433,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_setup.meta b/physics/GFS_rrtmgp_setup.meta index ab9b0a49c..41bf63ac8 100644 --- a/physics/GFS_rrtmgp_setup.meta +++ b/physics/GFS_rrtmgp_setup.meta @@ -215,9 +215,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -311,9 +311,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -331,9 +331,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 6d661b7f1..0e93b78e6 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -363,9 +363,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_sw_pre.meta b/physics/GFS_rrtmgp_sw_pre.meta index 1d9f893b6..462ab5f18 100644 --- a/physics/GFS_rrtmgp_sw_pre.meta +++ b/physics/GFS_rrtmgp_sw_pre.meta @@ -116,9 +116,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_thompsonmp_pre.meta b/physics/GFS_rrtmgp_thompsonmp_pre.meta index 82d9a1b95..ff8d0e13b 100644 --- a/physics/GFS_rrtmgp_thompsonmp_pre.meta +++ b/physics/GFS_rrtmgp_thompsonmp_pre.meta @@ -369,9 +369,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_rrtmgp_zhaocarr_pre.meta b/physics/GFS_rrtmgp_zhaocarr_pre.meta index 861b1144d..2eb333115 100644 --- a/physics/GFS_rrtmgp_zhaocarr_pre.meta +++ b/physics/GFS_rrtmgp_zhaocarr_pre.meta @@ -358,9 +358,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_stochastics.meta b/physics/GFS_stochastics.meta index c78dbe015..bf1c3fb25 100644 --- a/physics/GFS_stochastics.meta +++ b/physics/GFS_stochastics.meta @@ -52,9 +52,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -495,9 +495,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_suite_interstitial.meta b/physics/GFS_suite_interstitial.meta index f596b86cd..43b3d5efa 100644 --- a/physics/GFS_suite_interstitial.meta +++ b/physics/GFS_suite_interstitial.meta @@ -30,9 +30,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -70,9 +70,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -236,9 +236,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -725,9 +725,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -836,9 +836,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1023,9 +1023,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1468,9 +1468,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1817,9 +1817,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1901,9 +1901,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_surface_composites.meta b/physics/GFS_surface_composites.meta index fde52ed23..89048e487 100644 --- a/physics/GFS_surface_composites.meta +++ b/physics/GFS_surface_composites.meta @@ -479,9 +479,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -613,9 +613,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1650,9 +1650,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_surface_generic.meta b/physics/GFS_surface_generic.meta index 4dcf394db..6ad2953a6 100644 --- a/physics/GFS_surface_generic.meta +++ b/physics/GFS_surface_generic.meta @@ -94,9 +94,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -465,9 +465,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -533,9 +533,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1485,9 +1485,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_surface_loop_control.meta b/physics/GFS_surface_loop_control.meta index edb19072a..4a522ff43 100644 --- a/physics/GFS_surface_loop_control.meta +++ b/physics/GFS_surface_loop_control.meta @@ -45,9 +45,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -149,9 +149,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 4cd736667..3ec92287a 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -16,9 +16,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -36,9 +36,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -231,9 +231,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 908d636b0..20708c51e 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -16,9 +16,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -36,9 +36,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -224,9 +224,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cires_ugwp.meta b/physics/cires_ugwp.meta index 92421a94b..bf94edd26 100644 --- a/physics/cires_ugwp.meta +++ b/physics/cires_ugwp.meta @@ -161,9 +161,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -181,9 +181,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -858,9 +858,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cires_ugwp_post.meta b/physics/cires_ugwp_post.meta index 0faca669f..5add9d43f 100644 --- a/physics/cires_ugwp_post.meta +++ b/physics/cires_ugwp_post.meta @@ -269,9 +269,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cnvc90.meta b/physics/cnvc90.meta index 9c2a626fa..9728266d4 100644 --- a/physics/cnvc90.meta +++ b/physics/cnvc90.meta @@ -116,9 +116,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cs_conv.meta b/physics/cs_conv.meta index 68189d776..90a411031 100644 --- a/physics/cs_conv.meta +++ b/physics/cs_conv.meta @@ -141,9 +141,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -204,9 +204,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -613,9 +613,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cs_conv_aw_adj.meta b/physics/cs_conv_aw_adj.meta index f3c205772..0dada0fd5 100644 --- a/physics/cs_conv_aw_adj.meta +++ b/physics/cs_conv_aw_adj.meta @@ -173,9 +173,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cu_gf_driver.meta b/physics/cu_gf_driver.meta index 3fb9fe232..311a9cb3e 100644 --- a/physics/cu_gf_driver.meta +++ b/physics/cu_gf_driver.meta @@ -58,9 +58,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -562,9 +562,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cu_gf_driver_post.meta b/physics/cu_gf_driver_post.meta index c3d3e897c..b50c2ab40 100644 --- a/physics/cu_gf_driver_post.meta +++ b/physics/cu_gf_driver_post.meta @@ -85,9 +85,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cu_gf_driver_pre.meta b/physics/cu_gf_driver_pre.meta index c587939bd..7fd66d19b 100644 --- a/physics/cu_gf_driver_pre.meta +++ b/physics/cu_gf_driver_pre.meta @@ -131,9 +131,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cu_ntiedtke.meta b/physics/cu_ntiedtke.meta index 68a9827c8..dded8fb20 100644 --- a/physics/cu_ntiedtke.meta +++ b/physics/cu_ntiedtke.meta @@ -58,9 +58,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -319,9 +319,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cu_ntiedtke_post.meta b/physics/cu_ntiedtke_post.meta index 4d83bf57c..703d32b90 100644 --- a/physics/cu_ntiedtke_post.meta +++ b/physics/cu_ntiedtke_post.meta @@ -48,9 +48,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/cu_ntiedtke_pre.meta b/physics/cu_ntiedtke_pre.meta index 5b162041a..ccb9b7f48 100644 --- a/physics/cu_ntiedtke_pre.meta +++ b/physics/cu_ntiedtke_pre.meta @@ -101,9 +101,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/dcyc2.meta b/physics/dcyc2.meta index 122d6a8e1..8df27a3c2 100644 --- a/physics/dcyc2.meta +++ b/physics/dcyc2.meta @@ -630,9 +630,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/drag_suite.meta b/physics/drag_suite.meta index ba9d4050d..c7af87f0b 100644 --- a/physics/drag_suite.meta +++ b/physics/drag_suite.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -633,9 +633,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/flake_driver.meta b/physics/flake_driver.meta index 2855aa026..7ed80d866 100644 --- a/physics/flake_driver.meta +++ b/physics/flake_driver.meta @@ -16,9 +16,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -36,9 +36,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -306,9 +306,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/gcm_shoc.meta b/physics/gcm_shoc.meta index d22e51e6a..984c6aec5 100644 --- a/physics/gcm_shoc.meta +++ b/physics/gcm_shoc.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -400,9 +400,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/get_prs_fv3.meta b/physics/get_prs_fv3.meta index 90630a255..4e893b45c 100644 --- a/physics/get_prs_fv3.meta +++ b/physics/get_prs_fv3.meta @@ -86,9 +86,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -174,9 +174,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/gfdl_cloud_microphys.meta b/physics/gfdl_cloud_microphys.meta index 6f6b1d47f..5e752b473 100644 --- a/physics/gfdl_cloud_microphys.meta +++ b/physics/gfdl_cloud_microphys.meta @@ -81,9 +81,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -101,9 +101,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -472,9 +472,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/gfdl_fv_sat_adj.meta b/physics/gfdl_fv_sat_adj.meta index 8eece5a9c..5cdc96358 100644 --- a/physics/gfdl_fv_sat_adj.meta +++ b/physics/gfdl_fv_sat_adj.meta @@ -74,9 +74,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -94,9 +94,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -431,9 +431,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/gfdl_sfc_layer.meta b/physics/gfdl_sfc_layer.meta index 228ab4bca..f1c7a4ce2 100644 --- a/physics/gfdl_sfc_layer.meta +++ b/physics/gfdl_sfc_layer.meta @@ -58,9 +58,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -721,9 +721,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/gscond.meta b/physics/gscond.meta index e46b73618..4c5fd02c3 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -37,9 +37,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -298,9 +298,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/gwdc.meta b/physics/gwdc.meta index 2e8076bca..e61559e92 100644 --- a/physics/gwdc.meta +++ b/physics/gwdc.meta @@ -132,9 +132,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -165,9 +165,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -409,9 +409,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -596,9 +596,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/gwdps.meta b/physics/gwdps.meta index e483354df..3ce1c5b74 100644 --- a/physics/gwdps.meta +++ b/physics/gwdps.meta @@ -319,9 +319,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/h2ophys.meta b/physics/h2ophys.meta index 759666baf..afe50bda1 100644 --- a/physics/h2ophys.meta +++ b/physics/h2ophys.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -118,9 +118,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/m_micro.meta b/physics/m_micro.meta index e202f7b74..99ebb591f 100644 --- a/physics/m_micro.meta +++ b/physics/m_micro.meta @@ -289,9 +289,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -835,9 +835,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/m_micro_interstitial.meta b/physics/m_micro_interstitial.meta index 031ebbe5a..c7c8a23fd 100644 --- a/physics/m_micro_interstitial.meta +++ b/physics/m_micro_interstitial.meta @@ -250,9 +250,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -440,9 +440,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/maximum_hourly_diagnostics.meta b/physics/maximum_hourly_diagnostics.meta index d9a236c29..6f7a055b8 100644 --- a/physics/maximum_hourly_diagnostics.meta +++ b/physics/maximum_hourly_diagnostics.meta @@ -240,9 +240,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/module_MYJPBL_wrapper.meta b/physics/module_MYJPBL_wrapper.meta index 43e63b4ab..427088b86 100644 --- a/physics/module_MYJPBL_wrapper.meta +++ b/physics/module_MYJPBL_wrapper.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -659,9 +659,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/module_MYJSFC_wrapper.meta b/physics/module_MYJSFC_wrapper.meta index 1201fd56b..65ccc7dd9 100644 --- a/physics/module_MYJSFC_wrapper.meta +++ b/physics/module_MYJSFC_wrapper.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -740,9 +740,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/module_MYNNPBL_wrapper.meta b/physics/module_MYNNPBL_wrapper.meta index 25dc89efe..d1a74fdb9 100644 --- a/physics/module_MYNNPBL_wrapper.meta +++ b/physics/module_MYNNPBL_wrapper.meta @@ -30,9 +30,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1281,9 +1281,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/module_MYNNSFC_wrapper.meta b/physics/module_MYNNSFC_wrapper.meta index 39a05f858..ef5025886 100644 --- a/physics/module_MYNNSFC_wrapper.meta +++ b/physics/module_MYNNSFC_wrapper.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -850,9 +850,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/module_SGSCloud_RadPost.meta b/physics/module_SGSCloud_RadPost.meta index 7298426ae..d9000a91f 100644 --- a/physics/module_SGSCloud_RadPost.meta +++ b/physics/module_SGSCloud_RadPost.meta @@ -76,9 +76,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/module_SGSCloud_RadPre.meta b/physics/module_SGSCloud_RadPre.meta index 14c3127fc..c135a4925 100644 --- a/physics/module_SGSCloud_RadPre.meta +++ b/physics/module_SGSCloud_RadPre.meta @@ -347,9 +347,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/moninedmf.meta b/physics/moninedmf.meta index 1bb6847eb..c2d873065 100644 --- a/physics/moninedmf.meta +++ b/physics/moninedmf.meta @@ -31,9 +31,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -583,9 +583,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/moninshoc.meta b/physics/moninshoc.meta index ab4103891..f01b2c58d 100644 --- a/physics/moninshoc.meta +++ b/physics/moninshoc.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -522,9 +522,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/mp_fer_hires.meta b/physics/mp_fer_hires.meta index 08c6d939a..9f7c63d4d 100644 --- a/physics/mp_fer_hires.meta +++ b/physics/mp_fer_hires.meta @@ -87,9 +87,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -106,9 +106,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -336,9 +336,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/mp_thompson.meta b/physics/mp_thompson.meta index 248b76cc9..efd44e2ff 100644 --- a/physics/mp_thompson.meta +++ b/physics/mp_thompson.meta @@ -268,9 +268,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -647,9 +647,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -667,9 +667,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/mp_thompson_post.meta b/physics/mp_thompson_post.meta index 5107bf642..82b035e99 100644 --- a/physics/mp_thompson_post.meta +++ b/physics/mp_thompson_post.meta @@ -24,9 +24,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -126,9 +126,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -146,9 +146,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/mp_thompson_pre.meta b/physics/mp_thompson_pre.meta index c21dd6001..12e812bb3 100644 --- a/physics/mp_thompson_pre.meta +++ b/physics/mp_thompson_pre.meta @@ -46,9 +46,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/ozphys.meta b/physics/ozphys.meta index 5d6a9fff7..485e2a491 100644 --- a/physics/ozphys.meta +++ b/physics/ozphys.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -200,9 +200,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/ozphys_2015.meta b/physics/ozphys_2015.meta index 070e57e54..8bce7defe 100644 --- a/physics/ozphys_2015.meta +++ b/physics/ozphys_2015.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -199,9 +199,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/phys_tend.meta b/physics/phys_tend.meta index ffb9c0b12..0f78af20b 100644 --- a/physics/phys_tend.meta +++ b/physics/phys_tend.meta @@ -87,9 +87,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/precpd.meta b/physics/precpd.meta index 1b9cb30b6..67f1a530b 100644 --- a/physics/precpd.meta +++ b/physics/precpd.meta @@ -37,9 +37,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -261,9 +261,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/radlw_main.meta b/physics/radlw_main.meta index d96ab9af1..df1a368c5 100644 --- a/physics/radlw_main.meta +++ b/physics/radlw_main.meta @@ -352,9 +352,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/radsw_main.meta b/physics/radsw_main.meta index 632dc3912..70bc136f3 100644 --- a/physics/radsw_main.meta +++ b/physics/radsw_main.meta @@ -413,9 +413,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rascnv.meta b/physics/rascnv.meta index f4563ea89..9ace89287 100644 --- a/physics/rascnv.meta +++ b/physics/rascnv.meta @@ -143,9 +143,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -163,9 +163,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -615,9 +615,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rayleigh_damp.meta b/physics/rayleigh_damp.meta index 568cb9486..63025bcff 100644 --- a/physics/rayleigh_damp.meta +++ b/physics/rayleigh_damp.meta @@ -183,9 +183,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index e2731faab..fc52ff901 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -128,9 +128,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index affc45384..9f6ec07c8 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -16,9 +16,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 819090937..fb9c6dbf2 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -244,9 +244,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index f980c6a3d..6a3a4e0a4 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -52,9 +52,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_lw_aerosol_optics.meta b/physics/rrtmgp_lw_aerosol_optics.meta index 875143df1..165051409 100644 --- a/physics/rrtmgp_lw_aerosol_optics.meta +++ b/physics/rrtmgp_lw_aerosol_optics.meta @@ -145,9 +145,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_lw_cloud_optics.meta b/physics/rrtmgp_lw_cloud_optics.meta index 4617912cc..35e27979e 100644 --- a/physics/rrtmgp_lw_cloud_optics.meta +++ b/physics/rrtmgp_lw_cloud_optics.meta @@ -81,9 +81,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -297,9 +297,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_lw_cloud_sampling.meta b/physics/rrtmgp_lw_cloud_sampling.meta index 2571e7295..2e4029ae2 100644 --- a/physics/rrtmgp_lw_cloud_sampling.meta +++ b/physics/rrtmgp_lw_cloud_sampling.meta @@ -167,9 +167,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_lw_gas_optics.meta b/physics/rrtmgp_lw_gas_optics.meta index 2024df664..0b484b6ac 100644 --- a/physics/rrtmgp_lw_gas_optics.meta +++ b/physics/rrtmgp_lw_gas_optics.meta @@ -93,9 +93,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -195,9 +195,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_lw_pre.meta b/physics/rrtmgp_lw_pre.meta index 8a8b15467..aa2a06a0f 100644 --- a/physics/rrtmgp_lw_pre.meta +++ b/physics/rrtmgp_lw_pre.meta @@ -39,9 +39,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_lw_rte.meta b/physics/rrtmgp_lw_rte.meta index 752251c43..069537964 100644 --- a/physics/rrtmgp_lw_rte.meta +++ b/physics/rrtmgp_lw_rte.meta @@ -165,9 +165,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_sw_aerosol_optics.meta b/physics/rrtmgp_sw_aerosol_optics.meta index f56a54467..2abacd92a 100644 --- a/physics/rrtmgp_sw_aerosol_optics.meta +++ b/physics/rrtmgp_sw_aerosol_optics.meta @@ -160,9 +160,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_sw_cloud_optics.meta b/physics/rrtmgp_sw_cloud_optics.meta index 4856d44d5..d73258cb2 100644 --- a/physics/rrtmgp_sw_cloud_optics.meta +++ b/physics/rrtmgp_sw_cloud_optics.meta @@ -81,9 +81,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -279,9 +279,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_sw_cloud_sampling.meta b/physics/rrtmgp_sw_cloud_sampling.meta index 23f8fa031..cda161e81 100644 --- a/physics/rrtmgp_sw_cloud_sampling.meta +++ b/physics/rrtmgp_sw_cloud_sampling.meta @@ -174,9 +174,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_sw_gas_optics.meta b/physics/rrtmgp_sw_gas_optics.meta index 5bcfe6cb2..1fdbc946b 100644 --- a/physics/rrtmgp_sw_gas_optics.meta +++ b/physics/rrtmgp_sw_gas_optics.meta @@ -61,9 +61,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -186,9 +186,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/rrtmgp_sw_rte.meta b/physics/rrtmgp_sw_rte.meta index 995a5626a..e59698c0f 100644 --- a/physics/rrtmgp_sw_rte.meta +++ b/physics/rrtmgp_sw_rte.meta @@ -197,9 +197,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/samfdeepcnv.meta b/physics/samfdeepcnv.meta index d38203465..baf01fb8e 100644 --- a/physics/samfdeepcnv.meta +++ b/physics/samfdeepcnv.meta @@ -30,9 +30,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -600,9 +600,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/samfshalcnv.meta b/physics/samfshalcnv.meta index cdc61c1a3..d768d4451 100644 --- a/physics/samfshalcnv.meta +++ b/physics/samfshalcnv.meta @@ -30,9 +30,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -422,9 +422,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sascnvn.meta b/physics/sascnvn.meta index 082b87d09..66e5161ad 100644 --- a/physics/sascnvn.meta +++ b/physics/sascnvn.meta @@ -30,9 +30,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -504,9 +504,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/satmedmfvdif.meta b/physics/satmedmfvdif.meta index 9eff692d8..3609ed50f 100644 --- a/physics/satmedmfvdif.meta +++ b/physics/satmedmfvdif.meta @@ -38,9 +38,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -576,9 +576,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/satmedmfvdifq.meta b/physics/satmedmfvdifq.meta index d6fb95715..db89f488d 100644 --- a/physics/satmedmfvdifq.meta +++ b/physics/satmedmfvdifq.meta @@ -37,9 +37,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -646,9 +646,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/scm_sfc_flux_spec.meta b/physics/scm_sfc_flux_spec.meta index 9ff2f15c4..46bb10897 100644 --- a/physics/scm_sfc_flux_spec.meta +++ b/physics/scm_sfc_flux_spec.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -307,9 +307,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_cice.meta b/physics/sfc_cice.meta index fd259111a..796fb2f5d 100644 --- a/physics/sfc_cice.meta +++ b/physics/sfc_cice.meta @@ -236,9 +236,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_diag.meta b/physics/sfc_diag.meta index d19a62542..dd3bf79b8 100644 --- a/physics/sfc_diag.meta +++ b/physics/sfc_diag.meta @@ -206,9 +206,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_diag_post.meta b/physics/sfc_diag_post.meta index 21d76a147..873dd671e 100644 --- a/physics/sfc_diag_post.meta +++ b/physics/sfc_diag_post.meta @@ -179,9 +179,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_diff.meta b/physics/sfc_diff.meta index 86268392d..a2e1fe9f7 100644 --- a/physics/sfc_diff.meta +++ b/physics/sfc_diff.meta @@ -574,9 +574,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_drv.meta b/physics/sfc_drv.meta index 6463a3ed7..a3aa9044e 100644 --- a/physics/sfc_drv.meta +++ b/physics/sfc_drv.meta @@ -74,9 +74,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -94,9 +94,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -743,9 +743,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_drv_ruc.meta b/physics/sfc_drv_ruc.meta index 30c05b81f..d8443f0bd 100644 --- a/physics/sfc_drv_ruc.meta +++ b/physics/sfc_drv_ruc.meta @@ -504,9 +504,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -524,9 +524,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1596,9 +1596,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_noahmp_drv.meta b/physics/sfc_noahmp_drv.meta index e37036c32..ea08e6bf7 100644 --- a/physics/sfc_noahmp_drv.meta +++ b/physics/sfc_noahmp_drv.meta @@ -74,9 +74,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1263,9 +1263,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_nst.meta b/physics/sfc_nst.meta index 7d5fcfca5..d80ebf0cf 100644 --- a/physics/sfc_nst.meta +++ b/physics/sfc_nst.meta @@ -611,9 +611,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -745,9 +745,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -938,9 +938,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_ocean.meta b/physics/sfc_ocean.meta index 85a891644..e99ad39fc 100644 --- a/physics/sfc_ocean.meta +++ b/physics/sfc_ocean.meta @@ -259,9 +259,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/sfc_sice.meta b/physics/sfc_sice.meta index c2a215a03..718109879 100644 --- a/physics/sfc_sice.meta +++ b/physics/sfc_sice.meta @@ -432,9 +432,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/shalcnv.meta b/physics/shalcnv.meta index 0f91a043a..f554201c5 100644 --- a/physics/shalcnv.meta +++ b/physics/shalcnv.meta @@ -44,9 +44,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -400,9 +400,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/shinhongvdif.meta b/physics/shinhongvdif.meta index 8d0dac7db..dcd3b96cd 100644 --- a/physics/shinhongvdif.meta +++ b/physics/shinhongvdif.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -488,9 +488,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/ugwpv1_gsldrag.meta b/physics/ugwpv1_gsldrag.meta index 553433765..4865f5a6a 100644 --- a/physics/ugwpv1_gsldrag.meta +++ b/physics/ugwpv1_gsldrag.meta @@ -248,9 +248,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -268,9 +268,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1091,9 +1091,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/ugwpv1_gsldrag_post.meta b/physics/ugwpv1_gsldrag_post.meta index 2021fdb42..4a0e88de9 100644 --- a/physics/ugwpv1_gsldrag_post.meta +++ b/physics/ugwpv1_gsldrag_post.meta @@ -269,9 +269,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/unified_ugwp.meta b/physics/unified_ugwp.meta index b3f7a4d75..cf6350f58 100644 --- a/physics/unified_ugwp.meta +++ b/physics/unified_ugwp.meta @@ -227,9 +227,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -261,9 +261,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -1187,9 +1187,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/unified_ugwp_post.meta b/physics/unified_ugwp_post.meta index e2723821b..1df5cc5b5 100644 --- a/physics/unified_ugwp_post.meta +++ b/physics/unified_ugwp_post.meta @@ -269,9 +269,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out diff --git a/physics/ysuvdif.meta b/physics/ysuvdif.meta index f28ef3eff..0007197bd 100644 --- a/physics/ysuvdif.meta +++ b/physics/ysuvdif.meta @@ -23,9 +23,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out @@ -511,9 +511,9 @@ kind = len=* intent = out [errflg] - standard_name = ccpp_error_flag - long_name = error flag for error handling in CCPP - units = flag + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 dimensions = () type = integer intent = out From 57d75336218836fe653fb5a750b6e91486d55f99 Mon Sep 17 00:00:00 2001 From: Michael Iacono Date: Tue, 18 Jan 2022 21:45:59 +0000 Subject: [PATCH 43/45] Revisions to repair iovr=5 cloud overlap option --- physics/radiation_clouds.f | 185 ++++++++++++++++++++++++++++++------- physics/radlw_main.F90 | 54 +++++------ physics/radsw_main.F90 | 8 +- 3 files changed, 187 insertions(+), 60 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 90b7460a0..b4a8be627 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -876,6 +876,19 @@ subroutine progcld1 & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. The three cloud domain boundaries are defined by @@ -1272,6 +1285,19 @@ subroutine progcld2 & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -1699,6 +1725,19 @@ subroutine progcld3 & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> -# Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -2062,6 +2101,19 @@ subroutine progcld4 & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + ! --- compute low, mid, high, total, and boundary layer cloud fractions ! and clouds top/bottom layer indices for low, mid, and high clouds. ! The three cloud domain boundaries are defined by ptopc. The cloud @@ -2416,6 +2468,19 @@ subroutine progcld4o & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> - Call gethml() to compute low, mid, high, total, and boundary layer cloud fractions !! and clouds top/bottom layer indices for low, mid, and high clouds. !! The three cloud domain boundaries are defined by ptopc. The cloud @@ -2792,6 +2857,19 @@ subroutine progcld5 & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -3128,8 +3206,7 @@ subroutine progcld6 & enddo enddo - ! What portion of water and ice contents is associated with the - ! partly cloudy boxes + ! What portion of water and ice contents is associated with the partly cloudy boxes do i = 1, IX do k = 1, NLAY-1 if (cldtot(i,k).ge.climit .and. cldtot(i,k).lt.ovcst) then @@ -3188,6 +3265,19 @@ subroutine progcld6 & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -3274,7 +3364,7 @@ subroutine progcld_thompson & ! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! ! dz (ix,nlay) : layer thickness (km) ! ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! -! gridkm (IX) : grid length in km ! +! gridkm : grid length in km ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! ! uni_cld : logical - true for cloud fraction from shoc ! @@ -3333,8 +3423,8 @@ subroutine progcld_thompson & real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk - real(kind=kind_phys), dimension(:), intent(in) :: latdeg, gridkm - real(kind=kind_phys), intent(in) :: julian + real(kind=kind_phys), dimension(:), intent(in) :: latdeg + real(kind=kind_phys), intent(in) :: julian, gridkm integer, intent(in) :: yearlen ! --- outputs @@ -3408,14 +3498,14 @@ subroutine progcld_thompson & enddo !> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . -!> - Since using Thompson MP, assume 1 percent of snow is actually in +!> - Since using Thompson MP, assume 20 percent of snow is actually in !! ice sizes. do k = 1, NLAY-1 do i = 1, IX cwp(i,k) = max(0.0, clw(i,k,ntcw) * dz(i,k)*1.E6) crp(i,k) = 0.0 - snow_mass_factor = 0.99 + snow_mass_factor = 0.85 cip(i,k) = max(0.0, (clw(i,k,ntiw) & & + (1.0-snow_mass_factor)*clw(i,k,ntsw))*dz(i,k)*1.E6) if (re_snow(i,k) .gt. snow_max_radius)then @@ -3481,7 +3571,7 @@ subroutine progcld_thompson & endif call cal_cldfra3(cldfra1d, qv1d, qc1d, qi1d, qs1d, dz1d, & - & p1d, t1d, xland, gridkm(i), & + & p1d, t1d, xland, gridkm, & & .false., max_relh, 1, nlay, .false.) do k = 1, NLAY @@ -3555,6 +3645,19 @@ subroutine progcld_thompson & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -3952,6 +4055,19 @@ subroutine progclduni & alpha(:,:) = 0. endif + ! Revise alpha for exponential-random cloud overlap + ! Decorrelate layers when a clear layer follows a cloudy layer to enforce + ! random correlation between non-adjacent blocks of cloudy layers + if (iovr == 5) then + do k = 2, nLay + do i = 1, ix + if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + alpha(i,k) = 0.0 + endif + enddo + enddo + endif + !> - Call gethml() to compute low,mid,high,total, and boundary layer !! cloud fractions and clouds top/bottom layer indices for low, mid, !! and high clouds. @@ -4495,16 +4611,16 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & DO k = kts,kte delz = MAX(100., dz(k)) - RH_00L = 0.77+MIN(0.22,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) - RH_00O = 0.85+MIN(0.14,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) + RH_00L = 0.74+MIN(0.25,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) + RH_00O = 0.82+MIN(0.17,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) RHUM = rh(k) - if (qc(k).ge.1.E-6 .or. qi(k).ge.1.E-7 & - & .or. (qs(k).gt.1.E-6 .and. t(k).lt.273.)) then + if (qc(k).ge.1.E-5 .or. qi(k).ge.1.E-5 & + & .or. (qs(k).gt.1.E-5 .and. t(k).lt.273.)) then CLDFRA(K) = 1.0 elseif (((qc(k)+qi(k)).gt.1.E-10) .and. & - & ((qc(k)+qi(k)).lt.1.E-6)) then - CLDFRA(K) = MIN(0.99, 0.1*(11.0 + log10(qc(k)+qi(k)))) + & ((qc(k)+qi(k)).lt.1.E-5)) then + CLDFRA(K) = MIN(0.99, 0.20*(10.0 + log10(qc(k)+qi(k)))) else IF ((XLAND-1.5).GT.0.) THEN !--- Ocean @@ -4513,7 +4629,7 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & RH_00 = RH_00L ENDIF - tc = MAX(-80.0, t(k) - 273.15) + tc = t(k) - 273.15 if (tc .lt. -12.0) RH_00 = RH_00L if (tc .gt. 20.0) then @@ -4525,12 +4641,12 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & if (max_relh.gt.1.12 .or. (.NOT.(modify_qvapor)) ) then !..For HRRR model, the following look OK. RHUM = MIN(rh(k), 1.45) - RH_00 = RH_00 + (1.45-RH_00)*(-12.0-tc)/(-12.0+85.) + RH_00 = RH_00 + (1.45-RH_00)*(-12.0-tc)/(-12.0+112.) CLDFRA(K) = MAX(0.,1.0-SQRT((1.46-RHUM)/(1.46-RH_00))) else !..but for the GFS model, RH is way lower. RHUM = MIN(rh(k), 1.05) - RH_00 = RH_00 + (1.05-RH_00)*(-12.0-tc)/(-12.0+85.) + RH_00 = RH_00 + (1.05-RH_00)*(-12.0-tc)/(-12.0+112.) CLDFRA(K) = MAX(0.,1.0-SQRT((1.06-RHUM)/(1.06-RH_00))) endif endif @@ -4548,6 +4664,15 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & call adjust_cloudFinal(cldfra, qc, qi, rhoa, dz, kts,kte) + if (debug_flag .and. ndebug.lt.25) then + do k = kts,kte + write(6,'(a,i3,f9.2,f7.1,f7.2,f6.1,f6.3,f12.7,f12.7,f12.7)') & + & ' DEBUG-GT: ', k, p(k)*0.01, dz(k), t(k)-273.15, & + & rh(k)*100., cldfra(k), qc(k)*1.E3, qi(k)*1.E3, qs(k)*1.E3 + enddo + ndebug = ndebug + 1 + endif + !..Intended for cold start model runs, we use modify_qvapor to ensure that cloudy !.. areas are actually saturated such that the inserted clouds do not evaporate a !.. timestep later. @@ -4689,9 +4814,9 @@ SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, Dz1d, entrmnt,& k = k - 1 ENDDO - k_cldb = k_m12C + 3 + k_cldb = k_m12C + 5 in_cloud = .false. - k = k_m12C + 2 + k = k_m12C + 4 DO WHILE (.not. in_cloud .AND. k.gt.kbot) k_cldt = 0 if (cfr1d(k).ge.0.01) then @@ -4740,13 +4865,12 @@ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte) do k = k1, k2 tdz = tdz + dz(k) enddo -! max_iwc = ABS(qvs(k2)-qvs(k1)) - max_iwc = MAX(0.0, qvs(k1)-qvs(k2)) + max_iwc = ABS(qvs(k2)-qvs(k1)) do k = k1, k2 - max_iwc = MAX(1.E-6, max_iwc - (qi(k)+qs(k))) + max_iwc = MAX(1.E-5, max_iwc - (qi(k)+qs(k))) enddo - max_iwc = MIN(1.E-4, max_iwc) + max_iwc = MIN(2.E-3, max_iwc) this_dz = 0.0 do k = k1, k2 @@ -4756,7 +4880,7 @@ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte) this_dz = this_dz + dz(k) endif this_iwc = max_iwc*this_dz/tdz - iwc = MAX(1.E-6, this_iwc*(1.-entr)) + iwc = MAX(5.E-6, this_iwc*(1.-entr)) if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.203.16) then qi(k) = qi(k) + cfr(k)*cfr(k)*iwc endif @@ -4781,14 +4905,13 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) do k = k1, k2 tdz = tdz + dz(k) enddo -! max_lwc = ABS(qvs(k2)-qvs(k1)) - max_lwc = MAX(0.0, qvs(k1)-qvs(k2)) + max_lwc = ABS(qvs(k2)-qvs(k1)) ! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz do k = k1, k2 - max_lwc = MAX(1.E-6, max_lwc - qc(k)) + max_lwc = MAX(1.E-5, max_lwc - qc(k)) enddo - max_lwc = MIN(1.E-4, max_lwc) + max_lwc = MIN(2.E-3, max_lwc) this_dz = 0.0 do k = k1, k2 @@ -4798,8 +4921,8 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) this_dz = this_dz + dz(k) endif this_lwc = max_lwc*this_dz/tdz - lwc = MAX(1.E-6, this_lwc*(1.-entr)) - if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.258.16) then + lwc = MAX(5.E-6, this_lwc*(1.-entr)) + if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.253.16) then qc(k) = qc(k) + cfr(k)*cfr(k)*lwc endif enddo @@ -4851,6 +4974,6 @@ SUBROUTINE adjust_cloudFinal(cfr, qc, qi, Rho,dz, kts,kte) END SUBROUTINE adjust_cloudFinal !........................................! - end module module_radiation_clouds + end module module_radiation_clouds ! !! @} !========================================! diff --git a/physics/radlw_main.F90 b/physics/radlw_main.F90 index 14a28cf6b..95bc0b059 100644 --- a/physics/radlw_main.F90 +++ b/physics/radlw_main.F90 @@ -1363,7 +1363,8 @@ subroutine rlwinit & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud (isubcol>0 only) ! ! =3: decorrelation-length overlap (for isubclw>0 only) ! -! =4: exponential overlap cloud +! =4: exponential cloud overlap (AER) ! +! =5: exponential-random cloud overlap (AER) ! ! ! ! ******************************************************************* ! ! original code description ! @@ -1407,7 +1408,7 @@ subroutine rlwinit & ! !===> ... begin here ! - if ( iovr<0 .or. iovr>4 ) then + if ( iovr<0 .or. iovr>5 ) then print *,' *** Error in specification of cloud overlap flag', & & ' IOVR=',iovr,' in RLWINIT !!' stop @@ -1896,6 +1897,7 @@ subroutine mcica_subcol & ! other control flags from module variables: ! ! iovr : control flag for cloud overlapping method ! ! =0:random; =1:maximum/random: =2:maximum; =3:decorr ! +! =4:exponential; =5:exponential-random ! ! ! ! ===================== end of definitions ==================== ! @@ -2084,39 +2086,39 @@ subroutine mcica_subcol & ! --- setup 2 sets of random numbers -! call random_number ( rand2d, stat ) + call random_number ( rand2d, stat ) -! k1 = 0 -! do k = 1, nlay -! do n = 1, ngptlw -! k1 = k1 + 1 -! cdfunc(n,k) = rand2d(k1) -! enddo -! enddo + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfunc(n,k) = rand2d(k1) + enddo + enddo -! call random_number ( rand2d, stat ) + call random_number ( rand2d, stat ) -! k1 = 0 -! do k = 1, nlay -! do n = 1, ngptlw -! k1 = k1 + 1 -! cdfun2(n,k) = rand2d(k1) -! enddo -! enddo + k1 = 0 + do k = 1, nlay + do n = 1, ngptlw + k1 = k1 + 1 + cdfun2(n,k) = rand2d(k1) + enddo + enddo ! --- then working upward from the surface: ! if a random number (from an independent set: cdfun2) is smaller than ! alpha, then use the previous layer's number, otherwise use a new random ! number (keep the originally assigned one in cdfunc for that layer). -! do k = 2, nlay -! k1 = k - 1 -! do n = 1, ngptlw -! if ( cdfun2(n,k) < alpha(k) ) then -! cdfunc(n,k) = cdfunc(n,k1) -! endif -! enddo -! enddo + do k = 2, nlay + k1 = k - 1 + do n = 1, ngptlw + if ( cdfun2(n,k) < alpha(k) ) then + cdfunc(n,k) = cdfunc(n,k1) + endif + enddo + enddo end select diff --git a/physics/radsw_main.F90 b/physics/radsw_main.F90 index 44de9848c..d09f586a3 100644 --- a/physics/radsw_main.F90 +++ b/physics/radsw_main.F90 @@ -1120,7 +1120,7 @@ subroutine rrtmg_sw_run & endif enddo zcf0 = zcf0 * zcf1 - else if (iovr >= 2 .and. iovr /= 4) then + else if (iovr >= 2) then do k = 1, nlay zcf0 = min ( zcf0, f_one-cfrac(k) ) ! used only as clear/cloudy indicator enddo @@ -1436,6 +1436,8 @@ subroutine rswinit & ! =1: maximum/random overlapping clouds ! ! =2: maximum overlap cloud ! ! =3: decorrelation-length overlap clouds ! +! =4: exponential cloud overlap (AER) ! +! =5: exponential-random cloud overlap (AER) ! ! iswmode - control flag for 2-stream transfer scheme ! ! =1; delta-eddington (joseph et al., 1976) ! ! =2: pifm (zdunkowski et al., 1980) ! @@ -1467,7 +1469,7 @@ subroutine rswinit & ! !===> ... begin here ! - if ( iovr<0 .or. iovr>4 ) then + if ( iovr<0 .or. iovr>5 ) then print *,' *** Error in specification of cloud overlap flag', & & ' IOVR=',iovr,' in RSWINIT !!' stop @@ -1935,7 +1937,7 @@ subroutine cldprop & !> -# if physparam::isubcsw > 0, call mcica_subcol() to distribute !! cloud properties to each g-point. - if ( isubcsw > 0 .and. iovr /= 4 ) then ! mcica sub-col clouds approx + if ( isubcsw > 0 ) then ! mcica sub-col clouds approx cldf(:) = cfrac(:) where (cldf(:) < ftiny) From f50f1f8758c6b41c874259aebdbf3be0155d1a8d Mon Sep 17 00:00:00 2001 From: Michael Iacono Date: Wed, 19 Jan 2022 18:14:49 +0000 Subject: [PATCH 44/45] add fix for unbalanced parenthses --- physics/radiation_clouds.f | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index b4a8be627..888087e56 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -882,7 +882,7 @@ subroutine progcld1 & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -1291,7 +1291,7 @@ subroutine progcld2 & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -1731,7 +1731,7 @@ subroutine progcld3 & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -2107,7 +2107,7 @@ subroutine progcld4 & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -2474,7 +2474,7 @@ subroutine progcld4o & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -2863,7 +2863,7 @@ subroutine progcld5 & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -3271,7 +3271,7 @@ subroutine progcld6 & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -3651,7 +3651,7 @@ subroutine progcld_thompson & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo @@ -4061,7 +4061,7 @@ subroutine progclduni & if (iovr == 5) then do k = 2, nLay do i = 1, ix - if (clouds(i,k,1) == 0.0) .and. clouds(i,k-1,1) > 0.0) then + if (clouds(i,k,1) == 0.0 .and. clouds(i,k-1,1) > 0.0) then alpha(i,k) = 0.0 endif enddo From 307e67f4cb8f0d5dd951b6084941efcff45d570d Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 20 Jan 2022 11:40:19 -0700 Subject: [PATCH 45/45] remove some accidental reversions in radiation_clouds.f --- physics/radiation_clouds.f | 68 +++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/physics/radiation_clouds.f b/physics/radiation_clouds.f index 888087e56..c3e0b1293 100644 --- a/physics/radiation_clouds.f +++ b/physics/radiation_clouds.f @@ -3206,7 +3206,8 @@ subroutine progcld6 & enddo enddo - ! What portion of water and ice contents is associated with the partly cloudy boxes + ! What portion of water and ice contents is associated with the + ! partly cloudy boxes do i = 1, IX do k = 1, NLAY-1 if (cldtot(i,k).ge.climit .and. cldtot(i,k).lt.ovcst) then @@ -3364,7 +3365,7 @@ subroutine progcld_thompson & ! slmsk (IX) : sea/land mask array (sea:0,land:1,sea-ice:2) ! ! dz (ix,nlay) : layer thickness (km) ! ! delp (ix,nlay) : model layer pressure thickness in mb (100Pa) ! -! gridkm : grid length in km ! +! gridkm (IX) : grid length in km ! ! IX : horizontal dimention ! ! NLAY,NLP1 : vertical layer/level dimensions ! ! uni_cld : logical - true for cloud fraction from shoc ! @@ -3423,8 +3424,8 @@ subroutine progcld_thompson & real (kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & & slmsk - real(kind=kind_phys), dimension(:), intent(in) :: latdeg - real(kind=kind_phys), intent(in) :: julian, gridkm + real(kind=kind_phys), dimension(:), intent(in) :: latdeg, gridkm + real(kind=kind_phys), intent(in) :: julian integer, intent(in) :: yearlen ! --- outputs @@ -3498,14 +3499,14 @@ subroutine progcld_thompson & enddo !> - Compute cloud liquid/ice condensate path in \f$ g/m^2 \f$ . -!> - Since using Thompson MP, assume 20 percent of snow is actually in +!> - Since using Thompson MP, assume 1 percent of snow is actually in !! ice sizes. do k = 1, NLAY-1 do i = 1, IX cwp(i,k) = max(0.0, clw(i,k,ntcw) * dz(i,k)*1.E6) crp(i,k) = 0.0 - snow_mass_factor = 0.85 + snow_mass_factor = 0.99 cip(i,k) = max(0.0, (clw(i,k,ntiw) & & + (1.0-snow_mass_factor)*clw(i,k,ntsw))*dz(i,k)*1.E6) if (re_snow(i,k) .gt. snow_max_radius)then @@ -3571,7 +3572,7 @@ subroutine progcld_thompson & endif call cal_cldfra3(cldfra1d, qv1d, qc1d, qi1d, qs1d, dz1d, & - & p1d, t1d, xland, gridkm, & + & p1d, t1d, xland, gridkm(i), & & .false., max_relh, 1, nlay, .false.) do k = 1, NLAY @@ -4611,16 +4612,16 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & DO k = kts,kte delz = MAX(100., dz(k)) - RH_00L = 0.74+MIN(0.25,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) - RH_00O = 0.82+MIN(0.17,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) + RH_00L = 0.77+MIN(0.22,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) + RH_00O = 0.85+MIN(0.14,SQRT(1./(50.0+gridkm*gridkm*delz*0.01))) RHUM = rh(k) - if (qc(k).ge.1.E-5 .or. qi(k).ge.1.E-5 & - & .or. (qs(k).gt.1.E-5 .and. t(k).lt.273.)) then + if (qc(k).ge.1.E-6 .or. qi(k).ge.1.E-7 & + & .or. (qs(k).gt.1.E-6 .and. t(k).lt.273.)) then CLDFRA(K) = 1.0 elseif (((qc(k)+qi(k)).gt.1.E-10) .and. & - & ((qc(k)+qi(k)).lt.1.E-5)) then - CLDFRA(K) = MIN(0.99, 0.20*(10.0 + log10(qc(k)+qi(k)))) + & ((qc(k)+qi(k)).lt.1.E-6)) then + CLDFRA(K) = MIN(0.99, 0.1*(11.0 + log10(qc(k)+qi(k)))) else IF ((XLAND-1.5).GT.0.) THEN !--- Ocean @@ -4629,7 +4630,7 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & RH_00 = RH_00L ENDIF - tc = t(k) - 273.15 + tc = MAX(-80.0, t(k) - 273.15) if (tc .lt. -12.0) RH_00 = RH_00L if (tc .gt. 20.0) then @@ -4641,12 +4642,12 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & if (max_relh.gt.1.12 .or. (.NOT.(modify_qvapor)) ) then !..For HRRR model, the following look OK. RHUM = MIN(rh(k), 1.45) - RH_00 = RH_00 + (1.45-RH_00)*(-12.0-tc)/(-12.0+112.) + RH_00 = RH_00 + (1.45-RH_00)*(-12.0-tc)/(-12.0+85.) CLDFRA(K) = MAX(0.,1.0-SQRT((1.46-RHUM)/(1.46-RH_00))) else !..but for the GFS model, RH is way lower. RHUM = MIN(rh(k), 1.05) - RH_00 = RH_00 + (1.05-RH_00)*(-12.0-tc)/(-12.0+112.) + RH_00 = RH_00 + (1.05-RH_00)*(-12.0-tc)/(-12.0+85.) CLDFRA(K) = MAX(0.,1.0-SQRT((1.06-RHUM)/(1.06-RH_00))) endif endif @@ -4664,15 +4665,6 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, & call adjust_cloudFinal(cldfra, qc, qi, rhoa, dz, kts,kte) - if (debug_flag .and. ndebug.lt.25) then - do k = kts,kte - write(6,'(a,i3,f9.2,f7.1,f7.2,f6.1,f6.3,f12.7,f12.7,f12.7)') & - & ' DEBUG-GT: ', k, p(k)*0.01, dz(k), t(k)-273.15, & - & rh(k)*100., cldfra(k), qc(k)*1.E3, qi(k)*1.E3, qs(k)*1.E3 - enddo - ndebug = ndebug + 1 - endif - !..Intended for cold start model runs, we use modify_qvapor to ensure that cloudy !.. areas are actually saturated such that the inserted clouds do not evaporate a !.. timestep later. @@ -4814,9 +4806,9 @@ SUBROUTINE find_cloudLayers(qvs1d, cfr1d, T1d, P1d, Dz1d, entrmnt,& k = k - 1 ENDDO - k_cldb = k_m12C + 5 + k_cldb = k_m12C + 3 in_cloud = .false. - k = k_m12C + 4 + k = k_m12C + 2 DO WHILE (.not. in_cloud .AND. k.gt.kbot) k_cldt = 0 if (cfr1d(k).ge.0.01) then @@ -4865,12 +4857,13 @@ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte) do k = k1, k2 tdz = tdz + dz(k) enddo - max_iwc = ABS(qvs(k2)-qvs(k1)) +! max_iwc = ABS(qvs(k2)-qvs(k1)) + max_iwc = MAX(0.0, qvs(k1)-qvs(k2)) do k = k1, k2 - max_iwc = MAX(1.E-5, max_iwc - (qi(k)+qs(k))) + max_iwc = MAX(1.E-6, max_iwc - (qi(k)+qs(k))) enddo - max_iwc = MIN(2.E-3, max_iwc) + max_iwc = MIN(1.E-4, max_iwc) this_dz = 0.0 do k = k1, k2 @@ -4880,7 +4873,7 @@ SUBROUTINE adjust_cloudIce(cfr,qi,qs,qvs,T,dz,entr, k1,k2,kts,kte) this_dz = this_dz + dz(k) endif this_iwc = max_iwc*this_dz/tdz - iwc = MAX(5.E-6, this_iwc*(1.-entr)) + iwc = MAX(1.E-6, this_iwc*(1.-entr)) if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.203.16) then qi(k) = qi(k) + cfr(k)*cfr(k)*iwc endif @@ -4905,13 +4898,14 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) do k = k1, k2 tdz = tdz + dz(k) enddo - max_lwc = ABS(qvs(k2)-qvs(k1)) +! max_lwc = ABS(qvs(k2)-qvs(k1)) + max_lwc = MAX(0.0, qvs(k1)-qvs(k2)) ! print*, ' max_lwc = ', max_lwc, ' over DZ=',tdz do k = k1, k2 - max_lwc = MAX(1.E-5, max_lwc - qc(k)) + max_lwc = MAX(1.E-6, max_lwc - qc(k)) enddo - max_lwc = MIN(2.E-3, max_lwc) + max_lwc = MIN(1.E-4, max_lwc) this_dz = 0.0 do k = k1, k2 @@ -4921,8 +4915,8 @@ SUBROUTINE adjust_cloudH2O(cfr, qc, qvs,T,dz,entr, k1,k2,kts,kte) this_dz = this_dz + dz(k) endif this_lwc = max_lwc*this_dz/tdz - lwc = MAX(5.E-6, this_lwc*(1.-entr)) - if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.253.16) then + lwc = MAX(1.E-6, this_lwc*(1.-entr)) + if (cfr(k).gt.0.0.and.cfr(k).lt.1.0.and.T(k).ge.258.16) then qc(k) = qc(k) + cfr(k)*cfr(k)*lwc endif enddo @@ -4974,6 +4968,6 @@ SUBROUTINE adjust_cloudFinal(cfr, qc, qi, Rho,dz, kts,kte) END SUBROUTINE adjust_cloudFinal !........................................! - end module module_radiation_clouds ! + end module module_radiation_clouds !! @} !========================================!