diff --git a/.gitmodules b/.gitmodules index dc0798c32..00571451d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,11 @@ [submodule "ccpp-framework"] path = ccpp/framework - url = https://github.com/NCAR/ccpp-framework - branch = main + url = https://github.com/dustinswales/ccpp-framework + branch = capgen_in_scm [submodule "ccpp-physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + url = https://github.com/dustinswales/ccpp-physics + branch = changes_for_capgen [submodule "CMakeModules"] path = CMakeModules url = https://github.com/noaa-emc/CMakeModules diff --git a/ccpp/config/host_files.txt b/ccpp/config/host_files.txt new file mode 100755 index 000000000..bf5b4d2d5 --- /dev/null +++ b/ccpp/config/host_files.txt @@ -0,0 +1,11 @@ +ccpp/physics/physics/hooks/machine.f +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.F90 +ccpp/physics/physics/photochem/h2o_def.f +ccpp/physics/physics/photochem/module_ozphys.F90 +ccpp/physics/physics/Radiation/RRTMG/radlw_param.f +ccpp/physics/physics/Radiation/RRTMG/radsw_param.f +scm/src/ccpp_config.F90 +scm/src/GFS_typedefs.F90 +scm/src/CCPP_typedefs.F90 +scm/src/scm_type_defs.F90 +scm/src/scm_physical_constants.F90 diff --git a/ccpp/config/scheme_files.txt b/ccpp/config/scheme_files.txt new file mode 100755 index 000000000..4f1729d39 --- /dev/null +++ b/ccpp/config/scheme_files.txt @@ -0,0 +1,136 @@ +ccpp/physics/physics/hooks/machine.f +ccpp/physics/physics/hooks/physcons.F90 +ccpp/physics/physics/tools/get_prs_fv3.F90 +ccpp/physics/physics/tools/get_phi_fv3.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.F90 +ccpp/physics/physics/photochem/h2o_def.f +ccpp/physics/physics/photochem/module_ozphys.F90 +ccpp/physics/physics/Radiation/RRTMG/radlw_param.f +ccpp/physics/physics/Radiation/RRTMG/radsw_param.f +scm/src/ccpp_config.F90 +scm/src/GFS_typedefs.F90 +scm/src/CCPP_typedefs.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_phys_reset.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_rad_reset.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_1.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_2.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_reset.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_update.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_5.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_inter.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part1.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part2.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_cloud_diagnostics.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/cnvc90.f +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpost.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_physics_post.F90 +ccpp/physics/physics/Interstitials/UFS_SCM_NEPTUNE/scm_sfc_flux_spec.F90 +ccpp/physics/physics/Radiation/RRTMG/radlw_main.F90 +ccpp/physics/physics/Radiation/RRTMG/radsw_main.F90 +ccpp/physics/physics/Radiation/RRTMG/rrtmg_lw_post.F90 +ccpp/physics/physics/Radiation/RRTMG/rrtmg_lw_pre.F90 +ccpp/physics/physics/Radiation/RRTMG/rrtmg_sw_post.F90 +ccpp/physics/physics/Radiation/RRTMG/rad_sw_pre.F90 +ccpp/physics/physics/Radiation/RRTMGP/rrtmgp_aerosol_optics.F90 +ccpp/physics/physics/Radiation/RRTMGP/rrtmgp_lw_main.F90 +ccpp/physics/physics/Radiation/RRTMGP/rrtmgp_sw_main.F90 +ccpp/physics/physics/GWD/cires_ugwp.F90 +ccpp/physics/physics/GWD/cires_ugwp_post.F90 +ccpp/physics/physics/GWD/unified_ugwp.F90 +ccpp/physics/physics/GWD/unified_ugwp_post.F90 +ccpp/physics/physics/GWD/ugwpv1_gsldrag.F90 +ccpp/physics/physics/GWD/ugwpv1_gsldrag_post.F90 +ccpp/physics/physics/GWD/drag_suite.F90 +ccpp/physics/physics/GWD/gwdc_pre.f +ccpp/physics/physics/GWD/gwdc.f +ccpp/physics/physics/GWD/gwdc_post.f +ccpp/physics/physics/GWD/gwdps.f +ccpp/physics/physics/GWD/rayleigh_damp.f +ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_pre.F90 +ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv.F90 +ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_post.F90 +ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv_aw_adj.F90 +ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke_pre.F90 +ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke.F90 +ccpp/physics/physics/CONV/nTiedtke/cu_ntiedtke_post.F90 +ccpp/physics/physics/CONV/SAMF/samfdeepcnv.f +ccpp/physics/physics/CONV/SAMF/samfshalcnv.f +ccpp/physics/physics/CONV/SAS/sascnvn.F +ccpp/physics/physics/CONV/SAS/shalcnv.F +ccpp/physics/physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90 +ccpp/physics/physics/CONV/Grell_Freitas/cu_gf_driver.F90 +ccpp/physics/physics/CONV/Grell_Freitas/cu_gf_driver_post.F90 +ccpp/physics/physics/CONV/C3/cu_c3_driver_pre.F90 +ccpp/physics/physics/CONV/C3/cu_c3_driver.F90 +ccpp/physics/physics/CONV/C3/cu_c3_driver_post.F90 +ccpp/physics/physics/CONV/RAS/rascnv.F90 +ccpp/physics/physics/PBL/SHOC/shoc.F90 +ccpp/physics/physics/PBL/HEDMF/hedmf.f +ccpp/physics/physics/PBL/SHOC/moninshoc.f +ccpp/physics/physics/PBL/SATMEDMF/satmedmfvdif.F +ccpp/physics/physics/PBL/SATMEDMF/satmedmfvdifq.F +ccpp/physics/physics/PBL/saYSU/shinhongvdif.F90 +ccpp/physics/physics/PBL/YSU/ysuvdif.F90 +ccpp/physics/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90 +ccpp/physics/physics/PBL/MYJ/myjpbl_wrapper.F90 +ccpp/physics/physics/MP/GFDL/gfdl_cloud_microphys.F90 +ccpp/physics/physics/MP/Zhao_Carr/zhaocarr_gscond.f +ccpp/physics/physics/MP/Zhao_Carr/zhaocarr_precpd.f +ccpp/physics/physics/MP/Morrison_Gettelmanm_micro.F90 +ccpp/physics/physics/MP/Morrison_Gettelmanm_micro_pre.F90 +ccpp/physics/physics/MP/Morrison_Gettelmanm_micro_post.F90 +ccpp/physics/physics/MP/Thompson/mp_thompson_pre.F90 +ccpp/physics/physics/MP/Thompson/mp_thompson.F90 +ccpp/physics/physics/MP/Thompson/mp_thompson_post.F90 +ccpp/physics/physics/MP/NSSL/mp_nssl.F90 +ccpp/physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90 +ccpp/physics/physics/SFC_Layer/GFDL/gfdl_sfc_layer.F90 +ccpp/physics/physics/SFC_Layer/UFS/sfc_diag.f +ccpp/physics/physics/SFC_Layer/UFS/sfc_diag_post.F90 +ccpp/physics/physics/SFC_Layer/MYNN/mynnsfc_wrapper.F90 +ccpp/physics/physics/SFC_Layer/MYJ/myjsfc_wrapper.F90 +ccpp/physics/physics/SFC_Layer/UFS/sfc_diff.f +ccpp/physics/physics/SFC_Layer/UFS/sfc_nst.f +ccpp/physics/physics/SFC_Layer/UFS/sfc_nst_post.f +ccpp/physics/physics/SFC_Layer/UFS/sfc_nst_pre.f +ccpp/physics/physics/SFC_Models/Land/RUC/lsm_ruc.F90 +ccpp/physics/physics/SFC_Models/Land/Noah/lsm_noah.f +ccpp/physics/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 +ccpp/physics/physics/SFC_Models/Ocean/sfc_ocean.F +ccpp/physics/physics/SFC_Models/SeaIce/CICE/sfc_sice.f +ccpp/physics/physics/SFC_Models/SeaIce/CICE/sfc_cice.f +ccpp/physics/physics/SFC_Models/Lake/Flake/flake_driver.F90 +ccpp/physics/physics/smoke_dust/rrfs_smoke_wrapper.F90 +ccpp/physics/physics/smoke_dust/rrfs_smoke_postpbl.F90 +ccpp/physics/physics/photochem/h2ophys.f diff --git a/ccpp/framework b/ccpp/framework index 0f8232724..40deb9418 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit 0f8232724975c13289cad390c9a71fa2c6a9bff4 +Subproject commit 40deb9418409e45ef7c6514f117ae5d929c4ab52 diff --git a/ccpp/physics b/ccpp/physics index f0fbb34a3..f20b728b1 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f0fbb34a350acac90e71de6e51351f78174eb8de +Subproject commit f20b728b1f5d60c01d77db208be70d04887dcf77 diff --git a/ccpp/suites/suite_SCM_GFS_v16.xml b/ccpp/suites/suite_SCM_GFS_v16.xml index 723dbd910..9418992ac 100644 --- a/ccpp/suites/suite_SCM_GFS_v16.xml +++ b/ccpp/suites/suite_SCM_GFS_v16.xml @@ -1,6 +1,6 @@ - + GFS_time_vary_pre diff --git a/scm/etc/host_files.txt b/scm/etc/host_files.txt new file mode 100644 index 000000000..dab82e27e --- /dev/null +++ b/scm/etc/host_files.txt @@ -0,0 +1,13 @@ +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/framework/src/ccpp_types.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/machine.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/ozne_def.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/h2o_def.meta +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/module_ccpp_suite_simulator.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/radlw_param.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/radsw_param.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/scm/src/GFS_typedefs.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/scm/src/CCPP_typedefs.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/scm/src/scm_kinds.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/scm/src/scm_type_defs.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/scm/src/scm_physical_constants.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/scm/src/scm_utils.meta diff --git a/scm/etc/scheme_files.txt b/scm/etc/scheme_files.txt new file mode 100644 index 000000000..070134cd0 --- /dev/null +++ b/scm/etc/scheme_files.txt @@ -0,0 +1,134 @@ +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/module_ccpp_suite_simulator.meta +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/ccpp_suite_simulator.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/radlw_param.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/radsw_param.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cires_ugwp.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cires_ugwp_post.meta +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/clm_lake.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cnvc90.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cs_conv_aw_adj.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cs_conv.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cs_conv_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cs_conv_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_c3_driver.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_c3_driver_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_c3_driver_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_gf_driver.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_gf_driver_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_gf_driver_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_ntiedtke.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_ntiedtke_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/cu_ntiedtke_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/dcyc2t3.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/drag_suite.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/flake_driver.meta +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/fv_sat_adj.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/get_phi_fv3.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/get_prs_fv3.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/gfdl_cloud_microphys.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/gfdl_sfc_layer.meta +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_ccpp_suite_sim_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_cloud_diagnostics.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_DCNV_generic_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_DCNV_generic_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_GWD_generic_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_GWD_generic_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_MP_generic_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_MP_generic_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_PBL_generic_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_PBL_generic_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_phys_time_vary.scm.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_radiation_surface.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rad_time_vary.scm.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmgp_cloud_mp.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmgp_cloud_overlap.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmg_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmgp_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmgp_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmg_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmgp_setup.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_rrtmg_setup.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_SCNV_generic_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_SCNV_generic_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_stochastics.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_interstitial_1.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_interstitial_2.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_interstitial_3.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_interstitial_4.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_interstitial_5.meta +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_interstitial_phys_reset.meta +#/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_interstitial_rad_reset.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_stateout_reset.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_suite_stateout_update.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_surface_composites_inter.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_surface_composites_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_surface_composites_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_surface_generic_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_surface_generic_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_surface_loop_control_part1.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_surface_loop_control_part2.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/GFS_time_vary_pre.scm.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/gwdc.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/gwdc_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/gwdc_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/gwdps.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/h2ophys.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/hedmf.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/lsm_noah.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/lsm_ruc.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/maximum_hourly_diagnostics.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/m_micro.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/m_micro_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/m_micro_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/moninshoc.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/mp_fer_hires.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/mp_nssl.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/mp_thompson.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/mp_thompson_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/mp_thompson_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/myjpbl_wrapper.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/myjsfc_wrapper.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/mynnedmf_wrapper.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/mynnsfc_wrapper.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/noahmpdrv.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/ozphys_2015.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/ozphys.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/phys_tend.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/radlw_main.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/radsw_main.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rad_sw_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rascnv.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rayleigh_damp.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rrtmg_lw_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rrtmg_lw_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rrtmgp_aerosol_optics.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rrtmgp_lw_main.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rrtmgp_sw_main.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/rrtmg_sw_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/samfdeepcnv.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/samfshalcnv.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sascnvn.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/satmedmfvdif.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/satmedmfvdifq.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/scm_sfc_flux_spec.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_cice.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_diag.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_diag_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_diff.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_nst.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_nst_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_nst_pre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_ocean.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sfc_sice.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sgscloud_radpost.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/sgscloud_radpre.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/shalcnv.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/shinhongvdif.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/shoc.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/ugwpv1_gsldrag.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/ugwpv1_gsldrag_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/unified_ugwp.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/unified_ugwp_post.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/ysuvdif.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/zhaocarr_gscond.meta +/glade/u/home/dswales/Projects/framework/capgen/capgen_in_SCM/ccpp-scm/ccpp/physics/physics/zhaocarr_precpd.meta diff --git a/scm/src/CCPP_typedefs.F90 b/scm/src/CCPP_typedefs.F90 index 4cfaeacd7..a7f0e2bbc 100644 --- a/scm/src/CCPP_typedefs.F90 +++ b/scm/src/CCPP_typedefs.F90 @@ -17,21 +17,45 @@ module CCPP_typedefs implicit none - private - ! To ensure that these values match what's in the physics, array ! sizes are compared in the auto-generated physics caps in debug mode ! from module_radiation_aerosols integer, parameter :: NF_AESW = 3 integer, parameter :: NF_AELW = 3 + integer :: iaer_tau = 1 + integer :: iaer_ssa = 2 + integer :: iaer_g = 3 integer, parameter :: NSPC = 5 integer, parameter :: NSPC1 = NSPC + 1 ! from module_radiation_clouds integer, parameter :: NF_CLDS = 9 + integer :: icld_cfrac = 1 + integer :: icld_lwp = 2 + integer :: icld_reliq = 3 + integer :: icld_iwp = 4 + integer :: icld_reice = 5 + integer :: icld_rwp = 6 + integer :: icld_rerain = 7 + integer :: icld_swp = 8 + integer :: icld_resnow = 9 ! from module_radiation_gases integer, parameter :: NF_VGAS = 10 - ! from module_radiation_surface + integer :: igas_co2 = 1 + integer :: igas_n2o = 2 + integer :: igas_ch4 = 3 + integer :: igas_o2 = 4 + integer :: igas_co = 5 + integer :: igas_cfc11 = 6 + integer :: igas_cfc12 = 7 + integer :: igas_cfc22 = 8 + integer :: igas_ccl4 = 9 + integer :: igas_cfc113 = 10 + ! from module_radiation_surface integer, parameter :: NF_ALBD = 4 + integer :: ialb_nirdir = 1 + integer :: ialb_nirdif = 2 + integer :: ialb_uvvisdir = 3 + integer :: ialb_uvvisdif = 4 ! GFS_interstitial_type !< fields required to replace interstitial code in GFS_{physics,radiation}_driver.F90 in CCPP public GFS_interstitial_type @@ -40,7 +64,6 @@ module CCPP_typedefs !! \htmlinclude GFS_interstitial_type.html !! type GFS_interstitial_type - real (kind=kind_phys), pointer :: adjsfculw_land(:) => null() !< real (kind=kind_phys), pointer :: adjsfculw_ice(:) => null() !< real (kind=kind_phys), pointer :: adjsfculw_water(:) => null() !< @@ -147,7 +170,7 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: fm10_water(:) => null() !< real (kind=kind_phys) :: frain !< real (kind=kind_phys), pointer :: frland(:) => null() !< - real (kind=kind_phys), pointer :: fscav(:) => null() !< + real (kind=kind_phys), pointer :: fscavv(:) => null() !< real (kind=kind_phys), pointer :: fswtr(:) => null() !< real (kind=kind_phys), pointer :: gabsbdlw(:) => null() !< real (kind=kind_phys), pointer :: gabsbdlw_ice(:) => null() !< @@ -259,7 +282,7 @@ module CCPP_typedefs logical :: max_hourly_reset !< logical :: ext_diag_thompson_reset !< real (kind=kind_phys), pointer :: rhc(:,:) => null() !< - real (kind=kind_phys), pointer :: runoff(:) => null() !< + real (kind=kind_phys), pointer :: runofff(:) => null() !< real (kind=kind_phys), pointer :: save_q(:,:,:) => null() !< real (kind=kind_phys), pointer :: save_t(:,:) => null() !< real (kind=kind_phys), pointer :: save_tcp(:,:) => null() !< @@ -331,16 +354,16 @@ module CCPP_typedefs real (kind=kind_phys), pointer :: dtdt_ngw(:,:) => null() !< real (kind=kind_phys), pointer :: kdis_ngw(:,:) => null() !< - real (kind=kind_phys), pointer :: tau_oss(: ) => null() !< instantaneous momentum flux due to OSS - real (kind=kind_phys), pointer :: tau_tofd(:) => null() !< instantaneous momentum flux due to TOFD - real (kind=kind_phys), pointer :: tau_mtb(:) => null() !< instantaneous momentum of mountain blocking drag - real (kind=kind_phys), pointer :: tau_ogw(:) => null() !< instantaneous momentum flux of OGWs - real (kind=kind_phys), pointer :: tau_ngw(:) => null() !< instantaneous momentum flux of NGWs + real (kind=kind_phys), pointer :: tau_ossi(: ) => null() !< instantaneous momentum flux due to OSS + real (kind=kind_phys), pointer :: tau_tofdi(:) => null() !< instantaneous momentum flux due to TOFD + real (kind=kind_phys), pointer :: tau_mtbi(:) => null() !< instantaneous momentum of mountain blocking drag + real (kind=kind_phys), pointer :: tau_ogwi(:) => null() !< instantaneous momentum flux of OGWs + real (kind=kind_phys), pointer :: tau_ngwi(:) => null() !< instantaneous momentum flux of NGWs real (kind=kind_phys), pointer :: zngw(:) => null() !< launch levels of NGWs - real (kind=kind_phys), pointer :: zmtb(:) => null() !< mountain blocking height - real (kind=kind_phys), pointer :: zlwb(:) => null() !< low level wave breaking height - real (kind=kind_phys), pointer :: zogw(:) => null() !< height of OGW-launch + real (kind=kind_phys), pointer :: zmtbb(:) => null() !< mountain blocking height + real (kind=kind_phys), pointer :: zlwbb(:) => null() !< low level wave breaking height + real (kind=kind_phys), pointer :: zogww(:) => null() !< height of OGW-launch real (kind=kind_phys), pointer :: dudt_mtb(:,:) => null() !< daily aver u-wind tend due to mountain blocking real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS @@ -549,7 +572,7 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model) allocate (Interstitial%fm10_land (IM)) allocate (Interstitial%fm10_water (IM)) allocate (Interstitial%frland (IM)) - allocate (Interstitial%fscav (Interstitial%nscav)) + allocate (Interstitial%fscavv (Interstitial%nscav)) allocate (Interstitial%fswtr (Interstitial%nscav)) allocate (Interstitial%gabsbdlw (IM)) allocate (Interstitial%gabsbdlw_ice (IM)) @@ -610,7 +633,7 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model) allocate (Interstitial%rb_land (IM)) allocate (Interstitial%rb_water (IM)) allocate (Interstitial%rhc (IM,Model%levs)) - allocate (Interstitial%runoff (IM)) + allocate (Interstitial%runofff (IM)) allocate (Interstitial%save_q (IM,Model%levs,Model%ntrac)) allocate (Interstitial%save_t (IM,Model%levs)) allocate (Interstitial%save_tcp (IM,Model%levs)) @@ -729,16 +752,16 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model) end if ! UGWP common - allocate (Interstitial%tau_mtb (IM)) - allocate (Interstitial%tau_ogw (IM)) - allocate (Interstitial%tau_tofd (IM)) - allocate (Interstitial%tau_ngw (IM)) - allocate (Interstitial%tau_oss (IM)) + allocate (Interstitial%tau_mtbi (IM)) + allocate (Interstitial%tau_ogwi (IM)) + allocate (Interstitial%tau_tofdi (IM)) + allocate (Interstitial%tau_ngwi (IM)) + allocate (Interstitial%tau_ossi (IM)) allocate (Interstitial%dudt_mtb (IM,Model%levs)) allocate (Interstitial%dudt_tms (IM,Model%levs)) - allocate (Interstitial%zmtb (IM) ) - allocate (Interstitial%zlwb (IM) ) - allocate (Interstitial%zogw (IM) ) + allocate (Interstitial%zmtbb (IM) ) + allocate (Interstitial%zlwbb (IM) ) + allocate (Interstitial%zogww (IM) ) allocate (Interstitial%zngw (IM) ) ! CIRES UGWP v1 @@ -794,7 +817,7 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model) allocate (Interstitial%ncpi (IM,Model%levs)) allocate (Interstitial%ncpl (IM,Model%levs)) end if - if (Model%lsm == Model%lsm_noahmp) then + if (Model%lsm == Model%ilsm_noahmp) then allocate (Interstitial%t2mmp (IM)) allocate (Interstitial%q2mp (IM)) end if @@ -1245,7 +1268,7 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model) Interstitial%fm10_land = Model%huge Interstitial%fm10_water = Model%huge Interstitial%frland = clear_val - Interstitial%fscav = clear_val + Interstitial%fscavv = clear_val Interstitial%fswtr = clear_val Interstitial%gabsbdlw = clear_val Interstitial%gabsbdlw_ice = clear_val @@ -1294,7 +1317,7 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model) Interstitial%rb_land = Model%huge Interstitial%rb_water = Model%huge Interstitial%rhc = clear_val - Interstitial%runoff = clear_val + Interstitial%runofff = clear_val Interstitial%save_q = clear_val Interstitial%save_t = clear_val Interstitial%save_tcp = clear_val @@ -1343,16 +1366,16 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model) Interstitial%ztmax_water = clear_val ! UGWP common - Interstitial%tau_mtb = clear_val - Interstitial%tau_ogw = clear_val - Interstitial%tau_tofd = clear_val - Interstitial%tau_ngw = clear_val - Interstitial%tau_oss = clear_val + Interstitial%tau_mtbi = clear_val + Interstitial%tau_ogwi = clear_val + Interstitial%tau_tofdi = clear_val + Interstitial%tau_ngwi = clear_val + Interstitial%tau_ossi = clear_val Interstitial%dudt_mtb = clear_val Interstitial%dudt_tms = clear_val - Interstitial%zmtb = clear_val - Interstitial%zlwb = clear_val - Interstitial%zogw = clear_val + Interstitial%zmtbb = clear_val + Interstitial%zlwbb = clear_val + Interstitial%zogww = clear_val Interstitial%zngw = clear_val ! CIRES UGWP v1 @@ -1408,7 +1431,7 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model) Interstitial%ncpi = clear_val Interstitial%ncpl = clear_val end if - if (Model%lsm == Model%lsm_noahmp) then + if (Model%lsm == Model%ilsm_noahmp) then Interstitial%t2mmp = clear_val Interstitial%q2mp = clear_val end if diff --git a/scm/src/CCPP_typedefs.meta b/scm/src/CCPP_typedefs.meta index adffe90c2..ab97f2604 100644 --- a/scm/src/CCPP_typedefs.meta +++ b/scm/src/CCPP_typedefs.meta @@ -239,63 +239,63 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[clouds(:,:,1)] +[clouds(:,:,index_for_cloud_fraction_in_cloud_data_array)] standard_name = total_cloud_fraction long_name = layer total cloud fraction units = frac dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,2)] +[clouds(:,:,index_for_cloud_liquid_water_path_in_cloud_data_array)] standard_name = cloud_liquid_water_path long_name = layer cloud liquid water path units = g m-2 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,3)] +[clouds(:,:,index_for_cloud_liquid_effective_radius_in_cloud_data_array)] standard_name = mean_effective_radius_for_liquid_cloud long_name = mean effective radius for liquid cloud units = um dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,4)] +[clouds(:,:,index_for_cloud_ice_water_path_in_cloud_data_array)] standard_name = cloud_ice_water_path long_name = layer cloud ice water path units = g m-2 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,5)] +[clouds(:,:,index_for_cloud_ice_effective_radius_in_cloud_data_array)] standard_name = mean_effective_radius_for_ice_cloud long_name = mean effective radius for ice cloud units = um dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,6)] +[clouds(:,:,index_for_cloud_rain_water_path_in_cloud_data_array)] standard_name = cloud_rain_water_path long_name = cloud rain water path units = g m-2 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,7)] +[clouds(:,:,index_for_cloud_rain_effective_radius_in_cloud_data_array)] standard_name = mean_effective_radius_for_rain_drop long_name = mean effective radius for rain drop units = um dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,8)] +[clouds(:,:,index_for_cloud_snow_water_path_in_cloud_data_array)] standard_name = cloud_snow_water_path long_name = cloud snow water path units = g m-2 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[clouds(:,:,9)] +[clouds(:,:,index_for_cloud_snow_effective_radius_in_cloud_data_array)] standard_name = mean_effective_radius_for_snow_flake long_name = mean effective radius for snow flake units = um @@ -774,21 +774,21 @@ dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) type = real kind = kind_phys -[faerlw(:,:,:,1)] +[faerlw(:,:,:,index_for_aerosol_optical_depth_in_aer_array)] standard_name = aerosol_optical_depth_for_longwave_bands_01_16 long_name = aerosol optical depth for longwave bands 01-16 units = none dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys -[faerlw(:,:,:,2)] +[faerlw(:,:,:,index_for_aerosol_single_scattering_albedo_in_aer_array)] standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 long_name = aerosol single scattering albedo for longwave bands 01-16 units = frac dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) type = real kind = kind_phys -[faerlw(:,:,:,3)] +[faerlw(:,:,:,index_for_aerosol_asymmetry_parameter_in_aer_array)] standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 long_name = aerosol asymmetry parameter for longwave bands 01-16 units = none @@ -802,21 +802,21 @@ dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) type = real kind = kind_phys -[faersw(:,:,:,1)] +[faersw(:,:,:,index_for_aerosol_optical_depth_in_aer_array)] standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 long_name = aerosol optical depth for shortwave bands 01-16 units = none dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys -[faersw(:,:,:,2)] +[faersw(:,:,:,index_for_aerosol_single_scattering_albedo_in_aer_array)] standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 long_name = aerosol single scattering albedo for shortwave bands 01-16 units = frac dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) type = real kind = kind_phys -[faersw(:,:,:,3)] +[faersw(:,:,:,index_for_aerosol_asymmetry_parameter_in_aer_array)] standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 long_name = aerosol asymmetry parameter for shortwave bands 01-16 units = none @@ -959,7 +959,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[fscav] +[fscavv] standard_name = fraction_of_tracer_scavenged long_name = fraction of the tracer (aerosols) that is scavenged by convection units = km-1 @@ -1022,70 +1022,70 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[gasvmr(:,:,1)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_co2_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_co2 long_name = volume mixing ratio co2 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,2)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_n2o_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_n2o long_name = volume mixing ratio no2 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,3)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_ch4_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_ch4 long_name = volume mixing ratio ch4 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,4)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_o2_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_o2 long_name = volume mixing ratio o2 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,5)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_co_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_co long_name = volume mixing ratio co units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,6)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_cfc11_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_cfc11 long_name = volume mixing ratio cfc11 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,7)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_cfc12_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_cfc12 long_name = volume mixing ratio cfc12 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,8)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_cfc22_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_cfc22 long_name = volume mixing ratio cfc22 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,9)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_ccl4_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_ccl4 long_name = volume mixing ratio ccl4 units = m3 m-3 dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) type = real kind = kind_phys -[gasvmr(:,:,10)] +[gasvmr(:,:,index_for_volume_mixing_ratio_of_cfc113_in_gasvmr_array)] standard_name = volume_mixing_ratio_of_cfc113 long_name = volume mixing ratio cfc113 units = m3 m-3 @@ -1781,14 +1781,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[rho1] - standard_name = air_density_at_lowest_model_layer - long_name = air density at lowest model layer - units = kg m-3 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[runoff] +[runofff] standard_name = surface_runoff_flux long_name = surface runoff flux units = kg m-2 s-1 @@ -1899,28 +1892,28 @@ dimensions = (horizontal_loop_extent,number_of_components_for_surface_albedo) type = real kind = kind_phys -[sfcalb(:,1)] +[sfcalb(:,index_for_surface_albedo_due_to_near_ir_direct)] standard_name = surface_albedo_due_to_near_IR_direct long_name = surface albedo due to near IR direct beam units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[sfcalb(:,2)] +[sfcalb(:,index_for_surface_albedo_due_to_near_ir_diffuse)] standard_name = surface_albedo_due_to_near_IR_diffused long_name = surface albedo due to near IR diffused beam units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[sfcalb(:,3)] +[sfcalb(:,index_for_surface_albedo_due_to_uv_and_vis_direct)] standard_name = surface_albedo_due_to_UV_and_VIS_direct long_name = surface albedo due to UV+VIS direct beam units = frac dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[sfcalb(:,4)] +[sfcalb(:,index_for_surface_albedo_due_to_uv_and_vis_diffuse)] standard_name = surface_albedo_due_to_UV_and_VIS_diffused long_name = surface albedo due to UV+VIS diffused beam units = frac @@ -2282,7 +2275,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[zmtb] +[zmtbb] standard_name = height_of_mountain_blocking long_name = height of mountain blocking drag units = m @@ -2321,14 +2314,14 @@ type = real kind = kind_phys active = (flag_for_unified_gravity_wave_physics_diagnostics .or. flag_for_ugwp_version_0 .or. flag_for_ugwp_version_0_nonorographic_gwd .or. flag_for_ugwp_version_1) -[zlwb] +[zlwbb] standard_name = height_of_low_level_wave_breaking long_name = height of low level wave breaking units = m dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[zogw] +[zogww] standard_name = height_of_launch_level_of_orographic_gravity_wave long_name = height of launch level of orographic gravity wave units = m @@ -2342,35 +2335,35 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[tau_tofd] +[tau_tofdi] standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag long_name = instantaneous momentum flux due to TOFD units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[tau_mtb] +[tau_mtbi] standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag long_name = instantaneous momentum flux due to mountain blocking drag units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[tau_ogw] +[tau_ogwi] standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag long_name = instantaneous momentum flux due to orographic gravity wave drag units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[tau_oss] +[tau_ossi] standard_name = momentum_flux_due_to_subgrid_scale_orographic_gravity_wave_drag long_name = momentum flux or stress due to SSO including OBL-OSS-OFD units = Pa dimensions = (horizontal_loop_extent) type = real kind = kind_phys -[tau_ngw] +[tau_ngwi] standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave long_name = instantaneous momentum flux due to nonstationary gravity waves units = Pa @@ -2865,9 +2858,159 @@ [ccpp-arg-table] name = CCPP_typedefs type = module -[GFS_interstitial_type] - standard_name = GFS_interstitial_type - long_name = definition of type GFS_interstitial_type - units = DDT +[icld_cfrac] + standard_name = index_for_cloud_fraction_in_cloud_data_array + long_name = index for cloud fraction in cloud data array + units = count + dimensions = () + type = integer +[icld_lwp] + standard_name = index_for_cloud_liquid_water_path_in_cloud_data_array + long_name = index for cloud LWP in cloud data array + units = count + dimensions = () + type = integer +[icld_reliq] + standard_name = index_for_cloud_liquid_effective_radius_in_cloud_data_array + long_name = index for cloud liquid effective radius in cloud data array + units = count + dimensions = () + type = integer +[icld_iwp] + standard_name = index_for_cloud_ice_water_path_in_cloud_data_array + long_name = index for cloud IWP in cloud data array + units = count + dimensions = () + type = integer +[icld_reice] + standard_name = index_for_cloud_ice_effective_radius_in_cloud_data_array + long_name = index for cloud ice effective radius in cloud data array + units = count + dimensions = () + type = integer +[icld_rwp] + standard_name = index_for_cloud_rain_water_path_in_cloud_data_array + long_name = index for cloud rain water path in cloud data array + units = count + dimensions = () + type = integer +[icld_rerain] + standard_name = index_for_cloud_rain_effective_radius_in_cloud_data_array + long_name = index for cloud rain effective radius in cloud data array + units = count + dimensions = () + type = integer +[icld_swp] + standard_name = index_for_cloud_snow_water_path_in_cloud_data_array + long_name = index for cloud snow water path in cloud data array + units = count + dimensions = () + type = integer +[icld_resnow] + standard_name = index_for_cloud_snow_effective_radius_in_cloud_data_array + long_name = index for cloud snow effective radius in cloud data array + units = count + dimensions = () + type = integer +[ialb_nirdir] + standard_name = index_for_surface_albedo_due_to_near_ir_direct + long_name = index for surface albedo due to near IR direct beam + units = count + dimensions = () + type = integer +[ialb_nirdif] + standard_name = index_for_surface_albedo_due_to_near_ir_diffuse + long_name = index for surface albedo due to near IR diffuse beam + units = count + dimensions = () + type = integer +[ialb_uvvisdir] + standard_name = index_for_surface_albedo_due_to_uv_and_vis_direct + long_name = index for surface albedo due to UV+VIS direct beam + units = count + dimensions = () + type = integer +[ialb_uvvisdif] + standard_name = index_for_surface_albedo_due_to_uv_and_vis_diffuse + long_name = index for surface albedo due to UV+VIS diffuse beam + units = count + dimensions = () + type = integer +[iaer_tau] + standard_name = index_for_aerosol_optical_depth_in_aer_array + long_name = index into aerosol array for aerosol optical depth + units = count + dimensions = () + type = integer +[iaer_ssa] + standard_name = index_for_aerosol_single_scattering_albedo_in_aer_array + long_name = index into aerosol array for aerosol single scattering albedo + units = count + dimensions = () + type = integer +[iaer_g] + standard_name = index_for_aerosol_asymmetry_parameter_in_aer_array + long_name = index into aerosol array for aerosol asymmetry_parameter + units = count + dimensions = () + type = integer +[igas_co2] + standard_name = index_for_volume_mixing_ratio_of_co2_in_gasvmr_array + long_name = index for volume mixing ratio co2 + units = count + dimensions = () + type = integer +[igas_n2o] + standard_name = index_for_volume_mixing_ratio_of_n2o_in_gasvmr_array + long_name = index for volume mixing ratio no2 + units = count + dimensions = () + type = integer +[igas_ch4] + standard_name = index_for_volume_mixing_ratio_of_ch4_in_gasvmr_array + long_name = index for volume mixing ratio ch4 + units = count + dimensions = () + type = integer +[igas_o2] + standard_name = index_for_volume_mixing_ratio_of_o2_in_gasvmr_array + long_name = index for volume mixing ratio o2 + units = count dimensions = () - type = GFS_interstitial_type + type = integer +[igas_co] + standard_name = index_for_volume_mixing_ratio_of_co_in_gasvmr_array + long_name = index for volume mixing ratio co + units = count + dimensions = () + type = integer +[igas_cfc11] + standard_name = index_for_volume_mixing_ratio_of_cfc11_in_gasvmr_array + long_name = index for volume mixing ratio cfc11 + units = count + dimensions = () + type = integer +[igas_cfc12] + standard_name = index_for_volume_mixing_ratio_of_cfc12_in_gasvmr_array + long_name = index for volume mixing ratio cfc12 + units = count + dimensions = () + type = integer +[igas_cfc22] + standard_name = index_for_volume_mixing_ratio_of_cfc22_in_gasvmr_array + long_name = index for volume mixing ratio cfc22 + units = count + dimensions = () + type = integer +[igas_ccl4] + standard_name = index_for_volume_mixing_ratio_of_ccl4_in_gasvmr_array + long_name = index for volume mixing ratio ccl4 + units = count + dimensions = () + type = integer +[igas_cfc113] + standard_name = index_for_volume_mixing_ratio_of_cfc113_in_gasvmr_array + long_name = index for volume mixing ratio cfc113 + units = count + dimensions = () + type = integer diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index 4938e1b57..f64208fd1 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -5,60 +5,213 @@ project(scm LANGUAGES C Fortran) set(PROJECT "CCPP-SCM") -#################################################################### -# Begin CCPP prebuild step # -#################################################################### -if(DEFINED CCPP_SUITES) - if (${CCPP_SUITES} MATCHES "ALL") - message("Calling CCPP code generator (ccpp_prebuild.py) for all available suites ...") - else() - set(_ccpp_suites_arg "--suites=${CCPP_SUITES}") - message("Calling CCPP code generator (ccpp_prebuild.py) for suites ${_ccpp_suites_arg} ...") - endif() - unset(CCPP_SUITES CACHE) -else() - execute_process( - COMMAND scm/src/suite_info.py - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../.. - OUTPUT_VARIABLE suite_string - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - set(_ccpp_suites_arg "--suites=${suite_string}") - message("Calling CCPP code generator (ccpp_prebuild.py) for suites listed in scm/src/suite_info.py: ${_ccpp_suites_arg}.") -endif() -# Run CCPP prebuild.py -message (STATUS "Running ccpp_prebuild.py for CCPP") -# Make the directories where the ccpp_prebuild.py script wants to write caps and make snippets -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ccpp/physics/physics) -if (NOT EXISTS "${CMAKE_SOURCE_DIR}/../../ccpp/framework/scripts/ccpp_prebuild.py") - message( FATAL_ERROR "ccpp_prebuild.py script does not exist, did you check out the code recursively?" ) -endif() -if (${CMAKE_BUILD_TYPE} MATCHES "Debug") - execute_process( - COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py ${_ccpp_suites_arg} --builddir=${CMAKE_CURRENT_BINARY_DIR} --debug --verbose - OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out - ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../.. - RESULT_VARIABLE return_code - ) -else() - execute_process( - COMMAND ccpp/framework/scripts/ccpp_prebuild.py --config=ccpp/config/ccpp_prebuild_config.py ${_ccpp_suites_arg} --builddir=${CMAKE_CURRENT_BINARY_DIR} - OUTPUT_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.out - ERROR_FILE ${PROJECT_BINARY_DIR}/ccpp_prebuild.err - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../.. - RESULT_VARIABLE return_code - ) +#------------------------------------------------------------------------------ +# +# Set where the CCPP Framework lives +# +#------------------------------------------------------------------------------ +get_filename_component(TEST_ROOT "${CMAKE_SOURCE_DIR}" DIRECTORY) +get_filename_component(CCPP_ROOT "${TEST_ROOT}" DIRECTORY) + +#------------------------------------------------------------------------------ +# +# Create list of SCHEME_FILES, HOST_FILES, and SUITE_FILES +# Paths should be relative to CMAKE_SOURCE_DIR (this file's directory) +# +#------------------------------------------------------------------------------ +LIST(APPEND SCHEME_FILES "${CCPP_ROOT}/ccpp/config/scheme_files.txt") +LIST(APPEND HOST_FILES "${CCPP_ROOT}/ccpp/config/host_files.txt") +LIST(APPEND SUITE_FILES "${CCPP_ROOT}/ccpp/suites/suite_SCM_GFS_v16.xml") + +#------------------------------------------------------------------------------ +# +# End of project-specific input +# +#------------------------------------------------------------------------------ + +# By default, no verbose output +SET(VERBOSITY 0 CACHE STRING "Verbosity level of output (default: 0)") +# By default, generated caps go in ccpp subdir +SET(CCPP_CAP_FILES "${CMAKE_BINARY_DIR}/ccpp" CACHE + STRING "Location of CCPP-generated cap files") + +SET(CCPP_FRAMEWORK ${CCPP_ROOT}/ccpp/framework/scripts) + +# DJS2024: Haven't tested Capgen in DEBUG mode wtih SCM. *ToDo* +#ADD_COMPILE_OPTIONS(-O0) + +if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") + MESSAGE(STATUS "gfortran being used.") + ADD_COMPILE_OPTIONS(-ggdb) + ADD_COMPILE_OPTIONS(-fbacktrace) + ADD_COMPILE_OPTIONS(-cpp) + ADD_COMPILE_OPTIONS(-fcray-pointer) + ADD_COMPILE_OPTIONS(-ffree-line-length-none) + ADD_COMPILE_OPTIONS(-fno-range-check) +elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel") + MESSAGE(STATUS "ifort being used.") + ADD_COMPILE_OPTIONS(-traceback) + ADD_COMPILE_OPTIONS(-fpp) + ADD_COMPILE_OPTIONS(-g) + ADD_COMPILE_OPTIONS(-fno-alias) + ADD_COMPILE_OPTIONS(-auto) + ADD_COMPILE_OPTIONS(-safe-cray-ptr) + ADD_COMPILE_OPTIONS(-ftz) + ADD_COMPILE_OPTIONS(-assume byterecl) + ADD_COMPILE_OPTIONS(-nowarn) + ADD_COMPILE_OPTIONS(-sox) + ADD_COMPILE_OPTIONS(-align) +else (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") + message (WARNING "This program has only been compiled with gfortran and ifort. If another compiler is needed, the appropriate flags SHOULD be added in ${CMAKE_SOURCE_DIR}/CMakeLists.txt") +endif (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") + +#------------------------------------------------------------------------------ +# CMake Modules +# Set the CMake module path +list(APPEND CMAKE_MODULE_PATH "${CCPP_FRAMEWORK}/cmake") +#------------------------------------------------------------------------------ +# Set OpenMP flags for C/C++/Fortran +if (OPENMP) + include(detect_openmp) + detect_openmp() + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}") + message(STATUS "Enable OpenMP support for C/C++/Fortran compiler") +else(OPENMP) + message (STATUS "Disable OpenMP support for C/C++/Fortran compiler") endif() -# Check return code from CCPP prebuild.py -if(return_code EQUAL 0) - message (STATUS "CCPP prebuild step completed successfully") -else(return_code EQUAL 0) - message (FATAL_ERROR "CCPP prebuild step failed, check ccpp_prebuild.out/ccpp_prebuild.err") -endif(return_code EQUAL 0) +#------------------------------------------------------------------------------ +# +# Create metadata and source file lists from ${SCHEME_FILES} +# +#------------------------------------------------------------------------------ +FOREACH(FILE ${SCHEME_FILES}) + FILE(STRINGS ${FILE} FILENAMES) + LIST(APPEND SCHEME_FILENAMES ${FILENAMES}) + FOREACH(FILE ${SCHEME_FILENAMES}) + MATH(EXPR NSCHEME_FILES "${NSCHEME_FILES}+1") + ENDFOREACH(FILE) +ENDFOREACH(FILE) +# +MATH(EXPR FCOUNT 0) +FOREACH(FILE ${SCHEME_FILENAMES}) + # Set character seperator + MATH(EXPR FCOUNT "${FCOUNT}+1") + set(SEPERATOR "") +# if (${FCOUNT} EQUAL ${NSCHEME_FILES}) +# set(SEPERATOR "") +# endif() + # Source file list + string(CONCAT SCHEME_FILENAME ${CCPP_ROOT} "/" ${FILE} ${SEPERATOR} ) + string(REGEX REPLACE "\n$" "" SCHEME_FILENAME "${SCHEME_FILENAME}") + list(APPEND SCHEME_SOURCE ${SCHEME_FILENAME}) + # Meta file list + string(REGEX REPLACE "\\.[^.]*$" ".meta" METADATA_FILE ${FILE}) + string(CONCAT METADATA_FILENAME ${CCPP_ROOT} "/" ${METADATA_FILE} ${SEPERATOR} ) + list(APPEND SCHEME_METADATA ${METADATA_FILENAME}) +ENDFOREACH(FILE) +string(REPLACE ";" "," SCHEME_METADATA "${SCHEME_METADATA}") + +#------------------------------------------------------------------------------ +# +# Create metadata and source file lists from ${HOST_FILES} +# +#------------------------------------------------------------------------------ +FOREACH(FILE ${HOST_FILES}) + FILE(STRINGS ${FILE} FILENAMES) + LIST(APPEND HOST_FILENAMES "${FILENAMES}") + FOREACH(FILE ${HOST_FILENAMES}) + MATH(EXPR NHOST_FILES "${NHOST_FILES}+1") + ENDFOREACH(FILE) +ENDFOREACH(FILE) +# +MATH(EXPR FCOUNT 0) +FOREACH(FILE ${HOST_FILENAMES}) + # Set character seperator + MATH(EXPR FCOUNT "${FCOUNT}+1") + set(SEPERATOR "") +# if (${FCOUNT} EQUAL ${NHOST_FILES}) +# set(SEPERATOR "") +# endif() + string(CONCAT HOST_FILENAME ${CCPP_ROOT} "/" ${FILE} ${SEPERATOR} ) + list(APPEND HOST_SOURCE ${HOST_FILENAME}) + # + string(REGEX REPLACE "\\.[^.]*$" ".meta" METADATA_FILE ${FILE}) + string(CONCAT METADATA_FILENAME ${CCPP_ROOT} "/" ${METADATA_FILE} ${SEPERATOR} ) + list(APPEND HOST_METADATA ${METADATA_FILENAME}) +ENDFOREACH(FILE) +string(REPLACE ";" "," HOST_METADATA "${HOST_METADATA}") + +#------------------------------------------------------------------------------ +# +# Run ccpp_capgen +# +#------------------------------------------------------------------------------ + +string(REPLACE ";" "," SUITE_XML "${SUITE_FILES}") + +set(CAPGEN_CMD "${CCPP_FRAMEWORK}/ccpp_capgen.py") +list(APPEND CAPGEN_CMD "--host-files") +list(APPEND CAPGEN_CMD ${HOST_METADATA}) +list(APPEND CAPGEN_CMD "--scheme-files") +list(APPEND CAPGEN_CMD ${SCHEME_METADATA}) +list(APPEND CAPGEN_CMD "--suites") +list(APPEND CAPGEN_CMD "${SUITE_XML}") +list(APPEND CAPGEN_CMD "--host-name") +list(APPEND CAPGEN_CMD "SCM") +list(APPEND CAPGEN_CMD "--output-root") +list(APPEND CAPGEN_CMD "${CCPP_CAP_FILES}") +list(APPEND CAPGEN_CMD "--kind-type") +list(APPEND CAPGEN_CMD "kind_phys=REAL64") +list(APPEND CAPGEN_CMD "--kind-type") +list(APPEND CAPGEN_CMD "kind_dyn=REAL64") +list(APPEND CAPGEN_CMD "--kind-type") +list(APPEND CAPGEN_CMD "kind_sngl_prec=REAL32") +list(APPEND CAPGEN_CMD "--kind-type") +list(APPEND CAPGEN_CMD "kind_dbl_prec=REAL64") +while (VERBOSITY GREATER 0) + list(APPEND CAPGEN_CMD "--verbose") + MATH(EXPR VERBOSITY "${VERBOSITY} - 1") +endwhile () +string(REPLACE ";" " " CAPGEN_STRING "${CAPGEN_CMD}") + +MESSAGE(STATUS "Running: ${CAPGEN_STRING}") +EXECUTE_PROCESS(COMMAND ${CAPGEN_CMD} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE CAPGEN_OUT ERROR_VARIABLE CAPGEN_OUT RESULT_VARIABLE RES) +MESSAGE(STATUS "${CAPGEN_OUT}") +if (RES EQUAL 0) + MESSAGE(STATUS "CCPP cap generation completed") +else(RES EQUAL 0) + MESSAGE(FATAL_ERROR "CCPP cap generation FAILED: result = ${RES}") +endif(RES EQUAL 0) + +#------------------------------------------------------------------------------ +# +# Retrieve the list of files from datatable.xml and set to CCPP_CAPS +# +#------------------------------------------------------------------------------ +set(DTABLE_CMD "${CCPP_FRAMEWORK}/ccpp_datafile.py") +list(APPEND DTABLE_CMD "${CCPP_CAP_FILES}/datatable.xml") +list(APPEND DTABLE_CMD "--ccpp-files") +list(APPEND DTABLE_CMD "--separator=\\;") +string(REPLACE ";" " " DTABLE_STRING "${DTABLE_CMD}") +MESSAGE(STATUS "Running: ${DTABLE_STRING}") +EXECUTE_PROCESS(COMMAND ${DTABLE_CMD} OUTPUT_VARIABLE CCPP_CAPS + RESULT_VARIABLE RES + OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) +message(STATUS "CCPP_CAPS = ${CCPP_CAPS}") +if (RES EQUAL 0) + MESSAGE(STATUS "CCPP cap files retrieved") +else(RES EQUAL 0) + MESSAGE(FATAL_ERROR "CCPP cap file retrieval FAILED: result = ${RES}") +endif(RES EQUAL 0) + +MESSAGE(STATUS "CCPP capgen step complete") + #################################################################### -# End CCPP prebuild step # +# End CCPP capgen step # #################################################################### ENABLE_LANGUAGE(Fortran) @@ -71,35 +224,10 @@ find_package(NetCDF REQUIRED COMPONENTS C Fortran) find_package(bacio REQUIRED) find_package(sp REQUIRED) find_package(w3emc REQUIRED) -find_package(MPI REQUIRED) -if(NOT MPI_Fortran_HAVE_F08_MODULE) - message(FATAL_ERROR "MPI_F08 Required") -endif() - -find_package(MPI REQUIRED Fortran) -if(NOT MPI_Fortran_HAVE_F08_MODULE) - message(FATAL_ERROR "MPI implementation does not support the Fortran 2008 mpi_f08 interface") -endif() - -message(STATUS "MPI Include Path: ${MPI_INCLUDE_PATH}") -message(STATUS "MPI Libraries: ${MPI_LIBRARIES}") SET(CCPP_FRAMEWORK_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework) SET(CCPP_PHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics) -# Use rpaths on MacOSX -set(CMAKE_MACOSX_RPATH 1) - -#------------------------------------------------------------------------------ -# Set a default build type if none was specified -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - message(STATUS "Setting build type to 'Release' as none was specified.") - set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) - - # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") -endif() - INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/framework/src) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/physics) include_directories(${MPI_Fortran_INCLUDE_PATH}) @@ -144,22 +272,17 @@ set(SIMDMULTIARCH OFF CACHE BOOL "Enable multi-target SIMD instruction sets") #------------------------------------------------------------------------------ # Set compile options -if (32BIT) - add_definitions(-DSINGLE_PREC) - add_definitions(-DRTE_USE_SP) -endif() - if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ggdb -fbacktrace -cpp -fcray-pointer -ffree-line-length-none -fno-range-check") - + if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz") endif() - + if(NOT 32BIT) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8 -fdefault-double-8") endif() - + if (${CMAKE_BUILD_TYPE} MATCHES "Debug") set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -ffpe-trap=invalid,zero,overflow -fbounds-check") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0") @@ -167,7 +290,7 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") endif() - + set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) @@ -175,11 +298,11 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte -qno-opt-dynamic-align") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -sox -fp-model source") - + if(NOT 32BIT) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64") endif() - + if (${CMAKE_BUILD_TYPE} MATCHES "Debug") set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -check -check noarg_temp_created -check nopointer -warn -warn noerrors -fp-stack-check -fstack-protector-all -fpe0 -debug -ftrapuv -init=snan,arrays") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv") @@ -202,42 +325,11 @@ elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "Intel") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=core-avx-i") endif() endif() - - set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) - set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) - set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) - set(CMAKE_Fortran_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) - -elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "NVHPC") - if(ENABLE_NVIDIA_OPENACC MATCHES "true") - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -acc -Minfo=accel") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -acc -Minfo=accel") - else() - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - endif() - - if(NOT 32BIT) - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8") - endif() - - if (${CMAKE_BUILD_TYPE} MATCHES "Debug") - set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -O0 -g") - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g") - else() - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") - endif() - - set(MPI_C_COMPILER mpicc) - set(MPI_CXX_COMPILER mpicxx) - set(MPI_Fortran_COMPILER mpif90) - + set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_C_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) set(CMAKE_Fortran_FLAGS_BITFORBIT "-O2 -fPIC" CACHE STRING "" FORCE) - else (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") message (FATAL_ERROR "This program has only been compiled with gfortran and ifort. If another compiler is needed, the appropriate flags must be added in ${CMAKE_SOURCE_DIR}/CMakeLists.txt") endif (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") @@ -245,17 +337,15 @@ endif (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU") #------------------------------------------------------------------------------ # Set flag for 32bit dynamics build - if(32BIT) message(STATUS "Compile CCPP slow physics with 64-bit precision, fast physics with 32-bit precision") add_definitions(-DOVERLOAD_R4) if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") - # set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64 -no-prec-div -no-prec-sqrt") + set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64 -no-prec-div -no-prec-sqrt") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") - # set(CMAKE_Fortran_FLAGS_PHYSICS "-fdefault-real-8 -fdefault-double-8") + set(CMAKE_Fortran_FLAGS_PHYSICS "-fdefault-real-8 -fdefault-double-8") endif() set(CMAKE_Fortran_FLAGS_DYNAMICS "") - else() message(STATUS "Compile CCPP physics with 64-bit precision") remove_definitions(-DOVERLOAD_R8) @@ -280,7 +370,6 @@ endif() # How about using proper compile targets etc? #------------------------------------------------------------------------------ # Configure sources - ADD_SUBDIRECTORY(${CCPP_FRAMEWORK_SRC} ${CMAKE_BINARY_DIR}/ccpp/framework) ADD_SUBDIRECTORY(${CCPP_PHYSICS_SRC} ${CMAKE_BINARY_DIR}/ccpp/physics) ADD_DEPENDENCIES(ccpp_physics ccpp_framework) @@ -295,7 +384,7 @@ SET(scm_source_files scm.F90 scm_output.F90 ) -ADD_EXECUTABLE(scm ${scm_source_files} ccpp_static_api.F90) +ADD_EXECUTABLE(scm ${scm_source_files} ${CCPP_CAPS}) if(OPENMP) TARGET_LINK_LIBRARIES(scm PUBLIC OpenMP::OpenMP_Fortran) @@ -308,11 +397,12 @@ TARGET_LINK_LIBRARIES(scm ccpp_framework) TARGET_LINK_LIBRARIES(scm ccpp_physics) SET_TARGET_PROPERTIES(scm PROPERTIES - COMPILE_FLAGS "${CMAKE_Fortran_FLAGS}" - LINK_FLAGS "${CMAKE_Fortran_FLAGS}") + COMPILE_FLAGS "${CMAKE_Fortran_FLAGS}" + LINK_FLAGS "${CMAKE_Fortran_FLAGS}") ADD_CUSTOM_COMMAND( TARGET scm POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/run_scm.py ${CMAKE_CURRENT_BINARY_DIR}/run_scm.py) + diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 35f325f03..4694b889f 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -18,17 +18,17 @@ module GFS_typedefs ! This will be set later in GFS_Control%initialize, since ! it depends on the runtime config (Model%aero_in) - integer, private :: ntrcaer + integer, private :: ntrcaer_loc ! If these are changed to >99, need to adjust formatting string in GFS_diagnostics.F90 (and names in diag_tables) integer, parameter :: naux2dmax = 20 !< maximum number of auxiliary 2d arrays in output (for debugging) integer, parameter :: naux3dmax = 20 !< maximum number of auxiliary 3d arrays in output (for debugging) integer, parameter :: dfi_radar_max_intervals = 4 !< Number of radar-derived temperature tendency and/or convection suppression intervals. Do not change. + integer, parameter :: dfi_radar_max_intervals_plus_one = 5 real(kind=kind_phys), parameter :: limit_unspecified = 1e12 !< special constant for "namelist value was not provided" in radar-derived temperature tendency limit range - !> \section arg_table_GFS_typedefs !! \htmlinclude GFS_typedefs.html !! @@ -56,6 +56,9 @@ module GFS_typedefs integer, parameter :: LTP = 0 ! no extra top layer !integer, parameter :: LTP = 1 ! add an extra top layer + ! Index for surface + integer, parameter :: isfc_gfs = 1 + !---------------- ! Data Containers !---------------- @@ -80,6 +83,7 @@ module GFS_typedefs ! This container is the minimum set of data required from the dycore/atmosphere ! component to allow proper initialization of the GFS physics !-------------------------------------------------------------------------------- + !! \section arg_table_GFS_init_type !! \htmlinclude GFS_init_type.html !! @@ -245,6 +249,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: snodi (:) => null() !< snow depth over ice real (kind=kind_phys), pointer :: weasdi (:) => null() !< weasd over ice real (kind=kind_phys), pointer :: hprime (:,:) => null() !< orographic metrics + integer :: isubgrd_sigma = 1 !< Index into hprime for standard deviation of subgrid orography real (kind=kind_phys), pointer :: dust12m_in (:,:,:) => null() !< fengsha dust input real (kind=kind_phys), pointer :: emi_in (:,:) => null() !< anthropogenic background input real (kind=kind_phys), pointer :: smoke_RRFS(:,:,:) => null() !< RRFS fire input hourly @@ -496,7 +501,7 @@ module GFS_typedefs ! RRTMGP real (kind=kind_phys), pointer :: fluxlwUP_jac(:,:) => null() !< RRTMGP Jacobian of upward longwave all-sky flux - real (kind=kind_phys), pointer :: htrlw(:,:) => null() !< RRTMGP updated LW heating rate + real (kind=kind_phys), pointer :: hrlw(:,:) => null() !< RRTMGP updated LW heating rate real (kind=kind_phys), pointer :: tsfc_radtime(:) => null() !< RRTMGP surface temperature on radiation timestep real (kind=kind_phys), pointer :: fluxlwUP_radtime(:,:) => null() !< RRTMGP upward longwave all-sky flux profile real (kind=kind_phys), pointer :: fluxlwDOWN_radtime(:,:) => null() !< RRTMGP downward longwave all-sky flux profile @@ -665,16 +670,21 @@ module GFS_typedefs ! dtend_var_label ! Information about first dimension of dtidx !---------------------------------------------------------------- +!! \section arg_table_dtend_var_label +!! \htmlinclude dtend_var_label.html +!! type dtend_var_label character(len=20) :: name character(len=44) :: desc character(len=32) :: unit end type dtend_var_label - !---------------------------------------------------------------- ! dtend_process_label ! Information about second dimension of dtidx !---------------------------------------------------------------- +!! \section arg_table_dtend_process_label +!! \htmlinclude dtend_process_label.html +!! type dtend_process_label character(len=20) :: name character(len=44) :: desc @@ -699,7 +709,7 @@ module GFS_typedefs integer :: nthreads !< OpenMP threads available for physics integer :: nlunit !< unit for namelist character(len=64) :: fn_nml !< namelist filename for surface data cycling - character(len=:), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist + character(len=256), pointer, dimension(:) :: input_nml_file => null() !< character string containing full namelist !< for use with internal file reads integer :: input_nml_file_length !< length (number of lines) in namelist for internal reads integer :: logunit @@ -958,7 +968,7 @@ module GFS_typedefs real(kind=kind_phys) :: tcrf ! integer :: num_dfi_radar !< number of timespans with radar-prescribed temperature tendencies - real (kind=kind_phys) :: fh_dfi_radar(1+dfi_radar_max_intervals) !< begin+end of timespans to receive radar-prescribed temperature tendencies + real (kind=kind_phys) :: fh_dfi_radar(dfi_radar_max_intervals_plus_one) !< begin+end of timespans to receive radar-prescribed temperature tendencies logical :: do_cap_suppress !< enable convection suppression in GF scheme if fh_dfi_radar is specified real (kind=kind_phys) :: radar_tten_limits(2) !< radar_tten values outside this range (min,max) are discarded integer :: ix_dfi_radar(dfi_radar_max_intervals) = -1 !< Index within dfi_radar_tten of each timespan (-1 means "none") @@ -1017,9 +1027,9 @@ module GFS_typedefs !--- land/surface model parameters integer :: lsm !< flag for land surface model lsm=1 for noah lsm - integer :: lsm_noah=1 !< flag for NOAH land surface model - integer :: lsm_noahmp=2 !< flag for NOAH land surface model - integer :: lsm_ruc=3 !< flag for RUC land surface model + integer :: ilsm_noah=1 !< flag for NOAH land surface model + integer :: ilsm_noahmp=2 !< flag for NOAH land surface model + integer :: ilsm_ruc=3 !< flag for RUC land surface model integer :: lsoil !< number of soil layers integer :: ivegsrc !< ivegsrc = 0 => USGS, !< ivegsrc = 1 => IGBP (20 category) @@ -1215,6 +1225,9 @@ module GFS_typedefs !< (used if mstrat=.true.) real(kind=kind_phys) :: crtrh(3) !< critical relative humidity at the surface !< PBL top and at the top of the atmosphere + integer :: icrtrh_sfc = 1 !< Index into crtrh for surface + integer :: icrtrh_pbl = 2 !< Index into crtrh for PBL top + integer :: icrtrh_toa = 3 !< Index into crtrh for TOA real(kind=kind_phys) :: dlqf(2) !< factor for cloud condensate detrainment !< from cloud edges for RAS real(kind=kind_phys) :: psauras(2) !< [in] auto conversion coeff from ice to snow in ras @@ -1298,12 +1311,12 @@ module GFS_typedefs integer :: lsea integer :: nstf_name(5) !< flag 0 for no nst 1 for uncoupled nst and 2 for coupled NST !< nstf_name contains the NSST 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 = NSST analysis on, 0 = NSSTM analysis off - !< nstf_name(4) : zsea1 in mm - !< nstf_name(5) : zsea2 in mm + integer :: instf_opt !< nstf_name(instf_opt) : 0 = NSSTM off, 1 = NSSTM on but uncoupled + !< 2 = NSSTM on and coupled + integer :: instf_spinup !< nstf_name(instf_spinup) : 1 = NSSTM spin up on, 0 = NSSTM spin up off + integer :: instf_anlys !< nstf_name(instf_anlys) : 1 = NSST analysis on, 0 = NSSTM analysis off + integer :: instf_zs1_lb !< nstf_name(instf_zs1_lb) : lower bounds (in mm) + integer :: instf_zs2_ub !< nstf_name(instf_zs2_ub) : upper bounds (in mm) !--- fractional grid logical :: frac_grid !< flag for fractional grid logical :: frac_ice !< flag for fractional ice when fractional grid is not in use @@ -2183,6 +2196,7 @@ module GFS_typedefs !---------------- ! PUBLIC ENTITIES !---------------- + public GFS_init_type public GFS_statein_type, GFS_stateout_type, GFS_sfcprop_type, & GFS_coupling_type @@ -2479,13 +2493,13 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate (Sfcprop%weasd (IM)) allocate (Sfcprop%sncovr (IM)) allocate (Sfcprop%sncovr_ice (IM)) - if (Model%use_cice_alb .or. Model%lsm == Model%lsm_ruc) then + if (Model%use_cice_alb .or. Model%lsm == Model%ilsm_ruc) then allocate (Sfcprop%albdirvis_ice (IM)) allocate (Sfcprop%albdifvis_ice (IM)) allocate (Sfcprop%albdirnir_ice (IM)) allocate (Sfcprop%albdifnir_ice (IM)) endif - if (Model%lsm == Model%lsm_ruc) then + if (Model%lsm == Model%ilsm_ruc) then allocate (Sfcprop%sfalb_lnd (IM)) allocate (Sfcprop%sfalb_ice (IM)) allocate (Sfcprop%sfalb_lnd_bck (IM)) @@ -2504,13 +2518,13 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%weasd = clear_val Sfcprop%sncovr = clear_val Sfcprop%sncovr_ice = clear_val - if (Model%use_cice_alb .or. Model%lsm == Model%lsm_ruc) then + if (Model%use_cice_alb .or. Model%lsm == Model%ilsm_ruc) then Sfcprop%albdirvis_ice = clear_val Sfcprop%albdifvis_ice = clear_val Sfcprop%albdirnir_ice = clear_val Sfcprop%albdifnir_ice = clear_val endif - if (Model%lsm == Model%lsm_ruc) then + if (Model%lsm == Model%ilsm_ruc) then Sfcprop%sfalb_lnd = clear_val Sfcprop%sfalb_ice = clear_val Sfcprop%sfalb_lnd_bck = clear_val @@ -2573,21 +2587,21 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%dt_cool = zero Sfcprop%qrain = zero endif - if (Model%lsm == Model%lsm_noah .or. Model%lsm == Model%lsm_noahmp) then + if (Model%lsm == Model%ilsm_noah .or. Model%lsm == Model%ilsm_noahmp) then allocate (Sfcprop%rca (IM)) Sfcprop%rca = clear_val end if - if (Model%lsm == Model%lsm_noah) then + if (Model%lsm == Model%ilsm_noah) then allocate (Sfcprop%xlaixy (IM)) Sfcprop%xlaixy = clear_val end if - if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp .or. & + if (Model%lsm == Model%ilsm_ruc .or. Model%lsm == Model%ilsm_noahmp .or. & (Model%lkm>0 .and. Model%iopt_lake==Model%iopt_lake_clm)) then allocate(Sfcprop%raincprv (IM)) allocate(Sfcprop%rainncprv (IM)) Sfcprop%raincprv = clear_val Sfcprop%rainncprv = clear_val - if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then + if (Model%lsm == Model%ilsm_ruc .or. Model%lsm == Model%ilsm_noahmp) then allocate(Sfcprop%iceprv (IM)) allocate(Sfcprop%snowprv (IM)) allocate(Sfcprop%graupelprv(IM)) @@ -2598,7 +2612,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) end if ! Noah MP allocate and init when used ! - if (Model%lsm == Model%lsm_noahmp ) then + if (Model%lsm == Model%ilsm_noahmp ) then allocate (Sfcprop%snowxy (IM)) allocate (Sfcprop%tvxy (IM)) @@ -2693,7 +2707,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate(Sfcprop%semisbase(IM)) Sfcprop%semisbase = clear_val - if (Model%lsm == Model%lsm_ruc) then + if (Model%lsm == Model%ilsm_ruc) then ! For land surface models with different numbers of levels than the four NOAH levels allocate (Sfcprop%wetness (IM)) allocate (Sfcprop%sh2o (IM,Model%lsoil_lsm)) @@ -2903,12 +2917,12 @@ subroutine coupling_create (Coupling, IM, Model) allocate (Coupling%fluxlwUP_radtime (IM, Model%levs+1)) allocate (Coupling%fluxlwDOWN_radtime (IM, Model%levs+1)) allocate (Coupling%fluxlwUP_jac (IM, Model%levs+1)) - allocate (Coupling%htrlw (IM, Model%levs)) + allocate (Coupling%hrlw (IM, Model%levs)) allocate (Coupling%tsfc_radtime (IM)) Coupling%fluxlwUP_radtime = clear_val Coupling%fluxlwDOWN_radtime = clear_val Coupling%fluxlwUP_jac = clear_val - Coupling%htrlw = clear_val + Coupling%hrlw = clear_val Coupling%tsfc_radtime = clear_val endif @@ -3809,12 +3823,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & 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(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 + !< nstf_name(instf_opt) : 0 = NSSTM off, 1 = NSSTM on but uncoupled + !< 2 = NSSTM on and coupled + !< nstf_name(instf_spinup) : 1 = NSSTM spin up on, 0 = NSSTM spin up off + !< nstf_name(instf_anlys) : 1 = NSSTM analysis on, 0 = NSSTM analysis off + !< nstf_name(instf_zs1_lb) : lower bounds (in mm) + !< nstf_name(instf_zs2_ub) : upper bounds (in mm) + integer :: instf_opt = 1 + integer :: instf_spinup = 2 + integer :: instf_anlys = 3 + integer :: instf_zs1_lb = 4 + integer :: instf_zs2_ub = 5 !--- fractional grid logical :: frac_grid = .false. !< flag for fractional grid logical :: frac_ice = .true. !< flag for lake fractional ice when fractional grid is not in use @@ -4535,11 +4554,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%iaerclm = iaerclm if (iaer/1000 == 1 .or. Model%iccn == 2) then Model%iaerclm = .true. - ntrcaer = ntrcaerm + ntrcaer_loc = ntrcaerm else if (iaer/1000 == 2) then - ntrcaer = ntrcaerm + ntrcaer_loc = ntrcaerm else - ntrcaer = 1 + ntrcaer_loc = 1 endif Model%lalw1bd = lalw1bd Model%iaerflg = iaerflg @@ -4551,7 +4570,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%co2gbl_file = co2gbl_file Model%co2usr_file = co2usr_file Model%co2cyc_file = co2cyc_file - Model%ntrcaer = ntrcaer + Model%ntrcaer = ntrcaer_loc Model%idcor = idcor Model%dcorr_con = dcorr_con Model%icliq_sw = icliq_sw @@ -4752,7 +4771,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Flag to read leaf area index from input files (initial conditions) Model%rdlai = rdlai - if (Model%rdlai .and. .not. Model%lsm == Model%lsm_ruc) then + if (Model%rdlai .and. .not. Model%lsm == Model%ilsm_ruc) then write(0,*) 'Logic error: rdlai = .true. only works with RUC LSM' error stop end if @@ -4769,20 +4788,20 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Allocate variables to store depth/thickness of soil layers allocate (Model%zs (Model%lsoil_lsm)) allocate (Model%dzs(Model%lsoil_lsm)) - if (Model%lsm==Model%lsm_noah .or. Model%lsm==Model%lsm_noahmp) then + if (Model%lsm==Model%ilsm_noah .or. Model%lsm==Model%ilsm_noahmp) then if (Model%lsoil_lsm/=4) then write(0,*) 'Error in GFS_typedefs.F90, number of soil layers must be 4 for Noah/NoahMP' error stop end if Model%zs = (/-0.1_kind_phys, -0.4_kind_phys, -1.0_kind_phys, -2.0_kind_phys/) Model%dzs = (/ 0.1_kind_phys, 0.3_kind_phys, 0.6_kind_phys, 1.0_kind_phys/) - elseif (Model%lsm==Model%lsm_ruc) then + elseif (Model%lsm==Model%ilsm_ruc) then Model%zs = clear_val Model%dzs = clear_val end if ! *DH - if (Model%lsm==Model%lsm_ruc) then + if (Model%lsm==Model%ilsm_ruc) then if (Model%lsoil_lsm/=9) then write(0,*) 'Error in GFS_typedefs.F90, number of soil layers must be 9 for RUC' error stop @@ -4792,12 +4811,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Set number of ice model layers Model%kice = kice - if (Model%lsm==Model%lsm_noah .or. Model%lsm==Model%lsm_noahmp) then + if (Model%lsm==Model%ilsm_noah .or. Model%lsm==Model%ilsm_noahmp) then if (kice/=2) then write(0,*) 'Error in GFS_typedefs.F90, number of ice model layers must be 2 for Noah/NoahMP/Noah_WRFv4' error stop end if - elseif (Model%lsm==Model%lsm_ruc) then + elseif (Model%lsm==Model%ilsm_ruc) then if (kice/=9) then write(0,*) 'Error in GFS_typedefs.F90, number of ice model layers must be 9 for RUC' error stop @@ -4810,7 +4829,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%pores = clear_val Model%resid = clear_val ! - if (Model%lsm==Model%lsm_noahmp) then + if (Model%lsm==Model%ilsm_noahmp) then if (lsnow_lsm/=3) then write(0,*) 'Logic error: NoahMP expects the maximum number of snow layers to be exactly 3 (see sfc_noahmp_drv.f)' error stop @@ -4880,7 +4899,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%iopt_inf = iopt_inf Model%iopt_rad = iopt_rad Model%iopt_alb = iopt_alb - if (Model%lsm==Model%lsm_noahmp .and. Model%exticeden .and. iopt_snf == 4) then + if (Model%lsm==Model%ilsm_noahmp .and. Model%exticeden .and. iopt_snf == 4) then Model%iopt_snf = 5 else Model%iopt_snf = iopt_snf @@ -5828,7 +5847,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & elseif (Model%lsm == 0) then print *,' OSU no longer supported - job aborted' error stop - elseif (Model%lsm == Model%lsm_noahmp) then + elseif (Model%lsm == Model%ilsm_noahmp) then if (Model%ivegsrc /= 1) then print *,'Vegetation type must be IGBP if Noah MP is used' error stop @@ -5853,7 +5872,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,'iopt_stc = ', Model%iopt_stc print *,'iopt_trs = ', Model%iopt_trs print *,'iopt_diag = ', Model%iopt_diag - elseif (Model%lsm == Model%lsm_ruc) then + elseif (Model%lsm == Model%ilsm_ruc) then print *,' RUC Land Surface Model used' print *, 'The Physics options are' print *,' mosaic_lu = ',mosaic_lu @@ -5866,7 +5885,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & error stop endif -! if (Model%lsm == Model%lsm_noahmp .and. Model%iopt_snf == 4) then +! if (Model%lsm == Model%ilsm_noahmp .and. Model%iopt_snf == 4) then ! if (Model%imp_physics /= Model%imp_physics_gfdl) stop 'iopt_snf == 4 must use GFDL MP' ! endif @@ -5896,11 +5915,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if (Model%nstf_name(1) > 0 ) then print *,' NSSTM is active ' - print *,' nstf_name(1)=',Model%nstf_name(1) - print *,' nstf_name(2)=',Model%nstf_name(2) - print *,' nstf_name(3)=',Model%nstf_name(3) - print *,' nstf_name(4)=',Model%nstf_name(4) - print *,' nstf_name(5)=',Model%nstf_name(5) + print *,' nstf_name(1)=',Model%nstf_name(instf_opt) + print *,' nstf_name(2)=',Model%nstf_name(instf_spinup) + print *,' nstf_name(3)=',Model%nstf_name(instf_anlys) + print *,' nstf_name(4)=',Model%nstf_name(instf_zs1_lb) + print *,' nstf_name(5)=',Model%nstf_name(instf_zs2_ub) endif if (Model%do_deep) then ! Consistency check for NTDK convection: deep and shallow convection are bundled @@ -6746,7 +6765,7 @@ subroutine control_print(Model) print *, ' lsoil : ', Model%lsoil print *, ' rdlai : ', Model%rdlai print *, ' lsoil_lsm : ', Model%lsoil_lsm - if (Model%lsm==Model%lsm_noahmp) then + if (Model%lsm==Model%ilsm_noahmp) then print *, ' lsnow_lsm : ', Model%lsnow_lsm print *, ' lsnow_lsm_lbound : ', Model%lsnow_lsm_lbound print *, ' lsnow_lsm_ubound : ', Model%lsnow_lsm_ubound @@ -6767,7 +6786,7 @@ subroutine control_print(Model) print *, ' isot : ', Model%isot print *, ' nsoilcat : ', Model%nsoilcat - if (Model%lsm == Model%lsm_noahmp) then + if (Model%lsm == Model%ilsm_noahmp) then print *, ' Noah MP LSM is used, the options are' print *, ' iopt_dveg : ', Model%iopt_dveg print *, ' iopt_crs : ', Model%iopt_crs @@ -6783,7 +6802,7 @@ subroutine control_print(Model) print *, ' iopt_stc : ', Model%iopt_stc print *, ' iopt_trs : ', Model%iopt_trs print *, ' iopt_diag : ', Model%iopt_diag - elseif (Model%lsm == Model%lsm_ruc) then + elseif (Model%lsm == Model%ilsm_ruc) then print *,' RUC Land Surface Model used' print *, 'The Physics options are' print *,' mosaic_lu = ',Model%mosaic_lu @@ -7224,7 +7243,7 @@ subroutine tbd_create (Tbd, IM, Model) !--- aerosol fields ! DH* allocate only for MG? *DH - allocate (Tbd%aer_nm (IM,Model%levs,ntrcaer)) + allocate (Tbd%aer_nm (IM,Model%levs,Model%ntrcaer)) Tbd%aer_nm = clear_val !--- tau_amf for NGWs @@ -7790,7 +7809,7 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%frozrb (IM)) allocate (Diag%tsnowp (IM)) allocate (Diag%tsnowpb (IM)) - if (.not. Model%lsm == Model%lsm_ruc) then + if (.not. Model%lsm == Model%ilsm_ruc) then allocate (Diag%wet1 (IM)) end if allocate (Diag%sr (IM)) @@ -7800,7 +7819,7 @@ subroutine diag_create (Diag, IM, Model) allocate (Diag%tdoms (IM)) allocate (Diag%zmtnblck (IM)) - if(Model%lsm == Model%lsm_noahmp) then + if(Model%lsm == Model%ilsm_noahmp) then allocate (Diag%paha (IM)) allocate (Diag%twa (IM)) allocate (Diag%pahi (IM)) @@ -8108,7 +8127,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%epi = zero Diag%smcwlt2 = zero Diag%smcref2 = zero - if (.not. Model%lsm == Model%lsm_ruc) then + if (.not. Model%lsm == Model%ilsm_ruc) then Diag%wet1 = zero end if Diag%sr = zero @@ -8118,7 +8137,7 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) Diag%tdoms = zero Diag%zmtnblck = zero - if(Model%lsm == Model%lsm_noahmp)then + if(Model%lsm == Model%ilsm_noahmp)then Diag%paha = zero Diag%twa = zero Diag%pahi = zero diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 2e74c0e7a..b9fa96c9d 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -1,3 +1,13 @@ +[ccpp-table-properties] + name = GFS_init_type + type = ddt + dependencies = + +[ccpp-arg-table] + name = GFS_init_type + type = ddt + +######################################################################## [ccpp-table-properties] name = GFS_statein_type type = ddt @@ -20,7 +30,7 @@ dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys -[prsi(:,1)] +[prsi(:,ccpp_constant_one)] standard_name = air_pressure_at_lowest_model_interface long_name = air pressure at lowest model interface units = Pa @@ -34,7 +44,7 @@ dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys -[prsik(:,1)] +[prsik(:,surface_index_used_in_gfs)] standard_name = surface_dimensionless_exner_function long_name = dimensionless Exner function at lowest model interface units = none @@ -55,7 +65,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[prsl(:,1)] +[prsl(:,surface_index_used_in_gfs)] standard_name = air_pressure_at_surface_adjacent_layer long_name = mean pressure at lowest model layer units = Pa @@ -69,7 +79,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[prslk(:,1)] +[prslk(:,surface_index_used_in_gfs)] standard_name = dimensionless_exner_function_at_surface_adjacent_layer long_name = dimensionless Exner function at lowest model layer units = none @@ -90,7 +100,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[ugrs(:,1)] +[ugrs(:,surface_index_used_in_gfs)] standard_name = x_wind_at_surface_adjacent_layer long_name = zonal wind at lowest model layer units = m s-1 @@ -104,7 +114,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[vgrs(:,1)] +[vgrs(:,surface_index_used_in_gfs)] standard_name = y_wind_at_surface_adjacent_layer long_name = meridional wind at lowest model layer units = m s-1 @@ -133,7 +143,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[tgrs(:,1)] +[tgrs(:,surface_index_used_in_gfs)] standard_name = air_temperature_at_surface_adjacent_layer long_name = mean temperature at lowest model layer units = K @@ -154,7 +164,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[qgrs(:,1,index_of_specific_humidity_in_tracer_concentration_array)] +[qgrs(:,surface_index_used_in_gfs,index_of_specific_humidity_in_tracer_concentration_array)] standard_name = specific_humidity_at_surface_adjacent_layer long_name = water vapor specific humidity at lowest model layer units = kg kg-1 @@ -168,7 +178,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[qgrs(:,1,index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array)] +[qgrs(:,surface_index_used_in_gfs,index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array)] standard_name = cloud_liquid_water_mixing_ratio_at_surface_adjacent_layer long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) at lowest model layer units = kg kg-1 @@ -387,7 +397,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[gu0(:,1)] +[gu0(:,surface_index_used_in_gfs)] standard_name = x_wind_of_new_state_at_surface_adjacent_layer long_name = zonal wind at lowest model layer updated by physics units = m s-1 @@ -401,7 +411,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[gv0(:,1)] +[gv0(:,surface_index_used_in_gfs)] standard_name = y_wind_of_new_state_at_surface_adjacent_layer long_name = meridional wind at lowest model layer updated by physics units = m s-1 @@ -415,7 +425,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[gt0(:,1)] +[gt0(:,surface_index_used_in_gfs)] standard_name = air_temperature_of_new_state_at_surface_adjacent_layer long_name = temperature at lowest model layer updated by physics units = K @@ -436,7 +446,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[gq0(:,1,index_of_specific_humidity_in_tracer_concentration_array)] +[gq0(:,surface_index_used_in_gfs,index_of_specific_humidity_in_tracer_concentration_array)] standard_name = specific_humidity_of_new_state_at_surface_adjacent_layer long_name = water vapor specific humidity at lowest model layer updated by physics units = kg kg-1 @@ -917,6 +927,12 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys +[isubgrd_sigma] + standard_name = index_for_the_standard_deviation_of_subgrid_orography_in_hprime_array + long_name = index for the standard deviation of subgrid height_above_mean_sea_level in the hprime array + units = count + dimensions = () + type = integer [hprime] standard_name = statistical_measures_of_subgrid_orography_collection_array long_name = orographic metrics @@ -924,7 +940,7 @@ dimensions = (horizontal_loop_extent,number_of_statistical_measures_of_subgrid_orography) type = real kind = kind_phys -[hprime(:,1)] +[hprime(:,index_for_the_standard_deviation_of_subgrid_orography_in_hprime_array)] standard_name = standard_deviation_of_subgrid_orography long_name = standard deviation of subgrid height_above_mean_sea_level units = m @@ -1322,7 +1338,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [z_c] standard_name = molecular_sublayer_thickness_in_sea_water long_name = sub-layer cooling thickness @@ -1330,7 +1346,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [c_0] standard_name = coefficient_c_0 long_name = coefficient 1 to calculate d(Tz)/d(Ts) @@ -1338,7 +1354,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [c_d] standard_name = coefficient_c_d long_name = coefficient 2 to calculate d(Tz)/d(Ts) @@ -1346,7 +1362,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [w_0] standard_name = coefficient_w_0 long_name = coefficient 3 to calculate d(Tz)/d(Ts) @@ -1354,7 +1370,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [w_d] standard_name = coefficient_w_d long_name = coefficient 4 to calculate d(Tz)/d(Ts) @@ -1362,7 +1378,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [xt] standard_name = heat_content_in_diurnal_thermocline long_name = heat content in diurnal thermocline layer @@ -1370,7 +1386,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [xs] standard_name = sea_water_salinity_in_diurnal_thermocline long_name = salinity content in diurnal thermocline layer @@ -1378,7 +1394,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [xu] standard_name = x_current_in_diurnal_thermocline long_name = u-current content in diurnal thermocline layer @@ -1386,7 +1402,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [xv] standard_name = y_current_in_diurnal_thermocline long_name = v-current content in diurnal thermocline layer @@ -1394,7 +1410,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [xz] standard_name = diurnal_thermocline_layer_thickness long_name = diurnal thermocline layer thickness @@ -1402,7 +1418,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [zm] standard_name = ocean_mixed_layer_thickness long_name = mixed layer thickness @@ -1410,7 +1426,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [xtts] standard_name = derivative_of_heat_content_in_diurnal_thermocline_wrt_surface_skin_temperature long_name = d(xt)/d(ts) @@ -1418,7 +1434,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [xzts] standard_name = derivative_of_diurnal_thermocline_layer_thickness_wrt_surface_skin_temperature long_name = d(xz)/d(ts) @@ -1426,7 +1442,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [d_conv] standard_name = free_convection_layer_thickness_in_sea_water long_name = thickness of free convection layer (FCL) @@ -1434,7 +1450,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [ifd] standard_name = control_for_diurnal_thermocline_calculation long_name = index to start dtlm run or not @@ -1442,7 +1458,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [dt_cool] standard_name = molecular_sublayer_temperature_correction_in_sea_water long_name = sub-layer cooling amount @@ -1450,7 +1466,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [qrain] standard_name = surface_sensible_heat_due_to_rainfall long_name = sensible heat flux due to rainfall @@ -1458,7 +1474,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_nsstm > 0) + active = (index_to_control_for_nsstm > 0) [snowxy] standard_name = number_of_snow_layers long_name = number of snow layers @@ -1599,7 +1615,7 @@ standard_name = temperature_in_surface_snow long_name = temperature_in_surface_snow units = K - dimensions = (horizontal_loop_extent, lower_bound_of_vertical_dimension_of_surface_snow:0) + dimensions = (horizontal_loop_extent, lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) type = real kind = kind_phys active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) @@ -1615,7 +1631,7 @@ standard_name = lwe_thickness_of_ice_in_surface_snow long_name = snow layer ice units = mm - dimensions = (horizontal_loop_extent, lower_bound_of_vertical_dimension_of_surface_snow:0) + dimensions = (horizontal_loop_extent, lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) type = real kind = kind_phys active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) @@ -1623,7 +1639,7 @@ standard_name = lwe_thickness_of_liquid_water_in_surface_snow long_name = snow layer liquid water units = mm - dimensions = (horizontal_loop_extent, lower_bound_of_vertical_dimension_of_surface_snow:0) + dimensions = (horizontal_loop_extent, lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) type = real kind = kind_phys active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) @@ -2377,6 +2393,26 @@ kind = kind_phys active = (do_smoke_coupling) +######################################################################## +[ccpp-table-properties] + name = dtend_var_label + type = ddt + dependencies = + +[ccpp-arg-table] + name = dtend_var_label + type = ddt + +######################################################################## +[ccpp-table-properties] + name = dtend_process_label + type = ddt + dependencies = + +[ccpp-arg-table] + name = dtend_process_label + type = ddt + ######################################################################## [ccpp-table-properties] name = GFS_coupling_type @@ -3276,7 +3312,7 @@ type = real kind = kind_phys active = (flag_for_chemistry_coupling) -[htrlw] +[hrlw] standard_name = updated_tendency_of_air_temperature_due_to_longwave_heating_on_physics_timestep long_name = total sky longwave heating rate on physics time step units = K s-1 @@ -4847,19 +4883,19 @@ units = flag dimensions = () type = integer -[lsm_noah] +[ilsm_noah] standard_name = identifier_for_noah_land_surface_scheme long_name = flag for NOAH land surface model units = flag dimensions = () type = integer -[lsm_noahmp] +[ilsm_noahmp] standard_name = identifier_for_noahmp_land_surface_scheme long_name = flag for NOAH MP land surface model units = flag dimensions = () type = integer -[lsm_ruc] +[ilsm_ruc] standard_name = identifier_for_ruc_land_surface_scheme long_name = flag for RUC land surface model units = flag @@ -5668,21 +5704,39 @@ dimensions = (2) type = real kind = kind_phys -[crtrh(1)] +[icrtrh_sfc] + standard_name = index_for_critical_relative_humidity_at_surface + long_name = index for critical relative humidity at the surface + units = count + dimensions = () + type = integer +[icrtrh_pbl] + standard_name = index_for_critical_relative_humidity_at_pbl_top + long_name = index for critical relative humidity at the PBL top + units = count + dimensions = () + type = integer +[icrtrh_toa] + standard_name = index_for_critical_relative_humidity_at_toa + long_name = index for critical relative humidity at the top of atmosphere + units = count + dimensions = () + type = integer +[crtrh(index_for_critical_relative_humidity_at_surface)] standard_name = critical_relative_humidity_at_surface long_name = critical relative humidity at the surface units = frac dimensions = () type = real kind = kind_phys -[crtrh(2)] +[crtrh(index_for_critical_relative_humidity_at_pbl_top)] standard_name = critical_relative_humidity_at_PBL_top long_name = critical relative humidity at the PBL top units = frac dimensions = () type = real kind = kind_phys -[crtrh(3)] +[crtrh(index_for_critical_relative_humidity_at_toa)] standard_name = critical_relative_humidity_at_toa long_name = critical relative humidity at the top of atmosphere units = frac @@ -5835,19 +5889,67 @@ units = flag dimensions = () type = logical -[nstf_name(1)] +[instf_opt] + standard_name = index_to_control_for_nsstm + long_name = index ofr NSSTM flag: off/uncoupled/coupled=0/1/2 + units = count + dimensions = () + type = integer +[instf_spinup] + standard_name = index_for_nsstm_spinup + long_name = index for nsstm spinup + units = count + dimensions = () + type = integer +[instf_anlys] + standard_name = index_for_nsstm_analysis + long_name = index for nsstm analysis + units = count + dimensions = () + type = integer +[instf_zs1_lb] + standard_name = index_for_lower_bound_for_depth_of_sea_temperature_for_nsstm + long_name = index for lower bound for depth of sea temperature for nsstm + units = count + dimensions = () + type = integer +[instf_zs2_ub] + standard_name = index_for_upper_bound_for_depth_of_sea_temperature_for_nsstm + long_name = index for upper bound for depth of sea temperature for nsstm + units = count + dimensions = () + type = integer +[nstf_name] + standard_name = configurations_for_nsstm + long_name = NSSTM configuration + units = flag + dimensions = (5) + type = integer +[nstf_name(index_to_control_for_nsstm)] standard_name = control_for_nsstm long_name = NSSTM flag: off/uncoupled/coupled=0/1/2 units = flag dimensions = () type = integer -[nstf_name(4)] +[nstf_name(index_for_nsstm_spinup)] + standard_name = control_for_nsstm_spinup + long_name = NSSTM control for spinup + units = flag + dimensions = () + type = integer +[nstf_name(index_for_nsstm_analysis)] + standard_name = control_for_nsstm_analysis + long_name = NSSTM control for analysis + units = flag + dimensions = () + type = integer +[nstf_name(index_for_lower_bound_for_depth_of_sea_temperature_for_nsstm)] standard_name = lower_bound_for_depth_of_sea_temperature_for_nsstm long_name = zsea1 in mm units = mm dimensions = () type = integer -[nstf_name(5)] +[nstf_name(index_for_upper_bound_for_depth_of_sea_temperature_for_nsstm)] standard_name = upper_bound_for_depth_of_sea_temperature_for_nsstm long_name = zsea2 in mm units = mm @@ -7038,13 +7140,6 @@ units = flag dimensions = () type = logical -[suite_sim_data] - standard_name = filename_for_CCPP_suite_simulator - long_name = filename for cccpp suite simulator data file - units = none - dimensions = () - type = character - kind = len=256 [nprg_active] standard_name = number_of_prognostics_varaibles_in_CCPP_suite_simulator long_name = number of prognostic variables used in CCPP suite simulator @@ -10077,73 +10172,20 @@ dependencies = photochem/h2o_def.f,photochem/module_ozphys.F90 dependencies = MP/GFDL/GFDL_parse_tracers.F90 dependencies = Interstitials/UFS_SCM_NEPTUNE/GFS_ccpp_suite_sim_pre.F90 + dependencies = Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.F90 [ccpp-arg-table] name = GFS_typedefs type = module -[GFS_cldprop_type] - standard_name = GFS_cldprop_type - long_name = definition of type GFS_cldprop_type - units = DDT - dimensions = () - type = GFS_cldprop_type -[GFS_control_type] - standard_name = GFS_control_type - long_name = definition of type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type -[GFS_coupling_type] - standard_name = GFS_coupling_type - long_name = definition of type GFS_coupling_type - units = DDT - dimensions = () - type = GFS_coupling_type -[GFS_diag_type] - standard_name = GFS_diag_type - long_name = definition of type GFS_diag_type - units = DDT - dimensions = () - type = GFS_diag_type -[GFS_grid_type] - standard_name = GFS_grid_type - long_name = definition of type GFS_grid_type - units = DDT - dimensions = () - type = GFS_grid_type -[GFS_radtend_type] - standard_name = GFS_radtend_type - long_name = definition of type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type -[GFS_sfcprop_type] - standard_name = GFS_sfcprop_type - long_name = definition of type GFS_sfcprop_type - units = DDT - dimensions = () - type = GFS_sfcprop_type -[GFS_statein_type] - standard_name = GFS_statein_type - long_name = definition of type GFS_statein_type - units = DDT - dimensions = () - type = GFS_statein_type -[GFS_stateout_type] - standard_name = GFS_stateout_type - long_name = definition of type GFS_stateout_type - units = DDT - dimensions = () - type = GFS_stateout_type -[GFS_tbd_type] - standard_name = GFS_tbd_type - long_name = definition of type GFS_tbd_type - units = DDT - dimensions = () - type = GFS_tbd_type [LTP] standard_name = extra_top_layer long_name = extra top layer for radiation units = count dimensions = () type = integer +[isfc_gfs] + standard_name = surface_index_used_in_gfs + long_name = surface index for GFS applications + units = count + dimensions = () + type = integer \ No newline at end of file diff --git a/scm/src/ccpp_config.F90 b/scm/src/ccpp_config.F90 new file mode 100644 index 000000000..9c7cb4078 --- /dev/null +++ b/scm/src/ccpp_config.F90 @@ -0,0 +1,51 @@ +!> \file ccpp_config.F90 +!! Contains CCPP configuration + +module ccpp_config + +!> \section arg_table_ccpp_config +!! \htmlinclude ccpp_config.html +!! + use mpi_f08, only: MPI_Comm + implicit none + + !> @var The default loop counter indicating outside of a subcycle loop + integer, parameter :: CCPP_DEFAULT_LOOP_CNT = -999 + integer, parameter :: CCPP_DEFAULT_LOOP_MAX = -999 + + !> @var The default values for block, chunk and thread numbers indicating invalid data + integer, parameter :: CCPP_DEFAULT_BLOCK_NUMBER = -999 + integer, parameter :: CCPP_DEFAULT_CHUNK_NUMBER = -999 + integer, parameter :: CCPP_DEFAULT_THREAD_NUMBER = -999 + + !> @var The default maximum number of threads for CCPP + integer, parameter :: CCPP_DEFAULT_THREAD_COUNT = -999 + +!! \section arg_table_ty_ccpp_config +!! \htmlinclude ty_ccpp_config.html +!! + type :: ty_ccpp_config + ! CCPP-internal variables for physics schemes + integer :: loop_cnt = CCPP_DEFAULT_LOOP_CNT + integer :: loop_max = CCPP_DEFAULT_LOOP_MAX + integer :: blk_no = CCPP_DEFAULT_BLOCK_NUMBER + integer :: chunk_no = CCPP_DEFAULT_CHUNK_NUMBER + integer :: thrd_no = CCPP_DEFAULT_THREAD_NUMBER + integer :: thrd_cnt = CCPP_DEFAULT_THREAD_COUNT + integer :: ccpp_instance = 1 + contains + procedure :: initialized => ccpp_cfg_initialized + end type ty_ccpp_config + +contains + + function ccpp_cfg_initialized(ccpp_d) result(initialized) + implicit none + class(ty_ccpp_config) :: ccpp_d + logical :: initialized + initialized = ccpp_d%thrd_no /= CCPP_DEFAULT_THREAD_NUMBER .or. & + ccpp_d%blk_no /= CCPP_DEFAULT_BLOCK_NUMBER .or. & + ccpp_d%chunk_no /= CCPP_DEFAULT_CHUNK_NUMBER + end function ccpp_cfg_initialized + +end module ccpp_config diff --git a/scm/src/ccpp_config.meta b/scm/src/ccpp_config.meta new file mode 100644 index 000000000..632350b77 --- /dev/null +++ b/scm/src/ccpp_config.meta @@ -0,0 +1,78 @@ +######################################################################## +[ccpp-table-properties] + name = MPI_Comm + type = ddt + dependencies = + +[ccpp-arg-table] + name = MPI_Comm + type = ddt + +######################################################################## +[ccpp-table-properties] + name = ty_ccpp_config + type = ddt + dependencies = + +[ccpp-arg-table] + name = ty_ccpp_config + type = ddt +[loop_cnt] + standard_name = ccpp_loop_counter + long_name = loop counter for subcycling loops in CCPP + units = index + dimensions = () + type = integer +[loop_max] + standard_name = ccpp_loop_extent + long_name = loop extent for subcycling loops in CCPP + units = count + dimensions = () + type = integer +[blk_no] + standard_name = ccpp_block_number + long_name = number of block for explicit data blocking in CCPP + units = index + dimensions = () + type = integer +[chunk_no] + standard_name = ccpp_chunk_number + long_name = number of chunk for using array chunks in CCPP + units = index + dimensions = () + type = integer +[thrd_no] + standard_name = ccpp_thread_number + long_name = number of thread for threading in CCPP + units = index + dimensions = () + type = integer +[thrd_cnt] + standard_name = ccpp_thread_count + long_name = total number of threads for threading in CCPP + units = index + dimensions = () + type = integer +[ccpp_instance] + standard_name = ccpp_instance + long_name = ccpp_instance + units = index + dimensions = () + type = integer + +######################################################################## +[ccpp-table-properties] + name = ccpp_config + type = module + dependencies = + +[ccpp-arg-table] + name = ccpp_config + type = module + +[MPI_Comm] + standard_name = MPI_Comm + long_name = definition of type MPI_Comm + units = DDT + dimensions = () + type = MPI_Comm \ No newline at end of file diff --git a/scm/src/scm.F90 b/scm/src/scm.F90 index b6ac80d4a..2d8890b28 100644 --- a/scm/src/scm.F90 +++ b/scm/src/scm.F90 @@ -14,34 +14,43 @@ subroutine scm_main_sub() use scm_forcing use scm_time_integration use scm_output - use scm_type_defs + use scm_type_defs, only: physics_type, scm_state_type, scm_input_type, scm_reference_type + use ccpp_config, only: ty_ccpp_config use mpi_f08 + use ccpp_config, only: ty_ccpp_config - use :: ccpp_static_api, & - only: ccpp_physics_init, & - ccpp_physics_timestep_init, & - ccpp_physics_run, & - ccpp_physics_timestep_finalize, & - ccpp_physics_finalize - + use :: SCM_ccpp_cap, only: & + ccpp_physics_init => SCM_ccpp_physics_initialize, & + ccpp_physics_timestep_init => SCM_ccpp_physics_timestep_initial, & + ccpp_physics_run => SCM_ccpp_physics_run, & + ccpp_physics_timestep_finalize => SCM_ccpp_physics_timestep_final, & + ccpp_physics_finalize => SCM_ccpp_physics_finalize, & + ccpp_physics_suite_part_list implicit none - type(scm_state_type), target :: scm_state - type(scm_input_type), target :: scm_input_instance + type(scm_state_type), target :: scm_state + type(scm_input_type), target :: scm_input_instance type(scm_reference_type), target :: scm_reference - - type(MPI_Comm) :: fcst_mpi_comm - - integer :: i, j, kdt_rad, idtend, itrac - real(kind=8) :: rinc(5) !(DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS) - integer :: jdat(1:8) - - integer :: cdata_time_index - integer :: ierr - character(len=16) :: logfile_name - logical :: in_spinup - + type(physics_type), target :: physics + type(ty_ccpp_config), target :: ccpp_cfg + type(MPI_Comm) :: fcst_mpi_comm + integer :: i, j, kdt_rad, idtend, itrac + real(kind=8) :: rinc(5) !(DAYS, HOURS, MINUTES, SECONDS, MILLISECONDS) + integer :: jdat(1:8) + integer :: cdata_time_index + integer :: ierr + character(len=16) :: logfile_name + logical :: in_spinup + integer :: ccpp_errflg + character(len=512) :: ccpp_errmsg + character(len=128), allocatable :: ccpp_suite_parts(:) + integer :: isuite_part + + ! Initialize error handling variables. + ccpp_errflg = 0 + ccpp_errmsg = '' + call MPI_INIT(ierr) if (ierr/=0) then write(*,*) 'An error occurred in MPI_INIT: ', ierr @@ -65,8 +74,6 @@ subroutine scm_main_sub() call get_FV3_vgrid(scm_input_instance, scm_state) - !allocate(cdata_cols(scm_state%n_cols)) - call set_state(scm_input_instance, scm_reference, scm_state) call calc_geopotential(1, scm_state) @@ -173,10 +180,10 @@ subroutine scm_main_sub() write(*,*) "This will cause the effective output period of variables that are only given values during longwave calls to be ",& lcm(scm_state%n_itt_out,physics%Model%nslwr)*scm_state%dt," seconds." end if - - cdata%blk_no = 1 - cdata%thrd_no = 1 - cdata%thrd_cnt = 1 + + ccpp_cfg%blk_no = 1 + ccpp_cfg%thrd_no = 1 + ccpp_cfg%thrd_cnt = 1 call physics%associate(scm_state) call physics%set(scm_input_instance, scm_state) @@ -191,12 +198,20 @@ subroutine scm_main_sub() endif !initialize the column's physics - + write(0,'(a,i0,a)') "Calling ccpp_physics_suite_part_list with suite '" // trim(trim(adjustl(scm_state%physics_suite_name))) // "'" + call ccpp_physics_suite_part_list(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + part_list = ccpp_suite_parts, & + errmsg = ccpp_errmsg, & + errflg = ccpp_errflg) write(0,'(a,i0,a)') "Calling ccpp_physics_init with suite '" // trim(trim(adjustl(scm_state%physics_suite_name))) // "'" - call ccpp_physics_init(cdata, suite_name=trim(trim(adjustl(scm_state%physics_suite_name))), ierr=ierr) - write(0,'(a,i0,a,i0)') "Called ccpp_physics_init with suite '" // trim(trim(adjustl(scm_state%physics_suite_name))) // "', ierr=", ierr - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_init: ' // trim(cdata%errmsg) // '. Exiting...' + call ccpp_physics_init(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + write(0,'(a,i0,a,i0)') "Called ccpp_physics_init with suite '" // trim(trim(adjustl(scm_state%physics_suite_name))) // "', ccpp_errflg=", ccpp_errflg + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_init: ' // trim(ccpp_errmsg) // '. Exiting...' error stop end if @@ -218,7 +233,7 @@ subroutine scm_main_sub() if (.not. scm_state%model_ics) call calc_pres_exner_geopotential(1, scm_state) !pass in state variables to be modified by forcing and physics - call do_time_step(scm_state, physics, cdata, in_spinup) + call do_time_step(scm_state, physics, ccpp_cfg, in_spinup, ccpp_errflg, ccpp_errmsg, ccpp_suite_parts) else if (scm_state%time_scheme == 2) then ! !if using the leapfrog scheme, we initialize by taking one half forward time step and one half (unfiltered) leapfrog time step to get to the end of the first time step @@ -283,10 +298,13 @@ subroutine scm_main_sub() endif endif end do - - call ccpp_physics_timestep_init(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_init: ' // trim(cdata%errmsg) // '. Exiting...' + call ccpp_physics_timestep_init(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_init: ' // trim(ccpp_errmsg) // '. Exiting...' error stop end if @@ -307,16 +325,27 @@ subroutine scm_main_sub() call physics%Diag%phys_zero (physics%Model) endif - call ccpp_physics_run(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(cdata%errmsg) // '. Exiting...' - error stop - end if - - call ccpp_physics_timestep_finalize(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_finalize: ' // trim(cdata%errmsg) // '. Exiting...' - error stop + do isuite_part=1,size(ccpp_suite_parts) + call ccpp_physics_run(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + suite_part = ccpp_suite_parts(isuite_part), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(ccpp_errmsg) // '. Exiting...' + error stop + end if + end do + + call ccpp_physics_timestep_finalize(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_finalize: ' // trim(ccpp_errmsg) // '. Exiting...' + stop 1 end if !the filter routine (called after the following leapfrog time step) expects time level 2 in temp_tracer to be the updated, unfiltered state after the previous time step @@ -340,7 +369,7 @@ subroutine scm_main_sub() scm_state%state_tracer(:,:,:,1) = scm_state%temp_tracer(:,:,:,1) !go forward one leapfrog time step - call do_time_step(scm_state, physics, cdata, in_spinup) + call do_time_step(scm_state, physics, ccpp_cfg, in_spinup, ccpp_errflg, ccpp_errmsg, ccpp_suite_parts) !for filtered-leapfrog scheme, call the filtering routine to calculate values of the state variables to save in slot 1 using slot 2 vars (updated, unfiltered) output from the physics call filter(scm_state) @@ -400,7 +429,7 @@ subroutine scm_main_sub() !call physics%Diag%phys_zero(physics%Model) !pass in state variables to be modified by forcing and physics - call do_time_step(scm_state, physics, cdata, in_spinup) + call do_time_step(scm_state, physics, ccpp_cfg, in_spinup, ccpp_errflg, ccpp_errmsg, ccpp_suite_parts) if (scm_state%time_scheme == 2) then !for filtered-leapfrog scheme, call the filtering routine to calculate values of the state variables to save in slot 1 using slot 2 vars (updated, unfiltered) output from the physics @@ -424,10 +453,14 @@ subroutine scm_main_sub() end if end do - call ccpp_physics_finalize(cdata, suite_name=trim(trim(adjustl(scm_state%physics_suite_name))), ierr=ierr) - - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_finalize: ' // trim(cdata%errmsg) // '. Exiting...' + call ccpp_physics_finalize(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_finalize: ' // trim(ccpp_errmsg) // '. Exiting...' error stop end if diff --git a/scm/src/scm_kinds.meta b/scm/src/scm_kinds.meta index bf150f92e..538046f77 100644 --- a/scm/src/scm_kinds.meta +++ b/scm/src/scm_kinds.meta @@ -6,19 +6,19 @@ [ccpp-arg-table] name = scm_kinds type = module -[kind_sp] +[sp] standard_name = kind_sp long_name = definition of kind_sp units = none dimensions = () type = integer -[kind_dp] +[dp] standard_name = kind_dp long_name = definition of kind_dp units = none dimensions = () type = integer -[kind_qp] +[qp] standard_name = kind_qp long_name = definition of kind_qp units = none diff --git a/scm/src/scm_output.F90 b/scm/src/scm_output.F90 index b41347c19..413b5ccf2 100644 --- a/scm/src/scm_output.F90 +++ b/scm/src/scm_output.F90 @@ -557,14 +557,14 @@ subroutine output_append_sfcprop(ncid, scm_state, physics) if (scm_state%model_ics .or. scm_state%lsm_ics) then if (physics%Model%lsoil_lsm > 0) then missing_value_2D = missing_value - if (physics%Model%lsm == physics%Model%lsm_noah .or. physics%Model%lsm == physics%Model%lsm_noahmp) then + if (physics%Model%lsm == physics%Model%ilsm_noah .or. physics%Model%lsm == physics%Model%ilsm_noahmp) then call NetCDF_put_var(ncid, 'soil_T', physics%Sfcprop%stc(:,:), scm_state%itt_out) call NetCDF_put_var(ncid, 'soil_moisture', physics%Sfcprop%smc(:,:), scm_state%itt_out) call NetCDF_put_var(ncid, 'soil_moisture_unfrozen', physics%Sfcprop%slc(:,:), scm_state%itt_out) call NetCDF_put_var(ncid, 'soil_moisture_total_vol_frac', missing_value_2D, scm_state%itt_out) call NetCDF_put_var(ncid, 'soil_moisture_unfrozen_vol_frac', missing_value_2D, scm_state%itt_out) call NetCDF_put_var(ncid, 'soil_moisture_frozen_vol_frac', missing_value_2D, scm_state%itt_out) - else if (physics%Model%lsm == physics%Model%lsm_ruc) then + else if (physics%Model%lsm == physics%Model%ilsm_ruc) then call NetCDF_put_var(ncid, 'soil_T', physics%Sfcprop%tslb(:,:), scm_state%itt_out) call NetCDF_put_var(ncid, 'soil_moisture', missing_value_2D, scm_state%itt_out) call NetCDF_put_var(ncid, 'soil_moisture_unfrozen', missing_value_2D, scm_state%itt_out) diff --git a/scm/src/scm_physical_constants.F90 b/scm/src/scm_physical_constants.F90 index 5e4c6eda7..874f246cc 100644 --- a/scm/src/scm_physical_constants.F90 +++ b/scm/src/scm_physical_constants.F90 @@ -1,6 +1,6 @@ module scm_physical_constants -use scm_kinds, only: dp +use scm_kinds, only: kind_phys=>dp implicit none @@ -9,54 +9,54 @@ module scm_physical_constants !> \section arg_table_scm_physical_constants !! \htmlinclude scm_physical_constants.html !! - real(kind=dp),parameter:: con_pi =3.1415926535897931 + real(kind=kind_phys),parameter:: con_pi =3.1415926535897931 - real(kind=dp),parameter:: con_rerth =6.3712e+6 - real(kind=dp),parameter:: con_g =9.80665e+0 - real(kind=dp),parameter:: con_omega =7.2921e-5 - real(kind=dp),parameter:: con_p0 =1.01325e+5 - - real(kind=dp),parameter:: con_rd =2.8705e+2 - real(kind=dp),parameter:: con_rv =4.6150e+2 - real(kind=dp),parameter:: con_cp =1.0046e+3 - real(kind=dp),parameter:: con_cliq =4.1855e+3 - real(kind=dp),parameter:: con_csol =2.1060e+3 - real(kind=dp),parameter:: con_cvap =1.8460e+3 - real(kind=dp),parameter:: con_hvap =2.5000e+6 - real(kind=dp),parameter:: con_hfus =3.3358e+5 - real(kind=dp),parameter:: con_psat =6.1078e+2_dp !< pres at H2O 3pt (\f$Pa\f$) - real(kind=dp),parameter:: con_t0c =2.7315e+2 - real(kind=dp),parameter:: con_ttp =2.7316e+2 - real(kind=dp),parameter:: con_epsq =1.0E-12_dp - real(kind=dp),parameter:: con_epsqs =1.0E-10_dp - - real(kind=dp),parameter:: con_rocp =con_rd/con_cp - real(kind=dp),parameter:: con_rog =con_rd/con_g - real(kind=dp),parameter:: con_fvirt =con_rv/con_rd - 1._dp - real(kind=dp),parameter:: con_eps =con_rd/con_rv - real(kind=dp),parameter:: con_epsm1 =con_rd/con_rv - 1._dp - real(kind=dp),parameter:: con_1ovg =1._dp/con_g - - real(kind=dp),parameter:: karman = 0.4_dp + real(kind=kind_phys),parameter:: con_rerth =6.3712e+6 + real(kind=kind_phys),parameter:: con_g =9.80665e+0 + real(kind=kind_phys),parameter:: con_omega =7.2921e-5 + real(kind=kind_phys),parameter:: con_p0 =1.01325e+5 + + real(kind=kind_phys),parameter:: con_rd =2.8705e+2 + real(kind=kind_phys),parameter:: con_rv =4.6150e+2 + real(kind=kind_phys),parameter:: con_cp =1.0046e+3 + real(kind=kind_phys),parameter:: con_cliq =4.1855e+3 + real(kind=kind_phys),parameter:: con_csol =2.1060e+3 + real(kind=kind_phys),parameter:: con_cvap =1.8460e+3 + real(kind=kind_phys),parameter:: con_hvap =2.5000e+6 + real(kind=kind_phys),parameter:: con_hfus =3.3358e+5 + real(kind=kind_phys),parameter:: con_psat =6.1078e+2_kind_phys !< pres at H2O 3pt (\f$Pa\f$) + real(kind=kind_phys),parameter:: con_t0c =2.7315e+2 + real(kind=kind_phys),parameter:: con_ttp =2.7316e+2 + real(kind=kind_phys),parameter:: con_epsq =1.0E-12_kind_phys + real(kind=kind_phys),parameter:: con_epsqs =1.0E-10_kind_phys + + real(kind=kind_phys),parameter:: con_rocp =con_rd/con_cp + real(kind=kind_phys),parameter:: con_rog =con_rd/con_g + real(kind=kind_phys),parameter:: con_fvirt =con_rv/con_rd - 1._kind_phys + real(kind=kind_phys),parameter:: con_eps =con_rd/con_rv + real(kind=kind_phys),parameter:: con_epsm1 =con_rd/con_rv-1._kind_phys + real(kind=kind_phys),parameter:: con_1ovg =1._kind_phys/con_g + + real(kind=kind_phys),parameter:: karman = 0.4_kind_phys - real(kind=dp),parameter:: cimin =0.15 + real(kind=kind_phys),parameter:: cimin =0.15 !> minimum rain amount - real(kind=dp),parameter:: rainmin =1.e-13_dp - 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 + real(kind=kind_phys),parameter:: rainmin =1.e-13_kind_phys + real(kind=kind_phys),parameter:: rlapse =0.65e-2 + real(kind=kind_phys),parameter:: con_jcal =4.1855E+0 + real(kind=kind_phys),parameter:: con_rhw0 =1022.0 + real(kind=kind_phys),parameter:: con_sbc =5.670400e-8 + real(kind=kind_phys),parameter:: con_tice =2.7120e+2 - real(kind=dp),parameter:: rhowater =1000._dp - real(kind=dp),parameter:: rholakeice = 0.917e3_dp !< density of ice on lake (kg/m^3) + real(kind=kind_phys),parameter:: rhowater =1000._kind_phys + real(kind=kind_phys),parameter:: rholakeice = 0.917e3_kind_phys !< density of ice on lake (kg/m^3) - real(kind=dp),parameter:: con_c = 2.99792458e+8_dp !< speed of light (\f$m/s\f$) - real(kind=dp),parameter:: con_plnk = 6.6260693e-34_dp !< planck constant (\f$J/s\f$) - real(kind=dp),parameter:: con_boltz = 1.3806505e-23_dp !< boltzmann constant (\f$J/K\f$) - real(kind=dp),parameter:: con_solr_2002 = 1.3660e+3_dp !< solar constant (\f$W/m^{2}\f$)-Liu(2002) - real(kind=dp),parameter:: con_solr_2008 = 1.3608e+3_dp !< solar constant (\f$W/m^{2}\f$)-nasa-sorce Tim(2008) - real(kind=dp),parameter:: con_thgni = -38.15_dp !< temperature the H.G.Nuc. ice starts + real(kind=kind_phys),parameter:: con_c = 2.99792458e+8_kind_phys !< speed of light (\f$m/s\f$) + real(kind=kind_phys),parameter:: con_plnk = 6.6260693e-34_kind_phys !< planck constant (\f$J/s\f$) + real(kind=kind_phys),parameter:: con_boltz = 1.3806505e-23_kind_phys !< boltzmann constant (\f$J/K\f$) + real(kind=kind_phys),parameter:: con_solr_2002 = 1.3660e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-Liu(2002) + real(kind=kind_phys),parameter:: con_solr_2008 = 1.3608e+3_kind_phys !< solar constant (\f$W/m^{2}\f$)-nasa-sorce Tim(2008) + real(kind=kind_phys),parameter:: con_thgni = -38.15_kind_phys !< temperature the H.G.Nuc. ice starts end module scm_physical_constants diff --git a/scm/src/scm_time_integration.F90 b/scm/src/scm_time_integration.F90 index 895d70435..3200e3b9c 100644 --- a/scm/src/scm_time_integration.F90 +++ b/scm/src/scm_time_integration.F90 @@ -5,13 +5,12 @@ module scm_time_integration use scm_kinds, only: sp, dp, qp use scm_forcing +use ccpp_config, only: ty_ccpp_config -use ccpp_types, only: ccpp_t -use :: ccpp_static_api, & - only: ccpp_physics_timestep_init, & - ccpp_physics_run, & - ccpp_physics_timestep_finalize - +use :: SCM_ccpp_cap, only: & + ccpp_physics_timestep_init => SCM_ccpp_physics_timestep_initial, & + ccpp_physics_run => SCM_ccpp_physics_run, & + ccpp_physics_timestep_finalize => SCM_ccpp_physics_timestep_final implicit none @@ -53,15 +52,18 @@ subroutine filter(scm_state) !! The subroutine nuopc_rad_update calculates the time-dependent parameters required to run radiation, and nuopc_rad_run calculates the radiative heating rate (but does not apply it). The !! subroutine apply_forcing_leapfrog advances the state variables forward using the leapfrog method and nuopc_phys_run further changes the state variables using the forward method. By the end of !! this subroutine, the unfiltered state variables will have been stepped forward in time. -subroutine do_time_step(scm_state, physics, cdata, in_spinup) +subroutine do_time_step(scm_state, physics, ccpp_cfg, in_spinup, ccpp_errflg, ccpp_errmsg, ccpp_suite_parts) use scm_type_defs, only: scm_state_type, physics_type - type(scm_state_type), intent(inout) :: scm_state - type(physics_type), intent(inout) :: physics - type(ccpp_t), intent(inout) :: cdata - logical, intent(in) :: in_spinup + type(scm_state_type), intent(inout) :: scm_state + type(physics_type), intent(inout) :: physics + type(ty_ccpp_config), intent(inout) :: ccpp_cfg + logical, intent(in) :: in_spinup + integer, intent(inout) :: ccpp_errflg + character(len=512), intent(inout) :: ccpp_errmsg + character(len=128), intent(in) :: ccpp_suite_parts(:) - integer :: i, ierr, kdt_rad, idtend, itrac + integer :: i, ierr, kdt_rad, idtend, itrac, isuite_part !> \section do_time_step_alg Algorithm !! @{ @@ -131,11 +133,15 @@ subroutine do_time_step(scm_state, physics, cdata, in_spinup) endif endif enddo - - call ccpp_physics_timestep_init(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_init: ' // trim(cdata%errmsg) // '. Exiting...' - error stop trim(cdata%errmsg) + + call ccpp_physics_timestep_init(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_init: ' // trim(ccpp_errmsg) // '. Exiting...' + error stop trim(ccpp_errmsg) end if !--- determine if radiation diagnostics buckets need to be cleared @@ -155,16 +161,27 @@ subroutine do_time_step(scm_state, physics, cdata, in_spinup) call physics%Diag%phys_zero (physics%Model) endif - call ccpp_physics_run(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(cdata%errmsg) // '. Exiting...' - error stop trim(cdata%errmsg) - end if + do isuite_part=1,size(ccpp_suite_parts) + call ccpp_physics_run(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + suite_part = trim(trim(adjustl(ccpp_suite_parts(isuite_part)))), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_run: ' // trim(ccpp_errmsg) // '. Exiting...' + error stop trim(ccpp_errmsg) + end if + enddo - call ccpp_physics_timestep_finalize(cdata, suite_name=trim(adjustl(scm_state%physics_suite_name)), ierr=ierr) - if (ierr/=0) then - write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_finalize: ' // trim(cdata%errmsg) // '. Exiting...' - error stop trim(cdata%errmsg) + call ccpp_physics_timestep_finalize(suite_name = trim(trim(adjustl(scm_state%physics_suite_name))), & + physics = physics, & + ccpp_cfg = ccpp_cfg, & + errflg = ccpp_errflg, & + errmsg = ccpp_errmsg) + if (ccpp_errflg/=0) then + write(*,'(a,i0,a)') 'An error occurred in ccpp_physics_timestep_finalize: ' // trim(ccpp_errmsg) // '. Exiting...' + error stop trim(ccpp_errmsg) end if !if no physics call, need to transfer state_variables(:,:,1) to state_variables (:,:,2) diff --git a/scm/src/scm_type_defs.F90 b/scm/src/scm_type_defs.F90 index 49a8c71da..ba9728f7d 100644 --- a/scm/src/scm_type_defs.F90 +++ b/scm/src/scm_type_defs.F90 @@ -21,8 +21,8 @@ module scm_type_defs GFS_init_type use CCPP_typedefs, only: GFS_interstitial_type use machine, only: kind_phys - use ccpp_types, only: ccpp_t - + use ccpp_config, only: ty_ccpp_config + implicit none integer, parameter :: character_length = 80 @@ -32,19 +32,48 @@ module scm_type_defs real(kind=dp), parameter :: real_zero = 0.0 real(kind=dp), parameter :: real_one = 1.0 - character(len = character_length) :: clear_char = '' + character(len = 80) :: clear_char = '' + +!> \section arg_table_physics_type +!! \htmlinclude physics_type.html +!! + type physics_type + type(GFS_control_type) :: Model + type(GFS_statein_type) :: Statein + type(GFS_stateout_type) :: Stateout + type(GFS_sfcprop_type) :: Sfcprop + type(GFS_coupling_type) :: Coupling + type(GFS_grid_type) :: Grid + type(GFS_tbd_type) :: Tbd + type(GFS_cldprop_type) :: Cldprop + type(GFS_radtend_type) :: Radtend + type(GFS_diag_type) :: Diag + type(GFS_interstitial_type) :: Interstitial + type(GFS_init_type) :: Init_parm + contains + procedure :: create => physics_create + procedure :: associate => physics_associate + procedure :: set => physics_set + end type physics_type + type(physics_type), target :: physics + type(ty_ccpp_config), target :: ccpp_cfg + integer :: errflg = 0 + character(len=512) :: errmsg = '' +!> \section arg_table_scm_state_type +!! \htmlinclude scm_state_type.html +!! type scm_state_type - character(len=character_length) :: experiment_name !> name of model configuration file - character(len=character_length) :: npz_type !< used to define different FV3 vertical grids - character(len=character_length) :: vert_coord_file !< name of vertical coordinate file - character(len=character_length) :: output_dir !< name of output directory to place netCDF file - character(len=character_length) :: output_file !< name of output file (without the file extension) - character(len=character_length) :: case_name !< name of case initialization and forcing to use (different than experiment name, which names the model run (as a control, experiment_1, etc.)) - character(len=character_length) :: physics_suite_name !< name of physics suite (must be "GFS_operational" for prototype) - character(len=character_length) :: physics_nml + character(len=80) :: experiment_name !> name of model configuration file + character(len=80) :: npz_type !< used to define different FV3 vertical grids + character(len=80) :: vert_coord_file !< name of vertical coordinate file + character(len=80) :: output_dir !< name of output directory to place netCDF file + character(len=80) :: output_file !< name of output file (without the file extension) + character(len=80) :: case_name !< name of case initialization and forcing to use (different than experiment name, which names the model run (as a control, experiment_1, etc.)) + character(len=80) :: physics_suite_name !< name of physics suite (must be "GFS_operational" for prototype) + character(len=80) :: physics_nml integer :: n_levels !< number of model levels integer :: n_soil !< number of model levels @@ -175,6 +204,9 @@ module scm_type_defs end type scm_state_type +!> \section arg_table_scm_input_type +!! \htmlinclude scm_input_type.html +!! type scm_input_type !> - Define the case-specific initialization and forcing variables. integer :: input_nlev !< number of levels in the input file @@ -399,6 +431,9 @@ module scm_type_defs end type scm_input_type +!> \section arg_table_scm_reference_type +!! \htmlinclude scm_reference_type.html +!! type scm_reference_type !> - Define the reference profile variables. integer :: ref_nlev !< number of levels in the reference profile @@ -412,40 +447,12 @@ module scm_type_defs end type scm_reference_type -!> \section arg_table_physics_type -!! \htmlinclude physics_type.html -!! - type physics_type - - type(GFS_control_type) :: Model - type(GFS_statein_type) :: Statein - type(GFS_stateout_type) :: Stateout - type(GFS_sfcprop_type) :: Sfcprop - type(GFS_coupling_type) :: Coupling - type(GFS_grid_type) :: Grid - type(GFS_tbd_type) :: Tbd - type(GFS_cldprop_type) :: Cldprop - type(GFS_radtend_type) :: Radtend - type(GFS_diag_type) :: Diag - type(GFS_interstitial_type) :: Interstitial - type(GFS_init_type) :: Init_parm - - contains - procedure :: create => physics_create - procedure :: associate => physics_associate - procedure :: set => physics_set - end type physics_type - - type(physics_type), target :: physics - - type(ccpp_t), target :: cdata - contains subroutine scm_state_create(scm_state, n_columns, n_levels, n_soil, n_snow, n_time_levels, tracers, tracer_types) class(scm_state_type) :: scm_state integer, intent(in) :: n_columns, n_levels, n_soil, n_snow, n_time_levels - character(len=character_length), intent(in), dimension(:) :: tracers + character(len=80), intent(in), dimension(:) :: tracers integer, intent(in), dimension(:) :: tracer_types integer :: i diff --git a/scm/src/scm_type_defs.meta b/scm/src/scm_type_defs.meta index dce3cb400..296930691 100644 --- a/scm/src/scm_type_defs.meta +++ b/scm/src/scm_type_defs.meta @@ -1,3 +1,34 @@ +######################################################################## +[ccpp-table-properties] + name = scm_state_type + type = ddt + dependencies = + +[ccpp-arg-table] + name = scm_state_type + type = ddt + +######################################################################## +[ccpp-table-properties] + name = scm_input_type + type = ddt + dependencies = + +[ccpp-arg-table] + name = scm_input_type + type = ddt + +######################################################################## +[ccpp-table-properties] + name = scm_reference_type + type = ddt + dependencies = + +[ccpp-arg-table] + name = scm_reference_type + type = ddt + +######################################################################## [ccpp-table-properties] name = physics_type type = ddt @@ -7,96 +38,114 @@ name = physics_type type = ddt [Model] - standard_name = GFS_control_type_instance + standard_name = GFS_control_type long_name = instance of derived type GFS_control_type units = DDT dimensions = () type = GFS_control_type [Cldprop] - standard_name = GFS_cldprop_type_instance + standard_name = GFS_cldprop_type long_name = instance of derived type GFS_cldprop_type units = DDT dimensions = () type = GFS_cldprop_type [Coupling] - standard_name = GFS_coupling_type_instance + standard_name = GFS_coupling_type long_name = instance of derived type GFS_coupling_type units = DDT dimensions = () type = GFS_coupling_type [Diag] - standard_name = GFS_diag_type_instance + standard_name = GFS_diag_type long_name = instance of derived type GFS_diag_type units = DDT dimensions = () type = GFS_diag_type [Grid] - standard_name = GFS_grid_type_instance + standard_name = GFS_grid_type long_name = instance of derived type GFS_grid_type units = DDT dimensions = () type = GFS_grid_type [Radtend] - standard_name = GFS_radtend_type_instance + standard_name = GFS_radtend_type long_name = instance of derived type GFS_radtend_type units = DDT dimensions = () type = GFS_radtend_type [Sfcprop] - standard_name = GFS_sfcprop_type_instance + standard_name = GFS_sfcprop_type long_name = instance of derived type GFS_sfcprop_type units = DDT dimensions = () type = GFS_sfcprop_type [Statein] - standard_name = GFS_statein_type_instance + standard_name = GFS_statein_type long_name = instance of derived type GFS_statein_type units = DDT dimensions = () type = GFS_statein_type [Stateout] - standard_name = GFS_stateout_type_instance + standard_name = GFS_stateout_type long_name = instance of derived type GFS_stateout_type units = DDT dimensions = () type = GFS_stateout_type [Tbd] - standard_name = GFS_tbd_type_instance + standard_name = GFS_tbd_type long_name = instance of derived type GFS_tbd_type units = DDT dimensions = () type = GFS_tbd_type [Interstitial] - standard_name = GFS_interstitial_type_instance + standard_name = GFS_interstitial_type long_name = instance of derived type GFS_interstitial_type units = DDT dimensions = () type = GFS_interstitial_type +[Init_parm] + standard_name = GFS_init_type + long_name = instance of derived type GFS_init_type + units = DDT + dimensions = () + type = GFS_init_type ######################################################################## [ccpp-table-properties] name = scm_type_defs - type = module - dependencies = scm_kinds.F90,GFS_typedefs.F90,CCPP_typedefs.F90,../../ccpp/physics/physics/hooks/machine.F + type = host + dependencies = GFS_typedefs.F90,CCPP_typedefs.F90,ccpp_config.F90 + dependencies = scm_kinds.F90,scm_utils.F90 [ccpp-arg-table] name = scm_type_defs - type = module -[physics_type] + type = host +[physics] standard_name = physics_type - long_name = definition of type physics_type + long_name = definition of derived data type physics_type units = DDT dimensions = () type = physics_type -[physics] - standard_name = physics_type_instance - long_name = instance of derived data type physics_type + intent = inout +[ccpp_cfg] + standard_name = ccpp_configuration + long_name = definition of derived data type ccpp_config units = DDT dimensions = () - type = physics_type -[cdata] - standard_name = ccpp_t_instance - long_name = instance of derived data type ccpp_t - units = DDT + type = ty_ccpp_config + intent = in +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none dimensions = () - type = ccpp_t + type = character + kind = len=512 + intent = out