From ee1820185ad75040e4ca25793d03a75f60884ec9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 20 Apr 2020 09:47:09 -0600 Subject: [PATCH 01/46] Updated .submodules. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 746d5c25..d09cab1a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,5 +4,5 @@ branch = dtc/develop [submodule "ccpp-physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics + url = https://github.com/dustinswales/ccpp-physics branch = dtc/develop From 97e60657fa21ea14de902b5cb2f69cf86d9d56d9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 21 Apr 2020 13:17:55 -0600 Subject: [PATCH 02/46] Added RRTMGP to GFS_v16beta ccpp physics suite. --- .../input_GFS_v16beta_RRTMGP.nml | 150 ++++++++++++++++++ ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 88 ++++++++++ scm/etc/Apollo_setup_intel.csh | 49 ++++++ scm/src/default_namelists.py | 6 +- 4 files changed, 291 insertions(+), 2 deletions(-) create mode 100644 ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml create mode 100644 ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml create mode 100755 scm/etc/Apollo_setup_intel.csh diff --git a/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml b/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml new file mode 100644 index 00000000..cd63850c --- /dev/null +++ b/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml @@ -0,0 +1,150 @@ +&gfs_physics_nml + fhzero = 6 + h2o_phys = .true. + ldiag3d = .true. + fhcyc = 24 + use_ufo = .true. + pre_rad = .false. + ncld = 5 + imp_physics = 11 + pdfcld = .false. + fhswr = 3600. + fhlwr = 3600. + ialb = 1 + iems = 1 + iaer = 5111 + icliq_sw = 2 + iovr_lw = 3 + iovr_sw = 3 + ico2 = 2 + isubc_sw = 2 + isubc_lw = 2 + isol = 2 + lwhtr = .true. + swhtr = .true. + cnvgwd = .true. + shal_cnv = .true. + cal_pre = .false. + redrag = .true. + dspheat = .true. + hybedmf = .false. + satmedmf = .true. + isatmedmf = 1 + lheatstrg = .true. + random_clds = .false. + trans_trac = .true. + cnvcld = .true. + imfshalcnv = 2 + imfdeepcnv = 2 + cdmbgwd = 4.0,0.15,1.0,1.0 + prslrd0 = 0. + ivegsrc = 1 + isot = 1 + lsoil = 4 + lsm = 1 + iopt_dveg = 1 + iopt_crs = 1 + iopt_btr = 1 + iopt_run = 1 + iopt_sfc = 1 + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = 1 + iopt_alb = 2 + iopt_snf = 4 + iopt_tbot = 2 + iopt_stc = 1 + debug = .false. + oz_phys = .false. + oz_phys_2015 = .true. + nstf_name = 2,1,0,0,0 + nst_anl = .true. + psautco = 0.0008,0.0005 + prautco = 0.00015,0.00015 + lgfdlmprad = .true. + effr_in = .true. + ldiag_ugwp = .false. + do_ugwp = .false. + do_tofd = .true. + do_sppt = .false. + do_shum = .false. + do_skeb = .false. + do_sfcperts = .false. + do_RRTMGP = .true. + active_gases = 'h2o_co2_o3_n2o_ch4_o2' + ngases = 6 + rrtmgp_root = '../../ccpp/physics/physics/rte-rrtmgp/' + lw_file_gas = 'rrtmgp/data/rrtmgp-data-lw-g256-2018-12-04.nc' + lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc' + sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g224-2018-12-04.nc' + sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-sw.nc' + rrtmgp_cld_optics = 0 + rrtmgp_ngauss_ang = 3 + rrtmgp_nrghice = 3 +/ + +&gfdl_cloud_microphysics_nml + sedi_transport = .true. + do_sedi_heat = .false. + rad_snow = .true. + rad_graupel = .true. + rad_rain = .true. + const_vi = .F. + const_vs = .F. + const_vg = .F. + const_vr = .F. + vi_max = 1. + vs_max = 2. + vg_max = 12. + vr_max = 12. + qi_lim = 1. + prog_ccn = .false. + do_qa = .false. + fast_sat_adj = .false. + tau_l2v = 225. + tau_v2l = 150. + tau_g2v = 900. + rthresh = 10.e-6 ! This is a key parameter for cloud water + dw_land = 0.16 + dw_ocean = 0.10 + ql_gen = 1.0e-3 + ql_mlt = 1.0e-3 + qi0_crt = 8.0E-5 + qs0_crt = 1.0e-3 + tau_i2s = 1000. + c_psaci = 0.05 + c_pgacs = 0.01 + rh_inc = 0.30 + rh_inr = 0.30 + rh_ins = 0.30 + ccn_l = 300. + ccn_o = 100. + c_paut = 0.5 + c_cracw = 0.8 + use_ppm = .false. + use_ccn = .true. + mono_prof = .true. + z_slope_liq = .true. + z_slope_ice = .true. + de_ice = .false. + fix_negative = .true. + icloud_f = 1 + mp_time = 150. + reiflag = 2 +/ + +&cires_ugwp_nml + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_wvspec = 1,25,25,25 + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_version = 0 + launch_level = 27 +/ + diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml new file mode 100644 index 00000000..2d63fbd2 --- /dev/null +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -0,0 +1,88 @@ + + + + + + GFS_time_vary_pre + GFS_rrtmgp_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmgp_pre + GFS_rrtmgp_sw_pre + rrtmgp_sw_gas_optics + rrtmgp_sw_aerosol_optics + rrtmgp_sw_cloud_optics + rrtmgp_sw_cloud_sampling + rrtmgp_sw_rte + GFS_rrtmgp_sw_post + rrtmgp_lw_pre + rrtmgp_lw_gas_optics + rrtmgp_lw_aerosol_optics + rrtmgp_lw_cloud_optics + rrtmgp_lw_cloud_sampling + rrtmgp_lw_rte + GFS_rrtmgp_lw_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + GFS_DCNV_generic_pre + get_phi_fv3 + GFS_suite_interstitial_3 + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + + + diff --git a/scm/etc/Apollo_setup_intel.csh b/scm/etc/Apollo_setup_intel.csh new file mode 100755 index 00000000..0db58fe3 --- /dev/null +++ b/scm/etc/Apollo_setup_intel.csh @@ -0,0 +1,49 @@ +#!/bin/tcsh + +echo "Setting environment variables for SCM-CCPP on NOAA-ESRL-PSD/Apollo with icc/ifort" + +#load the modules in order to compile the GMTB SCM +echo "Loading intel and netcdf modules..." +module purge +module load intel/19.0.1 +module load netcdf +module load cmake +module load python +module load py-netcdf4/1.2.7 +module load py-numpy/1.13.1 +module load py-matplotlib/2.0.2 + +echo "Setting CC/CXX/FC environment variables" +setenv CC icc +setenv CXX icpc +setenv FC ifort +setenv NETCDF /apps/spack/opt/spack/linux-centos6-x86_64/intel-19.0.1/netcdf-4.6.2-h6ldxvajx4mivywh6t4q64n2ysozaj3j/ +setenv BACIO_LIB4 /home/dswales/libs/NCEPlibs/lib/libbacio_4.a +setenv SP_LIBd /home/dswales/libs/NCEPlibs/lib/libsp_v2.0.2_d.a +setenv W3NCO_LIBd /home/dswales/libs/NCEPlibs/lib/libw3nco_d.a + + +#prepend the anaconda installation to the path so that the anaconda version of python (with its many installed modules) is used; check if the path already contains the right path first +echo "Checking if the path to the anaconda python distribution is in PATH" +echo $PATH | grep '/contrib/ananconda/2.3.0/bin$' >&/dev/null +if ( $? != 0 ) then + echo "anaconda path not found in PATH; prepending anaconda path to PATH environment variable" + setenv PATH /contrib/anaconda/2.3.0/bin:$PATH +else + echo "PATH already has the anaconda path in it" +endif + +#install f90nml for the local user + +#check to see if f90nml is installed locally +echo "Checking if f90nml python module is installed" +python -c "import f90nml" + +if ( $? != 0 ) then + echo "Not found; installing f90nml" + cd etc/scripts/f90nml-0.19 + python setup.py install --user + cd ../.. +else + echo "f90nml is installed" +endif diff --git a/scm/src/default_namelists.py b/scm/src/default_namelists.py index 41a0299a..4bbd39bb 100644 --- a/scm/src/default_namelists.py +++ b/scm/src/default_namelists.py @@ -6,5 +6,7 @@ "SCM_GFS_v16beta_no_nsst":"input_GFS_v16beta.nml", "SCM_GFS_v15p2_noahmp":"input_GFS_v15p2_noahmp.nml", "SCM_GFS_v15p2_MYJ":"input_GFS_v15p2_MYJ.nml", - "SCM_GFS_v15p2_FA":"input_GFS_v15p2_FA.nml" - } \ No newline at end of file + "SCM_GFS_v15p2_FA":"input_GFS_v15p2_FA.nml", + "SCM_GFS_v15p2_RRTMGP":"input_GFS_v15p2_RRTMGP.nml", + "SCM_GFS_v16beta_RRTMGP":"input_GFS_v16beta_RRTMGP.nml" + } From b21888cfcb10d184cef5c9ba7c09b859e6ef979c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Apr 2020 12:22:36 -0600 Subject: [PATCH 03/46] Updated GP suite heating rates in ccpp-physics. Cleaned up. --- ccpp/config/ccpp_prebuild_config.py | 2 ++ ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 24 --------------- scm/src/GFS_typedefs.meta | 48 ----------------------------- 4 files changed, 3 insertions(+), 73 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 48add6b7..c7b2a729 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -418,6 +418,7 @@ }, 'GFS_rrtmgp_sw_post' : { 'GFS_rrtmgp_sw_post_run' : [ + 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', 'components_of_surface_downward_shortwave_fluxes', 'sw_fluxes_sfc', 'sw_fluxes_toa', @@ -431,6 +432,7 @@ }, 'GFS_rrtmgp_lw_post' : { 'GFS_rrtmgp_lw_post_run' : [ + 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', 'lw_fluxes_sfc', 'lw_fluxes_toa', ], diff --git a/ccpp/physics b/ccpp/physics index 0aa89846..066c357a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 0aa89846e9bb0c22482fa131aba39b85f9ac4ff2 +Subproject commit 066c357aaf6c1b80811a18012a4b3d4203d63d67 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index db7a9af7..7a72279e 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1850,12 +1850,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius - real (kind=kind_phys), pointer :: hsw0(:,:) => null() !< RRTMGP shortwave heating-rate (clear-sky) - real (kind=kind_phys), pointer :: hswc(:,:) => null() !< RRTMGP shortwave heating-rate (all-sky) - real (kind=kind_phys), pointer :: hswb(:,:,:) => null() !< RRTMGP shortwave heating-rate (all-sky), by band - real (kind=kind_phys), pointer :: hlw0(:,:) => null() !< RRTMGP longwave heating-rate (clear-sky) - real (kind=kind_phys), pointer :: hlwc(:,:) => null() !< RRTMGP longwave heating-rate (all-sky) - real (kind=kind_phys), pointer :: hlwb(:,:,:) => null() !< RRTMGP longwave heating-rate (all-sky), by band real (kind=kind_phys), pointer :: fluxlwUP_allsky(:,:) => null() !< RRTMGP upward longwave all-sky flux profile real (kind=kind_phys), pointer :: fluxlwDOWN_allsky(:,:) => null() !< RRTMGP downward longwave all-sky flux profile real (kind=kind_phys), pointer :: fluxlwUP_clrsky(:,:) => null() !< RRTMGP upward longwave clr-sky flux profile @@ -5765,12 +5759,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%cld_resnow (IM, Model%levs)) allocate (Interstitial%cld_rwp (IM, Model%levs)) allocate (Interstitial%cld_rerain (IM, Model%levs)) - allocate (Interstitial%hsw0 (IM, Model%levs)) - allocate (Interstitial%hswc (IM, Model%levs)) - allocate (Interstitial%hswb (IM, Model%levs, Model%rrtmgp_nGptsSW)) - allocate (Interstitial%hlw0 (IM, Model%levs)) - allocate (Interstitial%hlwc (IM, Model%levs)) - allocate (Interstitial%hlwb (IM, Model%levs, Model%rrtmgp_nGptsLW)) allocate (Interstitial%icseed_lw (IM)) allocate (Interstitial%icseed_sw (IM)) allocate (Interstitial%flxprf_lw (IM, Model%levs+1)) @@ -6133,12 +6121,6 @@ subroutine interstitial_rad_reset (Interstitial, Model) Interstitial%cld_resnow = clear_val Interstitial%cld_rwp = clear_val Interstitial%cld_rerain = clear_val - Interstitial%hsw0 = clear_val - Interstitial%hswc = clear_val - Interstitial%hswb = clear_val - Interstitial%hlw0 = clear_val - Interstitial%hlwc = clear_val - Interstitial%hlwb = clear_val Interstitial%icseed_lw = clear_val Interstitial%icseed_sw = clear_val Interstitial%sfc_emiss_byband = clear_val @@ -6727,12 +6709,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%cld_resnow ) = ', sum(Interstitial%cld_resnow ) write (0,*) 'sum(Interstitial%cld_rwp ) = ', sum(Interstitial%cld_rwp ) write (0,*) 'sum(Interstitial%cld_rerain ) = ', sum(Interstitial%cld_rerain ) - write (0,*) 'sum(Interstitial%hsw0 ) = ', sum(Interstitial%hsw0 ) - write (0,*) 'sum(Interstitial%hswc ) = ', sum(Interstitial%hswc ) - write (0,*) 'sum(Interstitial%hswb ) = ', sum(Interstitial%hswb ) - write (0,*) 'sum(Interstitial%hlw0 ) = ', sum(Interstitial%hlw0 ) - write (0,*) 'sum(Interstitial%hlwc ) = ', sum(Interstitial%hlwc ) - write (0,*) 'sum(Interstitial%hlwb ) = ', sum(Interstitial%hlwb ) write (0,*) 'sum(Interstitial%icseed_lw ) = ', sum(Interstitial%icseed_lw ) write (0,*) 'sum(Interstitial%icseed_sw ) = ', sum(Interstitial%icseed_sw ) write (0,*) 'sum(Interstitial%fluxlwUP_allsky ) = ', sum(Interstitial%fluxlwUP_allsky ) diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index c89cfa22..facb9b2e 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -8468,54 +8468,6 @@ type = real kind = kind_phys optional = F -[hsw0] - standard_name = RRTMGP_sw_heating_rate_clear_sky - long_name = RRTMGP shortwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = T -[hswc] - standard_name = RRTMGP_sw_heating_rate_all_sky - long_name = RRTMGP shortwave all sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = F -[hswb] - standard_name = RRTMGP_sw_heating_rate_spectral - long_name = RRTMGP shortwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) - type = real - kind = kind_phys - optional = T -[hlw0] - standard_name = RRTMGP_lw_heating_rate_clear_sky - long_name = RRTMGP longwave clear sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = T -[hlwc] - standard_name = RRTMGP_lw_heating_rate_all_sky - long_name = RRTMGP longwave all sky heating rate - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = F -[hlwb] - standard_name = RRTMGP_lw_heating_rate_spectral - long_name = RRTMGP longwave total sky heating rate (spectral) - units = K s-1 - dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_spectral_points_rrtmgp) - type = real - kind = kind_phys - optional = T [ipsdsw0] standard_name = initial_permutation_seed_sw long_name = initial seed for McICA SW From 36e2aa115889bec6c051bd7a3694b45e67c0d9fc Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Apr 2020 15:04:40 -0600 Subject: [PATCH 04/46] Updated ccpp-physics submodule. --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 066c357a..fd8d3b4f 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 066c357aaf6c1b80811a18012a4b3d4203d63d67 +Subproject commit fd8d3b4f1242e43584981d27b5c832eac7c23346 From 7d4e4fef11bd8246752b23c2a1f4cf8f33ef9900 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 11 May 2020 10:41:26 -0600 Subject: [PATCH 05/46] Added in new overlap assumtion used in GFS_FV3_v16beta physics suite. --- ccpp/config/ccpp_prebuild_config.py | 2 +- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 4 ++++ scm/src/GFS_typedefs.meta | 8 ++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index c7b2a729..87fb3acd 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -196,7 +196,6 @@ 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_heating_rates.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', - 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90', # derived data type definitions 'scm/src/GFS_typedefs.F90', 'scm/src/gmtb_scm_kinds.F90', @@ -290,6 +289,7 @@ 'ccpp/physics/physics/mp_fer_hires.F90' : ['physics'], 'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' : ['physics'], # RRTMGP + 'ccpp/physics/physics/mo_cloud_sampling.F90' : ['physics'], 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_aux.F90' : ['physics'], diff --git a/ccpp/physics b/ccpp/physics index fd8d3b4f..156594cd 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit fd8d3b4f1242e43584981d27b5c832eac7c23346 +Subproject commit 156594cdd64ef18daf510f6745f676c25f9d37f4 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 7a72279e..a50d2c46 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1838,6 +1838,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< real (kind=kind_phys), pointer :: relhum(:,:) => null() !< real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: overlap_param(:,:) => null() !< real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. @@ -5740,6 +5741,7 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%p_lay (IM, Model%levs)) allocate (Interstitial%t_lev (IM, Model%levs+1)) allocate (Interstitial%t_lay (IM, Model%levs)) + allocate (Interstitial%overlap_param (IM, Model%levs)) allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) @@ -6102,6 +6104,7 @@ subroutine interstitial_rad_reset (Interstitial, Model) Interstitial%p_lay = clear_val Interstitial%t_lev = clear_val Interstitial%t_lay = clear_val + Interstitial%overlap_param = clear_val Interstitial%fluxlwUP_allsky = clear_val Interstitial%fluxlwDOWN_allsky = clear_val Interstitial%fluxlwUP_clrsky = clear_val @@ -6725,6 +6728,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%t_lay ) = ', sum(Interstitial%t_lay ) write (0,*) 'sum(Interstitial%t_lev ) = ', sum(Interstitial%t_lev ) write (0,*) 'sum(Interstitial%tv_lay ) = ', sum(Interstitial%tv_lay ) + write (0,*) 'sum(Interstitial%overlap_param ) = ', sum(Interstitial%overlap_param) ! Print arrays that are conditional on physics choices if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index facb9b2e..d8286596 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -8468,6 +8468,14 @@ type = real kind = kind_phys optional = F +[overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = F [ipsdsw0] standard_name = initial_permutation_seed_sw long_name = initial seed for McICA SW From 23cfdd6e7412a1522abc3bc6813f07da308d1d46 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 11 May 2020 14:13:29 -0600 Subject: [PATCH 06/46] Updated submodule. --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 156594cd..0c438491 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 156594cdd64ef18daf510f6745f676c25f9d37f4 +Subproject commit 0c438491004bdc476769d6e330f9fa4e04c12f2d From d44574e58dfb6f46b25d33b09df67e2e9e172fac Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 14 May 2020 13:41:11 -0600 Subject: [PATCH 07/46] Major reorganization of GFDLMP-2-RRTMGP interface. --- ccpp/config/ccpp_prebuild_config.py | 3 +++ ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 12 ++++++++++++ scm/src/GFS_typedefs.meta | 24 ++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 87fb3acd..d9826345 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -305,10 +305,13 @@ 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_pre.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' : ['physics'], + # Cloud diagnostics + 'ccpp/physics/physics/GFS_cloud_diagnostics.F90' : ['physics'], } # Default build dir, relative to current working directory, diff --git a/ccpp/physics b/ccpp/physics index 0c438491..4c8a5815 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 0c438491004bdc476769d6e330f9fa4e04c12f2d +Subproject commit 4c8a5815d235284d4e6d5a7f356e20a9fd0ecac4 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index a50d2c46..5b8f0d55 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1838,6 +1838,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< real (kind=kind_phys), pointer :: relhum(:,:) => null() !< real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: q_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !< real (kind=kind_phys), pointer :: overlap_param(:,:) => null() !< real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. @@ -5737,6 +5740,9 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) allocate (Interstitial%tv_lay (IM, Model%levs)) allocate (Interstitial%relhum (IM, Model%levs)) + allocate (Interstitial%qs_lay (IM, Model%levs)) + allocate (Interstitial%q_lay (IM, Model%levs)) + allocate (Interstitial%deltaZ (IM, Model%levs)) allocate (Interstitial%p_lev (IM, Model%levs+1)) allocate (Interstitial%p_lay (IM, Model%levs)) allocate (Interstitial%t_lev (IM, Model%levs+1)) @@ -6100,6 +6106,9 @@ subroutine interstitial_rad_reset (Interstitial, Model) Interstitial%tracer = clear_val Interstitial%tv_lay = clear_val Interstitial%relhum = clear_val + Interstitial%qs_lay = clear_val + Interstitial%q_lay = clear_val + Interstitial%deltaZ = clear_val Interstitial%p_lev = clear_val Interstitial%p_lay = clear_val Interstitial%t_lev = clear_val @@ -6723,6 +6732,9 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%fluxswUP_clrsky ) = ', sum(Interstitial%fluxswUP_clrsky ) write (0,*) 'sum(Interstitial%fluxswDOWN_clrsky) = ', sum(Interstitial%fluxswDOWN_clrsky) write (0,*) 'sum(Interstitial%relhum ) = ', sum(Interstitial%relhum ) + write (0,*) 'sum(Interstitial%q_lay ) = ', sum(Interstitial%q_lay ) + write (0,*) 'sum(Interstitial%qs_lay ) = ', sum(Interstitial%qs_lay ) + write (0,*) 'sum(Interstitial%deltaZ ) = ', sum(Interstitial%deltaZ ) write (0,*) 'sum(Interstitial%p_lay ) = ', sum(Interstitial%p_lay ) write (0,*) 'sum(Interstitial%p_lev ) = ', sum(Interstitial%p_lev ) write (0,*) 'sum(Interstitial%t_lay ) = ', sum(Interstitial%t_lay ) diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index d8286596..080cabb9 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -8460,6 +8460,30 @@ type = real kind = kind_phys optional = F +[qs_lay] + standard_name = saturation_mixing_ratio + long_name = saturation mixing ratio + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = F +[q_lay] + standard_name = water_vapor_mixing_ratio + long_name = water mixing ratio + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = F +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers From 78802499ab703013a6b8d81c6016706b6e1ae1d8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 14 May 2020 13:42:38 -0600 Subject: [PATCH 08/46] Omission from previous commit. --- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 2 ++ ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 24f5565e..4aae09d5 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -13,6 +13,8 @@ GFS_suite_interstitial_rad_reset GFS_rrtmgp_pre + GFS_rrtmgp_gfdlmp_pre + GFS_cloud_diagnostics GFS_rrtmgp_sw_pre rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index 2d63fbd2..e3d7994c 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -13,6 +13,8 @@ GFS_suite_interstitial_rad_reset GFS_rrtmgp_pre + GFS_rrtmgp_gfdlmp_pre + GFS_cloud_diagnostics GFS_rrtmgp_sw_pre rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics From e08b72654e65e3f3da8d973b7a1e0c9f2731ba4d Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 20 May 2020 13:51:49 -0600 Subject: [PATCH 09/46] Cleaned up optional arguments for rte routines. --- ccpp/config/ccpp_prebuild_config.py | 19 +------------------ ccpp/physics | 2 +- scm/src/GFS_typedefs.meta | 18 +----------------- 3 files changed, 3 insertions(+), 36 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index d9826345..2ffedaef 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -415,34 +415,17 @@ 'rrtmgp_sw_rte' : { 'rrtmgp_sw_rte_run' : [ 'components_of_surface_downward_shortwave_fluxes', - 'sw_fluxes_sfc', - 'sw_fluxes_toa', ], - }, + }, 'GFS_rrtmgp_sw_post' : { 'GFS_rrtmgp_sw_post_run' : [ 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', 'components_of_surface_downward_shortwave_fluxes', - 'sw_fluxes_sfc', - 'sw_fluxes_toa', ], }, - 'rrtmgp_lw_rte' : { - 'rrtmgp_lw_rte_run' : [ - 'lw_fluxes_sfc', - 'lw_fluxes_toa', - ], - }, 'GFS_rrtmgp_lw_post' : { 'GFS_rrtmgp_lw_post_run' : [ 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', - 'lw_fluxes_sfc', - 'lw_fluxes_toa', - ], - }, - 'GFS_rrtmgp_post' : { - 'GFS_rrtmgp_post_run' : [ - 'components_of_surface_downward_shortwave_fluxes', ], }, #'subroutine_name_1' : 'all', diff --git a/ccpp/physics b/ccpp/physics index 4c8a5815..3e74dc23 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 4c8a5815d235284d4e6d5a7f356e20a9fd0ecac4 +Subproject commit 3e74dc233912b980c040464918abab7a321eda23 diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 080cabb9..359779d9 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -4276,7 +4276,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_dimension,vertical_dimension,number_of_aerosol_res_MG) type = real kind = kind_phys [imap] @@ -8460,22 +8460,6 @@ type = real kind = kind_phys optional = F -[qs_lay] - standard_name = saturation_mixing_ratio - long_name = saturation mixing ratio - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = F -[q_lay] - standard_name = water_vapor_mixing_ratio - long_name = water mixing ratio - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys - optional = F [deltaZ] standard_name = layer_thickness long_name = layer_thickness From 358c844e72a8c3656a1b422ac7f3feb11e78575c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 20 May 2020 13:55:36 -0600 Subject: [PATCH 10/46] Tidied up. Removed options not exercised. Replaced with errors. --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 3e74dc23..2a31351d 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 3e74dc233912b980c040464918abab7a321eda23 +Subproject commit 2a31351d96497e93329fa064aa1664537ab5788d From 6fdb2e0adbef021f608558c84e8d4ed783ef7755 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Wed, 20 May 2020 15:15:39 -0600 Subject: [PATCH 11/46] Replaced integer control over cloud-optics scheme with logics. --- ccpp/physics | 2 +- .../input_GFS_v15p2_RRTMGP.nml | 2 +- .../input_GFS_v16beta_RRTMGP.nml | 2 +- scm/src/GFS_typedefs.F90 | 26 ++++++++++--------- scm/src/GFS_typedefs.meta | 22 ++++++++++++---- 5 files changed, 34 insertions(+), 20 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index 2a31351d..22641512 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 2a31351d96497e93329fa064aa1664537ab5788d +Subproject commit 22641512b02fffe57d2ac644c46796f4fb5acd83 diff --git a/ccpp/physics_namelists/input_GFS_v15p2_RRTMGP.nml b/ccpp/physics_namelists/input_GFS_v15p2_RRTMGP.nml index 70882910..7c52a392 100644 --- a/ccpp/physics_namelists/input_GFS_v15p2_RRTMGP.nml +++ b/ccpp/physics_namelists/input_GFS_v15p2_RRTMGP.nml @@ -55,7 +55,7 @@ lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc' sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g224-2018-12-04.nc' sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-sw.nc' - rrtmgp_cld_optics = 0 + doG_cldoptics = .true. rrtmgp_ngauss_ang = 3 rrtmgp_nrghice = 3 / diff --git a/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml b/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml index cd63850c..c5f7c5de 100644 --- a/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml +++ b/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP.nml @@ -78,7 +78,7 @@ lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc' sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g224-2018-12-04.nc' sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-sw.nc' - rrtmgp_cld_optics = 0 + doG_cldoptics = .true. rrtmgp_ngauss_ang = 3 rrtmgp_nrghice = 3 / diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 5b8f0d55..e5ac0b0d 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -629,10 +629,9 @@ module GFS_typedefs character(len=128) :: sw_file_clouds !< RRTMGP file containing coefficients used to compute clouds optical properties integer :: rrtmgp_nBandsSW !< Number of RRTMGP SW bands. integer :: rrtmgp_nGptsSW !< Number of RRTMGP SW spectral points. - integer :: rrtmgp_cld_optics !< Flag to control which RRTMGP routine to compute cloud-optics. - !< = 0 ; Use RRTMG implementation - !< = 1 ; Use RRTMGP (pade) - !< = 2 ; USE RRTMGP (LUT) + logical :: doG_cldoptics !< Use legacy RRTMG cloud-optics? + logical :: doGP_cldoptics_PADE !< Use RRTMGP cloud-optics: PADE approximation? + logical :: doGP_cldoptics_LUT !< Use RRTMGP cloud-optics: LUTs? integer :: rrtmgp_nrghice !< Number of ice-roughness categories integer :: rrtmgp_nGauss_ang !< Number of angles used in Gaussian quadrature logical :: do_GPsw_Glw ! If set to true use rrtmgp for SW calculation, rrtmg for LW. @@ -2733,10 +2732,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & character(len=128) :: sw_file_clouds = '' !< RRTMGP file containing coefficients used to compute clouds optical properties integer :: rrtmgp_nBandsSW = 14 !< Number of RRTMGP SW bands. integer :: rrtmgp_nGptsSW = 224 !< Number of RRTMGP SW spectral points. - integer :: rrtmgp_cld_optics = 0 !< Flag to control which RRTMGP routine to compute cloud-optics. - !< = 0 ; Use RRTMGP implementation - !< = 1 ; Use RRTMGP (pade) - !< = 2 ; USE RRTMGP (LUT) + logical :: doG_cldoptics = .false. !< Use legacy RRTMG cloud-optics? + logical :: doGP_cldoptics_PADE = .false. !< Use RRTMGP cloud-optics: PADE approximation? + logical :: doGP_cldoptics_LUT = .false. !< Use RRTMGP cloud-optics: LUTs? integer :: rrtmgp_nrghice = 0 !< Number of ice-roughness categories integer :: rrtmgp_nGauss_ang=1 !< Number of angles used in Gaussian quadrature logical :: do_GPsw_Glw = .false. @@ -3072,8 +3070,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & do_RRTMGP, active_gases, nGases, rrtmgp_root, & lw_file_gas, lw_file_clouds, rrtmgp_nBandsLW, rrtmgp_nGptsLW,& sw_file_gas, sw_file_clouds, rrtmgp_nBandsSW, rrtmgp_nGptsSW,& - rrtmgp_cld_optics, rrtmgp_nrghice, rrtmgp_nGauss_ang, & - do_GPsw_Glw, & + doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & + rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, & ! IN CCN forcing iccn, & !--- microphysical parameterizations @@ -3307,7 +3305,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%sw_file_clouds = sw_file_clouds Model%rrtmgp_nBandsSW = rrtmgp_nBandsSW Model%rrtmgp_nGptsSW = rrtmgp_nGptsSW - Model%rrtmgp_cld_optics = RRTMGP_CLD_OPTICS + Model%doG_cldoptics = doG_cldoptics + Model%doGP_cldoptics_PADE = doGP_cldoptics_PADE + Model%doGP_cldoptics_LUT = doGP_cldoptics_LUT ! RRTMGP incompatible with levr /= levs if (Model%do_RRTMGP .and. Model%levr /= Model%levs) then write(0,*) "Logic error, RRTMGP only works with levr = levs" @@ -4307,7 +4307,9 @@ subroutine control_print(Model) print *, ' sw_file_clouds : ', Model%sw_file_clouds print *, ' rrtmgp_nBandsSW : ', Model%rrtmgp_nBandsSW print *, ' rrtmgp_nGptsSW : ', Model%rrtmgp_nGptsSW - print *, ' rrtmgp_cld_optics : ', Model%rrtmgp_cld_optics + print *, ' doG_cldoptics : ', Model%doG_cldoptics + print *, ' doGP_cldoptics_PADE: ', Model%doGP_cldoptics_PADE + print *, ' doGP_cldoptics_LUT : ', Model%doGP_cldoptics_LUT endif print *, ' ' print *, 'microphysical switch' diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 359779d9..177df062 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -2347,12 +2347,24 @@ units = count dimensions = () type = integer -[rrtmgp_cld_optics] - standard_name = rrtmgp_cloud_optics_flag - long_name = Flag to control which RRTMGP cloud-optics scheme (Model%rrtmgp_cld_optics) +[doG_cldoptics] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMG + long_name = logical flag to control cloud optics scheme. units = flag - dimensions = () - type = integer + dimensions = () + type = logical +[doGP_cldoptics_PADE] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical +[doGP_cldoptics_LUT] + standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT + long_name = logical flag to control cloud optics scheme. + units = flag + dimensions = () + type = logical [rrtmgp_nrghice] standard_name = number_of_rrtmgp_ice_roughness long_name = number of ice-roughness categories in RRTMGP calculation (Model%rrtmgp_nrghice) From 6df7ffa8755128400b8a387219398cea3d7306f1 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 21 May 2020 16:22:55 -0600 Subject: [PATCH 12/46] Seperated cloud/precipitation optics. --- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 358 ++++++++++++++++++++------------------ scm/src/GFS_typedefs.meta | 106 +++++------ 3 files changed, 228 insertions(+), 238 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index 22641512..1879026d 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 22641512b02fffe57d2ac644c46796f4fb5acd83 +Subproject commit 1879026da7fa3aa7cb84f2e8d90ddac3a1a5fa54 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index e5ac0b0d..892a8906 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1829,65 +1829,71 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS ! RRTMGP - integer :: ipsdlw0 !< - integer :: ipsdsw0 !< - real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< - real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< - real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: relhum(:,:) => null() !< - real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: q_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !< - real (kind=kind_phys), pointer :: overlap_param(:,:) => null() !< - real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< - real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. - real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. - real (kind=kind_phys), pointer :: cld_frac(:,:) => null() !< Total cloud fraction - real (kind=kind_phys), pointer :: cld_lwp(:,:) => null() !< Cloud liquid water path - real (kind=kind_phys), pointer :: cld_reliq(:,:) => null() !< Cloud liquid effective radius - real (kind=kind_phys), pointer :: cld_iwp(:,:) => null() !< Cloud ice water path - real (kind=kind_phys), pointer :: cld_reice(:,:) => null() !< Cloud ice effecive radius - real (kind=kind_phys), pointer :: cld_swp(:,:) => null() !< Cloud snow water path - real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius - real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path - real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius - real (kind=kind_phys), pointer :: fluxlwUP_allsky(:,:) => null() !< RRTMGP upward longwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxlwDOWN_allsky(:,:) => null() !< RRTMGP downward longwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxlwUP_clrsky(:,:) => null() !< RRTMGP upward longwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxlwDOWN_clrsky(:,:) => null() !< RRTMGP downward longwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxswUP_allsky(:,:) => null() !< RRTMGP upward shortwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< - real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_nir_dif(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_uvvis_dir(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_uvvis_dif(:,:) => null() !< - real (kind=kind_phys), pointer :: toa_src_lw(:,:) => null() !< - real (kind=kind_phys), pointer :: toa_src_sw(:,:) => null() !< - character(len=128), pointer :: active_gases_array(:) => null() !< Character array for each trace gas name - integer, pointer :: icseed_lw(:) => null() !< RRTMGP seed for RNG for longwave radiation - integer, pointer :: icseed_sw(:) => null() !< RRTMGP seed for RNG for shortwave radiation - type(proflw_type), pointer :: flxprf_lw(:,:) => null() !< DDT containing RRTMGP longwave fluxes - type(profsw_type), pointer :: flxprf_sw(:,:) => null() !< DDT containing RRTMGP shortwave fluxes - type(ty_gas_optics_rrtmgp) :: lw_gas_props !< RRTMGP DDT - type(ty_gas_optics_rrtmgp) :: sw_gas_props !< RRTMGP DDT - type(ty_cloud_optics) :: lw_cloud_props !< RRTMGP DDT - type(ty_cloud_optics) :: sw_cloud_props !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_clouds !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_clrsky !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_aerosol !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_clouds !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_clrsky !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT - type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT - type(ty_source_func_lw) :: sources !< RRTMGP DDT + integer :: ipsdlw0 !< + integer :: ipsdsw0 !< + real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< + real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< + real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: relhum(:,:) => null() !< + real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: q_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !< + real (kind=kind_phys), pointer :: cloud_overlap_param(:,:) => null() !< Cloud overlap parameter + real (kind=kind_phys), pointer :: precip_overlap_param(:,:) => null() !< Precipitation overlap parameter + real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< + real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. + real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. + real (kind=kind_phys), pointer :: cld_frac(:,:) => null() !< Total cloud fraction + real (kind=kind_phys), pointer :: cld_lwp(:,:) => null() !< Cloud liquid water path + real (kind=kind_phys), pointer :: cld_reliq(:,:) => null() !< Cloud liquid effective radius + real (kind=kind_phys), pointer :: cld_iwp(:,:) => null() !< Cloud ice water path + real (kind=kind_phys), pointer :: cld_reice(:,:) => null() !< Cloud ice effecive radius + real (kind=kind_phys), pointer :: cld_swp(:,:) => null() !< Cloud snow water path + real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius + real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path + real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius + real (kind=kind_phys), pointer :: precip_frac(:,:) => null() !< Precipitation fraction + real (kind=kind_phys), pointer :: fluxlwUP_allsky(:,:) => null() !< RRTMGP upward longwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxlwDOWN_allsky(:,:) => null() !< RRTMGP downward longwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxlwUP_clrsky(:,:) => null() !< RRTMGP upward longwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxlwDOWN_clrsky(:,:) => null() !< RRTMGP downward longwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxswUP_allsky(:,:) => null() !< RRTMGP upward shortwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile + real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< + real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_nir_dif(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_uvvis_dir(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_uvvis_dif(:,:) => null() !< + real (kind=kind_phys), pointer :: toa_src_lw(:,:) => null() !< + real (kind=kind_phys), pointer :: toa_src_sw(:,:) => null() !< + character(len=128), pointer :: active_gases_array(:) => null() !< Character array for each trace gas name + integer, pointer :: icseed_lw(:) => null() !< RRTMGP seed for RNG for longwave radiation + integer, pointer :: icseed_sw(:) => null() !< RRTMGP seed for RNG for shortwave radiation + type(proflw_type), pointer :: flxprf_lw(:,:) => null() !< DDT containing RRTMGP longwave fluxes + type(profsw_type), pointer :: flxprf_sw(:,:) => null() !< DDT containing RRTMGP shortwave fluxes + type(ty_gas_optics_rrtmgp) :: lw_gas_props !< RRTMGP DDT + type(ty_gas_optics_rrtmgp) :: sw_gas_props !< RRTMGP DDT + type(ty_cloud_optics) :: lw_cloud_props !< RRTMGP DDT + type(ty_cloud_optics) :: sw_cloud_props !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_clouds !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_precipByBand !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_precip !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_clrsky !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_aerosol !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_clouds !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_precipByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_precip !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_clrsky !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT + type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT + type(ty_source_func_lw) :: sources !< RRTMGP DDT !-- HWRF physics: dry mixing ratios real (kind=kind_phys), pointer :: qv_r(:,:) => null() !< @@ -5739,49 +5745,51 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%zt1d (IM)) ! RRTMGP if (Model%do_RRTMGP) then - allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) - allocate (Interstitial%tv_lay (IM, Model%levs)) - allocate (Interstitial%relhum (IM, Model%levs)) - allocate (Interstitial%qs_lay (IM, Model%levs)) - allocate (Interstitial%q_lay (IM, Model%levs)) - allocate (Interstitial%deltaZ (IM, Model%levs)) - allocate (Interstitial%p_lev (IM, Model%levs+1)) - allocate (Interstitial%p_lay (IM, Model%levs)) - allocate (Interstitial%t_lev (IM, Model%levs+1)) - allocate (Interstitial%t_lay (IM, Model%levs)) - allocate (Interstitial%overlap_param (IM, Model%levs)) - allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) - allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) - allocate (Interstitial%cld_frac (IM, Model%levs)) - allocate (Interstitial%cld_lwp (IM, Model%levs)) - allocate (Interstitial%cld_reliq (IM, Model%levs)) - allocate (Interstitial%cld_iwp (IM, Model%levs)) - allocate (Interstitial%cld_reice (IM, Model%levs)) - allocate (Interstitial%cld_swp (IM, Model%levs)) - allocate (Interstitial%cld_resnow (IM, Model%levs)) - allocate (Interstitial%cld_rwp (IM, Model%levs)) - allocate (Interstitial%cld_rerain (IM, Model%levs)) - allocate (Interstitial%icseed_lw (IM)) - allocate (Interstitial%icseed_sw (IM)) - allocate (Interstitial%flxprf_lw (IM, Model%levs+1)) - allocate (Interstitial%flxprf_sw (IM, Model%levs+1)) - allocate (Interstitial%sfc_emiss_byband (Model%rrtmgp_nBandsLW,IM)) - allocate (Interstitial%sec_diff_byband (Model%rrtmgp_nBandsLW,IM)) - allocate (Interstitial%sfc_alb_nir_dir (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_nir_dif (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_uvvis_dir (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_uvvis_dif (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%toa_src_sw (IM,Model%rrtmgp_nGptsSW)) - allocate (Interstitial%toa_src_lw (IM,Model%rrtmgp_nGptsLW)) - allocate (Interstitial%active_gases_array(Model%nGases)) + allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) + allocate (Interstitial%tv_lay (IM, Model%levs)) + allocate (Interstitial%relhum (IM, Model%levs)) + allocate (Interstitial%qs_lay (IM, Model%levs)) + allocate (Interstitial%q_lay (IM, Model%levs)) + allocate (Interstitial%deltaZ (IM, Model%levs)) + allocate (Interstitial%p_lev (IM, Model%levs+1)) + allocate (Interstitial%p_lay (IM, Model%levs)) + allocate (Interstitial%t_lev (IM, Model%levs+1)) + allocate (Interstitial%t_lay (IM, Model%levs)) + allocate (Interstitial%cloud_overlap_param (IM, Model%levs)) + allocate (Interstitial%precip_overlap_param (IM, Model%levs)) + allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) + allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) + allocate (Interstitial%cld_frac (IM, Model%levs)) + allocate (Interstitial%cld_lwp (IM, Model%levs)) + allocate (Interstitial%cld_reliq (IM, Model%levs)) + allocate (Interstitial%cld_iwp (IM, Model%levs)) + allocate (Interstitial%cld_reice (IM, Model%levs)) + allocate (Interstitial%cld_swp (IM, Model%levs)) + allocate (Interstitial%cld_resnow (IM, Model%levs)) + allocate (Interstitial%cld_rwp (IM, Model%levs)) + allocate (Interstitial%cld_rerain (IM, Model%levs)) + allocate (Interstitial%precip_frac (IM, Model%levs)) + allocate (Interstitial%icseed_lw (IM)) + allocate (Interstitial%icseed_sw (IM)) + allocate (Interstitial%flxprf_lw (IM, Model%levs+1)) + allocate (Interstitial%flxprf_sw (IM, Model%levs+1)) + allocate (Interstitial%sfc_emiss_byband (Model%rrtmgp_nBandsLW,IM)) + allocate (Interstitial%sec_diff_byband (Model%rrtmgp_nBandsLW,IM)) + allocate (Interstitial%sfc_alb_nir_dir (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_nir_dif (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_uvvis_dir (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_uvvis_dif (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%toa_src_sw (IM,Model%rrtmgp_nGptsSW)) + allocate (Interstitial%toa_src_lw (IM,Model%rrtmgp_nGptsLW)) + allocate (Interstitial%active_gases_array (Model%nGases)) end if ! CIRES UGWP v0 allocate (Interstitial%gw_dudt (IM,Model%levs)) @@ -6105,46 +6113,48 @@ subroutine interstitial_rad_reset (Interstitial, Model) end if if (Model%do_RRTMGP) then - Interstitial%tracer = clear_val - Interstitial%tv_lay = clear_val - Interstitial%relhum = clear_val - Interstitial%qs_lay = clear_val - Interstitial%q_lay = clear_val - Interstitial%deltaZ = clear_val - Interstitial%p_lev = clear_val - Interstitial%p_lay = clear_val - Interstitial%t_lev = clear_val - Interstitial%t_lay = clear_val - Interstitial%overlap_param = clear_val - Interstitial%fluxlwUP_allsky = clear_val - Interstitial%fluxlwDOWN_allsky = clear_val - Interstitial%fluxlwUP_clrsky = clear_val - Interstitial%fluxlwDOWN_clrsky = clear_val - Interstitial%fluxswUP_allsky = clear_val - Interstitial%fluxswDOWN_allsky = clear_val - Interstitial%fluxswUP_clrsky = clear_val - Interstitial%fluxswDOWN_clrsky = clear_val - Interstitial%aerosolslw = clear_val - Interstitial%aerosolssw = clear_val - Interstitial%cld_frac = clear_val - Interstitial%cld_lwp = clear_val - Interstitial%cld_reliq = clear_val - Interstitial%cld_iwp = clear_val - Interstitial%cld_reice = clear_val - Interstitial%cld_swp = clear_val - Interstitial%cld_resnow = clear_val - Interstitial%cld_rwp = clear_val - Interstitial%cld_rerain = clear_val - Interstitial%icseed_lw = clear_val - Interstitial%icseed_sw = clear_val - Interstitial%sfc_emiss_byband = clear_val - Interstitial%sec_diff_byband = clear_val - Interstitial%sfc_alb_nir_dir = clear_val - Interstitial%sfc_alb_nir_dif = clear_val - Interstitial%sfc_alb_uvvis_dir = clear_val - Interstitial%sfc_alb_uvvis_dif = clear_val - Interstitial%toa_src_sw = clear_val - Interstitial%toa_src_lw = clear_val + Interstitial%tracer = clear_val + Interstitial%tv_lay = clear_val + Interstitial%relhum = clear_val + Interstitial%qs_lay = clear_val + Interstitial%q_lay = clear_val + Interstitial%deltaZ = clear_val + Interstitial%p_lev = clear_val + Interstitial%p_lay = clear_val + Interstitial%t_lev = clear_val + Interstitial%t_lay = clear_val + Interstitial%cloud_overlap_param = clear_val + Interstitial%precip_overlap_param = clear_val + Interstitial%fluxlwUP_allsky = clear_val + Interstitial%fluxlwDOWN_allsky = clear_val + Interstitial%fluxlwUP_clrsky = clear_val + Interstitial%fluxlwDOWN_clrsky = clear_val + Interstitial%fluxswUP_allsky = clear_val + Interstitial%fluxswDOWN_allsky = clear_val + Interstitial%fluxswUP_clrsky = clear_val + Interstitial%fluxswDOWN_clrsky = clear_val + Interstitial%aerosolslw = clear_val + Interstitial%aerosolssw = clear_val + Interstitial%cld_frac = clear_val + Interstitial%cld_lwp = clear_val + Interstitial%cld_reliq = clear_val + Interstitial%cld_iwp = clear_val + Interstitial%cld_reice = clear_val + Interstitial%cld_swp = clear_val + Interstitial%cld_resnow = clear_val + Interstitial%cld_rwp = clear_val + Interstitial%cld_rerain = clear_val + Interstitial%precip_frac = clear_val + Interstitial%icseed_lw = clear_val + Interstitial%icseed_sw = clear_val + Interstitial%sfc_emiss_byband = clear_val + Interstitial%sec_diff_byband = clear_val + Interstitial%sfc_alb_nir_dir = clear_val + Interstitial%sfc_alb_nir_dif = clear_val + Interstitial%sfc_alb_uvvis_dir = clear_val + Interstitial%sfc_alb_uvvis_dif = clear_val + Interstitial%toa_src_sw = clear_val + Interstitial%toa_src_lw = clear_val end if ! end subroutine interstitial_rad_reset @@ -6712,37 +6722,39 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%dudt_tms ) = ', sum(Interstitial%dudt_tms ) ! ! RRTMGP fields - write (0,*) 'sum(Interstitial%aerosolslw ) = ', sum(Interstitial%aerosolslw ) - write (0,*) 'sum(Interstitial%aerosolssw ) = ', sum(Interstitial%aerosolssw ) - write (0,*) 'sum(Interstitial%cld_frac ) = ', sum(Interstitial%cld_frac ) - write (0,*) 'sum(Interstitial%cld_lwp ) = ', sum(Interstitial%cld_lwp ) - write (0,*) 'sum(Interstitial%cld_reliq ) = ', sum(Interstitial%cld_reliq ) - write (0,*) 'sum(Interstitial%cld_iwp ) = ', sum(Interstitial%cld_iwp ) - write (0,*) 'sum(Interstitial%cld_reice ) = ', sum(Interstitial%cld_reice ) - write (0,*) 'sum(Interstitial%cld_swp ) = ', sum(Interstitial%cld_swp ) - write (0,*) 'sum(Interstitial%cld_resnow ) = ', sum(Interstitial%cld_resnow ) - write (0,*) 'sum(Interstitial%cld_rwp ) = ', sum(Interstitial%cld_rwp ) - write (0,*) 'sum(Interstitial%cld_rerain ) = ', sum(Interstitial%cld_rerain ) - write (0,*) 'sum(Interstitial%icseed_lw ) = ', sum(Interstitial%icseed_lw ) - write (0,*) 'sum(Interstitial%icseed_sw ) = ', sum(Interstitial%icseed_sw ) - write (0,*) 'sum(Interstitial%fluxlwUP_allsky ) = ', sum(Interstitial%fluxlwUP_allsky ) - write (0,*) 'sum(Interstitial%fluxlwDOWN_allsky) = ', sum(Interstitial%fluxlwDOWN_allsky) - write (0,*) 'sum(Interstitial%fluxlwUP_clrsky ) = ', sum(Interstitial%fluxlwUP_clrsky ) - write (0,*) 'sum(Interstitial%fluxlwDOWN_clrsky) = ', sum(Interstitial%fluxlwDOWN_clrsky) - write (0,*) 'sum(Interstitial%fluxswUP_allsky ) = ', sum(Interstitial%fluxswUP_allsky ) - write (0,*) 'sum(Interstitial%fluxswDOWN_allsky) = ', sum(Interstitial%fluxswDOWN_allsky) - write (0,*) 'sum(Interstitial%fluxswUP_clrsky ) = ', sum(Interstitial%fluxswUP_clrsky ) - write (0,*) 'sum(Interstitial%fluxswDOWN_clrsky) = ', sum(Interstitial%fluxswDOWN_clrsky) - write (0,*) 'sum(Interstitial%relhum ) = ', sum(Interstitial%relhum ) - write (0,*) 'sum(Interstitial%q_lay ) = ', sum(Interstitial%q_lay ) - write (0,*) 'sum(Interstitial%qs_lay ) = ', sum(Interstitial%qs_lay ) - write (0,*) 'sum(Interstitial%deltaZ ) = ', sum(Interstitial%deltaZ ) - write (0,*) 'sum(Interstitial%p_lay ) = ', sum(Interstitial%p_lay ) - write (0,*) 'sum(Interstitial%p_lev ) = ', sum(Interstitial%p_lev ) - write (0,*) 'sum(Interstitial%t_lay ) = ', sum(Interstitial%t_lay ) - write (0,*) 'sum(Interstitial%t_lev ) = ', sum(Interstitial%t_lev ) - write (0,*) 'sum(Interstitial%tv_lay ) = ', sum(Interstitial%tv_lay ) - write (0,*) 'sum(Interstitial%overlap_param ) = ', sum(Interstitial%overlap_param) + write (0,*) 'sum(Interstitial%aerosolslw ) = ', sum(Interstitial%aerosolslw ) + write (0,*) 'sum(Interstitial%aerosolssw ) = ', sum(Interstitial%aerosolssw ) + write (0,*) 'sum(Interstitial%cld_frac ) = ', sum(Interstitial%cld_frac ) + write (0,*) 'sum(Interstitial%cld_lwp ) = ', sum(Interstitial%cld_lwp ) + write (0,*) 'sum(Interstitial%cld_reliq ) = ', sum(Interstitial%cld_reliq ) + write (0,*) 'sum(Interstitial%cld_iwp ) = ', sum(Interstitial%cld_iwp ) + write (0,*) 'sum(Interstitial%cld_reice ) = ', sum(Interstitial%cld_reice ) + write (0,*) 'sum(Interstitial%cld_swp ) = ', sum(Interstitial%cld_swp ) + write (0,*) 'sum(Interstitial%cld_resnow ) = ', sum(Interstitial%cld_resnow ) + write (0,*) 'sum(Interstitial%cld_rwp ) = ', sum(Interstitial%cld_rwp ) + write (0,*) 'sum(Interstitial%cld_rerain ) = ', sum(Interstitial%cld_rerain ) + write (0,*) 'sum(Interstitial%precip_frac ) = ', sum(Interstitial%precip_frac ) + write (0,*) 'sum(Interstitial%icseed_lw ) = ', sum(Interstitial%icseed_lw ) + write (0,*) 'sum(Interstitial%icseed_sw ) = ', sum(Interstitial%icseed_sw ) + write (0,*) 'sum(Interstitial%fluxlwUP_allsky ) = ', sum(Interstitial%fluxlwUP_allsky ) + write (0,*) 'sum(Interstitial%fluxlwDOWN_allsky ) = ', sum(Interstitial%fluxlwDOWN_allsky) + write (0,*) 'sum(Interstitial%fluxlwUP_clrsky ) = ', sum(Interstitial%fluxlwUP_clrsky ) + write (0,*) 'sum(Interstitial%fluxlwDOWN_clrsky ) = ', sum(Interstitial%fluxlwDOWN_clrsky) + write (0,*) 'sum(Interstitial%fluxswUP_allsky ) = ', sum(Interstitial%fluxswUP_allsky ) + write (0,*) 'sum(Interstitial%fluxswDOWN_allsky ) = ', sum(Interstitial%fluxswDOWN_allsky) + write (0,*) 'sum(Interstitial%fluxswUP_clrsky ) = ', sum(Interstitial%fluxswUP_clrsky ) + write (0,*) 'sum(Interstitial%fluxswDOWN_clrsky ) = ', sum(Interstitial%fluxswDOWN_clrsky) + write (0,*) 'sum(Interstitial%relhum ) = ', sum(Interstitial%relhum ) + write (0,*) 'sum(Interstitial%q_lay ) = ', sum(Interstitial%q_lay ) + write (0,*) 'sum(Interstitial%qs_lay ) = ', sum(Interstitial%qs_lay ) + write (0,*) 'sum(Interstitial%deltaZ ) = ', sum(Interstitial%deltaZ ) + write (0,*) 'sum(Interstitial%p_lay ) = ', sum(Interstitial%p_lay ) + write (0,*) 'sum(Interstitial%p_lev ) = ', sum(Interstitial%p_lev ) + write (0,*) 'sum(Interstitial%t_lay ) = ', sum(Interstitial%t_lay ) + write (0,*) 'sum(Interstitial%t_lev ) = ', sum(Interstitial%t_lev ) + write (0,*) 'sum(Interstitial%tv_lay ) = ', sum(Interstitial%tv_lay ) + write (0,*) 'sum(Interstitial%cloud_overlap_param ) = ', sum(Interstitial%cloud_overlap_param) + write (0,*) 'sum(Interstitial%precip_overlap_param ) = ', sum(Interstitial%precip_overlap_param) ! Print arrays that are conditional on physics choices if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 177df062..4b7780c0 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -8488,7 +8488,7 @@ type = real kind = kind_phys optional = F -[overlap_param] +[cloud_overlap_param] standard_name = cloud_overlap_param long_name = cloud overlap parameter units = km @@ -8496,6 +8496,14 @@ type = real kind = kind_phys optional = F +[precip_overlap_param] + standard_name = precip_overlap_param + long_name = precipitation overlap parameter + units = km + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = F [ipsdsw0] standard_name = initial_permutation_seed_sw long_name = initial seed for McICA SW @@ -8510,69 +8518,6 @@ dimensions = () type = integer optional = F -[cld_frac] - standard_name = RRTMGP_total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[cld_lwp] - standard_name = RRTMGP_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 -[cld_reliq] - standard_name = RRTMGP_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 -[cld_iwp] - standard_name = RRTMGP_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 -[cld_reice] - standard_name = RRTMGP_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 -[cld_rwp] - standard_name = RRTMGP_cloud_rain_water_path - long_name = cloud rain water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[cld_rerain] - standard_name = RRTMGP_mean_effective_radius_for_rain_drop - long_name = mean effective radius for rain drop - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[cld_swp] - standard_name = RRTMGP_cloud_snow_water_path - long_name = cloud snow water path - units = g m-2 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[cld_resnow] - standard_name = RRTMGP_mean_effective_radius_for_snow_flake - long_name = mean effective radius for snow flake - units = micron - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys [cldtausw] standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth @@ -8737,6 +8682,14 @@ dimensions = (horizontal_dimension) type = integer optional = F +[precip_frac] + standard_name = precipitation_fraction_by_layer + long_name = precipitation fraction in each layer + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = F [sw_gas_props] standard_name = coefficients_for_sw_gas_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme @@ -8764,6 +8717,18 @@ units = DDT dimensions = () type = ty_optical_props_2str +[sw_optical_props_precipByBand] + standard_name = shortwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str +[sw_optical_props_precip] + standard_name = shortwave_optical_properties_for_precipitation + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str [sw_optical_props_clouds] standard_name = shortwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties @@ -8820,12 +8785,25 @@ dimensions = () type = ty_optical_props_1scl optional = F +[lw_optical_props_precip] + standard_name = longwave_optical_properties_for_precipitation + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + optional = F [lw_optical_props_cloudsByBand] standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl +[lw_optical_props_precipByBand] + standard_name = longwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl [lw_optical_props_aerosol] standard_name = longwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties From d47076f139d73d7d147766ca6b4c7912cea29cfe Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 28 May 2020 14:52:26 -0600 Subject: [PATCH 13/46] Housekeeeping. Working with both EMC SDFs in SCM and UFS. --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 1879026d..9d980561 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 1879026da7fa3aa7cb84f2e8d90ddac3a1a5fa54 +Subproject commit 9d98056157ec6af0175b917bb73fbc69ed6b8799 From 3c206790a11255e417e1653a1441a72d5b7cf9cf Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 1 Jun 2020 11:15:00 -0600 Subject: [PATCH 14/46] Renamed sampling routines. --- ccpp/config/ccpp_prebuild_config.py | 44 +++++++++---------- ccpp/physics | 2 +- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 4 +- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml | 4 +- ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 4 +- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 2ffedaef..74e778c2 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -289,29 +289,29 @@ 'ccpp/physics/physics/mp_fer_hires.F90' : ['physics'], 'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' : ['physics'], # RRTMGP - 'ccpp/physics/physics/mo_cloud_sampling.F90' : ['physics'], - 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_aux.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_pre.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' : ['physics'], + 'ccpp/physics/physics/mo_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_aux.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_pre.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' : ['physics'], # Cloud diagnostics - 'ccpp/physics/physics/GFS_cloud_diagnostics.F90' : ['physics'], + 'ccpp/physics/physics/GFS_cloud_diagnostics.F90' : ['physics'], } # Default build dir, relative to current working directory, diff --git a/ccpp/physics b/ccpp/physics index 9d980561..499b3ddb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 9d98056157ec6af0175b917bb73fbc69ed6b8799 +Subproject commit 499b3ddb629e02d8d4956323f8901799baf003f0 diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 4aae09d5..4d953944 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling + rrtmgp_gfdlmp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling + rrtmgp_gfdlmp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml index 704ae22d..8012e96e 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml @@ -17,14 +17,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling + rrtmgp_gfdlmp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling + rrtmgp_gfdlmp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index e3d7994c..bbbe933c 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling + rrtmgp_gfdlmp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling + rrtmgp_gfdlmp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post From 19f5ba9bacbc5a65677b3e17e039c2a504815723 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 9 Jun 2020 16:25:02 -0600 Subject: [PATCH 15/46] Added infrastructure to use LW jacobians in RRTMGP LW scheme. --- ccpp/config/ccpp_prebuild_config.py | 7 + ccpp/physics | 2 +- .../input_GFS_v15p2_RRTMGP_LWjac.nml | 126 +++++++++++++++ .../input_GFS_v16beta_RRTMGP_LWjac.nml | 151 ++++++++++++++++++ scm/src/GFS_typedefs.F90 | 15 +- scm/src/GFS_typedefs.meta | 22 +++ 6 files changed, 320 insertions(+), 3 deletions(-) create mode 100644 ccpp/physics_namelists/input_GFS_v15p2_RRTMGP_LWjac.nml create mode 100644 ccpp/physics_namelists/input_GFS_v16beta_RRTMGP_LWjac.nml diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 74e778c2..d055a7f0 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -185,6 +185,7 @@ 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_kind.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_lw.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_sw.F90', + 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_config.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_source_functions.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90', @@ -412,6 +413,12 @@ 'rime_factor', ], }, + 'rrtmgp_lw_rte' : { + 'rrtmgp_lw_rte_run' : [ + 'RRTMGP_jacobian_of_lw_flux_profile_upward', + 'RRTMGP_jacobian_of_lw_flux_profile_downward', + ], + }, 'rrtmgp_sw_rte' : { 'rrtmgp_sw_rte_run' : [ 'components_of_surface_downward_shortwave_fluxes', diff --git a/ccpp/physics b/ccpp/physics index 499b3ddb..16ab8762 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 499b3ddb629e02d8d4956323f8901799baf003f0 +Subproject commit 16ab8762e1f16bc3228b4f173308326769a294e2 diff --git a/ccpp/physics_namelists/input_GFS_v15p2_RRTMGP_LWjac.nml b/ccpp/physics_namelists/input_GFS_v15p2_RRTMGP_LWjac.nml new file mode 100644 index 00000000..9c094fb9 --- /dev/null +++ b/ccpp/physics_namelists/input_GFS_v15p2_RRTMGP_LWjac.nml @@ -0,0 +1,126 @@ +&gfs_physics_nml + fhzero = 6. + h2o_phys = .true. + ldiag3d = .true. + fhcyc = 24. + use_ufo = .true. + pre_rad = .false. + ncld = 5 + imp_physics = 11 + pdfcld = .false. + fhswr = 3600. + fhlwr = 3600. + ialb = 1 + iems = 1 + iaer = 111 + ico2 = 2 + isubc_sw = 2 + isubc_lw = 2 + isol = 2 + lwhtr = .true. + swhtr = .true. + cnvgwd = .true. + shal_cnv = .true. + cal_pre = .false. + redrag = .true. + dspheat = .true. + hybedmf = .true. + random_clds = .false. + trans_trac = .true. + cnvcld = .true. + imfshalcnv = 2 + imfdeepcnv = 2 + cdmbgwd = 3.5,0.25 + prslrd0 = 0. + ivegsrc = 1 + isot = 1 + debug = .false. + oz_phys = .false. + oz_phys_2015 = .true. + nstf_name = 2,1,0,0,0 + nst_anl = .true. + psautco = 0.0008,0.0005 + prautco = 0.00015,0.00015 + lgfdlmprad = .true. + effr_in = .true. + do_sppt = .false. + do_shum = .false. + do_skeb = .false. + do_sfcperts = .false. + do_RRTMGP = .true. + active_gases = 'h2o_co2_o3_n2o_ch4_o2' + ngases = 6 + rrtmgp_root = '../../ccpp/physics/physics/rte-rrtmgp/' + lw_file_gas = 'rrtmgp/data/rrtmgp-data-lw-g256-2018-12-04.nc' + lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc' + sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g224-2018-12-04.nc' + sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-sw.nc' + doG_cldoptics = .true. + use_LW_jacobian = .true. + rrtmgp_ngauss_ang = 3 + rrtmgp_nrghice = 3 +/ + +&gfdl_cloud_microphysics_nml + sedi_transport = .true. + do_sedi_heat = .false. + rad_snow = .true. + rad_graupel = .true. + rad_rain = .true. + const_vi = .F. + const_vs = .F. + const_vg = .F. + const_vr = .F. + vi_max = 1. + vs_max = 2. + vg_max = 12. + vr_max = 12. + qi_lim = 1. + prog_ccn = .false. + do_qa = .false. + fast_sat_adj = .false. + tau_l2v = 225. + tau_v2l = 150. + tau_g2v = 900. + rthresh = 10.e-6 ! This is a key parameter for cloud water + dw_land = 0.16 + dw_ocean = 0.10 + ql_gen = 1.0e-3 + ql_mlt = 1.0e-3 + qi0_crt = 8.0E-5 + qs0_crt = 1.0e-3 + tau_i2s = 1000. + c_psaci = 0.05 + c_pgacs = 0.01 + rh_inc = 0.30 + rh_inr = 0.30 + rh_ins = 0.30 + ccn_l = 300. + ccn_o = 100. + c_paut = 0.5 + c_cracw = 0.8 + use_ppm = .false. + use_ccn = .true. + mono_prof = .true. + z_slope_liq = .true. + z_slope_ice = .true. + de_ice = .false. + fix_negative = .true. + icloud_f = 1 + mp_time = 150. +/ + +&cires_ugwp_nml + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_wvspec = 1,25,25,25 + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_version = 0 + launch_level = 25 +/ diff --git a/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP_LWjac.nml b/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP_LWjac.nml new file mode 100644 index 00000000..868032fa --- /dev/null +++ b/ccpp/physics_namelists/input_GFS_v16beta_RRTMGP_LWjac.nml @@ -0,0 +1,151 @@ +&gfs_physics_nml + fhzero = 6 + h2o_phys = .true. + ldiag3d = .true. + fhcyc = 24 + use_ufo = .true. + pre_rad = .false. + ncld = 5 + imp_physics = 11 + pdfcld = .false. + fhswr = 3600. + fhlwr = 3600. + ialb = 1 + iems = 1 + iaer = 5111 + icliq_sw = 2 + iovr_lw = 3 + iovr_sw = 3 + ico2 = 2 + isubc_sw = 2 + isubc_lw = 2 + isol = 2 + lwhtr = .true. + swhtr = .true. + cnvgwd = .true. + shal_cnv = .true. + cal_pre = .false. + redrag = .true. + dspheat = .true. + hybedmf = .false. + satmedmf = .true. + isatmedmf = 1 + lheatstrg = .true. + random_clds = .false. + trans_trac = .true. + cnvcld = .true. + imfshalcnv = 2 + imfdeepcnv = 2 + cdmbgwd = 4.0,0.15,1.0,1.0 + prslrd0 = 0. + ivegsrc = 1 + isot = 1 + lsoil = 4 + lsm = 1 + iopt_dveg = 1 + iopt_crs = 1 + iopt_btr = 1 + iopt_run = 1 + iopt_sfc = 1 + iopt_frz = 1 + iopt_inf = 1 + iopt_rad = 1 + iopt_alb = 2 + iopt_snf = 4 + iopt_tbot = 2 + iopt_stc = 1 + debug = .false. + oz_phys = .false. + oz_phys_2015 = .true. + nstf_name = 2,1,0,0,0 + nst_anl = .true. + psautco = 0.0008,0.0005 + prautco = 0.00015,0.00015 + lgfdlmprad = .true. + effr_in = .true. + ldiag_ugwp = .false. + do_ugwp = .false. + do_tofd = .true. + do_sppt = .false. + do_shum = .false. + do_skeb = .false. + do_sfcperts = .false. + do_RRTMGP = .true. + active_gases = 'h2o_co2_o3_n2o_ch4_o2' + ngases = 6 + rrtmgp_root = '../../ccpp/physics/physics/rte-rrtmgp/' + lw_file_gas = 'rrtmgp/data/rrtmgp-data-lw-g256-2018-12-04.nc' + lw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-lw.nc' + sw_file_gas = 'rrtmgp/data/rrtmgp-data-sw-g224-2018-12-04.nc' + sw_file_clouds = 'extensions/cloud_optics/rrtmgp-cloud-optics-coeffs-sw.nc' + doG_cldoptics = .true. + use_LW_jacobian = .true. + rrtmgp_ngauss_ang = 3 + rrtmgp_nrghice = 3 +/ + +&gfdl_cloud_microphysics_nml + sedi_transport = .true. + do_sedi_heat = .false. + rad_snow = .true. + rad_graupel = .true. + rad_rain = .true. + const_vi = .F. + const_vs = .F. + const_vg = .F. + const_vr = .F. + vi_max = 1. + vs_max = 2. + vg_max = 12. + vr_max = 12. + qi_lim = 1. + prog_ccn = .false. + do_qa = .false. + fast_sat_adj = .false. + tau_l2v = 225. + tau_v2l = 150. + tau_g2v = 900. + rthresh = 10.e-6 ! This is a key parameter for cloud water + dw_land = 0.16 + dw_ocean = 0.10 + ql_gen = 1.0e-3 + ql_mlt = 1.0e-3 + qi0_crt = 8.0E-5 + qs0_crt = 1.0e-3 + tau_i2s = 1000. + c_psaci = 0.05 + c_pgacs = 0.01 + rh_inc = 0.30 + rh_inr = 0.30 + rh_ins = 0.30 + ccn_l = 300. + ccn_o = 100. + c_paut = 0.5 + c_cracw = 0.8 + use_ppm = .false. + use_ccn = .true. + mono_prof = .true. + z_slope_liq = .true. + z_slope_ice = .true. + de_ice = .false. + fix_negative = .true. + icloud_f = 1 + mp_time = 150. + reiflag = 2 +/ + +&cires_ugwp_nml + knob_ugwp_solver = 2 + knob_ugwp_source = 1,1,0,0 + knob_ugwp_wvspec = 1,25,25,25 + knob_ugwp_azdir = 2,4,4,4 + knob_ugwp_stoch = 0,0,0,0 + knob_ugwp_effac = 1,1,1,1 + knob_ugwp_doaxyz = 1 + knob_ugwp_doheat = 1 + knob_ugwp_dokdis = 1 + knob_ugwp_ndx4lh = 1 + knob_ugwp_version = 0 + launch_level = 27 +/ + diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 892a8906..cd7cd026 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -636,6 +636,7 @@ module GFS_typedefs integer :: rrtmgp_nGauss_ang !< Number of angles used in Gaussian quadrature logical :: do_GPsw_Glw ! If set to true use rrtmgp for SW calculation, rrtmg for LW. character(len=128) :: active_gases_array(100) !< character array for each trace gas name + logical :: use_LW_jacobian !< If true, use Jacobian of LW to update radiation tendency. !--- microphysical switch integer :: ncld !< choice of cloud scheme !--- new microphysical switch @@ -1863,6 +1864,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxlwUP_jac(:,:) => null() !< RRTMGP upward Jacobian of longwave flux + real (kind=kind_phys), pointer :: fluxlwDOWN_jac(:,:) => null() !< RRTMGP downward Jacobian of longwave flux real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< @@ -2743,7 +2746,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: doGP_cldoptics_LUT = .false. !< Use RRTMGP cloud-optics: LUTs? integer :: rrtmgp_nrghice = 0 !< Number of ice-roughness categories integer :: rrtmgp_nGauss_ang=1 !< Number of angles used in Gaussian quadrature - logical :: do_GPsw_Glw = .false. + logical :: do_GPsw_Glw = .false. + logical :: use_LW_jacobian = .false. !< Use Jacobian of LW to update LW radiation tendencies. !--- Z-C microphysical parameters integer :: ncld = 1 !< choice of cloud scheme @@ -3078,6 +3082,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & sw_file_gas, sw_file_clouds, rrtmgp_nBandsSW, rrtmgp_nGptsSW,& doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, & + use_LW_jacobian, & ! IN CCN forcing iccn, & !--- microphysical parameterizations @@ -3314,6 +3319,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%doG_cldoptics = doG_cldoptics Model%doGP_cldoptics_PADE = doGP_cldoptics_PADE Model%doGP_cldoptics_LUT = doGP_cldoptics_LUT + Model%use_LW_jacobian = use_LW_jacobian ! RRTMGP incompatible with levr /= levs if (Model%do_RRTMGP .and. Model%levr /= Model%levs) then write(0,*) "Logic error, RRTMGP only works with levr = levs" @@ -4316,6 +4322,7 @@ subroutine control_print(Model) print *, ' doG_cldoptics : ', Model%doG_cldoptics print *, ' doGP_cldoptics_PADE: ', Model%doGP_cldoptics_PADE print *, ' doGP_cldoptics_LUT : ', Model%doGP_cldoptics_LUT + print *, ' use_LW_jacobian : ', Model%use_LW_jacobian endif print *, ' ' print *, 'microphysical switch' @@ -5761,10 +5768,12 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) allocate (Interstitial%cld_frac (IM, Model%levs)) @@ -6129,6 +6138,8 @@ subroutine interstitial_rad_reset (Interstitial, Model) Interstitial%fluxlwDOWN_allsky = clear_val Interstitial%fluxlwUP_clrsky = clear_val Interstitial%fluxlwDOWN_clrsky = clear_val + Interstitial%fluxlwUP_jac = clear_val + Interstitial%fluxlwDOWN_jac = clear_val Interstitial%fluxswUP_allsky = clear_val Interstitial%fluxswDOWN_allsky = clear_val Interstitial%fluxswUP_clrsky = clear_val diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 4b7780c0..fcc94575 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -2365,6 +2365,12 @@ units = flag dimensions = () type = logical +[use_LW_jacobian] + standard_name = flag_to_calc_RRTMGP_LW_jacobian + long_name = logical flag to control RRTMGP LW calculation + units = flag + dimensions = () + type = logical [rrtmgp_nrghice] standard_name = number_of_rrtmgp_ice_roughness long_name = number of ice-roughness categories in RRTMGP calculation (Model%rrtmgp_nrghice) @@ -8565,6 +8571,22 @@ type = real kind = kind_phys optional = F +[fluxlwUP_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward + long_name = RRTMGP Jacobian upward longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + optional = T +[fluxlwDOWN_jac] + standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward + long_name = RRTMGP Jacobian downward of longwave flux profile + units = W m-2 K-1 + dimensions = (horizontal_dimension,vertical_dimension_plus_one) + type = real + kind = kind_phys + optional = T [fluxswUP_allsky] standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile From 3dc5469cf1fcee0ddfe276bbcbd22647fcf0a715 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 11 Jun 2020 15:24:36 -0600 Subject: [PATCH 16/46] Added new scheme for RRTMGP LW surface flux adjustment between radiation time-steps. --- ccpp/config/ccpp_prebuild_config.py | 1 + ccpp/physics | 2 +- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 1 + ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 1 + scm/src/GFS_typedefs.F90 | 2 ++ scm/src/GFS_typedefs.meta | 7 +++++++ 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index d055a7f0..3d81ac64 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -301,6 +301,7 @@ 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lwadj.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], diff --git a/ccpp/physics b/ccpp/physics index 16ab8762..b00d5fbf 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 16ab8762e1f16bc3228b4f173308326769a294e2 +Subproject commit b00d5fbf2189e65365ef0e04c741b82e1c6fe80b diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 4d953944..1c7f4473 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -41,6 +41,7 @@ GFS_surface_composites_pre dcyc2t3 GFS_surface_composites_inter + rrtmgp_lwadj GFS_suite_interstitial_2 diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index bbbe933c..0bddf69e 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -41,6 +41,7 @@ GFS_surface_composites_pre dcyc2t3 GFS_surface_composites_inter + rrtmgp_lwadj GFS_suite_interstitial_2 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index cd7cd026..f7fcdd73 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1785,6 +1785,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsfc_land(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ocean(:) => null() !< real (kind=kind_phys), pointer :: tsfg(:) => null() !< + real (kind=kind_phys), pointer :: sktp1r(:) => null() !< real (kind=kind_phys), pointer :: tsnow(:) => null() !< real (kind=kind_phys), pointer :: tsurf(:) => null() !< real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !< @@ -5723,6 +5724,7 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%tsfc_land (IM)) allocate (Interstitial%tsfc_ocean (IM)) allocate (Interstitial%tsfg (IM)) + allocate (Interstitial%sktp1r (IM)) allocate (Interstitial%tsurf (IM)) allocate (Interstitial%tsurf_ice (IM)) allocate (Interstitial%tsurf_land (IM)) diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index fcc94575..ff273e87 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -8131,6 +8131,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[sktp1r] + standard_name = surface_ground_temperature_for_radiation_at_previous_rad_time_step + long_name = surface ground temperature for radiation at previous radiation time step + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tsurf] standard_name = surface_skin_temperature_after_iteration long_name = surface skin temperature after iteration From 3ffa4eab9da21ef565119f213fd653fcc143fe23 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 12 Jun 2020 08:55:02 -0600 Subject: [PATCH 17/46] Omission from previous commit --- ccpp/config/ccpp_prebuild_config.py | 4 ++-- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 4 ++-- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml | 4 ++-- ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 2ffedaef..53fc2bb5 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -299,9 +299,9 @@ 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' : ['physics'], diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 4aae09d5..4d953944 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling + rrtmgp_gfdlmp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling + rrtmgp_gfdlmp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml index 704ae22d..8012e96e 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml @@ -17,14 +17,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling + rrtmgp_gfdlmp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling + rrtmgp_gfdlmp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index e3d7994c..bbbe933c 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling + rrtmgp_gfdlmp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling + rrtmgp_gfdlmp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post From c26b5d12bf82e6e10e784e9a6ba11fe0755ad823 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 19 Jun 2020 11:20:14 -0600 Subject: [PATCH 18/46] Some changes --- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 4 ++-- scm/src/GFS_typedefs.meta | 42 +-------------------------------------- 3 files changed, 4 insertions(+), 44 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index b00d5fbf..dbaba27e 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit b00d5fbf2189e65365ef0e04c741b82e1c6fe80b +Subproject commit dbaba27e7d5661862415b9ff54c4a502544289e6 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 6f96d482..2061f91d 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1946,8 +1946,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxlwUP_jac(:,:) => null() !< RRTMGP upward Jacobian of longwave flux - real (kind=kind_phys), pointer :: fluxlwDOWN_jac(:,:) => null() !< RRTMGP downward Jacobian of longwave flux + real (kind=kind_phys), pointer :: fluxlwUP_jac(:,:) => null() !< RRTMGP upward Jacobian of longwave flux + real (kind=kind_phys), pointer :: fluxlwDOWN_jac(:,:) => null() !< RRTMGP downward Jacobian of longwave flux real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index f6c58574..729aab57 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -8822,8 +8822,7 @@ units = hPa dimensions = (horizontal_dimension,vertical_dimension) type = real - kind = kind_phys - optional = F + kind = kind_phys [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level @@ -8831,7 +8830,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [t_lay] standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer @@ -8839,7 +8837,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - optional = F [t_lev] standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature layer @@ -8847,7 +8844,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [tv_lay] standard_name = virtual_temperature long_name = layer virtual temperature @@ -8855,7 +8851,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - optional = F [relhum] standard_name = relative_humidity long_name = layer relative humidity @@ -8863,7 +8858,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - optional = F [deltaZ] standard_name = layer_thickness long_name = layer_thickness @@ -8871,7 +8865,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers @@ -8879,7 +8872,6 @@ dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys - optional = F [cloud_overlap_param] standard_name = cloud_overlap_param long_name = cloud overlap parameter @@ -8887,7 +8879,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - optional = F [precip_overlap_param] standard_name = precip_overlap_param long_name = precipitation overlap parameter @@ -8895,21 +8886,18 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - optional = F [ipsdsw0] standard_name = initial_permutation_seed_sw long_name = initial seed for McICA SW units = none dimensions = () type = integer - optional = F [ipsdlw0] standard_name = initial_permutation_seed_lw long_name = initial seed for McICA LW units = none dimensions = () type = integer - optional = F [cldtausw] standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth @@ -8917,7 +8905,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - optional = F [cldtaulw] standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth @@ -8932,7 +8919,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [fluxlwDOWN_allsky] standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile @@ -8940,7 +8926,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [fluxlwUP_clrsky] standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile @@ -8948,7 +8933,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [fluxlwDOWN_clrsky] standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile @@ -8956,7 +8940,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [fluxlwUP_jac] standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward long_name = RRTMGP Jacobian upward longwave flux profile @@ -8964,7 +8947,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = T [fluxlwDOWN_jac] standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward long_name = RRTMGP Jacobian downward of longwave flux profile @@ -8972,7 +8954,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = T [fluxswUP_allsky] standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile @@ -8980,7 +8961,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [fluxswDOWN_allsky] standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile @@ -8988,7 +8968,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [fluxswUP_clrsky] standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile @@ -8996,7 +8975,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [fluxswDOWN_clrsky] standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile @@ -9004,7 +8982,6 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys - optional = F [flxprf_lw] standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels @@ -9026,7 +9003,6 @@ dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys - optional = F [aerosolslw(:,:,:,1)] standard_name = RRTMGP_aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 @@ -9082,14 +9058,12 @@ units = none dimensions = (horizontal_dimension) type = integer - optional = F [icseed_sw] standard_name = seed_random_numbers_sw_for_RRTMGP long_name = seed for random number generation for shortwave radiation units = none dimensions = (horizontal_dimension) type = integer - optional = F [precip_frac] standard_name = precipitation_fraction_by_layer long_name = precipitation fraction in each layer @@ -9097,28 +9071,24 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys - 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 - optional = F [sw_cloud_props] standard_name = coefficients_for_sw_cloud_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme units = DDT dimensions = () type = ty_cloud_optics - optional = F [sw_optical_props_clrsky] standard_name = shortwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_2str - optional = F [sw_optical_props_cloudsByBand] standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties @@ -9143,63 +9113,54 @@ units = DDT dimensions = () type = ty_optical_props_2str - optional = F [sw_optical_props_aerosol] standard_name = shortwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_2str - optional = F [gas_concentrations] standard_name = Gas_concentrations_for_RRTMGP_suite long_name = DDT containing gas concentrations for RRTMGP radiation scheme units = DDT dimensions = () type = ty_gas_concs - optional = F [sources] standard_name = longwave_source_function long_name = Fortran DDT containing RRTMGP source functions units = DDT dimensions = () type = ty_source_func_lw - optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme units = DDT dimensions = () type = ty_gas_optics_rrtmgp - optional = F [lw_cloud_props] standard_name = coefficients_for_lw_cloud_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme units = DDT dimensions = () type = ty_cloud_optics - optional = F [lw_optical_props_clrsky] standard_name = longwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl - optional = F [lw_optical_props_clouds] standard_name = longwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl - optional = F [lw_optical_props_precip] standard_name = longwave_optical_properties_for_precipitation long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl - optional = F [lw_optical_props_cloudsByBand] standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties @@ -9218,7 +9179,6 @@ units = DDT dimensions = () type = ty_optical_props_1scl - optional = F [sfc_emiss_byband] standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band From e9c2a99b6e0ae71cb9201774b3090b3af9526107 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 19 Jun 2020 11:24:18 -0600 Subject: [PATCH 19/46] Revert "Merge branch 'dtc/develop' of https://github.com/NCAR/gmtb-scm into use_LW_jacobian" This reverts commit c68d43fda85da78b43fda914c86ccefc0adc2742, reversing changes made to 3dc5469cf1fcee0ddfe276bbcbd22647fcf0a715. --- ccpp/config/ccpp_prebuild_config.py | 11 - ccpp/framework | 2 +- ccpp/physics_namelists/input_csawmg.nml | 3 +- scm/etc/case_config/astex.nml | 1 - scm/etc/case_config/fv3_model_point_noah.nml | 1 + .../case_config/fv3_model_point_noahmp.nml | 1 + scm/etc/case_config/twpice.nml | 1 - scm/src/CMakeLists.txt | 80 +-- scm/src/GFS_typedefs.F90 | 470 +++-------------- scm/src/GFS_typedefs.meta | 471 ++---------------- scm/src/gmtb_scm.F90 | 60 ++- scm/src/gmtb_scm_physical_constants.F90 | 1 - scm/src/gmtb_scm_physical_constants.meta | 7 - scm/src/gmtb_scm_time_integration.F90 | 9 + scm/src/gmtb_scm_type_defs.F90 | 4 +- 15 files changed, 241 insertions(+), 881 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 29f8cf05..3d81ac64 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -120,8 +120,6 @@ 'ccpp/physics/physics/module_mp_thompson.F90', 'ccpp/physics/physics/module_mp_thompson_make_number_concentrations.F90', 'ccpp/physics/physics/module_MP_FER_HIRES.F90', -# 'ccpp/physics/physics/HWRF_mersenne_twister.F90', -# 'ccpp/physics/physics/HWRF_mcica_random_numbers.F90', 'ccpp/physics/physics/module_bl_mynn.F90', 'ccpp/physics/physics/module_sf_mynn.F90', 'ccpp/physics/physics/module_SF_JSFC.F90', @@ -172,9 +170,6 @@ 'ccpp/physics/physics/namelist_soilveg_ruc.F90', 'ccpp/physics/physics/set_soilveg_ruc.F90', 'ccpp/physics/physics/module_soil_pre.F90', -# 'ccpp/physics/physics/module_sf_noahlsm.F90', -# 'ccpp/physics/physics/module_sf_noahlsm_glacial_only.F90', -# 'ccpp/physics/physics/module_sf_exchcoef.f90', # RRTMGP 'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90', 'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_optics.F90', @@ -202,7 +197,6 @@ 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_heating_rates.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', - 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90', # derived data type definitions 'scm/src/GFS_typedefs.F90', 'scm/src/gmtb_scm_kinds.F90', @@ -243,7 +237,6 @@ 'ccpp/physics/physics/gcm_shoc.F90' : ['physics'], 'ccpp/physics/physics/get_prs_fv3.F90' : ['physics'], 'ccpp/physics/physics/gfdl_cloud_microphys.F90' : ['physics'], -# 'ccpp/physics/physics/gfdl_sfc_layer.F90' : ['physics'], 'ccpp/physics/physics/gscond.f' : ['physics'], 'ccpp/physics/physics/gwdc.f' : ['physics'], 'ccpp/physics/physics/gwdps.f' : ['physics'], @@ -276,8 +269,6 @@ 'ccpp/physics/physics/ozphys.f' : ['physics'], 'ccpp/physics/physics/ozphys_2015.f' : ['physics'], 'ccpp/physics/physics/precpd.f' : ['physics'], -# 'ccpp/physics/physics/radlw_main.F90' : ['physics'], -# 'ccpp/physics/physics/radsw_main.F90' : ['physics'], 'ccpp/physics/physics/radlw_main.f' : ['physics'], 'ccpp/physics/physics/radsw_main.f' : ['physics'], 'ccpp/physics/physics/rayleigh_damp.f' : ['physics'], @@ -292,8 +283,6 @@ 'ccpp/physics/physics/sfc_cice.f' : ['physics'], 'ccpp/physics/physics/sfc_diff.f' : ['physics'], 'ccpp/physics/physics/sfc_drv.f' : ['physics'], -# 'ccpp/physics/physics/sfc_noah_wrfv4_interstitial.F90' : ['physics'], -# 'ccpp/physics/physics/sfc_noah_wrfv4.F90' : ['physics'], 'ccpp/physics/physics/sfc_noahmp_drv.f' : ['physics'], 'ccpp/physics/physics/sfc_nst.f' : ['physics'], 'ccpp/physics/physics/sfc_ocean.F' : ['physics'], diff --git a/ccpp/framework b/ccpp/framework index a1fe9c10..54f9b070 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit a1fe9c1091f2122a8e748154a9ce79c3020468fd +Subproject commit 54f9b07098dc6fc3c25f0b38a7d047b5274d3afb diff --git a/ccpp/physics_namelists/input_csawmg.nml b/ccpp/physics_namelists/input_csawmg.nml index 7a5071a4..5d88a3ee 100644 --- a/ccpp/physics_namelists/input_csawmg.nml +++ b/ccpp/physics_namelists/input_csawmg.nml @@ -72,7 +72,8 @@ mg_qcvar = 1.0 fprcp = 2 pdfflag = 4 - iccn = 0 + iccn = .false. + aero_in = .false. mg_do_graupel = .true. mg_do_hail = .false. do_sb_physics = .true. diff --git a/scm/etc/case_config/astex.nml b/scm/etc/case_config/astex.nml index 30c1f54c..de838942 100644 --- a/scm/etc/case_config/astex.nml +++ b/scm/etc/case_config/astex.nml @@ -15,7 +15,6 @@ mom_forcing_type = 2, relax_time = 7200.0, sfc_flux_spec = .false., sfc_type = 0, -sfc_roughness_length_cm = 0.02, reference_profile_choice = 1, year = 1992, month = 6, diff --git a/scm/etc/case_config/fv3_model_point_noah.nml b/scm/etc/case_config/fv3_model_point_noah.nml index 77bdf1cb..47f916a3 100644 --- a/scm/etc/case_config/fv3_model_point_noah.nml +++ b/scm/etc/case_config/fv3_model_point_noah.nml @@ -22,5 +22,6 @@ year = 2016, month = 10, day = 3, hour = 0, +output_dir = 'output_fv3_model_point_noah' $end diff --git a/scm/etc/case_config/fv3_model_point_noahmp.nml b/scm/etc/case_config/fv3_model_point_noahmp.nml index 4ca6d61d..6aab8134 100644 --- a/scm/etc/case_config/fv3_model_point_noahmp.nml +++ b/scm/etc/case_config/fv3_model_point_noahmp.nml @@ -22,5 +22,6 @@ year = 2016, month = 10, day = 3, hour = 0, +output_dir = 'output_fv3_model_point_noahmp' $end diff --git a/scm/etc/case_config/twpice.nml b/scm/etc/case_config/twpice.nml index f9c2b16d..b8e81e3d 100644 --- a/scm/etc/case_config/twpice.nml +++ b/scm/etc/case_config/twpice.nml @@ -15,7 +15,6 @@ mom_forcing_type = 3, relax_time = 7200.0, sfc_flux_spec = .false., sfc_type = 0, -sfc_roughness_length_cm = 0.02, reference_profile_choice = 1, year = 2006, month = 1, diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index 1b7745a2..0a9698e2 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -2,39 +2,45 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(scm) set(PROJECT "CCPP-SCM") +# The only option to build is the static build +set(STATIC TRUE) + #################################################################### # Begin CCPP prebuild step # #################################################################### -# Start with empty list of suites -message (STATUS "Generating list of suites to compile for CCPP") -set(SUITES "") -# Get list of all suite definition files (with full path) -file(GLOB SUITE_DEFINITION_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/../../ccpp/suites/suite_*.xml" -) -# Extract file name and suite name and append to SUITES -foreach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) - get_filename_component(suite_definition_filename ${suite_definition_filepath} NAME) - string(REGEX REPLACE "^suite_(.+)\\.xml$" "\\1" suite_name ${suite_definition_filename}) - set(SUITES ${SUITES}${suite_name},) - message (STATUS " adding suite ${suite_name}") -endforeach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) -# Abort if no suites found -if ("${SUITES}" STREQUAL "") - message(FATAL_ERROR "No suites found to compile for CCPP") -endif("${SUITES}" STREQUAL "") -# Remove trailing comma from list of suites -string(REGEX REPLACE "(.+),$" "\\1" SUITES ${SUITES}) -# Run CCPP prebuild.py -message (STATUS "Running ccpp_prebuild.py for CCPP") -execute_process( - COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}/.. - OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out - ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../.. - RESULT_VARIABLE return_code -) - +if(STATIC) + # Start with empty list of suites + message (STATUS "Generating list of suites to compile for static CCPP") + set(SUITES "") + # Get list of all suite definition files (with full path) + file(GLOB SUITE_DEFINITION_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/../../ccpp/suites/suite_*.xml" + ) + # Extract file name and suite name and append to SUITES + foreach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) + get_filename_component(suite_definition_filename ${suite_definition_filepath} NAME) + string(REGEX REPLACE "^suite_(.+)\\.xml$" "\\1" suite_name ${suite_definition_filename}) + set(SUITES ${SUITES}${suite_name},) + message (STATUS " adding suite ${suite_name}") + endforeach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) + # Abort if no suites found + if ("${SUITES}" STREQUAL "") + message(FATAL_ERROR "No suites found to compile for static CCPP") + endif("${SUITES}" STREQUAL "") + # Remove trailing comma from list of suites + string(REGEX REPLACE "(.+),$" "\\1" SUITES ${SUITES}) + # Run CCPP prebuild.py + message (STATUS "Running ccpp_prebuild.py for static CCPP") + execute_process( + COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --static --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}/.. + OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out + ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../.. + RESULT_VARIABLE return_code + ) +else(STATIC) + message(FATAL_ERROR "Dynamic CCPP build no longer supported") +endif(STATIC) # Check return code from CCPP prebuild.py if(return_code EQUAL 0) message (STATUS "CCPP prebuild step completed successfully") @@ -82,6 +88,10 @@ ELSE(DEFINED ENV{W3NCO_LIBd}) MESSAGE(FATAL_ERROR "The W3NCO_LIBd environment variable must be set to point to your W3NCO installation (part of NCEPLIBS) before building. Stopping...") ENDIF(DEFINED ENV{W3NCO_LIBd}) +if(STATIC) + ADD_DEFINITIONS(-DSTATIC) +endif(STATIC) + SET(CCPP_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework) SET(GFSPHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics) @@ -289,9 +299,13 @@ SET(scm_source_files gmtb_scm.F90 gmtb_scm_output.F90 ) -ADD_EXECUTABLE(gmtb_scm ${scm_source_files} ccpp_static_api.F90) -TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp ${BACIO_LIB4} ${SP_LIBd} ${W3NCO_LIBd}) - +if(STATIC) + ADD_EXECUTABLE(gmtb_scm ${scm_source_files} ccpp_static_api.F90) + TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp ${BACIO_LIB4} ${SP_LIBd} ${W3NCO_LIBd}) +else(STATIC) + ADD_EXECUTABLE(gmtb_scm ${scm_source_files}) + TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp) +endif(STATIC) set_target_properties(gmtb_scm PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS}" diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 2061f91d..561ac03d 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -3,8 +3,8 @@ module GFS_typedefs use machine, only: kind_phys - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type, NBDSW - use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type, NBDLW + use module_radlw_parameters, only: sfcflw_type, topflw_type, NBDLW, proflw_type + use module_radsw_parameters, only: cmpfsw_type, sfcfsw_type, topfsw_type, NBDSW, profsw_type use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str use mo_cloud_optics, only: ty_cloud_optics @@ -211,7 +211,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsfco (:) => null() !< sst in K real (kind=kind_phys), pointer :: tsfcl (:) => null() !< surface land temperature in K real (kind=kind_phys), pointer :: tisfc (:) => null() !< surface temperature over ice fraction - real (kind=kind_phys), pointer :: tiice(:,:) => null() !< internal ice temperature real (kind=kind_phys), pointer :: snowd (:) => null() !< snow depth water equivalent in mm ; same as snwdph real (kind=kind_phys), pointer :: zorl (:) => null() !< composite surface roughness in cm real (kind=kind_phys), pointer :: zorlo (:) => null() !< ocean surface roughness in cm @@ -219,8 +218,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: fice (:) => null() !< ice fraction over open water grid ! real (kind=kind_phys), pointer :: hprim (:) => null() !< topographic standard deviation in m real (kind=kind_phys), pointer :: hprime (:,:) => null() !< orographic metrics - real (kind=kind_phys), pointer :: z0base (:) => null() !< background or baseline surface roughness length in m - real (kind=kind_phys), pointer :: semisbase(:)=> null() !< background surface emissivity !--- In (radiation only) real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction @@ -266,7 +263,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: th2m (:) => null() !< 2 meter potential temperature real (kind=kind_phys), pointer :: q2m (:) => null() !< 2 meter humidity -! -- In/Out for Noah MP +! -- In/Out for Noah MP real (kind=kind_phys), pointer :: snowxy (:) => null() !< real (kind=kind_phys), pointer :: tvxy (:) => null() !< veg temp real (kind=kind_phys), pointer :: tgxy (:) => null() !< ground temp @@ -294,7 +291,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: xlaixy (:) => null() !< real (kind=kind_phys), pointer :: taussxy (:) => null() !< real (kind=kind_phys), pointer :: smcwtdxy(:) => null() !< - real (kind=kind_phys), pointer :: deeprechxy(:)=> null() !< + real (kind=kind_phys), pointer :: deeprechxy(:) => null() !< real (kind=kind_phys), pointer :: rechxy (:) => null() !< real (kind=kind_phys), pointer :: snicexy (:,:) => null() !< @@ -303,8 +300,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: smoiseq (:,:) => null() !< real (kind=kind_phys), pointer :: zsnsoxy (:,:) => null() !< -! -- In/Out for HWRF NOAH LSM - real (kind=kind_phys), pointer :: snotime (:) => null() + !--- NSSTM variables (only allocated when [Model%nstf_name(1) > 0]) real (kind=kind_phys), pointer :: tref (:) => null() !< nst_fld%Tref - Reference Temperature @@ -466,16 +462,18 @@ module GFS_typedefs real (kind=kind_phys), pointer :: slmsk_cpl (:) => null() !< Land/Sea/Ice mask (slmsk from GFS_sfcprop_type) !--- cellular automata - real (kind=kind_phys), pointer :: ca1 (:) => null() ! - real (kind=kind_phys), pointer :: ca2 (:) => null() ! - real (kind=kind_phys), pointer :: ca3 (:) => null() ! + real (kind=kind_phys), pointer :: tconvtend(:,:) => null() + real (kind=kind_phys), pointer :: qconvtend(:,:) => null() + real (kind=kind_phys), pointer :: uconvtend(:,:) => null() + real (kind=kind_phys), pointer :: vconvtend(:,:) => null() + real (kind=kind_phys), pointer :: ca_out (:) => null() ! real (kind=kind_phys), pointer :: ca_deep (:) => null() ! real (kind=kind_phys), pointer :: ca_turb (:) => null() ! real (kind=kind_phys), pointer :: ca_shal (:) => null() ! real (kind=kind_phys), pointer :: ca_rad (:) => null() ! real (kind=kind_phys), pointer :: ca_micro (:) => null() ! - real (kind=kind_phys), pointer :: condition(:) => null() ! - real (kind=kind_phys), pointer :: vfact_ca(:) => null() ! + real (kind=kind_phys), pointer :: cape (:) => null() ! + !--- stochastic physics real (kind=kind_phys), pointer :: shum_wts (:,:) => null() ! real (kind=kind_phys), pointer :: sppt_wts (:,:) => null() ! @@ -711,32 +709,16 @@ module GFS_typedefs integer :: lsm_noah=1 !< flag for NOAH land surface model integer :: lsm_noahmp=2 !< flag for NOAH land surface model integer :: lsm_ruc=3 !< flag for RUC land surface model - integer :: lsm_noah_wrfv4 = 4 !< flag for NOAH land surface from WRF v4.0 integer :: lsoil !< number of soil layers - integer :: kice=2 !< number of layers in sice + integer :: lsoil_lsm !< number of soil layers internal to land surface model + integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model + integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm + logical :: rdlai integer :: ivegsrc !< ivegsrc = 0 => USGS, !< ivegsrc = 1 => IGBP (20 category) !< ivegsrc = 2 => UMD (13 category) - !< ivegsrc = 3 => NLCD40 (40 category, NOAH WRFv4 only) - !< ivegsrc = 4 => USGS-RUC (28 category, NOAH WRFv4 only) - !< ivegsrc = 5 => MODI-RUC (21 category, NOAH WRFv4 only) integer :: isot !< isot = 0 => Zobler soil type ( 9 category) - !< isot = 1 => STATSGO soil type (19 category, AKA 'STAS'(?)) - !< isot = 2 => STAS-RUC soil type (19 category, NOAH WRFv4 only) - integer :: lsoil_lsm !< number of soil layers internal to land surface model - integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model - integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm - logical :: rdlai !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4) - logical :: ua_phys !< flag for using University of Arizona? extension to NOAH LSM WRFv4 - logical :: usemonalb !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 - real(kind=kind_phys) :: aoasis !< potential evaporation multiplication factor for NOAH LSM WRFv4 - integer :: fasdas !< flag to use "flux-adjusting surface data assimilation system"; 0 = OFF, 1 = ON - integer :: isurban !< vegetation/land use type corresponding to the urban environment for the chosen ivegsrc - integer :: isice !< vegetation/land use type corresponding to permanent ice/snow for the chosen ivegsrc - integer :: iswater !< vegetation/land use type corresponding to water bodies for the chosen ivegsrc - integer :: iopt_thcnd !< option to treat thermal conductivity in Noah LSM (new in 3.8) - !< = 1, original (default) - !< = 2, McCumber and Pielke for silt loam and sandy loam + !< isot = 1 => STATSGO soil type (19 category) ! -- the Noah MP options integer :: iopt_dveg ! 1-> off table lai 2-> on 3-> off;4->off;5 -> on @@ -753,13 +735,7 @@ module GFS_typedefs integer :: iopt_stc !snow/soil temperature time scheme (only layer 1) logical :: use_ufo !< flag for gcycle surface option - - ! GFDL Surface Layer options - logical :: lcurr_sf !flag for taking ocean currents into account in GFDL surface layer - logical :: pert_cd !flag for perturbing the surface drag coefficient for momentum in surface layer scheme (1 = True) - integer :: ntsflg !flag for updating skin temperature in the GFDL surface layer scheme - real(kind=kind_phys) :: sfenth !enthalpy flux factor 0 zot via charnock ..>0 zot enhanced>15m/s - + !--- tuning parameters for physical parameterizations logical :: ras !< flag for ras convection scheme logical :: flipv !< flag for vertical direction flip (ras) @@ -777,8 +753,6 @@ module GFS_typedefs logical :: cal_pre !< flag controls precip type algorithm real(kind=kind_phys) :: rhgrd !< fer_hires microphysics only logical :: spec_adv !< flag for individual cloud species advected - integer :: icloud !< cloud effect to the optical depth in radiation; this also controls the cloud fraction options - !< 3: with cloud effect, and use cloud fraction option 3, based on Sundqvist et al. (1989) logical :: do_aw !< AW scale-aware option in cs convection logical :: do_awdd !< AW scale-aware option in cs convection logical :: flx_form !< AW scale-aware option in cs convection @@ -798,7 +772,6 @@ module GFS_typedefs logical :: shinhong !< flag for scale-aware Shinhong vertical turbulent mixing scheme logical :: do_ysu !< flag for YSU turbulent mixing scheme logical :: dspheat !< flag for tke dissipative heating - logical :: hurr_pbl !< flag for hurricane-specific options in PBL scheme logical :: lheatstrg !< flag for canopy heat storage parameterization logical :: cnvcld logical :: random_clds !< flag controls whether clouds are random @@ -816,7 +789,6 @@ module GFS_typedefs integer :: imfshalcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux shallow convection scheme integer :: imfshalcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfshalcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) - logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF) integer :: imfdeepcnv !< flag for mass-flux deep convection scheme !< 1: July 2010 version of SAS conv scheme !< current operational version as of 2016 @@ -828,7 +800,6 @@ module GFS_typedefs integer :: imfdeepcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux deep convection scheme integer :: imfdeepcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfdeepcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) - logical :: hwrf_samfshal !< flag for HWRF SAMF shalcnv scheme (HWRF) integer :: isatmedmf !< flag for scale-aware TKE-based moist edmf scheme !< 0: initial version of satmedmf (Nov. 2018) !< 1: updated version of satmedmf (as of May 2019) @@ -872,10 +843,6 @@ module GFS_typedefs integer :: bl_mynn_cloudmix !< flag to activate mixing of cloud species integer :: bl_mynn_mixqt !< flag to mix total water or individual species integer :: icloud_bl !< flag for coupling sgs clouds to radiation - real(kind=kind_phys) :: var_ric - real(kind=kind_phys) :: coef_ric_l - real(kind=kind_phys) :: coef_ric_s - ! MYJ switches logical :: do_myjsfc !< flag for MYJ surface layer scheme logical :: do_myjpbl !< flag for MYJ PBL scheme @@ -929,6 +896,7 @@ module GFS_typedefs !< nstf_name(5) : zsea2 in mm !--- fractional grid logical :: frac_grid !< flag for fractional grid + logical :: frac_grid_off !< flag for using fractional grid logical :: ignore_lake !< flag for ignoring lakes real(kind=kind_phys) :: min_lakeice !< minimum lake ice value real(kind=kind_phys) :: min_seaice !< minimum sea ice value @@ -941,7 +909,7 @@ module GFS_typedefs !< 6=areodynamical roughness over water with input 10-m wind !< 7=slightly decrease Cd for higher wind speed compare to 6 -!--- vertical diffusion +!--- background vertical diffusion real(kind=kind_phys) :: xkzm_m !< [in] bkgd_vdif_m background vertical diffusion for momentum real(kind=kind_phys) :: xkzm_h !< [in] bkgd_vdif_h background vertical diffusion for heat q real(kind=kind_phys) :: xkzm_s !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion @@ -951,34 +919,20 @@ module GFS_typedefs real(kind=kind_phys) :: bl_upfr !< updraft fraction in boundary layer mass flux scheme real(kind=kind_phys) :: bl_dnfr !< downdraft fraction in boundary layer mass flux scheme -!--- parameters for canopy heat storage (CHS) parameterization - real(kind=kind_phys) :: z0fac !< surface roughness fraction factor - real(kind=kind_phys) :: e0fac !< latent heat flux fraction factor relative to sensible heat flux - !< e.g., e0fac=0.5 indicates that CHS for latent heat flux is 50% of that for - !< sensible heat flux - -!---cellular automata control parameters + !---cellular automata control parameters integer :: nca !< number of independent cellular automata integer :: nlives !< cellular automata lifetime integer :: ncells !< cellular automata finer grid - integer :: nca_g !< number of independent cellular automata - integer :: nlives_g !< cellular automata lifetime - integer :: ncells_g !< cellular automata finer grid - real(kind=kind_phys) :: nfracseed !< cellular automata seed probability + real(kind=kind_phys) :: nfracseed !< cellular automata seed probability integer :: nseed !< cellular automata seed frequency - integer :: nseed_g !< cellular automata seed frequency logical :: do_ca !< cellular automata main switch logical :: ca_sgs !< switch for sgs ca logical :: ca_global !< switch for global ca logical :: ca_smooth !< switch for gaussian spatial filter + logical :: isppt_deep !< switch for combination with isppt_deep. OBS! Switches off SPPT on other tendencies! integer :: iseed_ca !< seed for random number generation in ca scheme integer :: nspinup !< number of iterations to spin up the ca real(kind=kind_phys) :: nthresh !< threshold used for perturbed vertical velocity - real :: ca_amplitude !< amplitude of ca trigger perturbation - integer :: nsmooth !< number of passes through smoother - logical :: ca_closure !< logical switch for ca on closure - logical :: ca_entr !< logical switch for ca on entrainment - logical :: ca_trigger !< logical switch for ca on trigger !--- stochastic physics control parameters logical :: do_sppt @@ -1214,6 +1168,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: phy_myj_qz0(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_uz0(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_vz0(:) => null() ! + real (kind=kind_phys), pointer :: phy_myj_z0base(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_akhs(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_akms(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_chkqlm(:) => null() ! @@ -1427,9 +1382,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tdomip (:) => null() !< dominant accumulated sleet type real (kind=kind_phys), pointer :: tdoms (:) => null() !< dominant accumulated snow type - real (kind=kind_phys), pointer :: ca1 (:) => null() ! - real (kind=kind_phys), pointer :: ca2 (:) => null() ! - real (kind=kind_phys), pointer :: ca3 (:) => null() ! + real (kind=kind_phys), pointer :: ca_out (:) => null() !< cellular automata fraction real (kind=kind_phys), pointer :: ca_deep (:) => null() !< cellular automata fraction real (kind=kind_phys), pointer :: ca_turb (:) => null() !< cellular automata fraction real (kind=kind_phys), pointer :: ca_shal (:) => null() !< cellular automata fraction @@ -1460,11 +1413,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: TRAIN (:,:) => null() !< accumulated stratiform T tendency (K s-1) !--- MP quantities for 3D diagnositics - real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm - - !--- Extra PBL diagnostics - real (kind=kind_phys), pointer :: dkudiagnostic(:,:) => null() !< Eddy diffusitivity from the EDMF and EDMF-TKE - + real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm ! !---vay-2018 UGWP-diagnostics daily mean ! @@ -1584,7 +1533,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: aerodp(:,:) => null() !< real (kind=kind_phys), pointer :: alb1d(:) => null() !< real (kind=kind_phys), pointer :: bexp1d(:) => null() !< - real (kind=kind_phys), pointer :: canopy_save(:) => null() !< real (kind=kind_phys), pointer :: cd(:) => null() !< real (kind=kind_phys), pointer :: cd_ice(:) => null() !< real (kind=kind_phys), pointer :: cd_land(:) => null() !< @@ -1597,7 +1545,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: chh_ice(:) => null() !< real (kind=kind_phys), pointer :: chh_land(:) => null() !< real (kind=kind_phys), pointer :: chh_ocean(:) => null() !< - real (kind=kind_phys), pointer :: chk_land(:) => null() !< real (kind=kind_phys), pointer :: clcn(:,:) => null() !< real (kind=kind_phys), pointer :: cldf(:) => null() !< real (kind=kind_phys), pointer :: cldsa(:,:) => null() !< @@ -1608,7 +1555,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: clw(:,:,:) => null() !< real (kind=kind_phys), pointer :: clw_surf(:) => null() !< real (kind=kind_phys), pointer :: clx(:,:) => null() !< - real (kind=kind_phys), pointer :: cmc(:) => null() !< real (kind=kind_phys), pointer :: cmm_ice(:) => null() !< real (kind=kind_phys), pointer :: cmm_land(:) => null() !< real (kind=kind_phys), pointer :: cmm_ocean(:) => null() !< @@ -1631,10 +1577,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dkt(:,:) => null() !< real (kind=kind_phys), pointer :: dlength(:) => null() !< real (kind=kind_phys), pointer :: dqdt(:,:,:) => null() !< - real (kind=kind_phys), pointer :: dqsdt2(:) => null() !< real (kind=kind_phys), pointer :: dqsfc1(:) => null() !< real (kind=kind_phys), pointer :: drain(:) => null() !< - real (kind=kind_phys), pointer :: drain_in_m_sm1(:) => null() !< real (kind=kind_phys), pointer :: dtdt(:,:) => null() !< real (kind=kind_phys), pointer :: dtdtc(:,:) => null() !< real (kind=kind_phys), pointer :: dtsfc1(:) => null() !< @@ -1654,7 +1598,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: ep1d_land(:) => null() !< real (kind=kind_phys), pointer :: ep1d_ocean(:) => null() !< real (kind=kind_phys), pointer :: evap(:) => null() !< - real (kind=kind_phys), pointer :: evapq(:) => null() !< real (kind=kind_phys), pointer :: evap_ice(:) => null() !< real (kind=kind_phys), pointer :: evap_land(:) => null() !< real (kind=kind_phys), pointer :: evap_ocean(:) => null() !< @@ -1672,8 +1615,6 @@ module GFS_typedefs logical, pointer :: flag_cice(:) => null() !< logical, pointer :: flag_guess(:) => null() !< logical, pointer :: flag_iter(:) => null() !< - logical, pointer :: flag_lsm(:) => null() !< - logical, pointer :: flag_lsm_glacier(:)=> null() !< real (kind=kind_phys), pointer :: ffmm_ice(:) => null() !< real (kind=kind_phys), pointer :: ffmm_land(:) => null() !< real (kind=kind_phys), pointer :: ffmm_ocean(:) => null() !< @@ -1702,10 +1643,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !< integer :: h2o_coeff !< real (kind=kind_phys), pointer :: h2o_pres(:) => null() !< - real (kind=kind_phys), pointer :: hefac(:) => null() !< - real (kind=kind_phys), pointer :: hffac(:) => null() !< real (kind=kind_phys), pointer :: hflx(:) => null() !< - real (kind=kind_phys), pointer :: hflxq(:) => null() !< real (kind=kind_phys), pointer :: hflx_ice(:) => null() !< real (kind=kind_phys), pointer :: hflx_land(:) => null() !< real (kind=kind_phys), pointer :: hflx_ocean(:) => null() !< @@ -1786,8 +1724,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: qss_ice(:) => null() !< real (kind=kind_phys), pointer :: qss_land(:) => null() !< real (kind=kind_phys), pointer :: qss_ocean(:) => null() !< - real (kind=kind_phys), pointer :: qs1(:) => null() !< - real (kind=kind_phys), pointer :: qv1(:) => null() !< logical :: radar_reset !< real (kind=kind_phys) :: raddt !< real (kind=kind_phys), pointer :: rainmp(:) => null() !< @@ -1801,9 +1737,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: rb_ocean(:) => null() !< logical :: reset !< real (kind=kind_phys), pointer :: rhc(:,:) => null() !< - real (kind=kind_phys), pointer :: rho1(:) => null() !< real (kind=kind_phys), pointer :: runoff(:) => null() !< - real (kind=kind_phys), pointer :: runoff_in_m_sm1(:) => null() !< real (kind=kind_phys), pointer :: save_q(:,:,:) => null() !< real (kind=kind_phys), pointer :: save_t(:,:) => null() !< real (kind=kind_phys), pointer :: save_u(:,:) => null() !< @@ -1819,40 +1753,27 @@ module GFS_typedefs real (kind=kind_phys), pointer :: sigmafrac(:,:) => null() !< real (kind=kind_phys), pointer :: sigmatot(:,:) => null() !< logical :: skip_macro !< - real (kind=kind_phys), pointer :: slc_save(:,:) => null() !< integer, pointer :: slopetype(:) => null() !< - real (kind=kind_phys), pointer :: smcmax(:) => null() !< - real (kind=kind_phys), pointer :: smc_save(:,:) => null() !< real (kind=kind_phys), pointer :: snowc(:) => null() !< real (kind=kind_phys), pointer :: snowd_ice(:) => null() !< real (kind=kind_phys), pointer :: snowd_land(:) => null() !< - real (kind=kind_phys), pointer :: snowd_land_save(:) => null() !< real (kind=kind_phys), pointer :: snowd_ocean(:) => null() !< - real (kind=kind_phys), pointer :: snow_depth(:) => null() !< real (kind=kind_phys), pointer :: snohf(:) => null() !< - real (kind=kind_phys), pointer :: snohf_snow(:) => null() !< - real (kind=kind_phys), pointer :: snohf_frzgra(:) => null() !< - real (kind=kind_phys), pointer :: snohf_snowmelt(:) => null() !< real (kind=kind_phys), pointer :: snowmp(:) => null() !< real (kind=kind_phys), pointer :: snowmt(:) => null() !< - real (kind=kind_phys), pointer :: soilm_in_m(:) => null() !< integer, pointer :: soiltype(:) => null() !< - real (kind=kind_phys), pointer :: stc_save(:,:) => null() !< - real (kind=kind_phys), pointer :: sthick (:) => null() !< real (kind=kind_phys), pointer :: stress(:) => null() !< real (kind=kind_phys), pointer :: stress_ice(:) => null() !< real (kind=kind_phys), pointer :: stress_land(:) => null() !< real (kind=kind_phys), pointer :: stress_ocean(:) => null() !< real (kind=kind_phys), pointer :: t2mmp(:) => null() !< real (kind=kind_phys), pointer :: theta(:) => null() !< - real (kind=kind_phys), pointer :: th1(:) => null() !< real (kind=kind_phys), pointer :: tice(:) => null() !< real (kind=kind_phys), pointer :: tlvl(:,:) => null() !< real (kind=kind_phys), pointer :: tlyr(:,:) => null() !< real (kind=kind_phys), pointer :: tprcp_ice(:) => null() !< real (kind=kind_phys), pointer :: tprcp_land(:) => null() !< real (kind=kind_phys), pointer :: tprcp_ocean(:) => null() !< - real (kind=kind_phys), pointer :: tprcp_rate_land(:) => null() !< integer :: tracers_start_index !< integer :: tracers_total !< integer :: tracers_water !< @@ -1862,7 +1783,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsfa(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ice(:) => null() !< real (kind=kind_phys), pointer :: tsfc_land(:) => null() !< - real (kind=kind_phys), pointer :: tsfc_land_save(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ocean(:) => null() !< real (kind=kind_phys), pointer :: tsfg(:) => null() !< real (kind=kind_phys), pointer :: sktp1r(:) => null() !< @@ -1882,7 +1802,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: wcbmax(:) => null() !< real (kind=kind_phys), pointer :: weasd_ocean(:) => null() !< real (kind=kind_phys), pointer :: weasd_land(:) => null() !< - real (kind=kind_phys), pointer :: weasd_land_save(:) => null() !< real (kind=kind_phys), pointer :: weasd_ice(:) => null() !< real (kind=kind_phys), pointer :: wind(:) => null() !< real (kind=kind_phys), pointer :: work1(:) => null() !< @@ -2121,7 +2040,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%tsfco (IM)) allocate (Sfcprop%tsfcl (IM)) allocate (Sfcprop%tisfc (IM)) - allocate (Sfcprop%tiice (IM,Model%kice)) allocate (Sfcprop%snowd (IM)) allocate (Sfcprop%zorl (IM)) allocate (Sfcprop%zorlo (IM)) @@ -2138,7 +2056,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%tsfco = clear_val Sfcprop%tsfcl = clear_val Sfcprop%tisfc = clear_val - Sfcprop%tiice = clear_val Sfcprop%snowd = clear_val Sfcprop%zorl = clear_val Sfcprop%zorlo = clear_val @@ -2282,7 +2199,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%iceprv = clear_val Sfcprop%snowprv = clear_val Sfcprop%graupelprv = clear_val - end if + end if ! Noah MP allocate and init when used ! if (Model%lsm == Model%lsm_noahmp ) then @@ -2371,23 +2288,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%dgraupelprv = clear_val endif - - ! HWRF NOAH LSM allocate and init when used - ! - if (Model%lsm == Model%lsm_noah_wrfv4 ) then - allocate(Sfcprop%snotime(IM)) - Sfcprop%snotime = clear_val - end if - - if (Model%do_myjsfc.or.Model%do_myjpbl.or.(Model%lsm == Model%lsm_noah_wrfv4)) then - allocate(Sfcprop%z0base(IM)) - Sfcprop%z0base = clear_val - end if - if (Model%lsm == Model%lsm_noah_wrfv4) then - allocate(Sfcprop%semisbase(IM)) - Sfcprop%semisbase = clear_val - end if - + if (Model%lsm == Model%lsm_ruc) then ! For land surface models with different numbers of levels than the four NOAH levels allocate (Sfcprop%wetness (IM)) @@ -2497,7 +2398,7 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%sfcnsw = clear_val Coupling%sfcdlw = clear_val - if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global) then + if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm) then allocate (Coupling%rain_cpl (IM)) allocate (Coupling%snow_cpl (IM)) Coupling%rain_cpl = clear_val @@ -2630,27 +2531,29 @@ subroutine coupling_create (Coupling, IM, Model) endif !-- cellular automata - allocate (Coupling%condition(IM)) - allocate (Coupling%vfact_ca(Model%levs)) if (Model%do_ca) then - allocate (Coupling%ca1 (IM)) - allocate (Coupling%ca2 (IM)) - allocate (Coupling%ca3 (IM)) + allocate (Coupling%tconvtend (IM,Model%levs)) + allocate (Coupling%qconvtend (IM,Model%levs)) + allocate (Coupling%uconvtend (IM,Model%levs)) + allocate (Coupling%vconvtend (IM,Model%levs)) + allocate (Coupling%cape (IM)) + allocate (Coupling%ca_out (IM)) allocate (Coupling%ca_deep (IM)) allocate (Coupling%ca_turb (IM)) allocate (Coupling%ca_shal (IM)) allocate (Coupling%ca_rad (IM)) allocate (Coupling%ca_micro (IM)) - Coupling%vfact_ca = clear_val - Coupling%ca1 = clear_val - Coupling%ca2 = clear_val - Coupling%ca3 = clear_val + Coupling%ca_out = clear_val Coupling%ca_deep = clear_val Coupling%ca_turb = clear_val Coupling%ca_shal = clear_val Coupling%ca_rad = clear_val Coupling%ca_micro = clear_val - Coupling%condition = clear_val + Coupling%cape = clear_val + Coupling%tconvtend = clear_val + Coupling%qconvtend = clear_val + Coupling%uconvtend = clear_val + Coupling%vconvtend = clear_val endif ! -- GSDCHEM coupling options @@ -2669,7 +2572,7 @@ subroutine coupling_create (Coupling, IM, Model) endif !--- stochastic physics option - if (Model%do_sppt .or. Model%ca_global)then + if (Model%do_sppt) then allocate (Coupling%sppt_wts (IM,Model%levs)) Coupling%sppt_wts = clear_val endif @@ -2857,10 +2760,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !---Max hourly real(kind=kind_phys) :: avg_max_length = 3600. !< reset value in seconds for max hourly !--- Ferrier-Aligo microphysical parameters - real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only; for 3-km domain + real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only logical :: spec_adv = .true. !< Individual cloud species advected - integer :: icloud = 0 !< cloud effect to the optical depth in radiation; this also controls the cloud fraction options - !< 3: with cloud effect from FA, and use cloud fraction option 3, based on Sundqvist et al. (1989) !--- M-G microphysical parameters integer :: fprcp = 0 !< no prognostic rain and snow (MG) integer :: pdfflag = 4 !< pdf flag for MG macro physics @@ -2911,19 +2812,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: lsoil = 4 !< number of soil layers integer :: lsoil_lsm = -1 !< number of soil layers internal to land surface model; -1 use lsoil integer :: lsnow_lsm = 3 !< maximum number of snow layers internal to land surface model - logical :: rdlai = .false. !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4) - logical :: ua_phys = .false. !< flag for using University of Arizona? extension to NOAH LSM WRFv4 - logical :: usemonalb = .true. !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 - real(kind=kind_phys) :: aoasis = 1.0 !< potential evaporation multiplication factor for NOAH LSM WRFv4 - integer :: fasdas = 0 !< flag to use "flux-adjusting surface data assimilation system"; 0 = OFF, 1 = ON + logical :: rdlai = .false. integer :: ivegsrc = 2 !< ivegsrc = 0 => USGS, !< ivegsrc = 1 => IGBP (20 category) !< ivegsrc = 2 => UMD (13 category) integer :: isot = 0 !< isot = 0 => Zobler soil type ( 9 category) !< isot = 1 => STATSGO soil type (19 category) - integer :: iopt_thcnd = 1 !< option to treat thermal conductivity in Noah LSM (new in 3.8) - !< = 1, original (default) - !< = 2, McCumber and Pielke for silt loam and sandy loam ! -- to use Noah MP, lsm needs to be set to 2 and both ivegsrc and isot are set ! to 1 - MODIS IGBP and STATSGO - the defaults are the same as in the ! scripts;change from namelist @@ -2942,12 +2836,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: iopt_stc = 1 !snow/soil temperature time scheme (only layer 1) logical :: use_ufo = .false. !< flag for gcycle surface option - - logical :: lcurr_sf = .false. !< flag for taking ocean currents into account in GFDL surface layer - logical :: pert_cd = .false. !< flag for perturbing the surface drag coefficient for momentum in surface layer scheme - integer :: ntsflg = 0 !< flag for updating skin temperature in the GFDL surface layer scheme - real(kind=kind_phys) :: sfenth = 0.0 !< enthalpy flux factor 0 zot via charnock ..>0 zot enhanced>15m/s - + !--- tuning parameters for physical parameterizations logical :: ras = .false. !< flag for ras convection scheme logical :: flipv = .true. !< flag for vertical direction flip (ras) @@ -2988,7 +2877,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: shinhong = .false. !< flag for scale-aware Shinhong vertical turbulent mixing scheme logical :: do_ysu = .false. !< flag for YSU vertical turbulent mixing scheme logical :: dspheat = .false. !< flag for tke dissipative heating - logical :: hurr_pbl = .false. !< flag for hurricane-specific options in PBL scheme logical :: lheatstrg = .false. !< flag for canopy heat storage parameterization logical :: cnvcld = .false. logical :: random_clds = .false. !< flag controls whether clouds are random @@ -3011,8 +2899,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 0: initial version of satmedmf (Nov. 2018) !< 1: updated version of satmedmf (as of May 2019) logical :: do_deep = .true. !< whether to do deep convection - logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme - logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme + logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme integer :: grav_settling = 0 @@ -3027,9 +2914,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: bl_mynn_cloudmix = 1 integer :: bl_mynn_mixqt = 0 integer :: icloud_bl = 1 - real(kind=kind_phys) :: var_ric = 1.0 - real(kind=kind_phys) :: coef_ric_l = 0.16 - real(kind=kind_phys) :: coef_ric_s = 0.25 logical :: do_myjsfc = .false. !< flag for MYJ surface layer scheme logical :: do_myjpbl = .false. !< flag for MYJ PBL scheme @@ -3107,6 +2991,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< nstf_name(5) : zsea2 in mm !--- fractional grid logical :: frac_grid = .false. !< flag for fractional grid + logical :: frac_grid_off = .true. !< flag for using fractional grid logical :: ignore_lake = .true. !< flag for ignoring lakes real(kind=kind_phys) :: min_lakeice = 0.15d0 !< minimum lake ice value real(kind=kind_phys) :: min_seaice = 1.0d-11 !< minimum sea ice value @@ -3120,44 +3005,33 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 7=slightly decrease Cd for higher wind speed compare to 6 !< negative when cplwav2atm=.true. - i.e. two way wave coupling -!--- vertical diffusion +!--- background vertical diffusion real(kind=kind_phys) :: xkzm_m = 1.0d0 !< [in] bkgd_vdif_m background vertical diffusion for momentum real(kind=kind_phys) :: xkzm_h = 1.0d0 !< [in] bkgd_vdif_h background vertical diffusion for heat q real(kind=kind_phys) :: xkzm_s = 1.0d0 !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion real(kind=kind_phys) :: xkzminv = 0.3 !< diffusivity in inversion layers real(kind=kind_phys) :: moninq_fac = 1.0 !< turbulence diffusion coefficient factor real(kind=kind_phys) :: dspfac = 1.0 !< tke dissipative heating factor + real(kind=kind_phys) :: bl_upfr = 0.13 !< updraft fraction in boundary layer mass flux scheme real(kind=kind_phys) :: bl_dnfr = 0.1 !< downdraft fraction in boundary layer mass flux scheme -!--- parameters for canopy heat storage (CHS) parameterization - real(kind=kind_phys) :: z0fac = 0.3 - real(kind=kind_phys) :: e0fac = 0.5 - !---Cellular automaton options integer :: nca = 1 integer :: ncells = 5 - integer :: nlives = 30 - integer :: nca_g = 1 - integer :: ncells_g = 1 - integer :: nlives_g = 100 + integer :: nlives = 10 real(kind=kind_phys) :: nfracseed = 0.5 integer :: nseed = 100000 - integer :: nseed_g = 100 integer :: iseed_ca = 0 integer :: nspinup = 1 logical :: do_ca = .false. logical :: ca_sgs = .false. logical :: ca_global = .false. logical :: ca_smooth = .false. + logical :: isppt_deep = .false. real(kind=kind_phys) :: nthresh = 0.0 - real :: ca_amplitude = 500. - integer :: nsmooth = 100 - logical :: ca_closure = .false. - logical :: ca_entr = .false. - logical :: ca_trigger = .false. - + !--- IAU options real(kind=kind_phys) :: iau_delthrs = 0 !< iau time interval (to scale increments) character(len=240) :: iau_inc_files(7) = '' !< list of increment files @@ -3226,13 +3100,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & avg_max_length, & !--- land/surface model control lsm, lsoil, lsoil_lsm, lsnow_lsm, rdlai, & - nmtvr, ivegsrc, use_ufo, iopt_thcnd, ua_phys, usemonalb, & - aoasis, fasdas, & + nmtvr, ivegsrc, use_ufo, & ! Noah MP options iopt_dveg,iopt_crs,iopt_btr,iopt_run,iopt_sfc, iopt_frz, & iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, & - ! GFDL surface layer options - lcurr_sf, pert_cd, ntsflg, sfenth, & !--- physical parameterizations ras, trans_trac, old_monin, cnvgwd, mstrat, moist_adj, & cscnv, cal_pre, do_aw, do_shoc, shocaftcnv, shoc_cld, & @@ -3241,11 +3112,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & bl_mynn_cloudpdf, bl_mynn_edmf, bl_mynn_edmf_mom, & bl_mynn_edmf_tke, bl_mynn_edmf_part, bl_mynn_cloudmix, & bl_mynn_mixqt, icloud_bl, bl_mynn_tkeadvect, gwd_opt, & - var_ric, coef_ric_l, coef_ric_s, & do_myjsfc, do_myjpbl, & - hwrf_samfdeep, hwrf_samfshal, & h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, & - shinhong, do_ysu, dspheat, hurr_pbl, lheatstrg, cnvcld, & + shinhong, do_ysu, dspheat, lheatstrg, cnvcld, & random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, & do_deep, jcap, & cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, & @@ -3254,7 +3123,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- Rayleigh friction prslrd0, ral_ts, ldiag_ugwp, do_ugwp, do_tofd, & ! --- Ferrier-Aligo - spec_adv, rhgrd, icloud, & + spec_adv, rhgrd, & !--- mass flux deep convection clam_deep, c0s_deep, c1_deep, betal_deep, & betas_deep, evfact_deep, evfactl_deep, pgcon_deep, & @@ -3264,19 +3133,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- near surface sea temperature model nst_anl, lsea, nstf_name, & frac_grid, min_lakeice, min_seaice, min_lake_height, & - ignore_lake, & + frac_grid_off, ignore_lake, & !--- surface layer sfc_z0_type, & - ! vertical diffusion + ! background vertical diffusion xkzm_m, xkzm_h, xkzm_s, xkzminv, moninq_fac, dspfac, & bl_upfr, bl_dnfr, & - !--- canopy heat storage parameterization - z0fac, e0fac, & !--- cellular automata - nca, ncells, nlives, nca_g, ncells_g, nlives_g, nfracseed, & - nseed, nseed_g, nthresh, do_ca, & - ca_sgs, ca_global,iseed_ca,ca_smooth, & - nspinup,ca_amplitude,nsmooth,ca_closure,ca_entr,ca_trigger, & + nca, ncells, nlives, nfracseed,nseed, nthresh, do_ca, & + ca_sgs, ca_global,iseed_ca,ca_smooth,isppt_deep,nspinup, & !--- IAU iau_delthrs,iaufhrs,iau_inc_files,iau_filter_increments, & iau_drymassfixer, & @@ -3522,7 +3387,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- F-A MP parameters Model%rhgrd = rhgrd Model%spec_adv = spec_adv - Model%icloud = icloud !--- gfdl MP parameters Model%lgfdlmprad = lgfdlmprad @@ -3533,8 +3397,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lsm = lsm Model%lsoil = lsoil ! Consistency check for RUC LSM - if ((Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noah_wrfv4) .and. Model%nscyc>0) then - write(0,*) 'Logic error: RUC LSM and NOAH WRFv4 LSM cannot be used with surface data cycling at this point (fhcyc>0)' + if (Model%lsm == Model%lsm_ruc .and. Model%nscyc>0) then + write(0,*) 'Logic error: RUC LSM cannot be used with surface data cycling at this point (fhcyc>0)' stop end if ! Flag to read leaf area index from input files (initial conditions) @@ -3557,24 +3421,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Set lower bound for LSM model, runs from negative (above surface) to surface (zero) Model%lsnow_lsm_lbound = -Model%lsnow_lsm+1 end if - Model%isurban = -999 !GJF isurban is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init - Model%isice = -999 !GJF isice is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init - Model%iswater = -999 !GJF iswater is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init - Model%iopt_thcnd = iopt_thcnd - Model%ua_phys = ua_phys - Model%usemonalb = usemonalb - Model%aoasis = aoasis - Model%fasdas = fasdas Model%ivegsrc = ivegsrc Model%isot = isot Model%use_ufo = use_ufo - -! GFDL surface layer options - Model%lcurr_sf = lcurr_sf - Model%pert_cd = pert_cd - Model%ntsflg = ntsflg - Model%sfenth = sfenth - + ! Noah MP options from namelist ! Model%iopt_dveg = iopt_dveg @@ -3610,19 +3460,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shoc_parm = shoc_parm Model%shocaftcnv = shocaftcnv Model%shoc_cld = shoc_cld - -!HWRF physics suite - if (hwrf_samfdeep .and. imfdeepcnv/=2) then - write(*,*) 'Logic error: hwrf_samfdeep requires imfdeepcnv=2' - stop - end if - if (hwrf_samfshal .and. imfshalcnv/=2) then - write(*,*) 'Logic error: hwrf_samfshal requires imfshalcnv=2' - stop - end if - Model%hwrf_samfdeep = hwrf_samfdeep - Model%hwrf_samfshal = hwrf_samfshal - if (oz_phys .and. oz_phys_2015) then write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.' stop @@ -3649,7 +3486,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shinhong = shinhong Model%do_ysu = do_ysu Model%dspheat = dspheat - Model%hurr_pbl = hurr_pbl Model%lheatstrg = lheatstrg Model%cnvcld = cnvcld Model%random_clds = random_clds @@ -3688,10 +3524,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%bl_mynn_tkeadvect = bl_mynn_tkeadvect Model%grav_settling = grav_settling Model%icloud_bl = icloud_bl - Model%var_ric = var_ric - Model%coef_ric_l = coef_ric_l - Model%coef_ric_s = coef_ric_s - Model%gwd_opt = gwd_opt Model%do_myjsfc = do_myjsfc Model%do_myjpbl = do_myjpbl @@ -3725,7 +3557,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- fractional grid Model%frac_grid = frac_grid + Model%frac_grid_off = frac_grid_off Model%ignore_lake = ignore_lake + if (Model%frac_grid) then + write(0,*) "ERROR: CCPP has not been tested with fractional landmask turned on" +! stop + end if Model%min_lakeice = min_lakeice Model%min_seaice = min_seaice Model%min_lake_height = min_lake_height @@ -3735,7 +3572,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%sfc_z0_type = sfc_z0_type if (Model%cplwav2atm) Model%sfc_z0_type = -1 -!--- vertical diffusion +!--- backgroud vertical diffusion Model%xkzm_m = xkzm_m Model%xkzm_h = xkzm_h Model%xkzm_s = xkzm_s @@ -3745,10 +3582,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%bl_upfr = bl_upfr Model%bl_dnfr = bl_dnfr -!--- canopy heat storage parametrization - Model%z0fac = z0fac - Model%e0fac = e0fac - !--- stochastic physics options ! do_sppt, do_shum, do_skeb and do_sfcperts are namelist variables in group ! physics that are parsed here and then compared in init_stochastic_physics @@ -3770,24 +3603,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nca = nca Model%ncells = ncells Model%nlives = nlives - Model%nca_g = nca_g - Model%ncells_g = ncells_g - Model%nlives_g = nlives_g Model%nfracseed = nfracseed Model%nseed = nseed - Model%nseed_g = nseed_g Model%ca_global = ca_global Model%do_ca = do_ca Model%ca_sgs = ca_sgs Model%iseed_ca = iseed_ca Model%ca_smooth = ca_smooth + Model%isppt_deep = isppt_deep Model%nspinup = nspinup Model%nthresh = nthresh - Model%ca_amplitude = ca_amplitude - Model%nsmooth = nsmooth - Model%ca_closure = ca_closure - Model%ca_entr = ca_entr - Model%ca_trigger = ca_trigger ! IAU flags !--- iau parameters @@ -4050,8 +3875,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,'iopt_stc = ', Model%iopt_stc elseif (Model%lsm == Model%lsm_ruc) then print *,' RUC Land Surface Model used' - elseif (Model%lsm == Model%lsm_noah_wrfv4) then - print *,' NOAH WRFv4 Land Surface Model used' else print *,' Unsupported LSM type - job aborted - lsm=',Model%lsm stop @@ -4062,7 +3885,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif print *,' nst_anl=',Model%nst_anl,' use_ufo=',Model%use_ufo,' frac_grid=',Model%frac_grid,& - ' ignore_lake=',ignore_lake + ' frac_grid_off=',frac_grid_off,' ignore_lake=',ignore_lake print *,' min_lakeice=',Model%min_lakeice,' min_seaice=',Model%min_seaice, & 'min_lake_height=',Model%min_lake_height if (Model%nstf_name(1) > 0 ) then @@ -4162,15 +3985,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,' Radiative heating calculated at',Model%levr, ' layers' if (Model%iovr_sw == 0) then print *,' random cloud overlap for Shortwave IOVR_SW=',Model%iovr_sw - elseif (Model%iovr_sw == 4) then - print *,'exponential cloud overlap for Shortwave IOVR_SW=',Model%iovr_lw else print *,' max-random cloud overlap for Shortwave IOVR_SW=',Model%iovr_sw endif if (Model%iovr_lw == 0) then print *,' random cloud overlap for Longwave IOVR_LW=',Model%iovr_lw - elseif (Model%iovr_lw == 4) then - print *,'exponential cloud overlap for Longwave IOVR_LW=',Model%iovr_lw else print *,' max-random cloud overlap for Longwave IOVR_LW=',Model%iovr_lw endif @@ -4552,7 +4371,6 @@ subroutine control_print(Model) print *, ' Ferrier-Aligo microphysical parameters' print *, ' spec_adv : ', Model%spec_adv print *, ' rhgrd : ', Model%rhgrd - print *, ' icloud : ', Model%icloud print *, ' ' endif @@ -4564,13 +4382,6 @@ subroutine control_print(Model) print *, ' lsnow_lsm : ', Model%lsnow_lsm print *, ' ivegsrc : ', Model%ivegsrc print *, ' isot : ', Model%isot - print *, ' iopt_thcnd : ', Model%iopt_thcnd - print *, ' ua_phys : ', Model%ua_phys - print *, ' usemonalb : ', Model%usemonalb - print *, ' aoasis : ', Model%aoasis - print *, ' fasdas : ', Model%fasdas - print *, ' ivegsrc : ', Model%ivegsrc - print *, ' isot : ', Model%isot if (Model%lsm == Model%lsm_noahmp) then print *, ' Noah MP LSM is used, the options are' @@ -4589,10 +4400,6 @@ subroutine control_print(Model) endif print *, ' use_ufo : ', Model%use_ufo - print *, ' lcurr_sf : ', Model%lcurr_sf - print *, ' pert_cd : ', Model%pert_cd - print *, ' ntsflg : ', Model%ntsflg - print *, ' sfenth : ', Model%sfenth print *, ' ' print *, 'tuning parameters for physical parameterizations' print *, ' ras : ', Model%ras @@ -4653,10 +4460,6 @@ subroutine control_print(Model) print *, ' do_myjsfc : ', Model%do_myjsfc print *, ' do_myjpbl : ', Model%do_myjpbl print *, ' gwd_opt : ', Model%gwd_opt - print *, ' hurr_pbl : ', Model%hurr_pbl - print *, ' var_ric : ', Model%var_ric - print *, ' coef_ric_l : ', Model%coef_ric_l - print *, ' coef_ric_s : ', Model%coef_ric_s print *, ' ' print *, 'Rayleigh friction' print *, ' prslrd0 : ', Model%prslrd0 @@ -4692,7 +4495,7 @@ subroutine control_print(Model) print *, 'surface layer options' print *, ' sfc_z0_type : ', Model%sfc_z0_type print *, ' ' - print *, 'vertical diffusion coefficients' + print *, 'background vertical diffusion coefficients' print *, ' xkzm_m : ', Model%xkzm_m print *, ' xkzm_h : ', Model%xkzm_h print *, ' xkzm_s : ', Model%xkzm_s @@ -4702,10 +4505,6 @@ subroutine control_print(Model) print *, ' bl_upfr : ', Model%bl_upfr print *, ' bl_dnfr : ', Model%bl_dnfr print *, ' ' - print *, 'parameters for canopy heat storage parametrization' - print *, ' z0fac : ', Model%z0fac - print *, ' e0fac : ', Model%e0fac - print *, ' ' print *, 'stochastic physics' print *, ' do_sppt : ', Model%do_sppt print *, ' do_shum : ', Model%do_shum @@ -4713,27 +4512,19 @@ subroutine control_print(Model) print *, ' do_sfcperts : ', Model%do_sfcperts print *, ' ' print *, 'cellular automata' - print *, ' nca : ', Model%nca + print *, ' nca : ', Model%ncells print *, ' ncells : ', Model%ncells print *, ' nlives : ', Model%nlives - print *, ' nca_g : ', Model%nca_g - print *, ' ncells_g : ', Model%ncells_g - print *, ' nlives_g : ', Model%nlives_g print *, ' nfracseed : ', Model%nfracseed - print *, ' nseed_g : ', Model%nseed_g print *, ' nseed : ', Model%nseed print *, ' ca_global : ', Model%ca_global print *, ' ca_sgs : ', Model%ca_sgs print *, ' do_ca : ', Model%do_ca print *, ' iseed_ca : ', Model%iseed_ca print *, ' ca_smooth : ', Model%ca_smooth + print *, ' isppt_deep : ', Model%isppt_deep print *, ' nspinup : ', Model%nspinup print *, ' nthresh : ', Model%nthresh - print *, ' ca_amplitude : ', Model%ca_amplitude - print *, ' nsmooth : ', Model%nsmooth - print *, ' ca_closure : ', Model%ca_closure - print *, ' ca_entr : ', Model%ca_entr - print *, ' ca_trigger : ', Model%ca_trigger print *, ' ' print *, 'tracers' print *, ' tracer_names : ', Model%tracer_names @@ -4937,7 +4728,7 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%dsnow_cpl = clear_val endif - if (Model%do_sppt .or. Model%ca_global) then + if (Model%do_sppt) then allocate (Tbd%dtdtr (IM,Model%levs)) allocate (Tbd%dtotprcp (IM)) allocate (Tbd%dcnvprcp (IM)) @@ -5004,7 +4795,8 @@ subroutine tbd_create (Tbd, IM, Model) allocate (Tbd%phy_myj_thz0 (IM)) allocate (Tbd%phy_myj_qz0 (IM)) allocate (Tbd%phy_myj_uz0 (IM)) - allocate (Tbd%phy_myj_vz0 (IM)) + allocate (Tbd%phy_myj_vz0 (IM)) + allocate (Tbd%phy_myj_z0base (IM)) allocate (Tbd%phy_myj_akhs (IM)) allocate (Tbd%phy_myj_akms (IM)) allocate (Tbd%phy_myj_chkqlm (IM)) @@ -5017,7 +4809,8 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%phy_myj_thz0 = clear_val Tbd%phy_myj_qz0 = clear_val Tbd%phy_myj_uz0 = clear_val - Tbd%phy_myj_vz0 = clear_val + Tbd%phy_myj_vz0 = clear_val + Tbd%phy_myj_z0base = clear_val Tbd%phy_myj_akhs = clear_val Tbd%phy_myj_akms = clear_val Tbd%phy_myj_chkqlm = clear_val @@ -5210,15 +5003,13 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%sppt_wts(IM,Model%levs)) allocate (Diag%shum_wts(IM,Model%levs)) allocate (Diag%zmtnblck(IM)) - allocate (Diag%ca1 (IM)) - allocate (Diag%ca2 (IM)) - allocate (Diag%ca3 (IM)) ! F-A MP scheme if (Model%imp_physics == Model%imp_physics_fer_hires) then allocate (Diag%TRAIN (IM,Model%levs)) end if + allocate (Diag%ca_out (IM)) allocate (Diag%ca_deep (IM)) allocate (Diag%ca_turb (IM)) allocate (Diag%ca_shal (IM)) @@ -5313,9 +5104,6 @@ subroutine diag_create (Diag, IM, Model) !--- 3D diagnostics for Thompson MP / GFDL MP allocate (Diag%refl_10cm(IM,Model%levs)) - !--- New PBL Diagnostics - allocate (Diag%dkudiagnostic(IM,Model%levs)) - !-- New max hourly diag. allocate (Diag%refdmax(IM)) allocate (Diag%refdmax263k(IM)) @@ -5521,9 +5309,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%totgrpb = zero ! if (Model%do_ca) then - Diag%ca1 = zero - Diag%ca2 = zero - Diag%ca3 = zero + Diag%ca_out = zero Diag%ca_deep = zero Diag%ca_turb = zero Diag%ca_shal = zero @@ -5608,9 +5394,6 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) endif !----------------------------- -! Extra PBL diagnostics - Diag%dkudiagnostic = zero - ! max hourly diagnostics Diag%refl_10cm = zero Diag%refdmax = -35. @@ -5813,7 +5596,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%ep1d_land (IM)) allocate (Interstitial%ep1d_ocean (IM)) allocate (Interstitial%evap (IM)) - allocate (Interstitial%evapq (IM)) allocate (Interstitial%evap_ice (IM)) allocate (Interstitial%evap_land (IM)) allocate (Interstitial%evap_ocean (IM)) @@ -5856,10 +5638,7 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%gwdcu (IM,Model%levs)) allocate (Interstitial%gwdcv (IM,Model%levs)) allocate (Interstitial%h2o_pres (levh2o)) - allocate (Interstitial%hefac (IM)) - allocate (Interstitial%hffac (IM)) allocate (Interstitial%hflx (IM)) - allocate (Interstitial%hflxq (IM)) allocate (Interstitial%hflx_ice (IM)) allocate (Interstitial%hflx_land (IM)) allocate (Interstitial%hflx_ocean (IM)) @@ -6091,34 +5870,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%t2mmp (IM)) allocate (Interstitial%q2mp (IM)) end if - if (Model%lsm == Model%lsm_noah_wrfv4) then - allocate (Interstitial%canopy_save (IM)) - allocate (Interstitial%chk_land (IM)) - allocate (Interstitial%cmc (IM)) - allocate (Interstitial%dqsdt2 (IM)) - allocate (Interstitial%drain_in_m_sm1 (IM)) - allocate (Interstitial%flag_lsm (IM)) - allocate (Interstitial%flag_lsm_glacier(IM)) - allocate (Interstitial%qs1 (IM)) - allocate (Interstitial%qv1 (IM)) - allocate (Interstitial%rho1 (IM)) - allocate (Interstitial%runoff_in_m_sm1 (IM)) - allocate (Interstitial%slc_save (IM,Model%lsoil)) - allocate (Interstitial%smcmax (IM)) - allocate (Interstitial%smc_save (IM,Model%lsoil)) - allocate (Interstitial%snowd_land_save (IM)) - allocate (Interstitial%snow_depth (IM)) - allocate (Interstitial%snohf_snow (IM)) - allocate (Interstitial%snohf_frzgra (IM)) - allocate (Interstitial%snohf_snowmelt (IM)) - allocate (Interstitial%soilm_in_m (IM)) - allocate (Interstitial%stc_save (IM,Model%lsoil)) - allocate (Interstitial%sthick (Model%lsoil)) - allocate (Interstitial%th1 (IM)) - allocate (Interstitial%tprcp_rate_land (IM)) - allocate (Interstitial%tsfc_land_save (IM)) - allocate (Interstitial%weasd_land_save (IM)) - end if ! ! Set components that do not change Interstitial%frain = Model%dtf/Model%dtp @@ -6490,7 +6241,6 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%ep1d_land = huge Interstitial%ep1d_ocean = huge Interstitial%evap = clear_val - Interstitial%evapq = clear_val Interstitial%evap_ice = huge Interstitial%evap_land = huge Interstitial%evap_ocean = huge @@ -6529,10 +6279,7 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%gflx_ocean = clear_val Interstitial%gwdcu = clear_val Interstitial%gwdcv = clear_val - Interstitial%hefac = clear_val - Interstitial%hffac = clear_val Interstitial%hflx = clear_val - Interstitial%hflxq = clear_val Interstitial%hflx_ice = huge Interstitial%hflx_land = huge Interstitial%hflx_ocean = huge @@ -6686,34 +6433,6 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%t2mmp = clear_val Interstitial%q2mp = clear_val end if - if (Model%lsm == Model%lsm_noah_wrfv4) then - Interstitial%canopy_save = clear_val - Interstitial%chk_land = huge - Interstitial%cmc = clear_val - Interstitial%dqsdt2 = clear_val - Interstitial%drain_in_m_sm1 = clear_val - Interstitial%flag_lsm = .false. - Interstitial%flag_lsm_glacier= .false. - Interstitial%qs1 = huge - Interstitial%qv1 = huge - Interstitial%rho1 = clear_val - Interstitial%runoff_in_m_sm1 = clear_val - Interstitial%slc_save = clear_val - Interstitial%smcmax = clear_val - Interstitial%smc_save = clear_val - Interstitial%snowd_land_save = huge - Interstitial%snow_depth = clear_val - Interstitial%snohf_snow = clear_val - Interstitial%snohf_frzgra = clear_val - Interstitial%snohf_snowmelt = clear_val - Interstitial%soilm_in_m = clear_val - Interstitial%stc_save = clear_val - Interstitial%sthick = clear_val - Interstitial%th1 = clear_val - Interstitial%tprcp_rate_land = huge - Interstitial%tsfc_land_save = huge - Interstitial%weasd_land_save = huge - end if ! ! Set flag for resetting maximum hourly output fields Interstitial%reset = mod(Model%kdt-1, nint(Model%avg_max_length/Model%dtp)) == 0 @@ -6833,7 +6552,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%ep1d_land ) = ', sum(Interstitial%ep1d_land ) write (0,*) 'sum(Interstitial%ep1d_ocean ) = ', sum(Interstitial%ep1d_ocean ) write (0,*) 'sum(Interstitial%evap ) = ', sum(Interstitial%evap ) - write (0,*) 'sum(Interstitial%evapq ) = ', sum(Interstitial%evapq ) write (0,*) 'sum(Interstitial%evap_ice ) = ', sum(Interstitial%evap_ice ) write (0,*) 'sum(Interstitial%evap_land ) = ', sum(Interstitial%evap_land ) write (0,*) 'sum(Interstitial%evap_ocean ) = ', sum(Interstitial%evap_ocean ) @@ -6876,10 +6594,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%gflx_ocean ) = ', sum(Interstitial%gflx_ocean ) write (0,*) 'sum(Interstitial%gwdcu ) = ', sum(Interstitial%gwdcu ) write (0,*) 'sum(Interstitial%gwdcv ) = ', sum(Interstitial%gwdcv ) - write (0,*) 'sum(Interstitial%hefac ) = ', sum(Interstitial%hefac ) - write (0,*) 'sum(Interstitial%hffac ) = ', sum(Interstitial%hffac ) write (0,*) 'sum(Interstitial%hflx ) = ', sum(Interstitial%hflx ) - write (0,*) 'sum(Interstitial%hflxq ) = ', sum(Interstitial%hflxq ) write (0,*) 'sum(Interstitial%hflx_ice ) = ', sum(Interstitial%hflx_ice ) write (0,*) 'sum(Interstitial%hflx_land ) = ', sum(Interstitial%hflx_land ) write (0,*) 'sum(Interstitial%hflx_ocean ) = ', sum(Interstitial%hflx_ocean ) @@ -7100,31 +6815,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%t2mmp ) = ', sum(Interstitial%t2mmp ) write (0,*) 'sum(Interstitial%q2mp ) = ', sum(Interstitial%q2mp ) end if - if (Model%lsm == Model%lsm_noah_wrfv4) then - write (0,*) 'sum(Interstitial%canopy_save ) = ', sum(Interstitial%canopy_save ) - write (0,*) 'sum(Interstitial%chk_land ) = ', sum(Interstitial%chk_land ) - write (0,*) 'sum(Interstitial%cmc ) = ', sum(Interstitial%cmc ) - write (0,*) 'sum(Interstitial%dqsdt2 ) = ', sum(Interstitial%dqsdt2 ) - write (0,*) 'sum(Interstitial%drain_in_m_sm1 ) = ', sum(Interstitial%drain_in_m_sm1 ) - write (0,*) 'Interstitial%flag_lsm(1) = ', Interstitial%flag_lsm(1) - write (0,*) 'Interstitial%flag_lsm_glacier(1) = ', Interstitial%flag_lsm_glacier(1) - write (0,*) 'sum(Interstitial%qs1 ) = ', sum(Interstitial%qs1 ) - write (0,*) 'sum(Interstitial%qv1 ) = ', sum(Interstitial%qv1 ) - write (0,*) 'sum(Interstitial%rho1 ) = ', sum(Interstitial%rho1 ) - write (0,*) 'sum(Interstitial%runoff_in_m_sm1 ) = ', sum(Interstitial%runoff_in_m_sm1 ) - write (0,*) 'sum(Interstitial%smcmax ) = ', sum(Interstitial%smcmax ) - write (0,*) 'sum(Interstitial%snowd_land_save ) = ', sum(Interstitial%snowd_land_save ) - write (0,*) 'sum(Interstitial%snow_depth ) = ', sum(Interstitial%snow_depth ) - write (0,*) 'sum(Interstitial%snohf_snow ) = ', sum(Interstitial%snohf_snow ) - write (0,*) 'sum(Interstitial%snohf_frzgra ) = ', sum(Interstitial%snohf_frzgra ) - write (0,*) 'sum(Interstitial%snohf_snowmelt ) = ', sum(Interstitial%snohf_snowmelt ) - write (0,*) 'sum(Interstitial%soilm_in_m ) = ', sum(Interstitial%soilm_in_m ) - write (0,*) 'sum(Interstitial%sthick ) = ', sum(Interstitial%sthick ) - write (0,*) 'sum(Interstitial%th1 ) = ', sum(Interstitial%th1 ) - write (0,*) 'sum(Interstitial%tprcp_rate_land ) = ', sum(Interstitial%tprcp_rate_land ) - write (0,*) 'sum(Interstitial%tsfc_land_save ) = ', sum(Interstitial%tsfc_land_save ) - write (0,*) 'sum(Interstitial%weasd_land_save ) = ', sum(Interstitial%weasd_land_save ) - end if write (0,*) 'Interstitial_print: end' ! end subroutine interstitial_print diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 729aab57..8614c427 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -492,13 +492,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[tiice] - standard_name = internal_ice_temperature - long_name = sea ice internal temperature - units = K - dimensions = (horizontal_dimension,ice_vertical_dimension) - type = real - kind = kind_phys [snowd] standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth @@ -548,20 +541,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[z0base] - standard_name = baseline_surface_roughness_length - long_name = baseline surface roughness length for momentum in meter - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[semisbase] - standard_name = baseline_surface_longwave_emissivity - long_name = baseline surface lw emissivity in fraction - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [sncovr] standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction @@ -1143,13 +1122,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[snotime] - standard_name = time_since_last_snowfall - long_name = elapsed time since last snowfall - units = s - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [wetness] standard_name = normalized_soil_wetness_for_land_surface_model long_name = normalized soil wetness for lsm @@ -1820,30 +1792,44 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[ca_deep] - standard_name = fraction_of_cellular_automata_for_deep_convection - long_name = fraction of cellular automata for deep convection - units = frac - dimensions = (horizontal_dimension) +[tconvtend] + standard_name = tendency_of_air_temperature_due_to_deep_convection_for_coupling_on_physics_timestep + long_name = tendency of air temperature due to deep convection + units = K + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[vfact_ca] - standard_name = vertical_weight_for_ca - long_name = vertical weight for ca - units = frac - dimensions = (vertical_dimension) +[qconvtend] + standard_name = tendency_of_water_vapor_specific_humidity_due_to_deep_convection_for_coupling_on_physics_timestep + long_name = tendency of specific humidity due to deep convection + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[ca1] - standard_name = cellular_automata_global_pattern - long_name = cellular automata global pattern - units = flag +[uconvtend] + standard_name = tendency_of_x_wind_due_to_deep_convection_for_coupling_on_physics_timestep + long_name = tendency_of_x_wind_due_to_deep_convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[vconvtend] + standard_name = tendency_of_y_wind_due_to_deep_convection_for_coupling_on_physics_timestep + long_name = tendency_of_y_wind_due_to_deep_convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[ca_deep] + standard_name = fraction_of_cellular_automata_for_deep_convection + long_name = fraction of cellular automata for deep convection + units = frac dimensions = (horizontal_dimension) type = real kind = kind_phys -[condition] - standard_name = physics_field_for_coupling - long_name = physics_field_for_coupling +[cape] + standard_name = convective_available_potential_energy_for_coupling + long_name = convective available potential energy for coupling units = m2 s-2 dimensions = (horizontal_dimension) type = real @@ -2812,18 +2798,6 @@ units = flag dimensions = () type = integer -[lsm_noah_wrfv4] - standard_name = flag_for_noah_wrfv4_land_surface_scheme - long_name = flag for NOAH WRFv4 land surface model - units = flag - dimensions = () - type = integer -[kice] - standard_name = ice_vertical_dimension - long_name = vertical loop extent for ice levels, start at 1 - units = count - dimensions = () - type = integer [lsoil] standard_name = soil_vertical_dimension long_name = number of soil layers @@ -2850,35 +2824,10 @@ type = integer [rdlai] standard_name = flag_for_reading_leaf_area_index_from_input - long_name = flag for reading leaf area index from initial conditions - units = flag - dimensions = () - type = logical -[ua_phys] - standard_name = flag_for_noah_lsm_ua_extension - long_name = flag for using University of Arizona(?) extension for NOAH LSM WRFv4 (see module_sf_noahlsm.F) - units = flag - dimensions = () - type = logical -[usemonalb] - standard_name = flag_for_reading_surface_diffused_shortwave_albedo_from_input - long_name = flag for reading surface diffused shortwave albedo for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + long_name = flag for reading leaf area index from initial conditions for RUC LSM units = flag dimensions = () type = logical -[aoasis] - standard_name = potential_evaporation_multiplicative_factor - long_name = potential evaporation multiplicative factor for NOAH LSM WRFv4 (see module_sf_noahlsm.F) - units = none - dimensions = () - type = real - kind = kind_phys -[fasdas] - standard_name = flag_flux_adjusting_surface_data_assimilation_system - long_name = flag to use the flux adjusting surface data assimilation system for NOAH LSM WRFv4 (see module_sf_noahlsm.F) - units = flag - dimensions = () - type = integer [ivegsrc] standard_name = vegetation_type_dataset_choice long_name = land use dataset choice @@ -2891,30 +2840,6 @@ units = index dimensions = () type = integer -[isurban] - standard_name = urban_vegetation_category - long_name = index of the urban vegetation category in the chosen vegetation dataset - units = index - dimensions = () - type = integer -[isice] - standard_name = ice_vegetation_category - long_name = index of the permanent snow/ice category in the chosen vegetation dataset - units = index - dimensions = () - type = integer -[iswater] - standard_name = water_vegetation_category - long_name = index of the water body vegetation category in the chosen vegetation dataset - units = index - dimensions = () - type = integer -[iopt_thcnd] - standard_name = flag_for_thermal_conductivity_option - long_name = choice for thermal conductivity option (see module_sf_noahlsm) - units = index - dimensions = () - type = integer [spec_adv] standard_name = flag_for_individual_cloud_species_advected long_name = flag for individual cloud species advected @@ -3000,31 +2925,6 @@ units = index dimensions = () type = integer -[lcurr_sf] - standard_name = flag_for_ocean_currents_in_surface_layer_scheme - long_name = flag for taking ocean currents into account in surface layer scheme - units = flag - dimensions = () - type = logical -[pert_cd] - standard_name = flag_for_perturbation_of_surface_drag_coefficient_for_momentum_in_air - long_name = flag for perturbing the surface drag coefficient for momentum in surface layer scheme - units = flag - dimensions = () - type = logical -[ntsflg] - standard_name = flag_for_updating_skin_temperatuer_in_surface_layer_scheme - long_name = flag for updating skin temperature in the surface layer scheme - units = flag - dimensions = () - type = integer -[sfenth] - standard_name = enthalpy_flux_factor - long_name = enthalpy flux factor used in surface layer scheme - units = none - dimensions = () - type = real - kind = kind_phys [ras] standard_name = flag_for_ras_deep_convection long_name = flag for ras convection scheme @@ -3158,12 +3058,6 @@ units = flag dimensions = () type = logical -[hurr_pbl] - standard_name = flag_hurricane_PBL - long_name = flag for hurricane-specific options in PBL scheme - units = flag - dimensions = () - type = logical [lheatstrg] standard_name = flag_for_canopy_heat_storage long_name = flag for canopy heat storage parameterization @@ -3236,18 +3130,6 @@ units = flag dimensions = () type = integer -[hwrf_samfdeep] - standard_name = flag_for_hwrf_samfdeepcnv_scheme - long_name = flag for hwrf samfdeepcnv scheme - units = flag - dimensions = () - type = logical -[hwrf_samfshal] - standard_name = flag_for_hwrf_samfshalcnv_scheme - long_name = flag for hwrf samfshalcnv scheme - units = flag - dimensions = () - type = logical [isatmedmf] standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL long_name = choice of scale-aware TKE moist EDMF PBL scheme @@ -3562,7 +3444,7 @@ kind = kind_phys [moninq_fac] standard_name = atmosphere_diffusivity_coefficient_factor - long_name = multiplicative constant for atmospheric diffusivities (AKA alpha) + long_name = multiplicative constant for atmospheric diffusivities units = none dimensions = () type = real @@ -3588,20 +3470,6 @@ dimensions = () type = real kind = kind_phys -[z0fac] - standard_name = surface_roughness_fraction_factor - long_name = surface roughness fraction for canopy heat storage parameterization - units = none - dimensions = () - type = real - kind = kind_phys -[e0fac] - standard_name = latent_heat_flux_fraction_factor_relative_to_sensible_heat_flux - long_name = latent heat flux fraction relative to sensible heat flux for canopy heat storage parameterization - units = none - dimensions = () - type = real - kind = kind_phys [nca] standard_name = number_of_independent_cellular_automata long_name = number of independent cellular automata @@ -3651,30 +3519,18 @@ units = flag dimensions = () type = logical -[ca_closure] - standard_name = flag_for_global_cellular_automata_closure - long_name = switch for ca on closure - units = flag - dimensions = () - type = logical -[ca_entr] - standard_name = flag_for_global_cellular_automata_entr - long_name = switch for ca on entr - units = flag - dimensions = () - type = logical -[ca_trigger] - standard_name = flag_for_global_cellular_automata_trigger - long_name = switch for ca on trigger - units = flag - dimensions = () - type = logical [ca_smooth] standard_name = flag_for_gaussian_spatial_filter long_name = switch for gaussian spatial filter units = flag dimensions = () type = logical +[isppt_deep] + standard_name = flag_for_combination_of_sppt_with_isppt_deep + long_name = switch for combination with isppt_deep. + units = flag + dimensions = () + type = logical [iseed_ca] standard_name = seed_for_random_number_generation_in_cellular_automata_scheme long_name = seed for random number generation in ca scheme @@ -4203,12 +4059,6 @@ dimensions = () type = real kind = kind_phys -[icloud] - standard_name = cloud_effect_to_optical_depth_and_cloud_fraction - long_name = cloud effect to the optical depth and cloud fraction in radiation - units = flag - dimensions = () - type = integer [gwd_opt] standard_name = gwd_opt long_name = flag to choose gwd scheme @@ -4311,27 +4161,6 @@ units = flag dimensions = () type = integer -[var_ric] - standard_name = flag_variable_bulk_richardson_number - long_name = flag for calculating variable bulk richardson number for hurricane PBL - units = flag - dimensions = () - type = real - kind = kind_phys -[coef_ric_l] - standard_name = coefficient_for_variable_bulk_richardson_number_over_land - long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over land - units = none - dimensions = () - type = real - kind = kind_phys -[coef_ric_s] - standard_name = coefficient_for_variable_bulk_richardson_number_over_ocean - long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over ocean - units = none - dimensions = () - type = real - kind = kind_phys [do_ugwp] standard_name = do_ugwp long_name = flag to activate CIRES UGWP @@ -4787,6 +4616,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[phy_myj_z0base] + standard_name = baseline_surface_roughness_length + long_name = baseline surface roughness length for momentum in meter + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [phy_myj_akhs] standard_name = heat_exchange_coefficient_for_MYJ_schemes long_name = surface heat exchange_coefficient for MYJ schemes @@ -5911,13 +5747,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[dkudiagnostic] - standard_name = atmosphere_momentum_diffusivity - long_name = diffusivity for momentum - units = m2 s-1 - dimensions = (horizontal_dimension,vertical_dimension_minus_one) - type = real - kind = kind_phys [ndust] standard_name = number_of_dust_bins_for_diagnostics long_name = number of dust bins for diagnostics @@ -6324,13 +6153,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[canopy_save] - standard_name = canopy_water_amount_save - long_name = canopy water amount before entering a physics scheme - units = kg m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [cd] standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum @@ -6408,13 +6230,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[chk_land] - standard_name = surface_conductance_for_heat_and_moisture_in_air_over_land - long_name = surface conductance for heat & moisture over land - units = m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [cf_upi] standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics @@ -6562,13 +6377,6 @@ dimensions = (horizontal_dimension,4) type = real kind = kind_phys -[cmc] - standard_name = canopy_water_amount_in_m - long_name = canopy water amount in m - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [cmm_ocean] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean @@ -6800,13 +6608,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[dqsdt2] - standard_name = saturation_specific_humidity_slope - long_name = saturation specific humidity slope at lowest model layer - units = K-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [dqsfc1] standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux @@ -6821,13 +6622,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[drain_in_m_sm1] - standard_name = subsurface_runoff_flux_in_m_sm1 - long_name = subsurface runoff flux in m s-1 - units = m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [dtdt] standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics @@ -6982,13 +6776,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[evapq] - standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward latent heat flux reduced by surface roughness - units = kg kg-1 m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [evap_ocean] standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean @@ -7147,18 +6934,6 @@ units = flag dimensions = (horizontal_dimension) type = logical -[flag_lsm] - standard_name = flag_for_calling_land_surface_model - long_name = flag for calling land surface model - units = flag - dimensions = (horizontal_dimension) - type = logical -[flag_lsm_glacier] - standard_name = flag_for_calling_land_surface_model_glacier - long_name = flag for calling land surface model over glacier - units = flag - dimensions = (horizontal_dimension) - type = logical [ffmm_ocean] standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean @@ -7417,20 +7192,6 @@ dimensions = (vertical_dimension_of_h2o_forcing_data) type = real kind = kind_phys -[hefac] - standard_name = surface_upward_latent_heat_flux_reduction_factor - long_name = surface upward latent heat flux reduction factor from canopy heat storage - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[hffac] - standard_name = surface_upward_sensible_heat_flux_reduction_factor - long_name = surface upward sensible heat flux reduction factor from canopy heat storage - units = none - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [hflx] standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux @@ -7438,13 +7199,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[hflxq] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness - long_name = kinematic surface upward sensible heat flux reduced by surface roughness - units = K m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [hflx_ocean] standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean @@ -7945,20 +7699,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[qs1] - standard_name = saturation_specific_humidity_at_lowest_model_layer - long_name = saturation specific humidity at lowest model layer - units = kg kg-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[qv1] - standard_name = bounded_specific_humidity_at_lowest_model_layer_over_land - long_name = specific humidity at lowest model layer over land bounded between a nonzero epsilon and saturation - units = kg kg-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [radar_reset] standard_name = flag_for_resetting_radar_reflectivity_calculation long_name = flag for resetting radar reflectivity calculation @@ -8048,13 +7788,6 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[rho1] - standard_name = air_density_at_lowest_model_layer - long_name = air density at lowest model layer - units = kg m-3 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [runoff] standard_name = surface_runoff_flux long_name = surface runoff flux @@ -8062,13 +7795,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[runoff_in_m_sm1] - standard_name = surface_runoff_flux_in_m_sm1 - long_name = surface runoff flux in m s-1 - units = m s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [save_q(:,:,index_for_liquid_cloud_condensate)] standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme @@ -8193,33 +7919,12 @@ units = flag dimensions = () type = logical -[slc_save] - standard_name = volume_fraction_of_unfrozen_soil_moisture_save - long_name = liquid soil moisture before entering a physics scheme - units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) - type = real - kind = kind_phys [slopetype] standard_name = surface_slope_classification long_name = surface slope type at each grid cell units = index dimensions = (horizontal_dimension) type = integer -[smcmax] - standard_name = soil_porosity - long_name = volumetric soil porosity - units = frac - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[smc_save] - standard_name = volume_fraction_of_soil_moisture_save - long_name = total soil moisture before entering a physics scheme - units = frac - dimensions = (horizontal_dimension,soil_vertical_dimension) - type = real - kind = kind_phys [snowc] standard_name = surface_snow_area_fraction long_name = surface snow area fraction @@ -8241,13 +7946,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[snowd_land_save] - standard_name = surface_snow_thickness_water_equivalent_over_land_save - long_name = water equivalent snow depth over land before entering a physics scheme - units = mm - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [snowd_ice] standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice @@ -8255,13 +7953,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[snow_depth] - standard_name = actual_snow_depth - long_name = actual snow depth - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [snohf] standard_name = snow_freezing_rain_upward_latent_heat_flux long_name = latent heat flux due to snow and frz rain @@ -8269,27 +7960,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[snohf_snow] - standard_name = latent_heat_flux_from_precipitating_snow - long_name = latent heat flux due to precipitating snow - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[snohf_frzgra] - standard_name = latent_heat_flux_from_freezing_rain - long_name = latent heat flux due to freezing rain - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[snohf_snowmelt] - standard_name = latent_heat_flux_due_to_snowmelt - long_name = latent heat flux due to snowmelt phase change - units = W m-2 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [snowmp] standard_name = lwe_thickness_of_snow_amount long_name = explicit snow fall on physics timestep @@ -8304,33 +7974,12 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[soilm_in_m] - standard_name = soil_moisture_content_in_m - long_name = soil moisture in meters - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [soiltype] standard_name = soil_type_classification long_name = soil type at each grid cell units = index dimensions = (horizontal_dimension) type = integer -[stc_save] - standard_name = soil_temperature_save - long_name = soil temperature before entering a physics scheme - units = K - dimensions = (horizontal_dimension,soil_vertical_dimension) - type = real - kind = kind_phys -[sthick] - standard_name = soil_layer_thickness - long_name = soil layer thickness - units = m - dimensions = (soil_vertical_dimension) - type = real - kind = kind_phys [stress] standard_name = surface_wind_stress long_name = surface wind stress @@ -8373,13 +8022,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[th1] - standard_name = potential_temperature_at_lowest_model_layer - long_name = potential_temperature_at_lowest_model_layer - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [tice] standard_name = sea_ice_temperature_interstitial long_name = sea ice surface skin temperature use as interstitial @@ -8422,13 +8064,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[tprcp_rate_land] - standard_name = total_precipitation_rate_on_dynamics_timestep_over_land - long_name = total precipitation rate in each time step over land - units = kg m-2 s-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [tracers_start_index] standard_name = start_index_of_other_tracers long_name = beginning index of the non-water tracer species @@ -8482,13 +8117,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[tsfc_land_save] - standard_name = surface_skin_temperature_over_land_interstitial_save - long_name = surface skin temperature over land before entering a physics scheme (temporary use as interstitial) - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [tsfc_ice] standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) @@ -8620,13 +8248,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[weasd_land_save] - standard_name = water_equivalent_accumulated_snow_depth_over_land_save - long_name = water equiv of acc snow depth over land before entering a physics scheme - units = mm - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [weasd_ice] standard_name = water_equivalent_accumulated_snow_depth_over_ice long_name = water equiv of acc snow depth over ice diff --git a/scm/src/gmtb_scm.F90 b/scm/src/gmtb_scm.F90 index 35c57c05..0b9ac864 100644 --- a/scm/src/gmtb_scm.F90 +++ b/scm/src/gmtb_scm.F90 @@ -15,12 +15,29 @@ subroutine gmtb_scm_main_sub() use gmtb_scm_time_integration use gmtb_scm_output use gmtb_scm_type_defs - + +#ifdef STATIC + use :: ccpp_api, & + only: ccpp_init, & + ccpp_finalize use :: ccpp_static_api, & only: ccpp_physics_init, & ccpp_physics_run, & ccpp_physics_finalize +#else + use :: ccpp_api, & + only: ccpp_init, & + ccpp_finalize, & + ccpp_physics_init, & + ccpp_physics_run, & + ccpp_physics_finalize, & + ccpp_field_add, & + ccpp_initialized, & + ccpp_error + use :: iso_c_binding, only: c_loc +#include "ccpp_modules.inc" +#endif implicit none @@ -95,11 +112,11 @@ subroutine gmtb_scm_main_sub() do i = 1, scm_state%n_cols !set up each column's physics suite (which may be different) - ! call ccpp_init(trim(adjustl(scm_state%physics_suite_name(i))), cdata_cols(i), ierr) - ! if (ierr/=0) then - ! write(*,'(a,i0,a)') 'An error occurred in ccpp_init for column ', i, '. Exiting...' - ! stop - ! end if + call ccpp_init(trim(adjustl(scm_state%physics_suite_name(i))), cdata_cols(i), ierr) + if (ierr/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_init for column ', i, '. Exiting...' + stop + end if !open a logfile for each column if (physics%Init_parm(i)%me == physics%Init_parm(i)%master .and. physics%Init_parm(i)%logunit>=0) then @@ -139,11 +156,23 @@ subroutine gmtb_scm_main_sub() call physics%associate(scm_state, i) - !initialize each column's physics +#ifndef STATIC +! use ccpp_fields.inc to call ccpp_field_add for all variables to add +! (this is auto-generated from ccpp/scripts/ccpp_prebuild.py, +! the script parses tables in gmtb_scm_type_defs.f90) + associate_column: associate (cdata => cdata_cols(i)) +#include "ccpp_fields.inc" + end associate associate_column +#endif + !initialize each column's physics +#ifdef STATIC write(0,'(a,i0,a)') "Calling ccpp_physics_init for column ", i, " with suite '" // trim(trim(adjustl(scm_state%physics_suite_name(i)))) // "'" call ccpp_physics_init(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) write(0,'(a,i0,a,i0)') "Called ccpp_physics_init for column ", i, " with suite '" // trim(trim(adjustl(scm_state%physics_suite_name(i)))) // "', ierr=", ierr +#else + call ccpp_physics_init(cdata_cols(i), ierr=ierr) +#endif if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_init for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop @@ -191,7 +220,11 @@ subroutine gmtb_scm_main_sub() scm_state%state_v(:,:,:,2) = scm_state%state_v(:,:,:,1) do i=1, scm_state%n_cols +#ifdef STATIC call ccpp_physics_run(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) +#else + call ccpp_physics_run(cdata_cols(i), ierr=ierr) +#endif if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop @@ -295,14 +328,25 @@ subroutine gmtb_scm_main_sub() end do do i=1, scm_state%n_cols +#ifdef STATIC call ccpp_physics_finalize(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) - +#else + call ccpp_physics_finalize(cdata_cols(i), ierr=ierr) +#endif if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_finalize for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop end if end do + do i=1, scm_state%n_cols + call ccpp_finalize(cdata_cols(i), ierr) + if (ierr/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_finalize for column ', i, '. Exiting...' + stop + end if + end do + end subroutine gmtb_scm_main_sub end module gmtb_scm_main diff --git a/scm/src/gmtb_scm_physical_constants.F90 b/scm/src/gmtb_scm_physical_constants.F90 index f6d85a26..c7489476 100644 --- a/scm/src/gmtb_scm_physical_constants.F90 +++ b/scm/src/gmtb_scm_physical_constants.F90 @@ -19,7 +19,6 @@ module gmtb_scm_physical_constants real(kind=dp),parameter:: con_rv =4.6150e+2 real(kind=dp),parameter:: con_cp =1.0046e+3 real(kind=dp),parameter:: con_cliq =4.1855e+3 - real(kind=dp),parameter:: con_csol =2.1060e+3 real(kind=dp),parameter:: con_cvap =1.8460e+3 real(kind=dp),parameter:: con_hvap =2.5000e+6 real(kind=dp),parameter:: con_hfus =3.3358e+5 diff --git a/scm/src/gmtb_scm_physical_constants.meta b/scm/src/gmtb_scm_physical_constants.meta index a7a10f88..eb7f23bd 100644 --- a/scm/src/gmtb_scm_physical_constants.meta +++ b/scm/src/gmtb_scm_physical_constants.meta @@ -8,13 +8,6 @@ dimensions = () type = real kind = kind_phys -[con_csol] - standard_name = specific_heat_of_ice_at_constant_pressure - long_name = specific heat of ice at constant pressure - units = J kg-1 K-1 - dimensions = () - type = real - kind = kind_phys [con_cp] standard_name = specific_heat_of_dry_air_at_constant_pressure long_name = specific heat of dry air at constant pressure diff --git a/scm/src/gmtb_scm_time_integration.F90 b/scm/src/gmtb_scm_time_integration.F90 index 3ccc1452..6aa224f6 100644 --- a/scm/src/gmtb_scm_time_integration.F90 +++ b/scm/src/gmtb_scm_time_integration.F90 @@ -6,8 +6,13 @@ module gmtb_scm_time_integration use gmtb_scm_kinds, only: sp, dp, qp use gmtb_scm_forcing +#ifdef STATIC use ccpp_api, only: ccpp_t use ccpp_static_api, only: ccpp_physics_run +#else +use ccpp_api, only: ccpp_t, & + ccpp_physics_run +#endif implicit none @@ -79,7 +84,11 @@ subroutine do_time_step(scm_state, cdata_cols) end if do i=1, scm_state%n_cols +#ifdef STATIC call ccpp_physics_run(cdata_cols(i), suite_name=trim(adjustl(scm_state%physics_suite_name(i))), ierr=ierr) +#else + call ccpp_physics_run(cdata_cols(i), ierr=ierr) +#endif if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop diff --git a/scm/src/gmtb_scm_type_defs.F90 b/scm/src/gmtb_scm_type_defs.F90 index 08f62b95..cc60f74c 100644 --- a/scm/src/gmtb_scm_type_defs.F90 +++ b/scm/src/gmtb_scm_type_defs.F90 @@ -896,13 +896,13 @@ subroutine physics_associate(physics, scm_state, col) physics%Stateout(col)%gq0 => scm_state%state_tracer(col,:,:,:,1) endif - physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm if(scm_state%sfc_flux_spec) then physics%Sfcprop(col)%spec_sh_flux => scm_state%sh_flux physics%Sfcprop(col)%spec_lh_flux => scm_state%lh_flux + physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm endif if(scm_state%model_ics) then - !physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm + physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm physics%Sfcprop(col)%canopy => scm_state%canopy(col,:) physics%Sfcprop(col)%hice => scm_state%hice(col,:) physics%Sfcprop(col)%fice => scm_state%fice(col,:) From ed3c39811c813629703555ad637038790404919c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 19 Jun 2020 13:28:24 -0600 Subject: [PATCH 20/46] Functionally working, but the surface temperature field is not being updated correctly. --- ccpp/config/ccpp_prebuild_config.py | 6 ++++++ ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 21 ++++++++++++++++----- scm/src/GFS_typedefs.meta | 7 +++++++ 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 3d81ac64..b3ea643f 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -436,6 +436,12 @@ 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', ], }, + 'rrtmgp_lwadj' : { + 'rrtmgp_lwadj_run' : [ + 'RRTMGP_jacobian_of_lw_flux_profile_upward', + 'RRTMGP_jacobian_of_lw_flux_profile_downward', + ], + }, #'subroutine_name_1' : 'all', #'subroutine_name_2' : 'none', #'subroutine_name_2' : [ 'var1', 'var3'], diff --git a/ccpp/physics b/ccpp/physics index dbaba27e..d8253bd3 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit dbaba27e7d5661862415b9ff54c4a502544289e6 +Subproject commit d8253bd38d8a5c78d3d462fe1a5eb3231260461f diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 561ac03d..be73d217 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -5770,8 +5770,10 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) + if (Model%use_LW_jacobian) then + allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) + endif allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) @@ -6139,9 +6141,7 @@ subroutine interstitial_rad_reset (Interstitial, Model) Interstitial%fluxlwUP_allsky = clear_val Interstitial%fluxlwDOWN_allsky = clear_val Interstitial%fluxlwUP_clrsky = clear_val - Interstitial%fluxlwDOWN_clrsky = clear_val - Interstitial%fluxlwUP_jac = clear_val - Interstitial%fluxlwDOWN_jac = clear_val + Interstitial%fluxlwDOWN_clrsky = clear_val Interstitial%fluxswUP_allsky = clear_val Interstitial%fluxswDOWN_allsky = clear_val Interstitial%fluxswUP_clrsky = clear_val @@ -6443,6 +6443,17 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%radar_reset = mod(Model%kdt-1, nint(Model%nsradar_reset/Model%dtp)) == 0 end if ! + + ! + ! RRTMGP + ! + if (Model%do_RRTMGP) then + if (Model%use_LW_jacobian) then + !Interstitial%fluxlwUP_jac = clear_val + !Interstitial%fluxlwDOWN_jac = clear_val + endif + endif + end subroutine interstitial_phys_reset subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 8614c427..9e5e7b01 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -8561,6 +8561,13 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys +[sktp1r] + standard_name = surface_skin_temperature_at_previous_time_step + long_name = surface skin temperature at previous time step + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [fluxlwUP_jac] standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward long_name = RRTMGP Jacobian upward longwave flux profile From fb8f571253b805b17f4145811f8ef7cebd4d3aa9 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 19 Jun 2020 16:36:35 -0600 Subject: [PATCH 21/46] LW adjusted flux using GP Jacobians is working. --- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index d8253bd3..556c6732 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit d8253bd38d8a5c78d3d462fe1a5eb3231260461f +Subproject commit 556c67320ffabb14bb673555fb315518e0c57c18 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index be73d217..e06a2a76 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -5772,7 +5772,7 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) if (Model%use_LW_jacobian) then allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) endif allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) @@ -6138,7 +6138,6 @@ subroutine interstitial_rad_reset (Interstitial, Model) Interstitial%t_lay = clear_val Interstitial%cloud_overlap_param = clear_val Interstitial%precip_overlap_param = clear_val - Interstitial%fluxlwUP_allsky = clear_val Interstitial%fluxlwDOWN_allsky = clear_val Interstitial%fluxlwUP_clrsky = clear_val Interstitial%fluxlwDOWN_clrsky = clear_val From d516098a06736d2d12a9b150292ca1bcf596f71a Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 22 Jun 2020 18:06:58 -0600 Subject: [PATCH 22/46] Moved rrtmgp_lwadj into conditional in GFS_suite_interstitial_2_run. --- ccpp/config/ccpp_prebuild_config.py | 7 +++---- ccpp/physics | 2 +- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 1 - ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 1 - scm/src/GFS_typedefs.F90 | 6 ++---- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index b3ea643f..6a915260 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -301,7 +301,6 @@ 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lwadj.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], @@ -436,10 +435,10 @@ 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', ], }, - 'rrtmgp_lwadj' : { - 'rrtmgp_lwadj_run' : [ + 'GFS_suite_interstitial_2' : { + 'GFS_suite_interstitial_2_run' : [ 'RRTMGP_jacobian_of_lw_flux_profile_upward', - 'RRTMGP_jacobian_of_lw_flux_profile_downward', + 'RRTMGP_lw_flux_profile_upward_allsky', ], }, #'subroutine_name_1' : 'all', diff --git a/ccpp/physics b/ccpp/physics index 556c6732..0a5ab18b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 556c67320ffabb14bb673555fb315518e0c57c18 +Subproject commit 0a5ab18b6d87145a6f2439d94fcff55e32760e48 diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 1c7f4473..4d953944 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -41,7 +41,6 @@ GFS_surface_composites_pre dcyc2t3 GFS_surface_composites_inter - rrtmgp_lwadj GFS_suite_interstitial_2 diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index 0bddf69e..bbbe933c 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -41,7 +41,6 @@ GFS_surface_composites_pre dcyc2t3 GFS_surface_composites_inter - rrtmgp_lwadj GFS_suite_interstitial_2 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index e06a2a76..76df4994 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -5770,10 +5770,8 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) - if (Model%use_LW_jacobian) then - allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) - endif + allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) From f69c4846caa7638c5c6298536c8003a44e534a2f Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jul 2020 14:03:49 -0600 Subject: [PATCH 23/46] Updated with upstream master. --- ccpp/config/ccpp_prebuild_config.py | 85 +-- ccpp/framework | 2 +- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 885 +++++++++++++++++--------- scm/src/GFS_typedefs.meta | 715 ++++++++++++++++----- scm/src/gmtb_scm.F90 | 60 +- scm/src/gmtb_scm_time_integration.F90 | 9 - scm/src/gmtb_scm_type_defs.F90 | 4 +- 8 files changed, 1213 insertions(+), 549 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 6a915260..e4957669 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -120,6 +120,8 @@ 'ccpp/physics/physics/module_mp_thompson.F90', 'ccpp/physics/physics/module_mp_thompson_make_number_concentrations.F90', 'ccpp/physics/physics/module_MP_FER_HIRES.F90', +# 'ccpp/physics/physics/HWRF_mersenne_twister.F90', +# 'ccpp/physics/physics/HWRF_mcica_random_numbers.F90', 'ccpp/physics/physics/module_bl_mynn.F90', 'ccpp/physics/physics/module_sf_mynn.F90', 'ccpp/physics/physics/module_SF_JSFC.F90', @@ -170,6 +172,9 @@ 'ccpp/physics/physics/namelist_soilveg_ruc.F90', 'ccpp/physics/physics/set_soilveg_ruc.F90', 'ccpp/physics/physics/module_soil_pre.F90', +# 'ccpp/physics/physics/module_sf_noahlsm.F90', +# 'ccpp/physics/physics/module_sf_noahlsm_glacial_only.F90', +# 'ccpp/physics/physics/module_sf_exchcoef.f90', # RRTMGP 'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90', 'ccpp/physics/physics/rte-rrtmgp/rrtmgp/mo_gas_optics.F90', @@ -185,7 +190,6 @@ 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_kind.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_lw.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_sw.F90', - 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_config.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_source_functions.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90', @@ -197,6 +201,7 @@ 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_heating_rates.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', + 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90', # derived data type definitions 'scm/src/GFS_typedefs.F90', 'scm/src/gmtb_scm_kinds.F90', @@ -237,6 +242,7 @@ 'ccpp/physics/physics/gcm_shoc.F90' : ['physics'], 'ccpp/physics/physics/get_prs_fv3.F90' : ['physics'], 'ccpp/physics/physics/gfdl_cloud_microphys.F90' : ['physics'], +# 'ccpp/physics/physics/gfdl_sfc_layer.F90' : ['physics'], 'ccpp/physics/physics/gscond.f' : ['physics'], 'ccpp/physics/physics/gwdc.f' : ['physics'], 'ccpp/physics/physics/gwdps.f' : ['physics'], @@ -269,6 +275,8 @@ 'ccpp/physics/physics/ozphys.f' : ['physics'], 'ccpp/physics/physics/ozphys_2015.f' : ['physics'], 'ccpp/physics/physics/precpd.f' : ['physics'], +# 'ccpp/physics/physics/radlw_main.F90' : ['physics'], +# 'ccpp/physics/physics/radsw_main.F90' : ['physics'], 'ccpp/physics/physics/radlw_main.f' : ['physics'], 'ccpp/physics/physics/radsw_main.f' : ['physics'], 'ccpp/physics/physics/rayleigh_damp.f' : ['physics'], @@ -283,6 +291,8 @@ 'ccpp/physics/physics/sfc_cice.f' : ['physics'], 'ccpp/physics/physics/sfc_diff.f' : ['physics'], 'ccpp/physics/physics/sfc_drv.f' : ['physics'], +# 'ccpp/physics/physics/sfc_noah_wrfv4_interstitial.F90' : ['physics'], +# 'ccpp/physics/physics/sfc_noah_wrfv4.F90' : ['physics'], 'ccpp/physics/physics/sfc_noahmp_drv.f' : ['physics'], 'ccpp/physics/physics/sfc_nst.f' : ['physics'], 'ccpp/physics/physics/sfc_ocean.F' : ['physics'], @@ -290,29 +300,25 @@ 'ccpp/physics/physics/mp_fer_hires.F90' : ['physics'], 'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' : ['physics'], # RRTMGP - 'ccpp/physics/physics/mo_cloud_sampling.F90' : ['physics'], - 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_aux.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_pre.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' : ['physics'], - 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' : ['physics'], - # Cloud diagnostics - 'ccpp/physics/physics/GFS_cloud_diagnostics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_aux.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_lw_pre.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' : ['physics'], } # Default build dir, relative to current working directory, @@ -413,34 +419,37 @@ 'rime_factor', ], }, - 'rrtmgp_lw_rte' : { - 'rrtmgp_lw_rte_run' : [ - 'RRTMGP_jacobian_of_lw_flux_profile_upward', - 'RRTMGP_jacobian_of_lw_flux_profile_downward', - ], - }, 'rrtmgp_sw_rte' : { 'rrtmgp_sw_rte_run' : [ 'components_of_surface_downward_shortwave_fluxes', + 'sw_fluxes_sfc', + 'sw_fluxes_toa', ], - }, + }, 'GFS_rrtmgp_sw_post' : { 'GFS_rrtmgp_sw_post_run' : [ - 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', 'components_of_surface_downward_shortwave_fluxes', + 'sw_fluxes_sfc', + 'sw_fluxes_toa', ], }, + 'rrtmgp_lw_rte' : { + 'rrtmgp_lw_rte_run' : [ + 'lw_fluxes_sfc', + 'lw_fluxes_toa', + ], + }, 'GFS_rrtmgp_lw_post' : { 'GFS_rrtmgp_lw_post_run' : [ - 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', + 'lw_fluxes_sfc', + 'lw_fluxes_toa', ], }, - 'GFS_suite_interstitial_2' : { - 'GFS_suite_interstitial_2_run' : [ - 'RRTMGP_jacobian_of_lw_flux_profile_upward', - 'RRTMGP_lw_flux_profile_upward_allsky', + 'GFS_rrtmgp_post' : { + 'GFS_rrtmgp_post_run' : [ + 'components_of_surface_downward_shortwave_fluxes', ], - }, + }, #'subroutine_name_1' : 'all', #'subroutine_name_2' : 'none', #'subroutine_name_2' : [ 'var1', 'var3'], diff --git a/ccpp/framework b/ccpp/framework index a1fe9c10..209f1c92 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit a1fe9c1091f2122a8e748154a9ce79c3020468fd +Subproject commit 209f1c92d99b7d4cc63e0d41c652fcfd730bd9fa diff --git a/ccpp/physics b/ccpp/physics index 0a5ab18b..75cf9de2 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 0a5ab18b6d87145a6f2439d94fcff55e32760e48 +Subproject commit 75cf9de293e52bb005557b8be1e9d447fec5c39e diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 76df4994..b406da92 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -3,8 +3,8 @@ module GFS_typedefs use machine, only: kind_phys - use module_radlw_parameters, only: sfcflw_type, topflw_type, NBDLW, proflw_type - use module_radsw_parameters, only: cmpfsw_type, sfcfsw_type, topfsw_type, NBDSW, profsw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type, NBDSW + use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type, NBDLW use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str use mo_cloud_optics, only: ty_cloud_optics @@ -211,6 +211,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsfco (:) => null() !< sst in K real (kind=kind_phys), pointer :: tsfcl (:) => null() !< surface land temperature in K real (kind=kind_phys), pointer :: tisfc (:) => null() !< surface temperature over ice fraction + real (kind=kind_phys), pointer :: tiice(:,:) => null() !< internal ice temperature real (kind=kind_phys), pointer :: snowd (:) => null() !< snow depth water equivalent in mm ; same as snwdph real (kind=kind_phys), pointer :: zorl (:) => null() !< composite surface roughness in cm real (kind=kind_phys), pointer :: zorlo (:) => null() !< ocean surface roughness in cm @@ -218,6 +219,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: fice (:) => null() !< ice fraction over open water grid ! real (kind=kind_phys), pointer :: hprim (:) => null() !< topographic standard deviation in m real (kind=kind_phys), pointer :: hprime (:,:) => null() !< orographic metrics + real (kind=kind_phys), pointer :: z0base (:) => null() !< background or baseline surface roughness length in m + real (kind=kind_phys), pointer :: semisbase(:)=> null() !< background surface emissivity !--- In (radiation only) real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction @@ -263,7 +266,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: th2m (:) => null() !< 2 meter potential temperature real (kind=kind_phys), pointer :: q2m (:) => null() !< 2 meter humidity -! -- In/Out for Noah MP +! -- In/Out for Noah MP real (kind=kind_phys), pointer :: snowxy (:) => null() !< real (kind=kind_phys), pointer :: tvxy (:) => null() !< veg temp real (kind=kind_phys), pointer :: tgxy (:) => null() !< ground temp @@ -291,7 +294,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: xlaixy (:) => null() !< real (kind=kind_phys), pointer :: taussxy (:) => null() !< real (kind=kind_phys), pointer :: smcwtdxy(:) => null() !< - real (kind=kind_phys), pointer :: deeprechxy(:) => null() !< + real (kind=kind_phys), pointer :: deeprechxy(:)=> null() !< real (kind=kind_phys), pointer :: rechxy (:) => null() !< real (kind=kind_phys), pointer :: snicexy (:,:) => null() !< @@ -300,7 +303,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: smoiseq (:,:) => null() !< real (kind=kind_phys), pointer :: zsnsoxy (:,:) => null() !< - +! -- In/Out for HWRF NOAH LSM + real (kind=kind_phys), pointer :: snotime (:) => null() !--- NSSTM variables (only allocated when [Model%nstf_name(1) > 0]) real (kind=kind_phys), pointer :: tref (:) => null() !< nst_fld%Tref - Reference Temperature @@ -462,18 +466,16 @@ module GFS_typedefs real (kind=kind_phys), pointer :: slmsk_cpl (:) => null() !< Land/Sea/Ice mask (slmsk from GFS_sfcprop_type) !--- cellular automata - real (kind=kind_phys), pointer :: tconvtend(:,:) => null() - real (kind=kind_phys), pointer :: qconvtend(:,:) => null() - real (kind=kind_phys), pointer :: uconvtend(:,:) => null() - real (kind=kind_phys), pointer :: vconvtend(:,:) => null() - real (kind=kind_phys), pointer :: ca_out (:) => null() ! + real (kind=kind_phys), pointer :: ca1 (:) => null() ! + real (kind=kind_phys), pointer :: ca2 (:) => null() ! + real (kind=kind_phys), pointer :: ca3 (:) => null() ! real (kind=kind_phys), pointer :: ca_deep (:) => null() ! real (kind=kind_phys), pointer :: ca_turb (:) => null() ! real (kind=kind_phys), pointer :: ca_shal (:) => null() ! real (kind=kind_phys), pointer :: ca_rad (:) => null() ! real (kind=kind_phys), pointer :: ca_micro (:) => null() ! - real (kind=kind_phys), pointer :: cape (:) => null() ! - + real (kind=kind_phys), pointer :: condition(:) => null() ! + real (kind=kind_phys), pointer :: vfact_ca(:) => null() ! !--- stochastic physics real (kind=kind_phys), pointer :: shum_wts (:,:) => null() ! real (kind=kind_phys), pointer :: sppt_wts (:,:) => null() ! @@ -629,14 +631,14 @@ module GFS_typedefs character(len=128) :: sw_file_clouds !< RRTMGP file containing coefficients used to compute clouds optical properties integer :: rrtmgp_nBandsSW !< Number of RRTMGP SW bands. integer :: rrtmgp_nGptsSW !< Number of RRTMGP SW spectral points. - logical :: doG_cldoptics !< Use legacy RRTMG cloud-optics? - logical :: doGP_cldoptics_PADE !< Use RRTMGP cloud-optics: PADE approximation? - logical :: doGP_cldoptics_LUT !< Use RRTMGP cloud-optics: LUTs? + integer :: rrtmgp_cld_optics !< Flag to control which RRTMGP routine to compute cloud-optics. + !< = 0 ; Use RRTMG implementation + !< = 1 ; Use RRTMGP (pade) + !< = 2 ; USE RRTMGP (LUT) integer :: rrtmgp_nrghice !< Number of ice-roughness categories integer :: rrtmgp_nGauss_ang !< Number of angles used in Gaussian quadrature logical :: do_GPsw_Glw ! If set to true use rrtmgp for SW calculation, rrtmg for LW. character(len=128) :: active_gases_array(100) !< character array for each trace gas name - logical :: use_LW_jacobian !< If true, use Jacobian of LW to update radiation tendency. !--- microphysical switch integer :: ncld !< choice of cloud scheme !--- new microphysical switch @@ -709,16 +711,32 @@ module GFS_typedefs integer :: lsm_noah=1 !< flag for NOAH land surface model integer :: lsm_noahmp=2 !< flag for NOAH land surface model integer :: lsm_ruc=3 !< flag for RUC land surface model + integer :: lsm_noah_wrfv4 = 4 !< flag for NOAH land surface from WRF v4.0 integer :: lsoil !< number of soil layers - integer :: lsoil_lsm !< number of soil layers internal to land surface model - integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model - integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm - logical :: rdlai + integer :: kice=2 !< number of layers in sice integer :: ivegsrc !< ivegsrc = 0 => USGS, !< ivegsrc = 1 => IGBP (20 category) !< ivegsrc = 2 => UMD (13 category) + !< ivegsrc = 3 => NLCD40 (40 category, NOAH WRFv4 only) + !< ivegsrc = 4 => USGS-RUC (28 category, NOAH WRFv4 only) + !< ivegsrc = 5 => MODI-RUC (21 category, NOAH WRFv4 only) integer :: isot !< isot = 0 => Zobler soil type ( 9 category) - !< isot = 1 => STATSGO soil type (19 category) + !< isot = 1 => STATSGO soil type (19 category, AKA 'STAS'(?)) + !< isot = 2 => STAS-RUC soil type (19 category, NOAH WRFv4 only) + integer :: lsoil_lsm !< number of soil layers internal to land surface model + integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model + integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm + logical :: rdlai !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4) + logical :: ua_phys !< flag for using University of Arizona? extension to NOAH LSM WRFv4 + logical :: usemonalb !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 + real(kind=kind_phys) :: aoasis !< potential evaporation multiplication factor for NOAH LSM WRFv4 + integer :: fasdas !< flag to use "flux-adjusting surface data assimilation system"; 0 = OFF, 1 = ON + integer :: isurban !< vegetation/land use type corresponding to the urban environment for the chosen ivegsrc + integer :: isice !< vegetation/land use type corresponding to permanent ice/snow for the chosen ivegsrc + integer :: iswater !< vegetation/land use type corresponding to water bodies for the chosen ivegsrc + integer :: iopt_thcnd !< option to treat thermal conductivity in Noah LSM (new in 3.8) + !< = 1, original (default) + !< = 2, McCumber and Pielke for silt loam and sandy loam ! -- the Noah MP options integer :: iopt_dveg ! 1-> off table lai 2-> on 3-> off;4->off;5 -> on @@ -735,7 +753,13 @@ module GFS_typedefs integer :: iopt_stc !snow/soil temperature time scheme (only layer 1) logical :: use_ufo !< flag for gcycle surface option - + + ! GFDL Surface Layer options + logical :: lcurr_sf !flag for taking ocean currents into account in GFDL surface layer + logical :: pert_cd !flag for perturbing the surface drag coefficient for momentum in surface layer scheme (1 = True) + integer :: ntsflg !flag for updating skin temperature in the GFDL surface layer scheme + real(kind=kind_phys) :: sfenth !enthalpy flux factor 0 zot via charnock ..>0 zot enhanced>15m/s + !--- tuning parameters for physical parameterizations logical :: ras !< flag for ras convection scheme logical :: flipv !< flag for vertical direction flip (ras) @@ -753,6 +777,8 @@ module GFS_typedefs logical :: cal_pre !< flag controls precip type algorithm real(kind=kind_phys) :: rhgrd !< fer_hires microphysics only logical :: spec_adv !< flag for individual cloud species advected + integer :: icloud !< cloud effect to the optical depth in radiation; this also controls the cloud fraction options + !< 3: with cloud effect, and use cloud fraction option 3, based on Sundqvist et al. (1989) logical :: do_aw !< AW scale-aware option in cs convection logical :: do_awdd !< AW scale-aware option in cs convection logical :: flx_form !< AW scale-aware option in cs convection @@ -772,6 +798,7 @@ module GFS_typedefs logical :: shinhong !< flag for scale-aware Shinhong vertical turbulent mixing scheme logical :: do_ysu !< flag for YSU turbulent mixing scheme logical :: dspheat !< flag for tke dissipative heating + logical :: hurr_pbl !< flag for hurricane-specific options in PBL scheme logical :: lheatstrg !< flag for canopy heat storage parameterization logical :: cnvcld logical :: random_clds !< flag controls whether clouds are random @@ -789,6 +816,7 @@ module GFS_typedefs integer :: imfshalcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux shallow convection scheme integer :: imfshalcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfshalcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) + logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF) integer :: imfdeepcnv !< flag for mass-flux deep convection scheme !< 1: July 2010 version of SAS conv scheme !< current operational version as of 2016 @@ -800,6 +828,7 @@ module GFS_typedefs integer :: imfdeepcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux deep convection scheme integer :: imfdeepcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfdeepcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) + logical :: hwrf_samfshal !< flag for HWRF SAMF shalcnv scheme (HWRF) integer :: isatmedmf !< flag for scale-aware TKE-based moist edmf scheme !< 0: initial version of satmedmf (Nov. 2018) !< 1: updated version of satmedmf (as of May 2019) @@ -843,6 +872,10 @@ module GFS_typedefs integer :: bl_mynn_cloudmix !< flag to activate mixing of cloud species integer :: bl_mynn_mixqt !< flag to mix total water or individual species integer :: icloud_bl !< flag for coupling sgs clouds to radiation + real(kind=kind_phys) :: var_ric + real(kind=kind_phys) :: coef_ric_l + real(kind=kind_phys) :: coef_ric_s + ! MYJ switches logical :: do_myjsfc !< flag for MYJ surface layer scheme logical :: do_myjpbl !< flag for MYJ PBL scheme @@ -896,7 +929,6 @@ module GFS_typedefs !< nstf_name(5) : zsea2 in mm !--- fractional grid logical :: frac_grid !< flag for fractional grid - logical :: frac_grid_off !< flag for using fractional grid logical :: ignore_lake !< flag for ignoring lakes real(kind=kind_phys) :: min_lakeice !< minimum lake ice value real(kind=kind_phys) :: min_seaice !< minimum sea ice value @@ -909,7 +941,7 @@ module GFS_typedefs !< 6=areodynamical roughness over water with input 10-m wind !< 7=slightly decrease Cd for higher wind speed compare to 6 -!--- background vertical diffusion +!--- vertical diffusion real(kind=kind_phys) :: xkzm_m !< [in] bkgd_vdif_m background vertical diffusion for momentum real(kind=kind_phys) :: xkzm_h !< [in] bkgd_vdif_h background vertical diffusion for heat q real(kind=kind_phys) :: xkzm_s !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion @@ -919,20 +951,34 @@ module GFS_typedefs real(kind=kind_phys) :: bl_upfr !< updraft fraction in boundary layer mass flux scheme real(kind=kind_phys) :: bl_dnfr !< downdraft fraction in boundary layer mass flux scheme - !---cellular automata control parameters +!--- parameters for canopy heat storage (CHS) parameterization + real(kind=kind_phys) :: z0fac !< surface roughness fraction factor + real(kind=kind_phys) :: e0fac !< latent heat flux fraction factor relative to sensible heat flux + !< e.g., e0fac=0.5 indicates that CHS for latent heat flux is 50% of that for + !< sensible heat flux + +!---cellular automata control parameters integer :: nca !< number of independent cellular automata integer :: nlives !< cellular automata lifetime integer :: ncells !< cellular automata finer grid - real(kind=kind_phys) :: nfracseed !< cellular automata seed probability + integer :: nca_g !< number of independent cellular automata + integer :: nlives_g !< cellular automata lifetime + integer :: ncells_g !< cellular automata finer grid + real(kind=kind_phys) :: nfracseed !< cellular automata seed probability integer :: nseed !< cellular automata seed frequency + integer :: nseed_g !< cellular automata seed frequency logical :: do_ca !< cellular automata main switch logical :: ca_sgs !< switch for sgs ca logical :: ca_global !< switch for global ca logical :: ca_smooth !< switch for gaussian spatial filter - logical :: isppt_deep !< switch for combination with isppt_deep. OBS! Switches off SPPT on other tendencies! integer :: iseed_ca !< seed for random number generation in ca scheme integer :: nspinup !< number of iterations to spin up the ca real(kind=kind_phys) :: nthresh !< threshold used for perturbed vertical velocity + real :: ca_amplitude !< amplitude of ca trigger perturbation + integer :: nsmooth !< number of passes through smoother + logical :: ca_closure !< logical switch for ca on closure + logical :: ca_entr !< logical switch for ca on entrainment + logical :: ca_trigger !< logical switch for ca on trigger !--- stochastic physics control parameters logical :: do_sppt @@ -1168,7 +1214,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: phy_myj_qz0(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_uz0(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_vz0(:) => null() ! - real (kind=kind_phys), pointer :: phy_myj_z0base(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_akhs(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_akms(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_chkqlm(:) => null() ! @@ -1382,7 +1427,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tdomip (:) => null() !< dominant accumulated sleet type real (kind=kind_phys), pointer :: tdoms (:) => null() !< dominant accumulated snow type - real (kind=kind_phys), pointer :: ca_out (:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: ca1 (:) => null() ! + real (kind=kind_phys), pointer :: ca2 (:) => null() ! + real (kind=kind_phys), pointer :: ca3 (:) => null() ! real (kind=kind_phys), pointer :: ca_deep (:) => null() !< cellular automata fraction real (kind=kind_phys), pointer :: ca_turb (:) => null() !< cellular automata fraction real (kind=kind_phys), pointer :: ca_shal (:) => null() !< cellular automata fraction @@ -1413,7 +1460,11 @@ module GFS_typedefs real (kind=kind_phys), pointer :: TRAIN (:,:) => null() !< accumulated stratiform T tendency (K s-1) !--- MP quantities for 3D diagnositics - real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm + real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm + + !--- Extra PBL diagnostics + real (kind=kind_phys), pointer :: dkudiagnostic(:,:) => null() !< Eddy diffusitivity from the EDMF and EDMF-TKE + ! !---vay-2018 UGWP-diagnostics daily mean ! @@ -1533,6 +1584,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: aerodp(:,:) => null() !< real (kind=kind_phys), pointer :: alb1d(:) => null() !< real (kind=kind_phys), pointer :: bexp1d(:) => null() !< + real (kind=kind_phys), pointer :: canopy_save(:) => null() !< real (kind=kind_phys), pointer :: cd(:) => null() !< real (kind=kind_phys), pointer :: cd_ice(:) => null() !< real (kind=kind_phys), pointer :: cd_land(:) => null() !< @@ -1545,6 +1597,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: chh_ice(:) => null() !< real (kind=kind_phys), pointer :: chh_land(:) => null() !< real (kind=kind_phys), pointer :: chh_ocean(:) => null() !< + real (kind=kind_phys), pointer :: chk_land(:) => null() !< real (kind=kind_phys), pointer :: clcn(:,:) => null() !< real (kind=kind_phys), pointer :: cldf(:) => null() !< real (kind=kind_phys), pointer :: cldsa(:,:) => null() !< @@ -1555,6 +1608,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: clw(:,:,:) => null() !< real (kind=kind_phys), pointer :: clw_surf(:) => null() !< real (kind=kind_phys), pointer :: clx(:,:) => null() !< + real (kind=kind_phys), pointer :: cmc(:) => null() !< real (kind=kind_phys), pointer :: cmm_ice(:) => null() !< real (kind=kind_phys), pointer :: cmm_land(:) => null() !< real (kind=kind_phys), pointer :: cmm_ocean(:) => null() !< @@ -1577,8 +1631,10 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dkt(:,:) => null() !< real (kind=kind_phys), pointer :: dlength(:) => null() !< real (kind=kind_phys), pointer :: dqdt(:,:,:) => null() !< + real (kind=kind_phys), pointer :: dqsdt2(:) => null() !< real (kind=kind_phys), pointer :: dqsfc1(:) => null() !< real (kind=kind_phys), pointer :: drain(:) => null() !< + real (kind=kind_phys), pointer :: drain_in_m_sm1(:) => null() !< real (kind=kind_phys), pointer :: dtdt(:,:) => null() !< real (kind=kind_phys), pointer :: dtdtc(:,:) => null() !< real (kind=kind_phys), pointer :: dtsfc1(:) => null() !< @@ -1598,6 +1654,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: ep1d_land(:) => null() !< real (kind=kind_phys), pointer :: ep1d_ocean(:) => null() !< real (kind=kind_phys), pointer :: evap(:) => null() !< + real (kind=kind_phys), pointer :: evapq(:) => null() !< real (kind=kind_phys), pointer :: evap_ice(:) => null() !< real (kind=kind_phys), pointer :: evap_land(:) => null() !< real (kind=kind_phys), pointer :: evap_ocean(:) => null() !< @@ -1615,6 +1672,8 @@ module GFS_typedefs logical, pointer :: flag_cice(:) => null() !< logical, pointer :: flag_guess(:) => null() !< logical, pointer :: flag_iter(:) => null() !< + logical, pointer :: flag_lsm(:) => null() !< + logical, pointer :: flag_lsm_glacier(:)=> null() !< real (kind=kind_phys), pointer :: ffmm_ice(:) => null() !< real (kind=kind_phys), pointer :: ffmm_land(:) => null() !< real (kind=kind_phys), pointer :: ffmm_ocean(:) => null() !< @@ -1643,7 +1702,10 @@ module GFS_typedefs real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !< integer :: h2o_coeff !< real (kind=kind_phys), pointer :: h2o_pres(:) => null() !< + real (kind=kind_phys), pointer :: hefac(:) => null() !< + real (kind=kind_phys), pointer :: hffac(:) => null() !< real (kind=kind_phys), pointer :: hflx(:) => null() !< + real (kind=kind_phys), pointer :: hflxq(:) => null() !< real (kind=kind_phys), pointer :: hflx_ice(:) => null() !< real (kind=kind_phys), pointer :: hflx_land(:) => null() !< real (kind=kind_phys), pointer :: hflx_ocean(:) => null() !< @@ -1724,6 +1786,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: qss_ice(:) => null() !< real (kind=kind_phys), pointer :: qss_land(:) => null() !< real (kind=kind_phys), pointer :: qss_ocean(:) => null() !< + real (kind=kind_phys), pointer :: qs1(:) => null() !< + real (kind=kind_phys), pointer :: qv1(:) => null() !< logical :: radar_reset !< real (kind=kind_phys) :: raddt !< real (kind=kind_phys), pointer :: rainmp(:) => null() !< @@ -1737,7 +1801,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: rb_ocean(:) => null() !< logical :: reset !< real (kind=kind_phys), pointer :: rhc(:,:) => null() !< + real (kind=kind_phys), pointer :: rho1(:) => null() !< real (kind=kind_phys), pointer :: runoff(:) => null() !< + real (kind=kind_phys), pointer :: runoff_in_m_sm1(:) => null() !< real (kind=kind_phys), pointer :: save_q(:,:,:) => null() !< real (kind=kind_phys), pointer :: save_t(:,:) => null() !< real (kind=kind_phys), pointer :: save_u(:,:) => null() !< @@ -1753,27 +1819,40 @@ module GFS_typedefs real (kind=kind_phys), pointer :: sigmafrac(:,:) => null() !< real (kind=kind_phys), pointer :: sigmatot(:,:) => null() !< logical :: skip_macro !< + real (kind=kind_phys), pointer :: slc_save(:,:) => null() !< integer, pointer :: slopetype(:) => null() !< + real (kind=kind_phys), pointer :: smcmax(:) => null() !< + real (kind=kind_phys), pointer :: smc_save(:,:) => null() !< real (kind=kind_phys), pointer :: snowc(:) => null() !< real (kind=kind_phys), pointer :: snowd_ice(:) => null() !< real (kind=kind_phys), pointer :: snowd_land(:) => null() !< + real (kind=kind_phys), pointer :: snowd_land_save(:) => null() !< real (kind=kind_phys), pointer :: snowd_ocean(:) => null() !< + real (kind=kind_phys), pointer :: snow_depth(:) => null() !< real (kind=kind_phys), pointer :: snohf(:) => null() !< + real (kind=kind_phys), pointer :: snohf_snow(:) => null() !< + real (kind=kind_phys), pointer :: snohf_frzgra(:) => null() !< + real (kind=kind_phys), pointer :: snohf_snowmelt(:) => null() !< real (kind=kind_phys), pointer :: snowmp(:) => null() !< real (kind=kind_phys), pointer :: snowmt(:) => null() !< + real (kind=kind_phys), pointer :: soilm_in_m(:) => null() !< integer, pointer :: soiltype(:) => null() !< + real (kind=kind_phys), pointer :: stc_save(:,:) => null() !< + real (kind=kind_phys), pointer :: sthick (:) => null() !< real (kind=kind_phys), pointer :: stress(:) => null() !< real (kind=kind_phys), pointer :: stress_ice(:) => null() !< real (kind=kind_phys), pointer :: stress_land(:) => null() !< real (kind=kind_phys), pointer :: stress_ocean(:) => null() !< real (kind=kind_phys), pointer :: t2mmp(:) => null() !< real (kind=kind_phys), pointer :: theta(:) => null() !< + real (kind=kind_phys), pointer :: th1(:) => null() !< real (kind=kind_phys), pointer :: tice(:) => null() !< real (kind=kind_phys), pointer :: tlvl(:,:) => null() !< real (kind=kind_phys), pointer :: tlyr(:,:) => null() !< real (kind=kind_phys), pointer :: tprcp_ice(:) => null() !< real (kind=kind_phys), pointer :: tprcp_land(:) => null() !< real (kind=kind_phys), pointer :: tprcp_ocean(:) => null() !< + real (kind=kind_phys), pointer :: tprcp_rate_land(:) => null() !< integer :: tracers_start_index !< integer :: tracers_total !< integer :: tracers_water !< @@ -1783,9 +1862,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsfa(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ice(:) => null() !< real (kind=kind_phys), pointer :: tsfc_land(:) => null() !< + real (kind=kind_phys), pointer :: tsfc_land_save(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ocean(:) => null() !< real (kind=kind_phys), pointer :: tsfg(:) => null() !< - real (kind=kind_phys), pointer :: sktp1r(:) => null() !< real (kind=kind_phys), pointer :: tsnow(:) => null() !< real (kind=kind_phys), pointer :: tsurf(:) => null() !< real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !< @@ -1802,6 +1881,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: wcbmax(:) => null() !< real (kind=kind_phys), pointer :: weasd_ocean(:) => null() !< real (kind=kind_phys), pointer :: weasd_land(:) => null() !< + real (kind=kind_phys), pointer :: weasd_land_save(:) => null() !< real (kind=kind_phys), pointer :: weasd_ice(:) => null() !< real (kind=kind_phys), pointer :: wind(:) => null() !< real (kind=kind_phys), pointer :: work1(:) => null() !< @@ -1831,73 +1911,67 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS ! RRTMGP - integer :: ipsdlw0 !< - integer :: ipsdsw0 !< - real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< - real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< - real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: relhum(:,:) => null() !< - real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: q_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !< - real (kind=kind_phys), pointer :: cloud_overlap_param(:,:) => null() !< Cloud overlap parameter - real (kind=kind_phys), pointer :: precip_overlap_param(:,:) => null() !< Precipitation overlap parameter - real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< - real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. - real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. - real (kind=kind_phys), pointer :: cld_frac(:,:) => null() !< Total cloud fraction - real (kind=kind_phys), pointer :: cld_lwp(:,:) => null() !< Cloud liquid water path - real (kind=kind_phys), pointer :: cld_reliq(:,:) => null() !< Cloud liquid effective radius - real (kind=kind_phys), pointer :: cld_iwp(:,:) => null() !< Cloud ice water path - real (kind=kind_phys), pointer :: cld_reice(:,:) => null() !< Cloud ice effecive radius - real (kind=kind_phys), pointer :: cld_swp(:,:) => null() !< Cloud snow water path - real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius - real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path - real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius - real (kind=kind_phys), pointer :: precip_frac(:,:) => null() !< Precipitation fraction - real (kind=kind_phys), pointer :: fluxlwUP_allsky(:,:) => null() !< RRTMGP upward longwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxlwDOWN_allsky(:,:) => null() !< RRTMGP downward longwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxlwUP_clrsky(:,:) => null() !< RRTMGP upward longwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxlwDOWN_clrsky(:,:) => null() !< RRTMGP downward longwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxswUP_allsky(:,:) => null() !< RRTMGP upward shortwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxlwUP_jac(:,:) => null() !< RRTMGP upward Jacobian of longwave flux - real (kind=kind_phys), pointer :: fluxlwDOWN_jac(:,:) => null() !< RRTMGP downward Jacobian of longwave flux - real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< - real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_nir_dif(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_uvvis_dir(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_uvvis_dif(:,:) => null() !< - real (kind=kind_phys), pointer :: toa_src_lw(:,:) => null() !< - real (kind=kind_phys), pointer :: toa_src_sw(:,:) => null() !< - character(len=128), pointer :: active_gases_array(:) => null() !< Character array for each trace gas name - integer, pointer :: icseed_lw(:) => null() !< RRTMGP seed for RNG for longwave radiation - integer, pointer :: icseed_sw(:) => null() !< RRTMGP seed for RNG for shortwave radiation - type(proflw_type), pointer :: flxprf_lw(:,:) => null() !< DDT containing RRTMGP longwave fluxes - type(profsw_type), pointer :: flxprf_sw(:,:) => null() !< DDT containing RRTMGP shortwave fluxes - type(ty_gas_optics_rrtmgp) :: lw_gas_props !< RRTMGP DDT - type(ty_gas_optics_rrtmgp) :: sw_gas_props !< RRTMGP DDT - type(ty_cloud_optics) :: lw_cloud_props !< RRTMGP DDT - type(ty_cloud_optics) :: sw_cloud_props !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_clouds !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_precipByBand !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_precip !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_clrsky !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_aerosol !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_clouds !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_precipByBand !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_precip !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_clrsky !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT - type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT - type(ty_source_func_lw) :: sources !< RRTMGP DDT + integer :: ipsdlw0 !< + integer :: ipsdsw0 !< + real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< + real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< + real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: relhum(:,:) => null() !< + real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< + real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. + real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. + real (kind=kind_phys), pointer :: cld_frac(:,:) => null() !< Total cloud fraction + real (kind=kind_phys), pointer :: cld_lwp(:,:) => null() !< Cloud liquid water path + real (kind=kind_phys), pointer :: cld_reliq(:,:) => null() !< Cloud liquid effective radius + real (kind=kind_phys), pointer :: cld_iwp(:,:) => null() !< Cloud ice water path + real (kind=kind_phys), pointer :: cld_reice(:,:) => null() !< Cloud ice effecive radius + real (kind=kind_phys), pointer :: cld_swp(:,:) => null() !< Cloud snow water path + real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius + real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path + real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius + real (kind=kind_phys), pointer :: hsw0(:,:) => null() !< RRTMGP shortwave heating-rate (clear-sky) + real (kind=kind_phys), pointer :: hswc(:,:) => null() !< RRTMGP shortwave heating-rate (all-sky) + real (kind=kind_phys), pointer :: hswb(:,:,:) => null() !< RRTMGP shortwave heating-rate (all-sky), by band + real (kind=kind_phys), pointer :: hlw0(:,:) => null() !< RRTMGP longwave heating-rate (clear-sky) + real (kind=kind_phys), pointer :: hlwc(:,:) => null() !< RRTMGP longwave heating-rate (all-sky) + real (kind=kind_phys), pointer :: hlwb(:,:,:) => null() !< RRTMGP longwave heating-rate (all-sky), by band + real (kind=kind_phys), pointer :: fluxlwUP_allsky(:,:) => null() !< RRTMGP upward longwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxlwDOWN_allsky(:,:) => null() !< RRTMGP downward longwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxlwUP_clrsky(:,:) => null() !< RRTMGP upward longwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxlwDOWN_clrsky(:,:) => null() !< RRTMGP downward longwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxswUP_allsky(:,:) => null() !< RRTMGP upward shortwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile + real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< + real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_nir_dif(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_uvvis_dir(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_uvvis_dif(:,:) => null() !< + real (kind=kind_phys), pointer :: toa_src_lw(:,:) => null() !< + real (kind=kind_phys), pointer :: toa_src_sw(:,:) => null() !< + character(len=128), pointer :: active_gases_array(:) => null() !< Character array for each trace gas name + integer, pointer :: icseed_lw(:) => null() !< RRTMGP seed for RNG for longwave radiation + integer, pointer :: icseed_sw(:) => null() !< RRTMGP seed for RNG for shortwave radiation + type(proflw_type), pointer :: flxprf_lw(:,:) => null() !< DDT containing RRTMGP longwave fluxes + type(profsw_type), pointer :: flxprf_sw(:,:) => null() !< DDT containing RRTMGP shortwave fluxes + type(ty_gas_optics_rrtmgp) :: lw_gas_props !< RRTMGP DDT + type(ty_gas_optics_rrtmgp) :: sw_gas_props !< RRTMGP DDT + type(ty_cloud_optics) :: lw_cloud_props !< RRTMGP DDT + type(ty_cloud_optics) :: sw_cloud_props !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_cloudsByBand !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_clouds !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_clrsky !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_aerosol !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_clouds !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_clrsky !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT + type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT + type(ty_source_func_lw) :: sources !< RRTMGP DDT !-- HWRF physics: dry mixing ratios real (kind=kind_phys), pointer :: qv_r(:,:) => null() !< @@ -2040,6 +2114,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%tsfco (IM)) allocate (Sfcprop%tsfcl (IM)) allocate (Sfcprop%tisfc (IM)) + allocate (Sfcprop%tiice (IM,Model%kice)) allocate (Sfcprop%snowd (IM)) allocate (Sfcprop%zorl (IM)) allocate (Sfcprop%zorlo (IM)) @@ -2056,6 +2131,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%tsfco = clear_val Sfcprop%tsfcl = clear_val Sfcprop%tisfc = clear_val + Sfcprop%tiice = clear_val Sfcprop%snowd = clear_val Sfcprop%zorl = clear_val Sfcprop%zorlo = clear_val @@ -2199,7 +2275,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%iceprv = clear_val Sfcprop%snowprv = clear_val Sfcprop%graupelprv = clear_val - end if + end if ! Noah MP allocate and init when used ! if (Model%lsm == Model%lsm_noahmp ) then @@ -2288,7 +2364,23 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%dgraupelprv = clear_val endif - + + ! HWRF NOAH LSM allocate and init when used + ! + if (Model%lsm == Model%lsm_noah_wrfv4 ) then + allocate(Sfcprop%snotime(IM)) + Sfcprop%snotime = clear_val + end if + + if (Model%do_myjsfc.or.Model%do_myjpbl.or.(Model%lsm == Model%lsm_noah_wrfv4)) then + allocate(Sfcprop%z0base(IM)) + Sfcprop%z0base = clear_val + end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + allocate(Sfcprop%semisbase(IM)) + Sfcprop%semisbase = clear_val + end if + if (Model%lsm == Model%lsm_ruc) then ! For land surface models with different numbers of levels than the four NOAH levels allocate (Sfcprop%wetness (IM)) @@ -2398,7 +2490,7 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%sfcnsw = clear_val Coupling%sfcdlw = clear_val - if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm) then + if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global) then allocate (Coupling%rain_cpl (IM)) allocate (Coupling%snow_cpl (IM)) Coupling%rain_cpl = clear_val @@ -2531,29 +2623,27 @@ subroutine coupling_create (Coupling, IM, Model) endif !-- cellular automata + allocate (Coupling%condition(IM)) + allocate (Coupling%vfact_ca(Model%levs)) if (Model%do_ca) then - allocate (Coupling%tconvtend (IM,Model%levs)) - allocate (Coupling%qconvtend (IM,Model%levs)) - allocate (Coupling%uconvtend (IM,Model%levs)) - allocate (Coupling%vconvtend (IM,Model%levs)) - allocate (Coupling%cape (IM)) - allocate (Coupling%ca_out (IM)) + allocate (Coupling%ca1 (IM)) + allocate (Coupling%ca2 (IM)) + allocate (Coupling%ca3 (IM)) allocate (Coupling%ca_deep (IM)) allocate (Coupling%ca_turb (IM)) allocate (Coupling%ca_shal (IM)) allocate (Coupling%ca_rad (IM)) allocate (Coupling%ca_micro (IM)) - Coupling%ca_out = clear_val + Coupling%vfact_ca = clear_val + Coupling%ca1 = clear_val + Coupling%ca2 = clear_val + Coupling%ca3 = clear_val Coupling%ca_deep = clear_val Coupling%ca_turb = clear_val Coupling%ca_shal = clear_val Coupling%ca_rad = clear_val Coupling%ca_micro = clear_val - Coupling%cape = clear_val - Coupling%tconvtend = clear_val - Coupling%qconvtend = clear_val - Coupling%uconvtend = clear_val - Coupling%vconvtend = clear_val + Coupling%condition = clear_val endif ! -- GSDCHEM coupling options @@ -2572,7 +2662,7 @@ subroutine coupling_create (Coupling, IM, Model) endif !--- stochastic physics option - if (Model%do_sppt) then + if (Model%do_sppt .or. Model%ca_global)then allocate (Coupling%sppt_wts (IM,Model%levs)) Coupling%sppt_wts = clear_val endif @@ -2742,13 +2832,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & character(len=128) :: sw_file_clouds = '' !< RRTMGP file containing coefficients used to compute clouds optical properties integer :: rrtmgp_nBandsSW = 14 !< Number of RRTMGP SW bands. integer :: rrtmgp_nGptsSW = 224 !< Number of RRTMGP SW spectral points. - logical :: doG_cldoptics = .false. !< Use legacy RRTMG cloud-optics? - logical :: doGP_cldoptics_PADE = .false. !< Use RRTMGP cloud-optics: PADE approximation? - logical :: doGP_cldoptics_LUT = .false. !< Use RRTMGP cloud-optics: LUTs? + integer :: rrtmgp_cld_optics = 0 !< Flag to control which RRTMGP routine to compute cloud-optics. + !< = 0 ; Use RRTMGP implementation + !< = 1 ; Use RRTMGP (pade) + !< = 2 ; USE RRTMGP (LUT) integer :: rrtmgp_nrghice = 0 !< Number of ice-roughness categories integer :: rrtmgp_nGauss_ang=1 !< Number of angles used in Gaussian quadrature - logical :: do_GPsw_Glw = .false. - logical :: use_LW_jacobian = .false. !< Use Jacobian of LW to update LW radiation tendencies. + logical :: do_GPsw_Glw = .false. !--- Z-C microphysical parameters integer :: ncld = 1 !< choice of cloud scheme @@ -2760,8 +2850,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !---Max hourly real(kind=kind_phys) :: avg_max_length = 3600. !< reset value in seconds for max hourly !--- Ferrier-Aligo microphysical parameters - real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only + real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only; for 3-km domain logical :: spec_adv = .true. !< Individual cloud species advected + integer :: icloud = 0 !< cloud effect to the optical depth in radiation; this also controls the cloud fraction options + !< 3: with cloud effect from FA, and use cloud fraction option 3, based on Sundqvist et al. (1989) !--- M-G microphysical parameters integer :: fprcp = 0 !< no prognostic rain and snow (MG) integer :: pdfflag = 4 !< pdf flag for MG macro physics @@ -2812,12 +2904,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: lsoil = 4 !< number of soil layers integer :: lsoil_lsm = -1 !< number of soil layers internal to land surface model; -1 use lsoil integer :: lsnow_lsm = 3 !< maximum number of snow layers internal to land surface model - logical :: rdlai = .false. + logical :: rdlai = .false. !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4) + logical :: ua_phys = .false. !< flag for using University of Arizona? extension to NOAH LSM WRFv4 + logical :: usemonalb = .true. !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 + real(kind=kind_phys) :: aoasis = 1.0 !< potential evaporation multiplication factor for NOAH LSM WRFv4 + integer :: fasdas = 0 !< flag to use "flux-adjusting surface data assimilation system"; 0 = OFF, 1 = ON integer :: ivegsrc = 2 !< ivegsrc = 0 => USGS, !< ivegsrc = 1 => IGBP (20 category) !< ivegsrc = 2 => UMD (13 category) integer :: isot = 0 !< isot = 0 => Zobler soil type ( 9 category) !< isot = 1 => STATSGO soil type (19 category) + integer :: iopt_thcnd = 1 !< option to treat thermal conductivity in Noah LSM (new in 3.8) + !< = 1, original (default) + !< = 2, McCumber and Pielke for silt loam and sandy loam ! -- to use Noah MP, lsm needs to be set to 2 and both ivegsrc and isot are set ! to 1 - MODIS IGBP and STATSGO - the defaults are the same as in the ! scripts;change from namelist @@ -2836,7 +2935,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: iopt_stc = 1 !snow/soil temperature time scheme (only layer 1) logical :: use_ufo = .false. !< flag for gcycle surface option - + + logical :: lcurr_sf = .false. !< flag for taking ocean currents into account in GFDL surface layer + logical :: pert_cd = .false. !< flag for perturbing the surface drag coefficient for momentum in surface layer scheme + integer :: ntsflg = 0 !< flag for updating skin temperature in the GFDL surface layer scheme + real(kind=kind_phys) :: sfenth = 0.0 !< enthalpy flux factor 0 zot via charnock ..>0 zot enhanced>15m/s + !--- tuning parameters for physical parameterizations logical :: ras = .false. !< flag for ras convection scheme logical :: flipv = .true. !< flag for vertical direction flip (ras) @@ -2877,6 +2981,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: shinhong = .false. !< flag for scale-aware Shinhong vertical turbulent mixing scheme logical :: do_ysu = .false. !< flag for YSU vertical turbulent mixing scheme logical :: dspheat = .false. !< flag for tke dissipative heating + logical :: hurr_pbl = .false. !< flag for hurricane-specific options in PBL scheme logical :: lheatstrg = .false. !< flag for canopy heat storage parameterization logical :: cnvcld = .false. logical :: random_clds = .false. !< flag controls whether clouds are random @@ -2899,7 +3004,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 0: initial version of satmedmf (Nov. 2018) !< 1: updated version of satmedmf (as of May 2019) logical :: do_deep = .true. !< whether to do deep convection - + logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme + logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme integer :: grav_settling = 0 @@ -2914,6 +3020,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: bl_mynn_cloudmix = 1 integer :: bl_mynn_mixqt = 0 integer :: icloud_bl = 1 + real(kind=kind_phys) :: var_ric = 1.0 + real(kind=kind_phys) :: coef_ric_l = 0.16 + real(kind=kind_phys) :: coef_ric_s = 0.25 logical :: do_myjsfc = .false. !< flag for MYJ surface layer scheme logical :: do_myjpbl = .false. !< flag for MYJ PBL scheme @@ -2991,7 +3100,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< nstf_name(5) : zsea2 in mm !--- fractional grid logical :: frac_grid = .false. !< flag for fractional grid - logical :: frac_grid_off = .true. !< flag for using fractional grid logical :: ignore_lake = .true. !< flag for ignoring lakes real(kind=kind_phys) :: min_lakeice = 0.15d0 !< minimum lake ice value real(kind=kind_phys) :: min_seaice = 1.0d-11 !< minimum sea ice value @@ -3005,33 +3113,44 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 7=slightly decrease Cd for higher wind speed compare to 6 !< negative when cplwav2atm=.true. - i.e. two way wave coupling -!--- background vertical diffusion +!--- vertical diffusion real(kind=kind_phys) :: xkzm_m = 1.0d0 !< [in] bkgd_vdif_m background vertical diffusion for momentum real(kind=kind_phys) :: xkzm_h = 1.0d0 !< [in] bkgd_vdif_h background vertical diffusion for heat q real(kind=kind_phys) :: xkzm_s = 1.0d0 !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion real(kind=kind_phys) :: xkzminv = 0.3 !< diffusivity in inversion layers real(kind=kind_phys) :: moninq_fac = 1.0 !< turbulence diffusion coefficient factor real(kind=kind_phys) :: dspfac = 1.0 !< tke dissipative heating factor - real(kind=kind_phys) :: bl_upfr = 0.13 !< updraft fraction in boundary layer mass flux scheme real(kind=kind_phys) :: bl_dnfr = 0.1 !< downdraft fraction in boundary layer mass flux scheme +!--- parameters for canopy heat storage (CHS) parameterization + real(kind=kind_phys) :: z0fac = 0.3 + real(kind=kind_phys) :: e0fac = 0.5 + !---Cellular automaton options integer :: nca = 1 integer :: ncells = 5 - integer :: nlives = 10 + integer :: nlives = 30 + integer :: nca_g = 1 + integer :: ncells_g = 1 + integer :: nlives_g = 100 real(kind=kind_phys) :: nfracseed = 0.5 integer :: nseed = 100000 + integer :: nseed_g = 100 integer :: iseed_ca = 0 integer :: nspinup = 1 logical :: do_ca = .false. logical :: ca_sgs = .false. logical :: ca_global = .false. logical :: ca_smooth = .false. - logical :: isppt_deep = .false. real(kind=kind_phys) :: nthresh = 0.0 - + real :: ca_amplitude = 500. + integer :: nsmooth = 100 + logical :: ca_closure = .false. + logical :: ca_entr = .false. + logical :: ca_trigger = .false. + !--- IAU options real(kind=kind_phys) :: iau_delthrs = 0 !< iau time interval (to scale increments) character(len=240) :: iau_inc_files(7) = '' !< list of increment files @@ -3081,9 +3200,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & do_RRTMGP, active_gases, nGases, rrtmgp_root, & lw_file_gas, lw_file_clouds, rrtmgp_nBandsLW, rrtmgp_nGptsLW,& sw_file_gas, sw_file_clouds, rrtmgp_nBandsSW, rrtmgp_nGptsSW,& - doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & - rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, & - use_LW_jacobian, & + rrtmgp_cld_optics, rrtmgp_nrghice, rrtmgp_nGauss_ang, & + do_GPsw_Glw, & ! IN CCN forcing iccn, & !--- microphysical parameterizations @@ -3100,10 +3218,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & avg_max_length, & !--- land/surface model control lsm, lsoil, lsoil_lsm, lsnow_lsm, rdlai, & - nmtvr, ivegsrc, use_ufo, & + nmtvr, ivegsrc, use_ufo, iopt_thcnd, ua_phys, usemonalb, & + aoasis, fasdas, & ! Noah MP options iopt_dveg,iopt_crs,iopt_btr,iopt_run,iopt_sfc, iopt_frz, & iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, & + ! GFDL surface layer options + lcurr_sf, pert_cd, ntsflg, sfenth, & !--- physical parameterizations ras, trans_trac, old_monin, cnvgwd, mstrat, moist_adj, & cscnv, cal_pre, do_aw, do_shoc, shocaftcnv, shoc_cld, & @@ -3112,9 +3233,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & bl_mynn_cloudpdf, bl_mynn_edmf, bl_mynn_edmf_mom, & bl_mynn_edmf_tke, bl_mynn_edmf_part, bl_mynn_cloudmix, & bl_mynn_mixqt, icloud_bl, bl_mynn_tkeadvect, gwd_opt, & + var_ric, coef_ric_l, coef_ric_s, & do_myjsfc, do_myjpbl, & + hwrf_samfdeep, hwrf_samfshal, & h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, & - shinhong, do_ysu, dspheat, lheatstrg, cnvcld, & + shinhong, do_ysu, dspheat, hurr_pbl, lheatstrg, cnvcld, & random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, & do_deep, jcap, & cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, & @@ -3123,7 +3246,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- Rayleigh friction prslrd0, ral_ts, ldiag_ugwp, do_ugwp, do_tofd, & ! --- Ferrier-Aligo - spec_adv, rhgrd, & + spec_adv, rhgrd, icloud, & !--- mass flux deep convection clam_deep, c0s_deep, c1_deep, betal_deep, & betas_deep, evfact_deep, evfactl_deep, pgcon_deep, & @@ -3133,15 +3256,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- near surface sea temperature model nst_anl, lsea, nstf_name, & frac_grid, min_lakeice, min_seaice, min_lake_height, & - frac_grid_off, ignore_lake, & + ignore_lake, & !--- surface layer sfc_z0_type, & - ! background vertical diffusion + ! vertical diffusion xkzm_m, xkzm_h, xkzm_s, xkzminv, moninq_fac, dspfac, & bl_upfr, bl_dnfr, & + !--- canopy heat storage parameterization + z0fac, e0fac, & !--- cellular automata - nca, ncells, nlives, nfracseed,nseed, nthresh, do_ca, & - ca_sgs, ca_global,iseed_ca,ca_smooth,isppt_deep,nspinup, & + nca, ncells, nlives, nca_g, ncells_g, nlives_g, nfracseed, & + nseed, nseed_g, nthresh, do_ca, & + ca_sgs, ca_global,iseed_ca,ca_smooth, & + nspinup,ca_amplitude,nsmooth,ca_closure,ca_entr,ca_trigger, & !--- IAU iau_delthrs,iaufhrs,iau_inc_files,iau_filter_increments, & iau_drymassfixer, & @@ -3317,10 +3444,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%sw_file_clouds = sw_file_clouds Model%rrtmgp_nBandsSW = rrtmgp_nBandsSW Model%rrtmgp_nGptsSW = rrtmgp_nGptsSW - Model%doG_cldoptics = doG_cldoptics - Model%doGP_cldoptics_PADE = doGP_cldoptics_PADE - Model%doGP_cldoptics_LUT = doGP_cldoptics_LUT - Model%use_LW_jacobian = use_LW_jacobian + Model%rrtmgp_cld_optics = RRTMGP_CLD_OPTICS ! RRTMGP incompatible with levr /= levs if (Model%do_RRTMGP .and. Model%levr /= Model%levs) then write(0,*) "Logic error, RRTMGP only works with levr = levs" @@ -3387,6 +3511,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- F-A MP parameters Model%rhgrd = rhgrd Model%spec_adv = spec_adv + Model%icloud = icloud !--- gfdl MP parameters Model%lgfdlmprad = lgfdlmprad @@ -3397,8 +3522,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lsm = lsm Model%lsoil = lsoil ! Consistency check for RUC LSM - if (Model%lsm == Model%lsm_ruc .and. Model%nscyc>0) then - write(0,*) 'Logic error: RUC LSM cannot be used with surface data cycling at this point (fhcyc>0)' + if ((Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noah_wrfv4) .and. Model%nscyc>0) then + write(0,*) 'Logic error: RUC LSM and NOAH WRFv4 LSM cannot be used with surface data cycling at this point (fhcyc>0)' stop end if ! Flag to read leaf area index from input files (initial conditions) @@ -3421,10 +3546,24 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Set lower bound for LSM model, runs from negative (above surface) to surface (zero) Model%lsnow_lsm_lbound = -Model%lsnow_lsm+1 end if + Model%isurban = -999 !GJF isurban is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init + Model%isice = -999 !GJF isice is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init + Model%iswater = -999 !GJF iswater is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init + Model%iopt_thcnd = iopt_thcnd + Model%ua_phys = ua_phys + Model%usemonalb = usemonalb + Model%aoasis = aoasis + Model%fasdas = fasdas Model%ivegsrc = ivegsrc Model%isot = isot Model%use_ufo = use_ufo - + +! GFDL surface layer options + Model%lcurr_sf = lcurr_sf + Model%pert_cd = pert_cd + Model%ntsflg = ntsflg + Model%sfenth = sfenth + ! Noah MP options from namelist ! Model%iopt_dveg = iopt_dveg @@ -3460,6 +3599,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shoc_parm = shoc_parm Model%shocaftcnv = shocaftcnv Model%shoc_cld = shoc_cld + +!HWRF physics suite + if (hwrf_samfdeep .and. imfdeepcnv/=2) then + write(*,*) 'Logic error: hwrf_samfdeep requires imfdeepcnv=2' + stop + end if + if (hwrf_samfshal .and. imfshalcnv/=2) then + write(*,*) 'Logic error: hwrf_samfshal requires imfshalcnv=2' + stop + end if + Model%hwrf_samfdeep = hwrf_samfdeep + Model%hwrf_samfshal = hwrf_samfshal + if (oz_phys .and. oz_phys_2015) then write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.' stop @@ -3486,6 +3638,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shinhong = shinhong Model%do_ysu = do_ysu Model%dspheat = dspheat + Model%hurr_pbl = hurr_pbl Model%lheatstrg = lheatstrg Model%cnvcld = cnvcld Model%random_clds = random_clds @@ -3524,6 +3677,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%bl_mynn_tkeadvect = bl_mynn_tkeadvect Model%grav_settling = grav_settling Model%icloud_bl = icloud_bl + Model%var_ric = var_ric + Model%coef_ric_l = coef_ric_l + Model%coef_ric_s = coef_ric_s + Model%gwd_opt = gwd_opt Model%do_myjsfc = do_myjsfc Model%do_myjpbl = do_myjpbl @@ -3557,12 +3714,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- fractional grid Model%frac_grid = frac_grid - Model%frac_grid_off = frac_grid_off Model%ignore_lake = ignore_lake - if (Model%frac_grid) then - write(0,*) "ERROR: CCPP has not been tested with fractional landmask turned on" -! stop - end if Model%min_lakeice = min_lakeice Model%min_seaice = min_seaice Model%min_lake_height = min_lake_height @@ -3572,7 +3724,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%sfc_z0_type = sfc_z0_type if (Model%cplwav2atm) Model%sfc_z0_type = -1 -!--- backgroud vertical diffusion +!--- vertical diffusion Model%xkzm_m = xkzm_m Model%xkzm_h = xkzm_h Model%xkzm_s = xkzm_s @@ -3582,6 +3734,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%bl_upfr = bl_upfr Model%bl_dnfr = bl_dnfr +!--- canopy heat storage parametrization + Model%z0fac = z0fac + Model%e0fac = e0fac + !--- stochastic physics options ! do_sppt, do_shum, do_skeb and do_sfcperts are namelist variables in group ! physics that are parsed here and then compared in init_stochastic_physics @@ -3603,16 +3759,24 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nca = nca Model%ncells = ncells Model%nlives = nlives + Model%nca_g = nca_g + Model%ncells_g = ncells_g + Model%nlives_g = nlives_g Model%nfracseed = nfracseed Model%nseed = nseed + Model%nseed_g = nseed_g Model%ca_global = ca_global Model%do_ca = do_ca Model%ca_sgs = ca_sgs Model%iseed_ca = iseed_ca Model%ca_smooth = ca_smooth - Model%isppt_deep = isppt_deep Model%nspinup = nspinup Model%nthresh = nthresh + Model%ca_amplitude = ca_amplitude + Model%nsmooth = nsmooth + Model%ca_closure = ca_closure + Model%ca_entr = ca_entr + Model%ca_trigger = ca_trigger ! IAU flags !--- iau parameters @@ -3875,6 +4039,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,'iopt_stc = ', Model%iopt_stc elseif (Model%lsm == Model%lsm_ruc) then print *,' RUC Land Surface Model used' + elseif (Model%lsm == Model%lsm_noah_wrfv4) then + print *,' NOAH WRFv4 Land Surface Model used' else print *,' Unsupported LSM type - job aborted - lsm=',Model%lsm stop @@ -3885,7 +4051,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif print *,' nst_anl=',Model%nst_anl,' use_ufo=',Model%use_ufo,' frac_grid=',Model%frac_grid,& - ' frac_grid_off=',frac_grid_off,' ignore_lake=',ignore_lake + ' ignore_lake=',ignore_lake print *,' min_lakeice=',Model%min_lakeice,' min_seaice=',Model%min_seaice, & 'min_lake_height=',Model%min_lake_height if (Model%nstf_name(1) > 0 ) then @@ -3985,11 +4151,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,' Radiative heating calculated at',Model%levr, ' layers' if (Model%iovr_sw == 0) then print *,' random cloud overlap for Shortwave IOVR_SW=',Model%iovr_sw + elseif (Model%iovr_sw == 4) then + print *,'exponential cloud overlap for Shortwave IOVR_SW=',Model%iovr_lw else print *,' max-random cloud overlap for Shortwave IOVR_SW=',Model%iovr_sw endif if (Model%iovr_lw == 0) then print *,' random cloud overlap for Longwave IOVR_LW=',Model%iovr_lw + elseif (Model%iovr_lw == 4) then + print *,'exponential cloud overlap for Longwave IOVR_LW=',Model%iovr_lw else print *,' max-random cloud overlap for Longwave IOVR_LW=',Model%iovr_lw endif @@ -4320,10 +4490,7 @@ subroutine control_print(Model) print *, ' sw_file_clouds : ', Model%sw_file_clouds print *, ' rrtmgp_nBandsSW : ', Model%rrtmgp_nBandsSW print *, ' rrtmgp_nGptsSW : ', Model%rrtmgp_nGptsSW - print *, ' doG_cldoptics : ', Model%doG_cldoptics - print *, ' doGP_cldoptics_PADE: ', Model%doGP_cldoptics_PADE - print *, ' doGP_cldoptics_LUT : ', Model%doGP_cldoptics_LUT - print *, ' use_LW_jacobian : ', Model%use_LW_jacobian + print *, ' rrtmgp_cld_optics : ', Model%rrtmgp_cld_optics endif print *, ' ' print *, 'microphysical switch' @@ -4371,6 +4538,7 @@ subroutine control_print(Model) print *, ' Ferrier-Aligo microphysical parameters' print *, ' spec_adv : ', Model%spec_adv print *, ' rhgrd : ', Model%rhgrd + print *, ' icloud : ', Model%icloud print *, ' ' endif @@ -4382,6 +4550,13 @@ subroutine control_print(Model) print *, ' lsnow_lsm : ', Model%lsnow_lsm print *, ' ivegsrc : ', Model%ivegsrc print *, ' isot : ', Model%isot + print *, ' iopt_thcnd : ', Model%iopt_thcnd + print *, ' ua_phys : ', Model%ua_phys + print *, ' usemonalb : ', Model%usemonalb + print *, ' aoasis : ', Model%aoasis + print *, ' fasdas : ', Model%fasdas + print *, ' ivegsrc : ', Model%ivegsrc + print *, ' isot : ', Model%isot if (Model%lsm == Model%lsm_noahmp) then print *, ' Noah MP LSM is used, the options are' @@ -4400,6 +4575,10 @@ subroutine control_print(Model) endif print *, ' use_ufo : ', Model%use_ufo + print *, ' lcurr_sf : ', Model%lcurr_sf + print *, ' pert_cd : ', Model%pert_cd + print *, ' ntsflg : ', Model%ntsflg + print *, ' sfenth : ', Model%sfenth print *, ' ' print *, 'tuning parameters for physical parameterizations' print *, ' ras : ', Model%ras @@ -4460,6 +4639,10 @@ subroutine control_print(Model) print *, ' do_myjsfc : ', Model%do_myjsfc print *, ' do_myjpbl : ', Model%do_myjpbl print *, ' gwd_opt : ', Model%gwd_opt + print *, ' hurr_pbl : ', Model%hurr_pbl + print *, ' var_ric : ', Model%var_ric + print *, ' coef_ric_l : ', Model%coef_ric_l + print *, ' coef_ric_s : ', Model%coef_ric_s print *, ' ' print *, 'Rayleigh friction' print *, ' prslrd0 : ', Model%prslrd0 @@ -4495,7 +4678,7 @@ subroutine control_print(Model) print *, 'surface layer options' print *, ' sfc_z0_type : ', Model%sfc_z0_type print *, ' ' - print *, 'background vertical diffusion coefficients' + print *, 'vertical diffusion coefficients' print *, ' xkzm_m : ', Model%xkzm_m print *, ' xkzm_h : ', Model%xkzm_h print *, ' xkzm_s : ', Model%xkzm_s @@ -4505,6 +4688,10 @@ subroutine control_print(Model) print *, ' bl_upfr : ', Model%bl_upfr print *, ' bl_dnfr : ', Model%bl_dnfr print *, ' ' + print *, 'parameters for canopy heat storage parametrization' + print *, ' z0fac : ', Model%z0fac + print *, ' e0fac : ', Model%e0fac + print *, ' ' print *, 'stochastic physics' print *, ' do_sppt : ', Model%do_sppt print *, ' do_shum : ', Model%do_shum @@ -4512,19 +4699,27 @@ subroutine control_print(Model) print *, ' do_sfcperts : ', Model%do_sfcperts print *, ' ' print *, 'cellular automata' - print *, ' nca : ', Model%ncells + print *, ' nca : ', Model%nca print *, ' ncells : ', Model%ncells print *, ' nlives : ', Model%nlives + print *, ' nca_g : ', Model%nca_g + print *, ' ncells_g : ', Model%ncells_g + print *, ' nlives_g : ', Model%nlives_g print *, ' nfracseed : ', Model%nfracseed + print *, ' nseed_g : ', Model%nseed_g print *, ' nseed : ', Model%nseed print *, ' ca_global : ', Model%ca_global print *, ' ca_sgs : ', Model%ca_sgs print *, ' do_ca : ', Model%do_ca print *, ' iseed_ca : ', Model%iseed_ca print *, ' ca_smooth : ', Model%ca_smooth - print *, ' isppt_deep : ', Model%isppt_deep print *, ' nspinup : ', Model%nspinup print *, ' nthresh : ', Model%nthresh + print *, ' ca_amplitude : ', Model%ca_amplitude + print *, ' nsmooth : ', Model%nsmooth + print *, ' ca_closure : ', Model%ca_closure + print *, ' ca_entr : ', Model%ca_entr + print *, ' ca_trigger : ', Model%ca_trigger print *, ' ' print *, 'tracers' print *, ' tracer_names : ', Model%tracer_names @@ -4728,7 +4923,7 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%dsnow_cpl = clear_val endif - if (Model%do_sppt) then + if (Model%do_sppt .or. Model%ca_global) then allocate (Tbd%dtdtr (IM,Model%levs)) allocate (Tbd%dtotprcp (IM)) allocate (Tbd%dcnvprcp (IM)) @@ -4795,8 +4990,7 @@ subroutine tbd_create (Tbd, IM, Model) allocate (Tbd%phy_myj_thz0 (IM)) allocate (Tbd%phy_myj_qz0 (IM)) allocate (Tbd%phy_myj_uz0 (IM)) - allocate (Tbd%phy_myj_vz0 (IM)) - allocate (Tbd%phy_myj_z0base (IM)) + allocate (Tbd%phy_myj_vz0 (IM)) allocate (Tbd%phy_myj_akhs (IM)) allocate (Tbd%phy_myj_akms (IM)) allocate (Tbd%phy_myj_chkqlm (IM)) @@ -4809,8 +5003,7 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%phy_myj_thz0 = clear_val Tbd%phy_myj_qz0 = clear_val Tbd%phy_myj_uz0 = clear_val - Tbd%phy_myj_vz0 = clear_val - Tbd%phy_myj_z0base = clear_val + Tbd%phy_myj_vz0 = clear_val Tbd%phy_myj_akhs = clear_val Tbd%phy_myj_akms = clear_val Tbd%phy_myj_chkqlm = clear_val @@ -5003,13 +5196,15 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%sppt_wts(IM,Model%levs)) allocate (Diag%shum_wts(IM,Model%levs)) allocate (Diag%zmtnblck(IM)) + allocate (Diag%ca1 (IM)) + allocate (Diag%ca2 (IM)) + allocate (Diag%ca3 (IM)) ! F-A MP scheme if (Model%imp_physics == Model%imp_physics_fer_hires) then allocate (Diag%TRAIN (IM,Model%levs)) end if - allocate (Diag%ca_out (IM)) allocate (Diag%ca_deep (IM)) allocate (Diag%ca_turb (IM)) allocate (Diag%ca_shal (IM)) @@ -5104,6 +5299,9 @@ subroutine diag_create (Diag, IM, Model) !--- 3D diagnostics for Thompson MP / GFDL MP allocate (Diag%refl_10cm(IM,Model%levs)) + !--- New PBL Diagnostics + allocate (Diag%dkudiagnostic(IM,Model%levs)) + !-- New max hourly diag. allocate (Diag%refdmax(IM)) allocate (Diag%refdmax263k(IM)) @@ -5309,7 +5507,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%totgrpb = zero ! if (Model%do_ca) then - Diag%ca_out = zero + Diag%ca1 = zero + Diag%ca2 = zero + Diag%ca3 = zero Diag%ca_deep = zero Diag%ca_turb = zero Diag%ca_shal = zero @@ -5394,6 +5594,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) endif !----------------------------- +! Extra PBL diagnostics + Diag%dkudiagnostic = zero + ! max hourly diagnostics Diag%refl_10cm = zero Diag%refdmax = -35. @@ -5596,6 +5799,7 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%ep1d_land (IM)) allocate (Interstitial%ep1d_ocean (IM)) allocate (Interstitial%evap (IM)) + allocate (Interstitial%evapq (IM)) allocate (Interstitial%evap_ice (IM)) allocate (Interstitial%evap_land (IM)) allocate (Interstitial%evap_ocean (IM)) @@ -5638,7 +5842,10 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%gwdcu (IM,Model%levs)) allocate (Interstitial%gwdcv (IM,Model%levs)) allocate (Interstitial%h2o_pres (levh2o)) + allocate (Interstitial%hefac (IM)) + allocate (Interstitial%hffac (IM)) allocate (Interstitial%hflx (IM)) + allocate (Interstitial%hflxq (IM)) allocate (Interstitial%hflx_ice (IM)) allocate (Interstitial%hflx_land (IM)) allocate (Interstitial%hflx_ocean (IM)) @@ -5724,7 +5931,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%tsfc_land (IM)) allocate (Interstitial%tsfc_ocean (IM)) allocate (Interstitial%tsfg (IM)) - allocate (Interstitial%sktp1r (IM)) allocate (Interstitial%tsurf (IM)) allocate (Interstitial%tsurf_ice (IM)) allocate (Interstitial%tsurf_land (IM)) @@ -5754,53 +5960,51 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%zt1d (IM)) ! RRTMGP if (Model%do_RRTMGP) then - allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) - allocate (Interstitial%tv_lay (IM, Model%levs)) - allocate (Interstitial%relhum (IM, Model%levs)) - allocate (Interstitial%qs_lay (IM, Model%levs)) - allocate (Interstitial%q_lay (IM, Model%levs)) - allocate (Interstitial%deltaZ (IM, Model%levs)) - allocate (Interstitial%p_lev (IM, Model%levs+1)) - allocate (Interstitial%p_lay (IM, Model%levs)) - allocate (Interstitial%t_lev (IM, Model%levs+1)) - allocate (Interstitial%t_lay (IM, Model%levs)) - allocate (Interstitial%cloud_overlap_param (IM, Model%levs)) - allocate (Interstitial%precip_overlap_param (IM, Model%levs)) - allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) - allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) - allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) - allocate (Interstitial%cld_frac (IM, Model%levs)) - allocate (Interstitial%cld_lwp (IM, Model%levs)) - allocate (Interstitial%cld_reliq (IM, Model%levs)) - allocate (Interstitial%cld_iwp (IM, Model%levs)) - allocate (Interstitial%cld_reice (IM, Model%levs)) - allocate (Interstitial%cld_swp (IM, Model%levs)) - allocate (Interstitial%cld_resnow (IM, Model%levs)) - allocate (Interstitial%cld_rwp (IM, Model%levs)) - allocate (Interstitial%cld_rerain (IM, Model%levs)) - allocate (Interstitial%precip_frac (IM, Model%levs)) - allocate (Interstitial%icseed_lw (IM)) - allocate (Interstitial%icseed_sw (IM)) - allocate (Interstitial%flxprf_lw (IM, Model%levs+1)) - allocate (Interstitial%flxprf_sw (IM, Model%levs+1)) - allocate (Interstitial%sfc_emiss_byband (Model%rrtmgp_nBandsLW,IM)) - allocate (Interstitial%sec_diff_byband (Model%rrtmgp_nBandsLW,IM)) - allocate (Interstitial%sfc_alb_nir_dir (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_nir_dif (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_uvvis_dir (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_uvvis_dif (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%toa_src_sw (IM,Model%rrtmgp_nGptsSW)) - allocate (Interstitial%toa_src_lw (IM,Model%rrtmgp_nGptsLW)) - allocate (Interstitial%active_gases_array (Model%nGases)) + allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) + allocate (Interstitial%tv_lay (IM, Model%levs)) + allocate (Interstitial%relhum (IM, Model%levs)) + allocate (Interstitial%p_lev (IM, Model%levs+1)) + allocate (Interstitial%p_lay (IM, Model%levs)) + allocate (Interstitial%t_lev (IM, Model%levs+1)) + allocate (Interstitial%t_lay (IM, Model%levs)) + allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) + allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) + allocate (Interstitial%cld_frac (IM, Model%levs)) + allocate (Interstitial%cld_lwp (IM, Model%levs)) + allocate (Interstitial%cld_reliq (IM, Model%levs)) + allocate (Interstitial%cld_iwp (IM, Model%levs)) + allocate (Interstitial%cld_reice (IM, Model%levs)) + allocate (Interstitial%cld_swp (IM, Model%levs)) + allocate (Interstitial%cld_resnow (IM, Model%levs)) + allocate (Interstitial%cld_rwp (IM, Model%levs)) + allocate (Interstitial%cld_rerain (IM, Model%levs)) + allocate (Interstitial%hsw0 (IM, Model%levs)) + allocate (Interstitial%hswc (IM, Model%levs)) + allocate (Interstitial%hswb (IM, Model%levs, Model%rrtmgp_nGptsSW)) + allocate (Interstitial%hlw0 (IM, Model%levs)) + allocate (Interstitial%hlwc (IM, Model%levs)) + allocate (Interstitial%hlwb (IM, Model%levs, Model%rrtmgp_nGptsLW)) + allocate (Interstitial%icseed_lw (IM)) + allocate (Interstitial%icseed_sw (IM)) + allocate (Interstitial%flxprf_lw (IM, Model%levs+1)) + allocate (Interstitial%flxprf_sw (IM, Model%levs+1)) + allocate (Interstitial%sfc_emiss_byband (Model%rrtmgp_nBandsLW,IM)) + allocate (Interstitial%sec_diff_byband (Model%rrtmgp_nBandsLW,IM)) + allocate (Interstitial%sfc_alb_nir_dir (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_nir_dif (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_uvvis_dir (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_uvvis_dif (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%toa_src_sw (IM,Model%rrtmgp_nGptsSW)) + allocate (Interstitial%toa_src_lw (IM,Model%rrtmgp_nGptsLW)) + allocate (Interstitial%active_gases_array(Model%nGases)) end if ! CIRES UGWP v0 allocate (Interstitial%gw_dudt (IM,Model%levs)) @@ -5870,6 +6074,34 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%t2mmp (IM)) allocate (Interstitial%q2mp (IM)) end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + allocate (Interstitial%canopy_save (IM)) + allocate (Interstitial%chk_land (IM)) + allocate (Interstitial%cmc (IM)) + allocate (Interstitial%dqsdt2 (IM)) + allocate (Interstitial%drain_in_m_sm1 (IM)) + allocate (Interstitial%flag_lsm (IM)) + allocate (Interstitial%flag_lsm_glacier(IM)) + allocate (Interstitial%qs1 (IM)) + allocate (Interstitial%qv1 (IM)) + allocate (Interstitial%rho1 (IM)) + allocate (Interstitial%runoff_in_m_sm1 (IM)) + allocate (Interstitial%slc_save (IM,Model%lsoil)) + allocate (Interstitial%smcmax (IM)) + allocate (Interstitial%smc_save (IM,Model%lsoil)) + allocate (Interstitial%snowd_land_save (IM)) + allocate (Interstitial%snow_depth (IM)) + allocate (Interstitial%snohf_snow (IM)) + allocate (Interstitial%snohf_frzgra (IM)) + allocate (Interstitial%snohf_snowmelt (IM)) + allocate (Interstitial%soilm_in_m (IM)) + allocate (Interstitial%stc_save (IM,Model%lsoil)) + allocate (Interstitial%sthick (Model%lsoil)) + allocate (Interstitial%th1 (IM)) + allocate (Interstitial%tprcp_rate_land (IM)) + allocate (Interstitial%tsfc_land_save (IM)) + allocate (Interstitial%weasd_land_save (IM)) + end if ! ! Set components that do not change Interstitial%frain = Model%dtf/Model%dtp @@ -6124,47 +6356,48 @@ subroutine interstitial_rad_reset (Interstitial, Model) end if if (Model%do_RRTMGP) then - Interstitial%tracer = clear_val - Interstitial%tv_lay = clear_val - Interstitial%relhum = clear_val - Interstitial%qs_lay = clear_val - Interstitial%q_lay = clear_val - Interstitial%deltaZ = clear_val - Interstitial%p_lev = clear_val - Interstitial%p_lay = clear_val - Interstitial%t_lev = clear_val - Interstitial%t_lay = clear_val - Interstitial%cloud_overlap_param = clear_val - Interstitial%precip_overlap_param = clear_val - Interstitial%fluxlwDOWN_allsky = clear_val - Interstitial%fluxlwUP_clrsky = clear_val - Interstitial%fluxlwDOWN_clrsky = clear_val - Interstitial%fluxswUP_allsky = clear_val - Interstitial%fluxswDOWN_allsky = clear_val - Interstitial%fluxswUP_clrsky = clear_val - Interstitial%fluxswDOWN_clrsky = clear_val - Interstitial%aerosolslw = clear_val - Interstitial%aerosolssw = clear_val - Interstitial%cld_frac = clear_val - Interstitial%cld_lwp = clear_val - Interstitial%cld_reliq = clear_val - Interstitial%cld_iwp = clear_val - Interstitial%cld_reice = clear_val - Interstitial%cld_swp = clear_val - Interstitial%cld_resnow = clear_val - Interstitial%cld_rwp = clear_val - Interstitial%cld_rerain = clear_val - Interstitial%precip_frac = clear_val - Interstitial%icseed_lw = clear_val - Interstitial%icseed_sw = clear_val - Interstitial%sfc_emiss_byband = clear_val - Interstitial%sec_diff_byband = clear_val - Interstitial%sfc_alb_nir_dir = clear_val - Interstitial%sfc_alb_nir_dif = clear_val - Interstitial%sfc_alb_uvvis_dir = clear_val - Interstitial%sfc_alb_uvvis_dif = clear_val - Interstitial%toa_src_sw = clear_val - Interstitial%toa_src_lw = clear_val + Interstitial%tracer = clear_val + Interstitial%tv_lay = clear_val + Interstitial%relhum = clear_val + Interstitial%p_lev = clear_val + Interstitial%p_lay = clear_val + Interstitial%t_lev = clear_val + Interstitial%t_lay = clear_val + Interstitial%fluxlwUP_allsky = clear_val + Interstitial%fluxlwDOWN_allsky = clear_val + Interstitial%fluxlwUP_clrsky = clear_val + Interstitial%fluxlwDOWN_clrsky = clear_val + Interstitial%fluxswUP_allsky = clear_val + Interstitial%fluxswDOWN_allsky = clear_val + Interstitial%fluxswUP_clrsky = clear_val + Interstitial%fluxswDOWN_clrsky = clear_val + Interstitial%aerosolslw = clear_val + Interstitial%aerosolssw = clear_val + Interstitial%cld_frac = clear_val + Interstitial%cld_lwp = clear_val + Interstitial%cld_reliq = clear_val + Interstitial%cld_iwp = clear_val + Interstitial%cld_reice = clear_val + Interstitial%cld_swp = clear_val + Interstitial%cld_resnow = clear_val + Interstitial%cld_rwp = clear_val + Interstitial%cld_rerain = clear_val + Interstitial%hsw0 = clear_val + Interstitial%hswc = clear_val + Interstitial%hswb = clear_val + Interstitial%hlw0 = clear_val + Interstitial%hlwc = clear_val + Interstitial%hlwb = clear_val + Interstitial%icseed_lw = clear_val + Interstitial%icseed_sw = clear_val + Interstitial%sfc_emiss_byband = clear_val + Interstitial%sec_diff_byband = clear_val + Interstitial%sfc_alb_nir_dir = clear_val + Interstitial%sfc_alb_nir_dif = clear_val + Interstitial%sfc_alb_uvvis_dir = clear_val + Interstitial%sfc_alb_uvvis_dif = clear_val + Interstitial%toa_src_sw = clear_val + Interstitial%toa_src_lw = clear_val end if ! end subroutine interstitial_rad_reset @@ -6238,6 +6471,7 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%ep1d_land = huge Interstitial%ep1d_ocean = huge Interstitial%evap = clear_val + Interstitial%evapq = clear_val Interstitial%evap_ice = huge Interstitial%evap_land = huge Interstitial%evap_ocean = huge @@ -6276,7 +6510,10 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%gflx_ocean = clear_val Interstitial%gwdcu = clear_val Interstitial%gwdcv = clear_val + Interstitial%hefac = clear_val + Interstitial%hffac = clear_val Interstitial%hflx = clear_val + Interstitial%hflxq = clear_val Interstitial%hflx_ice = huge Interstitial%hflx_land = huge Interstitial%hflx_ocean = huge @@ -6430,6 +6667,34 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%t2mmp = clear_val Interstitial%q2mp = clear_val end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + Interstitial%canopy_save = clear_val + Interstitial%chk_land = huge + Interstitial%cmc = clear_val + Interstitial%dqsdt2 = clear_val + Interstitial%drain_in_m_sm1 = clear_val + Interstitial%flag_lsm = .false. + Interstitial%flag_lsm_glacier= .false. + Interstitial%qs1 = huge + Interstitial%qv1 = huge + Interstitial%rho1 = clear_val + Interstitial%runoff_in_m_sm1 = clear_val + Interstitial%slc_save = clear_val + Interstitial%smcmax = clear_val + Interstitial%smc_save = clear_val + Interstitial%snowd_land_save = huge + Interstitial%snow_depth = clear_val + Interstitial%snohf_snow = clear_val + Interstitial%snohf_frzgra = clear_val + Interstitial%snohf_snowmelt = clear_val + Interstitial%soilm_in_m = clear_val + Interstitial%stc_save = clear_val + Interstitial%sthick = clear_val + Interstitial%th1 = clear_val + Interstitial%tprcp_rate_land = huge + Interstitial%tsfc_land_save = huge + Interstitial%weasd_land_save = huge + end if ! ! Set flag for resetting maximum hourly output fields Interstitial%reset = mod(Model%kdt-1, nint(Model%avg_max_length/Model%dtp)) == 0 @@ -6440,17 +6705,6 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%radar_reset = mod(Model%kdt-1, nint(Model%nsradar_reset/Model%dtp)) == 0 end if ! - - ! - ! RRTMGP - ! - if (Model%do_RRTMGP) then - if (Model%use_LW_jacobian) then - !Interstitial%fluxlwUP_jac = clear_val - !Interstitial%fluxlwDOWN_jac = clear_val - endif - endif - end subroutine interstitial_phys_reset subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) @@ -6560,6 +6814,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%ep1d_land ) = ', sum(Interstitial%ep1d_land ) write (0,*) 'sum(Interstitial%ep1d_ocean ) = ', sum(Interstitial%ep1d_ocean ) write (0,*) 'sum(Interstitial%evap ) = ', sum(Interstitial%evap ) + write (0,*) 'sum(Interstitial%evapq ) = ', sum(Interstitial%evapq ) write (0,*) 'sum(Interstitial%evap_ice ) = ', sum(Interstitial%evap_ice ) write (0,*) 'sum(Interstitial%evap_land ) = ', sum(Interstitial%evap_land ) write (0,*) 'sum(Interstitial%evap_ocean ) = ', sum(Interstitial%evap_ocean ) @@ -6602,7 +6857,10 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%gflx_ocean ) = ', sum(Interstitial%gflx_ocean ) write (0,*) 'sum(Interstitial%gwdcu ) = ', sum(Interstitial%gwdcu ) write (0,*) 'sum(Interstitial%gwdcv ) = ', sum(Interstitial%gwdcv ) + write (0,*) 'sum(Interstitial%hefac ) = ', sum(Interstitial%hefac ) + write (0,*) 'sum(Interstitial%hffac ) = ', sum(Interstitial%hffac ) write (0,*) 'sum(Interstitial%hflx ) = ', sum(Interstitial%hflx ) + write (0,*) 'sum(Interstitial%hflxq ) = ', sum(Interstitial%hflxq ) write (0,*) 'sum(Interstitial%hflx_ice ) = ', sum(Interstitial%hflx_ice ) write (0,*) 'sum(Interstitial%hflx_land ) = ', sum(Interstitial%hflx_land ) write (0,*) 'sum(Interstitial%hflx_ocean ) = ', sum(Interstitial%hflx_ocean ) @@ -6743,39 +7001,39 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%dudt_tms ) = ', sum(Interstitial%dudt_tms ) ! ! RRTMGP fields - write (0,*) 'sum(Interstitial%aerosolslw ) = ', sum(Interstitial%aerosolslw ) - write (0,*) 'sum(Interstitial%aerosolssw ) = ', sum(Interstitial%aerosolssw ) - write (0,*) 'sum(Interstitial%cld_frac ) = ', sum(Interstitial%cld_frac ) - write (0,*) 'sum(Interstitial%cld_lwp ) = ', sum(Interstitial%cld_lwp ) - write (0,*) 'sum(Interstitial%cld_reliq ) = ', sum(Interstitial%cld_reliq ) - write (0,*) 'sum(Interstitial%cld_iwp ) = ', sum(Interstitial%cld_iwp ) - write (0,*) 'sum(Interstitial%cld_reice ) = ', sum(Interstitial%cld_reice ) - write (0,*) 'sum(Interstitial%cld_swp ) = ', sum(Interstitial%cld_swp ) - write (0,*) 'sum(Interstitial%cld_resnow ) = ', sum(Interstitial%cld_resnow ) - write (0,*) 'sum(Interstitial%cld_rwp ) = ', sum(Interstitial%cld_rwp ) - write (0,*) 'sum(Interstitial%cld_rerain ) = ', sum(Interstitial%cld_rerain ) - write (0,*) 'sum(Interstitial%precip_frac ) = ', sum(Interstitial%precip_frac ) - write (0,*) 'sum(Interstitial%icseed_lw ) = ', sum(Interstitial%icseed_lw ) - write (0,*) 'sum(Interstitial%icseed_sw ) = ', sum(Interstitial%icseed_sw ) - write (0,*) 'sum(Interstitial%fluxlwUP_allsky ) = ', sum(Interstitial%fluxlwUP_allsky ) - write (0,*) 'sum(Interstitial%fluxlwDOWN_allsky ) = ', sum(Interstitial%fluxlwDOWN_allsky) - write (0,*) 'sum(Interstitial%fluxlwUP_clrsky ) = ', sum(Interstitial%fluxlwUP_clrsky ) - write (0,*) 'sum(Interstitial%fluxlwDOWN_clrsky ) = ', sum(Interstitial%fluxlwDOWN_clrsky) - write (0,*) 'sum(Interstitial%fluxswUP_allsky ) = ', sum(Interstitial%fluxswUP_allsky ) - write (0,*) 'sum(Interstitial%fluxswDOWN_allsky ) = ', sum(Interstitial%fluxswDOWN_allsky) - write (0,*) 'sum(Interstitial%fluxswUP_clrsky ) = ', sum(Interstitial%fluxswUP_clrsky ) - write (0,*) 'sum(Interstitial%fluxswDOWN_clrsky ) = ', sum(Interstitial%fluxswDOWN_clrsky) - write (0,*) 'sum(Interstitial%relhum ) = ', sum(Interstitial%relhum ) - write (0,*) 'sum(Interstitial%q_lay ) = ', sum(Interstitial%q_lay ) - write (0,*) 'sum(Interstitial%qs_lay ) = ', sum(Interstitial%qs_lay ) - write (0,*) 'sum(Interstitial%deltaZ ) = ', sum(Interstitial%deltaZ ) - write (0,*) 'sum(Interstitial%p_lay ) = ', sum(Interstitial%p_lay ) - write (0,*) 'sum(Interstitial%p_lev ) = ', sum(Interstitial%p_lev ) - write (0,*) 'sum(Interstitial%t_lay ) = ', sum(Interstitial%t_lay ) - write (0,*) 'sum(Interstitial%t_lev ) = ', sum(Interstitial%t_lev ) - write (0,*) 'sum(Interstitial%tv_lay ) = ', sum(Interstitial%tv_lay ) - write (0,*) 'sum(Interstitial%cloud_overlap_param ) = ', sum(Interstitial%cloud_overlap_param) - write (0,*) 'sum(Interstitial%precip_overlap_param ) = ', sum(Interstitial%precip_overlap_param) + write (0,*) 'sum(Interstitial%aerosolslw ) = ', sum(Interstitial%aerosolslw ) + write (0,*) 'sum(Interstitial%aerosolssw ) = ', sum(Interstitial%aerosolssw ) + write (0,*) 'sum(Interstitial%cld_frac ) = ', sum(Interstitial%cld_frac ) + write (0,*) 'sum(Interstitial%cld_lwp ) = ', sum(Interstitial%cld_lwp ) + write (0,*) 'sum(Interstitial%cld_reliq ) = ', sum(Interstitial%cld_reliq ) + write (0,*) 'sum(Interstitial%cld_iwp ) = ', sum(Interstitial%cld_iwp ) + write (0,*) 'sum(Interstitial%cld_reice ) = ', sum(Interstitial%cld_reice ) + write (0,*) 'sum(Interstitial%cld_swp ) = ', sum(Interstitial%cld_swp ) + write (0,*) 'sum(Interstitial%cld_resnow ) = ', sum(Interstitial%cld_resnow ) + write (0,*) 'sum(Interstitial%cld_rwp ) = ', sum(Interstitial%cld_rwp ) + write (0,*) 'sum(Interstitial%cld_rerain ) = ', sum(Interstitial%cld_rerain ) + write (0,*) 'sum(Interstitial%hsw0 ) = ', sum(Interstitial%hsw0 ) + write (0,*) 'sum(Interstitial%hswc ) = ', sum(Interstitial%hswc ) + write (0,*) 'sum(Interstitial%hswb ) = ', sum(Interstitial%hswb ) + write (0,*) 'sum(Interstitial%hlw0 ) = ', sum(Interstitial%hlw0 ) + write (0,*) 'sum(Interstitial%hlwc ) = ', sum(Interstitial%hlwc ) + write (0,*) 'sum(Interstitial%hlwb ) = ', sum(Interstitial%hlwb ) + write (0,*) 'sum(Interstitial%icseed_lw ) = ', sum(Interstitial%icseed_lw ) + write (0,*) 'sum(Interstitial%icseed_sw ) = ', sum(Interstitial%icseed_sw ) + write (0,*) 'sum(Interstitial%fluxlwUP_allsky ) = ', sum(Interstitial%fluxlwUP_allsky ) + write (0,*) 'sum(Interstitial%fluxlwDOWN_allsky) = ', sum(Interstitial%fluxlwDOWN_allsky) + write (0,*) 'sum(Interstitial%fluxlwUP_clrsky ) = ', sum(Interstitial%fluxlwUP_clrsky ) + write (0,*) 'sum(Interstitial%fluxlwDOWN_clrsky) = ', sum(Interstitial%fluxlwDOWN_clrsky) + write (0,*) 'sum(Interstitial%fluxswUP_allsky ) = ', sum(Interstitial%fluxswUP_allsky ) + write (0,*) 'sum(Interstitial%fluxswDOWN_allsky) = ', sum(Interstitial%fluxswDOWN_allsky) + write (0,*) 'sum(Interstitial%fluxswUP_clrsky ) = ', sum(Interstitial%fluxswUP_clrsky ) + write (0,*) 'sum(Interstitial%fluxswDOWN_clrsky) = ', sum(Interstitial%fluxswDOWN_clrsky) + write (0,*) 'sum(Interstitial%relhum ) = ', sum(Interstitial%relhum ) + write (0,*) 'sum(Interstitial%p_lay ) = ', sum(Interstitial%p_lay ) + write (0,*) 'sum(Interstitial%p_lev ) = ', sum(Interstitial%p_lev ) + write (0,*) 'sum(Interstitial%t_lay ) = ', sum(Interstitial%t_lay ) + write (0,*) 'sum(Interstitial%t_lev ) = ', sum(Interstitial%t_lev ) + write (0,*) 'sum(Interstitial%tv_lay ) = ', sum(Interstitial%tv_lay ) ! Print arrays that are conditional on physics choices if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then @@ -6823,6 +7081,31 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%t2mmp ) = ', sum(Interstitial%t2mmp ) write (0,*) 'sum(Interstitial%q2mp ) = ', sum(Interstitial%q2mp ) end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + write (0,*) 'sum(Interstitial%canopy_save ) = ', sum(Interstitial%canopy_save ) + write (0,*) 'sum(Interstitial%chk_land ) = ', sum(Interstitial%chk_land ) + write (0,*) 'sum(Interstitial%cmc ) = ', sum(Interstitial%cmc ) + write (0,*) 'sum(Interstitial%dqsdt2 ) = ', sum(Interstitial%dqsdt2 ) + write (0,*) 'sum(Interstitial%drain_in_m_sm1 ) = ', sum(Interstitial%drain_in_m_sm1 ) + write (0,*) 'Interstitial%flag_lsm(1) = ', Interstitial%flag_lsm(1) + write (0,*) 'Interstitial%flag_lsm_glacier(1) = ', Interstitial%flag_lsm_glacier(1) + write (0,*) 'sum(Interstitial%qs1 ) = ', sum(Interstitial%qs1 ) + write (0,*) 'sum(Interstitial%qv1 ) = ', sum(Interstitial%qv1 ) + write (0,*) 'sum(Interstitial%rho1 ) = ', sum(Interstitial%rho1 ) + write (0,*) 'sum(Interstitial%runoff_in_m_sm1 ) = ', sum(Interstitial%runoff_in_m_sm1 ) + write (0,*) 'sum(Interstitial%smcmax ) = ', sum(Interstitial%smcmax ) + write (0,*) 'sum(Interstitial%snowd_land_save ) = ', sum(Interstitial%snowd_land_save ) + write (0,*) 'sum(Interstitial%snow_depth ) = ', sum(Interstitial%snow_depth ) + write (0,*) 'sum(Interstitial%snohf_snow ) = ', sum(Interstitial%snohf_snow ) + write (0,*) 'sum(Interstitial%snohf_frzgra ) = ', sum(Interstitial%snohf_frzgra ) + write (0,*) 'sum(Interstitial%snohf_snowmelt ) = ', sum(Interstitial%snohf_snowmelt ) + write (0,*) 'sum(Interstitial%soilm_in_m ) = ', sum(Interstitial%soilm_in_m ) + write (0,*) 'sum(Interstitial%sthick ) = ', sum(Interstitial%sthick ) + write (0,*) 'sum(Interstitial%th1 ) = ', sum(Interstitial%th1 ) + write (0,*) 'sum(Interstitial%tprcp_rate_land ) = ', sum(Interstitial%tprcp_rate_land ) + write (0,*) 'sum(Interstitial%tsfc_land_save ) = ', sum(Interstitial%tsfc_land_save ) + write (0,*) 'sum(Interstitial%weasd_land_save ) = ', sum(Interstitial%weasd_land_save ) + end if write (0,*) 'Interstitial_print: end' ! end subroutine interstitial_print diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 9e5e7b01..53710f3a 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -492,6 +492,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys [snowd] standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth @@ -541,6 +548,20 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[z0base] + standard_name = baseline_surface_roughness_length + long_name = baseline surface roughness length for momentum in meter + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[semisbase] + standard_name = baseline_surface_longwave_emissivity + long_name = baseline surface lw emissivity in fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [sncovr] standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction @@ -1122,6 +1143,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snotime] + standard_name = time_since_last_snowfall + long_name = elapsed time since last snowfall + units = s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [wetness] standard_name = normalized_soil_wetness_for_land_surface_model long_name = normalized soil wetness for lsm @@ -1792,34 +1820,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[tconvtend] - standard_name = tendency_of_air_temperature_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency of air temperature due to deep convection - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[qconvtend] - standard_name = tendency_of_water_vapor_specific_humidity_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency of specific humidity due to deep convection - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[uconvtend] - standard_name = tendency_of_x_wind_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency_of_x_wind_due_to_deep_convection - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[vconvtend] - standard_name = tendency_of_y_wind_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency_of_y_wind_due_to_deep_convection - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys [ca_deep] standard_name = fraction_of_cellular_automata_for_deep_convection long_name = fraction of cellular automata for deep convection @@ -1827,9 +1827,23 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[cape] - standard_name = convective_available_potential_energy_for_coupling - long_name = convective available potential energy for coupling +[vfact_ca] + standard_name = vertical_weight_for_ca + long_name = vertical weight for ca + units = frac + dimensions = (vertical_dimension) + type = real + kind = kind_phys +[ca1] + standard_name = cellular_automata_global_pattern + long_name = cellular automata global pattern + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[condition] + standard_name = physics_field_for_coupling + long_name = physics_field_for_coupling units = m2 s-2 dimensions = (horizontal_dimension) type = real @@ -2347,30 +2361,12 @@ units = count dimensions = () type = integer -[doG_cldoptics] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMG - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical -[doGP_cldoptics_PADE] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_PADE - long_name = logical flag to control cloud optics scheme. +[rrtmgp_cld_optics] + standard_name = rrtmgp_cloud_optics_flag + long_name = Flag to control which RRTMGP cloud-optics scheme (Model%rrtmgp_cld_optics) units = flag - dimensions = () - type = logical -[doGP_cldoptics_LUT] - standard_name = flag_to_calc_lw_cld_optics_using_RRTMGP_LUT - long_name = logical flag to control cloud optics scheme. - units = flag - dimensions = () - type = logical -[use_LW_jacobian] - standard_name = flag_to_calc_RRTMGP_LW_jacobian - long_name = logical flag to control RRTMGP LW calculation - units = flag - dimensions = () - type = logical + dimensions = () + type = integer [rrtmgp_nrghice] standard_name = number_of_rrtmgp_ice_roughness long_name = number of ice-roughness categories in RRTMGP calculation (Model%rrtmgp_nrghice) @@ -2798,6 +2794,18 @@ units = flag dimensions = () type = integer +[lsm_noah_wrfv4] + standard_name = flag_for_noah_wrfv4_land_surface_scheme + long_name = flag for NOAH WRFv4 land surface model + units = flag + dimensions = () + type = integer +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer [lsoil] standard_name = soil_vertical_dimension long_name = number of soil layers @@ -2824,10 +2832,35 @@ type = integer [rdlai] standard_name = flag_for_reading_leaf_area_index_from_input - long_name = flag for reading leaf area index from initial conditions for RUC LSM + long_name = flag for reading leaf area index from initial conditions units = flag dimensions = () type = logical +[ua_phys] + standard_name = flag_for_noah_lsm_ua_extension + long_name = flag for using University of Arizona(?) extension for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = logical +[usemonalb] + standard_name = flag_for_reading_surface_diffused_shortwave_albedo_from_input + long_name = flag for reading surface diffused shortwave albedo for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = logical +[aoasis] + standard_name = potential_evaporation_multiplicative_factor + long_name = potential evaporation multiplicative factor for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = none + dimensions = () + type = real + kind = kind_phys +[fasdas] + standard_name = flag_flux_adjusting_surface_data_assimilation_system + long_name = flag to use the flux adjusting surface data assimilation system for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = integer [ivegsrc] standard_name = vegetation_type_dataset_choice long_name = land use dataset choice @@ -2840,6 +2873,30 @@ units = index dimensions = () type = integer +[isurban] + standard_name = urban_vegetation_category + long_name = index of the urban vegetation category in the chosen vegetation dataset + units = index + dimensions = () + type = integer +[isice] + standard_name = ice_vegetation_category + long_name = index of the permanent snow/ice category in the chosen vegetation dataset + units = index + dimensions = () + type = integer +[iswater] + standard_name = water_vegetation_category + long_name = index of the water body vegetation category in the chosen vegetation dataset + units = index + dimensions = () + type = integer +[iopt_thcnd] + standard_name = flag_for_thermal_conductivity_option + long_name = choice for thermal conductivity option (see module_sf_noahlsm) + units = index + dimensions = () + type = integer [spec_adv] standard_name = flag_for_individual_cloud_species_advected long_name = flag for individual cloud species advected @@ -2925,6 +2982,31 @@ units = index dimensions = () type = integer +[lcurr_sf] + standard_name = flag_for_ocean_currents_in_surface_layer_scheme + long_name = flag for taking ocean currents into account in surface layer scheme + units = flag + dimensions = () + type = logical +[pert_cd] + standard_name = flag_for_perturbation_of_surface_drag_coefficient_for_momentum_in_air + long_name = flag for perturbing the surface drag coefficient for momentum in surface layer scheme + units = flag + dimensions = () + type = logical +[ntsflg] + standard_name = flag_for_updating_skin_temperatuer_in_surface_layer_scheme + long_name = flag for updating skin temperature in the surface layer scheme + units = flag + dimensions = () + type = integer +[sfenth] + standard_name = enthalpy_flux_factor + long_name = enthalpy flux factor used in surface layer scheme + units = none + dimensions = () + type = real + kind = kind_phys [ras] standard_name = flag_for_ras_deep_convection long_name = flag for ras convection scheme @@ -3058,6 +3140,12 @@ units = flag dimensions = () type = logical +[hurr_pbl] + standard_name = flag_hurricane_PBL + long_name = flag for hurricane-specific options in PBL scheme + units = flag + dimensions = () + type = logical [lheatstrg] standard_name = flag_for_canopy_heat_storage long_name = flag for canopy heat storage parameterization @@ -3130,6 +3218,18 @@ units = flag dimensions = () type = integer +[hwrf_samfdeep] + standard_name = flag_for_hwrf_samfdeepcnv_scheme + long_name = flag for hwrf samfdeepcnv scheme + units = flag + dimensions = () + type = logical +[hwrf_samfshal] + standard_name = flag_for_hwrf_samfshalcnv_scheme + long_name = flag for hwrf samfshalcnv scheme + units = flag + dimensions = () + type = logical [isatmedmf] standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL long_name = choice of scale-aware TKE moist EDMF PBL scheme @@ -3444,7 +3544,7 @@ kind = kind_phys [moninq_fac] standard_name = atmosphere_diffusivity_coefficient_factor - long_name = multiplicative constant for atmospheric diffusivities + long_name = multiplicative constant for atmospheric diffusivities (AKA alpha) units = none dimensions = () type = real @@ -3470,6 +3570,20 @@ dimensions = () type = real kind = kind_phys +[z0fac] + standard_name = surface_roughness_fraction_factor + long_name = surface roughness fraction for canopy heat storage parameterization + units = none + dimensions = () + type = real + kind = kind_phys +[e0fac] + standard_name = latent_heat_flux_fraction_factor_relative_to_sensible_heat_flux + long_name = latent heat flux fraction relative to sensible heat flux for canopy heat storage parameterization + units = none + dimensions = () + type = real + kind = kind_phys [nca] standard_name = number_of_independent_cellular_automata long_name = number of independent cellular automata @@ -3519,15 +3633,27 @@ units = flag dimensions = () type = logical -[ca_smooth] - standard_name = flag_for_gaussian_spatial_filter - long_name = switch for gaussian spatial filter +[ca_closure] + standard_name = flag_for_global_cellular_automata_closure + long_name = switch for ca on closure units = flag dimensions = () type = logical -[isppt_deep] - standard_name = flag_for_combination_of_sppt_with_isppt_deep - long_name = switch for combination with isppt_deep. +[ca_entr] + standard_name = flag_for_global_cellular_automata_entr + long_name = switch for ca on entr + units = flag + dimensions = () + type = logical +[ca_trigger] + standard_name = flag_for_global_cellular_automata_trigger + long_name = switch for ca on trigger + units = flag + dimensions = () + type = logical +[ca_smooth] + standard_name = flag_for_gaussian_spatial_filter + long_name = switch for gaussian spatial filter units = flag dimensions = () type = logical @@ -4059,6 +4185,12 @@ dimensions = () type = real kind = kind_phys +[icloud] + standard_name = cloud_effect_to_optical_depth_and_cloud_fraction + long_name = cloud effect to the optical depth and cloud fraction in radiation + units = flag + dimensions = () + type = integer [gwd_opt] standard_name = gwd_opt long_name = flag to choose gwd scheme @@ -4161,6 +4293,27 @@ units = flag dimensions = () type = integer +[var_ric] + standard_name = flag_variable_bulk_richardson_number + long_name = flag for calculating variable bulk richardson number for hurricane PBL + units = flag + dimensions = () + type = real + kind = kind_phys +[coef_ric_l] + standard_name = coefficient_for_variable_bulk_richardson_number_over_land + long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over land + units = none + dimensions = () + type = real + kind = kind_phys +[coef_ric_s] + standard_name = coefficient_for_variable_bulk_richardson_number_over_ocean + long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over ocean + units = none + dimensions = () + type = real + kind = kind_phys [do_ugwp] standard_name = do_ugwp long_name = flag to activate CIRES UGWP @@ -4294,7 +4447,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_res_MG) + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys [imap] @@ -4616,13 +4769,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[phy_myj_z0base] - standard_name = baseline_surface_roughness_length - long_name = baseline surface roughness length for momentum in meter - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [phy_myj_akhs] standard_name = heat_exchange_coefficient_for_MYJ_schemes long_name = surface heat exchange_coefficient for MYJ schemes @@ -5747,6 +5893,13 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[dkudiagnostic] + standard_name = atmosphere_momentum_diffusivity + long_name = diffusivity for momentum + units = m2 s-1 + dimensions = (horizontal_dimension,vertical_dimension_minus_one) + type = real + kind = kind_phys [ndust] standard_name = number_of_dust_bins_for_diagnostics long_name = number of dust bins for diagnostics @@ -6153,6 +6306,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[canopy_save] + standard_name = canopy_water_amount_save + long_name = canopy water amount before entering a physics scheme + units = kg m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [cd] standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum @@ -6230,6 +6390,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[chk_land] + standard_name = surface_conductance_for_heat_and_moisture_in_air_over_land + long_name = surface conductance for heat & moisture over land + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [cf_upi] standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics @@ -6377,6 +6544,13 @@ dimensions = (horizontal_dimension,4) type = real kind = kind_phys +[cmc] + standard_name = canopy_water_amount_in_m + long_name = canopy water amount in m + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [cmm_ocean] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean @@ -6608,6 +6782,13 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[dqsdt2] + standard_name = saturation_specific_humidity_slope + long_name = saturation specific humidity slope at lowest model layer + units = K-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [dqsfc1] standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux @@ -6622,6 +6803,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[drain_in_m_sm1] + standard_name = subsurface_runoff_flux_in_m_sm1 + long_name = subsurface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [dtdt] standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics @@ -6776,6 +6964,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[evapq] + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux reduced by surface roughness + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [evap_ocean] standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean long_name = kinematic surface upward latent heat flux over ocean @@ -6934,6 +7129,18 @@ units = flag dimensions = (horizontal_dimension) type = logical +[flag_lsm] + standard_name = flag_for_calling_land_surface_model + long_name = flag for calling land surface model + units = flag + dimensions = (horizontal_dimension) + type = logical +[flag_lsm_glacier] + standard_name = flag_for_calling_land_surface_model_glacier + long_name = flag for calling land surface model over glacier + units = flag + dimensions = (horizontal_dimension) + type = logical [ffmm_ocean] standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean @@ -7192,6 +7399,20 @@ dimensions = (vertical_dimension_of_h2o_forcing_data) type = real kind = kind_phys +[hefac] + standard_name = surface_upward_latent_heat_flux_reduction_factor + long_name = surface upward latent heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[hffac] + standard_name = surface_upward_sensible_heat_flux_reduction_factor + long_name = surface upward sensible heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [hflx] standard_name = kinematic_surface_upward_sensible_heat_flux long_name = kinematic surface upward sensible heat flux @@ -7199,6 +7420,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[hflxq] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux reduced by surface roughness + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [hflx_ocean] standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean long_name = kinematic surface upward sensible heat flux over ocean @@ -7699,6 +7927,20 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[qs1] + standard_name = saturation_specific_humidity_at_lowest_model_layer + long_name = saturation specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[qv1] + standard_name = bounded_specific_humidity_at_lowest_model_layer_over_land + long_name = specific humidity at lowest model layer over land bounded between a nonzero epsilon and saturation + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [radar_reset] standard_name = flag_for_resetting_radar_reflectivity_calculation long_name = flag for resetting radar reflectivity calculation @@ -7788,6 +8030,13 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[rho1] + standard_name = air_density_at_lowest_model_layer + long_name = air density at lowest model layer + units = kg m-3 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [runoff] standard_name = surface_runoff_flux long_name = surface runoff flux @@ -7795,6 +8044,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[runoff_in_m_sm1] + standard_name = surface_runoff_flux_in_m_sm1 + long_name = surface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [save_q(:,:,index_for_liquid_cloud_condensate)] standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme @@ -7919,12 +8175,33 @@ units = flag dimensions = () type = logical +[slc_save] + standard_name = volume_fraction_of_unfrozen_soil_moisture_save + long_name = liquid soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys [slopetype] standard_name = surface_slope_classification long_name = surface slope type at each grid cell units = index dimensions = (horizontal_dimension) type = integer +[smcmax] + standard_name = soil_porosity + long_name = volumetric soil porosity + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[smc_save] + standard_name = volume_fraction_of_soil_moisture_save + long_name = total soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys [snowc] standard_name = surface_snow_area_fraction long_name = surface snow area fraction @@ -7946,6 +8223,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snowd_land_save] + standard_name = surface_snow_thickness_water_equivalent_over_land_save + long_name = water equivalent snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [snowd_ice] standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice @@ -7953,6 +8237,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snow_depth] + standard_name = actual_snow_depth + long_name = actual snow depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [snohf] standard_name = snow_freezing_rain_upward_latent_heat_flux long_name = latent heat flux due to snow and frz rain @@ -7960,6 +8251,27 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snohf_snow] + standard_name = latent_heat_flux_from_precipitating_snow + long_name = latent heat flux due to precipitating snow + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[snohf_frzgra] + standard_name = latent_heat_flux_from_freezing_rain + long_name = latent heat flux due to freezing rain + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[snohf_snowmelt] + standard_name = latent_heat_flux_due_to_snowmelt + long_name = latent heat flux due to snowmelt phase change + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [snowmp] standard_name = lwe_thickness_of_snow_amount long_name = explicit snow fall on physics timestep @@ -7974,12 +8286,33 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[soilm_in_m] + standard_name = soil_moisture_content_in_m + long_name = soil moisture in meters + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [soiltype] standard_name = soil_type_classification long_name = soil type at each grid cell units = index dimensions = (horizontal_dimension) type = integer +[stc_save] + standard_name = soil_temperature_save + long_name = soil temperature before entering a physics scheme + units = K + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys +[sthick] + standard_name = soil_layer_thickness + long_name = soil layer thickness + units = m + dimensions = (soil_vertical_dimension) + type = real + kind = kind_phys [stress] standard_name = surface_wind_stress long_name = surface wind stress @@ -8022,6 +8355,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[th1] + standard_name = potential_temperature_at_lowest_model_layer + long_name = potential_temperature_at_lowest_model_layer + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tice] standard_name = sea_ice_temperature_interstitial long_name = sea ice surface skin temperature use as interstitial @@ -8064,6 +8404,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[tprcp_rate_land] + standard_name = total_precipitation_rate_on_dynamics_timestep_over_land + long_name = total precipitation rate in each time step over land + units = kg m-2 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tracers_start_index] standard_name = start_index_of_other_tracers long_name = beginning index of the non-water tracer species @@ -8117,6 +8464,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[tsfc_land_save] + standard_name = surface_skin_temperature_over_land_interstitial_save + long_name = surface skin temperature over land before entering a physics scheme (temporary use as interstitial) + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tsfc_ice] standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) @@ -8131,13 +8485,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[sktp1r] - standard_name = surface_ground_temperature_for_radiation_at_previous_rad_time_step - long_name = surface ground temperature for radiation at previous radiation time step - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [tsurf] standard_name = surface_skin_temperature_after_iteration long_name = surface skin temperature after iteration @@ -8248,6 +8595,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[weasd_land_save] + standard_name = water_equivalent_accumulated_snow_depth_over_land_save + long_name = water equiv of acc snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [weasd_ice] standard_name = water_equivalent_accumulated_snow_depth_over_ice long_name = water equiv of acc snow depth over ice @@ -8443,7 +8797,8 @@ units = hPa dimensions = (horizontal_dimension,vertical_dimension) type = real - kind = kind_phys + kind = kind_phys + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level @@ -8451,6 +8806,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [t_lay] standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer @@ -8458,6 +8814,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + optional = F [t_lev] standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature layer @@ -8465,6 +8822,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [tv_lay] standard_name = virtual_temperature long_name = layer virtual temperature @@ -8472,6 +8830,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + optional = F [relhum] standard_name = relative_humidity long_name = layer relative humidity @@ -8479,13 +8838,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[deltaZ] - standard_name = layer_thickness - long_name = layer_thickness - units = m - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys + optional = F [tracer] standard_name = chemical_tracers long_name = chemical tracers @@ -8493,32 +8846,132 @@ dimensions = (horizontal_dimension,vertical_dimension,number_of_tracers) type = real kind = kind_phys -[cloud_overlap_param] - standard_name = cloud_overlap_param - long_name = cloud overlap parameter - units = km + optional = F +[hsw0] + standard_name = RRTMGP_sw_heating_rate_clear_sky + long_name = RRTMGP shortwave clear sky heating rate + units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys -[precip_overlap_param] - standard_name = precip_overlap_param - long_name = precipitation overlap parameter - units = km + optional = T +[hswc] + standard_name = RRTMGP_sw_heating_rate_all_sky + long_name = RRTMGP shortwave all sky heating rate + units = K s-1 dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + optional = F +[hswb] + standard_name = RRTMGP_sw_heating_rate_spectral + long_name = RRTMGP shortwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_sw_spectral_points_rrtmgp) + type = real + kind = kind_phys + optional = T +[hlw0] + standard_name = RRTMGP_lw_heating_rate_clear_sky + long_name = RRTMGP longwave clear sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = T +[hlwc] + standard_name = RRTMGP_lw_heating_rate_all_sky + long_name = RRTMGP longwave all sky heating rate + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys + optional = F +[hlwb] + standard_name = RRTMGP_lw_heating_rate_spectral + long_name = RRTMGP longwave total sky heating rate (spectral) + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension,number_of_lw_spectral_points_rrtmgp) + type = real + kind = kind_phys + optional = T [ipsdsw0] standard_name = initial_permutation_seed_sw long_name = initial seed for McICA SW units = none dimensions = () type = integer + optional = F [ipsdlw0] standard_name = initial_permutation_seed_lw long_name = initial seed for McICA LW units = none dimensions = () type = integer + optional = F +[cld_frac] + standard_name = RRTMGP_total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[cld_lwp] + standard_name = RRTMGP_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 +[cld_reliq] + standard_name = RRTMGP_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 +[cld_iwp] + standard_name = RRTMGP_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 +[cld_reice] + standard_name = RRTMGP_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 +[cld_rwp] + standard_name = RRTMGP_cloud_rain_water_path + long_name = cloud rain water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[cld_rerain] + standard_name = RRTMGP_mean_effective_radius_for_rain_drop + long_name = mean effective radius for rain drop + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[cld_swp] + standard_name = RRTMGP_cloud_snow_water_path + long_name = cloud snow water path + units = g m-2 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[cld_resnow] + standard_name = RRTMGP_mean_effective_radius_for_snow_flake + long_name = mean effective radius for snow flake + units = micron + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [cldtausw] standard_name = RRTMGP_cloud_optical_depth_layers_at_0_55mu_band long_name = approx .55mu band layer cloud optical depth @@ -8526,6 +8979,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + optional = F [cldtaulw] standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth @@ -8540,6 +8994,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxlwDOWN_allsky] standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile @@ -8547,6 +9002,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxlwUP_clrsky] standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile @@ -8554,6 +9010,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxlwDOWN_clrsky] standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile @@ -8561,27 +9018,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys -[sktp1r] - standard_name = surface_skin_temperature_at_previous_time_step - long_name = surface skin temperature at previous time step - units = K - dimensions = (horizontal_dimension) - type = real - kind = kind_phys -[fluxlwUP_jac] - standard_name = RRTMGP_jacobian_of_lw_flux_profile_upward - long_name = RRTMGP Jacobian upward longwave flux profile - units = W m-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys -[fluxlwDOWN_jac] - standard_name = RRTMGP_jacobian_of_lw_flux_profile_downward - long_name = RRTMGP Jacobian downward of longwave flux profile - units = W m-2 K-1 - dimensions = (horizontal_dimension,vertical_dimension_plus_one) - type = real - kind = kind_phys + optional = F [fluxswUP_allsky] standard_name = RRTMGP_sw_flux_profile_upward_allsky long_name = RRTMGP upward shortwave all-sky flux profile @@ -8589,6 +9026,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxswDOWN_allsky] standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile @@ -8596,6 +9034,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxswUP_clrsky] standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile @@ -8603,6 +9042,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxswDOWN_clrsky] standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile @@ -8610,6 +9050,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [flxprf_lw] standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels @@ -8631,6 +9072,7 @@ dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys + optional = F [aerosolslw(:,:,:,1)] standard_name = RRTMGP_aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 @@ -8686,127 +9128,110 @@ units = none dimensions = (horizontal_dimension) type = integer + optional = F [icseed_sw] standard_name = seed_random_numbers_sw_for_RRTMGP long_name = seed for random number generation for shortwave radiation units = none dimensions = (horizontal_dimension) type = integer -[precip_frac] - standard_name = precipitation_fraction_by_layer - long_name = precipitation fraction in each layer - units = frac - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys + 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 + optional = F [sw_cloud_props] standard_name = coefficients_for_sw_cloud_optics long_name = DDT containing spectral information for RRTMGP SW radiation scheme units = DDT dimensions = () type = ty_cloud_optics + optional = F [sw_optical_props_clrsky] standard_name = shortwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_2str + optional = F [sw_optical_props_cloudsByBand] standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_2str -[sw_optical_props_precipByBand] - standard_name = shortwave_optical_properties_for_precipitation_by_band - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str -[sw_optical_props_precip] - standard_name = shortwave_optical_properties_for_precipitation - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str [sw_optical_props_clouds] standard_name = shortwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_2str + optional = F [sw_optical_props_aerosol] standard_name = shortwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_2str + optional = F [gas_concentrations] standard_name = Gas_concentrations_for_RRTMGP_suite long_name = DDT containing gas concentrations for RRTMGP radiation scheme units = DDT dimensions = () type = ty_gas_concs + optional = F [sources] standard_name = longwave_source_function long_name = Fortran DDT containing RRTMGP source functions units = DDT dimensions = () type = ty_source_func_lw + optional = F [lw_gas_props] standard_name = coefficients_for_lw_gas_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme units = DDT dimensions = () type = ty_gas_optics_rrtmgp + optional = F [lw_cloud_props] standard_name = coefficients_for_lw_cloud_optics long_name = DDT containing spectral information for RRTMGP LW radiation scheme units = DDT dimensions = () type = ty_cloud_optics + optional = F [lw_optical_props_clrsky] standard_name = longwave_optical_properties_for_clear_sky long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl + optional = F [lw_optical_props_clouds] standard_name = longwave_optical_properties_for_cloudy_atmosphere long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl -[lw_optical_props_precip] - standard_name = longwave_optical_properties_for_precipitation - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl + optional = F [lw_optical_props_cloudsByBand] standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl -[lw_optical_props_precipByBand] - standard_name = longwave_optical_properties_for_precipitation_by_band - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl [lw_optical_props_aerosol] standard_name = longwave_optical_properties_for_aerosols long_name = Fortran DDT containing RRTMGP optical properties units = DDT dimensions = () type = ty_optical_props_1scl + optional = F [sfc_emiss_byband] standard_name = surface_emissivity_in_each_RRTMGP_LW_band long_name = surface emissivity in each RRTMGP LW band diff --git a/scm/src/gmtb_scm.F90 b/scm/src/gmtb_scm.F90 index 0b9ac864..35c57c05 100644 --- a/scm/src/gmtb_scm.F90 +++ b/scm/src/gmtb_scm.F90 @@ -15,29 +15,12 @@ subroutine gmtb_scm_main_sub() use gmtb_scm_time_integration use gmtb_scm_output use gmtb_scm_type_defs - -#ifdef STATIC - use :: ccpp_api, & - only: ccpp_init, & - ccpp_finalize + use :: ccpp_static_api, & only: ccpp_physics_init, & ccpp_physics_run, & ccpp_physics_finalize -#else - use :: ccpp_api, & - only: ccpp_init, & - ccpp_finalize, & - ccpp_physics_init, & - ccpp_physics_run, & - ccpp_physics_finalize, & - ccpp_field_add, & - ccpp_initialized, & - ccpp_error - use :: iso_c_binding, only: c_loc -#include "ccpp_modules.inc" -#endif implicit none @@ -112,11 +95,11 @@ subroutine gmtb_scm_main_sub() do i = 1, scm_state%n_cols !set up each column's physics suite (which may be different) - call ccpp_init(trim(adjustl(scm_state%physics_suite_name(i))), cdata_cols(i), ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_init for column ', i, '. Exiting...' - stop - end if + ! call ccpp_init(trim(adjustl(scm_state%physics_suite_name(i))), cdata_cols(i), ierr) + ! if (ierr/=0) then + ! write(*,'(a,i0,a)') 'An error occurred in ccpp_init for column ', i, '. Exiting...' + ! stop + ! end if !open a logfile for each column if (physics%Init_parm(i)%me == physics%Init_parm(i)%master .and. physics%Init_parm(i)%logunit>=0) then @@ -156,23 +139,11 @@ subroutine gmtb_scm_main_sub() call physics%associate(scm_state, i) -#ifndef STATIC -! use ccpp_fields.inc to call ccpp_field_add for all variables to add -! (this is auto-generated from ccpp/scripts/ccpp_prebuild.py, -! the script parses tables in gmtb_scm_type_defs.f90) - associate_column: associate (cdata => cdata_cols(i)) -#include "ccpp_fields.inc" - end associate associate_column -#endif - !initialize each column's physics -#ifdef STATIC + write(0,'(a,i0,a)') "Calling ccpp_physics_init for column ", i, " with suite '" // trim(trim(adjustl(scm_state%physics_suite_name(i)))) // "'" call ccpp_physics_init(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) write(0,'(a,i0,a,i0)') "Called ccpp_physics_init for column ", i, " with suite '" // trim(trim(adjustl(scm_state%physics_suite_name(i)))) // "', ierr=", ierr -#else - call ccpp_physics_init(cdata_cols(i), ierr=ierr) -#endif if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_init for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop @@ -220,11 +191,7 @@ subroutine gmtb_scm_main_sub() scm_state%state_v(:,:,:,2) = scm_state%state_v(:,:,:,1) do i=1, scm_state%n_cols -#ifdef STATIC call ccpp_physics_run(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) -#else - call ccpp_physics_run(cdata_cols(i), ierr=ierr) -#endif if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop @@ -328,21 +295,10 @@ subroutine gmtb_scm_main_sub() end do do i=1, scm_state%n_cols -#ifdef STATIC call ccpp_physics_finalize(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) -#else - call ccpp_physics_finalize(cdata_cols(i), ierr=ierr) -#endif - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_finalize for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' - stop - end if - end do - do i=1, scm_state%n_cols - call ccpp_finalize(cdata_cols(i), ierr) if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_finalize for column ', i, '. Exiting...' + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_finalize for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop end if end do diff --git a/scm/src/gmtb_scm_time_integration.F90 b/scm/src/gmtb_scm_time_integration.F90 index 6aa224f6..3ccc1452 100644 --- a/scm/src/gmtb_scm_time_integration.F90 +++ b/scm/src/gmtb_scm_time_integration.F90 @@ -6,13 +6,8 @@ module gmtb_scm_time_integration use gmtb_scm_kinds, only: sp, dp, qp use gmtb_scm_forcing -#ifdef STATIC use ccpp_api, only: ccpp_t use ccpp_static_api, only: ccpp_physics_run -#else -use ccpp_api, only: ccpp_t, & - ccpp_physics_run -#endif implicit none @@ -84,11 +79,7 @@ subroutine do_time_step(scm_state, cdata_cols) end if do i=1, scm_state%n_cols -#ifdef STATIC call ccpp_physics_run(cdata_cols(i), suite_name=trim(adjustl(scm_state%physics_suite_name(i))), ierr=ierr) -#else - call ccpp_physics_run(cdata_cols(i), ierr=ierr) -#endif if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' stop diff --git a/scm/src/gmtb_scm_type_defs.F90 b/scm/src/gmtb_scm_type_defs.F90 index cc60f74c..08f62b95 100644 --- a/scm/src/gmtb_scm_type_defs.F90 +++ b/scm/src/gmtb_scm_type_defs.F90 @@ -896,13 +896,13 @@ subroutine physics_associate(physics, scm_state, col) physics%Stateout(col)%gq0 => scm_state%state_tracer(col,:,:,:,1) endif + physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm if(scm_state%sfc_flux_spec) then physics%Sfcprop(col)%spec_sh_flux => scm_state%sh_flux physics%Sfcprop(col)%spec_lh_flux => scm_state%lh_flux - physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm endif if(scm_state%model_ics) then - physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm + !physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm physics%Sfcprop(col)%canopy => scm_state%canopy(col,:) physics%Sfcprop(col)%hice => scm_state%hice(col,:) physics%Sfcprop(col)%fice => scm_state%fice(col,:) From 7d05fd0fc87312eb776411f411cda977f948cda1 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jul 2020 14:22:50 -0600 Subject: [PATCH 24/46] Update ccpp-prebuild --- ccpp/config/ccpp_prebuild_config.py | 56 ++++++++++++----------------- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index e4957669..066a4d77 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -265,8 +265,6 @@ 'ccpp/physics/physics/ysuvdif.F90' : ['physics'], 'ccpp/physics/physics/module_MYNNPBL_wrapper.F90' : ['physics'], 'ccpp/physics/physics/module_MYNNSFC_wrapper.F90' : ['physics'], - 'ccpp/physics/physics/module_MYNNrad_pre.F90' : ['physics'], - 'ccpp/physics/physics/module_MYNNrad_post.F90' : ['physics'], 'ccpp/physics/physics/module_MYJSFC_wrapper.F90' : ['physics' ], 'ccpp/physics/physics/module_MYJPBL_wrapper.F90' : ['physics' ], 'ccpp/physics/physics/mp_thompson_pre.F90' : ['physics'], @@ -309,9 +307,9 @@ 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_sw_rte.F90' : ['physics'], - 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' : ['physics'], + 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' : ['physics'], 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' : ['physics'], @@ -319,6 +317,7 @@ 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' : ['physics'], 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' : ['physics'], + 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' : ['physics'], } # Default build dir, relative to current working directory, @@ -387,24 +386,18 @@ }, 'mp_thompson' : { 'mp_thompson_init' : [ + 'cloud_droplet_number_concentration', 'water_friendly_aerosol_number_concentration', 'ice_friendly_aerosol_number_concentration', 'tendency_of_water_friendly_aerosols_at_surface', 'tendency_of_ice_friendly_aerosols_at_surface', + # DH* 2020-06-01: turn off calculation of effective radii, now done in GFS_rrtmg_pre + #'effective_radius_of_stratiform_cloud_liquid_water_particle_in_um', + #'effective_radius_of_stratiform_cloud_ice_particle_in_um', + #'effective_radius_of_stratiform_cloud_snow_particle_in_um', + # *DH 2020-06-01 ], 'mp_thompson_run' : [ - 'cloud_droplet_number_concentration_updated_by_physics', - 'water_friendly_aerosol_number_concentration_updated_by_physics', - 'ice_friendly_aerosol_number_concentration_updated_by_physics', - 'tendency_of_water_friendly_aerosols_at_surface', - 'tendency_of_ice_friendly_aerosols_at_surface', - 'mean_effective_radius_for_liquid_cloud', - 'mean_effective_radius_for_ice_cloud', - 'mean_effective_radius_for_snow_flake', - ], - }, - 'mp_thompson_pre' : { - 'mp_thompson_pre_run' : [ 'cloud_droplet_number_concentration_updated_by_physics', 'water_friendly_aerosol_number_concentration_updated_by_physics', 'ice_friendly_aerosol_number_concentration_updated_by_physics', @@ -419,37 +412,34 @@ 'rime_factor', ], }, + 'rrtmgp_lw_rte' : { + 'rrtmgp_lw_rte_run' : [ + 'RRTMGP_jacobian_of_lw_flux_profile_upward', + 'RRTMGP_jacobian_of_lw_flux_profile_downward', + ], + }, 'rrtmgp_sw_rte' : { 'rrtmgp_sw_rte_run' : [ 'components_of_surface_downward_shortwave_fluxes', - 'sw_fluxes_sfc', - 'sw_fluxes_toa', ], - }, + }, 'GFS_rrtmgp_sw_post' : { 'GFS_rrtmgp_sw_post_run' : [ + 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', 'components_of_surface_downward_shortwave_fluxes', - 'sw_fluxes_sfc', - 'sw_fluxes_toa', ], }, - 'rrtmgp_lw_rte' : { - 'rrtmgp_lw_rte_run' : [ - 'lw_fluxes_sfc', - 'lw_fluxes_toa', - ], - }, 'GFS_rrtmgp_lw_post' : { 'GFS_rrtmgp_lw_post_run' : [ - 'lw_fluxes_sfc', - 'lw_fluxes_toa', + 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', ], }, - 'GFS_rrtmgp_post' : { - 'GFS_rrtmgp_post_run' : [ - 'components_of_surface_downward_shortwave_fluxes', + 'GFS_suite_interstitial_2' : { + 'GFS_suite_interstitial_2_run' : [ + 'RRTMGP_jacobian_of_lw_flux_profile_upward', + 'RRTMGP_lw_flux_profile_upward_allsky', ], - }, + }, #'subroutine_name_1' : 'all', #'subroutine_name_2' : 'none', #'subroutine_name_2' : [ 'var1', 'var3'], From f61a3a15a515faab1bb1ccad9d6e5c2f019ec016 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 27 Jul 2020 18:17:53 -0600 Subject: [PATCH 25/46] Some bug fixes from previous commit. Now running --- ccpp/physics | 2 +- scm/src/gmtb_scm.F90 | 27 +-------------------------- scm/src/gmtb_scm_time_integration.F90 | 5 ----- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index ba9ca9c2..fea24913 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit ba9ca9c248181d48948381561956d9bcee283de8 +Subproject commit fea249135c5f9e75ffe3a32b0981656ba13d5b0e diff --git a/scm/src/gmtb_scm.F90 b/scm/src/gmtb_scm.F90 index da725ebe..ca7fec7f 100644 --- a/scm/src/gmtb_scm.F90 +++ b/scm/src/gmtb_scm.F90 @@ -15,29 +15,12 @@ subroutine gmtb_scm_main_sub() use gmtb_scm_time_integration use gmtb_scm_output use gmtb_scm_type_defs - -#ifdef STATIC - use :: ccpp_api, & - only: ccpp_init, & - ccpp_finalize + use :: ccpp_static_api, & only: ccpp_physics_init, & ccpp_physics_run, & ccpp_physics_finalize -#else - use :: ccpp_api, & - only: ccpp_init, & - ccpp_finalize, & - ccpp_physics_init, & - ccpp_physics_run, & - ccpp_physics_finalize, & - ccpp_field_add, & - ccpp_initialized, & - ccpp_error - use :: iso_c_binding, only: c_loc -#include "ccpp_modules.inc" -#endif implicit none @@ -330,14 +313,6 @@ subroutine gmtb_scm_main_sub() stop end if - do i=1, scm_state%n_cols - call ccpp_finalize(cdata_cols(i), ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_finalize for column ', i, '. Exiting...' - stop - end if - end do - end subroutine gmtb_scm_main_sub end module gmtb_scm_main diff --git a/scm/src/gmtb_scm_time_integration.F90 b/scm/src/gmtb_scm_time_integration.F90 index 9d72ac1b..8753e113 100644 --- a/scm/src/gmtb_scm_time_integration.F90 +++ b/scm/src/gmtb_scm_time_integration.F90 @@ -6,13 +6,8 @@ module gmtb_scm_time_integration use gmtb_scm_kinds, only: sp, dp, qp use gmtb_scm_forcing -#ifdef STATIC use ccpp_api, only: ccpp_t use ccpp_static_api, only: ccpp_physics_run -#else -use ccpp_api, only: ccpp_t, & - ccpp_physics_run -#endif implicit none From c8083ec914247eb98880cd26bdce1580791c3806 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 28 Jul 2020 09:21:18 -0600 Subject: [PATCH 26/46] Updated ccpp-physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index fea24913..7de2788a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit fea249135c5f9e75ffe3a32b0981656ba13d5b0e +Subproject commit 7de2788a01dcc0bd3e8736c0252b6d5179a929b1 From ea8d224b7331efa989caea5e61edbcc2738ae38b Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Thu, 30 Jul 2020 15:32:17 -0600 Subject: [PATCH 27/46] Added exponential-random and exponential cloud-overlap assumptions to the RRTMGP radiation scheme. This is based on NCAR/ccpp-physics PR 477, but for the GP scheme. --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 7de2788a..a696a847 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 7de2788a01dcc0bd3e8736c0252b6d5179a929b1 +Subproject commit a696a8478b861336da0ec0ea06fbebc882e5d4a6 From dc45f04968b399a9dceed20d76bec0c0a41cd6c8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 Jul 2020 14:00:15 -0600 Subject: [PATCH 28/46] Added RRTMGP interface for Zhao-Carr scheme. On SCM side, fixed allocation bug found in UFS. --- ccpp/config/ccpp_prebuild_config.py | 11 +-- ccpp/physics | 2 +- ccpp/suites/suite_SCM_GFS_2017_RRTMGP.xml | 90 ++++++++++++++++++++ ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 4 +- ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 4 +- scm/src/GFS_typedefs.F90 | 14 +-- 6 files changed, 108 insertions(+), 17 deletions(-) create mode 100644 ccpp/suites/suite_SCM_GFS_2017_RRTMGP.xml diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 9ddfd7a0..c3503435 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -314,11 +314,12 @@ 'ccpp/physics/physics/rrtmgp_lw_pre.F90' , 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' , 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' , - 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' , - 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' , - 'ccpp/physics/physics/GFS_cloud_diagnostics.F90' , - 'ccpp/physics/physics/mo_cloud_sampling.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' , + 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' , + 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' , + 'ccpp/physics/physics/GFS_cloud_diagnostics.F90' , + 'ccpp/physics/physics/mo_cloud_sampling.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_zhaocarr_pre.F90' , 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' ] diff --git a/ccpp/physics b/ccpp/physics index a696a847..8a0f31bb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit a696a8478b861336da0ec0ea06fbebc882e5d4a6 +Subproject commit 8a0f31bb21c0a64c9231bfce2949143d18563b3e diff --git a/ccpp/suites/suite_SCM_GFS_2017_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_2017_RRTMGP.xml new file mode 100644 index 00000000..c63c6b8d --- /dev/null +++ b/ccpp/suites/suite_SCM_GFS_2017_RRTMGP.xml @@ -0,0 +1,90 @@ + + + + + + GFS_time_vary_pre + GFS_rrtmgp_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmgp_pre + GFS_rrtmgp_zhaocarr_pre + GFS_cloud_diagnostics + GFS_rrtmgp_sw_pre + rrtmgp_sw_gas_optics + rrtmgp_sw_aerosol_optics + rrtmgp_sw_cloud_optics + rrtmgp_sw_cloud_sampling + rrtmgp_sw_rte + GFS_rrtmgp_sw_post + rrtmgp_lw_pre + rrtmgp_lw_gas_optics + rrtmgp_lw_aerosol_optics + rrtmgp_lw_cloud_optics + rrtmgp_lw_cloud_sampling + rrtmgp_lw_rte + GFS_rrtmgp_lw_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + GFS_surface_composites_pre + dcyc2t3 + GFS_surface_composites_inter + GFS_suite_interstitial_2 + + + + sfc_diff + GFS_surface_loop_control_part1 + sfc_nst_pre + sfc_nst + sfc_nst_post + lsm_noah + sfc_sice + GFS_surface_loop_control_part2 + + + + GFS_surface_composites_post + sfc_diag + sfc_diag_post + GFS_surface_generic_post + GFS_PBL_generic_pre + hedmf + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + zhaocarr_gscond + zhaocarr_precpd + GFS_MP_generic_post + maximum_hourly_diagnostics + + + diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 0fa0f9d4..af97e995 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_gfdlmp_sw_cloud_sampling + rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_gfdlmp_lw_cloud_sampling + rrtmgp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index bbbe933c..e3d7994c 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_gfdlmp_sw_cloud_sampling + rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_gfdlmp_lw_cloud_sampling + rrtmgp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 1e3e70a9..b6da4545 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1898,7 +1898,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsfc_land_save(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ocean(:) => null() !< real (kind=kind_phys), pointer :: tsfg(:) => null() !< - real (kind=kind_phys), pointer :: sktp1r(:) => null() !< real (kind=kind_phys), pointer :: tsnow(:) => null() !< real (kind=kind_phys), pointer :: tsurf(:) => null() !< real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !< @@ -1947,6 +1946,7 @@ module GFS_typedefs ! RRTMGP integer :: ipsdlw0 !< integer :: ipsdsw0 !< + real (kind=kind_phys), pointer :: sktp1r(:) => null() !< real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< @@ -6149,7 +6149,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%tsfc_land (IM)) allocate (Interstitial%tsfc_ocean (IM)) allocate (Interstitial%tsfg (IM)) - allocate (Interstitial%sktp1r (IM)) allocate (Interstitial%tsurf (IM)) allocate (Interstitial%tsurf_ice (IM)) allocate (Interstitial%tsurf_land (IM)) @@ -6177,7 +6176,11 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%zorl_land (IM)) allocate (Interstitial%zorl_ocean (IM)) allocate (Interstitial%zt1d (IM)) - ! RRTMGP + ! RRTMGP + allocate (Interstitial%sktp1r (IM)) + allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) if (Model%do_RRTMGP) then allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) allocate (Interstitial%tv_lay (IM, Model%levs)) @@ -6191,12 +6194,9 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%t_lay (IM, Model%levs)) allocate (Interstitial%cloud_overlap_param (IM, Model%levs)) allocate (Interstitial%precip_overlap_param (IM, Model%levs)) - allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) From 1c67ebf13ff919cb18e4da38937548919e465861 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Fri, 31 Jul 2020 17:43:46 -0600 Subject: [PATCH 29/46] Remove DDTs from argument list in GFS_rrtmgp_pre. Also removed use statements and added physical/algorithmic constants to the Interstitial type. --- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 20 ++++++++++++++++++++ scm/src/GFS_typedefs.meta | 30 +++++++++++++++++++++++++++++- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index 8a0f31bb..0d72c531 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 8a0f31bb21c0a64c9231bfce2949143d18563b3e +Subproject commit 0d72c531630a7c5560fb86ce59a8f2fd91419ca6 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index b6da4545..3dd0f0b1 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1943,6 +1943,15 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dudt_ogw(:,:) => null() !< daily aver u-wind tend due to orographic gravity wave drag real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS + ! Physical constants used as interstitial data. + real (kind=kind_phys) :: & + con_eps, & !< Derived + con_epsm1, & !< Derived + con_fvirt !< Dervied + ! Algorithmic constants + real (kind=kind_phys) :: & + con_qMin !< lower limit for saturation-vapor pressure + ! RRTMGP integer :: ipsdlw0 !< integer :: ipsdsw0 !< @@ -5937,6 +5946,8 @@ end subroutine diag_chem_init ! GFS_interstitial_type%create !------------------------- subroutine interstitial_create (Interstitial, IM, Model) + use physcons, only: eps=>con_eps, epsm1=>con_epsm1, fvirt=>con_fvirt + ! implicit none ! @@ -6364,6 +6375,15 @@ subroutine interstitial_create (Interstitial, IM, Model) call Interstitial%rad_reset (Model) call Interstitial%phys_reset (Model) ! + + ! Physical constants (copying from physcons.f to GFS_Interstital_type) + Interstitial%con_eps = eps + Interstitial%con_epsm1 = epsm1 + Interstitial%con_fvirt = fvirt + + ! Algorithmic constants + Interstitial%con_qmin = 1e-10 + end subroutine interstitial_create subroutine interstitial_setup_tracers(Interstitial, Model) diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index e17ff11f..e515c847 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -9556,7 +9556,35 @@ dimensions = (number_of_active_gases_used_by_RRTMGP) type = character kind = len=128 - +[con_eps] + standard_name = physical_constant_epsilon + long_name = gas constant for air divided by gas constant for h2o + units = none + dimensions = () + type = real + kind = kind_phys +[con_epsm1] + standard_name = physical_constant_epsilon_minus_one + long_name = gas constant for air divided by gas constant for h2o minus one + units = none + dimensions = () + type = real + kind = kind_phys +[con_fvirt] + standard_name = physical_constant_inverse_of_epsilon + long_name = gas constant for h2o divided by gas constant fir air minus one + units = none + dimensions = () + type = real + kind = kind_phys +[con_qMin] + standard_name = algorithmic_constant_lower_limit_for_saturation_vapor_pressure + long_name = lower limit allowed when computing saturation vapor pressure + units = none + dimensions = () + type = real + kind = kind_phys + ######################################################################## [ccpp-arg-table] name = GFS_data_type From daedf29ec1e697325008af4a201aa389b458871c Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Sun, 2 Aug 2020 16:30:50 -0600 Subject: [PATCH 30/46] Removed all GFS DDTs. Replaced with flat fields. Physical constants are also passed via argument lists in the RRTMGP suite level files (still need to add constants to scheme level code). --- ccpp/config/ccpp_prebuild_config.py | 4 ++-- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 25 ++++++------------------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index c3503435..4706afdb 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -428,13 +428,13 @@ }, 'GFS_rrtmgp_sw_post' : { 'GFS_rrtmgp_sw_post_run' : [ - 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', + 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step', 'components_of_surface_downward_shortwave_fluxes', ], }, 'GFS_rrtmgp_lw_post' : { 'GFS_rrtmgp_lw_post_run' : [ - 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', + 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step', ], }, 'GFS_suite_interstitial_2' : { diff --git a/ccpp/physics b/ccpp/physics index 0d72c531..732fcd2e 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 0d72c531630a7c5560fb86ce59a8f2fd91419ca6 +Subproject commit 732fcd2e444e9572e141f0a5a50c680bd8d0b3d7 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 3dd0f0b1..6173ece2 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1941,16 +1941,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: zogw(:) => null() !< height of drag due to orographic gravity wave real (kind=kind_phys), pointer :: dudt_mtb(:,:) => null() !< daily aver u-wind tend due to mountain blocking drag real (kind=kind_phys), pointer :: dudt_ogw(:,:) => null() !< daily aver u-wind tend due to orographic gravity wave drag - real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS - - ! Physical constants used as interstitial data. - real (kind=kind_phys) :: & - con_eps, & !< Derived - con_epsm1, & !< Derived - con_fvirt !< Dervied - ! Algorithmic constants - real (kind=kind_phys) :: & - con_qMin !< lower limit for saturation-vapor pressure + real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS ! RRTMGP integer :: ipsdlw0 !< @@ -2021,6 +2012,8 @@ module GFS_typedefs type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT type(ty_source_func_lw) :: sources !< RRTMGP DDT + ! RRTMGP configuration (~radcons.f) + real (kind=kind_phys) :: qs_Min !< RRTMGP constant: lower limit for saturation-vapor pressure !-- HWRF physics: dry mixing ratios real (kind=kind_phys), pointer :: qv_r(:,:) => null() !< @@ -5946,7 +5939,6 @@ end subroutine diag_chem_init ! GFS_interstitial_type%create !------------------------- subroutine interstitial_create (Interstitial, IM, Model) - use physcons, only: eps=>con_eps, epsm1=>con_epsm1, fvirt=>con_fvirt ! implicit none @@ -6371,19 +6363,14 @@ subroutine interstitial_create (Interstitial, IM, Model) ! which is set to .true. Interstitial%phys_hydrostatic = .true. ! + ! Constants used by radiation scheme + Interstitial%qs_Min = 1e-10 + ! ! Reset all other variables call Interstitial%rad_reset (Model) call Interstitial%phys_reset (Model) ! - ! Physical constants (copying from physcons.f to GFS_Interstital_type) - Interstitial%con_eps = eps - Interstitial%con_epsm1 = epsm1 - Interstitial%con_fvirt = fvirt - - ! Algorithmic constants - Interstitial%con_qmin = 1e-10 - end subroutine interstitial_create subroutine interstitial_setup_tracers(Interstitial, Model) From 1fbac74ab7efb31b87e0edbd54de304f86ed6ed8 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 3 Aug 2020 11:57:21 -0600 Subject: [PATCH 31/46] Updated ccpp/physics. --- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 5 --- scm/src/GFS_typedefs.meta | 42 ++++++++---------------- scm/src/gmtb_scm_physical_constants.F90 | 1 + scm/src/gmtb_scm_physical_constants.meta | 7 ++++ 5 files changed, 22 insertions(+), 35 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index 732fcd2e..405d5fcc 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 732fcd2e444e9572e141f0a5a50c680bd8d0b3d7 +Subproject commit 405d5fcc97ad2e6f8255980682687b55d70dc04d diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 6173ece2..f0deeec3 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -2012,8 +2012,6 @@ module GFS_typedefs type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT type(ty_source_func_lw) :: sources !< RRTMGP DDT - ! RRTMGP configuration (~radcons.f) - real (kind=kind_phys) :: qs_Min !< RRTMGP constant: lower limit for saturation-vapor pressure !-- HWRF physics: dry mixing ratios real (kind=kind_phys), pointer :: qv_r(:,:) => null() !< @@ -6363,9 +6361,6 @@ subroutine interstitial_create (Interstitial, IM, Model) ! which is set to .true. Interstitial%phys_hydrostatic = .true. ! - ! Constants used by radiation scheme - Interstitial%qs_Min = 1e-10 - ! ! Reset all other variables call Interstitial%rad_reset (Model) call Interstitial%phys_reset (Model) diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index e515c847..5148f3c3 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -4471,7 +4471,19 @@ units = flag dimensions = () type = logical - +[uni_cld] + standard_name = flag_for_uni_cld + long_name = flag for uni_cld + units = flag + dimensions = () + type = logical +[lmfshal] + standard_name = flag_for_lmfshal + long_name = flag for lmfshal + units = flag + dimensions = () + type = logical + ######################################################################## [ccpp-arg-table] name = GFS_grid_type @@ -9556,34 +9568,6 @@ dimensions = (number_of_active_gases_used_by_RRTMGP) type = character kind = len=128 -[con_eps] - standard_name = physical_constant_epsilon - long_name = gas constant for air divided by gas constant for h2o - units = none - dimensions = () - type = real - kind = kind_phys -[con_epsm1] - standard_name = physical_constant_epsilon_minus_one - long_name = gas constant for air divided by gas constant for h2o minus one - units = none - dimensions = () - type = real - kind = kind_phys -[con_fvirt] - standard_name = physical_constant_inverse_of_epsilon - long_name = gas constant for h2o divided by gas constant fir air minus one - units = none - dimensions = () - type = real - kind = kind_phys -[con_qMin] - standard_name = algorithmic_constant_lower_limit_for_saturation_vapor_pressure - long_name = lower limit allowed when computing saturation vapor pressure - units = none - dimensions = () - type = real - kind = kind_phys ######################################################################## [ccpp-arg-table] diff --git a/scm/src/gmtb_scm_physical_constants.F90 b/scm/src/gmtb_scm_physical_constants.F90 index c7489476..af238377 100644 --- a/scm/src/gmtb_scm_physical_constants.F90 +++ b/scm/src/gmtb_scm_physical_constants.F90 @@ -25,6 +25,7 @@ module gmtb_scm_physical_constants real(kind=dp),parameter:: con_t0c =2.7315e+2 real(kind=dp),parameter:: con_ttp =2.7316e+2 real(kind=dp),parameter:: con_epsq =1.0E-12_dp + real(kind=dp),parameter:: con_epsqs =1.0E-10_dp real(kind=dp),parameter:: con_rocp =con_rd/con_cp real(kind=dp),parameter:: con_fvirt =con_rv/con_rd - 1 diff --git a/scm/src/gmtb_scm_physical_constants.meta b/scm/src/gmtb_scm_physical_constants.meta index 44fca839..405c93b7 100644 --- a/scm/src/gmtb_scm_physical_constants.meta +++ b/scm/src/gmtb_scm_physical_constants.meta @@ -106,6 +106,13 @@ dimensions = () type = real kind = kind_phys +[con_epsqs] + standard_name = minimum_value_of_saturation_mixing_ratio + long_name = floor value for saturation mixing ratio + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys [con_vonKarman] standard_name = vonKarman_constant long_name = vonKarman constant From 96307b72846668738a9db93cda07ee272f556780 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 10 Aug 2020 12:46:49 -0600 Subject: [PATCH 32/46] Updated ccpp-physics to NCAR-master --- ccpp/config/ccpp_prebuild_config.py | 6 +++--- ccpp/physics | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 4706afdb..927ce426 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -198,6 +198,9 @@ 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_heating_rates.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', + 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmgp_aux.F90' , # derived data type definitions 'scm/src/GFS_typedefs.F90', 'scm/src/gmtb_scm_kinds.F90', @@ -298,9 +301,6 @@ 'ccpp/physics/physics/mp_fer_hires.F90' , 'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' , # RRTMGP - 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmgp_aux.F90' , 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' , 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' , 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' , diff --git a/ccpp/physics b/ccpp/physics index 405d5fcc..2e3b1cf8 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 405d5fcc97ad2e6f8255980682687b55d70dc04d +Subproject commit 2e3b1cf83dc0c693fb9f25d0805d516e7461fd25 From 20034051fde8f720810376dca7aa4b312aa91313 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 10 Aug 2020 13:04:53 -0600 Subject: [PATCH 33/46] Updated prebuild script --- ccpp/config/ccpp_prebuild_config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 7973cfac..e4c705ee 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -312,9 +312,9 @@ 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' , 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' , 'ccpp/physics/physics/rrtmgp_lw_rte.F90' , - 'ccpp/physics/physics/rrtmgp_gfdlmp_lw_cloud_sampling.F90' , + 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' , 'ccpp/physics/physics/rrtmgp_sw_rte.F90' , - 'ccpp/physics/physics/rrtmgp_gfdlmp_sw_cloud_sampling.F90' , + 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' , 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' , 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' , 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' , @@ -430,13 +430,13 @@ }, 'GFS_rrtmgp_sw_post' : { 'GFS_rrtmgp_sw_post_run' : [ - 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', + 'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step', 'components_of_surface_downward_shortwave_fluxes', ], }, 'GFS_rrtmgp_lw_post' : { 'GFS_rrtmgp_lw_post_run' : [ - 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels', + 'tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step', ], }, 'GFS_suite_interstitial_2' : { From 9dc877d6f7a15a500a37d163172e0a7f3f50afe3 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Mon, 10 Aug 2020 14:00:49 -0600 Subject: [PATCH 34/46] Added con_epsqs to physical_constants. --- scm/src/GFS_typedefs.F90 | 867 ++++++++++++++++++---- scm/src/GFS_typedefs.meta | 884 ++++++++++++++++++++--- scm/src/gmtb_scm_physical_constants.F90 | 1 + scm/src/gmtb_scm_physical_constants.meta | 9 +- 4 files changed, 1527 insertions(+), 234 deletions(-) diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 76df4994..3f8c51a0 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -3,8 +3,8 @@ module GFS_typedefs use machine, only: kind_phys - use module_radlw_parameters, only: sfcflw_type, topflw_type, NBDLW, proflw_type - use module_radsw_parameters, only: cmpfsw_type, sfcfsw_type, topfsw_type, NBDSW, profsw_type + use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type, NBDSW + use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type, NBDLW use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str use mo_cloud_optics, only: ty_cloud_optics @@ -34,7 +34,10 @@ module GFS_typedefs ! since they depend on the runtime config (e.g. Model%ntoz, Model%h2o_phys, Model%aero_in) private :: levozp, oz_coeff, levh2o, h2o_coeff, ntrcaer integer :: levozp, oz_coeff, levh2o, h2o_coeff, ntrcaer - + + integer, parameter :: naux2dmax = 20 !< maximum number of auxiliary 2d arrays in output (for debugging) + integer, parameter :: naux3dmax = 20 !< maximum number of auxiliary 3d arrays in output (for debugging) + !> \section arg_table_GFS_typedefs !! \htmlinclude GFS_typedefs.html !! @@ -206,11 +209,13 @@ module GFS_typedefs real (kind=kind_phys), pointer :: oceanfrac(:) => null() !< ocean fraction [0:1] real (kind=kind_phys), pointer :: landfrac(:) => null() !< land fraction [0:1] real (kind=kind_phys), pointer :: lakefrac(:) => null() !< lake fraction [0:1] + real (kind=kind_phys), pointer :: lakedepth(:) => null() !< lake depth [ m ] real (kind=kind_phys), pointer :: tsfc (:) => null() !< surface air temperature in K !< [tsea in gbphys.f] real (kind=kind_phys), pointer :: tsfco (:) => null() !< sst in K real (kind=kind_phys), pointer :: tsfcl (:) => null() !< surface land temperature in K real (kind=kind_phys), pointer :: tisfc (:) => null() !< surface temperature over ice fraction + real (kind=kind_phys), pointer :: tiice(:,:) => null() !< internal ice temperature real (kind=kind_phys), pointer :: snowd (:) => null() !< snow depth water equivalent in mm ; same as snwdph real (kind=kind_phys), pointer :: zorl (:) => null() !< composite surface roughness in cm real (kind=kind_phys), pointer :: zorlo (:) => null() !< ocean surface roughness in cm @@ -218,6 +223,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: fice (:) => null() !< ice fraction over open water grid ! real (kind=kind_phys), pointer :: hprim (:) => null() !< topographic standard deviation in m real (kind=kind_phys), pointer :: hprime (:,:) => null() !< orographic metrics + real (kind=kind_phys), pointer :: z0base (:) => null() !< background or baseline surface roughness length in m + real (kind=kind_phys), pointer :: semisbase(:)=> null() !< background surface emissivity !--- In (radiation only) real (kind=kind_phys), pointer :: sncovr (:) => null() !< snow cover in fraction @@ -240,6 +247,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: uustar (:) => null() !< boundary layer parameter real (kind=kind_phys), pointer :: oro (:) => null() !< orography real (kind=kind_phys), pointer :: oro_uf (:) => null() !< unfiltered orography + real (kind=kind_phys), pointer :: evap (:) => null() !< + real (kind=kind_phys), pointer :: hflx (:) => null() !< + real (kind=kind_phys), pointer :: qss (:) => null() !< real (kind=kind_phys), pointer :: spec_sh_flux (:) => null() !< specified kinematic surface sensible heat flux real (kind=kind_phys), pointer :: spec_lh_flux (:) => null() !< specified kinematic surface latent heat flux @@ -263,7 +273,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: th2m (:) => null() !< 2 meter potential temperature real (kind=kind_phys), pointer :: q2m (:) => null() !< 2 meter humidity -! -- In/Out for Noah MP +! -- In/Out for Noah MP real (kind=kind_phys), pointer :: snowxy (:) => null() !< real (kind=kind_phys), pointer :: tvxy (:) => null() !< veg temp real (kind=kind_phys), pointer :: tgxy (:) => null() !< ground temp @@ -291,7 +301,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: xlaixy (:) => null() !< real (kind=kind_phys), pointer :: taussxy (:) => null() !< real (kind=kind_phys), pointer :: smcwtdxy(:) => null() !< - real (kind=kind_phys), pointer :: deeprechxy(:) => null() !< + real (kind=kind_phys), pointer :: deeprechxy(:)=> null() !< real (kind=kind_phys), pointer :: rechxy (:) => null() !< real (kind=kind_phys), pointer :: snicexy (:,:) => null() !< @@ -300,7 +310,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: smoiseq (:,:) => null() !< real (kind=kind_phys), pointer :: zsnsoxy (:,:) => null() !< - +! -- In/Out for HWRF NOAH LSM + real (kind=kind_phys), pointer :: snotime (:) => null() !--- NSSTM variables (only allocated when [Model%nstf_name(1) > 0]) real (kind=kind_phys), pointer :: tref (:) => null() !< nst_fld%Tref - Reference Temperature @@ -462,18 +473,16 @@ module GFS_typedefs real (kind=kind_phys), pointer :: slmsk_cpl (:) => null() !< Land/Sea/Ice mask (slmsk from GFS_sfcprop_type) !--- cellular automata - real (kind=kind_phys), pointer :: tconvtend(:,:) => null() - real (kind=kind_phys), pointer :: qconvtend(:,:) => null() - real (kind=kind_phys), pointer :: uconvtend(:,:) => null() - real (kind=kind_phys), pointer :: vconvtend(:,:) => null() - real (kind=kind_phys), pointer :: ca_out (:) => null() ! + real (kind=kind_phys), pointer :: ca1 (:) => null() ! + real (kind=kind_phys), pointer :: ca2 (:) => null() ! + real (kind=kind_phys), pointer :: ca3 (:) => null() ! real (kind=kind_phys), pointer :: ca_deep (:) => null() ! real (kind=kind_phys), pointer :: ca_turb (:) => null() ! real (kind=kind_phys), pointer :: ca_shal (:) => null() ! real (kind=kind_phys), pointer :: ca_rad (:) => null() ! real (kind=kind_phys), pointer :: ca_micro (:) => null() ! - real (kind=kind_phys), pointer :: cape (:) => null() ! - + real (kind=kind_phys), pointer :: condition(:) => null() ! + real (kind=kind_phys), pointer :: vfact_ca(:) => null() ! !--- stochastic physics real (kind=kind_phys), pointer :: shum_wts (:,:) => null() ! real (kind=kind_phys), pointer :: sppt_wts (:,:) => null() ! @@ -490,6 +499,8 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dqdti (:,:) => null() !< instantaneous total moisture tendency (kg/kg/s) real (kind=kind_phys), pointer :: ushfsfci(:) => null() !< instantaneous upward sensible heat flux (w/m**2) real (kind=kind_phys), pointer :: dkt (:,:) => null() !< instantaneous dkt diffusion coefficient for temperature (m**2/s) + real (kind=kind_phys), pointer :: qci_conv(:,:) => null() !< convective cloud condesate after rainout + contains procedure :: create => coupling_create !< allocate array data @@ -519,7 +530,17 @@ module GFS_typedefs integer :: logunit real(kind=kind_phys) :: fhzero !< hours between clearing of diagnostic buckets logical :: ldiag3d !< flag for 3d diagnostic fields + logical :: qdiag3d !< flag for 3d tracer diagnostic fields + logical :: flag_for_gwd_generic_tend !< true if GFS_GWD_generic should calculate tendencies + logical :: flag_for_pbl_generic_tend !< true if GFS_PBL_generic should calculate tendencies + logical :: flag_for_scnv_generic_tend !< true if GFS_DCNV_generic should calculate tendencies + logical :: flag_for_dcnv_generic_tend !< true if GFS_DCNV_generic should calculate tendencies logical :: lssav !< logical flag for storing diagnostics + integer :: naux2d !< number of auxiliary 2d arrays to output (for debugging) + integer :: naux3d !< number of auxiliary 3d arrays to output (for debugging) + logical, pointer :: aux2d_time_avg(:) !< flags for time averaging of auxiliary 2d arrays + logical, pointer :: aux3d_time_avg(:) !< flags for time averaging of auxiliary 3d arrays + real(kind=kind_phys) :: fhcyc !< frequency for surface data cycling (hours) integer :: thermodyn_id !< valid for GFS only for get_prs/phi integer :: sfcpress_id !< valid for GFS only for get_prs/phi @@ -543,7 +564,7 @@ module GFS_typedefs integer :: tile_num integer :: nblks !< for explicit data blocking: number of blocks integer, pointer :: blksz(:) !< for explicit data blocking: block sizes of all blocks - integer, pointer :: blksz2(:) !< for explicit data blocking: block sizes of all blocks (duplicate) + integer :: ncols !< total number of columns for all blocks !--- coupling parameters logical :: cplflx !< default no cplflx collection @@ -576,6 +597,7 @@ module GFS_typedefs real(kind=kind_phys) :: fhlwr !< frequency for longwave radiation (secs) integer :: nsswr !< integer trigger for shortwave radiation integer :: nslwr !< integer trigger for longwave radiation + integer :: nhfrad !< number of timesteps for which to call radiation on physics timestep (coldstarts) integer :: levr !< number of vertical levels for radiation calculations integer :: levrp1 !< number of vertical levels for radiation calculations plus one integer :: nfxr !< second dimension for fluxr diagnostic variable (radiation) @@ -709,16 +731,32 @@ module GFS_typedefs integer :: lsm_noah=1 !< flag for NOAH land surface model integer :: lsm_noahmp=2 !< flag for NOAH land surface model integer :: lsm_ruc=3 !< flag for RUC land surface model + integer :: lsm_noah_wrfv4 = 4 !< flag for NOAH land surface from WRF v4.0 integer :: lsoil !< number of soil layers - integer :: lsoil_lsm !< number of soil layers internal to land surface model - integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model - integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm - logical :: rdlai + integer :: kice=2 !< number of layers in sice integer :: ivegsrc !< ivegsrc = 0 => USGS, !< ivegsrc = 1 => IGBP (20 category) !< ivegsrc = 2 => UMD (13 category) + !< ivegsrc = 3 => NLCD40 (40 category, NOAH WRFv4 only) + !< ivegsrc = 4 => USGS-RUC (28 category, NOAH WRFv4 only) + !< ivegsrc = 5 => MODI-RUC (21 category, NOAH WRFv4 only) integer :: isot !< isot = 0 => Zobler soil type ( 9 category) - !< isot = 1 => STATSGO soil type (19 category) + !< isot = 1 => STATSGO soil type (19 category, AKA 'STAS'(?)) + !< isot = 2 => STAS-RUC soil type (19 category, NOAH WRFv4 only) + integer :: lsoil_lsm !< number of soil layers internal to land surface model + integer :: lsnow_lsm !< maximum number of snow layers internal to land surface model + integer :: lsnow_lsm_lbound!< lower bound for snow arrays, depending on lsnow_lsm + logical :: rdlai !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4) + logical :: ua_phys !< flag for using University of Arizona? extension to NOAH LSM WRFv4 + logical :: usemonalb !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 + real(kind=kind_phys) :: aoasis !< potential evaporation multiplication factor for NOAH LSM WRFv4 + integer :: fasdas !< flag to use "flux-adjusting surface data assimilation system"; 0 = OFF, 1 = ON + integer :: isurban !< vegetation/land use type corresponding to the urban environment for the chosen ivegsrc + integer :: isice !< vegetation/land use type corresponding to permanent ice/snow for the chosen ivegsrc + integer :: iswater !< vegetation/land use type corresponding to water bodies for the chosen ivegsrc + integer :: iopt_thcnd !< option to treat thermal conductivity in Noah LSM (new in 3.8) + !< = 1, original (default) + !< = 2, McCumber and Pielke for silt loam and sandy loam ! -- the Noah MP options integer :: iopt_dveg ! 1-> off table lai 2-> on 3-> off;4->off;5 -> on @@ -736,6 +774,15 @@ module GFS_typedefs logical :: use_ufo !< flag for gcycle surface option +!--- flake model parameters + integer :: lkm !< flag for flake model + + ! GFDL Surface Layer options + logical :: lcurr_sf !flag for taking ocean currents into account in GFDL surface layer + logical :: pert_cd !flag for perturbing the surface drag coefficient for momentum in surface layer scheme (1 = True) + integer :: ntsflg !flag for updating skin temperature in the GFDL surface layer scheme + real(kind=kind_phys) :: sfenth !enthalpy flux factor 0 zot via charnock ..>0 zot enhanced>15m/s + !--- tuning parameters for physical parameterizations logical :: ras !< flag for ras convection scheme logical :: flipv !< flag for vertical direction flip (ras) @@ -753,6 +800,8 @@ module GFS_typedefs logical :: cal_pre !< flag controls precip type algorithm real(kind=kind_phys) :: rhgrd !< fer_hires microphysics only logical :: spec_adv !< flag for individual cloud species advected + integer :: icloud !< cloud effect to the optical depth in radiation; this also controls the cloud fraction options + !< 3: with cloud effect, and use cloud fraction option 3, based on Sundqvist et al. (1989) logical :: do_aw !< AW scale-aware option in cs convection logical :: do_awdd !< AW scale-aware option in cs convection logical :: flx_form !< AW scale-aware option in cs convection @@ -771,7 +820,9 @@ module GFS_typedefs !< vertical turbulent mixing scheme logical :: shinhong !< flag for scale-aware Shinhong vertical turbulent mixing scheme logical :: do_ysu !< flag for YSU turbulent mixing scheme + logical :: acm !< flag for ACM turbulent mixing scheme logical :: dspheat !< flag for tke dissipative heating + logical :: hurr_pbl !< flag for hurricane-specific options in PBL scheme logical :: lheatstrg !< flag for canopy heat storage parameterization logical :: cnvcld logical :: random_clds !< flag controls whether clouds are random @@ -789,6 +840,7 @@ module GFS_typedefs integer :: imfshalcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux shallow convection scheme integer :: imfshalcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfshalcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) + logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF) integer :: imfdeepcnv !< flag for mass-flux deep convection scheme !< 1: July 2010 version of SAS conv scheme !< current operational version as of 2016 @@ -800,13 +852,15 @@ module GFS_typedefs integer :: imfdeepcnv_samf = 2 !< flag for SAMF scale- & aerosol-aware mass-flux deep convection scheme integer :: imfdeepcnv_gf = 3 !< flag for scale- & aerosol-aware Grell-Freitas scheme (GSD) integer :: imfdeepcnv_ntiedtke = 4 !< flag for new Tiedtke scheme (CAPS) + logical :: hwrf_samfshal !< flag for HWRF SAMF shalcnv scheme (HWRF) integer :: isatmedmf !< flag for scale-aware TKE-based moist edmf scheme !< 0: initial version of satmedmf (Nov. 2018) !< 1: updated version of satmedmf (as of May 2019) integer :: isatmedmf_vdif = 0 !< flag for initial version of satmedmf (Nov. 2018) integer :: isatmedmf_vdifq = 1 !< flag for updated version of satmedmf (as of May 2019) integer :: nmtvr !< number of topographic variables such as variance etc - !< used in the GWD parameterization + !< used in the GWD parameterization - 10 more added if + !< GSD orographic drag scheme is used integer :: jcap !< number of spectral wave trancation used only by sascnv shalcnv real(kind=kind_phys) :: cs_parm(10) !< tunable parameters for Chikira-Sugiyama convection real(kind=kind_phys) :: flgmin(2) !< [in] ice fraction bounds @@ -842,7 +896,13 @@ module GFS_typedefs integer :: bl_mynn_edmf_part !< flag to partitioning og the MF and ED areas integer :: bl_mynn_cloudmix !< flag to activate mixing of cloud species integer :: bl_mynn_mixqt !< flag to mix total water or individual species + integer :: bl_mynn_output !< flag to initialize and write out extra 3D arrays integer :: icloud_bl !< flag for coupling sgs clouds to radiation + + real(kind=kind_phys) :: var_ric + real(kind=kind_phys) :: coef_ric_l + real(kind=kind_phys) :: coef_ric_s + ! MYJ switches logical :: do_myjsfc !< flag for MYJ surface layer scheme logical :: do_myjpbl !< flag for MYJ PBL scheme @@ -896,7 +956,6 @@ module GFS_typedefs !< nstf_name(5) : zsea2 in mm !--- fractional grid logical :: frac_grid !< flag for fractional grid - logical :: frac_grid_off !< flag for using fractional grid logical :: ignore_lake !< flag for ignoring lakes real(kind=kind_phys) :: min_lakeice !< minimum lake ice value real(kind=kind_phys) :: min_seaice !< minimum sea ice value @@ -909,7 +968,7 @@ module GFS_typedefs !< 6=areodynamical roughness over water with input 10-m wind !< 7=slightly decrease Cd for higher wind speed compare to 6 -!--- background vertical diffusion +!--- vertical diffusion real(kind=kind_phys) :: xkzm_m !< [in] bkgd_vdif_m background vertical diffusion for momentum real(kind=kind_phys) :: xkzm_h !< [in] bkgd_vdif_h background vertical diffusion for heat q real(kind=kind_phys) :: xkzm_s !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion @@ -919,20 +978,34 @@ module GFS_typedefs real(kind=kind_phys) :: bl_upfr !< updraft fraction in boundary layer mass flux scheme real(kind=kind_phys) :: bl_dnfr !< downdraft fraction in boundary layer mass flux scheme - !---cellular automata control parameters +!--- parameters for canopy heat storage (CHS) parameterization + real(kind=kind_phys) :: z0fac !< surface roughness fraction factor + real(kind=kind_phys) :: e0fac !< latent heat flux fraction factor relative to sensible heat flux + !< e.g., e0fac=0.5 indicates that CHS for latent heat flux is 50% of that for + !< sensible heat flux + +!---cellular automata control parameters integer :: nca !< number of independent cellular automata integer :: nlives !< cellular automata lifetime integer :: ncells !< cellular automata finer grid - real(kind=kind_phys) :: nfracseed !< cellular automata seed probability + integer :: nca_g !< number of independent cellular automata + integer :: nlives_g !< cellular automata lifetime + integer :: ncells_g !< cellular automata finer grid + real(kind=kind_phys) :: nfracseed !< cellular automata seed probability integer :: nseed !< cellular automata seed frequency + integer :: nseed_g !< cellular automata seed frequency logical :: do_ca !< cellular automata main switch logical :: ca_sgs !< switch for sgs ca logical :: ca_global !< switch for global ca logical :: ca_smooth !< switch for gaussian spatial filter - logical :: isppt_deep !< switch for combination with isppt_deep. OBS! Switches off SPPT on other tendencies! integer :: iseed_ca !< seed for random number generation in ca scheme integer :: nspinup !< number of iterations to spin up the ca real(kind=kind_phys) :: nthresh !< threshold used for perturbed vertical velocity + real :: ca_amplitude !< amplitude of ca trigger perturbation + integer :: nsmooth !< number of passes through smoother + logical :: ca_closure !< logical switch for ca on closure + logical :: ca_entr !< logical switch for ca on entrainment + logical :: ca_trigger !< logical switch for ca on trigger !--- stochastic physics control parameters logical :: do_sppt @@ -1144,6 +1217,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: phy_fctd (:,:) => null() !< cloud base mass flux for CS convection real (kind=kind_phys), pointer :: phy_f2d (:,:) => null() !< 2d arrays saved for restart real (kind=kind_phys), pointer :: phy_f3d (:,:,:) => null() !< 3d arrays saved for restart + +!--- Diagnostic that needs to be carried over to the next time step (removed from diag_type) + real (kind=kind_phys), pointer :: hpbl (:) => null() !< Planetary boundary layer height !--- dynamical forcing variables for Grell-Freitas convection real (kind=kind_phys), pointer :: forcet (:,:) => null() !< @@ -1155,6 +1231,7 @@ module GFS_typedefs !--- MYNN prognostic variables that can't be in the Intdiag or Interstitial DDTs real (kind=kind_phys), pointer :: CLDFRA_BL (:,:) => null() ! real (kind=kind_phys), pointer :: QC_BL (:,:) => null() ! + real (kind=kind_phys), pointer :: QI_BL (:,:) => null() ! real (kind=kind_phys), pointer :: el_pbl (:,:) => null() ! real (kind=kind_phys), pointer :: Sh3D (:,:) => null() ! real (kind=kind_phys), pointer :: qke (:,:) => null() ! @@ -1168,7 +1245,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: phy_myj_qz0(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_uz0(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_vz0(:) => null() ! - real (kind=kind_phys), pointer :: phy_myj_z0base(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_akhs(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_akms(:) => null() ! real (kind=kind_phys), pointer :: phy_myj_chkqlm(:) => null() ! @@ -1324,9 +1400,13 @@ module GFS_typedefs real (kind=kind_phys), pointer :: edmf_thl (:,:) => null() ! real (kind=kind_phys), pointer :: edmf_ent (:,:) => null() ! real (kind=kind_phys), pointer :: edmf_qc (:,:) => null() ! + real (kind=kind_phys), pointer :: sub_thl (:,:) => null() ! + real (kind=kind_phys), pointer :: sub_sqv (:,:) => null() ! + real (kind=kind_phys), pointer :: det_thl (:,:) => null() ! + real (kind=kind_phys), pointer :: det_sqv (:,:) => null() ! real (kind=kind_phys), pointer :: maxMF (:) => null() ! integer, pointer :: nupdraft (:) => null() ! - integer, pointer :: ktop_shallow (:) => null() ! + integer, pointer :: ktop_plume (:) => null() ! real (kind=kind_phys), pointer :: exch_h (:,:) => null() ! real (kind=kind_phys), pointer :: exch_m (:,:) => null() ! @@ -1382,7 +1462,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tdomip (:) => null() !< dominant accumulated sleet type real (kind=kind_phys), pointer :: tdoms (:) => null() !< dominant accumulated snow type - real (kind=kind_phys), pointer :: ca_out (:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: ca1 (:) => null() ! + real (kind=kind_phys), pointer :: ca2 (:) => null() ! + real (kind=kind_phys), pointer :: ca3 (:) => null() ! real (kind=kind_phys), pointer :: ca_deep (:) => null() !< cellular automata fraction real (kind=kind_phys), pointer :: ca_turb (:) => null() !< cellular automata fraction real (kind=kind_phys), pointer :: ca_shal (:) => null() !< cellular automata fraction @@ -1413,7 +1495,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: TRAIN (:,:) => null() !< accumulated stratiform T tendency (K s-1) !--- MP quantities for 3D diagnositics - real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm + real (kind=kind_phys), pointer :: refl_10cm(:,:) => null() !< instantaneous refl_10cm ! !---vay-2018 UGWP-diagnostics daily mean ! @@ -1502,6 +1584,11 @@ module GFS_typedefs !< for black carbon, organic carbon, and sulfur dioxide ( ug/m**2/s ) real (kind=kind_phys), pointer :: aecm (:,:) => null() !< instantaneous aerosol column mass densities for !< pm2.5, black carbon, organic carbon, sulfate, dust, sea salt ( g/m**2 ) + + ! Auxiliary output arrays for debugging + real (kind=kind_phys), pointer :: aux2d(:,:) => null() !< auxiliary 2d arrays in output (for debugging) + real (kind=kind_phys), pointer :: aux3d(:,:,:)=> null() !< auxiliary 2d arrays in output (for debugging) + contains procedure :: create => diag_create procedure :: rad_zero => diag_rad_zero @@ -1533,6 +1620,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: aerodp(:,:) => null() !< real (kind=kind_phys), pointer :: alb1d(:) => null() !< real (kind=kind_phys), pointer :: bexp1d(:) => null() !< + real (kind=kind_phys), pointer :: canopy_save(:) => null() !< real (kind=kind_phys), pointer :: cd(:) => null() !< real (kind=kind_phys), pointer :: cd_ice(:) => null() !< real (kind=kind_phys), pointer :: cd_land(:) => null() !< @@ -1545,6 +1633,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: chh_ice(:) => null() !< real (kind=kind_phys), pointer :: chh_land(:) => null() !< real (kind=kind_phys), pointer :: chh_ocean(:) => null() !< + real (kind=kind_phys), pointer :: chk_land(:) => null() !< real (kind=kind_phys), pointer :: clcn(:,:) => null() !< real (kind=kind_phys), pointer :: cldf(:) => null() !< real (kind=kind_phys), pointer :: cldsa(:,:) => null() !< @@ -1555,6 +1644,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: clw(:,:,:) => null() !< real (kind=kind_phys), pointer :: clw_surf(:) => null() !< real (kind=kind_phys), pointer :: clx(:,:) => null() !< + real (kind=kind_phys), pointer :: cmc(:) => null() !< real (kind=kind_phys), pointer :: cmm_ice(:) => null() !< real (kind=kind_phys), pointer :: cmm_land(:) => null() !< real (kind=kind_phys), pointer :: cmm_ocean(:) => null() !< @@ -1577,8 +1667,10 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dkt(:,:) => null() !< real (kind=kind_phys), pointer :: dlength(:) => null() !< real (kind=kind_phys), pointer :: dqdt(:,:,:) => null() !< + real (kind=kind_phys), pointer :: dqsdt2(:) => null() !< real (kind=kind_phys), pointer :: dqsfc1(:) => null() !< real (kind=kind_phys), pointer :: drain(:) => null() !< + real (kind=kind_phys), pointer :: drain_in_m_sm1(:) => null() !< real (kind=kind_phys), pointer :: dtdt(:,:) => null() !< real (kind=kind_phys), pointer :: dtdtc(:,:) => null() !< real (kind=kind_phys), pointer :: dtsfc1(:) => null() !< @@ -1597,7 +1689,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: ep1d_ice(:) => null() !< real (kind=kind_phys), pointer :: ep1d_land(:) => null() !< real (kind=kind_phys), pointer :: ep1d_ocean(:) => null() !< - real (kind=kind_phys), pointer :: evap(:) => null() !< + real (kind=kind_phys), pointer :: evapq(:) => null() !< real (kind=kind_phys), pointer :: evap_ice(:) => null() !< real (kind=kind_phys), pointer :: evap_land(:) => null() !< real (kind=kind_phys), pointer :: evap_ocean(:) => null() !< @@ -1615,6 +1707,8 @@ module GFS_typedefs logical, pointer :: flag_cice(:) => null() !< logical, pointer :: flag_guess(:) => null() !< logical, pointer :: flag_iter(:) => null() !< + logical, pointer :: flag_lsm(:) => null() !< + logical, pointer :: flag_lsm_glacier(:)=> null() !< real (kind=kind_phys), pointer :: ffmm_ice(:) => null() !< real (kind=kind_phys), pointer :: ffmm_land(:) => null() !< real (kind=kind_phys), pointer :: ffmm_ocean(:) => null() !< @@ -1643,7 +1737,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !< integer :: h2o_coeff !< real (kind=kind_phys), pointer :: h2o_pres(:) => null() !< - real (kind=kind_phys), pointer :: hflx(:) => null() !< + real (kind=kind_phys), pointer :: hefac(:) => null() !< + real (kind=kind_phys), pointer :: hffac(:) => null() !< + real (kind=kind_phys), pointer :: hflxq(:) => null() !< real (kind=kind_phys), pointer :: hflx_ice(:) => null() !< real (kind=kind_phys), pointer :: hflx_land(:) => null() !< real (kind=kind_phys), pointer :: hflx_ocean(:) => null() !< @@ -1697,7 +1793,10 @@ module GFS_typedefs integer :: nsamftrac !< integer :: nscav !< integer :: nspc1 !< + integer :: ntqvx !< + integer :: ntcwx !< integer :: ntiwx !< + integer :: ntozx !< integer :: ntk !< integer :: ntkev !< integer :: nvdiff !< @@ -1720,10 +1819,11 @@ module GFS_typedefs real (kind=kind_phys), pointer :: qlyr(:,:) => null() !< real (kind=kind_phys), pointer :: qrn(:,:) => null() !< real (kind=kind_phys), pointer :: qsnw(:,:) => null() !< - real (kind=kind_phys), pointer :: qss(:) => null() !< real (kind=kind_phys), pointer :: qss_ice(:) => null() !< real (kind=kind_phys), pointer :: qss_land(:) => null() !< real (kind=kind_phys), pointer :: qss_ocean(:) => null() !< + real (kind=kind_phys), pointer :: qs1(:) => null() !< + real (kind=kind_phys), pointer :: qv1(:) => null() !< logical :: radar_reset !< real (kind=kind_phys) :: raddt !< real (kind=kind_phys), pointer :: rainmp(:) => null() !< @@ -1737,9 +1837,12 @@ module GFS_typedefs real (kind=kind_phys), pointer :: rb_ocean(:) => null() !< logical :: reset !< real (kind=kind_phys), pointer :: rhc(:,:) => null() !< + real (kind=kind_phys), pointer :: rho1(:) => null() !< real (kind=kind_phys), pointer :: runoff(:) => null() !< + real (kind=kind_phys), pointer :: runoff_in_m_sm1(:) => null() !< real (kind=kind_phys), pointer :: save_q(:,:,:) => null() !< real (kind=kind_phys), pointer :: save_t(:,:) => null() !< + real (kind=kind_phys), pointer :: save_tcp(:,:) => null() !< real (kind=kind_phys), pointer :: save_u(:,:) => null() !< real (kind=kind_phys), pointer :: save_v(:,:) => null() !< real (kind=kind_phys), pointer :: sbsno(:) => null() !< @@ -1753,27 +1856,40 @@ module GFS_typedefs real (kind=kind_phys), pointer :: sigmafrac(:,:) => null() !< real (kind=kind_phys), pointer :: sigmatot(:,:) => null() !< logical :: skip_macro !< + real (kind=kind_phys), pointer :: slc_save(:,:) => null() !< integer, pointer :: slopetype(:) => null() !< + real (kind=kind_phys), pointer :: smcmax(:) => null() !< + real (kind=kind_phys), pointer :: smc_save(:,:) => null() !< real (kind=kind_phys), pointer :: snowc(:) => null() !< real (kind=kind_phys), pointer :: snowd_ice(:) => null() !< real (kind=kind_phys), pointer :: snowd_land(:) => null() !< + real (kind=kind_phys), pointer :: snowd_land_save(:) => null() !< real (kind=kind_phys), pointer :: snowd_ocean(:) => null() !< + real (kind=kind_phys), pointer :: snow_depth(:) => null() !< real (kind=kind_phys), pointer :: snohf(:) => null() !< + real (kind=kind_phys), pointer :: snohf_snow(:) => null() !< + real (kind=kind_phys), pointer :: snohf_frzgra(:) => null() !< + real (kind=kind_phys), pointer :: snohf_snowmelt(:) => null() !< real (kind=kind_phys), pointer :: snowmp(:) => null() !< real (kind=kind_phys), pointer :: snowmt(:) => null() !< + real (kind=kind_phys), pointer :: soilm_in_m(:) => null() !< integer, pointer :: soiltype(:) => null() !< + real (kind=kind_phys), pointer :: stc_save(:,:) => null() !< + real (kind=kind_phys), pointer :: sthick (:) => null() !< real (kind=kind_phys), pointer :: stress(:) => null() !< real (kind=kind_phys), pointer :: stress_ice(:) => null() !< real (kind=kind_phys), pointer :: stress_land(:) => null() !< real (kind=kind_phys), pointer :: stress_ocean(:) => null() !< real (kind=kind_phys), pointer :: t2mmp(:) => null() !< real (kind=kind_phys), pointer :: theta(:) => null() !< + real (kind=kind_phys), pointer :: th1(:) => null() !< real (kind=kind_phys), pointer :: tice(:) => null() !< real (kind=kind_phys), pointer :: tlvl(:,:) => null() !< real (kind=kind_phys), pointer :: tlyr(:,:) => null() !< real (kind=kind_phys), pointer :: tprcp_ice(:) => null() !< real (kind=kind_phys), pointer :: tprcp_land(:) => null() !< real (kind=kind_phys), pointer :: tprcp_ocean(:) => null() !< + real (kind=kind_phys), pointer :: tprcp_rate_land(:) => null() !< integer :: tracers_start_index !< integer :: tracers_total !< integer :: tracers_water !< @@ -1783,9 +1899,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tsfa(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ice(:) => null() !< real (kind=kind_phys), pointer :: tsfc_land(:) => null() !< + real (kind=kind_phys), pointer :: tsfc_land_save(:) => null() !< real (kind=kind_phys), pointer :: tsfc_ocean(:) => null() !< real (kind=kind_phys), pointer :: tsfg(:) => null() !< - real (kind=kind_phys), pointer :: sktp1r(:) => null() !< real (kind=kind_phys), pointer :: tsnow(:) => null() !< real (kind=kind_phys), pointer :: tsurf(:) => null() !< real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !< @@ -1802,6 +1918,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: wcbmax(:) => null() !< real (kind=kind_phys), pointer :: weasd_ocean(:) => null() !< real (kind=kind_phys), pointer :: weasd_land(:) => null() !< + real (kind=kind_phys), pointer :: weasd_land_save(:) => null() !< real (kind=kind_phys), pointer :: weasd_ice(:) => null() !< real (kind=kind_phys), pointer :: wind(:) => null() !< real (kind=kind_phys), pointer :: work1(:) => null() !< @@ -1828,11 +1945,12 @@ module GFS_typedefs real (kind=kind_phys), pointer :: zogw(:) => null() !< height of drag due to orographic gravity wave real (kind=kind_phys), pointer :: dudt_mtb(:,:) => null() !< daily aver u-wind tend due to mountain blocking drag real (kind=kind_phys), pointer :: dudt_ogw(:,:) => null() !< daily aver u-wind tend due to orographic gravity wave drag - real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS + real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS ! RRTMGP integer :: ipsdlw0 !< integer :: ipsdsw0 !< + real (kind=kind_phys), pointer :: sktp1r(:) => null() !< real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< @@ -1907,7 +2025,12 @@ module GFS_typedefs real (kind=kind_phys), pointer :: qs_r(:,:) => null() !< real (kind=kind_phys), pointer :: qg_r(:,:) => null() !< - + !-- GSD drag suite + real (kind=kind_phys), pointer :: varss(:) => null() !< + real (kind=kind_phys), pointer :: ocss(:) => null() !< + real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !< + real (kind=kind_phys), pointer :: clxss(:,:) => null() !< + !-- Ferrier-Aligo MP scheme real (kind=kind_phys), pointer :: f_rain (:,:) => null() !< real (kind=kind_phys), pointer :: f_ice (:,:) => null() !< @@ -2036,10 +2159,12 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%oceanfrac(IM)) allocate (Sfcprop%landfrac (IM)) allocate (Sfcprop%lakefrac (IM)) + allocate (Sfcprop%lakedepth(IM)) allocate (Sfcprop%tsfc (IM)) allocate (Sfcprop%tsfco (IM)) allocate (Sfcprop%tsfcl (IM)) allocate (Sfcprop%tisfc (IM)) + allocate (Sfcprop%tiice (IM,Model%kice)) allocate (Sfcprop%snowd (IM)) allocate (Sfcprop%zorl (IM)) allocate (Sfcprop%zorlo (IM)) @@ -2052,10 +2177,12 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%oceanfrac = clear_val Sfcprop%landfrac = clear_val Sfcprop%lakefrac = clear_val + Sfcprop%lakedepth = clear_val Sfcprop%tsfc = clear_val Sfcprop%tsfco = clear_val Sfcprop%tsfcl = clear_val Sfcprop%tisfc = clear_val + Sfcprop%tiice = clear_val Sfcprop%snowd = clear_val Sfcprop%zorl = clear_val Sfcprop%zorlo = clear_val @@ -2096,6 +2223,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%uustar (IM)) allocate (Sfcprop%oro (IM)) allocate (Sfcprop%oro_uf (IM)) + allocate (Sfcprop%evap (IM)) + allocate (Sfcprop%hflx (IM)) + allocate (Sfcprop%qss (IM)) allocate (Sfcprop%spec_sh_flux (IM)) allocate (Sfcprop%spec_lh_flux (IM)) @@ -2110,6 +2240,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%uustar = clear_val Sfcprop%oro = clear_val Sfcprop%oro_uf = clear_val + Sfcprop%evap = clear_val + Sfcprop%hflx = clear_val + Sfcprop%qss = clear_val Sfcprop%spec_sh_flux = clear_val Sfcprop%spec_lh_flux = clear_val @@ -2199,7 +2332,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%iceprv = clear_val Sfcprop%snowprv = clear_val Sfcprop%graupelprv = clear_val - end if + end if ! Noah MP allocate and init when used ! if (Model%lsm == Model%lsm_noahmp ) then @@ -2288,7 +2421,23 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%dgraupelprv = clear_val endif - + + ! HWRF NOAH LSM allocate and init when used + ! + if (Model%lsm == Model%lsm_noah_wrfv4 ) then + allocate(Sfcprop%snotime(IM)) + Sfcprop%snotime = clear_val + end if + + if (Model%do_myjsfc.or.Model%do_myjpbl.or.(Model%lsm == Model%lsm_noah_wrfv4)) then + allocate(Sfcprop%z0base(IM)) + Sfcprop%z0base = clear_val + end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + allocate(Sfcprop%semisbase(IM)) + Sfcprop%semisbase = clear_val + end if + if (Model%lsm == Model%lsm_ruc) then ! For land surface models with different numbers of levels than the four NOAH levels allocate (Sfcprop%wetness (IM)) @@ -2398,7 +2547,7 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%sfcnsw = clear_val Coupling%sfcdlw = clear_val - if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm) then + if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm .or. Model%ca_global) then allocate (Coupling%rain_cpl (IM)) allocate (Coupling%snow_cpl (IM)) Coupling%rain_cpl = clear_val @@ -2531,29 +2680,27 @@ subroutine coupling_create (Coupling, IM, Model) endif !-- cellular automata + allocate (Coupling%condition(IM)) + allocate (Coupling%vfact_ca(Model%levs)) if (Model%do_ca) then - allocate (Coupling%tconvtend (IM,Model%levs)) - allocate (Coupling%qconvtend (IM,Model%levs)) - allocate (Coupling%uconvtend (IM,Model%levs)) - allocate (Coupling%vconvtend (IM,Model%levs)) - allocate (Coupling%cape (IM)) - allocate (Coupling%ca_out (IM)) + allocate (Coupling%ca1 (IM)) + allocate (Coupling%ca2 (IM)) + allocate (Coupling%ca3 (IM)) allocate (Coupling%ca_deep (IM)) allocate (Coupling%ca_turb (IM)) allocate (Coupling%ca_shal (IM)) allocate (Coupling%ca_rad (IM)) allocate (Coupling%ca_micro (IM)) - Coupling%ca_out = clear_val + Coupling%vfact_ca = clear_val + Coupling%ca1 = clear_val + Coupling%ca2 = clear_val + Coupling%ca3 = clear_val Coupling%ca_deep = clear_val Coupling%ca_turb = clear_val Coupling%ca_shal = clear_val Coupling%ca_rad = clear_val Coupling%ca_micro = clear_val - Coupling%cape = clear_val - Coupling%tconvtend = clear_val - Coupling%qconvtend = clear_val - Coupling%uconvtend = clear_val - Coupling%vconvtend = clear_val + Coupling%condition = clear_val endif ! -- GSDCHEM coupling options @@ -2572,7 +2719,7 @@ subroutine coupling_create (Coupling, IM, Model) endif !--- stochastic physics option - if (Model%do_sppt) then + if (Model%do_sppt .or. Model%ca_global)then allocate (Coupling%sppt_wts (IM,Model%levs)) Coupling%sppt_wts = clear_val endif @@ -2605,6 +2752,11 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%nwfa2d = clear_val Coupling%nifa2d = clear_val endif + + if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then + allocate (Coupling%qci_conv (IM,Model%levs)) + Coupling%qci_conv = clear_val + endif end subroutine coupling_create @@ -2674,8 +2826,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- BEGIN NAMELIST VARIABLES real(kind=kind_phys) :: fhzero = 0.0 !< hours between clearing of diagnostic buckets - logical :: ldiag3d = .false. !< flag for 3d diagnostic fields + logical :: ldiag3d = .true. !< flag for 3d diagnostic fields + logical :: qdiag3d = .true. !< flag for 3d tracer diagnostic fields logical :: lssav = .false. !< logical flag for storing diagnostics + integer :: naux2d = 0 !< number of auxiliary 2d arrays to output (for debugging) + integer :: naux3d = 0 !< number of auxiliary 3d arrays to output (for debugging) + logical :: aux2d_time_avg(1:naux2dmax) = .false. !< flags for time averaging of auxiliary 2d arrays + logical :: aux3d_time_avg(1:naux3dmax) = .false. !< flags for time averaging of auxiliary 3d arrays real(kind=kind_phys) :: fhcyc = 0. !< frequency for surface data cycling (hours) integer :: thermodyn_id = 1 !< valid for GFS only for get_prs/phi @@ -2693,6 +2850,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- radiation parameters real(kind=kind_phys) :: fhswr = 3600. !< frequency for shortwave radiation (secs) real(kind=kind_phys) :: fhlwr = 3600. !< frequency for longwave radiation (secs) + integer :: nhfrad = 0 !< number of timesteps for which to call radiation on physics timestep (coldstarts) integer :: levr = -99 !< number of vertical levels for radiation calculations integer :: nfxr = 39+6 !< second dimension of input/output array fluxr logical :: iaerclm = .false. !< flag for initializing aero data @@ -2760,8 +2918,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !---Max hourly real(kind=kind_phys) :: avg_max_length = 3600. !< reset value in seconds for max hourly !--- Ferrier-Aligo microphysical parameters - real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only + real(kind=kind_phys) :: rhgrd = 0.98 !< fer_hires microphysics only; for 3-km domain logical :: spec_adv = .true. !< Individual cloud species advected + integer :: icloud = 0 !< cloud effect to the optical depth in radiation; this also controls the cloud fraction options + !< 3: with cloud effect from FA, and use cloud fraction option 3, based on Sundqvist et al. (1989) !--- M-G microphysical parameters integer :: fprcp = 0 !< no prognostic rain and snow (MG) integer :: pdfflag = 4 !< pdf flag for MG macro physics @@ -2812,12 +2972,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: lsoil = 4 !< number of soil layers integer :: lsoil_lsm = -1 !< number of soil layers internal to land surface model; -1 use lsoil integer :: lsnow_lsm = 3 !< maximum number of snow layers internal to land surface model - logical :: rdlai = .false. + logical :: rdlai = .false. !< read LAI from input file (for RUC LSM or NOAH LSM WRFv4) + logical :: ua_phys = .false. !< flag for using University of Arizona? extension to NOAH LSM WRFv4 + logical :: usemonalb = .true. !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 + real(kind=kind_phys) :: aoasis = 1.0 !< potential evaporation multiplication factor for NOAH LSM WRFv4 + integer :: fasdas = 0 !< flag to use "flux-adjusting surface data assimilation system"; 0 = OFF, 1 = ON integer :: ivegsrc = 2 !< ivegsrc = 0 => USGS, !< ivegsrc = 1 => IGBP (20 category) !< ivegsrc = 2 => UMD (13 category) integer :: isot = 0 !< isot = 0 => Zobler soil type ( 9 category) !< isot = 1 => STATSGO soil type (19 category) + integer :: iopt_thcnd = 1 !< option to treat thermal conductivity in Noah LSM (new in 3.8) + !< = 1, original (default) + !< = 2, McCumber and Pielke for silt loam and sandy loam ! -- to use Noah MP, lsm needs to be set to 2 and both ivegsrc and isot are set ! to 1 - MODIS IGBP and STATSGO - the defaults are the same as in the ! scripts;change from namelist @@ -2837,6 +3004,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: use_ufo = .false. !< flag for gcycle surface option +!--- flake model parameters + integer :: lkm = 0 !< flag for flake model + + logical :: lcurr_sf = .false. !< flag for taking ocean currents into account in GFDL surface layer + logical :: pert_cd = .false. !< flag for perturbing the surface drag coefficient for momentum in surface layer scheme + integer :: ntsflg = 0 !< flag for updating skin temperature in the GFDL surface layer scheme + real(kind=kind_phys) :: sfenth = 0.0 !< enthalpy flux factor 0 zot via charnock ..>0 zot enhanced>15m/s + !--- tuning parameters for physical parameterizations logical :: ras = .false. !< flag for ras convection scheme logical :: flipv = .true. !< flag for vertical direction flip (ras) @@ -2876,7 +3051,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< vertical turbulent mixing scheme logical :: shinhong = .false. !< flag for scale-aware Shinhong vertical turbulent mixing scheme logical :: do_ysu = .false. !< flag for YSU vertical turbulent mixing scheme + logical :: acm = .false. !< flag for ACM vertical turbulent mixing scheme logical :: dspheat = .false. !< flag for tke dissipative heating + logical :: hurr_pbl = .false. !< flag for hurricane-specific options in PBL scheme logical :: lheatstrg = .false. !< flag for canopy heat storage parameterization logical :: cnvcld = .false. logical :: random_clds = .false. !< flag controls whether clouds are random @@ -2899,7 +3076,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 0: initial version of satmedmf (Nov. 2018) !< 1: updated version of satmedmf (as of May 2019) logical :: do_deep = .true. !< whether to do deep convection - + logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme + logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme integer :: grav_settling = 0 @@ -2913,7 +3091,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: bl_mynn_edmf_part = 0 integer :: bl_mynn_cloudmix = 1 integer :: bl_mynn_mixqt = 0 + integer :: bl_mynn_output = 0 integer :: icloud_bl = 1 + real(kind=kind_phys) :: var_ric = 1.0 + real(kind=kind_phys) :: coef_ric_l = 0.16 + real(kind=kind_phys) :: coef_ric_s = 0.25 logical :: do_myjsfc = .false. !< flag for MYJ surface layer scheme logical :: do_myjpbl = .false. !< flag for MYJ PBL scheme @@ -2991,7 +3173,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< nstf_name(5) : zsea2 in mm !--- fractional grid logical :: frac_grid = .false. !< flag for fractional grid - logical :: frac_grid_off = .true. !< flag for using fractional grid logical :: ignore_lake = .true. !< flag for ignoring lakes real(kind=kind_phys) :: min_lakeice = 0.15d0 !< minimum lake ice value real(kind=kind_phys) :: min_seaice = 1.0d-11 !< minimum sea ice value @@ -3005,33 +3186,44 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 7=slightly decrease Cd for higher wind speed compare to 6 !< negative when cplwav2atm=.true. - i.e. two way wave coupling -!--- background vertical diffusion +!--- vertical diffusion real(kind=kind_phys) :: xkzm_m = 1.0d0 !< [in] bkgd_vdif_m background vertical diffusion for momentum real(kind=kind_phys) :: xkzm_h = 1.0d0 !< [in] bkgd_vdif_h background vertical diffusion for heat q real(kind=kind_phys) :: xkzm_s = 1.0d0 !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion real(kind=kind_phys) :: xkzminv = 0.3 !< diffusivity in inversion layers real(kind=kind_phys) :: moninq_fac = 1.0 !< turbulence diffusion coefficient factor real(kind=kind_phys) :: dspfac = 1.0 !< tke dissipative heating factor - real(kind=kind_phys) :: bl_upfr = 0.13 !< updraft fraction in boundary layer mass flux scheme real(kind=kind_phys) :: bl_dnfr = 0.1 !< downdraft fraction in boundary layer mass flux scheme +!--- parameters for canopy heat storage (CHS) parameterization + real(kind=kind_phys) :: z0fac = 0.3 + real(kind=kind_phys) :: e0fac = 0.5 + !---Cellular automaton options integer :: nca = 1 integer :: ncells = 5 - integer :: nlives = 10 + integer :: nlives = 30 + integer :: nca_g = 1 + integer :: ncells_g = 1 + integer :: nlives_g = 100 real(kind=kind_phys) :: nfracseed = 0.5 integer :: nseed = 100000 + integer :: nseed_g = 100 integer :: iseed_ca = 0 integer :: nspinup = 1 logical :: do_ca = .false. logical :: ca_sgs = .false. logical :: ca_global = .false. logical :: ca_smooth = .false. - logical :: isppt_deep = .false. real(kind=kind_phys) :: nthresh = 0.0 - + real :: ca_amplitude = 500. + integer :: nsmooth = 100 + logical :: ca_closure = .false. + logical :: ca_entr = .false. + logical :: ca_trigger = .false. + !--- IAU options real(kind=kind_phys) :: iau_delthrs = 0 !< iau time interval (to scale increments) character(len=240) :: iau_inc_files(7) = '' !< list of increment files @@ -3069,7 +3261,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & NAMELIST /gfs_physics_nml/ & !--- general parameters - fhzero, ldiag3d, lssav, fhcyc, & + fhzero, ldiag3d, qdiag3d, lssav, naux2d, naux3d, & + aux2d_time_avg, aux3d_time_avg, fhcyc, & thermodyn_id, sfcpress_id, & !--- coupling parameters cplflx, cplwav, cplwav2atm, cplchm, lsidea, & @@ -3100,10 +3293,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & avg_max_length, & !--- land/surface model control lsm, lsoil, lsoil_lsm, lsnow_lsm, rdlai, & - nmtvr, ivegsrc, use_ufo, & + nmtvr, ivegsrc, use_ufo, iopt_thcnd, ua_phys, usemonalb, & + aoasis, fasdas, & ! Noah MP options iopt_dveg,iopt_crs,iopt_btr,iopt_run,iopt_sfc, iopt_frz, & iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, & + !--- lake model control + lkm, & + ! GFDL surface layer options + lcurr_sf, pert_cd, ntsflg, sfenth, & !--- physical parameterizations ras, trans_trac, old_monin, cnvgwd, mstrat, moist_adj, & cscnv, cal_pre, do_aw, do_shoc, shocaftcnv, shoc_cld, & @@ -3111,10 +3309,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & do_mynnedmf, do_mynnsfclay, & bl_mynn_cloudpdf, bl_mynn_edmf, bl_mynn_edmf_mom, & bl_mynn_edmf_tke, bl_mynn_edmf_part, bl_mynn_cloudmix, & - bl_mynn_mixqt, icloud_bl, bl_mynn_tkeadvect, gwd_opt, & + bl_mynn_mixqt, bl_mynn_output, icloud_bl, bl_mynn_tkeadvect, & + gwd_opt, & + var_ric, coef_ric_l, coef_ric_s, & do_myjsfc, do_myjpbl, & + hwrf_samfdeep, hwrf_samfshal, & h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, & - shinhong, do_ysu, dspheat, lheatstrg, cnvcld, & + shinhong, do_ysu, acm, dspheat, hurr_pbl, lheatstrg, cnvcld, & random_clds, shal_cnv, imfshalcnv, imfdeepcnv, isatmedmf, & do_deep, jcap, & cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, & @@ -3123,7 +3324,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- Rayleigh friction prslrd0, ral_ts, ldiag_ugwp, do_ugwp, do_tofd, & ! --- Ferrier-Aligo - spec_adv, rhgrd, & + spec_adv, rhgrd, icloud, & !--- mass flux deep convection clam_deep, c0s_deep, c1_deep, betal_deep, & betas_deep, evfact_deep, evfactl_deep, pgcon_deep, & @@ -3133,15 +3334,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- near surface sea temperature model nst_anl, lsea, nstf_name, & frac_grid, min_lakeice, min_seaice, min_lake_height, & - frac_grid_off, ignore_lake, & + ignore_lake, & !--- surface layer sfc_z0_type, & - ! background vertical diffusion + ! vertical diffusion xkzm_m, xkzm_h, xkzm_s, xkzminv, moninq_fac, dspfac, & bl_upfr, bl_dnfr, & + !--- canopy heat storage parameterization + z0fac, e0fac, & !--- cellular automata - nca, ncells, nlives, nfracseed,nseed, nthresh, do_ca, & - ca_sgs, ca_global,iseed_ca,ca_smooth,isppt_deep,nspinup, & + nca, ncells, nlives, nca_g, ncells_g, nlives_g, nfracseed, & + nseed, nseed_g, nthresh, do_ca, & + ca_sgs, ca_global,iseed_ca,ca_smooth, & + nspinup,ca_amplitude,nsmooth,ca_closure,ca_entr,ca_trigger, & !--- IAU iau_delthrs,iaufhrs,iau_inc_files,iau_filter_increments, & iau_drymassfixer, & @@ -3203,6 +3408,77 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%logunit = logunit Model%fhzero = fhzero Model%ldiag3d = ldiag3d + Model%qdiag3d = qdiag3d + if (Model%qdiag3d .and. .not. Model%ldiag3d) then + write(0,*) 'Logic error in GFS_typedefs.F90: qdiag3d requires ldiag3d' + stop + endif + Model%flag_for_gwd_generic_tend = .true. + Model%flag_for_pbl_generic_tend = .true. + Model%flag_for_scnv_generic_tend = .true. + Model%flag_for_dcnv_generic_tend = .true. + + if(gwd_opt==1) then + if(me==master) & + write(0,*) 'FLAG: gwd_opt==1 so gwd not generic' + Model%flag_for_gwd_generic_tend=.false. + elseif(me==master) then + write(0,*) 'NO FLAG: gwd is generic' + endif + + if(satmedmf .and. isatmedmf==0) then + if(me==master) & + write(0,*) 'FLAG: satmedmf and isatedmf=0 so pbl not generic' + Model%flag_for_pbl_generic_tend=.false. + elseif(satmedmf .and. isatmedmf==1) then + if(me==master) & + write(0,*) 'FLAG: satmedmf and isatedmf=1 so pbl not generic' + Model%flag_for_pbl_generic_tend=.false. + else if(hybedmf) then + if(me==master) & + write(0,*) 'FLAG: hybedmf so pbl not generic' + Model%flag_for_pbl_generic_tend=.false. + else if(do_mynnedmf) then + if(me==master) & + write(0,*) 'FLAG: do_mynnedmf so pbl not generic' + Model%flag_for_pbl_generic_tend=.false. + else if(do_ysu) then + if(me==master) & + write(0,*) 'FLAG: do_ysu so pbl not generic' + Model%flag_for_pbl_generic_tend=.false. + else if(shinhong) then + if(me==master) & + write(0,*) 'FLAG: shinhong so pbl not generic' + Model%flag_for_pbl_generic_tend=.false. + else if(acm) then + if(me==master) & + write(0,*) 'FLAG: acm so pbl not generic' + Model%flag_for_pbl_generic_tend=.false. + elseif(me==master) then + write(0,*) 'NO FLAG: pbl is generic' + endif + + if(imfshalcnv == Model%imfshalcnv_gf) then + if(me==master) & + write(0,*) 'FLAG: imfshalcnv_gf so scnv not generic' + Model%flag_for_scnv_generic_tend=.false. + ! else if(imfshalcnv == Model%imfshalcnv_samf) then + ! write(0,*) 'FLAG: imfshalcnv_samf so scnv not generic' + ! Model%flag_for_scnv_generic_tend=.false. + elseif(me==master) then + write(0,*) 'NO FLAG: scnv is generic' + endif + + if(imfdeepcnv == Model%imfdeepcnv_gf) then + if(me==master) & + write(0,*) 'FLAG: imfdeepcnv_gf so dcnv not generic' + Model%flag_for_dcnv_generic_tend=.false. + ! else if(imfdeepcnv == Model%imfdeepcnv_samf) then + ! write(0,*) 'FLAG: imfdeepcnv_samf so dcnv not generic' + ! Model%flag_for_dcnv_generic_tend=.false. + elseif(me==master) then + write(0,*) 'NO FLAG: dcnv is generic' + endif ! !VAY-ugwp --- set some GW-related switches ! @@ -3211,6 +3487,30 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%do_tofd = do_tofd Model%lssav = lssav + ! + if (naux2d>naux2dmax) then + write(0,*) "Error, number of requested auxiliary 2d arrays exceeds the maximum defined in GFS_typedefs.F90" + stop + endif + if (naux3d>naux3dmax) then + write(0,*) "Error, number of requested auxiliary 3d arrays exceeds the maximum defined in GFS_typedefs.F90" + stop + endif + Model%naux2d = naux2d + Model%naux3d = naux3d + if (Model%naux2d>0) then + allocate(Model%aux2d_time_avg(1:naux2d)) + Model%aux2d_time_avg(1:naux2d) = aux2d_time_avg(1:naux2d) + end if + if (Model%naux3d>0) then + allocate(Model%aux3d_time_avg(1:naux3d)) + Model%aux3d_time_avg(1:naux3d) = aux3d_time_avg(1:naux3d) + end if + if (any(aux2d_time_avg) .or. any(aux3d_time_avg)) then + write(0,*) "Error, the SCM has not implemented time averaging of diagnostics in GFS_typedefs.F90" + stop + end if + Model%fhcyc = fhcyc Model%thermodyn_id = thermodyn_id Model%sfcpress_id = sfcpress_id @@ -3236,8 +3536,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nblks = size(blksz) allocate(Model%blksz(1:Model%nblks)) Model%blksz = blksz - allocate(Model%blksz2(1:Model%nblks)) - Model%blksz2 = blksz + Model%ncols = sum(Model%blksz) !--- coupling parameters Model%cplflx = cplflx @@ -3266,6 +3565,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%fhlwr = fhlwr Model%nsswr = nint(fhswr/Model%dtp) Model%nslwr = nint(fhlwr/Model%dtp) + if (restart) then + Model%nhfrad = 0 + if (Model%me == Model%master .and. nhfrad>0) & + write(*,'(a)') 'Disable high-frequency radiation calls for restart run' + else + Model%nhfrad = nhfrad + if (Model%me == Model%master .and. nhfrad>0) & + write(*,'(a,i0)') 'Number of high-frequency radiation calls for coldstart run: ', nhfrad + endif if (levr < 0) then Model%levr = levs else @@ -3387,6 +3695,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- F-A MP parameters Model%rhgrd = rhgrd Model%spec_adv = spec_adv + Model%icloud = icloud !--- gfdl MP parameters Model%lgfdlmprad = lgfdlmprad @@ -3397,8 +3706,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lsm = lsm Model%lsoil = lsoil ! Consistency check for RUC LSM - if (Model%lsm == Model%lsm_ruc .and. Model%nscyc>0) then - write(0,*) 'Logic error: RUC LSM cannot be used with surface data cycling at this point (fhcyc>0)' + if ((Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noah_wrfv4) .and. Model%nscyc>0) then + write(0,*) 'Logic error: RUC LSM and NOAH WRFv4 LSM cannot be used with surface data cycling at this point (fhcyc>0)' stop end if ! Flag to read leaf area index from input files (initial conditions) @@ -3421,10 +3730,27 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Set lower bound for LSM model, runs from negative (above surface) to surface (zero) Model%lsnow_lsm_lbound = -Model%lsnow_lsm+1 end if + Model%isurban = -999 !GJF isurban is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init + Model%isice = -999 !GJF isice is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init + Model%iswater = -999 !GJF iswater is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init + Model%iopt_thcnd = iopt_thcnd + Model%ua_phys = ua_phys + Model%usemonalb = usemonalb + Model%aoasis = aoasis + Model%fasdas = fasdas Model%ivegsrc = ivegsrc Model%isot = isot Model%use_ufo = use_ufo +!--- flake model parameters + Model%lkm = lkm + +! GFDL surface layer options + Model%lcurr_sf = lcurr_sf + Model%pert_cd = pert_cd + Model%ntsflg = ntsflg + Model%sfenth = sfenth + ! Noah MP options from namelist ! Model%iopt_dveg = iopt_dveg @@ -3453,13 +3779,22 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%do_aw = do_aw Model%cs_parm = cs_parm Model%do_shoc = do_shoc -! if (Model%do_shoc) then -! print *, "Error, update of SHOC from May 22 2019 not yet in CCPP" -! stop -! end if Model%shoc_parm = shoc_parm Model%shocaftcnv = shocaftcnv Model%shoc_cld = shoc_cld + +!HWRF physics suite + if (hwrf_samfdeep .and. imfdeepcnv/=2) then + write(*,*) 'Logic error: hwrf_samfdeep requires imfdeepcnv=2' + stop + end if + if (hwrf_samfshal .and. imfshalcnv/=2) then + write(*,*) 'Logic error: hwrf_samfshal requires imfshalcnv=2' + stop + end if + Model%hwrf_samfdeep = hwrf_samfdeep + Model%hwrf_samfshal = hwrf_samfshal + if (oz_phys .and. oz_phys_2015) then write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.' stop @@ -3485,7 +3820,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%satmedmf = satmedmf Model%shinhong = shinhong Model%do_ysu = do_ysu + Model%acm = acm Model%dspheat = dspheat + Model%hurr_pbl = hurr_pbl Model%lheatstrg = lheatstrg Model%cnvcld = cnvcld Model%random_clds = random_clds @@ -3520,11 +3857,20 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%bl_mynn_edmf_tke = bl_mynn_edmf_tke Model%bl_mynn_cloudmix = bl_mynn_cloudmix Model%bl_mynn_mixqt = bl_mynn_mixqt + Model%bl_mynn_output = bl_mynn_output Model%bl_mynn_edmf_part = bl_mynn_edmf_part Model%bl_mynn_tkeadvect = bl_mynn_tkeadvect Model%grav_settling = grav_settling Model%icloud_bl = icloud_bl + Model%var_ric = var_ric + Model%coef_ric_l = coef_ric_l + Model%coef_ric_s = coef_ric_s + Model%gwd_opt = gwd_opt + if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then + ! Add 10 more orographic static fields for GSD drag scheme + Model%nmtvr = 24 + end if Model%do_myjsfc = do_myjsfc Model%do_myjpbl = do_myjpbl @@ -3557,12 +3903,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- fractional grid Model%frac_grid = frac_grid - Model%frac_grid_off = frac_grid_off Model%ignore_lake = ignore_lake - if (Model%frac_grid) then - write(0,*) "ERROR: CCPP has not been tested with fractional landmask turned on" -! stop - end if Model%min_lakeice = min_lakeice Model%min_seaice = min_seaice Model%min_lake_height = min_lake_height @@ -3572,7 +3913,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%sfc_z0_type = sfc_z0_type if (Model%cplwav2atm) Model%sfc_z0_type = -1 -!--- backgroud vertical diffusion +!--- vertical diffusion Model%xkzm_m = xkzm_m Model%xkzm_h = xkzm_h Model%xkzm_s = xkzm_s @@ -3582,6 +3923,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%bl_upfr = bl_upfr Model%bl_dnfr = bl_dnfr +!--- canopy heat storage parametrization + Model%z0fac = z0fac + Model%e0fac = e0fac + !--- stochastic physics options ! do_sppt, do_shum, do_skeb and do_sfcperts are namelist variables in group ! physics that are parsed here and then compared in init_stochastic_physics @@ -3603,16 +3948,24 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nca = nca Model%ncells = ncells Model%nlives = nlives + Model%nca_g = nca_g + Model%ncells_g = ncells_g + Model%nlives_g = nlives_g Model%nfracseed = nfracseed Model%nseed = nseed + Model%nseed_g = nseed_g Model%ca_global = ca_global Model%do_ca = do_ca Model%ca_sgs = ca_sgs Model%iseed_ca = iseed_ca Model%ca_smooth = ca_smooth - Model%isppt_deep = isppt_deep Model%nspinup = nspinup Model%nthresh = nthresh + Model%ca_amplitude = ca_amplitude + Model%nsmooth = nsmooth + Model%ca_closure = ca_closure + Model%ca_entr = ca_entr + Model%ca_trigger = ca_trigger ! IAU flags !--- iau parameters @@ -3632,7 +3985,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%ntracp1 = Model%ntrac + 1 allocate (Model%tracer_names(Model%ntrac)) Model%tracer_names(:) = tracer_names(:) - Model%ntqv = get_tracer_index(Model%tracer_names, 'vap_wat', Model%me, Model%master, Model%debug) + Model%ntqv = get_tracer_index(Model%tracer_names, 'sphum', Model%me, Model%master, Model%debug) #ifdef MULTI_GASES Model%nto = get_tracer_index(Model%tracer_names, 'spfo', Model%me, Model%master, Model%debug) Model%nto2 = get_tracer_index(Model%tracer_names, 'spfo2', Model%me, Model%master, Model%debug) @@ -3759,6 +4112,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%restart = restart Model%hydrostatic = hydrostatic Model%jdat(1:8) = jdat(1:8) + allocate(Model%si(Model%levr+1)) + !--- Define sigma level for radiation initialization + !--- The formula converting hybrid sigma pressure coefficients to sigma coefficients follows Eckermann (2009, MWR) + !--- ps is replaced with p0. The value of p0 uses that in http://www.emc.ncep.noaa.gov/officenotes/newernotes/on461.pdf + !--- ak/bk have been flipped from their original FV3 orientation and are defined sfc -> toa + Model%si = (ak + bk * con_p0 - ak(Model%levr+1)) / (con_p0 - ak(Model%levr+1)) Model%sec = 0 if (Model%lsm == Model%lsm_noahmp) then Model%yearlen = 365 @@ -3767,12 +4126,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! DH* what happens if LTP>0? Does this have to change? ! A conversation with Yu-Tai suggests that we can probably ! eliminate LTP altogether *DH - allocate(Model%si(Model%levr+1)) - !--- Define sigma level for radiation initialization - !--- The formula converting hybrid sigma pressure coefficients to sigma coefficients follows Eckermann (2009, MWR) - !--- ps is replaced with p0. The value of p0 uses that in http://www.emc.ncep.noaa.gov/officenotes/newernotes/on461.pdf - !--- ak/bk have been flipped from their original FV3 orientation and are defined sfc -> toa - Model%si = (ak + bk * con_p0 - ak(Model%levr+1)) / (con_p0 - ak(Model%levr+1)) !--- BEGIN CODE FROM GFS_PHYSICS_INITIALIZE !--- define physcons module variables @@ -3785,8 +4138,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & 'max_lon=',max_lon,' max_lat=',max_lat,' min_lon=',min_lon,' min_lat=',min_lat, & ' rhc_max=',Model%rhcmax -!--- set nrcm - Model%nrcm = 2 +!--- set nrcm + + if (Model%ras) then + Model%nrcm = min(nrcmax, Model%levs-1) * (Model%dtp/1200.d0) + 0.10001d0 + else + Model%nrcm = 2 + endif !--- cal_pre if (Model%cal_pre) then @@ -3829,7 +4187,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ' boundary layer turbulence and shallow convection', & ' bl_mynn_cloudpdf=',Model%bl_mynn_cloudpdf, & ' bl_mynn_mixlength=',Model%bl_mynn_mixlength, & - ' bl_mynn_edmf=',Model%bl_mynn_edmf + ' bl_mynn_edmf=',Model%bl_mynn_edmf, & + ' bl_mynn_output=',Model%bl_mynn_output endif !--- set number of cloud types @@ -3875,6 +4234,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,'iopt_stc = ', Model%iopt_stc elseif (Model%lsm == Model%lsm_ruc) then print *,' RUC Land Surface Model used' + elseif (Model%lsm == Model%lsm_noah_wrfv4) then + print *,' NOAH WRFv4 Land Surface Model used' else print *,' Unsupported LSM type - job aborted - lsm=',Model%lsm stop @@ -3885,9 +4246,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif print *,' nst_anl=',Model%nst_anl,' use_ufo=',Model%use_ufo,' frac_grid=',Model%frac_grid,& - ' frac_grid_off=',frac_grid_off,' ignore_lake=',ignore_lake + ' ignore_lake=',ignore_lake print *,' min_lakeice=',Model%min_lakeice,' min_seaice=',Model%min_seaice, & 'min_lake_height=',Model%min_lake_height + + print *, 'flake model parameters' + print *, 'lkm : ', Model%lkm + if (Model%nstf_name(1) > 0 ) then print *,' NSSTM is active ' print *,' nstf_name(1)=',Model%nstf_name(1) @@ -3985,11 +4350,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,' Radiative heating calculated at',Model%levr, ' layers' if (Model%iovr_sw == 0) then print *,' random cloud overlap for Shortwave IOVR_SW=',Model%iovr_sw + elseif (Model%iovr_sw == 4) then + print *,'exponential cloud overlap for Shortwave IOVR_SW=',Model%iovr_lw else print *,' max-random cloud overlap for Shortwave IOVR_SW=',Model%iovr_sw endif if (Model%iovr_lw == 0) then print *,' random cloud overlap for Longwave IOVR_LW=',Model%iovr_lw + elseif (Model%iovr_lw == 4) then + print *,'exponential cloud overlap for Longwave IOVR_LW=',Model%iovr_lw else print *,' max-random cloud overlap for Longwave IOVR_LW=',Model%iovr_lw endif @@ -4241,7 +4610,16 @@ subroutine control_print(Model) print *, ' fn_nml : ', trim(Model%fn_nml) print *, ' fhzero : ', Model%fhzero print *, ' ldiag3d : ', Model%ldiag3d + print *, ' qdiag3d : ', Model%qdiag3d print *, ' lssav : ', Model%lssav + print *, ' naux2d : ', Model%naux2d + print *, ' naux3d : ', Model%naux3d + if (Model%naux2d>0) then + print *, ' aux2d_time_avg : ', Model%aux2d_time_avg + endif + if (Model%naux3d>0) then + print *, ' aux3d_time_avg : ', Model%aux3d_time_avg + endif print *, ' fhcyc : ', Model%fhcyc print *, ' thermodyn_id : ', Model%thermodyn_id print *, ' sfcpress_id : ', Model%sfcpress_id @@ -4259,6 +4637,7 @@ subroutine control_print(Model) print *, ' latr : ', Model%latr print *, ' blksz(1) : ', Model%blksz(1) print *, ' blksz(nblks) : ', Model%blksz(Model%nblks) + print *, ' Model%ncols : ', Model%ncols print *, ' ' print *, 'coupling parameters' print *, ' cplflx : ', Model%cplflx @@ -4282,6 +4661,7 @@ subroutine control_print(Model) print *, ' fhlwr : ', Model%fhlwr print *, ' nsswr : ', Model%nsswr print *, ' nslwr : ', Model%nslwr + print *, ' nhfrad : ', Model%nhfrad print *, ' levr : ', Model%levr print *, ' nfxr : ', Model%nfxr print *, ' ntrcaer : ', Model%ntrcaer @@ -4371,6 +4751,7 @@ subroutine control_print(Model) print *, ' Ferrier-Aligo microphysical parameters' print *, ' spec_adv : ', Model%spec_adv print *, ' rhgrd : ', Model%rhgrd + print *, ' icloud : ', Model%icloud print *, ' ' endif @@ -4382,6 +4763,13 @@ subroutine control_print(Model) print *, ' lsnow_lsm : ', Model%lsnow_lsm print *, ' ivegsrc : ', Model%ivegsrc print *, ' isot : ', Model%isot + print *, ' iopt_thcnd : ', Model%iopt_thcnd + print *, ' ua_phys : ', Model%ua_phys + print *, ' usemonalb : ', Model%usemonalb + print *, ' aoasis : ', Model%aoasis + print *, ' fasdas : ', Model%fasdas + print *, ' ivegsrc : ', Model%ivegsrc + print *, ' isot : ', Model%isot if (Model%lsm == Model%lsm_noahmp) then print *, ' Noah MP LSM is used, the options are' @@ -4401,6 +4789,14 @@ subroutine control_print(Model) print *, ' use_ufo : ', Model%use_ufo print *, ' ' + print *, ' flake model parameters' + print *, ' lkm : ', Model%lkm + print *, ' ' + print *, ' lcurr_sf : ', Model%lcurr_sf + print *, ' pert_cd : ', Model%pert_cd + print *, ' ntsflg : ', Model%ntsflg + print *, ' sfenth : ', Model%sfenth + print *, ' ' print *, 'tuning parameters for physical parameterizations' print *, ' ras : ', Model%ras if (Model%ras) then @@ -4434,6 +4830,7 @@ subroutine control_print(Model) print *, ' isatmedmf : ', Model%isatmedmf print *, ' shinhong : ', Model%shinhong print *, ' do_ysu : ', Model%do_ysu + print *, ' acm : ', Model%acm print *, ' dspheat : ', Model%dspheat print *, ' lheatstrg : ', Model%lheatstrg print *, ' cnvcld : ', Model%cnvcld @@ -4460,6 +4857,10 @@ subroutine control_print(Model) print *, ' do_myjsfc : ', Model%do_myjsfc print *, ' do_myjpbl : ', Model%do_myjpbl print *, ' gwd_opt : ', Model%gwd_opt + print *, ' hurr_pbl : ', Model%hurr_pbl + print *, ' var_ric : ', Model%var_ric + print *, ' coef_ric_l : ', Model%coef_ric_l + print *, ' coef_ric_s : ', Model%coef_ric_s print *, ' ' print *, 'Rayleigh friction' print *, ' prslrd0 : ', Model%prslrd0 @@ -4495,7 +4896,7 @@ subroutine control_print(Model) print *, 'surface layer options' print *, ' sfc_z0_type : ', Model%sfc_z0_type print *, ' ' - print *, 'background vertical diffusion coefficients' + print *, 'vertical diffusion coefficients' print *, ' xkzm_m : ', Model%xkzm_m print *, ' xkzm_h : ', Model%xkzm_h print *, ' xkzm_s : ', Model%xkzm_s @@ -4505,6 +4906,10 @@ subroutine control_print(Model) print *, ' bl_upfr : ', Model%bl_upfr print *, ' bl_dnfr : ', Model%bl_dnfr print *, ' ' + print *, 'parameters for canopy heat storage parametrization' + print *, ' z0fac : ', Model%z0fac + print *, ' e0fac : ', Model%e0fac + print *, ' ' print *, 'stochastic physics' print *, ' do_sppt : ', Model%do_sppt print *, ' do_shum : ', Model%do_shum @@ -4512,19 +4917,27 @@ subroutine control_print(Model) print *, ' do_sfcperts : ', Model%do_sfcperts print *, ' ' print *, 'cellular automata' - print *, ' nca : ', Model%ncells + print *, ' nca : ', Model%nca print *, ' ncells : ', Model%ncells print *, ' nlives : ', Model%nlives + print *, ' nca_g : ', Model%nca_g + print *, ' ncells_g : ', Model%ncells_g + print *, ' nlives_g : ', Model%nlives_g print *, ' nfracseed : ', Model%nfracseed + print *, ' nseed_g : ', Model%nseed_g print *, ' nseed : ', Model%nseed print *, ' ca_global : ', Model%ca_global print *, ' ca_sgs : ', Model%ca_sgs print *, ' do_ca : ', Model%do_ca print *, ' iseed_ca : ', Model%iseed_ca print *, ' ca_smooth : ', Model%ca_smooth - print *, ' isppt_deep : ', Model%isppt_deep print *, ' nspinup : ', Model%nspinup print *, ' nthresh : ', Model%nthresh + print *, ' ca_amplitude : ', Model%ca_amplitude + print *, ' nsmooth : ', Model%nsmooth + print *, ' ca_closure : ', Model%ca_closure + print *, ' ca_entr : ', Model%ca_entr + print *, ' ca_trigger : ', Model%ca_trigger print *, ' ' print *, 'tracers' print *, ' tracer_names : ', Model%tracer_names @@ -4728,7 +5141,7 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%dsnow_cpl = clear_val endif - if (Model%do_sppt) then + if (Model%do_sppt .or. Model%ca_global) then allocate (Tbd%dtdtr (IM,Model%levs)) allocate (Tbd%dtotprcp (IM)) allocate (Tbd%dcnvprcp (IM)) @@ -4750,6 +5163,9 @@ subroutine tbd_create (Tbd, IM, Model) ! if (Model%do_shoc) Tbd%phy_f3d(:,1,Model%ntot3d-1) = 3.0 ! if (Model%do_shoc) Tbd%phy_f3d(:,:,Model%ntot3d-1) = 1.0 + allocate (Tbd%hpbl (IM)) + Tbd%hpbl = clear_val + if (Model%imfdeepcnv == Model%imfdeepcnv_gf .or. Model%imfdeepcnv == Model%imfdeepcnv_ntiedtke) then allocate(Tbd%forcet(IM, Model%levs)) allocate(Tbd%forceq(IM, Model%levs)) @@ -4771,6 +5187,7 @@ subroutine tbd_create (Tbd, IM, Model) !print*,"Allocating all MYNN-EDMF variables:" allocate (Tbd%cldfra_bl (IM,Model%levs)) allocate (Tbd%qc_bl (IM,Model%levs)) + allocate (Tbd%qi_bl (IM,Model%levs)) allocate (Tbd%el_pbl (IM,Model%levs)) allocate (Tbd%sh3d (IM,Model%levs)) allocate (Tbd%qke (IM,Model%levs)) @@ -4780,6 +5197,7 @@ subroutine tbd_create (Tbd, IM, Model) !print*,"Allocating all MYNN-EDMF variables:" Tbd%cldfra_bl = clear_val Tbd%qc_bl = clear_val + Tbd%qi_bl = clear_val Tbd%el_pbl = clear_val Tbd%sh3d = clear_val Tbd%qke = zero @@ -4795,8 +5213,7 @@ subroutine tbd_create (Tbd, IM, Model) allocate (Tbd%phy_myj_thz0 (IM)) allocate (Tbd%phy_myj_qz0 (IM)) allocate (Tbd%phy_myj_uz0 (IM)) - allocate (Tbd%phy_myj_vz0 (IM)) - allocate (Tbd%phy_myj_z0base (IM)) + allocate (Tbd%phy_myj_vz0 (IM)) allocate (Tbd%phy_myj_akhs (IM)) allocate (Tbd%phy_myj_akms (IM)) allocate (Tbd%phy_myj_chkqlm (IM)) @@ -4809,8 +5226,7 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%phy_myj_thz0 = clear_val Tbd%phy_myj_qz0 = clear_val Tbd%phy_myj_uz0 = clear_val - Tbd%phy_myj_vz0 = clear_val - Tbd%phy_myj_z0base = clear_val + Tbd%phy_myj_vz0 = clear_val Tbd%phy_myj_akhs = clear_val Tbd%phy_myj_akms = clear_val Tbd%phy_myj_chkqlm = clear_val @@ -4969,7 +5385,6 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%dpt2m (IM)) allocate (Diag%zlvl (IM)) allocate (Diag%psurf (IM)) - allocate (Diag%hpbl (IM)) allocate (Diag%pwat (IM)) allocate (Diag%t1 (IM)) allocate (Diag%q1 (IM)) @@ -5003,13 +5418,15 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%sppt_wts(IM,Model%levs)) allocate (Diag%shum_wts(IM,Model%levs)) allocate (Diag%zmtnblck(IM)) + allocate (Diag%ca1 (IM)) + allocate (Diag%ca2 (IM)) + allocate (Diag%ca3 (IM)) ! F-A MP scheme if (Model%imp_physics == Model%imp_physics_fer_hires) then allocate (Diag%TRAIN (IM,Model%levs)) end if - allocate (Diag%ca_out (IM)) allocate (Diag%ca_deep (IM)) allocate (Diag%ca_turb (IM)) allocate (Diag%ca_shal (IM)) @@ -5018,11 +5435,12 @@ subroutine diag_create (Diag, IM, Model) !--- 3D diagnostics if (Model%ldiag3d) then - allocate (Diag%du3dt (IM,Model%levs,4)) - allocate (Diag%dv3dt (IM,Model%levs,4)) - allocate (Diag%dt3dt (IM,Model%levs,7)) - allocate (Diag%dq3dt (IM,Model%levs,9)) -! allocate (Diag%dq3dt (IM,Model%levs,oz_coeff+5)) + allocate (Diag%du3dt (IM,Model%levs,8)) + allocate (Diag%dv3dt (IM,Model%levs,8)) + allocate (Diag%dt3dt (IM,Model%levs,11)) + if (Model%qdiag3d) then + allocate (Diag%dq3dt (IM,Model%levs,13)) + endif !--- needed to allocate GoCart coupling fields allocate (Diag%upd_mf (IM,Model%levs)) allocate (Diag%dwn_mf (IM,Model%levs)) @@ -5114,28 +5532,38 @@ subroutine diag_create (Diag, IM, Model) !--- MYNN variables: if (Model%do_mynnedmf) then - !print*,"Allocating all MYNN-EDMF variables:" - allocate (Diag%edmf_a (IM,Model%levs)) - allocate (Diag%edmf_w (IM,Model%levs)) - allocate (Diag%edmf_qt (IM,Model%levs)) - allocate (Diag%edmf_thl (IM,Model%levs)) - allocate (Diag%edmf_ent (IM,Model%levs)) - allocate (Diag%edmf_qc (IM,Model%levs)) + if (Model%bl_mynn_output .ne. 0) then + allocate (Diag%edmf_a (IM,Model%levs)) + allocate (Diag%edmf_w (IM,Model%levs)) + allocate (Diag%edmf_qt (IM,Model%levs)) + allocate (Diag%edmf_thl (IM,Model%levs)) + allocate (Diag%edmf_ent (IM,Model%levs)) + allocate (Diag%edmf_qc (IM,Model%levs)) + allocate (Diag%sub_thl (IM,Model%levs)) + allocate (Diag%sub_sqv (IM,Model%levs)) + allocate (Diag%det_thl (IM,Model%levs)) + allocate (Diag%det_sqv (IM,Model%levs)) + endif allocate (Diag%nupdraft (IM)) allocate (Diag%maxmf (IM)) - allocate (Diag%ktop_shallow(IM)) + allocate (Diag%ktop_plume(IM)) allocate (Diag%exch_h (IM,Model%levs)) allocate (Diag%exch_m (IM,Model%levs)) - !print*,"Initializing all MYNN-EDMF variables with ",clear_val - Diag%edmf_a = clear_val - Diag%edmf_w = clear_val - Diag%edmf_qt = clear_val - Diag%edmf_thl = clear_val - Diag%edmf_ent = clear_val - Diag%edmf_qc = clear_val + if (Model%bl_mynn_output .ne. 0) then + Diag%edmf_a = clear_val + Diag%edmf_w = clear_val + Diag%edmf_qt = clear_val + Diag%edmf_thl = clear_val + Diag%edmf_ent = clear_val + Diag%edmf_qc = clear_val + Diag%sub_thl = clear_val + Diag%sub_sqv = clear_val + Diag%det_thl = clear_val + Diag%det_sqv = clear_val + endif Diag%nupdraft = 0 Diag%maxmf = clear_val - Diag%ktop_shallow = 0 + Diag%ktop_plume = 0 Diag%exch_h = clear_val Diag%exch_m = clear_val endif @@ -5176,6 +5604,16 @@ subroutine diag_create (Diag, IM, Model) Diag%dusfc_fd = 0 Diag%dvsfc_fd = 0 endif + + ! Auxiliary arrays in output for debugging + if (Model%naux2d>0) then + allocate (Diag%aux2d(IM,Model%naux2d)) + Diag%aux2d = clear_val + endif + if (Model%naux3d>0) then + allocate (Diag%aux3d(IM,Model%levs,Model%naux3d)) + Diag%aux3d = clear_val + endif !--- diagnostics for coupled chemistry if (Model%cplchm) call Diag%chem_init(IM,Model) @@ -5263,7 +5701,6 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%dpt2m = zero Diag%zlvl = zero Diag%psurf = zero - Diag%hpbl = zero Diag%pwat = zero Diag%t1 = zero Diag%q1 = zero @@ -5309,7 +5746,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%totgrpb = zero ! if (Model%do_ca) then - Diag%ca_out = zero + Diag%ca1 = zero + Diag%ca2 = zero + Diag%ca3 = zero Diag%ca_deep = zero Diag%ca_turb = zero Diag%ca_shal = zero @@ -5322,7 +5761,9 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%du3dt = zero Diag%dv3dt = zero Diag%dt3dt = zero - Diag%dq3dt = zero + if (Model%qdiag3d) then + Diag%dq3dt = zero + endif Diag%upd_mf = zero Diag%dwn_mf = zero Diag%det_mf = zero @@ -5523,7 +5964,7 @@ subroutine interstitial_create (Interstitial, IM, Model) ! allocate (Interstitial%otspt (Model%ntracp1,2)) ! Set up numbers of tracers for PBL, convection, etc: sets - ! Interstitial%{nncl,nvdiff,mg3_as_mg2,nn,tracers_total,ntiwx,ntk,ntkev,otspt,nsamftrac,ncstrac,nscav} + ! Interstitial%{nncl,nvdiff,mg3_as_mg2,nn,tracers_total,ntqvx,ntcwx,ntiwx,ntk,ntkev,ntozx,otspt,nsamftrac,ncstrac,nscav} call interstitial_setup_tracers(Interstitial, Model) ! Allocate arrays allocate (Interstitial%adjsfculw_land (IM)) @@ -5595,7 +6036,7 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%ep1d_ice (IM)) allocate (Interstitial%ep1d_land (IM)) allocate (Interstitial%ep1d_ocean (IM)) - allocate (Interstitial%evap (IM)) + allocate (Interstitial%evapq (IM)) allocate (Interstitial%evap_ice (IM)) allocate (Interstitial%evap_land (IM)) allocate (Interstitial%evap_ocean (IM)) @@ -5638,7 +6079,9 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%gwdcu (IM,Model%levs)) allocate (Interstitial%gwdcv (IM,Model%levs)) allocate (Interstitial%h2o_pres (levh2o)) - allocate (Interstitial%hflx (IM)) + allocate (Interstitial%hefac (IM)) + allocate (Interstitial%hffac (IM)) + allocate (Interstitial%hflxq (IM)) allocate (Interstitial%hflx_ice (IM)) allocate (Interstitial%hflx_land (IM)) allocate (Interstitial%hflx_ocean (IM)) @@ -5670,7 +6113,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%prnum (IM,Model%levs)) allocate (Interstitial%qlyr (IM,Model%levr+LTP)) allocate (Interstitial%prcpmp (IM)) - allocate (Interstitial%qss (IM)) allocate (Interstitial%qss_ice (IM)) allocate (Interstitial%qss_land (IM)) allocate (Interstitial%qss_ocean (IM)) @@ -5686,6 +6128,7 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%runoff (IM)) allocate (Interstitial%save_q (IM,Model%levs,Model%ntrac)) allocate (Interstitial%save_t (IM,Model%levs)) + allocate (Interstitial%save_tcp (IM,Model%levs)) allocate (Interstitial%save_u (IM,Model%levs)) allocate (Interstitial%save_v (IM,Model%levs)) allocate (Interstitial%sbsno (IM)) @@ -5724,7 +6167,6 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%tsfc_land (IM)) allocate (Interstitial%tsfc_ocean (IM)) allocate (Interstitial%tsfg (IM)) - allocate (Interstitial%sktp1r (IM)) allocate (Interstitial%tsurf (IM)) allocate (Interstitial%tsurf_ice (IM)) allocate (Interstitial%tsurf_land (IM)) @@ -5752,7 +6194,11 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%zorl_land (IM)) allocate (Interstitial%zorl_ocean (IM)) allocate (Interstitial%zt1d (IM)) - ! RRTMGP + ! RRTMGP + allocate (Interstitial%sktp1r (IM)) + allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) if (Model%do_RRTMGP) then allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) allocate (Interstitial%tv_lay (IM, Model%levs)) @@ -5766,12 +6212,9 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%t_lay (IM, Model%levs)) allocate (Interstitial%cloud_overlap_param (IM, Model%levs)) allocate (Interstitial%precip_overlap_param (IM, Model%levs)) - allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_jac (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_jac (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) @@ -5817,6 +6260,13 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%dudt_mtb (IM,Model%levs)) allocate (Interstitial%dudt_ogw (IM,Model%levs)) allocate (Interstitial%dudt_tms (IM,Model%levs)) +!-- GSD drag suite + if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then + allocate (Interstitial%varss (IM)) + allocate (Interstitial%ocss (IM)) + allocate (Interstitial%oa4ss (IM,4)) + allocate (Interstitial%clxss (IM,4)) + end if ! ! Allocate arrays that are conditional on physics choices if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then @@ -5870,6 +6320,34 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%t2mmp (IM)) allocate (Interstitial%q2mp (IM)) end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + allocate (Interstitial%canopy_save (IM)) + allocate (Interstitial%chk_land (IM)) + allocate (Interstitial%cmc (IM)) + allocate (Interstitial%dqsdt2 (IM)) + allocate (Interstitial%drain_in_m_sm1 (IM)) + allocate (Interstitial%flag_lsm (IM)) + allocate (Interstitial%flag_lsm_glacier(IM)) + allocate (Interstitial%qs1 (IM)) + allocate (Interstitial%qv1 (IM)) + allocate (Interstitial%rho1 (IM)) + allocate (Interstitial%runoff_in_m_sm1 (IM)) + allocate (Interstitial%slc_save (IM,Model%lsoil)) + allocate (Interstitial%smcmax (IM)) + allocate (Interstitial%smc_save (IM,Model%lsoil)) + allocate (Interstitial%snowd_land_save (IM)) + allocate (Interstitial%snow_depth (IM)) + allocate (Interstitial%snohf_snow (IM)) + allocate (Interstitial%snohf_frzgra (IM)) + allocate (Interstitial%snohf_snowmelt (IM)) + allocate (Interstitial%soilm_in_m (IM)) + allocate (Interstitial%stc_save (IM,Model%lsoil)) + allocate (Interstitial%sthick (Model%lsoil)) + allocate (Interstitial%th1 (IM)) + allocate (Interstitial%tprcp_rate_land (IM)) + allocate (Interstitial%tsfc_land_save (IM)) + allocate (Interstitial%weasd_land_save (IM)) + end if ! ! Set components that do not change Interstitial%frain = Model%dtf/Model%dtp @@ -5933,9 +6411,9 @@ subroutine interstitial_setup_tracers(Interstitial, Model) if (Model%imp_physics == Model%imp_physics_thompson) then if (Model%ltaerosol) then - Interstitial%nvdiff = 10 + Interstitial%nvdiff = 12 else - Interstitial%nvdiff = 7 + Interstitial%nvdiff = 9 endif if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1 Interstitial%nncl = 5 @@ -5968,25 +6446,53 @@ subroutine interstitial_setup_tracers(Interstitial, Model) ! DH* STILL VALID GIVEN THE CHANGES BELOW FOR CPLCHM? if (Interstitial%nvdiff == Model%ntrac) then + Interstitial%ntqvx = Model%ntqv + Interstitial%ntcwx = Model%ntcw Interstitial%ntiwx = Model%ntiw + Interstitial%ntozx = Model%ntoz else if (Model%imp_physics == Model%imp_physics_wsm6) then + Interstitial%ntqvx = 1 + Interstitial%ntcwx = 2 Interstitial%ntiwx = 3 + Interstitial%ntozx = 4 elseif (Model%imp_physics == Model%imp_physics_thompson) then if(Model%ltaerosol) then + Interstitial%ntqvx = 1 + Interstitial%ntcwx = 2 Interstitial%ntiwx = 3 + Interstitial%ntozx = 10 else + Interstitial%ntqvx = 1 + Interstitial%ntcwx = 2 Interstitial%ntiwx = 3 + Interstitial%ntozx = 9 endif elseif (Model%imp_physics == Model%imp_physics_gfdl) then + Interstitial%ntqvx = 1 + Interstitial%ntcwx = 2 Interstitial%ntiwx = 3 + Interstitial%ntozx = 7 ! F-A MP scheme elseif (Model%imp_physics == Model%imp_physics_fer_hires) then + Interstitial%ntqvx = 1 + Interstitial%ntcwx = 2 Interstitial%ntiwx = 3 ! total ice or total condensate + Interstitial%ntozx = 6 elseif (Model%imp_physics == Model%imp_physics_mg) then + Interstitial%ntqvx = 1 + Interstitial%ntcwx = 2 Interstitial%ntiwx = 3 + if (Model%ntgl > 0) then + Interstitial%ntozx = 12 + else + Interstitial%ntozx = 10 + end if else + Interstitial%ntqvx = 1 + Interstitial%ntcwx = 2 Interstitial%ntiwx = 0 + Interstitial%ntozx = 3 endif endif ! *DH @@ -6034,7 +6540,6 @@ subroutine interstitial_setup_tracers(Interstitial, Model) do n=2,Model%ntrac if ( n /= Model%ntcw .and. n /= Model%ntiw .and. n /= Model%ntclamt .and. & n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. & -! n /= Model%ntlnc .and. n /= Model%ntinc .and. & n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc) then tracers = tracers + 1 if (Model%ntke == n ) then @@ -6237,7 +6742,7 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%ep1d_ice = huge Interstitial%ep1d_land = huge Interstitial%ep1d_ocean = huge - Interstitial%evap = clear_val + Interstitial%evapq = clear_val Interstitial%evap_ice = huge Interstitial%evap_land = huge Interstitial%evap_ocean = huge @@ -6276,7 +6781,9 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%gflx_ocean = clear_val Interstitial%gwdcu = clear_val Interstitial%gwdcv = clear_val - Interstitial%hflx = clear_val + Interstitial%hefac = clear_val + Interstitial%hffac = clear_val + Interstitial%hflxq = clear_val Interstitial%hflx_ice = huge Interstitial%hflx_land = huge Interstitial%hflx_ocean = huge @@ -6296,7 +6803,6 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%oc = clear_val Interstitial%prcpmp = clear_val Interstitial%prnum = clear_val - Interstitial%qss = clear_val Interstitial%qss_ice = huge Interstitial%qss_land = huge Interstitial%qss_ocean = huge @@ -6312,6 +6818,7 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%runoff = clear_val Interstitial%save_q = clear_val Interstitial%save_t = clear_val + Interstitial%save_tcp = clear_val Interstitial%save_u = clear_val Interstitial%save_v = clear_val Interstitial%sbsno = clear_val @@ -6386,6 +6893,13 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%dudt_mtb = clear_val Interstitial%dudt_ogw = clear_val Interstitial%dudt_tms = clear_val +!-- GSD drag suite + if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then + Interstitial%varss = clear_val + Interstitial%ocss = clear_val + Interstitial%oa4ss = clear_val + Interstitial%clxss = clear_val + end if ! ! Reset fields that are conditional on physics choices if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then @@ -6430,6 +6944,34 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%t2mmp = clear_val Interstitial%q2mp = clear_val end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + Interstitial%canopy_save = clear_val + Interstitial%chk_land = huge + Interstitial%cmc = clear_val + Interstitial%dqsdt2 = clear_val + Interstitial%drain_in_m_sm1 = clear_val + Interstitial%flag_lsm = .false. + Interstitial%flag_lsm_glacier= .false. + Interstitial%qs1 = huge + Interstitial%qv1 = huge + Interstitial%rho1 = clear_val + Interstitial%runoff_in_m_sm1 = clear_val + Interstitial%slc_save = clear_val + Interstitial%smcmax = clear_val + Interstitial%smc_save = clear_val + Interstitial%snowd_land_save = huge + Interstitial%snow_depth = clear_val + Interstitial%snohf_snow = clear_val + Interstitial%snohf_frzgra = clear_val + Interstitial%snohf_snowmelt = clear_val + Interstitial%soilm_in_m = clear_val + Interstitial%stc_save = clear_val + Interstitial%sthick = clear_val + Interstitial%th1 = clear_val + Interstitial%tprcp_rate_land = huge + Interstitial%tsfc_land_save = huge + Interstitial%weasd_land_save = huge + end if ! ! Set flag for resetting maximum hourly output fields Interstitial%reset = mod(Model%kdt-1, nint(Model%avg_max_length/Model%dtp)) == 0 @@ -6559,7 +7101,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%ep1d_ice ) = ', sum(Interstitial%ep1d_ice ) write (0,*) 'sum(Interstitial%ep1d_land ) = ', sum(Interstitial%ep1d_land ) write (0,*) 'sum(Interstitial%ep1d_ocean ) = ', sum(Interstitial%ep1d_ocean ) - write (0,*) 'sum(Interstitial%evap ) = ', sum(Interstitial%evap ) + write (0,*) 'sum(Interstitial%evapq ) = ', sum(Interstitial%evapq ) write (0,*) 'sum(Interstitial%evap_ice ) = ', sum(Interstitial%evap_ice ) write (0,*) 'sum(Interstitial%evap_land ) = ', sum(Interstitial%evap_land ) write (0,*) 'sum(Interstitial%evap_ocean ) = ', sum(Interstitial%evap_ocean ) @@ -6602,7 +7144,9 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%gflx_ocean ) = ', sum(Interstitial%gflx_ocean ) write (0,*) 'sum(Interstitial%gwdcu ) = ', sum(Interstitial%gwdcu ) write (0,*) 'sum(Interstitial%gwdcv ) = ', sum(Interstitial%gwdcv ) - write (0,*) 'sum(Interstitial%hflx ) = ', sum(Interstitial%hflx ) + write (0,*) 'sum(Interstitial%hefac ) = ', sum(Interstitial%hefac ) + write (0,*) 'sum(Interstitial%hffac ) = ', sum(Interstitial%hffac ) + write (0,*) 'sum(Interstitial%hflxq ) = ', sum(Interstitial%hflxq ) write (0,*) 'sum(Interstitial%hflx_ice ) = ', sum(Interstitial%hflx_ice ) write (0,*) 'sum(Interstitial%hflx_land ) = ', sum(Interstitial%hflx_land ) write (0,*) 'sum(Interstitial%hflx_ocean ) = ', sum(Interstitial%hflx_ocean ) @@ -6637,7 +7181,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%prcpmp ) = ', sum(Interstitial%prcpmp ) write (0,*) 'sum(Interstitial%prnum ) = ', sum(Interstitial%prnum ) write (0,*) 'sum(Interstitial%qlyr ) = ', sum(Interstitial%qlyr ) - write (0,*) 'sum(Interstitial%qss ) = ', sum(Interstitial%qss ) write (0,*) 'sum(Interstitial%qss_ice ) = ', sum(Interstitial%qss_ice ) write (0,*) 'sum(Interstitial%qss_land ) = ', sum(Interstitial%qss_land ) write (0,*) 'sum(Interstitial%qss_ocean ) = ', sum(Interstitial%qss_ocean ) @@ -6656,6 +7199,7 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%runoff ) = ', sum(Interstitial%runoff ) write (0,*) 'sum(Interstitial%save_q ) = ', sum(Interstitial%save_q ) write (0,*) 'sum(Interstitial%save_t ) = ', sum(Interstitial%save_t ) + write (0,*) 'sum(Interstitial%save_tcp ) = ', sum(Interstitial%save_tcp ) write (0,*) 'sum(Interstitial%save_u ) = ', sum(Interstitial%save_u ) write (0,*) 'sum(Interstitial%save_v ) = ', sum(Interstitial%save_v ) write (0,*) 'sum(Interstitial%sbsno ) = ', sum(Interstitial%sbsno ) @@ -6823,6 +7367,31 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%t2mmp ) = ', sum(Interstitial%t2mmp ) write (0,*) 'sum(Interstitial%q2mp ) = ', sum(Interstitial%q2mp ) end if + if (Model%lsm == Model%lsm_noah_wrfv4) then + write (0,*) 'sum(Interstitial%canopy_save ) = ', sum(Interstitial%canopy_save ) + write (0,*) 'sum(Interstitial%chk_land ) = ', sum(Interstitial%chk_land ) + write (0,*) 'sum(Interstitial%cmc ) = ', sum(Interstitial%cmc ) + write (0,*) 'sum(Interstitial%dqsdt2 ) = ', sum(Interstitial%dqsdt2 ) + write (0,*) 'sum(Interstitial%drain_in_m_sm1 ) = ', sum(Interstitial%drain_in_m_sm1 ) + write (0,*) 'Interstitial%flag_lsm(1) = ', Interstitial%flag_lsm(1) + write (0,*) 'Interstitial%flag_lsm_glacier(1) = ', Interstitial%flag_lsm_glacier(1) + write (0,*) 'sum(Interstitial%qs1 ) = ', sum(Interstitial%qs1 ) + write (0,*) 'sum(Interstitial%qv1 ) = ', sum(Interstitial%qv1 ) + write (0,*) 'sum(Interstitial%rho1 ) = ', sum(Interstitial%rho1 ) + write (0,*) 'sum(Interstitial%runoff_in_m_sm1 ) = ', sum(Interstitial%runoff_in_m_sm1 ) + write (0,*) 'sum(Interstitial%smcmax ) = ', sum(Interstitial%smcmax ) + write (0,*) 'sum(Interstitial%snowd_land_save ) = ', sum(Interstitial%snowd_land_save ) + write (0,*) 'sum(Interstitial%snow_depth ) = ', sum(Interstitial%snow_depth ) + write (0,*) 'sum(Interstitial%snohf_snow ) = ', sum(Interstitial%snohf_snow ) + write (0,*) 'sum(Interstitial%snohf_frzgra ) = ', sum(Interstitial%snohf_frzgra ) + write (0,*) 'sum(Interstitial%snohf_snowmelt ) = ', sum(Interstitial%snohf_snowmelt ) + write (0,*) 'sum(Interstitial%soilm_in_m ) = ', sum(Interstitial%soilm_in_m ) + write (0,*) 'sum(Interstitial%sthick ) = ', sum(Interstitial%sthick ) + write (0,*) 'sum(Interstitial%th1 ) = ', sum(Interstitial%th1 ) + write (0,*) 'sum(Interstitial%tprcp_rate_land ) = ', sum(Interstitial%tprcp_rate_land ) + write (0,*) 'sum(Interstitial%tsfc_land_save ) = ', sum(Interstitial%tsfc_land_save ) + write (0,*) 'sum(Interstitial%weasd_land_save ) = ', sum(Interstitial%weasd_land_save ) + end if write (0,*) 'Interstitial_print: end' ! end subroutine interstitial_print diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 9e5e7b01..333fb55d 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -200,6 +200,7 @@ long_name = number concentration of water-friendly aerosols units = kg-1 dimensions = (horizontal_dimension,vertical_dimension) + active = (index_for_water_friendly_aerosols > 0) type = real kind = kind_phys [qgrs(:,:,index_for_ice_friendly_aerosols)] @@ -207,6 +208,7 @@ long_name = number concentration of ice-friendly aerosols units = kg-1 dimensions = (horizontal_dimension,vertical_dimension) + active = (index_for_ice_friendly_aerosols > 0) type = real kind = kind_phys [qgrs(:,:,index_for_liquid_cloud_number_concentration)] @@ -216,6 +218,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + active = (index_for_liquid_cloud_number_concentration > 0) [qgrs(:,:,index_for_ice_cloud_number_concentration)] standard_name = ice_number_concentration long_name = number concentration of ice @@ -382,6 +385,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + active = (index_for_water_friendly_aerosols > 0) [gq0(:,:,index_for_ice_friendly_aerosols)] standard_name = ice_friendly_aerosol_number_concentration_updated_by_physics long_name = number concentration of ice-friendly aerosols updated by physics @@ -389,6 +393,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + active = (index_for_ice_friendly_aerosols > 0) [gq0(:,:,index_for_liquid_cloud_number_concentration)] standard_name = cloud_droplet_number_concentration_updated_by_physics long_name = number concentration of cloud droplets updated by physics @@ -396,6 +401,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + active = (index_for_liquid_cloud_number_concentration > 0) [gq0(:,:,index_for_ice_cloud_number_concentration)] standard_name = ice_number_concentration_updated_by_physics long_name = number concentration of ice updated by physics @@ -464,6 +470,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[lakedepth] + standard_name = lake_depth + long_name = lake depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tsfc] standard_name = surface_skin_temperature long_name = surface skin temperature @@ -492,6 +505,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[tiice] + standard_name = internal_ice_temperature + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,ice_vertical_dimension) + type = real + kind = kind_phys [snowd] standard_name = surface_snow_thickness_water_equivalent long_name = water equivalent snow depth @@ -541,6 +561,20 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[z0base] + standard_name = baseline_surface_roughness_length + long_name = baseline surface roughness length for momentum in meter + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[semisbase] + standard_name = baseline_surface_longwave_emissivity + long_name = baseline surface lw emissivity in fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [sncovr] standard_name = surface_snow_area_fraction_over_land long_name = surface snow area fraction @@ -1122,6 +1156,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snotime] + standard_name = time_since_last_snowfall + long_name = elapsed time since last snowfall + units = s + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [wetness] standard_name = normalized_soil_wetness_for_land_surface_model long_name = normalized soil wetness for lsm @@ -1283,6 +1324,27 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[evap] + standard_name = kinematic_surface_upward_latent_heat_flux + long_name = kinematic surface upward latent heat flux + units = kg kg-1 m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[hflx] + standard_name = kinematic_surface_upward_sensible_heat_flux + long_name = kinematic surface upward sensible heat flux + units = K m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[qss] + standard_name = surface_specific_humidity + long_name = surface air saturation specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [raincprv] standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep long_name = convective_precipitation_amount from previous timestep @@ -1792,34 +1854,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[tconvtend] - standard_name = tendency_of_air_temperature_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency of air temperature due to deep convection - units = K - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[qconvtend] - standard_name = tendency_of_water_vapor_specific_humidity_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency of specific humidity due to deep convection - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[uconvtend] - standard_name = tendency_of_x_wind_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency_of_x_wind_due_to_deep_convection - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys -[vconvtend] - standard_name = tendency_of_y_wind_due_to_deep_convection_for_coupling_on_physics_timestep - long_name = tendency_of_y_wind_due_to_deep_convection - units = m s-1 - dimensions = (horizontal_dimension,vertical_dimension) - type = real - kind = kind_phys [ca_deep] standard_name = fraction_of_cellular_automata_for_deep_convection long_name = fraction of cellular automata for deep convection @@ -1827,9 +1861,23 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[cape] - standard_name = convective_available_potential_energy_for_coupling - long_name = convective available potential energy for coupling +[vfact_ca] + standard_name = vertical_weight_for_ca + long_name = vertical weight for ca + units = frac + dimensions = (vertical_dimension) + type = real + kind = kind_phys +[ca1] + standard_name = cellular_automata_global_pattern + long_name = cellular automata global pattern + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[condition] + standard_name = physics_field_for_coupling + long_name = physics_field_for_coupling units = m2 s-2 dimensions = (horizontal_dimension) type = real @@ -1883,6 +1931,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) [nifa2d] standard_name = tendency_of_ice_friendly_aerosols_at_surface long_name = instantaneous ice-friendly sfc aerosol source @@ -1890,6 +1939,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys + active = (flag_for_microphysics_scheme == flag_for_thompson_microphysics_scheme .and. flag_for_aerosol_physics) [ushfsfci] standard_name = instantaneous_surface_upward_sensible_heat_flux_for_chemistry_coupling long_name = instantaneous upward sensible heat flux for chemistry coupling @@ -1904,6 +1954,13 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[qci_conv] + standard_name = convective_cloud_condesate_after_rainout + long_name = convective cloud condesate after rainout + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys ######################################################################## [ccpp-arg-table] @@ -1977,12 +2034,54 @@ units = flag dimensions = () type = logical +[qdiag3d] + standard_name = flag_tracer_diagnostics_3D + long_name = flag for 3d tracer diagnostic fields + units = flag + dimensions = () + type = logical +[flag_for_gwd_generic_tend] + standard_name = flag_for_generic_gravity_wave_drag_tendency + long_name = true if GFS_GWD_generic should calculate tendencies + units = flag + dimensions = () + type = logical +[flag_for_pbl_generic_tend] + standard_name = flag_for_generic_planetary_boundary_layer_tendency + long_name = true if GFS_PBL_generic should calculate tendencies + units = flag + dimensions = () + type = logical +[flag_for_dcnv_generic_tend] + standard_name = flag_for_generic_deep_convection_tendency + long_name = true if GFS_DCNV_generic should calculate tendencies + units = flag + dimensions = () + type = logical +[flag_for_scnv_generic_tend] + standard_name = flag_for_generic_shallow_convection_tendency + long_name = true if GFS_SCNV_generic should calculate tendencies + units = flag + dimensions = () + type = logical [lssav] standard_name = flag_diagnostics long_name = logical flag for storing diagnostics units = flag dimensions = () type = logical +[naux2d] + standard_name = number_of_2d_auxiliary_arrays + long_name = number of 2d auxiliary arrays to output (for debugging) + units = count + dimensions = () + type = integer +[naux3d] + standard_name = number_of_3d_auxiliary_arrays + long_name = number of 3d auxiliary arrays to output (for debugging) + units = count + dimensions = () + type = integer [levs] standard_name = vertical_dimension long_name = number of vertical levels @@ -2026,16 +2125,16 @@ dimensions = () type = integer [nblks] - standard_name = number_of_blocks + standard_name = ccpp_block_count long_name = for explicit data blocking: number of blocks units = count dimensions = () type = integer [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 [blksz(ccpp_block_number)] standard_name = horizontal_loop_extent @@ -2043,7 +2142,7 @@ units = count dimensions = () type = integer -[blksz2(ccpp_block_number)] +[ncols] standard_name = horizontal_dimension long_name = horizontal dimension units = count @@ -2143,6 +2242,12 @@ dimensions = () type = real kind = kind_phys +[nhfrad] + standard_name = number_of_timesteps_for_radiation_calls_on_physics_timestep + long_name = number of timesteps for radiation calls on physics timestep (coldstarts only) + units = count + dimensions = () + type = integer [levr] standard_name = number_of_vertical_layers_for_radiation_calculations long_name = number of vertical levels for radiation calculations @@ -2798,6 +2903,18 @@ units = flag dimensions = () type = integer +[lsm_noah_wrfv4] + standard_name = flag_for_noah_wrfv4_land_surface_scheme + long_name = flag for NOAH WRFv4 land surface model + units = flag + dimensions = () + type = integer +[kice] + standard_name = ice_vertical_dimension + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer [lsoil] standard_name = soil_vertical_dimension long_name = number of soil layers @@ -2828,6 +2945,31 @@ units = flag dimensions = () type = logical +[ua_phys] + standard_name = flag_for_noah_lsm_ua_extension + long_name = flag for using University of Arizona(?) extension for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = logical +[usemonalb] + standard_name = flag_for_reading_surface_diffused_shortwave_albedo_from_input + long_name = flag for reading surface diffused shortwave albedo for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = logical +[aoasis] + standard_name = potential_evaporation_multiplicative_factor + long_name = potential evaporation multiplicative factor for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = none + dimensions = () + type = real + kind = kind_phys +[fasdas] + standard_name = flag_flux_adjusting_surface_data_assimilation_system + long_name = flag to use the flux adjusting surface data assimilation system for NOAH LSM WRFv4 (see module_sf_noahlsm.F) + units = flag + dimensions = () + type = integer [ivegsrc] standard_name = vegetation_type_dataset_choice long_name = land use dataset choice @@ -2840,6 +2982,30 @@ units = index dimensions = () type = integer +[isurban] + standard_name = urban_vegetation_category + long_name = index of the urban vegetation category in the chosen vegetation dataset + units = index + dimensions = () + type = integer +[isice] + standard_name = ice_vegetation_category + long_name = index of the permanent snow/ice category in the chosen vegetation dataset + units = index + dimensions = () + type = integer +[iswater] + standard_name = water_vegetation_category + long_name = index of the water body vegetation category in the chosen vegetation dataset + units = index + dimensions = () + type = integer +[iopt_thcnd] + standard_name = flag_for_thermal_conductivity_option + long_name = choice for thermal conductivity option (see module_sf_noahlsm) + units = index + dimensions = () + type = integer [spec_adv] standard_name = flag_for_individual_cloud_species_advected long_name = flag for individual cloud species advected @@ -2925,6 +3091,37 @@ units = index dimensions = () type = integer +[lkm] + standard_name = flag_for_lake_surface_scheme + long_name = flag for lake surface model + units = flag + dimensions = () + type = integer +[lcurr_sf] + standard_name = flag_for_ocean_currents_in_surface_layer_scheme + long_name = flag for taking ocean currents into account in surface layer scheme + units = flag + dimensions = () + type = logical +[pert_cd] + standard_name = flag_for_perturbation_of_surface_drag_coefficient_for_momentum_in_air + long_name = flag for perturbing the surface drag coefficient for momentum in surface layer scheme + units = flag + dimensions = () + type = logical +[ntsflg] + standard_name = flag_for_updating_skin_temperatuer_in_surface_layer_scheme + long_name = flag for updating skin temperature in the surface layer scheme + units = flag + dimensions = () + type = integer +[sfenth] + standard_name = enthalpy_flux_factor + long_name = enthalpy flux factor used in surface layer scheme + units = none + dimensions = () + type = real + kind = kind_phys [ras] standard_name = flag_for_ras_deep_convection long_name = flag for ras convection scheme @@ -3058,6 +3255,12 @@ units = flag dimensions = () type = logical +[hurr_pbl] + standard_name = flag_hurricane_PBL + long_name = flag for hurricane-specific options in PBL scheme + units = flag + dimensions = () + type = logical [lheatstrg] standard_name = flag_for_canopy_heat_storage long_name = flag for canopy heat storage parameterization @@ -3130,6 +3333,18 @@ units = flag dimensions = () type = integer +[hwrf_samfdeep] + standard_name = flag_for_hwrf_samfdeepcnv_scheme + long_name = flag for hwrf samfdeepcnv scheme + units = flag + dimensions = () + type = logical +[hwrf_samfshal] + standard_name = flag_for_hwrf_samfshalcnv_scheme + long_name = flag for hwrf samfshalcnv scheme + units = flag + dimensions = () + type = logical [isatmedmf] standard_name = choice_of_scale_aware_TKE_moist_EDMF_PBL long_name = choice of scale-aware TKE moist EDMF PBL scheme @@ -3444,7 +3659,7 @@ kind = kind_phys [moninq_fac] standard_name = atmosphere_diffusivity_coefficient_factor - long_name = multiplicative constant for atmospheric diffusivities + long_name = multiplicative constant for atmospheric diffusivities (AKA alpha) units = none dimensions = () type = real @@ -3470,6 +3685,20 @@ dimensions = () type = real kind = kind_phys +[z0fac] + standard_name = surface_roughness_fraction_factor + long_name = surface roughness fraction for canopy heat storage parameterization + units = none + dimensions = () + type = real + kind = kind_phys +[e0fac] + standard_name = latent_heat_flux_fraction_factor_relative_to_sensible_heat_flux + long_name = latent heat flux fraction relative to sensible heat flux for canopy heat storage parameterization + units = none + dimensions = () + type = real + kind = kind_phys [nca] standard_name = number_of_independent_cellular_automata long_name = number of independent cellular automata @@ -3519,15 +3748,27 @@ units = flag dimensions = () type = logical -[ca_smooth] - standard_name = flag_for_gaussian_spatial_filter - long_name = switch for gaussian spatial filter +[ca_closure] + standard_name = flag_for_global_cellular_automata_closure + long_name = switch for ca on closure + units = flag + dimensions = () + type = logical +[ca_entr] + standard_name = flag_for_global_cellular_automata_entr + long_name = switch for ca on entr units = flag dimensions = () type = logical -[isppt_deep] - standard_name = flag_for_combination_of_sppt_with_isppt_deep - long_name = switch for combination with isppt_deep. +[ca_trigger] + standard_name = flag_for_global_cellular_automata_trigger + long_name = switch for ca on trigger + units = flag + dimensions = () + type = logical +[ca_smooth] + standard_name = flag_for_gaussian_spatial_filter + long_name = switch for gaussian spatial filter units = flag dimensions = () type = logical @@ -3922,7 +4163,7 @@ [slag] standard_name = equation_of_time long_name = equation of time (radian) - units = radians + units = radian dimensions = () type = real kind = kind_phys @@ -3986,6 +4227,12 @@ units = flag dimensions = () type = logical +[cycling] + standard_name = flag_for_cycling + long_name = flag for cycling or coldstart + units = flag + dimensions = () + type = logical [hydrostatic] standard_name = flag_for_hydrostatic_solver long_name = flag for hydrostatic solver from dynamics @@ -4059,6 +4306,12 @@ dimensions = () type = real kind = kind_phys +[icloud] + standard_name = cloud_effect_to_optical_depth_and_cloud_fraction + long_name = cloud effect to the optical depth and cloud fraction in radiation + units = flag + dimensions = () + type = integer [gwd_opt] standard_name = gwd_opt long_name = flag to choose gwd scheme @@ -4155,12 +4408,39 @@ units = flag dimensions = () type = integer +[bl_mynn_output] + standard_name = mynn_output_flag + long_name = flag initialize and output extra 3D variables + units = flag + dimensions = () + type = integer [icloud_bl] standard_name = couple_sgs_clouds_to_radiation_flag long_name = flag for coupling sgs clouds to radiation units = flag dimensions = () type = integer +[var_ric] + standard_name = flag_variable_bulk_richardson_number + long_name = flag for calculating variable bulk richardson number for hurricane PBL + units = flag + dimensions = () + type = real + kind = kind_phys +[coef_ric_l] + standard_name = coefficient_for_variable_bulk_richardson_number_over_land + long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over land + units = none + dimensions = () + type = real + kind = kind_phys +[coef_ric_s] + standard_name = coefficient_for_variable_bulk_richardson_number_over_ocean + long_name = coefficient for calculating variable bulk richardson number for hurricane PBL over ocean + units = none + dimensions = () + type = real + kind = kind_phys [do_ugwp] standard_name = do_ugwp long_name = flag to activate CIRES UGWP @@ -4191,7 +4471,19 @@ units = flag dimensions = () type = logical - +[uni_cld] + standard_name = flag_for_uni_cld + long_name = flag for uni_cld + units = flag + dimensions = () + type = logical +[lmfshal] + standard_name = flag_for_lmfshal + long_name = flag for lmfshal + units = flag + dimensions = () + type = logical + ######################################################################## [ccpp-arg-table] name = GFS_grid_type @@ -4213,14 +4505,14 @@ [xlat] standard_name = latitude long_name = latitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys [xlon] standard_name = longitude long_name = longitude - units = radians + units = radian dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -4239,9 +4531,9 @@ type = real kind = kind_phys [xlat_d] - standard_name = latitude_degree - long_name = latitude in degrees - units = degree + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -4276,6 +4568,13 @@ dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) type = real kind = kind_phys +[hpbl] + standard_name = atmosphere_boundary_layer_thickness + long_name = pbl height + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [in_nm] standard_name = in_number_concentration long_name = IN number concentration @@ -4294,7 +4593,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_res_MG) + dimensions = (horizontal_dimension,vertical_dimension,number_of_aerosol_tracers_MG) type = real kind = kind_phys [imap] @@ -4533,8 +4832,15 @@ type = real kind = kind_phys [QC_BL] - standard_name = subgrid_cloud_mixing_ratio_pbl - long_name = subgrid cloud cloud mixing ratio from PBL scheme + standard_name = subgrid_cloud_water_mixing_ratio_pbl + long_name = subgrid cloud water mixing ratio from PBL scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[QI_BL] + standard_name = subgrid_cloud_ice_mixing_ratio_pbl + long_name = subgrid cloud ice mixing ratio from PBL scheme units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) type = real @@ -4616,13 +4922,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[phy_myj_z0base] - standard_name = baseline_surface_roughness_length - long_name = baseline surface roughness length for momentum in meter - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [phy_myj_akhs] standard_name = heat_exchange_coefficient_for_MYJ_schemes long_name = surface heat exchange_coefficient for MYJ schemes @@ -5285,13 +5584,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[hpbl] - standard_name = atmosphere_boundary_layer_thickness - long_name = pbl height - units = m - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [pwat] standard_name = column_precipitable_water long_name = precipitable water @@ -5537,6 +5829,34 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[du3dt(:,:,5)] + standard_name = cumulative_change_in_x_wind_due_to_rayleigh_damping + long_name = cumulative change in x wind due to Rayleigh damping + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[du3dt(:,:,6)] + standard_name = cumulative_change_in_x_wind_due_to_shallow_convection + long_name = cumulative change in x wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[du3dt(:,:,7)] + standard_name = cumulative_change_in_x_wind_due_to_physics + long_name = cumulative change in x wind due to physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[du3dt(:,:,8)] + standard_name = cumulative_change_in_x_wind_due_to_non_physics_processes + long_name = cumulative change in x wind due to non-physics processes + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [dv3dt(:,:,1)] standard_name = cumulative_change_in_y_wind_due_to_PBL long_name = cumulative change in y wind due to PBL @@ -5565,6 +5885,34 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[dv3dt(:,:,5)] + standard_name = cumulative_change_in_y_wind_due_to_rayleigh_damping + long_name = cumulative change in y wind due to Rayleigh damping + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dv3dt(:,:,6)] + standard_name = cumulative_change_in_y_wind_due_to_shallow_convection + long_name = cumulative change in y wind due to shallow convection + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dv3dt(:,:,7)] + standard_name = cumulative_change_in_y_wind_due_to_physics + long_name = cumulative change in y wind due to physics + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dv3dt(:,:,8)] + standard_name = cumulative_change_in_y_wind_due_to_non_physics_processes + long_name = cumulative change in y wind due to non-physics processes + units = m s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [dt3dt(:,:,1)] standard_name = cumulative_change_in_temperature_due_to_longwave_radiation long_name = cumulative change in temperature due to longwave radiation @@ -5594,7 +5942,7 @@ type = real kind = kind_phys [dt3dt(:,:,5)] - standard_name = cumulative_change_in_temperature_due_to_shal_convection + standard_name = cumulative_change_in_temperature_due_to_shallow_convection long_name = cumulative change in temperature due to shallow convection units = K dimensions = (horizontal_dimension,vertical_dimension) @@ -5614,6 +5962,34 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[dt3dt(:,:,8)] + standard_name = cumulative_change_in_temperature_due_to_rayleigh_damping + long_name = cumulative change in temperature due to Rayleigh damping + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dt3dt(:,:,9)] + standard_name = cumulative_change_in_temperature_due_to_convective_gravity_wave_drag + long_name = cumulative change in temperature due to convective gravity wave drag + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dt3dt(:,:,10)] + standard_name = cumulative_change_in_temperature_due_to_physics + long_name = cumulative change in temperature due to physics + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dt3dt(:,:,11)] + standard_name = cumulative_change_in_temperature_due_to_non_physics_processes + long_name = cumulative change in temperature due to non-physics processed + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [dq3dt(:,:,1)] standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL long_name = cumulative change in water vapor specific humidity due to PBL @@ -5629,7 +6005,7 @@ type = real kind = kind_phys [dq3dt(:,:,3)] - standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shal_convection + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_shallow_convection long_name = cumulative change in water vapor specific humidity due to shallow convection units = kg kg-1 dimensions = (horizontal_dimension,vertical_dimension) @@ -5677,6 +6053,34 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[dq3dt(:,:,10)] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_physics + long_name = cumulative change in water vapor specific humidity due to physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dq3dt(:,:,11)] + standard_name = cumulative_change_in_ozone_concentration_due_to_physics + long_name = cumulative change in ozone concentration due to physics + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dq3dt(:,:,12)] + standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_non_physics_processes + long_name = cumulative change in water vapor specific humidity due to non-physics processes + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[dq3dt(:,:,13)] + standard_name = cumulative_change_in_ozone_concentration_due_to_non_physics_processes + long_name = cumulative change in ozone_concentration due to non-physics processes + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [refdmax] standard_name = maximum_reflectivity_at_1km_agl_over_maximum_hourly_time_interval long_name = maximum reflectivity at 1km agl over maximum hourly time interval @@ -5863,6 +6267,34 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[sub_thl] + standard_name = theta_subsidence_tendency + long_name = updraft theta subsidence tendency + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[sub_sqv] + standard_name = water_vapor_subsidence_tendency + long_name = updraft water vapor subsidence tendency + units = kg kg-1 s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[det_thl] + standard_name = theta_detrainment_tendency + long_name = updraft theta detrainment tendency + units = K s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys +[det_sqv] + standard_name = water_vapor_detrainment_tendency + long_name = updraft water vapor detrainment tendency + units = kg kg-1 s-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [nupdraft] standard_name = number_of_plumes long_name = number of plumes per grid column @@ -5882,6 +6314,12 @@ units = count dimensions = (horizontal_dimension) type = integer +[ktop_plume] + standard_name = k_level_of_highest_plume + long_name = k-level of highest plume + units = count + dimensions = (horizontal_dimension) + type = integer [exch_h] standard_name = atmosphere_heat_diffusivity_for_mynnpbl long_name = diffusivity for heat for MYNN PBL (defined for all mass levels) @@ -5980,6 +6418,20 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[aux2d] + standard_name = auxiliary_2d_arrays + long_name = auxiliary 2d arrays to output (for debugging) + units = none + dimensions = (horizontal_dimension,number_of_3d_auxiliary_arrays) + type = real + kind = kind_phys +[aux3d] + standard_name = auxiliary_3d_arrays + long_name = auxiliary 3d arrays to output (for debugging) + units = none + dimensions = (horizontal_dimension,vertical_dimension,number_of_3d_auxiliary_arrays) + type = real + kind = kind_phys ######################################################################## [ccpp-arg-table] @@ -6153,6 +6605,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[canopy_save] + standard_name = canopy_water_amount_save + long_name = canopy water amount before entering a physics scheme + units = kg m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [cd] standard_name = surface_drag_coefficient_for_momentum_in_air long_name = surface exchange coeff for momentum @@ -6230,6 +6689,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[chk_land] + standard_name = surface_conductance_for_heat_and_moisture_in_air_over_land + long_name = surface conductance for heat & moisture over land + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [cf_upi] standard_name = convective_cloud_fraction_for_microphysics long_name = convective cloud fraction for microphysics @@ -6377,6 +6843,20 @@ dimensions = (horizontal_dimension,4) type = real kind = kind_phys +[clxss] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale + long_name = frac. of grid box with by subgrid orography higher than critical height small scale + units = frac + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys +[cmc] + standard_name = canopy_water_amount_in_m + long_name = canopy water amount in m + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [cmm_ocean] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ocean long_name = momentum exchange coefficient over ocean @@ -6559,6 +7039,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + active = (index_for_liquid_cloud_number_concentration > 0) [dqdt(:,:,index_for_ice_cloud_number_concentration)] standard_name = tendency_of_ice_number_concentration_due_to_model_physics long_name = number concentration of ice tendency due to model physics @@ -6573,6 +7054,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + active = (index_for_water_friendly_aerosols > 0) [dqdt(:,:,index_for_ice_friendly_aerosols)] standard_name = tendency_of_ice_friendly_aerosol_number_concentration_due_to_model_physics long_name = number concentration of ice-friendly aerosols tendency due to model physics @@ -6580,6 +7062,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + active = (index_for_ice_friendly_aerosols > 0) [dqdt(:,:,index_for_rain_water)] standard_name = tendency_of_rain_water_mixing_ratio_due_to_model_physics long_name = ratio of mass of rain water tendency to mass of dry air plus vapor (without condensates) due to model physics @@ -6608,6 +7091,13 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[dqsdt2] + standard_name = saturation_specific_humidity_slope + long_name = saturation specific humidity slope at lowest model layer + units = K-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [dqsfc1] standard_name = instantaneous_surface_upward_latent_heat_flux long_name = surface upward latent heat flux @@ -6622,6 +7112,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[drain_in_m_sm1] + standard_name = subsurface_runoff_flux_in_m_sm1 + long_name = subsurface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [dtdt] standard_name = tendency_of_air_temperature_due_to_model_physics long_name = air temperature tendency due to model physics @@ -6769,9 +7266,9 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[evap] - standard_name = kinematic_surface_upward_latent_heat_flux - long_name = kinematic surface upward latent heat flux +[evapq] + standard_name = kinematic_surface_upward_latent_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward latent heat flux reduced by surface roughness units = kg kg-1 m s-1 dimensions = (horizontal_dimension) type = real @@ -6934,6 +7431,18 @@ units = flag dimensions = (horizontal_dimension) type = logical +[flag_lsm] + standard_name = flag_for_calling_land_surface_model + long_name = flag for calling land surface model + units = flag + dimensions = (horizontal_dimension) + type = logical +[flag_lsm_glacier] + standard_name = flag_for_calling_land_surface_model_glacier + long_name = flag for calling land surface model over glacier + units = flag + dimensions = (horizontal_dimension) + type = logical [ffmm_ocean] standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ocean long_name = Monin-Obukhov similarity function for momentum over ocean @@ -7192,9 +7701,23 @@ dimensions = (vertical_dimension_of_h2o_forcing_data) type = real kind = kind_phys -[hflx] - standard_name = kinematic_surface_upward_sensible_heat_flux - long_name = kinematic surface upward sensible heat flux +[hefac] + standard_name = surface_upward_latent_heat_flux_reduction_factor + long_name = surface upward latent heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[hffac] + standard_name = surface_upward_sensible_heat_flux_reduction_factor + long_name = surface upward sensible heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[hflxq] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness + long_name = kinematic surface upward sensible heat flux reduced by surface roughness units = K m s-1 dimensions = (horizontal_dimension) type = real @@ -7518,6 +8041,18 @@ units = count dimensions = () type = integer +[ntqvx] + standard_name = index_for_water_vapor_vertical_diffusion_tracer + long_name = tracer index for water vapor (specific humidity) in the vertically diffused tracer array + units = index + dimensions = () + type = integer +[ntcwx] + standard_name = index_for_liquid_cloud_condensate_vertical_diffusion_tracer + long_name = tracer index for cloud condensate (or liquid water) in the vertically diffused tracer array + units = index + dimensions = () + type = integer [ntiwx] standard_name = index_for_ice_cloud_condensate_vertical_diffusion_tracer long_name = index for ice cloud condensate in the vertically diffused tracer array @@ -7536,6 +8071,12 @@ units = index dimensions = () type = integer +[ntozx] + standard_name = index_for_ozone_vertical_diffusion_tracer + long_name = tracer index for ozone mixing ratio in the vertically diffused tracer array + units = index + dimensions = () + type = integer [nvdiff] standard_name = number_of_vertical_diffusion_tracers long_name = number of tracers to diffuse vertically @@ -7549,6 +8090,20 @@ dimensions = (horizontal_dimension,4) type = real kind = kind_phys +[varss] + standard_name = standard_deviation_of_subgrid_orography_small_scale + long_name = standard deviation of subgrid orography small scale + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[oa4ss] + standard_name = asymmetry_of_subgrid_orography_small_scale + long_name = asymmetry of subgrid orography small scale + units = none + dimensions = (horizontal_dimension,4) + type = real + kind = kind_phys [oc] standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid orography @@ -7556,6 +8111,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[ocss] + standard_name = convexity_of_subgrid_orography_small_scale + long_name = convexity of subgrid orography small scale + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [olyr] standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration layer @@ -7671,13 +8233,6 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys -[qss] - standard_name = surface_specific_humidity - long_name = surface air saturation specific humidity - units = kg kg-1 - dimensions = (horizontal_dimension) - type = real - kind = kind_phys [qss_ocean] standard_name = surface_specific_humidity_over_ocean long_name = surface air saturation specific humidity over ocean @@ -7699,6 +8254,20 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[qs1] + standard_name = saturation_specific_humidity_at_lowest_model_layer + long_name = saturation specific humidity at lowest model layer + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[qv1] + standard_name = bounded_specific_humidity_at_lowest_model_layer_over_land + long_name = specific humidity at lowest model layer over land bounded between a nonzero epsilon and saturation + units = kg kg-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [radar_reset] standard_name = flag_for_resetting_radar_reflectivity_calculation long_name = flag for resetting radar reflectivity calculation @@ -7788,6 +8357,13 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[rho1] + standard_name = air_density_at_lowest_model_layer + long_name = air density at lowest model layer + units = kg m-3 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [runoff] standard_name = surface_runoff_flux long_name = surface runoff flux @@ -7795,6 +8371,20 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[runoff_in_m_sm1] + standard_name = surface_runoff_flux_in_m_sm1 + long_name = surface runoff flux in m s-1 + units = m s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_for_ozone)] + standard_name = ozone_mixing_ratio_save + long_name = ozone mixing ratio before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [save_q(:,:,index_for_liquid_cloud_condensate)] standard_name = cloud_condensed_water_mixing_ratio_save long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme @@ -7830,6 +8420,13 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys +[save_tcp] + standard_name = air_temperature_save_from_convective_parameterization + long_name = air temperature after cumulus parameterization + units = K + dimensions = (horizontal_dimension,vertical_dimension) + type = real + kind = kind_phys [save_u] standard_name = x_wind_save long_name = x-wind before entering a physics scheme @@ -7919,12 +8516,33 @@ units = flag dimensions = () type = logical +[slc_save] + standard_name = volume_fraction_of_unfrozen_soil_moisture_save + long_name = liquid soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys [slopetype] standard_name = surface_slope_classification long_name = surface slope type at each grid cell units = index dimensions = (horizontal_dimension) type = integer +[smcmax] + standard_name = soil_porosity + long_name = volumetric soil porosity + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[smc_save] + standard_name = volume_fraction_of_soil_moisture_save + long_name = total soil moisture before entering a physics scheme + units = frac + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys [snowc] standard_name = surface_snow_area_fraction long_name = surface snow area fraction @@ -7946,6 +8564,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snowd_land_save] + standard_name = surface_snow_thickness_water_equivalent_over_land_save + long_name = water equivalent snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [snowd_ice] standard_name = surface_snow_thickness_water_equivalent_over_ice long_name = water equivalent snow depth over ice @@ -7953,6 +8578,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snow_depth] + standard_name = actual_snow_depth + long_name = actual snow depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [snohf] standard_name = snow_freezing_rain_upward_latent_heat_flux long_name = latent heat flux due to snow and frz rain @@ -7960,6 +8592,27 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[snohf_snow] + standard_name = latent_heat_flux_from_precipitating_snow + long_name = latent heat flux due to precipitating snow + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[snohf_frzgra] + standard_name = latent_heat_flux_from_freezing_rain + long_name = latent heat flux due to freezing rain + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[snohf_snowmelt] + standard_name = latent_heat_flux_due_to_snowmelt + long_name = latent heat flux due to snowmelt phase change + units = W m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [snowmp] standard_name = lwe_thickness_of_snow_amount long_name = explicit snow fall on physics timestep @@ -7974,12 +8627,33 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[soilm_in_m] + standard_name = soil_moisture_content_in_m + long_name = soil moisture in meters + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [soiltype] standard_name = soil_type_classification long_name = soil type at each grid cell units = index dimensions = (horizontal_dimension) type = integer +[stc_save] + standard_name = soil_temperature_save + long_name = soil temperature before entering a physics scheme + units = K + dimensions = (horizontal_dimension,soil_vertical_dimension) + type = real + kind = kind_phys +[sthick] + standard_name = soil_layer_thickness + long_name = soil layer thickness + units = m + dimensions = (soil_vertical_dimension) + type = real + kind = kind_phys [stress] standard_name = surface_wind_stress long_name = surface wind stress @@ -8018,7 +8692,14 @@ [theta] standard_name = angle_from_east_of_maximum_subgrid_orographic_variations long_name = angle with_respect to east of maximum subgrid orographic variations - units = degrees + units = degree + dimensions = (horizontal_dimension) + type = real + kind = kind_phys +[th1] + standard_name = potential_temperature_at_lowest_model_layer + long_name = potential_temperature_at_lowest_model_layer + units = K dimensions = (horizontal_dimension) type = real kind = kind_phys @@ -8064,6 +8745,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[tprcp_rate_land] + standard_name = total_precipitation_rate_on_dynamics_timestep_over_land + long_name = total precipitation rate in each time step over land + units = kg m-2 s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tracers_start_index] standard_name = start_index_of_other_tracers long_name = beginning index of the non-water tracer species @@ -8117,6 +8805,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[tsfc_land_save] + standard_name = surface_skin_temperature_over_land_interstitial_save + long_name = surface skin temperature over land before entering a physics scheme (temporary use as interstitial) + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [tsfc_ice] standard_name = surface_skin_temperature_over_ice_interstitial long_name = surface skin temperature over ice (temporary use as interstitial) @@ -8248,6 +8943,13 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys +[weasd_land_save] + standard_name = water_equivalent_accumulated_snow_depth_over_land_save + long_name = water equiv of acc snow depth over land before entering a physics scheme + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys [weasd_ice] standard_name = water_equivalent_accumulated_snow_depth_over_ice long_name = water equiv of acc snow depth over ice @@ -8443,7 +9145,8 @@ units = hPa dimensions = (horizontal_dimension,vertical_dimension) type = real - kind = kind_phys + kind = kind_phys + optional = F [p_lev] standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa long_name = air pressure level @@ -8451,6 +9154,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [t_lay] standard_name = air_temperature_at_layer_for_RRTMGP long_name = air temperature layer @@ -8458,6 +9162,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + optional = F [t_lev] standard_name = air_temperature_at_interface_for_RRTMGP long_name = air temperature layer @@ -8465,6 +9170,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [tv_lay] standard_name = virtual_temperature long_name = layer virtual temperature @@ -8472,6 +9178,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + optional = F [relhum] standard_name = relative_humidity long_name = layer relative humidity @@ -8526,6 +9233,7 @@ dimensions = (horizontal_dimension,vertical_dimension) type = real kind = kind_phys + optional = F [cldtaulw] standard_name = RRTMGP_cloud_optical_depth_layers_at_10mu_band long_name = approx 10mu band layer cloud optical depth @@ -8540,6 +9248,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxlwDOWN_allsky] standard_name = RRTMGP_lw_flux_profile_downward_allsky long_name = RRTMGP downward longwave all-sky flux profile @@ -8547,6 +9256,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxlwUP_clrsky] standard_name = RRTMGP_lw_flux_profile_upward_clrsky long_name = RRTMGP upward longwave clr-sky flux profile @@ -8554,6 +9264,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxlwDOWN_clrsky] standard_name = RRTMGP_lw_flux_profile_downward_clrsky long_name = RRTMGP downward longwave clr-sky flux profile @@ -8589,6 +9300,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxswDOWN_allsky] standard_name = RRTMGP_sw_flux_profile_downward_allsky long_name = RRTMGP downward shortwave all-sky flux profile @@ -8596,6 +9308,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxswUP_clrsky] standard_name = RRTMGP_sw_flux_profile_upward_clrsky long_name = RRTMGP upward shortwave clr-sky flux profile @@ -8603,6 +9316,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [fluxswDOWN_clrsky] standard_name = RRTMGP_sw_flux_profile_downward_clrsky long_name = RRTMGP downward shortwave clr-sky flux profile @@ -8610,6 +9324,7 @@ dimensions = (horizontal_dimension,vertical_dimension_plus_one) type = real kind = kind_phys + optional = F [flxprf_lw] standard_name = RRTMGP_lw_fluxes long_name = lw fluxes total sky / csk and up / down at levels @@ -8631,6 +9346,7 @@ dimensions = (horizontal_dimension,vertical_dimension, number_of_lw_bands_rrtmgp,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys + optional = F [aerosolslw(:,:,:,1)] standard_name = RRTMGP_aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 @@ -8870,7 +9586,7 @@ dimensions = (number_of_active_gases_used_by_RRTMGP) type = character kind = len=128 - + ######################################################################## [ccpp-arg-table] name = GFS_data_type diff --git a/scm/src/gmtb_scm_physical_constants.F90 b/scm/src/gmtb_scm_physical_constants.F90 index c7489476..af238377 100644 --- a/scm/src/gmtb_scm_physical_constants.F90 +++ b/scm/src/gmtb_scm_physical_constants.F90 @@ -25,6 +25,7 @@ module gmtb_scm_physical_constants real(kind=dp),parameter:: con_t0c =2.7315e+2 real(kind=dp),parameter:: con_ttp =2.7316e+2 real(kind=dp),parameter:: con_epsq =1.0E-12_dp + real(kind=dp),parameter:: con_epsqs =1.0E-10_dp real(kind=dp),parameter:: con_rocp =con_rd/con_cp real(kind=dp),parameter:: con_fvirt =con_rv/con_rd - 1 diff --git a/scm/src/gmtb_scm_physical_constants.meta b/scm/src/gmtb_scm_physical_constants.meta index eb7f23bd..6adc6eb4 100644 --- a/scm/src/gmtb_scm_physical_constants.meta +++ b/scm/src/gmtb_scm_physical_constants.meta @@ -22,6 +22,13 @@ dimensions = () type = real kind = kind_phys +[con_epsqs] + standard_name = minimum_value_of_saturation_mixing_ratio + long_name = floor value for saturation mixing ratio + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys [con_eps] standard_name = ratio_of_dry_air_to_water_vapor_gas_constants long_name = rd/rv @@ -67,7 +74,7 @@ [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radians + units = radian dimensions = () type = real kind = kind_phys From 5b8b41cc20bdf8170ca7cee7a6d8791134d06252 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 15:12:40 -0600 Subject: [PATCH 35/46] revert a bunch of SCM files that didn't have RRTMGP changes to the current master --- ccpp/physics_namelists/input_csawmg.nml | 3 +- ccpp/suites/suite_SCM_GFS_v15p2.xml | 3 +- ccpp/suites/suite_SCM_GFS_v15p2_FA.xml | 3 +- ccpp/suites/suite_SCM_GFS_v15p2_MYJ.xml | 3 +- ccpp/suites/suite_SCM_GFS_v15p2_no_nsst.xml | 1 + .../suites/suite_SCM_GFS_v15p2_no_nsst_ps.xml | 3 +- ccpp/suites/suite_SCM_GFS_v15p2_noahmp.xml | 3 +- ccpp/suites/suite_SCM_GFS_v15p2_ps.xml | 3 +- ccpp/suites/suite_SCM_GFS_v16beta.xml | 3 +- ccpp/suites/suite_SCM_GFS_v16beta_no_nsst.xml | 1 + .../suite_SCM_GFS_v16beta_no_nsst_ps.xml | 3 +- ccpp/suites/suite_SCM_GFS_v16beta_ps.xml | 3 +- ccpp/suites/suite_SCM_GSD_v1.xml | 7 +- ccpp/suites/suite_SCM_GSD_v1_ps.xml | 7 +- ccpp/suites/suite_SCM_csawmg.xml | 3 +- ccpp/suites/suite_SCM_csawmg_ps.xml | 3 +- scm/etc/Hera_setup_intel.csh | 2 +- scm/etc/Hera_setup_intel.sh | 2 +- scm/etc/case_config/astex.nml | 1 + scm/etc/case_config/fv3_model_point_noah.nml | 1 - .../case_config/fv3_model_point_noahmp.nml | 1 - scm/etc/case_config/twpice.nml | 1 + scm/etc/scripts/gmtb_scm_analysis.py | 41 ++ .../scripts/plot_configs/supported_suites.ini | 82 +++ scm/src/CMakeLists.txt | 80 +-- scm/src/gmtb_scm.F90 | 228 +++---- scm/src/gmtb_scm_forcing.F90 | 212 +++--- scm/src/gmtb_scm_input.F90 | 70 +- scm/src/gmtb_scm_output.F90 | 423 +++++++++--- scm/src/gmtb_scm_setup.F90 | 281 ++++---- scm/src/gmtb_scm_time_integration.F90 | 62 +- scm/src/gmtb_scm_type_defs.F90 | 614 +++++++++--------- scm/src/gmtb_scm_type_defs.meta | 58 +- scm/src/gmtb_scm_vgrid.F90 | 194 +++--- 34 files changed, 1346 insertions(+), 1059 deletions(-) create mode 100644 scm/etc/scripts/plot_configs/supported_suites.ini diff --git a/ccpp/physics_namelists/input_csawmg.nml b/ccpp/physics_namelists/input_csawmg.nml index 5d88a3ee..7a5071a4 100644 --- a/ccpp/physics_namelists/input_csawmg.nml +++ b/ccpp/physics_namelists/input_csawmg.nml @@ -72,8 +72,7 @@ mg_qcvar = 1.0 fprcp = 2 pdfflag = 4 - iccn = .false. - aero_in = .false. + iccn = 0 mg_do_graupel = .true. mg_do_hail = .false. do_sb_physics = .true. diff --git a/ccpp/suites/suite_SCM_GFS_v15p2.xml b/ccpp/suites/suite_SCM_GFS_v15p2.xml index 88c3a16f..e061c973 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2.xml @@ -62,9 +62,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -76,6 +76,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_FA.xml b/ccpp/suites/suite_SCM_GFS_v15p2_FA.xml index c0d8b820..c64efcf7 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_FA.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_FA.xml @@ -62,9 +62,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -76,6 +76,7 @@ mp_fer_hires GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_MYJ.xml b/ccpp/suites/suite_SCM_GFS_v15p2_MYJ.xml index cf05de2d..5d1add54 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_MYJ.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_MYJ.xml @@ -62,9 +62,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -76,6 +76,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst.xml b/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst.xml index aacdc9ca..3c24010e 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst.xml @@ -74,6 +74,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst_ps.xml b/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst_ps.xml index 3d76f48a..8defa1a9 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_no_nsst_ps.xml @@ -43,9 +43,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -57,6 +57,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_noahmp.xml b/ccpp/suites/suite_SCM_GFS_v15p2_noahmp.xml index 87decb00..a6b3661c 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_noahmp.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_noahmp.xml @@ -62,9 +62,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -76,6 +76,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_ps.xml b/ccpp/suites/suite_SCM_GFS_v15p2_ps.xml index 6846f32e..6304c070 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_ps.xml @@ -43,9 +43,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -57,6 +57,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v16beta.xml b/ccpp/suites/suite_SCM_GFS_v16beta.xml index 85987551..48db7781 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta.xml @@ -62,9 +62,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -76,6 +76,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst.xml b/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst.xml index 165c8dab..bdcae619 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst.xml @@ -74,6 +74,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst_ps.xml b/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst_ps.xml index 3a543af1..564c2498 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_no_nsst_ps.xml @@ -43,9 +43,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -57,6 +57,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_ps.xml b/ccpp/suites/suite_SCM_GFS_v16beta_ps.xml index 0d6d03aa..75184b12 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_ps.xml @@ -43,9 +43,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -57,6 +57,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GSD_v1.xml b/ccpp/suites/suite_SCM_GSD_v1.xml index 7798b4a9..70cce179 100644 --- a/ccpp/suites/suite_SCM_GSD_v1.xml +++ b/ccpp/suites/suite_SCM_GSD_v1.xml @@ -13,14 +13,14 @@ GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre rrtmg_sw_pre - mynnrad_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre rrtmg_lw - mynnrad_post + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post @@ -65,9 +65,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre cu_gf_driver_pre cu_gf_driver GFS_DCNV_generic_post @@ -82,6 +82,7 @@ GFS_MP_generic_post cu_gf_driver_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GSD_v1_ps.xml b/ccpp/suites/suite_SCM_GSD_v1_ps.xml index 559401e0..cbd57400 100644 --- a/ccpp/suites/suite_SCM_GSD_v1_ps.xml +++ b/ccpp/suites/suite_SCM_GSD_v1_ps.xml @@ -13,14 +13,14 @@ GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre rrtmg_sw_pre - mynnrad_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre rrtmg_lw - mynnrad_post + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post @@ -44,9 +44,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre cu_gf_driver_pre cu_gf_driver GFS_DCNV_generic_post @@ -61,6 +61,7 @@ GFS_MP_generic_post cu_gf_driver_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_csawmg.xml b/ccpp/suites/suite_SCM_csawmg.xml index 0747565d..5a92d2d7 100644 --- a/ccpp/suites/suite_SCM_csawmg.xml +++ b/ccpp/suites/suite_SCM_csawmg.xml @@ -63,9 +63,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre cs_conv_pre cs_conv cs_conv_post @@ -82,6 +82,7 @@ cs_conv_aw_adj GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_csawmg_ps.xml b/ccpp/suites/suite_SCM_csawmg_ps.xml index 030fa4bb..f4192ef8 100644 --- a/ccpp/suites/suite_SCM_csawmg_ps.xml +++ b/ccpp/suites/suite_SCM_csawmg_ps.xml @@ -44,9 +44,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre cs_conv_pre cs_conv cs_conv_post @@ -63,6 +63,7 @@ cs_conv_aw_adj GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/scm/etc/Hera_setup_intel.csh b/scm/etc/Hera_setup_intel.csh index 9b6b772d..9f7ee4fd 100755 --- a/scm/etc/Hera_setup_intel.csh +++ b/scm/etc/Hera_setup_intel.csh @@ -27,7 +27,7 @@ module load cmake/3.16.3 setenv CMAKE_Platform hera.intel echo "Loading the anaconda python distribution" -module load contrib +module use -a /contrib/anaconda/modulefiles module load anaconda/anaconda2 #install f90nml for the local user diff --git a/scm/etc/Hera_setup_intel.sh b/scm/etc/Hera_setup_intel.sh index 4282c64e..52da86ed 100755 --- a/scm/etc/Hera_setup_intel.sh +++ b/scm/etc/Hera_setup_intel.sh @@ -24,7 +24,7 @@ module load cmake/3.16.3 export CMAKE_Platform=hera.intel echo "Loading the anaconda python distribution" -module load contrib +module use -a /contrib/anaconda/modulefiles module load anaconda/anaconda2 #install f90nml for the local user diff --git a/scm/etc/case_config/astex.nml b/scm/etc/case_config/astex.nml index de838942..30c1f54c 100644 --- a/scm/etc/case_config/astex.nml +++ b/scm/etc/case_config/astex.nml @@ -15,6 +15,7 @@ mom_forcing_type = 2, relax_time = 7200.0, sfc_flux_spec = .false., sfc_type = 0, +sfc_roughness_length_cm = 0.02, reference_profile_choice = 1, year = 1992, month = 6, diff --git a/scm/etc/case_config/fv3_model_point_noah.nml b/scm/etc/case_config/fv3_model_point_noah.nml index 47f916a3..77bdf1cb 100644 --- a/scm/etc/case_config/fv3_model_point_noah.nml +++ b/scm/etc/case_config/fv3_model_point_noah.nml @@ -22,6 +22,5 @@ year = 2016, month = 10, day = 3, hour = 0, -output_dir = 'output_fv3_model_point_noah' $end diff --git a/scm/etc/case_config/fv3_model_point_noahmp.nml b/scm/etc/case_config/fv3_model_point_noahmp.nml index 6aab8134..4ca6d61d 100644 --- a/scm/etc/case_config/fv3_model_point_noahmp.nml +++ b/scm/etc/case_config/fv3_model_point_noahmp.nml @@ -22,6 +22,5 @@ year = 2016, month = 10, day = 3, hour = 0, -output_dir = 'output_fv3_model_point_noahmp' $end diff --git a/scm/etc/case_config/twpice.nml b/scm/etc/case_config/twpice.nml index b8e81e3d..f9c2b16d 100644 --- a/scm/etc/case_config/twpice.nml +++ b/scm/etc/case_config/twpice.nml @@ -15,6 +15,7 @@ mom_forcing_type = 3, relax_time = 7200.0, sfc_flux_spec = .false., sfc_type = 0, +sfc_roughness_length_cm = 0.02, reference_profile_choice = 1, year = 2006, month = 1, diff --git a/scm/etc/scripts/gmtb_scm_analysis.py b/scm/etc/scripts/gmtb_scm_analysis.py index a1a84887..98e569f3 100755 --- a/scm/etc/scripts/gmtb_scm_analysis.py +++ b/scm/etc/scripts/gmtb_scm_analysis.py @@ -156,19 +156,43 @@ def print_progress(n_complete, n_total): dT_dt_shalconv = [] dT_dt_micro = [] dT_dt_conv = [] +dT_dt_ogwd = [] +dT_dt_rayleigh = [] +dT_dt_cgwd = [] +dT_dt_phys = [] +dT_dt_nonphys = [] dq_dt_PBL = [] dq_dt_deepconv = [] dq_dt_shalconv = [] dq_dt_micro = [] dq_dt_conv = [] +dq_dt_phys = [] +dq_dt_nonphys = [] +doz_dt_PBL = [] +doz_dt_prodloss = [] +doz_dt_oz = [] +doz_dt_T = [] +doz_dt_ovhd = [] +doz_dt_phys = [] +doz_dt_nonphys = [] du_dt_PBL = [] du_dt_OGWD = [] du_dt_deepconv = [] du_dt_CGWD = [] +du_dt_rayleigh = [] +du_dt_shalconv = [] +du_dt_conv = [] +du_dt_phys = [] +du_dt_nonphys = [] dv_dt_PBL = [] dv_dt_OGWD = [] dv_dt_deepconv = [] dv_dt_CGWD = [] +dv_dt_rayleigh = [] +dv_dt_shalconv = [] +dv_dt_conv = [] +dv_dt_phys = [] +dv_dt_nonphys = [] upd_mf = [] dwn_mf = [] det_mf = [] @@ -246,19 +270,36 @@ def print_progress(n_complete, n_total): dT_dt_shalconv.append(nc_fid.variables['dT_dt_shalconv'][:]*86400.0) dT_dt_micro.append(nc_fid.variables['dT_dt_micro'][:]*86400.0) dT_dt_conv.append(dT_dt_deepconv[-1] + dT_dt_shalconv[-1]) + dT_dt_ogwd.append(nc_fid.variables['dT_dt_ogwd'][:]*86400.0) + dT_dt_rayleigh.append(nc_fid.variables['dT_dt_rayleigh'][:]*86400.0) + dT_dt_cgwd.append(nc_fid.variables['dT_dt_cgwd'][:]*86400.0) + dT_dt_phys.append(nc_fid.variables['dT_dt_phys'][:]*86400.0) + dT_dt_nonphys.append(nc_fid.variables['dT_dt_nonphys'][:]*86400.0) dq_dt_PBL.append(nc_fid.variables['dq_dt_PBL'][:]*86400.0*1.0E3) dq_dt_deepconv.append(nc_fid.variables['dq_dt_deepconv'][:]*86400.0*1.0E3) dq_dt_shalconv.append(nc_fid.variables['dq_dt_shalconv'][:]*86400.0*1.0E3) dq_dt_micro.append(nc_fid.variables['dq_dt_micro'][:]*86400.0*1.0E3) dq_dt_conv.append(dq_dt_deepconv[-1] + dq_dt_shalconv[-1]) + dq_dt_phys.append(nc_fid.variables['dq_dt_phys'][:]*86400.0*1.0E3) + dq_dt_nonphys.append(nc_fid.variables['dq_dt_nonphys'][:]*86400.0*1.0E3) du_dt_PBL.append(nc_fid.variables['du_dt_PBL'][:]*86400.0) du_dt_OGWD.append(nc_fid.variables['du_dt_OGWD'][:]*86400.0) du_dt_deepconv.append(nc_fid.variables['du_dt_deepconv'][:]*86400.0) du_dt_CGWD.append(nc_fid.variables['du_dt_CGWD'][:]*86400.0) + du_dt_rayleigh.append(nc_fid.variables['du_dt_rayleigh'][:]*86400.0) + du_dt_shalconv.append(nc_fid.variables['du_dt_shalconv'][:]*86400.0) + du_dt_conv.append(du_dt_deepconv[-1] + du_dt_shalconv[-1]) + du_dt_phys.append(nc_fid.variables['du_dt_phys'][:]*86400.0) + du_dt_nonphys.append(nc_fid.variables['du_dt_nonphys'][:]*86400.0) dv_dt_PBL.append(nc_fid.variables['dv_dt_PBL'][:]*86400.0) dv_dt_OGWD.append(nc_fid.variables['dv_dt_OGWD'][:]*86400.0) dv_dt_deepconv.append(nc_fid.variables['dv_dt_deepconv'][:]*86400.0) dv_dt_CGWD.append(nc_fid.variables['dv_dt_CGWD'][:]*86400.0) + dv_dt_rayleigh.append(nc_fid.variables['dv_dt_rayleigh'][:]*86400.0) + dv_dt_shalconv.append(nc_fid.variables['dv_dt_shalconv'][:]*86400.0) + dv_dt_conv.append(dv_dt_deepconv[-1] + dv_dt_shalconv[-1]) + dv_dt_phys.append(nc_fid.variables['dv_dt_phys'][:]*86400.0) + dv_dt_nonphys.append(nc_fid.variables['dv_dt_nonphys'][:]*86400.0) upd_mf.append(nc_fid.variables['upd_mf'][:]) dwn_mf.append(nc_fid.variables['dwn_mf'][:]) det_mf.append(nc_fid.variables['det_mf'][:]) diff --git a/scm/etc/scripts/plot_configs/supported_suites.ini b/scm/etc/scripts/plot_configs/supported_suites.ini new file mode 100644 index 00000000..c424f091 --- /dev/null +++ b/scm/etc/scripts/plot_configs/supported_suites.ini @@ -0,0 +1,82 @@ +gmtb_scm_datasets = output_twpice_SCM_GFS_v15p2/output.nc, output_twpice_SCM_GFS_v16beta/output.nc, output_twpice_SCM_GSD_v1/output.nc, output_twpice_SCM_csawmg/output.nc +gmtb_scm_datasets_labels = GFSv15.2, GFSv16beta, GSDv1, csawmg +plot_dir = plots_supported_suites/ +obs_file = ../data/raw_case_input/twp180iopsndgvarana_v2.1_C3.c1.20060117.000000.cdf +obs_compare = True +plot_ind_datasets = False +time_series_resample = True + +[time_slices] + [[active]] + start = 2006, 1, 20, 0 + end = 2006, 1, 25, 12 + [[suppressed]] + start = 2006, 1, 28, 0 + end = 2006, 2, 2, 12 + +[time_snapshots] + +[plots] + [[profiles_mean]] + vars = qc, qv, T + vars_labels = 'qc', 'qv', 'T' + vert_axis = pres_l + vert_axis_label = 'p (Pa)' + y_inverted = True + y_log = False + y_min_option = min #min, max, val (if val, add y_min = float value) + y_max_option = max #min, max, val (if val, add y_max = float value) + + [[profiles_mean_multi]] + [[[T_tend]]] + vars = dT_dt_PBL, dT_dt_deepconv, dT_dt_shalconv, dT_dt_micro, dT_dt_lwrad, dT_dt_swrad, dT_dt_ogwd, dT_dt_rayleigh, dT_dt_cgwd + vars_labels = 'PBL', 'Deep Con', 'Shal Con', 'MP', 'LW', 'SW', 'OGWD', 'Rayleigh', 'CGWD' + x_label = 'K/day' + [[[T_forcing]]] + vars = T_force_tend, dT_dt_phys, dT_dt_nonphys + vars_labels = 'force', 'phys', 'nonphys' + x_label = 'K/day' + [[[q_tend]]] + vars = dq_dt_PBL, dq_dt_deepconv, dq_dt_shalconv, dq_dt_micro + vars_labels = 'PBL', 'Deep Con', 'Shal Con', 'MP' + x_label = 'g/kg/day' + [[[q_forcing]]] + vars = qv_force_tend, dq_dt_phys, dq_dt_nonphys + vars_labels = 'force', 'phys', 'nonphys' + x_label = 'g/kg/day' + [[[u_tend]]] + vars = du_dt_PBL, du_dt_deepconv, du_dt_shalconv, du_dt_OGWD, du_dt_CGWD, du_dt_rayleigh + vars_labels = 'PBL', 'Deep Con', 'Shal Con', 'OGWD', 'CGWD', 'Rayleigh' + x_label = 'm/s/day' + [[[u_forcing]]] + vars = u_force_tend, du_dt_phys, du_dt_nonphys + vars_labels = 'force', 'phys', 'nonphys' + x_label = 'm/s/day' + [[[v_tend]]] + vars = dv_dt_PBL, dv_dt_deepconv, dv_dt_shalconv, dv_dt_OGWD, dv_dt_CGWD, dv_dt_rayleigh + vars_labels = 'PBL', 'Deep Con', 'Shal Con', 'OGWD', 'CGWD', 'Rayleigh' + x_label = 'm/s/day' + [[[v_forcing]]] + vars = v_force_tend, dv_dt_phys, dv_dt_nonphys + vars_labels = 'force', 'phys', 'nonphys' + x_label = 'm/s/day' + + [[profiles_instant]] + + [[time_series]] + vars = 'pres_s','lhf','shf' + vars_labels = 'surface pressure','lhf','shf' + + [[contours]] + vars = qv, + vars_labels = 'qv', + vert_axis = pres_l + vert_axis_label = 'p (Pa)' + y_inverted = True + y_log = False + y_min_option = val #min, max, val (if val, add y_min = float value) + y_min = 10000.0 + y_max_option = val #min, max, val (if val, add y_max = float value) + y_max = 100000.0 + x_ticks_num = 10 + y_ticks_num = 10 diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index 0a9698e2..1b7745a2 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -2,45 +2,39 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(scm) set(PROJECT "CCPP-SCM") -# The only option to build is the static build -set(STATIC TRUE) - #################################################################### # Begin CCPP prebuild step # #################################################################### -if(STATIC) - # Start with empty list of suites - message (STATUS "Generating list of suites to compile for static CCPP") - set(SUITES "") - # Get list of all suite definition files (with full path) - file(GLOB SUITE_DEFINITION_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/../../ccpp/suites/suite_*.xml" - ) - # Extract file name and suite name and append to SUITES - foreach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) - get_filename_component(suite_definition_filename ${suite_definition_filepath} NAME) - string(REGEX REPLACE "^suite_(.+)\\.xml$" "\\1" suite_name ${suite_definition_filename}) - set(SUITES ${SUITES}${suite_name},) - message (STATUS " adding suite ${suite_name}") - endforeach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) - # Abort if no suites found - if ("${SUITES}" STREQUAL "") - message(FATAL_ERROR "No suites found to compile for static CCPP") - endif("${SUITES}" STREQUAL "") - # Remove trailing comma from list of suites - string(REGEX REPLACE "(.+),$" "\\1" SUITES ${SUITES}) - # Run CCPP prebuild.py - message (STATUS "Running ccpp_prebuild.py for static CCPP") - execute_process( - COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --static --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}/.. - OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out - ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../.. - RESULT_VARIABLE return_code - ) -else(STATIC) - message(FATAL_ERROR "Dynamic CCPP build no longer supported") -endif(STATIC) +# Start with empty list of suites +message (STATUS "Generating list of suites to compile for CCPP") +set(SUITES "") +# Get list of all suite definition files (with full path) +file(GLOB SUITE_DEFINITION_FILES + "${CMAKE_CURRENT_SOURCE_DIR}/../../ccpp/suites/suite_*.xml" +) +# Extract file name and suite name and append to SUITES +foreach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) + get_filename_component(suite_definition_filename ${suite_definition_filepath} NAME) + string(REGEX REPLACE "^suite_(.+)\\.xml$" "\\1" suite_name ${suite_definition_filename}) + set(SUITES ${SUITES}${suite_name},) + message (STATUS " adding suite ${suite_name}") +endforeach(suite_definition_filepath IN LISTS SUITE_DEFINITION_FILES) +# Abort if no suites found +if ("${SUITES}" STREQUAL "") + message(FATAL_ERROR "No suites found to compile for CCPP") +endif("${SUITES}" STREQUAL "") +# Remove trailing comma from list of suites +string(REGEX REPLACE "(.+),$" "\\1" SUITES ${SUITES}) +# Run CCPP prebuild.py +message (STATUS "Running ccpp_prebuild.py for CCPP") +execute_process( + COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py --suites=${SUITES} --builddir=${CMAKE_CURRENT_BINARY_DIR}/.. + OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out + ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../.. + RESULT_VARIABLE return_code +) + # Check return code from CCPP prebuild.py if(return_code EQUAL 0) message (STATUS "CCPP prebuild step completed successfully") @@ -88,10 +82,6 @@ ELSE(DEFINED ENV{W3NCO_LIBd}) MESSAGE(FATAL_ERROR "The W3NCO_LIBd environment variable must be set to point to your W3NCO installation (part of NCEPLIBS) before building. Stopping...") ENDIF(DEFINED ENV{W3NCO_LIBd}) -if(STATIC) - ADD_DEFINITIONS(-DSTATIC) -endif(STATIC) - SET(CCPP_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework) SET(GFSPHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics) @@ -299,13 +289,9 @@ SET(scm_source_files gmtb_scm.F90 gmtb_scm_output.F90 ) -if(STATIC) - ADD_EXECUTABLE(gmtb_scm ${scm_source_files} ccpp_static_api.F90) - TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp ${BACIO_LIB4} ${SP_LIBd} ${W3NCO_LIBd}) -else(STATIC) - ADD_EXECUTABLE(gmtb_scm ${scm_source_files}) - TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp) -endif(STATIC) +ADD_EXECUTABLE(gmtb_scm ${scm_source_files} ccpp_static_api.F90) +TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp ${BACIO_LIB4} ${SP_LIBd} ${W3NCO_LIBd}) + set_target_properties(gmtb_scm PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS}" diff --git a/scm/src/gmtb_scm.F90 b/scm/src/gmtb_scm.F90 index 35c57c05..ca7fec7f 100644 --- a/scm/src/gmtb_scm.F90 +++ b/scm/src/gmtb_scm.F90 @@ -62,7 +62,7 @@ subroutine gmtb_scm_main_sub() stop end select - allocate(cdata_cols(scm_state%n_cols)) + !allocate(cdata_cols(scm_state%n_cols)) call set_state(scm_input, scm_reference, scm_state) @@ -73,8 +73,6 @@ subroutine gmtb_scm_main_sub() call interpolate_forcing(scm_input, scm_state) - call output_init(scm_state) - scm_state%itt_out = 1 call physics%create(scm_state%n_cols) @@ -92,66 +90,68 @@ subroutine gmtb_scm_main_sub() case default cdata_time_index = 2 end select + + !open a logfile + if (physics%Init_parm%me == physics%Init_parm%master .and. physics%Init_parm%logunit>=0) then + write (logfile_name, '(A7,I0.5,A4)') 'logfile.out' + open(unit=physics%Init_parm%logunit, file=trim(scm_state%output_dir)//'/'//logfile_name, action='write', status='replace') + end if + + physics%Init_parm%levs = scm_state%n_levels + physics%Init_parm%bdat(1) = scm_state%init_year + physics%Init_parm%bdat(2) = scm_state%init_month + physics%Init_parm%bdat(3) = scm_state%init_day + physics%Init_parm%bdat(5) = scm_state%init_hour + physics%Init_parm%cdat(:) = physics%Init_parm%bdat + physics%Init_parm%dt_dycore = scm_state%dt + physics%Init_parm%dt_phys = scm_state%dt + physics%Init_parm%ak => scm_state%a_k + physics%Init_parm%bk => scm_state%b_k + !physics%Init_parm%xlon => scm_state%lon !rank mismatch -> why does Init_parm%xlon have 2 dimensions? + !physics%Init_parm%xlat => scm_state%lat !rank mismatch -> why does Init_parm%xlat have 2 dimensions? + !physics%Init_parm%area => scm_state%area !rank mismatch -> why does Init_parm%area have 2 dimensions? + physics%Init_parm%tracer_names => scm_state%tracer_names + physics%Init_parm%fn_nml = scm_state%physics_nml + physics%Init_parm%blksz => scm_state%blksz + physics%Init_parm%tile_num = 1 + physics%Init_parm%hydrostatic = .true. + physics%Init_parm%restart = .false. + + ! Allocate and initialize DDTs + call GFS_suite_setup(physics%Model, physics%Statein, physics%Stateout, & + physics%Sfcprop, physics%Coupling, physics%Grid, & + physics%Tbd, physics%Cldprop, physics%Radtend, & + physics%Diag, physics%Interstitial, 0, 1, 1, & + physics%Init_parm, scm_state%n_cols, scm_state%lon, & + scm_state%lat, scm_state%area) + + cdata%blk_no = 1 + cdata%thrd_no = 1 + + call physics%associate(scm_state) + + ! When asked to calculate 3-dim. tendencies, set Stateout variables to + ! Statein variables here in order to capture the first call to dycore + if (physics%Model%ldiag3d) then + physics%Stateout%gu0 = physics%Statein%ugrs + physics%Stateout%gv0 = physics%Statein%vgrs + physics%Stateout%gt0 = physics%Statein%tgrs + physics%Stateout%gq0 = physics%Statein%qgrs + endif + + !initialize the column's physics - do i = 1, scm_state%n_cols - !set up each column's physics suite (which may be different) - ! call ccpp_init(trim(adjustl(scm_state%physics_suite_name(i))), cdata_cols(i), ierr) - ! if (ierr/=0) then - ! write(*,'(a,i0,a)') 'An error occurred in ccpp_init for column ', i, '. Exiting...' - ! stop - ! end if - - !open a logfile for each column - if (physics%Init_parm(i)%me == physics%Init_parm(i)%master .and. physics%Init_parm(i)%logunit>=0) then - write (logfile_name, '(A7,I0.5,A4)') 'logfile', i, '.out' - open(unit=physics%Init_parm(i)%logunit, file=trim(scm_state%output_dir)//'/'//logfile_name, action='write', status='replace') - end if - - cdata_cols(i)%blk_no = i - cdata_cols(i)%thrd_no = 1 - - physics%Init_parm(i)%levs = scm_state%n_levels - physics%Init_parm(i)%bdat(1) = scm_state%init_year - physics%Init_parm(i)%bdat(2) = scm_state%init_month - physics%Init_parm(i)%bdat(3) = scm_state%init_day - physics%Init_parm(i)%bdat(5) = scm_state%init_hour - physics%Init_parm(i)%cdat(:) = physics%Init_parm(i)%bdat - physics%Init_parm(i)%dt_dycore = scm_state%dt - physics%Init_parm(i)%dt_phys = scm_state%dt - physics%Init_parm(i)%ak => scm_state%a_k(1,:) - physics%Init_parm(i)%bk => scm_state%b_k(1,:) - physics%Init_parm(i)%xlon => scm_state%lon - physics%Init_parm(i)%xlat => scm_state%lat - physics%Init_parm(i)%area => scm_state%area - physics%Init_parm(i)%tracer_names => scm_state%tracer_names - physics%Init_parm(i)%fn_nml = scm_state%physics_nml(1) - physics%Init_parm(i)%blksz => scm_state%blksz - physics%Init_parm(i)%tile_num = 1 - physics%Init_parm(i)%hydrostatic = .true. - physics%Init_parm(i)%restart = .false. - - ! Allocate and initialize DDTs - call GFS_suite_setup(physics%Model(i), physics%Statein(i), physics%Stateout(i), & - physics%Sfcprop(i), physics%Coupling(i), physics%Grid(i), & - physics%Tbd(i), physics%Cldprop(i), physics%Radtend(i), & - physics%Diag(i), physics%Interstitial(i), 0, 1, 1, & - physics%Init_parm(i)) - - call physics%associate(scm_state, i) - - !initialize each column's physics - - write(0,'(a,i0,a)') "Calling ccpp_physics_init for column ", i, " with suite '" // trim(trim(adjustl(scm_state%physics_suite_name(i)))) // "'" - call ccpp_physics_init(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) - write(0,'(a,i0,a,i0)') "Called ccpp_physics_init for column ", i, " with suite '" // trim(trim(adjustl(scm_state%physics_suite_name(i)))) // "', ierr=", ierr - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_init for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' - stop - end if - - physics%Model(i)%first_time_step = .true. - end do + write(0,'(a,i0,a)') "Calling ccpp_physics_init with suite '" // trim(trim(adjustl(scm_state%physics_suite_name))) // "'" + call ccpp_physics_init(cdata, suite_name=trim(trim(adjustl(scm_state%physics_suite_name))), ierr=ierr) + write(0,'(a,i0,a,i0)') "Called ccpp_physics_init with suite '" // trim(trim(adjustl(scm_state%physics_suite_name))) // "', ierr=", ierr + if (ierr/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_init: ' // trim(cdata%errmsg) // '. Exiting...' + stop + end if + + physics%Model%first_time_step = .true. + call output_init(scm_state, physics) call output_append(scm_state, physics) !first time step (call once) @@ -165,7 +165,7 @@ subroutine gmtb_scm_main_sub() if (.not. scm_state%model_ics) call calc_pres_exner_geopotential(1, scm_state) !pass in state variables to be modified by forcing and physics - call do_time_step(scm_state, cdata_cols) + call do_time_step(scm_state, physics, cdata) else if (scm_state%time_scheme == 2) then ! !if using the leapfrog scheme, we initialize by taking one half forward time step and one half (unfiltered) leapfrog time step to get to the end of the first time step @@ -173,10 +173,10 @@ subroutine gmtb_scm_main_sub() scm_state%model_time = scm_state%dt_now !save initial state - scm_state%temp_tracer(:,:,:,:,1) = scm_state%state_tracer(:,:,:,:,1) - scm_state%temp_T(:,:,:,1) = scm_state%state_T(:,:,:,1) - scm_state%temp_u(:,:,:,1) = scm_state%state_u(:,:,:,1) - scm_state%temp_v(:,:,:,1) = scm_state%state_v(:,:,:,1) + scm_state%temp_tracer(:,:,:,1) = scm_state%state_tracer(:,:,:,1) + scm_state%temp_T(:,:,1) = scm_state%state_T(:,:,1) + scm_state%temp_u(:,:,1) = scm_state%state_u(:,:,1) + scm_state%temp_v(:,:,1) = scm_state%state_v(:,:,1) call interpolate_forcing(scm_input, scm_state) @@ -185,24 +185,42 @@ subroutine gmtb_scm_main_sub() call apply_forcing_forward_Euler(scm_state) !apply_forcing_forward_Euler updates state variables time level 1, so must copy this data to time_level 2 (where cdata points) - scm_state%state_T(:,:,:,2) = scm_state%state_T(:,:,:,1) - scm_state%state_tracer(:,:,:,:,2) = scm_state%state_tracer(:,:,:,:,1) - scm_state%state_u(:,:,:,2) = scm_state%state_u(:,:,:,1) - scm_state%state_v(:,:,:,2) = scm_state%state_v(:,:,:,1) - + scm_state%state_T(:,:,2) = scm_state%state_T(:,:,1) + scm_state%state_tracer(:,:,:,2) = scm_state%state_tracer(:,:,:,1) + scm_state%state_u(:,:,2) = scm_state%state_u(:,:,1) + scm_state%state_v(:,:,2) = scm_state%state_v(:,:,1) + + ! Calculate total non-physics tendencies by substracting old Stateout + ! variables from new/updated Statein variables (gives the tendencies + ! due to anything else than physics) do i=1, scm_state%n_cols - call ccpp_physics_run(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' - stop - end if + if (physics%Model%ldiag3d) then + physics%Diag%du3dt(i,:,8) = physics%Diag%du3dt(i,:,8) & + + (physics%Statein%ugrs(i,:) - physics%Stateout%gu0(i,:)) + physics%Diag%dv3dt(i,:,8) = physics%Diag%dv3dt(i,:,8) & + + (physics%Statein%vgrs(i,:) - physics%Stateout%gv0(i,:)) + physics%Diag%dt3dt(i,:,11) = physics%Diag%dt3dt(i,:,11) & + + (physics%Statein%tgrs(i,:) - physics%Stateout%gt0(i,:)) + if (physics%Model%qdiag3d) then + physics%Diag%dq3dt(i,:,12) = physics%Diag%dq3dt(i,:,12) & + + (physics%Statein%qgrs(i,:,physics%Model%ntqv) - physics%Stateout%gq0(i,:,physics%Model%ntqv)) + physics%Diag%dq3dt(i,:,13) = physics%Diag%dq3dt(i,:,13) & + + (physics%Statein%qgrs(i,:,physics%Model%ntoz) - physics%Stateout%gq0(i,:,physics%Model%ntoz)) + endif + endif end do + + call ccpp_physics_run(cdata, suite_name=trim(trim(adjustl(scm_state%physics_suite_name))), ierr=ierr) + if (ierr/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(cdata%errmsg) // '. Exiting...' + stop + end if !the filter routine (called after the following leapfrog time step) expects time level 2 in temp_tracer to be the updated, unfiltered state after the previous time step - scm_state%temp_tracer(:,:,:,:,2) = scm_state%state_tracer(:,:,:,:,2) - scm_state%temp_T(:,:,:,2) = scm_state%state_T(:,:,:,2) - scm_state%temp_u(:,:,:,2) = scm_state%state_u(:,:,:,2) - scm_state%temp_v(:,:,:,2) = scm_state%state_v(:,:,:,2) + scm_state%temp_tracer(:,:,:,2) = scm_state%state_tracer(:,:,:,2) + scm_state%temp_T(:,:,2) = scm_state%state_T(:,:,2) + scm_state%temp_u(:,:,2) = scm_state%state_u(:,:,2) + scm_state%temp_v(:,:,2) = scm_state%state_v(:,:,2) !do half a leapfrog time step to get to the end of one full time step scm_state%model_time = scm_state%dt @@ -211,20 +229,20 @@ subroutine gmtb_scm_main_sub() call calc_pres_exner_geopotential(1, scm_state) !calling do_time_step with the leapfrog scheme active expects state variables in time level 1 to have values from 2 time steps ago, so set them equal to the initial values - scm_state%state_T(:,:,:,1) = scm_state%temp_T(:,:,:,1) - scm_state%state_u(:,:,:,1) = scm_state%temp_u(:,:,:,1) - scm_state%state_v(:,:,:,1) = scm_state%temp_v(:,:,:,1) - scm_state%state_tracer(:,:,:,:,1) = scm_state%temp_tracer(:,:,:,:,1) + scm_state%state_T(:,:,1) = scm_state%temp_T(:,:,1) + scm_state%state_u(:,:,1) = scm_state%temp_u(:,:,1) + scm_state%state_v(:,:,1) = scm_state%temp_v(:,:,1) + scm_state%state_tracer(:,:,:,1) = scm_state%temp_tracer(:,:,:,1) !go forward one leapfrog time step - call do_time_step(scm_state, cdata_cols) + call do_time_step(scm_state, physics, cdata) !for filtered-leapfrog scheme, call the filtering routine to calculate values of the state variables to save in slot 1 using slot 2 vars (updated, unfiltered) output from the physics call filter(scm_state) !> \todo tracers besides water vapor do not need to be filtered (is this right?) - scm_state%state_tracer(:,:,:,scm_state%cloud_water_index,1) = scm_state%state_tracer(:,:,:,scm_state%cloud_water_index,2) - scm_state%state_tracer(:,:,:,scm_state%ozone_index,1) = scm_state%state_tracer(:,:,:,scm_state%ozone_index,2) + scm_state%state_tracer(:,:,scm_state%cloud_water_index,1) = scm_state%state_tracer(:,:,scm_state%cloud_water_index,2) + scm_state%state_tracer(:,:,scm_state%ozone_index,1) = scm_state%state_tracer(:,:,scm_state%ozone_index,2) end if scm_state%itt_out = scm_state%itt_out + 1 @@ -235,10 +253,8 @@ subroutine gmtb_scm_main_sub() scm_state%n_itt_out = floor(scm_state%output_frequency/scm_state%dt) scm_state%dt_now = scm_state%dt - - do i=1, scm_state%n_cols - physics%Model(i)%first_time_step = .false. - end do + + physics%Model%first_time_step = .false. do i = 2, scm_state%n_timesteps scm_state%itt = i @@ -248,10 +264,8 @@ subroutine gmtb_scm_main_sub() rinc = 0 rinc(4) = (scm_state%itt-1)*scm_state%dt !w3movdat is a GFS routine to calculate the current date (jdat) from an elapsed time and an initial date (rinc is single prec.) - call w3movdat(rinc, physics%Model(1)%idat, jdat) - do j=1, scm_state%n_cols - physics%Model(j)%jdat = jdat - end do + call w3movdat(rinc, physics%Model%idat, jdat) + physics%Model%jdat = jdat !> - Save previously unfiltered state as temporary for use in the time filter. if(scm_state%time_scheme == 2) then @@ -266,21 +280,19 @@ subroutine gmtb_scm_main_sub() call calc_pres_exner_geopotential(1, scm_state) !zero out diagnostics output on EVERY time step - breaks diagnostics averaged over many timesteps - do j=1, scm_state%n_cols - call physics%Diag(j)%rad_zero(physics%Model(j)) - call physics%Diag(j)%phys_zero(physics%Model(j)) - end do + call physics%Diag%rad_zero(physics%Model) + call physics%Diag%phys_zero(physics%Model) !pass in state variables to be modified by forcing and physics - call do_time_step(scm_state, cdata_cols) + call do_time_step(scm_state, physics, cdata) if (scm_state%time_scheme == 2) then !for filtered-leapfrog scheme, call the filtering routine to calculate values of the state variables to save in slot 1 using slot 2 vars (updated, unfiltered) output from the physics call filter(scm_state) !> \todo tracers besides water vapor do not need to be filtered (is this right?) - scm_state%state_tracer(:,:,:,scm_state%cloud_water_index,1) = scm_state%state_tracer(:,:,:,scm_state%cloud_water_index,2) - scm_state%state_tracer(:,:,:,scm_state%ozone_index,1) = scm_state%state_tracer(:,:,:,scm_state%ozone_index,2) + scm_state%state_tracer(:,:,scm_state%cloud_water_index,1) = scm_state%state_tracer(:,:,scm_state%cloud_water_index,2) + scm_state%state_tracer(:,:,scm_state%ozone_index,1) = scm_state%state_tracer(:,:,scm_state%ozone_index,2) end if if(mod(scm_state%itt, scm_state%n_itt_out)==0) then @@ -294,14 +306,12 @@ subroutine gmtb_scm_main_sub() end if end do - do i=1, scm_state%n_cols - call ccpp_physics_finalize(cdata_cols(i), suite_name=trim(trim(adjustl(scm_state%physics_suite_name(i)))), ierr=ierr) + call ccpp_physics_finalize(cdata, suite_name=trim(trim(adjustl(scm_state%physics_suite_name))), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_finalize for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' - stop - end if - end do + if (ierr/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_finalize: ' // trim(cdata%errmsg) // '. Exiting...' + stop + end if end subroutine gmtb_scm_main_sub diff --git a/scm/src/gmtb_scm_forcing.F90 b/scm/src/gmtb_scm_forcing.F90 index c92d30dd..e423ef07 100644 --- a/scm/src/gmtb_scm_forcing.F90 +++ b/scm/src/gmtb_scm_forcing.F90 @@ -48,44 +48,44 @@ subroutine interpolate_forcing(scm_input, scm_state) !> - For all forcing terms, call interpolate_to_grid_centers from \ref utils for each variable. This subroutine returns the last vertical index calculated in case forcing terms above the case input needs to be specified. do i=1, scm_state%n_cols call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_w_ls(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_w_ls(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & w_ls_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_omega(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_omega(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & omega_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_u_g(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, u_g_bracket(1,:), top_index, 1) + scm_input%input_u_g(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, u_g_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_v_g(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, v_g_bracket(1,:), top_index, 1) + scm_input%input_v_g(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, v_g_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_u_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_u_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & u_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_v_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_v_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & v_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_T_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_T_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & T_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_thil_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_thil_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & thil_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_qt_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_qt_nudge(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & qt_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_dT_dt_rad(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_dT_dt_rad(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & dT_dt_rad_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_h_advec_thetail(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_h_advec_thetail(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & h_advec_thil_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_h_advec_qt(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_h_advec_qt(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & h_advec_qt_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_v_advec_thetail(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_v_advec_thetail(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & v_advec_thil_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_v_advec_qt(scm_input%input_ntimes,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_v_advec_qt(scm_input%input_ntimes,:), scm_state%pres_l(i,:), scm_state%n_levels, & v_advec_qt_bracket(1,:), top_index, 3) !> - If the input forcing file does not reach to the model domain top, fill in values above the input forcing file domain with those from the top level. @@ -108,7 +108,7 @@ subroutine interpolate_forcing(scm_input, scm_state) !> - For this case, no time interpolation is necessary; just set the forcing terms to the vertically-interpolated values. scm_state%w_ls(i,:) = w_ls_bracket(1,:) - scm_state%omega(i,1,:) = omega_bracket(1,:) + scm_state%omega(i,:) = omega_bracket(1,:) scm_state%u_g(i,:) = u_g_bracket(1,:) scm_state%v_g(i,:) = v_g_bracket(1,:) scm_state%u_nudge(i,:) = u_nudge_bracket(1,:) @@ -123,8 +123,8 @@ subroutine interpolate_forcing(scm_input, scm_state) scm_state%v_advec_qt(i,:) = v_advec_qt_bracket(1,:) !> - Set the surface parameters to the last available data. - scm_state%pres_surf(i,1) = scm_input%input_pres_surf(scm_input%input_ntimes) - scm_state%T_surf(i,1) = scm_input%input_T_surf(scm_input%input_ntimes) + scm_state%pres_surf(i) = scm_input%input_pres_surf(scm_input%input_ntimes) + scm_state%T_surf(i) = scm_input%input_T_surf(scm_input%input_ntimes) scm_state%sh_flux(i) = scm_input%input_sh_flux_sfc(scm_input%input_ntimes) scm_state%lh_flux(i) = scm_input%input_lh_flux_sfc(scm_input%input_ntimes) end do @@ -146,63 +146,63 @@ subroutine interpolate_forcing(scm_input, scm_state) !> the current model time. This subroutine returns the last vertical index calculated in case forcing terms above the case input needs !> to be specified. call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_w_ls(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, w_ls_bracket(1,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, w_ls_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_w_ls(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, w_ls_bracket(2,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, w_ls_bracket(2,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_omega(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, omega_bracket(1,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, omega_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_omega(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, omega_bracket(2,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, omega_bracket(2,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_u_g(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, u_g_bracket(1,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, u_g_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_u_g(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, u_g_bracket(2,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, u_g_bracket(2,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v_g(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, v_g_bracket(1,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, v_g_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v_g(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, v_g_bracket(2,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, v_g_bracket(2,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_u_nudge(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, u_nudge_bracket(1,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, u_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_u_nudge(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, u_nudge_bracket(2,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, u_nudge_bracket(2,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v_nudge(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, v_nudge_bracket(1,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, v_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v_nudge(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, v_nudge_bracket(2,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, v_nudge_bracket(2,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_T_nudge(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, T_nudge_bracket(1,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, T_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_T_nudge(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, T_nudge_bracket(2,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, T_nudge_bracket(2,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_thil_nudge(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, thil_nudge_bracket(1,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, thil_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_thil_nudge(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, thil_nudge_bracket(2,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, thil_nudge_bracket(2,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_qt_nudge(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, qt_nudge_bracket(1,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, qt_nudge_bracket(1,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_qt_nudge(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, qt_nudge_bracket(2,:), top_index, 1) + scm_state%pres_l(i,:), scm_state%n_levels, qt_nudge_bracket(2,:), top_index, 1) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_dT_dt_rad(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, dT_dt_rad_bracket(1,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, dT_dt_rad_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_dT_dt_rad(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, dT_dt_rad_bracket(2,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, dT_dt_rad_bracket(2,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_h_advec_thetail(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, h_advec_thil_bracket(1,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, h_advec_thil_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_h_advec_thetail(low_t_index+1,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_h_advec_thetail(low_t_index+1,:), scm_state%pres_l(i,:), scm_state%n_levels, & h_advec_thil_bracket(2,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_h_advec_qt(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, h_advec_qt_bracket(1,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, h_advec_qt_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_h_advec_qt(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, h_advec_qt_bracket(2,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, h_advec_qt_bracket(2,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v_advec_thetail(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, v_advec_thil_bracket(1,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, v_advec_thil_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, & - scm_input%input_v_advec_thetail(low_t_index+1,:), scm_state%pres_l(i,1,:), scm_state%n_levels, & + scm_input%input_v_advec_thetail(low_t_index+1,:), scm_state%pres_l(i,:), scm_state%n_levels, & v_advec_thil_bracket(2,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v_advec_qt(low_t_index,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, v_advec_qt_bracket(1,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, v_advec_qt_bracket(1,:), top_index, 3) call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v_advec_qt(low_t_index+1,:), & - scm_state%pres_l(i,1,:), scm_state%n_levels, v_advec_qt_bracket(2,:), top_index, 3) + scm_state%pres_l(i,:), scm_state%n_levels, v_advec_qt_bracket(2,:), top_index, 3) !> - If the input forcing file does not reach to the model domain top, fill in values above the input forcing file domain with those from the top level. if (top_index < scm_state%n_levels) then @@ -238,7 +238,7 @@ subroutine interpolate_forcing(scm_input, scm_state) !> - Interpolate the forcing terms in time. scm_state%w_ls(i,:) = (1.0 - lifrac)*w_ls_bracket(1,:) + lifrac*w_ls_bracket(2,:) - scm_state%omega(i,1,:) = (1.0 - lifrac)*omega_bracket(1,:) + lifrac*omega_bracket(2,:) + scm_state%omega(i,:) = (1.0 - lifrac)*omega_bracket(1,:) + lifrac*omega_bracket(2,:) scm_state%u_g(i,:) = (1.0 - lifrac)*u_g_bracket(1,:) + lifrac*u_g_bracket(2,:) scm_state%v_g(i,:) = (1.0 - lifrac)*v_g_bracket(1,:) + lifrac*v_g_bracket(2,:) scm_state%u_nudge(i,:) = (1.0 - lifrac)*u_nudge_bracket(1,:) + lifrac*u_nudge_bracket(2,:) @@ -253,9 +253,9 @@ subroutine interpolate_forcing(scm_input, scm_state) scm_state%v_advec_qt(i,:) = (1.0 - lifrac)*v_advec_qt_bracket(1,:) + lifrac*v_advec_qt_bracket(2,:) !> - Interpolate the surface parameters in time. - scm_state%pres_surf(i,1) = (1.0 - lifrac)*scm_input%input_pres_surf(low_t_index) + & + scm_state%pres_surf(i) = (1.0 - lifrac)*scm_input%input_pres_surf(low_t_index) + & lifrac*scm_input%input_pres_surf(low_t_index+1) - scm_state%T_surf(i,1) = (1.0 - lifrac)*scm_input%input_T_surf(low_t_index) + lifrac*scm_input%input_T_surf(low_t_index+1) + scm_state%T_surf(i) = (1.0 - lifrac)*scm_input%input_T_surf(low_t_index) + lifrac*scm_input%input_T_surf(low_t_index+1) scm_state%sh_flux(i) = (1.0 - lifrac)*scm_input%input_sh_flux_sfc(low_t_index) + & lifrac*scm_input%input_sh_flux_sfc(low_t_index+1) scm_state%lh_flux(i) = (1.0 - lifrac)*scm_input%input_lh_flux_sfc(low_t_index) + & @@ -290,12 +290,12 @@ subroutine apply_forcing_leapfrog(scm_state) g_over_cp = con_g/con_cp !> - Save old state variables (filtered from previous time step) - old_u = scm_state%state_u(:,1,:,1) - old_v = scm_state%state_v(:,1,:,1) - old_T = scm_state%state_T(:,1,:,1) - old_qv = scm_state%state_tracer(:,1,:,scm_state%water_vapor_index,1) + old_u = scm_state%state_u(:,:,1) + old_v = scm_state%state_v(:,:,1) + old_T = scm_state%state_T(:,:,1) + old_qv = scm_state%state_tracer(:,:,scm_state%water_vapor_index,1) - theta = old_T/scm_state%exner_l(:,1,:) + theta = old_T/scm_state%exner_l(:,:) !> - Initialize forcing sums to zero. scm_state%u_force_tend = 0.0 @@ -307,13 +307,13 @@ subroutine apply_forcing_leapfrog(scm_state) !> - Calculate w_ls and z (height) at model layer interfaces. do i=1, scm_state%n_cols w_ls_i(i,1) = 0.0 - zi(i,1) = scm_state%geopotential_i(i,1,1)*grav_inv + zi(i,1) = scm_state%geopotential_i(i,1)*grav_inv do k=2, scm_state%n_levels w_ls_i(i,k) = 0.5*(scm_state%w_ls(i,k-1) + scm_state%w_ls(i,k)) - zi(i,k) = scm_state%geopotential_i(i,1,k)*grav_inv + zi(i,k) = scm_state%geopotential_i(i,k)*grav_inv end do w_ls_i(i,scm_state%n_levels+1) = w_ls_i(i,scm_state%n_levels) - zi(i,scm_state%n_levels+1) = scm_state%geopotential_i(i,1,scm_state%n_levels+1)*grav_inv + zi(i,scm_state%n_levels+1) = scm_state%geopotential_i(i,scm_state%n_levels+1)*grav_inv end do !end if @@ -346,7 +346,7 @@ subroutine apply_forcing_leapfrog(scm_state) !> - Add forcing due to geostrophic wind !> - Calculate Coriolis parameter. - f_coriolis = 2.0*con_omega*sin(scm_state%lat(i,1)) + f_coriolis = 2.0*con_omega*sin(scm_state%lat(i)) do k=1, scm_state%n_levels !accumulate forcing tendencies scm_state%u_force_tend(i,k) = scm_state%u_force_tend(i,k) + f_coriolis*(old_v(i,k) - scm_state%v_g(i,k)) @@ -373,7 +373,7 @@ subroutine apply_forcing_leapfrog(scm_state) !> - Add forcing due to prescribed radiation and horizontal advection do k=1, scm_state%n_levels scm_state%T_force_tend(i,k) = scm_state%T_force_tend(i,k) + scm_state%dT_dt_rad(i,k) + & - scm_state%exner_l(i,1,k)*(scm_state%h_advec_thil(i,k) +scm_state%v_advec_thil(i,k)) + scm_state%exner_l(i,k)*(scm_state%h_advec_thil(i,k) +scm_state%v_advec_thil(i,k)) scm_state%qv_force_tend(i,k) = scm_state%qv_force_tend(i,k) + scm_state%h_advec_qt(i,k) + scm_state%v_advec_qt(i,k) end do end do @@ -381,21 +381,21 @@ subroutine apply_forcing_leapfrog(scm_state) do i=1, scm_state%n_cols do k=2, scm_state%n_levels-1 !upstream scheme (for boundaries, assume vertical derivatives are 0 => no vertical advection) - omega_plus = MAX(scm_state%omega(i,1,k), 0.0) - omega_minus = MIN(scm_state%omega(i,1,k), 0.0) - dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) - dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) + omega_plus = MAX(scm_state%omega(i,k), 0.0) + omega_minus = MIN(scm_state%omega(i,k), 0.0) + dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) + dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) scm_state%qv_force_tend(i,k) = -omega_plus*dqv_dp_minus - omega_minus*dqv_dp_plus - scm_state%T_force_tend(i,k) = scm_state%exner_l(i,1,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) + scm_state%T_force_tend(i,k) = scm_state%exner_l(i,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) end do !> - Add forcing due to prescribed radiation and horizontal advection do k=1, scm_state%n_levels scm_state%T_force_tend(i,k) = scm_state%T_force_tend(i,k) + scm_state%dT_dt_rad(i,k) + & - scm_state%exner_l(i,1,k)*scm_state%h_advec_thil(i,k) + scm_state%exner_l(i,k)*scm_state%h_advec_thil(i,k) scm_state%qv_force_tend(i,k) = scm_state%qv_force_tend(i,k) + scm_state%h_advec_qt(i,k) end do end do @@ -410,15 +410,15 @@ subroutine apply_forcing_leapfrog(scm_state) do k=2, scm_state%n_levels-1 !upstream scheme (for boundaries, assume vertical derivatives are 0 => no vertical advection) - omega_plus = MAX(scm_state%omega(i,1,k), 0.0) - omega_minus = MIN(scm_state%omega(i,1,k), 0.0) - dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) - dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) + omega_plus = MAX(scm_state%omega(i,k), 0.0) + omega_minus = MIN(scm_state%omega(i,k), 0.0) + dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) + dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) scm_state%qv_force_tend(i,k) = scm_state%qv_force_tend(i,k) -omega_plus*dqv_dp_minus - omega_minus*dqv_dp_plus scm_state%T_force_tend(i,k) = scm_state%T_force_tend(i,k) + & - scm_state%exner_l(i,1,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) + scm_state%exner_l(i,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) end do @@ -435,10 +435,10 @@ subroutine apply_forcing_leapfrog(scm_state) !! x^{\tau + 1} = \overline{x^{\tau - 1}} + 2\Delta t\frac{\partial x}{\partial t}|^\tau_{forcing} !! \f] !! \f$\overline{x^{\tau - 1}}\f$ is the filtered value at the previous time step and \f$\frac{\partial x}{\partial t}|^\tau_{forcing}\f$ is the sum of forcing terms calculated in this time step. - scm_state%state_u(i,1,k,1) = old_u(i,k) + 2.0*scm_state%dt*scm_state%u_force_tend(i,k) - scm_state%state_v(i,1,k,1) = old_v(i,k) + 2.0*scm_state%dt*scm_state%v_force_tend(i,k) - scm_state%state_T(i,1,k,1) = scm_state%state_T(i,1,k,1) + 2.0*scm_state%dt*(scm_state%T_force_tend(i,k)) - scm_state%state_tracer(i,1,k,scm_state%water_vapor_index,1) = scm_state%state_tracer(i,1,k,scm_state%water_vapor_index,1) + & + scm_state%state_u(i,k,1) = old_u(i,k) + 2.0*scm_state%dt*scm_state%u_force_tend(i,k) + scm_state%state_v(i,k,1) = old_v(i,k) + 2.0*scm_state%dt*scm_state%v_force_tend(i,k) + scm_state%state_T(i,k,1) = scm_state%state_T(i,k,1) + 2.0*scm_state%dt*(scm_state%T_force_tend(i,k)) + scm_state%state_tracer(i,k,scm_state%water_vapor_index,1) = scm_state%state_tracer(i,k,scm_state%water_vapor_index,1) + & 2.0*scm_state%dt*(scm_state%qv_force_tend(i,k)) ! scm_state%state_u(i,k,1) = old_u(i,k) + scm_state%dt*scm_state%u_force_tend(i,k) ! scm_state%state_v(i,k,1) = old_v(i,k) + scm_state%dt*scm_state%v_force_tend(i,k) @@ -471,12 +471,12 @@ subroutine apply_forcing_forward_Euler(scm_state) g_over_cp = con_g/con_cp !> - Save old state variables (filtered from previous time step) - old_u = scm_state%state_u(:,1,:,1) - old_v = scm_state%state_v(:,1,:,1) - old_T = scm_state%state_T(:,1,:,1) - old_qv = scm_state%state_tracer(:,1,:,scm_state%water_vapor_index,1) + old_u = scm_state%state_u(:,:,1) + old_v = scm_state%state_v(:,:,1) + old_T = scm_state%state_T(:,:,1) + old_qv = scm_state%state_tracer(:,:,scm_state%water_vapor_index,1) - theta = old_T/scm_state%exner_l(:,1,:) + theta = old_T/scm_state%exner_l(:,:) !> - Initialize forcing sums to zero. scm_state%u_force_tend = 0.0 @@ -488,13 +488,13 @@ subroutine apply_forcing_forward_Euler(scm_state) !> - Calculate w_ls and z (height) at model layer interfaces. do i=1, scm_state%n_cols w_ls_i(i,1) = 0.0 - zi(i,1) = scm_state%geopotential_i(i,1,1)*grav_inv + zi(i,1) = scm_state%geopotential_i(i,1)*grav_inv do k=2, scm_state%n_levels w_ls_i(i,k) = 0.5*(scm_state%w_ls(i,k-1) + scm_state%w_ls(i,k)) - zi(i,k) = scm_state%geopotential_i(i,1,k)*grav_inv + zi(i,k) = scm_state%geopotential_i(i,k)*grav_inv end do w_ls_i(i,scm_state%n_levels+1) = w_ls_i(i,scm_state%n_levels) - zi(i,scm_state%n_levels+1) = scm_state%geopotential_i(i,1,scm_state%n_levels+1)*grav_inv + zi(i,scm_state%n_levels+1) = scm_state%geopotential_i(i,scm_state%n_levels+1)*grav_inv end do !end if @@ -527,7 +527,7 @@ subroutine apply_forcing_forward_Euler(scm_state) !> - Add forcing due to geostrophic wind !> - Calculate Coriolis parameter. - f_coriolis = 2.0*con_omega*sin(scm_state%lat(i,1)) + f_coriolis = 2.0*con_omega*sin(scm_state%lat(i)) do k=1, scm_state%n_levels !accumulate forcing tendencies scm_state%u_force_tend(i,k) = scm_state%u_force_tend(i,k) + f_coriolis*(old_v(i,k) - scm_state%v_g(i,k)) @@ -554,7 +554,7 @@ subroutine apply_forcing_forward_Euler(scm_state) !> - Add forcing due to prescribed radiation and horizontal advection do k=1, scm_state%n_levels scm_state%T_force_tend(i,k) = scm_state%T_force_tend(i,k) + scm_state%dT_dt_rad(i,k) + & - scm_state%exner_l(i,1,k)*(scm_state%h_advec_thil(i,k) +scm_state%v_advec_thil(i,k)) + scm_state%exner_l(i,k)*(scm_state%h_advec_thil(i,k) +scm_state%v_advec_thil(i,k)) scm_state%qv_force_tend(i,k) = scm_state%qv_force_tend(i,k) + scm_state%h_advec_qt(i,k) + scm_state%v_advec_qt(i,k) end do end do @@ -562,20 +562,20 @@ subroutine apply_forcing_forward_Euler(scm_state) do i=1, scm_state%n_cols do k=2, scm_state%n_levels-1 !upstream scheme (for boundaries, assume vertical derivatives are 0 => no vertical advection) - omega_plus = MAX(scm_state%omega(i,1,k), 0.0) - omega_minus = MIN(scm_state%omega(i,1,k), 0.0) - dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) - dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) + omega_plus = MAX(scm_state%omega(i,k), 0.0) + omega_minus = MIN(scm_state%omega(i,k), 0.0) + dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) + dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) scm_state%qv_force_tend(i,k) = -omega_plus*dqv_dp_minus - omega_minus*dqv_dp_plus - scm_state%T_force_tend(i,k) = scm_state%exner_l(i,1,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) + scm_state%T_force_tend(i,k) = scm_state%exner_l(i,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) end do !> - Add forcing due to prescribed radiation and horizontal advection do k=1, scm_state%n_levels scm_state%T_force_tend(i,k) = scm_state%T_force_tend(i,k) + scm_state%dT_dt_rad(i,k) + & - scm_state%exner_l(i,1,k)*scm_state%h_advec_thil(i,k) + scm_state%exner_l(i,k)*scm_state%h_advec_thil(i,k) scm_state%qv_force_tend(i,k) = scm_state%qv_force_tend(i,k) + scm_state%h_advec_qt(i,k) end do end do @@ -590,15 +590,15 @@ subroutine apply_forcing_forward_Euler(scm_state) do k=2, scm_state%n_levels-1 !upstream scheme (for boundaries, assume vertical derivatives are 0 => no vertical advection) - omega_plus = MAX(scm_state%omega(i,1,k), 0.0) - omega_minus = MIN(scm_state%omega(i,1,k), 0.0) - dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) - dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,1,k)-scm_state%pres_l(i,1,k-1)) - dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,1,k+1)-scm_state%pres_l(i,1,k)) + omega_plus = MAX(scm_state%omega(i,k), 0.0) + omega_minus = MIN(scm_state%omega(i,k), 0.0) + dth_dp_plus = (theta(i,k) - theta(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dth_dp_minus = (theta(i,k+1) - theta(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) + dqv_dp_plus = (old_qv(i,k)-old_qv(i,k-1))/(scm_state%pres_l(i,k)-scm_state%pres_l(i,k-1)) + dqv_dp_minus = (old_qv(i,k+1)-old_qv(i,k))/(scm_state%pres_l(i,k+1)-scm_state%pres_l(i,k)) scm_state%qv_force_tend(i,k) = scm_state%qv_force_tend(i,k) -omega_plus*dqv_dp_minus - omega_minus*dqv_dp_plus scm_state%T_force_tend(i,k) = scm_state%T_force_tend(i,k) + & - scm_state%exner_l(i,1,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) + scm_state%exner_l(i,k)*(-omega_plus*dth_dp_minus - omega_minus*dth_dp_plus) end do end do case default @@ -613,10 +613,10 @@ subroutine apply_forcing_forward_Euler(scm_state) !! x^{\tau + 1} = x^{\tau} + \Delta t\frac{\partial x}{\partial t}|^\tau_{forcing} !! \f] !! \f$x^{\tau}\f$ is the value at the previous time step and \f$\frac{\partial x}{\partial t}|^\tau_{forcing}\f$ is the sum of forcing terms calculated in this time step. - scm_state%state_u(i,1,k,1) = old_u(i,k) + scm_state%dt*scm_state%u_force_tend(i,k) - scm_state%state_v(i,1,k,1) = old_v(i,k) + scm_state%dt*scm_state%v_force_tend(i,k) - scm_state%state_T(i,1,k,1) = scm_state%state_T(i,1,k,1) + scm_state%dt*(scm_state%T_force_tend(i,k)) - scm_state%state_tracer(i,1,k,scm_state%water_vapor_index,1) = scm_state%state_tracer(i,1,k,scm_state%water_vapor_index,1) + & + scm_state%state_u(i,k,1) = old_u(i,k) + scm_state%dt*scm_state%u_force_tend(i,k) + scm_state%state_v(i,k,1) = old_v(i,k) + scm_state%dt*scm_state%v_force_tend(i,k) + scm_state%state_T(i,k,1) = scm_state%state_T(i,k,1) + scm_state%dt*(scm_state%T_force_tend(i,k)) + scm_state%state_tracer(i,k,scm_state%water_vapor_index,1) = scm_state%state_tracer(i,k,scm_state%water_vapor_index,1) + & scm_state%dt*(scm_state%qv_force_tend(i,k)) end do end do diff --git a/scm/src/gmtb_scm_input.F90 b/scm/src/gmtb_scm_input.F90 index 0dafd82f..c55bcbfd 100644 --- a/scm/src/gmtb_scm_input.F90 +++ b/scm/src/gmtb_scm_input.F90 @@ -6,6 +6,7 @@ module gmtb_scm_input use gmtb_scm_kinds, only : sp, dp, qp use netcdf +use gmtb_scm_type_defs, only: character_length implicit none @@ -28,9 +29,9 @@ subroutine get_config_nml(scm_state) type(scm_state_type), target, intent(inout) :: scm_state - character(len=80) :: experiment_name !< name of the experiment configuration file (usually case name) - character(len=80) :: model_name !< name of the host model (currently only GFS supported) - character(len=80) :: case_name !< name of case initialization and forcing dataset + character(len=character_length) :: experiment_name !< name of the experiment configuration file (usually case name) + character(len=character_length) :: model_name !< name of the host model (currently only GFS supported) + character(len=character_length) :: case_name !< name of case initialization and forcing dataset real(kind=dp) :: dt !< time step in seconds real(kind=dp) :: runtime !< total runtime in seconds real(kind=dp) :: output_frequency !< freqency of output writing in seconds @@ -40,10 +41,10 @@ subroutine get_config_nml(scm_state) integer :: n_columns !< number of columns to use integer :: n_time_levels integer :: time_scheme !< 1 => forward Euler, 2 => filtered leapfrog - character(len=80) :: output_dir !< name of the output directory - character(len=80) :: output_file !< name of the output file (without the file extension) - character(len=80) :: case_data_dir !< path to the directory containing case initialization and forcing data - character(len=80) :: vert_coord_data_dir !< path to the directory containing vertical coordinate data + character(len=character_length) :: output_dir !< name of the output directory + character(len=character_length) :: output_file !< name of the output file (without the file extension) + character(len=character_length) :: case_data_dir !< path to the directory containing case initialization and forcing data + character(len=character_length) :: vert_coord_data_dir !< path to the directory containing vertical coordinate data integer :: thermo_forcing_type !< 1: "revealed forcing", 2: "horizontal advective forcing", 3: "relaxation forcing" integer :: mom_forcing_type !< 1: "revealed forcing", 2: "horizontal advective forcing", 3: "relaxation forcing" integer :: C_RES !< reference "C" resoltiion of FV3 grid (needed for GWD and mountain blocking) @@ -56,9 +57,9 @@ subroutine get_config_nml(scm_state) integer :: year, month, day, hour real(kind=dp) :: column_area - character(len=80), allocatable :: physics_suite(:) !< name of the physics suite name (currently only GFS_operational supported) - character(len=64), allocatable :: physics_nml(:) - character(len=80), allocatable, dimension(:) :: tracer_names + character(len=character_length) :: physics_suite !< name of the physics suite name (currently only GFS_operational supported) + character(len=character_length) :: physics_nml + integer :: ioerror CHARACTER(LEN=*), parameter :: experiment_namelist = 'input_experiment.nml' @@ -124,12 +125,8 @@ subroutine get_config_nml(scm_state) write(*,'(a)') 'The current implementation does not allow to run more than one column at a time.' STOP end if - - !Using n_columns, allocate memory for the physics suite names and number of fields needed by each. If there are more physics suites - !than n_columns, notify the user and stop the program. If there are less physics suites than columns, notify the user and attempt to - !continue (getting permission from user), filling in the unspecified suites as the same as the last specified suite. - allocate(physics_suite(n_columns), physics_nml(n_columns)) - + + !read in the physics suite and namelist read(10, NML=physics_config, iostat=ioerror) close(10) @@ -141,11 +138,9 @@ subroutine get_config_nml(scm_state) case default n_time_levels = 2 end select - - call get_tracers(tracer_names) - - call scm_state%create(n_columns, n_levels, n_soil, n_snow, n_time_levels, tracer_names) + call scm_state%create(n_columns, n_levels, n_soil, n_snow, n_time_levels) + scm_state%experiment_name = experiment_name scm_state%model_name = model_name scm_state%output_dir = output_dir @@ -155,7 +150,7 @@ subroutine get_config_nml(scm_state) scm_state%case_name = case_name scm_state%physics_suite_name = physics_suite scm_state%physics_nml = physics_nml - scm_state%area(:,1) = column_area + scm_state%area(:) = column_area scm_state%n_cols = n_columns scm_state%n_levels = n_levels @@ -179,7 +174,6 @@ subroutine get_config_nml(scm_state) scm_state%reference_profile_choice = reference_profile_choice scm_state%relax_time = relax_time - deallocate(tracer_names) !> @} end subroutine get_config_nml @@ -873,38 +867,6 @@ subroutine get_reference_profile_old(nlev, pres, T, qv, ozone) end subroutine get_reference_profile_old -subroutine get_tracers(tracer_names) - character(len=character_length), allocatable, intent(inout), dimension(:) :: tracer_names - - character(len=*), parameter :: file_name = 'tracers.txt' - - character(len=100) :: name!, std_name, units - integer :: i, fu, rc, n_lines - - open (action='read', file=FILE_NAME, iostat=rc, newunit=fu) - if (rc == 0) then - n_lines = 0 - do - read (fu, *, iostat=rc) name!, std_name, units - if (rc /= 0) exit - n_lines = n_lines + 1 - end do - allocate(tracer_names(n_lines)) - rewind(fu) - do i=1,n_lines - read (fu, *, iostat=rc) name!, std_name, units - if (rc /= 0) exit - tracer_names(i) = trim(name) - end do - else - write(*,'(a,i0)') 'There was an error opening the file ' // FILE_NAME // & - '; error code = ', rc - stop - end if - - close (fu) -end subroutine get_tracers - !> Generic subroutine to check for netCDF I/O errors subroutine check(status) integer, intent ( in) :: status diff --git a/scm/src/gmtb_scm_output.F90 b/scm/src/gmtb_scm_output.F90 index 76465db6..e2bee7a8 100644 --- a/scm/src/gmtb_scm_output.F90 +++ b/scm/src/gmtb_scm_output.F90 @@ -18,12 +18,14 @@ module gmtb_scm_output !! Contains output-related subroutines !> This subroutine initializes the output netCDF file, "output.nc", placed in the directory specified by the case_config file used. -subroutine output_init(scm_state) - use gmtb_scm_type_defs, only: scm_state_type +subroutine output_init(scm_state, physics) + use gmtb_scm_type_defs, only: scm_state_type, physics_type type(scm_state_type), intent(in) :: scm_state + type(physics_type), intent(in) :: physics - INTEGER :: ncid, time_id, hor_dim_id, vert_dim_id, vert_dim_i_id, dummy_id, year_id, month_id, day_id, hour_id + INTEGER :: i, ncid, time_id, hor_dim_id, vert_dim_id, vert_dim_i_id, dummy_id, year_id, month_id, day_id, hour_id + character(2) :: idx !> \section output_init_alg Algorithm !! @{ @@ -219,6 +221,31 @@ subroutine output_init(scm_state) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& VALUES="temperature tendency due to microphysics scheme")) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="K s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dT_dt_ogwd',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="temperature tendency due to orographic gravity wave drag scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="K s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dT_dt_rayleigh',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="temperature tendency due to rayleigh damping scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="K s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dT_dt_cgwd',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="temperature tendency due to convective gravity wave drag scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="K s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dT_dt_phys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="temperature tendency due to all physics schemes")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="K s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dT_dt_nonphys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="temperature tendency due to all processes other than physics")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="K s-1")) CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dq_dt_PBL',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & VARID=dummy_id)) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& @@ -239,6 +266,51 @@ subroutine output_init(scm_state) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& VALUES="moisture tendency due to microphysics scheme")) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='doz_dt_PBL',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="ozone tendency due to PBL scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='doz_dt_prodloss',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="ozone tendency due to ozone production and loss")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='doz_dt_oz',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="ozone tendency due to ozone")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='doz_dt_T',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="ozone tendency due to temperature")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='doz_dt_ovhd',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="ozone tendency due to overhead ozone column")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dq_dt_phys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="moisture tendency due to all physics")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='doz_dt_phys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="ozone tendency due to all physics")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dq_dt_nonphys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="moisture tendency due to all processes other than physics")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='doz_dt_nonphys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="ozone tendency due to all processes other than physics")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="kg kg-1 s-1")) CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='du_dt_PBL',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & VARID=dummy_id)) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& @@ -259,6 +331,26 @@ subroutine output_init(scm_state) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& VALUES="x-wind tendency due to convective GWD scheme")) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='du_dt_rayleigh',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="x-wind tendency due to rayleigh damping scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='du_dt_shalconv',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="x-wind tendency due to shallow convection scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='du_dt_phys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="x-wind tendency due to all physics schemes")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='du_dt_nonphys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="x-wind tendency due to all processes other than physics")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dv_dt_PBL',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & VARID=dummy_id)) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& @@ -279,6 +371,26 @@ subroutine output_init(scm_state) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& VALUES="y-wind tendency due to convective GWD scheme")) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dv_dt_rayleigh',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="y-wind tendency due to rayleigh damping scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dv_dt_shalconv',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="y-wind tendency due to shallow convection scheme")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dv_dt_phys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="y-wind tendency due to all physics schemes")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='dv_dt_nonphys',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id, time_id /), & + VARID=dummy_id)) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",& + VALUES="y-wind tendency due to all processes other than physics")) + CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="units",VALUES="m s-2")) CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='upd_mf',XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id, vert_dim_id,time_id /), & VARID=dummy_id)) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=dummy_id,NAME="description",VALUES="updraft mass flux")) @@ -318,8 +430,23 @@ subroutine output_init(scm_state) CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='init_hour',XTYPE=NF90_FLOAT,VARID=hour_id)) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=hour_id,NAME="description",VALUES="model initialization hour")) CALL CHECK(NF90_PUT_ATT(NCID=ncid,VARID=hour_id,NAME="units",VALUES="")) - - + + if (physics%Model%naux2d > 0) then + do i=1, physics%Model%naux2d + write(idx,'(I2)') i + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='aux2d'//idx,XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id,time_id /), & + VARID=dummy_id)) + end do + end if + + if (physics%Model%naux3d > 0) then + do i=1, physics%Model%naux3d + write(idx,'(I2)') i + CALL CHECK(NF90_DEF_VAR(NCID=ncid,NAME='aux3d'//idx,XTYPE=NF90_FLOAT,DIMIDS= (/ hor_dim_id,vert_dim_id,time_id /), & + VARID=dummy_id)) + end do + end if + !> - Close variable definition and the file. CALL CHECK(NF90_ENDDEF(NCID=ncid)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=year_id,VALUES=scm_state%init_year)) @@ -357,7 +484,8 @@ subroutine output_append(scm_state, physics) ! real(kind=dp), intent(in) :: lw_dn_sfc_clr(:) !< clear sky downward LW flux at sfc (\f$W/m^2\f$) (horizontal) - integer :: ncid, var_id, i + integer :: ncid, var_id, i, j + character(2) :: idx allocate(dummy_1D(scm_state%n_cols), dummy_2d(scm_state%n_cols, scm_state%n_levels)) @@ -372,33 +500,30 @@ subroutine output_append(scm_state, physics) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%model_time,START=(/ scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="pres",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%pres_l(:,1,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%pres_l(:,:),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="pres_i",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%pres_i(:,1,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%pres_i(:,:),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sigma",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%sl(:,1,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%sl(:,:),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sigma_i",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%si(:,1,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%si(:,:),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="qv",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_tracer(:,1,:,scm_state%water_vapor_index,1),& + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_tracer(:,:,scm_state%water_vapor_index,1),& START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="T",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_T(:,1,:,1),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_T(:,:,1),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="u",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_u(:,1,:,1),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_u(:,:,1),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="v",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_v(:,1,:,1),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%state_v(:,:,1),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="qc",VARID=var_id)) - if (physics%model(1)%do_mynnedmf) then - do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Tbd(i)%QC_BL(1,:) - end do + if (physics%model%do_mynnedmf) then CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=& - scm_state%state_tracer(:,1,:,scm_state%cloud_water_index,1) + scm_state%state_tracer(:,1,:,scm_state%cloud_ice_index,1) + & - dummy_2d, START=(/1,1,scm_state%itt_out /))) + scm_state%state_tracer(:,:,scm_state%cloud_water_index,1) + scm_state%state_tracer(:,:,scm_state%cloud_ice_index,1) + & + physics%Tbd%QC_BL(:,:), START=(/1,1,scm_state%itt_out /))) else CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=& - scm_state%state_tracer(:,1,:,scm_state%cloud_water_index,1) + scm_state%state_tracer(:,1,:,scm_state%cloud_ice_index,1),& + scm_state%state_tracer(:,:,scm_state%cloud_water_index,1) + scm_state%state_tracer(:,:,scm_state%cloud_ice_index,1),& START=(/1,1,scm_state%itt_out /))) endif CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="qv_force_tend",VARID=var_id)) @@ -426,187 +551,252 @@ subroutine output_append(scm_state, physics) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="v_advec_qt",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%v_advec_qt(:,:),START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="T_s",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%T_surf(:,1),START=(/1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%T_surf(:),START=(/1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="pres_s",VARID=var_id)) - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%pres_surf(:,1),START=(/1,scm_state%itt_out /))) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=scm_state%pres_surf(:),START=(/1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lhf",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%dqsfc1(:),START=(/1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="shf",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%dtsfc1(:),START=(/1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="tau_u",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%dusfc1(:),START=(/1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="tau_v",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%dvsfc1(:),START=(/1,scm_state%itt_out /))) + + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="cldcov",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%clouds(:,:,1),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="cldcov_conv",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%cnvc(:,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="ql",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%clw(:,:,2),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="qi",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%clw(:,:,1),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="qc_conv",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%cnvw(:,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="rain",VARID=var_id)) do i=1, scm_state%n_cols - dummy_1D(i) = physics%Interstitial(i)%dqsfc1(1) + dummy_1D(i) = physics%Diag%rain(i)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="shf",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="rainc",VARID=var_id)) do i=1, scm_state%n_cols - dummy_1D(i) = physics%Interstitial(i)%dtsfc1(1) + dummy_1D(i) = physics%Diag%rainc(i)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="tau_u",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="pwat",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Diag%pwat(:),START=(/1,scm_state%itt_out /))) + + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_rad_heating_rate",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Radtend%htrsw(:,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_rad_heating_rate",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Radtend%htrlw(:,:),START=(/1,1,scm_state%itt_out /))) + + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_lwrad",VARID=var_id)) do i=1, scm_state%n_cols - dummy_1D(i) = physics%Interstitial(i)%dusfc1(1) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,1)/scm_state%dt end do - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="tau_v",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_swrad",VARID=var_id)) do i=1, scm_state%n_cols - dummy_1D(i) = physics%Interstitial(i)%dvsfc1(1) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,2)/scm_state%dt end do - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="cldcov",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_PBL",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%clouds(1,:,1) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,3)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="cldcov_conv",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_deepconv",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%cnvc(1,:) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,4)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="ql",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_shalconv",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%clw(1,:,2) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,5)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="qi",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_micro",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%clw(1,:,1) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,6)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="qc_conv",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_ogwd",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%cnvw(1,:) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,7)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="rain",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_rayleigh",VARID=var_id)) do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%rain(1)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,8)/scm_state%dt end do - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="rainc",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_cgwd",VARID=var_id)) do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%rainc(1)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,9)/scm_state%dt end do - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="pwat",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_phys",VARID=var_id)) do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%pwat(1) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,10)/scm_state%dt end do - CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_rad_heating_rate",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_nonphys",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Radtend(i)%htrsw(1,:) + dummy_2D(i,:) = physics%Diag%dt3dt(i,:,11)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_rad_heating_rate",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_PBL",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Radtend(i)%htrlw(1,:) + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,1)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_lwrad",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_deepconv",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dt3dt(1,:,1)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,2)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_swrad",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_shalconv",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dt3dt(1,:,2)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,3)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_PBL",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_micro",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dt3dt(1,:,3)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,4)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_deepconv",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="doz_dt_PBL",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dt3dt(1,:,4)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,5)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_shalconv",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="doz_dt_prodloss",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dt3dt(1,:,5)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,6)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dT_dt_micro",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="doz_dt_oz",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dt3dt(1,:,6)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,7)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_PBL",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="doz_dt_T",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dq3dt(1,:,1)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,8)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_deepconv",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="doz_dt_ovhd",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dq3dt(1,:,2)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,9)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_shalconv",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_phys",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dq3dt(1,:,3)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,10)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_micro",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="doz_dt_phys",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dq3dt(1,:,4)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,11)/scm_state%dt + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dq_dt_nonphys",VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,12)/scm_state%dt + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="doz_dt_nonphys",VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%dq3dt(i,:,13)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_PBL",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%du3dt(1,:,1)/scm_state%dt + dummy_2D(i,:) = physics%Diag%du3dt(i,:,1)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_OGWD",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%du3dt(1,:,2)/scm_state%dt + dummy_2D(i,:) = physics%Diag%du3dt(i,:,2)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_deepconv",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%du3dt(1,:,3)/scm_state%dt + dummy_2D(i,:) = physics%Diag%du3dt(i,:,3)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_CGWD",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%du3dt(1,:,4)/scm_state%dt + dummy_2D(i,:) = physics%Diag%du3dt(i,:,4)/scm_state%dt + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_rayleigh",VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%du3dt(i,:,5)/scm_state%dt + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_shalconv",VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%du3dt(i,:,6)/scm_state%dt + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_phys",VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%du3dt(i,:,7)/scm_state%dt + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="du_dt_nonphys",VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%du3dt(i,:,8)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_PBL",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dv3dt(1,:,1)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,1)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_OGWD",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dv3dt(1,:,2)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,2)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_deepconv",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dv3dt(1,:,3)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,3)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_CGWD",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Diag(i)%dv3dt(1,:,4)/scm_state%dt + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,4)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="upd_mf",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_rayleigh",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%ud_mf(1,:) + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,5)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dwn_mf",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_shalconv",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%dd_mf(1,:) + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,6)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) - CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="det_mf",VARID=var_id)) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_phys",VARID=var_id)) do i=1, scm_state%n_cols - dummy_2D(i,:) = physics%Interstitial(i)%dt_mf(1,:) + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,7)/scm_state%dt end do CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dv_dt_nonphys",VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%dv3dt(i,:,8)/scm_state%dt + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="upd_mf",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%ud_mf(:,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="dwn_mf",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%dd_mf(:,:),START=(/1,1,scm_state%itt_out /))) + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="det_mf",VARID=var_id)) + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=physics%Interstitial%dt_mf(:,:),START=(/1,1,scm_state%itt_out /))) ! CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="PBL_height",VARID=var_id)) ! CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=hpbl(:),START=(/1,scm_state%itt_out /))) ! CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_up_TOA_tot",VARID=var_id)) @@ -638,83 +828,104 @@ subroutine output_append(scm_state, physics) ! TOA/SFC fluxes do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%topfsw(1)%upfxc + dummy_1D(i) = physics%Diag%topfsw(i)%upfxc end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_up_TOA_tot",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%topfsw(1)%dnfxc + dummy_1D(i) = physics%Diag%topfsw(i)%dnfxc end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_dn_TOA_tot",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%topfsw(1)%upfx0 + dummy_1D(i) = physics%Diag%topfsw(i)%upfx0 end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_up_TOA_clr",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcfsw(1)%upfxc + dummy_1D(i) = physics%Radtend%sfcfsw(i)%upfxc end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_up_sfc_tot",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcfsw(1)%dnfxc + dummy_1D(i) = physics%Radtend%sfcfsw(i)%dnfxc end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_dn_sfc_tot",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcfsw(1)%upfx0 + dummy_1D(i) = physics%Radtend%sfcfsw(i)%upfx0 end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_up_sfc_clr",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcfsw(1)%dnfx0 + dummy_1D(i) = physics%Radtend%sfcfsw(i)%dnfx0 end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="sw_dn_sfc_clr",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%topflw(1)%upfxc + dummy_1D(i) = physics%Diag%topflw(i)%upfxc end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_up_TOA_tot",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Diag(i)%topflw(1)%upfx0 + dummy_1D(i) = physics%Diag%topflw(i)%upfx0 end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_up_TOA_clr",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcflw(1)%upfxc + dummy_1D(i) = physics%Radtend%sfcflw(i)%upfxc end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_up_sfc_tot",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcflw(1)%dnfxc + dummy_1D(i) = physics%Radtend%sfcflw(i)%dnfxc end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_dn_sfc_tot",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcflw(1)%upfx0 + dummy_1D(i) = physics%Radtend%sfcflw(i)%upfx0 end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_up_sfc_clr",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) ! do i=1, scm_state%n_cols - dummy_1D(i) = physics%Radtend(i)%sfcflw(1)%upfx0 + dummy_1D(i) = physics%Radtend%sfcflw(i)%upfx0 end do CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="lw_dn_sfc_clr",VARID=var_id)) CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) - + + if (physics%Model%naux2d > 0) then + do j=1, physics%Model%naux2d + write(idx,'(I2)') j + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="aux2d"//idx,VARID=var_id)) + do i=1, scm_state%n_cols + dummy_1D(i) = physics%Diag%aux2d(i,j) + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_1D,START=(/1,scm_state%itt_out /))) + end do + end if + + if (physics%Model%naux3d > 0) then + do j=1, physics%Model%naux3d + write(idx,'(I2)') j + CALL CHECK(NF90_INQ_VARID(NCID=ncid,NAME="aux3d"//idx,VARID=var_id)) + do i=1, scm_state%n_cols + dummy_2D(i,:) = physics%Diag%aux3d(i,:,j) + end do + CALL CHECK(NF90_PUT_VAR(NCID=ncid,VARID=var_id,VALUES=dummy_2D,START=(/1,1,scm_state%itt_out /))) + end do + end if !> - Close the file. CALL CHECK(NF90_CLOSE(ncid)) diff --git a/scm/src/gmtb_scm_setup.F90 b/scm/src/gmtb_scm_setup.F90 index 02433769..605667f4 100644 --- a/scm/src/gmtb_scm_setup.F90 +++ b/scm/src/gmtb_scm_setup.F90 @@ -39,8 +39,8 @@ subroutine set_state(scm_input, scm_reference, scm_state) !> - Set the longitude and latitude and convert from degrees to radians do i=1, scm_state%n_cols - scm_state%lon(i,1) = scm_input%input_lon*deg_to_rad_const - scm_state%lat(i,1) = scm_input%input_lat*deg_to_rad_const + scm_state%lon(i) = scm_input%input_lon*deg_to_rad_const + scm_state%lat(i) = scm_input%input_lat*deg_to_rad_const end do !> - Calculate water vapor from total water, suspended liquid water, and suspended ice. @@ -53,13 +53,13 @@ subroutine set_state(scm_input, scm_reference, scm_state) !> - For each column, interpolate the water vapor to the model grid. if (.NOT. scm_state%model_ics) then ! not a model do i=1, scm_state%n_cols - call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, input_qv, scm_state%pres_l(i,1,:), & - scm_state%n_levels, scm_state%state_tracer(i,1,:,scm_state%water_vapor_index,1), last_index_init, 1) + call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, input_qv, scm_state%pres_l(i,:), & + scm_state%n_levels, scm_state%state_tracer(i,:,scm_state%water_vapor_index,1), last_index_init, 1) !> - If the input domain does not span the model domain, patch in McClatchey tropical standard atmosphere (smoothly over a number of levels) above. if(last_index_init < scm_state%n_levels) THEN call patch_in_ref(last_index_init, scm_state%n_levels_smooth, scm_reference%ref_nlev, scm_reference%ref_pres, & - scm_reference%ref_qv, scm_state%pres_l(i,1,:), scm_state%n_levels, & - scm_state%state_tracer(i,1,:,scm_state%water_vapor_index,1), grid_error) + scm_reference%ref_qv, scm_state%pres_l(i,:), scm_state%n_levels, & + scm_state%state_tracer(i,:,scm_state%water_vapor_index,1), grid_error) end if end do @@ -69,35 +69,35 @@ subroutine set_state(scm_input, scm_reference, scm_state) !> - For each column, interpolate the temperature to the model grid. do i=1, scm_state%n_cols - call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, input_T, scm_state%pres_l(i,1,:), & - scm_state%n_levels, scm_state%state_T(i,1,:,1), last_index_init, 1) + call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, input_T, scm_state%pres_l(i,:), & + scm_state%n_levels, scm_state%state_T(i,:,1), last_index_init, 1) !> - If the input domain does not span the model domain, patch in McClatchey tropical standard atmosphere (smoothly over a number of levels) above. if(last_index_init < scm_state%n_levels) THEN call patch_in_ref(last_index_init, scm_state%n_levels_smooth, scm_reference%ref_nlev, scm_reference%ref_pres, & - scm_reference%ref_T, scm_state%pres_l(i,1,:), scm_state%n_levels, scm_state%state_T(i,1,:,1), grid_error) + scm_reference%ref_T, scm_state%pres_l(i,:), scm_state%n_levels, scm_state%state_T(i,:,1), grid_error) end if end do !> - For each column, interpolate the u-wind to the model grid. do i=1, scm_state%n_cols - call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_u, scm_state%pres_l(i,1,:), & - scm_state%n_levels, scm_state%state_u(i,1,:,1), last_index_init, 1) + call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_u, scm_state%pres_l(i,:), & + scm_state%n_levels, scm_state%state_u(i,:,1), last_index_init, 1) if(last_index_init < scm_state%n_levels) THEN do j=last_index_init + 1, scm_state%n_levels !> - The standard atmosphere doesn't have wind data; assume zero-gradient above the input data. - scm_state%state_u(i,1,j,1) = scm_state%state_u(i,1,last_index_init,1) + scm_state%state_u(i,j,1) = scm_state%state_u(i,last_index_init,1) end do end if end do !> - For each column, interpolate the v-wind to the model grid. do i=1, scm_state%n_cols - call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v, scm_state%pres_l(i,1,:), & - scm_state%n_levels, scm_state%state_v(i,1,:,1), last_index_init, 1) + call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_v, scm_state%pres_l(i,:), & + scm_state%n_levels, scm_state%state_v(i,:,1), last_index_init, 1) if(last_index_init < scm_state%n_levels) THEN do j=last_index_init + 1, scm_state%n_levels !> - The standard atmosphere doesn't have wind data; assume zero-gradient above the input data. - scm_state%state_v(i,1,j,1) = scm_state%state_v(i,1,last_index_init,1) + scm_state%state_v(i,j,1) = scm_state%state_v(i,last_index_init,1) end do end if end do @@ -105,110 +105,110 @@ subroutine set_state(scm_input, scm_reference, scm_state) !> - For each column, interpolate the ozone to the model grid. if(scm_state%ozone_index > 0) then do i=1, scm_state%n_cols - call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_ozone, scm_state%pres_l(i,1,:), & - scm_state%n_levels, scm_state%state_tracer(i,1,:,scm_state%ozone_index,1), last_index_init, 1) + call interpolate_to_grid_centers(scm_input%input_nlev, scm_input%input_pres, scm_input%input_ozone, scm_state%pres_l(i,:), & + scm_state%n_levels, scm_state%state_tracer(i,:,scm_state%ozone_index,1), last_index_init, 1) !> - If the input domain does not span the model domain, patch in McClatchey tropical standard atmosphere (smoothly over a number of levels) above. if(last_index_init < scm_state%n_levels) THEN call patch_in_ref(last_index_init, scm_state%n_levels_smooth, scm_reference%ref_nlev, scm_reference%ref_pres, & - scm_reference%ref_ozone, scm_state%pres_l(i,1,:), scm_state%n_levels, & - scm_state%state_tracer(i,1,:,scm_state%ozone_index,1), grid_error) + scm_reference%ref_ozone, scm_state%pres_l(i,:), scm_state%n_levels, & + scm_state%state_tracer(i,:,scm_state%ozone_index,1), grid_error) end if end do end if - scm_state%state_tracer(:,1,:,scm_state%cloud_water_index,1) = 0.0 + scm_state%state_tracer(:,:,scm_state%cloud_water_index,1) = 0.0 else do i=1, scm_state%n_cols !input_T = (scm_input%input_pres/p0)**con_rocp*(scm_input%input_thetail + (con_hvap/con_cp)*scm_input%input_ql + (con_hfus/con_cp)*scm_input%input_qi) - scm_state%state_u(i,1,:,1) = scm_input%input_u(:) - scm_state%state_v(i,1,:,1) = scm_input%input_v(:) - scm_state%state_T(i,1,:,1) = scm_input%input_temp(:) - scm_state%state_tracer(i,1,:,scm_state%water_vapor_index,1)=scm_input%input_qt - scm_state%state_tracer(i,1,:,scm_state%ozone_index,1)=scm_input%input_ozone - scm_state%veg_type(i,1) = scm_input%input_vegtyp - scm_state%soil_type(i,1) = scm_input%input_soiltyp - scm_state%slope_type(i,1) = scm_input%input_slopetype - scm_state%veg_frac(i,1) = scm_input%input_vegfrac - scm_state%shdmin(i,1) = scm_input%input_shdmin - scm_state%shdmax(i,1) = scm_input%input_shdmax + scm_state%state_u(i,:,1) = scm_input%input_u(:) + scm_state%state_v(i,:,1) = scm_input%input_v(:) + scm_state%state_T(i,:,1) = scm_input%input_temp(:) + scm_state%state_tracer(i,:,scm_state%water_vapor_index,1)=scm_input%input_qt + scm_state%state_tracer(i,:,scm_state%ozone_index,1)=scm_input%input_ozone + scm_state%veg_type(i) = scm_input%input_vegtyp + scm_state%soil_type(i) = scm_input%input_soiltyp + scm_state%slope_type(i) = scm_input%input_slopetype + scm_state%veg_frac(i) = scm_input%input_vegfrac + scm_state%shdmin(i) = scm_input%input_shdmin + scm_state%shdmax(i) = scm_input%input_shdmax scm_state%sfc_roughness_length_cm = scm_input%input_zorl - scm_state%sfc_type(i,1) = scm_input%input_slmsk !< this "overwrites" what is in the SCM case namelist if model ICs are present - scm_state%canopy(i,1) = scm_input%input_canopy - scm_state%hice(i,1) = scm_input%input_hice - scm_state%fice(i,1) = scm_input%input_fice - scm_state%tisfc(i,1) = scm_input%input_tisfc - scm_state%snwdph(i,1) = scm_input%input_snwdph - scm_state%snoalb(i,1) = scm_input%input_snoalb - scm_state%sncovr(i,1) = scm_input%input_sncovr - scm_state%area(i,1) = scm_input%input_area - scm_state%tg3(i,1) = scm_input%input_tg3 - scm_state%uustar(i,1) = scm_input%input_uustar - scm_state%stc(i,1,:,1)=scm_input%input_stc - scm_state%smc(i,1,:,1)=scm_input%input_smc - scm_state%slc(i,1,:,1)=scm_input%input_slc + scm_state%sfc_type(i) = scm_input%input_slmsk !< this "overwrites" what is in the SCM case namelist if model ICs are present + scm_state%canopy(i) = scm_input%input_canopy + scm_state%hice(i) = scm_input%input_hice + scm_state%fice(i) = scm_input%input_fice + scm_state%tisfc(i) = scm_input%input_tisfc + scm_state%snwdph(i) = scm_input%input_snwdph + scm_state%snoalb(i) = scm_input%input_snoalb + scm_state%sncovr(i) = scm_input%input_sncovr + scm_state%area(i) = scm_input%input_area + scm_state%tg3(i) = scm_input%input_tg3 + scm_state%uustar(i) = scm_input%input_uustar + scm_state%stc(i,:,1)=scm_input%input_stc + scm_state%smc(i,:,1)=scm_input%input_smc + scm_state%slc(i,:,1)=scm_input%input_slc if (scm_input%input_pres_i(1).GT. 0.0) then ! pressure are read in, overwrite values - scm_state%pres_i(i,1,:)=scm_input%input_pres_i - scm_state%pres_l(i,1,:)=scm_input%input_pres_l + scm_state%pres_i(i,:)=scm_input%input_pres_i + scm_state%pres_l(i,:)=scm_input%input_pres_l endif - scm_state%alvsf(i,1)=scm_input%input_alvsf - scm_state%alnsf(i,1)=scm_input%input_alnsf - scm_state%alvwf(i,1)=scm_input%input_alvwf - scm_state%alnwf(i,1)=scm_input%input_alnwf - scm_state%hprime(i,1,1)=scm_input%input_stddev - scm_state%hprime(i,1,2)=scm_input%input_convexity - scm_state%hprime(i,1,3)=scm_input%input_oa1 - scm_state%hprime(i,1,4)=scm_input%input_oa2 - scm_state%hprime(i,1,5)=scm_input%input_oa3 - scm_state%hprime(i,1,6)=scm_input%input_oa4 - scm_state%hprime(i,1,7)=scm_input%input_ol1 - scm_state%hprime(i,1,8)=scm_input%input_ol2 - scm_state%hprime(i,1,9)=scm_input%input_ol3 - scm_state%hprime(i,1,10)=scm_input%input_ol4 - scm_state%hprime(i,1,11)=scm_input%input_theta - scm_state%hprime(i,1,12)=scm_input%input_gamma - scm_state%hprime(i,1,13)=scm_input%input_sigma - scm_state%hprime(i,1,14)=scm_input%input_elvmax - scm_state%facsf(i,1)=scm_input%input_facsf - scm_state%facwf(i,1)=scm_input%input_facwf + scm_state%alvsf(i)=scm_input%input_alvsf + scm_state%alnsf(i)=scm_input%input_alnsf + scm_state%alvwf(i)=scm_input%input_alvwf + scm_state%alnwf(i)=scm_input%input_alnwf + scm_state%hprime(i,1)=scm_input%input_stddev + scm_state%hprime(i,2)=scm_input%input_convexity + scm_state%hprime(i,3)=scm_input%input_oa1 + scm_state%hprime(i,4)=scm_input%input_oa2 + scm_state%hprime(i,5)=scm_input%input_oa3 + scm_state%hprime(i,6)=scm_input%input_oa4 + scm_state%hprime(i,7)=scm_input%input_ol1 + scm_state%hprime(i,8)=scm_input%input_ol2 + scm_state%hprime(i,9)=scm_input%input_ol3 + scm_state%hprime(i,10)=scm_input%input_ol4 + scm_state%hprime(i,11)=scm_input%input_theta + scm_state%hprime(i,12)=scm_input%input_gamma + scm_state%hprime(i,13)=scm_input%input_sigma + scm_state%hprime(i,14)=scm_input%input_elvmax + scm_state%facsf(i)=scm_input%input_facsf + scm_state%facwf(i)=scm_input%input_facwf enddo !check for nonzero NoahMP input variable and fill in the scm_state with values from scm_input if found if (scm_input%input_tvxy /= 0.0) then do i=1, scm_state%n_cols - scm_state%tvxy(i,1) = scm_input%input_tvxy - scm_state%tgxy(i,1) = scm_input%input_tgxy - scm_state%tahxy(i,1) = scm_input%input_tahxy - scm_state%canicexy(i,1) = scm_input%input_canicexy - scm_state%canliqxy(i,1) = scm_input%input_canliqxy - scm_state%eahxy(i,1) = scm_input%input_eahxy - scm_state%cmxy(i,1) = scm_input%input_cmxy - scm_state%chxy(i,1) = scm_input%input_chxy - scm_state%fwetxy(i,1) = scm_input%input_fwetxy - scm_state%sneqvoxy(i,1) = scm_input%input_sneqvoxy - scm_state%alboldxy(i,1) = scm_input%input_alboldxy - scm_state%qsnowxy(i,1) = scm_input%input_qsnowxy - scm_state%wslakexy(i,1) = scm_input%input_wslakexy - scm_state%taussxy(i,1) = scm_input%input_taussxy - scm_state%waxy(i,1) = scm_input%input_waxy - scm_state%wtxy(i,1) = scm_input%input_wtxy - scm_state%zwtxy(i,1) = scm_input%input_zwtxy - scm_state%xlaixy(i,1) = scm_input%input_xlaixy - scm_state%xsaixy(i,1) = scm_input%input_xsaixy - scm_state%lfmassxy(i,1) = scm_input%input_lfmassxy - scm_state%stmassxy(i,1) = scm_input%input_stmassxy - scm_state%rtmassxy(i,1) = scm_input%input_rtmassxy - scm_state%woodxy(i,1) = scm_input%input_woodxy - scm_state%stblcpxy(i,1) = scm_input%input_stblcpxy - scm_state%fastcpxy(i,1) = scm_input%input_fastcpxy - scm_state%smcwtdxy(i,1) = scm_input%input_smcwtdxy - scm_state%deeprechxy(i,1) = scm_input%input_deeprechxy - scm_state%rechxy(i,1) = scm_input%input_rechxy - scm_state%snowxy(i,1) = scm_input%input_snowxy + scm_state%tvxy(i) = scm_input%input_tvxy + scm_state%tgxy(i) = scm_input%input_tgxy + scm_state%tahxy(i) = scm_input%input_tahxy + scm_state%canicexy(i) = scm_input%input_canicexy + scm_state%canliqxy(i) = scm_input%input_canliqxy + scm_state%eahxy(i) = scm_input%input_eahxy + scm_state%cmxy(i) = scm_input%input_cmxy + scm_state%chxy(i) = scm_input%input_chxy + scm_state%fwetxy(i) = scm_input%input_fwetxy + scm_state%sneqvoxy(i) = scm_input%input_sneqvoxy + scm_state%alboldxy(i) = scm_input%input_alboldxy + scm_state%qsnowxy(i) = scm_input%input_qsnowxy + scm_state%wslakexy(i) = scm_input%input_wslakexy + scm_state%taussxy(i) = scm_input%input_taussxy + scm_state%waxy(i) = scm_input%input_waxy + scm_state%wtxy(i) = scm_input%input_wtxy + scm_state%zwtxy(i) = scm_input%input_zwtxy + scm_state%xlaixy(i) = scm_input%input_xlaixy + scm_state%xsaixy(i) = scm_input%input_xsaixy + scm_state%lfmassxy(i) = scm_input%input_lfmassxy + scm_state%stmassxy(i) = scm_input%input_stmassxy + scm_state%rtmassxy(i) = scm_input%input_rtmassxy + scm_state%woodxy(i) = scm_input%input_woodxy + scm_state%stblcpxy(i) = scm_input%input_stblcpxy + scm_state%fastcpxy(i) = scm_input%input_fastcpxy + scm_state%smcwtdxy(i) = scm_input%input_smcwtdxy + scm_state%deeprechxy(i) = scm_input%input_deeprechxy + scm_state%rechxy(i) = scm_input%input_rechxy + scm_state%snowxy(i) = scm_input%input_snowxy - scm_state%snicexy(i,1,:) = scm_input%input_snicexy(:) - scm_state%snliqxy(i,1,:) = scm_input%input_snliqxy(:) - scm_state%tsnoxy(i,1,:) = scm_input%input_tsnoxy(:) - scm_state%smoiseq(i,1,:) = scm_input%input_smoiseq(:) - scm_state%zsnsoxy(i,1,:) = scm_input%input_zsnsoxy(:) + scm_state%snicexy(i,:) = scm_input%input_snicexy(:) + scm_state%snliqxy(i,:) = scm_input%input_snliqxy(:) + scm_state%tsnoxy(i,:) = scm_input%input_tsnoxy(:) + scm_state%smoiseq(i,:) = scm_input%input_smoiseq(:) + scm_state%zsnsoxy(i,:) = scm_input%input_zsnsoxy(:) end do endif endif @@ -323,7 +323,7 @@ end subroutine patch_in_ref subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, & Coupling, Grid, Tbd, Cldprop, Radtend, Diag, & Interstitial, communicator, ntasks, nthreads, & - Init_parm) + Init_parm, n_cols, lon, lat, area) use machine, only: kind_phys use GFS_typedefs, only: GFS_init_type, & @@ -333,27 +333,35 @@ subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, GFS_tbd_type, GFS_cldprop_type, & GFS_radtend_type, GFS_diag_type, & GFS_interstitial_type + use physcons, only: pi => con_pi + !use cldwat2m_micro, only: ini_micro !use aer_cloud, only: aer_cloud_init !use module_ras, only: ras_init !--- interface variables - type(GFS_control_type), intent(inout) :: Model - type(GFS_statein_type), intent(inout) :: Statein - type(GFS_stateout_type), intent(inout) :: Stateout - type(GFS_sfcprop_type), intent(inout) :: Sfcprop - type(GFS_coupling_type), intent(inout) :: Coupling - type(GFS_grid_type), intent(inout) :: Grid - type(GFS_tbd_type), intent(inout) :: Tbd - type(GFS_cldprop_type), intent(inout) :: Cldprop - type(GFS_radtend_type), intent(inout) :: Radtend - type(GFS_diag_type), intent(inout) :: Diag - type(GFS_interstitial_type), intent(inout) :: Interstitial - type(GFS_init_type), intent(in) :: Init_parm + type(GFS_control_type), intent(inout) :: Model + type(GFS_statein_type), intent(inout) :: Statein + type(GFS_stateout_type), intent(inout) :: Stateout + type(GFS_sfcprop_type), intent(inout) :: Sfcprop + type(GFS_coupling_type), intent(inout) :: Coupling + type(GFS_grid_type), intent(inout) :: Grid + type(GFS_tbd_type), intent(inout) :: Tbd + type(GFS_cldprop_type), intent(inout) :: Cldprop + type(GFS_radtend_type), intent(inout) :: Radtend + type(GFS_diag_type), intent(inout) :: Diag + type(GFS_interstitial_type), intent(inout) :: Interstitial + type(GFS_init_type), intent(in) :: Init_parm integer, intent(in) :: communicator - integer, intent(in) :: ntasks, nthreads + integer, intent(in) :: ntasks, nthreads, n_cols + + real(kind=dp), dimension(n_cols), intent(in) :: lon, lat, area + + real(kind=dp), parameter :: rad2deg = 180.0_dp/pi + + integer :: i !--- set control properties (including namelist read) call Model%init (Init_parm%nlunit, Init_parm%fn_nml, & @@ -372,21 +380,34 @@ subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, communicator, ntasks, nthreads) !--- initialize DDTs - call Statein%create(1, Model) - call Stateout%create(1, Model) - call Sfcprop%create(1, Model) - call Coupling%create(1, Model) - call Grid%create(1, Model) - call Tbd%create(1, Model) - call Cldprop%create(1, Model) - call Radtend%create(1, Model) - !--- internal representation of diagnostics - call Diag%create(1, Model) - !--- internal representation of interstitials for CCPP physics - call Interstitial%create(1, Model) - - !--- populate the grid components - call GFS_grid_populate (Grid, Init_parm%xlon, Init_parm%xlat, Init_parm%area) + + call Statein%create(n_cols, Model) + call Stateout%create(n_cols, Model) + call Sfcprop%create(n_cols, Model) + call Coupling%create(n_cols, Model) + call Grid%create(n_cols, Model) + call Tbd%create(n_cols, Model) + call Cldprop%create(n_cols, Model) + call Radtend%create(n_cols, Model) + !--- internal representation of diagnostics + call Diag%create(n_cols, Model) + !--- internal representation of interstitials for CCPP physics + call Interstitial%create(n_cols, Model) + + !--- populate the grid components + !call GFS_grid_populate (Grid(i), Init_parm%xlon, Init_parm%xlat, Init_parm%area) + + do i=1, n_cols + Grid%xlon(i) = lon(i) + Grid%xlat(i) = lat(i) + Grid%xlat_d(i) = lat(i) * rad2deg + Grid%xlon_d(i) = lon(i) * rad2deg + Grid%sinlat(i) = sin(Grid%xlat(i)) + Grid%coslat(i) = sqrt(1.0_dp - Grid%sinlat(i)*Grid%sinlat(i)) + Grid%area(i) = area(i) + Grid%dx(i) = sqrt(area(i)) + end do + !--- initialize Morrison-Gettleman microphysics !if (Model%ncld == 2) then diff --git a/scm/src/gmtb_scm_time_integration.F90 b/scm/src/gmtb_scm_time_integration.F90 index 3ccc1452..8753e113 100644 --- a/scm/src/gmtb_scm_time_integration.F90 +++ b/scm/src/gmtb_scm_time_integration.F90 @@ -32,16 +32,16 @@ subroutine filter(scm_state) !! \f] !! where \f$\overline{x^\tau}\f$ is the filtered value of variable \f$x\f$ at the current iteration, \f$x^\tau\f$ is the unfiltered value of the previous time step, \f$x^{\tau +1}\f$ is the unfiltered !! value that was just updated by the forcing and physics, and \f$\overline{x^{\tau - 1}}\f$ is the filtered value of the variable from the previous iteration, and \f$c\f$ is the filtering constant. - scm_state%state_tracer(:,1,:,scm_state%water_vapor_index,1) = & - (1.0 - scm_state%c_filter)*scm_state%temp_tracer(:,1,:,scm_state%water_vapor_index,2) + & - 0.5*scm_state%c_filter*(scm_state%state_tracer(:,1,:,scm_state%water_vapor_index,2) + & - scm_state%temp_tracer(:,1,:,scm_state%water_vapor_index,1)) - scm_state%state_T(:,1,:,1) = (1.0 - scm_state%c_filter)*scm_state%temp_T(:,1,:,2) + & - 0.5*scm_state%c_filter*(scm_state%state_T(:,1,:,2) + scm_state%temp_T(:,1,:,1)) - scm_state%state_u(:,1,:,1) = (1.0 - scm_state%c_filter)*scm_state%temp_u(:,1,:,2) + & - 0.5*scm_state%c_filter*(scm_state%state_u(:,1,:,2) + scm_state%temp_u(:,1,:,1)) - scm_state%state_v(:,1,:,1) = (1.0 - scm_state%c_filter)*scm_state%temp_v(:,1,:,2) + & - 0.5*scm_state%c_filter*(scm_state%state_v(:,1,:,2) + scm_state%temp_v(:,1,:,1)) + scm_state%state_tracer(:,:,scm_state%water_vapor_index,1) = & + (1.0 - scm_state%c_filter)*scm_state%temp_tracer(:,:,scm_state%water_vapor_index,2) + & + 0.5*scm_state%c_filter*(scm_state%state_tracer(:,:,scm_state%water_vapor_index,2) + & + scm_state%temp_tracer(:,:,scm_state%water_vapor_index,1)) + scm_state%state_T(:,:,1) = (1.0 - scm_state%c_filter)*scm_state%temp_T(:,:,2) + & + 0.5*scm_state%c_filter*(scm_state%state_T(:,:,2) + scm_state%temp_T(:,:,1)) + scm_state%state_u(:,:,1) = (1.0 - scm_state%c_filter)*scm_state%temp_u(:,:,2) + & + 0.5*scm_state%c_filter*(scm_state%state_u(:,:,2) + scm_state%temp_u(:,:,1)) + scm_state%state_v(:,:,1) = (1.0 - scm_state%c_filter)*scm_state%temp_v(:,:,2) + & + 0.5*scm_state%c_filter*(scm_state%state_v(:,:,2) + scm_state%temp_v(:,:,1)) end subroutine @@ -49,11 +49,12 @@ subroutine filter(scm_state) !! The subroutine nuopc_rad_update calculates the time-dependent parameters required to run radiation, and nuopc_rad_run calculates the radiative heating rate (but does not apply it). The !! subroutine apply_forcing_leapfrog advances the state variables forward using the leapfrog method and nuopc_phys_run further changes the state variables using the forward method. By the end of !! this subroutine, the unfiltered state variables will have been stepped forward in time. -subroutine do_time_step(scm_state, cdata_cols) - use gmtb_scm_type_defs, only: scm_state_type +subroutine do_time_step(scm_state, physics, cdata) + use gmtb_scm_type_defs, only: scm_state_type, physics_type type(scm_state_type), intent(inout) :: scm_state - type(ccpp_t), intent(inout) :: cdata_cols(:) + type(physics_type), intent(inout) :: physics + type(ccpp_t), intent(inout) :: cdata integer :: i, ierr @@ -72,20 +73,37 @@ subroutine do_time_step(scm_state, cdata_cols) if (scm_state%time_scheme == 2) then !IPD cdata points to time level 2 for updating state variables; update time level 2 state variables with those where the forcing has been applied this time step - scm_state%state_T(:,1,:,2) = scm_state%state_T(:,1,:,1) - scm_state%state_tracer(:,1,:,:,2) = scm_state%state_tracer(:,1,:,:,1) - scm_state%state_u(:,1,:,2) = scm_state%state_u(:,1,:,1) - scm_state%state_v(:,1,:,2) = scm_state%state_v(:,1,:,1) + scm_state%state_T(:,:,2) = scm_state%state_T(:,:,1) + scm_state%state_tracer(:,:,:,2) = scm_state%state_tracer(:,:,:,1) + scm_state%state_u(:,:,2) = scm_state%state_u(:,:,1) + scm_state%state_v(:,:,2) = scm_state%state_v(:,:,1) end if + ! Calculate total non-physics tendencies by substracting old Stateout + ! variables from new/updated Statein variables (gives the tendencies + ! due to anything else than physics) do i=1, scm_state%n_cols - call ccpp_physics_run(cdata_cols(i), suite_name=trim(adjustl(scm_state%physics_suite_name(i))), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run for column ', i, ': ' // trim(cdata_cols(i)%errmsg) // '. Exiting...' - stop - end if + if (physics%Model%ldiag3d) then + physics%Diag%du3dt(i,:,8) = physics%Diag%du3dt(i,:,8) & + + (physics%Statein%ugrs(i,:) - physics%Stateout%gu0(i,:)) + physics%Diag%dv3dt(i,:,8) = physics%Diag%dv3dt(i,:,8) & + + ( physics%Statein%vgrs(i,:) - physics%Stateout%gv0(i,:)) + physics%Diag%dt3dt(i,:,11) = physics%Diag%dt3dt(i,:,11) & + + (physics%Statein%tgrs(i,:) - physics%Stateout%gt0(i,:)) + if (physics%Model%qdiag3d) then + physics%Diag%dq3dt(i,:,12) = physics%Diag%dq3dt(i,:,12) & + + (physics%Statein%qgrs(i,:,physics%Model%ntqv) - physics%Stateout%gq0(i,:,physics%Model%ntqv)) + physics%Diag%dq3dt(i,:,13) = physics%Diag%dq3dt(i,:,13) & + + (physics%Statein%qgrs(i,:,physics%Model%ntoz) - physics%Stateout%gq0(i,:,physics%Model%ntoz)) + endif + endif end do + call ccpp_physics_run(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr) + if (ierr/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(cdata%errmsg) // '. Exiting...' + stop + end if !if no physics call, need to transfer state_variables(:,:,1) to state_variables (:,:,2) ! scm_state%state_T(:,:,2) = scm_state%state_T(:,:,1) diff --git a/scm/src/gmtb_scm_type_defs.F90 b/scm/src/gmtb_scm_type_defs.F90 index e249c235..4aa87fc9 100644 --- a/scm/src/gmtb_scm_type_defs.F90 +++ b/scm/src/gmtb_scm_type_defs.F90 @@ -44,8 +44,8 @@ module gmtb_scm_type_defs character(len=character_length) :: vert_coord_data_dir !< location of the vertical coordinate data files (relative to the executable path) character(len=character_length) :: output_file !< name of output file (without the file extension) character(len=character_length) :: case_name !< name of case initialization and forcing to use (different than experiment name, which names the model run (as a control, experiment_1, etc.)) - character(len=character_length), allocatable :: physics_suite_name(:) !< name of physics suite (must be "GFS_operational" for prototype) - character(len=64), allocatable :: physics_nml(:) + character(len=character_length) :: physics_suite_name !< name of physics suite (must be "GFS_operational" for prototype) + character(len=character_length) :: physics_nml integer :: n_levels !< number of model levels (must be 64 for prototype) integer :: n_soil !< number of model levels (must be 4 for prototype) @@ -101,86 +101,86 @@ module gmtb_scm_type_defs !! - index order for grid is (horizontal, vertical); !! - index order for state variables is (horizontal, vertical, timesteps); !! - index order for tracer is (horizontal, vertical, tracer_index, timesteps) - real(kind=dp), allocatable :: pres_i(:,:,:), pres_l(:,:,:) !< pressure on grid interfaces, centers (Pa) - real(kind=dp), allocatable :: si(:,:,:), sl(:,:,:) !< sigma on grid interfaces, centers - real(kind=dp), allocatable :: exner_i(:,:,:), exner_l(:,:,:) !< exner function on grid interfaces, centers - real(kind=dp), allocatable :: geopotential_i(:,:,:), geopotential_l(:,:,:) !< geopotential on grid interfaces, centers - real(kind=dp), allocatable :: a_k(:,:), b_k(:,:) !< used to determine grid sigma and pressure levels + real(kind=dp), allocatable :: pres_i(:,:), pres_l(:,:) !< pressure on grid interfaces, centers (Pa) + real(kind=dp), allocatable :: si(:,:), sl(:,:) !< sigma on grid interfaces, centers + real(kind=dp), allocatable :: exner_i(:,:), exner_l(:,:) !< exner function on grid interfaces, centers + real(kind=dp), allocatable :: geopotential_i(:,:), geopotential_l(:,:) !< geopotential on grid interfaces, centers + real(kind=dp), allocatable :: a_k(:), b_k(:) !< used to determine grid sigma and pressure levels - real(kind=dp), allocatable :: lat(:,:), lon(:,:) !< latitude and longitude (radians) - real(kind=dp), allocatable :: area(:,:) !< area over which the column represents a mean (analogous to grid size or observational array area) + real(kind=dp), allocatable :: lat(:), lon(:) !< latitude and longitude (radians) + real(kind=dp), allocatable :: area(:) !< area over which the column represents a mean (analogous to grid size or observational array area) - real(kind=dp), allocatable :: state_T(:,:,:,:) !< model state absolute temperature at grid centers (K) - real(kind=dp), allocatable :: state_u(:,:,:,:), state_v(:,:,:,:) !< model state horizontal winds at grid centers (m/s) - real(kind=dp), allocatable :: state_tracer(:,:,:,:,:) !< model state tracer at grid centers - real(kind=dp), allocatable :: temp_T(:,:,:,:), temp_u(:,:,:,:), temp_v(:,:,:,:), temp_tracer(:,:,:,:,:) !< used for time-filtering + real(kind=dp), allocatable :: state_T(:,:,:) !< model state absolute temperature at grid centers (K) + real(kind=dp), allocatable :: state_u(:,:,:), state_v(:,:,:) !< model state horizontal winds at grid centers (m/s) + real(kind=dp), allocatable :: state_tracer(:,:,:,:) !< model state tracer at grid centers + real(kind=dp), allocatable :: temp_T(:,:,:), temp_u(:,:,:), temp_v(:,:,:), temp_tracer(:,:,:,:) !< used for time-filtering !> - Define forcing-related variables (indexing is (horizontal, vertical)). real(kind=dp), allocatable :: u_force_tend(:,:), v_force_tend(:,:), T_force_tend(:,:), qv_force_tend(:,:) !< total u, v, T, q forcing (units/s) (horizontal, vertical) - real(kind=dp), allocatable :: w_ls(:,:), omega(:,:,:), u_g(:,:), v_g(:,:), dT_dt_rad(:,:), h_advec_thil(:,:), & + real(kind=dp), allocatable :: w_ls(:,:), omega(:,:), u_g(:,:), v_g(:,:), dT_dt_rad(:,:), h_advec_thil(:,:), & h_advec_qt(:,:), v_advec_thil(:,:), v_advec_qt(:,:), u_nudge(:,:), v_nudge(:,:), T_nudge(:,:), thil_nudge(:,:), qt_nudge(:,:) !< forcing terms interpolated to the model time and grid - real(kind=dp), allocatable :: T_surf(:,:), pres_surf(:,:) !< surface temperature and pressure interpolated to the model time + real(kind=dp), allocatable :: T_surf(:), pres_surf(:) !< surface temperature and pressure interpolated to the model time real(kind=dp), allocatable :: sh_flux(:), lh_flux(:) !< surface sensible and latent heat fluxes interpolated to the model time real(kind=dp), allocatable :: sfc_roughness_length_cm(:) !< surface roughness length used for calculating surface layer parameters from specified fluxes - real(kind=dp), allocatable :: alvsf(:,:), alnsf(:,:),alvwf(:,:),alnwf(:,:) !< surface albedos - real(kind=dp), allocatable :: facsf(:,:), facwf(:,:), hprime(:,:,:) !< other surface stuff - real(kind=dp), allocatable :: stc(:,:,:,:) !< soil temperature - real(kind=dp), allocatable :: smc(:,:,:,:) !< soil moisture - real(kind=dp), allocatable :: slc(:,:,:,:) !< soil liquid content + real(kind=dp), allocatable :: alvsf(:), alnsf(:),alvwf(:),alnwf(:) !< surface albedos + real(kind=dp), allocatable :: facsf(:), facwf(:), hprime(:,:) !< other surface stuff + real(kind=dp), allocatable :: stc(:,:,:) !< soil temperature + real(kind=dp), allocatable :: smc(:,:,:) !< soil moisture + real(kind=dp), allocatable :: slc(:,:,:) !< soil liquid content - real(kind=dp), allocatable :: sfc_type(:,:) !< 0: sea surface, 1: land surface, 2: sea-ice surface - real(kind=dp), allocatable :: veg_type(:,:) !< vegetation type classification - real(kind=dp), allocatable :: slope_type(:,:) !< surface slope classification - real(kind=dp), allocatable :: soil_type(:,:) !< soil type classification - real(kind=dp), allocatable :: veg_frac(:,:) !< vegetation area fraction - real(kind=dp), allocatable :: shdmin(:,:) !< minimun vegetation fraction - real(kind=dp), allocatable :: shdmax(:,:) !< maximun vegetation fraction - real(kind=dp), allocatable :: tg3(:,:) !< deep soil temperature (K) - real(kind=dp), allocatable :: slmsk(:,:) !< sea land ice mask [0,1,2] - real(kind=dp), allocatable :: canopy(:,:) !< amount of water stored in canopy (kg m-2) - real(kind=dp), allocatable :: hice(:,:) !< sea ice thickness (m) - real(kind=dp), allocatable :: fice(:,:) !< ice fraction (frac) - real(kind=dp), allocatable :: tisfc(:,:) !< ice surface temperature (K) - real(kind=dp), allocatable :: snwdph(:,:) !< water equivalent snow depth (mm) - real(kind=dp), allocatable :: snoalb(:,:) !< maximum snow albedo (frac) - real(kind=dp), allocatable :: sncovr(:,:) !< snow area fraction (frac) - real(kind=dp), allocatable :: uustar(:,:) !< surface friction velocity (m s-1) + real(kind=dp), allocatable :: sfc_type(:) !< 0: sea surface, 1: land surface, 2: sea-ice surface + real(kind=dp), allocatable :: veg_type(:) !< vegetation type classification + real(kind=dp), allocatable :: slope_type(:) !< surface slope classification + real(kind=dp), allocatable :: soil_type(:) !< soil type classification + real(kind=dp), allocatable :: veg_frac(:) !< vegetation area fraction + real(kind=dp), allocatable :: shdmin(:) !< minimun vegetation fraction + real(kind=dp), allocatable :: shdmax(:) !< maximun vegetation fraction + real(kind=dp), allocatable :: tg3(:) !< deep soil temperature (K) + real(kind=dp), allocatable :: slmsk(:) !< sea land ice mask [0,1,2] + real(kind=dp), allocatable :: canopy(:) !< amount of water stored in canopy (kg m-2) + real(kind=dp), allocatable :: hice(:) !< sea ice thickness (m) + real(kind=dp), allocatable :: fice(:) !< ice fraction (frac) + real(kind=dp), allocatable :: tisfc(:) !< ice surface temperature (K) + real(kind=dp), allocatable :: snwdph(:) !< water equivalent snow depth (mm) + real(kind=dp), allocatable :: snoalb(:) !< maximum snow albedo (frac) + real(kind=dp), allocatable :: sncovr(:) !< snow area fraction (frac) + real(kind=dp), allocatable :: uustar(:) !< surface friction velocity (m s-1) - real(kind=dp), allocatable :: tvxy(:,:) !< vegetation temperature (K) - real(kind=dp), allocatable :: tgxy(:,:) !< ground temperature for Noahmp (K) - real(kind=dp), allocatable :: tahxy(:,:) !< canopy air temperature (K) - real(kind=dp), allocatable :: canicexy(:,:) !< canopy intercepted ice mass (mm) - real(kind=dp), allocatable :: canliqxy(:,:) !< canopy intercepted liquid water (mm) - real(kind=dp), allocatable :: eahxy(:,:) !< canopy air vapor pressure (Pa) - real(kind=dp), allocatable :: cmxy(:,:) !< surface drag coefficient for momentum for noahmp - real(kind=dp), allocatable :: chxy(:,:) !< surface exchange coeff heat & moisture for noahmp - real(kind=dp), allocatable :: fwetxy(:,:) !< area fraction of canopy that is wetted/snowed - real(kind=dp), allocatable :: sneqvoxy(:,:) !< snow mass at previous time step (mm) - real(kind=dp), allocatable :: alboldxy(:,:) !< snow albedo at previous time step (frac) - real(kind=dp), allocatable :: qsnowxy(:,:) !< snow precipitation rate at surface (mm s-1) - real(kind=dp), allocatable :: wslakexy(:,:) !< lake water storage (mm) - real(kind=dp), allocatable :: taussxy(:,:) !< non-dimensional snow age - real(kind=dp), allocatable :: waxy(:,:) !< water storage in aquifer (mm) - real(kind=dp), allocatable :: wtxy(:,:) !< water storage in aquifer and saturated soil (mm) - real(kind=dp), allocatable :: zwtxy(:,:) !< water table depth (m) - real(kind=dp), allocatable :: xlaixy(:,:) !< leaf area index - real(kind=dp), allocatable :: xsaixy(:,:) !< stem area index - real(kind=dp), allocatable :: lfmassxy(:,:) !< leaf mass (g m-2) - real(kind=dp), allocatable :: stmassxy(:,:) !< stem mass (g m-2) - real(kind=dp), allocatable :: rtmassxy(:,:) !< fine root mass (g m-2) - real(kind=dp), allocatable :: woodxy(:,:) !< wood mass including woody roots (g m-2) - real(kind=dp), allocatable :: stblcpxy(:,:) !< stable carbon in deep soil (g m-2) - real(kind=dp), allocatable :: fastcpxy(:,:) !< short-lived carbon in shallow soil (g m-2) - real(kind=dp), allocatable :: smcwtdxy(:,:) !< soil water content between the bottom of the soil and the water table (m3 m-3) - real(kind=dp), allocatable :: deeprechxy(:,:) !< recharge to or from the water table when deep (m) - real(kind=dp), allocatable :: rechxy(:,:) !< recharge to or from the water table when shallow (m) - real(kind=dp), allocatable :: snowxy(:,:) !< number of snow layers + real(kind=dp), allocatable :: tvxy(:) !< vegetation temperature (K) + real(kind=dp), allocatable :: tgxy(:) !< ground temperature for Noahmp (K) + real(kind=dp), allocatable :: tahxy(:) !< canopy air temperature (K) + real(kind=dp), allocatable :: canicexy(:) !< canopy intercepted ice mass (mm) + real(kind=dp), allocatable :: canliqxy(:) !< canopy intercepted liquid water (mm) + real(kind=dp), allocatable :: eahxy(:) !< canopy air vapor pressure (Pa) + real(kind=dp), allocatable :: cmxy(:) !< surface drag coefficient for momentum for noahmp + real(kind=dp), allocatable :: chxy(:) !< surface exchange coeff heat & moisture for noahmp + real(kind=dp), allocatable :: fwetxy(:) !< area fraction of canopy that is wetted/snowed + real(kind=dp), allocatable :: sneqvoxy(:) !< snow mass at previous time step (mm) + real(kind=dp), allocatable :: alboldxy(:) !< snow albedo at previous time step (frac) + real(kind=dp), allocatable :: qsnowxy(:) !< snow precipitation rate at surface (mm s-1) + real(kind=dp), allocatable :: wslakexy(:) !< lake water storage (mm) + real(kind=dp), allocatable :: taussxy(:) !< non-dimensional snow age + real(kind=dp), allocatable :: waxy(:) !< water storage in aquifer (mm) + real(kind=dp), allocatable :: wtxy(:) !< water storage in aquifer and saturated soil (mm) + real(kind=dp), allocatable :: zwtxy(:) !< water table depth (m) + real(kind=dp), allocatable :: xlaixy(:) !< leaf area index + real(kind=dp), allocatable :: xsaixy(:) !< stem area index + real(kind=dp), allocatable :: lfmassxy(:) !< leaf mass (g m-2) + real(kind=dp), allocatable :: stmassxy(:) !< stem mass (g m-2) + real(kind=dp), allocatable :: rtmassxy(:) !< fine root mass (g m-2) + real(kind=dp), allocatable :: woodxy(:) !< wood mass including woody roots (g m-2) + real(kind=dp), allocatable :: stblcpxy(:) !< stable carbon in deep soil (g m-2) + real(kind=dp), allocatable :: fastcpxy(:) !< short-lived carbon in shallow soil (g m-2) + real(kind=dp), allocatable :: smcwtdxy(:) !< soil water content between the bottom of the soil and the water table (m3 m-3) + real(kind=dp), allocatable :: deeprechxy(:) !< recharge to or from the water table when deep (m) + real(kind=dp), allocatable :: rechxy(:) !< recharge to or from the water table when shallow (m) + real(kind=dp), allocatable :: snowxy(:) !< number of snow layers - real(kind=dp), allocatable :: snicexy(:,:,:) !< snow layer ice (mm) - real(kind=dp), allocatable :: snliqxy(:,:,:) !< snow layer liquid (mm) - real(kind=dp), allocatable :: tsnoxy(:,:,:) !< snow temperature (K) - real(kind=dp), allocatable :: smoiseq(:,:,:) !< equilibrium soil water content (m3 m-3) - real(kind=dp), allocatable :: zsnsoxy(:,:,:) !< layer bottom depth from snow surface (m) + real(kind=dp), allocatable :: snicexy(:,:) !< snow layer ice (mm) + real(kind=dp), allocatable :: snliqxy(:,:) !< snow layer liquid (mm) + real(kind=dp), allocatable :: tsnoxy(:,:) !< snow temperature (K) + real(kind=dp), allocatable :: smoiseq(:,:) !< equilibrium soil water content (m3 m-3) + real(kind=dp), allocatable :: zsnsoxy(:,:) !< layer bottom depth from snow surface (m) contains procedure :: create => scm_state_create @@ -328,18 +328,18 @@ module gmtb_scm_type_defs !! type physics_type - type(GFS_control_type), allocatable :: Model(:) - type(GFS_statein_type), allocatable :: Statein(:) - type(GFS_stateout_type), allocatable :: Stateout(:) - type(GFS_sfcprop_type), allocatable :: Sfcprop(:) - type(GFS_coupling_type), allocatable :: Coupling(:) - type(GFS_grid_type), allocatable :: Grid(:) - type(GFS_tbd_type), allocatable :: Tbd(:) - type(GFS_cldprop_type), allocatable :: Cldprop(:) - type(GFS_radtend_type), allocatable :: Radtend(:) - type(GFS_diag_type), allocatable :: Diag(:) - type(GFS_interstitial_type), allocatable :: Interstitial(:) - type(GFS_init_type), allocatable :: Init_parm(:) + type(GFS_control_type) :: Model + type(GFS_statein_type) :: Statein + type(GFS_stateout_type) :: Stateout + type(GFS_sfcprop_type) :: Sfcprop + type(GFS_coupling_type) :: Coupling + type(GFS_grid_type) :: Grid + type(GFS_tbd_type) :: Tbd + type(GFS_cldprop_type) :: Cldprop + type(GFS_radtend_type) :: Radtend + type(GFS_diag_type) :: Diag + type(GFS_interstitial_type) :: Interstitial + type(GFS_init_type) :: Init_parm contains procedure :: create => physics_create @@ -348,16 +348,13 @@ module gmtb_scm_type_defs type(physics_type), target :: physics - type(ccpp_t), allocatable, target :: cdata_cols(:) + type(ccpp_t), target :: cdata contains - subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_time_levels, tracers) + subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_time_levels) class(scm_state_type) :: scm_state integer, intent(in) :: n_columns, n_levels, n_soil, n_snow, n_time_levels - character(len=character_length), intent(in), dimension(:) :: tracers - - integer :: i scm_state%experiment_name = clear_char scm_state%model_name = clear_char @@ -367,7 +364,6 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%output_file = clear_char scm_state%case_name = clear_char - allocate(scm_state%physics_suite_name(n_columns), scm_state%physics_nml(n_columns)) scm_state%physics_suite_name = clear_char scm_state%physics_nml = clear_char @@ -378,28 +374,42 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%n_cols = n_columns scm_state%n_timesteps = int_zero scm_state%n_time_levels = n_time_levels - - scm_state%n_tracers = size(tracers) + scm_state%n_tracers = 17 allocate(scm_state%tracer_names(scm_state%n_tracers)) - scm_state%tracer_names = tracers - scm_state%water_vapor_index = get_tracer_index(scm_state%tracer_names,"sphum") - scm_state%ozone_index = get_tracer_index(scm_state%tracer_names,"o3mr") - scm_state%cloud_water_index = get_tracer_index(scm_state%tracer_names,"liq_wat") - scm_state%cloud_ice_index = get_tracer_index(scm_state%tracer_names,"ice_wat") - scm_state%rain_index = get_tracer_index(scm_state%tracer_names,"rainwat") - scm_state%snow_index = get_tracer_index(scm_state%tracer_names,"snowwat") - scm_state%graupel_index = get_tracer_index(scm_state%tracer_names,"graupel") - scm_state%cloud_amount_index = get_tracer_index(scm_state%tracer_names,"cld_amt") - scm_state%cloud_droplet_nc_index = get_tracer_index(scm_state%tracer_names,"water_nc") - scm_state%cloud_ice_nc_index = get_tracer_index(scm_state%tracer_names,"ice_nc") - scm_state%rain_nc_index = get_tracer_index(scm_state%tracer_names,"rain_nc") - scm_state%snow_nc_index = get_tracer_index(scm_state%tracer_names,"snow_nc") - scm_state%graupel_nc_index = get_tracer_index(scm_state%tracer_names,"graupel_nc") - scm_state%tke_index = get_tracer_index(scm_state%tracer_names,"sgs_tke") - scm_state%water_friendly_aerosol_index = get_tracer_index(scm_state%tracer_names,"liq_aero") - scm_state%ice_friendly_aerosol_index = get_tracer_index(scm_state%tracer_names,"ice_aero") - scm_state%mass_weighted_rime_factor_index = get_tracer_index(scm_state%tracer_names,"q_rimef") - + scm_state%water_vapor_index = 1 + scm_state%ozone_index = 2 + scm_state%cloud_water_index = 3 + scm_state%cloud_ice_index = 4 + scm_state%rain_index = 5 + scm_state%snow_index = 6 + scm_state%graupel_index = 7 + scm_state%cloud_amount_index = 8 + scm_state%cloud_droplet_nc_index = 9 + scm_state%cloud_ice_nc_index = 10 + scm_state%rain_nc_index = 11 + scm_state%snow_nc_index = 12 + scm_state%graupel_nc_index = 13 + scm_state%tke_index = 14 + scm_state%water_friendly_aerosol_index = 15 + scm_state%ice_friendly_aerosol_index = 16 + scm_state%mass_weighted_rime_factor_index = 17 + scm_state%tracer_names(1) = 'vap_wat' + scm_state%tracer_names(2) = 'o3mr' + scm_state%tracer_names(3) = 'liq_wat' + scm_state%tracer_names(4) = 'ice_wat' + scm_state%tracer_names(5) = 'rainwat' + scm_state%tracer_names(6) = 'snowwat' + scm_state%tracer_names(7) = 'graupel' + scm_state%tracer_names(8) = 'cld_amt' + scm_state%tracer_names(9) = 'water_nc' + scm_state%tracer_names(10)= 'ice_nc' + scm_state%tracer_names(11)= 'rain_nc' + scm_state%tracer_names(12)= 'snow_nc' + scm_state%tracer_names(13)= 'graupel_nc' + scm_state%tracer_names(14)= 'sgs_tke' + scm_state%tracer_names(15)= 'liq_aero' + scm_state%tracer_names(16)= 'ice_aero' + scm_state%tracer_names(17)= 'q_rimef' scm_state%n_itt_swrad = int_zero scm_state%n_itt_lwrad = int_zero scm_state%n_itt_out = int_zero @@ -427,9 +437,9 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%init_day = int_zero scm_state%init_hour = int_zero - allocate(scm_state%pres_l(n_columns, 1, n_levels), scm_state%pres_i(n_columns, 1, n_levels+1), & - scm_state%exner_l(n_columns, 1, n_levels), scm_state%exner_i(n_columns, 1, n_levels+1), & - scm_state%geopotential_l(n_columns, 1, n_levels), scm_state%geopotential_i(n_columns, 1, n_levels+1)) + allocate(scm_state%pres_l(n_columns, n_levels), scm_state%pres_i(n_columns, n_levels+1), & + scm_state%exner_l(n_columns, n_levels), scm_state%exner_i(n_columns, n_levels+1), & + scm_state%geopotential_l(n_columns, n_levels), scm_state%geopotential_i(n_columns, n_levels+1)) scm_state%pres_l = real_zero scm_state%pres_i = real_zero scm_state%exner_l = real_zero @@ -437,41 +447,41 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%geopotential_l = real_zero scm_state%geopotential_i = real_zero - allocate(scm_state%a_k(1, n_levels+1), scm_state%b_k(1, n_levels+1), scm_state%si(n_columns, 1, n_levels+1), & - scm_state%sl(n_columns, 1, n_levels)) + allocate(scm_state%a_k(n_levels+1), scm_state%b_k(n_levels+1), scm_state%si(n_columns, n_levels+1), & + scm_state%sl(n_columns, n_levels)) scm_state%a_k = real_zero scm_state%b_k = real_zero scm_state%si = real_zero scm_state%sl = real_zero - allocate(scm_state%lat(n_columns,1), scm_state%lon(n_columns,1), scm_state%area(n_columns,1)) + allocate(scm_state%lat(n_columns), scm_state%lon(n_columns), scm_state%area(n_columns)) scm_state%lat = real_zero scm_state%lon = real_zero scm_state%area = real_one - allocate(scm_state%state_T(n_columns, 1, n_levels, n_time_levels), & - scm_state%state_u(n_columns, 1, n_levels, n_time_levels), scm_state%state_v(n_columns, 1, n_levels, n_time_levels), & - scm_state%state_tracer(n_columns, 1, n_levels, scm_state%n_tracers, n_time_levels)) + allocate(scm_state%state_T(n_columns, n_levels, n_time_levels), & + scm_state%state_u(n_columns, n_levels, n_time_levels), scm_state%state_v(n_columns, n_levels, n_time_levels), & + scm_state%state_tracer(n_columns, n_levels, scm_state%n_tracers, n_time_levels)) scm_state%state_T = real_zero scm_state%state_u = real_zero scm_state%state_v = real_zero scm_state%state_tracer = real_zero - allocate(scm_state%temp_tracer(n_columns, 1, n_levels, scm_state%n_tracers, n_time_levels), & - scm_state%temp_T(n_columns, 1, n_levels, n_time_levels), & - scm_state%temp_u(n_columns, 1, n_levels, n_time_levels), scm_state%temp_v(n_columns, 1, n_levels, n_time_levels)) - allocate(scm_state%stc(n_columns, 1, n_soil, n_time_levels)) - allocate(scm_state%smc(n_columns, 1, n_soil, n_time_levels)) - allocate(scm_state%slc(n_columns, 1, n_soil, n_time_levels)) + allocate(scm_state%temp_tracer(n_columns, n_levels, scm_state%n_tracers, n_time_levels), & + scm_state%temp_T(n_columns, n_levels, n_time_levels), & + scm_state%temp_u(n_columns, n_levels, n_time_levels), scm_state%temp_v(n_columns, n_levels, n_time_levels)) + allocate(scm_state%stc(n_columns, n_soil, n_time_levels)) + allocate(scm_state%smc(n_columns, n_soil, n_time_levels)) + allocate(scm_state%slc(n_columns, n_soil, n_time_levels)) scm_state%temp_tracer = real_zero scm_state%temp_T = real_zero scm_state%temp_u = real_zero scm_state%temp_v = real_zero - allocate(scm_state%w_ls(n_columns, n_levels), scm_state%omega(n_columns, 1, n_levels), scm_state%u_g(n_columns, n_levels), & + allocate(scm_state%w_ls(n_columns, n_levels), scm_state%omega(n_columns, n_levels), scm_state%u_g(n_columns, n_levels), & scm_state%v_g(n_columns, n_levels), scm_state%dT_dt_rad(n_columns, n_levels), scm_state%h_advec_thil(n_columns, n_levels), & scm_state%h_advec_qt(n_columns, n_levels), scm_state%v_advec_thil(n_columns, n_levels), & - scm_state%v_advec_qt(n_columns, n_levels), scm_state%pres_surf(n_columns,1), scm_state%T_surf(n_columns,1), & + scm_state%v_advec_qt(n_columns, n_levels), scm_state%pres_surf(n_columns), scm_state%T_surf(n_columns), & scm_state%u_nudge(n_columns, n_levels), scm_state%v_nudge(n_columns, n_levels), & scm_state%T_nudge(n_columns, n_levels), scm_state%thil_nudge(n_columns, n_levels), & scm_state%qt_nudge(n_columns, n_levels), scm_state%sh_flux(n_columns), scm_state%lh_flux(n_columns), & @@ -502,13 +512,13 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%qv_force_tend = real_zero scm_state%sfc_roughness_length_cm = real_one - allocate(scm_state%alvsf(n_columns,1), scm_state%alnsf(n_columns,1), scm_state%alvwf(n_columns,1), scm_state%alnwf(n_columns,1), & - scm_state%facsf(n_columns,1), scm_state%facwf(n_columns,1), scm_state%hprime(n_columns,1,14), & - scm_state%sfc_type(n_columns,1), scm_state%veg_type(n_columns,1), & - scm_state%veg_frac(n_columns,1), scm_state%slope_type(n_columns,1), scm_state%shdmin(n_columns,1), scm_state%shdmax(n_columns,1), & - scm_state%tg3(n_columns,1), scm_state%slmsk(n_columns,1), scm_state%canopy(n_columns,1), scm_state%hice(n_columns,1), scm_state%fice(n_columns,1), & - scm_state%tisfc(n_columns,1), scm_state%snwdph(n_columns,1), scm_state%snoalb(n_columns,1), scm_state%sncovr(n_columns,1), scm_state%uustar(n_columns,1), & - scm_state%soil_type(n_columns,1)) + allocate(scm_state%alvsf(n_columns), scm_state%alnsf(n_columns), scm_state%alvwf(n_columns), scm_state%alnwf(n_columns), & + scm_state%facsf(n_columns), scm_state%facwf(n_columns), scm_state%hprime(n_columns,14), & + scm_state%sfc_type(n_columns), scm_state%veg_type(n_columns), & + scm_state%veg_frac(n_columns), scm_state%slope_type(n_columns), scm_state%shdmin(n_columns), scm_state%shdmax(n_columns), & + scm_state%tg3(n_columns), scm_state%slmsk(n_columns), scm_state%canopy(n_columns), scm_state%hice(n_columns), scm_state%fice(n_columns), & + scm_state%tisfc(n_columns), scm_state%snwdph(n_columns), scm_state%snoalb(n_columns), scm_state%sncovr(n_columns), scm_state%uustar(n_columns), & + scm_state%soil_type(n_columns)) scm_state%alvsf = real_zero scm_state%alnsf = real_zero @@ -535,14 +545,14 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%uustar = real_zero scm_state%soil_type = real_zero - allocate(scm_state%tvxy(n_columns,1), scm_state%tgxy(n_columns,1), scm_state%tahxy(n_columns,1), scm_state%canicexy(n_columns,1), & - scm_state%canliqxy(n_columns,1), scm_state%eahxy(n_columns,1), scm_state%cmxy(n_columns,1), scm_state%chxy(n_columns,1), & - scm_state%fwetxy(n_columns,1), scm_state%sneqvoxy(n_columns,1), scm_state%alboldxy(n_columns,1), scm_state%qsnowxy(n_columns,1), & - scm_state%wslakexy(n_columns,1), scm_state%taussxy(n_columns,1), scm_state%waxy(n_columns,1), scm_state%wtxy(n_columns,1), & - scm_state%zwtxy(n_columns,1), scm_state%xlaixy(n_columns,1), scm_state%xsaixy(n_columns,1), scm_state%lfmassxy(n_columns,1), & - scm_state%stmassxy(n_columns,1), scm_state%rtmassxy(n_columns,1), scm_state%woodxy(n_columns,1), scm_state%stblcpxy(n_columns,1), & - scm_state%fastcpxy(n_columns,1), scm_state%smcwtdxy(n_columns,1), scm_state%deeprechxy(n_columns,1), scm_state%rechxy(n_columns,1), & - scm_state%snowxy(n_columns,1)) + allocate(scm_state%tvxy(n_columns), scm_state%tgxy(n_columns), scm_state%tahxy(n_columns), scm_state%canicexy(n_columns), & + scm_state%canliqxy(n_columns), scm_state%eahxy(n_columns), scm_state%cmxy(n_columns), scm_state%chxy(n_columns), & + scm_state%fwetxy(n_columns), scm_state%sneqvoxy(n_columns), scm_state%alboldxy(n_columns), scm_state%qsnowxy(n_columns), & + scm_state%wslakexy(n_columns), scm_state%taussxy(n_columns), scm_state%waxy(n_columns), scm_state%wtxy(n_columns), & + scm_state%zwtxy(n_columns), scm_state%xlaixy(n_columns), scm_state%xsaixy(n_columns), scm_state%lfmassxy(n_columns), & + scm_state%stmassxy(n_columns), scm_state%rtmassxy(n_columns), scm_state%woodxy(n_columns), scm_state%stblcpxy(n_columns), & + scm_state%fastcpxy(n_columns), scm_state%smcwtdxy(n_columns), scm_state%deeprechxy(n_columns), scm_state%rechxy(n_columns), & + scm_state%snowxy(n_columns)) scm_state%tvxy = real_zero scm_state%tgxy = real_zero @@ -574,8 +584,8 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%rechxy = real_zero scm_state%snowxy = real_zero - allocate(scm_state%snicexy(n_columns,1,n_snow), scm_state%snliqxy(n_columns,1,n_snow), scm_state%tsnoxy(n_columns,1,n_snow), & - scm_state%smoiseq(n_columns,1,n_soil), scm_state%zsnsoxy(n_columns,1,n_snow + n_soil)) + allocate(scm_state%snicexy(n_columns,n_snow), scm_state%snliqxy(n_columns,n_snow), scm_state%tsnoxy(n_columns,n_snow), & + scm_state%smoiseq(n_columns,n_soil), scm_state%zsnsoxy(n_columns,n_snow + n_soil)) scm_state%snicexy = real_zero scm_state%snliqxy = real_zero @@ -772,201 +782,169 @@ subroutine physics_create(physics, n_columns) zeroes_8(:) = int_zero kind_phys_zero = real_zero - allocate(physics%Model(n_columns), physics%Statein(n_columns), physics%Stateout(n_columns), physics%Sfcprop(n_columns), & - physics%Coupling(n_columns), physics%Grid(n_columns), physics%Tbd(n_columns), physics%Cldprop(n_columns), & - physics%Radtend(n_columns), physics%Diag(n_columns), physics%Interstitial(n_columns), & - physics%Init_parm(n_columns)) - - do i=1, n_columns - physics%Init_parm(i)%me = int_zero - physics%Init_parm(i)%master = int_zero - physics%Init_parm(i)%isc = int_one - physics%Init_parm(i)%jsc = int_one - physics%Init_parm(i)%nx = int_one - physics%Init_parm(i)%ny = int_one - physics%Init_parm(i)%levs = int_one - physics%Init_parm(i)%cnx = int_one - physics%Init_parm(i)%cny = int_one - physics%Init_parm(i)%gnx = int_one - physics%Init_parm(i)%gny = int_one - physics%Init_parm(i)%nlunit = int_one - physics%Init_parm(i)%logunit= 10 + i - physics%Init_parm(i)%bdat(:) = zeroes_8(:) - physics%Init_parm(i)%cdat(:) = zeroes_8(:) - physics%Init_parm(i)%dt_dycore = kind_phys_zero - physics%Init_parm(i)%dt_phys = kind_phys_zero - physics%Init_parm(i)%iau_offset = int_zero - physics%Init_parm(i)%ak => null() - physics%Init_parm(i)%bk => null() - physics%Init_parm(i)%xlon => null() - physics%Init_parm(i)%xlat => null() - physics%Init_parm(i)%area => null() - physics%Init_parm(i)%tracer_names => null() - physics%Init_parm(i)%blksz => null() - physics%Init_parm(i)%restart = .false. - physics%Init_parm(i)%hydrostatic = .true. - physics%Init_parm(i)%tile_num = int_one - end do + physics%Init_parm%me = int_zero + physics%Init_parm%master = int_zero + physics%Init_parm%isc = int_one + physics%Init_parm%jsc = int_one + physics%Init_parm%nx = int_one + physics%Init_parm%ny = int_one + physics%Init_parm%levs = int_one + physics%Init_parm%cnx = int_one + physics%Init_parm%cny = int_one + physics%Init_parm%gnx = int_one + physics%Init_parm%gny = int_one + physics%Init_parm%nlunit = int_one + physics%Init_parm%logunit= 10 + physics%Init_parm%bdat(:) = zeroes_8(:) + physics%Init_parm%cdat(:) = zeroes_8(:) + physics%Init_parm%dt_dycore = kind_phys_zero + physics%Init_parm%dt_phys = kind_phys_zero + physics%Init_parm%iau_offset = int_zero + physics%Init_parm%ak => null() + physics%Init_parm%bk => null() + physics%Init_parm%xlon => null() + physics%Init_parm%xlat => null() + physics%Init_parm%area => null() + physics%Init_parm%tracer_names => null() + physics%Init_parm%blksz => null() + physics%Init_parm%restart = .false. + physics%Init_parm%hydrostatic = .true. + physics%Init_parm%tile_num = int_one end subroutine physics_create - subroutine physics_associate(physics, scm_state, col) + subroutine physics_associate(physics, scm_state) class(physics_type) :: physics type(scm_state_type), target, intent(in) :: scm_state - integer, intent(in) :: col - - physics%Statein(col)%phii => scm_state%geopotential_i(col,:,:) - physics%Statein(col)%prsi => scm_state%pres_i(col,:,:) - physics%Statein(col)%prsik => scm_state%exner_i(col,:,:) - physics%Statein(col)%phil => scm_state%geopotential_l(col,:,:) - physics%Statein(col)%prsl => scm_state%pres_l(col,:,:) - physics%Statein(col)%prslk => scm_state%exner_l(col,:,:) - - physics%Statein(col)%pgr => scm_state%pres_surf(col,:) - physics%Statein(col)%ugrs => scm_state%state_u(col,:,:,1) - physics%Statein(col)%vgrs => scm_state%state_v(col,:,:,1) - physics%Statein(col)%vvl => scm_state%omega(col,:,:) - physics%Statein(col)%tgrs => scm_state%state_T(col,:,:,1) - physics%Statein(col)%qgrs => scm_state%state_tracer(col,:,:,:,1) - - physics%Sfcprop(col)%tsfc => scm_state%T_surf(col,:) - physics%Sfcprop(col)%tref => scm_state%T_surf(col,:) - physics%Sfcprop(col)%tsfco => scm_state%T_surf(col,:) - physics%Sfcprop(col)%tisfc => scm_state%T_surf(col,:) !sea ice temperature is the same as SST for now? - physics%Sfcprop(col)%slmsk => scm_state%sfc_type(col,:) - physics%Sfcprop(col)%vtype => scm_state%veg_type(col,:) - physics%Sfcprop(col)%vfrac => scm_state%veg_frac(col,:) - physics%Sfcprop(col)%slope => scm_state%slope_type(col,:) - physics%Interstitial(col)%sigmaf = min(scm_state%veg_frac(col,:),0.01) - physics%Sfcprop(col)%shdmax => scm_state%shdmax(col,:) - physics%Sfcprop(col)%shdmin => scm_state%shdmin(col,:) - physics%Sfcprop(col)%tg3 => scm_state%tg3(col,:) - physics%Sfcprop(col)%uustar => scm_state%uustar(col,:) - physics%Sfcprop(col)%stype => scm_state%soil_type(col,:) - physics%Sfcprop(col)%alvsf => scm_state%alvsf(col,:) - physics%Sfcprop(col)%alnsf => scm_state%alnsf(col,:) - physics%Sfcprop(col)%hprime=> scm_state%hprime(col,:,:) - physics%Sfcprop(col)%alvwf => scm_state%alvwf(col,:) - physics%Sfcprop(col)%alnwf => scm_state%alnwf(col,:) - physics%Sfcprop(col)%facsf => scm_state%facsf(col,:) - physics%Sfcprop(col)%facwf => scm_state%facwf(col,:) - - physics%Sfcprop(col)%stc => scm_state%stc(col,:,:,1) - physics%Sfcprop(col)%smc => scm_state%smc(col,:,:,1) - physics%Sfcprop(col)%slc => scm_state%slc(col,:,:,1) + + integer :: i + + physics%Statein%phii => scm_state%geopotential_i + physics%Statein%prsi => scm_state%pres_i + physics%Statein%prsik => scm_state%exner_i + physics%Statein%phil => scm_state%geopotential_l + physics%Statein%prsl => scm_state%pres_l + physics%Statein%prslk => scm_state%exner_l + + physics%Statein%pgr => scm_state%pres_surf + physics%Statein%ugrs => scm_state%state_u(:,:,1) + physics%Statein%vgrs => scm_state%state_v(:,:,1) + physics%Statein%vvl => scm_state%omega + physics%Statein%tgrs => scm_state%state_T(:,:,1) + physics%Statein%qgrs => scm_state%state_tracer(:,:,:,1) + + physics%Sfcprop%tsfc => scm_state%T_surf + physics%Sfcprop%tref => scm_state%T_surf + physics%Sfcprop%tsfco => scm_state%T_surf + physics%Sfcprop%tisfc => scm_state%T_surf !sea ice temperature is the same as SST for now? + physics%Sfcprop%slmsk => scm_state%sfc_type + physics%Sfcprop%vtype => scm_state%veg_type + physics%Sfcprop%vfrac => scm_state%veg_frac + physics%Sfcprop%slope => scm_state%slope_type + physics%Interstitial%sigmaf = min(scm_state%veg_frac,0.01) + physics%Sfcprop%shdmax => scm_state%shdmax + physics%Sfcprop%shdmin => scm_state%shdmin + physics%Sfcprop%tg3 => scm_state%tg3 + physics%Sfcprop%uustar => scm_state%uustar + physics%Sfcprop%stype => scm_state%soil_type + physics%Sfcprop%alvsf => scm_state%alvsf + physics%Sfcprop%alnsf => scm_state%alnsf + physics%Sfcprop%hprime=> scm_state%hprime + physics%Sfcprop%alvwf => scm_state%alvwf + physics%Sfcprop%alnwf => scm_state%alnwf + physics%Sfcprop%facsf => scm_state%facsf + physics%Sfcprop%facwf => scm_state%facwf + + physics%Sfcprop%stc => scm_state%stc(:,:,1) + physics%Sfcprop%smc => scm_state%smc(:,:,1) + physics%Sfcprop%slc => scm_state%slc(:,:,1) !GJF : the following logic was introduced into FV3GFS_io.F90 as part of the fractional landmask update (additional logic exists in the same file if the fractional landmask is actually used!) - if (physics%Sfcprop(col)%slmsk(1) < 0.1 .or. physics%Sfcprop(col)%slmsk(1) > 1.9) then - physics%Sfcprop(col)%landfrac(1) = 0.0 - if (physics%Sfcprop(col)%oro_uf(1) > 0.01) then - physics%Sfcprop(col)%lakefrac(1) = 1.0 ! lake + do i = 1, scm_state%n_cols + if (physics%Sfcprop%slmsk(i) < 0.1 .or. physics%Sfcprop%slmsk(i) > 1.9) then + physics%Sfcprop%landfrac(i) = 0.0 + if (physics%Sfcprop%oro_uf(i) > 0.01) then + physics%Sfcprop%lakefrac(i) = 1.0 ! lake + else + physics%Sfcprop%lakefrac(i) = 0.0 ! ocean + endif else - physics%Sfcprop(col)%lakefrac(1) = 0.0 ! ocean - endif - else - physics%Sfcprop(col)%landfrac(1) = 1.0 - end if - if (physics%Sfcprop(col)%lakefrac(1) > 0.0) then - physics%Sfcprop(col)%oceanfrac(1) = 0.0 ! lake & ocean don't coexist in a cell, lake dominates - else - physics%Sfcprop(col)%oceanfrac(1) = 1.0 - physics%Sfcprop(col)%landfrac(1) !LHS:ocean frac [0:1] - end if + physics%Sfcprop%landfrac(i) = 1.0 + end if + if (physics%Sfcprop%lakefrac(i) > 0.0) then + physics%Sfcprop%oceanfrac(i) = 0.0 ! lake & ocean don't coexist in a cell, lake dominates + else + physics%Sfcprop%oceanfrac(i) = 1.0 - physics%Sfcprop%landfrac(i) !LHS:ocean frac [0:1] + end if + end do !GJF if(scm_state%time_scheme == 2) then - physics%Stateout(col)%gu0 => scm_state%state_u(col,:,:,2) - physics%Stateout(col)%gv0 => scm_state%state_v(col,:,:,2) - physics%Stateout(col)%gt0 => scm_state%state_T(col,:,:,2) - physics%Stateout(col)%gq0 => scm_state%state_tracer(col,:,:,:,2) + physics%Stateout%gu0 => scm_state%state_u(:,:,2) + physics%Stateout%gv0 => scm_state%state_v(:,:,2) + physics%Stateout%gt0 => scm_state%state_T(:,:,2) + physics%Stateout%gq0 => scm_state%state_tracer(:,:,:,2) else - physics%Stateout(col)%gu0 => scm_state%state_u(col,:,:,1) - physics%Stateout(col)%gv0 => scm_state%state_v(col,:,:,1) - physics%Stateout(col)%gt0 => scm_state%state_T(col,:,:,1) - physics%Stateout(col)%gq0 => scm_state%state_tracer(col,:,:,:,1) + physics%Stateout%gu0 => scm_state%state_u(:,:,1) + physics%Stateout%gv0 => scm_state%state_v(:,:,1) + physics%Stateout%gt0 => scm_state%state_T(:,:,1) + physics%Stateout%gq0 => scm_state%state_tracer(:,:,:,1) endif - physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm + physics%Sfcprop%zorl => scm_state%sfc_roughness_length_cm if(scm_state%sfc_flux_spec) then - physics%Sfcprop(col)%spec_sh_flux => scm_state%sh_flux - physics%Sfcprop(col)%spec_lh_flux => scm_state%lh_flux + physics%Sfcprop%spec_sh_flux => scm_state%sh_flux + physics%Sfcprop%spec_lh_flux => scm_state%lh_flux endif if(scm_state%model_ics) then - !physics%Sfcprop(col)%zorl => scm_state%sfc_roughness_length_cm - physics%Sfcprop(col)%canopy => scm_state%canopy(col,:) - physics%Sfcprop(col)%hice => scm_state%hice(col,:) - physics%Sfcprop(col)%fice => scm_state%fice(col,:) - physics%Sfcprop(col)%tisfc => scm_state%tisfc(col,:) - physics%Sfcprop(col)%snowd => scm_state%snwdph(col,:) - physics%Sfcprop(col)%snoalb => scm_state%snoalb(col,:) - physics%Sfcprop(col)%sncovr => scm_state%sncovr(col,:) - if (physics%Model(col)%lsm == physics%Model(col)%lsm_noahmp) then - physics%Sfcprop(col)%snowxy => scm_state%snowxy(col,:) - physics%Sfcprop(col)%tvxy => scm_state%tvxy(col,:) - physics%Sfcprop(col)%tgxy => scm_state%tgxy(col,:) - physics%Sfcprop(col)%canicexy => scm_state%canicexy(col,:) - physics%Sfcprop(col)%canliqxy => scm_state%canliqxy(col,:) - physics%Sfcprop(col)%eahxy => scm_state%eahxy(col,:) - physics%Sfcprop(col)%tahxy => scm_state%tahxy(col,:) - physics%Sfcprop(col)%cmxy => scm_state%cmxy(col,:) - physics%Sfcprop(col)%chxy => scm_state%chxy(col,:) - physics%Sfcprop(col)%fwetxy => scm_state%fwetxy(col,:) - physics%Sfcprop(col)%sneqvoxy => scm_state%sneqvoxy(col,:) - physics%Sfcprop(col)%alboldxy => scm_state%alboldxy(col,:) - physics%Sfcprop(col)%qsnowxy => scm_state%qsnowxy(col,:) - physics%Sfcprop(col)%wslakexy => scm_state%wslakexy(col,:) - physics%Sfcprop(col)%zwtxy => scm_state%zwtxy(col,:) - physics%Sfcprop(col)%waxy => scm_state%waxy(col,:) - physics%Sfcprop(col)%wtxy => scm_state%wtxy(col,:) - physics%Sfcprop(col)%lfmassxy => scm_state%lfmassxy(col,:) - physics%Sfcprop(col)%rtmassxy => scm_state%rtmassxy(col,:) - physics%Sfcprop(col)%stmassxy => scm_state%stmassxy(col,:) - physics%Sfcprop(col)%woodxy => scm_state%woodxy(col,:) - physics%Sfcprop(col)%stblcpxy => scm_state%stblcpxy(col,:) - physics%Sfcprop(col)%fastcpxy => scm_state%fastcpxy(col,:) - physics%Sfcprop(col)%xsaixy => scm_state%xsaixy(col,:) - physics%Sfcprop(col)%xlaixy => scm_state%xlaixy(col,:) - physics%Sfcprop(col)%taussxy => scm_state%taussxy(col,:) - physics%Sfcprop(col)%smcwtdxy => scm_state%smcwtdxy(col,:) - physics%Sfcprop(col)%deeprechxy => scm_state%deeprechxy(col,:) - physics%Sfcprop(col)%rechxy => scm_state%rechxy(col,:) - - physics%Sfcprop(col)%snicexy => scm_state%snicexy(col,:,:) - physics%Sfcprop(col)%snliqxy => scm_state%snliqxy(col,:,:) - physics%Sfcprop(col)%tsnoxy => scm_state%tsnoxy(col,:,:) - physics%Sfcprop(col)%smoiseq => scm_state%smoiseq(col,:,:) - physics%Sfcprop(col)%zsnsoxy => scm_state%zsnsoxy(col,:,:) + !physics%Sfcprop%zorl => scm_state%sfc_roughness_length_cm + physics%Sfcprop%canopy => scm_state%canopy + physics%Sfcprop%hice => scm_state%hice + physics%Sfcprop%fice => scm_state%fice + physics%Sfcprop%tisfc => scm_state%tisfc + physics%Sfcprop%snowd => scm_state%snwdph + physics%Sfcprop%snoalb => scm_state%snoalb + physics%Sfcprop%sncovr => scm_state%sncovr + if (physics%Model%lsm == physics%Model%lsm_noahmp) then + physics%Sfcprop%snowxy => scm_state%snowxy + physics%Sfcprop%tvxy => scm_state%tvxy + physics%Sfcprop%tgxy => scm_state%tgxy + physics%Sfcprop%canicexy => scm_state%canicexy + physics%Sfcprop%canliqxy => scm_state%canliqxy + physics%Sfcprop%eahxy => scm_state%eahxy + physics%Sfcprop%tahxy => scm_state%tahxy + physics%Sfcprop%cmxy => scm_state%cmxy + physics%Sfcprop%chxy => scm_state%chxy + physics%Sfcprop%fwetxy => scm_state%fwetxy + physics%Sfcprop%sneqvoxy => scm_state%sneqvoxy + physics%Sfcprop%alboldxy => scm_state%alboldxy + physics%Sfcprop%qsnowxy => scm_state%qsnowxy + physics%Sfcprop%wslakexy => scm_state%wslakexy + physics%Sfcprop%zwtxy => scm_state%zwtxy + physics%Sfcprop%waxy => scm_state%waxy + physics%Sfcprop%wtxy => scm_state%wtxy + physics%Sfcprop%lfmassxy => scm_state%lfmassxy + physics%Sfcprop%rtmassxy => scm_state%rtmassxy + physics%Sfcprop%stmassxy => scm_state%stmassxy + physics%Sfcprop%woodxy => scm_state%woodxy + physics%Sfcprop%stblcpxy => scm_state%stblcpxy + physics%Sfcprop%fastcpxy => scm_state%fastcpxy + physics%Sfcprop%xsaixy => scm_state%xsaixy + physics%Sfcprop%xlaixy => scm_state%xlaixy + physics%Sfcprop%taussxy => scm_state%taussxy + physics%Sfcprop%smcwtdxy => scm_state%smcwtdxy + physics%Sfcprop%deeprechxy => scm_state%deeprechxy + physics%Sfcprop%rechxy => scm_state%rechxy + + physics%Sfcprop%snicexy => scm_state%snicexy + physics%Sfcprop%snliqxy => scm_state%snliqxy + physics%Sfcprop%tsnoxy => scm_state%tsnoxy + physics%Sfcprop%smoiseq => scm_state%smoiseq + physics%Sfcprop%zsnsoxy => scm_state%zsnsoxy endif endif end subroutine physics_associate - - function get_tracer_index (tracer_names, name) - - character(len=32), intent(in) :: tracer_names(:) - character(len=*), intent(in) :: name - - !--- local variables - integer :: get_tracer_index - integer :: i - integer, parameter :: no_tracer = -99 - - get_tracer_index = no_tracer - - do i=1, size(tracer_names) - if (trim(name) == trim(tracer_names(i))) then - get_tracer_index = i - exit - endif - enddo - - if (get_tracer_index == no_tracer) then - print *,'tracer with name '//trim(name)//' not found' - else - print *,'tracer FOUND:',trim(name) - endif - - return - end function get_tracer_index end module gmtb_scm_type_defs diff --git a/scm/src/gmtb_scm_type_defs.meta b/scm/src/gmtb_scm_type_defs.meta index 7a620d23..b80512d9 100644 --- a/scm/src/gmtb_scm_type_defs.meta +++ b/scm/src/gmtb_scm_type_defs.meta @@ -1,108 +1,72 @@ [ccpp-arg-table] name = physics_type type = ddt -[Model(ccpp_block_number)] +[Model] standard_name = GFS_control_type_instance long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type -[Cldprop(ccpp_block_number)] +[Cldprop] standard_name = GFS_cldprop_type_instance long_name = instance of derived type GFS_cldprop_type units = DDT dimensions = () type = GFS_cldprop_type -[Coupling(ccpp_block_number)] +[Coupling] standard_name = GFS_coupling_type_instance long_name = instance of derived type GFS_coupling_type units = DDT dimensions = () type = GFS_coupling_type -[Diag(ccpp_block_number)] +[Diag] standard_name = GFS_diag_type_instance long_name = instance of derived type GFS_diag_type units = DDT dimensions = () type = GFS_diag_type -[Grid(ccpp_block_number)] +[Grid] standard_name = GFS_grid_type_instance long_name = instance of derived type GFS_grid_type units = DDT dimensions = () type = GFS_grid_type -[Radtend(ccpp_block_number)] +[Radtend] standard_name = GFS_radtend_type_instance long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type -[Sfcprop(ccpp_block_number)] +[Sfcprop] standard_name = GFS_sfcprop_type_instance long_name = instance of derived type GFS_sfcprop_type units = DDT dimensions = () type = GFS_sfcprop_type -[Statein(ccpp_block_number)] +[Statein] standard_name = GFS_statein_type_instance long_name = instance of derived type GFS_statein_type units = DDT dimensions = () type = GFS_statein_type -[Stateout(ccpp_block_number)] +[Stateout] standard_name = GFS_stateout_type_instance long_name = instance of derived type GFS_stateout_type units = DDT dimensions = () type = GFS_stateout_type -[Tbd(ccpp_block_number)] +[Tbd] standard_name = GFS_tbd_type_instance long_name = instance of derived type GFS_tbd_type units = DDT dimensions = () type = GFS_tbd_type -[Interstitial(ccpp_block_number)] +[Interstitial] standard_name = GFS_interstitial_type_instance long_name = instance of derived type GFS_interstitial_type units = DDT dimensions = () type = GFS_interstitial_type -[Statein(:)] - standard_name = GFS_statein_type_instance_all_blocks - long_name = instance of derived type GFS_statein_type - units = DDT - dimensions = (number_of_blocks) - type = GFS_statein_type -[Grid(:)] - standard_name = GFS_grid_type_instance_all_blocks - long_name = instance of derived type GFS_grid_type - units = DDT - dimensions = (number_of_blocks) - type = GFS_grid_type -[Tbd(:)] - standard_name = GFS_tbd_type_instance_all_blocks - long_name = instance of derived type GFS_tbd_type - units = DDT - dimensions = (number_of_blocks) - type = GFS_tbd_type -[Sfcprop(:)] - standard_name = GFS_sfcprop_type_instance_all_blocks - long_name = instance of derived type GFS_sfcprop_type - units = DDT - dimensions = (number_of_blocks) - type = GFS_sfcprop_type -[Cldprop(:)] - standard_name = GFS_cldprop_type_instance_all_blocks - long_name = instance of derived type GFS_cldprop_type - units = DDT - dimensions = (number_of_blocks) - type = GFS_cldprop_type -[Diag(:)] - standard_name = GFS_diag_type_instance_all_blocks - long_name = instance of derived type GFS_diag_type - units = DDT - dimensions = (number_of_blocks) - type = GFS_diag_type ######################################################################## [ccpp-arg-table] diff --git a/scm/src/gmtb_scm_vgrid.F90 b/scm/src/gmtb_scm_vgrid.F90 index 95f022a5..bbd8ee30 100644 --- a/scm/src/gmtb_scm_vgrid.F90 +++ b/scm/src/gmtb_scm_vgrid.F90 @@ -82,7 +82,7 @@ subroutine get_GFS_vgrid(scm_input, scm_state, error) read(1,'(a)',iostat=ierr) line !> - Read in the coefficient data. do i=1, scm_state%n_levels+1 - read(1,file_format) scm_state%a_k(1,i), scm_state%b_k(1,i) + read(1,file_format) scm_state%a_k(i), scm_state%b_k(i) end do close(1) @@ -91,19 +91,19 @@ subroutine get_GFS_vgrid(scm_input, scm_state, error) p0 = scm_input%input_pres_surf(1) pres_sfc_inv = 1.0/p0 do i=1, scm_state%n_levels+1 - scm_state%pres_i(:,1,i) = scm_state%a_k(1,i) + scm_state%b_k(1,i)*p0 - scm_state%si(:,1,i) = scm_state%a_k(1,i)*pres_sfc_inv + scm_state%b_k(1,i) - scm_state%exner_i(:,1,i) = (scm_state%pres_i(:,1,i)/1.0E5)**con_rocp + scm_state%pres_i(:,i) = scm_state%a_k(i) + scm_state%b_k(i)*p0 + scm_state%si(:,i) = scm_state%a_k(i)*pres_sfc_inv + scm_state%b_k(i) + scm_state%exner_i(:,i) = (scm_state%pres_i(:,i)/1.0E5)**con_rocp end do !> - Calculate layer center pressures, sigma, and exner function. do i=1, scm_state%n_levels - scm_state%pres_l(:,1,i) = ((1.0/(con_rocp+1.0))*& - (scm_state%pres_i(:,1,i)**(con_rocp+1.0) - scm_state%pres_i(:,1,i+1)**(con_rocp+1.0))/ & - (scm_state%pres_i(:,1,i) - scm_state%pres_i(:,1,i+1)))**(1.0/con_rocp) - scm_state%sl(:,1,i) = 0.5*(scm_state%si(:,1,i) + scm_state%si(:,1,i+1)) + scm_state%pres_l(:,i) = ((1.0/(con_rocp+1.0))*& + (scm_state%pres_i(:,i)**(con_rocp+1.0) - scm_state%pres_i(:,i+1)**(con_rocp+1.0))/ & + (scm_state%pres_i(:,i) - scm_state%pres_i(:,i+1)))**(1.0/con_rocp) + scm_state%sl(:,i) = 0.5*(scm_state%si(:,i) + scm_state%si(:,i+1)) - scm_state%exner_l(:,1,i) = (scm_state%pres_l(:,1,i)/1.0E5)**con_rocp + scm_state%exner_l(:,i) = (scm_state%pres_l(:,i)/1.0E5)**con_rocp end do !> @} @@ -1001,16 +1001,16 @@ subroutine get_FV3_vgrid(scm_input, scm_state) ks = 5 do k=1,km+1 - scm_state%a_k(1,k) = a24(k) - scm_state%b_k(1,k) = b24(k) + scm_state%a_k(k) = a24(k) + scm_state%b_k(k) = b24(k) enddo case (26) ks = 7 do k=1,km+1 - scm_state%a_k(1,k) = a26(k) - scm_state%b_k(1,k) = b26(k) + scm_state%a_k(k) = a26(k) + scm_state%b_k(k) = b26(k) enddo case (32) @@ -1020,51 +1020,51 @@ subroutine get_FV3_vgrid(scm_input, scm_state) ks = 7 #endif do k=1,km+1 - scm_state%a_k(1,k) = a32(k) - scm_state%b_k(1,k) = b32(k) + scm_state%a_k(k) = a32(k) + scm_state%b_k(k) = b32(k) enddo case (47) ! ks = 27 ! high-res trop-strat ks = 20 ! Oct 23, 2012 do k=1,km+1 - scm_state%a_k(1,k) = a47(k) - scm_state%b_k(1,k) = b47(k) + scm_state%a_k(k) = a47(k) + scm_state%b_k(k) = b47(k) enddo case (48) ks = 28 do k=1,km+1 - scm_state%a_k(1,k) = a48(k) - scm_state%b_k(1,k) = b48(k) + scm_state%a_k(k) = a48(k) + scm_state%b_k(k) = b48(k) enddo case (52) ks = 35 ! pint = 223 do k=1,km+1 - scm_state%a_k(1,k) = a52(k) - scm_state%b_k(1,k) = b52(k) + scm_state%a_k(k) = a52(k) + scm_state%b_k(k) = b52(k) enddo case (54) ks = 11 ! pint = 109.4 do k=1,km+1 - scm_state%a_k(1,k) = a54(k) - scm_state%b_k(1,k) = b54(k) + scm_state%a_k(k) = a54(k) + scm_state%b_k(k) = b54(k) enddo case (56) ks = 26 do k=1,km+1 - scm_state%a_k(1,k) = a56(k) - scm_state%b_k(1,k) = b56(k) + scm_state%a_k(k) = a56(k) + scm_state%b_k(k) = b56(k) enddo case (60) ks = 37 do k=1,km+1 - scm_state%a_k(1,k) = a60(k) - scm_state%b_k(1,k) = b60(k) + scm_state%a_k(k) = a60(k) + scm_state%b_k(k) = b60(k) enddo @@ -1075,37 +1075,37 @@ subroutine get_FV3_vgrid(scm_input, scm_state) ks = 46 #endif do k=1,km+1 - scm_state%a_k(1,k) = a64(k) - scm_state%b_k(1,k) = b64(k) + scm_state%a_k(k) = a64(k) + scm_state%b_k(k) = b64(k) enddo !-->cjg case (68) ks = 27 do k=1,km+1 - scm_state%a_k(1,k) = a68(k) - scm_state%b_k(1,k) = b68(k) + scm_state%a_k(k) = a68(k) + scm_state%b_k(k) = b68(k) enddo case (96) ks = 27 do k=1,km+1 - scm_state%a_k(1,k) = a96(k) - scm_state%b_k(1,k) = b96(k) + scm_state%a_k(k) = a96(k) + scm_state%b_k(k) = b96(k) enddo !<--cjg case (100) ks = 38 do k=1,km+1 - scm_state%a_k(1,k) = a100(k) - scm_state%b_k(1,k) = b100(k) + scm_state%a_k(k) = a100(k) + scm_state%b_k(k) = b100(k) enddo case (104) ks = 73 do k=1,km+1 - scm_state%a_k(1,k) = a104(k) - scm_state%b_k(1,k) = b104(k) + scm_state%a_k(k) = a104(k) + scm_state%b_k(k) = b104(k) enddo #ifndef TEST_GWAVES @@ -1138,22 +1138,22 @@ subroutine get_FV3_vgrid(scm_input, scm_state) if(ks /= 0) then do k=1,ks - scm_state%a_k(1,k) = press(k) - scm_state%b_k(1,k) = 0. + scm_state%a_k(k) = press(k) + scm_state%b_k(k) = 0. enddo endif pint = press(ks+1) do k=ks+1,km - scm_state%a_k(1,k) = pint*(press(km)-press(k))/(press(km)-pint) - scm_state%b_k(1,k) = (press(k) - scm_state%a_k(1,k)) / press(km+1) + scm_state%a_k(k) = pint*(press(km)-press(k))/(press(km)-pint) + scm_state%b_k(k) = (press(k) - scm_state%a_k(k)) / press(km+1) enddo - scm_state%a_k(1,km+1) = 0. - scm_state%b_k(1,km+1) = 1. + scm_state%a_k(km+1) = 0. + scm_state%b_k(km+1) = 1. ! do k=2,km - ! scm_state%b_k(1,k) = real(k-1) / real(km) - ! scm_state%a_k(1,k) = pt * ( 1. - scm_state%b_k(1,k) ) + ! scm_state%b_k(k) = real(k-1) / real(km) + ! scm_state%a_k(k) = pt * ( 1. - scm_state%b_k(k) ) ! enddo #endif @@ -1186,8 +1186,8 @@ subroutine get_FV3_vgrid(scm_input, scm_state) ptop = a63(1) pint = a63(ks+1) do k=1,km+1 - scm_state%a_k(1,k) = a63(k) - scm_state%b_k(1,k) = b63(k) + scm_state%a_k(k) = a63(k) + scm_state%b_k(k) = b63(k) enddo #else case (63) @@ -1215,8 +1215,8 @@ subroutine get_FV3_vgrid(scm_input, scm_state) ptop = a125(1) pint = a125(ks+1) do k=1,km+1 - scm_state%a_k(1,k) = a125(k) - scm_state%b_k(1,k) = b125(k) + scm_state%a_k(k) = a125(k) + scm_state%b_k(k) = b125(k) enddo case default @@ -1226,7 +1226,7 @@ subroutine get_FV3_vgrid(scm_input, scm_state) !-------------------------------------------------- call gw_1d(km, 1000.E2, scm_state%a_k, scm_state%b_k, ptop, 10.E3, pt1) ks = 0 - pint = scm_state%a_k(1,1) + pint = scm_state%a_k(1) #else !---------------------------------------------------------------- @@ -1238,22 +1238,22 @@ subroutine get_FV3_vgrid(scm_input, scm_state) ! pint = pt + 0.5*1.E5/real(km) ! SJL: 20120327 pint = pt + 1.E5/real(km) - scm_state%a_k(1,1) = pt - scm_state%b_k(1,1) = 0. - scm_state%a_k(1,2) = pint - scm_state%b_k(1,2) = 0. + scm_state%a_k(1) = pt + scm_state%b_k(1) = 0. + scm_state%a_k(2) = pint + scm_state%b_k(2) = 0. do k=3,km+1 - scm_state%b_k(1,k) = real(k-2) / real(km-1) - scm_state%a_k(1,k) = pint - scm_state%b_k(1,k)*pint + scm_state%b_k(k) = real(k-2) / real(km-1) + scm_state%a_k(k) = pint - scm_state%b_k(k)*pint enddo - scm_state%a_k(1,km+1) = 0. - scm_state%b_k(1,km+1) = 1. + scm_state%a_k(km+1) = 0. + scm_state%b_k(km+1) = 1. #endif end select - ptop = scm_state%a_k(1,1) - pint = scm_state%a_k(1,ks+1) + ptop = scm_state%a_k(1) + pint = scm_state%a_k(ks+1) !> - Calculate interface pressures, sigma, and exner function. @@ -1261,31 +1261,31 @@ subroutine get_FV3_vgrid(scm_input, scm_state) mid_index = (km+1)/2 last_index = km+1 do k = 1, mid_index - ak_tmp = scm_state%a_k(1,k) - bk_tmp = scm_state%b_k(1,k) - scm_state%a_k(1,k) = scm_state%a_k(1,last_index) - scm_state%b_k(1,k) = scm_state%b_k(1,last_index) - scm_state%a_k(1,last_index) = ak_tmp - scm_state%b_k(1,last_index) = bk_tmp + ak_tmp = scm_state%a_k(k) + bk_tmp = scm_state%b_k(k) + scm_state%a_k(k) = scm_state%a_k(last_index) + scm_state%b_k(k) = scm_state%b_k(last_index) + scm_state%a_k(last_index) = ak_tmp + scm_state%b_k(last_index) = bk_tmp last_index = last_index - 1 end do p_ref = scm_input%input_pres_surf(1) pres_sfc_inv = 1.0/p_ref do k=1, km+1 - scm_state%pres_i(:,1,k) = scm_state%a_k(1,k) + scm_state%b_k(1,k)*p_ref - scm_state%si(:,1,k) = scm_state%a_k(1,k)*pres_sfc_inv + scm_state%b_k(1,k) - scm_state%exner_i(:,1,k) = (scm_state%pres_i(:,1,k)/1.0E5)**con_rocp + scm_state%pres_i(:,k) = scm_state%a_k(k) + scm_state%b_k(k)*p_ref + scm_state%si(:,k) = scm_state%a_k(k)*pres_sfc_inv + scm_state%b_k(k) + scm_state%exner_i(:,k) = (scm_state%pres_i(:,k)/1.0E5)**con_rocp end do !> - Calculate layer center pressures, sigma, and exner function. do k=1, km - scm_state%pres_l(:,1,k) = ((1.0/(con_rocp+1.0))*& - (scm_state%pres_i(:,1,k)**(con_rocp+1.0) - scm_state%pres_i(:,1,k+1)**(con_rocp+1.0))/ & - (scm_state%pres_i(:,1,k) - scm_state%pres_i(:,1,k+1)))**(1.0/con_rocp) - scm_state%sl(:,1,k) = 0.5*(scm_state%si(:,1,k) + scm_state%si(:,1,k+1)) + scm_state%pres_l(:,k) = ((1.0/(con_rocp+1.0))*& + (scm_state%pres_i(:,k)**(con_rocp+1.0) - scm_state%pres_i(:,k+1)**(con_rocp+1.0))/ & + (scm_state%pres_i(:,k) - scm_state%pres_i(:,k+1)))**(1.0/con_rocp) + scm_state%sl(:,k) = 0.5*(scm_state%si(:,k) + scm_state%si(:,k+1)) - scm_state%exner_l(:,1,k) = (scm_state%pres_l(:,1,k)/1.0E5)**con_rocp + scm_state%exner_l(:,k) = (scm_state%pres_l(:,k)/1.0E5)**con_rocp end do @@ -1900,37 +1900,37 @@ subroutine calc_pres_exner_geopotential(time_level, scm_state) !> - Calculate interface pressures, sigma, and exner function. do i=1, scm_state%n_cols - pres_sfc_inv = 1.0/scm_state%pres_surf(i,1) + pres_sfc_inv = 1.0/scm_state%pres_surf(i) do k=1, scm_state%n_levels+1 - scm_state%pres_i(i,1,k) = scm_state%a_k(1,k) + scm_state%b_k(1,k)*scm_state%pres_surf(1,i) - scm_state%si(i,1,k) = scm_state%a_k(1,k)*pres_sfc_inv + scm_state%b_k(1,k) - scm_state%exner_i(i,1,k) = (scm_state%pres_i(i,1,k)*1.0E-5)**con_rocp + scm_state%pres_i(i,k) = scm_state%a_k(k) + scm_state%b_k(k)*scm_state%pres_surf(i) + scm_state%si(i,k) = scm_state%a_k(k)*pres_sfc_inv + scm_state%b_k(k) + scm_state%exner_i(i,k) = (scm_state%pres_i(i,k)*1.0E-5)**con_rocp end do end do !> - Calculate layer center pressures, sigma, and exner function. do i=1, scm_state%n_cols do k=1, scm_state%n_levels - scm_state%pres_l(i,1,k) = ((1.0/(con_rocp+1.0))*& - (scm_state%pres_i(i,1,k)**(con_rocp+1.0) - scm_state%pres_i(i,1,k+1)**(con_rocp+1.0))/ & - (scm_state%pres_i(i,1,k) - scm_state%pres_i(i,1,k+1)))**(1.0/con_rocp) - scm_state%sl(i,1,k) = 0.5*(scm_state%si(i,1,k) + scm_state%si(i,1,k+1)) - scm_state%exner_l(i,1,k) = (scm_state%pres_l(i,1,k)*1.0E-5)**con_rocp + scm_state%pres_l(i,k) = ((1.0/(con_rocp+1.0))*& + (scm_state%pres_i(i,k)**(con_rocp+1.0) - scm_state%pres_i(i,k+1)**(con_rocp+1.0))/ & + (scm_state%pres_i(i,k) - scm_state%pres_i(i,k+1)))**(1.0/con_rocp) + scm_state%sl(i,k) = 0.5*(scm_state%si(i,k) + scm_state%si(i,k+1)) + scm_state%exner_l(i,k) = (scm_state%pres_l(i,k)*1.0E-5)**con_rocp end do end do do i=1, scm_state%n_cols - scm_state%geopotential_i(i,1,1) = 0.0 + scm_state%geopotential_i(i,1) = 0.0 end do do i=1, scm_state%n_cols do k=1, scm_state%n_levels - tem = con_cp*scm_state%state_T(i,1,k,time_level)*& - (1.0 + con_fvirt*max(scm_state%state_tracer(i,1,k,scm_state%water_vapor_index,time_level), 0.0))/scm_state%exner_l(i,1,k) - dgeopotential_lower_half = (scm_state%exner_i(i,1,k) - scm_state%exner_l(i,1,k))*tem - dgeopotential_upper_half = (scm_state%exner_l(i,1,k) - scm_state%exner_i(i,1,k+1))*tem - scm_state%geopotential_l(i,1,k) = scm_state%geopotential_i(i,1,k) + dgeopotential_lower_half - scm_state%geopotential_i(i,1,k+1) = scm_state%geopotential_l(i,1,k) + dgeopotential_upper_half + tem = con_cp*scm_state%state_T(i,k,time_level)*& + (1.0 + con_fvirt*max(scm_state%state_tracer(i,k,scm_state%water_vapor_index,time_level), 0.0))/scm_state%exner_l(i,k) + dgeopotential_lower_half = (scm_state%exner_i(i,k) - scm_state%exner_l(i,k))*tem + dgeopotential_upper_half = (scm_state%exner_l(i,k) - scm_state%exner_i(i,k+1))*tem + scm_state%geopotential_l(i,k) = scm_state%geopotential_i(i,k) + dgeopotential_lower_half + scm_state%geopotential_i(i,k+1) = scm_state%geopotential_l(i,k) + dgeopotential_upper_half end do end do @@ -1946,17 +1946,17 @@ subroutine calc_geopotential(time_level, scm_state) real(kind=dp) :: tem, dgeopotential_lower_half, dgeopotential_upper_half do i=1, scm_state%n_cols - scm_state%geopotential_i(i,1,1) = 0.0 + scm_state%geopotential_i(i,1) = 0.0 end do do i=1, scm_state%n_cols do k=1, scm_state%n_levels - tem = con_cp*scm_state%state_T(i,1,k,time_level)*(1.0 + & - con_fvirt*max(scm_state%state_tracer(i,1,k,scm_state%water_vapor_index,time_level), 0.0))/scm_state%exner_l(i,1,k) - dgeopotential_lower_half = (scm_state%exner_i(i,1,k) - scm_state%exner_l(i,1,k))*tem - dgeopotential_upper_half = (scm_state%exner_l(i,1,k) - scm_state%exner_i(i,1,k+1))*tem - scm_state%geopotential_l(i,1,k) = scm_state%geopotential_i(i,1,k) + dgeopotential_lower_half - scm_state%geopotential_i(i,1,k+1) = scm_state%geopotential_l(i,1,k) + dgeopotential_upper_half + tem = con_cp*scm_state%state_T(i,k,time_level)*(1.0 + & + con_fvirt*max(scm_state%state_tracer(i,k,scm_state%water_vapor_index,time_level), 0.0))/scm_state%exner_l(i,k) + dgeopotential_lower_half = (scm_state%exner_i(i,k) - scm_state%exner_l(i,k))*tem + dgeopotential_upper_half = (scm_state%exner_l(i,k) - scm_state%exner_i(i,k+1))*tem + scm_state%geopotential_l(i,k) = scm_state%geopotential_i(i,k) + dgeopotential_lower_half + scm_state%geopotential_i(i,k+1) = scm_state%geopotential_l(i,k) + dgeopotential_upper_half end do end do From 6fe8b56d528b48313e2f9a30792c47390095f3f4 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 16:09:05 -0600 Subject: [PATCH 36/46] revert some files again (had old local version of master branch for last commit) --- scm/src/default_namelists.py | 4 +- scm/src/gmtb_scm_input.F90 | 41 +++++++++++++++- scm/src/gmtb_scm_type_defs.F90 | 89 ++++++++++++++++++++-------------- 3 files changed, 93 insertions(+), 41 deletions(-) diff --git a/scm/src/default_namelists.py b/scm/src/default_namelists.py index 9740d9ee..7097c4ac 100644 --- a/scm/src/default_namelists.py +++ b/scm/src/default_namelists.py @@ -7,9 +7,7 @@ "SCM_GFS_v15p2_noahmp":"input_GFS_v15p2_noahmp.nml", "SCM_GFS_v15p2_MYJ":"input_GFS_v15p2_MYJ.nml", "SCM_GFS_v15p2_FA":"input_GFS_v15p2_FA.nml", - "SCM_GFS_v15p2_RRTMGP":"input_GFS_v15p2_RRTMGP.nml", - "SCM_GFS_v16beta_RRTMGP":"input_GFS_v16beta_RRTMGP.nml", "SCM_GFS_v15p2_YSU":"input_GFS_v15p2_YSU.nml", "SCM_GFS_v15p2_saYSU":"input_GFS_v15p2_saYSU.nml", "SCM_GFS_v15p2_ACM":"input_GFS_v15p2_ACM.nml" - } + } \ No newline at end of file diff --git a/scm/src/gmtb_scm_input.F90 b/scm/src/gmtb_scm_input.F90 index c55bcbfd..75a227ca 100644 --- a/scm/src/gmtb_scm_input.F90 +++ b/scm/src/gmtb_scm_input.F90 @@ -59,6 +59,8 @@ subroutine get_config_nml(scm_state) character(len=character_length) :: physics_suite !< name of the physics suite name (currently only GFS_operational supported) character(len=character_length) :: physics_nml + + character(len=character_length), allocatable, dimension(:) :: tracer_names integer :: ioerror @@ -138,9 +140,11 @@ subroutine get_config_nml(scm_state) case default n_time_levels = 2 end select - - call scm_state%create(n_columns, n_levels, n_soil, n_snow, n_time_levels) + call get_tracers(tracer_names) + + call scm_state%create(n_columns, n_levels, n_soil, n_snow, n_time_levels, tracer_names) + scm_state%experiment_name = experiment_name scm_state%model_name = model_name scm_state%output_dir = output_dir @@ -174,6 +178,7 @@ subroutine get_config_nml(scm_state) scm_state%reference_profile_choice = reference_profile_choice scm_state%relax_time = relax_time + deallocate(tracer_names) !> @} end subroutine get_config_nml @@ -867,6 +872,38 @@ subroutine get_reference_profile_old(nlev, pres, T, qv, ozone) end subroutine get_reference_profile_old +subroutine get_tracers(tracer_names) + character(len=character_length), allocatable, intent(inout), dimension(:) :: tracer_names + + character(len=*), parameter :: file_name = 'tracers.txt' + + character(len=100) :: name!, std_name, units + integer :: i, fu, rc, n_lines + + open (action='read', file=FILE_NAME, iostat=rc, newunit=fu) + if (rc == 0) then + n_lines = 0 + do + read (fu, *, iostat=rc) name!, std_name, units + if (rc /= 0) exit + n_lines = n_lines + 1 + end do + allocate(tracer_names(n_lines)) + rewind(fu) + do i=1,n_lines + read (fu, *, iostat=rc) name!, std_name, units + if (rc /= 0) exit + tracer_names(i) = trim(name) + end do + else + write(*,'(a,i0)') 'There was an error opening the file ' // FILE_NAME // & + '; error code = ', rc + stop + end if + + close (fu) +end subroutine get_tracers + !> Generic subroutine to check for netCDF I/O errors subroutine check(status) integer, intent ( in) :: status diff --git a/scm/src/gmtb_scm_type_defs.F90 b/scm/src/gmtb_scm_type_defs.F90 index 4aa87fc9..f794de33 100644 --- a/scm/src/gmtb_scm_type_defs.F90 +++ b/scm/src/gmtb_scm_type_defs.F90 @@ -352,9 +352,12 @@ module gmtb_scm_type_defs contains - subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_time_levels) + subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_time_levels, tracers) class(scm_state_type) :: scm_state integer, intent(in) :: n_columns, n_levels, n_soil, n_snow, n_time_levels + character(len=character_length), intent(in), dimension(:) :: tracers + + integer :: i scm_state%experiment_name = clear_char scm_state%model_name = clear_char @@ -374,42 +377,28 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_ti scm_state%n_cols = n_columns scm_state%n_timesteps = int_zero scm_state%n_time_levels = n_time_levels - scm_state%n_tracers = 17 + + scm_state%n_tracers = size(tracers) allocate(scm_state%tracer_names(scm_state%n_tracers)) - scm_state%water_vapor_index = 1 - scm_state%ozone_index = 2 - scm_state%cloud_water_index = 3 - scm_state%cloud_ice_index = 4 - scm_state%rain_index = 5 - scm_state%snow_index = 6 - scm_state%graupel_index = 7 - scm_state%cloud_amount_index = 8 - scm_state%cloud_droplet_nc_index = 9 - scm_state%cloud_ice_nc_index = 10 - scm_state%rain_nc_index = 11 - scm_state%snow_nc_index = 12 - scm_state%graupel_nc_index = 13 - scm_state%tke_index = 14 - scm_state%water_friendly_aerosol_index = 15 - scm_state%ice_friendly_aerosol_index = 16 - scm_state%mass_weighted_rime_factor_index = 17 - scm_state%tracer_names(1) = 'vap_wat' - scm_state%tracer_names(2) = 'o3mr' - scm_state%tracer_names(3) = 'liq_wat' - scm_state%tracer_names(4) = 'ice_wat' - scm_state%tracer_names(5) = 'rainwat' - scm_state%tracer_names(6) = 'snowwat' - scm_state%tracer_names(7) = 'graupel' - scm_state%tracer_names(8) = 'cld_amt' - scm_state%tracer_names(9) = 'water_nc' - scm_state%tracer_names(10)= 'ice_nc' - scm_state%tracer_names(11)= 'rain_nc' - scm_state%tracer_names(12)= 'snow_nc' - scm_state%tracer_names(13)= 'graupel_nc' - scm_state%tracer_names(14)= 'sgs_tke' - scm_state%tracer_names(15)= 'liq_aero' - scm_state%tracer_names(16)= 'ice_aero' - scm_state%tracer_names(17)= 'q_rimef' + scm_state%tracer_names = tracers + scm_state%water_vapor_index = get_tracer_index(scm_state%tracer_names,"sphum") + scm_state%ozone_index = get_tracer_index(scm_state%tracer_names,"o3mr") + scm_state%cloud_water_index = get_tracer_index(scm_state%tracer_names,"liq_wat") + scm_state%cloud_ice_index = get_tracer_index(scm_state%tracer_names,"ice_wat") + scm_state%rain_index = get_tracer_index(scm_state%tracer_names,"rainwat") + scm_state%snow_index = get_tracer_index(scm_state%tracer_names,"snowwat") + scm_state%graupel_index = get_tracer_index(scm_state%tracer_names,"graupel") + scm_state%cloud_amount_index = get_tracer_index(scm_state%tracer_names,"cld_amt") + scm_state%cloud_droplet_nc_index = get_tracer_index(scm_state%tracer_names,"water_nc") + scm_state%cloud_ice_nc_index = get_tracer_index(scm_state%tracer_names,"ice_nc") + scm_state%rain_nc_index = get_tracer_index(scm_state%tracer_names,"rain_nc") + scm_state%snow_nc_index = get_tracer_index(scm_state%tracer_names,"snow_nc") + scm_state%graupel_nc_index = get_tracer_index(scm_state%tracer_names,"graupel_nc") + scm_state%tke_index = get_tracer_index(scm_state%tracer_names,"sgs_tke") + scm_state%water_friendly_aerosol_index = get_tracer_index(scm_state%tracer_names,"liq_aero") + scm_state%ice_friendly_aerosol_index = get_tracer_index(scm_state%tracer_names,"ice_aero") + scm_state%mass_weighted_rime_factor_index = get_tracer_index(scm_state%tracer_names,"q_rimef") + scm_state%n_itt_swrad = int_zero scm_state%n_itt_lwrad = int_zero scm_state%n_itt_out = int_zero @@ -946,5 +935,33 @@ subroutine physics_associate(physics, scm_state) end subroutine physics_associate + + function get_tracer_index (tracer_names, name) + + character(len=32), intent(in) :: tracer_names(:) + character(len=*), intent(in) :: name + + !--- local variables + integer :: get_tracer_index + integer :: i + integer, parameter :: no_tracer = -99 + + get_tracer_index = no_tracer + + do i=1, size(tracer_names) + if (trim(name) == trim(tracer_names(i))) then + get_tracer_index = i + exit + endif + enddo + + if (get_tracer_index == no_tracer) then + print *,'tracer with name '//trim(name)//' not found' + else + print *,'tracer FOUND:',trim(name) + endif + + return + end function get_tracer_index end module gmtb_scm_type_defs From 8b43512190ef6dc0d62ac05a09c4e76d023ae0b0 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 16:16:16 -0600 Subject: [PATCH 37/46] manually merge ccpp_prebuild_config.py between latest master and RRTMGP update from Dustin --- ccpp/config/ccpp_prebuild_config.py | 67 +++++++++++++++-------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index e4c705ee..6a7672d9 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -42,17 +42,17 @@ 'module_radlw_parameters' : '', }, 'GFS_typedefs' : { - 'GFS_diag_type' : 'physics%Diag(cdata%blk_no)', - 'GFS_control_type' : 'physics%Model(cdata%blk_no)', - 'GFS_cldprop_type' : 'physics%Cldprop(cdata%blk_no)', - 'GFS_tbd_type' : 'physics%Tbd(cdata%blk_no)', - 'GFS_sfcprop_type' : 'physics%Sfcprop(cdata%blk_no)', - 'GFS_coupling_type' : 'physics%Coupling(cdata%blk_no)', - 'GFS_interstitial_type' : 'physics%Interstitial(cdata%blk_no)', - 'GFS_statein_type' : 'physics%Statein(cdata%blk_no)', - 'GFS_radtend_type' : 'physics%Radtend(cdata%blk_no)', - 'GFS_grid_type' : 'physics%Grid(cdata%blk_no)', - 'GFS_stateout_type' : 'physics%Stateout(cdata%blk_no)', + 'GFS_diag_type' : 'physics%Diag', + 'GFS_control_type' : 'physics%Model', + 'GFS_cldprop_type' : 'physics%Cldprop', + 'GFS_tbd_type' : 'physics%Tbd', + 'GFS_sfcprop_type' : 'physics%Sfcprop', + 'GFS_coupling_type' : 'physics%Coupling', + 'GFS_interstitial_type' : 'physics%Interstitial', + 'GFS_statein_type' : 'physics%Statein', + 'GFS_radtend_type' : 'physics%Radtend', + 'GFS_grid_type' : 'physics%Grid', + 'GFS_stateout_type' : 'physics%Stateout', 'GFS_typedefs' : '', }, 'gmtb_scm_physical_constants' : { @@ -163,6 +163,7 @@ 'ccpp/physics/physics/sfcsub.F', 'ccpp/physics/physics/sflx.f', 'ccpp/physics/physics/set_soilveg.f', + 'ccpp/physics/physics/flake.F90', 'ccpp/physics/physics/surface_perturbation.F90', 'ccpp/physics/physics/cu_gf_deep.F90', 'ccpp/physics/physics/cu_gf_sh.F90', @@ -202,9 +203,6 @@ 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90', - 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmgp_aux.F90' , # derived data type definitions 'scm/src/GFS_typedefs.F90', 'scm/src/gmtb_scm_kinds.F90', @@ -213,7 +211,7 @@ ] # Add all physics scheme files relative to basedir -SCHEME_FILES = { +SCHEME_FILES = [ # Relative path to source (from where ccpp_prebuild.py is called) : [ list of physics sets in which scheme may be called ]; # current restrictions are that each scheme can only belong to one physics set, and all schemes within one group in the # suite definition file have to belong to the same physics set @@ -306,24 +304,27 @@ 'ccpp/physics/physics/mp_fer_hires.F90' , 'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' , # RRTMGP - 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' , - 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' , - 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' , - 'ccpp/physics/physics/rrtmgp_lw_rte.F90' , - 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' , - 'ccpp/physics/physics/rrtmgp_sw_rte.F90' , - 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' , - 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' , - 'ccpp/physics/physics/rrtmgp_lw_pre.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' , - } + 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmgp_aux.F90' , + 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' , + 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' , + 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' , + 'ccpp/physics/physics/rrtmgp_lw_rte.F90' , + 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' , + 'ccpp/physics/physics/rrtmgp_sw_rte.F90' , + 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' , + 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' , + 'ccpp/physics/physics/rrtmgp_lw_pre.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' + ] # Default build dir, relative to current working directory, # if not specified as command-line argument From 8a8988fa7078159d6e97e527d3f21d34b688e469 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 16:18:13 -0600 Subject: [PATCH 38/46] update .gitmodules --- .gitmodules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index d09cab1a..1a1a9b5d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,8 @@ [submodule "ccpp-framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework - branch = dtc/develop + branch = master [submodule "ccpp-physics"] path = ccpp/physics - url = https://github.com/dustinswales/ccpp-physics - branch = dtc/develop + url = https://github.com/NCAR/ccpp-physics + branch = master From eef88c9df5f59c3ccfaaf34ebf70543fcf479504 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 16:40:55 -0600 Subject: [PATCH 39/46] manually merge the RRTMGP SDFs between current master and RRTMGP update code --- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 3 +- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml | 5 +- ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 5 +- .../suite_SCM_GFS_v16beta_RRTMGP_ps.xml | 72 +++++++++++++++++++ 4 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 4d953944..0fa0f9d4 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -71,9 +71,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -85,6 +85,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml index 8012e96e..025716cc 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml @@ -13,6 +13,8 @@ GFS_suite_interstitial_rad_reset GFS_rrtmgp_pre + GFS_rrtmgp_gfdlmp_pre + GFS_cloud_diagnostics GFS_rrtmgp_sw_pre rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics @@ -50,9 +52,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -64,6 +66,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index bbbe933c..b4cc06be 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -14,7 +14,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmgp_pre GFS_rrtmgp_gfdlmp_pre - GFS_cloud_diagnostics + GFS_cloud_diagnostics GFS_rrtmgp_sw_pre rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics @@ -71,9 +71,9 @@ GFS_suite_stateout_update ozphys_2015 h2ophys - GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 + GFS_DCNV_generic_pre samfdeepcnv GFS_DCNV_generic_post GFS_SCNV_generic_pre @@ -85,6 +85,7 @@ gfdl_cloud_microphys GFS_MP_generic_post maximum_hourly_diagnostics + phys_tend diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml new file mode 100644 index 00000000..e45688b6 --- /dev/null +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml @@ -0,0 +1,72 @@ + + + + + + GFS_time_vary_pre + GFS_rrtmgp_setup + GFS_rad_time_vary + GFS_phys_time_vary + + + + + GFS_suite_interstitial_rad_reset + GFS_rrtmgp_pre + GFS_rrtmgp_gfdlmp_pre + GFS_cloud_diagnostics + GFS_rrtmgp_sw_pre + rrtmgp_sw_gas_optics + rrtmgp_sw_aerosol_optics + rrtmgp_sw_cloud_optics + rrtmgp_gfdlmp_sw_cloud_sampling + rrtmgp_sw_rte + GFS_rrtmgp_sw_post + rrtmgp_lw_pre + rrtmgp_lw_gas_optics + rrtmgp_lw_aerosol_optics + rrtmgp_lw_cloud_optics + rrtmgp_gfdlmp_lw_cloud_sampling + rrtmgp_lw_rte + GFS_rrtmgp_lw_post + + + + + GFS_suite_interstitial_phys_reset + GFS_suite_stateout_reset + get_prs_fv3 + GFS_suite_interstitial_1 + GFS_surface_generic_pre + dcyc2t3 + GFS_suite_interstitial_2 + gmtb_scm_sfc_flux_spec + GFS_PBL_generic_pre + satmedmfvdifq + GFS_PBL_generic_post + GFS_GWD_generic_pre + cires_ugwp + cires_ugwp_post + GFS_GWD_generic_post + rayleigh_damp + GFS_suite_stateout_update + ozphys_2015 + h2ophys + get_phi_fv3 + GFS_suite_interstitial_3 + GFS_DCNV_generic_pre + samfdeepcnv + GFS_DCNV_generic_post + GFS_SCNV_generic_pre + samfshalcnv + GFS_SCNV_generic_post + GFS_suite_interstitial_4 + cnvc90 + GFS_MP_generic_pre + gfdl_cloud_microphys + GFS_MP_generic_post + maximum_hourly_diagnostics + phys_tend + + + From 985202f3769d476f09891c9a3c48390a4d7be83d Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 16:48:08 -0600 Subject: [PATCH 40/46] manually merge gmtb_scm_physical_constants between current master and RRTMGP update --- scm/src/gmtb_scm_physical_constants.F90 | 1 + scm/src/gmtb_scm_physical_constants.meta | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/scm/src/gmtb_scm_physical_constants.F90 b/scm/src/gmtb_scm_physical_constants.F90 index af238377..86435a83 100644 --- a/scm/src/gmtb_scm_physical_constants.F90 +++ b/scm/src/gmtb_scm_physical_constants.F90 @@ -19,6 +19,7 @@ module gmtb_scm_physical_constants real(kind=dp),parameter:: con_rv =4.6150e+2 real(kind=dp),parameter:: con_cp =1.0046e+3 real(kind=dp),parameter:: con_cliq =4.1855e+3 + real(kind=dp),parameter:: con_csol =2.1060e+3 real(kind=dp),parameter:: con_cvap =1.8460e+3 real(kind=dp),parameter:: con_hvap =2.5000e+6 real(kind=dp),parameter:: con_hfus =3.3358e+5 diff --git a/scm/src/gmtb_scm_physical_constants.meta b/scm/src/gmtb_scm_physical_constants.meta index 6adc6eb4..dec3b3c9 100644 --- a/scm/src/gmtb_scm_physical_constants.meta +++ b/scm/src/gmtb_scm_physical_constants.meta @@ -8,6 +8,13 @@ dimensions = () type = real kind = kind_phys +[con_csol] + standard_name = specific_heat_of_ice_at_constant_pressure + long_name = specific heat of ice at constant pressure + units = J kg-1 K-1 + dimensions = () + type = real + kind = kind_phys [con_cp] standard_name = specific_heat_of_dry_air_at_constant_pressure long_name = specific heat of dry air at constant pressure @@ -22,13 +29,6 @@ dimensions = () type = real kind = kind_phys -[con_epsqs] - standard_name = minimum_value_of_saturation_mixing_ratio - long_name = floor value for saturation mixing ratio - units = kg kg-1 - dimensions = () - type = real - kind = kind_phys [con_eps] standard_name = ratio_of_dry_air_to_water_vapor_gas_constants long_name = rd/rv @@ -36,6 +36,13 @@ dimensions = () type = real kind = kind_phys +[con_epsqs] + standard_name = minimum_value_of_saturation_mixing_ratio + long_name = floor value for saturation mixing ratio + units = kg kg-1 + dimensions = () + type = real + kind = kind_phys [con_epsm1] standard_name = ratio_of_dry_air_to_water_vapor_gas_constants_minus_one long_name = (rd/rv) - 1 @@ -74,7 +81,7 @@ [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter - units = radian + units = none dimensions = () type = real kind = kind_phys From e5d510c03d6dff2c82dbb0b440ead061be10376c Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 17:16:40 -0600 Subject: [PATCH 41/46] revert a few small changes in GFS_typedefs.F90 --- scm/src/GFS_typedefs.F90 | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 3f8c51a0..f1f55914 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1945,7 +1945,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: zogw(:) => null() !< height of drag due to orographic gravity wave real (kind=kind_phys), pointer :: dudt_mtb(:,:) => null() !< daily aver u-wind tend due to mountain blocking drag real (kind=kind_phys), pointer :: dudt_ogw(:,:) => null() !< daily aver u-wind tend due to orographic gravity wave drag - real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS + real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS ! RRTMGP integer :: ipsdlw0 !< @@ -3270,6 +3270,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & fhswr, fhlwr, levr, nfxr, iaerclm, iflip, isol, ico2, ialb, & isot, iems, iaer, icliq_sw, iovr_sw, iovr_lw, ictm, isubc_sw,& isubc_lw, crick_proof, ccnorm, lwhtr, swhtr, & + nhfrad, & ! --- RRTMGP do_RRTMGP, active_gases, nGases, rrtmgp_root, & lw_file_gas, lw_file_clouds, rrtmgp_nBandsLW, rrtmgp_nGptsLW,& @@ -4409,6 +4410,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ' microphysics', & ' lradar =',Model%lradar + elseif (Model%imp_physics == Model%imp_physics_wsm6) then !WSM6 microphysics Model%npdf3d = 0 Model%num_p3d = 3 @@ -6424,7 +6426,7 @@ subroutine interstitial_setup_tracers(Interstitial, Model) elseif (Model%ntclamt > 0) then ! for GFDL MP don't diffuse cloud amount Interstitial%nvdiff = Model%ntrac - 1 endif - + if (Model%imp_physics == Model%imp_physics_gfdl) then Interstitial%nncl = 5 endif @@ -6614,18 +6616,18 @@ subroutine interstitial_rad_reset (Interstitial, Model) ! F-A scheme if (Model%imp_physics == Model%imp_physics_fer_hires) then - Interstitial%qv_r = clear_val - Interstitial%qc_r = clear_val - Interstitial%qi_r = clear_val - Interstitial%qr_r = clear_val - Interstitial%qs_r = clear_val - Interstitial%qg_r = clear_val - if(Model%spec_adv) then - Interstitial%f_ice = clear_val - Interstitial%f_rain = clear_val - Interstitial%f_rimef = clear_val - Interstitial%cwm = clear_val - end if + Interstitial%qv_r = clear_val + Interstitial%qc_r = clear_val + Interstitial%qi_r = clear_val + Interstitial%qr_r = clear_val + Interstitial%qs_r = clear_val + Interstitial%qg_r = clear_val + if(Model%spec_adv) then + Interstitial%f_ice = clear_val + Interstitial%f_rain = clear_val + Interstitial%f_rimef = clear_val + Interstitial%cwm = clear_val + end if end if if (Model%do_RRTMGP) then @@ -7285,6 +7287,13 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%dudt_mtb ) = ', sum(Interstitial%dudt_mtb ) write (0,*) 'sum(Interstitial%dudt_ogw ) = ', sum(Interstitial%dudt_ogw ) write (0,*) 'sum(Interstitial%dudt_tms ) = ', sum(Interstitial%dudt_tms ) +!-- GSD drag suite + if (Model%gwd_opt==3 .or. Model%gwd_opt==33) then + write (0,*) 'sum(Interstitial%varss ) = ', sum(Interstitial%varss) + write (0,*) 'sum(Interstitial%ocss ) = ', sum(Interstitial%ocss) + write (0,*) 'sum(Interstitial%oa4ss ) = ', sum(Interstitial%oa4ss) + write (0,*) 'sum(Interstitial%clxss ) = ', sum(Interstitial%clxss) + end if ! ! RRTMGP fields write (0,*) 'sum(Interstitial%aerosolslw ) = ', sum(Interstitial%aerosolslw ) From 25f65a94fb8d79a57f95e09ff0a5fefeedfdd459 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 17:52:10 -0600 Subject: [PATCH 42/46] match ccpp_prebuil_config.py changes with FV3 version --- ccpp/config/ccpp_prebuild_config.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 6a7672d9..6fc87b5f 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -191,6 +191,7 @@ 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_kind.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_lw.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_sw.F90', + 'ccpp/physics/physics/rte-rrtmgp/rte/mo_rte_config.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/mo_source_functions.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/kernels/mo_fluxes_broadband_kernels.F90', 'ccpp/physics/physics/rte-rrtmgp/rte/kernels/mo_optical_props_kernels.F90', @@ -202,7 +203,9 @@ 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_heating_rates.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/mo_rrtmgp_clr_all_sky.F90', 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90', - 'ccpp/physics/physics/rte-rrtmgp/extensions/cloud_optics/mo_cloud_sampling.F90', + 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' , + 'ccpp/physics/physics/rrtmgp_aux.F90' , # derived data type definitions 'scm/src/GFS_typedefs.F90', 'scm/src/gmtb_scm_kinds.F90', @@ -304,26 +307,26 @@ 'ccpp/physics/physics/mp_fer_hires.F90' , 'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' , # RRTMGP - 'ccpp/physics/physics/rrtmg_lw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmg_sw_cloud_optics.F90' , - 'ccpp/physics/physics/rrtmgp_aux.F90' , 'ccpp/physics/physics/rrtmgp_lw_gas_optics.F90' , 'ccpp/physics/physics/rrtmgp_lw_cloud_optics.F90' , 'ccpp/physics/physics/rrtmgp_sw_gas_optics.F90' , 'ccpp/physics/physics/rrtmgp_sw_cloud_optics.F90' , 'ccpp/physics/physics/rrtmgp_sw_aerosol_optics.F90' , 'ccpp/physics/physics/rrtmgp_lw_rte.F90' , - 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' , 'ccpp/physics/physics/rrtmgp_sw_rte.F90' , - 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' , 'ccpp/physics/physics/rrtmgp_lw_aerosol_optics.F90' , 'ccpp/physics/physics/GFS_rrtmgp_setup.F90' , 'ccpp/physics/physics/GFS_rrtmgp_pre.F90' , 'ccpp/physics/physics/rrtmgp_lw_pre.F90' , 'ccpp/physics/physics/GFS_rrtmgp_sw_pre.F90' , 'ccpp/physics/physics/GFS_rrtmgp_lw_post.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' , - 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' + 'ccpp/physics/physics/rrtmgp_lw_cloud_sampling.F90' , + 'ccpp/physics/physics/rrtmgp_sw_cloud_sampling.F90' , + 'ccpp/physics/physics/GFS_cloud_diagnostics.F90' , + 'ccpp/physics/physics/mo_cloud_sampling.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_gfdlmp_pre.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_zhaocarr_pre.F90' , + 'ccpp/physics/physics/GFS_rrtmgp_sw_post.F90' ] # Default build dir, relative to current working directory, From aa294ea71488b3f5b429a39731c67413e5ce42e8 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 17:54:09 -0600 Subject: [PATCH 43/46] update RRTMGP SDFs and default namelists and tracer configs in order to run successfully --- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml | 4 ++-- ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml | 4 ++-- ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml | 4 ++-- ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml | 4 ++-- scm/src/default_namelists.py | 2 ++ scm/src/default_tracers.py | 2 ++ 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml index 0fa0f9d4..af97e995 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_gfdlmp_sw_cloud_sampling + rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_gfdlmp_lw_cloud_sampling + rrtmgp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml index 025716cc..5288e183 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_gfdlmp_sw_cloud_sampling + rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_gfdlmp_lw_cloud_sampling + rrtmgp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml index b4cc06be..3c486e48 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_gfdlmp_sw_cloud_sampling + rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_gfdlmp_lw_cloud_sampling + rrtmgp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml index e45688b6..5abf7a3c 100644 --- a/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v16beta_RRTMGP_ps.xml @@ -19,14 +19,14 @@ rrtmgp_sw_gas_optics rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics - rrtmgp_gfdlmp_sw_cloud_sampling + rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics - rrtmgp_gfdlmp_lw_cloud_sampling + rrtmgp_lw_cloud_sampling rrtmgp_lw_rte GFS_rrtmgp_lw_post diff --git a/scm/src/default_namelists.py b/scm/src/default_namelists.py index 7097c4ac..deaa4414 100644 --- a/scm/src/default_namelists.py +++ b/scm/src/default_namelists.py @@ -4,6 +4,8 @@ "SCM_GFS_v16beta":"input_GFS_v16beta.nml", "SCM_GFS_v15p2_no_nsst":"input_GFS_v15p2.nml", "SCM_GFS_v16beta_no_nsst":"input_GFS_v16beta.nml", + "SCM_GFS_v15p2_RRTMGP":"input_GFS_v15p2_RRTMGP.nml", + "SCM_GFS_v16beta_RRTMGP":"input_GFS_v16beta_RRTMGP.nml", "SCM_GFS_v15p2_noahmp":"input_GFS_v15p2_noahmp.nml", "SCM_GFS_v15p2_MYJ":"input_GFS_v15p2_MYJ.nml", "SCM_GFS_v15p2_FA":"input_GFS_v15p2_FA.nml", diff --git a/scm/src/default_tracers.py b/scm/src/default_tracers.py index 8bbff40a..dadef830 100644 --- a/scm/src/default_tracers.py +++ b/scm/src/default_tracers.py @@ -1,5 +1,7 @@ default_tracers = {"SCM_GFS_v15p2":"tracers_gfdlmp.txt", "SCM_GFS_v16beta":"tracers_gfdlmp.txt", + "SCM_GFS_v15p2_RRTMGP":"tracers_gfdlmp.txt", + "SCM_GFS_v16beta_RRTMGP":"tracers_gfdlmp.txt", "SCM_csawmg":"tracers_csawmg.txt", "SCM_GFS_v15p2_no_nsst":"tracers_gfdlmp.txt", "SCM_GFS_v16beta_no_nsst":"tracers_gfdlmp.txt", From 0473355038a765faf74aa8d126595fac7495358a Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 10 Aug 2020 17:55:36 -0600 Subject: [PATCH 44/46] comment out ACM scheme in ACM suite to that it doesn't cause trouble with ccpp_prebuild --- ccpp/suites/suite_SCM_GFS_v15p2_ACM_ps.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/suites/suite_SCM_GFS_v15p2_ACM_ps.xml b/ccpp/suites/suite_SCM_GFS_v15p2_ACM_ps.xml index 37ec81cf..c6049c9e 100644 --- a/ccpp/suites/suite_SCM_GFS_v15p2_ACM_ps.xml +++ b/ccpp/suites/suite_SCM_GFS_v15p2_ACM_ps.xml @@ -33,7 +33,7 @@ GFS_suite_interstitial_2 gmtb_scm_sfc_flux_spec GFS_PBL_generic_pre - bl_acm + GFS_PBL_generic_post GFS_GWD_generic_pre cires_ugwp From 9e01f20a22a78998dba151ec7149dd04d1224278 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Aug 2020 10:28:13 -0600 Subject: [PATCH 45/46] Removed local setup script. --- scm/etc/Apollo_setup_intel.csh | 49 ---------------------------------- 1 file changed, 49 deletions(-) delete mode 100755 scm/etc/Apollo_setup_intel.csh diff --git a/scm/etc/Apollo_setup_intel.csh b/scm/etc/Apollo_setup_intel.csh deleted file mode 100755 index 0db58fe3..00000000 --- a/scm/etc/Apollo_setup_intel.csh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/tcsh - -echo "Setting environment variables for SCM-CCPP on NOAA-ESRL-PSD/Apollo with icc/ifort" - -#load the modules in order to compile the GMTB SCM -echo "Loading intel and netcdf modules..." -module purge -module load intel/19.0.1 -module load netcdf -module load cmake -module load python -module load py-netcdf4/1.2.7 -module load py-numpy/1.13.1 -module load py-matplotlib/2.0.2 - -echo "Setting CC/CXX/FC environment variables" -setenv CC icc -setenv CXX icpc -setenv FC ifort -setenv NETCDF /apps/spack/opt/spack/linux-centos6-x86_64/intel-19.0.1/netcdf-4.6.2-h6ldxvajx4mivywh6t4q64n2ysozaj3j/ -setenv BACIO_LIB4 /home/dswales/libs/NCEPlibs/lib/libbacio_4.a -setenv SP_LIBd /home/dswales/libs/NCEPlibs/lib/libsp_v2.0.2_d.a -setenv W3NCO_LIBd /home/dswales/libs/NCEPlibs/lib/libw3nco_d.a - - -#prepend the anaconda installation to the path so that the anaconda version of python (with its many installed modules) is used; check if the path already contains the right path first -echo "Checking if the path to the anaconda python distribution is in PATH" -echo $PATH | grep '/contrib/ananconda/2.3.0/bin$' >&/dev/null -if ( $? != 0 ) then - echo "anaconda path not found in PATH; prepending anaconda path to PATH environment variable" - setenv PATH /contrib/anaconda/2.3.0/bin:$PATH -else - echo "PATH already has the anaconda path in it" -endif - -#install f90nml for the local user - -#check to see if f90nml is installed locally -echo "Checking if f90nml python module is installed" -python -c "import f90nml" - -if ( $? != 0 ) then - echo "Not found; installing f90nml" - cd etc/scripts/f90nml-0.19 - python setup.py install --user - cd ../.. -else - echo "f90nml is installed" -endif From 8207944e2bb59cd005375aae9aa4df0a1847eca1 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 11 Aug 2020 11:03:44 -0600 Subject: [PATCH 46/46] Removed deprecated code. --- scm/src/GFS_typedefs.F90 | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index f1f55914..6ed22292 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -6985,16 +6985,6 @@ subroutine interstitial_phys_reset (Interstitial, Model) end if ! - ! - ! RRTMGP - ! - if (Model%do_RRTMGP) then - if (Model%use_LW_jacobian) then - !Interstitial%fluxlwUP_jac = clear_val - !Interstitial%fluxlwDOWN_jac = clear_val - endif - endif - end subroutine interstitial_phys_reset subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)