diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py
index 48add6b70..c1e8b695d 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' : {
@@ -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',
@@ -196,7 +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',
+ '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',
@@ -205,111 +210,117 @@
]
# 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
- 'ccpp/physics/physics/GFS_DCNV_generic.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_GWD_generic.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_MP_generic.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_PBL_generic.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_SCNV_generic.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_phys_time_vary.scm.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_rad_time_vary.scm.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_rrtmg_post.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_rrtmg_pre.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_rrtmg_setup.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_suite_interstitial.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_surface_generic.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_surface_composites.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_surface_loop_control.F90' : ['physics'],
- 'ccpp/physics/physics/GFS_time_vary_pre.scm.F90' : ['physics'],
- 'ccpp/physics/physics/cires_ugwp.F90' : ['physics'],
- 'ccpp/physics/physics/cires_ugwp_post.F90' : ['physics'],
- 'ccpp/physics/physics/cnvc90.f' : ['physics'],
- 'ccpp/physics/physics/cs_conv.F90' : ['physics'],
- 'ccpp/physics/physics/cs_conv_aw_adj.F90' : ['physics'],
- 'ccpp/physics/physics/cu_ntiedtke_pre.F90' : ['physics'],
- 'ccpp/physics/physics/cu_ntiedtke.F90' : ['physics'],
- 'ccpp/physics/physics/cu_ntiedtke_post.F90' : ['physics'],
- 'ccpp/physics/physics/dcyc2.f' : ['physics'],
- 'ccpp/physics/physics/drag_suite.F90' : ['physics'],
- '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/gscond.f' : ['physics'],
- 'ccpp/physics/physics/gwdc.f' : ['physics'],
- 'ccpp/physics/physics/gwdps.f' : ['physics'],
- 'ccpp/physics/physics/h2ophys.f' : ['physics'],
- 'ccpp/physics/physics/samfdeepcnv.f' : ['physics'],
- 'ccpp/physics/physics/samfshalcnv.f' : ['physics'],
- 'ccpp/physics/physics/sascnvn.F' : ['physics'],
- 'ccpp/physics/physics/shalcnv.F' : ['physics'],
- 'ccpp/physics/physics/maximum_hourly_diagnostics.F90' : ['physics'],
- 'ccpp/physics/physics/m_micro.F90' : ['physics'],
- 'ccpp/physics/physics/m_micro_interstitial.F90' : ['physics'],
- 'ccpp/physics/physics/cu_gf_driver_pre.F90' : ['physics'],
- 'ccpp/physics/physics/cu_gf_driver.F90' : ['physics'],
- 'ccpp/physics/physics/cu_gf_driver_post.F90' : ['physics'],
- 'ccpp/physics/physics/moninedmf.f' : ['physics'],
- 'ccpp/physics/physics/moninshoc.f' : ['physics'],
- 'ccpp/physics/physics/satmedmfvdif.F' : ['physics'],
- 'ccpp/physics/physics/satmedmfvdifq.F' : ['physics'],
- 'ccpp/physics/physics/shinhongvdif.F90' : ['physics'],
- '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'],
- 'ccpp/physics/physics/mp_thompson.F90' : ['physics'],
- 'ccpp/physics/physics/mp_thompson_post.F90' : ['physics'],
- 'ccpp/physics/physics/ozphys.f' : ['physics'],
- 'ccpp/physics/physics/ozphys_2015.f' : ['physics'],
- 'ccpp/physics/physics/precpd.f' : ['physics'],
- 'ccpp/physics/physics/radlw_main.f' : ['physics'],
- 'ccpp/physics/physics/radsw_main.f' : ['physics'],
- 'ccpp/physics/physics/rayleigh_damp.f' : ['physics'],
- 'ccpp/physics/physics/rrtmg_lw_post.F90' : ['physics'],
- 'ccpp/physics/physics/rrtmg_lw_pre.F90' : ['physics'],
- 'ccpp/physics/physics/rrtmg_sw_post.F90' : ['physics'],
- 'ccpp/physics/physics/rrtmg_sw_pre.F90' : ['physics'],
- 'ccpp/physics/physics/sfc_diag.f' : ['physics'],
- 'ccpp/physics/physics/sfc_diag_post.F90' : ['physics'],
- 'ccpp/physics/physics/sfc_drv_ruc.F90' : ['physics'],
- 'ccpp/physics/physics/lsm_ruc_sfc_sice_interstitial.F90': ['physics'],
- '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_noahmp_drv.f' : ['physics'],
- 'ccpp/physics/physics/sfc_nst.f' : ['physics'],
- 'ccpp/physics/physics/sfc_ocean.F' : ['physics'],
- 'ccpp/physics/physics/sfc_sice.f' : ['physics'],
- 'ccpp/physics/physics/mp_fer_hires.F90' : ['physics'],
- 'ccpp/physics/physics/gmtb_scm_sfc_flux_spec.F90' : ['physics'],
+ 'ccpp/physics/physics/GFS_DCNV_generic.F90' ,
+ 'ccpp/physics/physics/GFS_GWD_generic.F90' ,
+ 'ccpp/physics/physics/GFS_MP_generic.F90' ,
+ 'ccpp/physics/physics/GFS_PBL_generic.F90' ,
+ 'ccpp/physics/physics/GFS_SCNV_generic.F90' ,
+ 'ccpp/physics/physics/GFS_phys_time_vary.scm.F90' ,
+ 'ccpp/physics/physics/GFS_rad_time_vary.scm.F90' ,
+ 'ccpp/physics/physics/GFS_rrtmg_post.F90' ,
+ 'ccpp/physics/physics/GFS_rrtmg_pre.F90' ,
+ 'ccpp/physics/physics/GFS_rrtmg_setup.F90' ,
+ 'ccpp/physics/physics/GFS_suite_interstitial.F90' ,
+ 'ccpp/physics/physics/GFS_surface_generic.F90' ,
+ 'ccpp/physics/physics/GFS_surface_composites.F90' ,
+ 'ccpp/physics/physics/GFS_surface_loop_control.F90' ,
+ 'ccpp/physics/physics/GFS_time_vary_pre.scm.F90' ,
+ 'ccpp/physics/physics/cires_ugwp.F90' ,
+ 'ccpp/physics/physics/cires_ugwp_post.F90' ,
+ 'ccpp/physics/physics/cnvc90.f' ,
+ 'ccpp/physics/physics/cs_conv.F90' ,
+ 'ccpp/physics/physics/cs_conv_aw_adj.F90' ,
+ 'ccpp/physics/physics/cu_ntiedtke_pre.F90' ,
+ 'ccpp/physics/physics/cu_ntiedtke.F90' ,
+ 'ccpp/physics/physics/cu_ntiedtke_post.F90' ,
+ 'ccpp/physics/physics/dcyc2.f' ,
+ 'ccpp/physics/physics/drag_suite.F90' ,
+ 'ccpp/physics/physics/gcm_shoc.F90' ,
+ 'ccpp/physics/physics/get_prs_fv3.F90' ,
+ 'ccpp/physics/physics/gfdl_cloud_microphys.F90' ,
+# 'ccpp/physics/physics/gfdl_sfc_layer.F90' ],
+ 'ccpp/physics/physics/gscond.f' ,
+ 'ccpp/physics/physics/gwdc.f' ,
+ 'ccpp/physics/physics/gwdps.f' ,
+ 'ccpp/physics/physics/h2ophys.f' ,
+ 'ccpp/physics/physics/samfdeepcnv.f' ,
+ 'ccpp/physics/physics/samfshalcnv.f' ,
+ 'ccpp/physics/physics/sascnvn.F' ,
+ 'ccpp/physics/physics/shalcnv.F' ,
+ 'ccpp/physics/physics/maximum_hourly_diagnostics.F90' ,
+ 'ccpp/physics/physics/m_micro.F90' ,
+ 'ccpp/physics/physics/m_micro_interstitial.F90' ,
+ 'ccpp/physics/physics/cu_gf_driver_pre.F90' ,
+ 'ccpp/physics/physics/cu_gf_driver.F90' ,
+ 'ccpp/physics/physics/cu_gf_driver_post.F90' ,
+ 'ccpp/physics/physics/moninedmf.f' ,
+ 'ccpp/physics/physics/moninshoc.f' ,
+ 'ccpp/physics/physics/satmedmfvdif.F' ,
+ 'ccpp/physics/physics/satmedmfvdifq.F' ,
+ 'ccpp/physics/physics/shinhongvdif.F90' ,
+ 'ccpp/physics/physics/ysuvdif.F90' ,
+ 'ccpp/physics/physics/module_MYNNPBL_wrapper.F90' ,
+ 'ccpp/physics/physics/module_MYNNSFC_wrapper.F90' ,
+ 'ccpp/physics/physics/module_SGSCloud_RadPre.F90' ,
+ 'ccpp/physics/physics/module_SGSCloud_RadPost.F90' ,
+ 'ccpp/physics/physics/module_MYJSFC_wrapper.F90' ,
+ 'ccpp/physics/physics/module_MYJPBL_wrapper.F90' ,
+ 'ccpp/physics/physics/mp_thompson_pre.F90' ,
+ 'ccpp/physics/physics/mp_thompson.F90' ,
+ 'ccpp/physics/physics/mp_thompson_post.F90' ,
+ 'ccpp/physics/physics/ozphys.f' ,
+ 'ccpp/physics/physics/ozphys_2015.f' ,
+ 'ccpp/physics/physics/precpd.f' ,
+ 'ccpp/physics/physics/phys_tend.F90' ,
+# 'ccpp/physics/physics/radlw_main.F90' ],
+# 'ccpp/physics/physics/radsw_main.F90' ],
+ 'ccpp/physics/physics/radlw_main.f' ,
+ 'ccpp/physics/physics/radsw_main.f' ,
+ 'ccpp/physics/physics/rayleigh_damp.f' ,
+ 'ccpp/physics/physics/rrtmg_lw_post.F90' ,
+ 'ccpp/physics/physics/rrtmg_lw_pre.F90' ,
+ 'ccpp/physics/physics/rrtmg_sw_post.F90' ,
+ 'ccpp/physics/physics/rrtmg_sw_pre.F90' ,
+ 'ccpp/physics/physics/sfc_diag.f' ,
+ 'ccpp/physics/physics/sfc_diag_post.F90' ,
+ 'ccpp/physics/physics/sfc_drv_ruc.F90' ,
+ 'ccpp/physics/physics/lsm_ruc_sfc_sice_interstitial.F90',
+ 'ccpp/physics/physics/sfc_cice.f' ,
+ 'ccpp/physics/physics/sfc_diff.f' ,
+ 'ccpp/physics/physics/sfc_drv.f' ,
+# 'ccpp/physics/physics/sfc_noah_wrfv4_interstitial.F90' ,
+# 'ccpp/physics/physics/sfc_noah_wrfv4.F90' ,
+ 'ccpp/physics/physics/sfc_noahmp_drv.f' ,
+ 'ccpp/physics/physics/sfc_nst.f' ,
+ 'ccpp/physics/physics/sfc_ocean.F' ,
+ 'ccpp/physics/physics/sfc_sice.f' ,
+ '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' : ['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'],
- }
+ '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'
+ ]
# Default build dir, relative to current working directory,
# if not specified as command-line argument
@@ -348,6 +359,20 @@
# if no entry is made here. Possible values are: 'all', 'none',
# or a list of standard_names: [ 'var1', 'var3' ].
OPTIONAL_ARGUMENTS = {
+ 'rrtmgp_sw_rte' : {
+ 'rrtmgp_sw_rte_run' : [
+ 'components_of_surface_downward_shortwave_fluxes',
+ ],
+ },
+ 'GFS_rrtmgp_sw_post' : {
+ 'GFS_rrtmgp_sw_post_run' : 'none',
+ },
+ 'rrtmgp_lw_rte' : {
+ 'rrtmgp_lw_rte_run' : 'none',
+ },
+ 'GFS_rrtmgp_lw_post' : {
+ 'GFS_rrtmgp_lw_post_run' : 'none',
+ },
'rrtmg_sw' : {
'rrtmg_sw_run' : [
'tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels',
@@ -377,24 +402,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',
@@ -409,37 +428,7 @@
'rime_factor',
],
},
- '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' : [
- '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',
- ],
- },
- '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 54f9b0709..b14e3e041 160000
--- a/ccpp/framework
+++ b/ccpp/framework
@@ -1 +1 @@
-Subproject commit 54f9b07098dc6fc3c25f0b38a7d047b5274d3afb
+Subproject commit b14e3e0415205ea4d3004bfb5241cc34da702db8
diff --git a/ccpp/physics b/ccpp/physics
index 0aa89846e..01c2257ab 160000
--- a/ccpp/physics
+++ b/ccpp/physics
@@ -1 +1 @@
-Subproject commit 0aa89846e9bb0c22482fa131aba39b85f9ac4ff2
+Subproject commit 01c2257ab1538b3e9a51fed5a5b10f4dda5bfddf
diff --git a/ccpp/suites/suite_SCM_GFS_v15p2.xml b/ccpp/suites/suite_SCM_GFS_v15p2.xml
index 88c3a16f2..e061c9731 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 c0d8b820b..c64efcf7c 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 cf05de2d9..5d1add547 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_RRTMGP.xml b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml
index 24f5565eb..745b1ad44 100644
--- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml
+++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP.xml
@@ -69,9 +69,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
@@ -83,6 +83,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 704ae22d3..afc0d0cf2 100644
--- a/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml
+++ b/ccpp/suites/suite_SCM_GFS_v15p2_RRTMGP_ps.xml
@@ -50,9 +50,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 +64,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 aacdc9cae..3c24010ef 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 3d76f48a8..8defa1a98 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 87decb00b..a6b3661c4 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 6846f32e5..6304c0702 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 85987551c..48db77817 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 165c8dab0..bdcae6193 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 3a543af16..564c24982 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 0d6d03aad..75184b12a 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 7798b4a95..70cce179d 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 559401e03..cbd574005 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 0747565d3..5a92d2d7d 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 030fa4bb8..f4192ef8a 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/case_config/astex.nml b/scm/etc/case_config/astex.nml
index de8389425..30c1f54c8 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 47f916a37..77bdf1cbb 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 6aab81340..4ca6d61d2 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 b8e81e3dc..f9c2b16d4 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 a1a84887f..98e569f37 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 000000000..c424f0918
--- /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/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90
index bbca9cac2..4b349eb93 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
!!
@@ -113,6 +116,7 @@ module GFS_typedefs
real(kind=kind_phys) :: dt_phys !< physics time step in seconds
!--- restart information
logical :: restart !< flag whether this is a coldstart (.false.) or a warmstart/restart (.true.)
+ logical :: cycling !< flag whether this is a coldstart (.false.) or a cycled run (.true.)
!--- hydrostatic/non-hydrostatic flag
logical :: hydrostatic !< flag whether this is a hydrostatic or non-hydrostatic run
!--- blocking data
@@ -211,6 +215,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 +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
@@ -488,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
@@ -517,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
@@ -541,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
@@ -574,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)
@@ -707,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
@@ -733,7 +773,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)
@@ -751,6 +797,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
@@ -770,6 +818,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
@@ -787,6 +836,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
@@ -798,13 +848,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
@@ -840,7 +892,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
@@ -894,7 +952,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
@@ -1032,6 +1089,7 @@ module GFS_typedefs
integer :: kdt !< current forecast iteration
logical :: first_time_step !< flag signaling first time step for time integration routine
logical :: restart !< flag whether this is a coldstart (.false.) or a warmstart/restart (.true.)
+ logical :: cycling !< flag whether this is a coldstart (.false.) or a cycled run (.true.)
logical :: hydrostatic !< flag whether this is a hydrostatic or non-hydrostatic run
integer :: jdat(1:8) !< current forecast date and time
!< (yr, mon, day, t-zone, hr, min, sec, mil-sec)
@@ -1156,6 +1214,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() !<
@@ -1167,6 +1228,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() !
@@ -1180,7 +1242,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() !
@@ -1336,9 +1397,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() !
@@ -1427,7 +1492,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
!
@@ -1516,6 +1585,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
@@ -1547,6 +1621,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() !<
@@ -1559,6 +1634,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() !<
@@ -1569,6 +1645,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() !<
@@ -1591,8 +1668,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() !<
@@ -1611,7 +1690,6 @@ 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() !<
@@ -1630,6 +1708,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() !<
@@ -1660,7 +1740,6 @@ module GFS_typedefs
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() !<
@@ -1738,10 +1817,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() !<
@@ -1755,9 +1835,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() !<
@@ -1771,27 +1854,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 !<
@@ -1801,6 +1897,7 @@ 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 :: tsnow(:) => null() !<
@@ -1819,6 +1916,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() !<
@@ -1918,7 +2016,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() !<
@@ -2051,6 +2154,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))
@@ -2067,6 +2171,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
@@ -2107,6 +2212,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))
@@ -2121,6 +2229,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
@@ -2210,7 +2321,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
@@ -2299,7 +2410,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))
@@ -2614,6 +2741,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
@@ -2683,9 +2815,15 @@ 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
+ logical :: cycling = .false. !< flag to activate extra cycling procedures
real(kind=kind_phys) :: fhcyc = 0. !< frequency for surface data cycling (hours)
integer :: thermodyn_id = 1 !< valid for GFS only for get_prs/phi
integer :: sfcpress_id = 1 !< valid for GFS only for get_prs/phi
@@ -2702,6 +2840,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
@@ -2769,8 +2908,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
@@ -2821,12 +2962,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
@@ -2845,7 +2993,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)
@@ -2886,6 +3039,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
@@ -2908,7 +3062,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
@@ -2922,7 +3077,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
@@ -3000,7 +3159,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
@@ -3021,7 +3179,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
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
@@ -3090,7 +3247,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, &
@@ -3098,6 +3256,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,&
@@ -3120,10 +3279,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, &
@@ -3131,10 +3293,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, 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, &
@@ -3143,7 +3308,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, &
@@ -3153,7 +3318,7 @@ 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, &
! vertical diffusion
@@ -3227,6 +3392,65 @@ 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.
+ 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
!
@@ -3235,6 +3459,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
@@ -3260,8 +3508,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
@@ -3290,6 +3537,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
@@ -3408,6 +3664,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
@@ -3418,8 +3675,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)
@@ -3442,10 +3699,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
@@ -3474,13 +3745,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
@@ -3507,6 +3787,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
@@ -3541,11 +3822,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
@@ -3578,12 +3868,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
@@ -3593,7 +3878,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
@@ -3790,8 +4075,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%kdt = 0
Model%first_time_step = .true.
Model%restart = restart
+ Model%cycling = cycling
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
@@ -3800,12 +4092,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
@@ -3862,7 +4148,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
@@ -3908,6 +4195,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
@@ -3918,7 +4207,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
@@ -4018,11 +4307,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
@@ -4073,6 +4366,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
@@ -4274,7 +4568,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
@@ -4292,6 +4595,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
@@ -4315,6 +4619,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
@@ -4401,6 +4706,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
@@ -4412,6 +4718,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'
@@ -4430,6 +4743,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
@@ -4490,6 +4807,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
@@ -4632,6 +4953,7 @@ subroutine control_print(Model)
print *, ' si : ', Model%si
print *, ' first_time_step : ', Model%first_time_step
print *, ' restart : ', Model%restart
+ print *, ' cycling : ', Model%cycling
print *, ' hydrostatic : ', Model%hydrostatic
endif
@@ -4792,6 +5114,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))
@@ -4813,6 +5138,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))
@@ -4822,6 +5148,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
@@ -4837,8 +5164,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))
@@ -4851,8 +5177,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
@@ -5011,7 +5336,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))
@@ -5062,11 +5386,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))
@@ -5148,6 +5473,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))
@@ -5158,28 +5486,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
@@ -5220,6 +5558,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)
@@ -5307,7 +5655,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
@@ -5368,7 +5715,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
@@ -5440,6 +5789,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.
@@ -5641,7 +5993,6 @@ 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))
@@ -5687,7 +6038,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
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))
@@ -5720,7 +6070,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))
@@ -5736,6 +6085,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))
@@ -5838,7 +6188,7 @@ subroutine interstitial_create (Interstitial, IM, Model)
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%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))
@@ -5864,6 +6214,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
@@ -5917,6 +6274,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
@@ -5980,9 +6365,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
@@ -6081,7 +6466,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
@@ -6156,18 +6540,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
@@ -6285,7 +6669,6 @@ 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
@@ -6327,7 +6710,6 @@ subroutine interstitial_phys_reset (Interstitial, Model)
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
@@ -6348,7 +6730,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
@@ -6364,6 +6745,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
@@ -6438,6 +6820,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
@@ -6482,6 +6871,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
@@ -6600,7 +7017,6 @@ 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 )
@@ -6646,7 +7062,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
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 )
@@ -6682,7 +7097,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 )
@@ -6701,6 +7115,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 )
@@ -6786,6 +7201,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 )
@@ -6868,6 +7290,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 bd0106859..6bc61a44b 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
@@ -492,6 +498,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 +554,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 +1149,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 +1317,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
@@ -1869,6 +1924,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
@@ -1876,6 +1932,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
@@ -1890,6 +1947,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]
@@ -1963,12 +2027,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
@@ -2012,16 +2118,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
@@ -2029,7 +2135,7 @@
units = count
dimensions = ()
type = integer
-[blksz2(ccpp_block_number)]
+[ncols]
standard_name = horizontal_dimension
long_name = horizontal dimension
units = count
@@ -2129,6 +2235,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
@@ -2766,6 +2878,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
@@ -2796,6 +2920,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
@@ -2808,6 +2957,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
@@ -2893,6 +3066,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
@@ -3026,6 +3224,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
@@ -3098,6 +3302,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
@@ -3412,7 +3628,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
@@ -3980,6 +4196,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
@@ -4053,6 +4275,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
@@ -4149,12 +4377,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
@@ -4270,6 +4525,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
@@ -4527,8 +4789,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
@@ -4610,13 +4879,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
@@ -5279,13 +5541,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
@@ -5531,6 +5786,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
@@ -5559,6 +5842,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
@@ -5588,7 +5899,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)
@@ -5608,6 +5919,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
@@ -5623,7 +5962,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)
@@ -5671,6 +6010,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
@@ -5741,6 +6108,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
@@ -5857,6 +6231,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
@@ -5876,6 +6278,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)
@@ -5974,6 +6382,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]
@@ -6147,6 +6569,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
@@ -6224,6 +6653,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
@@ -6371,6 +6807,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
@@ -6553,6 +7003,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
@@ -6567,6 +7018,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
@@ -6574,6 +7026,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
@@ -6602,6 +7055,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
@@ -6616,6 +7076,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
@@ -6763,13 +7230,6 @@
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
[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
@@ -6935,6 +7395,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
@@ -7207,13 +7679,6 @@
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
[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
@@ -7571,6 +8036,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
@@ -7578,6 +8057,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
@@ -7693,13 +8179,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
@@ -7721,6 +8200,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
@@ -7810,6 +8303,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
@@ -7817,6 +8317,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
@@ -7852,6 +8366,13 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
+[save_tcp]
+ standard_name = air_temperature_save_from_cumulus_paramterization
+ 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
@@ -7941,12 +8462,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
@@ -7968,6 +8510,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
@@ -7975,6 +8524,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
@@ -7982,6 +8538,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
@@ -7996,12 +8573,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
@@ -8044,6 +8642,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
@@ -8086,6 +8691,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
@@ -8139,6 +8751,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)
@@ -8263,6 +8882,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
diff --git a/scm/src/gmtb_scm.F90 b/scm/src/gmtb_scm.F90
index 35c57c054..ca7fec7fc 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 c92d30dd7..e423ef077 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 3af805f1d..c55bcbfdb 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,8 +57,8 @@ 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=character_length) :: physics_suite !< name of the physics suite name (currently only GFS_operational supported)
+ character(len=character_length) :: physics_nml
integer :: ioerror
@@ -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)
@@ -153,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
diff --git a/scm/src/gmtb_scm_output.F90 b/scm/src/gmtb_scm_output.F90
index 76465db6a..e2bee7a87 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_physical_constants.F90 b/scm/src/gmtb_scm_physical_constants.F90
index c74894767..f6d85a265 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 eb7f23bde..a7a10f88a 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
diff --git a/scm/src/gmtb_scm_setup.F90 b/scm/src/gmtb_scm_setup.F90
index 024337690..605667f45 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 3ccc14529..8753e1136 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 cc60f74c3..4aa87fc95 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,7 +348,7 @@ module gmtb_scm_type_defs
type(physics_type), target :: physics
- type(ccpp_t), allocatable, target :: cdata_cols(:)
+ type(ccpp_t), target :: cdata
contains
@@ -364,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
@@ -438,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
@@ -448,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), &
@@ -513,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
@@ -546,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
@@ -585,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
@@ -783,169 +782,165 @@ 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%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
+ 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
diff --git a/scm/src/gmtb_scm_type_defs.meta b/scm/src/gmtb_scm_type_defs.meta
index 7a620d23c..b80512d98 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 95f022a58..bbd8ee30a 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