From dc8feed452a7b62cab7f9dbb6e0961639ea0cec2 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 17 Jan 2020 14:21:47 -0700 Subject: [PATCH 01/17] remove dependency on GFS_typedefs for rrtmg_sw_pre --- physics/dcyc2.f | 1 - physics/rrtmg_sw_pre.F90 | 57 +++++---- physics/rrtmg_sw_pre.meta | 241 +++++++++++++++++++++++++++++--------- 3 files changed, 212 insertions(+), 87 deletions(-) diff --git a/physics/dcyc2.f b/physics/dcyc2.f index 92369d712..9bb3a1d58 100644 --- a/physics/dcyc2.f +++ b/physics/dcyc2.f @@ -404,7 +404,6 @@ subroutine dcyc2t3_post_run( & & im, adjsfcdsw, adjsfcnsw, adjsfcusw, & & errmsg, errflg) - use GFS_typedefs, only: GFS_diag_type use machine, only: kind_phys implicit none diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index 8eeb16430..a76aed443 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -14,35 +14,36 @@ end subroutine rrtmg_sw_pre_init !> \section arg_table_rrtmg_sw_pre_run Argument Table !! \htmlinclude rrtmg_sw_pre_run.html !! - subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & - nday, idxday, tsfg, tsfa, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & - alb1d, errmsg, errflg) + subroutine rrtmg_sw_pre_run (im, lsswr, pertalb, tsfg, tsfa, coszen, & + alb1d, slmsk, snowd, sncovr, snoalb, zorl, hprime, alvsf, alnsf, alvwf,& + alnwf, facsf, facwf, fice, tisfc, sfalb, nday, idxday, sfcalb1, & + sfcalb2, sfcalb3, sfcalb4, errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type use module_radiation_surface, only: NF_ALBD, setalb implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - integer, intent(out) :: nday - integer, dimension(size(Grid%xlon,1)), intent(out) :: idxday - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: alb1d - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + integer, intent(in) :: im + logical, intent(in) :: lsswr + real(kind=kind_phys), dimension(5), intent(in) :: pertalb + real(kind=kind_phys), dimension(im), intent(in) :: tsfa, tsfg, coszen + real(kind=kind_phys), dimension(im), intent(in) :: alb1d + real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & + sncovr, snoalb, zorl, & + hprime, alvsf, alnsf, & + alvwf, alnwf, facsf, & + facwf, fice, tisfc + real(kind=kind_phys), dimension(im), intent(inout) :: sfalb + integer, intent(out) :: nday + integer, dimension(im), intent(out) :: idxday + real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Local variables integer :: i - real(kind=kind_phys), dimension(size(Grid%xlon,1),NF_ALBD) :: sfcalb + real(kind=kind_phys), dimension(im,NF_ALBD) :: sfcalb ! Initialize CCPP error handling variables errmsg = '' @@ -51,13 +52,13 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & ! --- ... start radiation calculations ! remember to set heating rate unit to k/sec! !> -# Start SW radiation calculations - if (Model%lsswr) then + if (lsswr) then !> - Check for daytime points for SW radiation. nday = 0 idxday = 0 do i = 1, IM - if (Radtend%coszen(i) >= 0.0001) then + if (coszen(i) >= 0.0001) then nday = nday + 1 idxday(nday) = i endif @@ -66,17 +67,13 @@ subroutine rrtmg_sw_pre_run (Model, Grid, Sfcprop, Radtend, im, & !> - Call module_radiation_surface::setalb() to setup surface albedo. !! for SW radiation. - call setalb (Sfcprop%slmsk, Sfcprop%snowd, Sfcprop%sncovr, & ! --- inputs: - Sfcprop%snoalb, Sfcprop%zorl, Radtend%coszen, & - tsfg, tsfa, Sfcprop%hprime(:,1), Sfcprop%alvsf, & - Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & - Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, IM, & - alb1d, Model%pertalb, & ! mg, sfc-perts + call setalb (slmsk, snowd, sncovr, snoalb, zorl, coszen, tsfg, tsfa, & ! --- inputs + hprime, alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, & + tisfc, IM, alb1d, pertalb, & ! mg, sfc-perts sfcalb) ! --- outputs !> -# Approximate mean surface albedo from vis- and nir- diffuse values. - Radtend%sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) + sfalb(:) = max(0.01, 0.5 * (sfcalb(:,2) + sfcalb(:,4))) else nday = 0 idxday = 0 diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 6a68a8cd6..76c3e6f97 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -6,61 +6,30 @@ [ccpp-arg-table] name = rrtmg_sw_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT - dimensions = () - type = GFS_grid_type - intent = in - optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT - dimensions = () - type = GFS_sfcprop_type - intent = in - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F [im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent + standard_name = horizontal_dimension + long_name = horizontal dimension units = count dimensions = () type = integer intent = in optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = integer - intent = out + type = logical + intent = in optional = F -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_dimension) - type = integer - intent = out +[pertalb] + standard_name = magnitude_of_surface_albedo_perturbation + long_name = magnitude of surface albedo perturbation + units = frac + dimensions = (5) + type = real + kind = kind_phys + intent = in optional = F [tsfg] standard_name = surface_ground_temperature_for_radiation @@ -80,6 +49,175 @@ kind = kind_phys intent = in optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alb1d] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = surface_snow_thickness_water_equivalent + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snoalb] + standard_name = upper_bound_on_max_albedo_over_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvsf] + standard_name = mean_vis_albedo_with_strong_cosz_dependency + long_name = mean vis albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnsf] + standard_name = mean_nir_albedo_with_strong_cosz_dependency + long_name = mean nir albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alvwf] + standard_name = mean_vis_albedo_with_weak_cosz_dependency + long_name = mean vis albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[alnwf] + standard_name = mean_nir_albedo_with_weak_cosz_dependency + long_name = mean nir albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facsf] + standard_name = fractional_coverage_with_strong_cosz_dependency + long_name = fractional coverage with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[facwf] + standard_name = fractional_coverage_with_weak_cosz_dependency + long_name = fractional coverage with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[fice] + standard_name = sea_ice_concentration + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tisfc] + standard_name = sea_ice_temperature + long_name = sea ice surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfalb] + standard_name = surface_diffused_shortwave_albedo + long_name = mean surface diffused sw albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = out + optional = F +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_dimension) + type = integer + intent = out + optional = F [sfcalb1] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam @@ -116,15 +254,6 @@ kind = kind_phys intent = out optional = F -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From fda501ec210d8accff5854dc5f18f9d952451e76 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 21 Jan 2020 12:39:39 -0700 Subject: [PATCH 02/17] remove dependency on GFS_typedefs.F90 for rrtmg_sw_post scheme --- physics/rrtmg_sw_post.F90 | 106 ++++++++++----------- physics/rrtmg_sw_post.meta | 190 +++++++++++++++++++++++++++++-------- 2 files changed, 206 insertions(+), 90 deletions(-) diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index e11491d48..e433271e2 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -15,29 +15,29 @@ end subroutine rrtmg_sw_post_init !! \htmlinclude rrtmg_sw_post_run.html !! #endif - subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & - im, ltp, nday, lm, kd, htswc, htsw0, & - sfcalb1, sfcalb2, sfcalb3, sfcalb4, scmpsw, errmsg, errflg) + subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & + swhtr, htswc, htsw0, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & + scmpsw, sfcfsw, topfsw, nirbmdi, nirdfdi, visbmdi, visdfdi, & + nirbmui, nirdfui, visbmui, visdfui, sfcdsw, sfcnsw, htrsw, & + swhc, errmsg, errflg) use machine, only: kind_phys use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & cmpfsw_type - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_grid_type), intent(in) :: Grid - type(GFS_diag_type), intent(inout) :: Diag - integer, intent(in) :: im, lm, kd, nday, ltp - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(inout) :: scmpsw - real(kind=kind_phys), dimension(Size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htswc, htsw0 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + + integer, intent(in) :: im, lm, kd, nday, levr, levs, ltp + logical, intent(in) :: lsswr, swhtr + real(kind=kind_phys), dimension(im, levr+LTP), intent(in) :: htswc, htsw0 + real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + type(cmpfsw_type), dimension(im), intent(inout) :: scmpsw + type(sfcfsw_type), dimension(im), intent(inout) :: sfcfsw + type(topfsw_type), dimension(im), intent(inout) :: topfsw + real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, visbmdi, & + visdfdi, nirbmui, nirdfui, & + visbmui, visdfui, sfcdsw, sfcnsw + real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables @@ -47,29 +47,29 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & errmsg = '' errflg = 0 - if (Model%lsswr) then + if (lsswr) then if (nday > 0) then do k = 1, LM k1 = k + kd - Radtend%htrsw(1:im,k) = htswc(1:im,k1) + htrsw(1:im,k) = htswc(1:im,k1) enddo ! We are assuming that radiative tendencies are from bottom to top ! --- repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrsw (1:im,k) = Radtend%htrsw (1:im,LM) + if (lm < levs) then + do k = lm, levs + htrsw (1:im,k) = htrsw (1:im,LM) enddo endif - if (Model%swhtr) then + if (swhtr) then do k = 1, lm k1 = k + kd - Radtend%swhc(1:im,k) = htsw0(1:im,k1) + swhc(1:im,k) = htsw0(1:im,k1) enddo ! --- repopulate the points above levr i.e. LM - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%swhc(1:im,k) = Radtend%swhc(1:im,LM) + if (lm < levs) then + do k = lm, levs + swhc(1:im,k) = swhc(1:im,LM) enddo endif endif @@ -79,47 +79,47 @@ subroutine rrtmg_sw_post_run (Model, Grid, Diag, Radtend, Coupling, & !! output. do i=1,im - Coupling%nirbmdi(i) = scmpsw(i)%nirbm - Coupling%nirdfdi(i) = scmpsw(i)%nirdf - Coupling%visbmdi(i) = scmpsw(i)%visbm - Coupling%visdfdi(i) = scmpsw(i)%visdf - - Coupling%nirbmui(i) = scmpsw(i)%nirbm * sfcalb1(i) - Coupling%nirdfui(i) = scmpsw(i)%nirdf * sfcalb2(i) - Coupling%visbmui(i) = scmpsw(i)%visbm * sfcalb3(i) - Coupling%visdfui(i) = scmpsw(i)%visdf * sfcalb4(i) + nirbmdi(i) = scmpsw(i)%nirbm + nirdfdi(i) = scmpsw(i)%nirdf + visbmdi(i) = scmpsw(i)%visbm + visdfdi(i) = scmpsw(i)%visdf + + nirbmui(i) = scmpsw(i)%nirbm * sfcalb1(i) + nirdfui(i) = scmpsw(i)%nirdf * sfcalb2(i) + visbmui(i) = scmpsw(i)%visbm * sfcalb3(i) + visdfui(i) = scmpsw(i)%visdf * sfcalb4(i) enddo else ! if_nday_block - Radtend%htrsw(:,:) = 0.0 + htrsw(:,:) = 0.0 - Radtend%sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) - Diag%topfsw = topfsw_type( 0.0, 0.0, 0.0 ) - scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) + sfcfsw = sfcfsw_type( 0.0, 0.0, 0.0, 0.0 ) + topfsw = topfsw_type( 0.0, 0.0, 0.0 ) + scmpsw = cmpfsw_type( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) do i=1,im - Coupling%nirbmdi(i) = 0.0 - Coupling%nirdfdi(i) = 0.0 - Coupling%visbmdi(i) = 0.0 - Coupling%visdfdi(i) = 0.0 - - Coupling%nirbmui(i) = 0.0 - Coupling%nirdfui(i) = 0.0 - Coupling%visbmui(i) = 0.0 - Coupling%visdfui(i) = 0.0 + 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 (Model%swhtr) then - Radtend%swhc(:,:) = 0 + if (swhtr) then + swhc(:,:) = 0 endif endif ! end_if_nday ! --- radiation fluxes for other physics processes do i=1,im - Coupling%sfcnsw(i) = Radtend%sfcfsw(i)%dnfxc - Radtend%sfcfsw(i)%upfxc - Coupling%sfcdsw(i) = Radtend%sfcfsw(i)%dnfxc + sfcnsw(i) = sfcfsw(i)%dnfxc - sfcfsw(i)%upfxc + sfcdsw(i) = sfcfsw(i)%dnfxc enddo endif ! end_if_lsswr diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 28b54b5bf..b1e0e63db 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -6,49 +6,25 @@ [ccpp-arg-table] name = rrtmg_sw_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[levr] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = adjusted number of vertical layers for radiation + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = Fortran DDT containing FV3-GFS diagnotics data - units = DDT - dimensions = () - type = GFS_diag_type - intent = inout - optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS fields targetted for diagnostic output - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT - dimensions = () - type = GFS_coupling_type - intent = inout - optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels units = count dimensions = () type = integer @@ -86,6 +62,22 @@ type = integer intent = in optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[swhtr] + standard_name = flag_for_output_of_shortwave_heating_rate + long_name = flag to output sw heating rate (Radtend%swhc) + units = flag + dimensions = () + type = logical + intent = in + optional = F [htswc] standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky heating rate due to shortwave radiation @@ -148,6 +140,130 @@ type = cmpfsw_type intent = inout optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = inout + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_dimension) + type = topfsw_type + intent = inout + optional = F +[nirbmdi] + standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir beam sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nirdfdi] + standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir diff sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visbmdi] + standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis beam sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visdfdi] + standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis diff sw downward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nirbmui] + standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir beam sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[nirdfui] + standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step + long_name = sfc nir diff sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visbmui] + standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis beam sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[visdfui] + standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step + long_name = sfc uv+vis diff sw upward flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcdsw] + standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step + long_name = total sky sfc downward sw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcnsw] + standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step + long_name = total sky sfc netsw flx into ground + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[htrsw] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + long_name = total sky sw heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[swhc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep + long_name = clear sky sw heating rates + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 2d353c0a547b68efe50c9d063cd6cab0f9a48eee Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 21 Jan 2020 12:40:15 -0700 Subject: [PATCH 03/17] remove dependency on GFS_typedefs.F90 for rrtmg_lw_pre scheme --- physics/rrtmg_lw_pre.F90 | 33 +++++------- physics/rrtmg_lw_pre.meta | 106 +++++++++++++++++++++++++++----------- 2 files changed, 91 insertions(+), 48 deletions(-) diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index 5f128a79a..c14053a10 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -14,37 +14,32 @@ end subroutine rrtmg_lw_pre_init !> \section arg_table_rrtmg_lw_pre_run Argument Table !! \htmlinclude rrtmg_lw_pre_run.html !! - subroutine rrtmg_lw_pre_run (Model, Grid, Sfcprop, Radtend, im, tsfg, tsfa, errmsg, errflg) + subroutine rrtmg_lw_pre_run (im, lslwr, xlat, xlon, slmsk, snowd, sncovr,& + zorl, hprime, tsfg, tsfa, semis, errmsg, errflg) use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_sfcprop_type use module_radiation_surface, only: setemis implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_grid_type), intent(in) :: Grid - integer, intent(in) :: im - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa, tsfg - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + + integer, intent(in) :: im + logical, intent(in) :: lslwr + real(kind=kind_phys), dimension(im), intent(in) :: xlat, xlon, slmsk, & + snowd, sncovr, zorl, hprime, tsfa, tsfg + real(kind=kind_phys), dimension(im), intent(out) :: semis + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg ! Initialize CCPP error handling variables errmsg = '' errflg = 0 - if (Model%lslwr) then + if (lslwr) then !> - Call module_radiation_surface::setemis(),to setup surface !! emissivity for LW radiation. - call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs - Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & - tsfg, tsfa, Sfcprop%hprime(:,1), IM, & - Radtend%semis) ! --- outputs + call setemis (xlon, xlat, slmsk, snowd, sncovr, zorl, tsfg, tsfa, & + hprime, im, & ! --- inputs + semis) ! --- outputs endif end subroutine rrtmg_lw_pre_run diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 6b4488b26..481850494 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -6,44 +6,83 @@ [ccpp-arg-table] name = rrtmg_lw_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_grid_type + type = logical intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT - dimensions = () - type = GFS_sfcprop_type +[xlat] + standard_name = latitude + long_name = latitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout +[xlon] + standard_name = longitude + long_name = longitude + units = radians + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[snowd] + standard_name = surface_snow_thickness_water_equivalent + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[zorl] + standard_name = surface_roughness_length + long_name = surface roughness length + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[hprime] + standard_name = standard_deviation_of_subgrid_orography + long_name = standard deviation of subgrid orography + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys intent = in optional = F [tsfg] @@ -64,6 +103,15 @@ kind = kind_phys intent = in optional = F +[semis] + standard_name = surface_longwave_emissivity + long_name = surface lw emissivity in fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From eeaa98bc84f2709be9f6cc82a4eaafae14e89fec Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 21 Jan 2020 15:52:13 -0700 Subject: [PATCH 04/17] remove dependency on GFS_typedefs.F90 for rrtmg_lw_post scheme --- physics/rrtmg_lw_post.F90 | 57 ++++++++++----------- physics/rrtmg_lw_post.meta | 100 +++++++++++++++++++++++++------------ 2 files changed, 97 insertions(+), 60 deletions(-) diff --git a/physics/rrtmg_lw_post.F90 b/physics/rrtmg_lw_post.F90 index 971b278dd..310b660e3 100644 --- a/physics/rrtmg_lw_post.F90 +++ b/physics/rrtmg_lw_post.F90 @@ -16,25 +16,26 @@ end subroutine rrtmg_lw_post_init !! \htmlinclude rrtmg_lw_post_run.html !! #endif - subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & - im, ltp, lm, kd, tsfa, htlwc, htlw0, errmsg, errflg) + subroutine rrtmg_lw_post_run (im, levs, ltp, lm, kd, lslwr, lwhtr, & + tsfa, htlwc, htlw0, sfcflw, tsflw, htrlw, lwhc, sfcdlw, & + errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type + use module_radlw_parameters, only: sfcflw_type + implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_grid_type), intent(in) :: Grid - type(GFS_radtend_type), intent(inout) :: Radtend - integer, intent(in) :: im, ltp, LM, kd - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlwc - real(kind=kind_phys), dimension(size(Grid%xlon,1), Model%levr+LTP), intent(in) :: htlw0 - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: tsfa - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg + + integer, intent(in) :: im, ltp, LM, kd, levs + logical, intent(in) :: lslwr, lwhtr + real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlwc + real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlw0 + real(kind=kind_phys), dimension(im), intent(in) :: tsfa + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + real(kind=kind_phys), dimension(im), intent(inout) :: tsflw, sfcdlw + real(kind=kind_phys), dimension(im, levs), intent(inout) :: htrlw, lwhc + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! local variables integer :: k1, k @@ -42,38 +43,38 @@ subroutine rrtmg_lw_post_run (Model, Grid, Radtend, Coupling, & errmsg = '' errflg = 0 - if (Model%lslwr) then + if (lslwr) then !> -# Save calculation results !> - Save surface air temp for diurnal adjustment at model t-steps - Radtend%tsflw (:) = tsfa(:) + tsflw (:) = tsfa(:) do k = 1, LM k1 = k + kd - Radtend%htrlw(1:im,k) = htlwc(1:im,k1) + htrlw(1:im,k) = htlwc(1:im,k1) enddo ! --- repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%htrlw (1:im,k) = Radtend%htrlw (1:im,LM) + if (lm < levs) then + do k = lm, levs + htrlw (1:im,k) = htrlw (1:im,LM) enddo endif - if (Model%lwhtr) then + if (lwhtr) then do k = 1, lm k1 = k + kd - Radtend%lwhc(1:im,k) = htlw0(1:im,k1) + lwhc(1:im,k) = htlw0(1:im,k1) enddo ! --- repopulate the points above levr - if (lm < Model%levs) then - do k = lm,Model%levs - Radtend%lwhc(1:im,k) = Radtend%lwhc(1:im,LM) + if (lm < levs) then + do k = lm, levs + lwhc(1:im,k) = lwhc(1:im,LM) enddo endif endif ! --- radiation fluxes for other physics processes - Coupling%sfcdlw(:) = Radtend%sfcflw(:)%dnfxc + sfcdlw(:) = sfcflw(:)%dnfxc endif ! end_if_lslwr diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 92b4003d7..b5176392d 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -6,41 +6,17 @@ [ccpp-arg-table] name = rrtmg_lw_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT - dimensions = () - type = GFS_control_type - intent = in - optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS fields targetted for diagnostic output - units = DDT - dimensions = () - type = GFS_radtend_type - intent = inout - optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT - dimensions = () - type = GFS_coupling_type - intent = inout - optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels units = count dimensions = () type = integer @@ -70,6 +46,22 @@ type = integer intent = in optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lwhtr] + standard_name = flag_for_output_of_longwave_heating_rate + long_name = flag to output lw heating rate (Radtend%lwhc) + units = flag + dimensions = () + type = logical + intent = in + optional = F [tsfa] standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation @@ -97,6 +89,50 @@ kind = kind_phys intent = in optional = F +[sfcflw] + standard_name = lw_fluxes_sfc + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcflw_type + intent = in + optional = F +[tsflw] + standard_name = surface_midlayer_air_temperature_in_longwave_radiation + long_name = surface air temp during lw calculation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[htrlw] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + long_name = total sky lw heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[lwhc] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep + long_name = clear sky lw heating rates + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[sfcdlw] + standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + long_name = total sky sfc downward lw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From c7dbbcee73f1bd9456a4fa4bf4b9681ecb1a5ace Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 23 Jan 2020 09:55:12 -0700 Subject: [PATCH 05/17] remove dependency on GFS_typedefs for GFS_phys_time_vary_init for the SCM --- physics/GFS_phys_time_vary.scm.F90 | 117 ++++---- physics/GFS_phys_time_vary.scm.meta | 361 +++++++++++++++++++++-- physics/GFS_suite_init_finalize_test.F90 | 2 - 3 files changed, 405 insertions(+), 75 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 3b4bbaf77..ec4f13a28 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,18 +33,33 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errflg) + subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, aero_in, & + iccn, iflip, idate, nblks, blksz, nx, ny, xlat_d, xlon_d, levh2o_int, & + levozp_int, ozpl, h2opl, aer_nm, jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, & + jindx2_h, ddy_h, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, & + ddx_aer, jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, & + oz_pres_int, h2o_pres_int, imap, jmap, errmsg, errflg) - use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & - GFS_Tbd_type, GFS_interstitial_type + use machine, only: kind_phys implicit none ! Interface variables - type(GFS_grid_type), intent(inout) :: Grid - type(GFS_control_type), intent(in) :: Model - type(GFS_interstitial_type), intent(inout) :: Interstitial - type(GFS_tbd_type), intent(in) :: Tbd + integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int + integer, dimension(4), intent(in) :: idate + integer, dimension(nblks), intent(in) :: blksz + logical, intent(in) :: h2o_phys, aero_in, iccn + real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d + real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl + real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl + real(kind=kind_phys), dimension(:,:,:), intent(in) :: aer_nm + + integer, dimension(im), intent(inout) :: imap, jmap + integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, iindx2_ci + real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci + real(kind=kind_phys), dimension(levozp_int), intent(inout) :: oz_pres_int + real(kind=kind_phys), dimension(levh2o_int), intent(inout) :: h2o_pres_int + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -60,120 +75,120 @@ subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errf nb = 1 nt = 1 - call read_o3data (Model%ntoz, Model%me, Model%master) + call read_o3data (ntoz, me, master) ! Consistency check that the hardcoded values for levozp and ! oz_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff)) - if (size(Tbd%ozpl, dim=2).ne.levozp) then + if (size(ozpl, dim=2).ne.levozp) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levozp from read_o3data does not match value in GFS_typedefs.F90: ", & - levozp, " /= ", size(Tbd%ozpl, dim=2) + levozp, " /= ", size(ozpl, dim=2) errflg = 1 end if - if (size(Tbd%ozpl, dim=3).ne.oz_coeff) then + if (size(ozpl, dim=3).ne.oz_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "oz_coeff from read_o3data does not match value in GFS_typedefs.F90: ", & - oz_coeff, " /= ", size(Tbd%ozpl, dim=3) + oz_coeff, " /= ", size(ozpl, dim=3) errflg = 1 end if - call read_h2odata (Model%h2o_phys, Model%me, Model%master) + call read_h2odata (h2o_phys, me, master) ! Consistency check that the hardcoded values for levh2o and ! h2o_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%h2opl (IM,levh2o,h2o_coeff)) - if (size(Tbd%h2opl, dim=2).ne.levh2o) then + if (size(h2opl, dim=2).ne.levh2o) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levh2o from read_h2odata does not match value in GFS_typedefs.F90: ", & - levh2o, " /= ", size(Tbd%h2opl, dim=2) + levh2o, " /= ", size(h2opl, dim=2) errflg = 1 end if - if (size(Tbd%h2opl, dim=3).ne.h2o_coeff) then + if (size(h2opl, dim=3).ne.h2o_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "h2o_coeff from read_h2odata does not match value in GFS_typedefs.F90: ", & - h2o_coeff, " /= ", size(Tbd%h2opl, dim=3) + h2o_coeff, " /= ", size(h2opl, dim=3) errflg = 1 end if - if (Model%aero_in) then + if (aero_in) then ! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90 ! and used to allocate Tbd%aer_nm matches the value defined in aerclm_def - if (size(Tbd%aer_nm, dim=3).ne.ntrcaerm) then + if (size(aer_nm, dim=3).ne.ntrcaerm) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", & - ntrcaerm, " /= ", size(Tbd%aer_nm, dim=3) + ntrcaerm, " /= ", size(aer_nm, dim=3) errflg = 1 else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If Model%aero_in is .true., then ntrcaer == ntrcaerm - ntrcaer = size(Tbd%aer_nm, dim=3) + ! If aero_in is .true., then ntrcaer == ntrcaerm + ntrcaer = size(aer_nm, dim=3) ! Read aerosol climatology - call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate) + call read_aerdata (me, master, iflip, idate) endif else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If Model%aero_in is .false., then ntrcaer == 1 - ntrcaer = size(Tbd%aer_nm, dim=3) + ! If aero_in is .false., then ntrcaer == 1 + ntrcaer = size(aer_nm, dim=3) endif - if (Model%iccn) then - call read_cidata ( Model%me, Model%master) + if (iccn) then + call read_cidata (me, master) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif ! Update values of oz_pres in Interstitial data type for all threads - if (Model%ntoz > 0) then - Interstitial%oz_pres = oz_pres + if (ntoz > 0) then + oz_pres_int = oz_pres end if ! Update values of h2o_pres in Interstitial data type for all threads - if (Model%h2o_phys) then - Interstitial%h2o_pres = h2o_pres + if (h2o_phys) then + h2o_pres_int = h2o_pres end if !--- read in and initialize ozone - if (Model%ntoz > 0) then - call setindxoz (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_o3, & - Grid%jindx2_o3, Grid%ddy_o3) + if (ntoz > 0) then + call setindxoz (blksz(nb), xlat_d, jindx1_o3, & + jindx2_o3, ddy_o3) endif !--- read in and initialize stratospheric water - if (Model%h2o_phys) then - call setindxh2o (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_h, & - Grid%jindx2_h, Grid%ddy_h) + if (h2o_phys) then + call setindxh2o (blksz(nb), xlat_d, jindx1_h, & + jindx2_h, ddy_h) endif !--- read in and initialize aerosols - if (Model%aero_in) then - call setindxaer (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_aer, & - Grid%jindx2_aer, Grid%ddy_aer, Grid%xlon_d, & - Grid%iindx1_aer, Grid%iindx2_aer, Grid%ddx_aer, & - Model%me, Model%master) + if (aero_in) then + call setindxaer (blksz(nb), xlat_d, jindx1_aer, & + jindx2_aer, ddy_aer, xlon_d, & + iindx1_aer, iindx2_aer, ddx_aer, & + me, master) endif !--- read in and initialize IN and CCN - if (Model%iccn) then - call setindxci (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_ci, & - Grid%jindx2_ci, Grid%ddy_ci, Grid%xlon_d, & - Grid%iindx1_ci, Grid%iindx2_ci, Grid%ddx_ci) + if (iccn) then + call setindxci (blksz(nb), xlat_d, jindx1_ci, & + jindx2_ci, ddy_ci, xlon_d, & + iindx1_ci, iindx2_ci, ddx_ci) endif !--- initial calculation of maps local ix -> global i and j, store in Tbd ix = 0 nb = 1 - do j = 1,Model%ny - do i = 1,Model%nx + do j = 1, ny + do i = 1, nx ix = ix + 1 - if (ix .gt. Model%blksz(nb)) then + if (ix .gt. blksz(nb)) then ix = 1 nb = nb + 1 endif - Tbd%jmap(ix) = j - Tbd%imap(ix) = i + jmap(ix) = j + imap(ix) = i enddo enddo diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 57a82ecb0..30b8bce46 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,38 +1,355 @@ [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index dimensions = () - type = GFS_grid_type - intent = inout + type = integer + intent = in optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = Fortran DDT containing FV3-GFS interstitial data - units = DDT +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index dimensions = () - type = GFS_interstitial_type - intent = inout + type = integer + intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS miscellaneous data - units = DDT +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag dimensions = () - type = GFS_tbd_type + type = logical + intent = in + optional = F +[aero_in] + standard_name = flag_for_aerosol_input_MG + long_name = flag for using aerosols in Morrison-Gettelman MP + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iccn] + standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iflip] + standard_name = flag_for_vertical_index_direction_control + long_name = iflip - is not the same as flipv + units = flag + dimensions = () + type = integer + intent = in + optional = F +[idate] + standard_name = date_and_time_at_model_initialization_reordered + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer intent = in optional = F +[nblks] + standard_name = number_of_blocks + long_name = for explicit data blocking: number of blocks + units = count + dimensions = () + type = integer + intent = in + optional = F +[blksz] + standard_name = horizontal_block_size + long_name = for explicit data blocking: block sizes of all blocks + units = count + dimensions = (number_of_blocks) + type = integer + intent = in + optional = F +[nx] + standard_name = number_of_points_in_x_direction_for_this_MPI_rank + long_name = number of points in x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[ny] + standard_name = number_of_points_in_y_direction_for_this_MPI_rank + long_name = number of points in y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[xlat_d] + standard_name = latitude_degree + long_name = latitude in degrees + units = degree + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlon_d] + standard_name = longitude_degree + long_name = longitude in degrees + units = degree + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[levh2o_int] + standard_name = vertical_dimension_of_h2o_forcing_data + long_name = number of vertical layers in h2o forcing data + units = count + dimensions = () + type = integer + intent = in + optional = F +[levozp_int] + standard_name = vertical_dimension_of_ozone_forcing_data + long_name = number of vertical layers in ozone forcing data + units = count + dimensions = () + type = integer + intent = in + optional = F +[ozpl] + standard_name = ozone_forcing + long_name = ozone forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + type = real + kind = kind_phys + intent = in + optional = F +[h2opl] + standard_name = h2o_forcing + long_name = water forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = in + optional = F +[aer_nm] + standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = in + optional = F +[jindx1_o3] + standard_name = lower_ozone_interpolation_index + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_o3] + standard_name = upper_ozone_interpolation_index + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_o3] + standard_name = ozone_interpolation_weight + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_h] + standard_name = lower_water_vapor_interpolation_index + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_h] + standard_name = upper_water_vapor_interpolation_index + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_h] + standard_name = water_vapor_interpolation_weight + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_aer] + standard_name = lower_aerosol_y_interpolation_index + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_aer] + standard_name = upper_aerosol_y_interpolation_index + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_aer] + standard_name = aerosol_y_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[iindx1_aer] + standard_name = lower_aerosol_x_interpolation_index + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[iindx2_aer] + standard_name = upper_aerosol_x_interpolation_index + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddx_aer] + standard_name = aerosol_x_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[jindx1_ci] + standard_name = lower_cloud_nuclei_y_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jindx2_ci] + standard_name = upper_cloud_nuclei_y_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddy_ci] + standard_name = cloud_nuclei_y_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[iindx1_ci] + standard_name = lower_cloud_nuclei_x_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[iindx2_ci] + standard_name = upper_cloud_nuclei_x_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[ddx_ci] + standard_name = cloud_nuclei_x_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[oz_pres_int] + standard_name = natural_log_of_ozone_forcing_data_pressure_levels + long_name = natural log of ozone forcing data pressure levels + units = log(Pa) + dimensions = (vertical_dimension_of_ozone_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[h2o_pres_int] + standard_name = natural_log_of_h2o_forcing_data_pressure_levels + long_name = natural log of h2o forcing data pressure levels + units = log(Pa) + dimensions = (vertical_dimension_of_h2o_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/GFS_suite_init_finalize_test.F90 b/physics/GFS_suite_init_finalize_test.F90 index 0a958d2fc..bdd1d2939 100644 --- a/physics/GFS_suite_init_finalize_test.F90 +++ b/physics/GFS_suite_init_finalize_test.F90 @@ -43,8 +43,6 @@ end subroutine GFS_suite_ini_fini_test_finalize !! subroutine GFS_suite_ini_fini_test_run (errmsg, errflg) - use GFS_typedefs, only: GFS_interstitial_type - implicit none ! interface variables From 4a2ea3f7a5f972ebebe987fdaa03c69e6f080551 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 21 Aug 2020 17:37:56 -0600 Subject: [PATCH 06/17] swap aero_in for iaerclm in GFS_phys_time_vary.scm --- physics/GFS_phys_time_vary.scm.F90 | 4 ++-- physics/GFS_phys_time_vary.scm.meta | 6 +++--- physics/rrtmgp_lw_pre.F90 | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index d353a7d08..53ca82651 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,7 +33,7 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, aero_in, & + subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & iccn, iflip, idate, nblks, blksz, nx, ny, xlat_d, xlon_d, levh2o_int, & levozp_int, ozpl, h2opl, aer_nm, jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, & jindx2_h, ddy_h, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, & @@ -48,7 +48,7 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, aero_in, & integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int integer, dimension(4), intent(in) :: idate integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, aero_in, iccn + logical, intent(in) :: h2o_phys, iaerclm, iccn real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 30b8bce46..1e2dc2d0a 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -33,9 +33,9 @@ type = logical intent = in optional = F -[aero_in] - standard_name = flag_for_aerosol_input_MG - long_name = flag for using aerosols in Morrison-Gettelman MP +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation units = flag dimensions = () type = logical diff --git a/physics/rrtmgp_lw_pre.F90 b/physics/rrtmgp_lw_pre.F90 index 1148c6705..7ad8bd30d 100644 --- a/physics/rrtmgp_lw_pre.F90 +++ b/physics/rrtmgp_lw_pre.F90 @@ -2,12 +2,6 @@ module rrtmgp_lw_pre use physparam use machine, only: & kind_phys ! Working type - use GFS_typedefs, only: & - GFS_control_type, & ! - GFS_sfcprop_type, & ! Surface fields - GFS_grid_type, & ! Grid and interpolation related data - GFS_statein_type, & ! - GFS_radtend_type ! Radiation tendencies needed in physics use module_radiation_surface, only: & setemis ! Routine to compute surface-emissivity use mo_gas_optics_rrtmgp, only: & From b76bb2cc797116be54561dcce3fe27d662cdb7db Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 21 Aug 2020 18:23:55 -0600 Subject: [PATCH 07/17] revert some changes in meta files accidentally merged in --- physics/GFS_phys_time_vary.scm.meta | 18 +++++++++--------- physics/rrtmg_lw_post.meta | 4 ++-- physics/rrtmg_lw_pre.meta | 4 ++-- physics/rrtmg_sw_post.meta | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 1e2dc2d0a..86b91e8c3 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -44,9 +44,9 @@ [iccn] standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics long_name = flag for IN and CCN forcing for morrison gettelman microphysics - units = flag + units = none dimensions = () - type = logical + type = integer intent = in optional = F [iflip] @@ -66,7 +66,7 @@ intent = in optional = F [nblks] - standard_name = number_of_blocks + standard_name = ccpp_block_count long_name = for explicit data blocking: number of blocks units = count dimensions = () @@ -74,10 +74,10 @@ intent = in optional = F [blksz] - standard_name = horizontal_block_size + standard_name = ccpp_block_sizes long_name = for explicit data blocking: block sizes of all blocks units = count - dimensions = (number_of_blocks) + dimensions = (ccpp_block_count) type = integer intent = in optional = F @@ -106,18 +106,18 @@ intent = in optional = F [xlat_d] - standard_name = latitude_degree + standard_name = latitude_in_degree long_name = latitude in degrees - units = degree + units = degree_north dimensions = (horizontal_dimension) type = real kind = kind_phys intent = in optional = F [xlon_d] - standard_name = longitude_degree + standard_name = longitude_in_degree long_name = longitude in degrees - units = degree + units = degree_east dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 5108e8eb2..447e3a066 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -107,7 +107,7 @@ intent = inout optional = F [htrlw] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -116,7 +116,7 @@ intent = inout optional = F [lwhc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky lw heating rates units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index 481850494..d4054cc0b 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -25,7 +25,7 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -34,7 +34,7 @@ [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 00687e055..ba1739e44 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -247,7 +247,7 @@ intent = inout optional = F [htrsw] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -256,7 +256,7 @@ intent = inout optional = F [swhc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_timestep + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky sw heating rates units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) From eea20edd2db63ba93a32648ad88d524188f86353 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 25 Aug 2020 10:48:35 -0600 Subject: [PATCH 08/17] remove DDTs from GFS_phys_time_vary_init (SCM), GFS_rad_time_vary (SCM), GFS_rrtmg_post --- physics/GFS_phys_time_vary.scm.F90 | 8 +- physics/GFS_rad_time_vary.scm.F90 | 69 +++++---- physics/GFS_rad_time_vary.scm.meta | 234 +++++++++++++++++++++++++++-- physics/GFS_rrtmg_post.F90 | 152 +++++++++---------- physics/GFS_rrtmg_post.meta | 185 ++++++++++++++++++----- physics/gscond.meta | 24 +-- 6 files changed, 496 insertions(+), 176 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 53ca82651..f2a913982 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -45,10 +45,10 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & implicit none ! Interface variables - integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int + integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int, iccn integer, dimension(4), intent(in) :: idate integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, iaerclm, iccn + logical, intent(in) :: h2o_phys, iaerclm real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl @@ -135,7 +135,7 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & ntrcaer = size(aer_nm, dim=3) endif - if (iccn) then + if (iccn == 1) then call read_cidata (me, master) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 @@ -172,7 +172,7 @@ subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & me, master) endif !--- read in and initialize IN and CCN - if (iccn) then + if (iccn == 1) then call setindxci (blksz(nb), xlat_d, jindx1_ci, & jindx2_ci, ddy_ci, xlon_d, & iindx1_ci, iindx2_ci, ddx_ci) diff --git a/physics/GFS_rad_time_vary.scm.F90 b/physics/GFS_rad_time_vary.scm.F90 index 13ae5e14b..738065cfc 100644 --- a/physics/GFS_rad_time_vary.scm.F90 +++ b/physics/GFS_rad_time_vary.scm.F90 @@ -21,29 +21,46 @@ end subroutine GFS_rad_time_vary_init !> \section arg_table_GFS_rad_time_vary_run Argument Table !! \htmlinclude GFS_rad_time_vary_run.html !! - subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) + subroutine GFS_rad_time_vary_run (cnx, cny, lsswr, lslwr, isubc_sw, & + isubc_lw, sec, nblks, blksz, isc, jsc, imp_physics, & + imp_physics_zhao_carr, kdt, tgrs, qgrs_wv, prsi, imap, jmap, & + icsdsw, icsdlw, t_minus_two_delt, qv_minus_two_delt, & + t_minus_delt, qv_minus_delt, ps_minus_two_delt, ps_minus_delt, & + errmsg, errflg) use physparam, only: ipsd0, ipsdlim, iaerflg use mersenne_twister, only: random_setseed, random_index, random_stat use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type use radcons, only: qmin, con_100 implicit none - type(GFS_control_type), intent(inout) :: Model - type(GFS_statein_type), intent(in) :: Statein - type(GFS_tbd_type), intent(inout) :: Tbd + integer, intent(in) :: cnx, cny, isubc_sw, isubc_lw, & + nblks, isc, jsc, imp_physics,& + imp_physics_zhao_carr, kdt + logical, intent(in) :: lsswr, lslwr + real(kind=kind_phys), intent(in) :: sec + + integer, dimension(nblks), intent(in) :: blksz + integer, dimension(:), intent(in) :: imap, jmap + + integer, dimension(:), intent(inout) :: icsdsw, icsdlw + + real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, qgrs_wv + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi + + real(kind=kind_phys), dimension(:,:), intent(inout) :: t_minus_two_delt, & + qv_minus_two_delt, t_minus_delt, qv_minus_delt + real(kind=kind_phys), dimension(:), intent(inout) :: ps_minus_two_delt,& + ps_minus_delt + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !--- local variables type (random_stat) :: stat - integer :: ix, nb, j, i, nblks, ipseed - integer :: numrdm(Model%cnx*Model%cny*2) + integer :: ix, nb, j, i, ipseed + integer :: numrdm(cnx*cny*2) ! Initialize CCPP error handling variables errmsg = '' @@ -51,34 +68,34 @@ subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) nb = 1 - if (Model%lsswr .or. Model%lslwr) then + if (lsswr .or. lslwr) then !--- call to GFS_radupdate_run is now in GFS_rrtmg_setup_run !--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid) - if ((Model%isubc_lw==2) .or. (Model%isubc_sw==2)) then - ipseed = mod(nint(con_100*sqrt(Model%sec)), ipsdlim) + 1 + ipsd0 + if ((isubc_lw==2) .or. (isubc_sw==2)) then + ipseed = mod(nint(con_100*sqrt(sec)), ipsdlim) + 1 + ipsd0 call random_setseed (ipseed, stat) call random_index (ipsdlim, numrdm, stat) !--- set the random seeds for each column in a reproducible way - do ix=1,Model%blksz(nb) - j = Tbd%jmap(ix) - i = Tbd%imap(ix) + do ix=1,blksz(nb) + j = jmap(ix) + i = imap(ix) !--- for testing purposes, replace numrdm with '100' - Tbd%icsdsw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx) - Tbd%icsdlw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + Model%cnx*Model%cny) + icsdsw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx) + icsdlw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx + cnx*cny) enddo endif ! isubc_lw and isubc_sw - if (Model%imp_physics == 99) then - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,1) = Statein%tgrs - Tbd%phy_f3d(:,:,2) = max(qmin,Statein%qgrs(:,:,1)) - Tbd%phy_f3d(:,:,3) = Statein%tgrs - Tbd%phy_f3d(:,:,4) = max(qmin,Statein%qgrs(:,:,1)) - Tbd%phy_f2d(:,1) = Statein%prsi(:,1) - Tbd%phy_f2d(:,2) = Statein%prsi(:,1) + if (imp_physics == imp_physics_zhao_carr) then + if (kdt == 1) then + t_minus_two_delt(:,:) = tgrs + qv_minus_two_delt(:,:) = max(qmin,qgrs_wv(:,:)) + t_minus_delt(:,:) = tgrs + qv_minus_delt(:,:) = max(qmin,qgrs_wv(:,:)) + ps_minus_two_delt(:) = prsi(:,1) + ps_minus_delt(:) = prsi(:,1) endif endif diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index 7e87f1f8a..b5de5ed12 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -6,28 +6,230 @@ [ccpp-arg-table] name = GFS_rad_time_vary_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[cnx] + standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face + long_name = number of points in x direction for this cubed sphere face + units = count dimensions = () - type = GFS_control_type - intent = inout + type = integer + intent = in + optional = F +[cny] + standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face + long_name = number of points in y direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore - units = DDT +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[isubc_sw] + standard_name = flag_for_sw_clouds_without_sub_grid_approximation + long_name = flag for sw clouds without sub-grid approximation + units = flag dimensions = () - type = GFS_statein_type + type = integer + intent = in + optional = F +[isubc_lw] + standard_name = flag_for_lw_clouds_without_sub_grid_approximation + long_name = flag for lw clouds without sub-grid approximation + units = flag + dimensions = () + type = integer intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container - units = DDT +[sec] + standard_name = seconds_elapsed_since_model_initialization + long_name = seconds elapsed since model initialization + units = s dimensions = () - type = GFS_tbd_type + type = real + kind = kind_phys + intent = in + optional = F +[nblks] + standard_name = ccpp_block_count + long_name = for explicit data blocking: number of blocks + units = count + dimensions = () + type = integer + intent = in + optional = F +[blksz] + standard_name = ccpp_block_sizes + long_name = for explicit data blocking: block sizes of all blocks + units = count + dimensions = (ccpp_block_count) + type = integer + intent = in + optional = F +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = flag_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[qgrs_wv] + standard_name = water_vapor_specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[icsdsw] + standard_name = seed_random_numbers_sw + long_name = random seeds for sub-column cloud generators sw + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[icsdlw] + standard_name = seed_random_numbers_lw + long_name = random seeds for sub-column cloud generators lw + units = none + dimensions = (horizontal_loop_extent) + type = integer + intent = in + optional = F +[t_minus_two_delt] + standard_name = air_temperature_two_timesteps_back + long_name = air temperature two timesteps back + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qv_minus_two_delt] + standard_name = water_vapor_specific_humidity_two_timesteps_back + long_name = water vapor specific humidity two timesteps back + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[t_minus_delt] + standard_name = air_temperature_at_previous_timestep + long_name = air temperature at previous timestep + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[qv_minus_delt] + standard_name = water_vapor_specific_humidity_at_previous_timestep + long_name = water vapor specific humidity at previous timestep + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ps_minus_two_delt] + standard_name = surface_air_pressure_two_timesteps_back + long_name = surface air pressure two timesteps back + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = inout + optional = F +[ps_minus_delt] + standard_name = surface_air_pressure_at_previous_timestep + long_name = surface air pressure at previous timestep + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys intent = inout optional = F [errmsg] diff --git a/physics/GFS_rrtmg_post.F90 b/physics/GFS_rrtmg_post.F90 index 7f80ca4c3..aacf9aaf5 100644 --- a/physics/GFS_rrtmg_post.F90 +++ b/physics/GFS_rrtmg_post.F90 @@ -13,43 +13,41 @@ end subroutine GFS_rrtmg_post_init !> \section arg_table_GFS_rrtmg_post_run Argument Table !! \htmlinclude GFS_rrtmg_post_run.html !! - subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & - Coupling, scmpsw, im, lm, ltp, kt, kb, kd, raddt, aerodp, & + subroutine GFS_rrtmg_post_run (lsswr, lslwr, lssav, fhlwr, fhswr, prsi, tgrs, sfcflw, sfcfsw, topflw, topfsw, coszen, coszdg, fluxr, & + scmpsw, nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, raddt, aerodp, & cldsa, mtopa, mbota, clouds1, cldtaulw, cldtausw, nday, & errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_radtend_type, & - GFS_diag_type - use module_radiation_aerosols, only: NSPC1 - use module_radsw_parameters, only: cmpfsw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, cmpfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type - use module_radsw_parameters, only: topfsw_type, sfcfsw_type implicit none ! Interface variables - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_statein_type), intent(in) :: Statein - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_radtend_type), intent(in) :: Radtend - type(GFS_diag_type), intent(inout) :: Diag - type(cmpfsw_type), dimension(size(Grid%xlon,1)), intent(in) :: scmpsw - - integer, intent(in) :: im, lm, ltp, kt, kb, kd, nday - real(kind=kind_phys), intent(in) :: raddt - - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(in) :: aerodp - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(in) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(in) :: mbota, mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: clouds1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: cldtausw - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: cldtaulw + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw + type(cmpfsw_type), dimension(im), intent(in) :: scmpsw + type(topflw_type), dimension(im), intent(in) :: topflw + type(topfsw_type), dimension(im), intent(in) :: topfsw + + integer, intent(in) :: nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, nday + real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr + logical, intent(in) :: lsswr, lslwr, lssav + + real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg + + real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi + real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs + + real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp + real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa + integer, dimension(im,3), intent(in) :: mbota, mtopa + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: clouds1 + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtausw + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtaulw + + real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -62,7 +60,7 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & errmsg = '' errflg = 0 - if (.not. (Model%lsswr .or. Model%lslwr)) return + if (.not. (lsswr .or. lslwr)) return !> - For time averaged output quantities (including total-sky and !! clear-sky SW and LW fluxes at TOA and surface; conventional @@ -72,77 +70,77 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & ! --- ... collect the fluxr data for wrtsfc - if (Model%lssav) then - if (Model%lsswr) then + if (lssav) then + if (lsswr) then do i=1,im -! Diag%fluxr(i,34) = Diag%fluxr(i,34) + Model%fhswr*aerodp(i,1) ! total aod at 550nm -! Diag%fluxr(i,35) = Diag%fluxr(i,35) + Model%fhswr*aerodp(i,2) ! DU aod at 550nm -! Diag%fluxr(i,36) = Diag%fluxr(i,36) + Model%fhswr*aerodp(i,3) ! BC aod at 550nm -! Diag%fluxr(i,37) = Diag%fluxr(i,37) + Model%fhswr*aerodp(i,4) ! OC aod at 550nm -! Diag%fluxr(i,38) = Diag%fluxr(i,38) + Model%fhswr*aerodp(i,5) ! SU aod at 550nm -! Diag%fluxr(i,39) = Diag%fluxr(i,39) + Model%fhswr*aerodp(i,6) ! SS aod at 550nm - Diag%fluxr(i,34) = aerodp(i,1) ! total aod at 550nm - Diag%fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm - Diag%fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm - Diag%fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm - Diag%fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm - Diag%fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm +! fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm +! fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm +! fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm +! fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm +! fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm +! fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm + fluxr(i,34) = aerodp(i,1) ! total aod at 550nm + fluxr(i,35) = aerodp(i,2) ! DU aod at 550nm + fluxr(i,36) = aerodp(i,3) ! BC aod at 550nm + fluxr(i,37) = aerodp(i,4) ! OC aod at 550nm + fluxr(i,38) = aerodp(i,5) ! SU aod at 550nm + fluxr(i,39) = aerodp(i,6) ! SS aod at 550nm enddo endif ! --- save lw toa and sfc fluxes - if (Model%lslwr) then + if (lslwr) then do i=1,im ! --- lw total-sky fluxes - Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + Model%fhlwr * Diag%topflw(i)%upfxc ! total sky top lw up - Diag%fluxr(i,19) = Diag%fluxr(i,19) + Model%fhlwr * Radtend%sfcflw(i)%dnfxc ! total sky sfc lw dn - Diag%fluxr(i,20) = Diag%fluxr(i,20) + Model%fhlwr * Radtend%sfcflw(i)%upfxc ! total sky sfc lw up + fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * topflw(i)%upfxc ! total sky top lw up + fluxr(i,19) = fluxr(i,19) + fhlwr * sfcflw(i)%dnfxc ! total sky sfc lw dn + fluxr(i,20) = fluxr(i,20) + fhlwr * sfcflw(i)%upfxc ! total sky sfc lw up ! --- lw clear-sky fluxes - Diag%fluxr(i,28) = Diag%fluxr(i,28) + Model%fhlwr * Diag%topflw(i)%upfx0 ! clear sky top lw up - Diag%fluxr(i,30) = Diag%fluxr(i,30) + Model%fhlwr * Radtend%sfcflw(i)%dnfx0 ! clear sky sfc lw dn - Diag%fluxr(i,33) = Diag%fluxr(i,33) + Model%fhlwr * Radtend%sfcflw(i)%upfx0 ! clear sky sfc lw up + fluxr(i,28) = fluxr(i,28) + fhlwr * topflw(i)%upfx0 ! clear sky top lw up + fluxr(i,30) = fluxr(i,30) + fhlwr * sfcflw(i)%dnfx0 ! clear sky sfc lw dn + fluxr(i,33) = fluxr(i,33) + fhlwr * sfcflw(i)%upfx0 ! clear sky sfc lw up enddo endif ! --- save sw toa and sfc fluxes with proper diurnal sw wgt. coszen=mean cosz over daylight ! part of sw calling interval, while coszdg= mean cosz over entire interval - if (Model%lsswr) then + if (lsswr) then do i = 1, IM - if (Radtend%coszen(i) > 0.) then + if (coszen(i) > 0.) then ! --- sw total-sky fluxes ! ------------------- - tem0d = Model%fhswr * Radtend%coszdg(i) / Radtend%coszen(i) - Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + Diag%topfsw(i)%upfxc * tem0d ! total sky top sw up - Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + Radtend%sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up - Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + Radtend%sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + tem0d = fhswr * coszdg(i) / coszen(i) + fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up + fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d ! total sky sfc sw up + fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn ! --- sw uv-b fluxes ! -------------- - Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn - Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn + fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn ! --- sw toa incoming fluxes ! ---------------------- - Diag%fluxr(i,23) = Diag%fluxr(i,23) + Diag%topfsw(i)%dnfxc * tem0d ! top sw dn + fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn ! --- sw sfc flux components ! ---------------------- - Diag%fluxr(i,24) = Diag%fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn - Diag%fluxr(i,25) = Diag%fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn - Diag%fluxr(i,26) = Diag%fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn - Diag%fluxr(i,27) = Diag%fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn + fluxr(i,24) = fluxr(i,24) + scmpsw(i)%visbm * tem0d ! uv/vis beam sw dn + fluxr(i,25) = fluxr(i,25) + scmpsw(i)%visdf * tem0d ! uv/vis diff sw dn + fluxr(i,26) = fluxr(i,26) + scmpsw(i)%nirbm * tem0d ! nir beam sw dn + fluxr(i,27) = fluxr(i,27) + scmpsw(i)%nirdf * tem0d ! nir diff sw dn ! --- sw clear-sky fluxes ! ------------------- - Diag%fluxr(i,29) = Diag%fluxr(i,29) + Diag%topfsw(i)%upfx0 * tem0d ! clear sky top sw up - Diag%fluxr(i,31) = Diag%fluxr(i,31) + Radtend%sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up - Diag%fluxr(i,32) = Diag%fluxr(i,32) + Radtend%sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn + fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d ! clear sky top sw up + fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d ! clear sky sfc sw up + fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d ! clear sky sfc sw dn endif enddo endif ! --- save total and boundary layer clouds - if (Model%lsswr .or. Model%lslwr) then + if (lsswr .or. lslwr) then do i=1,im - Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) - Diag%fluxr(i,18) = Diag%fluxr(i,18) + raddt * cldsa(i,5) + 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 @@ -154,15 +152,15 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & tem0d = raddt * cldsa(i,j) itop = mtopa(i,j) - kd ibtc = mbota(i,j) - kd - Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d - Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * Statein%prsi(i,itop+kt) - Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * Statein%prsi(i,ibtc+kb) - Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * Statein%tgrs(i,itop) + fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d + fluxr(i,11-j) = fluxr(i,11-j) + tem0d * prsi(i,itop+kt) + fluxr(i,14-j) = fluxr(i,14-j) + tem0d * prsi(i,ibtc+kb) + fluxr(i,17-j) = fluxr(i,17-j) + tem0d * tgrs(i,itop) enddo enddo ! Anning adds optical depth and emissivity output - if (Model%lsswr .and. (nday > 0)) then + if (lsswr .and. (nday > 0)) then do j = 1, 3 do i = 1, IM tem0d = raddt * cldsa(i,j) @@ -172,12 +170,12 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & do k=ibtc,itop tem1 = tem1 + cldtausw(i,k) ! approx .55 um channel enddo - Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 + fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 enddo enddo endif - if (Model%lslwr) then + if (lslwr) then do j = 1, 3 do i = 1, IM tem0d = raddt * cldsa(i,j) @@ -187,7 +185,7 @@ subroutine GFS_rrtmg_post_run (Model, Grid, Diag, Radtend, Statein, & do k=ibtc,itop tem2 = tem2 + cldtaulw(i,k) ! approx 10. um channel enddo - Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) enddo enddo endif diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index 61e89098d..e996236ab 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -6,62 +6,149 @@ [ccpp-arg-table] name = GFS_rrtmg_post_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag dimensions = () - type = GFS_control_type + type = logical intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag dimensions = () - type = GFS_grid_type + type = logical intent = in optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = Fortran DDT containing FV3-GFS diagnotics data - units = DDT +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag dimensions = () - type = GFS_diag_type - intent = inout + type = logical + intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s dimensions = () - type = GFS_radtend_type + type = real + kind = kind_phys intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore - units = DDT +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s dimensions = () - type = GFS_statein_type + type = real + kind = kind_phys intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields to/from coupling with other components - units = DDT - dimensions = () - type = GFS_coupling_type +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfcflw] + standard_name = lw_fluxes_sfc + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcflw_type + intent = in + optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcfsw_type + intent = in + optional = F +[topflw] + standard_name = lw_fluxes_top_atmosphere + long_name = lw radiation fluxes at top + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topflw_type + intent = in + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topfsw_type + intent = in + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys intent = inout optional = F [scmpsw] standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in optional = F +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer + intent = in + optional = F +[nfxr] + standard_name = number_of_radiation_diagnostic_variables + long_name = number of variables stored in the fluxr array + units = count + dimensions = () + type = integer + intent = in + optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -70,6 +157,22 @@ type = integer intent = in optional = F +[km] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in + optional = F +[kmp1] + standard_name = vertical_dimension_plus_one + long_name = number of vertical levels plus one + units = count + dimensions = () + type = integer + intent = in + optional = F [lm] standard_name = number_of_vertical_layers_for_radiation_calculations long_name = number of vertical layers for radiation calculation @@ -123,7 +226,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -132,7 +235,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -141,7 +244,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -149,7 +252,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -157,7 +260,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -166,7 +269,7 @@ standard_name = cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -175,7 +278,7 @@ standard_name = cloud_optical_depth_layers_at_0p55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -209,4 +312,4 @@ ######################################################################## [ccpp-arg-table] name = GFS_rrtmg_post_finalize - type = scheme + type = scheme \ No newline at end of file diff --git a/physics/gscond.meta b/physics/gscond.meta index 57156358f..d8c27c878 100644 --- a/physics/gscond.meta +++ b/physics/gscond.meta @@ -99,8 +99,8 @@ intent = inout optional = F [tp] - standard_name = air_temperature_two_time_steps_back - long_name = air temperature two time steps back + standard_name = air_temperature_two_timesteps_back + long_name = air temperature two timesteps back units = K dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -108,8 +108,8 @@ intent = inout optional = F [qp] - standard_name = water_vapor_specific_humidity_two_time_steps_back - long_name = water vapor specific humidity two time steps back + standard_name = water_vapor_specific_humidity_two_timesteps_back + long_name = water vapor specific humidity two timesteps back units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -117,8 +117,8 @@ intent = inout optional = F [psp] - standard_name = surface_air_pressure_two_time_steps_back - long_name = surface air pressure two time steps back + standard_name = surface_air_pressure_two_timesteps_back + long_name = surface air pressure two timesteps back units = Pa dimensions = (horizontal_dimension) type = real @@ -126,8 +126,8 @@ intent = inout optional = F [tp1] - standard_name = air_temperature_at_previous_time_step - long_name = air temperature at previous time step + standard_name = air_temperature_at_previous_timestep + long_name = air temperature at previous timestep units = K dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -135,8 +135,8 @@ intent = inout optional = F [qp1] - standard_name = water_vapor_specific_humidity_at_previous_time_step - long_name = water vapor specific humidity at previous time step + standard_name = water_vapor_specific_humidity_at_previous_timestep + long_name = water vapor specific humidity at previous timestep units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -144,8 +144,8 @@ intent = inout optional = F [psp1] - standard_name = surface_air_pressure_at_previous_time_step - long_name = surface air surface pressure at previous time step + standard_name = surface_air_pressure_at_previous_timestep + long_name = surface air surface pressure at previous timestep units = Pa dimensions = (horizontal_dimension) type = real From b1e393d980cc8da76bd4b1dde14aae8c9b5ad900 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 09:26:40 -0600 Subject: [PATCH 09/17] cleanup GFS_phys_time_vary.scm --- physics/GFS_phys_time_vary.scm.F90 | 208 ++++---- physics/GFS_phys_time_vary.scm.meta | 777 ++++++++++++++++++++++------ physics/GFS_time_vary_pre.fv3.meta | 2 +- physics/GFS_time_vary_pre.scm.meta | 2 +- 4 files changed, 739 insertions(+), 250 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index f2a913982..2bb04ebb6 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,30 +33,36 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (im, ntoz, me, master, h2o_phys, iaerclm, & - iccn, iflip, idate, nblks, blksz, nx, ny, xlat_d, xlon_d, levh2o_int, & - levozp_int, ozpl, h2opl, aer_nm, jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, & - jindx2_h, ddy_h, jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, & - ddx_aer, jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, & - oz_pres_int, h2o_pres_int, imap, jmap, errmsg, errflg) + subroutine GFS_phys_time_vary_init (im, nx, ny, me, master, nblks, ntoz, iflip, & + iccn, levh2o_int, levozp_int, idate, blksz, h2o_phys, iaerclm, xlat_d, xlon_d,& + ozpl, h2opl, aer_nm, imap, jmap, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, & + jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, & + iindx1_ci, iindx2_ci, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci, & + oz_pres_int, h2o_pres_int, errmsg, errflg) use machine, only: kind_phys implicit none ! Interface variables - integer, intent(in) :: im, ntoz, me, master, iflip, nblks, nx, ny, levh2o_int, levozp_int, iccn - integer, dimension(4), intent(in) :: idate - integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, iaerclm - real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d - real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl - real(kind=kind_phys), dimension(:,:,:), intent(in) :: h2opl - real(kind=kind_phys), dimension(:,:,:), intent(in) :: aer_nm - - integer, dimension(im), intent(inout) :: imap, jmap - integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, iindx2_ci - real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci + integer, intent(in) :: im, nx, ny, me, master, & + nblks, ntoz, iflip, iccn,& + levh2o_int, levozp_int + integer, dimension(4), intent(in) :: idate + integer, dimension(nblks), intent(in) :: blksz + logical, intent(in) :: h2o_phys, iaerclm + real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d + real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl, h2opl, aer_nm + + integer, dimension(im), intent(inout) :: imap, jmap + integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, & + jindx1_h, jindx2_h, & + jindx1_aer, jindx2_aer, & + iindx1_aer, iindx2_aer, & + jindx1_ci, jindx2_ci, & + iindx1_ci, iindx2_ci + real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, & + ddx_aer, ddy_ci, ddx_ci real(kind=kind_phys), dimension(levozp_int), intent(inout) :: oz_pres_int real(kind=kind_phys), dimension(levh2o_int), intent(inout) :: h2o_pres_int @@ -241,25 +247,53 @@ end subroutine GFS_phys_time_vary_finalize !> \section arg_table_GFS_phys_time_vary_run Argument Table !! \htmlinclude GFS_phys_time_vary_run.html !! - subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, Diag, first_time_step, errmsg, errflg) + subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & + ntoz, iccn, nrcm, nsswr, nszero, kdt, imfdeepcnv, seed0, first_time_step,& + lsswr, cal_pre, random_clds, h2o_phys, iaerclm, fhswr, fhlwr, fhour, & + fhzero, dtp, idate, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer,& + jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, & + iindx2_ci, blksz, imap, jmap, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, & + ddx_ci, slmsk, vtype, weasd, prsl, Model, clstp, sncovr, rann, in_nm, & + ccn_nm, ozpl, h2opl, aer_nm, Diag, errmsg, errflg) use mersenne_twister, only: random_setseed, random_number use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & - GFS_Tbd_type, GFS_sfcprop_type, & - GFS_cldprop_type, GFS_diag_type, & - GFS_statein_type - + use GFS_typedefs, only: GFS_control_type, GFS_diag_type + implicit none - type(GFS_grid_type), intent(in) :: Grid - type(GFS_statein_type), intent(in) :: Statein - type(GFS_control_type), intent(inout) :: Model - type(GFS_tbd_type), intent(inout) :: Tbd - type(GFS_sfcprop_type), intent(inout) :: Sfcprop - type(GFS_cldprop_type), intent(inout) :: Cldprop + integer, intent(in) :: levs, cnx, cny, isc, jsc, & + me, master, ntoz, iccn, & + nrcm, nsswr, nszero, kdt, & + imfdeepcnv, seed0 + logical, intent(in) :: first_time_step, lsswr, & + cal_pre, random_clds, & + h2o_phys, iaerclm + real(kind=kind_phys), intent(in) :: fhswr, fhlwr, fhour, & + fhzero, dtp + + integer, dimension(4), intent(in) :: idate + integer, dimension(:), intent(in) :: jindx1_o3, jindx2_o3, & + jindx1_h, jindx2_h, & + jindx1_aer, jindx2_aer, & + iindx1_aer, iindx2_aer, & + jindx1_ci, jindx2_ci, & + iindx1_ci, iindx2_ci, & + blksz, imap, jmap + real(kind=kind_phys), dimension(:), intent(in) :: ddy_o3, ddy_h, ddy_aer, & + ddx_aer, ddy_ci, ddx_ci, & + slmsk, vtype, weasd + real(kind=kind_phys), dimension(:,:), intent(in) :: prsl + + type(GFS_control_type), intent(in) :: Model + + real(kind=kind_phys), intent(inout) :: clstp + real(kind=kind_phys), dimension(:), intent(inout) :: sncovr + real(kind=kind_phys), dimension(:,:), intent(inout) :: rann, in_nm, ccn_nm + real(kind=kind_phys), dimension(:,:,:), intent(inout) :: ozpl, h2opl, aer_nm + type(GFS_diag_type), intent(inout) :: Diag - logical, intent(in) :: first_time_step + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -270,8 +304,8 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, integer :: i, j, k, iseed, iskip, ix, nb, kdt_rad, vegtyp real(kind=kind_phys) :: sec_zero, rsnow real(kind=kind_phys) :: wrk(1) - real(kind=kind_phys) :: rannie(Model%cny) - real(kind=kind_phys) :: rndval(Model%cnx*Model%cny*Model%nrcm) + real(kind=kind_phys) :: rannie(cny) + real(kind=kind_phys) :: rndval(cnx*cny*nrcm) ! Initialize CCPP error handling variables errmsg = '' @@ -288,98 +322,98 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, !--- switch for saving convective clouds - cnvc90.f !--- aka Ken Campana/Yu-Tai Hou legacy - if ((mod(Model%kdt,Model%nsswr) == 0) .and. (Model%lsswr)) then + if ((mod(kdt,nsswr) == 0) .and. (lsswr)) then !--- initialize,accumulate,convert - Model%clstp = 1100 + min(Model%fhswr/con_hr,Model%fhour,con_99) - elseif (mod(Model%kdt,Model%nsswr) == 0) then + clstp = 1100 + min(fhswr/con_hr,fhour,con_99) + elseif (mod(kdt,nsswr) == 0) then !--- accumulate,convert - Model%clstp = 0100 + min(Model%fhswr/con_hr,Model%fhour,con_99) - elseif (Model%lsswr) then + clstp = 0100 + min(fhswr/con_hr,fhour,con_99) + elseif (lsswr) then !--- initialize,accumulate - Model%clstp = 1100 + clstp = 1100 else !--- accumulate - Model%clstp = 0100 + clstp = 0100 endif !--- random number needed for RAS and old SAS and when cal_pre=.true. - if ( (Model%imfdeepcnv <= 0 .or. Model%cal_pre) .and. Model%random_clds ) then - iseed = mod(con_100*sqrt(Model%fhour*con_hr),1.0d9) + Model%seed0 + if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds ) then + iseed = mod(con_100*sqrt(fhour*con_hr),1.0d9) + seed0 call random_setseed(iseed) call random_number(wrk) - do i = 1,Model%cnx*Model%nrcm + do i = 1,cnx*nrcm iseed = iseed + nint(wrk(1)*1000.0) * i call random_setseed(iseed) call random_number(rannie) - rndval(1+(i-1)*Model%cny:i*Model%cny) = rannie(1:Model%cny) + rndval(1+(i-1)*cny:i*cny) = rannie(1:cny) enddo - do k = 1,Model%nrcm - iskip = (k-1)*Model%cnx*Model%cny - do ix=1,Model%blksz(nb) - j = Tbd%jmap(ix) - i = Tbd%imap(ix) - Tbd%rann(ix,k) = rndval(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + iskip) + do k = 1,nrcm + iskip = (k-1)*cnx*cny + do ix=1,blksz(nb) + j = jmap(ix) + i = imap(ix) + rann(ix,k) = rndval(i+isc-1 + (j+jsc-2)*cnx + iskip) enddo enddo endif ! imfdeepcnv, cal_re, random_clds !--- o3 interpolation - if (Model%ntoz > 0) then - call ozinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_o3, Grid%jindx2_o3, Tbd%ozpl, Grid%ddy_o3) + if (ntoz > 0) then + call ozinterpol (me, blksz(nb), idate, fhour, & + jindx1_o3, jindx2_o3, ozpl, ddy_o3) endif !--- h2o interpolation - if (Model%h2o_phys) then - call h2ointerpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_h, Grid%jindx2_h, Tbd%h2opl, Grid%ddy_h) + if (h2o_phys) then + call h2ointerpol (me, blksz(nb), idate, fhour, & + jindx1_h, jindx2_h, h2opl, ddy_h) endif !--- aerosol interpolation - if (Model%iaerclm) then - call aerinterpol (Model%me, Model%master, Model%blksz(nb), & - Model%idate, Model%fhour, & - Grid%jindx1_aer, Grid%jindx2_aer, & - Grid%ddy_aer,Grid%iindx1_aer, & - Grid%iindx2_aer,Grid%ddx_aer, & - Model%levs,Statein%prsl, & - Tbd%aer_nm) + if (iaerclm) then + call aerinterpol (me, master, blksz(nb), & + idate, fhour, & + jindx1_aer, jindx2_aer, & + ddy_aer,iindx1_aer, & + iindx2_aer,ddx_aer, & + levs,prsl, & + aer_nm) endif !--- ICCN interpolation - if (Model%iccn == 1) then - call ciinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & - Grid%jindx1_ci, Grid%jindx2_ci, & - Grid%ddy_ci,Grid%iindx1_ci, & - Grid%iindx2_ci,Grid%ddx_ci, & - Model%levs,Statein%prsl, & - Tbd%in_nm, Tbd%ccn_nm) + if (iccn == 1) then + call ciinterpol (me, blksz(nb), idate, fhour, & + jindx1_ci, jindx2_ci, & + ddy_ci,iindx1_ci, & + iindx2_ci,ddx_ci, & + levs,prsl, & + in_nm, ccn_nm) endif !--- original FV3 code, not needed for SCM; also not compatible with the way ! the time vary steps are run (over each block) --> cannot use !--- repopulate specific time-varying sfc properties for AMIP/forecast runs !if (Model%nscyc > 0) then - ! if (mod(Model%kdt,Model%nscyc) == 1) THEN + ! if (mod(kdt,Model%nscyc) == 1) THEN ! call gcycle (nblks, Model, Grid(:), Sfcprop(:), Cldprop(:)) ! endif !endif !--- determine if diagnostics buckets need to be cleared - sec_zero = nint(Model%fhzero*con_hr) - if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then - if (mod(Model%kdt,Model%nszero) == 1) then + sec_zero = nint(fhzero*con_hr) + if (sec_zero >= nint(max(fhswr,fhlwr))) then + if (mod(kdt,nszero) == 1) then call Diag%rad_zero (Model) call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif else - if (mod(Model%kdt,Model%nszero) == 1) then + if (mod(kdt,nszero) == 1) then call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif - kdt_rad = nint(min(Model%fhswr,Model%fhlwr)/Model%dtp) - if (mod(Model%kdt, kdt_rad) == 1) then + kdt_rad = nint(min(fhswr,fhlwr)/dtp) + if (mod(kdt, kdt_rad) == 1) then call Diag%rad_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif @@ -388,19 +422,19 @@ subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, #if 0 !Calculate sncovr if it was read in but empty (from FV3/io/FV3GFS_io.F90/sfc_prop_restart_read) if (first_time_step) then - if (nint(Sfcprop%sncovr(1)) == -9999) then + if (nint(sncovr(1)) == -9999) then !--- compute sncovr from existing variables !--- code taken directly from read_fix.f - do ix = 1, Model%blksz(nb) - Sfcprop%sncovr(ix) = 0.0 - if (Sfcprop%slmsk(ix) > 0.001) then - vegtyp = Sfcprop%vtype(ix) + do ix = 1, blksz(nb) + sncovr(ix) = 0.0 + if (slmsk(ix) > 0.001) then + vegtyp = vtype(ix) if (vegtyp == 0) vegtyp = 7 - rsnow = 0.001*Sfcprop%weasd(ix)/snupx(vegtyp) - if (0.001*Sfcprop%weasd(ix) < snupx(vegtyp)) then - Sfcprop%sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) + rsnow = 0.001*weasd(ix)/snupx(vegtyp) + if (0.001*weasd(ix) < snupx(vegtyp)) then + sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) else - Sfcprop%sncovr(ix) = 1.0 + sncovr(ix) = 1.0 endif endif enddo diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index 86b91e8c3..fd450c336 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,10 +1,26 @@ [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme -[ntoz] - standard_name = index_for_ozone - long_name = tracer index for ozone mixing ratio - units = index +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[nx] + standard_name = number_of_points_in_x_direction_for_this_MPI_rank + long_name = number of points in x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in + optional = F +[ny] + standard_name = number_of_points_in_y_direction_for_this_MPI_rank + long_name = number of points in y direction for this MPI rank + units = count dimensions = () type = integer intent = in @@ -25,20 +41,28 @@ type = integer intent = in optional = F -[h2o_phys] - standard_name = flag_for_stratospheric_water_vapor_physics - long_name = flag for stratospheric water vapor physics - units = flag +[nblks] + standard_name = ccpp_block_count + long_name = for explicit data blocking: number of blocks + units = count dimensions = () - type = logical + type = integer intent = in optional = F -[iaerclm] - standard_name = flag_for_aerosol_input_MG_radiation - long_name = flag for using aerosols in Morrison-Gettelman MP_radiation +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[iflip] + standard_name = flag_for_vertical_index_direction_control + long_name = iflip - is not the same as flipv units = flag dimensions = () - type = logical + type = integer intent = in optional = F [iccn] @@ -49,10 +73,18 @@ type = integer intent = in optional = F -[iflip] - standard_name = flag_for_vertical_index_direction_control - long_name = iflip - is not the same as flipv - units = flag +[levh2o_int] + standard_name = vertical_dimension_of_h2o_forcing_data + long_name = number of vertical layers in h2o forcing data + units = count + dimensions = () + type = integer + intent = in + optional = F +[levozp_int] + standard_name = vertical_dimension_of_ozone_forcing_data + long_name = number of vertical layers in ozone forcing data + units = count dimensions = () type = integer intent = in @@ -65,14 +97,6 @@ type = integer intent = in optional = F -[nblks] - standard_name = ccpp_block_count - long_name = for explicit data blocking: number of blocks - units = count - dimensions = () - type = integer - intent = in - optional = F [blksz] standard_name = ccpp_block_sizes long_name = for explicit data blocking: block sizes of all blocks @@ -81,28 +105,20 @@ type = integer intent = in optional = F -[nx] - standard_name = number_of_points_in_x_direction_for_this_MPI_rank - long_name = number of points in x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[ny] - standard_name = number_of_points_in_y_direction_for_this_MPI_rank - long_name = number of points in y direction for this MPI rank - units = count +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag dimensions = () - type = integer + type = logical intent = in optional = F -[im] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag dimensions = () - type = integer + type = logical intent = in optional = F [xlat_d] @@ -123,22 +139,6 @@ kind = kind_phys intent = in optional = F -[levh2o_int] - standard_name = vertical_dimension_of_h2o_forcing_data - long_name = number of vertical layers in h2o forcing data - units = count - dimensions = () - type = integer - intent = in - optional = F -[levozp_int] - standard_name = vertical_dimension_of_ozone_forcing_data - long_name = number of vertical layers in ozone forcing data - units = count - dimensions = () - type = integer - intent = in - optional = F [ozpl] standard_name = ozone_forcing long_name = ozone forcing data @@ -166,6 +166,22 @@ kind = kind_phys intent = in optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = F [jindx1_o3] standard_name = lower_ozone_interpolation_index long_name = interpolation low index for ozone @@ -182,15 +198,6 @@ type = integer intent = inout optional = F -[ddy_o3] - standard_name = ozone_interpolation_weight - long_name = interpolation high index for ozone - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [jindx1_h] standard_name = lower_water_vapor_interpolation_index long_name = interpolation low index for stratospheric water vapor @@ -207,15 +214,6 @@ type = integer intent = inout optional = F -[ddy_h] - standard_name = water_vapor_interpolation_weight - long_name = interpolation high index for stratospheric water vapor - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [jindx1_aer] standard_name = lower_aerosol_y_interpolation_index long_name = interpolation low index for prescribed aerosols in the y direction @@ -232,15 +230,6 @@ type = integer intent = inout optional = F -[ddy_aer] - standard_name = aerosol_y_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [iindx1_aer] standard_name = lower_aerosol_x_interpolation_index long_name = interpolation low index for prescribed aerosols in the x direction @@ -257,15 +246,6 @@ type = integer intent = inout optional = F -[ddx_aer] - standard_name = aerosol_x_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [jindx1_ci] standard_name = lower_cloud_nuclei_y_interpolation_index long_name = interpolation low index for ice and cloud condensation nuclei in the y direction @@ -282,15 +262,6 @@ type = integer intent = inout optional = F -[ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [iindx1_ci] standard_name = lower_cloud_nuclei_x_interpolation_index long_name = interpolation low index for ice and cloud condensation nuclei in the x direction @@ -307,6 +278,51 @@ type = integer intent = inout optional = F +[ddy_o3] + standard_name = ozone_interpolation_weight + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddy_h] + standard_name = water_vapor_interpolation_weight + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddy_aer] + standard_name = aerosol_y_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddx_aer] + standard_name = aerosol_x_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ddy_ci] + standard_name = cloud_nuclei_y_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [ddx_ci] standard_name = cloud_nuclei_x_interpolation_weight long_name = interpolation high index for ice and cloud condensation nuclei in the x direction @@ -334,22 +350,6 @@ kind = kind_phys intent = inout optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -394,61 +394,125 @@ [ccpp-arg-table] name = GFS_phys_time_vary_run type = scheme -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT +[cnx] + standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face + long_name = number of points in x direction for this cubed sphere face + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[cny] + standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face + long_name = number of points in y direction for this cubed sphere face + units = count dimensions = () - type = GFS_control_type - intent = inout + type = integer + intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS miscellaneous data - units = DDT +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count dimensions = () - type = GFS_tbd_type - intent = inout + type = integer + intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count dimensions = () - type = GFS_sfcprop_type - intent = inout + type = integer + intent = in optional = F -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = Fortran DDT containing FV3-GFS cloud fields - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_cldprop_type - intent = inout + type = integer + intent = in optional = F -[Diag] - standard_name = GFS_diag_type_instance - long_name = Fortran DDT containing FV3-GFS fields targeted for diagnostic output - units = DDT +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index dimensions = () - type = GFS_diag_type - intent = inout + type = integer + intent = in + optional = F +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[iccn] + standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = none + dimensions = () + type = integer + intent = in + optional = F +[nrcm] + standard_name = array_dimension_of_random_number + long_name = second dimension of random number stream for RAS + units = count + dimensions = () + type = integer + intent = in + optional = F +[nsswr] + standard_name = number_of_timesteps_between_shortwave_radiation_calls + long_name = number of timesteps between shortwave radiation calls + units = + dimensions = () + type = integer + intent = in + optional = F +[nszero] + standard_name = number_of_timesteps_between_diagnostic_clearing + long_name = number of timesteps between calls to clear diagnostic variables + units = count + dimensions = () + type = integer + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[seed0] + standard_name = seed_random_numbers_RAS + long_name = random number seed for the RAS scheme + units = none + dimensions = () + type = integer + intent = in optional = F [first_time_step] standard_name = flag_for_first_time_step @@ -458,6 +522,397 @@ type = logical intent = in optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[cal_pre] + standard_name = flag_for_precipitation_type_algorithm + long_name = flag controls precip type algorithm + units = flag + dimensions = () + type = logical + intent = in + optional = F +[random_clds] + standard_name = flag_for_random_clouds_for_RAS + long_name = flag for using random clouds with the RAS scheme + units = flag + dimensions = () + type = logical + intent = in + optional = F +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhzero] + standard_name = frequency_for_diagnostic_clearing + long_name = frequency for clearing diagnostic fields + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[dtp] + standard_name = time_step_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[idate] + standard_name = date_and_time_at_model_initialization_reordered + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer + intent = in + optional = F +[jindx1_o3] + standard_name = lower_ozone_interpolation_index + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_o3] + standard_name = upper_ozone_interpolation_index + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx1_h] + standard_name = lower_water_vapor_interpolation_index + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_h] + standard_name = upper_water_vapor_interpolation_index + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx1_aer] + standard_name = lower_aerosol_y_interpolation_index + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_aer] + standard_name = upper_aerosol_y_interpolation_index + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx1_aer] + standard_name = lower_aerosol_x_interpolation_index + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx2_aer] + standard_name = upper_aerosol_x_interpolation_index + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx1_ci] + standard_name = lower_cloud_nuclei_y_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jindx2_ci] + standard_name = upper_cloud_nuclei_y_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx1_ci] + standard_name = lower_cloud_nuclei_x_interpolation_index + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[iindx2_ci] + standard_name = upper_cloud_nuclei_x_interpolation_index + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[blksz] + standard_name = ccpp_block_sizes + long_name = for explicit data blocking: block sizes of all blocks + units = count + dimensions = (ccpp_block_count) + type = integer + intent = in + optional = F +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = F +[ddy_o3] + standard_name = ozone_interpolation_weight + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddy_h] + standard_name = water_vapor_interpolation_weight + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddy_aer] + standard_name = aerosol_y_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddx_aer] + standard_name = aerosol_x_interpolation_weight + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddy_ci] + standard_name = cloud_nuclei_y_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[ddx_ci] + standard_name = cloud_nuclei_x_interpolation_weight + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[vtype] + standard_name = vegetation_type_classification_real + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[weasd] + standard_name = water_equivalent_accumulated_snow_depth + long_name = water equiv of acc snow depth over land and sea ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[Model] + standard_name = GFS_control_type_instance + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT + dimensions = () + type = GFS_control_type + intent = in + optional = F +[clstp] + standard_name = convective_cloud_switch + long_name = index used by cnvc90 (for convective clouds) + units = none + dimensions = () + type = real + kind = kind_phys + intent = inout + optional = F +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[rann] + standard_name = random_number_array + long_name = random number array (0-1) + units = none + dimensions = (horizontal_dimension,array_dimension_of_random_number) + type = real + kind = kind_phys + intent = inout + optional = F +[in_nm] + standard_name = in_number_concentration + long_name = IN number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ccn_nm] + standard_name = ccn_number_concentration + long_name = CCN number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[ozpl] + standard_name = ozone_forcing + long_name = ozone forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[h2opl] + standard_name = h2o_forcing + long_name = water forcing data + units = various + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = inout + optional = F +[aer_nm] + standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = inout + optional = F +[Diag] + standard_name = GFS_diag_type_instance + long_name = Fortran DDT containing FV3-GFS fields targeted for diagnostic output + units = DDT + dimensions = () + type = GFS_diag_type + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -474,4 +929,4 @@ dimensions = () type = integer intent = out - optional = F + optional = F \ No newline at end of file diff --git a/physics/GFS_time_vary_pre.fv3.meta b/physics/GFS_time_vary_pre.fv3.meta index 04f7f1529..8341b3992 100644 --- a/physics/GFS_time_vary_pre.fv3.meta +++ b/physics/GFS_time_vary_pre.fv3.meta @@ -153,7 +153,7 @@ [nscyc] standard_name = number_of_timesteps_between_surface_cycling_calls long_name = number of timesteps between surface cycling calls - units = + units = count dimensions = () type = integer intent = in diff --git a/physics/GFS_time_vary_pre.scm.meta b/physics/GFS_time_vary_pre.scm.meta index 3dc91952e..d3474e457 100644 --- a/physics/GFS_time_vary_pre.scm.meta +++ b/physics/GFS_time_vary_pre.scm.meta @@ -137,7 +137,7 @@ [nscyc] standard_name = number_of_timesteps_between_surface_cycling_calls long_name = number of timesteps between surface cycling calls - units = + units = count dimensions = () type = integer intent = in From cd06bbd3877b382cd1703a44a6c98a31fcfb1aed Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 10:18:53 -0600 Subject: [PATCH 10/17] clean up GFS_rrtmg_post --- physics/GFS_rrtmg_post.F90 | 37 +++-- physics/GFS_rrtmg_post.meta | 298 ++++++++++++++++++------------------ 2 files changed, 169 insertions(+), 166 deletions(-) diff --git a/physics/GFS_rrtmg_post.F90 b/physics/GFS_rrtmg_post.F90 index aacf9aaf5..6bd329921 100644 --- a/physics/GFS_rrtmg_post.F90 +++ b/physics/GFS_rrtmg_post.F90 @@ -13,32 +13,29 @@ end subroutine GFS_rrtmg_post_init !> \section arg_table_GFS_rrtmg_post_run Argument Table !! \htmlinclude GFS_rrtmg_post_run.html !! - subroutine GFS_rrtmg_post_run (lsswr, lslwr, lssav, fhlwr, fhswr, prsi, tgrs, sfcflw, sfcfsw, topflw, topfsw, coszen, coszdg, fluxr, & - scmpsw, nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, raddt, aerodp, & - cldsa, mtopa, mbota, clouds1, cldtaulw, cldtausw, nday, & - errmsg, errflg) + subroutine GFS_rrtmg_post_run (im, km, kmp1, lm, ltp, kt, kb, kd, nspc1, & + nfxr, nday, lsswr, lslwr, lssav, fhlwr, fhswr, raddt, coszen, & + coszdg, prsi, tgrs, aerodp, cldsa, mtopa, mbota, clouds1, & + cldtaulw, cldtausw, sfcflw, sfcfsw, topflw, topfsw, scmpsw, & + fluxr, errmsg, errflg) use machine, only: kind_phys - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, cmpfsw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & + cmpfsw_type use module_radlw_parameters, only: topflw_type, sfcflw_type implicit none ! Interface variables - type(sfcflw_type), dimension(im), intent(in) :: sfcflw - type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw - type(cmpfsw_type), dimension(im), intent(in) :: scmpsw - type(topflw_type), dimension(im), intent(in) :: topflw - type(topfsw_type), dimension(im), intent(in) :: topfsw - - integer, intent(in) :: nspc1, nfxr, im, km, kmp1, lm, ltp, kt, kb, kd, nday - real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr + integer, intent(in) :: im, km, kmp1, lm, ltp, kt, kb, kd, & + nspc1, nfxr, nday logical, intent(in) :: lsswr, lslwr, lssav + real(kind=kind_phys), intent(in) :: raddt, fhlwr, fhswr + + real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg - real(kind=kind_phys), dimension(im), intent(in) :: coszen, coszdg - - real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi - real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs + real(kind=kind_phys), dimension(im,kmp1), intent(in) :: prsi + real(kind=kind_phys), dimension(im,km), intent(in) :: tgrs real(kind=kind_phys), dimension(im,NSPC1), intent(in) :: aerodp real(kind=kind_phys), dimension(im,5), intent(in) :: cldsa @@ -47,6 +44,12 @@ subroutine GFS_rrtmg_post_run (lsswr, lslwr, lssav, fhlwr, fhswr, prsi, tgrs, sf real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtausw real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: cldtaulw + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + type(sfcfsw_type), dimension(im), intent(in) :: sfcfsw + type(cmpfsw_type), dimension(im), intent(in) :: scmpsw + type(topflw_type), dimension(im), intent(in) :: topflw + type(topfsw_type), dimension(im), intent(in) :: topfsw + real(kind=kind_phys), dimension(im,nfxr), intent(inout) :: fluxr character(len=*), intent(out) :: errmsg diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index e996236ab..a90791796 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -6,149 +6,6 @@ [ccpp-arg-table] name = GFS_rrtmg_post_run type = scheme -[lsswr] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lssav] - standard_name = flag_diagnostics - long_name = logical flag for storing diagnostics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[fhlwr] - standard_name = frequency_for_longwave_radiation - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhswr] - standard_name = frequency_for_shortwave_radiation - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[prsi] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[sfcflw] - standard_name = lw_fluxes_sfc - long_name = lw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcflw_type - intent = in - optional = F -[sfcfsw] - standard_name = sw_fluxes_sfc - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_loop_extent) - type = sfcfsw_type - intent = in - optional = F -[topflw] - standard_name = lw_fluxes_top_atmosphere - long_name = lw radiation fluxes at top - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topflw_type - intent = in - optional = F -[topfsw] - standard_name = sw_fluxes_top_atmosphere - long_name = sw radiation fluxes at toa - units = W m-2 - dimensions = (horizontal_loop_extent) - type = topfsw_type - intent = in - optional = F -[coszen] - standard_name = cosine_of_zenith_angle - long_name = mean cos of zenith angle over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[coszdg] - standard_name = daytime_mean_cosz_over_rad_call_period - long_name = daytime mean cosz over rad call period - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in - optional = F -[fluxr] - standard_name = cumulative_radiation_diagnostic - long_name = time-accumulated 2D radiation-related diagnostic fields - units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) - type = real - kind = kind_phys - intent = inout - optional = F -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_loop_extent) - type = cmpfsw_type - intent = in - optional = F -[nspc1] - standard_name = number_of_species_for_aerosol_optical_depth - long_name = number of species for output aerosol optical depth plus total - units = count - dimensions = () - type = integer - intent = in - optional = F -[nfxr] - standard_name = number_of_radiation_diagnostic_variables - long_name = number of variables stored in the fluxr array - units = count - dimensions = () - type = integer - intent = in - optional = F [im] standard_name = horizontal_loop_extent long_name = horizontal loop extent @@ -213,6 +70,72 @@ type = integer intent = in optional = F +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer + intent = in + optional = F +[nfxr] + standard_name = number_of_radiation_diagnostic_variables + long_name = number of variables stored in the fluxr array + units = count + dimensions = () + type = integer + intent = in + optional = F +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lssav] + standard_name = flag_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step @@ -222,6 +145,42 @@ kind = kind_phys intent = in optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_loop_extent,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F [aerodp] standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species @@ -283,14 +242,55 @@ kind = kind_phys intent = in optional = F -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer +[sfcflw] + standard_name = lw_fluxes_sfc + long_name = lw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcflw_type + intent = in + optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_loop_extent) + type = sfcfsw_type intent = in optional = F +[topflw] + standard_name = lw_fluxes_top_atmosphere + long_name = lw radiation fluxes at top + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topflw_type + intent = in + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_loop_extent) + type = topfsw_type + intent = in + optional = F +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_loop_extent) + type = cmpfsw_type + intent = in + optional = F +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From f7e6770d2a20317beb0f86ccb247a71a91704b58 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 10:30:23 -0600 Subject: [PATCH 11/17] clean upu rrtmg_lw_post --- physics/rrtmg_lw_post.F90 | 8 +++++--- physics/rrtmg_lw_post.meta | 18 +++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/physics/rrtmg_lw_post.F90 b/physics/rrtmg_lw_post.F90 index 50d735f75..9a482e53e 100644 --- a/physics/rrtmg_lw_post.F90 +++ b/physics/rrtmg_lw_post.F90 @@ -17,7 +17,7 @@ end subroutine rrtmg_lw_post_init !! #endif subroutine rrtmg_lw_post_run (im, levs, ltp, lm, kd, lslwr, lwhtr, & - tsfa, htlwc, htlw0, sfcflw, tsflw, htrlw, lwhc, sfcdlw, & + tsfa, htlwc, htlw0, sfcflw, tsflw, sfcdlw, htrlw, lwhc, & errmsg, errflg) use machine, only: kind_phys @@ -25,12 +25,14 @@ subroutine rrtmg_lw_post_run (im, levs, ltp, lm, kd, lslwr, lwhtr, & implicit none - integer, intent(in) :: im, ltp, LM, kd, levs + integer, intent(in) :: im, levs, ltp, lm, kd logical, intent(in) :: lslwr, lwhtr + real(kind=kind_phys), dimension(im), intent(in) :: tsfa real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlwc real(kind=kind_phys), dimension(im, LM+LTP), intent(in) :: htlw0 - real(kind=kind_phys), dimension(im), intent(in) :: tsfa + type(sfcflw_type), dimension(im), intent(in) :: sfcflw + real(kind=kind_phys), dimension(im), intent(inout) :: tsflw, sfcdlw real(kind=kind_phys), dimension(im, levs), intent(inout) :: htrlw, lwhc character(len=*), intent(out) :: errmsg diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 447e3a066..9fdef489f 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -106,6 +106,15 @@ kind = kind_phys intent = inout optional = F +[sfcdlw] + standard_name = surface_downwelling_longwave_flux_on_radiation_time_step + long_name = total sky sfc downward lw flux + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F [htrlw] standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate @@ -124,15 +133,6 @@ kind = kind_phys intent = inout optional = F -[sfcdlw] - standard_name = surface_downwelling_longwave_flux_on_radiation_time_step - long_name = total sky sfc downward lw flux - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 5fe8234cae90457f68f4f06ae5248602db32e187 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 10:47:54 -0600 Subject: [PATCH 12/17] cleanup rrtmg_[sw,lw]_[pre,post] --- physics/rrtmg_lw_pre.F90 | 2 +- physics/rrtmg_sw_post.F90 | 27 ++++++++----- physics/rrtmg_sw_post.meta | 80 +++++++++++++++++++------------------- physics/rrtmg_sw_pre.F90 | 17 ++++---- 4 files changed, 68 insertions(+), 58 deletions(-) diff --git a/physics/rrtmg_lw_pre.F90 b/physics/rrtmg_lw_pre.F90 index c14053a10..b8f1d52e1 100644 --- a/physics/rrtmg_lw_pre.F90 +++ b/physics/rrtmg_lw_pre.F90 @@ -25,7 +25,7 @@ subroutine rrtmg_lw_pre_run (im, lslwr, xlat, xlon, slmsk, snowd, sncovr,& integer, intent(in) :: im logical, intent(in) :: lslwr real(kind=kind_phys), dimension(im), intent(in) :: xlat, xlon, slmsk, & - snowd, sncovr, zorl, hprime, tsfa, tsfg + snowd, sncovr, zorl, hprime, tsfg, tsfa real(kind=kind_phys), dimension(im), intent(out) :: semis character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/rrtmg_sw_post.F90 b/physics/rrtmg_sw_post.F90 index d234e7ef6..546395f02 100644 --- a/physics/rrtmg_sw_post.F90 +++ b/physics/rrtmg_sw_post.F90 @@ -16,10 +16,10 @@ end subroutine rrtmg_sw_post_init !! #endif subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & - swhtr, htswc, htsw0, sfcalb1, sfcalb2, sfcalb3, sfcalb4, & - scmpsw, sfcfsw, topfsw, nirbmdi, nirdfdi, visbmdi, visdfdi, & - nirbmui, nirdfui, visbmui, visdfui, sfcdsw, sfcnsw, htrsw, & - swhc, errmsg, errflg) + swhtr, sfcalb1, sfcalb2, sfcalb3, sfcalb4, htswc, htsw0, & + nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui,& + visdfui, sfcdsw, sfcnsw, htrsw, swhc, scmpsw, sfcfsw, topfsw, & + errmsg, errflg) use machine, only: kind_phys use module_radsw_parameters, only: topfsw_type, sfcfsw_type, & @@ -27,17 +27,24 @@ subroutine rrtmg_sw_post_run (im, levr, levs, ltp, nday, lm, kd, lsswr, & implicit none - integer, intent(in) :: im, lm, kd, nday, levr, levs, ltp + integer, intent(in) :: im, levr, levs, & + ltp, nday, lm, kd logical, intent(in) :: lsswr, swhtr + real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, & + sfcalb3, sfcalb4 real(kind=kind_phys), dimension(im, levr+LTP), intent(in) :: htswc, htsw0 - real(kind=kind_phys), dimension(im), intent(in) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + + real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, & + visbmdi, visdfdi, & + nirbmui, nirdfui, & + visbmui, visdfui, & + sfcdsw, sfcnsw + real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc + type(cmpfsw_type), dimension(im), intent(inout) :: scmpsw type(sfcfsw_type), dimension(im), intent(inout) :: sfcfsw type(topfsw_type), dimension(im), intent(inout) :: topfsw - real(kind=kind_phys), dimension(im), intent(inout) :: nirbmdi, nirdfdi, visbmdi, & - visdfdi, nirbmui, nirdfui, & - visbmui, visdfui, sfcdsw, sfcnsw - real(kind=kind_phys), dimension(im,levs), intent(inout) :: htrsw, swhc + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index ba1739e44..093a4e290 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -78,24 +78,6 @@ type = logical intent = in optional = F -[htswc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels - long_name = total sky heating rate due to shortwave radiation - units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in - optional = F -[htsw0] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels - long_name = clear sky heating rates due to shortwave radiation - units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys - intent = in - optional = F [sfcalb1] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam @@ -132,29 +114,23 @@ kind = kind_phys intent = in optional = F -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = inout - optional = F -[sfcfsw] - standard_name = sw_fluxes_sfc - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcfsw_type - intent = inout +[htswc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels + long_name = total sky heating rate due to shortwave radiation + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in optional = F -[topfsw] - standard_name = sw_fluxes_top_atmosphere - long_name = sw radiation fluxes at toa - units = W m-2 - dimensions = (horizontal_dimension) - type = topfsw_type - intent = inout +[htsw0] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels + long_name = clear sky heating rates due to shortwave radiation + units = K s-1 + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys + intent = in optional = F [nirbmdi] standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step @@ -264,6 +240,30 @@ kind = kind_phys intent = inout optional = F +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = inout + optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = inout + optional = F +[topfsw] + standard_name = sw_fluxes_top_atmosphere + long_name = sw radiation fluxes at toa + units = W m-2 + dimensions = (horizontal_dimension) + type = topfsw_type + intent = inout + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP diff --git a/physics/rrtmg_sw_pre.F90 b/physics/rrtmg_sw_pre.F90 index 09e00019a..6cbeddf53 100644 --- a/physics/rrtmg_sw_pre.F90 +++ b/physics/rrtmg_sw_pre.F90 @@ -28,17 +28,20 @@ subroutine rrtmg_sw_pre_run (im, lsswr, pertalb, tsfg, tsfa, coszen, & integer, intent(in) :: im logical, intent(in) :: lsswr real(kind=kind_phys), dimension(5), intent(in) :: pertalb - real(kind=kind_phys), dimension(im), intent(in) :: tsfa, tsfg, coszen + real(kind=kind_phys), dimension(im), intent(in) :: tsfg, tsfa, coszen real(kind=kind_phys), dimension(im), intent(in) :: alb1d - real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & - sncovr, snoalb, zorl, & - hprime, alvsf, alnsf, & - alvwf, alnwf, facsf, & - facwf, fice, tisfc + real(kind=kind_phys), dimension(im), intent(in) :: slmsk, snowd, & + sncovr, snoalb, & + zorl, hprime, & + alvsf, alnsf, & + alvwf, alnwf, & + facsf, facwf, & + fice, tisfc real(kind=kind_phys), dimension(im), intent(inout) :: sfalb integer, intent(out) :: nday integer, dimension(im), intent(out) :: idxday - real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, sfcalb3, sfcalb4 + real(kind=kind_phys), dimension(im), intent(out) :: sfcalb1, sfcalb2, & + sfcalb3, sfcalb4 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables From 7349ae593b1be6e5293b4bb961da46fda6ede699 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 26 Aug 2020 21:52:08 -0600 Subject: [PATCH 13/17] remove GFS DDTs and physcons from GFS_rrtmg_pre --- physics/GFS_rrtmg_pre.F90 | 519 ++++++++++--------- physics/GFS_rrtmg_pre.meta | 1009 +++++++++++++++++++++++++++--------- 2 files changed, 1040 insertions(+), 488 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 6dc14497a..9b2faaf02 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -18,41 +18,30 @@ end subroutine GFS_rrtmg_pre_init !! ! Attention - the output arguments lm, im, lmk, lmp must not be set ! in the CCPP version - they are defined in the interstitial_create routine - subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input - Tbd, Cldprop, Coupling, & - Radtend, & ! input/output - imfdeepcnv, imfdeepcnv_gf, & - f_ice, f_rain, f_rimef, flgmin, cwm, & ! F-A mp scheme only - lm, im, lmk, lmp, & ! input - kd, kt, kb, raddt, delp, dz, plvl, plyr, & ! output - tlvl, tlyr, tsfg, tsfa, qlyr, olyr, & - gasvmr_co2, gasvmr_n2o, gasvmr_ch4, gasvmr_o2, & - gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, & - gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113, & - faersw1, faersw2, faersw3, & - faerlw1, faerlw2, faerlw3, aerodp, & - clouds1, clouds2, clouds3, clouds4, clouds5, clouds6, & - clouds7, clouds8, clouds9, cldsa, cldfra, & - mtopa, mbota, de_lgth, alb1d, errmsg, errflg) + subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, imfdeepcnv, & + imfdeepcnv_gf, me, ncnd, ntrac, num_p3d, npdf3d, ncnvcld3d, ntqv, ntcw,& + ntiw, ntlnc, ntinc, ncld, ntrw, ntsw, ntgl, ntwa, ntoz, ntclamt, & + nleffr, nieffr, nseffr, kdt, imp_physics, imp_physics_thompson, & + imp_physics_gfdl, imp_physics_zhao_carr, imp_physics_zhao_carr_pdf, & + imp_physics_mg, imp_physics_wsm6, imp_physics_fer_hires, lsswr, lslwr, & + ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, & + lmfdeep2, do_sfcperts, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & + rog, rocp, con_rd, pertalb, xlat, xlon, coslat, sinlat, tsfc, slmsk, & + prsi, prsl, prslk, tgrs, sfc_wts, phy_f3d_mg_cld, phy_f3d_reffr, & + phy_f3d_cnvw, phy_f3d_cnvc, f_ice, f_rain, f_rimef, qgrs, aer_nm, & !inputs from here and above + coszen, coszdg, phy_f3d_leffr, phy_f3d_ieffr, phy_f3d_seffr, & + clouds1, clouds2, clouds3, clouds4, clouds5, & !in/out from here and above + kd, kt, kb, mtopa, mbota, raddt, tsfg, tsfa, de_lgth, alb1d, delp, dz, & !output from here and below + plvl, plyr, tlvl, tlyr, qlyr, olyr, gasvmr_co2, gasvmr_n2o, gasvmr_ch4,& + gasvmr_o2, gasvmr_co, gasvmr_cfc11, gasvmr_cfc12, gasvmr_cfc22, & + gasvmr_ccl4, gasvmr_cfc113, aerodp, clouds6, clouds7, clouds8, & + clouds9, cldsa, cldfra, faersw1, faersw2, faersw3, faerlw1, faerlw2, & + faerlw3, errmsg, errflg) use machine, only: kind_phys - use GFS_typedefs, only: GFS_statein_type, & - GFS_stateout_type, & - GFS_sfcprop_type, & - GFS_coupling_type, & - GFS_control_type, & - GFS_grid_type, & - GFS_tbd_type, & - GFS_cldprop_type, & - GFS_radtend_type, & - GFS_diag_type + use physparam - use physcons, only: eps => con_eps, & - & epsm1 => con_epsm1, & - & fvirt => con_fvirt & - &, rog => con_rog & - &, rocp => con_rocp & - &, con_rd + use radcons, only: itsfc,ltp, lextop, qmin, & qme5, qme6, epsq, prsmin use funcphys, only: fpvs @@ -81,85 +70,126 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input implicit none - type(GFS_control_type), intent(in) :: Model - type(GFS_grid_type), intent(in) :: Grid - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_statein_type), intent(in) :: Statein - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_cldprop_type), intent(in) :: Cldprop - type(GFS_coupling_type), intent(in) :: Coupling - - integer, intent(in) :: im, lm, lmk, lmp - integer, intent(in) :: imfdeepcnv, imfdeepcnv_gf - integer, intent(out) :: kd, kt, kb - -! F-A mp scheme only - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(in) :: f_ice, & - f_rain, f_rimef - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: cwm - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: flgmin - real(kind=kind_phys), intent(out) :: raddt - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: delp, & - dz, plyr, tlyr, qlyr, olyr - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+1+LTP), intent(out) :: plvl, tlvl - - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: tsfg, tsfa - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: gasvmr_co2, & - gasvmr_n2o, gasvmr_ch4, gasvmr_o2, gasvmr_co, gasvmr_cfc11, & - gasvmr_cfc12, gasvmr_cfc22, gasvmr_ccl4, gasvmr_cfc113 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDSW), intent(out) :: faersw1, & - faersw2, faersw3 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDLW), intent(out) :: faerlw1, & - faerlw2, faerlw3 - - real(kind=kind_phys), dimension(size(Grid%xlon,1),NSPC1), intent(out) :: aerodp - - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(inout) :: clouds1, & - clouds2, clouds3, clouds4, clouds5 - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP), intent(out) :: clouds6, & - clouds7, clouds8, clouds9, cldfra - - real(kind=kind_phys), dimension(size(Grid%xlon,1),5), intent(out) :: cldsa - integer, dimension(size(Grid%xlon,1),3), intent(out) :: mbota, mtopa - real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(out) :: de_lgth, alb1d - + integer, intent(in) :: im, levs, lm, lmk, lmp, imfdeepcnv, & + imfdeepcnv_gf, me, ncnd, ntrac, & + num_p3d, npdf3d, ncnvcld3d, ntqv, & + ntcw, ntiw, ntlnc, ntinc, ncld, & + ntrw, ntsw, ntgl, ntwa, ntoz, & + ntclamt, nleffr, nieffr, nseffr, & + kdt, imp_physics, & + imp_physics_thompson, & + imp_physics_gfdl, & + imp_physics_zhao_carr, & + imp_physics_zhao_carr_pdf, & + imp_physics_mg, imp_physics_wsm6, & + imp_physics_fer_hires + + logical, intent(in) :: lsswr, lslwr, ltaerosol, lgfdlmprad, & + uni_cld, effr_in, do_mynnedmf, & + lmfshal, lmfdeep2, do_sfcperts + + real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup + real(kind=kind_phys), intent(in) :: eps, epsm1, fvirt, rog, rocp, con_rd + + real(kind=kind_phys), dimension(:), intent(in) :: pertalb, xlat, xlon, & + coslat, sinlat, tsfc, & + slmsk + + real(kind=kind_phys), dimension(:,:), intent(in) :: prsi, prsl, prslk, & + tgrs, sfc_wts, & + phy_f3d_mg_cld, & + phy_f3d_reffr, & + phy_f3d_cnvw, & + phy_f3d_cnvc + ! F-A mp scheme only + real(kind=kind_phys), dimension(im,lm+LTP), intent(in) :: f_ice, f_rain, & + f_rimef + + real(kind=kind_phys), dimension(:,:,:), intent(in) :: qgrs, aer_nm + + real(kind=kind_phys), dimension(:), intent(inout) :: coszen, coszdg + + real(kind=kind_phys), dimension(:,:), intent(inout) :: phy_f3d_leffr, & + phy_f3d_ieffr, & + phy_f3d_seffr + real(kind=kind_phys), dimension(im,lm+LTP), intent(inout) :: clouds1, & + clouds2, clouds3, & + clouds4, clouds5 + + integer, intent(out) :: kd, kt, kb + + integer, dimension(im,3), intent(out) :: mbota, mtopa + + real(kind=kind_phys), intent(out) :: raddt + + real(kind=kind_phys), dimension(im), intent(out) :: tsfg, tsfa + real(kind=kind_phys), dimension(im), intent(out) :: de_lgth, & + alb1d + + real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: delp, dz, & + plyr, tlyr, & + qlyr, olyr + + real(kind=kind_phys), dimension(im,lm+1+LTP), intent(out) :: plvl, tlvl + + + + real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: gasvmr_co2, & + gasvmr_n2o, & + gasvmr_ch4, & + gasvmr_o2, & + gasvmr_co, & + gasvmr_cfc11,& + gasvmr_cfc12,& + gasvmr_cfc22,& + gasvmr_ccl4,& + gasvmr_cfc113 + real(kind=kind_phys), dimension(im,NSPC1), intent(out) :: aerodp + real(kind=kind_phys), dimension(im,lm+LTP), intent(out) :: clouds6, & + clouds7, & + clouds8, & + clouds9, & + cldfra + real(kind=kind_phys), dimension(im,5), intent(out) :: cldsa + + real(kind=kind_phys), dimension(im,lm+LTP,NBDSW), intent(out) :: faersw1,& + faersw2,& + faersw3 + + real(kind=kind_phys), dimension(im,lm+LTP,NBDLW), intent(out) :: faerlw1,& + faerlw2,& + faerlw3 character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! Local variables - integer :: me, nfxr, ntrac, ntcw, ntiw, ncld, ntrw, ntsw, ntgl, ncndl, ntlnc, ntinc, ntwa + integer :: ncndl - integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya, lyb + integer :: i, j, k, k1, k2, lsk, lv, n, itop, ibtc, LP1, lla, llb, lya,lyb real(kind=kind_phys) :: es, qs, delt, tem0d - real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: cvt1, cvb1, tem1d, tskn + real(kind=kind_phys), dimension(im) :: cvt1, cvb1, tem1d, tskn - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & + real(kind=kind_phys), dimension(im,lm+LTP) :: & htswc, htlwc, gcice, grain, grime, htsw0, htlw0, & rhly, tvly,qstl, vvel, clw, ciw, prslk1, tem2da, & cldcov, deltaq, cnvc, cnvw, & effrl, effri, effrr, effrs, rho, orho ! for Thompson MP - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP) :: & + 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(size(Grid%xlon,1),lm+LTP+1) :: tem2db -! real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP+1) :: hz + real(kind=kind_phys), dimension(im,lm+LTP+1) :: tem2db +! real(kind=kind_phys), dimension(im,lm+LTP+1) :: hz - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,min(4,Model%ncnd)) :: ccnd - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,2:Model%ntrac) :: tracer1 - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NF_CLDS) :: clouds - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NF_VGAS) :: gasvmr - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDSW,NF_AESW) ::faersw - real(kind=kind_phys), dimension(size(Grid%xlon,1),lm+LTP,NBDLW,NF_AELW) ::faerlw + real(kind=kind_phys), dimension(im,lm+LTP,min(4,ncnd)) :: ccnd + real(kind=kind_phys), dimension(im,lm+LTP,2:ntrac) :: tracer1 + real(kind=kind_phys), dimension(im,lm+LTP,NF_CLDS) :: clouds + real(kind=kind_phys), dimension(im,lm+LTP,NF_VGAS) :: gasvmr + real(kind=kind_phys), dimension(im,lm+LTP,NBDSW,NF_AESW) :: faersw + real(kind=kind_phys), dimension(im,lm+LTP,NBDLW,NF_AELW) :: faerlw real(kind=kind_phys) :: qvs ! @@ -169,22 +199,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input errmsg = '' errflg = 0 - if (.not. (Model%lsswr .or. Model%lslwr)) return + if (.not. (lsswr .or. lslwr)) return !--- set commonly used integers - me = Model%me - NFXR = Model%nfxr - NTRAC = Model%ntrac ! tracers in grrad strip off sphum - start tracer1(2:NTRAC) - ntcw = Model%ntcw - ntiw = Model%ntiw - ntlnc = Model%ntlnc - ntinc = Model%ntinc - ncld = Model%ncld - ntrw = Model%ntrw - ntsw = Model%ntsw - ntgl = Model%ntgl - ntwa = Model%ntwa - ncndl = min(Model%ncnd,4) + ncndl = min(ncnd,4) LP1 = LM + 1 ! num of in/out levels @@ -221,7 +239,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif ! end if_ivflip_block endif ! end if_lextop_block - raddt = min(Model%fhswr, Model%fhlwr) + raddt = min(fhswr, fhlwr) ! print *,' in grrad : raddt=',raddt @@ -230,13 +248,13 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input if ( itsfc == 0 ) then ! use same sfc skin-air/ground temp do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) + tskn(i) = tsfc(i) + tsfg(i) = tsfc(i) enddo else ! use diff sfc skin-air/ground temp do i = 1, IM - tskn(i) = Sfcprop%tsfc(i) - tsfg(i) = Sfcprop%tsfc(i) + tskn(i) = tsfc(i) + tsfg(i) = tsfc(i) enddo endif @@ -245,34 +263,34 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! lsk = 0 - if (ivflip == 0 .and. lm < Model%levs) lsk = Model%levs - lm + if (ivflip == 0 .and. lm < levs) lsk = levs - lm ! convert pressure unit from pa to mb do k = 1, LM k1 = k + kd k2 = k + lsk do i = 1, IM - plvl(i,k1+kb) = Statein%prsi(i,k2+kb) * 0.01 ! pa to mb (hpa) - plyr(i,k1) = Statein%prsl(i,k2) * 0.01 ! pa to mb (hpa) - tlyr(i,k1) = Statein%tgrs(i,k2) - prslk1(i,k1) = Statein%prslk(i,k2) + plvl(i,k1+kb) = prsi(i,k2+kb) * 0.01 ! pa to mb (hpa) + plyr(i,k1) = prsl(i,k2) * 0.01 ! pa to mb (hpa) + tlyr(i,k1) = tgrs(i,k2) + prslk1(i,k1) = prslk(i,k2) rho(i,k1) = plyr(i,k1)/(con_rd*tlyr(i,k1)) orho(i,k1) = 1.0/rho(i,k1) !> - Compute relative humidity. - es = min( Statein%prsl(i,k2), fpvs( Statein%tgrs(i,k2) ) ) ! fpvs and prsl in pa - qs = max( QMIN, eps * es / (Statein%prsl(i,k2) + epsm1*es) ) - rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, Statein%qgrs(i,k2,1))/qs ) ) + es = min( prsl(i,k2), fpvs( tgrs(i,k2) ) ) ! fpvs and prsl in pa + qs = max( QMIN, eps * es / (prsl(i,k2) + epsm1*es) ) + rhly(i,k1) = max( 0.0, min( 1.0, max(QMIN, qgrs(i,k2,ntqv))/qs ) ) qstl(i,k1) = qs enddo enddo !--- recast remaining all tracers (except sphum) forcing them all to be positive - do j = 2, NTRAC + do j = 2, ntrac do k = 1, LM k1 = k + kd k2 = k + lsk - tracer1(:,k1,j) = max(0.0, Statein%qgrs(:,k2,j)) + tracer1(:,k1,j) = max(0.0, qgrs(:,k2,j)) enddo enddo ! @@ -281,28 +299,28 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input k1 = 1 + kd k2 = k1 + kb do i = 1, IM - plvl(i,k2) = 0.01 * Statein%prsi(i,1+kb) ! pa to mb (hpa) + plvl(i,k2) = 0.01 * prsi(i,1+kb) ! pa to mb (hpa) plyr(i,k1) = 0.5 * (plvl(i,k2+1) + plvl(i,k2)) prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo else k1 = 1 + kd do i = 1, IM - plvl(i,k1) = Statein%prsi(i,1) * 0.01 ! pa to mb (hpa) + plvl(i,k1) = prsi(i,1) * 0.01 ! pa to mb (hpa) enddo endif else ! input data from sfc to top - if (Model%levs > lm) then + if (levs > lm) then k1 = lm + kd do i = 1, IM - plvl(i,k1+1) = 0.01 * Statein%prsi(i,Model%levs+1) ! pa to mb (hpa) + plvl(i,k1+1) = 0.01 * prsi(i,levs+1) ! pa to mb (hpa) plyr(i,k1) = 0.5 * (plvl(i,k1+1) + plvl(i,k1)) prslk1(i,k1) = (plyr(i,k1)*0.001) ** rocp enddo else k1 = lp1 + kd do i = 1, IM - plvl(i,k1) = Statein%prsi(i,lp1) * 0.01 ! pa to mb (hpa) + plvl(i,k1) = prsi(i,lp1) * 0.01 ! pa to mb (hpa) enddo endif endif @@ -326,22 +344,21 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input !> - Get layer ozone mass mixing ratio (if use ozone climatology data, !! call getozn()). - if (Model%ntoz > 0) then ! interactive ozone generation + if (ntoz > 0) then ! interactive ozone generation do k=1,lmk do i=1,im - olyr(i,k) = max( QMIN, tracer1(i,k,Model%ntoz) ) + olyr(i,k) = max( QMIN, tracer1(i,k,ntoz) ) enddo enddo else ! climatological ozone - call getozn (prslk1, Grid%xlat, IM, LMK, & ! --- inputs - olyr) ! --- outputs + call getozn (prslk1, xlat, im, lmk, & ! --- inputs + olyr) ! --- outputs endif ! end_if_ntoz !> - Call coszmn(), to compute cosine of zenith angle (only when SW is called) - if (Model%lsswr) then - call coszmn (Grid%xlon,Grid%sinlat, & ! --- inputs - Grid%coslat,Model%solhr, IM, me, & - Radtend%coszen, Radtend%coszdg) ! --- outputs + if (lsswr) then + call coszmn (xlon,sinlat,coslat,solhr,im,me, & ! --- inputs + coszen, coszdg) ! --- outputs endif !> - Call getgases(), to set up non-prognostic gas volume mixing @@ -359,8 +376,8 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! --- ... set up non-prognostic gas volume mixing ratioes - call getgases (plvl, Grid%xlon, Grid%xlat, IM, LMK, & ! --- inputs - gasvmr) ! --- outputs + call getgases (plvl, xlon, xlat, IM, LMK, & ! --- inputs + gasvmr) ! --- outputs !CCPP: re-assign gasvmr(:,:,NF_VGAS) to gasvmr_X(:,:) do k = 1, LMK @@ -400,9 +417,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k = 1, LM k1 = k + kd do i = 1, IM - qlyr(i,k1) = max( tem1d(i), Statein%qgrs(i,k,1) ) + qlyr(i,k1) = max( tem1d(i), qgrs(i,k,ntqv) ) tem1d(i) = min( QME5, qlyr(i,k1) ) - tvly(i,k1) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) + tvly(i,k1) = tgrs(i,k) * (1.0 + fvirt*qlyr(i,k1)) ! virtual T (K) delp(i,k1) = plvl(i,k1+1) - plvl(i,k1) enddo enddo @@ -451,9 +468,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k = LM, 1, -1 do i = 1, IM - qlyr(i,k) = max( tem1d(i), Statein%qgrs(i,k,1) ) + qlyr(i,k) = max( tem1d(i), qgrs(i,k,ntqv) ) tem1d(i) = min( QME5, qlyr(i,k) ) - tvly(i,k) = Statein%tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) + tvly(i,k) = tgrs(i,k) * (1.0 + fvirt*qlyr(i,k)) ! virtual T (K) delp(i,k) = plvl(i,k) - plvl(i,k+1) enddo enddo @@ -495,11 +512,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input !check print *,' in grrad : calling setaer ' - call setaer (plvl, plyr, prslk1, tvly, rhly, Sfcprop%slmsk, & ! --- inputs - tracer1, Tbd%aer_nm, & - Grid%xlon, Grid%xlat, IM, LMK, LMP, & - Model%lsswr,Model%lslwr, & - faersw,faerlw,aerodp) ! --- outputs + call setaer (plvl, plyr, prslk1, tvly, rhly, slmsk, & ! --- inputs + tracer1, aer_nm, xlon, xlat, IM, LMK, LMP,& + lsswr,lslwr, & + faersw,faerlw,aerodp) ! --- outputs ! CCPP do j = 1,NBDSW @@ -537,20 +553,20 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! if (ntcw > 0) then ! prognostic cloud schemes ccnd = 0.0_kind_phys - if (Model%ncnd == 1) then ! Zhao_Carr_Sundqvist + if (ncnd == 1) then ! Zhao_Carr_Sundqvist do k=1,LMK do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water/ice enddo enddo - elseif (Model%ncnd == 2) then ! MG or F-A + elseif (ncnd == 2) then ! MG or F-A do k=1,LMK do i=1,IM - ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water - ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water + ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water + ccnd(i,k,2) = tracer1(i,k,ntiw) ! ice water enddo enddo - elseif (Model%ncnd == 4) then ! MG2 + elseif (ncnd == 4) then ! MG2 do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -559,7 +575,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(i,k,4) = tracer1(i,k,ntsw) ! snow water enddo enddo - elseif (Model%ncnd == 5) then ! GFDL MP, Thompson, MG3 + elseif (ncnd == 5) then ! GFDL MP, Thompson, MG3 do k=1,LMK do i=1,IM ccnd(i,k,1) = tracer1(i,k,ntcw) ! liquid water @@ -569,10 +585,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo ! for Thompson MP - prepare variables for calc_effr - if (Model%imp_physics == Model%imp_physics_thompson .and. Model%ltaerosol) then + if (imp_physics == imp_physics_thompson .and. ltaerosol) then do k=1,LMK do i=1,IM - qvs = Statein%qgrs(i,k,1) + qvs = qgrs(i,k,ntqv) qv_mp (i,k) = qvs/(1.-qvs) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) @@ -582,10 +598,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input nwfa (i,k) = tracer1(i,k,ntwa) enddo enddo - elseif (Model%imp_physics == Model%imp_physics_thompson) then + elseif (imp_physics == imp_physics_thompson) then do k=1,LMK do i=1,IM - qvs = Statein%qgrs(i,k,1) + qvs = qgrs(i,k,ntqv) qv_mp (i,k) = qvs/(1.-qvs) qc_mp (i,k) = tracer1(i,k,ntcw)/(1.-qvs) qi_mp (i,k) = tracer1(i,k,ntiw)/(1.-qvs) @@ -603,17 +619,17 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo enddo enddo - if (Model%imp_physics == Model%imp_physics_gfdl ) then - if (.not. Model%lgfdlmprad) then + if (imp_physics == imp_physics_gfdl ) then + if (.not. lgfdlmprad) then ! rsun the summation methods and order make the difference in calculation -! clw(:,:) = clw(:,:) + tracer1(:,1:LMK,Model%ntcw) & -! + tracer1(:,1:LMK,Model%ntiw) & -! + tracer1(:,1:LMK,Model%ntrw) & -! + tracer1(:,1:LMK,Model%ntsw) & -! + tracer1(:,1:LMK,Model%ntgl) +! clw(:,:) = clw(:,:) + tracer1(:,1:LMK,ntcw) & +! + tracer1(:,1:LMK,ntiw) & +! + tracer1(:,1:LMK,ntrw) & +! + tracer1(:,1:LMK,ntsw) & +! + tracer1(:,1:LMK,ntgl) ccnd(:,:,1) = tracer1(:,1:LMK,ntcw) ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntrw) ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntiw) @@ -621,7 +637,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntgl) ! else -! do j=1,Model%ncld +! do j=1,ncld ! ccnd(:,:,1) = ccnd(:,:,1) + tracer1(:,1:LMK,ntcw+j-1) ! cloud condensate amount ! enddo endif @@ -632,34 +648,34 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo endif ! - if (Model%uni_cld) then - if (Model%effr_in) then + if (uni_cld) then + if (effr_in) then do k=1,lm k1 = k + kd do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) - effrl(i,k1) = Tbd%phy_f3d(i,k,2) - effri(i,k1) = Tbd%phy_f3d(i,k,3) - effrr(i,k1) = Tbd%phy_f3d(i,k,4) - effrs(i,k1) = Tbd%phy_f3d(i,k,5) + cldcov(i,k1) = phy_f3d_mg_cld(i,k) + effrl(i,k1) = phy_f3d_leffr(i,k) + effri(i,k1) = phy_f3d_ieffr(i,k) + effrr(i,k1) = phy_f3d_reffr(i,k) + effrs(i,k1) = phy_f3d_seffr(i,k) enddo enddo else do k=1,lm k1 = k + kd do i=1,im - cldcov(i,k1) = Tbd%phy_f3d(i,k,Model%indcld) + cldcov(i,k1) = phy_f3d_mg_cld(i,k) enddo enddo endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then ! GFDL MP - if (Model%do_mynnedmf .and. Model%kdt>1) THEN + elseif (imp_physics == imp_physics_gfdl) then ! GFDL MP + if (do_mynnedmf .and. kdt>1) THEN do k=1,lm k1 = k + kd do i=1,im if (tracer1(i,k1,ntrw)>1.0e-7 .OR. tracer1(i,k1,ntsw)>1.0e-7) then ! GFDL cloud fraction - cldcov(i,k1) = tracer1(I,k1,Model%ntclamt) + cldcov(i,k1) = tracer1(I,k1,ntclamt) else ! MYNN sub-grid cloud fraction cldcov(i,k1) = clouds1(i,k1) @@ -668,37 +684,37 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input enddo else ! GFDL cloud fraction - cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,Model%ntclamt) + cldcov(1:IM,1+kd:LM+kd) = tracer1(1:IM,1:LM,ntclamt) endif - if(Model%effr_in) then + if(effr_in) then do k=1,lm k1 = k + kd do i=1,im - effrl(i,k1) = Tbd%phy_f3d(i,k,1) - effri(i,k1) = Tbd%phy_f3d(i,k,2) - effrr(i,k1) = Tbd%phy_f3d(i,k,3) - effrs(i,k1) = Tbd%phy_f3d(i,k,4) -! if(Model%me==0) then + effrl(i,k1) = phy_f3d_leffr(i,k) + effri(i,k1) = phy_f3d_ieffr(i,k) + effrr(i,k1) = phy_f3d_reffr(i,k) + effrs(i,k1) = phy_f3d_seffr(i,k) +! if(me==0) then ! if(effrl(i,k1)> 5.0) then -! write(6,*) 'rad driver:cloud radii:',Model%kdt, i,k1, & +! write(6,*) 'rad driver:cloud radii:',kdt, i,k1, & ! effrl(i,k1) ! endif ! if(effrs(i,k1)==0.0) then -! write(6,*) 'rad driver:snow mixing ratio:',Model%kdt, i,k1, & +! write(6,*) 'rad driver:snow mixing ratio:',kdt, i,k1, & ! tracer1(i,k,ntsw) ! endif ! endif enddo enddo endif - elseif (Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP + elseif (imp_physics == imp_physics_thompson) then ! Thompson MP ! ! Compute effective radii for QC, QI, QS with (GF, MYNN) or without (all others) sub-grid clouds ! ! Update number concentration, consistent with sub-grid clouds (GF, MYNN) or without (all others) do k=1,lm do i=1,im - if (Model%ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then + if (ltaerosol .and. qc_mp(i,k)>1.e-12 .and. nc_mp(i,k)<100.) then nc_mp(i,k) = make_DropletNumber(qc_mp(i,k)*rho(i,k), nwfa(i,k)) * orho(i,k) endif if (qi_mp(i,k)>1.e-12 .and. ni_mp(i,k)<100.) then @@ -737,9 +753,9 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input do k=1,lm k1 = k + kd do i=1,im - Tbd%phy_f3d(i,k,Model%nleffr) = effrl(i,k1) - Tbd%phy_f3d(i,k,Model%nieffr) = effri(i,k1) - Tbd%phy_f3d(i,k,Model%nseffr) = effrs(i,k1) + phy_f3d_leffr(i,k) = effrl(i,k1) + phy_f3d_ieffr(i,k) = effri(i,k1) + phy_f3d_seffr(i,k) = effrs(i,k1) enddo enddo else ! all other cases @@ -753,25 +769,27 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! for zhao/moorthi's (imp_phys=99) & ! ferrier's (imp_phys=5) microphysics schemes - if ((Model%num_p3d == 4) .and. (Model%npdf3d == 3)) then ! same as Model%imp_physics = 99 + if ((num_p3d == 4) .and. (npdf3d == 3)) then ! same as imp_physics = 98 do k=1,lm k1 = k + kd do i=1,im - deltaq(i,k1) = Tbd%phy_f3d(i,k,5) - cnvw (i,k1) = Tbd%phy_f3d(i,k,6) - cnvc (i,k1) = Tbd%phy_f3d(i,k,7) + !GJF: this is not consistent with GFS_typedefs, + ! but it looks like the Zhao-Carr-PDF scheme is not in the CCPP + deltaq(i,k1) = 0.0!Tbd%phy_f3d(i,k,5) !GJF: this variable is not in phy_f3d anymore + cnvw (i,k1) = phy_f3d_cnvw(i,k) + cnvc (i,k1) = phy_f3d_cnvc(i,k) enddo enddo - elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then ! same as MOdel%imp_physics=98 + elseif ((npdf3d == 0) .and. (ncnvcld3d == 1)) then ! same as imp_physics=99 do k=1,lm k1 = k + kd do i=1,im deltaq(i,k1) = 0.0 - cnvw (i,k1) = Tbd%phy_f3d(i,k,Model%num_p3d+1) + cnvw (i,k1) = phy_f3d_cnvw(i,k) cnvc (i,k1) = 0.0 enddo enddo - else ! all the rest + else ! all the rest do k=1,lmk do i=1,im deltaq(i,k) = 0.0 @@ -788,7 +806,7 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input cnvw (i,lyb) = cnvw (i,lya) cnvc (i,lyb) = cnvc (i,lya) enddo - if (Model%effr_in) then + if (effr_in) then do i=1,im effrl(i,lyb) = effrl(i,lya) effri(i,lyb) = effri(i,lya) @@ -798,86 +816,78 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input endif endif - if (Model%imp_physics == 99) then + 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) endif - if (Model%imp_physics == 99 .or. Model%imp_physics == 10) then ! zhao/moorthi's prognostic cloud scheme + if (imp_physics == imp_physics_zhao_carr .or. imp_physics == imp_physics_mg) then ! zhao/moorthi's prognostic cloud scheme ! or unified cloud and/or with MG microphysics - if (Model%uni_cld .and. Model%ncld >= 2) then + if (uni_cld .and. ncld >= 2) then call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk,dz,delp, & + xlat, xlon, slmsk, dz, delp, & IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & + effrl, effri, effrr, effrs, effr_in, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else - call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), Grid%xlat,Grid%xlon, & - Sfcprop%slmsk, dz, delp, IM, LMK, LMP, & - Model%uni_cld, Model%lmfshal, & - Model%lmfdeep2, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & - clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs + call progcld1 (plyr ,plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), xlat, xlon, slmsk, dz, & + delp, IM, LMK, LMP, uni_cld, lmfshal, lmfdeep2,& + cldcov, effrl, effri, effrr, effrs, effr_in, & + clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 98) then ! zhao/moorthi's prognostic cloud+pdfcld + elseif(imp_physics == imp_physics_zhao_carr_pdf) then ! zhao/moorthi's prognostic cloud+pdfcld - call progcld3 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), & - cnvw, cnvc, Grid%xlat, Grid%xlon, & - Sfcprop%slmsk, dz, delp, im, lmk, lmp, deltaq, & - Model%sup, Model%kdt, me, & + call progcld3 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs + ccnd(1:IM,1:LMK,1), cnvw, cnvc, xlat, xlon, & + slmsk, dz, delp, im, lmk, lmp, deltaq, sup, kdt, & + me, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs - elseif (Model%imp_physics == 11) then ! GFDL cloud scheme + elseif (imp_physics == imp_physics_gfdl) then ! GFDL cloud scheme - if (.not.Model%lgfdlmprad) then + if (.not. lgfdlmprad) then call progcld4 (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs - ccnd(1:IM,1:LMK,1), cnvw, cnvc, & - Grid%xlat, Grid%xlon, Sfcprop%slmsk, & - cldcov, dz, delp, im, lmk, lmp, & + ccnd(1:IM,1:LMK,1), cnvw, cnvc, xlat, xlon, & + slmsk, cldcov, dz, delp, im, lmk, lmp, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else - call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & - IM, LMK, LMP, cldcov, & - effrl, effri, effrr, effrs, Model%effr_in, & + call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, xlat, & ! --- inputs + xlon, slmsk, dz,delp, IM, LMK, LMP, cldcov, & + effrl, effri, effrr, effrs, effr_in, & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs ! call progcld4o (plyr, plvl, tlyr, tvly, qlyr, qstl, rhly, & ! --- inputs -! tracer1, Grid%xlat, Grid%xlon, Sfcprop%slmsk, & -! dz, delp, & -! ntrac-1, Model%ntcw-1,Model%ntiw-1,Model%ntrw-1,& -! Model%ntsw-1,Model%ntgl-1,Model%ntclamt-1, & +! tracer1, xlat, xlon, slmsk, dz, delp, & +! ntrac-1, ntcw-1,ntiw-1,ntrw-1, & +! ntsw-1,ntgl-1,ntclamt-1, & ! im, lmk, lmp, & ! clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs endif - elseif(Model%imp_physics == 6 .or. Model%imp_physics == 15) then - if (Model%kdt == 1) then - Tbd%phy_f3d(:,:,Model%nleffr) = 10. - Tbd%phy_f3d(:,:,Model%nieffr) = 50. - Tbd%phy_f3d(:,:,Model%nseffr) = 250. + elseif(imp_physics == imp_physics_wsm6 .or. imp_physics == imp_physics_fer_hires) then + if (kdt == 1) then + phy_f3d_leffr(:,:) = 10. + phy_f3d_ieffr(:,:) = 50. + phy_f3d_seffr(:,:) = 250. endif call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + xlat,xlon,slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & + im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & + cldcov(:,1:LMK),phy_f3d_leffr(:,:), & + phy_f3d_ieffr(:,:), phy_f3d_seffr(:,:), & clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs - elseif(Model%imp_physics == Model%imp_physics_thompson) then ! Thompson MP + elseif(imp_physics == imp_physics_thompson) then ! Thompson MP - if(Model%do_mynnedmf .or. & - Model%imfdeepcnv == Model%imfdeepcnv_gf ) then ! MYNN PBL or GF conv + if(do_mynnedmf .or. imfdeepcnv == imfdeepcnv_gf ) then ! MYNN PBL or GF conv !-- MYNN PBL or convective GF !-- use cloud fractions with SGS clouds do k=1,lmk @@ -889,27 +899,26 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! --- use clduni as with the GFDL microphysics. ! --- make sure that effr_in=.true. in the input.nml! call progclduni (plyr, plvl, tlyr, tvly, ccnd, ncndl, & ! --- inputs - Grid%xlat, Grid%xlon, Sfcprop%slmsk, dz,delp, & - IM, LMK, LMP, clouds(:,1:LMK,1), & - effrl, effri, effrr, effrs, Model%effr_in , & + xlat, xlon, slmsk, dz, delp, IM, LMK, LMP, & + clouds(:,1:LMK,1), & + effrl, effri, effrr, effrs, effr_in , & clouds, cldsa, mtopa, mbota, de_lgth) ! --- outputs else ! MYNN PBL or GF convective are not used call progcld5 (plyr,plvl,tlyr,qlyr,qstl,rhly,tracer1, & ! --- inputs - Grid%xlat,Grid%xlon,Sfcprop%slmsk,dz,delp, & + xlat,xlon,slmsk,dz,delp, & ntrac-1, ntcw-1,ntiw-1,ntrw-1, & ntsw-1,ntgl-1, & - im, lmk, lmp, Model%uni_cld, & - Model%lmfshal,Model%lmfdeep2, & - cldcov(:,1:LMK),Tbd%phy_f3d(:,:,1), & - Tbd%phy_f3d(:,:,2), Tbd%phy_f3d(:,:,3), & - clouds,cldsa,mtopa,mbota, de_lgth) ! --- outputs + im, lmk, lmp, uni_cld, lmfshal, lmfdeep2, & + cldcov(:,1:LMK), phy_f3d_leffr(:,:), & + phy_f3d_ieffr(:,:), phy_f3d_seffr(:,:), & + clouds, cldsa, mtopa ,mbota, de_lgth) ! --- outputs endif ! MYNN PBL or GF endif ! end if_imp_physics -! endif ! end_if_ntcw +! endif ! end_if_ntcw do k = 1, LMK do i = 1, IM @@ -931,10 +940,10 @@ subroutine GFS_rrtmg_pre_run (Model, Grid, Sfcprop, Statein, & ! input ! perturbation size ! --- turn vegetation fraction pattern into percentile pattern alb1d(:) = 0. - if (Model%do_sfcperts) then - if (Model%pertalb(1) > 0.) then + if (do_sfcperts) then + if (pertalb(1) > 0.) then do i=1,im - call cdfnor(Coupling%sfc_wts(i,5),alb1d(i)) + call cdfnor(sfc_wts(i,5),alb1d(i)) enddo endif endif diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index 9d51e708d..dd021df6d 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -6,69 +6,615 @@ [ccpp-arg-table] name = GFS_rrtmg_pre_run type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = Fortran DDT containing FV3-GFS model control parameters - units = DDT +[im] + standard_name = horizontal_loop_extent + long_name = horizontal loop extent + units = count dimensions = () - type = GFS_control_type + type = integer intent = in optional = F -[Grid] - standard_name = GFS_grid_type_instance - long_name = Fortran DDT containing FV3-GFS grid and interpolation related data - units = DDT +[levs] + standard_name = vertical_dimension + long_name = number of vertical levels + units = count dimensions = () - type = GFS_grid_type + type = integer intent = in optional = F -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = Fortran DDT containing FV3-GFS surface fields - units = DDT +[lm] + standard_name = number_of_vertical_layers_for_radiation_calculations + long_name = number of vertical layers for radiation calculation + units = count dimensions = () - type = GFS_sfcprop_type + type = integer intent = in optional = F -[Statein] - standard_name = GFS_statein_type_instance - long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore - units = DDT +[lmk] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = number of vertical layers for radiation + units = count dimensions = () - type = GFS_statein_type + type = integer intent = in optional = F -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container - units = DDT +[lmp] + standard_name = adjusted_vertical_level_dimension_for_radiation + long_name = number of vertical levels for radiation + units = count dimensions = () - type = GFS_tbd_type + type = integer intent = in optional = F -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = Fortran DDT containing FV3-GFS cloud fields needed by radiation from physics - units = DDT +[imfdeepcnv] + standard_name = flag_for_mass_flux_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag dimensions = () - type = GFS_cldprop_type + type = integer intent = in optional = F -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = Fortran DDT containing FV3-GFS fields needed for coupling - units = DDT +[imfdeepcnv_gf] + standard_name = flag_for_gf_deep_convection_scheme + long_name = flag for Grell-Freitas deep convection scheme + units = flag dimensions = () - type = GFS_coupling_type + type = integer intent = in optional = F -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = Fortran DDT containing FV3-GFS radiation tendencies - units = DDT +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index dimensions = () - type = GFS_radtend_type - intent = inout + type = integer + intent = in + optional = F +[ncnd] + standard_name = number_of_cloud_condensate_types + long_name = number of cloud condensate types + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntrac] + standard_name = number_of_tracers + long_name = number of tracers + units = count + dimensions = () + type = integer + intent = in + optional = F +[num_p3d] + standard_name = array_dimension_of_3d_arrays_for_microphysics + long_name = number of 3D arrays needed for microphysics + units = count + dimensions = () + type = integer + intent = in + optional = F +[npdf3d] + standard_name = number_of_3d_arrays_associated_with_pdf_based_clouds + long_name = number of 3d arrays associated with pdf based clouds/mp + units = count + dimensions = () + type = integer + intent = in + optional = F +[ncnvcld3d] + standard_name = number_of_convective_3d_cloud_fields + long_name = number of convective 3d clouds fields + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntqv] + standard_name = index_for_water_vapor + long_name = tracer index for water vapor (specific humidity) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntcw] + standard_name = index_for_liquid_cloud_condensate + long_name = tracer index for cloud condensate (or liquid water) + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntiw] + standard_name = index_for_ice_cloud_condensate + long_name = tracer index for ice water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntlnc] + standard_name = index_for_liquid_cloud_number_concentration + long_name = tracer index for liquid number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntinc] + standard_name = index_for_ice_cloud_number_concentration + long_name = tracer index for ice number concentration + units = index + dimensions = () + type = integer + intent = in + optional = F +[ncld] + standard_name = number_of_hydrometeors + long_name = choice of cloud scheme / number of hydrometeors + units = count + dimensions = () + type = integer + intent = in + optional = F +[ntrw] + standard_name = index_for_rain_water + long_name = tracer index for rain water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntsw] + standard_name = index_for_snow_water + long_name = tracer index for snow water + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntgl] + standard_name = index_for_graupel + long_name = tracer index for graupel + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntwa] + standard_name = index_for_water_friendly_aerosols + long_name = tracer index for water friendly aerosol + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntoz] + standard_name = index_for_ozone + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in + optional = F +[ntclamt] + standard_name = index_for_cloud_amount + long_name = tracer index for cloud amount integer + units = index + dimensions = () + type = integer + intent = in + optional = F +[nleffr] + standard_name = index_for_cloud_liquid_water_effective_radius + long_name = the index of cloud liquid water effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[nieffr] + standard_name = index_for_ice_effective_radius + long_name = the index of ice effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[nseffr] + standard_name = index_for_snow_effective_radius + long_name = the index of snow effective radius in phy_f3d + units = + dimensions = () + type = integer + intent = in + optional = F +[kdt] + standard_name = index_of_time_step + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in + optional = F +[imp_physics] + standard_name = flag_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_thompson] + standard_name = flag_for_thompson_microphysics_scheme + long_name = choice of Thompson microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_gfdl] + standard_name = flag_for_gfdl_microphysics_scheme + long_name = choice of GFDL microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr] + standard_name = flag_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_zhao_carr_pdf] + standard_name = flag_for_zhao_carr_pdf_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme with PDF clouds + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_mg] + standard_name = flag_for_morrison_gettelman_microphysics_scheme + long_name = choice of Morrison-Gettelman microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_wsm6] + standard_name = flag_for_wsm6_microphysics_scheme + long_name = choice of WSM6 microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[imp_physics_fer_hires] + standard_name = flag_for_fer_hires_microphysics_scheme + long_name = choice of Ferrier-Aligo microphysics scheme + units = flag + dimensions = () + type = integer + intent = in + optional = F +[lsswr] + standard_name = flag_to_calc_sw + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lslwr] + standard_name = flag_to_calc_lw + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in + optional = F +[ltaerosol] + standard_name = flag_for_aerosol_physics + long_name = flag for aerosol physics + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lgfdlmprad] + standard_name = flag_for_GFDL_microphysics_radiation_interaction + long_name = flag for GFDL microphysics-radiation interaction + units = flag + dimensions = () + type = logical + intent = in + optional = F +[uni_cld] + standard_name = flag_for_uni_cld + long_name = flag for uni_cld + units = flag + dimensions = () + type = logical + intent = in + optional = F +[effr_in] + standard_name = flag_for_cloud_effective_radii + long_name = flag for cloud effective radii calculations in GFDL microphysics + units = + dimensions = () + type = logical + intent = in + optional = F +[do_mynnedmf] + standard_name = do_mynnedmf + long_name = flag to activate MYNN-EDMF + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lmfshal] + standard_name = flag_for_lmfshal + long_name = flag for lmfshal + units = flag + dimensions = () + type = logical + intent = in + optional = F +[lmfdeep2] + standard_name = flag_for_scale_aware_mass_flux_convection + long_name = flag for some scale-aware mass-flux convection scheme active + units = flag + dimensions = () + type = logical + intent = in + optional = F +[do_sfcperts] + standard_name = flag_for_stochastic_surface_perturbations + long_name = flag for stochastic surface perturbations option + units = flag + dimensions = () + type = logical + intent = in + optional = F +[fhswr] + standard_name = frequency_for_shortwave_radiation + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fhlwr] + standard_name = frequency_for_longwave_radiation + long_name = frequency for longwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[solhr] + standard_name = forecast_hour_of_the_day + long_name = time in hours after 00z at the current timestep + units = h + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[sup] + standard_name = ice_supersaturation_threshold + long_name = ice supersaturation parameter for PDF clouds + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[eps] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants + long_name = rd/rv + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[epsm1] + standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one + long_name = (rd/rv) - 1 + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[fvirt] + standard_name = ratio_of_vapor_to_dry_air_gas_constants_minus_one + long_name = (rv/rd) - 1 (rv = ideal gas constant for water vapor) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rog] + standard_name = ratio_of_gas_constant_dry_air_to_gravitational_acceleration + long_name = (rd/g) + units = J s2 K-1 kg-1 m-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[rocp] + standard_name = ratio_of_gas_constant_dry_air_to_specific_heat_of_dry_air_at_constant_pressure + long_name = (rd/cp) + units = none + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[con_rd] + standard_name = gas_constant_dry_air + long_name = ideal gas constant for dry air + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys + intent = in + optional = F +[pertalb] + standard_name = magnitude_of_surface_albedo_perturbation + long_name = magnitude of surface albedo perturbation + units = frac + dimensions = (5) + type = real + kind = kind_phys + intent = in + optional = F +[xlat] + standard_name = latitude + long_name = latitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[xlon] + standard_name = longitude + long_name = longitude + units = radian + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[coslat] + standard_name = cosine_of_latitude + long_name = cosine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sinlat] + standard_name = sine_of_latitude + long_name = sine of latitude + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[slmsk] + standard_name = sea_land_ice_mask_real + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prsi] + standard_name = air_pressure_at_interface + long_name = air pressure at model layer interfaces + units = Pa + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + intent = in + optional = F +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[prslk] + standard_name = dimensionless_exner_function_at_model_layers + long_name = dimensionless Exner function at model layer centers + units = none + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[tgrs] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[sfc_wts] + standard_name = weights_for_stochastic_surface_physics_perturbation + long_name = weights for stochastic surface physics perturbation + units = none + dimensions = (horizontal_dimension,number_of_surface_perturbations) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_mg_cld] + standard_name = cloud_fraction_for_MG + long_name = cloud fraction used by Morrison-Gettelman MP + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_reffr] + standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um + long_name = effective radius of cloud rain particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_cnvw] + standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d + long_name = convective cloud water mixing ratio in the phy_f3d array + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in + optional = F +[phy_f3d_cnvc] + standard_name = convective_cloud_cover_in_phy_f3d + long_name = convective cloud cover in the phy_f3d array + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = in optional = F [f_ice] standard_name = fraction_of_ice_water_cloud @@ -97,55 +643,113 @@ kind = kind_phys intent = in optional = F -[flgmin] - standard_name = minimum_large_ice_fraction - long_name = minimum large ice fraction in F-A mp scheme - units = frac - dimensions = (2) +[qgrs] + standard_name = tracer_concentration + long_name = model layer mean tracer concentration + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in optional = F -[cwm] - standard_name = total_cloud_condensate_mixing_ratio_updated_by_physics - long_name = total cloud condensate mixing ratio (except water vapor) updated by physics - units = kg kg-1 +[aer_nm] + standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology + long_name = GOCART aerosol climatology number concentration + units = kg-1? + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = in + optional = F +[coszen] + standard_name = cosine_of_zenith_angle + long_name = mean cos of zenith angle over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[coszdg] + standard_name = daytime_mean_cosz_over_rad_call_period + long_name = daytime mean cosz over rad call period + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[phy_f3d_leffr] + standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um + long_name = eff. radius of cloud liquid water particle in micrometer + units = um dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = F -[lm] - standard_name = number_of_vertical_layers_for_radiation_calculations - long_name = number of vertical layers for radiation calculation - units = count - dimensions = () - type = integer - intent = in +[phy_f3d_ieffr] + standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um + long_name = eff. radius of cloud ice water particle in micrometer + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in +[phy_f3d_seffr] + standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um + long_name = effective radius of cloud snow particle in micrometers + units = um + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F -[lmk] - standard_name = adjusted_vertical_layer_dimension_for_radiation - long_name = number of vertical layers for radiation - units = count - dimensions = () - type = integer - intent = in +[clouds1] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F -[lmp] - standard_name = adjusted_vertical_level_dimension_for_radiation - long_name = number of vertical levels for radiation - units = count - dimensions = () - type = integer - intent = in +[clouds2] + standard_name = cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds3] + standard_name = mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds4] + standard_name = cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout + optional = F +[clouds5] + standard_name = mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + intent = inout optional = F [kd] standard_name = vertical_index_difference_between_inout_and_local @@ -171,6 +775,22 @@ type = integer intent = out optional = F +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_dimension,3) + type = integer + intent = out + optional = F [raddt] standard_name = time_step_for_radiation long_name = radiation time step @@ -180,6 +800,42 @@ kind = kind_phys intent = out optional = F +[tsfg] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[tsfa] + standard_name = surface_air_temperature_for_radiation + long_name = lowest model layer air temperature for radiation + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F +[alb1d] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = out + optional = F [delp] standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness on radiation levels @@ -234,24 +890,6 @@ kind = kind_phys intent = out optional = F -[tsfg] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F -[tsfa] - standard_name = surface_air_temperature_for_radiation - long_name = lowest model layer air temperature for radiation - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = out - optional = F [qlyr] standard_name = water_vapor_specific_humidity_at_layer_for_radiation long_name = water vapor specific humidity at vertical layer for radiation calculation @@ -270,22 +908,6 @@ kind = kind_phys intent = out optional = F -[imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme - long_name = flag for mass-flux deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[imfdeepcnv_gf] - standard_name = flag_for_gf_deep_convection_scheme - long_name = flag for Grell-Freitas deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F [gasvmr_co2] standard_name = volume_mixing_ratio_co2 long_name = CO2 volume mixing ratio @@ -376,60 +998,6 @@ kind = kind_phys intent = out optional = F -[faersw1] - standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 - long_name = aerosol optical depth for shortwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faersw2] - standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 - long_name = aerosol single scattering albedo for shortwave bands 01-16 - units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faersw3] - standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 - long_name = aerosol asymmetry parameter for shortwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faerlw1] - standard_name = aerosol_optical_depth_for_longwave_bands_01_16 - long_name = aerosol optical depth for longwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faerlw2] - standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 - long_name = aerosol single scattering albedo for longwave bands 01-16 - units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F -[faerlw3] - standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 - long_name = aerosol asymmetry parameter for longwave bands 01-16 - units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys - intent = out - optional = F [aerodp] standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species @@ -439,51 +1007,6 @@ kind = kind_phys intent = out optional = F -[clouds1] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds2] - standard_name = cloud_liquid_water_path - long_name = layer cloud liquid water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds3] - standard_name = mean_effective_radius_for_liquid_cloud - long_name = mean effective radius for liquid cloud - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds4] - standard_name = cloud_ice_water_path - long_name = layer cloud ice water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[clouds5] - standard_name = mean_effective_radius_for_ice_cloud - long_name = mean effective radius for ice cloud - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F [clouds6] standard_name = cloud_rain_water_path long_name = cloud rain water path @@ -538,36 +1061,56 @@ kind = kind_phys intent = out optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_dimension,3) - type = integer +[faersw1] + standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 + long_name = aerosol optical depth for shortwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys intent = out optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_dimension,3) - type = integer +[faersw2] + standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 + long_name = aerosol single scattering albedo for shortwave bands 01-16 + units = frac + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys intent = out optional = F -[de_lgth] - standard_name = cloud_decorrelation_length - long_name = cloud decorrelation length - units = km - dimensions = (horizontal_dimension) +[faersw3] + standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 + long_name = aerosol asymmetry parameter for shortwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out optional = F -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation +[faerlw1] + standard_name = aerosol_optical_depth_for_longwave_bands_01_16 + long_name = aerosol optical depth for longwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[faerlw2] + standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 + long_name = aerosol single scattering albedo for longwave bands 01-16 units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys + intent = out + optional = F +[faerlw3] + standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 + long_name = aerosol asymmetry parameter for longwave bands 01-16 + units = none + dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out From d4d823e919d80a010866414b79b0a6a3643c6910 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 27 Aug 2020 09:36:57 -0600 Subject: [PATCH 14/17] add fluxr and uncomment radiation diagnostics for rrtmgp_[sw,lw]_post --- physics/GFS_rrtmgp_lw_post.F90 | 80 +++++++++++----------- physics/GFS_rrtmgp_lw_post.meta | 9 +++ physics/GFS_rrtmgp_sw_post.F90 | 118 ++++++++++++++++---------------- physics/GFS_rrtmgp_sw_post.meta | 71 ++++++++++--------- 4 files changed, 150 insertions(+), 128 deletions(-) diff --git a/physics/GFS_rrtmgp_lw_post.F90 b/physics/GFS_rrtmgp_lw_post.F90 index a6b37acfc..537ce8879 100644 --- a/physics/GFS_rrtmgp_lw_post.F90 +++ b/physics/GFS_rrtmgp_lw_post.F90 @@ -26,8 +26,8 @@ end subroutine GFS_rrtmgp_lw_post_init !! subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag, fhlwr, & p_lev, t_lay, tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, & - fluxlwDOWN_clrsky, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, sfcdlw, & - sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) + fluxlwDOWN_clrsky, raddt, aerodp, cldsa, mtopa, mbota, cld_frac, cldtaulw, fluxr, & + sfcdlw, sfcflw, tsflw, htrlw, topflw, flxprf_lw, htrlwc, errmsg, errflg) ! Inputs integer, intent(in) :: & @@ -61,7 +61,9 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag 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 - + + real(kind=kind_phys), dimension(:,:), intent(inout) :: fluxr + ! Outputs (mandatory) real(kind_phys), dimension(nCol), intent(out) :: & sfcdlw, & ! Total sky sfc downward lw flux (W/m2) @@ -168,42 +170,42 @@ subroutine GFS_rrtmgp_lw_post_run (nCol, nLev, lslwr, do_lw_clrsky_hr, save_diag ! - Collect the fluxr data for wrtsfc ! ####################################################################################### if (save_diag) then -! do i=1,nCol -! ! LW all-sky fluxes -! Diag%fluxr(i,1 ) = Diag%fluxr(i,1 ) + fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up -! Diag%fluxr(i,19) = Diag%fluxr(i,19) + fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn -! Diag%fluxr(i,20) = Diag%fluxr(i,20) + fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up -! ! LW clear-sky fluxes -! Diag%fluxr(i,28) = Diag%fluxr(i,28) + fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up -! Diag%fluxr(i,30) = Diag%fluxr(i,30) + fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn -! Diag%fluxr(i,33) = Diag%fluxr(i,33) + fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up -! enddo -! -! do i=1,nCol -! Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) -! Diag%fluxr(i,18) = Diag%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) -! Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d -! Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * p_lev(i,itop) -! Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * p_lev(i,ibtc) -! Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * t_lay(i,itop) -! -! ! Add optical depth and emissivity output -! tem2 = 0. -! do k=ibtc,itop -! tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel -! enddo -! Diag%fluxr(i,46-j) = Diag%fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) -! enddo -! enddo + do i=1,nCol + ! LW all-sky fluxes + fluxr(i,1 ) = fluxr(i,1 ) + fhlwr * fluxlwUP_allsky( i,iTOA) ! total sky top lw up + fluxr(i,19) = fluxr(i,19) + fhlwr * fluxlwDOWN_allsky(i,iSFC) ! total sky sfc lw dn + fluxr(i,20) = fluxr(i,20) + fhlwr * fluxlwUP_allsky( i,iSFC) ! total sky sfc lw up + ! LW clear-sky fluxes + fluxr(i,28) = fluxr(i,28) + fhlwr * fluxlwUP_clrsky( i,iTOA) ! clear sky top lw up + fluxr(i,30) = fluxr(i,30) + fhlwr * fluxlwDOWN_clrsky(i,iSFC) ! clear sky sfc lw dn + fluxr(i,33) = fluxr(i,33) + fhlwr * fluxlwUP_clrsky( i,iSFC) ! clear sky sfc lw up + enddo + + 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) + + ! Add optical depth and emissivity output + tem2 = 0. + do k=ibtc,itop + tem2 = tem2 + cldtaulw(i,k) ! approx 10. mu channel + enddo + fluxr(i,46-j) = fluxr(i,46-j) + tem0d * (1.0-exp(-tem2)) + enddo + enddo endif end subroutine GFS_rrtmgp_lw_post_run diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index c261a7797..c2fba7cea 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -174,6 +174,15 @@ kind = kind_phys intent = in optional = F +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys + intent = inout + optional = F [sfcdlw] standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky sfc downward lw flux diff --git a/physics/GFS_rrtmgp_sw_post.F90 b/physics/GFS_rrtmgp_sw_post.F90 index 0d3991fcf..3a9871a5c 100644 --- a/physics/GFS_rrtmgp_sw_post.F90 +++ b/physics/GFS_rrtmgp_sw_post.F90 @@ -28,7 +28,7 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky save_diag, fhswr, coszen, coszdg, t_lay, p_lev, sfc_alb_nir_dir, sfc_alb_nir_dif, & sfc_alb_uvvis_dir, sfc_alb_uvvis_dif, sw_gas_props, fluxswUP_allsky, & fluxswDOWN_allsky, fluxswUP_clrsky, fluxswDOWN_clrsky, raddt, aerodp, cldsa, mbota, & - mtopa, cld_frac, cldtausw, & + mtopa, cld_frac, cldtausw, fluxr, & nirbmdi, nirdfdi, visbmdi, visdfdi, nirbmui, nirdfui, visbmui, visdfui, sfcnsw, & sfcdsw, htrsw, sfcfsw, topfsw, htrswc, flxprf_sw, scmpsw, errmsg, errflg) @@ -85,7 +85,9 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky ! nirdf - downward nir diffused flux (W/m2) ! visbm - downward uv+vis direct beam flux (W/m2) ! visdf - downward uv+vis diffused flux (W/m2) - + + real(kind=kind_phys), dimension(:,:), intent(inout) :: fluxr + ! Outputs (mandatory) real(kind_phys), dimension(nCol), intent(out) :: & nirbmdi, & ! sfc nir beam sw downward flux (W/m2) @@ -253,62 +255,62 @@ subroutine GFS_rrtmgp_sw_post_run (nCol, nLev, nDay, idxday, lsswr, do_sw_clrsky ! - Collect the fluxr data for wrtsfc ! ####################################################################################### if (save_diag) then -! do i=1,nCol -! Diag%fluxr(i,34) = Diag%fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm -! Diag%fluxr(i,35) = Diag%fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm -! Diag%fluxr(i,36) = Diag%fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm -! Diag%fluxr(i,37) = Diag%fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm -! Diag%fluxr(i,38) = Diag%fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm -! Diag%fluxr(i,39) = Diag%fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm -! if (coszen(i) > 0.) then -! ! SW all-sky fluxes -! tem0d = fhswr * coszdg(i) / coszen(i) -! Diag%fluxr(i,2 ) = Diag%fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up -! Diag%fluxr(i,3 ) = Diag%fluxr(i,3) + sfcfsw(i)%upfxc * tem0d -! Diag%fluxr(i,4 ) = Diag%fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn -! ! SW uv-b fluxes -! Diag%fluxr(i,21) = Diag%fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn -! Diag%fluxr(i,22) = Diag%fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn -! ! SW TOA incoming fluxes -! Diag%fluxr(i,23) = Diag%fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn -! ! SW SFC flux components -! Diag%fluxr(i,24) = Diag%fluxr(i,24) + visbmdi(i) * tem0d ! uv/vis beam sw dn -! Diag%fluxr(i,25) = Diag%fluxr(i,25) + visdfdi(i) * tem0d ! uv/vis diff sw dn -! Diag%fluxr(i,26) = Diag%fluxr(i,26) + nirbmdi(i) * tem0d ! nir beam sw dn -! Diag%fluxr(i,27) = Diag%fluxr(i,27) + nirdfdi(i) * tem0d ! nir diff sw dn -! ! SW clear-sky fluxes -! Diag%fluxr(i,29) = Diag%fluxr(i,29) + topfsw(i)%upfx0 * tem0d -! Diag%fluxr(i,31) = Diag%fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d -! Diag%fluxr(i,32) = Diag%fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d -! endif -! enddo -! -! ! Save total and boundary-layer clouds -! do i=1,nCol -! Diag%fluxr(i,17) = Diag%fluxr(i,17) + raddt * cldsa(i,4) -! Diag%fluxr(i,18) = Diag%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) -! Diag%fluxr(i, 8-j) = Diag%fluxr(i, 8-j) + tem0d -! Diag%fluxr(i,11-j) = Diag%fluxr(i,11-j) + tem0d * p_lev(i,itop) -! Diag%fluxr(i,14-j) = Diag%fluxr(i,14-j) + tem0d * p_lev(i,ibtc) -! Diag%fluxr(i,17-j) = Diag%fluxr(i,17-j) + tem0d * p_lev(i,itop) -! -! ! Add optical depth and emissivity output -! tem1 = 0. -! do k=ibtc,itop -! tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel -! enddo -! Diag%fluxr(i,43-j) = Diag%fluxr(i,43-j) + tem0d * tem1 -! enddo -! enddo + do i=1,nCol + fluxr(i,34) = fluxr(i,34) + fhswr*aerodp(i,1) ! total aod at 550nm + fluxr(i,35) = fluxr(i,35) + fhswr*aerodp(i,2) ! DU aod at 550nm + fluxr(i,36) = fluxr(i,36) + fhswr*aerodp(i,3) ! BC aod at 550nm + fluxr(i,37) = fluxr(i,37) + fhswr*aerodp(i,4) ! OC aod at 550nm + fluxr(i,38) = fluxr(i,38) + fhswr*aerodp(i,5) ! SU aod at 550nm + fluxr(i,39) = fluxr(i,39) + fhswr*aerodp(i,6) ! SS aod at 550nm + if (coszen(i) > 0.) then + ! SW all-sky fluxes + tem0d = fhswr * coszdg(i) / coszen(i) + fluxr(i,2 ) = fluxr(i,2) + topfsw(i)%upfxc * tem0d ! total sky top sw up + fluxr(i,3 ) = fluxr(i,3) + sfcfsw(i)%upfxc * tem0d + fluxr(i,4 ) = fluxr(i,4) + sfcfsw(i)%dnfxc * tem0d ! total sky sfc sw dn + ! SW uv-b fluxes + fluxr(i,21) = fluxr(i,21) + scmpsw(i)%uvbfc * tem0d ! total sky uv-b sw dn + fluxr(i,22) = fluxr(i,22) + scmpsw(i)%uvbf0 * tem0d ! clear sky uv-b sw dn + ! SW TOA incoming fluxes + fluxr(i,23) = fluxr(i,23) + topfsw(i)%dnfxc * tem0d ! top sw dn + ! SW SFC flux components + fluxr(i,24) = fluxr(i,24) + visbmdi(i) * tem0d ! uv/vis beam sw dn + fluxr(i,25) = fluxr(i,25) + visdfdi(i) * tem0d ! uv/vis diff sw dn + fluxr(i,26) = fluxr(i,26) + nirbmdi(i) * tem0d ! nir beam sw dn + fluxr(i,27) = fluxr(i,27) + nirdfdi(i) * tem0d ! nir diff sw dn + ! SW clear-sky fluxes + fluxr(i,29) = fluxr(i,29) + topfsw(i)%upfx0 * tem0d + fluxr(i,31) = fluxr(i,31) + sfcfsw(i)%upfx0 * tem0d + fluxr(i,32) = fluxr(i,32) + sfcfsw(i)%dnfx0 * tem0d + endif + enddo + + ! Save total and boundary-layer clouds + do i=1,nCol + fluxr(i,17) = fluxr(i,17) + raddt * cldsa(i,4) + fluxr(i,18) = fluxr(i,18) + raddt * cldsa(i,5) + enddo + + ! Save cld frac,toplyr,botlyr and top temp, note that the order of h,m,l cloud + ! is reversed for the fluxr output. save interface pressure (pa) of top/bot + do j = 1, 3 + do i = 1, nCol + tem0d = raddt * cldsa(i,j) + itop = mtopa(i,j) + ibtc = mbota(i,j) + fluxr(i, 8-j) = fluxr(i, 8-j) + tem0d + fluxr(i,11-j) = fluxr(i,11-j) + tem0d * p_lev(i,itop) + fluxr(i,14-j) = fluxr(i,14-j) + tem0d * p_lev(i,ibtc) + fluxr(i,17-j) = fluxr(i,17-j) + tem0d * p_lev(i,itop) + + ! Add optical depth and emissivity output + tem1 = 0. + do k=ibtc,itop + tem1 = tem1 + cldtausw(i,k) ! approx .55 mu channel + enddo + fluxr(i,43-j) = fluxr(i,43-j) + tem0d * tem1 + enddo + enddo endif end subroutine GFS_rrtmgp_sw_post_run diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index 94f2cbf5f..cd2512e58 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -138,6 +138,14 @@ kind = kind_phys intent = in optional = F +[sw_gas_props] + standard_name = coefficients_for_sw_gas_optics + long_name = DDT containing spectral information for RRTMGP SW radiation scheme + units = DDT + dimensions = () + type = ty_gas_optics_rrtmgp + intent = in + optional = F [fluxswUP_allsky] standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile @@ -201,17 +209,17 @@ kind = kind_phys intent = in optional = F -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases units = index dimensions = (horizontal_dimension,3) type = integer intent = in optional = F -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops units = index dimensions = (horizontal_dimension,3) type = integer @@ -235,13 +243,14 @@ kind = kind_phys intent = in optional = F -[sw_gas_props] - standard_name = coefficients_for_sw_gas_optics - long_name = DDT containing spectral information for RRTMGP SW radiation scheme - units = DDT - dimensions = () - type = ty_gas_optics_rrtmgp - intent = in +[fluxr] + standard_name = cumulative_radiation_diagnostic + long_name = time-accumulated 2D radiation-related diagnostic fields + units = various + dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + type = real + kind = kind_phys + intent = inout optional = F [nirbmdi] standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step @@ -333,14 +342,6 @@ kind = kind_phys intent = out optional = F -[sfcfsw] - standard_name = sw_fluxes_sfc - long_name = sw radiation fluxes at sfc - units = W m-2 - dimensions = (horizontal_dimension) - type = sfcfsw_type - intent = out - optional = F [htrsw] standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate @@ -350,6 +351,14 @@ kind = kind_phys intent = out optional = F +[sfcfsw] + standard_name = sw_fluxes_sfc + long_name = sw radiation fluxes at sfc + units = W m-2 + dimensions = (horizontal_dimension) + type = sfcfsw_type + intent = out + optional = F [topfsw] standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa @@ -366,15 +375,7 @@ type = real kind = kind_phys intent = out - optional = T -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_dimension) - type = cmpfsw_type - intent = in - optional = T + optional = T [flxprf_sw] standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels @@ -382,7 +383,15 @@ dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_plus_one) type = profsw_type intent = out - optional = T + optional = T +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_dimension) + type = cmpfsw_type + intent = in + optional = T [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP From 6e1d8484b79c5e82ac0a5fc1d708c96f0c65075d Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 27 Aug 2020 10:38:35 -0600 Subject: [PATCH 15/17] switch to horizontal_loop_extent in radiation interstitials that were touched --- physics/GFS_rrtmg_post.meta | 2 +- physics/GFS_rrtmg_pre.meta | 134 ++++++++++++++++---------------- physics/GFS_rrtmgp_lw_post.meta | 42 +++++----- physics/GFS_rrtmgp_sw_post.meta | 72 ++++++++--------- physics/rrtmg_lw_post.meta | 20 ++--- physics/rrtmg_lw_pre.meta | 20 ++--- physics/rrtmg_sw_post.meta | 46 +++++------ physics/rrtmg_sw_pre.meta | 52 ++++++------- 8 files changed, 194 insertions(+), 194 deletions(-) diff --git a/physics/GFS_rrtmg_post.meta b/physics/GFS_rrtmg_post.meta index a90791796..2ecebfcf0 100644 --- a/physics/GFS_rrtmg_post.meta +++ b/physics/GFS_rrtmg_post.meta @@ -286,7 +286,7 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) type = real kind = kind_phys intent = inout diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index dd021df6d..853560df5 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -485,7 +485,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -494,7 +494,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -503,7 +503,7 @@ standard_name = cosine_of_latitude long_name = cosine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -512,7 +512,7 @@ standard_name = sine_of_latitude long_name = sine of latitude units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -521,7 +521,7 @@ standard_name = surface_skin_temperature long_name = surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -530,7 +530,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -539,7 +539,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -548,7 +548,7 @@ standard_name = air_pressure long_name = mean layer pressure units = Pa - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -557,7 +557,7 @@ standard_name = dimensionless_exner_function_at_model_layers long_name = dimensionless Exner function at model layer centers units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -566,7 +566,7 @@ standard_name = air_temperature long_name = model layer mean temperature units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -575,7 +575,7 @@ standard_name = weights_for_stochastic_surface_physics_perturbation long_name = weights for stochastic surface physics perturbation units = none - dimensions = (horizontal_dimension,number_of_surface_perturbations) + dimensions = (horizontal_loop_extent,number_of_surface_perturbations) type = real kind = kind_phys intent = in @@ -584,7 +584,7 @@ standard_name = cloud_fraction_for_MG long_name = cloud fraction used by Morrison-Gettelman MP units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -593,7 +593,7 @@ standard_name = effective_radius_of_stratiform_cloud_rain_particle_in_um long_name = effective radius of cloud rain particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -602,7 +602,7 @@ standard_name = convective_cloud_water_mixing_ratio_in_phy_f3d long_name = convective cloud water mixing ratio in the phy_f3d array units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -611,7 +611,7 @@ standard_name = convective_cloud_cover_in_phy_f3d long_name = convective cloud cover in the phy_f3d array units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -620,7 +620,7 @@ standard_name = fraction_of_ice_water_cloud long_name = fraction of ice water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -629,7 +629,7 @@ standard_name = fraction_of_rain_water_cloud long_name = fraction of rain water cloud units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -638,7 +638,7 @@ standard_name = rime_factor long_name = rime factor units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -647,7 +647,7 @@ standard_name = tracer_concentration long_name = model layer mean tracer concentration units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers) type = real kind = kind_phys intent = in @@ -656,7 +656,7 @@ standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology long_name = GOCART aerosol climatology number concentration units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) + dimensions = (horizontal_loop_extent,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys intent = in @@ -665,7 +665,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -674,7 +674,7 @@ standard_name = daytime_mean_cosz_over_rad_call_period long_name = daytime mean cosz over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -683,7 +683,7 @@ standard_name = effective_radius_of_stratiform_cloud_liquid_water_particle_in_um long_name = eff. radius of cloud liquid water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -692,7 +692,7 @@ standard_name = effective_radius_of_stratiform_cloud_ice_particle_in_um long_name = eff. radius of cloud ice water particle in micrometer units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -701,7 +701,7 @@ standard_name = effective_radius_of_stratiform_cloud_snow_particle_in_um long_name = effective radius of cloud snow particle in micrometers units = um - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -710,7 +710,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -719,7 +719,7 @@ standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -728,7 +728,7 @@ standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -737,7 +737,7 @@ standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -746,7 +746,7 @@ standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -779,7 +779,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -787,7 +787,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = out optional = F @@ -804,7 +804,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -813,7 +813,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -822,7 +822,7 @@ standard_name = cloud_decorrelation_length long_name = cloud decorrelation length units = km - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -831,7 +831,7 @@ standard_name = surface_albedo_perturbation long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -840,7 +840,7 @@ standard_name = layer_pressure_thickness_for_radiation long_name = layer pressure thickness on radiation levels units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -849,7 +849,7 @@ standard_name = layer_thickness_for_radiation long_name = layer thickness on radiation levels units = km - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -858,7 +858,7 @@ standard_name = air_pressure_at_interface_for_radiation_in_hPa long_name = air pressure at vertical interface for radiation calculation units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -867,7 +867,7 @@ standard_name = air_pressure_at_layer_for_radiation_in_hPa long_name = air pressure at vertical layer for radiation calculation units = hPa - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -876,7 +876,7 @@ standard_name = air_temperature_at_interface_for_radiation long_name = air temperature at vertical interface for radiation calculation units = K - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -885,7 +885,7 @@ standard_name = air_temperature_at_layer_for_radiation long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -894,7 +894,7 @@ standard_name = water_vapor_specific_humidity_at_layer_for_radiation long_name = water vapor specific humidity at vertical layer for radiation calculation units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -903,7 +903,7 @@ standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -912,7 +912,7 @@ standard_name = volume_mixing_ratio_co2 long_name = CO2 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -921,7 +921,7 @@ standard_name = volume_mixing_ratio_n2o long_name = N2O volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -930,7 +930,7 @@ standard_name = volume_mixing_ratio_ch4 long_name = CH4 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -939,7 +939,7 @@ standard_name = volume_mixing_ratio_o2 long_name = O2 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -948,7 +948,7 @@ standard_name = volume_mixing_ratio_co long_name = CO volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -957,7 +957,7 @@ standard_name = volume_mixing_ratio_cfc11 long_name = CFC11 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -966,7 +966,7 @@ standard_name = volume_mixing_ratio_cfc12 long_name = CFC12 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -975,7 +975,7 @@ standard_name = volume_mixing_ratio_cfc22 long_name = CFC22 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -984,7 +984,7 @@ standard_name = volume_mixing_ratio_ccl4 long_name = CCL4 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -993,7 +993,7 @@ standard_name = volume_mixing_ratio_cfc113 long_name = CFC113 volume mixing ratio units = kg kg-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out @@ -1002,7 +1002,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = out @@ -1011,7 +1011,7 @@ standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1020,7 +1020,7 @@ standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1029,7 +1029,7 @@ standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1038,7 +1038,7 @@ standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = micron - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1047,7 +1047,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle,high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = out @@ -1056,7 +1056,7 @@ standard_name = instantaneous_3d_cloud_fraction long_name = instantaneous 3D cloud fraction for all MPs units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -1065,7 +1065,7 @@ standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 long_name = aerosol optical depth for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -1074,7 +1074,7 @@ standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 long_name = aerosol single scattering albedo for shortwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -1083,7 +1083,7 @@ standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 long_name = aerosol asymmetry parameter for shortwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys intent = out @@ -1092,7 +1092,7 @@ standard_name = aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -1101,7 +1101,7 @@ standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 long_name = aerosol single scattering albedo for longwave bands 01-16 units = frac - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out @@ -1110,7 +1110,7 @@ standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 long_name = aerosol asymmetry parameter for longwave bands 01-16 units = none - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_lw_post.meta b/physics/GFS_rrtmgp_lw_post.meta index c2fba7cea..8ba985ee2 100644 --- a/physics/GFS_rrtmgp_lw_post.meta +++ b/physics/GFS_rrtmgp_lw_post.meta @@ -54,7 +54,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -63,7 +63,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -72,7 +72,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -81,7 +81,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_allsky long_name = RRTMGP upward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -90,7 +90,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -99,7 +99,7 @@ standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -108,7 +108,7 @@ standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -126,7 +126,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -135,7 +135,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -144,7 +144,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -152,7 +152,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -160,7 +160,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -169,7 +169,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -178,7 +178,7 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) type = real kind = kind_phys intent = inout @@ -187,7 +187,7 @@ standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky sfc downward lw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -196,7 +196,7 @@ standard_name = lw_fluxes_sfc long_name = lw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcflw_type intent = out optional = F @@ -204,7 +204,7 @@ standard_name = surface_midlayer_air_temperature_in_longwave_radiation long_name = surface air temp during lw calculation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -213,7 +213,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -222,7 +222,7 @@ standard_name = lw_fluxes_top_atmosphere long_name = lw radiation fluxes at top units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topflw_type intent = out optional = F @@ -230,7 +230,7 @@ standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = proflw_type intent = out optional = T @@ -238,7 +238,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = longwave clear sky heating rate units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = out diff --git a/physics/GFS_rrtmgp_sw_post.meta b/physics/GFS_rrtmgp_sw_post.meta index cd2512e58..16c5928e2 100644 --- a/physics/GFS_rrtmgp_sw_post.meta +++ b/physics/GFS_rrtmgp_sw_post.meta @@ -29,7 +29,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = in optional = F @@ -70,7 +70,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -79,7 +79,7 @@ standard_name = daytime_mean_cosz_over_rad_call_period long_name = daytime mean cosz over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -88,7 +88,7 @@ standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature at vertical layer for radiation calculation units = K - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -97,7 +97,7 @@ standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level units = hPa - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -106,7 +106,7 @@ standard_name = surface_albedo_nearIR_direct long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -115,7 +115,7 @@ standard_name = surface_albedo_nearIR_diffuse long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -124,7 +124,7 @@ standard_name = surface_albedo_uvvis_dir long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -133,7 +133,7 @@ standard_name = surface_albedo_uvvis_dif long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) units = none - dimensions = (number_of_sw_bands_rrtmgp,horizontal_dimension) + dimensions = (number_of_sw_bands_rrtmgp,horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -150,7 +150,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -159,7 +159,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -168,7 +168,7 @@ standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -177,7 +177,7 @@ standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile units = W m-2 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) + dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) type = real kind = kind_phys intent = in @@ -195,7 +195,7 @@ standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles long_name = vertical integrated optical depth for various aerosol species units = none - dimensions = (horizontal_dimension,number_of_species_for_aerosol_optical_depth) + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) type = real kind = kind_phys intent = in @@ -204,7 +204,7 @@ standard_name = cloud_area_fraction_for_radiation long_name = fraction of clouds for low, middle, high, total and BL units = frac - dimensions = (horizontal_dimension,5) + dimensions = (horizontal_loop_extent,5) type = real kind = kind_phys intent = in @@ -213,7 +213,7 @@ standard_name = model_layer_number_at_cloud_base long_name = vertical indices for low, middle and high cloud bases units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -221,7 +221,7 @@ standard_name = model_layer_number_at_cloud_top long_name = vertical indices for low, middle and high cloud tops units = index - dimensions = (horizontal_dimension,3) + dimensions = (horizontal_loop_extent,3) type = integer intent = in optional = F @@ -229,7 +229,7 @@ standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -238,7 +238,7 @@ standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth units = none - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = in @@ -247,7 +247,7 @@ standard_name = cumulative_radiation_diagnostic long_name = time-accumulated 2D radiation-related diagnostic fields units = various - dimensions = (horizontal_dimension,number_of_radiation_diagnostic_variables) + dimensions = (horizontal_loop_extent,number_of_radiation_diagnostic_variables) type = real kind = kind_phys intent = inout @@ -256,7 +256,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -265,7 +265,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -274,7 +274,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -283,7 +283,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -292,7 +292,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -301,7 +301,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -310,7 +310,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -319,7 +319,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -328,7 +328,7 @@ standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc netsw flx into ground units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -337,7 +337,7 @@ standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -346,7 +346,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -355,7 +355,7 @@ standard_name = sw_fluxes_sfc long_name = sw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcfsw_type intent = out optional = F @@ -363,7 +363,7 @@ standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topfsw_type intent = out optional = F @@ -371,7 +371,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky sw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = out @@ -380,7 +380,7 @@ standard_name = RRTMGP_sw_fluxes long_name = sw fluxes total sky / csk and up / down at levels units = W m-2 - dimensions = (horizontal_dimension,adjusted_vertical_level_dimension_plus_one) + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_plus_one) type = profsw_type intent = out optional = T @@ -388,7 +388,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = in optional = T diff --git a/physics/rrtmg_lw_post.meta b/physics/rrtmg_lw_post.meta index 9fdef489f..417537a9f 100644 --- a/physics/rrtmg_lw_post.meta +++ b/physics/rrtmg_lw_post.meta @@ -7,8 +7,8 @@ name = rrtmg_lw_post_run type = scheme [im] - standard_name = horizontal_dimension - long_name = horizontal dimension + standard_name = horizontal_loop_extent + long_name = horizontal loop extent units = count dimensions = () type = integer @@ -66,7 +66,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -75,7 +75,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels long_name = total sky heating rate due to longwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -84,7 +84,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = clear sky heating rate due to longwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -93,7 +93,7 @@ standard_name = lw_fluxes_sfc long_name = lw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcflw_type intent = in optional = F @@ -101,7 +101,7 @@ standard_name = surface_midlayer_air_temperature_in_longwave_radiation long_name = surface air temp during lw calculation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -110,7 +110,7 @@ standard_name = surface_downwelling_longwave_flux_on_radiation_time_step long_name = total sky sfc downward lw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -119,7 +119,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step long_name = total sky lw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -128,7 +128,7 @@ standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky lw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout diff --git a/physics/rrtmg_lw_pre.meta b/physics/rrtmg_lw_pre.meta index d4054cc0b..5f75df65c 100644 --- a/physics/rrtmg_lw_pre.meta +++ b/physics/rrtmg_lw_pre.meta @@ -26,7 +26,7 @@ standard_name = latitude long_name = latitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -35,7 +35,7 @@ standard_name = longitude long_name = longitude units = radian - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -44,7 +44,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -53,7 +53,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -62,7 +62,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -80,7 +80,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -89,7 +89,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = surface_longwave_emissivity long_name = surface lw emissivity in fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out diff --git a/physics/rrtmg_sw_post.meta b/physics/rrtmg_sw_post.meta index 093a4e290..b7b06b255 100644 --- a/physics/rrtmg_sw_post.meta +++ b/physics/rrtmg_sw_post.meta @@ -7,8 +7,8 @@ name = rrtmg_sw_post_run type = scheme [im] - standard_name = horizontal_dimension - long_name = horizontal dimension + standard_name = horizontal_loop_extent + long_name = horizontal loop extents units = count dimensions = () type = integer @@ -82,7 +82,7 @@ standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -91,7 +91,7 @@ standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -100,7 +100,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -109,7 +109,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -118,7 +118,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels long_name = total sky heating rate due to shortwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -127,7 +127,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels long_name = clear sky heating rates due to shortwave radiation units = K s-1 - dimensions = (horizontal_dimension,adjusted_vertical_layer_dimension_for_radiation) + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys intent = in @@ -136,7 +136,7 @@ standard_name = surface_downwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -145,7 +145,7 @@ standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -154,7 +154,7 @@ standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -163,7 +163,7 @@ standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw downward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -172,7 +172,7 @@ standard_name = surface_upwelling_direct_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -181,7 +181,7 @@ standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux_on_radiation_time_step long_name = sfc nir diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -190,7 +190,7 @@ standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis beam sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -199,7 +199,7 @@ standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux_on_radiation_time_step long_name = sfc uv+vis diff sw upward flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -208,7 +208,7 @@ standard_name = surface_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc downward sw flux units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -217,7 +217,7 @@ standard_name = surface_net_downwelling_shortwave_flux_on_radiation_time_step long_name = total sky sfc netsw flx into ground units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -226,7 +226,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step long_name = total sky sw heating rate units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -235,7 +235,7 @@ standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step long_name = clear sky sw heating rates units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) + dimensions = (horizontal_loop_extent,vertical_dimension) type = real kind = kind_phys intent = inout @@ -244,7 +244,7 @@ standard_name = components_of_surface_downward_shortwave_fluxes long_name = derived type for special components of surface downward shortwave fluxes units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = cmpfsw_type intent = inout optional = F @@ -252,7 +252,7 @@ standard_name = sw_fluxes_sfc long_name = sw radiation fluxes at sfc units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = sfcfsw_type intent = inout optional = F @@ -260,7 +260,7 @@ standard_name = sw_fluxes_top_atmosphere long_name = sw radiation fluxes at toa units = W m-2 - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = topfsw_type intent = inout optional = F diff --git a/physics/rrtmg_sw_pre.meta b/physics/rrtmg_sw_pre.meta index 76c3e6f97..a302c959f 100644 --- a/physics/rrtmg_sw_pre.meta +++ b/physics/rrtmg_sw_pre.meta @@ -7,8 +7,8 @@ name = rrtmg_sw_pre_run type = scheme [im] - standard_name = horizontal_dimension - long_name = horizontal dimension + standard_name = horizontal_loop_extent + long_name = horizontal loop extent units = count dimensions = () type = integer @@ -35,7 +35,7 @@ standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -44,7 +44,7 @@ standard_name = surface_air_temperature_for_radiation long_name = lowest model layer air temperature for radiation units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -53,7 +53,7 @@ standard_name = cosine_of_zenith_angle long_name = mean cos of zenith angle over rad call period units = none - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -62,7 +62,7 @@ standard_name = surface_albedo_perturbation long_name = surface albedo perturbation units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -71,7 +71,7 @@ standard_name = sea_land_ice_mask_real long_name = landmask: sea/land/ice=0/1/2 units = flag - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -80,7 +80,7 @@ standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth units = mm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -89,7 +89,7 @@ standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -98,7 +98,7 @@ standard_name = upper_bound_on_max_albedo_over_deep_snow long_name = maximum snow albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -107,7 +107,7 @@ standard_name = surface_roughness_length long_name = surface roughness length units = cm - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -116,7 +116,7 @@ standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid orography units = m - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -125,7 +125,7 @@ standard_name = mean_vis_albedo_with_strong_cosz_dependency long_name = mean vis albedo with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -134,7 +134,7 @@ standard_name = mean_nir_albedo_with_strong_cosz_dependency long_name = mean nir albedo with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -143,7 +143,7 @@ standard_name = mean_vis_albedo_with_weak_cosz_dependency long_name = mean vis albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -152,7 +152,7 @@ standard_name = mean_nir_albedo_with_weak_cosz_dependency long_name = mean nir albedo with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -161,7 +161,7 @@ standard_name = fractional_coverage_with_strong_cosz_dependency long_name = fractional coverage with strong cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -170,7 +170,7 @@ standard_name = fractional_coverage_with_weak_cosz_dependency long_name = fractional coverage with weak cosz dependency units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -179,7 +179,7 @@ standard_name = sea_ice_concentration long_name = ice fraction over open water units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -188,7 +188,7 @@ standard_name = sea_ice_temperature long_name = sea ice surface skin temperature units = K - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = in @@ -197,7 +197,7 @@ standard_name = surface_diffused_shortwave_albedo long_name = mean surface diffused sw albedo units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = inout @@ -214,7 +214,7 @@ standard_name = daytime_points long_name = daytime points units = index - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = integer intent = out optional = F @@ -222,7 +222,7 @@ standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -231,7 +231,7 @@ standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -240,7 +240,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out @@ -249,7 +249,7 @@ standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac - dimensions = (horizontal_dimension) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys intent = out From b378619c7f60f8488c9d7c43ee63a62646e109c1 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 27 Aug 2020 10:43:00 -0600 Subject: [PATCH 16/17] revert changes to time_vary.scm files --- physics/GFS_phys_time_vary.scm.F90 | 289 ++++----- physics/GFS_phys_time_vary.scm.meta | 890 ++-------------------------- physics/GFS_rad_time_vary.scm.F90 | 69 +-- physics/GFS_rad_time_vary.scm.meta | 234 +------- 4 files changed, 221 insertions(+), 1261 deletions(-) diff --git a/physics/GFS_phys_time_vary.scm.F90 b/physics/GFS_phys_time_vary.scm.F90 index 2bb04ebb6..5fcc9ed84 100644 --- a/physics/GFS_phys_time_vary.scm.F90 +++ b/physics/GFS_phys_time_vary.scm.F90 @@ -33,39 +33,18 @@ module GFS_phys_time_vary !> \section arg_table_GFS_phys_time_vary_init Argument Table !! \htmlinclude GFS_phys_time_vary_init.html !! - subroutine GFS_phys_time_vary_init (im, nx, ny, me, master, nblks, ntoz, iflip, & - iccn, levh2o_int, levozp_int, idate, blksz, h2o_phys, iaerclm, xlat_d, xlon_d,& - ozpl, h2opl, aer_nm, imap, jmap, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, & - jindx1_aer, jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, & - iindx1_ci, iindx2_ci, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, ddx_ci, & - oz_pres_int, h2o_pres_int, errmsg, errflg) + subroutine GFS_phys_time_vary_init (Grid, Model, Interstitial, Tbd, errmsg, errflg) - use machine, only: kind_phys + use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & + GFS_Tbd_type, GFS_interstitial_type implicit none ! Interface variables - integer, intent(in) :: im, nx, ny, me, master, & - nblks, ntoz, iflip, iccn,& - levh2o_int, levozp_int - integer, dimension(4), intent(in) :: idate - integer, dimension(nblks), intent(in) :: blksz - logical, intent(in) :: h2o_phys, iaerclm - real(kind=kind_phys), dimension(im), intent(in) :: xlat_d, xlon_d - real(kind=kind_phys), dimension(:,:,:), intent(in) :: ozpl, h2opl, aer_nm - - integer, dimension(im), intent(inout) :: imap, jmap - integer, dimension(:), intent(inout) :: jindx1_o3, jindx2_o3, & - jindx1_h, jindx2_h, & - jindx1_aer, jindx2_aer, & - iindx1_aer, iindx2_aer, & - jindx1_ci, jindx2_ci, & - iindx1_ci, iindx2_ci - real(kind=kind_phys), dimension(:), intent(inout) :: ddy_o3, ddy_h, ddy_aer, & - ddx_aer, ddy_ci, ddx_ci - real(kind=kind_phys), dimension(levozp_int), intent(inout) :: oz_pres_int - real(kind=kind_phys), dimension(levh2o_int), intent(inout) :: h2o_pres_int - + type(GFS_grid_type), intent(inout) :: Grid + type(GFS_control_type), intent(in) :: Model + type(GFS_interstitial_type), intent(inout) :: Interstitial + type(GFS_tbd_type), intent(in) :: Tbd character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -81,121 +60,121 @@ subroutine GFS_phys_time_vary_init (im, nx, ny, me, master, nblks, ntoz, iflip, nb = 1 nt = 1 - call read_o3data (ntoz, me, master) + call read_o3data (Model%ntoz, Model%me, Model%master) ! Consistency check that the hardcoded values for levozp and ! oz_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff)) - if (size(ozpl, dim=2).ne.levozp) then + if (size(Tbd%ozpl, dim=2).ne.levozp) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levozp from read_o3data does not match value in GFS_typedefs.F90: ", & - levozp, " /= ", size(ozpl, dim=2) + levozp, " /= ", size(Tbd%ozpl, dim=2) errflg = 1 end if - if (size(ozpl, dim=3).ne.oz_coeff) then + if (size(Tbd%ozpl, dim=3).ne.oz_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "oz_coeff from read_o3data does not match value in GFS_typedefs.F90: ", & - oz_coeff, " /= ", size(ozpl, dim=3) + oz_coeff, " /= ", size(Tbd%ozpl, dim=3) errflg = 1 end if - call read_h2odata (h2o_phys, me, master) + call read_h2odata (Model%h2o_phys, Model%me, Model%master) ! Consistency check that the hardcoded values for levh2o and ! h2o_coeff in GFS_typedefs.F90 match what is set by read_o3data ! in GFS_typedefs.F90: allocate (Tbd%h2opl (IM,levh2o,h2o_coeff)) - if (size(h2opl, dim=2).ne.levh2o) then + if (size(Tbd%h2opl, dim=2).ne.levh2o) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "levh2o from read_h2odata does not match value in GFS_typedefs.F90: ", & - levh2o, " /= ", size(h2opl, dim=2) + levh2o, " /= ", size(Tbd%h2opl, dim=2) errflg = 1 end if - if (size(h2opl, dim=3).ne.h2o_coeff) then + if (size(Tbd%h2opl, dim=3).ne.h2o_coeff) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "h2o_coeff from read_h2odata does not match value in GFS_typedefs.F90: ", & - h2o_coeff, " /= ", size(h2opl, dim=3) + h2o_coeff, " /= ", size(Tbd%h2opl, dim=3) errflg = 1 end if - if (iaerclm) then + if (Model%iaerclm) then ! Consistency check that the value for ntrcaerm set in GFS_typedefs.F90 ! and used to allocate Tbd%aer_nm matches the value defined in aerclm_def - if (size(aer_nm, dim=3).ne.ntrcaerm) then + if (size(Tbd%aer_nm, dim=3).ne.ntrcaerm) then write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", & "ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", & - ntrcaerm, " /= ", size(aer_nm, dim=3) + ntrcaerm, " /= ", size(Tbd%aer_nm, dim=3) errflg = 1 else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If iaerclm is .true., then ntrcaer == ntrcaerm - ntrcaer = size(aer_nm, dim=3) + ! If Model%iaerclm is .true., then ntrcaer == ntrcaerm + ntrcaer = size(Tbd%aer_nm, dim=3) ! Read aerosol climatology - call read_aerdata (me, master, iflip, idate, errmsg, errflg) + call read_aerdata (Model%me,Model%master,Model%iflip,Model%idate,errmsg,errflg) if (errflg/=0) return endif else ! Update the value of ntrcaer in aerclm_def with the value defined ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT. - ! If iaerclm is .false., then ntrcaer == 1 - ntrcaer = size(aer_nm, dim=3) + ! If Model%iaerclm is .false., then ntrcaer == 1 + ntrcaer = size(Tbd%aer_nm, dim=3) endif - if (iccn == 1) then - call read_cidata (me, master) + if (Model%iccn == 1) then + call read_cidata ( Model%me, Model%master) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif ! Update values of oz_pres in Interstitial data type for all threads - if (ntoz > 0) then - oz_pres_int = oz_pres + if (Model%ntoz > 0) then + Interstitial%oz_pres = oz_pres end if ! Update values of h2o_pres in Interstitial data type for all threads - if (h2o_phys) then - h2o_pres_int = h2o_pres + if (Model%h2o_phys) then + Interstitial%h2o_pres = h2o_pres end if !--- read in and initialize ozone - if (ntoz > 0) then - call setindxoz (blksz(nb), xlat_d, jindx1_o3, & - jindx2_o3, ddy_o3) + if (Model%ntoz > 0) then + call setindxoz (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_o3, & + Grid%jindx2_o3, Grid%ddy_o3) endif !--- read in and initialize stratospheric water - if (h2o_phys) then - call setindxh2o (blksz(nb), xlat_d, jindx1_h, & - jindx2_h, ddy_h) + if (Model%h2o_phys) then + call setindxh2o (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_h, & + Grid%jindx2_h, Grid%ddy_h) endif !--- read in and initialize aerosols - if (iaerclm) then - call setindxaer (blksz(nb), xlat_d, jindx1_aer, & - jindx2_aer, ddy_aer, xlon_d, & - iindx1_aer, iindx2_aer, ddx_aer, & - me, master) + if (Model%iaerclm) then + call setindxaer (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_aer, & + Grid%jindx2_aer, Grid%ddy_aer, Grid%xlon_d, & + Grid%iindx1_aer, Grid%iindx2_aer, Grid%ddx_aer, & + Model%me, Model%master) endif !--- read in and initialize IN and CCN - if (iccn == 1) then - call setindxci (blksz(nb), xlat_d, jindx1_ci, & - jindx2_ci, ddy_ci, xlon_d, & - iindx1_ci, iindx2_ci, ddx_ci) + if (Model%iccn == 1) then + call setindxci (Model%blksz(nb), Grid%xlat_d, Grid%jindx1_ci, & + Grid%jindx2_ci, Grid%ddy_ci, Grid%xlon_d, & + Grid%iindx1_ci, Grid%iindx2_ci, Grid%ddx_ci) endif !--- initial calculation of maps local ix -> global i and j, store in Tbd ix = 0 nb = 1 - do j = 1, ny - do i = 1, nx + do j = 1,Model%ny + do i = 1,Model%nx ix = ix + 1 - if (ix .gt. blksz(nb)) then + if (ix .gt. Model%blksz(nb)) then ix = 1 nb = nb + 1 endif - jmap(ix) = j - imap(ix) = i + Tbd%jmap(ix) = j + Tbd%imap(ix) = i enddo enddo @@ -247,53 +226,25 @@ end subroutine GFS_phys_time_vary_finalize !> \section arg_table_GFS_phys_time_vary_run Argument Table !! \htmlinclude GFS_phys_time_vary_run.html !! - subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & - ntoz, iccn, nrcm, nsswr, nszero, kdt, imfdeepcnv, seed0, first_time_step,& - lsswr, cal_pre, random_clds, h2o_phys, iaerclm, fhswr, fhlwr, fhour, & - fhzero, dtp, idate, jindx1_o3, jindx2_o3, jindx1_h, jindx2_h, jindx1_aer,& - jindx2_aer, iindx1_aer, iindx2_aer, jindx1_ci, jindx2_ci, iindx1_ci, & - iindx2_ci, blksz, imap, jmap, ddy_o3, ddy_h, ddy_aer, ddx_aer, ddy_ci, & - ddx_ci, slmsk, vtype, weasd, prsl, Model, clstp, sncovr, rann, in_nm, & - ccn_nm, ozpl, h2opl, aer_nm, Diag, errmsg, errflg) + subroutine GFS_phys_time_vary_run (Grid, Statein, Model, Tbd, Sfcprop, Cldprop, Diag, first_time_step, errmsg, errflg) use mersenne_twister, only: random_setseed, random_number use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type, GFS_diag_type - + use GFS_typedefs, only: GFS_control_type, GFS_grid_type, & + GFS_Tbd_type, GFS_sfcprop_type, & + GFS_cldprop_type, GFS_diag_type, & + GFS_statein_type + implicit none - integer, intent(in) :: levs, cnx, cny, isc, jsc, & - me, master, ntoz, iccn, & - nrcm, nsswr, nszero, kdt, & - imfdeepcnv, seed0 - logical, intent(in) :: first_time_step, lsswr, & - cal_pre, random_clds, & - h2o_phys, iaerclm - real(kind=kind_phys), intent(in) :: fhswr, fhlwr, fhour, & - fhzero, dtp - - integer, dimension(4), intent(in) :: idate - integer, dimension(:), intent(in) :: jindx1_o3, jindx2_o3, & - jindx1_h, jindx2_h, & - jindx1_aer, jindx2_aer, & - iindx1_aer, iindx2_aer, & - jindx1_ci, jindx2_ci, & - iindx1_ci, iindx2_ci, & - blksz, imap, jmap - real(kind=kind_phys), dimension(:), intent(in) :: ddy_o3, ddy_h, ddy_aer, & - ddx_aer, ddy_ci, ddx_ci, & - slmsk, vtype, weasd - real(kind=kind_phys), dimension(:,:), intent(in) :: prsl - - type(GFS_control_type), intent(in) :: Model - - real(kind=kind_phys), intent(inout) :: clstp - real(kind=kind_phys), dimension(:), intent(inout) :: sncovr - real(kind=kind_phys), dimension(:,:), intent(inout) :: rann, in_nm, ccn_nm - real(kind=kind_phys), dimension(:,:,:), intent(inout) :: ozpl, h2opl, aer_nm - + type(GFS_grid_type), intent(in) :: Grid + type(GFS_statein_type), intent(in) :: Statein + type(GFS_control_type), intent(inout) :: Model + type(GFS_tbd_type), intent(inout) :: Tbd + type(GFS_sfcprop_type), intent(inout) :: Sfcprop + type(GFS_cldprop_type), intent(inout) :: Cldprop type(GFS_diag_type), intent(inout) :: Diag - + logical, intent(in) :: first_time_step character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -304,8 +255,8 @@ subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & integer :: i, j, k, iseed, iskip, ix, nb, kdt_rad, vegtyp real(kind=kind_phys) :: sec_zero, rsnow real(kind=kind_phys) :: wrk(1) - real(kind=kind_phys) :: rannie(cny) - real(kind=kind_phys) :: rndval(cnx*cny*nrcm) + real(kind=kind_phys) :: rannie(Model%cny) + real(kind=kind_phys) :: rndval(Model%cnx*Model%cny*Model%nrcm) ! Initialize CCPP error handling variables errmsg = '' @@ -322,98 +273,98 @@ subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & !--- switch for saving convective clouds - cnvc90.f !--- aka Ken Campana/Yu-Tai Hou legacy - if ((mod(kdt,nsswr) == 0) .and. (lsswr)) then + if ((mod(Model%kdt,Model%nsswr) == 0) .and. (Model%lsswr)) then !--- initialize,accumulate,convert - clstp = 1100 + min(fhswr/con_hr,fhour,con_99) - elseif (mod(kdt,nsswr) == 0) then + Model%clstp = 1100 + min(Model%fhswr/con_hr,Model%fhour,con_99) + elseif (mod(Model%kdt,Model%nsswr) == 0) then !--- accumulate,convert - clstp = 0100 + min(fhswr/con_hr,fhour,con_99) - elseif (lsswr) then + Model%clstp = 0100 + min(Model%fhswr/con_hr,Model%fhour,con_99) + elseif (Model%lsswr) then !--- initialize,accumulate - clstp = 1100 + Model%clstp = 1100 else !--- accumulate - clstp = 0100 + Model%clstp = 0100 endif !--- random number needed for RAS and old SAS and when cal_pre=.true. - if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds ) then - iseed = mod(con_100*sqrt(fhour*con_hr),1.0d9) + seed0 + if ( (Model%imfdeepcnv <= 0 .or. Model%cal_pre) .and. Model%random_clds ) then + iseed = mod(con_100*sqrt(Model%fhour*con_hr),1.0d9) + Model%seed0 call random_setseed(iseed) call random_number(wrk) - do i = 1,cnx*nrcm + do i = 1,Model%cnx*Model%nrcm iseed = iseed + nint(wrk(1)*1000.0) * i call random_setseed(iseed) call random_number(rannie) - rndval(1+(i-1)*cny:i*cny) = rannie(1:cny) + rndval(1+(i-1)*Model%cny:i*Model%cny) = rannie(1:Model%cny) enddo - do k = 1,nrcm - iskip = (k-1)*cnx*cny - do ix=1,blksz(nb) - j = jmap(ix) - i = imap(ix) - rann(ix,k) = rndval(i+isc-1 + (j+jsc-2)*cnx + iskip) + do k = 1,Model%nrcm + iskip = (k-1)*Model%cnx*Model%cny + do ix=1,Model%blksz(nb) + j = Tbd%jmap(ix) + i = Tbd%imap(ix) + Tbd%rann(ix,k) = rndval(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + iskip) enddo enddo endif ! imfdeepcnv, cal_re, random_clds !--- o3 interpolation - if (ntoz > 0) then - call ozinterpol (me, blksz(nb), idate, fhour, & - jindx1_o3, jindx2_o3, ozpl, ddy_o3) + if (Model%ntoz > 0) then + call ozinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & + Grid%jindx1_o3, Grid%jindx2_o3, Tbd%ozpl, Grid%ddy_o3) endif !--- h2o interpolation - if (h2o_phys) then - call h2ointerpol (me, blksz(nb), idate, fhour, & - jindx1_h, jindx2_h, h2opl, ddy_h) + if (Model%h2o_phys) then + call h2ointerpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & + Grid%jindx1_h, Grid%jindx2_h, Tbd%h2opl, Grid%ddy_h) endif !--- aerosol interpolation - if (iaerclm) then - call aerinterpol (me, master, blksz(nb), & - idate, fhour, & - jindx1_aer, jindx2_aer, & - ddy_aer,iindx1_aer, & - iindx2_aer,ddx_aer, & - levs,prsl, & - aer_nm) + if (Model%iaerclm) then + call aerinterpol (Model%me, Model%master, Model%blksz(nb), & + Model%idate, Model%fhour, & + Grid%jindx1_aer, Grid%jindx2_aer, & + Grid%ddy_aer,Grid%iindx1_aer, & + Grid%iindx2_aer,Grid%ddx_aer, & + Model%levs,Statein%prsl, & + Tbd%aer_nm) endif !--- ICCN interpolation - if (iccn == 1) then - call ciinterpol (me, blksz(nb), idate, fhour, & - jindx1_ci, jindx2_ci, & - ddy_ci,iindx1_ci, & - iindx2_ci,ddx_ci, & - levs,prsl, & - in_nm, ccn_nm) + if (Model%iccn == 1) then + call ciinterpol (Model%me, Model%blksz(nb), Model%idate, Model%fhour, & + Grid%jindx1_ci, Grid%jindx2_ci, & + Grid%ddy_ci,Grid%iindx1_ci, & + Grid%iindx2_ci,Grid%ddx_ci, & + Model%levs,Statein%prsl, & + Tbd%in_nm, Tbd%ccn_nm) endif !--- original FV3 code, not needed for SCM; also not compatible with the way ! the time vary steps are run (over each block) --> cannot use !--- repopulate specific time-varying sfc properties for AMIP/forecast runs !if (Model%nscyc > 0) then - ! if (mod(kdt,Model%nscyc) == 1) THEN + ! if (mod(Model%kdt,Model%nscyc) == 1) THEN ! call gcycle (nblks, Model, Grid(:), Sfcprop(:), Cldprop(:)) ! endif !endif !--- determine if diagnostics buckets need to be cleared - sec_zero = nint(fhzero*con_hr) - if (sec_zero >= nint(max(fhswr,fhlwr))) then - if (mod(kdt,nszero) == 1) then + sec_zero = nint(Model%fhzero*con_hr) + if (sec_zero >= nint(max(Model%fhswr,Model%fhlwr))) then + if (mod(Model%kdt,Model%nszero) == 1) then call Diag%rad_zero (Model) call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif else - if (mod(kdt,nszero) == 1) then + if (mod(Model%kdt,Model%nszero) == 1) then call Diag%phys_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif - kdt_rad = nint(min(fhswr,fhlwr)/dtp) - if (mod(kdt, kdt_rad) == 1) then + kdt_rad = nint(min(Model%fhswr,Model%fhlwr)/Model%dtp) + if (mod(Model%kdt, kdt_rad) == 1) then call Diag%rad_zero (Model) !!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED endif @@ -422,19 +373,19 @@ subroutine GFS_phys_time_vary_run (levs, cnx, cny, isc, jsc, me, master, & #if 0 !Calculate sncovr if it was read in but empty (from FV3/io/FV3GFS_io.F90/sfc_prop_restart_read) if (first_time_step) then - if (nint(sncovr(1)) == -9999) then + if (nint(Sfcprop%sncovr(1)) == -9999) then !--- compute sncovr from existing variables !--- code taken directly from read_fix.f - do ix = 1, blksz(nb) - sncovr(ix) = 0.0 - if (slmsk(ix) > 0.001) then - vegtyp = vtype(ix) + do ix = 1, Model%blksz(nb) + Sfcprop%sncovr(ix) = 0.0 + if (Sfcprop%slmsk(ix) > 0.001) then + vegtyp = Sfcprop%vtype(ix) if (vegtyp == 0) vegtyp = 7 - rsnow = 0.001*weasd(ix)/snupx(vegtyp) - if (0.001*weasd(ix) < snupx(vegtyp)) then - sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) + rsnow = 0.001*Sfcprop%weasd(ix)/snupx(vegtyp) + if (0.001*Sfcprop%weasd(ix) < snupx(vegtyp)) then + Sfcprop%sncovr(ix) = 1.0 - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) else - sncovr(ix) = 1.0 + Sfcprop%sncovr(ix) = 1.0 endif endif enddo diff --git a/physics/GFS_phys_time_vary.scm.meta b/physics/GFS_phys_time_vary.scm.meta index fd450c336..57a82ecb0 100644 --- a/physics/GFS_phys_time_vary.scm.meta +++ b/physics/GFS_phys_time_vary.scm.meta @@ -1,355 +1,38 @@ [ccpp-arg-table] name = GFS_phys_time_vary_init type = scheme -[im] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in - optional = F -[nx] - standard_name = number_of_points_in_x_direction_for_this_MPI_rank - long_name = number of points in x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[ny] - standard_name = number_of_points_in_y_direction_for_this_MPI_rank - long_name = number of points in y direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[nblks] - standard_name = ccpp_block_count - long_name = for explicit data blocking: number of blocks - units = count - dimensions = () - type = integer - intent = in - optional = F -[ntoz] - standard_name = index_for_ozone - long_name = tracer index for ozone mixing ratio - units = index - dimensions = () - type = integer - intent = in - optional = F -[iflip] - standard_name = flag_for_vertical_index_direction_control - long_name = iflip - is not the same as flipv - units = flag - dimensions = () - type = integer - intent = in - optional = F -[iccn] - standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics - long_name = flag for IN and CCN forcing for morrison gettelman microphysics - units = none - dimensions = () - type = integer - intent = in - optional = F -[levh2o_int] - standard_name = vertical_dimension_of_h2o_forcing_data - long_name = number of vertical layers in h2o forcing data - units = count +[Grid] + standard_name = GFS_grid_type_instance + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT dimensions = () - type = integer - intent = in + type = GFS_grid_type + intent = inout optional = F -[levozp_int] - standard_name = vertical_dimension_of_ozone_forcing_data - long_name = number of vertical layers in ozone forcing data - units = count +[Model] + standard_name = GFS_control_type_instance + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT dimensions = () - type = integer - intent = in - optional = F -[idate] - standard_name = date_and_time_at_model_initialization_reordered - long_name = initial date with different size and ordering - units = none - dimensions = (4) - type = integer - intent = in - optional = F -[blksz] - standard_name = ccpp_block_sizes - long_name = for explicit data blocking: block sizes of all blocks - units = count - dimensions = (ccpp_block_count) - type = integer + type = GFS_control_type intent = in optional = F -[h2o_phys] - standard_name = flag_for_stratospheric_water_vapor_physics - long_name = flag for stratospheric water vapor physics - units = flag +[Interstitial] + standard_name = GFS_interstitial_type_instance + long_name = Fortran DDT containing FV3-GFS interstitial data + units = DDT dimensions = () - type = logical - intent = in + type = GFS_interstitial_type + intent = inout optional = F -[iaerclm] - standard_name = flag_for_aerosol_input_MG_radiation - long_name = flag for using aerosols in Morrison-Gettelman MP_radiation - units = flag +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = Fortran DDT containing FV3-GFS miscellaneous data + units = DDT dimensions = () - type = logical - intent = in - optional = F -[xlat_d] - standard_name = latitude_in_degree - long_name = latitude in degrees - units = degree_north - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[xlon_d] - standard_name = longitude_in_degree - long_name = longitude in degrees - units = degree_east - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ozpl] - standard_name = ozone_forcing - long_name = ozone forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) - type = real - kind = kind_phys + type = GFS_tbd_type intent = in optional = F -[h2opl] - standard_name = h2o_forcing - long_name = water forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) - type = real - kind = kind_phys - intent = in - optional = F -[aer_nm] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology - long_name = GOCART aerosol climatology number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) - type = real - kind = kind_phys - intent = in - optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_o3] - standard_name = lower_ozone_interpolation_index - long_name = interpolation low index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_o3] - standard_name = upper_ozone_interpolation_index - long_name = interpolation high index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_h] - standard_name = lower_water_vapor_interpolation_index - long_name = interpolation low index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_h] - standard_name = upper_water_vapor_interpolation_index - long_name = interpolation high index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_aer] - standard_name = lower_aerosol_y_interpolation_index - long_name = interpolation low index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_aer] - standard_name = upper_aerosol_y_interpolation_index - long_name = interpolation high index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx1_aer] - standard_name = lower_aerosol_x_interpolation_index - long_name = interpolation low index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx2_aer] - standard_name = upper_aerosol_x_interpolation_index - long_name = interpolation high index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx1_ci] - standard_name = lower_cloud_nuclei_y_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[jindx2_ci] - standard_name = upper_cloud_nuclei_y_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx1_ci] - standard_name = lower_cloud_nuclei_x_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[iindx2_ci] - standard_name = upper_cloud_nuclei_x_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = inout - optional = F -[ddy_o3] - standard_name = ozone_interpolation_weight - long_name = interpolation high index for ozone - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddy_h] - standard_name = water_vapor_interpolation_weight - long_name = interpolation high index for stratospheric water vapor - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddy_aer] - standard_name = aerosol_y_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddx_aer] - standard_name = aerosol_x_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ddx_ci] - standard_name = cloud_nuclei_x_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[oz_pres_int] - standard_name = natural_log_of_ozone_forcing_data_pressure_levels - long_name = natural log of ozone forcing data pressure levels - units = log(Pa) - dimensions = (vertical_dimension_of_ozone_forcing_data) - type = real - kind = kind_phys - intent = inout - optional = F -[h2o_pres_int] - standard_name = natural_log_of_h2o_forcing_data_pressure_levels - long_name = natural log of h2o forcing data pressure levels - units = log(Pa) - dimensions = (vertical_dimension_of_h2o_forcing_data) - type = real - kind = kind_phys - intent = inout - optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -394,435 +77,20 @@ [ccpp-arg-table] name = GFS_phys_time_vary_run type = scheme -[levs] - standard_name = vertical_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in - optional = F -[cnx] - standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face - long_name = number of points in x direction for this cubed sphere face - units = count - dimensions = () - type = integer - intent = in - optional = F -[cny] - standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face - long_name = number of points in y direction for this cubed sphere face - units = count - dimensions = () - type = integer - intent = in - optional = F -[isc] - standard_name = starting_x_index_for_this_MPI_rank - long_name = starting index in the x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[jsc] - standard_name = starting_y_index_for_this_MPI_rank - long_name = starting index in the y direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in - optional = F -[ntoz] - standard_name = index_for_ozone - long_name = tracer index for ozone mixing ratio - units = index - dimensions = () - type = integer - intent = in - optional = F -[iccn] - standard_name = flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics - long_name = flag for IN and CCN forcing for morrison gettelman microphysics - units = none - dimensions = () - type = integer - intent = in - optional = F -[nrcm] - standard_name = array_dimension_of_random_number - long_name = second dimension of random number stream for RAS - units = count - dimensions = () - type = integer - intent = in - optional = F -[nsswr] - standard_name = number_of_timesteps_between_shortwave_radiation_calls - long_name = number of timesteps between shortwave radiation calls - units = - dimensions = () - type = integer - intent = in - optional = F -[nszero] - standard_name = number_of_timesteps_between_diagnostic_clearing - long_name = number of timesteps between calls to clear diagnostic variables - units = count - dimensions = () - type = integer - intent = in - optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index - dimensions = () - type = integer - intent = in - optional = F -[imfdeepcnv] - standard_name = flag_for_mass_flux_deep_convection_scheme - long_name = flag for mass-flux deep convection scheme - units = flag - dimensions = () - type = integer - intent = in - optional = F -[seed0] - standard_name = seed_random_numbers_RAS - long_name = random number seed for the RAS scheme - units = none - dimensions = () - type = integer - intent = in - optional = F -[first_time_step] - standard_name = flag_for_first_time_step - long_name = flag for first time step for time integration loop (cold/warmstart) - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[cal_pre] - standard_name = flag_for_precipitation_type_algorithm - long_name = flag controls precip type algorithm - units = flag - dimensions = () - type = logical - intent = in - optional = F -[random_clds] - standard_name = flag_for_random_clouds_for_RAS - long_name = flag for using random clouds with the RAS scheme - units = flag - dimensions = () - type = logical - intent = in - optional = F -[h2o_phys] - standard_name = flag_for_stratospheric_water_vapor_physics - long_name = flag for stratospheric water vapor physics - units = flag - dimensions = () - type = logical - intent = in - optional = F -[iaerclm] - standard_name = flag_for_aerosol_input_MG_radiation - long_name = flag for using aerosols in Morrison-Gettelman MP_radiation - units = flag - dimensions = () - type = logical - intent = in - optional = F -[fhswr] - standard_name = frequency_for_shortwave_radiation - long_name = frequency for shortwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhlwr] - standard_name = frequency_for_longwave_radiation - long_name = frequency for longwave radiation - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhour] - standard_name = forecast_time - long_name = current forecast time - units = h - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[fhzero] - standard_name = frequency_for_diagnostic_clearing - long_name = frequency for clearing diagnostic fields - units = h +[Grid] + standard_name = GFS_grid_type_instance + long_name = Fortran DDT containing FV3-GFS grid and interpolation related data + units = DDT dimensions = () - type = real - kind = kind_phys + type = GFS_grid_type intent = in optional = F -[dtp] - standard_name = time_step_for_physics - long_name = physics timestep - units = s +[Statein] + standard_name = GFS_statein_type_instance + long_name = instance of derived type GFS_statein_type + units = DDT dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[idate] - standard_name = date_and_time_at_model_initialization_reordered - long_name = initial date with different size and ordering - units = none - dimensions = (4) - type = integer - intent = in - optional = F -[jindx1_o3] - standard_name = lower_ozone_interpolation_index - long_name = interpolation low index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_o3] - standard_name = upper_ozone_interpolation_index - long_name = interpolation high index for ozone - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx1_h] - standard_name = lower_water_vapor_interpolation_index - long_name = interpolation low index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_h] - standard_name = upper_water_vapor_interpolation_index - long_name = interpolation high index for stratospheric water vapor - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx1_aer] - standard_name = lower_aerosol_y_interpolation_index - long_name = interpolation low index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_aer] - standard_name = upper_aerosol_y_interpolation_index - long_name = interpolation high index for prescribed aerosols in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx1_aer] - standard_name = lower_aerosol_x_interpolation_index - long_name = interpolation low index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx2_aer] - standard_name = upper_aerosol_x_interpolation_index - long_name = interpolation high index for prescribed aerosols in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx1_ci] - standard_name = lower_cloud_nuclei_y_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jindx2_ci] - standard_name = upper_cloud_nuclei_y_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx1_ci] - standard_name = lower_cloud_nuclei_x_interpolation_index - long_name = interpolation low index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[iindx2_ci] - standard_name = upper_cloud_nuclei_x_interpolation_index - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = index - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[blksz] - standard_name = ccpp_block_sizes - long_name = for explicit data blocking: block sizes of all blocks - units = count - dimensions = (ccpp_block_count) - type = integer - intent = in - optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_dimension) - type = integer - intent = in - optional = F -[ddy_o3] - standard_name = ozone_interpolation_weight - long_name = interpolation high index for ozone - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddy_h] - standard_name = water_vapor_interpolation_weight - long_name = interpolation high index for stratospheric water vapor - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddy_aer] - standard_name = aerosol_y_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddx_aer] - standard_name = aerosol_x_interpolation_weight - long_name = interpolation high index for prescribed aerosols in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddy_ci] - standard_name = cloud_nuclei_y_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the y direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[ddx_ci] - standard_name = cloud_nuclei_x_interpolation_weight - long_name = interpolation high index for ice and cloud condensation nuclei in the x direction - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[slmsk] - standard_name = sea_land_ice_mask_real - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[vtype] - standard_name = vegetation_type_classification_real - long_name = vegetation type for lsm - units = index - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[weasd] - standard_name = water_equivalent_accumulated_snow_depth - long_name = water equiv of acc snow depth over land and sea ice - units = mm - dimensions = (horizontal_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prsl] - standard_name = air_pressure - long_name = mean layer pressure - units = Pa - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys + type = GFS_statein_type intent = in optional = F [Model] @@ -831,78 +99,30 @@ units = DDT dimensions = () type = GFS_control_type - intent = in - optional = F -[clstp] - standard_name = convective_cloud_switch - long_name = index used by cnvc90 (for convective clouds) - units = none - dimensions = () - type = real - kind = kind_phys - intent = inout - optional = F -[sncovr] - standard_name = surface_snow_area_fraction_over_land - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys intent = inout optional = F -[rann] - standard_name = random_number_array - long_name = random number array (0-1) - units = none - dimensions = (horizontal_dimension,array_dimension_of_random_number) - type = real - kind = kind_phys - intent = inout - optional = F -[in_nm] - standard_name = in_number_concentration - long_name = IN number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ccn_nm] - standard_name = ccn_number_concentration - long_name = CCN number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ozpl] - standard_name = ozone_forcing - long_name = ozone forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) - type = real - kind = kind_phys +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = Fortran DDT containing FV3-GFS miscellaneous data + units = DDT + dimensions = () + type = GFS_tbd_type intent = inout optional = F -[h2opl] - standard_name = h2o_forcing - long_name = water forcing data - units = various - dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) - type = real - kind = kind_phys +[Sfcprop] + standard_name = GFS_sfcprop_type_instance + long_name = Fortran DDT containing FV3-GFS surface fields + units = DDT + dimensions = () + type = GFS_sfcprop_type intent = inout optional = F -[aer_nm] - standard_name = aerosol_number_concentration_from_gocart_aerosol_climatology - long_name = GOCART aerosol climatology number concentration - units = kg-1? - dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) - type = real - kind = kind_phys +[Cldprop] + standard_name = GFS_cldprop_type_instance + long_name = Fortran DDT containing FV3-GFS cloud fields + units = DDT + dimensions = () + type = GFS_cldprop_type intent = inout optional = F [Diag] @@ -913,6 +133,14 @@ type = GFS_diag_type intent = inout optional = F +[first_time_step] + standard_name = flag_for_first_time_step + long_name = flag for first time step for time integration loop (cold/warmstart) + units = flag + dimensions = () + type = logical + intent = in + optional = F [errmsg] standard_name = ccpp_error_message long_name = error message for error handling in CCPP @@ -929,4 +157,4 @@ dimensions = () type = integer intent = out - optional = F \ No newline at end of file + optional = F diff --git a/physics/GFS_rad_time_vary.scm.F90 b/physics/GFS_rad_time_vary.scm.F90 index 738065cfc..13ae5e14b 100644 --- a/physics/GFS_rad_time_vary.scm.F90 +++ b/physics/GFS_rad_time_vary.scm.F90 @@ -21,46 +21,29 @@ end subroutine GFS_rad_time_vary_init !> \section arg_table_GFS_rad_time_vary_run Argument Table !! \htmlinclude GFS_rad_time_vary_run.html !! - subroutine GFS_rad_time_vary_run (cnx, cny, lsswr, lslwr, isubc_sw, & - isubc_lw, sec, nblks, blksz, isc, jsc, imp_physics, & - imp_physics_zhao_carr, kdt, tgrs, qgrs_wv, prsi, imap, jmap, & - icsdsw, icsdlw, t_minus_two_delt, qv_minus_two_delt, & - t_minus_delt, qv_minus_delt, ps_minus_two_delt, ps_minus_delt, & - errmsg, errflg) + subroutine GFS_rad_time_vary_run (Model, Statein, Tbd, errmsg, errflg) use physparam, only: ipsd0, ipsdlim, iaerflg use mersenne_twister, only: random_setseed, random_index, random_stat use machine, only: kind_phys + use GFS_typedefs, only: GFS_statein_type, & + GFS_control_type, & + GFS_grid_type, & + GFS_tbd_type use radcons, only: qmin, con_100 implicit none - integer, intent(in) :: cnx, cny, isubc_sw, isubc_lw, & - nblks, isc, jsc, imp_physics,& - imp_physics_zhao_carr, kdt - logical, intent(in) :: lsswr, lslwr - real(kind=kind_phys), intent(in) :: sec - - integer, dimension(nblks), intent(in) :: blksz - integer, dimension(:), intent(in) :: imap, jmap - - integer, dimension(:), intent(inout) :: icsdsw, icsdlw - - real(kind=kind_phys), dimension(:,:), intent(in) :: tgrs, qgrs_wv - real(kind=kind_phys), dimension(:,:), intent(in) :: prsi - - real(kind=kind_phys), dimension(:,:), intent(inout) :: t_minus_two_delt, & - qv_minus_two_delt, t_minus_delt, qv_minus_delt - real(kind=kind_phys), dimension(:), intent(inout) :: ps_minus_two_delt,& - ps_minus_delt - + type(GFS_control_type), intent(inout) :: Model + type(GFS_statein_type), intent(in) :: Statein + type(GFS_tbd_type), intent(inout) :: Tbd character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg !--- local variables type (random_stat) :: stat - integer :: ix, nb, j, i, ipseed - integer :: numrdm(cnx*cny*2) + integer :: ix, nb, j, i, nblks, ipseed + integer :: numrdm(Model%cnx*Model%cny*2) ! Initialize CCPP error handling variables errmsg = '' @@ -68,34 +51,34 @@ subroutine GFS_rad_time_vary_run (cnx, cny, lsswr, lslwr, isubc_sw, & nb = 1 - if (lsswr .or. lslwr) then + if (Model%lsswr .or. Model%lslwr) then !--- call to GFS_radupdate_run is now in GFS_rrtmg_setup_run !--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid) - if ((isubc_lw==2) .or. (isubc_sw==2)) then - ipseed = mod(nint(con_100*sqrt(sec)), ipsdlim) + 1 + ipsd0 + if ((Model%isubc_lw==2) .or. (Model%isubc_sw==2)) then + ipseed = mod(nint(con_100*sqrt(Model%sec)), ipsdlim) + 1 + ipsd0 call random_setseed (ipseed, stat) call random_index (ipsdlim, numrdm, stat) !--- set the random seeds for each column in a reproducible way - do ix=1,blksz(nb) - j = jmap(ix) - i = imap(ix) + do ix=1,Model%blksz(nb) + j = Tbd%jmap(ix) + i = Tbd%imap(ix) !--- for testing purposes, replace numrdm with '100' - icsdsw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx) - icsdlw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx + cnx*cny) + Tbd%icsdsw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx) + Tbd%icsdlw(ix) = numrdm(i+Model%isc-1 + (j+Model%jsc-2)*Model%cnx + Model%cnx*Model%cny) enddo endif ! isubc_lw and isubc_sw - if (imp_physics == imp_physics_zhao_carr) then - if (kdt == 1) then - t_minus_two_delt(:,:) = tgrs - qv_minus_two_delt(:,:) = max(qmin,qgrs_wv(:,:)) - t_minus_delt(:,:) = tgrs - qv_minus_delt(:,:) = max(qmin,qgrs_wv(:,:)) - ps_minus_two_delt(:) = prsi(:,1) - ps_minus_delt(:) = prsi(:,1) + if (Model%imp_physics == 99) then + if (Model%kdt == 1) then + Tbd%phy_f3d(:,:,1) = Statein%tgrs + Tbd%phy_f3d(:,:,2) = max(qmin,Statein%qgrs(:,:,1)) + Tbd%phy_f3d(:,:,3) = Statein%tgrs + Tbd%phy_f3d(:,:,4) = max(qmin,Statein%qgrs(:,:,1)) + Tbd%phy_f2d(:,1) = Statein%prsi(:,1) + Tbd%phy_f2d(:,2) = Statein%prsi(:,1) endif endif diff --git a/physics/GFS_rad_time_vary.scm.meta b/physics/GFS_rad_time_vary.scm.meta index b5de5ed12..7e87f1f8a 100644 --- a/physics/GFS_rad_time_vary.scm.meta +++ b/physics/GFS_rad_time_vary.scm.meta @@ -6,230 +6,28 @@ [ccpp-arg-table] name = GFS_rad_time_vary_run type = scheme -[cnx] - standard_name = number_of_points_in_x_direction_for_this_cubed_sphere_face - long_name = number of points in x direction for this cubed sphere face - units = count +[Model] + standard_name = GFS_control_type_instance + long_name = Fortran DDT containing FV3-GFS model control parameters + units = DDT dimensions = () - type = integer - intent = in - optional = F -[cny] - standard_name = number_of_points_in_y_direction_for_this_cubed_sphere_face - long_name = number of points in y direction for this cubed sphere face - units = count - dimensions = () - type = integer - intent = in - optional = F -[lsswr] - standard_name = flag_to_calc_sw - long_name = logical flags for sw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[lslwr] - standard_name = flag_to_calc_lw - long_name = logical flags for lw radiation calls - units = flag - dimensions = () - type = logical - intent = in - optional = F -[isubc_sw] - standard_name = flag_for_sw_clouds_without_sub_grid_approximation - long_name = flag for sw clouds without sub-grid approximation - units = flag - dimensions = () - type = integer - intent = in - optional = F -[isubc_lw] - standard_name = flag_for_lw_clouds_without_sub_grid_approximation - long_name = flag for lw clouds without sub-grid approximation - units = flag - dimensions = () - type = integer - intent = in - optional = F -[sec] - standard_name = seconds_elapsed_since_model_initialization - long_name = seconds elapsed since model initialization - units = s - dimensions = () - type = real - kind = kind_phys - intent = in - optional = F -[nblks] - standard_name = ccpp_block_count - long_name = for explicit data blocking: number of blocks - units = count - dimensions = () - type = integer - intent = in - optional = F -[blksz] - standard_name = ccpp_block_sizes - long_name = for explicit data blocking: block sizes of all blocks - units = count - dimensions = (ccpp_block_count) - type = integer - intent = in - optional = F -[isc] - standard_name = starting_x_index_for_this_MPI_rank - long_name = starting index in the x direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[jsc] - standard_name = starting_y_index_for_this_MPI_rank - long_name = starting index in the y direction for this MPI rank - units = count - dimensions = () - type = integer - intent = in - optional = F -[imp_physics] - standard_name = flag_for_microphysics_scheme - long_name = choice of microphysics scheme - units = flag - dimensions = () - type = integer - intent = in + type = GFS_control_type + intent = inout optional = F -[imp_physics_zhao_carr] - standard_name = flag_for_zhao_carr_microphysics_scheme - long_name = choice of Zhao-Carr microphysics scheme - units = flag +[Statein] + standard_name = GFS_statein_type_instance + long_name = Fortran DDT containing FV3-GFS prognostic state data in from dycore + units = DDT dimensions = () - type = integer + type = GFS_statein_type intent = in optional = F -[kdt] - standard_name = index_of_time_step - long_name = current forecast iteration - units = index +[Tbd] + standard_name = GFS_tbd_type_instance + long_name = Fortran DDT containing FV3-GFS data not yet assigned to a defined container + units = DDT dimensions = () - type = integer - intent = in - optional = F -[tgrs] - standard_name = air_temperature - long_name = model layer mean temperature - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[qgrs_wv] - standard_name = water_vapor_specific_humidity - long_name = water vapor specific humidity - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = in - optional = F -[prsi] - standard_name = air_pressure_at_interface - long_name = air pressure at model layer interfaces - units = Pa - dimensions = (horizontal_loop_extent,vertical_dimension_plus_one) - type = real - kind = kind_phys - intent = in - optional = F -[imap] - standard_name = map_of_block_column_number_to_global_i_index - long_name = map of local index ix to global index i for this block - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[jmap] - standard_name = map_of_block_column_number_to_global_j_index - long_name = map of local index ix to global index j for this block - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[icsdsw] - standard_name = seed_random_numbers_sw - long_name = random seeds for sub-column cloud generators sw - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[icsdlw] - standard_name = seed_random_numbers_lw - long_name = random seeds for sub-column cloud generators lw - units = none - dimensions = (horizontal_loop_extent) - type = integer - intent = in - optional = F -[t_minus_two_delt] - standard_name = air_temperature_two_timesteps_back - long_name = air temperature two timesteps back - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qv_minus_two_delt] - standard_name = water_vapor_specific_humidity_two_timesteps_back - long_name = water vapor specific humidity two timesteps back - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[t_minus_delt] - standard_name = air_temperature_at_previous_timestep - long_name = air temperature at previous timestep - units = K - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[qv_minus_delt] - standard_name = water_vapor_specific_humidity_at_previous_timestep - long_name = water vapor specific humidity at previous timestep - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_dimension) - type = real - kind = kind_phys - intent = inout - optional = F -[ps_minus_two_delt] - standard_name = surface_air_pressure_two_timesteps_back - long_name = surface air pressure two timesteps back - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = inout - optional = F -[ps_minus_delt] - standard_name = surface_air_pressure_at_previous_timestep - long_name = surface air pressure at previous timestep - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys + type = GFS_tbd_type intent = inout optional = F [errmsg] From 915f71a0b5741a9d02057d86eea1aff6886152af Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 31 Aug 2020 12:34:08 -0600 Subject: [PATCH 17/17] remove do_sfcperts and pertabl from GFS_rrtmg_pre --- physics/GFS_rrtmg_pre.F90 | 8 ++++---- physics/GFS_rrtmg_pre.meta | 17 ----------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/physics/GFS_rrtmg_pre.F90 b/physics/GFS_rrtmg_pre.F90 index 0759ce596..05442d0be 100644 --- a/physics/GFS_rrtmg_pre.F90 +++ b/physics/GFS_rrtmg_pre.F90 @@ -26,8 +26,8 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & imp_physics_zhao_carr_pdf, imp_physics_mg, imp_physics_wsm6, & imp_physics_fer_hires, lndp_var_list, lsswr, lslwr, & ltaerosol, lgfdlmprad, uni_cld, effr_in, do_mynnedmf, lmfshal, & - lmfdeep2, do_sfcperts, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & - rog, rocp, con_rd, pertalb, xlat, xlon, coslat, sinlat, tsfc, slmsk, & + lmfdeep2, fhswr, fhlwr, solhr, sup, eps, epsm1, fvirt, & + rog, rocp, con_rd, xlat, xlon, coslat, sinlat, tsfc, slmsk, & prsi, prsl, prslk, tgrs, sfc_wts, phy_f3d_mg_cld, phy_f3d_reffr, & phy_f3d_cnvw, phy_f3d_cnvc, f_ice, f_rain, f_rimef, qgrs, aer_nm, & !inputs from here and above coszen, coszdg, phy_f3d_leffr, phy_f3d_ieffr, phy_f3d_seffr, & @@ -91,12 +91,12 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & logical, intent(in) :: lsswr, lslwr, ltaerosol, lgfdlmprad, & uni_cld, effr_in, do_mynnedmf, & - lmfshal, lmfdeep2, do_sfcperts + lmfshal, lmfdeep2 real(kind=kind_phys), intent(in) :: fhswr, fhlwr, solhr, sup real(kind=kind_phys), intent(in) :: eps, epsm1, fvirt, rog, rocp, con_rd - real(kind=kind_phys), dimension(:), intent(in) :: pertalb, xlat, xlon, & + real(kind=kind_phys), dimension(:), intent(in) :: xlat, xlon, & coslat, sinlat, tsfc, & slmsk diff --git a/physics/GFS_rrtmg_pre.meta b/physics/GFS_rrtmg_pre.meta index d602834a4..6cee57101 100644 --- a/physics/GFS_rrtmg_pre.meta +++ b/physics/GFS_rrtmg_pre.meta @@ -399,14 +399,6 @@ type = logical intent = in optional = F -[do_sfcperts] - standard_name = flag_for_stochastic_surface_perturbations - long_name = flag for stochastic surface perturbations option - units = flag - dimensions = () - type = logical - intent = in - optional = F [fhswr] standard_name = frequency_for_shortwave_radiation long_name = frequency for shortwave radiation @@ -497,15 +489,6 @@ kind = kind_phys intent = in optional = F -[pertalb] - standard_name = magnitude_of_surface_albedo_perturbation - long_name = magnitude of surface albedo perturbation - units = frac - dimensions = (5) - type = real - kind = kind_phys - intent = in - optional = F [xlat] standard_name = latitude long_name = latitude