diff --git a/.gitignore b/.gitignore index 2f925f287..488c4307b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ scm/bin/* *.pyc .metadata non-tracked_files/ +scm/data/GFS_physics_data/qr_acr*.dat +scm/data/GFS_physics_data/freezeH2O.dat diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 6ecca8071..8fd58f8cb 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -24,7 +24,7 @@ 'ccpp/physics/physics/GFDL_parse_tracers.F90', 'ccpp/physics/physics/aer_cloud.F', 'ccpp/physics/physics/aerclm_def.F', - #'ccpp/physics/physics/aerinterp.F90', + 'ccpp/physics/physics/aerinterp.F90', 'ccpp/physics/physics/calpreciptype.f90', 'ccpp/physics/physics/cldwat2m_micro.F', 'ccpp/physics/physics/cldmacro.F', @@ -35,7 +35,7 @@ 'ccpp/physics/physics/h2o_def.f', 'ccpp/physics/physics/h2ointerp.f90', 'ccpp/physics/physics/iccn_def.F', - #'ccpp/physics/physics/iccninterp.F90', + 'ccpp/physics/physics/iccninterp.F90', 'ccpp/physics/physics/iounitdef.f', 'ccpp/physics/physics/machine.F', 'ccpp/physics/physics/mersenne_twister.f', @@ -44,20 +44,22 @@ 'ccpp/physics/physics/micro_mg2_0.F90', 'ccpp/physics/physics/micro_mg3_0.F90', 'ccpp/physics/physics/module_bfmicrophysics.f', + 'ccpp/physics/physics/multi_gases.F90', 'ccpp/physics/physics/module_gfdl_cloud_microphys.F90', 'ccpp/physics/physics/module_nst_model.f90', 'ccpp/physics/physics/module_nst_parameters.f90', 'ccpp/physics/physics/module_nst_water_prop.f90', - 'ccpp/physics/physics/module_mp_thompson_hrrr_radar.F90', - 'ccpp/physics/physics/module_mp_thompson_hrrr.F90', + 'ccpp/physics/physics/module_mp_radar.F90', + 'ccpp/physics/physics/module_mp_thompson.F90', + 'ccpp/physics/physics/module_mp_thompson_make_number_concentrations.F90', 'ccpp/physics/physics/module_bl_mynn.F90', 'ccpp/physics/physics/module_sf_mynn.F90', 'ccpp/physics/physics/namelist_soilveg.f', 'ccpp/physics/physics/mfpblt.f', 'ccpp/physics/physics/mfscu.f', 'ccpp/physics/physics/num_parthds.F', - 'ccpp/physics/physics/ozinterp.f90', 'ccpp/physics/physics/ozne_def.f', + 'ccpp/physics/physics/ozinterp.f90', 'ccpp/physics/physics/physcons.F90', 'ccpp/physics/physics/physparam.f', 'ccpp/physics/physics/radcons.f90', @@ -72,8 +74,8 @@ 'ccpp/physics/physics/radsw_param.f', 'ccpp/physics/physics/rascnvv2.f', 'ccpp/physics/physics/sfcsub.F', - 'ccpp/physics/physics/set_soilveg.f', 'ccpp/physics/physics/sflx.f', + 'ccpp/physics/physics/set_soilveg.f', 'ccpp/physics/physics/surface_perturbation.F90', 'ccpp/physics/physics/cu_gf_deep.F90', 'ccpp/physics/physics/cu_gf_sh.F90', @@ -84,8 +86,7 @@ 'ccpp/physics/physics/set_soilveg_ruc.F90', 'ccpp/physics/physics/module_soil_pre.F90', 'ccpp/physics/physics/wv_saturation.F', - 'scm/src/GFS_typedefs.F90', - 'scm/src/CCPP_typedefs.F90' + 'scm/src/GFS_typedefs.F90' ] # Add all physics scheme files relative to basedir @@ -93,66 +94,73 @@ # 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_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_loop_control.F90' : ['physics'], - 'ccpp/physics/physics/GFS_time_vary_pre.scm.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/dcyc2.f' : ['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/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/mp_thompson_hrrr_pre.F90' : ['physics'], - 'ccpp/physics/physics/mp_thompson_hrrr.F90' : ['physics'], - 'ccpp/physics/physics/mp_thompson_hrrr_post.F90' : ['physics'], - 'ccpp/physics/physics/satmedmfvdif.F' : ['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/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_diff.f' : ['physics'], - 'ccpp/physics/physics/sfc_drv.f' : ['physics'], - 'ccpp/physics/physics/sfc_drv_ruc.F90' : ['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/gmtb_scm_sfc_flux_spec.F90' : ['physics'], + 'ccpp/physics/physics/GFS_DCNV_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/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/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/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/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/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/sfc_diff.f' : ['physics'], + 'ccpp/physics/physics/sfc_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/gmtb_scm_sfc_flux_spec.F90' : ['physics'], } # Auto-generated makefile/cmakefile snippets that contain all schemes @@ -172,6 +180,9 @@ # Directory where to put all auto-generated physics caps CAPS_DIR = 'ccpp/physics/physics' +# Directory where the suite definition files are stored +SUITES_DIR = 'ccpp/suites' + # Optional arguments - only required for schemes that use # optional arguments. ccpp_prebuild.py will throw an exception # if it encounters a scheme subroutine with optional arguments @@ -205,14 +216,14 @@ 'mean_effective_radius_for_snow_flake', ], }, - 'mp_thompson_hrrr' : { - 'mp_thompson_hrrr_init' : [ - 'tendency_of_water_friendly_aerosols_at_surface', - 'tendency_of_ice_friendly_aerosols_at_surface', + 'mp_thompson' : { + 'mp_thompson_init' : [ 'water_friendly_aerosol_number_concentration', 'ice_friendly_aerosol_number_concentration', + 'tendency_of_water_friendly_aerosols_at_surface', + 'tendency_of_ice_friendly_aerosols_at_surface', ], - 'mp_thompson_hrrr_run' : [ + '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', @@ -223,17 +234,15 @@ 'mean_effective_radius_for_snow_flake', ], }, - 'mp_thompson_hrrr_pre' : { - 'mp_thompson_hrrr_pre_run' : [ + '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', 'tendency_of_water_friendly_aerosols_at_surface', 'tendency_of_ice_friendly_aerosols_at_surface', ], }, - 'memcheck' : { - 'memcheck_run' : [ 'mpi_root' ], - }, #'subroutine_name_1' : 'all', #'subroutine_name_2' : 'none', #'subroutine_name_2' : [ 'var1', 'var3'], diff --git a/ccpp/framework b/ccpp/framework index ec6498f5b..4c9341e17 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit ec6498f5bbd2f0c3bdfff27514ef391445f59af8 +Subproject commit 4c9341e17188ad367942a49699a840de54fc4366 diff --git a/ccpp/physics b/ccpp/physics index e5a348116..fbacc2e34 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit e5a348116d74ed8057b711083fbf5994ac5657a6 +Subproject commit fbacc2e34d96c1aa7b24de52e384c62daf699afb diff --git a/scm/etc/case_config/input_namelists/input_fv3_cpt.nml b/ccpp/physics_namelists/input_CPT_v0.nml similarity index 90% rename from scm/etc/case_config/input_namelists/input_fv3_cpt.nml rename to ccpp/physics_namelists/input_CPT_v0.nml index 7740a6c3f..869223baa 100644 --- a/scm/etc/case_config/input_namelists/input_fv3_cpt.nml +++ b/ccpp/physics_namelists/input_CPT_v0.nml @@ -2,7 +2,6 @@ fhzero = 6. ldiag3d = .true. fhcyc = 24. - nst_anl = .true. use_ufo = .true. pre_rad = .false. crtrh = 0.93,0.90,0.95 @@ -24,12 +23,13 @@ shal_cnv = .true. cal_pre = .false. redrag = .true. - dspheat = .false. + dspheat = .true. hybedmf = .true. satmedmf = .false. + lheatstrg = .false. random_clds = .true. trans_trac = .true. - cnvcld = .false. + cnvcld = .true. imfshalcnv = 2 imfdeepcnv = -1 cdmbgwd = 3.5,0.25 @@ -38,11 +38,10 @@ isot = 1 oz_phys = .false. oz_phys_2015 = .true. - debug = .true. + debug = .false. ras = .false. cscnv = .true. do_shoc = .false. - shoc_parm = 7000.0,1.0,2.0,0.7,-999.0 do_aw = .true. shoc_cld = .false. h2o_phys = .true. @@ -50,6 +49,8 @@ xkzm_h = 0.5 xkzm_m = 0.5 xkzm_s = 1.0 + nstf_name = 2,1,1,0,5 + nst_anl = .true. ccwf = 1.0,1.0 dlqf = 0.25,0.05 mg_dcs = 200.0 @@ -65,13 +66,15 @@ mg_do_ice_gmao = .false. mg_do_liq_liu = .true. cs_parm = 8.0,4.0,1.0e3,3.5e3,20.0,1.0,0.0,1.0,0.6,0.0 + shoc_parm = 7000.0,1.0,2.0,0.7,-999.0 ctei_rm = 0.60,0.23 max_lon = 8000 max_lat = 4000 rhcmax = 0.9999999 effr_in = .true. - - nstf_name = 2,1,1,0,5 + ltaerosol = .false. + lradar = .false. + cplflx = .false. iau_delthrs = 6 iaufhrs = 30 iau_inc_files = "''" diff --git a/scm/etc/case_config/input_namelists/input_fv3_gfdlmp.nml b/ccpp/physics_namelists/input_GFS_v15.nml similarity index 90% rename from scm/etc/case_config/input_namelists/input_fv3_gfdlmp.nml rename to ccpp/physics_namelists/input_GFS_v15.nml index 0a3ad5dc3..817b69da4 100644 --- a/scm/etc/case_config/input_namelists/input_fv3_gfdlmp.nml +++ b/ccpp/physics_namelists/input_GFS_v15.nml @@ -26,6 +26,11 @@ dspheat = .true. hybedmf = .true. satmedmf = .false. + shinhong = .false. + do_ysu = .false. + lheatstrg = .false. + lgfdlmprad = .false. + effr_in = .false. random_clds = .false. trans_trac = .false. cnvcld = .true. @@ -36,6 +41,9 @@ ivegsrc = 1 isot = 1 debug = .false. + oz_phys = .false. + oz_phys_2015 = .true. + h2o_phys = .true. nstf_name = 2,1,1,0,5 xkzminv = 0.3 xkzm_m = 1.0 @@ -64,7 +72,6 @@ prog_ccn = .false. do_qa = .false. fast_sat_adj = .false. - tau_l2v = 300. tau_l2v = 225. tau_v2l = 150. tau_g2v = 900. diff --git a/scm/etc/case_config/input_namelists/input_fv3_suite2.nml b/ccpp/physics_namelists/input_GFS_v15plus.nml similarity index 90% rename from scm/etc/case_config/input_namelists/input_fv3_suite2.nml rename to ccpp/physics_namelists/input_GFS_v15plus.nml index 247378a45..dfb64c234 100644 --- a/scm/etc/case_config/input_namelists/input_fv3_suite2.nml +++ b/ccpp/physics_namelists/input_GFS_v15plus.nml @@ -26,6 +26,11 @@ dspheat = .true. hybedmf = .false. satmedmf = .true. + shinhong = .false. + do_ysu = .false. + lheatstrg = .false. + lgfdlmprad = .false. + effr_in = .false. random_clds = .false. trans_trac = .false. cnvcld = .true. @@ -36,6 +41,9 @@ ivegsrc = 1 isot = 1 debug = .false. + oz_phys = .false. + oz_phys_2015 = .true. + h2o_phys = .true. nstf_name = 2,1,1,0,5 xkzminv = 0.3 xkzm_m = 1.0 @@ -64,7 +72,6 @@ prog_ccn = .false. do_qa = .false. fast_sat_adj = .false. - tau_l2v = 300. tau_l2v = 225. tau_v2l = 150. tau_g2v = 900. diff --git a/scm/etc/case_config/input_namelists/input_fv3_gsd.nml b/ccpp/physics_namelists/input_GSD_v0.nml similarity index 84% rename from scm/etc/case_config/input_namelists/input_fv3_gsd.nml rename to ccpp/physics_namelists/input_GSD_v0.nml index 1a67dfdb4..ffeaf57a7 100644 --- a/scm/etc/case_config/input_namelists/input_fv3_gsd.nml +++ b/ccpp/physics_namelists/input_GSD_v0.nml @@ -1,15 +1,17 @@ &gfs_physics_nml fhzero = 6. h2o_phys = .true. - ldiag3d = .false. - fhcyc = 24. + ldiag3d = .true. + fhcyc = 0. nst_anl = .true. use_ufo = .true. pre_rad = .false. ncld = 5 imp_physics = 8 - ltaerosol = .false. - lradar = .false. + ltaerosol = .true. + lradar = .true. + ttendlim = -999. + make_number_concentrations = .true. pdfcld = .false. fhswr = 3600. fhlwr = 3600. @@ -23,18 +25,19 @@ lwhtr = .true. swhtr = .true. cnvgwd = .true. - shal_cnv = .false. + shal_cnv = .true. cal_pre = .false. redrag = .true. dspheat = .true. hybedmf = .false. satmedmf = .false. + lheatstrg = .false. do_mynnedmf = .true. do_mynnsfclay = .false. random_clds = .false. trans_trac = .true. cnvcld = .true. - imfshalcnv = -1 + imfshalcnv = 3 imfdeepcnv = 3 cdmbgwd = 3.5,0.25 prslrd0 = 0. @@ -58,5 +61,4 @@ bl_mynn_tkeadvect = .true. bl_mynn_edmf = 1 bl_mynn_edmf_mom = 1 - / diff --git a/ccpp/suites/suite_SCM_CPT_advanced.xml b/ccpp/suites/suite_SCM_CPT_v0.xml similarity index 92% rename from ccpp/suites/suite_SCM_CPT_advanced.xml rename to ccpp/suites/suite_SCM_CPT_v0.xml index d886d0975..7514a914d 100644 --- a/ccpp/suites/suite_SCM_CPT_advanced.xml +++ b/ccpp/suites/suite_SCM_CPT_v0.xml @@ -1,6 +1,6 @@ - + @@ -31,11 +31,12 @@ GFS_suite_interstitial_1 dcyc2t3 GFS_surface_generic_pre + GFS_surface_composites_pre GFS_suite_interstitial_2 - sfc_ex_coef + sfc_diff GFS_surface_loop_control_part1 sfc_nst_pre sfc_nst @@ -46,6 +47,7 @@ + GFS_surface_composites_post dcyc2t3_post sfc_diag sfc_diag_post @@ -83,6 +85,7 @@ cs_conv_aw_adj GFS_MP_generic_post sfc_sice_post + maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_SCM_CPT_advanced_prescribed_surface.xml b/ccpp/suites/suite_SCM_CPT_v0_prescribed_surface.xml similarity index 95% rename from ccpp/suites/suite_SCM_CPT_advanced_prescribed_surface.xml rename to ccpp/suites/suite_SCM_CPT_v0_prescribed_surface.xml index 4f6461ac8..ab84d411c 100644 --- a/ccpp/suites/suite_SCM_CPT_advanced_prescribed_surface.xml +++ b/ccpp/suites/suite_SCM_CPT_v0_prescribed_surface.xml @@ -1,6 +1,6 @@ - + @@ -30,8 +30,8 @@ get_prs_fv3 GFS_suite_interstitial_1 dcyc2t3 - GFS_suite_interstitial_2 GFS_surface_generic_pre + GFS_suite_interstitial_2 gmtb_scm_sfc_flux_spec dcyc2t3_post GFS_PBL_generic_pre @@ -67,6 +67,7 @@ cs_conv_aw_adj GFS_MP_generic_post sfc_sice_post + maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_SCM_GFS_2017_updated.xml b/ccpp/suites/suite_SCM_GFS_2017_updated.xml deleted file mode 100644 index a13a04714..000000000 --- a/ccpp/suites/suite_SCM_GFS_2017_updated.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - GFS_time_vary_pre - GFS_rrtmg_setup - GFS_rad_time_vary - GFS_phys_time_vary - - - - - GFS_suite_interstitial_rad_reset - GFS_rrtmg_pre - rrtmg_sw_pre - rrtmg_sw - rrtmg_sw_post - rrtmg_lw_pre - rrtmg_lw - rrtmg_lw_post - GFS_rrtmg_post - - - - - GFS_suite_interstitial_phys_reset - GFS_suite_stateout_reset - get_prs_fv3 - GFS_suite_interstitial_1 - dcyc2t3 - GFS_surface_generic_pre - GFS_suite_interstitial_2 - - - - sfc_ex_coef - GFS_surface_loop_control_part1 - sfc_nst_pre - sfc_nst - sfc_nst_post - lsm_noah - sfc_sice - GFS_surface_loop_control_part2 - - - - dcyc2t3_post - sfc_diag - sfc_diag_post - GFS_surface_generic_post - GFS_PBL_generic_pre - hedmf - GFS_PBL_generic_post - gwdps_pre - gwdps - gwdps_post - rayleigh_damp - GFS_suite_stateout_update - ozphys - GFS_DCNV_generic_pre - get_phi_fv3 - GFS_suite_interstitial_3 - samfdeepcnv - GFS_DCNV_generic_post - gwdc_pre - gwdc - gwdc_post - GFS_SCNV_generic_pre - samfshalcnv - samfshalcnv_post - GFS_SCNV_generic_post - GFS_suite_interstitial_4 - cnvc90 - GFS_MP_generic_pre - zhaocarr_gscond - zhaocarr_precpd - GFS_MP_generic_post - sfc_sice_post - - - - diff --git a/ccpp/suites/suite_SCM_GFS_2017_updated_csawmgshoc.xml b/ccpp/suites/suite_SCM_GFS_2017_updated_csawmgshoc.xml deleted file mode 100644 index a36687eaa..000000000 --- a/ccpp/suites/suite_SCM_GFS_2017_updated_csawmgshoc.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - GFS_time_vary_pre - GFS_rrtmg_setup - GFS_rad_time_vary - GFS_phys_time_vary - - - - - GFS_suite_interstitial_rad_reset - GFS_rrtmg_pre - rrtmg_sw_pre - rrtmg_sw - rrtmg_sw_post - rrtmg_lw_pre - rrtmg_lw - rrtmg_lw_post - GFS_rrtmg_post - - - - - GFS_suite_interstitial_phys_reset - GFS_suite_stateout_reset - get_prs_fv3 - GFS_suite_interstitial_1 - dcyc2t3 - GFS_surface_generic_pre - GFS_suite_interstitial_2 - - - - sfc_ex_coef - GFS_surface_loop_control_part1 - sfc_nst_pre - sfc_nst - sfc_nst_post - lsm_noah - sfc_sice - GFS_surface_loop_control_part2 - - - - dcyc2t3_post - sfc_diag - sfc_diag_post - GFS_surface_generic_post - GFS_PBL_generic_pre - moninshoc - GFS_PBL_generic_post - gwdps_pre - gwdps - gwdps_post - rayleigh_damp - GFS_suite_stateout_update - ozphys_2015 - h2ophys - GFS_DCNV_generic_pre - get_phi_fv3 - GFS_suite_interstitial_3 - shoc - cs_conv_pre - cs_conv - cs_conv_post - GFS_DCNV_generic_post - gwdc_pre - gwdc - gwdc_post - GFS_SCNV_generic_pre - GFS_SCNV_generic_post - GFS_suite_interstitial_4 - cnvc90 - GFS_MP_generic_pre - m_micro_pre - m_micro - m_micro_post - cs_conv_aw_adj - GFS_MP_generic_post - sfc_sice_post - - - - diff --git a/ccpp/suites/suite_SCM_GFS_2017_updated_csawmgshoc_prescribed_surface.xml b/ccpp/suites/suite_SCM_GFS_2017_updated_csawmgshoc_prescribed_surface.xml deleted file mode 100644 index bcbfe4f53..000000000 --- a/ccpp/suites/suite_SCM_GFS_2017_updated_csawmgshoc_prescribed_surface.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - GFS_time_vary_pre - GFS_rrtmg_setup - GFS_rad_time_vary - GFS_phys_time_vary - - - - - GFS_suite_interstitial_rad_reset - GFS_rrtmg_pre - rrtmg_sw_pre - rrtmg_sw - rrtmg_sw_post - rrtmg_lw_pre - rrtmg_lw - rrtmg_lw_post - GFS_rrtmg_post - - - - - GFS_suite_interstitial_phys_reset - GFS_suite_stateout_reset - get_prs_fv3 - GFS_suite_interstitial_1 - dcyc2t3 - GFS_suite_interstitial_2 - GFS_surface_generic_pre - gmtb_scm_sfc_flux_spec - dcyc2t3_post - GFS_PBL_generic_pre - moninshoc - GFS_PBL_generic_post - gwdps_pre - gwdps - gwdps_post - rayleigh_damp - GFS_suite_stateout_update - ozphys_2015 - h2ophys - GFS_DCNV_generic_pre - get_phi_fv3 - GFS_suite_interstitial_3 - shoc - cs_conv_pre - cs_conv - cs_conv_post - GFS_DCNV_generic_post - gwdc_pre - gwdc - gwdc_post - GFS_SCNV_generic_pre - GFS_SCNV_generic_post - GFS_suite_interstitial_4 - cnvc90 - GFS_MP_generic_pre - m_micro_pre - m_micro - m_micro_post - cs_conv_aw_adj - GFS_MP_generic_post - sfc_sice_post - - - - diff --git a/ccpp/suites/suite_SCM_GFS_2017_updated_prescribed_surface.xml b/ccpp/suites/suite_SCM_GFS_2017_updated_prescribed_surface.xml deleted file mode 100644 index faa32dd56..000000000 --- a/ccpp/suites/suite_SCM_GFS_2017_updated_prescribed_surface.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - GFS_time_vary_pre - GFS_rrtmg_setup - GFS_rad_time_vary - GFS_phys_time_vary - - - - - GFS_suite_interstitial_rad_reset - GFS_rrtmg_pre - rrtmg_sw_pre - rrtmg_sw - rrtmg_sw_post - rrtmg_lw_pre - rrtmg_lw - rrtmg_lw_post - GFS_rrtmg_post - - - - - GFS_suite_interstitial_phys_reset - GFS_suite_stateout_reset - get_prs_fv3 - GFS_suite_interstitial_1 - dcyc2t3 - GFS_suite_interstitial_2 - GFS_surface_generic_pre - gmtb_scm_sfc_flux_spec - dcyc2t3_post - GFS_PBL_generic_pre - hedmf - GFS_PBL_generic_post - gwdps_pre - gwdps - gwdps_post - rayleigh_damp - GFS_suite_stateout_update - ozphys - GFS_DCNV_generic_pre - get_phi_fv3 - GFS_suite_interstitial_3 - samfdeepcnv - GFS_DCNV_generic_post - gwdc_pre - gwdc - gwdc_post - GFS_SCNV_generic_pre - samfshalcnv - samfshalcnv_post - GFS_SCNV_generic_post - GFS_suite_interstitial_4 - cnvc90 - GFS_MP_generic_pre - zhaocarr_gscond - zhaocarr_precpd - GFS_MP_generic_post - sfc_sice_post - - - - diff --git a/ccpp/suites/suite_SCM_GFS_2017_updated_gfdlmp.xml b/ccpp/suites/suite_SCM_GFS_v15.xml similarity index 90% rename from ccpp/suites/suite_SCM_GFS_2017_updated_gfdlmp.xml rename to ccpp/suites/suite_SCM_GFS_v15.xml index d84dff796..51f22afb5 100644 --- a/ccpp/suites/suite_SCM_GFS_2017_updated_gfdlmp.xml +++ b/ccpp/suites/suite_SCM_GFS_v15.xml @@ -1,6 +1,6 @@ - + @@ -31,11 +31,12 @@ GFS_suite_interstitial_1 dcyc2t3 GFS_surface_generic_pre + GFS_surface_composites_pre GFS_suite_interstitial_2 - sfc_ex_coef + sfc_diff GFS_surface_loop_control_part1 sfc_nst_pre sfc_nst @@ -46,6 +47,7 @@ + GFS_surface_composites_post dcyc2t3_post sfc_diag sfc_diag_post @@ -58,7 +60,8 @@ gwdps_post rayleigh_damp GFS_suite_stateout_update - ozphys + ozphys_2015 + h2ophys GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 @@ -77,6 +80,7 @@ gfdl_cloud_microphys GFS_MP_generic_post sfc_sice_post + maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_SCM_GFS_2017_updated_gfdlmp_prescribed_surface.xml b/ccpp/suites/suite_SCM_GFS_v15_prescribed_surface.xml similarity index 92% rename from ccpp/suites/suite_SCM_GFS_2017_updated_gfdlmp_prescribed_surface.xml rename to ccpp/suites/suite_SCM_GFS_v15_prescribed_surface.xml index e79bdb92c..aaf62c2ca 100644 --- a/ccpp/suites/suite_SCM_GFS_2017_updated_gfdlmp_prescribed_surface.xml +++ b/ccpp/suites/suite_SCM_GFS_v15_prescribed_surface.xml @@ -1,6 +1,6 @@ - + @@ -30,8 +30,8 @@ get_prs_fv3 GFS_suite_interstitial_1 dcyc2t3 - GFS_suite_interstitial_2 GFS_surface_generic_pre + GFS_suite_interstitial_2 gmtb_scm_sfc_flux_spec dcyc2t3_post GFS_PBL_generic_pre @@ -42,7 +42,8 @@ gwdps_post rayleigh_damp GFS_suite_stateout_update - ozphys + ozphys_2015 + h2ophys GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 @@ -61,6 +62,7 @@ gfdl_cloud_microphys GFS_MP_generic_post sfc_sice_post + maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_SCM_GFS_suite2.xml b/ccpp/suites/suite_SCM_GFS_v15plus.xml similarity index 91% rename from ccpp/suites/suite_SCM_GFS_suite2.xml rename to ccpp/suites/suite_SCM_GFS_v15plus.xml index f1b5aa634..777d90c29 100644 --- a/ccpp/suites/suite_SCM_GFS_suite2.xml +++ b/ccpp/suites/suite_SCM_GFS_v15plus.xml @@ -1,6 +1,6 @@ - + @@ -31,11 +31,12 @@ GFS_suite_interstitial_1 dcyc2t3 GFS_surface_generic_pre + GFS_surface_composites_pre GFS_suite_interstitial_2 - sfc_ex_coef + sfc_diff GFS_surface_loop_control_part1 sfc_nst_pre sfc_nst @@ -46,6 +47,7 @@ + GFS_surface_composites_post dcyc2t3_post sfc_diag sfc_diag_post @@ -59,7 +61,7 @@ rayleigh_damp GFS_suite_stateout_update ozphys_2015 - + h2ophys GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 @@ -78,6 +80,7 @@ gfdl_cloud_microphys GFS_MP_generic_post sfc_sice_post + maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_SCM_GFS_suite2_prescribed_surface.xml b/ccpp/suites/suite_SCM_GFS_v15plus_prescribed_surface.xml similarity index 93% rename from ccpp/suites/suite_SCM_GFS_suite2_prescribed_surface.xml rename to ccpp/suites/suite_SCM_GFS_v15plus_prescribed_surface.xml index 38dbea59e..7338210be 100644 --- a/ccpp/suites/suite_SCM_GFS_suite2_prescribed_surface.xml +++ b/ccpp/suites/suite_SCM_GFS_v15plus_prescribed_surface.xml @@ -1,6 +1,6 @@ - + @@ -30,8 +30,8 @@ get_prs_fv3 GFS_suite_interstitial_1 dcyc2t3 - GFS_suite_interstitial_2 GFS_surface_generic_pre + GFS_suite_interstitial_2 gmtb_scm_sfc_flux_spec dcyc2t3_post GFS_PBL_generic_pre @@ -43,7 +43,7 @@ rayleigh_damp GFS_suite_stateout_update ozphys_2015 - + h2ophys GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 @@ -62,6 +62,7 @@ gfdl_cloud_microphys GFS_MP_generic_post sfc_sice_post + maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_SCM_GSD.xml b/ccpp/suites/suite_SCM_GSD_v0.xml similarity index 84% rename from ccpp/suites/suite_SCM_GSD.xml rename to ccpp/suites/suite_SCM_GSD_v0.xml index fc69dd1a2..befffd414 100644 --- a/ccpp/suites/suite_SCM_GSD.xml +++ b/ccpp/suites/suite_SCM_GSD_v0.xml @@ -1,6 +1,6 @@ - + @@ -15,10 +15,12 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre rrtmg_sw_pre + mynnrad_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre rrtmg_lw + mynnrad_post rrtmg_lw_post GFS_rrtmg_post @@ -31,11 +33,12 @@ GFS_suite_interstitial_1 dcyc2t3 GFS_surface_generic_pre + GFS_surface_composites_pre GFS_suite_interstitial_2 - mynnsfc_wrapper + sfc_diff GFS_surface_loop_control_part1 sfc_nst_pre sfc_nst @@ -45,6 +48,7 @@ + GFS_surface_composites_post dcyc2t3_post sfc_diag sfc_diag_post @@ -55,7 +59,8 @@ gwdps_post rayleigh_damp GFS_suite_stateout_update - ozphys + ozphys_2015 + h2ophys GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 @@ -70,11 +75,12 @@ GFS_suite_interstitial_4 cnvc90 GFS_MP_generic_pre - mp_thompson_hrrr_pre - mp_thompson_hrrr - mp_thompson_hrrr_post + mp_thompson_pre + mp_thompson + mp_thompson_post GFS_MP_generic_post cu_gf_driver_post + maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_SCM_GSD_prescribed_surface.xml b/ccpp/suites/suite_SCM_GSD_v0_prescribed_surface.xml similarity index 84% rename from ccpp/suites/suite_SCM_GSD_prescribed_surface.xml rename to ccpp/suites/suite_SCM_GSD_v0_prescribed_surface.xml index bcbeae6fa..29ee94796 100644 --- a/ccpp/suites/suite_SCM_GSD_prescribed_surface.xml +++ b/ccpp/suites/suite_SCM_GSD_v0_prescribed_surface.xml @@ -1,6 +1,6 @@ - + @@ -15,10 +15,12 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre rrtmg_sw_pre + mynnrad_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre rrtmg_lw + mynnrad_post rrtmg_lw_post GFS_rrtmg_post @@ -30,8 +32,8 @@ get_prs_fv3 GFS_suite_interstitial_1 dcyc2t3 - GFS_suite_interstitial_2 GFS_surface_generic_pre + GFS_suite_interstitial_2 gmtb_scm_sfc_flux_spec dcyc2t3_post mynnedmf_wrapper @@ -40,7 +42,8 @@ gwdps_post rayleigh_damp GFS_suite_stateout_update - ozphys + ozphys_2015 + h2ophys GFS_DCNV_generic_pre get_phi_fv3 GFS_suite_interstitial_3 @@ -55,11 +58,12 @@ GFS_suite_interstitial_4 cnvc90 GFS_MP_generic_pre - mp_thompson_hrrr_pre - mp_thompson_hrrr - mp_thompson_hrrr_post + mp_thompson_pre + mp_thompson + mp_thompson_post GFS_MP_generic_post cu_gf_driver_post + maximum_hourly_diagnostics diff --git a/scm/data/GFS_physics_data/global_h2oprdlos.f77 b/scm/data/GFS_physics_data/global_h2oprdlos.f77 new file mode 100644 index 000000000..bf9d5f43b Binary files /dev/null and b/scm/data/GFS_physics_data/global_h2oprdlos.f77 differ diff --git a/scm/data/GFS_physics_data/global_o3prdlos_orig.f77 b/scm/data/GFS_physics_data/global_o3prdlos_orig.f77 new file mode 100644 index 000000000..3fe1b4a2d Binary files /dev/null and b/scm/data/GFS_physics_data/global_o3prdlos_orig.f77 differ diff --git a/scm/data/GFS_physics_data/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 b/scm/data/GFS_physics_data/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 new file mode 100644 index 000000000..155df5dde Binary files /dev/null and b/scm/data/GFS_physics_data/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 differ diff --git a/scm/data/GFS_physics_data/solarconstant_noaa_a0.txt b/scm/data/GFS_physics_data/solarconstant_noaa_a0.txt old mode 100755 new mode 100644 diff --git a/scm/doc/README_MACOSX.txt b/scm/doc/README_MACOSX.txt index 573df800e..fbd8a11b8 100644 --- a/scm/doc/README_MACOSX.txt +++ b/scm/doc/README_MACOSX.txt @@ -29,5 +29,13 @@ In order to build and run SCM-CCPP v1 on Mac OS X, the following installation st cd /usr/local/src rm -fr realpath-osx -7. Install ncview for viewing netCDF files +7. Install the f90nml Python library + cd /usr/local/src + git clone https://github.com/marshallward/f90nml.git + cd f90nml + python setup.py install --user 2>&1 | tee log.install + # Test if the installation was successful + python -c "import f90nml" && echo "Installation of f90nml successful" + +8. Install ncview for viewing netCDF files brew install -v ncview diff --git a/scm/etc/case_config/LASSO_2016051812_control.nml b/scm/etc/case_config/LASSO_2016051812.nml similarity index 67% rename from scm/etc/case_config/LASSO_2016051812_control.nml rename to scm/etc/case_config/LASSO_2016051812.nml index 32afac261..ad79d788f 100644 --- a/scm/etc/case_config/LASSO_2016051812_control.nml +++ b/scm/etc/case_config/LASSO_2016051812.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 54000, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_LASSO_2016051812_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 2016, month = 5, day = 18, hour = 12, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/LASSO_2016051812_MSDA_control.nml b/scm/etc/case_config/LASSO_2016051812_MSDA.nml similarity index 67% rename from scm/etc/case_config/LASSO_2016051812_MSDA_control.nml rename to scm/etc/case_config/LASSO_2016051812_MSDA.nml index 3e8ef7488..da119ecbd 100644 --- a/scm/etc/case_config/LASSO_2016051812_MSDA_control.nml +++ b/scm/etc/case_config/LASSO_2016051812_MSDA.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 54000, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_LASSO_2016051812_MSDA_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 2016, month = 5, day = 18, hour = 12, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/LASSO_2016051812_VARA_control.nml b/scm/etc/case_config/LASSO_2016051812_VARA.nml similarity index 67% rename from scm/etc/case_config/LASSO_2016051812_VARA_control.nml rename to scm/etc/case_config/LASSO_2016051812_VARA.nml index 73029662c..7cde3a290 100644 --- a/scm/etc/case_config/LASSO_2016051812_VARA_control.nml +++ b/scm/etc/case_config/LASSO_2016051812_VARA.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 54000, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_LASSO_2016051812_VARA_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 2016, month = 5, day = 18, hour = 12, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/arm_sgp_summer_1997_A_cpt.nml b/scm/etc/case_config/arm_sgp_summer_1997_A.nml similarity index 67% rename from scm/etc/case_config/arm_sgp_summer_1997_A_cpt.nml rename to scm/etc/case_config/arm_sgp_summer_1997_A.nml index 7de74ed99..dc260cdb8 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_A_cpt.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_A.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 345600, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_A_cpt', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 6, day = 26, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_CPT_advanced_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_cpt.nml', column_area = 2.0E9, -$end +$end \ No newline at end of file diff --git a/scm/etc/case_config/arm_sgp_summer_1997_A_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_A_control.nml deleted file mode 100644 index 8a59ecfa5..000000000 --- a/scm/etc/case_config/arm_sgp_summer_1997_A_control.nml +++ /dev/null @@ -1,32 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'arm_sgp_summer_1997_A', -dt = 600.0, -time_scheme = 1, -runtime = 345600, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_A_control', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 1, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .true., -sfc_roughness_length_cm = 10.0 -sfc_type = 1, -reference_profile_choice = 2, -year = 1997, -month = 6, -day = 26, -hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/case_config/arm_sgp_summer_1997_A_csawmgshoc.nml b/scm/etc/case_config/arm_sgp_summer_1997_A_csawmgshoc.nml deleted file mode 100644 index 40f7fa2a8..000000000 --- a/scm/etc/case_config/arm_sgp_summer_1997_A_csawmgshoc.nml +++ /dev/null @@ -1,32 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'arm_sgp_summer_1997_A', -dt = 600.0, -time_scheme = 1, -runtime = 345600, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_A_csawmgshoc', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 1, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .true., -sfc_roughness_length_cm = 10.0 -sfc_type = 1, -reference_profile_choice = 2, -year = 1997, -month = 6, -day = 26, -hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_csawmgshoc_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_csawmgshoc.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/case_config/arm_sgp_summer_1997_A_gfdlmp.nml b/scm/etc/case_config/arm_sgp_summer_1997_A_gfdlmp.nml deleted file mode 100644 index 9cefa12f7..000000000 --- a/scm/etc/case_config/arm_sgp_summer_1997_A_gfdlmp.nml +++ /dev/null @@ -1,32 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'arm_sgp_summer_1997_A', -dt = 600.0, -time_scheme = 1, -runtime = 345600, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_A_gfdlmp', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 1, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .true., -sfc_roughness_length_cm = 10.0 -sfc_type = 1, -reference_profile_choice = 2, -year = 1997, -month = 6, -day = 26, -hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_gfdlmp_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_gfdlmp.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/case_config/arm_sgp_summer_1997_B_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_B.nml similarity index 66% rename from scm/etc/case_config/arm_sgp_summer_1997_B_control.nml rename to scm/etc/case_config/arm_sgp_summer_1997_B.nml index 584697353..19ce67213 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_B_control.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_B.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 432000, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_B_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 7, day = 7, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, -$end +$end \ No newline at end of file diff --git a/scm/etc/case_config/arm_sgp_summer_1997_C_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_C.nml similarity index 66% rename from scm/etc/case_config/arm_sgp_summer_1997_C_control.nml rename to scm/etc/case_config/arm_sgp_summer_1997_C.nml index 174263350..5e0bec4d6 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_C_control.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_C.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 432000, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_C_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 7, day = 12, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, -$end +$end \ No newline at end of file diff --git a/scm/etc/case_config/arm_sgp_summer_1997_R_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_R.nml similarity index 67% rename from scm/etc/case_config/arm_sgp_summer_1997_R_control.nml rename to scm/etc/case_config/arm_sgp_summer_1997_R.nml index 32ed223ee..762ce622e 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_R_control.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_R.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 345600, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_R_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 6, day = 18, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/arm_sgp_summer_1997_S_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_S.nml similarity index 66% rename from scm/etc/case_config/arm_sgp_summer_1997_S_control.nml rename to scm/etc/case_config/arm_sgp_summer_1997_S.nml index 44cbfe121..f00295265 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_S_control.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_S.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 345600, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_S_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 6, day = 22, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, -$end +$end \ No newline at end of file diff --git a/scm/etc/case_config/arm_sgp_summer_1997_T_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_T.nml similarity index 66% rename from scm/etc/case_config/arm_sgp_summer_1997_T_control.nml rename to scm/etc/case_config/arm_sgp_summer_1997_T.nml index 2f022b7da..bf847a198 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_T_control.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_T.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 259200, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_T_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 6, day = 30, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, -$end +$end \ No newline at end of file diff --git a/scm/etc/case_config/arm_sgp_summer_1997_U_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_U.nml similarity index 67% rename from scm/etc/case_config/arm_sgp_summer_1997_U_control.nml rename to scm/etc/case_config/arm_sgp_summer_1997_U.nml index 2f8922e1f..301c7807b 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_U_control.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_U.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 345600, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_U_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 7, day = 4, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/arm_sgp_summer_1997_X_control.nml b/scm/etc/case_config/arm_sgp_summer_1997_X.nml similarity index 67% rename from scm/etc/case_config/arm_sgp_summer_1997_X_control.nml rename to scm/etc/case_config/arm_sgp_summer_1997_X.nml index 7c14258c9..e7ed70562 100644 --- a/scm/etc/case_config/arm_sgp_summer_1997_X_control.nml +++ b/scm/etc/case_config/arm_sgp_summer_1997_X.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 2505600, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_arm_sgp_summer_1997_X_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1997, month = 6, day = 18, hour = 23, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/astex_control.nml b/scm/etc/case_config/astex.nml similarity index 68% rename from scm/etc/case_config/astex_control.nml rename to scm/etc/case_config/astex.nml index 6c78534e0..de8389425 100644 --- a/scm/etc/case_config/astex_control.nml +++ b/scm/etc/case_config/astex.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 144000, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_astex_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -21,11 +20,5 @@ year = 1992, month = 6, day = 13, hour = 0, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 3.7E5, $end diff --git a/scm/etc/case_config/bomex_control.nml b/scm/etc/case_config/bomex.nml similarity index 68% rename from scm/etc/case_config/bomex_control.nml rename to scm/etc/case_config/bomex.nml index 21ca2143b..cb9c82b07 100644 --- a/scm/etc/case_config/bomex_control.nml +++ b/scm/etc/case_config/bomex.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 21600, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_bomex_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -22,11 +21,5 @@ year = 1969, month = 6, day = 22, hour = 13, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_prescribed_surface', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/default.nml b/scm/etc/case_config/default.nml index c26b1cad5..59e94cfd5 100644 --- a/scm/etc/case_config/default.nml +++ b/scm/etc/case_config/default.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 2138400, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_twpice_control', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -21,11 +20,5 @@ year = 2006, month = 1, day = 19, hour = 3, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', column_area = 2.0E9, $end diff --git a/scm/etc/case_config/input_namelists/input_fv3_control.nml b/scm/etc/case_config/input_namelists/input_fv3_control.nml deleted file mode 100644 index bc05b447c..000000000 --- a/scm/etc/case_config/input_namelists/input_fv3_control.nml +++ /dev/null @@ -1,50 +0,0 @@ -&gfs_physics_nml - fhzero = 6. - ldiag3d = .true. - fhcyc = 24. - nst_anl = .true. - use_ufo = .true. - pre_rad = .false. - ncld = 1 - imp_physics = 99 - pdfcld = .false. - fhswr = 3600. - fhlwr = 3600. - ialb = 1 - iems = 1 - IAER = 111 - ico2 = 2 - isubc_sw = 2 - isubc_lw = 2 - isol = 2 - lwhtr = .true. - swhtr = .true. - cnvgwd = .true. - shal_cnv = .true. - cal_pre = .true. - redrag = .true. - dspheat = .true. - hybedmf = .true. - satmedmf = .false. - random_clds = .true. - trans_trac = .false. - cnvcld = .true. - imfshalcnv = 2 - imfdeepcnv = 2 - cdmbgwd = 3.5,0.25 - prslrd0 = 0. - ivegsrc = 1 - isot = 1 - debug = .true. - oz_phys = .true. - oz_phys_2015 = .false. - nstf_name = 2,1,1,0,5 - cplflx = .false. - iau_delthrs = 6 - iaufhrs = 30 - iau_inc_files = "''" - do_sppt = .false. - do_shum = .false. - do_skeb = .false. - do_sfcperts = .false. -/ diff --git a/scm/etc/case_config/input_namelists/input_fv3_csawmgshoc.nml b/scm/etc/case_config/input_namelists/input_fv3_csawmgshoc.nml deleted file mode 100644 index c572f748e..000000000 --- a/scm/etc/case_config/input_namelists/input_fv3_csawmgshoc.nml +++ /dev/null @@ -1,79 +0,0 @@ -&gfs_physics_nml - fhzero = 6. - ldiag3d = .true. - fhcyc = 24. - nst_anl = .true. - use_ufo = .true. - pre_rad = .false. - crtrh = 1.00,1.00,0.95 - ncld = 2 - imp_physics = 10 - pdfcld = .false. - fhswr = 3600. - fhlwr = 3600. - ialb = 1 - iems = 1 - IAER = 111 - ico2 = 2 - isubc_sw = 2 - isubc_lw = 2 - isol = 2 - lwhtr = .true. - swhtr = .true. - cnvgwd = .true. - shal_cnv = .false.. - cal_pre = .false. - redrag = .true. - dspheat = .false. - hybedmf = .false. - satmedmf = .false. - random_clds = .true. - trans_trac = .true. - cnvcld = .false. - imfshalcnv = -1 - imfdeepcnv = -1 - cdmbgwd = 3.5,0.25 - prslrd0 = 0. - ivegsrc = 1 - isot = 1 - debug = .false. - - ras = .false. - cscnv = .true. - do_shoc = .true. - shoc_parm = 7000.0,1.0,2.0,0.7,-999.0 - do_aw = .true. - shoc_cld = .true. - h2o_phys = .true. - shcnvcw = .false. - xkzm_h = 1.0 - xkzm_m = 1.0 - xkzm_s = 1.0 - ccwf = 1.0,1.0 - dlqf = 0.25,0.05 - mg_dcs = 200.0 - mg_ts_auto_ice = 180.0,900.0 - mg_qcvar = 1.0 - fprcp = 2 - pdfflag = 4 - iccn = .false. - aero_in = .false. - mg_do_graupel = .true. - mg_do_hail = .false. - do_sb_physics = .true. - mg_do_ice_gmao = .false. - mg_do_liq_liu = .true. - cs_parm = 8.0,4.0,1.0e3,3.5e3,20.0,1.0,0.0,1.0,0.6,0.0 - ctei_rm = 0.60,0.23 - max_lon = 8000 - max_lat = 4000 - rhcmax = 0.9999999 - effr_in = .true. - oz_phys = .false. - oz_phys_2015 = .true. - - nstf_name = 2,1,1,0,5 - iau_delthrs = 6 - iaufhrs = 30 - iau_inc_files = "''" -/ diff --git a/scm/etc/case_config/twpice_gsd.nml b/scm/etc/case_config/twpice.nml similarity index 70% rename from scm/etc/case_config/twpice_gsd.nml rename to scm/etc/case_config/twpice.nml index cbdc620b9..b8e81e3dc 100644 --- a/scm/etc/case_config/twpice_gsd.nml +++ b/scm/etc/case_config/twpice.nml @@ -7,7 +7,6 @@ time_scheme = 1, runtime = 2138400, output_frequency = 600.0, n_levels = 64, -output_dir = 'output_twpice_gsd', output_file = 'output', case_data_dir = '../data/processed_case_input', vert_coord_data_dir = '../data/vert_coord_data', @@ -21,11 +20,5 @@ year = 2006, month = 1, day = 19, hour = 3, -$end - -$physics_config -physics_suite = 'suite_SCM_GSD', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_gsd.nml', column_area = 2.0E9, -$end +$end \ No newline at end of file diff --git a/scm/etc/case_config/twpice_control.nml b/scm/etc/case_config/twpice_control.nml deleted file mode 100644 index c26b1cad5..000000000 --- a/scm/etc/case_config/twpice_control.nml +++ /dev/null @@ -1,31 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'twpice', -dt = 600.0, -time_scheme = 1, -runtime = 2138400, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_twpice_control', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 2, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .false., -sfc_type = 0, -reference_profile_choice = 1, -year = 2006, -month = 1, -day = 19, -hour = 3, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_control.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/case_config/twpice_cpt.nml b/scm/etc/case_config/twpice_cpt.nml deleted file mode 100644 index 80705957b..000000000 --- a/scm/etc/case_config/twpice_cpt.nml +++ /dev/null @@ -1,31 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'twpice', -dt = 600.0, -time_scheme = 1, -runtime = 2138400, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_twpice_cpt', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 2, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .false., -sfc_type = 0, -reference_profile_choice = 1, -year = 2006, -month = 1, -day = 19, -hour = 3, -$end - -$physics_config -physics_suite = 'suite_SCM_CPT_advanced', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_cpt.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/case_config/twpice_csawmgshoc.nml b/scm/etc/case_config/twpice_csawmgshoc.nml deleted file mode 100644 index d3528bd7f..000000000 --- a/scm/etc/case_config/twpice_csawmgshoc.nml +++ /dev/null @@ -1,31 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'twpice', -dt = 600.0, -time_scheme = 1, -runtime = 2138400, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_twpice_csawmgshoc', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 2, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .false., -sfc_type = 0, -reference_profile_choice = 1, -year = 2006, -month = 1, -day = 19, -hour = 3, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_csawmgshoc', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_csawmgshoc.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/case_config/twpice_gfdlmp.nml b/scm/etc/case_config/twpice_gfdlmp.nml deleted file mode 100644 index cc88a44bf..000000000 --- a/scm/etc/case_config/twpice_gfdlmp.nml +++ /dev/null @@ -1,31 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'twpice', -dt = 600.0, -time_scheme = 1, -runtime = 2138400, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_twpice_gfdlmp', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 2, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .false., -sfc_type = 0, -reference_profile_choice = 1, -year = 2006, -month = 1, -day = 19, -hour = 3, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_2017_updated_gfdlmp', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_gfdlmp.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/case_config/twpice_suite2.nml b/scm/etc/case_config/twpice_suite2.nml deleted file mode 100644 index 4e279b2a6..000000000 --- a/scm/etc/case_config/twpice_suite2.nml +++ /dev/null @@ -1,31 +0,0 @@ -$case_config -model_name = 'FV3', -n_columns = 1, -case_name = 'twpice', -dt = 600.0, -time_scheme = 1, -runtime = 2138400, -output_frequency = 600.0, -n_levels = 64, -output_dir = 'output_twpice_suite2', -output_file = 'output', -case_data_dir = '../data/processed_case_input', -vert_coord_data_dir = '../data/vert_coord_data', -thermo_forcing_type = 2, -mom_forcing_type = 3, -relax_time = 7200.0, -sfc_flux_spec = .false., -sfc_type = 0, -reference_profile_choice = 1, -year = 2006, -month = 1, -day = 19, -hour = 3, -$end - -$physics_config -physics_suite = 'suite_SCM_GFS_suite2', -physics_suite_dir = '../../ccpp/suites/', -physics_nml = '../etc/case_config/input_namelists/input_fv3_suite2.nml', -column_area = 2.0E9, -$end diff --git a/scm/etc/gmtb_scm_ens.py b/scm/etc/gmtb_scm_ens.py index 81555f186..e1ca48871 100755 --- a/scm/etc/gmtb_scm_ens.py +++ b/scm/etc/gmtb_scm_ens.py @@ -11,8 +11,8 @@ import sys import multiprocessing as mp -def run_SCM(case_config_file): - cmd = './gmtb_scm ' + case_config_file +def run_SCM(experiment_config_file): + cmd = './gmtb_scm ' + experiment_config_file args = shlex.split(cmd) process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -49,29 +49,29 @@ def worker(queue): #prepare the case config and model_config files (assuming ensemble forcing files already exist and are named case_name_ensXX) -base_case_config = 'twpice_gf_test_t1534_ctl' -case_config_dir = 'case_config' +base_experiment_config = 'twpice_gf_test_t1534_ctl' +experiment_config_dir = 'experiment_config' model_config_dir = 'model_config' num_files = 100 #q = Queue() -ens_case_configs = [] +ens_experiment_configs = [] #read in the base case config namelist -base_nml_filename = case_config_dir + '/' + base_case_config +base_nml_filename = experiment_config_dir + '/' + base_experiment_config base_nml = f90nml.read(base_nml_filename + '.nml') -if base_nml['case_config']: - case_name = base_nml['case_config']['case_name'] - output_dir = base_nml['case_config']['output_dir'] - output_file = base_nml['case_config']['output_file'] +if base_nml['experiment_config']: + case_name = base_nml['experiment_config']['case_name'] + output_dir = base_nml['experiment_config']['output_dir'] + output_file = base_nml['experiment_config']['output_file'] for i in range(num_files): - patch_nml = {'case_config': {'case_name': case_name + '_ens' + str(i).zfill(2), 'output_dir': output_dir + '/ens', 'output_file': output_file + '_ens' + str(i).zfill(2)}} + patch_nml = {'experiment_config': {'case_name': case_name + '_ens' + str(i).zfill(2), 'output_dir': output_dir + '/ens', 'output_file': output_file + '_ens' + str(i).zfill(2)}} f90nml.patch(base_nml_filename + '.nml', patch_nml, base_nml_filename + '_ens' + str(i).zfill(2) + '.nml') - ens_case_configs.append(base_case_config + '_ens' + str(i).zfill(2)) - #q.put_nowait((base_case_config + '_ens' + str(i).zfill(2),)) + ens_experiment_configs.append(base_experiment_config + '_ens' + str(i).zfill(2)) + #q.put_nowait((base_experiment_config + '_ens' + str(i).zfill(2),)) #copy over the same model_config - shutil.copy(model_config_dir + '/' + base_case_config + '.nml', model_config_dir + '/' + base_case_config + '_ens' + str(i).zfill(2) + '.nml') + shutil.copy(model_config_dir + '/' + base_experiment_config + '.nml', model_config_dir + '/' + base_experiment_config + '_ens' + str(i).zfill(2) + '.nml') else: print('Cannot make an ensemble out of a single timestep case config file') @@ -95,14 +95,14 @@ def worker(queue): # # # start processes # pool = mp.Pool() # use all available CPUs -# pool.map(safe_run, ens_case_configs) +# pool.map(safe_run, ens_experiment_configs) # # if __name__=="__main__": # mp.freeze_support() # optional if the program is not frozen # main() -for i in range(len(ens_case_configs)): - cmd = './gmtb_scm ' + ens_case_configs[i] +for i in range(len(ens_experiment_configs)): + cmd = './gmtb_scm ' + ens_experiment_configs[i] args = shlex.split(cmd) print(args) with open(os.devnull, "w") as f: diff --git a/scm/etc/gmtb_scm_run.py b/scm/etc/gmtb_scm_slurm_example.py similarity index 66% rename from scm/etc/gmtb_scm_run.py rename to scm/etc/gmtb_scm_slurm_example.py index c9ccbabe6..e2ed6853c 100755 --- a/scm/etc/gmtb_scm_run.py +++ b/scm/etc/gmtb_scm_slurm_example.py @@ -3,35 +3,34 @@ from subprocess import Popen, PIPE import time -proc = Popen('qsub', shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) +proc = Popen('sbatch', shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) ### User-editable section -- See https://theiadocs.rdhpcs.noaa.gov/wikis/theiadocs/doku.php?id=running_and_monitoring_jobs for appropriate values ### job_name = "test_job" account = "gmtb" -walltime = "0:20:00" -processors = "procs=1" +walltime = "20" +processors = "1" queue = "batch" -command = "./gmtb_scm twpice" +command = "./run_gmtb_scm.py -c twpice" email_addr = "Grant.Firl@noaa.gov" -email_occasion = "abe" +email_occasion = "BEGIN,END,FAIL" serial_mem = "512M" working_dir = "../bin" ### End User-editable section ### job_string = """#!/bin/bash -#PBS -N %s -#PBS -A %s -#PBS -l walltime=%s -#PBS -l %s -#PBS -o ./%s.out -#PBS -e ./%s.err -#PBS -q %s -#PBS -M %s -#PBS -m %s -#PBS -l vmem=%s -#PBS -d %s -#PBS -V +#SBATCH -J %s +#SBATCH -A %s +#SBATCH --time=%s +#SBATCH -n %s +#SBATCH -o ./%s.out +#SBATCH -e ./%s.err +#SBATCH -q %s +#SBATCH --mail-user=%s +#SBATCH --mail-type=%s +#SBATCH --mem=%s +#SBATCH -D%s %s""" % (job_name, account, walltime, processors, job_name, job_name, queue, email_addr, email_occasion, serial_mem, working_dir, command) # Send job_string to qsub diff --git a/scm/etc/scripts/plot_configs/arm_sgp_summer_1997_A_physics_test.ini b/scm/etc/scripts/plot_configs/arm_sgp_summer_1997_A_physics_test.ini new file mode 100644 index 000000000..adf58ae55 --- /dev/null +++ b/scm/etc/scripts/plot_configs/arm_sgp_summer_1997_A_physics_test.ini @@ -0,0 +1,56 @@ +gmtb_scm_datasets = ../../bin/output_arm_sgp_summer_1997_A_GFS_v15/output.nc, ../../bin/output_arm_sgp_summer_1997_A_GFS_v15plus/output.nc, ../../bin/output_arm_sgp_summer_1997_A_CPT_v0/output.nc, ../../bin/output_arm_sgp_summer_1997_A_GSD_v0/output.nc +gmtb_scm_datasets_labels = GFSv15, GFSv15+, CPTv0, GSDv0 +plot_dir = ../../bin/plots_arm_sgp_summer_1997_A/ +obs_file = ../../data/raw_case_input/sgp3hIOPsndgBasedV2.0_ConstrVarAnaX1.c1.19970618.000000.cdf +obs_compare = True +plot_ind_datasets = True +time_series_resample = True + +[time_slices] + [[A]] + start = 1997, 6, 26, 23 + end = 1997, 6, 30, 23 + +[time_snapshots] + +[plots] + [[profiles_mean]] + vars = T, qv, cld, + vars_labels = 'T (k)', 'q (kg/kg)', 'cloud fraction', + 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_forcing]]] + vars = T_force_tend, dT_dt_PBL, dT_dt_deepconv, dT_dt_shalconv, dT_dt_micro, dT_dt_lwrad, dT_dt_swrad + vars_labels = 'force', 'PBL', 'Deep Con', 'Shal Con', 'MP', 'LW', 'SW' + x_label = 'K/day' + [[[q_forcing]]] + vars = qv_force_tend, dq_dt_PBL, dq_dt_deepconv, dq_dt_shalconv, dq_dt_micro + vars_labels = 'force', 'PBL', 'Deep Con', 'Shal Con', 'MP', 'LW' + x_label = 'g/kg/day' + + + [[profiles_instant]] + + [[time_series]] + vars = rain, + vars_labels = 'rain rate (m/s)', + + [[contours]] + vars = T, qv + vars_labels = 'Temperature','Water Vapor' + 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/etc/scripts/plot_configs/ccpp_test_physics_test.ini b/scm/etc/scripts/plot_configs/ccpp_test_physics_test.ini index b59b73798..0aff2c4d0 100644 --- a/scm/etc/scripts/plot_configs/ccpp_test_physics_test.ini +++ b/scm/etc/scripts/plot_configs/ccpp_test_physics_test.ini @@ -1,6 +1,6 @@ -gmtb_scm_datasets = ../../bin/output_twpice_gfdlmp/output.nc, ../../bin/output_twpice_suite2/output.nc, ../../bin/output_twpice_cpt/output.nc -gmtb_scm_datasets_labels = S1, S2, S3 -plot_dir = ../../bin/plots_S1_S2_S3/ +gmtb_scm_datasets = ../../bin/output_twpice_GFS_v15/output.nc, ../../bin/output_twpice_GFS_v15plus/output.nc, ../../bin/output_twpice_CPT_v0/output.nc, ../../bin/output_twpice_GSD_v0/output.nc +gmtb_scm_datasets_labels = GFSv15, GFSv15+, CPTv0, GSDv0 +plot_dir = ../../bin/plots_S1_S2_S3_S4/ obs_file = ../../data/raw_case_input/twp180iopsndgvarana_v2.1_C3.c1.20060117.000000.cdf obs_compare = True plot_ind_datasets = True diff --git a/scm/src/CCPP_typedefs.F90 b/scm/src/CCPP_typedefs.F90 deleted file mode 100644 index 5fca08cc0..000000000 --- a/scm/src/CCPP_typedefs.F90 +++ /dev/null @@ -1,281 +0,0 @@ -module CCPP_typedefs - - implicit none - -#if 0 -!! \section arg_table_CCPP_typedefs -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------------------------------------------|---------------------------------------------------------------|--------------------------------------------------------------------------|---------|------|------------------------|-----------|--------|----------| -!! | CCPP_interstitial | CCPP_Interstitial_type | derived type CCPP_interstitial_type | DDT | 0 | CCPP_interstitial_type | | none | F | -!! -#endif - - private - - public CCPP_shared_type, CCPP_interstitial_type, kind_dyn - -#ifdef OVERLOAD_R4 - integer, parameter :: kind_dyn = 4 -#else - integer, parameter :: kind_dyn = 8 -#endif - -#if 0 -!! \section arg_table_CCPP_shared_type -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------------------------------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------------|---------|------|-------------|-----------|--------|----------| -!! | CCPP_shared(nt)%hydrostatic | flag_for_hydrostatic_solver | flag for use the hydrostatic or nonhydrostatic solver | flag | 0 | logical | | none | F | -!! | CCPP_shared(nt)%nthreads | omp_threads | number of OpenMP threads available for physics schemes | count | 0 | integer | | none | F | -!! | CCPP_shared(nt)%phys_hydrostatic | flag_for_hydrostatic_heating_from_physics | flag for use of hydrostatic heating in physics | flag | 0 | logical | | none | F | -!! -#endif - type CCPP_shared_type - - logical :: hydrostatic - integer :: nthreads - logical :: phys_hydrostatic - - contains - - procedure :: create => shared_create !< allocate/set data - procedure :: reset => shared_reset !< reset data - procedure :: mprint => shared_print !< print data - - end type CCPP_shared_type - -#if 0 -!! \section arg_table_CCPP_interstitial_type -!! | local_name | standard_name | long_name | units | rank | type | kind | intent | optional | -!! |----------------------------------------------------|---------------------------------------------------------------|-------------------------------------------------------------------------------------|---------|------|-------------|-----------|--------|----------| -!! | CCPP_interstitial%akap | kappa_dry_for_fast_physics | modified kappa for fast physics | none | 0 | real | kind_dyn | none | F | -!! | CCPP_interstitial%bdt | | large time step for dynamics | s | 0 | real | kind_dyn | none | F | -!! | CCPP_interstitial%cappa | cappa_moist_gas_constant_at_Lagrangian_surface | cappa(i,j,k) = rdgas / ( rdgas + cvm(i)/(1.+r_vir*q(i,j,k,sphum)) ) | none | 3 | real | kind_dyn | none | F | -!! | CCPP_interstitial%dtdt | tendency_of_air_temperature_at_Lagrangian_surface | air temperature tendency due to fast physics at Lagrangian surface | K s-1 | 3 | real | kind_dyn | none | F | -!! | CCPP_interstitial%do_qa | flag_for_inline_cloud_fraction_calculation | flag for the inline cloud fraction calculation | flag | 0 | logical | | none | F | -!! | CCPP_interstitial%fast_mp_consv | flag_for_fast_microphysics_energy_conservation | flag for fast microphysics energy conservation | flag | 0 | logical | | none | F | -!! | CCPP_interstitial%kmp | top_layer_index_for_fast_physics | top_layer_inder_for_gfdl_mp | index | 0 | integer | | none | F | -!! | CCPP_interstitial%last_step | flag_for_the_last_step_of_k_split_remapping | flag for the last step of k-split remapping | flag | 0 | logical | | none | F | -!! | CCPP_interstitial%mdt | time_step_for_remapping_for_fast_physics | remapping time step | s | 0 | real | kind_dyn | none | F | -!! | CCPP_interstitial%npzdelz | vertical_dimension_for_thickness_at_Lagrangian_surface | vertical dimension for thickness at Lagrangian surface | count | 0 | integer | | none | F | -!! | CCPP_interstitial%out_dt | flag_for_tendency_of_air_temperature_at_Lagrangian_surface | flag for calculating tendency of air temperature due to fast physics | flag | 0 | logical | | none | F | -!! | CCPP_interstitial%te0_2d | atmosphere_energy_content_in_column | atmosphere total energy in columns | J m-2 | 2 | real | kind_dyn | none | F | -!! | CCPP_interstitial%te0 | atmosphere_energy_content_at_Lagrangian_surface | atmosphere total energy at Lagrangian surface | J m-2 | 3 | real | kind_dyn | none | F | -!! | CCPP_interstitial%zvir | ratio_of_vapor_to_dry_air_gas_constants_minus_one_default_kind| zvir=rv/rd-1.0 | none | 0 | real | kind_dyn | none | F | -!! -#endif - type CCPP_interstitial_type - - real(kind_dyn) :: akap - real(kind_dyn) :: bdt - real(kind_dyn), pointer :: cappa(:,:,:) - logical :: do_qa - real(kind_dyn), pointer :: dtdt(:,:,:) - logical :: fast_mp_consv - integer :: kmp - logical :: last_step - real(kind_dyn) :: mdt - integer :: npzdelz - logical :: out_dt - real(kind_dyn), pointer :: pfull(:) - real(kind_dyn), pointer :: te0_2d(:,:) ! called te_2d in fv_dynamics, te0_2d in Lagrangian_to_Eulerian, te0_2d in fv_sat_adj - real(kind_dyn), pointer :: te0(:,:,:) ! called dp1 in fv_dynamics, te in Lagrangian_to_Eulerian, te0 in fv_sat_adj - real(kind_dyn) :: zvir - - contains - - procedure :: create => interstitial_create !< allocate array data - procedure :: reset => interstitial_reset !< reset array data - procedure :: mprint => interstitial_print !< print array data - - end type CCPP_interstitial_type - -contains - -!----------------------------- -! CCPP_shared_type -!----------------------------- - subroutine shared_create (Shared, hydrostatic, phys_hydrostatic) - ! - implicit none - ! - class(CCPP_shared_type) :: Shared - logical, intent(in) :: hydrostatic - logical, intent(in) :: phys_hydrostatic - ! - Shared%hydrostatic = hydrostatic - ! Number of OpenMP threads available for schemes, default only one - Shared%nthreads = 1 - ! DH* - ! The input phys_hydrostatic from Atm does not match the - ! hardcoded value for calling GFDL MP in GFS_physics_driver.F90 - !Shared%phys_hydrostatic = phys_hydrostatic - Shared%phys_hydrostatic = .true. - ! *DH - ! - call Shared%reset() - ! - end subroutine shared_create - - subroutine shared_reset (Shared) - ! - implicit none - ! - class(CCPP_shared_type) :: Shared - ! - end subroutine shared_reset - - subroutine shared_print(Shared) - ! - implicit none - ! - class(CCPP_shared_type) :: Shared - ! - write (0,'(a)') 'Shared_print' - write (0,*) 'Shared%hydrostatic = ', Shared%hydrostatic - write (0,*) 'Shared%nthreads = ', Shared%nthreads - write (0,*) 'Shared%phys_hydrostatic = ', Shared%phys_hydrostatic - write (0,*) 'Shared_print: end' - ! - end subroutine shared_print - -!----------------------------- -! CCPP_interstitial_type -!----------------------------- - subroutine interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd, jed, npz, & - dt_atmos, p_split, k_split, zvir, p_ref, ak, bk, do_qa, & - kappa, hydrostatic) - ! - implicit none - ! - class(CCPP_interstitial_type) :: Interstitial - integer, intent(in) :: is - integer, intent(in) :: ie - integer, intent(in) :: isd - integer, intent(in) :: ied - integer, intent(in) :: js - integer, intent(in) :: je - integer, intent(in) :: jsd - integer, intent(in) :: jed - integer, intent(in) :: npz - real(kind_dyn), intent(in) :: dt_atmos - integer, intent(in) :: p_split - integer, intent(in) :: k_split - real(kind_dyn), intent(in) :: zvir - real(kind_dyn), intent(in) :: p_ref - real(kind_dyn), intent(in) :: ak(:) - real(kind_dyn), intent(in) :: bk(:) - logical, intent(in) :: do_qa - real(kind_dyn), intent(in) :: kappa - logical, intent(in) :: hydrostatic - ! -#ifdef MOIST_CAPPA - allocate (Interstitial%cappa (isd:ied, jsd:jed, 1:npz) ) -#else - allocate (Interstitial%cappa (isd:isd, jsd:jsd, 1) ) -#endif - allocate (Interstitial%dtdt (is:ie, js:je, 1:npz) ) - allocate (Interstitial%pfull (1:npz) ) - allocate (Interstitial%te0_2d (is:ie, js:je) ) - allocate (Interstitial%te0 (isd:ied, jsd:jed, 1:npz) ) - ! - ! Initialize variables to default values -#ifdef SW_DYNAMICS - Interstitial%akap = 1. -#else - Interstitial%akap = kappa -#endif - Interstitial%bdt = dt_atmos/real(abs(p_split)) - Interstitial%do_qa = do_qa - Interstitial%mdt = Interstitial%bdt/real(k_split) - if (hydrostatic) then - Interstitial%npzdelz = 1 - else - Interstitial%npzdelz = npz - end if - Interstitial%zvir = zvir - ! - ! Calculate vertical pressure levels - call interstitital_calculate_pressure_levels(Interstitial, npz, p_ref, ak, bk) - ! - ! Reset all other variables - call Interstitial%reset() - ! - end subroutine interstitial_create - - subroutine interstitital_calculate_pressure_levels(Interstitial, npz, p_ref, ak, bk) - - implicit none - - class(CCPP_interstitial_type) :: Interstitial - integer, intent(in) :: npz - real(kind_dyn), intent(in) :: p_ref - real(kind_dyn), intent(in) :: ak(:) - real(kind_dyn), intent(in) :: bk(:) - - real(kind_dyn) :: ph1 - real(kind_dyn) :: ph2 - integer :: k - -#ifdef SW_DYNAMICS - Interstitial%pfull(1) = 0.5*p_ref -#else - do k=1,npz - ph1 = ak(k ) + bk(k )*p_ref - ph2 = ak(k+1) + bk(k+1)*p_ref - Interstitial%pfull(k) = (ph2 - ph1) / log(ph2/ph1) - enddo -#endif - ! DH* This is copied from fv_mapz.F90, does it work with SW_DYNAMICS? - do k=1,npz - Interstitial%kmp = k - if ( Interstitial%pfull(k) > 10.E2 ) exit - enddo - end subroutine interstitital_calculate_pressure_levels - - subroutine interstitial_reset (Interstitial) - ! - implicit none - ! - class(CCPP_interstitial_type) :: Interstitial - ! - Interstitial%cappa = 0.0 - Interstitial%dtdt = 0.0 - Interstitial%fast_mp_consv = .false. - Interstitial%last_step = .false. - Interstitial%out_dt = .false. - Interstitial%te0_2d = 0.0 - Interstitial%te0 = 0.0 - ! - end subroutine interstitial_reset - - subroutine interstitial_print(Interstitial) - ! - implicit none - ! - class(CCPP_interstitial_type) :: Interstitial - ! - ! Print static variables - write (0,'(a)') 'Interstitial_print' - write (0,*) 'Interstitial_print: values that do not change' - write (0,*) 'Interstitial%akap = ', Interstitial%akap - write (0,*) 'Interstitial%bdt = ', Interstitial%bdt - write (0,*) 'Interstitial%kmp = ', Interstitial%kmp - write (0,*) 'Interstitial%mdt = ', Interstitial%mdt - write (0,*) 'sum(Interstitial%pfull ) = ', sum(Interstitial%pfull ) - write (0,*) 'Interstitial%zvir = ', Interstitial%zvir - ! Print all other variables - write (0,*) 'Interstitial_print: values that change' - write (0,*) 'sum(Interstitial%cappa ) = ', sum(Interstitial%cappa ) - write (0,*) 'Interstitial%do_qa = ', Interstitial%do_qa - write (0,*) 'sum(Interstitial%dtdt ) = ', sum(Interstitial%dtdt ) - write (0,*) 'Interstitial%fast_mp_consv = ', Interstitial%fast_mp_consv - write (0,*) 'Interstitial%last_step = ', Interstitial%last_step - write (0,*) 'Interstitial%out_dt = ', Interstitial%out_dt - write (0,*) 'sum(Interstitial%te0_2d ) = ', sum(Interstitial%te0_2d ) - write (0,*) 'sum(Interstitial%te0 ) = ', sum(Interstitial%te0 ) - write (0,*) 'Interstitial_print: end' - ! - end subroutine interstitial_print - -end module CCPP_typedefs - diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index a2e0b52f2..cf35813d5 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -7,8 +7,12 @@ include(CMakeForceCompiler) SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules) -#MESSAGE("The NETCDF env. variable is $ENV{NETCDF}") -SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{NETCDF}) +IF(DEFINED ENV{NETCDF}) + MESSAGE("The NETCDF env. variable is $ENV{NETCDF}") + SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{NETCDF}) +ELSE(DEFINED ENV{NETCDF}) + MESSAGE(FATAL_ERROR "The NETCDF environement variable must be set to point to your NetCDF installation before building. Stopping...") +ENDIF(DEFINED ENV{NETCDF}) SET(CCPP_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework) SET(GFSPHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics) @@ -32,10 +36,6 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) "MinSizeRel" "RelWithDebInfo") endif() -#this should call the custome FindNetCDF.cmake file in /src/cmake/modules and populate the NETCDF_INCLUDES and NETCDF_LIBRARIES variables with the appropriate values -SET(NETCDF_F90 "YES") -FIND_PACKAGE(NetCDF) -INCLUDE_DIRECTORIES(${NETCDF_INCLUDES}) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/framework/src) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/physics) @@ -107,6 +107,48 @@ elseif (${CMAKE_BUILD_TYPE} MATCHES "Release") endif (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") endif (${CMAKE_BUILD_TYPE} MATCHES "Debug") +#------------------------------------------------------------------------------ +# Set netCDF flags for preprocessor, compiler and linker (if defined) +set(NETCDF_DIR $ENV{NETCDF}) +if(NETCDF_DIR) + set (NETCDF_INC "-I${NETCDF_DIR}/include") + set (NETCDF_LIB "-L${NETCDF_DIR}/lib -lnetcdff -lnetcdf") + set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${NETCDF_INC} ${NETCDF_LIB}") + ADD_DEFINITIONS(-DNETCDF) + message (STATUS "Enable netCDF support") +else(NETCDF_DIR) + message (STATUS "Disable netCDF support") +endif(NETCDF_DIR) + +#------------------------------------------------------------------------------ +# Set SIONlib flags for preprocessor, compiler and linker (if defined) +set(SIONLIB $ENV{SIONLIB}) +if (SIONLIB) + execute_process(COMMAND ${SIONLIB}/bin/sionconfig --mpi --cflags --f90 + RESULT_VARIABLE exit_code + OUTPUT_VARIABLE SIONlib_Fortran_FLAGS + ERROR_VARIABLE stderr + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE) + if (NOT exit_code EQUAL "0") + message (FATAL_ERROR "Execution of '${SIONLIB}/bin/sionconfig --mpi --cflags --f90' failed") + endif (NOT exit_code EQUAL "0") + execute_process(COMMAND ${SIONLIB}/bin/sionconfig --mpi --libs --f90 + RESULT_VARIABLE exit_code + OUTPUT_VARIABLE SIONlib_Fortran_LIBS + ERROR_VARIABLE stderr + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE) + if (NOT exit_code EQUAL "0") + message (FATAL_ERROR "Execution of '${SIONLIB}/bin/sionconfig --mpi --libs --f90' failed") + endif (NOT exit_code EQUAL "0") + set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${SIONlib_Fortran_FLAGS} ${SIONlib_Fortran_LIBS}") + ADD_DEFINITIONS(-DSION) + message (STATUS "Enable SIONlib support") +else (SIONLIB) + message (STATUS "Disable SIONlib support") +endif (SIONLIB) + #------------------------------------------------------------------------------ # The Fortran compiler/linker flag inserted by cmake to create shared libraries # with the Intel compiler is deprecated (-i_dynamic), correct here. @@ -155,7 +197,13 @@ SET(scm_source_files gmtb_scm.F90 ) ADD_EXECUTABLE(gmtb_scm ${scm_source_files}) -TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp ${NETCDF_LIBRARIES}) +TARGET_LINK_LIBRARIES(gmtb_scm ccppphys ccpp) set_target_properties(gmtb_scm PROPERTIES COMPILE_FLAGS "${CMAKE_Fortran_FLAGS}" LINK_FLAGS "${CMAKE_Fortran_FLAGS}") + +add_custom_command( + TARGET gmtb_scm POST_BUILD + COMMAND ${CMAKE_COMMAND} -E create_symlink + ${CMAKE_SOURCE_DIR}/run_gmtb_scm.py + ${CMAKE_CURRENT_BINARY_DIR}/run_gmtb_scm.py) diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 2f9a5feda..acae07ddf 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -1,12 +1,12 @@ +#undef MULTI_GASES + module GFS_typedefs use machine, only: kind_phys ! Radiation-specific types and parameters use module_radlw_parameters, only: sfcflw_type, topflw_type, NBDLW use module_radsw_parameters, only: cmpfsw_type, sfcfsw_type, topfsw_type, NBDSW - use ozne_def, only: levozp, oz_coeff, oz_pres - use h2o_def, only: levh2o, h2o_coeff, h2o_pres - + implicit none ! To ensure that these values match what's in the physics, @@ -28,8 +28,8 @@ module GFS_typedefs ! These will be set later in GFS_Control%initialize, ! since they depend on the runtime config (e.g. Model%ntoz, Model%h2o_phys, Model%aero_in) - private :: ntrcaer - integer :: ntrcaer + private :: levozp, oz_coeff, levh2o, h2o_coeff, ntrcaer + integer :: levozp, oz_coeff, levh2o, h2o_coeff, ntrcaer #if 0 !> \section arg_table_GFS_typedefs @@ -60,7 +60,7 @@ module GFS_typedefs !--- parameter constants used for default initializations real(kind=kind_phys), parameter :: zero = 0.0_kind_phys - real(kind=kind_phys), parameter :: huge = 9.9999D15 + real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue real(kind=kind_phys), parameter :: clear_val = zero !real(kind=kind_phys), parameter :: clear_val = -9.9999e80 real(kind=kind_phys), parameter :: rann_init = 0.6_kind_phys @@ -104,6 +104,7 @@ module GFS_typedefs type GFS_init_type integer :: me !< my MPI-rank integer :: master !< master MPI-rank + integer :: tile_num !< tile number for this MPI rank integer :: isc !< starting i-index for this MPI-domain integer :: jsc !< starting j-index for this MPI-domain integer :: nx !< number of points in i-dir for this MPI rank @@ -123,6 +124,8 @@ 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.) + !--- hydrostatic/non-hydrostatic flag + logical :: hydrostatic !< flag whether this is a hydrostatic or non-hydrostatic run !--- blocking data integer, pointer :: blksz(:) !< for explicit data blocking !< default blksz(1)=[nx*ny] @@ -202,12 +205,18 @@ module GFS_typedefs !--- In (radiation and physics) real (kind=kind_phys), pointer :: slmsk (:) => null() !< sea/land mask array (sea:0,land:1,sea-ice:2) - real (kind=kind_phys), pointer :: lakemsk(:) => null() !< lake mask array (lake:1, non-lake:0) - real (kind=kind_phys), pointer :: tsfc (:) => null() !< surface temperature in k + real (kind=kind_phys), pointer :: oceanfrac(:) => null() !< ocean fraction [0:1] + real (kind=kind_phys), pointer :: landfrac(:) => null() !< land fraction [0:1] + real (kind=kind_phys), pointer :: lakefrac(:) => null() !< lake fraction [0:1] + real (kind=kind_phys), pointer :: tsfc (:) => null() !< surface air temperature in K !< [tsea in gbphys.f] + real (kind=kind_phys), pointer :: tsfco (:) => null() !< sst in K + real (kind=kind_phys), pointer :: tsfcl (:) => null() !< surface land temperature in K real (kind=kind_phys), pointer :: tisfc (:) => null() !< surface temperature over ice fraction real (kind=kind_phys), pointer :: snowd (:) => null() !< snow depth water equivalent in mm ; same as snwdph - real (kind=kind_phys), pointer :: zorl (:) => null() !< surface roughness in cm + real (kind=kind_phys), pointer :: zorl (:) => null() !< composite surface roughness in cm + real (kind=kind_phys), pointer :: zorlo (:) => null() !< ocean surface roughness in cm + real (kind=kind_phys), pointer :: zorll (:) => null() !< land surface roughness in cm 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 @@ -283,14 +292,16 @@ module GFS_typedefs real (kind=kind_phys), pointer :: keepsmfr(:,:) => null() !< RUC LSM: frozen moisture in soil real (kind=kind_phys), pointer :: smois(:,:) => null() !< volumetric fraction of soil moisture for lsm real (kind=kind_phys), pointer :: tslb(:,:) => null() !< soil temperature for land surface model - real (kind=kind_phys), pointer :: zs(:) => null() !< depth of soil levels for land surface model + real (kind=kind_phys), pointer :: flag_frsoil(:,:) => null() !< RUC LSM: flag for frozen soil physics ! + real (kind=kind_phys), pointer :: zs(:) => null() !< depth of soil levels for land surface model real (kind=kind_phys), pointer :: clw_surf(:) => null() !< RUC LSM: moist cloud water mixing ratio at surface real (kind=kind_phys), pointer :: qwv_surf(:) => null() !< RUC LSM: water vapor mixing ratio at surface real (kind=kind_phys), pointer :: cndm_surf(:) => null() !< RUC LSM: surface condensation mass - real (kind=kind_phys), pointer :: flag_frsoil(:,:) => null() !< RUC LSM: flag for frozen soil physics real (kind=kind_phys), pointer :: rhofr(:) => null() !< RUC LSM: density of frozen precipitation real (kind=kind_phys), pointer :: tsnow(:) => null() !< RUC LSM: snow temperature at the bottom of the first soil layer + real (kind=kind_phys), pointer :: snowfallac(:) => null() !< ruc lsm diagnostics + real (kind=kind_phys), pointer :: acsnow(:) => null() !< ruc lsm diagnostics ! MYNN surface layer real (kind=kind_phys), pointer :: ustm (:) => null() !u* including drag real (kind=kind_phys), pointer :: zol(:) => null() !surface stability parameter @@ -393,7 +404,20 @@ module GFS_typedefs !--- topography-based information for the coupling system real (kind=kind_phys), pointer :: oro_cpl (:) => null() !< orography ( oro from GFS_sfcprop_type) real (kind=kind_phys), pointer :: slmsk_cpl (:) => null() !< Land/Sea/Ice mask (slmsk from GFS_sfcprop_type) - + + !--- cellular automata + real (kind=kind_phys), pointer :: tconvtend(:,:) => null() + real (kind=kind_phys), pointer :: qconvtend(:,:) => null() + real (kind=kind_phys), pointer :: uconvtend(:,:) => null() + real (kind=kind_phys), pointer :: vconvtend(:,:) => null() + real (kind=kind_phys), pointer :: ca_out (:) => null() ! + real (kind=kind_phys), pointer :: ca_deep (:) => null() ! + real (kind=kind_phys), pointer :: ca_turb (:) => null() ! + real (kind=kind_phys), pointer :: ca_shal (:) => null() ! + real (kind=kind_phys), pointer :: ca_rad (:) => null() ! + real (kind=kind_phys), pointer :: ca_micro (:) => null() ! + real (kind=kind_phys), pointer :: cape (:) => null() ! + !--- stochastic physics real (kind=kind_phys), pointer :: shum_wts (:,:) => null() ! real (kind=kind_phys), pointer :: sppt_wts (:,:) => null() ! @@ -432,20 +456,23 @@ module GFS_typedefs integer :: master !< MPI rank of master atmosphere processor integer :: communicator !< MPI communicator integer :: ntasks !< MPI size in communicator + integer :: nthreads !< OpenMP threads available for physics integer :: nlunit !< unit for namelist character(len=64) :: fn_nml !< namelist filename for surface data cycling - real(kind=kind_phys) :: fhzero !< seconds between clearing of diagnostic buckets + character(len=256), pointer :: input_nml_file(:) !< character string containing full namelist + !< for use with internal file reads + integer :: logunit + real(kind=kind_phys) :: fhzero !< hours between clearing of diagnostic buckets logical :: ldiag3d !< flag for 3d diagnostic fields logical :: lssav !< logical flag for storing diagnostics - real(kind=kind_phys) :: fhcyc !< frequency for surface data cycling (secs) + real(kind=kind_phys) :: fhcyc !< frequency for surface data cycling (hours) logical :: lgocart !< flag for 3d diagnostic fields for gocart 1 - real(kind=kind_phys) :: fhgoc3d !< seconds between calls to gocart + real(kind=kind_phys) :: fhgoc3d !< hours between calls to gocart integer :: thermodyn_id !< valid for GFS only for get_prs/phi integer :: sfcpress_id !< valid for GFS only for get_prs/phi logical :: gen_coord_hybrid!< for Henry's gen coord - integer :: logunit - character(len=256), pointer :: input_nml_file(:) !< character string containing full namelist - !< for use with internal file reads + + !--- set some grid extent parameters integer :: isc !< starting i-index for this MPI-domain @@ -460,7 +487,8 @@ module GFS_typedefs integer :: cny !< number of points in the j-dir for this cubed-sphere face integer :: lonr !< number of global points in x-dir (i) along the equator integer :: latr !< number of global points in y-dir (j) along any meridian - integer, pointer :: blksz(:) !< for explicit data blocking + integer :: tile_num + integer, pointer :: blksz(:) !< for explicit data blocking: block sizes of all blocks !--- coupling parameters logical :: cplflx !< default no cplflx collection @@ -526,26 +554,27 @@ module GFS_typedefs !--- microphysical switch integer :: ncld !< choice of cloud scheme !--- new microphysical switch - integer :: imp_physics !< choice of microphysics scheme - integer :: imp_physics_gfdl = 11 !< choice of GFDL microphysics scheme - integer :: imp_physics_thompson = 8 !< choice of Thompson microphysics scheme - integer :: imp_physics_wsm6 = 6 !< choice of WSMG microphysics scheme - integer :: imp_physics_zhao_carr = 99 !< choice of Zhao-Carr microphysics scheme - integer :: imp_physics_zhao_carr_pdf = 98 !< choice of Zhao-Carr microphysics scheme with PDF clouds - integer :: imp_physics_mg = 10 !< choice of Morrison-Gettelman microphysics scheme + integer :: imp_physics !< choice of microphysics scheme + integer :: imp_physics_gfdl = 11 !< choice of GFDL microphysics scheme + integer :: imp_physics_thompson = 8 !< choice of Thompson microphysics scheme + integer :: imp_physics_wsm6 = 6 !< choice of WSMG microphysics scheme + integer :: imp_physics_zhao_carr = 99 !< choice of Zhao-Carr microphysics scheme + integer :: imp_physics_zhao_carr_pdf = 98 !< choice of Zhao-Carr microphysics scheme with PDF clouds + integer :: imp_physics_mg = 10 !< choice of Morrison-Gettelman microphysics scheme !--- Z-C microphysical parameters real(kind=kind_phys) :: psautco(2) !< [in] auto conversion coeff from ice to snow real(kind=kind_phys) :: prautco(2) !< [in] auto conversion coeff from cloud to rain real(kind=kind_phys) :: evpco !< [in] coeff for evaporation of largescale rain real(kind=kind_phys) :: wminco(2) !< [in] water and ice minimum threshold for Zhao + real(kind=kind_phys) :: avg_max_length !< reset time in seconds for max hourly fields !--- M-G microphysical parameters integer :: fprcp !< no prognostic rain and snow (MG) integer :: pdfflag !< pdf flag for MG macrophysics real(kind=kind_phys) :: mg_dcs !< Morrison-Gettelman microphysics parameters real(kind=kind_phys) :: mg_qcvar - real(kind=kind_phys) :: mg_ts_auto_ice(2) !< ice auto conversion time scale + real(kind=kind_phys) :: mg_ts_auto_ice(2) !< ice auto conversion time scale real(kind=kind_phys) :: mg_rhmini !< relative humidity threshold parameter for nucleating ice real(kind=kind_phys) :: mg_ncnst !< constant droplet num concentration (m-3) @@ -580,7 +609,9 @@ module GFS_typedefs integer :: ncnd !< number of cloud condensate types !--- Thompson's microphysical paramters - logical :: ltaerosol !< flag for aerosol version, currently not working yet + logical :: make_number_concentrations !< flag to calculate initial number concentrations + !< from mass concentrations if not in ICs/BCs + logical :: ltaerosol !< flag for aerosol version logical :: lradar !< flag for radar reflectivity real(kind=kind_phys) :: ttendlim !< temperature tendency limiter per time step in K/s @@ -631,6 +662,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 :: lheatstrg !< flag for canopy heat storage parameterization logical :: cnvcld logical :: random_clds !< flag controls whether clouds are random logical :: shal_cnv !< flag for calling shallow convection @@ -734,6 +766,21 @@ module GFS_typedefs real(kind=kind_phys) :: xkzm_s !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion real(kind=kind_phys) :: xkzminv !< diffusivity in inversion layers real(kind=kind_phys) :: moninq_fac !< turbulence diffusion coefficient factor + + !---cellular automata control parameters + integer :: nca !< number of independent cellular automata + integer :: nlives !< cellular automata lifetime + integer :: ncells !< cellular automata finer grid + real(kind=kind_phys) :: nfracseed !< cellular automata seed probability + integer :: nseed !< cellular automata seed frequency + logical :: do_ca !< cellular automata main switch + logical :: ca_sgs !< switch for sgs ca + logical :: ca_global !< switch for global ca + logical :: ca_smooth !< switch for gaussian spatial filter + logical :: isppt_deep !< switch for combination with isppt_deep. OBS! Switches off SPPT on other tendencies! + integer :: iseed_ca !< seed for random number generation in ca scheme + integer :: nspinup !< number of iterations to spin up the ca + real(kind=kind_phys) :: nthresh !< threshold used for perturbed vertical velocity !--- stochastic physics control parameters logical :: do_sppt @@ -771,6 +818,9 @@ module GFS_typedefs integer :: nto2 !< tracer index for oxygen integer :: ntwa !< tracer index for water friendly aerosol integer :: ntia !< tracer index for ice friendly aerosol + integer :: ntchm !< number of chemical tracers + integer :: ntchs !< tracer index for first chemical tracer + logical, pointer :: ntdiag(:) => null() !< array to control diagnostics for chemical tracers !--- derived totals for phy_f*d integer :: ntot2d !< total number of variables for phyf2d @@ -813,6 +863,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 :: 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) logical :: iccn !< using IN CCN forcing for MG2/3 @@ -823,6 +874,7 @@ module GFS_typedefs real(kind=kind_phys) :: iau_delthrs ! iau time interval (to scale increments) in hours character(len=240) :: iau_inc_files(7)! list of increment files real(kind=kind_phys) :: iaufhrs(7) ! forecast hours associated with increment files + logical :: iau_filter_increments ! From physcons.F90, updated/set in control_initialize real(kind=kind_phys) :: dxinv ! inverse scaling factor for critical relative humidity, replaces dxinv in physcons.F90 @@ -1046,8 +1098,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: transa (:) => null() !< noah lsm diagnostics real (kind=kind_phys), pointer :: sbsnoa (:) => null() !< noah lsm diagnostics real (kind=kind_phys), pointer :: snowca (:) => null() !< noah lsm diagnostics - real (kind=kind_phys), pointer :: snowfallac (:) => null() !< ruc lsm diagnostics - real (kind=kind_phys), pointer :: acsnow (:) => null() !< ruc lsm diagnostics real (kind=kind_phys), pointer :: soilm (:) => null() !< soil moisture real (kind=kind_phys), pointer :: tmpmin (:) => null() !< min temperature at 2m height (k) real (kind=kind_phys), pointer :: tmpmax (:) => null() !< max temperature at 2m height (k) @@ -1074,6 +1124,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: u10mmax(:) => null() !< maximum u-wind real (kind=kind_phys), pointer :: v10mmax(:) => null() !< maximum v-wind real (kind=kind_phys), pointer :: wind10mmax(:) => null() !< maximum wind speed + real (kind=kind_phys), pointer :: u10max(:) => null() !< maximum u-wind used with avg_max_length + real (kind=kind_phys), pointer :: v10max(:) => null() !< maximum v-wind used with avg_max_length + real (kind=kind_phys), pointer :: spd10max(:) => null() !< maximum wind speed used with avg_max_length real (kind=kind_phys), pointer :: rain (:) => null() !< total rain at this time step real (kind=kind_phys), pointer :: rainc (:) => null() !< convective rain at this time step real (kind=kind_phys), pointer :: ice (:) => null() !< ice fall at this time step @@ -1131,6 +1184,13 @@ module GFS_typedefs real (kind=kind_phys), pointer :: tdomip (:) => null() !< dominant accumulated sleet type real (kind=kind_phys), pointer :: tdoms (:) => null() !< dominant accumulated snow type + real (kind=kind_phys), pointer :: ca_out (:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: ca_deep (:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: ca_turb (:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: ca_shal (:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: ca_rad (:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: ca_micro(:) => null() !< cellular automata fraction + real (kind=kind_phys), pointer :: skebu_wts(:,:) => null() !< 10 meter u wind speed real (kind=kind_phys), pointer :: skebv_wts(:,:) => null() !< 10 meter v wind speed real (kind=kind_phys), pointer :: sppt_wts(:,:) => null() !< @@ -1141,20 +1201,37 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dv3dt (:,:,:) => null() !< v momentum change due to physics real (kind=kind_phys), pointer :: dt3dt (:,:,:) => null() !< temperature change due to physics real (kind=kind_phys), pointer :: dq3dt (:,:,:) => null() !< moisture change due to physics - + real (kind=kind_phys), pointer :: refdmax (:) => null() !< max hourly 1-km agl reflectivity + real (kind=kind_phys), pointer :: refdmax263k (:)=> null() !< max hourly -10C reflectivity + real (kind=kind_phys), pointer :: t02max (:) => null() !< max hourly 2m T + real (kind=kind_phys), pointer :: t02min (:) => null() !< min hourly 2m T + real (kind=kind_phys), pointer :: rh02max (:) => null() !< max hourly 2m RH + real (kind=kind_phys), pointer :: rh02min (:) => null() !< min hourly 2m RH !--- accumulated quantities for 3D diagnostics - real (kind=kind_phys), pointer :: upd_mf (:,:) => null() !< instantaneous convective updraft mass flux - real (kind=kind_phys), pointer :: dwn_mf (:,:) => null() !< instantaneous convective downdraft mass flux - real (kind=kind_phys), pointer :: det_mf (:,:) => null() !< instantaneous convective detrainment mass flux - real (kind=kind_phys), pointer :: cldcov (:,:) => null() !< instantaneous 3D cloud fraction + real (kind=kind_phys), pointer :: upd_mf (:,:) => null() !< instantaneous convective updraft mass flux + real (kind=kind_phys), pointer :: dwn_mf (:,:) => null() !< instantaneous convective downdraft mass flux + real (kind=kind_phys), pointer :: det_mf (:,:) => null() !< instantaneous convective detrainment mass flux + real (kind=kind_phys), pointer :: cldcov (:,:) => null() !< instantaneous 3D cloud fraction !--- 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 + + !--- Output diagnostics for coupled chemistry + real (kind=kind_phys), pointer :: duem (:,:) => null() !< instantaneous dust emission flux ( kg/m**2/s ) + real (kind=kind_phys), pointer :: ssem (:,:) => null() !< instantaneous sea salt emission flux ( kg/m**2/s ) + real (kind=kind_phys), pointer :: sedim (:,:) => null() !< instantaneous sedimentation ( kg/m**2/s ) + real (kind=kind_phys), pointer :: drydep(:,:) => null() !< instantaneous dry deposition ( kg/m**2/s ) + real (kind=kind_phys), pointer :: wetdpl(:,:) => null() !< instantaneous large-scale wet deposition ( kg/m**2/s ) + real (kind=kind_phys), pointer :: wetdpc(:,:) => null() !< instantaneous convective-scale wet deposition ( kg/m**2/s ) + real (kind=kind_phys), pointer :: abem (:,:) => null() !< instantaneous anthopogenic and biomass burning emissions + !< 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 ) contains procedure :: create => diag_create procedure :: rad_zero => diag_rad_zero procedure :: phys_zero => diag_phys_zero + procedure :: chem_init => diag_chem_init end type GFS_diag_type !--------------------------------------------------------------------- @@ -1176,8 +1253,17 @@ module GFS_typedefs real (kind=kind_phys), pointer :: alb1d(:) => null() !< real (kind=kind_phys), pointer :: bexp1d(:) => null() !< real (kind=kind_phys), pointer :: cd(:) => null() !< + real (kind=kind_phys), pointer :: cd_ice(:) => null() !< + real (kind=kind_phys), pointer :: cd_land(:) => null() !< + real (kind=kind_phys), pointer :: cd_ocean(:) => null() !< real (kind=kind_phys), pointer :: cdq(:) => null() !< + real (kind=kind_phys), pointer :: cdq_ice(:) => null() !< + real (kind=kind_phys), pointer :: cdq_land(:) => null() !< + real (kind=kind_phys), pointer :: cdq_ocean(:) => null() !< real (kind=kind_phys), pointer :: cf_upi(:,:) => null() !< + 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 :: clcn(:,:) => null() !< real (kind=kind_phys), pointer :: cldf(:) => null() !< real (kind=kind_phys), pointer :: cldsa(:,:) => null() !< @@ -1188,6 +1274,9 @@ 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 :: cmm_ice(:) => null() !< + real (kind=kind_phys), pointer :: cmm_land(:) => null() !< + real (kind=kind_phys), pointer :: cmm_ocean(:) => null() !< real (kind=kind_phys), pointer :: cndm_surf(:) => null() !< real (kind=kind_phys), pointer :: cnv_dqldt(:,:) => null() !< real (kind=kind_phys), pointer :: cnv_fice(:,:) => null() !< @@ -1224,16 +1313,34 @@ module GFS_typedefs real (kind=kind_phys), pointer :: dzlyr(:,:) => null() !< real (kind=kind_phys), pointer :: elvmax(:) => null() !< real (kind=kind_phys), pointer :: ep1d(:) => null() !< + 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 :: evap_ice(:) => null() !< + real (kind=kind_phys), pointer :: evap_land(:) => null() !< + real (kind=kind_phys), pointer :: evap_ocean(:) => null() !< real (kind=kind_phys), pointer :: evbs(:) => null() !< real (kind=kind_phys), pointer :: evcw(:) => null() !< real (kind=kind_phys), pointer :: faerlw(:,:,:,:) => null() !< real (kind=kind_phys), pointer :: faersw(:,:,:,:) => null() !< + real (kind=kind_phys), pointer :: ffhh_ice(:) => null() !< + real (kind=kind_phys), pointer :: ffhh_land(:) => null() !< + real (kind=kind_phys), pointer :: ffhh_ocean(:) => null() !< real (kind=kind_phys), pointer :: fh2(:) => null() !< + real (kind=kind_phys), pointer :: fh2_ice(:) => null() !< + real (kind=kind_phys), pointer :: fh2_land(:) => null() !< + real (kind=kind_phys), pointer :: fh2_ocean(:) => null() !< logical, pointer :: flag_cice(:) => null() !< logical, pointer :: flag_guess(:) => null() !< logical, pointer :: flag_iter(:) => 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() !< real (kind=kind_phys), pointer :: fm10(:) => null() !< + real (kind=kind_phys), pointer :: fm10_ice(:) => null() !< + real (kind=kind_phys), pointer :: fm10_land(:) => null() !< + real (kind=kind_phys), pointer :: fm10_ocean(:) => null() !< real (kind=kind_phys) :: frain !< real (kind=kind_phys), pointer :: frland(:) => null() !< real (kind=kind_phys), pointer :: fscav(:) => null() !< @@ -1244,18 +1351,29 @@ module GFS_typedefs real (kind=kind_phys), pointer :: gamt(:) => null() !< real (kind=kind_phys), pointer :: gasvmr(:,:,:) => null() !< real (kind=kind_phys), pointer :: gflx(:) => null() !< + real (kind=kind_phys), pointer :: gflx_ice(:) => null() !< + real (kind=kind_phys), pointer :: gflx_land(:) => null() !< + real (kind=kind_phys), pointer :: gflx_ocean(:) => null() !< real (kind=kind_phys), pointer :: graupelmp(:) => null() !< real (kind=kind_phys), pointer :: gwdcu(:,:) => null() !< real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !< integer :: h2o_coeff !< real (kind=kind_phys), pointer :: h2o_pres(:) => null() !< real (kind=kind_phys), pointer :: hflx(:) => null() !< + real (kind=kind_phys), pointer :: hflx_ice(:) => null() !< + real (kind=kind_phys), pointer :: hflx_land(:) => null() !< + real (kind=kind_phys), pointer :: hflx_ocean(:) => null() !< real (kind=kind_phys), pointer :: hprime1(:) => null() !< real (kind=kind_phys), pointer :: icemp(:) => null() !< + logical, pointer :: dry(:) => null() !< integer, pointer :: idxday(:) => null() !< + logical, pointer :: icy(:) => null() !< + logical, pointer :: lake(:) => null() !< integer :: im !< + logical, pointer :: ocean(:) => null() !< integer :: ipr !< integer, pointer :: islmsk(:) => null() !< + logical, pointer :: wet(:) => null() !< integer :: ix !< integer :: kb !< integer, pointer :: kbot(:) => null() !< @@ -1285,6 +1403,7 @@ module GFS_typedefs integer :: nn !< integer :: nncl !< integer :: nsamftrac !< + integer :: nsteps_per_reset !< integer :: ntiwx !< integer :: ntk !< integer :: ntkev !< @@ -1295,6 +1414,7 @@ module GFS_typedefs logical , pointer :: otspt(:,:) => null() !< integer :: oz_coeff !< real (kind=kind_phys), pointer :: oz_pres(:) => null() !< + logical :: phys_hydrostatic !< real (kind=kind_phys), pointer :: plvl(:,:) => null() !< real (kind=kind_phys), pointer :: plyr(:,:) => null() !< real (kind=kind_phys), pointer :: prcpmp(:) => null() !< @@ -1306,6 +1426,9 @@ module GFS_typedefs 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) :: raddt !< real (kind=kind_phys), pointer :: rainmp(:) => null() !< real (kind=kind_phys), pointer :: raincd(:) => null() !< @@ -1313,6 +1436,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: rainmcadj(:) => null() !< real (kind=kind_phys), pointer :: rainp(:,:) => null() !< real (kind=kind_phys), pointer :: rb(:) => null() !< + real (kind=kind_phys), pointer :: rb_ice(:) => null() !< + real (kind=kind_phys), pointer :: rb_land(:) => null() !< + real (kind=kind_phys), pointer :: rb_ocean(:) => null() !< real (kind=kind_phys), pointer :: rhc(:,:) => null() !< real (kind=kind_phys) :: rhcbot !< real (kind=kind_phys) :: rhcpbl !< @@ -1332,30 +1458,51 @@ module GFS_typedefs logical :: skip_macro !< integer, pointer :: slopetype(:) => 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_ocean(:) => null() !< real (kind=kind_phys), pointer :: snohf(:) => null() !< real (kind=kind_phys), pointer :: snowmp(:) => null() !< real (kind=kind_phys), pointer :: snowmt(:) => null() !< integer, pointer :: soiltype(:) => 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 :: theta(:) => 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() !< integer :: tracers_start_index !< integer :: tracers_total !< integer :: tracers_water !< real (kind=kind_phys), pointer :: trans(:) => null() !< real (kind=kind_phys), pointer :: tseal(:) => null() !< 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_ocean(:) => null() !< real (kind=kind_phys), pointer :: tsfg(:) => null() !< real (kind=kind_phys), pointer :: tsnow(:) => null() !< real (kind=kind_phys), pointer :: tsurf(:) => null() !< + real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !< + real (kind=kind_phys), pointer :: tsurf_land(:) => null() !< + real (kind=kind_phys), pointer :: tsurf_ocean(:) => null() !< real (kind=kind_phys), pointer :: ud_mf(:,:) => null() !< real (kind=kind_phys), pointer :: ulwsfc_cice(:) => null() !< + real (kind=kind_phys), pointer :: uustar_ice(:) => null() !< + real (kind=kind_phys), pointer :: uustar_land(:) => null() !< + real (kind=kind_phys), pointer :: uustar_ocean(:) => null() !< real (kind=kind_phys), pointer :: vdftra(:,:,:) => null() !< real (kind=kind_phys), pointer :: vegf1d(:) => null() !< integer, pointer :: vegtype(:) => null() !< real (kind=kind_phys), pointer :: w_upi(:,:) => null() !< real (kind=kind_phys), pointer :: wcbmax(:) => null() !< + real (kind=kind_phys), pointer :: weasd_land(:) => null() !< + real (kind=kind_phys), pointer :: weasd_ice(:) => null() !< real (kind=kind_phys), pointer :: wind(:) => null() !< real (kind=kind_phys), pointer :: work1(:) => null() !< real (kind=kind_phys), pointer :: work2(:) => null() !< @@ -1364,6 +1511,9 @@ module GFS_typedefs real (kind=kind_phys), pointer :: xlai1d(:) => null() !< real (kind=kind_phys), pointer :: xmu(:) => null() !< real (kind=kind_phys), pointer :: z01d(:) => null() !< + real (kind=kind_phys), pointer :: zorl_ice(:) => null() !< + real (kind=kind_phys), pointer :: zorl_land(:) => null() !< + real (kind=kind_phys), pointer :: zorl_ocean(:) => null() !< real (kind=kind_phys), pointer :: zt1d(:) => null() !< contains @@ -1483,25 +1633,37 @@ subroutine sfcprop_create (Sfcprop, IM, Model) type(GFS_control_type), intent(in) :: Model !--- physics and radiation - allocate (Sfcprop%slmsk (IM)) - allocate (Sfcprop%lakemsk(IM)) - allocate (Sfcprop%tsfc (IM)) - allocate (Sfcprop%tisfc (IM)) - allocate (Sfcprop%snowd (IM)) - allocate (Sfcprop%zorl (IM)) - allocate (Sfcprop%fice (IM)) - allocate (Sfcprop%hprim (IM)) - allocate (Sfcprop%hprime (IM,Model%nmtvr)) - - Sfcprop%slmsk = clear_val - Sfcprop%lakemsk = clear_val - Sfcprop%tsfc = clear_val - Sfcprop%tisfc = clear_val - Sfcprop%snowd = clear_val - Sfcprop%zorl = clear_val - Sfcprop%fice = clear_val - Sfcprop%hprim = clear_val - Sfcprop%hprime = clear_val + allocate (Sfcprop%slmsk (IM)) + allocate (Sfcprop%oceanfrac(IM)) + allocate (Sfcprop%landfrac (IM)) + allocate (Sfcprop%lakefrac (IM)) + allocate (Sfcprop%tsfc (IM)) + allocate (Sfcprop%tsfco (IM)) + allocate (Sfcprop%tsfcl (IM)) + allocate (Sfcprop%tisfc (IM)) + allocate (Sfcprop%snowd (IM)) + allocate (Sfcprop%zorl (IM)) + allocate (Sfcprop%zorlo (IM)) + allocate (Sfcprop%zorll (IM)) + allocate (Sfcprop%fice (IM)) + allocate (Sfcprop%hprim (IM)) + allocate (Sfcprop%hprime (IM,Model%nmtvr)) + + Sfcprop%slmsk = clear_val + Sfcprop%oceanfrac = clear_val + Sfcprop%landfrac = clear_val + Sfcprop%lakefrac = clear_val + Sfcprop%tsfc = clear_val + Sfcprop%tsfco = clear_val + Sfcprop%tsfcl = clear_val + Sfcprop%tisfc = clear_val + Sfcprop%snowd = clear_val + Sfcprop%zorl = clear_val + Sfcprop%zorlo = clear_val + Sfcprop%zorll = clear_val + Sfcprop%fice = clear_val + Sfcprop%hprim = clear_val + Sfcprop%hprime = clear_val !--- In (radiation only) allocate (Sfcprop%sncovr (IM)) @@ -1588,9 +1750,9 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%th2m(IM)) allocate (Sfcprop%q2m (IM)) - Sfcprop%t2m = clear_val + Sfcprop%t2m = clear_val Sfcprop%th2m = clear_val - Sfcprop%q2m = clear_val + Sfcprop%q2m = clear_val if (Model%nstf_name(1) > 0) then allocate (Sfcprop%tref (IM)) @@ -1645,6 +1807,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%cndm_surf (IM)) allocate (Sfcprop%rhofr (IM)) allocate (Sfcprop%tsnow (IM)) + allocate (Sfcprop%snowfallac (IM)) + allocate (Sfcprop%acsnow (IM)) ! Sfcprop%sh2o = clear_val Sfcprop%keepsmfr = clear_val @@ -1657,6 +1821,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%flag_frsoil = clear_val Sfcprop%rhofr = clear_val Sfcprop%tsnow = clear_val + Sfcprop%snowfallac = clear_val + Sfcprop%acsnow = clear_val end if if (Model%do_mynnsfclay) then ! For MYNN surface layer scheme @@ -1727,14 +1893,22 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%sfcnsw = clear_val Coupling%sfcdlw = clear_val - if (Model%cplflx .or. Model%do_sppt) then + if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm) then allocate (Coupling%rain_cpl (IM)) allocate (Coupling%snow_cpl (IM)) - Coupling%rain_cpl = clear_val Coupling%snow_cpl = clear_val endif + + if (Model%cplflx .or. Model%cplwav) then + !--- instantaneous quantities + allocate (Coupling%u10mi_cpl (IM)) + allocate (Coupling%v10mi_cpl (IM)) + Coupling%u10mi_cpl = clear_val + Coupling%v10mi_cpl = clear_val + endif + if (Model%cplflx) then !--- incoming quantities allocate (Coupling%slimskin_cpl (IM)) @@ -1815,8 +1989,6 @@ subroutine coupling_create (Coupling, IM, Model) allocate (Coupling%nvisdfi_cpl (IM)) allocate (Coupling%t2mi_cpl (IM)) allocate (Coupling%q2mi_cpl (IM)) - allocate (Coupling%u10mi_cpl (IM)) - allocate (Coupling%v10mi_cpl (IM)) allocate (Coupling%tsfci_cpl (IM)) allocate (Coupling%psurfi_cpl (IM)) allocate (Coupling%oro_cpl (IM)) @@ -1840,28 +2012,47 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%nvisdfi_cpl = clear_val Coupling%t2mi_cpl = clear_val Coupling%q2mi_cpl = clear_val - Coupling%u10mi_cpl = clear_val - Coupling%v10mi_cpl = clear_val Coupling%tsfci_cpl = clear_val Coupling%psurfi_cpl = clear_val -!! Coupling%oro_cpl = clear_val !< pointer to sfcprop%oro -!! Coupling%slmsk_cpl = clear_val !< pointer to sfcprop%slmsk + Coupling%oro_cpl = clear_val !< pointer to sfcprop%oro + Coupling%slmsk_cpl = clear_val !< pointer to sfcprop%slmsk endif +!-- cellular automata + allocate (Coupling%tconvtend (IM,Model%levs)) + allocate (Coupling%qconvtend (IM,Model%levs)) + allocate (Coupling%uconvtend (IM,Model%levs)) + allocate (Coupling%vconvtend (IM,Model%levs)) + allocate (Coupling%cape (IM)) + allocate (Coupling%ca_out (IM)) + allocate (Coupling%ca_deep (IM)) + allocate (Coupling%ca_turb (IM)) + allocate (Coupling%ca_shal (IM)) + allocate (Coupling%ca_rad (IM)) + allocate (Coupling%ca_micro (IM)) + Coupling%ca_out = clear_val + Coupling%ca_deep = clear_val + Coupling%ca_turb = clear_val + Coupling%ca_shal = clear_val + Coupling%ca_rad =clear_val + Coupling%ca_micro = clear_val + Coupling%cape = clear_val + Coupling%tconvtend = clear_val + Coupling%qconvtend = clear_val + Coupling%uconvtend = clear_val + Coupling%vconvtend = clear_val + ! -- GSDCHEM coupling options if (Model%cplchm) then !--- outgoing instantaneous quantities - allocate (Coupling%ushfsfci(IM)) - allocate (Coupling%dkt (IM,Model%levs)) - !--- accumulated total and convective rainfall - allocate (Coupling%rain_cpl (IM)) - allocate (Coupling%rainc_cpl (IM)) - - Coupling%rain_cpl = clear_val - Coupling%rainc_cpl = clear_val - - Coupling%ushfsfci = clear_val - Coupling%dkt = clear_val + allocate (Coupling%ushfsfci (IM)) + allocate (Coupling%dkt (IM,Model%levs)) + !--- accumulated convective rainfall + allocate (Coupling%rainc_cpl (IM)) + + Coupling%rainc_cpl = clear_val + Coupling%ushfsfci = clear_val + Coupling%dkt = clear_val endif !--- stochastic physics option @@ -1927,8 +2118,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logunit, isc, jsc, nx, ny, levs, & cnx, cny, gnx, gny, dt_dycore, & dt_phys, idat, jdat, tracer_names, & - input_nml_file, ak, bk, blksz, & - restart, communicator, ntasks) + input_nml_file, tile_num, & + ak, bk, blksz, & + restart, hydrostatic, & + communicator, ntasks, nthreads) !--- modules use physcons, only: con_rerth, con_pi @@ -1944,6 +2137,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer, intent(in) :: me integer, intent(in) :: master integer, intent(in) :: logunit + integer, intent(in) :: tile_num integer, intent(in) :: isc integer, intent(in) :: jsc integer, intent(in) :: nx @@ -1963,11 +2157,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys), dimension(:), intent(in) :: bk integer, intent(in) :: blksz(:) logical, intent(in) :: restart + logical, intent(in) :: hydrostatic integer, intent(in) :: communicator integer, intent(in) :: ntasks + integer, intent(in) :: nthreads !--- local variables - integer :: n + integer :: n, status integer :: ios integer :: seed0 logical :: exists @@ -1978,12 +2174,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys), parameter :: p_ref = 101325.0d0 !--- BEGIN NAMELIST VARIABLES - real(kind=kind_phys) :: fhzero = 0.0 !< seconds between clearing of diagnostic buckets + real(kind=kind_phys) :: fhzero = 0.0 !< hours between clearing of diagnostic buckets logical :: ldiag3d = .false. !< flag for 3d diagnostic fields logical :: lssav = .false. !< logical flag for storing diagnostics - real(kind=kind_phys) :: fhcyc = 0. !< frequency for surface data cycling (secs) + real(kind=kind_phys) :: fhcyc = 0. !< frequency for surface data cycling (hours) logical :: lgocart = .false. !< flag for 3d diagnostic fields for gocart 1 - real(kind=kind_phys) :: fhgoc3d = 0.0 !< seconds between calls to gocart + real(kind=kind_phys) :: fhgoc3d = 0.0 !< hours between calls to gocart integer :: thermodyn_id = 1 !< valid for GFS only for get_prs/phi integer :: sfcpress_id = 1 !< valid for GFS only for get_prs/phi @@ -2001,7 +2197,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: levr = -99 !< number of vertical levels for radiation calculations integer :: nfxr = 39+6 !< second dimension of input/output array fluxr logical :: aero_in = .false. !< flag for initializing aero data - logical :: iccn = .true. !< logical to use IN CCN forcing for MG2/3 + logical :: iccn = .false. !< logical to use IN CCN forcing for MG2/3 integer :: iflip = 1 !< iflip - is not the same as flipv integer :: isol = 0 !< use prescribed solar constant integer :: ico2 = 0 !< prescribed global mean value (old opernl) @@ -2042,23 +2238,25 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: prautco(2) = (/1.0d-4,1.0d-4/) !< [in] auto conversion coeff from cloud to rain real(kind=kind_phys) :: evpco = 2.0d-5 !< [in] coeff for evaporation of largescale rain real(kind=kind_phys) :: wminco(2) = (/1.0d-5,1.0d-5/) !< [in] water and ice minimum threshold for Zhao - + !---Max hourly + real(kind=kind_phys) :: avg_max_length = 3600. !< reset value in seconds for max hourly. + !--- M-G microphysical parameters - integer :: fprcp = 0 !< no prognostic rain and snow (MG) - integer :: pdfflag = 4 !< pdf flag for MG macro physics - real(kind=kind_phys) :: mg_dcs = 200.0 !< Morrison-Gettelman microphysics parameters - real(kind=kind_phys) :: mg_qcvar = 1.0 - real(kind=kind_phys) :: mg_ts_auto_ice(2) = (/180.0,180.0/) !< ice auto conversion time scale - real(kind=kind_phys) :: mg_rhmini = 1.01 !< relative humidity threshold parameter for nucleating ice - real(kind=kind_phys) :: mg_ncnst = 100.e6 !< constant droplet num concentration (m-3) - real(kind=kind_phys) :: mg_ninst = 0.15e6 !< constant ice num concentration (m-3) - real(kind=kind_phys) :: mg_ngnst = 0.10e6 !< constant graupel/hail num concentration (m-3) = 0.1e6_r8 - real(kind=kind_phys) :: mg_alf = 1.0 !< tuning factor for alphs in MG macrophysics - real(kind=kind_phys) :: mg_qcmin(2) = (/1.0d-9,1.0d-9/) !< min liquid and ice mixing ratio in Mg macro clouds - real(kind=kind_phys) :: mg_berg_eff_factor = 2.0 !< berg efficiency factor - character(len=16) :: mg_precip_frac_method = 'max_overlap' !< type of precipitation fraction method - real(kind=kind_phys) :: tf = 258.16 - real(kind=kind_phys) :: tcr = 273.16 + integer :: fprcp = 0 !< no prognostic rain and snow (MG) + integer :: pdfflag = 4 !< pdf flag for MG macro physics + real(kind=kind_phys) :: mg_dcs = 200.0 !< Morrison-Gettelman microphysics parameters + real(kind=kind_phys) :: mg_qcvar = 1.0 + real(kind=kind_phys) :: mg_ts_auto_ice(2) = (/180.0,180.0/) !< ice auto conversion time scale + real(kind=kind_phys) :: mg_rhmini = 1.01 !< relative humidity threshold parameter for nucleating ice + real(kind=kind_phys) :: mg_ncnst = 100.e6 !< constant droplet num concentration (m-3) + real(kind=kind_phys) :: mg_ninst = 0.15e6 !< constant ice num concentration (m-3) + real(kind=kind_phys) :: mg_ngnst = 0.10e6 !< constant graupel/hail num concentration (m-3) = 0.1e6_r8 + real(kind=kind_phys) :: mg_alf = 1.0 !< tuning factor for alphs in MG macrophysics + real(kind=kind_phys) :: mg_qcmin(2) = (/1.0d-9,1.0d-9/) !< min liquid and ice mixing ratio in Mg macro clouds + real(kind=kind_phys) :: mg_berg_eff_factor = 2.0 !< berg efficiency factor + character(len=16) :: mg_precip_frac_method = 'max_overlap' !< type of precipitation fraction method + real(kind=kind_phys) :: tf = 258.16 + real(kind=kind_phys) :: tcr = 273.16 ! logical :: effr_in = .false. !< flag to use effective radii of cloud species in radiation logical :: microp_uniform = .true. @@ -2076,6 +2274,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: mg_do_liq_liu = .true. !< set .true. to turn on liu liquid treatment !--- Thompson microphysical parameters + logical :: make_number_concentrations = .false.!< flag to calculate initial number concentrations + !< from mass concentrations if not in ICs/BCs logical :: ltaerosol = .false. !< flag for aerosol version logical :: lradar = .false. !< flag for radar reflectivity real(kind=kind_phys) :: ttendlim = -999.0 !< temperature tendency limiter, set to <0 to deactivate @@ -2124,6 +2324,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 :: lheatstrg = .false. !< flag for canopy heat storage parameterization logical :: cnvcld = .false. logical :: random_clds = .false. !< flag controls whether clouds are random logical :: shal_cnv = .false. !< flag for calling shallow convection @@ -2131,12 +2332,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< 1: July 2010 version of mass-flux shallow conv scheme !< current operational version as of 2016 !< 2: scale- & aerosol-aware mass-flux shallow conv scheme (2017) + !< 3: scale- & aerosol-aware Grell-Freitas scheme (GSD) + !< 4: New Tiedtke scheme (CAPS) !< 0: modified Tiedtke's eddy-diffusion shallow conv scheme !< -1: no shallow convection used integer :: imfdeepcnv = 1 !< flag for mass-flux deep convection scheme !< 1: July 2010 version of SAS conv scheme !< current operational version as of 2016 !< 2: scale- & aerosol-aware mass-flux deep conv scheme (2017) + !< 3: scale- & aerosol-aware Grell-Freitas scheme (GSD) + !< 4: New Tiedtke scheme (CAPS) logical :: do_deep = .true. !< whether to do deep convection logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF @@ -2175,6 +2380,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: psauras(2) = (/1.0d-3,1.0d-3/) !< [in] auto conversion coeff from ice to snow in ras real(kind=kind_phys) :: prauras(2) = (/2.0d-3,2.0d-3/) !< [in] auto conversion coeff from cloud to rain in ras real(kind=kind_phys) :: wminras(2) = (/1.0d-5,1.0d-5/) !< [in] water and ice minimum threshold for ras + real(kind=kind_phys) :: rbcr = 0.25 !< Critical Richardson Number in PBL scheme real(kind=kind_phys) :: shoc_parm(5) = (/7000.0,1.0,4.2857143,0.7,-999.0/) !< some tunable parameters for shoc @@ -2213,31 +2419,48 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !< Nccn: CCN number concentration in cm^(-3) !< Until a realistic Nccn is provided, Nccns are assumed !< as Nccn=100 for sea and Nccn=1000 for land - !--- near surface temperature model + !--- near surface sea temperature model logical :: nst_anl = .false. !< flag for NSSTM analysis in gcycle/sfcsub integer :: lsea = 0 integer :: nstf_name(5) = (/0,0,1,0,5/) !< flag 0 for no nst 1 for uncoupled nst and 2 for coupled NST - !< nstf_name contains the NSSTM related parameters !< nstf_name(1) : 0 = NSSTM off, 1 = NSSTM on but uncoupled !< 2 = NSSTM on and coupled !< nstf_name(2) : 1 = NSSTM spin up on, 0 = NSSTM spin up off !< nstf_name(3) : 1 = NSSTM analysis on, 0 = NSSTM analysis off !< nstf_name(4) : zsea1 in mm !< nstf_name(5) : zsea2 in mm + !--- background vertical diffusion real(kind=kind_phys) :: xkzm_m = 1.0d0 !< [in] bkgd_vdif_m background vertical diffusion for momentum real(kind=kind_phys) :: xkzm_h = 1.0d0 !< [in] bkgd_vdif_h background vertical diffusion for heat q real(kind=kind_phys) :: xkzm_s = 1.0d0 !< [in] bkgd_vdif_s sigma threshold for background mom. diffusion real(kind=kind_phys) :: xkzminv = 0.3 !< diffusivity in inversion layers real(kind=kind_phys) :: moninq_fac = 1.0 !< turbulence diffusion coefficient factor +!---Cellular automaton options + integer :: nca = 1 + integer :: ncells = 5 + integer :: nlives = 10 + real(kind=kind_phys) :: nfracseed = 0.5 + integer :: nseed = 100000 + integer :: iseed_ca = 0 + integer :: nspinup = 1 + logical :: do_ca = .false. + logical :: ca_sgs = .false. + logical :: ca_global = .false. + logical :: ca_smooth = .false. + logical :: isppt_deep = .false. + real(kind=kind_phys) :: nthresh = 0.0 + !--- IAU options real(kind=kind_phys) :: iau_delthrs = 6 ! iau time interval (to scale increments) character(len=240) :: iau_inc_files(7)='' ! list of increment files real(kind=kind_phys) :: iaufhrs(7)=-1 ! forecast hours associated with increment files + logical :: iau_filter_increments = .false. ! filter IAU increments !--- debug flag logical :: debug = .false. logical :: pre_rad = .false. !< flag for testing purpose + ! max and min lon and lat for critical relative humidity integer :: max_lon=5000, max_lat=2000, min_lon=192, min_lat=94 real(kind=kind_phys) :: rhcmax = 0.9999999 !< max critical rel. hum. @@ -2250,11 +2473,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: skeb_npass = 11 logical :: do_sfcperts = .false. ! mg, sfc-perts integer :: nsfcpert = 6 ! mg, sfc-perts - real(kind=kind_phys) :: pertz0 = -999. - real(kind=kind_phys) :: pertzt = -999. - real(kind=kind_phys) :: pertshc = -999. - real(kind=kind_phys) :: pertlai = -999. - real(kind=kind_phys) :: pertalb = -999. + real(kind=kind_phys) :: pertz0 = -999. + real(kind=kind_phys) :: pertzt = -999. + real(kind=kind_phys) :: pertshc = -999. + real(kind=kind_phys) :: pertlai = -999. + real(kind=kind_phys) :: pertalb = -999. real(kind=kind_phys) :: pertvegf = -999. !--- END NAMELIST VARIABLES @@ -2278,7 +2501,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & mg_do_graupel, mg_do_hail, mg_nccons, mg_nicons, mg_ngcons, & mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, & mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, & + make_number_concentrations, & ltaerosol, lradar, ttendlim, lgfdlmprad, & + !--- max hourly + avg_max_length, & !--- land/surface model control lsm, lsoil, lsoil_lsm, nmtvr, ivegsrc, mom4ice, use_ufo, & !--- physical parameterizations @@ -2290,7 +2516,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & bl_mynn_edmf_tke, bl_mynn_edmf_part, bl_mynn_cloudmix, & bl_mynn_mixqt, icloud_bl, bl_mynn_tkeadvect, & h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf, & - shinhong, do_ysu, dspheat, cnvcld, & + shinhong, do_ysu, dspheat, lheatstrg, cnvcld, & random_clds, shal_cnv, imfshalcnv, imfdeepcnv, do_deep, jcap,& cs_parm, flgmin, cgwf, ccwf, cdmbgwd, sup, ctei_rm, crtrh, & dlqf, rbcr, shoc_parm, psauras, prauras, wminras, & @@ -2307,8 +2533,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & nst_anl, lsea, nstf_name, & ! background vertical diffusion xkzm_m, xkzm_h, xkzm_s, xkzminv, moninq_fac, & + !--- cellular automata + nca, ncells, nlives, nfracseed,nseed, nthresh, do_ca, & + ca_sgs, ca_global,iseed_ca,ca_smooth,isppt_deep,nspinup, & !--- IAU - iau_delthrs,iaufhrs,iau_inc_files, & + iau_delthrs,iaufhrs,iau_inc_files,iau_filter_increments, & !--- debug options debug, pre_rad, & !--- parameter range for critical relative humidity @@ -2345,7 +2574,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & close (nlunit) #endif !--- write version number and namelist to log file --- - if (me==master .and. logunit>=0) then + if (me == master .and. logunit>=0) then write(logunit, '(a80)') '================================================================================' write(logunit, '(a64)') phys_version write(logunit, nml=gfs_physics_nml) @@ -2356,9 +2585,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%master = master Model%communicator = communicator Model%ntasks = ntasks + Model%nthreads = nthreads Model%nlunit = nlunit - Model%logunit = logunit Model%fn_nml = fn_nml + Model%logunit = logunit Model%fhzero = fhzero Model%ldiag3d = ldiag3d Model%lssav = lssav @@ -2370,6 +2600,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%gen_coord_hybrid = gen_coord_hybrid !--- set some grid extent parameters + Model%tile_num = tile_num Model%isc = isc Model%jsc = jsc Model%nx = nx @@ -2397,7 +2628,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- calendars and time parameters and activation triggers Model%dtp = dt_phys Model%dtf = dt_dycore - Model%nscyc = nint(fhcyc*3600./Model%dtp) + Model%nscyc = nint(Model%fhcyc*con_hr/Model%dtp) Model%nszero = nint(Model%fhzero*con_hr/Model%dtp) Model%idat(1:8) = idat(1:8) Model%idate = 0 @@ -2465,6 +2696,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%prautco = prautco Model%evpco = evpco Model%wminco = wminco + !--- Max hourly + Model%avg_max_length = avg_max_length !--- Morrison-Gettelman MP parameters Model%fprcp = fprcp Model%pdfflag = pdfflag @@ -2497,6 +2730,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%tcrf = 1.0/(tcr-tf) !--- Thompson MP parameters + Model%make_number_concentrations = make_number_concentrations Model%ltaerosol = ltaerosol Model%lradar = lradar Model%ttendlim = ttendlim @@ -2540,6 +2774,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%oz_phys = oz_phys Model%oz_phys_2015 = oz_phys_2015 Model%h2o_phys = h2o_phys + ! To ensure that these values match what's in the physics, + ! array sizes are compared during model init in GFS_phys_time_vary_init() + ! + ! from module h2ointerp + if (h2o_phys) then + levh2o = 72 + h2o_coeff = 3 + else + levh2o = 1 + h2o_coeff = 1 + end if Model%pdfcld = pdfcld Model%shcnvcw = shcnvcw Model%redrag = redrag @@ -2548,6 +2793,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%shinhong = shinhong Model%do_ysu = do_ysu Model%dspheat = dspheat + Model%lheatstrg = lheatstrg Model%cnvcld = cnvcld Model%random_clds = random_clds Model%shal_cnv = shal_cnv @@ -2618,6 +2864,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%moninq_fac = moninq_fac !--- stochastic physics options + ! DH* 20180730 + ! For the standard/non-CCPP build, do_sppt, do_shum, do_skeb and do_sfcperts + ! are set to false here and updated later as part of init_stochastic_physics, + ! depending on values of other namelist parameters. Since these values are used + ! as conditionals for allocating components of Coupling and other DDTs, the call + ! to init_stochastic_physics is placed between creating the "Model" DDT and the + ! other DDTs. + ! This is confusing and not compatible with CCPP, because the CCPP physics init + ! can happen only after ALL DDTs are created and added to the CCPP data structure + ! (cdata). Hence, for CCPP do_sppt, do_shum, do_skeb and do_sfcperts are additional + ! namelist variables in group physics that are parsed here and then compared in + ! stochastic_physics_init (the CCPP version of init_stochastic_physics) to the + ! stochastic physics namelist parameters to ensure consistency. Model%do_sppt = do_sppt Model%use_zmtnblck = use_zmtnblck Model%do_shum = do_shum @@ -2630,12 +2889,29 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%pertlai = pertlai Model%pertalb = pertalb Model%pertvegf = pertvegf + ! *DH 20180730 + + !--- cellular automata options + Model%nca = nca + Model%ncells = ncells + Model%nlives = nlives + Model%nfracseed = nfracseed + Model%nseed = nseed + Model%ca_global = ca_global + Model%do_ca = do_ca + Model%ca_sgs = ca_sgs + Model%iseed_ca = iseed_ca + Model%ca_smooth = ca_smooth + Model%isppt_deep = isppt_deep + Model%nspinup = nspinup + Model%nthresh = nthresh ! IAU flags !--- iau parameters Model%iaufhrs = iaufhrs Model%iau_inc_files = iau_inc_files Model%iau_delthrs = iau_delthrs + Model%iau_filter_increments = iau_filter_increments !--- debug flag Model%debug = debug @@ -2647,7 +2923,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & allocate (Model%tracer_names(Model%ntrac)) Model%tracer_names(:) = tracer_names(:) Model%ntqv = get_tracer_index(Model%tracer_names, 'vap_wat', Model%me, Model%master, Model%debug) +#ifdef MULTI_GASES + Model%nto = get_tracer_index(Model%tracer_names, 'spfo', Model%me, Model%master, Model%debug) + Model%nto2 = get_tracer_index(Model%tracer_names, 'spfo2', Model%me, Model%master, Model%debug) + Model%ntoz = get_tracer_index(Model%tracer_names, 'spfo3', Model%me, Model%master, Model%debug) +#else Model%ntoz = get_tracer_index(Model%tracer_names, 'o3mr', Model%me, Model%master, Model%debug) +#endif Model%ntcw = get_tracer_index(Model%tracer_names, 'liq_wat', Model%me, Model%master, Model%debug) Model%ntiw = get_tracer_index(Model%tracer_names, 'ice_wat', Model%me, Model%master, Model%debug) Model%ntrw = get_tracer_index(Model%tracer_names, 'rainwat', Model%me, Model%master, Model%debug) @@ -2662,7 +2944,49 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%ntke = get_tracer_index(Model%tracer_names, 'sgs_tke', Model%me, Model%master, Model%debug) Model%ntwa = get_tracer_index(Model%tracer_names, 'liq_aero', Model%me, Model%master, Model%debug) Model%ntia = get_tracer_index(Model%tracer_names, 'ice_aero', Model%me, Model%master, Model%debug) - + Model%ntchm = 0 + Model%ntchs = get_tracer_index(Model%tracer_names, 'so2', Model%me, Model%master, Model%debug) + if (Model%ntchs > 0) then + Model%ntchm = get_tracer_index(Model%tracer_names, 'pp10', Model%me, Model%master, Model%debug) + if (Model%ntchm > 0) then + Model%ntchm = Model%ntchm - Model%ntchs + 1 + allocate(Model%ntdiag(Model%ntchm)) + ! -- turn on all tracer diagnostics to .true. by default, except for so2 + Model%ntdiag(1) = .false. + Model%ntdiag(2:) = .true. + ! -- turn off diagnostics for DMS + n = get_tracer_index(Model%tracer_names, 'DMS', Model%me, Model%master, Model%debug) - Model%ntchs + 1 + if (n > 0) Model%ntdiag(n) = .false. + ! -- turn off diagnostics for msa + n = get_tracer_index(Model%tracer_names, 'msa', Model%me, Model%master, Model%debug) - Model%ntchs + 1 + if (n > 0) Model%ntdiag(n) = .false. + endif + endif + ! To ensure that these values match what's in the physics, + ! array sizes are compared during model init in GFS_phys_time_vary_init() + ! + ! from module ozinterp + if (Model%ntoz>0) then + if (Model%oz_phys) then + levozp = 80 + oz_coeff = 4 + else if (Model%oz_phys_2015) then + levozp = 53 + oz_coeff = 6 + else + write(*,*) 'Logic error, ntoz>0 but no ozone physics selected' + stop + end if + else + if (Model%oz_phys .or. Model%oz_phys_2015) then + write(*,*) 'Logic error, ozone physics are selected, but ntoz<=0' + stop + else + levozp = 1 + oz_coeff = 0 + end if + end if + !--- quantities to be used to derive phy_f*d totals Model%nshoc_2d = nshoc_2d Model%nshoc_3d = nshoc_3d @@ -2688,6 +3012,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%kdt = 0 Model%first_time_step = .true. Model%restart = restart + Model%hydrostatic = hydrostatic Model%jdat(1:8) = jdat(1:8) Model%sec = 0 allocate(Model%si(Model%levr+1)) @@ -2735,17 +3060,24 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & endif !--- mynn-edmf scheme - if (Model%bl_mynn_edmf > 0) then - Model%do_shoc = .false. -! Model%shal_cnv = .false. -! Model%imfshalcnv = -1 - Model%hybedmf = .false. - Model%satmedmf = .false. - if (Model%me == Model%master) print *,' MYNN-EDMF scheme is used for both', & - ' 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 + if (Model%do_mynnedmf) then + if (Model%do_shoc .or. Model%hybedmf .or. Model%satmedmf) then + print *,' Logic error: MYNN EDMF cannot be run with SHOC, HEDMF or SATMEDMF' + stop + end if + ! Model%shal_cnv = .false. + ! Model%imfshalcnv = -1 + ! DH* substitute for MYNN namelist section + Model%icloud_bl = 1 + !Model%bl_mynn_tkeadvect = .true. + Model%bl_mynn_edmf = 1 + !Model%bl_mynn_edmf_mom = 1 + ! *DH + if (Model%me == Model%master) print *,' MYNN-EDMF scheme is used for both', & + ' 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 endif !--- set number of cloud types @@ -2782,6 +3114,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,' nstf_name(5)=',Model%nstf_name(5) endif if (Model%do_deep) then + ! Consistency check for NTDK convection: deep and shallow convection are bundled + ! and cannot be combined with any other deep or shallow convection scheme + if ( (Model%imfdeepcnv == 4 .or. Model%imfshalcnv == 4) .and. & + .not. (Model%imfdeepcnv == 4 .and. Model%imfshalcnv == 4) ) then + write(0,*) "Logic error: if NTDK deep convection is used, must also use NTDK shallow convection (and vice versa)" + stop + end if if (.not. Model%cscnv) then if (Model%ras) then print *,' RAS Convection scheme used with ccwf=',Model%ccwf @@ -2794,17 +3133,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & elseif(Model%imfdeepcnv == 2) then print *,' scale & aerosol-aware mass-flux deep conv scheme' elseif(Model%imfdeepcnv == 3) then - print *,'Grell-Freitas scale & aerosol-aware mass-flux deep conv scheme' + print *,' Grell-Freitas scale & aerosol-aware mass-flux deep conv scheme' + elseif(Model%imfdeepcnv == 4) then + print *,' New Tiedtke cumulus scheme' endif endif else if (Model%do_aw) then print *,'Chikira-Sugiyama convection scheme with Arakawa-Wu'& &, ' unified parameterization used' - else - print *,'Chikira-Sugiyama convection scheme used' - endif - print *,' cs_parm=',Model%cs_parm,' nctp=',Model%nctp + else + print *,'Chikira-Sugiyama convection scheme used' + endif + print *,' cs_parm=',Model%cs_parm,' nctp=',Model%nctp endif else print*, ' Deep convection scheme disabled' @@ -2821,7 +3162,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & elseif (Model%imfshalcnv == 2) then print *,' scale- & aerosol-aware mass-flux shallow conv scheme (2017)' elseif (Model%imfshalcnv == 3) then - print *,'Grell-Freitas scale- & aerosol-aware mass-flux shallow conv scheme (2013)' + print *,' Grell-Freitas scale- & aerosol-aware mass-flux shallow conv scheme (2013)' + elseif (Model%imfshalcnv == 4) then + print *,' New Tiedtke cumulus scheme' else print *,' unknown mass-flux scheme in use - defaulting to no shallow convection' Model%imfshalcnv = -1 @@ -2876,8 +3219,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if (Model%me == Model%master) print *,'Using Zhao/Carr/Sundqvist Microphysics with PDF Cloud' else if (Model%imp_physics == 5) then ! F-A goes here - print *,' Ferrier Microphysics scheme has been deprecated - job aborted' - stop + print *,' Ferrier Microphysics scheme has been deprecated - job aborted' + stop elseif (Model%imp_physics == Model%imp_physics_wsm6) then !WSM6 microphysics Model%npdf3d = 0 @@ -2902,7 +3245,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nieffr = 2 Model%nseffr = 3 if (Model%me == Model%master) print *,' Using Thompson double moment', & - ' microphysics',' ltaerosol = ',Model%ltaerosol, & + ' microphysics', & + ' make_number_concentrations = ',Model%make_number_concentrations, & + ' ltaerosol = ',Model%ltaerosol, & ' lradar =',Model%lradar,' ttendlim =',Model%ttendlim, & Model%num_p3d,Model%num_p2d @@ -2927,28 +3272,37 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%num_p3d = 6 Model%ngeffr = 6 endif - if (Model%me == Model%master) & - print *,' Using Morrison-Gettelman double moment microphysics', & - ' aero_in=', Model%aero_in, ' iccn=', Model%iccn, & - ' mg_dcs=', Model%mg_dcs, ' mg_qcvar=', Model%mg_qcvar, & - ' mg_ts_auto_ice=', Model%mg_ts_auto_ice, ' pdfflag=', Model%pdfflag, & - ' mg_do_graupel=', Model%mg_do_graupel, ' mg_do_hail=', Model%mg_do_hail, & - ' mg_nccons=', Model%mg_nccons, ' mg_nicon=', Model%mg_nicons, & - ' mg_ngcons=', Model%mg_ngcons , ' mg_ncnst=', Model%mg_ncnst, & - ' mg_ninst=', Model%mg_ninst , ' mg_ngnst=', Model%mg_ngnst, & - ' sed_supersat=', Model%sed_supersat , ' do_sb_physics=', Model%do_sb_physics, & - ' microp_uniform=', Model%microp_uniform, ' do_cldice=', Model%do_cldice, & - ' hetfrz_classnuc=', Model%hetfrz_classnuc, ' ncnd=', Model%ncnd, & - ' mg_alf=', Model%mg_alf, ' mg_qcmin=', Model%mg_qcmin, & - ' mg_do_ice_gmao=', Model%mg_do_ice_gmao, ' mg_do_liq_liu=', Model%mg_do_liq_liu + if (Model%me == Model%master) & + print *,' Using Morrison-Gettelman double moment microphysics', & + ' aero_in=', Model%aero_in, ' iccn=', Model%iccn, & + ' mg_dcs=', Model%mg_dcs, ' mg_qcvar=', Model%mg_qcvar, & + ' mg_ts_auto_ice=', Model%mg_ts_auto_ice, ' pdfflag=', Model%pdfflag, & + ' mg_do_graupel=', Model%mg_do_graupel, ' mg_do_hail=', Model%mg_do_hail, & + ' mg_nccons=', Model%mg_nccons, ' mg_nicon=', Model%mg_nicons, & + ' mg_ngcons=', Model%mg_ngcons , ' mg_ncnst=', Model%mg_ncnst, & + ' mg_ninst=', Model%mg_ninst , ' mg_ngnst=', Model%mg_ngnst, & + ' sed_supersat=', Model%sed_supersat , ' do_sb_physics=', Model%do_sb_physics,& + ' microp_uniform=', Model%microp_uniform, ' do_cldice=', Model%do_cldice, & + ' hetfrz_classnuc=', Model%hetfrz_classnuc, ' ncnd=', Model%ncnd, & + ' mg_alf=', Model%mg_alf, ' mg_qcmin=', Model%mg_qcmin, & + ' mg_do_ice_gmao=', Model%mg_do_ice_gmao, ' mg_do_liq_liu=', Model%mg_do_liq_liu elseif (Model%imp_physics == Model%imp_physics_gfdl) then !GFDL microphysics Model%npdf3d = 0 - Model%num_p3d = 1 ! rsun 4 before + Model%num_p3d = 1 + if(Model%effr_in) then + Model%num_p3d = 5 + endif + Model%nleffr = 1 + Model%nieffr = 2 + Model%nreffr = 3 + Model%nseffr = 4 + Model%ngeffr = 5 Model%num_p2d = 1 Model%pdfcld = .false. Model%shcnvcw = .false. Model%ncnd = 5 + if (Model%me == Model%master) print *,' avg_max_length=',Model%avg_max_length if (Model%me == Model%master) print *,' Using GFDL Cloud Microphysics' else if (Model%me == Model%master) print *,'Wrong imp_physics value. Job abort.' @@ -2985,17 +3339,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%indcld = Model%ntot3d - 2 endif - if (me == Model%master) print *,' num_p3d=',Model%num_p3d,' num_p2d=',Model%num_p2d, & - ' crtrh=',Model%crtrh,' npdf3d=',Model%npdf3d, & - ' pdfcld=',Model%pdfcld,' shcnvcw=',Model%shcnvcw, & - ' cnvcld=',Model%cnvcld,' ncnvcld3d=',Model%ncnvcld3d, & - ' do_shoc=',Model%do_shoc,' nshoc3d=',Model%nshoc_3d, & - ' nshoc_2d=',Model%nshoc_2d,' shoc_cld=',Model%shoc_cld,& - ' uni_cld=', Model%uni_cld, & - ' ntot3d=',Model%ntot3d,' ntot2d=',Model%ntot2d, & - ' shocaftcnv=',Model%shocaftcnv,' indcld=',Model%indcld,& - ' shoc_parm=',Model%shoc_parm, & - ' ncnvw=', Model%ncnvw, ' ncnvc=', Model%ncnvc + if (me == Model%master) & + write(0,*) ' num_p3d=', Model%num_p3d, ' num_p2d=', Model%num_p2d, & + ' crtrh=', Model%crtrh, ' npdf3d=', Model%npdf3d, & + ' pdfcld=', Model%pdfcld, ' shcnvcw=', Model%shcnvcw, & + ' cnvcld=', Model%cnvcld, ' ncnvcld3d=',Model%ncnvcld3d, & + ' do_shoc=', Model%do_shoc, ' nshoc3d=', Model%nshoc_3d, & + ' nshoc_2d=', Model%nshoc_2d, ' shoc_cld=', Model%shoc_cld, & + ' uni_cld=', Model%uni_cld, & + ' ntot3d=', Model%ntot3d, ' ntot2d=', Model%ntot2d, & + ' shocaftcnv=',Model%shocaftcnv,' indcld=', Model%indcld, & + ' shoc_parm=', Model%shoc_parm, & + ' ncnvw=', Model%ncnvw, ' ncnvc=', Model%ncnvc !--- END CODE FROM COMPNS_PHYSICS @@ -3004,7 +3359,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- set up parameters for Xu & Randell's cloudiness computation (Radiation) Model%lmfshal = (Model%shal_cnv .and. Model%imfshalcnv > 0) - Model%lmfdeep2 = (Model%imfdeepcnv == 2 .or. Model%imfdeepcnv == 3) + Model%lmfdeep2 = (Model%imfdeepcnv == 2 .or. Model%imfdeepcnv == 3 .or. Model%imfdeepcnv == 4) !--- END CODE FROM GLOOPR !--- BEGIN CODE FROM GLOOPB @@ -3118,15 +3473,16 @@ subroutine control_print(Model) print *, ' ' if (Model%imp_physics == Model%imp_physics_zhao_carr .or. Model%imp_physics == Model%imp_physics_zhao_carr_pdf) then - print *, ' Z-C microphysical parameters' - print *, ' psautco : ', Model%psautco - print *, ' prautco : ', Model%prautco - print *, ' evpco : ', Model%evpco - print *, ' wminco : ', Model%wminco + print *, ' Z-C microphysical parameters' + print *, ' psautco : ', Model%psautco + print *, ' prautco : ', Model%prautco + print *, ' evpco : ', Model%evpco + print *, ' wminco : ', Model%wminco print *, ' ' endif if (Model%imp_physics == Model%imp_physics_wsm6 .or. Model%imp_physics == Model%imp_physics_thompson) then print *, ' Thompson microphysical parameters' + print *, ' make_number_concentrations : ', Model%make_number_concentrations print *, ' ltaerosol : ', Model%ltaerosol print *, ' lradar : ', Model%lradar print *, ' ttendlim : ', Model%ttendlim @@ -3189,6 +3545,7 @@ subroutine control_print(Model) print *, ' shinhong : ', Model%shinhong print *, ' do_ysu : ', Model%do_ysu print *, ' dspheat : ', Model%dspheat + print *, ' lheatstrg : ', Model%lheatstrg print *, ' cnvcld : ', Model%cnvcld print *, ' random_clds : ', Model%random_clds print *, ' shal_cnv : ', Model%shal_cnv @@ -3255,6 +3612,21 @@ subroutine control_print(Model) print *, ' do_skeb : ', Model%do_skeb print *, ' do_sfcperts : ', Model%do_sfcperts print *, ' ' + print *, 'cellular automata' + print *, ' nca : ', Model%ncells + print *, ' ncells : ', Model%ncells + print *, ' nlives : ', Model%nlives + print *, ' nfracseed : ', Model%nfracseed + print *, ' nseed : ', Model%nseed + print *, ' ca_global : ', Model%ca_global + print *, ' ca_sgs : ', Model%ca_sgs + print *, ' do_ca : ', Model%do_ca + print *, ' iseed_ca : ', Model%iseed_ca + print *, ' ca_smooth : ', Model%ca_smooth + print *, ' isppt_deep : ', Model%isppt_deep + print *, ' nspinup : ', Model%nspinup + print *, ' nthresh : ', Model%nthresh + print *, ' ' print *, 'tracers' print *, ' tracer_names : ', Model%tracer_names print *, ' ntrac : ', Model%ntrac @@ -3276,6 +3648,8 @@ subroutine control_print(Model) print *, ' nto2 : ', Model%nto2 print *, ' ntwa : ', Model%ntwa print *, ' ntia : ', Model%ntia + print *, ' ntchm : ', Model%ntchm + print *, ' ntchs : ', Model%ntchs print *, ' ' print *, 'derived totals for phy_f*d' print *, ' ntot2d : ', Model%ntot2d @@ -3312,6 +3686,7 @@ subroutine control_print(Model) print *, ' si : ', Model%si print *, ' first_time_step : ', Model%first_time_step print *, ' restart : ', Model%restart + print *, ' hydrostatic : ', Model%hydrostatic endif end subroutine control_print @@ -3467,18 +3842,21 @@ subroutine tbd_create (Tbd, IM, Model) Tbd%htswc = clear_val Tbd%htsw0 = clear_val - if (Model%imfdeepcnv == 3) then + if (Model%imfdeepcnv == 3 .or. Model%imfdeepcnv == 4) then allocate(Tbd%forcet(IM, Model%levs)) allocate(Tbd%forceq(IM, Model%levs)) allocate(Tbd%prevst(IM, Model%levs)) allocate(Tbd%prevsq(IM, Model%levs)) - allocate(Tbd%cactiv(IM)) Tbd%forcet = clear_val Tbd%forceq = clear_val Tbd%prevst = clear_val Tbd%prevsq = clear_val - Tbd%cactiv = zero end if + + if (Model%imfdeepcnv == 3) then + allocate(Tbd%cactiv(IM)) + Tbd%cactiv = zero + end if if (Model%lsm == Model%lsm_ruc) then allocate(Tbd%raincprv (IM)) @@ -3619,8 +3997,6 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%transa (IM)) allocate (Diag%sbsnoa (IM)) allocate (Diag%snowca (IM)) - allocate (Diag%snowfallac (IM)) - allocate (Diag%acsnow (IM)) allocate (Diag%soilm (IM)) allocate (Diag%tmpmin (IM)) allocate (Diag%tmpmax (IM)) @@ -3647,6 +4023,9 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%u10mmax (IM)) allocate (Diag%v10mmax (IM)) allocate (Diag%wind10mmax (IM)) + allocate (Diag%u10max (IM)) + allocate (Diag%v10max (IM)) + allocate (Diag%spd10max (IM)) allocate (Diag%rain (IM)) allocate (Diag%rainc (IM)) allocate (Diag%ice (IM)) @@ -3694,24 +4073,46 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%shum_wts(IM,Model%levs)) !--- 3D diagnostics allocate (Diag%zmtnblck(IM)) + + allocate (Diag%ca_out (IM)) + allocate (Diag%ca_deep (IM)) + allocate (Diag%ca_turb (IM)) + allocate (Diag%ca_shal (IM)) + allocate (Diag%ca_rad (IM)) + allocate (Diag%ca_micro (IM)) + + ! need to allocate these arrays to avoid Fortran runtime errors when + ! trying to add slices of non-allocated fields to the CCPP data structure allocate (Diag%du3dt (IM,Model%levs,4)) allocate (Diag%dv3dt (IM,Model%levs,4)) - allocate (Diag%dt3dt (IM,Model%levs,6)) + allocate (Diag%dt3dt (IM,Model%levs,7)) + ! DH* + !if (Model%me==0) then + ! write(0,*) "DH WARNING: TEMPORARY ALLOCATE Diag%dq3dt with size (IM,Model%levs,9) to avoid crash on MacOSX/GNU (and others?) in PROD mode" + !end if allocate (Diag%dq3dt (IM,Model%levs,9)) - !--- needed to allocate GoCart coupling fields + ! *DH +! allocate (Diag%dq3dt (IM,Model%levs,oz_coeff+5)) +!--- needed to allocate GoCart coupling fields allocate (Diag%upd_mf (IM,Model%levs)) allocate (Diag%dwn_mf (IM,Model%levs)) allocate (Diag%det_mf (IM,Model%levs)) allocate (Diag%cldcov (IM,Model%levs)) - !--- 3D diagnostics for Thompson MP - if(Model%lradar) then - allocate (Diag%refl_10cm(IM,Model%levs)) - endif - + !--- 3D diagnostics for Thompson MP / GFDL MP + allocate (Diag%refl_10cm(IM,Model%levs)) + + !-- New max hourly diag. + allocate (Diag%refdmax(IM)) + allocate (Diag%refdmax263k(IM)) + allocate (Diag%t02max(IM)) + allocate (Diag%t02min(IM)) + allocate (Diag%rh02max(IM)) + allocate (Diag%rh02min(IM)) + !--- MYNN variables: if (Model%do_mynnedmf) then - print*,"Allocating all MYNN-EDMF variables:" + !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)) @@ -3723,7 +4124,7 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%ktop_shallow(IM)) allocate (Diag%exch_h (IM,Model%levs)) allocate (Diag%exch_m (IM,Model%levs)) - print*,"Initializing all MYNN-EDMF variables with ",clear_val + !print*,"Initializing all MYNN-EDMF variables with ",clear_val Diag%edmf_a = clear_val Diag%edmf_w = clear_val Diag%edmf_qt = clear_val @@ -3736,7 +4137,10 @@ subroutine diag_create (Diag, IM, Model) Diag%exch_h = clear_val Diag%exch_m = clear_val endif - + + !--- diagnostics for coupled chemistry + if (Model%cplchm) call Diag%chem_init(IM,Model) + call Diag%rad_zero (Model) ! print *,'in diag_create, call phys_zero' linit = .true. @@ -3780,8 +4184,6 @@ subroutine diag_phys_zero (Diag, Model, linit) Diag%transa = zero Diag%sbsnoa = zero Diag%snowca = zero - Diag%snowfallac = zero - Diag%acsnow = zero Diag%soilm = zero Diag%tmpmin = huge Diag%tmpmax = zero @@ -3804,6 +4206,9 @@ subroutine diag_phys_zero (Diag, Model, linit) Diag%u10mmax = zero Diag%v10mmax = zero Diag%wind10mmax = zero + Diag%u10max = zero + Diag%v10max = zero + ! Diag%spd10max = zero Diag%rain = zero Diag%rainc = zero Diag%ice = zero @@ -3851,6 +4256,12 @@ subroutine diag_phys_zero (Diag, Model, linit) Diag%toticeb = zero Diag%totsnwb = zero Diag%totgrpb = zero + Diag%ca_out = zero + Diag%ca_deep = zero + Diag%ca_turb = zero + Diag%ca_shal = zero + Diag%ca_rad = zero + Diag%ca_micro = zero ! if(Model%me == Model%master) print *,'in diag_phys_zero, totprcpb set to 0,kdt=',Model%kdt if (Model%ldiag3d) then @@ -3863,10 +4274,17 @@ subroutine diag_phys_zero (Diag, Model, linit) Diag%det_mf = zero endif - if (Model%lradar) then - Diag%refl_10cm = zero - endif - + Diag%refl_10cm = zero + + ! max hourly diagnostics + Diag%refl_10cm = zero + Diag%refdmax = -35. + Diag%refdmax263k = -35. + Diag%t02max = -999. + Diag%t02min = 999. + Diag%rh02max = -999. + Diag%rh02min = 999. + if (present(linit)) then if (linit) then Diag%totprcp = zero @@ -3880,6 +4298,100 @@ subroutine diag_phys_zero (Diag, Model, linit) endif end subroutine diag_phys_zero +!----------------------- +! GFS_diag%chem_init +!----------------------- + subroutine diag_chem_init(Diag, IM, Model) + + use parse_tracers, only: get_tracer_index, NO_TRACER + + class(GFS_diag_type) :: Diag + integer, intent(in) :: IM + type(GFS_control_type), intent(in) :: Model + + ! -- local variables + integer :: n + + ! -- initialize diagnostic variables depending on + ! -- specific chemical tracers + if (Model%ntchm > 0) then + ! -- retrieve number of dust bins + n = get_number_bins('dust') + if (n > 0) then + allocate (Diag%duem(IM,n)) + Diag%duem = zero + end if + + ! -- retrieve number of sea salt bins + n = get_number_bins('seas') + if (n > 0) then + allocate (Diag%ssem(IM,n)) + Diag%ssem = zero + end if + end if + + ! -- sedimentation and dry/wet deposition diagnostics + if (associated(Model%ntdiag)) then + ! -- get number of tracers with enabled diagnostics + n = count(Model%ntdiag) + + ! -- initialize sedimentation + allocate (Diag%sedim(IM,n)) + Diag%sedim = zero + + ! -- initialize dry deposition + allocate (Diag%drydep(IM,n)) + Diag%drydep = zero + + ! -- initialize large-scale wet deposition + allocate (Diag%wetdpl(IM,n)) + Diag%wetdpl = zero + + ! -- initialize convective-scale wet deposition + allocate (Diag%wetdpc(IM,n)) + Diag%wetdpc = zero + end if + + ! -- initialize anthropogenic and biomass + ! -- burning emission diagnostics for + ! -- (in order): black carbon, + ! -- organic carbon, and sulfur dioxide + allocate (Diag%abem(IM,6)) + Diag%abem = zero + + ! -- initialize column burden diagnostics + ! -- for aerosol species (in order): pm2.5 + ! -- black carbon, organic carbon, sulfate, + ! -- dust, sea salt + allocate (Diag%aecm(IM,6)) + Diag%aecm = zero + + contains + + integer function get_number_bins(tracer_type) + character(len=*), intent(in) :: tracer_type + + logical :: next + integer :: n + character(len=5) :: name + + get_number_bins = 0 + + n = 0 + next = .true. + do while (next) + n = n + 1 + write(name,'(a,i1)') tracer_type, n + 1 + next = get_tracer_index(Model%tracer_names, name, & + Model%me, Model%master, Model%debug) /= NO_TRACER + end do + + get_number_bins = n + + end function get_number_bins + + end subroutine diag_chem_init + !------------------------- ! GFS_interstitial_type%create !------------------------- @@ -3908,8 +4420,17 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%alb1d (IM)) allocate (Interstitial%bexp1d (IM)) allocate (Interstitial%cd (IM)) + allocate (Interstitial%cd_ice (IM)) + allocate (Interstitial%cd_land (IM)) + allocate (Interstitial%cd_ocean (IM)) allocate (Interstitial%cdq (IM)) + allocate (Interstitial%cdq_ice (IM)) + allocate (Interstitial%cdq_land (IM)) + allocate (Interstitial%cdq_ocean (IM)) allocate (Interstitial%cf_upi (IM,Model%levs)) + allocate (Interstitial%chh_ice (IM)) + allocate (Interstitial%chh_land (IM)) + allocate (Interstitial%chh_ocean (IM)) allocate (Interstitial%clcn (IM,Model%levs)) allocate (Interstitial%cldf (IM)) allocate (Interstitial%cldsa (IM,5)) @@ -3919,6 +4440,9 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%clouds (IM,Model%levr+LTP,NF_CLDS)) allocate (Interstitial%clw (IM,Model%levs,Interstitial%nn)) allocate (Interstitial%clx (IM,4)) + allocate (Interstitial%cmm_ice (IM)) + allocate (Interstitial%cmm_land (IM)) + allocate (Interstitial%cmm_ocean (IM)) allocate (Interstitial%cnv_dqldt (IM,Model%levs)) allocate (Interstitial%cnv_fice (IM,Model%levs)) allocate (Interstitial%cnv_mfd (IM,Model%levs)) @@ -3954,16 +4478,34 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%dzlyr (IM,Model%levr+LTP)) allocate (Interstitial%elvmax (IM)) allocate (Interstitial%ep1d (IM)) + allocate (Interstitial%ep1d_ice (IM)) + allocate (Interstitial%ep1d_land (IM)) + allocate (Interstitial%ep1d_ocean (IM)) allocate (Interstitial%evap (IM)) + allocate (Interstitial%evap_ice (IM)) + allocate (Interstitial%evap_land (IM)) + allocate (Interstitial%evap_ocean (IM)) allocate (Interstitial%evbs (IM)) allocate (Interstitial%evcw (IM)) allocate (Interstitial%faerlw (IM,Model%levr+LTP,NBDLW,NF_AELW)) allocate (Interstitial%faersw (IM,Model%levr+LTP,NBDSW,NF_AESW)) + allocate (Interstitial%ffhh_ice (IM)) + allocate (Interstitial%ffhh_land (IM)) + allocate (Interstitial%ffhh_ocean (IM)) allocate (Interstitial%fh2 (IM)) + allocate (Interstitial%fh2_ice (IM)) + allocate (Interstitial%fh2_land (IM)) + allocate (Interstitial%fh2_ocean (IM)) allocate (Interstitial%flag_cice (IM)) allocate (Interstitial%flag_guess (IM)) allocate (Interstitial%flag_iter (IM)) + allocate (Interstitial%ffmm_ice (IM)) + allocate (Interstitial%ffmm_land (IM)) + allocate (Interstitial%ffmm_ocean (IM)) allocate (Interstitial%fm10 (IM)) + allocate (Interstitial%fm10_ice (IM)) + allocate (Interstitial%fm10_land (IM)) + allocate (Interstitial%fm10_ocean (IM)) allocate (Interstitial%frland (IM)) allocate (Interstitial%fscav (Model%ntrac-Model%ncld+2)) allocate (Interstitial%fswtr (Model%ntrac-Model%ncld+2)) @@ -3973,13 +4515,24 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%gamt (IM)) allocate (Interstitial%gasvmr (IM,Model%levr+LTP,NF_VGAS)) allocate (Interstitial%gflx (IM)) + allocate (Interstitial%gflx_ice (IM)) + allocate (Interstitial%gflx_land (IM)) + allocate (Interstitial%gflx_ocean (IM)) allocate (Interstitial%gwdcu (IM,Model%levs)) allocate (Interstitial%gwdcv (IM,Model%levs)) allocate (Interstitial%h2o_pres (levh2o)) allocate (Interstitial%hflx (IM)) + allocate (Interstitial%hflx_ice (IM)) + allocate (Interstitial%hflx_land (IM)) + allocate (Interstitial%hflx_ocean (IM)) allocate (Interstitial%hprime1 (IM)) + allocate (Interstitial%dry (IM)) allocate (Interstitial%idxday (IM)) + allocate (Interstitial%icy (IM)) + allocate (Interstitial%lake (IM)) + allocate (Interstitial%ocean (IM)) allocate (Interstitial%islmsk (IM)) + allocate (Interstitial%wet (IM)) allocate (Interstitial%kbot (IM)) allocate (Interstitial%kcnv (IM)) allocate (Interstitial%kinver (IM)) @@ -3999,11 +4552,17 @@ subroutine interstitial_create (Interstitial, IM, Model) 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)) allocate (Interstitial%raincd (IM)) allocate (Interstitial%raincs (IM)) allocate (Interstitial%rainmcadj (IM)) allocate (Interstitial%rainp (IM,Model%levs)) allocate (Interstitial%rb (IM)) + allocate (Interstitial%rb_ice (IM)) + allocate (Interstitial%rb_land (IM)) + allocate (Interstitial%rb_ocean (IM)) allocate (Interstitial%rhc (IM,Model%levs)) allocate (Interstitial%runoff (IM)) allocate (Interstitial%save_q (IM,Model%levs,Model%ntrac)) @@ -4019,25 +4578,46 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%sigmatot (IM,Model%levs)) allocate (Interstitial%slopetype (IM)) allocate (Interstitial%snowc (IM)) + allocate (Interstitial%snowd_ice (IM)) + allocate (Interstitial%snowd_land (IM)) + allocate (Interstitial%snowd_ocean(IM)) allocate (Interstitial%snohf (IM)) allocate (Interstitial%snowmt (IM)) allocate (Interstitial%soiltype (IM)) allocate (Interstitial%stress (IM)) + allocate (Interstitial%stress_ice (IM)) + allocate (Interstitial%stress_land(IM)) + allocate (Interstitial%stress_ocean(IM)) allocate (Interstitial%theta (IM)) + allocate (Interstitial%tice (IM)) allocate (Interstitial%tlvl (IM,Model%levr+1+LTP)) allocate (Interstitial%tlyr (IM,Model%levr+LTP)) + allocate (Interstitial%tprcp_ice (IM)) + allocate (Interstitial%tprcp_land (IM)) + allocate (Interstitial%tprcp_ocean(IM)) allocate (Interstitial%trans (IM)) allocate (Interstitial%tseal (IM)) allocate (Interstitial%tsfa (IM)) + allocate (Interstitial%tsfc_ice (IM)) + allocate (Interstitial%tsfc_land (IM)) + allocate (Interstitial%tsfc_ocean (IM)) allocate (Interstitial%tsfg (IM)) allocate (Interstitial%tsurf (IM)) + allocate (Interstitial%tsurf_ice (IM)) + allocate (Interstitial%tsurf_land (IM)) + allocate (Interstitial%tsurf_ocean(IM)) allocate (Interstitial%ud_mf (IM,Model%levs)) allocate (Interstitial%ulwsfc_cice(IM)) + allocate (Interstitial%uustar_ice (IM)) + allocate (Interstitial%uustar_land(IM)) + allocate (Interstitial%uustar_ocean(IM)) allocate (Interstitial%vdftra (IM,Model%levs,Interstitial%nvdiff)) !GJF first dimension was set as 'IX' in GFS_physics_driver allocate (Interstitial%vegf1d (IM)) allocate (Interstitial%vegtype (IM)) allocate (Interstitial%w_upi (IM,Model%levs)) allocate (Interstitial%wcbmax (IM)) + allocate (Interstitial%weasd_ice (IM)) + allocate (Interstitial%weasd_land (IM)) allocate (Interstitial%wind (IM)) allocate (Interstitial%work1 (IM)) allocate (Interstitial%work2 (IM)) @@ -4046,6 +4626,9 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%xlai1d (IM)) allocate (Interstitial%xmu (IM)) allocate (Interstitial%z01d (IM)) + allocate (Interstitial%zorl_ice (IM)) + allocate (Interstitial%zorl_land (IM)) + allocate (Interstitial%zorl_ocean (IM)) allocate (Interstitial%zt1d (IM)) ! 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 @@ -4069,25 +4652,31 @@ subroutine interstitial_create (Interstitial, IM, Model) allocate (Interstitial%ncpl (IM,Model%levs)) end if ! Set components that do not change - Interstitial%h2o_coeff = h2o_coeff - Interstitial%im = IM - Interstitial%ipr = min(IM,10) - Interstitial%ix = IM - Interstitial%latidxprnt = 1 - Interstitial%levi = Model%levs+1 - Interstitial%levh2o = levh2o - Interstitial%levozp = levozp - Interstitial%lm = Model%levr - Interstitial%lmk = Model%levr+LTP - Interstitial%lmp = Model%levr+1+LTP - Interstitial%oz_coeff = oz_coeff + + Interstitial%im = IM + Interstitial%ipr = min(IM,10) + Interstitial%ix = IM + Interstitial%latidxprnt = 1 + Interstitial%levi = Model%levs+1 + Interstitial%nsteps_per_reset = nint(Model%avg_max_length/Model%dtp) + Interstitial%levh2o = levh2o + Interstitial%levozp = levozp + Interstitial%lm = Model%levr + Interstitial%lmk = Model%levr+LTP + Interstitial%lmp = Model%levr+1+LTP + Interstitial%h2o_coeff = h2o_coeff + Interstitial%oz_coeff = oz_coeff ! h2o_pres and oz_pres do not change during the run, but ! need to be set later in GFS_phys_time_vary_init (after ! h2o_pres/oz_pres are read in read_h2odata/read_o3data) - Interstitial%oz_pres = oz_pres - Interstitial%h2o_pres = h2o_pres + Interstitial%h2o_pres = clear_val + Interstitial%oz_pres = clear_val ! - Interstitial%skip_macro = .false. + Interstitial%skip_macro = .false. + ! The value phys_hydrostatic from dynamics does not match the + ! hardcoded value for calling GFDL MP in GFS_physics_driver.F90, + ! which is set to .true. + Interstitial%phys_hydrostatic = .true. ! Reset all other variables call Interstitial%rad_reset () call Interstitial%phys_reset (Model) @@ -4114,7 +4703,6 @@ subroutine interstitial_setup_tracers(Interstitial, Model) Interstitial%nsamftrac = 0 Interstitial%ncstrac = 0 - ! GF* 20180712 moved from GFS_physics_driver.F90 if (Model%imp_physics == Model%imp_physics_thompson) then if (Model%ltaerosol) then Interstitial%nvdiff = 8 @@ -4168,7 +4756,11 @@ subroutine interstitial_setup_tracers(Interstitial, Model) Interstitial%ntiwx = 0 endif end if - + + if (Model%imp_physics == Model%imp_physics_zhao_carr) then + if (Model%cplchm) Interstitial%nvdiff = 3 + end if + Interstitial%ntkev = Interstitial%nvdiff if (Model%ntiw > 0) then @@ -4210,8 +4802,7 @@ subroutine interstitial_setup_tracers(Interstitial, Model) Interstitial%nsamftrac = Interstitial%tracers_total endif Interstitial%ncstrac = Interstitial%tracers_total + 3 - ! *GF - ! + end subroutine interstitial_setup_tracers subroutine interstitial_rad_reset (Interstitial) @@ -4275,14 +4866,26 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%adjvisdfd = clear_val Interstitial%bexp1d = clear_val Interstitial%cd = clear_val + Interstitial%cd_ice = huge + Interstitial%cd_land = huge + Interstitial%cd_ocean = huge Interstitial%cdq = clear_val + Interstitial%cdq_ice = huge + Interstitial%cdq_land = huge + Interstitial%cdq_ocean = huge Interstitial%cf_upi = clear_val + Interstitial%chh_ice = huge + Interstitial%chh_land = huge + Interstitial%chh_ocean = huge Interstitial%clcn = clear_val Interstitial%cld1d = clear_val Interstitial%cldf = clear_val Interstitial%clw = clear_val Interstitial%clw(:,:,2) = -999.9 Interstitial%clx = clear_val + Interstitial%cmm_ice = huge + Interstitial%cmm_land = huge + Interstitial%cmm_ocean = huge Interstitial%cnv_dqldt = clear_val Interstitial%cnv_fice = clear_val Interstitial%cnv_mfd = clear_val @@ -4315,14 +4918,32 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%dvsfc1 = clear_val Interstitial%elvmax = clear_val Interstitial%ep1d = clear_val + Interstitial%ep1d_ice = huge + Interstitial%ep1d_land = huge + Interstitial%ep1d_ocean = huge Interstitial%evap = clear_val + Interstitial%evap_ice = huge + Interstitial%evap_land = huge + Interstitial%evap_ocean = huge Interstitial%evbs = clear_val Interstitial%evcw = clear_val + Interstitial%ffhh_ice = huge + Interstitial%ffhh_land = huge + Interstitial%ffhh_ocean = huge Interstitial%fh2 = clear_val + Interstitial%fh2_ice = huge + Interstitial%fh2_land = huge + Interstitial%fh2_ocean = huge Interstitial%flag_cice = .false. Interstitial%flag_guess = .false. Interstitial%flag_iter = .true. + Interstitial%ffmm_ice = huge + Interstitial%ffmm_land = huge + Interstitial%ffmm_ocean = huge Interstitial%fm10 = clear_val + Interstitial%fm10_ice = huge + Interstitial%fm10_land = huge + Interstitial%fm10_ocean = huge Interstitial%frain = clear_val Interstitial%frland = clear_val Interstitial%fscav = clear_val @@ -4332,11 +4953,22 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%gamq = clear_val Interstitial%gamt = clear_val Interstitial%gflx = clear_val + Interstitial%gflx_ice = huge + Interstitial%gflx_land = huge + Interstitial%gflx_ocean = huge Interstitial%gwdcu = clear_val Interstitial%gwdcv = clear_val Interstitial%hflx = clear_val + Interstitial%hflx_ice = huge + Interstitial%hflx_land = huge + Interstitial%hflx_ocean = huge Interstitial%hprime1 = clear_val + Interstitial%dry = .false. + Interstitial%icy = .false. + Interstitial%lake = .false. + Interstitial%ocean = .false. Interstitial%islmsk = 0 + Interstitial%wet = .false. Interstitial%kbot = Model%levs Interstitial%kcnv = 0 Interstitial%kinver = Model%levs @@ -4349,11 +4981,17 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%qicn = clear_val Interstitial%qlcn = clear_val Interstitial%qss = clear_val + Interstitial%qss_ice = huge + Interstitial%qss_land = huge + Interstitial%qss_ocean = huge Interstitial%raincd = clear_val Interstitial%raincs = clear_val Interstitial%rainmcadj = clear_val Interstitial%rainp = clear_val Interstitial%rb = clear_val + Interstitial%rb_ice = huge + Interstitial%rb_land = huge + Interstitial%rb_ocean = huge Interstitial%rhc = clear_val Interstitial%rhcbot = clear_val Interstitial%rhcpbl = clear_val @@ -4370,21 +5008,42 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%sigmatot = clear_val Interstitial%slopetype = 0 Interstitial%snowc = clear_val + Interstitial%snowd_ice = huge + Interstitial%snowd_land = huge + Interstitial%snowd_ocean = huge Interstitial%snohf = clear_val Interstitial%snowmt = clear_val Interstitial%soiltype = 0 Interstitial%stress = clear_val + Interstitial%stress_ice = huge + Interstitial%stress_land = huge + Interstitial%stress_ocean = huge Interstitial%theta = clear_val + Interstitial%tice = clear_val + Interstitial%tprcp_ice = huge + Interstitial%tprcp_land = huge + Interstitial%tprcp_ocean = huge Interstitial%trans = clear_val Interstitial%tseal = clear_val + Interstitial%tsfc_ice = huge + Interstitial%tsfc_land = huge + Interstitial%tsfc_ocean = huge Interstitial%tsurf = clear_val + Interstitial%tsurf_ice = huge + Interstitial%tsurf_land = huge + Interstitial%tsurf_ocean = huge Interstitial%ud_mf = clear_val Interstitial%ulwsfc_cice = clear_val + Interstitial%uustar_ice = huge + Interstitial%uustar_land = huge + Interstitial%uustar_ocean = huge Interstitial%vdftra = clear_val Interstitial%vegf1d = clear_val Interstitial%vegtype = 0 Interstitial%w_upi = clear_val Interstitial%wcbmax = clear_val + Interstitial%weasd_land = huge + Interstitial%weasd_ice = huge Interstitial%wind = clear_val Interstitial%work1 = clear_val Interstitial%work2 = clear_val @@ -4393,6 +5052,9 @@ subroutine interstitial_phys_reset (Interstitial, Model) Interstitial%xlai1d = clear_val Interstitial%xmu = clear_val Interstitial%z01d = clear_val + Interstitial%zorl_ice = huge + Interstitial%zorl_land = huge + Interstitial%zorl_ocean = huge Interstitial%zt1d = clear_val ! 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 @@ -4429,24 +5091,26 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) ! Print static variables write (0,'(a,3i6)') 'Interstitial_print for mpirank, omprank, blkno: ', mpirank, omprank, blkno write (0,*) 'Interstitial_print: values that do not change' - write (0,*) 'Interstitial%h2o_coeff = ', Interstitial%h2o_coeff - write (0,*) 'sum(Interstitial%h2o_pres) = ', sum(Interstitial%h2o_pres) - write (0,*) 'Interstitial%im = ', Interstitial%im - write (0,*) 'Interstitial%ipr = ', Interstitial%ipr - write (0,*) 'Interstitial%ix = ', Interstitial%ix - write (0,*) 'Interstitial%latidxprnt = ', Interstitial%latidxprnt - write (0,*) 'Interstitial%levi = ', Interstitial%levi - write (0,*) 'Interstitial%levh2o = ', Interstitial%levh2o - write (0,*) 'Interstitial%levozp = ', Interstitial%levozp - write (0,*) 'Interstitial%lm = ', Interstitial%lm - write (0,*) 'Interstitial%lmk = ', Interstitial%lmk - write (0,*) 'Interstitial%lmp = ', Interstitial%lmp - write (0,*) 'Interstitial%nsamftrac = ', Interstitial%nsamftrac - write (0,*) 'Interstitial%ntiwx = ', Interstitial%ntiwx - write (0,*) 'Interstitial%nvdiff = ', Interstitial%nvdiff - write (0,*) 'Interstitial%oz_coeff = ', Interstitial%oz_coeff - write (0,*) 'sum(Interstitial%oz_pres) = ', sum(Interstitial%oz_pres) - write (0,*) 'Interstitial%skip_macro = ', Interstitial%skip_macro + write (0,*) 'Interstitial%h2o_coeff = ', Interstitial%h2o_coeff + write (0,*) 'sum(Interstitial%h2o_pres) = ', sum(Interstitial%h2o_pres) + write (0,*) 'Interstitial%im = ', Interstitial%im + write (0,*) 'Interstitial%ipr = ', Interstitial%ipr + write (0,*) 'Interstitial%ix = ', Interstitial%ix + write (0,*) 'Interstitial%latidxprnt = ', Interstitial%latidxprnt + write (0,*) 'Interstitial%levi = ', Interstitial%levi + write (0,*) 'Interstitial%levh2o = ', Interstitial%levh2o + write (0,*) 'Interstitial%levozp = ', Interstitial%levozp + write (0,*) 'Interstitial%lm = ', Interstitial%lm + write (0,*) 'Interstitial%lmk = ', Interstitial%lmk + write (0,*) 'Interstitial%lmp = ', Interstitial%lmp + write (0,*) 'Interstitial%nsamftrac = ', Interstitial%nsamftrac + write (0,*) 'Interstitial%nsteps_per_reset = ', Interstitial%nsteps_per_reset + write (0,*) 'Interstitial%ntiwx = ', Interstitial%ntiwx + write (0,*) 'Interstitial%nvdiff = ', Interstitial%nvdiff + write (0,*) 'Interstitial%oz_coeff = ', Interstitial%oz_coeff + write (0,*) 'sum(Interstitial%oz_pres) = ', sum(Interstitial%oz_pres) + write (0,*) 'Interstitial%phys_hydrostatic = ', Interstitial%phys_hydrostatic + write (0,*) 'Interstitial%skip_macro = ', Interstitial%skip_macro ! Print all other variables write (0,*) 'Interstitial_print: values that change' write (0,*) 'sum(Interstitial%adjnirbmd ) = ', sum(Interstitial%adjnirbmd ) @@ -4461,8 +5125,17 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%alb1d ) = ', sum(Interstitial%alb1d ) write (0,*) 'sum(Interstitial%bexp1d ) = ', sum(Interstitial%bexp1d ) write (0,*) 'sum(Interstitial%cd ) = ', sum(Interstitial%cd ) + write (0,*) 'sum(Interstitial%cd_ice ) = ', sum(Interstitial%cd_ice ) + write (0,*) 'sum(Interstitial%cd_land ) = ', sum(Interstitial%cd_land ) + write (0,*) 'sum(Interstitial%cd_ocean ) = ', sum(Interstitial%cd_ocean ) write (0,*) 'sum(Interstitial%cdq ) = ', sum(Interstitial%cdq ) + write (0,*) 'sum(Interstitial%cdq_ice ) = ', sum(Interstitial%cdq_ice ) + write (0,*) 'sum(Interstitial%cdq_land ) = ', sum(Interstitial%cdq_land ) + write (0,*) 'sum(Interstitial%cdq_ocean ) = ', sum(Interstitial%cdq_ocean ) write (0,*) 'sum(Interstitial%cf_upi ) = ', sum(Interstitial%cf_upi ) + write (0,*) 'sum(Interstitial%chh_ice ) = ', sum(Interstitial%chh_ice ) + write (0,*) 'sum(Interstitial%chh_land ) = ', sum(Interstitial%chh_land ) + write (0,*) 'sum(Interstitial%chh_ocean ) = ', sum(Interstitial%chh_ocean ) write (0,*) 'sum(Interstitial%clcn ) = ', sum(Interstitial%clcn ) write (0,*) 'sum(Interstitial%cldf ) = ', sum(Interstitial%cldf ) write (0,*) 'sum(Interstitial%cldsa ) = ', sum(Interstitial%cldsa ) @@ -4472,6 +5145,9 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%clw ) = ', sum(Interstitial%clw ) write (0,*) 'sum(Interstitial%clx ) = ', sum(Interstitial%clx ) write (0,*) 'sum(Interstitial%clouds ) = ', sum(Interstitial%clouds ) + write (0,*) 'sum(Interstitial%cmm_ice ) = ', sum(Interstitial%cmm_ice ) + write (0,*) 'sum(Interstitial%cmm_land ) = ', sum(Interstitial%cmm_land ) + write (0,*) 'sum(Interstitial%cmm_ocean ) = ', sum(Interstitial%cmm_ocean ) write (0,*) 'sum(Interstitial%cnv_dqldt ) = ', sum(Interstitial%cnv_dqldt ) write (0,*) 'sum(Interstitial%cnv_fice ) = ', sum(Interstitial%cnv_fice ) write (0,*) 'sum(Interstitial%cnv_mfd ) = ', sum(Interstitial%cnv_mfd ) @@ -4507,16 +5183,34 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%dzlyr ) = ', sum(Interstitial%dzlyr ) write (0,*) 'sum(Interstitial%elvmax ) = ', sum(Interstitial%elvmax ) write (0,*) 'sum(Interstitial%ep1d ) = ', sum(Interstitial%ep1d ) + 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%evap_ice ) = ', sum(Interstitial%evap_ice ) + write (0,*) 'sum(Interstitial%evap_land ) = ', sum(Interstitial%evap_land ) + write (0,*) 'sum(Interstitial%evap_ocean ) = ', sum(Interstitial%evap_ocean ) write (0,*) 'sum(Interstitial%evbs ) = ', sum(Interstitial%evbs ) write (0,*) 'sum(Interstitial%evcw ) = ', sum(Interstitial%evcw ) write (0,*) 'sum(Interstitial%faerlw ) = ', sum(Interstitial%faerlw ) write (0,*) 'sum(Interstitial%faersw ) = ', sum(Interstitial%faersw ) + write (0,*) 'sum(Interstitial%ffhh_ice ) = ', sum(Interstitial%ffhh_ice ) + write (0,*) 'sum(Interstitial%ffhh_land ) = ', sum(Interstitial%ffhh_land ) + write (0,*) 'sum(Interstitial%ffhh_ocean ) = ', sum(Interstitial%ffhh_ocean ) write (0,*) 'sum(Interstitial%fh2 ) = ', sum(Interstitial%fh2 ) + write (0,*) 'sum(Interstitial%fh2_ice ) = ', sum(Interstitial%fh2_ice ) + write (0,*) 'sum(Interstitial%fh2_land ) = ', sum(Interstitial%fh2_land ) + write (0,*) 'sum(Interstitial%fh2_ocean ) = ', sum(Interstitial%fh2_ocean ) write (0,*) 'Interstitial%flag_cice(1) = ', Interstitial%flag_cice(1) write (0,*) 'Interstitial%flag_guess(1) = ', Interstitial%flag_guess(1) write (0,*) 'Interstitial%flag_iter(1) = ', Interstitial%flag_iter(1) + write (0,*) 'sum(Interstitial%ffmm_ice ) = ', sum(Interstitial%ffmm_ice ) + write (0,*) 'sum(Interstitial%ffmm_land ) = ', sum(Interstitial%ffmm_land ) + write (0,*) 'sum(Interstitial%ffmm_ocean ) = ', sum(Interstitial%ffmm_ocean ) write (0,*) 'sum(Interstitial%fm10 ) = ', sum(Interstitial%fm10 ) + write (0,*) 'sum(Interstitial%fm10_ice ) = ', sum(Interstitial%fm10_ice ) + write (0,*) 'sum(Interstitial%fm10_land ) = ', sum(Interstitial%fm10_land ) + write (0,*) 'sum(Interstitial%fm10_ocean ) = ', sum(Interstitial%fm10_ocean ) write (0,*) 'Interstitial%frain = ', Interstitial%frain write (0,*) 'sum(Interstitial%frland ) = ', sum(Interstitial%frland ) write (0,*) 'sum(Interstitial%fscav ) = ', sum(Interstitial%fscav ) @@ -4527,12 +5221,23 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%gamt ) = ', sum(Interstitial%gamt ) write (0,*) 'sum(Interstitial%gasvmr ) = ', sum(Interstitial%gasvmr ) write (0,*) 'sum(Interstitial%gflx ) = ', sum(Interstitial%gflx ) + write (0,*) 'sum(Interstitial%gflx_ice ) = ', sum(Interstitial%gflx_ice ) + write (0,*) 'sum(Interstitial%gflx_land ) = ', sum(Interstitial%gflx_land ) + write (0,*) 'sum(Interstitial%gflx_ocean ) = ', sum(Interstitial%gflx_ocean ) write (0,*) 'sum(Interstitial%gwdcu ) = ', sum(Interstitial%gwdcu ) write (0,*) 'sum(Interstitial%gwdcv ) = ', sum(Interstitial%gwdcv ) write (0,*) 'sum(Interstitial%hflx ) = ', sum(Interstitial%hflx ) + write (0,*) 'sum(Interstitial%hflx_ice ) = ', sum(Interstitial%hflx_ice ) + write (0,*) 'sum(Interstitial%hflx_land ) = ', sum(Interstitial%hflx_land ) + write (0,*) 'sum(Interstitial%hflx_ocean ) = ', sum(Interstitial%hflx_ocean ) write (0,*) 'sum(Interstitial%hprime1 ) = ', sum(Interstitial%hprime1 ) + write (0,*) 'Interstitial%dry(1) ) = ', Interstitial%dry(1) write (0,*) 'sum(Interstitial%idxday ) = ', sum(Interstitial%idxday ) + write (0,*) 'Interstitial%icy(1) = ', Interstitial%icy(1) + write (0,*) 'Interstitial%lake(1) = ', Interstitial%lake(1) + write (0,*) 'Interstitial%ocean(1) = ', Interstitial%ocean(1) write (0,*) 'sum(Interstitial%islmsk ) = ', sum(Interstitial%islmsk ) + write (0,*) 'Interstitial%wet(1) = ', Interstitial%wet(1) write (0,*) 'Interstitial%kb = ', Interstitial%kb write (0,*) 'sum(Interstitial%kbot ) = ', sum(Interstitial%kbot ) write (0,*) 'sum(Interstitial%kcnv ) = ', sum(Interstitial%kcnv ) @@ -4555,12 +5260,18 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%qlcn ) = ', sum(Interstitial%qlcn ) 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 ) write (0,*) 'Interstitial%raddt = ', Interstitial%raddt write (0,*) 'sum(Interstitial%raincd ) = ', sum(Interstitial%raincd ) write (0,*) 'sum(Interstitial%raincs ) = ', sum(Interstitial%raincs ) write (0,*) 'sum(Interstitial%rainmcadj ) = ', sum(Interstitial%rainmcadj ) write (0,*) 'sum(Interstitial%rainp ) = ', sum(Interstitial%rainp ) write (0,*) 'sum(Interstitial%rb ) = ', sum(Interstitial%rb ) + write (0,*) 'sum(Interstitial%rb_ice ) = ', sum(Interstitial%rb_ice ) + write (0,*) 'sum(Interstitial%rb_land ) = ', sum(Interstitial%rb_land ) + write (0,*) 'sum(Interstitial%rb_ocean ) = ', sum(Interstitial%rb_ocean ) write (0,*) 'sum(Interstitial%rhc ) = ', sum(Interstitial%rhc ) write (0,*) 'Interstitial%rhcbot = ', Interstitial%rhcbot write (0,*) 'Interstitial%rhcpbl = ', Interstitial%rhcpbl @@ -4584,25 +5295,46 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%sigmatot ) = ', sum(Interstitial%sigmatot ) write (0,*) 'sum(Interstitial%slopetype ) = ', sum(Interstitial%slopetype ) write (0,*) 'sum(Interstitial%snowc ) = ', sum(Interstitial%snowc ) + write (0,*) 'sum(Interstitial%snowd_ice ) = ', sum(Interstitial%snowd_ice ) + write (0,*) 'sum(Interstitial%snowd_land ) = ', sum(Interstitial%snowd_land ) + write (0,*) 'sum(Interstitial%snowd_ocean ) = ', sum(Interstitial%snowd_ocean ) write (0,*) 'sum(Interstitial%snohf ) = ', sum(Interstitial%snohf ) write (0,*) 'sum(Interstitial%snowmt ) = ', sum(Interstitial%snowmt ) write (0,*) 'sum(Interstitial%soiltype ) = ', sum(Interstitial%soiltype ) write (0,*) 'sum(Interstitial%stress ) = ', sum(Interstitial%stress ) + write (0,*) 'sum(Interstitial%stress_ice ) = ', sum(Interstitial%stress_ice ) + write (0,*) 'sum(Interstitial%stress_land ) = ', sum(Interstitial%stress_land ) + write (0,*) 'sum(Interstitial%stress_ocean) = ', sum(Interstitial%stress_ocean) write (0,*) 'sum(Interstitial%theta ) = ', sum(Interstitial%theta ) + write (0,*) 'sum(Interstitial%tice ) = ', sum(Interstitial%tice ) write (0,*) 'sum(Interstitial%tlvl ) = ', sum(Interstitial%tlvl ) write (0,*) 'sum(Interstitial%tlyr ) = ', sum(Interstitial%tlyr ) + write (0,*) 'sum(Interstitial%tprcp_ice ) = ', sum(Interstitial%tprcp_ice ) + write (0,*) 'sum(Interstitial%tprcp_land ) = ', sum(Interstitial%tprcp_land ) + write (0,*) 'sum(Interstitial%tprcp_ocean ) = ', sum(Interstitial%tprcp_ocean ) write (0,*) 'sum(Interstitial%trans ) = ', sum(Interstitial%trans ) write (0,*) 'sum(Interstitial%tseal ) = ', sum(Interstitial%tseal ) write (0,*) 'sum(Interstitial%tsfa ) = ', sum(Interstitial%tsfa ) + write (0,*) 'sum(Interstitial%tsfc_ice ) = ', sum(Interstitial%tsfc_ice ) + write (0,*) 'sum(Interstitial%tsfc_land ) = ', sum(Interstitial%tsfc_land ) + write (0,*) 'sum(Interstitial%tsfc_ocean ) = ', sum(Interstitial%tsfc_ocean ) write (0,*) 'sum(Interstitial%tsfg ) = ', sum(Interstitial%tsfg ) write (0,*) 'sum(Interstitial%tsurf ) = ', sum(Interstitial%tsurf ) + write (0,*) 'sum(Interstitial%tsurf_ice ) = ', sum(Interstitial%tsurf_ice ) + write (0,*) 'sum(Interstitial%tsurf_land ) = ', sum(Interstitial%tsurf_land ) + write (0,*) 'sum(Interstitial%tsurf_ocean ) = ', sum(Interstitial%tsurf_ocean ) write (0,*) 'sum(Interstitial%ud_mf ) = ', sum(Interstitial%ud_mf ) write (0,*) 'sum(Interstitial%ulwsfc_cice ) = ', sum(Interstitial%ulwsfc_cice ) + write (0,*) 'sum(Interstitial%uustar_ice ) = ', sum(Interstitial%uustar_ice ) + write (0,*) 'sum(Interstitial%uustar_land ) = ', sum(Interstitial%uustar_land ) + write (0,*) 'sum(Interstitial%uustar_ocean) = ', sum(Interstitial%uustar_ocean) write (0,*) 'sum(Interstitial%vdftra ) = ', sum(Interstitial%vdftra ) write (0,*) 'sum(Interstitial%vegf1d ) = ', sum(Interstitial%vegf1d ) write (0,*) 'sum(Interstitial%vegtype ) = ', sum(Interstitial%vegtype ) write (0,*) 'sum(Interstitial%w_upi ) = ', sum(Interstitial%w_upi ) write (0,*) 'sum(Interstitial%wcbmax ) = ', sum(Interstitial%wcbmax ) + write (0,*) 'sum(Interstitial%weasd_ice ) = ', sum(Interstitial%weasd_ice ) + write (0,*) 'sum(Interstitial%weasd_land ) = ', sum(Interstitial%weasd_land ) write (0,*) 'sum(Interstitial%wind ) = ', sum(Interstitial%wind ) write (0,*) 'sum(Interstitial%work1 ) = ', sum(Interstitial%work1 ) write (0,*) 'sum(Interstitial%work2 ) = ', sum(Interstitial%work2 ) @@ -4611,6 +5343,9 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno) write (0,*) 'sum(Interstitial%xlai1d ) = ', sum(Interstitial%xlai1d ) write (0,*) 'sum(Interstitial%xmu ) = ', sum(Interstitial%xmu ) write (0,*) 'sum(Interstitial%z01d ) = ', sum(Interstitial%z01d ) + write (0,*) 'sum(Interstitial%zorl_ice ) = ', sum(Interstitial%zorl_ice ) + write (0,*) 'sum(Interstitial%zorl_land ) = ', sum(Interstitial%zorl_land ) + write (0,*) 'sum(Interstitial%zorl_ocean ) = ', sum(Interstitial%zorl_ocean ) write (0,*) 'sum(Interstitial%zt1d ) = ', sum(Interstitial%zt1d ) ! Print arrays that are conditional on physics choices if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then diff --git a/scm/src/default_namelists.py b/scm/src/default_namelists.py new file mode 100644 index 000000000..c29278933 --- /dev/null +++ b/scm/src/default_namelists.py @@ -0,0 +1,5 @@ +default_physics_namelists = {"SCM_GFS_v15":"input_GFS_v15.nml", + "SCM_GFS_v15plus":"input_GFS_v15plus.nml", + "SCM_CPT_v0":"input_CPT_v0.nml", + "SCM_GSD_v0":"input_GSD_v0.nml", + } \ No newline at end of file diff --git a/scm/src/gmtb_scm.F90 b/scm/src/gmtb_scm.F90 index c63e85e83..0d1c093ff 100644 --- a/scm/src/gmtb_scm.F90 +++ b/scm/src/gmtb_scm.F90 @@ -44,6 +44,7 @@ subroutine gmtb_scm_main_sub() type(ccpp_t), allocatable, target :: cdata(:) integer :: cdata_time_index integer :: ierr + character(len=16) :: logfile_name call get_config_nml(scm_state) @@ -86,8 +87,8 @@ subroutine gmtb_scm_main_sub() scm_state%itt_out = 1 - call physics%create(scm_state%n_cols, scm_state%n_levels, scm_state%lat(:,1), scm_state%pres_l(1,1,:)) - + call physics%create(scm_state%n_cols) + !physics initialization section !set the array index of the time level of the state variables that the cdata @@ -104,14 +105,18 @@ subroutine gmtb_scm_main_sub() do i = 1, scm_state%n_cols !set up each column's physics suite (which may be different) - call ccpp_init( & - trim(adjustl(scm_state%physics_suite_dir))//trim(adjustl(scm_state%physics_suite_name(i)))//'.xml', & - cdata(i), ierr) + call ccpp_init(trim(adjustl(scm_state%physics_suite_name(i))), cdata(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(i)%blk_no = 1 cdata(i)%thrd_no = 1 @@ -131,34 +136,31 @@ subroutine gmtb_scm_main_sub() 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), 1, 1, .false., & - physics%Init_parm(i), & - physics%n_ozone_lats, physics%n_ozone_layers, physics%n_ozone_times, & - physics%n_ozone_coefficients, physics%ozone_lat, physics%ozone_pres, & - physics%ozone_time, physics%ozone_forcing_in, & - physics%n_h2o_lats, physics%n_h2o_layers, physics%n_h2o_times, & - physics%n_h2o_coefficients, physics%h2o_lat, physics%h2o_pres, & - physics%h2o_time, physics%h2o_forcing_in) - + physics%Diag(i), physics%Interstitial(i), 0, 1, 1, & + physics%Init_parm(i)) + call physics%associate(scm_state, i) - + ! use ccpp_fields.inc to call ccpp_field_add for all variables to add ! (this is auto-generated from ccpp/scripts/ccpp_prebuild.py, ! the script parses tables in gmtb_scm_type_defs.f90) #include "ccpp_fields.inc" - - !initialize easch column's physics + + !initialize each column's physics call ccpp_physics_init(cdata(i), ierr=ierr) if (ierr/=0) then write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_init for column ', i, '. Exiting...' stop end if - + physics%Model(i)%first_time_step = .true. end do diff --git a/scm/src/gmtb_scm_input.f90 b/scm/src/gmtb_scm_input.f90 index bf835b2b4..90effbdeb 100644 --- a/scm/src/gmtb_scm_input.f90 +++ b/scm/src/gmtb_scm_input.f90 @@ -31,10 +31,10 @@ subroutine get_config_nml(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 - 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 - integer :: n_levels !< number of model levels (currently only 64 supported) + 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 + integer :: n_levels !< number of model levels (currently only 64 supported) integer :: n_columns !< number of columns to use integer :: n_time_levels integer :: time_scheme !< 1 => forward Euler, 2 => filtered leapfrog @@ -42,41 +42,33 @@ subroutine get_config_nml(scm_state) 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=80) :: case_config_dir !< path to the directory containing case configuration files (relative to build dir) 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" - real(kind=dp) :: relax_time !< relaxation time scale (s) + real(kind=dp) :: relax_time !< relaxation time scale (s) logical :: sfc_flux_spec !< flag for using specified surface fluxes instead of calling a surface scheme real(kind=dp) :: sfc_roughness_length_cm !< surface roughness length used for calculating surface layer parameters from specified fluxes integer :: sfc_type !< 0: sea surface, 1: land surface, 2: sea-ice surface integer :: reference_profile_choice !< 1: McClatchey profile, 2: mid-latitude summer standard atmosphere 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=65), allocatable :: physics_nml(:) - character(len=80) :: physics_suite_dir !< location of the physics suite XML files for the IPD (relative to the executable path) - real(kind=dp), allocatable :: column_area(:) - !integer, allocatable :: n_phy_fields(:) !< number of fields in the data type sent through the IPD + character(len=80), allocatable :: physics_suite(:) !< name of the physics suite name (currently only GFS_operational supported) + character(len=65), allocatable :: physics_nml(:) + + integer :: ioerror - integer :: i, last_physics_specified - integer :: ioerror(5) - - INTEGER, PARAMETER :: buflen = 255 - CHARACTER(LEN=buflen) :: buf, opt_namelist_vals - CHARACTER(1) :: response + CHARACTER(LEN=*), parameter :: experiment_namelist = 'input_experiment.nml' NAMELIST /case_config/ model_name, n_columns, case_name, dt, time_scheme, runtime, output_frequency, & n_levels, output_dir, output_file, case_data_dir, vert_coord_data_dir, thermo_forcing_type, mom_forcing_type, relax_time, & - sfc_type, sfc_flux_spec, sfc_roughness_length_cm, reference_profile_choice, year, month, day, hour - - NAMELIST /physics_config/ physics_suite, physics_suite_dir, physics_nml, column_area + sfc_type, sfc_flux_spec, sfc_roughness_length_cm, reference_profile_choice, year, month, day, hour, column_area + + NAMELIST /physics_config/ physics_suite, physics_nml !> \section get_config_alg Algorithm !! @{ - !> Define default values for case configuration (to be overridden by external namelist file or command line arguments) - case_config_dir = '../etc/case_config' - + !> Define default values for experiment configuration (to be overridden by external namelist file or command line arguments) model_name = 'GFS' n_columns = 1 case_name = 'twpice' @@ -101,161 +93,37 @@ subroutine get_config_nml(scm_state) day = 19 hour = 3 - physics_suite_dir = '../../ccpp/suites/' - - last_physics_specified = -1 - - !> Parse the command line arguments. - opt_namelist_vals = '' - - !> - Get the entire command used to invoke the SCM (including arguments) - CALL GET_COMMAND(command=buf, status=ioerror(1)) - - if (ioerror(1) /= 0) then - write(*,*) 'An error was encountered reading the command line: error code: ' + open(unit=10, file=experiment_namelist, status='old', action='read', iostat=ioerror) + if(ioerror /= 0) then + write(*,'(a,i0)') 'There was an error opening the file ' // experiment_namelist // & + '; error code = ', ioerror + STOP else - !> - Discard SCM invocation command. - i = INDEX(buf, ' ') !gets position of first space - buf = trim(adjustl(buf(i+1:))) !discards invoking command from buf - - !> - Get experiment name from first argument (if not present, use default values in this source file) - i = INDEX(buf, ' ') !gets position of second space (if present) - experiment_name = trim(adjustl(buf(:i))) - buf = trim(adjustl(buf(i+1:))) !discards experiment name from buf - - !> - Put remaining command line arguments into "internal" namelist to read in after the external file. - opt_namelist_vals = '&case_config '//trim(buf)//' /' !assigns rest of command line into case_config namelist - - !> Attempt to read in external namelist file. - open(unit=1, file=trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml', status='old', action='read', & - iostat=ioerror(2)) - if(ioerror(2) /= 0) then - write(*,*) 'There was an error opening the file '//trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml '//'& - Error code = ',ioerror(2) - else - read(1, NML=case_config, iostat=ioerror(3)) - end if - - if(ioerror(3) /= 0) then - write(*,*) 'There was an error reading the namelist case_config in the file '& - //trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml'//'& - Error code = ',ioerror(3) - end if - - !The current implementation of GFS physics does not support more than one column, since radiation sub schemes use - !internal module variables. This means that one cannot specify different ways to treat O3, CO2 etc., and also that - !the code crashes in GFS_initialize_scm_run and later in radiation_gases.f, because it tries to allocate module - !variables that are already allocated. For now, throw an error and abort. - if (n_columns>1) then - write(*,*) '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), column_area(n_columns)) - - do i=1, n_columns - physics_suite(i) = 'none' - end do - - if(ioerror(2) == 0) then - read(1, NML=physics_config, iostat=ioerror(4)) - end if - close(1) - - if(ioerror(4) /= 0) then - write(*,*) 'There was an error reading the namelist physics_config in the file '& - //trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml'//'& - Error code = ',ioerror(4) - write(*,*) 'Check to make sure that the number of specified physics suites is not greater than n_columns '& - //'in the case_config namelist. Stopping...' - STOP - else - !check to see if the number of physics_suite_names matches n_cols; if physics_suite_names is less than n_cols, assume that there are multiple columns using the same physics - do i=1, n_columns - if (physics_suite(i) == 'none') then - if(i == 1 ) then - write(*,*) 'No physics suites were specified in '//trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml. '& - //'Please edit this file and start again.' - STOP - else - if(last_physics_specified < 0) last_physics_specified = i-1 - !only ask for response the first time an unspecified physics suite is found for a column - if(last_physics_specified == i-1) then - write(*,*) 'Too few physics suites were specified for the number of columns in '& - //trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml. All columns with unspecified physics are set '& - //'to the last specified suite. Is this the desired behavior (y/n)?' - read(*,*) response - end if - if (response == 'y' .or. response == 'Y') then - physics_suite(i) = physics_suite(last_physics_specified) - physics_nml(i) = physics_nml(last_physics_specified) - !n_phy_fields(i) = n_phy_fields(last_physics_specified) - else - write(*,*) 'Please edit '//trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml to contain the same '& - //' number of physics suites as columns and start again. Stopping...' - STOP - end if - end if !check on i - ! else - ! !check to see if n_phy_fields was initialized for this suites - ! if (n_phy_fields(i) < 0) then - ! write(*,*) 'The variable n_phy_fields was not initialized for the physics suite '//trim(physics_suite(i))//'. Please '& - ! //'edit '//trim(adjustl(case_config_dir))//'/''//trim(experiment_name)//'.nml to contain values of this variable '& - ! //'for each suite.' - ! end if - end if !check on physics_suite - end do - end if - - if(ioerror(2) /= 0 .or. ioerror(3) /=0 .or. ioerror(4) /=0) then - write(*,*) 'Since there was an error reading in the '//trim(adjustl(case_config_dir))//'/'//trim(experiment_name)//'.nml'& - //' file, the default values of the namelist variables will be used, modified by any values contained on the command line.' - end if - - !> "Read" in internal namelist variables from command line. - write(*,*) 'Loading optional namelist variables from command line...' - read(opt_namelist_vals, NML=case_config, IOSTAT=ioerror(5)) - - !> Check for namelist reading errors. If errors are found, output the namelist variables that were loaded to console and ask user for input on whether to proceed. - if(ioerror(5) /= 0) then - write(*,*) 'There was an error reading the optional namelist variables from the command line: error code ',ioerror(5) - end if - if(ioerror(2) /= 0 .or. ioerror(3) /=0 .or. ioerror(4) /= 0 .or. ioerror(5) /= 0) then - write(*,*) 'Since there was an error either reading the namelist file or an error reading namelist variables from the & - command line, the namelist variables that are available to use are some combination of the default values and the values & - that were able to be read. Please look over the namelist variables below to make sure they are set as intended.' - write(*,NML=case_config) - write(*,*) 'Continue with these values? (y/n):' - read(*,*) response - - if (response /= 'y' .and. response /= 'Y') THEN - write(*,*) 'Stopping...' - stop - end if - end if + read(10, NML=case_config, iostat=ioerror) + end if + + if(ioerror /= 0) then + write(*,'(a,i0)') 'There was an error reading the namelist case_config in the file '& + // experiment_namelist // '; error code = ',ioerror + STOP end if - !> If there was an error reading from the command line, use the default values of the namelist variables and check with the user whether to continue. - if(ioerror(1) /= 0) then - write(*,*) 'There was an error reading from the command line: error code ',ioerror(1) - write(*,NML=case_config) - write(*,*) 'Continue with default values? (y/n):' - read(*,*) response - - if (response /= 'y' .and. response /= 'Y') THEN - write(*,*) 'Stopping...' - stop - end if + !The current implementation of GFS physics does not support more than one column, since radiation sub schemes use + !internal module variables. This means that one cannot specify different ways to treat O3, CO2 etc., and also that + !the code crashes in GFS_initialize_scm_run and later in radiation_gases.f, because it tries to allocate module + !variables that are already allocated. For now, throw an error and abort. + if (n_columns>1) then + write(*,'(a)') 'The current implementation does not allow to run more than one column at a time.' + STOP end if - !> Write the case_config namelist variables to an output file in the output directory for inspection or re-use. - CALL SYSTEM('mkdir -p '//TRIM(output_dir)) - open(unit=1, file=trim(output_dir)//'/'//trim(experiment_name)//'.nml', status='replace', action='write', iostat=ioerror(1)) - write(1,NML=case_config) - close(1) + !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(10, NML=physics_config, iostat=ioerror) + close(10) select case(time_scheme) case(1) @@ -267,11 +135,10 @@ subroutine get_config_nml(scm_state) end select call scm_state%create(n_columns, n_levels, n_time_levels) - + scm_state%experiment_name = experiment_name scm_state%model_name = model_name scm_state%output_dir = output_dir - scm_state%physics_suite_dir = physics_suite_dir scm_state%case_data_dir = case_data_dir scm_state%vert_coord_data_dir = vert_coord_data_dir scm_state%output_file = output_file @@ -300,7 +167,7 @@ subroutine get_config_nml(scm_state) scm_state%sfc_type_real = DBLE(sfc_type) scm_state%reference_profile_choice = reference_profile_choice scm_state%relax_time = relax_time - + !> @} end subroutine get_config_nml diff --git a/scm/src/gmtb_scm_output.f90 b/scm/src/gmtb_scm_output.f90 index 28ec531ed..f519b1100 100644 --- a/scm/src/gmtb_scm_output.f90 +++ b/scm/src/gmtb_scm_output.f90 @@ -26,8 +26,6 @@ subroutine output_init(scm_state) INTEGER :: ncid, time_id, hor_dim_id, vert_dim_id, vert_dim_i_id, dummy_id, year_id, month_id, day_id, hour_id !> \section output_init_alg Algorithm !! @{ - !> - Create the output directory if necessary using a system call. - CALL SYSTEM('mkdir -p '//TRIM(scm_state%output_dir)) !> - Create the output file in the output directory. CALL CHECK(NF90_CREATE(PATH=TRIM(scm_state%output_dir)//"/"//TRIM(scm_state%output_file)//".nc",CMODE=NF90_CLOBBER,NCID=ncid)) diff --git a/scm/src/gmtb_scm_physical_constants.f90 b/scm/src/gmtb_scm_physical_constants.f90 index b2385f539..743edb3fa 100644 --- a/scm/src/gmtb_scm_physical_constants.f90 +++ b/scm/src/gmtb_scm_physical_constants.f90 @@ -24,6 +24,12 @@ module gmtb_scm_physical_constants !! | con_t0c | temperature_at_zero_celsius | temperature at 0 degrees Celsius | K | 0 | real | kind_phys | none | F | !! | con_ttp | triple_point_temperature_of_water | triple point temperature of water | K | 0 | real | kind_phys | none | F | !! | con_vonKarman | vonKarman_constant | vonKarman constant | none | 0 | real | kind_phys | none | F | +!! | cimin | minimum_sea_ice_concentration | minimum sea ice concentration | frac | 0 | real | kind_phys | none | F | +!! | rlapse | air_temperature_lapse_rate_constant | environmental air temperature lapse rate constant | K m-1 | 0 | real | kind_phys | none | F | +!! | con_jcal | joules_per_calorie_constant | joules per calorie constant | J cal-1 | 0 | real | kind_phys | none | F | +!! | con_rhw0 | sea_water_reference_density | sea water reference density | kg m-3 | 0 | real | kind_phys | none | F | +!! | con_sbc | steffan_boltzmann_constant | Steffan-Boltzmann constant | W m-2 K-4 | 0 | real | kind_phys | none | F | +!! | con_tice | freezing_point_temperature_of_seawater | freezing point temperature of seawater | K | 0 | real | kind_phys | none | F | !! real(kind=dp),parameter:: con_pi =3.1415926535897931 @@ -47,5 +53,12 @@ module gmtb_scm_physical_constants real(kind=dp),parameter:: con_epsm1 =con_rd/con_rv-1. real(kind=dp),parameter:: con_vonKarman = 0.4 + + real(kind=dp),parameter:: cimin =0.15 + real(kind=dp),parameter:: rlapse =0.65e-2 + real(kind=dp),parameter:: con_jcal =4.1855E+0 + real(kind=dp),parameter:: con_rhw0 =1022.0 + real(kind=dp),parameter:: con_sbc =5.670400e-8 + real(kind=dp),parameter:: con_tice =2.7120e+2 end module gmtb_scm_physical_constants diff --git a/scm/src/gmtb_scm_setup.f90 b/scm/src/gmtb_scm_setup.f90 index 5a590780d..c68de5557 100644 --- a/scm/src/gmtb_scm_setup.f90 +++ b/scm/src/gmtb_scm_setup.f90 @@ -217,15 +217,8 @@ end subroutine patch_in_ref !-------------- subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, & Coupling, Grid, Tbd, Cldprop, Radtend, Diag, & - Interstitial, communicator, ntasks, restart, & - Init_parm, & - n_ozone_lats, n_ozone_layers, n_ozone_times, & - n_ozone_coefficients, & - ozone_lat_in, ozone_pres_in, ozone_time_in, & - ozone_forcing_in, & - n_h2o_lats, n_h2o_layers, n_h2o_times, & - n_h2o_coefficients, h2o_lat_in, h2o_pres_in, & - h2o_time_in, h2o_forcing_in) + Interstitial, communicator, ntasks, nthreads, & + Init_parm) use machine, only: kind_phys use GFS_typedefs, only: GFS_init_type, & @@ -236,11 +229,9 @@ subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, GFS_radtend_type, GFS_diag_type, & GFS_interstitial_type use funcphys, only: gfuncphys - use cldwat2m_micro, only: ini_micro - use aer_cloud, only: aer_cloud_init + !use cldwat2m_micro, only: ini_micro + !use aer_cloud, only: aer_cloud_init use module_ras, only: ras_init - use ozne_def, only: latsozp, levozp, timeoz, oz_coeff, oz_lat, oz_pres, oz_time, ozplin - use h2o_def, only: latsh2o, levh2o, timeh2o, h2o_coeff, h2o_lat, h2o_pres, h2o_time, h2oplin !--- interface variables type(GFS_control_type), intent(inout) :: Model @@ -257,15 +248,8 @@ subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, type(GFS_init_type), intent(in) :: Init_parm integer, intent(in) :: communicator - integer, intent(in) :: ntasks - logical, intent(in) :: restart - - integer, intent(in) :: n_ozone_lats, n_ozone_layers, n_ozone_coefficients, n_ozone_times - real(kind=kind_phys), intent(in) :: ozone_lat_in(:), ozone_pres_in(:), ozone_time_in(:), ozone_forcing_in(:,:,:,:) - - integer, intent(in) :: n_h2o_lats, n_h2o_layers, n_h2o_coefficients, n_h2o_times - real(kind=kind_phys), intent(in) :: h2o_lat_in(:), h2o_pres_in(:), h2o_time_in(:), h2o_forcing_in(:,:,:,:) - + integer, intent(in) :: ntasks, nthreads + !--- set control properties (including namelist read) call Model%init (Init_parm%nlunit, Init_parm%fn_nml, & Init_parm%me, Init_parm%master, & @@ -276,54 +260,10 @@ subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, Init_parm%dt_dycore, Init_parm%dt_phys, & Init_parm%bdat, Init_parm%cdat, & Init_parm%tracer_names, & - Init_parm%input_nml_file, Init_parm%ak, & - Init_parm%bk, Init_parm%blksz, restart, & - communicator, ntasks) - - ! DH* TODO: clean up this part, the allocation and assignment - ! of ozone and h2o data does not belong here !*DH - - !GJF* temporary fix for running with oz_phys_2015 - if(Model%oz_phys) then - oz_coeff = 4 - else if (Model%oz_phys_2015) then - oz_coeff = 6 - else - oz_coeff = 4 - end if - !*GJF - - !--- allocate memory for the variables stored in ozne_def and set them - allocate(oz_lat(n_ozone_lats), oz_pres(n_ozone_layers), oz_time(n_ozone_times+1)) - !GJF* temporary fix for running with oz_phys_2015 - allocate(ozplin(n_ozone_lats, n_ozone_layers, oz_coeff, n_ozone_times)) - !allocate(ozplin(n_ozone_lats, n_ozone_layers, n_ozone_coefficients, n_ozone_times)) - !*GJF - latsozp = n_ozone_lats - levozp = n_ozone_layers - timeoz = n_ozone_times - !GJF* temporary fix for running with oz_phys_2015 - !oz_coeff = n_ozone_coefficients - !*GJF - oz_lat = ozone_lat_in - oz_pres = ozone_pres_in - oz_time = ozone_time_in - !GJF* temporary fix for running with oz_phys_2015 - ozplin = 0.0 - !ozplin = ozone_forcing_in - !*GJF - - !--- allocate memory for the variables stored in h2o_def and set them - allocate(h2o_lat(n_h2o_lats), h2o_pres(n_h2o_layers), h2o_time(n_h2o_times+1)) - allocate(h2oplin(n_h2o_lats, n_h2o_layers, n_h2o_coefficients, n_h2o_times)) - latsh2o = n_h2o_lats - levh2o = n_h2o_layers - timeh2o = n_h2o_times - h2o_coeff = n_h2o_coefficients - h2o_lat = h2o_lat_in - h2o_pres = h2o_pres_in - h2o_time = h2o_time_in - h2oplin = h2o_forcing_in + Init_parm%input_nml_file, Init_parm%tile_num, & + Init_parm%ak, Init_parm%bk, Init_parm%blksz, & + Init_parm%restart, Init_parm%hydrostatic, & + communicator, ntasks, nthreads) !--- initialize DDTs call Statein%create(1, Model) @@ -357,7 +297,14 @@ subroutine GFS_suite_setup (Model, Statein, Stateout, Sfcprop, stop !--- NEED TO get the logic from the old phys/gloopb.f initialization area endif - + + if(Model%do_ca)then + print *,'Cellular automata cannot be used when CCPP is turned on until' + print *,'the stochastic physics pattern generation code has been pulled' + print *,'out of the FV3 repository and updated with the CCPP version.' + stop + endif + !--- sncovr may not exist in ICs from chgres. !--- FV3GFS handles this as part of the IC ingest !--- this not is placed here to alert users to the need to study diff --git a/scm/src/gmtb_scm_type_defs.f90 b/scm/src/gmtb_scm_type_defs.f90 index c00f4c1d9..938ba91b5 100644 --- a/scm/src/gmtb_scm_type_defs.f90 +++ b/scm/src/gmtb_scm_type_defs.f90 @@ -27,7 +27,6 @@ module gmtb_scm_type_defs character(len=character_length) :: experiment_name !> name of model configuration file character(len=character_length) :: model_name !< name of "host" model (must be "GFS" for prototype) character(len=character_length) :: output_dir !< name of output directory to place netCDF file - character(len=character_length) :: physics_suite_dir !< location of the physics suite XML files for the IPD (relative to the executable path) character(len=character_length) :: case_data_dir !< location of the case initialization and forcing data files (relative to the executable path) 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) @@ -202,7 +201,16 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%alb1d | surface_albedo_perturbation | surface albedo perturbation | frac | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%bexp1d | perturbation_of_soil_type_b_parameter | perturbation of soil type "b" parameter | frac | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%cd | surface_drag_coefficient_for_momentum_in_air | surface exchange coeff for momentum | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cd_ocean | surface_drag_coefficient_for_momentum_in_air_over_ocean | surface exchange coeff for momentum over ocean | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cd_land | surface_drag_coefficient_for_momentum_in_air_over_land | surface exchange coeff for momentum over land | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cd_ice | surface_drag_coefficient_for_momentum_in_air_over_ice | surface exchange coeff for momentum over ice | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%cdq | surface_drag_coefficient_for_heat_and_moisture_in_air | surface exchange coeff heat & moisture | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cdq_ocean | surface_drag_coefficient_for_heat_and_moisture_in_air_over_ocean | surface exchange coeff heat & moisture over ocean | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cdq_land | surface_drag_coefficient_for_heat_and_moisture_in_air_over_land | surface exchange coeff heat & moisture over land | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cdq_ice | surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice | surface exchange coeff heat & moisture over ice | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%chh_ocean | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ocean | thermal exchange coefficient over ocean | kg m-2 s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%chh_land | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land | thermal exchange coefficient over land | kg m-2 s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%chh_ice | surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice | thermal exchange coefficient over ice | kg m-2 s-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%cf_upi | convective_cloud_fraction_for_microphysics | convective cloud fraction for microphysics | frac | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%clcn | convective_cloud_volume_fraction | convective cloud volume fraction | frac | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%cldf | cloud_area_fraction | fraction of grid box area in which updrafts occur | frac | 1 | real | kind_phys | none | F | @@ -225,6 +233,9 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%clw(:,:,2) | cloud_condensed_water_mixing_ratio_convective_transport_tracer | moist (dry+vapor, no condensates) mixing ratio of cloud water (condensate) in the convectively transported tracer array | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%clw(:,:,physics%Interstitial(i)%ntk) | turbulent_kinetic_energy_convective_transport_tracer | turbulent kinetic energy in the convectively transported tracer array | m2 s-2 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%clx | fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height | frac. of grid box with by subgrid orography higher than critical height | frac | 2 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cmm_ocean | surface_drag_wind_speed_for_momentum_in_air_over_ocean | momentum exchange coefficient over ocean | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cmm_land | surface_drag_wind_speed_for_momentum_in_air_over_land | momentum exchange coefficient over land | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%cmm_ice | surface_drag_wind_speed_for_momentum_in_air_over_ice | momentum exchange coefficient over ice | m s-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%cnv_dqldt | tendency_of_cloud_water_due_to_convective_microphysics | tendency of cloud water due to convective microphysics | kg m-2 s-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%cnv_fice | ice_fraction_in_convective_tower | ice fraction in convective tower | frac | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%cnv_mfd | detrained_mass_flux | detrained mass flux | kg m-2 s-1 | 2 | real | kind_phys | none | F | @@ -272,7 +283,13 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%dzlyr | layer_thickness_for_radiation | layer thickness on radiation levels | km | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%elvmax | maximum_subgrid_orography | maximum of subgrid orography | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%ep1d | surface_upward_potential_latent_heat_flux | surface upward potential latent heat flux | W m-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ep1d_ocean | surface_upward_potential_latent_heat_flux_over_ocean | surface upward potential latent heat flux over ocean | W m-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ep1d_land | surface_upward_potential_latent_heat_flux_over_land | surface upward potential latent heat flux over land | W m-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ep1d_ice | surface_upward_potential_latent_heat_flux_over_ice | surface upward potential latent heat flux over ice | W m-2 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%evap | kinematic_surface_upward_latent_heat_flux | kinematic surface upward latent heat flux | kg kg-1 m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%evap_ocean | kinematic_surface_upward_latent_heat_flux_over_ocean | kinematic surface upward latent heat flux over ocean | kg kg-1 m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%evap_land | kinematic_surface_upward_latent_heat_flux_over_land | kinematic surface upward latent heat flux over land | kg kg-1 m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%evap_ice | kinematic_surface_upward_latent_heat_flux_over_ice | kinematic surface upward latent heat flux over ice | kg kg-1 m s-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%evbs | soil_upward_latent_heat_flux | soil upward latent heat flux | W m-2 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%evcw | canopy_upward_latent_heat_flux | canopy upward latent heat flux | W m-2 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%faerlw | aerosol_optical_properties_for_longwave_bands_01-16 | aerosol optical properties for longwave bands 01-16 | various | 4 | real | kind_phys | none | F | @@ -283,13 +300,25 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%faersw(:,:,:,1) | aerosol_optical_depth_for_shortwave_bands_01-16 | aerosol optical depth for shortwave bands 01-16 | none | 3 | real | kind_phys | none | F | !! | physics%Interstitial(i)%faersw(:,:,:,2) | aerosol_single_scattering_albedo_for_shortwave_bands_01-16 | aerosol single scattering albedo for shortwave bands 01-16 | frac | 3 | real | kind_phys | none | F | !! | physics%Interstitial(i)%faersw(:,:,:,3) | aerosol_asymmetry_parameter_for_shortwave_bands_01-16 | aerosol asymmetry parameter for shortwave bands 01-16 | none | 3 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ffhh_ocean | Monin-Obukhov_similarity_function_for_heat_over_ocean | Monin-Obukhov similarity function for heat over ocean | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ffhh_land | Monin-Obukhov_similarity_function_for_heat_over_land | Monin-Obukhov similarity function for heat over land | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ffhh_ice | Monin-Obukhov_similarity_function_for_heat_over_ice | Monin-Obukhov similarity function for heat over ice | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%fh2 | Monin-Obukhov_similarity_function_for_heat_at_2m | Monin-Obukhov similarity parameter for heat at 2m | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%fh2_ocean | Monin-Obukhov_similarity_function_for_heat_at_2m_over_ocean | Monin-Obukhov similarity parameter for heat at 2m over ocean | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%fh2_land | Monin-Obukhov_similarity_function_for_heat_at_2m_over_land | Monin-Obukhov similarity parameter for heat at 2m over land | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%fh2_ice | Monin-Obukhov_similarity_function_for_heat_at_2m_over_ice | Monin-Obukhov similarity parameter for heat at 2m over ice | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%flag_cice | flag_for_cice | flag for cice | flag | 1 | logical | | none | F | !! | physics%Interstitial(i)%flag_guess | flag_for_guess_run | flag for guess run | flag | 1 | logical | | none | F | !! | physics%Interstitial(i)%flag_iter | flag_for_iteration | flag for iteration | flag | 1 | logical | | none | F | +!! | physics%Interstitial(i)%ffmm_ocean | Monin-Obukhov_similarity_function_for_momentum_over_ocean | Monin-Obukhov similarity function for momentum over ocean | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ffmm_land | Monin-Obukhov_similarity_function_for_momentum_over_land | Monin-Obukhov similarity function for momentum over land | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%ffmm_ice | Monin-Obukhov_similarity_function_for_momentum_over_ice | Monin-Obukhov similarity function for momentum over ice | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%fm10 | Monin-Obukhov_similarity_function_for_momentum_at_10m | Monin-Obukhov similarity parameter for momentum at 10m | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%fm10_ocean | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_ocean | Monin-Obukhov similarity parameter for momentum at 10m over ocean | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%fm10_land | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_land | Monin-Obukhov similarity parameter for momentum at 10m over land | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%fm10_ice | Monin-Obukhov_similarity_function_for_momentum_at_10m_over_ice | Monin-Obukhov similarity parameter for momentum at 10m over ice | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%frain | dynamics_to_physics_timestep_ratio | ratio of dynamics timestep to physics timestep | none | 0 | real | kind_phys | none | F | -!! | physics%Interstitial(i)%frland | land_area_fraction | land area fraction | frac | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%frland | land_area_fraction_for_microphysics | land area fraction used in microphysics schemes | frac | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%fscav | fraction_of_tracer_scavenged | fraction of the tracer (aerosols) that is scavenged by convection | km-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%fswtr | fraction_of_cloud_top_water_scavenged | fraction of the tracer (cloud top water) that is scavenged by convection | km-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%gabsbdlw | surface_downwelling_longwave_flux_absorbed_by_ground | total sky surface downward longwave flux absorbed by the ground | W m-2 | 1 | real | kind_phys | none | F | @@ -308,18 +337,29 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%gasvmr(:,:,9) | volume_mixing_ratio_ccl4 | volume mixing ratio ccl4 | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%gasvmr(:,:,10) | volume_mixing_ratio_cfc113 | volume mixing ratio cfc113 | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%gflx | upward_heat_flux_in_soil | soil heat flux | W m-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%gflx_ocean | upward_heat_flux_in_soil_over_ocean | soil heat flux over ocean | W m-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%gflx_land | upward_heat_flux_in_soil_over_land | soil heat flux over land | W m-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%gflx_ice | upward_heat_flux_in_soil_over_ice | soil heat flux over ice | W m-2 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%graupelmp | lwe_thickness_of_graupel_amount | explicit graupel fall on physics timestep | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%gwdcu | tendency_of_x_wind_due_to_convective_gravity_wave_drag | zonal wind tendency due to convective gravity wave drag | m s-2 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%gwdcv | tendency_of_y_wind_due_to_convective_gravity_wave_drag | meridional wind tendency due to convective gravity wave drag | m s-2 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%h2o_coeff | number_of_coefficients_in_h2o_forcing_data | number of coefficients in h2o forcing data | index | 0 | integer | | none | F | !! | physics%Interstitial(i)%h2o_pres | natural_log_of_h2o_forcing_data_pressure_levels | natural log of h2o forcing data pressure levels | log(Pa) | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%hflx | kinematic_surface_upward_sensible_heat_flux | kinematic surface upward sensible heat flux | K m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%hflx_ocean | kinematic_surface_upward_sensible_heat_flux_over_ocean | kinematic surface upward sensible heat flux over ocean | K m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%hflx_land | kinematic_surface_upward_sensible_heat_flux_over_land | kinematic surface upward sensible heat flux over land | K m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%hflx_ice | kinematic_surface_upward_sensible_heat_flux_over_ice | kinematic surface upward sensible heat flux over ice | K m s-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%hprime1 | standard_deviation_of_subgrid_orography | standard deviation of subgrid orography | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%icemp | lwe_thickness_of_ice_amount | explicit ice fall on physics timestep | m | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%dry | flag_nonzero_land_surface_fraction | flag indicating presence of some land surface area fraction | flag | 1 | logical | | none | F | !! | physics%Interstitial(i)%idxday | daytime_points | daytime points | index | 1 | integer | | none | F | +!! | physics%Interstitial(i)%icy | flag_nonzero_sea_ice_surface_fraction | flag indicating presence of some sea ice surface area fraction | flag | 1 | logical | | none | F | +!! | physics%Interstitial(i)%lake | flag_nonzero_lake_surface_fraction | flag indicating presence of some lake surface area fraction | flag | 1 | logical | | none | F | !! | physics%Interstitial(i)%im | horizontal_loop_extent | horizontal loop extent | count | 0 | integer | | none | F | +!! | physics%Interstitial(i)%ocean | flag_nonzero_ocean_surface_fraction | flag indicating presence of some ocean surface area fraction | flag | 1 | logical | | none | F | !! | physics%Interstitial(i)%ipr | horizontal_index_of_printed_column | horizontal index of printed column | index | 0 | integer | | none | F | !! | physics%Interstitial(i)%islmsk | sea_land_ice_mask | sea/land/ice mask (=0/1/2) | flag | 1 | integer | | none | F | +!! | physics%Interstitial(i)%wet | flag_nonzero_wet_surface_fraction | flag indicating presence of some ocean or lake surface area fraction | flag | 1 | logical | | none | F | !! | physics%Interstitial(i)%ix | horizontal_dimension | horizontal dimension | count | 0 | integer | | none | F | !! | physics%Interstitial(i)%kb | vertical_index_difference_between_layer_and_lower_bound | vertical index difference between layer and lower bound | index | 0 | integer | | none | F | !! | physics%Interstitial(i)%kbot | vertical_index_at_cloud_base | vertical index at cloud base | index | 1 | integer | | none | F | @@ -344,6 +384,7 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%ncpl | local_condesed_water_number_concentration | number concentration of condensed water local to physics | kg-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%ncpr | local_rain_number_concentration | number concentration of rain local to physics | kg-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%ncps | local_snow_number_concentration | number concentration of snow local to physics | kg-1 | 2 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%nsteps_per_reset | number_of_time_steps_per_maximum_hourly_time_interval | number_of_time_steps_per_maximum_hourly_time_interval | count | 0 | integer | | none | F | !! | physics%Interstitial(i)%ntiwx | index_for_ice_cloud_condensate_vertical_diffusion_tracer | index for ice cloud condensate n the vertically diffused tracer array | index | 0 | integer | | none | F | !! | physics%Interstitial(i)%ncstrac | number_of_tracers_for_CS | number of convectively transported tracers in Chikira-Sugiyama deep conv. scheme | count | 0 | integer | | none | F | !! | physics%Interstitial(i)%nday | daytime_points_dimension | daytime points dimension | count | 0 | integer | | none | F | @@ -359,6 +400,7 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%otspt | flag_convective_tracer_transport | flag to enable tracer transport by updrafts/downdrafts[(:,1)] or subsidence [(:,2)] | flag | 2 | logical | | none | F | !! | physics%Interstitial(i)%oz_coeff | number_of_coefficients_in_ozone_forcing_data | number of coefficients in ozone forcing data | index | 0 | integer | | none | F | !! | physics%Interstitial(i)%oz_pres | natural_log_of_ozone_forcing_data_pressure_levels | natural log of ozone forcing data pressure levels | log(Pa) | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%phys_hydrostatic | flag_for_hydrostatic_heating_from_physics | flag for use of hydrostatic heating in physics | flag | 0 | logical | | none | F | !! | physics%Interstitial(i)%plvl | air_pressure_at_interface_for_radiation_in_hPa | air pressure at vertical interface for radiation calculation | hPa | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%plyr | air_pressure_at_layer_for_radiation_in_hPa | air pressure at vertical layer for radiation calculation | hPa | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%prnum | prandtl_number | turbulent Prandtl number | none | 2 | real | kind_phys | none | F | @@ -370,6 +412,9 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%qsnw | local_snow_water_mixing_ratio | moist (dry+vapor, no condensates) mixing ratio of snow water local to physics | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%prcpmp | lwe_thickness_of_explicit_precipitation_amount | explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%qss | surface_specific_humidity | surface air saturation specific humidity | kg kg-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%qss_ocean | surface_specific_humidity_over_ocean | surface air saturation specific humidity over ocean | kg kg-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%qss_land | surface_specific_humidity_over_land | surface air saturation specific humidity over land | kg kg-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%qss_ice | surface_specific_humidity_over_ice | surface air saturation specific humidity over ice | kg kg-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%raddt | time_step_for_radiation | radiation time step | s | 0 | real | kind_phys | none | F | !! | physics%Interstitial(i)%raincd | lwe_thickness_of_deep_convective_precipitation_amount | deep convective rainfall amount on physics timestep | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%raincs | lwe_thickness_of_shallow_convective_precipitation_amount | shallow convective rainfall amount on physics timestep | m | 1 | real | kind_phys | none | F | @@ -377,6 +422,9 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%rainmp | lwe_thickness_of_explicit_rain_amount | explicit rain on physics timestep | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%rainp | tendency_of_rain_water_mixing_ratio_due_to_microphysics | tendency of rain water mixing ratio due to microphysics | kg kg-1 s-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%rb | bulk_richardson_number_at_lowest_model_level | bulk Richardson number at the surface | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%rb_ocean | bulk_richardson_number_at_lowest_model_level_over_ocean | bulk Richardson number at the surface over ocean | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%rb_land | bulk_richardson_number_at_lowest_model_level_over_land | bulk Richardson number at the surface over land | none | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%rb_ice | bulk_richardson_number_at_lowest_model_level_over_ice | bulk Richardson number at the surface over ice | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%rhc | critical_relative_humidity | critical relative humidity | frac | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%rhcbot | critical_relative_humidity_at_surface | critical relative humidity at the surface | frac | 0 | real | kind_phys | none | F | !! | physics%Interstitial(i)%rhcpbl | critical_relative_humidity_at_PBL_top | critical relative humidity at the PBL top | frac | 0 | real | kind_phys | none | F | @@ -403,29 +451,50 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%skip_macro | flag_skip_macro | flag to skip cloud macrophysics in Morrison scheme | flag | 0 | logical | | none | F | !! | physics%Interstitial(i)%slopetype | surface_slope_classification | surface slope type at each grid cell | index | 1 | integer | | none | F | !! | physics%Interstitial(i)%snowc | surface_snow_area_fraction | surface snow area fraction | frac | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%snowd_ocean | surface_snow_thickness_water_equivalent_over_ocean | water equivalent snow depth over ocean | mm | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%snowd_land | surface_snow_thickness_water_equivalent_over_land | water equivalent snow depth over land | mm | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%snowd_ice | surface_snow_thickness_water_equivalent_over_ice | water equivalent snow depth over ice | mm | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%snohf | snow_freezing_rain_upward_latent_heat_flux | latent heat flux due to snow and frz rain | W m-2 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%snowmp | lwe_thickness_of_snow_amount | explicit snow fall on physics timestep | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%snowmt | surface_snow_melt | snow melt during timestep | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%soiltype | soil_type_classification | soil type at each grid cell | index | 1 | integer | | none | F | !! | physics%Interstitial(i)%stress | surface_wind_stress | surface wind stress | m2 s-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%stress_ocean | surface_wind_stress_over_ocean | surface wind stress over ocean | m2 s-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%stress_land | surface_wind_stress_over_land | surface wind stress over land | m2 s-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%stress_ice | surface_wind_stress_over_ice | surface wind stress over ice | m2 s-2 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%theta | angle_from_east_of_maximum_subgrid_orographic_variations | angle with_respect to east of maximum subgrid orographic variations | degrees | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tice | sea_ice_temperature_interstitial | sea ice surface skin temperature use as interstitial | K | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tlvl | air_temperature_at_interface_for_radiation | air temperature at vertical interface for radiation calculation | K | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tlyr | air_temperature_at_layer_for_radiation | air temperature at vertical layer for radiation calculation | K | 2 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tprcp_ocean | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ocean | total precipitation amount in each time step over ocean | m | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tprcp_land | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land | total precipitation amount in each time step over land | m | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tprcp_ice | nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice | total precipitation amount in each time step over ice | m | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tracers_start_index | start_index_of_other_tracers | beginning index of the non-water tracer species | index | 0 | integer | | none | F | !! | physics%Interstitial(i)%tracers_total | number_of_total_tracers | total number of tracers | count | 0 | integer | | none | F | !! | physics%Interstitial(i)%trans | transpiration_flux | total plant transpiration rate | kg m-2 s-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tseal | surface_skin_temperature_for_nsst | ocean surface skin temperature | K | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tsfa | surface_air_temperature_for_radiation | lowest model layer air temperature for radiation | K | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tsfc_ocean | surface_skin_temperature_over_ocean_interstitial | surface skin temperature over ocean (temporary use as interstitial) | K | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tsfc_land | surface_skin_temperature_over_land_interstitial | surface skin temperature over land (temporary use as interstitial) | K | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tsfc_ice | surface_skin_temperature_over_ice_interstitial | surface skin temperature over ice (temporary use as interstitial) | K | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tsfg | surface_ground_temperature_for_radiation | surface ground temperature for radiation | K | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tsurf | surface_skin_temperature_after_iteration | surface skin temperature after iteration | K | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tsurf_ocean | surface_skin_temperature_after_iteration_over_ocean | surface skin temperature after iteration over ocean | K | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tsurf_land | surface_skin_temperature_after_iteration_over_land | surface skin temperature after iteration over land | K | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%tsurf_ice | surface_skin_temperature_after_iteration_over_ice | surface skin temperature after iteration over ice | K | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%tracers_water | number_of_water_tracers | number of water-related tracers | count | 0 | integer | | none | F | !! | physics%Interstitial(i)%ud_mf | instantaneous_atmosphere_updraft_convective_mass_flux | (updraft mass flux) * delt | kg m-2 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%ulwsfc_cice | surface_upwelling_longwave_flux_for_cice | surface upwelling longwave flux for cice | W m-2 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%uustar_ocean | surface_friction_velocity_over_ocean | surface friction velocity over ocean | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%uustar_land | surface_friction_velocity_over_land | surface friction velocity over land | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%uustar_ice | surface_friction_velocity_over_ice | surface friction velocity over ice | m s-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%vdftra | vertically_diffused_tracer_concentration | tracer concentration diffused by PBL scheme | kg kg-1 | 3 | real | kind_phys | none | F | !! | physics%Interstitial(i)%vegf1d | perturbation_of_vegetation_fraction | perturbation of vegetation fraction | frac | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%vegtype | vegetation_type_classification | vegetation type at each grid cell | index | 1 | integer | | none | F | !! | physics%Interstitial(i)%w_upi | vertical_velocity_for_updraft | vertical velocity for updraft | m s-1 | 2 | real | kind_phys | none | F | !! | physics%Interstitial(i)%wcbmax | maximum_updraft_velocity_at_cloud_base | maximum updraft velocity at cloud base | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%weasd_land | water_equivalent_accumulated_snow_depth_over_land | water equiv of acc snow depth over land | mm | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%weasd_ice | water_equivalent_accumulated_snow_depth_over_ice | water equiv of acc snow depth over ice | mm | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%wind | wind_speed_at_lowest_model_layer | wind speed at lowest model level | m s-1 | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%work1 | grid_size_related_coefficient_used_in_scale-sensitive_schemes | grid size related coefficient used in scale-sensitive schemes | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%work2 | grid_size_related_coefficient_used_in_scale-sensitive_schemes_complement | complement to work1 | none | 1 | real | kind_phys | none | F | @@ -434,6 +503,9 @@ module gmtb_scm_type_defs !! | physics%Interstitial(i)%xlai1d | perturbation_of_leaf_area_index | perturbation of leaf area index | frac | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%xmu | zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes | zenith angle temporal adjustment factor for shortwave | none | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%z01d | perturbation_of_momentum_roughness_length | perturbation of momentum roughness length | frac | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%zorl_ocean | surface_roughness_length_over_ocean_interstitial | surface roughness length over ocean (temporary use as interstitial) | cm | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%zorl_land | surface_roughness_length_over_land_interstitial | surface roughness length over land (temporary use as interstitial) | cm | 1 | real | kind_phys | none | F | +!! | physics%Interstitial(i)%zorl_ice | surface_roughness_length_over_ice_interstitial | surface roughness length over ice (temporary use as interstitial) | cm | 1 | real | kind_phys | none | F | !! | physics%Interstitial(i)%zt1d | perturbation_of_heat_to_momentum_roughness_length_ratio | perturbation of heat to momentum roughness length ratio | frac | 1 | real | kind_phys | none | F | !! | physics%Statein(i)%phii | geopotential_at_interface | geopotential at model layer interfaces | m2 s-2 | 2 | real | kind_phys | none | F | !! | physics%Statein(i)%prsi | air_pressure_at_interface | air pressure at model layer interfaces | Pa | 2 | real | kind_phys | none | F | @@ -489,8 +561,8 @@ module gmtb_scm_type_defs !! | physics%Stateout(i)%gq0(:,:,scm_state%rain_index) | rain_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of rain water updated by physics | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Stateout(i)%gq0(:,:,scm_state%snow_index) | snow_water_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of snow water updated by physics | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Stateout(i)%gq0(:,:,scm_state%graupel_index) | graupel_mixing_ratio_updated_by_physics | moist (dry+vapor, no condensates) mixing ratio of graupel updated by physics | kg kg-1 | 2 | real | kind_phys | none | F | -!! | physics%Stateout(i)%gq0(:,:,physics%Model(i)%ntwa) | water_friendly_aerosol_number_concentration_updated_by_physics | number concentration of water-friendly aerosols updated by physics | kg-1 | 2 | real | kind_phys | none | F | -!! | physics%Stateout(i)%gq0(:,:,physics%Model(i)%ntia) | ice_friendly_aerosol_number_concentration_updated_by_physics | number concentration of ice-friendly aerosols updated by physics | kg-1 | 2 | real | kind_phys | none | F | +!! | physics%Stateout(i)%gq0(:,:,scm_state%water_friendly_aerosol_index) | water_friendly_aerosol_number_concentration_updated_by_physics | number concentration of water-friendly aerosols updated by physics | kg-1 | 2 | real | kind_phys | none | F | +!! | physics%Stateout(i)%gq0(:,:,scm_state%ice_friendly_aerosol_index) | ice_friendly_aerosol_number_concentration_updated_by_physics | number concentration of ice-friendly aerosols updated by physics | kg-1 | 2 | real | kind_phys | none | F | !! | physics%Stateout(i)%gq0(:,:,scm_state%cloud_droplet_nc_index) | cloud_droplet_number_concentration_updated_by_physics | number concentration of cloud droplets updated by physics | kg-1 | 2 | real | kind_phys | none | F | !! | physics%Stateout(i)%gq0(:,:,scm_state%cloud_ice_nc_index) | ice_number_concentration_updated_by_physics | number concentration of ice updated by physics | kg-1 | 2 | real | kind_phys | none | F | !! | physics%Stateout(i)%gq0(:,:,scm_state%rain_nc_index) | rain_number_concentration_updated_by_physics | number concentration of rain updated by physics | kg-1 | 2 | real | kind_phys | none | F | @@ -501,6 +573,7 @@ module gmtb_scm_type_defs !! | physics%Model(i)%master | mpi_root | master MPI-rank | index | 0 | integer | | none | F | !! | physics%Model(i)%communicator | mpi_comm | MPI communicator | index | 0 | integer | | none | F | !! | physics%Model(i)%ntasks | mpi_size | number of MPI tasks in communicator | count | 0 | integer | | none | F | +!! | physics%Model(i)%nthreads | omp_threads | number of OpenMP threads available for physics schemes | count | 0 | integer | | none | F | !! | physics%Model(i)%nlunit | iounit_namelist | fortran unit number for file opens | none | 0 | integer | | none | F | !! | physics%Model(i)%fn_nml | namelist_filename | namelist filename | none | 0 | character | len=64 | none | F | !! | physics%Model(i)%input_nml_file | namelist_filename_for_internal_file_reads | namelist filename for internal file reads | none | 1 | character | len=256 | none | F | @@ -526,8 +599,9 @@ module gmtb_scm_type_defs !! | physics%Model(i)%lonr | number_of_equatorial_longitude_points | number of global points in x-dir (i) along the equator | count | 0 | integer | | none | F | !! | physics%Model(i)%latr | | number of global points in y-dir (j) along the meridian | count | 0 | integer | | none | F | !! | physics%Model(i)%blksz | horizontal_block_size | for explicit data blocking: block sizes of all blocks | count | 1 | integer | | none | F | +!! | physics%Model(i)%tile_num | number_of_tile | tile number | none | 0 | integer | | none | F | !! | physics%Model(i)%cplflx | flag_for_flux_coupling | flag controlling cplflx collection (default off) | flag | 0 | logical | | none | F | -!! | physics%Model(i)%cplwav | | flag controlloing cplwav collection (default off) | flag | 0 | logical | | none | F | +!! | physics%Model(i)%cplwav | flag_for_wave_coupling | flag controlloing cplwav collection (default off) | flag | 0 | logical | | none | F | !! | physics%Model(i)%cplchm | flag_for_chemistry_coupling | flag controlling cplchm collection (default off) | flag | 0 | logical | | none | F | !! | physics%Model(i)%lsidea | flag_idealized_physics | flag for idealized physics | flag | 0 | logical | | none | F | !! | physics%Model(i)%dtp | time_step_for_physics | physics timestep | s | 0 | real | kind_phys | none | F | @@ -575,6 +649,7 @@ module gmtb_scm_type_defs !! | physics%Model(i)%prautco | coefficient_from_cloud_water_to_rain | auto conversion coeff from cloud to rain | none | 1 | real | kind_phys | none | F | !! | physics%Model(i)%evpco | coefficient_for_evaporation_of_rainfall | coeff for evaporation of largescale rain | none | 0 | real | kind_phys | none | F | !! | physics%Model(i)%wminco | cloud_condensed_water_conversion_threshold | water and ice minimum threshold for Zhao | none | 1 | real | kind_phys | none | F | +!! | physics%Model(i)%avg_max_length | time_interval_for_maximum_hourly_fields | reset time interval for maximum hourly fields | s | 0 | real | kind_phys | none | F | !! | physics%Model(i)%fprcp | number_of_frozen_precipitation_species | number of frozen precipitation species | count | 0 | integer | | none | F | !! | physics%Model(i)%pdfflag | flag_for_pdf_for_morrison_gettelman_microphysics_scheme | pdf flag for MG macrophysics | flag | 0 | integer | | none | F | !! | physics%Model(i)%mg_dcs | mg_autoconversion_size_threshold_ice_snow | autoconversion size threshold for cloud ice to snow for MG microphysics | um | 0 | real | kind_phys | none | F | @@ -593,7 +668,7 @@ module gmtb_scm_type_defs !! | physics%Model(i)%tf | frozen_cloud_threshold_temperature | threshold temperature below which all cloud is ice | K | 0 | real | kind_phys | none | F | !! | physics%Model(i)%tcr | cloud_phase_transition_threshold_temperature | threshold temperature below which cloud starts to freeze | K | 0 | real | kind_phys | none | F | !! | physics%Model(i)%tcrf | cloud_phase_transition_denominator | denominator in cloud phase transition = 1/(tcr-tf) | K-1 | 0 | real | kind_phys | none | F | -!! | physics%Model(i)%effr_in | | eg to turn on ffective radii for MG | | 0 | logical | | none | F | +!! | physics%Model(i)%effr_in | flag_for_cloud_effective_radii | flag for cloud effective radii calculations in microphysics | | 0 | logical | | none | F | !! | physics%Model(i)%microp_uniform | mg_flag_for_uniform_subcolumns | flag for uniform subcolumns for MG microphysics | flag | 0 | logical | | none | F | !! | physics%Model(i)%do_cldliq | | | | 0 | logical | | none | F | !! | physics%Model(i)%do_cldice | mg_flag_for_cloud_ice_processes | flag for cloud ice processes for MG microphysics | flag | 0 | logical | | none | F | @@ -613,6 +688,7 @@ module gmtb_scm_type_defs !! | physics%Model(i)%shoc_parm(4) | shoc_implicit_TKE_integration_uncentering_term | uncentering term for TKE integration in SHOC | none | 0 | real | kind_phys | none | F | !! | physics%Model(i)%shoc_parm(5) | shoc_flag_for_optional_surface_TKE_dissipation | flag for alt. TKE diss. near surface in SHOC (>0 = ON) | none | 0 | real | kind_phys | none | F | !! | physics%Model(i)%ncnd | number_of_cloud_condensate_types | number of cloud condensate types | count | 0 | integer | | none | F | +!! | physics%Model(i)%make_number_concentrations | flag_for_initial_number_concentration_calculation | flag for initial number concentration calculation for Thompson MP | flag | 0 | logical | | none | F | !! | physics%Model(i)%ltaerosol | flag_for_aerosol_physics | flag for aerosol physics | flag | 0 | logical | | none | F | !! | physics%Model(i)%lradar | flag_for_radar_reflectivity | flag for radar reflectivity | flag | 0 | logical | | none | F | !! | physics%Model(i)%ttendlim | limit_for_temperature_tendency_for_microphysics | temperature tendency limiter per physics time step | K s-1 | 0 | real | kind_phys | none | F | @@ -653,6 +729,7 @@ module gmtb_scm_type_defs !! | physics%Model(i)%redrag | flag_for_reduced_drag_coefficient_over_sea | flag for reduced drag coeff. over sea | flag | 0 | logical | | none | F | !! | physics%Model(i)%hybedmf | flag_for_hedmf | flag for hybrid edmf pbl scheme (moninedmf) | flag | 0 | logical | | none | F | !! | physics%Model(i)%dspheat | flag_TKE_dissipation_heating | flag for tke dissipative heating | flag | 0 | logical | | none | F | +!! | physics%Model(i)%lheatstrg | flag_for_canopy_heat_storage | flag for canopy heat storage parameterization | flag | 0 | logical | | none | F | !! | physics%Model(i)%cnvcld | | | | 0 | logical | | none | F | !! | physics%Model(i)%random_clds | | flag controls whether clouds are random | | 0 | logical | | none | F | !! | physics%Model(i)%shal_cnv | flag_for_shallow_convection | flag for calling shallow convection | flag | 0 | logical | | none | F | @@ -707,6 +784,19 @@ module gmtb_scm_type_defs !! | physics%Model(i)%nstf_name(5) | vertical_temperature_average_range_upper_bound | zsea2 in mm | mm | 0 | integer | | none | F | !! | physics%Model(i)%xkzminv | atmosphere_heat_diffusivity_background_maximum | maximum background value of heat diffusivity | m2 s-1 | 0 | real | kind_phys | none | F | !! | physics%Model(i)%moninq_fac | atmosphere_diffusivity_coefficient_factor | multiplicative constant for atmospheric diffusivities | none | 0 | real | kind_phys | none | F | +!! | physics%Model(i)%nca | number_of_independent_cellular_automata | number of independent cellular automata | count | 0 | integer | | none | F | +!! | physics%Model(i)%nlives | cellular_automata_lifetime | cellular automata lifetime | count | 0 | integer | | none | F | +!! | physics%Model(i)%ncells | cellular_automata_finer_grid | cellular automata finer grid | count | 0 | integer | | none | F | +!! | physics%Model(i)%nfracseed | cellular_automata_seed_probability | cellular automata seed probability | fraction | 0 | real | kind_phys | none | F | +!! | physics%Model(i)%nseed | cellular_automata_seed_frequency | cellular automata seed frequency in units of time steps | count | 0 | integer | | none | F | +!! | physics%Model(i)%do_ca | flag_for_cellular_automata | cellular automata main switch | flag | 0 | logical | | none | F | +!! | physics%Model(i)%ca_sgs | flag_for_sgs_cellular_automata | switch for sgs ca | flag | 0 | logical | | none | F | +!! | physics%Model(i)%ca_global | flag_for_global_cellular_automata | switch for global ca | flag | 0 | logical | | none | F | +!! | physics%Model(i)%ca_smooth | flag_for_gaussian_spatial_filter | switch for gaussian spatial filter | flag | 0 | logical | | none | F | +!! | physics%Model(i)%isppt_deep | flag_for_combination_of_sppt_with_isppt_deep | switch for combination with isppt_deep. | flag | 0 | logical | | none | F | +!! | physics%Model(i)%iseed_ca | seed_for_random_number_generation_in_cellular_automata_scheme | seed for random number generation in ca scheme | none | 0 | integer | | none | F | +!! | physics%Model(i)%nspinup | number_of_iterations_to_spin_up_cellular_automata | number of iterations to spin up the ca | count | 0 | integer | | none | F | +!! | physics%Model(i)%nthresh | threshold_for_perturbed_vertical_velocity | threshold used for perturbed vertical velocity | m s-1 | 0 | real | kind_phys | none | F | !! | physics%Model(i)%do_sppt | flag_for_stochastic_surface_physics_perturbations | flag for stochastic surface physics perturbations | flag | 0 | logical | | none | F | !! | physics%Model(i)%use_zmtnblck | flag_for_mountain_blocking | flag for mountain blocking | flag | 0 | logical | | none | F | !! | physics%Model(i)%do_shum | flag_for_stochastic_shum_option | flag for stochastic shum option | flag | 0 | logical | | none | F | @@ -747,6 +837,9 @@ module gmtb_scm_type_defs !! | physics%Model(i)%nto2 | | tracer index for oxygen | | 0 | integer | | none | F | !! | physics%Model(i)%ntwa | index_for_water_friendly_aerosols | tracer index for water friendly aerosol | index | 0 | integer | | none | F | !! | physics%Model(i)%ntia | index_for_ice_friendly_aerosols | tracer index for ice friendly aerosol | index | 0 | integer | | none | F | +!! | physics%Model(i)%ntchm | number_of_chemical_tracers | number of chemical tracers | count | 0 | integer | | none | F | +!! | physics%Model(i)%ntchs | index_for_first_chemical_tracer | tracer index for first chemical tracer | index | 0 | integer | | none | F | +!! | physics%Model(i)%ntdiag | diagnostics_control_for_chemical_tracers | array to control diagnostics for chemical tracers | flag | 1 | logical | | none | F | !! | physics%Model(i)%ntot2d | | total number of variables for phyf2d | | 0 | integer | | none | F | !! | physics%Model(i)%ntot3d | | total number of variables for phyf3d | | 0 | integer | | none | F | !! | physics%Model(i)%indcld | index_for_cloud_fraction_in_3d_arrays_for_microphysics | index of cloud fraction in phyf3d (used only for SHOC or MG) | index | 0 | integer | | none | F | @@ -782,6 +875,7 @@ module gmtb_scm_type_defs !! | physics%Model(i)%kdt | index_of_time_step | current forecast iteration | index | 0 | integer | | none | F | !! | physics%Model(i)%first_time_step | flag_for_first_time_step | flag for first time step for time integration loop (cold/warmstart) | flag | 0 | logical | | none | F | !! | physics%Model(i)%restart | flag_for_restart | flag for restart (warmstart) or coldstart | flag | 0 | logical | | none | F | +!! | physics%Model(i)%hydrostatic | flag_for_hydrostatic_solver | flag for hydrostatic solver from dynamics | flag | 0 | logical | | none | F | !! | physics%Model(i)%jdat | forecast_date_and_time | current forecast date and time | none | 1 | integer | | none | F | !! | physics%Model(i)%iccn | flag_for_in_ccn_forcing_for_morrison_gettelman_microphysics | flag for IN and CCN forcing for morrison gettelman microphysics | flag | 0 | logical | | none | F | !! | physics%Model(i)%sec | seconds_elapsed_since_model_initialization | seconds elapsed since model initialization | s | 0 | real | kind_phys | none | F | @@ -789,6 +883,7 @@ module gmtb_scm_type_defs !! | physics%Model(i)%iau_delthrs | | iau time interval (to scale increments) in hours | | 0 | real | kind_phys | none | F | !! | physics%Model(i)%iau_inc_files | | list of increment files | | 1 | character | len=240 | none | F | !! | physics%Model(i)%iaufhrs | | forecast hours associated with increment files | | 1 | real | kind_phys | none | F | +!! | physics%Model(i)%iau_filter_increments | | | | 0 | logical | | none | F | !! | physics%Model(i)%dxinv | inverse_scaling_factor_for_critical_relative_humidity | inverse scaling factor for critical relative humidity | rad2 m-2 | 0 | real | kind_phys | none | F | !! | physics%Model(i)%dxmax | maximum_scaling_factor_for_critical_relative_humidity | maximum scaling factor for critical relative humidity | m2 rad-2 | 0 | real | kind_phys | none | F | !! | physics%Model(i)%dxmin | minimum_scaling_factor_for_critical_relative_humidity | minimum scaling factor for critical relative humidity | m2 rad-2 | 0 | real | kind_phys | none | F | @@ -922,6 +1017,9 @@ module gmtb_scm_type_defs !! | physics%Diag(i)%u10mmax | maximum_x_wind_at_10m | maximum x wind at 10 m | m s-1 | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%v10mmax | maximum_y_wind_at_10m | maximum y wind at 10 m | m s-1 | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%wind10mmax | maximum_wind_at_10m | maximum wind speed at 10 m | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%u10max | maximum_u_wind_at_10m_over_maximum_hourly_time_interval | maximum u wind at 10m over maximum hourly time interval | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%v10max | maximum_v_wind_at_10m_over_maximum_hourly_time_interval | maximum v wind at 10m over maximum hourly time interval | m s-1 | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%spd10max | maximum_wind_at_10m_over_maximum_hourly_time_interval | maximum wind at 10m over maximum hourly time interval | m s-1 | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%rain | lwe_thickness_of_precipitation_amount_on_dynamics_timestep | total rain at this time step | m | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%rainc | lwe_thickness_of_convective_precipitation_amount_on_dynamics_timestep | convective rain at this time step | m | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%ice | lwe_thickness_of_ice_amount_on_dynamics_timestep | ice fall at this time step | m | 1 | real | kind_phys | none | F | @@ -957,8 +1055,12 @@ module gmtb_scm_type_defs !! | physics%Diag(i)%tdomzr | dominant_freezing_rain_type | dominant freezing rain type | none | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%tdomip | dominant_sleet_type | dominant sleet type | none | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%tdoms | dominant_snow_type | dominant snow type | none | 1 | real | kind_phys | none | F | -!! | physics%Diag(i)%snowfallac | total_accumulated_snowfall | run-total snow accumulation on the ground | kg m-2 | 1 | real | kind_phys | none | F | -!! | physics%Diag(i)%acsnow | accumulated_water_equivalent_of_frozen_precip | snow water equivalent of run-total frozen precip | kg m-2 | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%ca_out | | cellular automata fraction | | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%ca_deep | | cellular automata fraction | | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%ca_turb | | cellular automata fraction | | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%ca_shal | | cellular automata fraction | | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%ca_rad | | cellular automata fraction | | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%ca_micro | | cellular automata fraction | | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%skebu_wts | weights_for_stochastic_skeb_perturbation_of_x_wind_flipped | weights for stochastic skeb perturbation of x wind, flipped | none | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%skebv_wts | weights_for_stochastic_skeb_perturbation_of_y_wind_flipped | weights for stochastic skeb perturbation of y wind, flipped | none | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%sppt_wts | weights_for_stochastic_sppt_perturbation_flipped | weights for stochastic sppt perturbation, flipped | none | 2 | real | kind_phys | none | F | @@ -976,11 +1078,12 @@ module gmtb_scm_type_defs !! | physics%Diag(i)%dv3dt(:,:,4) | cumulative_change_in_y_wind_due_to_convective_gravity_wave_drag | cumulative change in y wind due to convective gravity wave drag | m s-1 | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dt3dt | | temperature change due to physics | | 3 | real | kind_phys | none | F | !! | physics%Diag(i)%dt3dt(:,:,1) | cumulative_change_in_temperature_due_to_longwave_radiation | cumulative change in temperature due to longwave radiation | K | 2 | real | kind_phys | none | F | -!! | physics%Diag(i)%dt3dt(:,:,2) | cumulative_change_in_temperature_due_to_shortwave_radiation_and_orographic_gravity_wave_drag | cumulative change in temperature due to SW rad and oro. GWD | K | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%dt3dt(:,:,2) | cumulative_change_in_temperature_due_to_shortwave_radiation | cumulative change in temperature due to shortwave radiation | K | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dt3dt(:,:,3) | cumulative_change_in_temperature_due_to_PBL | cumulative change in temperature due to PBL | K | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dt3dt(:,:,4) | cumulative_change_in_temperature_due_to_deep_convection | cumulative change in temperature due to deep conv. | K | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dt3dt(:,:,5) | cumulative_change_in_temperature_due_to_shal_convection | cumulative change in temperature due to shal conv. | K | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dt3dt(:,:,6) | cumulative_change_in_temperature_due_to_microphysics | cumulative change in temperature due to microphysics | K | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%dt3dt(:,:,7) | cumulative_change_in_temperature_due_to_orographic_gravity_wave_drag | cumulative change in temperature due to orographic gravity wave drag | K | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dq3dt | cumulative_change_in_water_vapor_specific_humidity_due_to_physics | cumulative change in water vapor specific humidity due to physics | kg kg-1 | 3 | real | kind_phys | none | F | !! | physics%Diag(i)%dq3dt(:,:,1) | cumulative_change_in_water_vapor_specific_humidity_due_to_PBL | cumulative change in water vapor specific humidity due to PBL | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dq3dt(:,:,2) | cumulative_change_in_water_vapor_specific_humidity_due_to_deep_convection | cumulative change in water vapor specific humidity due to deep conv. | kg kg-1 | 2 | real | kind_phys | none | F | @@ -991,11 +1094,25 @@ module gmtb_scm_type_defs !! | physics%Diag(i)%dq3dt(:,:,7) | cumulative_change_in_ozone_concentration_due_to_ozone_mixing_ratio | cumulative change in ozone concentration due to ozone mixing ratio | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dq3dt(:,:,8) | cumulative_change_in_ozone_concentration_due_to_temperature | cumulative change in ozone concentration due to temperature | kg kg-1 | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dq3dt(:,:,9) | cumulative_change_in_ozone_concentration_due_to_overhead_ozone_column | cumulative change in ozone concentration due to overhead ozone column | kg kg-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%refdmax | maximum_reflectivity_at_1km_agl_over_maximum_hourly_time_interval | maximum reflectivity at 1km agl over maximum hourly time interval | dBZ | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%refdmax263k | maximum_reflectivity_at_minus10c_over_maximum_hourly_time_interval | maximum reflectivity at minus10c over maximum hourly time interval | dBZ | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%t02max | maximum_temperature_at_2m_over_maximum_hourly_time_interval | maximum temperature at 2m over maximum hourly time interval | K | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%t02min | minimum_temperature_at_2m_over_maximum_hourly_time_interval | minumum temperature at 2m over maximum hourly time interval | K | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%rh02max | maximum_relative_humidity_at_2m_over_maximum_hourly_time_interval | maximum relative humidity at 2m over maximum hourly time interval | % | 1 | real | kind_phys | none | F | +!! | physics%Diag(i)%rh02min | minimum_relative_humidity_at_2m_over_maximum_hourly_time_interval | minumum relative humidity at 2m over maximum hourly time interval | % | 1 | real | kind_phys | none | F | !! | physics%Diag(i)%upd_mf | cumulative_atmosphere_updraft_convective_mass_flux | cumulative updraft mass flux | Pa | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%dwn_mf | cumulative_atmosphere_downdraft_convective_mass_flux | cumulative downdraft mass flux | Pa | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%det_mf | cumulative_atmosphere_detrainment_convective_mass_flux | cumulative detrainment mass flux | Pa | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%cldcov | | instantaneous 3D cloud fraction | | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%refl_10cm | radar_reflectivity_10cm | instantaneous refl_10cm | dBZ | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%duem | instantaneous_dust_emission_flux | instantaneous dust emission flux | kg m-2 s-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%ssem | instantaneous_seasalt_emission_flux | instantaneous sea salt emission flux | kg m-2 s-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%sedim | instantaneous_sedimentation | instantaneous sedimentation | kg m-2 s-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%drydep | instantaneous_dry_deposition | instantaneous dry deposition | kg m-2 s-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%wetdpl | instantaneous_large-scale_wet_deposition | instantaneous large-scale wet deposition | kg m-2 s-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%wetdpc | instantaneous_convective-scale_wet_deposition | instantaneous convective-scale wet deposition | kg m-2 s-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%abem | instantaneous_anthopogenic_and_biomass_burning_emissions | instantaneous anthopogenic and biomass burning emissions for black carbon, organic carbon, and sulfur dioxide | ug m-2 s-1 | 2 | real | kind_phys | none | F | +!! | physics%Diag(i)%aecm | instantaneous_aerosol_column_mass_densities | instantaneous aerosol column mass densities for pm2.5, black carbon, organic carbon, sulfate, dust, sea salt | g m-2 | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%edmf_a | emdf_updraft_area | updraft area from mass flux scheme | frac | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%edmf_w | emdf_updraft_vertical_velocity | updraft vertical velocity from mass flux scheme | m s-1 | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%edmf_qt | emdf_updraft_total_water | updraft total water from mass flux scheme | kg kg-1 | 2 | real | kind_phys | none | F | @@ -1008,15 +1125,21 @@ module gmtb_scm_type_defs !! | physics%Diag(i)%exch_h | atmosphere_heat_diffusivity_for_mynnpbl | diffusivity for heat for MYNN PBL (defined for all mass levels) | m2 s-1 | 2 | real | kind_phys | none | F | !! | physics%Diag(i)%exch_m | atmosphere_momentum_diffusivity_for_mynnpbl | diffusivity for momentum for MYNN PBL (defined for all mass levels) | m2 s-1 | 2 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%slmsk | sea_land_ice_mask_real | landmask: sea/land/ice=0/1/2 | flag | 1 | real | kind_phys | none | F | -!! | physics%Sfcprop(i)%lakemsk | lake_mask_real | lake mask: non-lake/lake=0/1 | flag | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%oceanfrac | sea_area_fraction | fraction of horizontal grid area occupied by ocean | frac | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%landfrac | land_area_fraction | fraction of horizontal grid area occupied by land | frac | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%lakefrac | lake_area_fraction | fraction of horizontal grid area occupied by lake | frac | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%tsfc | surface_skin_temperature | surface skin temperature | K | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%tsfco | sea_surface_temperature | sea surface temperature | K | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%tsfcl | surface_skin_temperature_over_land | surface skin temperature over land | K | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%tisfc | sea_ice_temperature | sea uce surface skin temperature | K | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%snowd | surface_snow_thickness_water_equivalent | water equivalent snow depth over land | mm | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%zorl | surface_roughness_length | surface roughness length | cm | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%zorlo | surface_roughness_length_over_ocean | surface roughness length over ocean | cm | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%zorll | surface_roughness_length_over_land | surface roughness length over land | cm | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%fice | sea_ice_concentration | ice fraction over open water | frac | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%hprim | | topographic standard deviation | m | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%hprime | statistical_measures_of_subgrid_orography | orographic metrics | various | 2 | real | kind_phys | none | F | -!! | physics%Sfcprop(i)%sncovr | surface_snow_area_fraction_for_diagnostics | surface snow area fraction | frac | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%sncovr | surface_snow_area_fraction_over_land | surface snow area fraction | frac | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%snoalb | upper_bound_on_max_albedo_over_deep_snow | maximum snow albedo | frac | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%alvsf | | mean vis albedo with strong cosz dependency | frac | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%alnsf | | mean nir albedo with strong cosz dependency | frac | 1 | real | kind_phys | none | F | @@ -1082,6 +1205,8 @@ module gmtb_scm_type_defs !! | physics%Sfcprop(i)%flag_frsoil | flag_for_frozen_soil_physics | flag for frozen soil physics (RUC) | flag | 2 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%rhofr | density_of_frozen_precipitation | density of frozen precipitation | kg m-3 | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%tsnow | snow_temperature_bottom_first_layer | snow temperature at the bottom of the first soil layer | K | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%snowfallac | total_accumulated_snowfall | run-total snow accumulation on the ground | kg m-2 | 1 | real | kind_phys | none | F | +!! | physics%Sfcprop(i)%acsnow | accumulated_water_equivalent_of_frozen_precip | snow water equivalent of run-total frozen precip | kg m-2 | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%ustm | surface_friction_velocity_drag | friction velocity isolated for momentum only | m s-1 | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%zol | surface_stability_parameter | monin obukhov surface stability parameter | none | 1 | real | kind_phys | none | F | !! | physics%Sfcprop(i)%mol | theta_star | temperature flux divided by ustar (temperature scale) | K | 1 | real | kind_phys | none | F | @@ -1169,6 +1294,17 @@ module gmtb_scm_type_defs !! | physics%Coupling(i)%psurfi_cpl | instantaneous_surface_air_pressure_for_coupling | instantaneous sfc pressure | Pa | 1 | real | kind_phys | none | F | !! | physics%Coupling(i)%oro_cpl | | orography | | 1 | real | kind_phys | none | F | !! | physics%Coupling(i)%slmsk_cpl | | land/sea/ice mask | | 1 | real | kind_phys | none | F | +!! | physics%Coupling(i)%tconvtend | tendency_of_air_temperature_due_to_deep_convection_for_coupling_on_physics_timestep | tendency of air temperature due to deep convection | K | 2 | real | kind_phys | none | F | +!! | physics%Coupling(i)%qconvtend | tendency_of_water_vapor_specific_humidity_due_to_deep_convection_for_coupling_on_physics_timestep | tendency of specific humidity due to deep convection | kg kg-1 | 2 | real | kind_phys | none | F | +!! | physics%Coupling(i)%uconvtend | tendency_of_x_wind_due_to_deep_convection_for_coupling_on_physics_timestep | tendency_of_x_wind_due_to_deep_convection | m s-1 | 2 | real | kind_phys | none | F | +!! | physics%Coupling(i)%vconvtend | tendency_of_y_wind_due_to_deep_convection_for_coupling_on_physics_timestep | tendency_of_y_wind_due_to_deep_convection | m s-1 | 2 | real | kind_phys | none | F | +!! | physics%Coupling(i)%ca_out | | | | 1 | real | kind_phys | none | F | +!! | physics%Coupling(i)%ca_deep | fraction_of_cellular_automata_for_deep_convection | fraction of cellular automata for deep convection | frac | 1 | real | kind_phys | none | F | +!! | physics%Coupling(i)%ca_turb | | | | 1 | real | kind_phys | none | F | +!! | physics%Coupling(i)%ca_shal | | | | 1 | real | kind_phys | none | F | +!! | physics%Coupling(i)%ca_rad | | | | 1 | real | kind_phys | none | F | +!! | physics%Coupling(i)%ca_micro | | | | 1 | real | kind_phys | none | F | +!! | physics%Coupling(i)%cape | convective_available_potential_energy_for_coupling | convective available potential energy for coupling DH* CHECK THIS DOESN'T MAKE SENSE!!! *DH | m2 s-2 | 1 | real | kind_phys | none | F | !! | physics%Coupling(i)shum_wts | weights_for_stochastic_shum_perturbation | weights for stochastic shum perturbation | none | 2 | real | kind_phys | none | F | !! | physics%Coupling(i)%sppt_wts | weights_for_stochastic_sppt_perturbation | weights for stochastic sppt perturbation | none | 2 | real | kind_phys | none | F | !! | physics%Coupling(i)%skebu_wts | weights_for_stochastic_skeb_perturbation_of_x_wind | weights for stochastic skeb perturbation of x wind | none | 2 | real | kind_phys | none | F | @@ -1190,25 +1326,6 @@ module gmtb_scm_type_defs !! | physics%Cldprop(i)%cv | fraction_of_convective_cloud | fraction of convective cloud | frac | 1 | real | kind_phys | none | F | !! | physics%Cldprop(i)%cvt | pressure_at_top_of_convective_cloud | convective cloud top pressure | Pa | 1 | real | kind_phys | none | F | !! | physics%Cldprop(i)%cvb | pressure_at_bottom_of_convective_cloud | convective cloud bottom pressure | Pa | 1 | real | kind_phys | none | F | -!! | physics%n_ozone_layers | vertical_dimension_of_ozone_forcing_data_from_host | number of vertical layers in ozone forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%n_ozone_lats | number_of_latitutde_points_in_ozone_forcing_data_from_host | number of latitude points in ozone forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%n_ozone_times | number_of_time_levels_in_ozone_forcing_data_from_host | number of time levels in ozone forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%n_ozone_coefficients | number_of_coefficients_in_ozone_forcing_data_from_host | number of coeffcients in ozone forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%ozone_lat | latitude_of_ozone_forcing_data_from_host | latitude value of the ozone forcing data coming from host | degree | 1 | real | kind_phys | none | F | -!! | physics%ozone_pres | natural_log_of_ozone_forcing_data_pressure_levels_from_host | natural logarithm of the pressure levels of the ozone forcing data | Pa | 1 | real | kind_phys | none | F | -!! | physics%ozone_time | time_levels_in_ozone_forcing_data_from_host | time values of the ozone forcing data coming from host | day | 1 | real | kind_phys | none | F | -!! | physics%ozone_forcing_in | ozone_forcing_from_host | ozone forcing data from host | various | 4 | real | kind_phys | none | F | -!! | physics%n_h2o_layers | vertical_dimension_of_h2o_forcing_data_from_host | number of vertical layers in h2o forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%n_h2o_lats | number_of_latitutde_points_in_h2o_forcing_data_from_host | number of latitude points in h2o forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%n_h2o_times | number_of_time_levels_in_h2o_forcing_data_from_host | number of time levels in h2o forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%n_h2o_coefficients | number_of_coefficients_in_h2o_forcing_data_from_host | number of coeffcients in h2o forcing data coming from host | count | 0 | integer | | none | F | -!! | physics%h2o_lat | latitude_of_h2o_forcing_data_from_host | latitude value of the h2o forcing data coming from host | degree | 1 | real | kind_phys | none | F | -!! | physics%h2o_pres | natural_log_of_h2o_forcing_data_pressure_levels_from_host | natural logarithm of the pressure levels of the h2o forcing data | Pa | 1 | real | kind_phys | none | F | -!! | physics%h2o_time | time_levels_in_h2o_forcing_data_from_host | time values of the h2o forcing data coming from host | day | 1 | real | kind_phys | none | F | -!! | physics%h2o_forcing_in | h2o_forcing_from_host | h2o forcing data from host | various | 4 | real | kind_phys | none | F | -!! | physics%hydrostatic | flag_for_hydrostatic_solver | flag for use the hydrostatic or nonhydrostatic solver | flag | 0 | logical | | none | F | -!! | physics%phys_hydrostatic | flag_for_hydrostatic_heating_from_physics | flag for use of hydrostatic heating in physics | flag | 0 | logical | | none | F | -!! | physics%nthreads | omp_threads | number of OpenMP threads available for physics schemes | count | 0 | integer | | none | F | !! #endif type physics_type @@ -1226,29 +1343,6 @@ module gmtb_scm_type_defs type(GFS_interstitial_type), allocatable :: Interstitial(:) type(GFS_init_type), allocatable :: Init_parm(:) - integer :: n_ozone_coefficients - integer :: n_ozone_layers - integer :: n_ozone_times - integer :: n_ozone_lats - - real(kind=kind_phys), allocatable :: ozone_lat(:), ozone_pres(:), ozone_time(:) - real(kind=kind_phys), allocatable :: ozone_forcing_in(:,:,:,:) - - integer :: n_h2o_coefficients - integer :: n_h2o_layers - integer :: n_h2o_times - integer :: n_h2o_lats - - real(kind=kind_phys), allocatable :: h2o_lat(:), h2o_pres(:), h2o_time(:) - real(kind=kind_phys), allocatable :: h2o_forcing_in(:,:,:,:) - - ! needed for GFDL microphysics - logical :: hydrostatic - logical :: phys_hydrostatic - - !needed for Thompson microphysics - integer :: nthreads - contains procedure :: create => physics_create procedure :: associate => physics_associate @@ -1263,7 +1357,6 @@ subroutine scm_state_create(scm_state, n_columns, n_levels, n_time_levels) scm_state%experiment_name = clear_char scm_state%model_name = clear_char scm_state%output_dir = clear_char - scm_state%physics_suite_dir = clear_char scm_state%case_data_dir = clear_char scm_state%vert_coord_data_dir = clear_char scm_state%output_file = clear_char @@ -1484,11 +1577,10 @@ subroutine scm_reference_create(scm_reference, nlev) end subroutine scm_reference_create - subroutine physics_create(physics, n_columns, n_levels, lats, pres) + subroutine physics_create(physics, n_columns) class(physics_type) :: physics - integer, intent(in) :: n_columns, n_levels - real(kind=kind_phys), intent(in) :: lats(:), pres(:) - + integer, intent(in) :: n_columns + real(kind=kind_phys) :: kind_phys_zero integer :: i @@ -1503,8 +1595,8 @@ subroutine physics_create(physics, n_columns, n_levels, lats, pres) physics%Init_parm(n_columns)) do i=1, n_columns - physics%Init_parm(i)%me = int_one - physics%Init_parm(i)%master = int_one + 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 @@ -1515,7 +1607,7 @@ subroutine physics_create(physics, n_columns, n_levels, lats, pres) 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= 2 + 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 @@ -1527,45 +1619,11 @@ subroutine physics_create(physics, n_columns, n_levels, lats, pres) 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 - !set ozone forcing array dimensions - physics%n_ozone_coefficients = 4 - physics%n_ozone_layers = n_levels - physics%n_ozone_lats = n_columns - physics%n_ozone_times = 2 - - allocate(physics%ozone_lat(physics%n_ozone_lats)) - allocate(physics%ozone_pres(physics%n_ozone_layers)) - allocate(physics%ozone_time(physics%n_ozone_times+1)) - allocate(physics%ozone_forcing_in(physics%n_ozone_lats, physics%n_ozone_layers, physics%n_ozone_coefficients, physics%n_ozone_times)) - physics%ozone_lat = lats - physics%ozone_pres = log(pres) - physics%ozone_time = (/12.0, 13.0, 14.0/) - physics%ozone_forcing_in = real_zero - - !set h2o forcing array dimensions - physics%n_h2o_coefficients = 3 - physics%n_h2o_layers = n_levels - physics%n_h2o_lats = n_columns - physics%n_h2o_times = 2 - - allocate(physics%h2o_lat(physics%n_h2o_lats)) - allocate(physics%h2o_pres(physics%n_h2o_layers)) - allocate(physics%h2o_time(physics%n_h2o_times+1)) - allocate(physics%h2o_forcing_in(physics%n_h2o_lats, physics%n_h2o_layers, physics%n_h2o_coefficients, physics%n_h2o_times)) - physics%h2o_lat = lats - physics%h2o_pres = log(pres) - physics%h2o_time = (/12.0, 13.0, 14.0/) - physics%h2o_forcing_in = real_zero - - !needed for GFDL microphysics - physics%hydrostatic = .false. - physics%phys_hydrostatic = .true. - - !needed for Thompson microphysics - physics%nthreads = 1 - end subroutine physics_create subroutine physics_associate(physics, scm_state, col) @@ -1590,6 +1648,19 @@ subroutine physics_associate(physics, scm_state, col) physics%Sfcprop(col)%tsfc => scm_state%T_surf(col,:) physics%Sfcprop(col)%tref => scm_state%T_surf(col,:) physics%Sfcprop(col)%slmsk => scm_state%sfc_type_real + + !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) > 1.9) then + physics%Sfcprop(col)%landfrac(1)=0. + else + physics%Sfcprop(col)%landfrac(1) = physics%Sfcprop(col)%slmsk(1) + end if + if (physics%Sfcprop(col)%lakefrac(1) > 0.) then + physics%Sfcprop(col)%oceanfrac(1) = 0. ! lake & ocean don't coexist in a cell, lake dominates + else + physics%Sfcprop(col)%oceanfrac(1) = 1.-physics%Sfcprop(col)%landfrac(1) !LHS:ocean frac [0:1] + end if + !GJF if(scm_state%time_scheme == 2) then physics%Stateout(col)%gu0 => scm_state%state_u(col,:,:,2) diff --git a/scm/src/run_gmtb_scm.py b/scm/src/run_gmtb_scm.py new file mode 100755 index 000000000..b0485f886 --- /dev/null +++ b/scm/src/run_gmtb_scm.py @@ -0,0 +1,338 @@ +#!/usr/bin/env python + +import argparse +import atexit +import f90nml +import logging +import os +import shutil +import subprocess +import sys +import time +from default_namelists import default_physics_namelists + +############################################################################### +# Global settings # +############################################################################### + +# Name of the Fortran executable to run, including path (relative to run dir) +EXECUTABLE = './gmtb_scm' + +# Path to the directory containing experiment namelists (relative to run dir) +CASE_NAMELIST_DIR = '../etc/case_config' + +# Standard name of experiment namelist in run directory, must match value in gmtb_scm_input.f90 +STANDARD_EXPERIMENT_NAMELIST = 'input_experiment.nml' + +# Path to the directory containing physics namelists (relative to run dir) +PHYSICS_NAMELIST_DIR = '../../ccpp/physics_namelists' + +# Path to the directory containing physics namelists (relative to run dir) +PHYSICS_SUITE_DIR = '../../ccpp/suites' + +# Default settings and filenames of input data for ozone physics; +# these must match the default settings in GFS_typedefs.F90. +DEFAULT_OZ_PHYS = True +DEFAULT_OZ_PHYS_2015 = False +OZ_PHYS_TARGET = 'global_o3prdlos_orig.f77' +OZ_PHYS_2015_TARGET = 'ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77' +OZ_PHYS_LINK = 'global_o3prdlos.f77' + +# For developers: set logging level to DEBUG for additional output +#LOGLEVEL = logging.DEBUG +LOGLEVEL = logging.INFO + +############################################################################### +# Command line arguments # +############################################################################### + +parser = argparse.ArgumentParser() +parser.add_argument('-c', '--case', help='name of case to run', required=True) +parser.add_argument('-g', '--gdb', help='invoke gmtb_scm through gdb', action='store_true', default=False) +parser.add_argument('-s', '--suite', help='name of suite to use', default='SCM_GFS_v15') +parser.add_argument('-n', '--namelist', help='physics namelist to use') + +############################################################################### +# Functions and subroutines # +############################################################################### + +def setup_logging(): + """Sets up the logging module.""" + logging.basicConfig(format='%(levelname)s: %(message)s', level=LOGLEVEL) + +def execute(cmd): + """Runs a local command in a shell. Waits for completion and + returns status, stdout and stderr.""" + logging.debug('Executing "{0}"'.format(cmd)) + p = subprocess.Popen(cmd, stdout = subprocess.PIPE, + stderr = subprocess.PIPE, shell = True) + (stdout, stderr) = p.communicate() + status = p.returncode + if status == 0: + message = 'Execution of "{0}" returned with exit code {1}\n'.format(cmd, status) + message += ' stdout: "{0}"\n'.format(stdout.rstrip('\n')) + message += ' stderr: "{0}"'.format(stderr.rstrip('\n')) + logging.debug(message) + else: + message = 'Execution of command "{0}" failed, exit code {1}\n'.format(cmd, status) + message += ' stdout: "{0}"\n'.format(stdout.rstrip('\n')) + message += ' stderr: "{0}"'.format(stderr.rstrip('\n')) + logging.debug(message) + return (status, stdout.rstrip('\n'), stderr.rstrip('\n')) + +def parse_arguments(): + """Parse command line arguments""" + args = parser.parse_args() + case = args.case + gdb = args.gdb + suite = args.suite + namelist = args.namelist + return (case, gdb, suite, namelist) + +def find_gdb(): + """Detect gdb, abort if not found""" + logging.info('Searching for gdb ...') + cmd = 'which gdb' + (status, stdout, stderr) = execute(cmd) + if status==1: + message = 'gdb not found' + logging.critical(message) + raise Exception(message) + gdb = stdout.strip() + logging.info('Found {0}'.format(gdb)) + return gdb + +class Experiment(object): + + def __init__(self, case, suite, physics_namelist): + """Initialize experiment. This routine does most of the work, + including setting and checking the experiment configuration + (namelist).""" + + self._case = case + self._suite = suite + self._name = case + '_' + suite + + #if a physics namelist is specified (entire filename), it will be used; + #otherwise, a default physics namelist for the given suite is used from default_namelists.py + if physics_namelist: + self._physics_namelist = physics_namelist + else: + if self._suite in default_physics_namelists: + self._physics_namelist = default_physics_namelists.get(self._suite) + else: + message = 'A default physics namelist for suite {0} is not found in default_namelists.py'.format(self._suite) + logging.critical(message) + raise Exception(message) + + #check to see that the physics namelists exists in the right dir + if not os.path.isfile(os.path.join(PHYSICS_NAMELIST_DIR, self._physics_namelist)): + message = 'The physics namelist {0} was not found'.format(os.path.join(PHYSICS_NAMELIST_DIR, self._physics_namelist)) + logging.critical(message) + raise Exception(message) + + #check to see if the case namelists exists in the right dir + self._namelist = os.path.join(CASE_NAMELIST_DIR, self._case + '.nml') + if not os.path.isfile(self._namelist): + message = 'Experiment {0} with namelist {1} not found'.format(self._name, self._namelist) + logging.critical(message) + raise Exception(message) + + @property + def name(self): + """Get the name of the experiment.""" + return self._name + + @name.setter + def name(self, value): + """Set the name of the experiment.""" + self._name = value + + @property + def namelist(self): + """Get the case namelist of the experiment.""" + return self._namelist + + @namelist.setter + def namelist(self, value): + """Set the case namelist of the experiment.""" + self._namelist = value + + @property + def case(self): + """Get the case of the experiment.""" + return self._case + + @name.setter + def case(self, value): + """Set the case of the experiment.""" + self._case = value + + @property + def suite(self): + """Get the suite of the experiment.""" + return self._suite + + @suite.setter + def suite(self, value): + """Set the suite of the experiment.""" + self._suite = value + + @property + def physics_namelist(self): + """Get the physics namelist of the experiment.""" + return self._physics_namelist + + @physics_namelist.setter + def physics_namelist(self, value): + """Set the physics namelist of the experiment.""" + self._physics_namelist = value + + def setup_rundir(self): + """Set up run directory for this experiment.""" + + # Parse case configuration namelist and extract + # - output directory + # - surface_flux_spec + logging.info('Parsing case configuration namelist {0}'.format(self._namelist)) + case_nml = f90nml.read(self._namelist) + # look for the output_dir variable in the case configuration namelist and use it if it does; + # if it doesn't exist, create a default output directory name (from the case and suite names) and create a namelist patch + try: + output_dir = case_nml['case_config']['output_dir'] + custom_output_dir = True + except KeyError: + output_dir = 'output_' + self._case + '_' + self._suite + output_dir_patch_nml = {'case_config':{'output_dir':output_dir}} + custom_output_dir = False + # check to see if surface fluxes are specified in the case configuration file (default is False) + try: + surface_flux_spec = case_nml['case_config']['sfc_flux_spec'] + except KeyError: + surface_flux_spec = False + + # If surface fluxes are specified for this case, use the SDF modified to use them + if surface_flux_spec: + logging.info('Specified surface fluxes are used for case {0}. Switching to SDF {1} from {2}'.format(self._case,'suite_' + self._suite + '_prescribed_surface' + '.xml','suite_' + self._suite + '.xml')) + self._suite = self._suite + '_prescribed_surface' + + # Create physics_config namelist for experiment configuration file + physics_config = {"physics_suite":self._suite, + "physics_nml":self._physics_namelist,} + physics_config_dict = {"physics_config":physics_config} + physics_config_nml = f90nml.namelist.Namelist(physics_config_dict) + + # Create STANDARD_EXPERIMENT_NAMELIST in the run directory with the case configuration and physics configuration namelists + logging.info('Creating experiment configuration namelist {0} in the run directory from {1} using {2} and {3} '.format(STANDARD_EXPERIMENT_NAMELIST,self._namelist,self._suite,self._physics_namelist)) + + with open(STANDARD_EXPERIMENT_NAMELIST, "w+") as nml_file: + case_nml.write(nml_file) + + with open(STANDARD_EXPERIMENT_NAMELIST, "a") as nml_file: + physics_config_nml.write(nml_file) + + # if using the default output dir name created in this script, patch the experiment namelist with the new output_dir variable + if(not custom_output_dir): + # GJF TODO: this implementation is clunky; newer versions of f90nml can handle this better, but this works with v0.19 so no need to require newer version + f90nml.patch(STANDARD_EXPERIMENT_NAMELIST, output_dir_patch_nml, 'temp.nml') + cmd = "mv {0} {1}".format('temp.nml', STANDARD_EXPERIMENT_NAMELIST) + execute(cmd) + + # Link physics namelist to run directory with its original name + logging.info('Linking physics namelist {0} to run directory'.format(self._physics_namelist)) + if os.path.isfile(self._physics_namelist): + os.remove(self._physics_namelist) + if not os.path.isfile(os.path.join(PHYSICS_NAMELIST_DIR, self._physics_namelist)): + message = 'Physics namelist {0} not found in directory {1}'.format(self._physics_namelist, PHYSICS_NAMELIST_DIR) + logging.critical(message) + raise Exception(message) + cmd = "ln -sf {0} {1}".format(os.path.join(PHYSICS_NAMELIST_DIR, self._physics_namelist), self._physics_namelist) + execute(cmd) + + # Link physics SDF to run directory + physics_suite = 'suite_' + self._suite + '.xml' + logging.info('Linking physics suite {0} to run directory'.format(physics_suite)) + if os.path.isfile(physics_suite): + os.remove(physics_suite) + if not os.path.isfile(os.path.join(PHYSICS_SUITE_DIR, physics_suite)): + message = 'Physics suite {0} not found in directory {1}'.format(physics_suite, PHYSICS_SUITE_DIR) + logging.critical(message) + raise Exception(message) + cmd = "ln -sf {0} {1}".format(os.path.join(PHYSICS_SUITE_DIR, physics_suite), physics_suite) + execute(cmd) + + # Parse physics namelist and extract + # - oz_phys + # - oz_phys_2015 + logging.info('Parsing physics namelist {0}'.format(self._physics_namelist)) + nml = f90nml.read(self._physics_namelist) + # oz_phys + try: + oz_phys = nml['gfs_physics_nml']['oz_phys'] + except KeyError: + oz_phys = DEFAULT_OZ_PHYS + # oz_phys_2015 + try: + oz_phys_2015 = nml['gfs_physics_nml']['oz_phys_2015'] + except KeyError: + oz_phys_2015 = DEFAULT_OZ_PHYS_2015 + # Make sure that only one of the two ozone physics options is activated + if oz_phys_2015 and oz_phys: + message = 'Logic error, both oz_phys and oz_phys_2015 are set to true in the physics namelist' + logging.critical(message) + raise Exception(message) + + # Link input data for oz_phys or oz_phys_2015 + if os.path.exists(OZ_PHYS_LINK): + os.remove(OZ_PHYS_LINK) + if oz_phys: + logging.info('Linking input data for oz_phys') + cmd = 'ln -sf {0} {1}'.format(OZ_PHYS_TARGET, OZ_PHYS_LINK) + execute(cmd) + elif oz_phys_2015: + logging.info('Linking input data for oz_phys_2015') + cmd = 'ln -sf {0} {1}'.format(OZ_PHYS_2015_TARGET, OZ_PHYS_LINK) + execute(cmd) + + # Create output directory (delete existing directory) + logging.info('Creating output directory {0} in run directory'.format(output_dir)) + if os.path.isdir(output_dir): + shutil.rmtree(output_dir) + os.makedirs(output_dir) + + # Write experiment configuration file to output directory + logging.info('Writing experiment configuration {0}.nml to output directory'.format(self._name)) + cmd = 'cp {0} {1}'.format(STANDARD_EXPERIMENT_NAMELIST, os.path.join(output_dir,self._name + '.nml')) + execute(cmd) + +def launch_executable(use_gdb, gdb): + """Configure model run command and pass control to shell/gdb""" + if use_gdb: + cmd = '{gdb} {executable}'.format(gdb=gdb, executable=EXECUTABLE) + else: + cmd = '{executable}'.format(executable=EXECUTABLE) + logging.info('Passing control to "{0}"'.format(cmd)) + time.sleep(2) + os.system(cmd) + +def main(): + # Basics + setup_logging() + (case, use_gdb, suite, namelist) = parse_arguments() + # Experiment + if namelist: + logging.info('Setting up experiment {0} with suite {1} using namelist {2}'.format(case,suite,namelist)) + else: + logging.info('Setting up experiment {0} with suite {1} using the default namelist for the suite'.format(case,suite)) + exp = Experiment(case, suite, namelist) + exp.setup_rundir() + # Debugger + if use_gdb: + gdb = find_gdb() + else: + gdb = None + # Launch model on exit + atexit.register(launch_executable, use_gdb, gdb) + +if __name__ == '__main__': + main() \ No newline at end of file