From 115e116b066839a603aa8dc75d0bd4ce4047f387 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Fri, 10 Apr 2026 10:26:41 -0400 Subject: [PATCH 01/14] [scm/dev] Ability to build with ip and sp library (#1208) * Add ability to build with ip if it is found. sp is being replaced by ip so this is needed. Note that in spack-stack 1.9.3 the ip package builds with the OpenMP flag, so CMAKE_Fortran_FLAGS_OPENMP_OFF needs to be set by the host model. The RRTMGP files currently break if compiled with OpenMP flags. * only have DTC/SCM people in the CODEOWNERS for the scm/dev branch --------- Co-authored-by: Soren Rasmussen --- CMakeLists.txt | 6 +- CODEOWNERS | 185 +------------------------------------------------ 2 files changed, 6 insertions(+), 185 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5afd86200..c32a12907 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -207,9 +207,13 @@ target_include_directories(ccpp_physics PUBLIC target_link_libraries(ccpp_physics PRIVATE MPI::MPI_Fortran) target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d - sp::sp_d NetCDF::NetCDF_Fortran ) +if(ip_FOUND) + target_link_libraries(ccpp_physics PUBLIC ip::ip_d) +else() + target_link_libraries(ccpp_physics PUBLIC sp::sp_d) +endif() #add FMS for FV3 only if(FV3 OR MPAS) target_link_libraries(ccpp_physics PUBLIC fms) diff --git a/CODEOWNERS b/CODEOWNERS index 61ee44df8..c9bd438e4 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,190 +4,7 @@ # Default codeowners for files that don't have specific owners: -* @grantfirl @rhaesung @Qingfu-Liu @dustinswales @mzhangw @climbfuji - - -# The following lines are from the CCPP Primary Schemes Points of Contact -# https://docs.google.com/spreadsheets/d/14y0Th_sSpCqlssEMNfSZ_Ni9wrpPqfpPY0kRG7jCZB8/edit#gid=0 -# (Internal NOAA document.) - -physics/CONV/C3/cu_c3* @lisa-bengtsson @haiqinli @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/Chikira_Sugiyama/cs_conv_aw_adj.* @AnningCheng-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/Chikira_Sugiyama/cs_conv.* @AnningCheng-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/Grell_Freitas/cu_gf* @haiqinli @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/RAS/rascnv.* @haiqinli @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/SAMF/samfdeepcnv.* @JongilHan66 @lisa-bengtsson @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/SAMF/samfshalcnv.* @JongilHan66 @lisa-bengtsson @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/SAMF/samfaerosols.* @JongilHan66 @lisa-bengtsson @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/SAS/sascnvn.* @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/SAS/shalcnv.* @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/nTiedtke/cu_ntiedtke* @JongilHan66 @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/CONV/progsigma_calc.f90 @lisa-bengtsson @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/cires_orowam2017.f @mdtoyNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/cires_tauamf_data.F90 @mdtoyNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/cires_ugwp* @mdtoyNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/drag_suite.* @mdtoyNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/gwdc.* @Songyou184 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/gwdps.* @Songyou184 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/rayleigh_damp.* @yangfanglin @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/ugwp_driver_v0.F90 @mdtoyNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/ugwpv1_gsldrag.* @mdtoyNOAA @BoYang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/ugwpv1_gsldrag_post.* @mdtoyNOAA @BoYang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/GWD/unified_ugwp* @mdtoyNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Ferrier_Aligo/module_MP_FER_HIRES.* @ericaligo-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Ferrier_Aligo/mp_fer_hires.* @ericaligo-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/GFDL/v1_2019/gfdl_cloud_microphys_mod.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3_mod.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/GFDL/fv_sat_adj.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/GFDL/multi_gases.F90 @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/aer_cloud.F @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/aerclm_def.F @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/aerinterp.F90 @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/cldmacro.F @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/cldwat2m_micro.F @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/micro_mg* @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/m_micro* @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Morrison_Gettelman/wv_saturation.F @AnningCheng-NOAA @andrewgettelman @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/NSSL/module_mp_nssl_2mom.F90 @MicroTed @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/NSSL/mp_nssl.* @MicroTed @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Thompson/module_mp_thompson* @gthompsnWRF @RuiyuSun @AndersJensen-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Thompson/mp_thompson* @gthompsnWRF @RuiyuSun @AndersJensen-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Zhao_Carr/zhaocarr_gscond.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/Zhao_Carr/zhaocarr_precpd.* @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/calpreciptype.f90 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/MP/module_mp_radar.* @gthompsnWRF @RuiyuSun @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/HEDMF/hedmf.* @JongilHan66 @WeiguoWang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/MYJ/module_BL_MYJPBL.* @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/MYJ/myjpbl_wrapper.* @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/MYNN_EDMF/bl_mynn_common.f90 @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/MYNN_EDMF/module_bl_mynn.* @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/MYNN_EDMF/mynnedmf_wrapper.* @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/SATMEDMF/satmedmfvdif.* @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/SATMEDMF/satmedmfvdifq.* @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/SATMEDMF/mfscu.f @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/SATMEDMF/mfscuq.f @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/SHOC/moninshoc.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/SHOC/shoc.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/YSU/ysuvdif.* @Qingfu-Liu @WeiguoWang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/saYSU/shinhongvdif.* @Qingfu-Liu @WeiguoWang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/mfpbl.f @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/mfpblt.f @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/mfpbltq.f @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/PBL/tridi.f @JongilHan66 @WeiguoWang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/iounitdef.f @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/module_bfmicrophysics.f @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/rad_sw_pre* @mjiacono @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/radcons.f90 @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/radlw_* @mjiacono @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/radsw_* @mjiacono @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/rrtmg_lw_cloud_optics.F90 @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/rrtmg_lw_post.* @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/rrtmg_sw_cloud_optics.F90 @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMG/rrtmg_sw_post.* @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMGP/rte-rrtmgp @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMGP/rrtmgp_aerosol_optics.* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMGP/rrtmgp_lw_* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/RRTMGP/rrtmgp_sw_* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/mersenne_twister.f @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/radiation_aerosols.f @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/radiation_astronomy.f @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/radiation_cloud_overlap.F90 @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/radiation_clouds.f @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/radiation_gases.f @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/radiation_surface.f @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Radiation/radiation_tools.F90 @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/GFDL/gfdl_sfc_layer.* @ZhanZhang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/GFDL/module_sf_exchcoef.f90 @ZhanZhang-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/MYJ/myjsfc_wrapper.* @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/MYJ/module_SF_JSFC.F90 @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/MYNN/MYNN/module_sf_mynnsfc.* @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/MYNN/module_sf_mynn.F90 @joeolson42 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/UFS/date_def.f @XuLi-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/UFS/module_nst* @XuLi-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/UFS/sfc_diag.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/UFS/sfc_diag_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/UFS/sfc_diff.* @JongilHan66 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Layer/UFS/sfc_nst* @XuLi-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Lake/CLM/clm_lake.* @tanyasmirnova @SamuelTrahanNOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Lake/Flake/flake* @barlage @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/Noah/lsm_noah.* @HelinWei-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/Noah/namelist_soilveg.* @HelinWei-NOAA @barlage @cenlinhe @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/Noah/set_soilveg.* @HelinWei-NOAA @barlage @cenlinhe @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/Noah/sflx.f @HelinWei-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/Noah/surface_perturbation.* @HelinWei-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/Noahmp/*noahmp* @barlage @cenlinhe @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/RUC/lsm_ruc.* @tanyasmirnova @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/RUC/module_sf_ruclsm.* @tanyasmirnova @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/RUC/module_soil_pre.* @tanyasmirnova @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/RUC/namelist_soilveg_ruc.* @tanyasmirnova @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/RUC/set_soilveg_ruc.* @tanyasmirnova @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Land/sfc_land.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/Ocean/UFS/sfc_ocean.* @HelinWei-NOAA @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/SeaIce/CICE/sfc_cice.* @wd20xw @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/SFC_Models/SeaIce/CICE/sfc_sice.* @wd20xw @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/hooks/machine.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/hooks/physcons.F90 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/photochem/module_h2ophys.* @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/photochem/module_ozphys.* @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/smoke_dust/* @haiqinli @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/tools/funcphys.f90 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/tools/get_phi_fv3.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/tools/get_prs_fv3.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_cloud_diagnostics.* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_pre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_pre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_pre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_common.F90 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_physics_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.fv3.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.* @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.* @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.* @dustinswales @Qingfu-Liu @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.* @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.* @pjpegion @lisa-bengtsson @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_1.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_2.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_5.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_reset.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_update.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_inter.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part1.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part2.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/cnvc90.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.* @Qingfu-Liu @dustinswales @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/gcycle.F90 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/iccn_def.F @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90 @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/scm_sfc_flux_spec.* @grantfirl @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpost.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales -physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.* @grantfirl @rhaesung @Qingfu-Liu @dustinswales +* @grantfirl @scrasmussen @dustinswales ######################################################################## From 88c6e9547c2cf2bc9ba978979ecfa9b898fc8672 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 13 Apr 2026 11:10:03 -0400 Subject: [PATCH 02/14] [scm/dev] Update scm/dev from main (includes ccpp_bcast PR + followup NOAA fixes) (#1209) * Read and broadcast data from MPI root rank during init and timestep init phase in GFS time vary; add time vary interstitials for NEPTUNE (#1187) * 1. number_of_coefficients_in_ozone_data --> number_of_coefficients_in_ozone_forcing_data 2. Add NEPTUNE interstitials in physics/Interstitials/UFS_SCM_NEPTUNE/ * Read and broadcast data in CCPP init and timestep_init phases instead of reading with every MPI rank * In physics/Radiation/radiation_astronomy.f, replace hardcoded zero with mpiroot; move mpiutil.F90 to subdirectory tools * physics/tools/mpiutil.F90: add temporary routine to mpi-abort the model if MPI broadcast errors occur * Bug fixes in physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.*.F90 when writing to errmsg for invalid w3kindreal/w3kindint; additionally: formatting updates * In physics/Radiation/radiation_astronomy.f, replace hardcoded zero with mpiroot; move mpiutil.F90 to subdirectory tools * Add ability to build with ip if it is found. sp is being replaced by ip so this is needed. Note that in spack-stack 1.9.3 the ip package builds with the OpenMP flag, so CMAKE_Fortran_FLAGS_OPENMP_OFF needs to be set by the host model. The RRTMGP files currently break if compiled with OpenMP flags. * update several files to work with CCPP SCM after PR 1187 * remove ccpp_bcast for aerin and aer_pres due to UFS RT hanging --------- Co-authored-by: Dom Heinzeller Co-authored-by: Soren Rasmussen --- physics/GWD/cires_tauamf_data.F90 | 68 +- .../UFS_SCM_NEPTUNE/GFS_photochemistry.meta | 2 +- .../GFS_phys_time_vary.fv3.F90 | 50 +- .../GFS_phys_time_vary.fv3.meta | 24 +- .../GFS_phys_time_vary.neptune.F90 | 1004 ++++++++ .../GFS_phys_time_vary.neptune.meta | 2129 +++++++++++++++++ .../GFS_phys_time_vary.scm.F90 | 46 +- .../GFS_phys_time_vary.scm.meta | 24 +- .../GFS_rad_time_vary.neptune.F90 | 100 + .../GFS_rad_time_vary.neptune.meta | 248 ++ .../UFS_SCM_NEPTUNE/GFS_radiation_surface.F90 | 13 +- .../GFS_radiation_surface.meta | 16 +- .../UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 | 58 +- .../UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta | 33 +- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 | 42 +- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta | 32 +- .../UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 | 6 +- .../GFS_time_vary_pre.neptune.F90 | 207 ++ .../GFS_time_vary_pre.neptune.meta | 240 ++ .../UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 | 25 +- .../UFS_SCM_NEPTUNE/iccninterp.F90 | 68 +- physics/MP/Morrison_Gettelman/aerinterp.F90 | 124 +- physics/MP/TEMPO/mp_tempo.meta | 2 +- physics/MP/Thompson/mp_thompson.meta | 2 +- physics/Radiation/radiation_aerosols.f | 351 +-- physics/Radiation/radiation_astronomy.f | 127 +- physics/Radiation/radiation_gases.f | 460 ++-- physics/Radiation/radiation_surface.f | 55 +- physics/tools/mpiutil.F90 | 245 ++ 29 files changed, 5145 insertions(+), 656 deletions(-) create mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 create mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta create mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.F90 create mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.meta create mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 create mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta create mode 100644 physics/tools/mpiutil.F90 diff --git a/physics/GWD/cires_tauamf_data.F90 b/physics/GWD/cires_tauamf_data.F90 index 323cea9a8..ea56d4e61 100644 --- a/physics/GWD/cires_tauamf_data.F90 +++ b/physics/GWD/cires_tauamf_data.F90 @@ -4,6 +4,7 @@ module cires_tauamf_data use machine, only: kind_phys + use mpi_f08 !........................................................................................... ! tabulated GW-sources: GRACILE/Ern et al., 2018 and/or Resolved GWs from C384-Annual run !........................................................................................... @@ -20,18 +21,20 @@ module cires_tauamf_data contains !> - subroutine read_tau_amf(me, master, errmsg, errflg) + subroutine read_tau_amf(mpicomm, mpirank, mpiroot, errmsg, errflg) - use netcdf - integer, intent(in) :: me, master + use netcdf + use mpiutil, only: ccpp_bcast + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot integer :: ncid, iernc, vid, dimid, status integer :: k character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg ! - - iernc=NF90_OPEN(trim(ugwp_taufile), nf90_nowrite, ncid) + read_and_broadcast_1: if (mpirank==mpiroot) then + iernc=NF90_OPEN(trim(ugwp_taufile), nf90_nowrite, ncid) if(iernc.ne.0) then write(errmsg,'(*(a))') "read_tau_amf: cannot open file_limb_tab data-file ", & @@ -39,8 +42,7 @@ subroutine read_tau_amf(me, master, errmsg, errflg) print *, 'cannot open ugwp-v1 tau-file=',trim(ugwp_taufile) errflg = 1 return - else - + endif status = nf90_inq_dimid(ncid, "lat", DimID) ! if (status /= nf90_noerr) call handle_err(status) @@ -50,28 +52,36 @@ subroutine read_tau_amf(me, master, errmsg, errflg) status = nf90_inq_dimid(ncid, "days", DimID) status = nf90_inquire_dimension(ncid, DimID, len =ntau_d2t ) - if (me == master) print *, ntau_d1y, ntau_d2t, ' dimd of tau_ngw ugwp-v1 ' - if (ntau_d2t .le. 0 .or. ntau_d1y .le. 0) then - print *, 'ugwp-v1 tau-file=', trim(ugwp_taufile) - print *, ' ugwp-v1: ', 'ntau_d2t=',ntau_d2t, 'ntau_d2t=',ntau_d1y - stop - endif - - if (.not.allocated(ugwp_taulat)) allocate (ugwp_taulat(ntau_d1y )) - if (.not.allocated(days_limb)) allocate (days_limb(ntau_d2t)) - if (.not.allocated(tau_limb)) allocate (tau_limb(ntau_d1y, ntau_d2t )) - - iernc=nf90_inq_varid( ncid, 'DAYS', vid ) - iernc= nf90_get_var( ncid, vid, days_limb) - iernc=nf90_inq_varid( ncid, 'LATS', vid ) - iernc= nf90_get_var( ncid, vid, ugwp_taulat) - iernc=nf90_inq_varid( ncid, 'ABSMF', vid ) - iernc= nf90_get_var( ncid, vid, tau_limb) - - iernc=nf90_close(ncid) - - endif - + print *, ntau_d1y, ntau_d2t, ' dimd of tau_ngw ugwp-v1 ' + if (ntau_d2t .le. 0 .or. ntau_d1y .le. 0) then + print *, 'ugwp-v1 tau-file=', trim(ugwp_taufile) + print *, ' ugwp-v1: ', 'ntau_d2t=',ntau_d2t, 'ntau_d2t=',ntau_d1y + errflg = 1 + return + endif + endif read_and_broadcast_1 + + call ccpp_bcast(ntau_d1y, mpiroot, mpicomm, errflg) + call ccpp_bcast(ntau_d2t, mpiroot, mpicomm, errflg) + + if (.not.allocated(ugwp_taulat)) allocate (ugwp_taulat(ntau_d1y )) + if (.not.allocated(days_limb)) allocate (days_limb(ntau_d2t)) + if (.not.allocated(tau_limb)) allocate (tau_limb(ntau_d1y, ntau_d2t )) + + read_and_broadcast_2: if (mpirank==mpiroot) then + iernc=nf90_inq_varid( ncid, 'DAYS', vid ) + iernc= nf90_get_var( ncid, vid, days_limb) + iernc=nf90_inq_varid( ncid, 'LATS', vid ) + iernc= nf90_get_var( ncid, vid, ugwp_taulat) + iernc=nf90_inq_varid( ncid, 'ABSMF', vid ) + iernc= nf90_get_var( ncid, vid, tau_limb) + iernc=nf90_close(ncid) + endif read_and_broadcast_2 + + call ccpp_bcast(days_limb, mpiroot, mpicomm, errflg) + call ccpp_bcast(tau_limb, mpiroot, mpicomm, errflg) + call ccpp_bcast(ugwp_taulat, mpiroot, mpicomm, errflg) + end subroutine read_tau_amf !> diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.meta index a89773b12..1b5947d98 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.meta @@ -107,7 +107,7 @@ standard_name = ozone_forcing long_name = ozone forcing data units = mixed - dimensions = (horizontal_loop_extent,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_data) + dimensions = (horizontal_loop_extent,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) type = real kind = kind_phys intent = in diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 index 378b9a8d2..ca21e914c 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 @@ -6,6 +6,7 @@ !! aerosol, IN&CCN and surface properties updates. module GFS_phys_time_vary + use mpi_f08 #ifdef _OPENMP use omp_lib #endif @@ -79,7 +80,7 @@ end subroutine copy_error !>\section gen_GFS_phys_time_vary_init GFS_phys_time_vary_init General Algorithm !> @{ subroutine GFS_phys_time_vary_init ( & - me, master, ntoz, h2o_phys, iaerclm, iaermdl, iccn, iflip, im, levs, & + mpicomm, mpirank, mpiroot, ntoz, h2o_phys, iaerclm, iaermdl, iccn, iflip, im, levs, & nx, ny, idate, xlat_d, xlon_d, & jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, jindx2_h, ddy_h, h2opl,fhour, & jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & @@ -100,7 +101,8 @@ subroutine GFS_phys_time_vary_init ( implicit none ! Interface variables - integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny, levs, iaermdl + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, ntoz, iccn, iflip, im, nx, ny, levs, iaermdl logical, intent(in) :: h2o_phys, iaerclm, lsm_cold_start integer, intent(in) :: idate(:), iopt_lake, iopt_lake_clm, iopt_lake_flake real(kind_phys), intent(in) :: fhour, lakefrac_threshold, lakedepth_threshold @@ -230,9 +232,9 @@ subroutine GFS_phys_time_vary_init ( if (iaerclm) then ntrcaer = ntrcaerm if(iaermdl == 1) then - call read_aerdata (me,master,iflip,idate,errmsg,errflg) + call read_aerdata (mpicomm,mpirank,mpiroot,iflip,idate,errmsg,errflg) elseif (iaermdl == 6) then - call read_aerdata_dl(me,master,iflip, & + call read_aerdata_dl(mpicomm, mpirank, mpiroot, iflip, & idate,fhour, errmsg,errflg) end if if(errflg/=0) return @@ -251,19 +253,19 @@ subroutine GFS_phys_time_vary_init ( !> - Call read_cidata() to read IN and CCN data if (iccn == 1) then - call read_cidata (me,master) + call read_cidata (mpicomm, mpirank, mpiroot) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif !> - Call tau_amf dats for ugwp_v1 if (do_ugwp_v1) then - call read_tau_amf(me, master, errmsg, errflg) + call read_tau_amf(mpicomm, mpirank, mpiroot, errmsg, errflg) if(errflg/=0) return endif !> - Initialize soil vegetation (needed for sncovr calculation further down) - call set_soilveg(me, isot, ivegsrc, nlunit, errmsg, errflg) + call set_soilveg(mpirank, isot, ivegsrc, nlunit, errmsg, errflg) if(errflg/=0) return !> - read in NoahMP table (needed for NoahMP init) @@ -289,8 +291,7 @@ subroutine GFS_phys_time_vary_init ( if (iaerclm) then call setindxaer (im, xlat_d, jindx1_aer, & jindx2_aer, ddy_aer, xlon_d, & - iindx1_aer, iindx2_aer, ddx_aer, & - me, master) + iindx1_aer, iindx2_aer, ddx_aer) iamin = min(minval(iindx1_aer), iamin) iamax = max(maxval(iindx2_aer), iamax) jamin = min(minval(jindx1_aer), jamin) @@ -306,7 +307,7 @@ subroutine GFS_phys_time_vary_init ( !> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that can resolve GWs if (do_ugwp_v1) then - call cires_indx_ugwp (im, me, master, xlat_d, jindx1_tau, jindx2_tau, & + call cires_indx_ugwp (im, mpirank, mpiroot, xlat_d, jindx1_tau, jindx2_tau, & ddy_j1tau, ddy_j2tau) endif @@ -322,7 +323,7 @@ subroutine GFS_phys_time_vary_init ( !--- if sncovr does not exist in the restart, need to create it if (all(sncovr < zero)) then - if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' + if (mpirank == mpiroot ) write(*,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' !--- compute sncovr from existing variables !--- code taken directly from read_fix.f sncovr(:) = zero @@ -343,7 +344,7 @@ subroutine GFS_phys_time_vary_init ( !--- For RUC LSM: create sncovr_ice from sncovr if (lsm == lsm_ruc) then if (all(sncovr_ice < zero)) then - if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' + if (mpirank == mpiroot ) write(*,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' sncovr_ice(:) = sncovr(:) endif endif @@ -353,9 +354,9 @@ subroutine GFS_phys_time_vary_init ( if (iaerclm) then ! This call is outside the OpenMP section, so it should access errmsg & errflg directly. if(iaermdl==1) then - call read_aerdataf (me, master, iflip, idate, fhour, errmsg, errflg) + call read_aerdataf (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) elseif (iaermdl==6) then - call read_aerdataf_dl (me, master, iflip, idate, fhour, errmsg, errflg) + call read_aerdataf_dl (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) end if ! If it is moved to an OpenMP section, it must use myerrmsg, myerrflg, and copy_error. if (errflg/=0) return @@ -365,7 +366,7 @@ subroutine GFS_phys_time_vary_init ( !--- land and ice - not for restart runs lsm_init: if (lsm_cold_start) then if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then - if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' + if (mpirank == mpiroot ) write(*,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' do ix=1,im albdvis_lnd(ix) = 0.2_kind_phys albdnir_lnd(ix) = 0.2_kind_phys @@ -705,7 +706,7 @@ end subroutine GFS_phys_time_vary_init !>\section gen_GFS_phys_time_vary_timestep_init GFS_phys_time_vary_timestep_init General Algorithm !> @{ subroutine GFS_phys_time_vary_timestep_init ( & - me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, cplflx, & + mpicomm, mpirank, mpiroot, cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, cplflx, & nsswr, fhswr, lsswr, fhour, & imfdeepcnv, cal_pre, random_clds, nscyc, ntoz, h2o_phys, iaerclm, iaermdl, iccn, clstp, & jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, iflip, & @@ -724,7 +725,8 @@ subroutine GFS_phys_time_vary_timestep_init ( implicit none ! Interface variables - integer, intent(in) :: me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, & + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, cnx, cny, isc, jsc, nrcm, im, levs, kdt, & nsswr, imfdeepcnv, iccn, nscyc, ntoz, iflip, iaermdl integer, intent(in) :: idate(:) real(kind_phys), intent(in) :: fhswr, fhour @@ -794,8 +796,8 @@ subroutine GFS_phys_time_vary_timestep_init ( !$OMP parallel num_threads(nthrds) default(none) & !$OMP shared(kdt,nsswr,lsswr,clstp,imfdeepcnv,cal_pre,random_clds) & !$OMP shared(fhswr,fhour,seed0,cnx,cny,nrcm,wrk,rannie,rndval, iaermdl) & -!$OMP shared(rann,im,isc,jsc,imap,jmap,ntoz,me,idate,jindx1_o3,jindx2_o3) & -!$OMP shared(ozpl,ddy_o3,h2o_phys,jindx1_h,jindx2_h,h2opl,ddy_h,iaerclm,master) & +!$OMP shared(rann,im,isc,jsc,imap,jmap,ntoz,mpirank,idate,jindx1_o3,jindx2_o3) & +!$OMP shared(ozpl,ddy_o3,h2o_phys,jindx1_h,jindx2_h,h2opl,ddy_h,iaerclm,mpiroot)& !$OMP shared(levs,prsl,iccn,jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci) & !$OMP shared(ddx_ci,in_nm,ccn_nm,do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau) & !$OMP shared(ddy_j2tau,tau_amf,iflip,ozphys,h2ophys,rjday,n1,n2,idat,jdat,rinc) & @@ -883,7 +885,7 @@ subroutine GFS_phys_time_vary_timestep_init ( !$OMP section !> - Call ciinterpol() to make IN and CCN data interpolation if (iccn == 1) then - call ciinterpol (me, im, idate, fhour, & + call ciinterpol (mpirank, im, idate, fhour,& jindx1_ci, jindx2_ci, & ddy_ci, iindx1_ci, & iindx2_ci, ddx_ci, & @@ -893,7 +895,7 @@ subroutine GFS_phys_time_vary_timestep_init ( !$OMP section !> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that resolve GW-activ if (do_ugwp_v1) then - call tau_amf_interp(me, master, im, idate, fhour, & + call tau_amf_interp(mpirank, mpiroot, im, idate, fhour, & jindx1_tau, jindx2_tau, & ddy_j1tau, ddy_j2tau, tau_amf) endif @@ -906,13 +908,13 @@ subroutine GFS_phys_time_vary_timestep_init ( ! aerinterpol is using threading inside, don't ! move into OpenMP parallel section above if (iaermdl==1) then - call aerinterpol (me, master, nthrds, im, idate, & + call aerinterpol (mpicomm, mpirank, mpiroot, nthrds, im, idate, & fhour, iflip, jindx1_aer, jindx2_aer, & ddy_aer, iindx1_aer, & iindx2_aer, ddx_aer, & levs, prsl, aer_nm, errmsg, errflg) else if (iaermdl==6) then - call aerinterpol_dl (me, master, nthrds, im, idate, & + call aerinterpol_dl (mpicomm, mpirank, mpiroot, nthrds, im, idate, & fhour, iflip, jindx1_aer, jindx2_aer, & ddy_aer, iindx1_aer, & iindx2_aer, ddx_aer, & @@ -924,7 +926,7 @@ subroutine GFS_phys_time_vary_timestep_init ( !> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs if (nscyc > 0) then if (mod(kdt,nscyc) == 1) THEN - call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml, & + call gcycle (mpirank, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml, & input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,& frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, & diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta index be7960bae..1bad16da8 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta @@ -16,14 +16,21 @@ name = GFS_phys_time_vary_init type = scheme -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in -[master] +[mpiroot] standard_name = mpi_root long_name = master MPI-rank units = index @@ -1096,14 +1103,21 @@ [ccpp-arg-table] name = GFS_phys_time_vary_timestep_init type = scheme -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in -[master] +[mpiroot] standard_name = mpi_root long_name = master MPI-rank units = index @@ -1310,7 +1324,7 @@ standard_name = ozone_forcing long_name = ozone forcing data units = mixed - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_data) + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) type = real kind = kind_phys intent = inout diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 new file mode 100644 index 000000000..9f10f5883 --- /dev/null +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 @@ -0,0 +1,1004 @@ +!> \file GFS_phys_time_vary.neptune.F90 +!! Contains code related to GFS physics suite setup (physics part of time_vary_step) + +!>\defgroup mod_GFS_phys_time_vary GFS Physics Time Update +!! This module contains GFS physics time vary subroutines including stratospheric water vapor, +!! aerosol, IN&CCN and surface properties updates. + module GFS_phys_time_vary + + use mpi_f08 +#ifdef _OPENMP + use omp_lib +#endif + + use machine, only : kind_phys, kind_dbl_prec, kind_sngl_prec + + use mersenne_twister, only: random_setseed, random_number + + use module_ozphys, only: ty_ozphys + use module_h2ophys, only: ty_h2ophys + + use aerclm_def, only : aerin, aer_pres, ntrcaer, ntrcaerm, iamin, iamax, jamin, jamax + use aerinterp, only : read_aerdata, setindxaer, aerinterpol, read_aerdataf, & + read_aerdata_dl, aerinterpol_dl, read_aerdataf_dl + + use iccn_def, only : ciplin, ccnin, ci_pres + use iccninterp, only : read_cidata, setindxci, ciinterpol + + !use gcycle_mod, only : gcycle + + use cires_tauamf_data, only: cires_indx_ugwp, read_tau_amf, tau_amf_interp + use cires_tauamf_data, only: tau_limb, days_limb, ugwp_taulat + + !--- variables needed for calculating 'sncovr' + use namelist_soilveg, only: salp_data, snupx + use set_soilveg_mod, only: set_soilveg + + ! --- needed for Noah MP init + use noahmp_tables, only: read_mp_table_parameters, & + laim_table,saim_table,sla_table, & + bexp_table,smcmax_table,smcwlt_table, & + dwsat_table,dksat_table,psisat_table, & + isurban_table,isbarren_table, & + isice_table,iswater_table + + implicit none + + private + + public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize + + real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys + real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys + real(kind=kind_phys), parameter :: con_100 = 100.0_kind_phys + real(kind=kind_phys), parameter :: missing_value = 9.99e20_kind_phys + real(kind=kind_phys), parameter :: drythresh = 1.e-4_kind_phys + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys + real(kind=kind_phys), parameter :: one = 1.0_kind_phys + + contains + + subroutine copy_error(myerrmsg, myerrflg, errmsg, errflg) + implicit none + character(*), intent(in) :: myerrmsg + integer, intent(in) :: myerrflg + character(*), intent(out) :: errmsg + integer, intent(inout) :: errflg + if(myerrflg /= 0 .and. errflg == 0) then + !$OMP CRITICAL + if(errflg == 0) then + errmsg = myerrmsg + errflg = myerrflg + endif + !$OMP END CRITICAL + endif + end subroutine copy_error + +!> \section arg_table_GFS_phys_time_vary_init Argument Table +!! \htmlinclude GFS_phys_time_vary_init.html +!! +!>\section gen_GFS_phys_time_vary_init GFS_phys_time_vary_init General Algorithm +!> @{ + subroutine GFS_phys_time_vary_init ( & + mpicomm, mpirank, mpiroot, ntoz, h2o_phys, iaerclm, iaermdl, iccn, iflip, im, levs, & + nx, ny, idate, xlat_d, xlon_d, & + jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, jindx2_h, ddy_h, h2opl,fhour, & + jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & + jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, imap, jmap, & + do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, & + isot, ivegsrc, nlunit, sncovr, sncovr_ice, lsm, lsm_noahmp, lsm_ruc, min_seaice, & + fice, landfrac, vtype, weasd, lsoil, zs, dzs, lsnow_lsm_lbound, lsnow_lsm_ubound, & + tvxy, tgxy, tahxy, canicexy, canliqxy, eahxy, cmxy, chxy, fwetxy, sneqvoxy, alboldxy,& + qsnowxy, wslakexy, albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, & + albdnir_ice, albivis_ice, albinir_ice, emiss_lnd, emiss_ice, taussxy, waxy, wtxy, & + zwtxy, xlaixy, xsaixy, lfmassxy, stmassxy, rtmassxy, woodxy, stblcpxy, fastcpxy, & + smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, & + slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, lsm_cold_start, nthrds, & + lkm, use_lake_model, lakefrac, lakedepth, iopt_lake, iopt_lake_clm, iopt_lake_flake, & + lakefrac_threshold, lakedepth_threshold, ozphys, h2ophys, is_initialized, errmsg, & + errflg) + + implicit none + + ! Interface variables + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer, intent(in) :: ntoz, iccn, iflip, im, nx, ny, levs, iaermdl + logical, intent(in) :: h2o_phys, iaerclm, lsm_cold_start + integer, intent(in) :: idate(:), iopt_lake, iopt_lake_clm, iopt_lake_flake + real(kind_phys), intent(in) :: fhour, lakefrac_threshold, lakedepth_threshold + real(kind_phys), intent(in) :: xlat_d(:), xlon_d(:) + + integer, intent(in) :: lkm + integer, intent(inout) :: use_lake_model(:) + real(kind=kind_phys), intent(in ) :: lakefrac(:), lakedepth(:) + + integer, intent(inout), optional :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:) + real(kind_phys), intent(inout), optional :: ddy_o3(:), ddy_h(:) + real(kind_phys), intent(in) :: h2opl(:,:,:) + + integer, intent(inout), optional :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:) + real(kind_phys), intent(inout), optional :: ddy_aer(:), ddx_aer(:) + real(kind_phys), intent(out) :: aer_nm(:,:,:) + integer, intent(inout), optional :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:) + real(kind_phys), intent(inout), optional :: ddy_ci(:), ddx_ci(:) + integer, intent(inout) :: imap(:), jmap(:) + logical, intent(in) :: do_ugwp_v1 + real(kind_phys), intent(inout), optional :: ddy_j1tau(:), ddy_j2tau(:) + integer, intent(inout), optional :: jindx1_tau(:), jindx2_tau(:) + + integer, intent(in) :: isot, ivegsrc, nlunit + real(kind_phys), intent(inout) :: sncovr(:), sncovr_ice(:) + integer, intent(in) :: lsm, lsm_noahmp, lsm_ruc, vtype(:) + real(kind_phys), intent(in) :: min_seaice, fice(:) + real(kind_phys), intent(in) :: landfrac(:) + real(kind_phys), intent(inout) :: weasd(:) + type(ty_ozphys), intent(in) :: ozphys + type(ty_h2ophys), intent(in) :: h2ophys + + ! NoahMP - only allocated when NoahMP is used + integer, intent(in) :: lsoil, lsnow_lsm_lbound, lsnow_lsm_ubound + real(kind_phys), intent(in) :: zs(:) + real(kind_phys), intent(in) :: dzs(:) + real(kind_phys), intent(inout), optional :: tvxy(:) + real(kind_phys), intent(inout), optional :: tgxy(:) + real(kind_phys), intent(inout), optional :: tahxy(:) + real(kind_phys), intent(inout), optional :: canicexy(:) + real(kind_phys), intent(inout), optional :: canliqxy(:) + real(kind_phys), intent(inout), optional :: eahxy(:) + real(kind_phys), intent(inout), optional :: cmxy(:) + real(kind_phys), intent(inout), optional :: chxy(:) + real(kind_phys), intent(inout), optional :: fwetxy(:) + real(kind_phys), intent(inout), optional :: sneqvoxy(:) + real(kind_phys), intent(inout), optional :: alboldxy(:) + real(kind_phys), intent(inout), optional :: qsnowxy(:) + real(kind_phys), intent(inout), optional :: wslakexy(:) + real(kind_phys), intent(inout) :: albdvis_lnd(:) + real(kind_phys), intent(inout) :: albdnir_lnd(:) + real(kind_phys), intent(inout) :: albivis_lnd(:) + real(kind_phys), intent(inout) :: albinir_lnd(:) + real(kind_phys), intent(inout), optional :: albdvis_ice(:) + real(kind_phys), intent(inout), optional :: albdnir_ice(:) + real(kind_phys), intent(inout), optional :: albivis_ice(:) + real(kind_phys), intent(inout), optional :: albinir_ice(:) + real(kind_phys), intent(inout) :: emiss_lnd(:) + real(kind_phys), intent(inout) :: emiss_ice(:) + real(kind_phys), intent(inout), optional :: taussxy(:) + real(kind_phys), intent(inout), optional :: waxy(:) + real(kind_phys), intent(inout), optional :: wtxy(:) + real(kind_phys), intent(inout), optional :: zwtxy(:) + real(kind_phys), intent(inout), optional :: xlaixy(:) + real(kind_phys), intent(inout), optional :: xsaixy(:) + real(kind_phys), intent(inout), optional :: lfmassxy(:) + real(kind_phys), intent(inout), optional :: stmassxy(:) + real(kind_phys), intent(inout), optional :: rtmassxy(:) + real(kind_phys), intent(inout), optional :: woodxy(:) + real(kind_phys), intent(inout), optional :: stblcpxy(:) + real(kind_phys), intent(inout), optional :: fastcpxy(:) + real(kind_phys), intent(inout), optional :: smcwtdxy(:) + real(kind_phys), intent(inout), optional :: deeprechxy(:) + real(kind_phys), intent(inout), optional :: rechxy(:) + real(kind_phys), intent(inout), optional :: snowxy(:) + real(kind_phys), intent(inout), optional :: snicexy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout), optional :: snliqxy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout), optional :: tsnoxy (:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout), optional :: smoiseq(:,:) + real(kind_phys), intent(inout), optional :: zsnsoxy(:,lsnow_lsm_lbound:) + real(kind_phys), intent(inout) :: slc(:,:) + real(kind_phys), intent(inout) :: smc(:,:) + real(kind_phys), intent(inout) :: stc(:,:) + real(kind_phys), intent(in) :: tsfcl(:) + real(kind_phys), intent(in) :: snowd(:) + real(kind_phys), intent(in) :: canopy(:) + real(kind_phys), intent(in) :: tg3(:) + integer, intent(in) :: stype(:) + + real(kind_phys), intent(in) :: con_t0c + + integer, intent(in) :: nthrds + logical, intent(inout) :: is_initialized + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: i, j, ix, vegtyp + real(kind_phys) :: rsnow + + !--- Noah MP + integer :: soiltyp, isnow, is, imn + real(kind=kind_phys) :: masslai, masssai, snd + real(kind=kind_phys) :: bexp, ddz, smcmax, smcwlt, dwsat, dksat, psisat + + real(kind=kind_phys), dimension(:), allocatable :: dzsno + real(kind=kind_phys), dimension(:), allocatable :: dzsnso + + integer :: myerrflg + character(len=255) :: myerrmsg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + ! Initialize copy_error variables + myerrflg = 0 + myerrmsg = 'Error in GFS_phys_time_vary' + + if (is_initialized) return + iamin=999 + iamax=-999 + jamin=999 + jamax=-999 + +!> - Call read_aerdata() to read aerosol climatology, Anning added coupled +!> added coupled gocart and radiation option to initializing aer_nm + if (iaerclm) then + ntrcaer = ntrcaerm + if(iaermdl == 1) then + call read_aerdata (mpicomm,mpirank,mpiroot,iflip,idate,errmsg,errflg) + elseif (iaermdl == 6) then + call read_aerdata_dl(mpicomm,mpirank,mpiroot,iflip, & + idate,fhour, errmsg,errflg) + end if + if(errflg/=0) return + else if(iaermdl ==2 ) then + do ix=1,ntrcaerm + do j=1,levs + do i=1,im + aer_nm(i,j,ix) = 1.e-20_kind_phys + end do + end do + end do + ntrcaer = ntrcaerm + else + ntrcaer = 1 + endif + +!> - Call read_cidata() to read IN and CCN data + if (iccn == 1) then + call read_cidata (mpicomm, mpirank, mpiroot) + ! No consistency check needed for in/ccn data, all values are + ! hardcoded in module iccn_def.F and GFS_typedefs.F90 + endif + +!> - Call tau_amf dats for ugwp_v1 + if (do_ugwp_v1) then + call read_tau_amf(mpicomm, mpirank, mpiroot, errmsg, errflg) + if(errflg/=0) return + endif + +!> - Initialize soil vegetation (needed for sncovr calculation further down) + call set_soilveg(mpirank, isot, ivegsrc, nlunit, errmsg, errflg) + if(errflg/=0) return + +!> - read in NoahMP table (needed for NoahMP init) + if(lsm == lsm_noahmp) then + call read_mp_table_parameters(errmsg, errflg) + if(errflg/=0) return + endif + + +! Need an OpenMP barrier here (implicit in "end sections") + +!> - Setup spatial interpolation indices for ozone physics. + if (ntoz > 0) then + call ozphys%setup_o3prog(xlat_d, jindx1_o3, jindx2_o3, ddy_o3) + endif + +!> - Call setindxh2o() to initialize stratospheric water vapor data + if (h2o_phys) then + call h2ophys%setup(xlat_d, jindx1_h, jindx2_h, ddy_h) + endif + +!> - Call setindxaer() to initialize aerosols data + if (iaerclm) then + call setindxaer (im, xlat_d, jindx1_aer, & + jindx2_aer, ddy_aer, xlon_d, & + iindx1_aer, iindx2_aer, ddx_aer) + iamin = min(minval(iindx1_aer), iamin) + iamax = max(maxval(iindx2_aer), iamax) + jamin = min(minval(jindx1_aer), jamin) + jamax = max(maxval(jindx2_aer), jamax) + endif + +!> - Call setindxci() to initialize IN and CCN data + if (iccn == 1) then + call setindxci (im, xlat_d, jindx1_ci, & + jindx2_ci, ddy_ci, xlon_d, & + iindx1_ci, iindx2_ci, ddx_ci) + endif + +!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that can resolve GWs + if (do_ugwp_v1) then + call cires_indx_ugwp (im, mpirank, mpiroot, xlat_d, jindx1_tau, jindx2_tau, & + ddy_j1tau, ddy_j2tau) + endif + + !--- initial calculation of maps local ix -> global i and j + ix = 0 + do j = 1,ny + do i = 1,nx + ix = ix + 1 + jmap(ix) = j + imap(ix) = i + enddo + enddo + + !--- if sncovr does not exist in the restart, need to create it + if (all(sncovr < zero)) then + if (mpirank==mpiroot) write(*,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' + !--- compute sncovr from existing variables + !--- code taken directly from read_fix.f + sncovr(:) = zero + do ix=1,im + if (landfrac(ix) >= drythresh .or. fice(ix) >= min_seaice) then + vegtyp = vtype(ix) + if (vegtyp == 0) vegtyp = 7 + rsnow = 0.001_kind_phys*weasd(ix)/snupx(vegtyp) + if (0.001_kind_phys*weasd(ix) < snupx(vegtyp)) then + sncovr(ix) = one - (exp(-salp_data*rsnow) - rsnow*exp(-salp_data)) + else + sncovr(ix) = one + endif + endif + enddo + endif + + !--- For RUC LSM: create sncovr_ice from sncovr + if (lsm == lsm_ruc) then + if (all(sncovr_ice < zero)) then + if (mpirank==mpiroot) write(*,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' + sncovr_ice(:) = sncovr(:) + endif + endif + + if (errflg/=0) return + + if (iaerclm) then + ! This call is outside the OpenMP section, so it should access errmsg & errflg directly. + if(iaermdl==1) then + call read_aerdataf (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) + elseif (iaermdl==6) then + call read_aerdataf_dl (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) + end if + ! If it is moved to an OpenMP section, it must use myerrmsg, myerrflg, and copy_error. + if (errflg/=0) return + end if + + !--- For Noah MP or RUC LSMs: initialize four components of albedo for + !--- land and ice - not for restart runs + lsm_init: if (lsm_cold_start) then + if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then + if (mpirank==mpiroot) write(*,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' + do ix=1,im + albdvis_lnd(ix) = 0.2_kind_phys + albdnir_lnd(ix) = 0.2_kind_phys + albivis_lnd(ix) = 0.2_kind_phys + albinir_lnd(ix) = 0.2_kind_phys + emiss_lnd(ix) = 0.95_kind_phys + enddo + endif + if (lsm == lsm_ruc) then + do ix=1,im + albdvis_ice(ix) = 0.6_kind_phys + albdnir_ice(ix) = 0.6_kind_phys + albivis_ice(ix) = 0.6_kind_phys + albinir_ice(ix) = 0.6_kind_phys + emiss_ice(ix) = 0.97_kind_phys + enddo + endif + + noahmp_init: if (lsm == lsm_noahmp) then + allocate(dzsno (lsnow_lsm_lbound:lsnow_lsm_ubound)) + allocate(dzsnso(lsnow_lsm_lbound:lsoil) ) + dzsno(:) = missing_value + dzsnso(:) = missing_value + + tvxy(:) = missing_value + tgxy(:) = missing_value + tahxy(:) = missing_value + canicexy(:) = missing_value + canliqxy(:) = missing_value + eahxy(:) = missing_value + cmxy(:) = missing_value + chxy(:) = missing_value + fwetxy(:) = missing_value + sneqvoxy(:) = missing_value + alboldxy(:) = missing_value + qsnowxy(:) = missing_value + wslakexy(:) = missing_value + taussxy(:) = missing_value + waxy(:) = missing_value + wtxy(:) = missing_value + zwtxy(:) = missing_value + xlaixy(:) = missing_value + xsaixy(:) = missing_value + + lfmassxy(:) = missing_value + stmassxy(:) = missing_value + rtmassxy(:) = missing_value + woodxy(:) = missing_value + stblcpxy(:) = missing_value + fastcpxy(:) = missing_value + smcwtdxy(:) = missing_value + deeprechxy(:) = missing_value + rechxy(:) = missing_value + + snowxy (:) = missing_value + snicexy(:,:) = missing_value + snliqxy(:,:) = missing_value + tsnoxy (:,:) = missing_value + smoiseq(:,:) = missing_value + zsnsoxy(:,:) = missing_value + + imn = idate(2) + +!$OMP parallel do num_threads(nthrds) default(none) & +!$OMP shared(im,lsoil,con_t0c,landfrac,tsfcl,tvxy,tgxy,tahxy) & +!$OMP shared(snowd,canicexy,canliqxy,canopy,eahxy,cmxy,chxy) & +!$OMP shared(fwetxy,sneqvoxy,weasd,alboldxy,qsnowxy,wslakexy) & +!$OMP shared(taussxy) & +!$OMP shared(waxy,wtxy,zwtxy,imn,vtype,xlaixy,xsaixy,lfmassxy) & +!$OMP shared(stmassxy,rtmassxy,woodxy,stblcpxy,fastcpxy) & +!$OMP shared(isbarren_table,isice_table,isurban_table) & +!$omp shared(iswater_table,laim_table,sla_table,bexp_table) & +!$omp shared(stc,smc,slc,tg3,snowxy,tsnoxy,snicexy,snliqxy) & +!$omp shared(zsnsoxy,stype,smcmax_table,smcwlt_table,zs,dzs) & +!$omp shared(dwsat_table,dksat_table,psisat_table,smoiseq) & +!$OMP shared(smcwtdxy,deeprechxy,rechxy,errmsg,errflg) & +!$OMP private(vegtyp,masslai,masssai,snd,dzsno,dzsnso,isnow) & +!$OMP private(soiltyp,bexp,smcmax,smcwlt,dwsat,dksat,psisat) & +!$OMP private(myerrmsg,myerrflg,ddz) + do ix=1,im + if (landfrac(ix) >= drythresh) then + tvxy(ix) = tsfcl(ix) + tgxy(ix) = tsfcl(ix) + tahxy(ix) = tsfcl(ix) + + if (snowd(ix) > 0.01_kind_phys .and. tsfcl(ix) > con_t0c ) then + tvxy(ix) = con_t0c + tgxy(ix) = con_t0c + tahxy(ix) = con_t0c + end if + + canicexy(ix) = 0.0_kind_phys + canliqxy(ix) = canopy(ix) + + eahxy(ix) = 2000.0_kind_phys + + cmxy(ix) = zero + chxy(ix) = zero + fwetxy(ix) = zero + sneqvoxy(ix) = weasd(ix) ! mm + alboldxy(ix) = 0.65_kind_phys + qsnowxy(ix) = zero + +! if (srflag(ix) > 0.001) qsnowxy(ix) = tprcp(ix)/dtp + ! already set to 0.0 + wslakexy(ix) = zero + taussxy(ix) = zero + + waxy(ix) = 4900.0_kind_phys + wtxy(ix) = waxy(ix) + zwtxy(ix) = (25.0_kind_phys + 2.0_kind_phys) - waxy(ix) / 1000.0_kind_phys / 0.2_kind_phys + + vegtyp = vtype(ix) + if (vegtyp == 0) vegtyp = 7 + + if ((vegtyp == isbarren_table) .or. (vegtyp == isice_table) .or. (vegtyp == isurban_table) .or. (vegtyp == iswater_table)) then + + xlaixy(ix) = zero + xsaixy(ix) = zero + + lfmassxy(ix) = zero + stmassxy(ix) = zero + rtmassxy(ix) = zero + + woodxy (ix) = zero + stblcpxy (ix) = zero + fastcpxy (ix) = zero + + else + + xlaixy(ix) = max(laim_table(vegtyp, imn),0.05_kind_phys) +! xsaixy(ix) = max(saim_table(vegtyp, imn),0.05) + xsaixy(ix) = max(xlaixy(ix)*0.1_kind_phys,0.05_kind_phys) + + masslai = 1000.0_kind_phys / max(sla_table(vegtyp),one) + lfmassxy(ix) = xlaixy(ix)*masslai + masssai = 1000.0_kind_phys / 3.0_kind_phys + stmassxy(ix) = xsaixy(ix)* masssai + + rtmassxy(ix) = 500.0_kind_phys + + woodxy(ix) = 500.0_kind_phys + stblcpxy(ix) = 1000.0_kind_phys + fastcpxy(ix) = 1000.0_kind_phys + + endif ! non urban ... + + if (vegtyp == isice_table) then + do is = 1,lsoil + stc(ix,is) = min(stc(ix,is),min(tg3(ix),263.15_kind_phys)) + smc(ix,is) = one + slc(ix,is) = zero + enddo + endif + + snd = snowd(ix)/1000.0_kind_phys ! go to m from snwdph + + if (weasd(ix) /= zero .and. snd == zero ) then + snd = weasd(ix)/1000.0 + endif + + if (vegtyp == 15) then ! land ice in MODIS/IGBP + weasd(ix) = 600.0_kind_phys ! 600mm SWE for glacier + snd = 2.0_kind_phys ! 2m snow depth for glacier + endif + + if (snd < 0.025_kind_phys ) then + snowxy(ix) = zero + dzsno(-2:0) = zero + elseif (snd >= 0.025_kind_phys .and. snd <= 0.05_kind_phys ) then + snowxy(ix) = -1.0_kind_phys + dzsno(0) = snd + elseif (snd > 0.05_kind_phys .and. snd <= 0.10_kind_phys ) then + snowxy(ix) = -2.0_kind_phys + dzsno(-1) = 0.5_kind_phys*snd + dzsno(0) = 0.5_kind_phys*snd + elseif (snd > 0.10_kind_phys .and. snd <= 0.25_kind_phys ) then + snowxy(ix) = -2.0_kind_phys + dzsno(-1) = 0.05_kind_phys + dzsno(0) = snd - 0.05_kind_phys + elseif (snd > 0.25_kind_phys .and. snd <= 0.45_kind_phys ) then + snowxy(ix) = -3.0_kind_phys + dzsno(-2) = 0.05_kind_phys + dzsno(-1) = 0.5_kind_phys*(snd-0.05_kind_phys) + dzsno(0) = 0.5_kind_phys*(snd-0.05_kind_phys) + elseif (snd > 0.45_kind_phys) then + snowxy(ix) = -3.0_kind_phys + dzsno(-2) = 0.05_kind_phys + dzsno(-1) = 0.20_kind_phys + dzsno(0) = snd - 0.05_kind_phys - 0.20_kind_phys + else + myerrmsg = 'Error in GFS_phys_time_vary.neptune.F90: Problem with the logic assigning snow layers in Noah MP initialization' + myerrflg = 1 + call copy_error(myerrmsg, myerrflg, errmsg, errflg) + endif + +! Now we have the snowxy field +! snice + snliq + tsno allocation and compute them from what we have + + tsnoxy(ix,:) = zero + snicexy(ix,:) = zero + snliqxy(ix,:) = zero + zsnsoxy(ix,:) = zero + + isnow = nint(snowxy(ix))+1 ! snowxy <=0.0, dzsno >= 0.0 + +! using stc and tgxy to linearly interpolate the snow temp for each layer + + do is = isnow,0 + tsnoxy(ix,is) = tgxy(ix) + (( sum(dzsno(isnow:is)) -0.5*dzsno(is) )/snd)*(stc(ix,1)-tgxy(ix)) + snliqxy(ix,is) = zero + snicexy(ix,is) = one * dzsno(is) * weasd(ix)/snd + enddo +! +!zsnsoxy, all negative ? +! + do is = isnow,0 + dzsnso(is) = -dzsno(is) + enddo + + do is = 1,4 + dzsnso(is) = -dzs(is) + enddo +! +! Assign to zsnsoxy +! + zsnsoxy(ix,isnow) = dzsnso(isnow) + do is = isnow+1,4 + zsnsoxy(ix,is) = zsnsoxy(ix,is-1) + dzsnso(is) + enddo +! +! smoiseq +! Init water table related quantities here +! + soiltyp = stype(ix) + if (soiltyp /= 0) then + bexp = bexp_table(soiltyp) + smcmax = smcmax_table(soiltyp) + smcwlt = smcwlt_table(soiltyp) + dwsat = dwsat_table(soiltyp) + dksat = dksat_table(soiltyp) + psisat = -psisat_table(soiltyp) + endif + + if (vegtyp == isurban_table) then + smcmax = 0.45_kind_phys + smcwlt = 0.40_kind_phys + endif + + if ((bexp > zero) .and. (smcmax > zero) .and. (-psisat > zero)) then + do is = 1, lsoil + if ( is == 1 )then + ddz = -zs(is+1) * 0.5_kind_phys + elseif ( is < lsoil ) then + ddz = ( zs(is-1) - zs(is+1) ) * 0.5_kind_phys + else + ddz = zs(is-1) - zs(is) + endif + smoiseq(ix,is) = min(max(find_eq_smc(bexp, dwsat, dksat, ddz, smcmax),1.e-4_kind_phys),smcmax*0.99_kind_phys) + enddo + else ! bexp <= 0.0 + smoiseq(ix,1:4) = smcmax + endif ! end the bexp condition + + smcwtdxy(ix) = smcmax + deeprechxy(ix) = zero + rechxy(ix) = zero + + endif + + enddo ! ix +!$OMP end parallel do + + if (errflg/=0) return + + deallocate(dzsno) + deallocate(dzsnso) + + endif noahmp_init + endif lsm_init + +!Lake model + if(lkm>0 .and. iopt_lake>0) then + ! A lake model is enabled. + do i = 1, im + !if (lakefrac(i) > 0.0 .and. lakedepth(i) > 1.0 ) then + + ! The lake data must say there's a lake here (lakefrac) with a depth (lakedepth) + if (lakefrac(i) > lakefrac_threshold .and. lakedepth(i) > lakedepth_threshold ) then + ! This is a lake point. Inform the other schemes to use a lake model, and possibly nsst (lkm) + use_lake_model(i) = lkm + cycle + else + ! Not a valid lake point. + use_lake_model(i) = 0 + endif + enddo + else + ! Lake model is disabled or settings are invalid. + use_lake_model = 0 + endif + + is_initialized = .true. + + contains + +! +! Use newton-raphson method to find eq soil moisture +! + function find_eq_smc(bexp, dwsat, dksat, ddz, smcmax) result(smc) + implicit none + real(kind=kind_phys), intent(in) :: bexp, dwsat, dksat, ddz, smcmax + real(kind=kind_phys) :: smc + real(kind=kind_phys) :: expon, aa, bb, func, dfunc, dx + integer :: iter + ! + expon = bexp + 1. + aa = dwsat / ddz + bb = dksat / smcmax ** expon + smc = 0.5 * smcmax + ! + do iter = 1,100 + func = (smc - smcmax) * aa + bb * smc ** expon + dfunc = aa + bb * expon * smc ** bexp + dx = func / dfunc + smc = smc - dx + if ( abs (dx) < 1.e-6_kind_phys) return + enddo + end function find_eq_smc + + end subroutine GFS_phys_time_vary_init +!> @} + +!> \section arg_table_GFS_phys_time_vary_timestep_init Argument Table +!! \htmlinclude GFS_phys_time_vary_timestep_init.html +!! +!>\section gen_GFS_phys_time_vary_timestep_init GFS_phys_time_vary_timestep_init General Algorithm +!> @{ + subroutine GFS_phys_time_vary_timestep_init (mpicomm, mpirank, mpiroot, & + cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, cplflx, nsswr, fhswr, lsswr, fhour, & + imfdeepcnv, cal_pre, random_clds, nscyc, ntoz, h2o_phys, iaerclm, iaermdl, iccn, clstp, & + jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, iflip, & + jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & + jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, in_nm, ccn_nm, fn_nml, & + imap, jmap, prsl, seed0, rann, nthrds, nx, ny, nsst, tile_num, nlunit, lsoil, lsoil_lsm,& + kice, ialb, isot, ivegsrc, input_nml_file, use_ufo, nst_anl, frac_grid, fhcyc, phour, & + oceanfrac, lakefrac, min_seaice, min_lakeice, smc, slc, stc, smois, sh2o, tslb, tiice, & + tg3, tref, & + tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, & + zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype,scolor, shdmin, shdmax, snowd, & + cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, ozphys, h2ophys, & + do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, is_initialized, & + errmsg, errflg) + + implicit none + + ! Interface variables + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, cnx, cny, isc, jsc, nrcm, im, levs, kdt, & + nsswr, imfdeepcnv, iccn, nscyc, ntoz, iflip, iaermdl + integer, intent(in) :: idate(:) + real(kind_phys), intent(in) :: fhswr, fhour + logical, intent(in) :: lsswr, cal_pre, random_clds, h2o_phys, iaerclm, cplflx + real(kind_phys), intent(out) :: clstp + integer, intent(in), optional :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:) + real(kind_phys), intent(in), optional :: ddy_o3(:), ddy_h(:) + real(kind_phys), intent(inout) :: ozpl(:,:,:), h2opl(:,:,:) + integer, intent(in), optional :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:) + real(kind_phys), intent(in), optional :: ddy_aer(:), ddx_aer(:) + real(kind_phys), intent(inout) :: aer_nm(:,:,:) + integer, intent(in), optional :: jindx1_ci(:), jindx2_ci(:), iindx1_ci(:), iindx2_ci(:) + real(kind_phys), intent(in), optional :: ddy_ci(:), ddx_ci(:) + real(kind_phys), intent(inout) :: in_nm(:,:), ccn_nm(:,:) + integer, intent(in) :: imap(:), jmap(:) + real(kind_phys), intent(in) :: prsl(:,:) + integer, intent(in) :: seed0 + real(kind_phys), intent(inout) :: rann(:,:) + + logical, intent(in) :: do_ugwp_v1 + integer, intent(in), optional :: jindx1_tau(:), jindx2_tau(:) + real(kind_phys), intent(in), optional :: ddy_j1tau(:), ddy_j2tau(:) + real(kind_phys), intent(inout) :: tau_amf(:) + type(ty_ozphys), intent(in) :: ozphys + type(ty_h2ophys), intent(in) :: h2ophys + + ! For gcycle only - not used by NEPTUNE + integer, intent(in) :: nthrds, nx, ny, nsst, tile_num, nlunit, lsoil + integer, intent(in) :: lsoil_lsm, kice, ialb, isot, ivegsrc + character(len=*), intent(in) :: input_nml_file(:) + character(len=*), intent(in) :: fn_nml + logical, intent(in) :: use_ufo, nst_anl, frac_grid + real(kind_phys), intent(in) :: fhcyc, phour, lakefrac(:), min_seaice, min_lakeice, & + xlat_d(:), xlon_d(:), landfrac(:),oceanfrac(:) + real(kind_phys), intent(inout) :: smc(:,:), slc(:,:), stc(:,:), tiice(:,:), tg3(:), & + tsfc(:), tsfco(:), tisfc(:), hice(:), fice(:), & + facsf(:), facwf(:), alvsf(:), alvwf(:), alnsf(:), alnwf(:), & + zorli(:), zorll(:), zorlo(:), weasd(:), snoalb(:), & + canopy(:), vfrac(:), shdmin(:), shdmax(:), & + snowd(:), cv(:), cvb(:), cvt(:), oro(:), oro_uf(:), slmsk(:) + real(kind_phys), intent(inout), optional :: smois(:,:), sh2o(:,:), tslb(:,:), tref(:) + integer, intent(inout) :: vtype(:), stype(:),scolor(:), slope(:) + + logical, intent(in) :: is_initialized + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + integer :: i, j, k, iseed, iskip, ix, idat(8), jdat(8), iday, j1, j2, nc, n1, n2, jdow, & + jdoy, jday, w3kindreal, w3kindint + real(kind_phys) :: wrk(1), tem, tx1, tx2, rjday + real(kind_phys) :: rannie(cny) + real(kind_phys) :: rndval(cnx*cny*nrcm) + real(kind_dbl_prec) :: rinc(5) + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Check initialization status + if (.not.is_initialized) then + write(errmsg,'(*(a))') "Logic error: GFS_phys_time_vary_timestep_init called before GFS_phys_time_vary_init" + errflg = 1 + return + end if + +!$OMP parallel num_threads(nthrds) default(none) & +!$OMP shared(kdt,nsswr,lsswr,clstp,imfdeepcnv,cal_pre,random_clds) & +!$OMP shared(fhswr,fhour,seed0,cnx,cny,nrcm,wrk,rannie,rndval, iaermdl) & +!$OMP shared(rann,im,isc,jsc,imap,jmap,ntoz,mpirank,idate,jindx1_o3,jindx2_o3) & +!$OMP shared(ozpl,ddy_o3,h2o_phys,jindx1_h,jindx2_h,h2opl,ddy_h,iaerclm,mpiroot)& +!$OMP shared(levs,prsl,iccn,jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci) & +!$OMP shared(ddx_ci,in_nm,ccn_nm,do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau) & +!$OMP shared(ddy_j2tau,tau_amf,iflip,ozphys,h2ophys,rjday,n1,n2,idat,jdat,rinc) & +!$OMP shared(w3kindreal,w3kindint,jdow,jdoy,jday) & +!$OMP private(iseed,iskip,i,j,k) + +!$OMP sections + +!$OMP section + + !--- switch for saving convective clouds - cnvc90.f + !--- aka Ken Campana/Yu-Tai Hou legacy + if ((mod(kdt,nsswr) == 0) .and. (lsswr)) then + !--- initialize,accumulate,convert + clstp = 1100 + min(fhswr/con_hr,fhour,con_99) + elseif (mod(kdt,nsswr) == 0) then + !--- accumulate,convert + clstp = 0100 + min(fhswr/con_hr,fhour,con_99) + elseif (lsswr) then + !--- initialize,accumulate + clstp = 1100 + else + !--- accumulate + clstp = 0100 + endif + +!$OMP section + + !--- random number needed for RAS and old SAS and when cal_pre=.true. + ! imfdeepcnv < 0 when ras = .true. + if ( (imfdeepcnv <= 0 .or. cal_pre) .and. random_clds ) then + + iseed = mod(con_100*sqrt(fhour*con_hr),1.0d9) + seed0 + call random_setseed(iseed) + call random_number(wrk) + do i = 1,cnx*nrcm + iseed = iseed + nint(wrk(1)*1000.0) * i + call random_setseed(iseed) + call random_number(rannie) + rndval(1+(i-1)*cny:i*cny) = rannie(1:cny) + enddo + + do k = 1,nrcm + iskip = (k-1)*cnx*cny + do ix=1,im + j = jmap(ix) + i = imap(ix) + rann(ix,k) = rndval(i+isc-1 + (j+jsc-2)*cnx + iskip) + enddo + enddo + + endif ! imfdeepcnv, cal_re, random_clds + +!$OMP section + !> - Compute temporal interpolation indices for updating gas concentrations. + idat=0 + idat(1)=idate(4) + idat(2)=idate(2) + idat(3)=idate(3) + idat(5)=idate(1) + rinc=0. + rinc(2)=fhour + CALL w3movdat(rinc,idat,jdat) + jdow = 0 + jdoy = 0 + jday = 0 + call w3doxdat(jdat,jdow,jdoy,jday) + rjday = jdoy + jdat(5) / 24. + if (rjday < ozphys%time(1)) rjday = rjday + 365. + +!> - Update ozone concentration. + if (ntoz > 0) then + call find_photochem_time_index(ozphys%ntime, ozphys%time, rjday, n1, n2) + + call ozphys%update_o3prog(jindx1_o3, jindx2_o3, ddy_o3, rjday, n1, n2, ozpl) + endif + +!> - Update stratospheric h2o concentration. + if (h2o_phys) then + call find_photochem_time_index(h2ophys%ntime, h2ophys%time, rjday, n1, n2) + call h2ophys%update(jindx1_h, jindx2_h, ddy_h, rjday, n1, n2, h2opl) + endif + +!$OMP section +!> - Call ciinterpol() to make IN and CCN data interpolation + if (iccn == 1) then + call ciinterpol (mpirank, im, idate, fhour,& + jindx1_ci, jindx2_ci, & + ddy_ci, iindx1_ci, & + iindx2_ci, ddx_ci, & + levs, prsl, in_nm, ccn_nm) + endif + +!$OMP section +!> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that resolve GW-activ + if (do_ugwp_v1) then + call tau_amf_interp(mpirank, mpiroot, im, idate, fhour, & + jindx1_tau, jindx2_tau, & + ddy_j1tau, ddy_j2tau, tau_amf) + endif + +!$OMP end sections +!$OMP end parallel + +!> - Call aerinterpol() to make aerosol interpolation + if (iaerclm) then + ! aerinterpol is using threading inside, don't + ! move into OpenMP parallel section above + if (iaermdl==1) then + call aerinterpol (mpicomm, mpirank, mpiroot, nthrds, im, idate, & + fhour, iflip, jindx1_aer, jindx2_aer, & + ddy_aer, iindx1_aer, & + iindx2_aer, ddx_aer, & + levs, prsl, aer_nm, errmsg, errflg) + else if (iaermdl==6) then + call aerinterpol_dl (mpicomm, mpirank, mpiroot, nthrds, im, idate, & + fhour, iflip, jindx1_aer, jindx2_aer, & + ddy_aer, iindx1_aer, & + iindx2_aer, ddx_aer, & + levs, prsl, aer_nm, errmsg, errflg) + endif + if(errflg /= 0) return + endif + +!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs + if (nscyc > 0) then + errmsg = 'Error in GFS_phys_time_vary_timestep_init, nscyc>0 not supported in NEPTUNE' + errflg = 1 + !if (mod(kdt,nscyc) == 1) THEN + ! call gcycle (mpirank, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml, & + ! input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, & + ! use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,& + ! frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, & + ! tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, & + ! zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, & + ! stype, scolor, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, & + ! cplflx, oceanfrac, & + ! xlat_d, xlon_d, slmsk, imap, jmap, errmsg, errflg) + !endif + endif + + contains + !> Find the time indexes on either side of current time + subroutine find_photochem_time_index(ntime, time, rjday, n1, n2) + implicit none + !> The number of times provided in the parameter file + integer, intent(in) :: ntime + !> The indexes of the parameters just before and after the + !! current time + integer, intent(out) :: n1, n2 + !> The times provided in the parameter file + real, intent(in), dimension(ntime+1) :: time + !> The current time of year + real, intent(in) :: rjday + n2 = ntime + 1 + do j=2,ntime + if (rjday < time(j)) then + n2 = j + exit + endif + enddo + n1 = n2 - 1 + if (n2 > ntime) n2 = n2 - ntime + end subroutine find_photochem_time_index + end subroutine GFS_phys_time_vary_timestep_init +!> @} + +!> \section arg_table_GFS_phys_time_vary_finalize Argument Table +!! \htmlinclude GFS_phys_time_vary_finalize.html +!! + subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) + + implicit none + + ! Interface variables + logical, intent(inout) :: is_initialized + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not.is_initialized) return + + ! Deallocate aerosol arrays + if (allocated(aerin) ) deallocate(aerin) + if (allocated(aer_pres)) deallocate(aer_pres) + + ! Deallocate IN and CCN arrays + if (allocated(ciplin) ) deallocate(ciplin) + if (allocated(ccnin) ) deallocate(ccnin) + if (allocated(ci_pres) ) deallocate(ci_pres) + + ! Deallocate UGWP-input arrays + if (allocated(ugwp_taulat)) deallocate(ugwp_taulat) + if (allocated(tau_limb )) deallocate(tau_limb) + if (allocated(days_limb )) deallocate(days_limb) + + is_initialized = .false. + + end subroutine GFS_phys_time_vary_finalize + + end module GFS_phys_time_vary diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta new file mode 100644 index 000000000..1bad16da8 --- /dev/null +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta @@ -0,0 +1,2129 @@ +[ccpp-table-properties] + name = GFS_phys_time_vary + type = scheme + dependencies_path = ../../ + dependencies = hooks/machine.F + dependencies = Interstitials/UFS_SCM_NEPTUNE/gcycle.F90,Interstitials/UFS_SCM_NEPTUNE/iccn_def.F + dependencies = Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90,Interstitials/UFS_SCM_NEPTUNE/sfcsub.F + dependencies = Radiation/mersenne_twister.f + dependencies = MP/Morrison_Gettelman/aerclm_def.F,MP/Morrison_Gettelman/aerinterp.F90 + dependencies = SFC_Models/Land/Noah/namelist_soilveg.f,SFC_Models/Land/Noah/set_soilveg.f,SFC_Models/Land/Noahmp/noahmp_tables.f90 + dependencies = photochem/module_ozphys.F90,photochem/module_h2ophys.F90 + dependencies = GWD/cires_tauamf_data.F90 + +######################################################################## +[ccpp-arg-table] + name = GFS_phys_time_vary_init + type = scheme + +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag + dimensions = () + type = logical + intent = in +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag + dimensions = () + type = logical + intent = in +[iaermdl] + standard_name = control_for_aerosol_radiation_scheme + long_name = control of aerosol scheme in radiation + units = 1 + dimensions = () + type = integer + intent = in +[iccn] + standard_name = control_for_ice_cloud_condensation_nuclei_forcing + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = none + dimensions = () + type = integer + intent = in +[iflip] + standard_name = control_for_vertical_index_direction + long_name = iflip - is not the same as flipv + units = flag + dimensions = () + type = integer + intent = in +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in +[levs] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in +[nx] + standard_name = number_of_points_in_x_direction_for_this_MPI_rank + long_name = number of points in x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[ny] + standard_name = number_of_points_in_y_direction_for_this_MPI_rank + long_name = number of points in y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[idate] + standard_name = date_and_time_at_model_initialization_in_united_states_order + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer + intent = in +[xlat_d] + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[xlon_d] + standard_name = longitude_in_degree + long_name = longitude in degree east + units = degree_east + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[jindx1_o3] + standard_name = lower_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[jindx2_o3] + standard_name = upper_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[ddy_o3] + standard_name = latitude_interpolation_weight_for_ozone_forcing + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[jindx1_h] + standard_name = lower_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[jindx2_h] + standard_name = upper_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[ddy_h] + standard_name = latitude_interpolation_weight_for_stratospheric_water_vapor_forcing + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[h2opl] + standard_name = stratospheric_water_vapor_forcing + long_name = water forcing data + units = mixed + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = in +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = in +[jindx1_aer] + standard_name = lower_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[jindx2_aer] + standard_name = upper_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[ddy_aer] + standard_name = latitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[iindx1_aer] + standard_name = lower_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[iindx2_aer] + standard_name = upper_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[ddx_aer] + standard_name = longitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[aer_nm] + standard_name = mass_mixing_ratio_of_aerosol_from_gocart_or_merra2 + long_name = mass mixing ratio of aerosol from gocart or merra2 + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = out +[jindx1_ci] + standard_name = lower_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[jindx2_ci] + standard_name = upper_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[ddy_ci] + standard_name = latitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[iindx1_ci] + standard_name = lower_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[iindx2_ci] + standard_name = upper_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[ddx_ci] + standard_name = longitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in +[jindx1_tau] + standard_name = lower_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index1 for weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[jindx2_tau] + standard_name = upper_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index2 for weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[ddy_j1tau] + standard_name = latitude_interpolation_weight_complement_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = inout + kind = kind_phys + optional = True +[ddy_j2tau] + standard_name = latitude_interpolation_weight_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = inout + kind = kind_phys + optional = True +[isot] + standard_name = control_for_soil_type_dataset + long_name = soil type dataset choice + units = index + dimensions = () + type = integer + intent = in +[ivegsrc] + standard_name = control_for_vegetation_dataset + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in +[nlunit] + standard_name = iounit_of_namelist + long_name = fortran unit number for file opens + units = none + dimensions = () + type = integer + intent = in +[sncovr] + standard_name = surface_snow_area_fraction_over_land + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[sncovr_ice] + standard_name = surface_snow_area_fraction_over_ice + long_name = surface snow area fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[lsm] + standard_name = control_for_land_surface_scheme + long_name = flag for land surface model + units = flag + dimensions = () + type = integer + intent = in +[lsm_noahmp] + standard_name = identifier_for_noahmp_land_surface_scheme + long_name = flag for NOAH MP land surface model + units = flag + dimensions = () + type = integer + intent = in +[lsm_ruc] + standard_name = identifier_for_ruc_land_surface_scheme + long_name = flag for RUC land surface model + units = flag + dimensions = () + type = integer + intent = in +[min_seaice] + standard_name = min_sea_ice_area_fraction + long_name = minimum sea ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in +[fice] + standard_name = sea_ice_area_fraction_of_sea_area_fraction + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[landfrac] + standard_name = land_area_fraction + long_name = fraction of horizontal grid area occupied by land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[vtype] + standard_name = vegetation_type_classification + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in +[weasd] + standard_name = lwe_thickness_of_surface_snow_amount + long_name = water equiv of acc snow depth over land and sea ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[lsoil] + standard_name = vertical_dimension_of_soil + long_name = number of soil layers + units = count + dimensions = () + type = integer + intent = in +[zs] + standard_name = depth_of_soil_layers + long_name = depth of soil levels for land surface model + units = m + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = in +[dzs] + standard_name = thickness_of_soil_layers_for_land_surface_model + long_name = thickness of soil levels for land surface model + units = m + dimensions = (vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = in +[lsnow_lsm_lbound] + standard_name = lower_bound_of_vertical_dimension_of_surface_snow + long_name = lower bound of of snow-related arrays for land surface model + units = count + dimensions = () + type = integer + intent = in +[lsnow_lsm_ubound] + standard_name = upper_bound_of_vertical_dimension_of_surface_snow + long_name = upper bound of of snow-related arrays for land surface model + units = count + dimensions = () + type = integer + intent = in +[tvxy] + standard_name = canopy_temperature + long_name = vegetation temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[tgxy] + standard_name = ground_temperature + long_name = ground temperature for noahmp + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[tahxy] + standard_name = air_temperature_in_canopy + long_name = canopy air temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[canicexy] + standard_name = canopy_intercepted_ice_mass + long_name = canopy intercepted ice mass + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[canliqxy] + standard_name = canopy_intercepted_liquid_water + long_name = canopy intercepted liquid water + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[eahxy] + standard_name = air_vapor_pressure_in_canopy + long_name = canopy air vapor pressure + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[cmxy] + standard_name = surface_drag_coefficient_for_momentum_for_noahmp + long_name = surface drag coefficient for momentum for noahmp + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[chxy] + standard_name = surface_drag_coefficient_for_heat_and_moisture_for_noahmp + long_name = surface exchange coeff heat & moisture for noahmp + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[fwetxy] + standard_name = wet_canopy_area_fraction + long_name = area fraction of canopy that is wetted/snowed + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[sneqvoxy] + standard_name = lwe_thickness_of_snowfall_amount_on_previous_timestep + long_name = snow mass at previous time step + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[alboldxy] + standard_name = surface_albedo_assuming_deep_snow_on_previous_timestep + long_name = snow albedo at previous time step + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[qsnowxy] + standard_name = lwe_snowfall_rate + long_name = snow precipitation rate at surface + units = mm s-1 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[wslakexy] + standard_name = water_storage_in_lake + long_name = lake water storage + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[taussxy] + standard_name = dimensionless_age_of_surface_snow + long_name = non-dimensional snow age + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[waxy] + standard_name = water_storage_in_aquifer + long_name = water storage in aquifer + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[wtxy] + standard_name = water_storage_in_aquifer_and_saturated_soil + long_name = water storage in aquifer and saturated soil + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[zwtxy] + standard_name = water_table_depth + long_name = water table depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[xlaixy] + standard_name = leaf_area_index + long_name = leaf area index + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[xsaixy] + standard_name = stem_area_index + long_name = stem area index + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[lfmassxy] + standard_name = leaf_mass_content + long_name = leaf mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[stmassxy] + standard_name = stem_mass_content + long_name = stem mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[rtmassxy] + standard_name = fine_root_mass_content + long_name = fine root mass + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[woodxy] + standard_name = wood_mass_content + long_name = wood mass including woody roots + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[stblcpxy] + standard_name = slow_soil_pool_mass_content_of_carbon + long_name = stable carbon in deep soil + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[fastcpxy] + standard_name = fast_soil_pool_mass_content_of_carbon + long_name = short-lived carbon in shallow soil + units = g m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[smcwtdxy] + standard_name = volumetric_soil_moisture_between_soil_bottom_and_water_table + long_name = soil water content between the bottom of the soil and the water table + units = m3 m-3 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[deeprechxy] + standard_name = water_table_recharge_assuming_deep + long_name = recharge to or from the water table when deep + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[rechxy] + standard_name = water_table_recharge_assuming_shallow + long_name = recharge to or from the water table when shallow + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[albdvis_lnd] + standard_name = surface_albedo_direct_visible_over_land + long_name = direct surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[albdnir_lnd] + standard_name = surface_albedo_direct_NIR_over_land + long_name = direct surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[albivis_lnd] + standard_name = surface_albedo_diffuse_visible_over_land + long_name = diffuse surface albedo visible band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[albinir_lnd] + standard_name = surface_albedo_diffuse_NIR_over_land + long_name = diffuse surface albedo NIR band over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[albdvis_ice] + standard_name = surface_albedo_direct_visible_over_ice + long_name = direct surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[albdnir_ice] + standard_name = surface_albedo_direct_NIR_over_ice + long_name = direct surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[albivis_ice] + standard_name = surface_albedo_diffuse_visible_over_ice + long_name = diffuse surface albedo visible band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[albinir_ice] + standard_name = surface_albedo_diffuse_NIR_over_ice + long_name = diffuse surface albedo NIR band over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[emiss_lnd] + standard_name = surface_longwave_emissivity_over_land + long_name = surface lw emissivity in fraction over land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[emiss_ice] + standard_name = surface_longwave_emissivity_over_ice + long_name = surface lw emissivity in fraction over ice + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[snowxy] + standard_name = number_of_snow_layers + long_name = number of snow layers + units = count + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[snicexy] + standard_name = lwe_thickness_of_ice_in_surface_snow + long_name = snow layer ice + units = mm + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = True +[snliqxy] + standard_name = lwe_thickness_of_liquid_water_in_surface_snow + long_name = snow layer liquid water + units = mm + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = True +[tsnoxy] + standard_name = temperature_in_surface_snow + long_name = temperature_in_surface_snow + units = K + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:upper_bound_of_vertical_dimension_of_surface_snow) + type = real + kind = kind_phys + intent = inout + optional = True +[smoiseq] + standard_name = volumetric_equilibrium_soil_moisture + long_name = equilibrium soil water content + units = m3 m-3 + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = True +[zsnsoxy] + standard_name = depth_from_snow_surface_at_bottom_interface + long_name = depth from the top of the snow surface at the bottom of the layer + units = m + dimensions = (horizontal_dimension,lower_bound_of_vertical_dimension_of_surface_snow:vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = True +[slc] + standard_name = volume_fraction_of_unfrozen_water_in_soil + long_name = liquid soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout +[smc] + standard_name = volume_fraction_of_condensed_water_in_soil + long_name = total soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout +[tsfcl] + standard_name = surface_skin_temperature_over_land + long_name = surface skin temperature over land + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[snowd] + standard_name = lwe_surface_snow + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[canopy] + standard_name = canopy_water_amount + long_name = canopy water amount + units = kg m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[tg3] + standard_name = deep_soil_temperature + long_name = deep soil temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[stype] + standard_name = soil_type_classification + long_name = soil type for lsm + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in +[con_t0c] + standard_name = temperature_at_zero_celsius + long_name = temperature at 0 degree Celsius + units = K + dimensions = () + type = real + kind = kind_phys + intent = in +[lsm_cold_start] + standard_name = do_lsm_cold_start + long_name = flag to signify LSM is cold-started + units = flag + dimensions = () + type = logical + intent = in +[nthrds] + standard_name = number_of_openmp_threads + long_name = number of OpenMP threads available for physics schemes + units = count + dimensions = () + type = integer + intent = in +[lkm] + standard_name = control_for_lake_model_execution_method + long_name = control for lake model execution: 0=no lake, 1=lake, 2=lake+nsst + units = flag + dimensions = () + type = integer + intent = in +[use_lake_model] + standard_name = flag_for_using_lake_model + long_name = flag indicating lake points using a lake model + units = flag + dimensions = (horizontal_dimension) + type = integer + intent = inout +[lakefrac] + standard_name = lake_area_fraction + long_name = fraction of horizontal grid area occupied by lake + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[lakedepth] + standard_name = lake_depth + long_name = lake depth + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[iopt_lake] + standard_name = control_for_lake_model_selection + long_name = control for lake model selection + units = 1 + dimensions = () + type = integer + intent = in +[iopt_lake_clm] + standard_name = clm_lake_model_control_selection_value + long_name = value that indicates clm lake model in the control for lake model selection + units = 1 + dimensions = () + type = integer + intent = in +[iopt_lake_flake] + standard_name = flake_model_control_selection_value + long_name = value that indicates flake model in the control for lake model selection + units = 1 + dimensions = () + type = integer + intent = in +[lakefrac_threshold] + standard_name = lakefrac_threshold_for_enabling_lake_model + long_name = fraction of horizontal grid area occupied by lake must be greater than this value to enable a lake model + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in +[lakedepth_threshold] + standard_name = lake_depth_threshold_for_enabling_lake_model + long_name = lake depth must be greater than this value to enable a lake model + units = m + dimensions = () + type = real + kind = kind_phys + intent = in +[ozphys] + standard_name = dataset_for_ozone_physics + long_name = dataset for NRL ozone physics + units = mixed + dimensions = () + type = ty_ozphys + intent = in +[h2ophys] + standard_name = dataset_for_h2o_photochemistry_physics + long_name = dataset for NRL h2o photochemistry physics + units = mixed + dimensions = () + type = ty_h2ophys + intent = in +[is_initialized] + standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization + long_name = flag carrying interstitial initialization status + units = flag + dimensions = () + type = logical + intent = inout +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out + +######################################################################## +[ccpp-arg-table] + name = GFS_phys_time_vary_finalize + type = scheme +[is_initialized] + standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization + long_name = flag carrying interstitial initialization status + units = flag + dimensions = () + type = logical + intent = inout +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out + +######################################################################## +[ccpp-arg-table] + name = GFS_phys_time_vary_timestep_init + type = scheme +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in +[cnx] + standard_name = number_of_x_points_for_current_cubed_sphere_tile + long_name = number of points in x direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in +[cny] + standard_name = number_of_y_points_for_current_cubed_sphere_tile + long_name = number of points in y direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[nrcm] + standard_name = number_of_random_numbers + long_name = second dimension of random number stream for RAS + units = count + dimensions = () + type = integer + intent = in +[im] + standard_name = horizontal_dimension + long_name = horizontal dimension + units = count + dimensions = () + type = integer + intent = in +[levs] + standard_name = vertical_layer_dimension + long_name = number of vertical levels + units = count + dimensions = () + type = integer + intent = in +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in +[idate] + standard_name = date_and_time_at_model_initialization_in_united_states_order + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer + intent = in +[cplflx] + standard_name = flag_for_surface_flux_coupling + long_name = flag controlling cplflx collection (default off) + units = flag + dimensions = () + type = logical + intent = in +[nsswr] + standard_name = number_of_timesteps_between_shortwave_radiation_calls + long_name = number of timesteps between shortwave radiation calls + units = + dimensions = () + type = integer + intent = in +[fhswr] + standard_name = period_of_shortwave_radiation_calls + long_name = frequency for shortwave radiation + units = s + dimensions = () + type = real + kind = kind_phys + intent = in +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = in +[imfdeepcnv] + standard_name = control_for_deep_convection_scheme + long_name = flag for mass-flux deep convection scheme + units = flag + dimensions = () + type = integer + intent = in +[cal_pre] + standard_name = flag_for_dominant_precipitation_type_partition + long_name = flag controls precip type algorithm + units = flag + dimensions = () + type = logical + intent = in +[random_clds] + standard_name = flag_for_random_clouds_for_RAS + long_name = flag for using random clouds with the RAS scheme + units = flag + dimensions = () + type = logical + intent = in +[nscyc] + standard_name = number_of_timesteps_between_surface_cycling_calls + long_name = number of timesteps between surface cycling calls + units = count + dimensions = () + type = integer + intent = in +[ntoz] + standard_name = index_of_ozone_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for ozone mixing ratio + units = index + dimensions = () + type = integer + intent = in +[h2o_phys] + standard_name = flag_for_stratospheric_water_vapor_physics + long_name = flag for stratospheric water vapor physics + units = flag + dimensions = () + type = logical + intent = in +[iaerclm] + standard_name = flag_for_aerosol_input_MG_radiation + long_name = flag for using aerosols in Morrison-Gettelman MP_radiation + units = flag + dimensions = () + type = logical + intent = in +[iaermdl] + standard_name = control_for_aerosol_radiation_scheme + long_name = control of aerosol scheme in radiation + units = 1 + dimensions = () + type = integer + intent = in +[iccn] + standard_name = control_for_ice_cloud_condensation_nuclei_forcing + long_name = flag for IN and CCN forcing for morrison gettelman microphysics + units = none + dimensions = () + type = integer + intent = in +[clstp] + standard_name = control_for_convective_cloud_diagnostics + long_name = index used by cnvc90 (for convective clouds) + units = none + dimensions = () + type = real + kind = kind_phys + intent = out +[jindx1_o3] + standard_name = lower_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation low index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[jindx2_o3] + standard_name = upper_latitude_index_of_ozone_forcing_for_interpolation + long_name = interpolation high index for ozone + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[ddy_o3] + standard_name = latitude_interpolation_weight_for_ozone_forcing + long_name = interpolation high index for ozone + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = True +[ozpl] + standard_name = ozone_forcing + long_name = ozone forcing data + units = mixed + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) + type = real + kind = kind_phys + intent = inout +[jindx1_h] + standard_name = lower_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation low index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[jindx2_h] + standard_name = upper_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation + long_name = interpolation high index for stratospheric water vapor + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[ddy_h] + standard_name = latitude_interpolation_weight_for_stratospheric_water_vapor_forcing + long_name = interpolation high index for stratospheric water vapor + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = True +[h2opl] + standard_name = stratospheric_water_vapor_forcing + long_name = water forcing data + units = mixed + dimensions = (horizontal_dimension,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data) + type = real + kind = kind_phys + intent = inout +[iflip] + standard_name = control_for_vertical_index_direction + long_name = iflip - is not the same as flipv + units = flag + dimensions = () + type = integer + intent = in +[jindx1_aer] + standard_name = lower_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[jindx2_aer] + standard_name = upper_latitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[ddy_aer] + standard_name = latitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = True +[iindx1_aer] + standard_name = lower_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation low index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[iindx2_aer] + standard_name = upper_longitude_index_of_aerosol_forcing_for_interpolation + long_name = interpolation high index for prescribed aerosols in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[ddx_aer] + standard_name = longitude_interpolation_weight_for_aerosol_forcing + long_name = interpolation high index for prescribed aerosols in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = True +[aer_nm] + standard_name = mass_mixing_ratio_of_aerosol_from_gocart_or_merra2 + long_name = mass mixing ratio of aerosol from gocart or merra2 + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG) + type = real + kind = kind_phys + intent = inout +[jindx1_ci] + standard_name = lower_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[jindx2_ci] + standard_name = upper_latitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[ddy_ci] + standard_name = latitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the y direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = True +[iindx1_ci] + standard_name = lower_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation low index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[iindx2_ci] + standard_name = upper_longitude_index_of_cloud_nuclei_forcing_for_interpolation + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = index + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[ddx_ci] + standard_name = longitude_interpolation_weight_for_cloud_nuclei_forcing + long_name = interpolation high index for ice and cloud condensation nuclei in the x direction + units = none + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in + optional = True +[in_nm] + standard_name = ice_nucleation_number_from_climatology + long_name = ice nucleation number in MG MP + units = kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[ccn_nm] + standard_name = tendency_of_activated_cloud_condensation_nuclei_from_climatology + long_name = tendency of ccn activated number + units = kg-1 s-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout +[fn_nml] + standard_name = filename_of_namelist + long_name = namelist filename + units = none + dimensions = () + type = character + kind = len=* + intent = in +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in +[prsl] + standard_name = air_pressure + long_name = mean layer pressure + units = Pa + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in +[seed0] + standard_name = seed_random_numbers_RAS + long_name = random number seed for the RAS scheme + units = none + dimensions = () + type = integer + intent = in +[rann] + standard_name = random_number + long_name = random number array (0-1) + units = none + dimensions = (horizontal_dimension,number_of_random_numbers) + type = real + kind = kind_phys + intent = inout +[nthrds] + standard_name = number_of_openmp_threads + long_name = number of OpenMP threads available for physics schemes + units = count + dimensions = () + type = integer + intent = in +[nx] + standard_name = number_of_points_in_x_direction_for_this_MPI_rank + long_name = number of points in x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[ny] + standard_name = number_of_points_in_y_direction_for_this_MPI_rank + long_name = number of points in y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[nsst] + standard_name = control_for_nsstm + long_name = NSSTM flag: off/uncoupled/coupled=0/1/2 + units = flag + dimensions = () + type = integer + intent = in +[tile_num] + standard_name = index_of_cubed_sphere_tile + long_name = tile number + units = none + dimensions = () + type = integer + intent = in +[nlunit] + standard_name = iounit_of_namelist + long_name = fortran unit number for file opens + units = none + dimensions = () + type = integer + intent = in +[lsoil] + standard_name = vertical_dimension_of_soil + long_name = number of soil layers + units = count + dimensions = () + type = integer + intent = in +[lsoil_lsm] + standard_name = vertical_dimension_of_soil_internal_to_land_surface_scheme + long_name = number of soil layers internal to land surface model + units = count + dimensions = () + type = integer + intent = in +[kice] + standard_name = vertical_dimension_of_sea_ice + long_name = vertical loop extent for ice levels, start at 1 + units = count + dimensions = () + type = integer + intent = in +[ialb] + standard_name = control_for_surface_albedo + long_name = flag for using climatology alb, based on sfc type + units = flag + dimensions = () + type = integer + intent = in +[isot] + standard_name = control_for_soil_type_dataset + long_name = soil type dataset choice + units = index + dimensions = () + type = integer + intent = in +[ivegsrc] + standard_name = control_for_vegetation_dataset + long_name = land use dataset choice + units = index + dimensions = () + type = integer + intent = in +[input_nml_file] + standard_name = filename_of_internal_namelist + long_name = namelist filename for internal file reads + units = none + dimensions = (number_of_lines_in_internal_namelist) + type = character + kind = len=256 + intent = in +[use_ufo] + standard_name = flag_for_gcycle_surface_option + long_name = flag for gcycle surface option + units = flag + dimensions = () + type = logical + intent = in +[nst_anl] + standard_name = flag_for_nsstm_analysis_in_gcycle + long_name = flag for NSSTM analysis in gcycle/sfcsub + units = flag + dimensions = () + type = logical + intent = in +[frac_grid] + standard_name = flag_for_fractional_landmask + long_name = flag for fractional grid + units = flag + dimensions = () + type = logical + intent = in +[fhcyc] + standard_name = frequency_for_surface_cycling_calls + long_name = frequency for surface cycling calls + units = h + dimensions = () + type = real + kind = kind_phys + intent = in +[phour] + standard_name = forecast_time_on_previous_timestep + long_name = forecast time at the previous timestep + units = h + dimensions = () + type = real + kind = kind_phys + intent = in +[oceanfrac] + standard_name = sea_area_fraction + long_name = fraction of horizontal grid area occupied by ocean + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[lakefrac] + standard_name = lake_area_fraction + long_name = fraction of horizontal grid area occupied by lake + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[min_seaice] + standard_name = min_sea_ice_area_fraction + long_name = minimum sea ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in +[min_lakeice] + standard_name = min_lake_ice_area_fraction + long_name = minimum lake ice value + units = frac + dimensions = () + type = real + kind = kind_phys + intent = in +[smc] + standard_name = volume_fraction_of_condensed_water_in_soil + long_name = total soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout +[slc] + standard_name = volume_fraction_of_unfrozen_water_in_soil + long_name = liquid soil moisture + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout +[stc] + standard_name = soil_temperature + long_name = soil temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension_of_soil) + type = real + kind = kind_phys + intent = inout +[smois] + standard_name = volume_fraction_of_soil_moisture_for_land_surface_model + long_name = volumetric fraction of soil moisture for lsm + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = True +[sh2o] + standard_name = volume_fraction_of_unfrozen_soil_moisture_for_land_surface_model + long_name = volume fraction of unfrozen soil moisture for lsm + units = frac + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = True +[tslb] + standard_name = soil_temperature_for_land_surface_model + long_name = soil temperature for land surface model + units = K + dimensions = (horizontal_dimension,vertical_dimension_of_soil_internal_to_land_surface_scheme) + type = real + kind = kind_phys + intent = inout + optional = True +[tiice] + standard_name = temperature_in_ice_layer + long_name = sea ice internal temperature + units = K + dimensions = (horizontal_dimension,vertical_dimension_of_sea_ice) + type = real + kind = kind_phys + intent = inout +[tg3] + standard_name = deep_soil_temperature + long_name = deep soil temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[tref] + standard_name = reference_sea_surface_temperature + long_name = sea surface reference temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[tsfc] + standard_name = surface_skin_temperature + long_name = surface skin temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[tsfco] + standard_name = sea_surface_temperature + long_name = sea surface temperature + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[tisfc] + standard_name = surface_skin_temperature_over_ice + long_name = surface skin temperature over ice + units = K + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[hice] + standard_name = sea_ice_thickness + long_name = sea ice thickness + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[fice] + standard_name = sea_ice_area_fraction_of_sea_area_fraction + long_name = ice fraction over open water + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[facsf] + standard_name =strong_cosz_area_fraction + long_name = fractional coverage with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[facwf] + standard_name = weak_cosz_area_fraction + long_name = fractional coverage with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[alvsf] + standard_name = vis_albedo_strong_cosz + long_name = mean vis albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[alvwf] + standard_name = vis_albedo_weak_cosz + long_name = mean vis albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[alnsf] + standard_name = nir_albedo_strong_cosz + long_name = mean nir albedo with strong cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[alnwf] + standard_name = nir_albedo_weak_cosz + long_name = mean nir albedo with weak cosz dependency + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[zorli] + standard_name = surface_roughness_length_over_ice + long_name = surface roughness length over ice + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[zorll] + standard_name = surface_roughness_length_over_land + long_name = surface roughness length over land + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[zorlo] + standard_name = surface_roughness_length_over_water + long_name = surface roughness length over water + units = cm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[weasd] + standard_name = lwe_thickness_of_surface_snow_amount + long_name = water equiv of acc snow depth over land and sea ice + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[slope] + standard_name = surface_slope_classification + long_name = sfc slope type for lsm + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout +[snoalb] + standard_name = upper_bound_of_max_albedo_assuming_deep_snow + long_name = maximum snow albedo + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[canopy] + standard_name = canopy_water_amount + long_name = canopy water amount + units = kg m-2 + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[vfrac] + standard_name = vegetation_area_fraction + long_name = areal fractional cover of green vegetation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[vtype] + standard_name = vegetation_type_classification + long_name = vegetation type for lsm + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout +[stype] + standard_name = soil_type_classification + long_name = soil type for lsm + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout +[scolor] + standard_name = soil_color_classification + long_name = soil color for lsm + units = index + dimensions = (horizontal_dimension) + type = integer + intent = inout +[shdmin] + standard_name = min_vegetation_area_fraction + long_name = min fractional coverage of green vegetation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[shdmax] + standard_name = max_vegetation_area_fraction + long_name = max fractional coverage of green vegetation + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[snowd] + standard_name = lwe_surface_snow + long_name = water equivalent snow depth + units = mm + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[cv] + standard_name = convective_cloud_area_fraction_between_sw_radiation_calls_from_cnvc90 + long_name = fraction of convective cloud + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[cvb] + standard_name = pressure_at_convective_cloud_base_between_sw_radiation_calls_from_cnvc90 + long_name = convective cloud bottom pressure + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[cvt] + standard_name = pressure_at_convective_cloud_top_between_sw_radiation_calls_from_cnvc90 + long_name = convective cloud top pressure + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[oro] + standard_name = height_above_mean_sea_level + long_name = height_above_mean_sea_level + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[oro_uf] + standard_name = unfiltered_height_above_mean_sea_level + long_name = unfiltered height_above_mean_sea_level + units = m + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[xlat_d] + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[xlon_d] + standard_name = longitude_in_degree + long_name = longitude in degree east + units = degree_east + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[landfrac] + standard_name = land_area_fraction + long_name = fraction of horizontal grid area occupied by land + units = frac + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[slmsk] + standard_name = area_type + long_name = landmask: sea/land/ice=0/1/2 + units = flag + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[do_ugwp_v1] + standard_name = flag_for_ugwp_version_1 + long_name = flag to activate ver 1 CIRES UGWP + units = flag + dimensions = () + type = logical + intent = in +[jindx1_tau] + standard_name = lower_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index1 for weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[jindx2_tau] + standard_name = upper_latitude_index_of_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag_for_interpolation + long_name = index2 for weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in + optional = True +[ddy_j1tau] + standard_name = latitude_interpolation_weight_complement_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight1 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys + optional = True +[ddy_j2tau] + standard_name = latitude_interpolation_weight_for_absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = interpolation weight2 for tau NGWs + units = none + dimensions = (horizontal_dimension) + type = real + intent = in + kind = kind_phys + optional = True +[tau_amf] + standard_name = absolute_momentum_flux_due_to_nonorographic_gravity_wave_drag + long_name = ngw_absolute_momentum_flux + units = mixed + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout +[ozphys] + standard_name = dataset_for_ozone_physics + long_name = dataset for NRL ozone physics + units = mixed + dimensions = () + type = ty_ozphys + intent = in +[h2ophys] + standard_name = dataset_for_h2o_photochemistry_physics + long_name = dataset for NRL h2o photochemistry physics + units = mixed + dimensions = () + type = ty_h2ophys + intent = in +[is_initialized] + standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization + long_name = flag carrying interstitial initialization status + units = flag + dimensions = () + type = logical + intent = in +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 index 2af01115c..85fc6fc68 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 @@ -5,7 +5,8 @@ !! This module contains GFS physics time vary subroutines including stratospheric water vapor, !! aerosol, IN&CCN and surface properties updates. module GFS_phys_time_vary - + use mpi_f08 + use machine, only : kind_phys, kind_dbl_prec, kind_sngl_prec use mersenne_twister, only: random_setseed, random_number @@ -57,7 +58,7 @@ module GFS_phys_time_vary !>\section gen_GFS_phys_time_vary_init GFS_phys_time_vary_init General Algorithm !> @{ subroutine GFS_phys_time_vary_init ( & - me, master, ntoz, h2o_phys, iaerclm, iaermdl, iccn, iflip, im, levs, & + mpicomm, mpirank, mpiroot, ntoz, h2o_phys, iaerclm, iaermdl, iccn, iflip, im, levs, & nx, ny, idate, xlat_d, xlon_d, & jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, jindx2_h, ddy_h, h2opl,fhour, & jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & @@ -78,7 +79,8 @@ subroutine GFS_phys_time_vary_init ( implicit none ! Interface variables - integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny, levs, iaermdl + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, ntoz, iccn, iflip, im, nx, ny, levs, iaermdl logical, intent(in) :: h2o_phys, iaerclm, lsm_cold_start integer, intent(in) :: idate(:), iopt_lake, iopt_lake_clm, iopt_lake_flake real(kind_phys), intent(in) :: fhour, lakefrac_threshold, lakedepth_threshold @@ -201,9 +203,9 @@ subroutine GFS_phys_time_vary_init ( if (iaerclm) then ntrcaer = ntrcaerm if(iaermdl == 1) then - call read_aerdata (me,master,iflip,idate,errmsg,errflg) + call read_aerdata (mpicomm,mpirank,mpiroot,iflip,idate,errmsg,errflg) elseif (iaermdl == 6) then - call read_aerdata_dl(me,master,iflip, & + call read_aerdata_dl(mpicomm, mpirank, mpiroot, iflip, & idate,fhour, errmsg,errflg) end if if(errflg/=0) return @@ -222,19 +224,19 @@ subroutine GFS_phys_time_vary_init ( !> - Call read_cidata() to read IN and CCN data if (iccn == 1) then - call read_cidata (me,master) + call read_cidata (mpicomm, mpirank, mpiroot) ! No consistency check needed for in/ccn data, all values are ! hardcoded in module iccn_def.F and GFS_typedefs.F90 endif !> - Call tau_amf dats for ugwp_v1 if (do_ugwp_v1) then - call read_tau_amf(me, master, errmsg, errflg) + call read_tau_amf(mpicomm, mpirank, mpiroot, errmsg, errflg) if(errflg/=0) return endif !> - Initialize soil vegetation (needed for sncovr calculation further down) - call set_soilveg(me, isot, ivegsrc, nlunit, errmsg, errflg) + call set_soilveg(mpirank, isot, ivegsrc, nlunit, errmsg, errflg) if(errflg/=0) return !> - read in NoahMP table (needed for NoahMP init) @@ -257,8 +259,7 @@ subroutine GFS_phys_time_vary_init ( if (iaerclm) then call setindxaer (im, xlat_d, jindx1_aer, & jindx2_aer, ddy_aer, xlon_d, & - iindx1_aer, iindx2_aer, ddx_aer, & - me, master) + iindx1_aer, iindx2_aer, ddx_aer) iamin = min(minval(iindx1_aer), iamin) iamax = max(maxval(iindx2_aer), iamax) jamin = min(minval(jindx1_aer), jamin) @@ -274,7 +275,7 @@ subroutine GFS_phys_time_vary_init ( !> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that can resolve GWs if (do_ugwp_v1) then - call cires_indx_ugwp (im, me, master, xlat_d, jindx1_tau, jindx2_tau, & + call cires_indx_ugwp (im, mpirank, mpiroot, xlat_d, jindx1_tau, jindx2_tau, & ddy_j1tau, ddy_j2tau) endif @@ -290,7 +291,7 @@ subroutine GFS_phys_time_vary_init ( !--- if sncovr does not exist in the restart, need to create it if (all(sncovr < zero)) then - if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' + if (mpirank == mpiroot ) write(*,'(a)') 'GFS_phys_time_vary_init: compute sncovr from weasd and soil vegetation parameters' !--- compute sncovr from existing variables !--- code taken directly from read_fix.f sncovr(:) = zero @@ -311,7 +312,7 @@ subroutine GFS_phys_time_vary_init ( !--- For RUC LSM: create sncovr_ice from sncovr if (lsm == lsm_ruc) then if (all(sncovr_ice < zero)) then - if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' + if (mpirank == mpiroot ) write(*,'(a)') 'GFS_phys_time_vary_init: fill sncovr_ice with sncovr for RUC LSM' sncovr_ice(:) = sncovr(:) endif endif @@ -320,9 +321,9 @@ subroutine GFS_phys_time_vary_init ( if (iaerclm) then if (iaermdl==1) then - call read_aerdataf (me, master, iflip, idate, fhour, errmsg, errflg) + call read_aerdataf (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) elseif (iaermdl==6) then - call read_aerdataf_dl (me, master, iflip, idate, fhour, errmsg, errflg) + call read_aerdataf_dl (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) end if if (errflg/=0) return end if @@ -331,7 +332,7 @@ subroutine GFS_phys_time_vary_init ( !--- land and ice - not for restart runs lsm_init: if (lsm_cold_start) then if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then - if (me == master ) write(*,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' + if (mpirank == mpiroot ) write(*,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice' do ix=1,im albdvis_lnd(ix) = 0.2_kind_phys albdnir_lnd(ix) = 0.2_kind_phys @@ -653,7 +654,7 @@ end subroutine GFS_phys_time_vary_init !>\section gen_GFS_phys_time_vary_timestep_init GFS_phys_time_vary_timestep_init General Algorithm !> @{ subroutine GFS_phys_time_vary_timestep_init ( & - me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, nsswr, fhswr, lsswr, fhour, & + mpicomm, mpirank, mpiroot, cnx, cny, isc, jsc, nrcm, im, levs, kdt, idate, nsswr, fhswr, lsswr, fhour, & imfdeepcnv, cal_pre, random_clds, ntoz, h2o_phys, iaerclm, iaermdl, iccn, clstp, & jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, iflip, & jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, & @@ -664,7 +665,8 @@ subroutine GFS_phys_time_vary_timestep_init ( implicit none ! Interface variables - integer, intent(in) :: me, master, cnx, cny, isc, jsc, nrcm, im, levs, kdt, & + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, cnx, cny, isc, jsc, nrcm, im, levs, kdt, & nsswr, imfdeepcnv, iccn, ntoz, iflip, iaermdl integer, intent(in) :: idate(:) real(kind_phys), intent(in) :: fhswr, fhour @@ -787,7 +789,7 @@ subroutine GFS_phys_time_vary_timestep_init ( !> - Call ciinterpol() to make IN and CCN data interpolation if (iccn == 1) then - call ciinterpol (me, im, idate, fhour, & + call ciinterpol (mpirank, im, idate, fhour, & jindx1_ci, jindx2_ci, & ddy_ci, iindx1_ci, & iindx2_ci, ddx_ci, & @@ -796,7 +798,7 @@ subroutine GFS_phys_time_vary_timestep_init ( !> - Call cires_indx_ugwp to read monthly-mean GW-tau diagnosed from FV3GFS-runs that resolve GW-activ if (do_ugwp_v1) then - call tau_amf_interp(me, master, im, idate, fhour, & + call tau_amf_interp(mpirank, mpiroot, im, idate, fhour, & jindx1_tau, jindx2_tau, & ddy_j1tau, ddy_j2tau, tau_amf) endif @@ -806,13 +808,13 @@ subroutine GFS_phys_time_vary_timestep_init ( ! aerinterpol is using threading inside, don't ! move into OpenMP parallel section above if (iaermdl==1) then - call aerinterpol (me, master, nthrds, im, idate, & + call aerinterpol (mpicomm, mpirank, mpiroot, nthrds, im, idate, & fhour, iflip, jindx1_aer, jindx2_aer, & ddy_aer, iindx1_aer, & iindx2_aer, ddx_aer, & levs, prsl, aer_nm, errmsg, errflg) else if (iaermdl==6) then - call aerinterpol_dl (me, master, nthrds, im, idate, & + call aerinterpol_dl (mpicomm, mpirank, mpiroot, nthrds, im, idate, & fhour, iflip, jindx1_aer, jindx2_aer, & ddy_aer, iindx1_aer, & iindx2_aer, ddx_aer, & diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta index e86858a3f..98a60e3b4 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta @@ -15,14 +15,21 @@ name = GFS_phys_time_vary_init type = scheme -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in -[master] +[mpiroot] standard_name = mpi_root long_name = master MPI-rank units = index @@ -1095,14 +1102,21 @@ [ccpp-arg-table] name = GFS_phys_time_vary_timestep_init type = scheme -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in -[master] +[mpiroot] standard_name = mpi_root long_name = master MPI-rank units = index @@ -1295,7 +1309,7 @@ standard_name = ozone_forcing long_name = ozone forcing data units = mixed - dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_data) + dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data) type = real kind = kind_phys intent = inout diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.F90 new file mode 100644 index 000000000..3eaec5e6b --- /dev/null +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.F90 @@ -0,0 +1,100 @@ +!>\file GFS_rad_time_vary.neptune.F90 +!! Contains code related to GFS radiation suite setup (radiation part of time_vary_step) + module GFS_rad_time_vary + + implicit none + + private + + public GFS_rad_time_vary_timestep_init + + contains + +!> This module contains code related to GFS radiation setup. + +!> \section arg_table_GFS_rad_time_vary_timestep_init Argument Table +!! \htmlinclude GFS_rad_time_vary_timestep_init.html +!! + subroutine GFS_rad_time_vary_timestep_init (lrseeds, rseeds, & + lslwr, lsswr, isubc_lw, isubc_sw, icsdsw, icsdlw, cnx, cny, isc, jsc, & + imap, jmap, sec, kdt, imp_physics, imp_physics_zhao_carr, ipsd0, ipsdlim,& + ps_2delt, ps_1delt, t_2delt, t_1delt, qv_2delt, qv_1delt, t, qv, ps, & + errmsg, errflg) + + use mersenne_twister, only: random_setseed, random_index, random_stat + use machine, only: kind_phys + use radcons, only: qmin, con_100 + + implicit none + + ! Interface variables + logical, intent(in) :: lrseeds + integer, intent(in), optional :: rseeds(:,:) + integer, intent(in) :: isubc_lw, isubc_sw, cnx, cny, isc, jsc, kdt + integer, intent(in) :: imp_physics, imp_physics_zhao_carr, ipsd0, ipsdlim + logical, intent(in) :: lslwr, lsswr + integer, intent(inout), optional :: icsdsw(:), icsdlw(:) + integer, intent(in) :: imap(:), jmap(:) + real(kind_phys), intent(in) :: sec + real(kind_phys), intent(inout), optional :: ps_2delt(:) + real(kind_phys), intent(inout), optional :: ps_1delt(:) + real(kind_phys), intent(inout), optional :: t_2delt(:,:) + real(kind_phys), intent(inout), optional :: t_1delt(:,:) + real(kind_phys), intent(inout), optional :: qv_2delt(:,:) + real(kind_phys), intent(inout), optional:: qv_1delt(:,:) + real(kind_phys), intent(in) :: t(:,:), qv(:,:), ps(:) + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Local variables + type (random_stat) :: stat + integer :: ix, j, i, ipseed + integer :: numrdm(cnx*cny*2) + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (lsswr .or. lslwr) then + + !--- call to GFS_radupdate_timestep_init is now in GFS_rrtmg_setup_timestep_init + + !--- set up random seed index in a reproducible way for entire cubed-sphere face (lat-lon grid) + if ((isubc_lw==2) .or. (isubc_sw==2)) then + !NRL If random seeds supplied by NEPTUNE + if(lrseeds) then + do ix=1,size(jmap) + icsdsw(ix) = rseeds(ix,1) + icsdlw(ix) = rseeds(ix,2) + enddo + else + ipseed = mod(nint(con_100*sqrt(sec)), ipsdlim) + 1 + ipsd0 + call random_setseed (ipseed, stat) + call random_index (ipsdlim, numrdm, stat) + + do ix=1,size(jmap) + j = jmap(ix) + i = imap(ix) + !--- for testing purposes, replace numrdm with '100' + icsdsw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx) + icsdlw(ix) = numrdm(i+isc-1 + (j+jsc-2)*cnx + cnx*cny) + enddo + end if !lrseeds + endif ! isubc_lw and isubc_sw + + if (imp_physics == imp_physics_zhao_carr) then + if (kdt == 1) then + t_2delt = t + t_1delt = t + qv_2delt = qv + qv_1delt = qv + ps_2delt = ps + ps_1delt = ps + endif + endif + + endif + + end subroutine GFS_rad_time_vary_timestep_init + + end module GFS_rad_time_vary diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.meta new file mode 100644 index 000000000..a7ac1381c --- /dev/null +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.neptune.meta @@ -0,0 +1,248 @@ +[ccpp-table-properties] + name = GFS_rad_time_vary + type = scheme + dependencies_path = ../../ + dependencies = hooks/machine.F,Radiation/mersenne_twister.f,Radiation/RRTMG/radcons.f90 + +######################################################################## +[ccpp-arg-table] + name = GFS_rad_time_vary_timestep_init + type = scheme +[lrseeds] + standard_name = do_host_provided_random_seeds + long_name = flag to use host-provided random seeds + units = flag + dimensions = () + type = logical + intent = in +[rseeds] + standard_name = random_number_seeds_from_host + long_name = random number seeds from host + units = none + dimensions = (horizontal_dimension, number_of_host_provided_random_number_streams) + type = integer + intent = in + optional = True +[lslwr] + standard_name = flag_for_calling_longwave_radiation + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = in +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = in +[isubc_lw] + standard_name = flag_for_lw_clouds_sub_grid_approximation + long_name = flag for lw clouds sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in +[isubc_sw] + standard_name = flag_for_sw_clouds_grid_approximation + long_name = flag for sw clouds sub-grid approximation + units = flag + dimensions = () + type = integer + intent = in +[icsdsw] + standard_name = random_number_seed_for_mcica_shortwave + long_name = random seeds for sub-column cloud generators sw + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[icsdlw] + standard_name = random_number_seed_for_mcica_longwave + long_name = random seeds for sub-column cloud generators lw + units = none + dimensions = (horizontal_dimension) + type = integer + intent = inout + optional = True +[cnx] + standard_name = number_of_x_points_for_current_cubed_sphere_tile + long_name = number of points in x direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in +[cny] + standard_name = number_of_y_points_for_current_cubed_sphere_tile + long_name = number of points in y direction for this cubed sphere face + units = count + dimensions = () + type = integer + intent = in +[isc] + standard_name = starting_x_index_for_this_MPI_rank + long_name = starting index in the x direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[jsc] + standard_name = starting_y_index_for_this_MPI_rank + long_name = starting index in the y direction for this MPI rank + units = count + dimensions = () + type = integer + intent = in +[imap] + standard_name = map_of_block_column_number_to_global_i_index + long_name = map of local index ix to global index i for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in +[jmap] + standard_name = map_of_block_column_number_to_global_j_index + long_name = map of local index ix to global index j for this block + units = none + dimensions = (horizontal_dimension) + type = integer + intent = in +[sec] + standard_name = forecast_time_in_seconds + long_name = seconds elapsed since model initialization + units = s + dimensions = () + type = real + kind = kind_phys + intent = in +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = in +[imp_physics] + standard_name = control_for_microphysics_scheme + long_name = choice of microphysics scheme + units = flag + dimensions = () + type = integer + intent = in +[imp_physics_zhao_carr] + standard_name = identifier_for_zhao_carr_microphysics_scheme + long_name = choice of Zhao-Carr microphysics scheme + units = flag + dimensions = () + type = integer + intent = in +[ipsd0] + standard_name = initial_seed_for_mcica + long_name = initial permutation seed for mcica radiation + units = 1 + dimensions = () + type = integer + intent = in +[ipsdlim] + standard_name = limit_for_initial_seed_for_mcica + long_name = limit for initial permutation seed for mcica radiation + units = 1 + dimensions = () + type = integer + intent = in +[ps_2delt] + standard_name = surface_air_pressure_two_timesteps_back + long_name = surface air pressure two timesteps back + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[ps_1delt] + standard_name = surface_air_pressure_on_previous_timestep + long_name = surface air pressure at previous timestep + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[t_2delt] + standard_name = air_temperature_two_timesteps_back + long_name = air temperature two timesteps back + units = K + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[t_1delt] + standard_name = air_temperature_on_previous_timestep_in_xyz_dimensioned_restart_array + long_name = air temperature at previous timestep + units = K + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[qv_2delt] + standard_name = specific_humidity_two_timesteps_back + long_name = water vapor specific humidity two timesteps back + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[qv_1delt] + standard_name = specific_humidity_on_previous_timestep_in_xyz_dimensioned_restart_array + long_name = water vapor specific humidity at previous timestep + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = inout + optional = True +[t] + standard_name = air_temperature + long_name = model layer mean temperature + units = K + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in +[qv] + standard_name = specific_humidity + long_name = water vapor specific humidity + units = kg kg-1 + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + intent = in +[ps] + standard_name = air_pressure_at_lowest_model_interface + long_name = air pressure at lowest model interface + units = Pa + dimensions = (horizontal_dimension) + type = real + kind = kind_phys + intent = in +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out + diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90 index 9c0caa104..ef4783f5b 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90 @@ -6,6 +6,7 @@ module GFS_radiation_surface use machine, only: kind_phys + use mpi_f08 contains @@ -16,13 +17,16 @@ module GFS_radiation_surface !> \section arg_table_GFS_radiation_surface_init Argument Table !! \htmlinclude GFS_radiation_surface_init.html !! - subroutine GFS_radiation_surface_init (me, ialb, iems, semis_file, con_pi, errmsg, errflg) + subroutine GFS_radiation_surface_init (mpicomm, mpirank, mpiroot, & + ialb, iems, semis_file, con_pi, errmsg, errflg) use module_radiation_surface, only: sfc_init implicit none - integer, intent(in) :: me, ialb, iems + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer, intent(in) :: ialb, iems character(len=26), intent(in) :: semis_file real(kind_phys), intent(in) :: con_pi character(len=*), intent(out) :: errmsg @@ -32,13 +36,14 @@ subroutine GFS_radiation_surface_init (me, ialb, iems, semis_file, con_pi, errms errmsg = '' errflg = 0 - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,'In GFS_radiation_surface_init, before calling sfc_init' print *,'ialb=',ialb,' iems=',iems end if ! Call surface initialization routine - call sfc_init ( me, ialb, iems, semis_file, con_pi, errmsg, errflg ) + call sfc_init ( mpicomm, mpirank, mpiroot, & + ialb, iems, semis_file, con_pi, errmsg, errflg ) end subroutine GFS_radiation_surface_init diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta index 7e04bc8d2..0192b0547 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta @@ -10,13 +10,27 @@ [ccpp-arg-table] name = GFS_radiation_surface_init type = scheme -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in [ialb] standard_name = control_for_surface_albedo long_name = flag for using climatology alb, based on sfc type diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 index 4d1391e20..baa660dbc 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 @@ -8,6 +8,7 @@ module GFS_rrtmg_setup use machine, only: kind_phys use module_ozphys, only: ty_ozphys + use mpi_f08 implicit none public GFS_rrtmg_setup_init, GFS_rrtmg_setup_timestep_init, GFS_rrtmg_setup_finalize @@ -40,7 +41,8 @@ module GFS_rrtmg_setup subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, & iaer, ntcw, num_p3d, npdf3d, ntoz, iovr, iovr_rand, iovr_maxrand, & iovr_max, iovr_dcorr, iovr_exp, iovr_exprand, icliq_sw, lcrick, & - lcnorm, imp_physics, lnoprec, idate, iflip, do_RRTMGP, me, lalw1bd, & + lcnorm, imp_physics, lnoprec, idate, iflip, do_RRTMGP, & + mpicomm, mpirank, mpiroot, lalw1bd, & iaermdl, iaerflg, aeros_file, con_pi, con_t0c, con_c, con_boltz, & con_plnk, con_solr_2008, con_solr_2002, con_g, con_rd, co2usr_file, & co2cyc_file, rad_hr_units, inc_minor_gas, icliq_lw, isubcsw, isubclw,& @@ -155,10 +157,13 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, & integer, intent(in) :: levr, ictm, isol, ico2, iaer, ntcw, num_p3d, & ltp, npdf3d, ntoz, iovr, iovr_rand, iovr_maxrand, iovr_max, & iovr_dcorr, iovr_exp, iovr_exprand, icliq_sw, imp_physics, & - iflip, me, rad_hr_units, icliq_lw, isubcsw, isubclw, iswmode + iflip, rad_hr_units, icliq_lw, isubcsw, isubclw, iswmode integer, intent(in) :: idate(:) logical, intent(in) :: lcrick, lcnorm, lnoprec, do_RRTMGP, lalw1bd, & inc_minor_gas, lextop + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank + integer, intent(in) :: mpiroot character(len=26),intent(in) :: aeros_file, solar_file, co2usr_file,& co2cyc_file real(kind_phys), intent(in) :: con_pi, con_t0c, con_c, con_boltz, & @@ -191,7 +196,7 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, & ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) endif - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' In rad_initialize (GFS_rrtmg_setup_init), before calling RRTMG initialization' print *,' si =',si print *,' levr=',levr,' ictm=',ictm,' isol=',isol,' ico2=',ico2,& @@ -199,7 +204,7 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, & print *,' np3d=',num_p3d,' ntoz=',ntoz, & ' iovr=',iovr,' isubcsw=',isubcsw, & ' isubclw=',isubclw,' icliq_sw=',icliq_sw, & - ' iflip=',iflip,' me=',me + ' iflip=',iflip,' mpirank=',mpirank print *,' lcrick=',lcrick, & ' lcnorm=',lcnorm,' lnoprec=',lnoprec print *, 'lextop=',lextop, ' ltp=',ltp @@ -208,29 +213,31 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, & if (is_initialized) return ! Call initialization routines - call sol_init ( me, isol, solar_file, con_solr_2008,con_solr_2002,& - con_pi ) - call aer_init ( levr, me, iaermdl, iaerflg, lalw1bd, aeros_file, & + call sol_init ( mpicomm, mpirank, mpiroot, & + isol, solar_file, con_solr_2008,con_solr_2002, con_pi ) + call aer_init ( levr, mpicomm, mpirank, mpiroot, & + iaermdl, iaerflg, lalw1bd, aeros_file, & con_pi, con_t0c, con_c, con_boltz, con_plnk, errflg, errmsg) if(errflg/=0) return - call gas_init ( me, co2usr_file, co2cyc_file, ico2, ictm, con_pi, errflg, errmsg ) + call gas_init ( mpicomm, mpirank, mpiroot, & + co2usr_file, co2cyc_file, ico2, ictm, con_pi, errflg, errmsg ) if(errflg/=0) return - call cld_init ( si, levr, imp_physics, me, con_g, con_rd, errflg, errmsg) + call cld_init ( si, levr, imp_physics, mpirank, con_g, con_rd, errflg, errmsg) if(errflg/=0) return - call rlwinit ( me, rad_hr_units, inc_minor_gas, icliq_lw, isubcsw, & + call rlwinit ( mpirank, rad_hr_units, inc_minor_gas, icliq_lw, isubcsw, & iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, & iovr_exp, iovr_exprand, errflg, errmsg ) if(errflg/=0) return - call rswinit ( me, rad_hr_units, inc_minor_gas, icliq_sw, isubclw, & + call rswinit ( mpirank, rad_hr_units, inc_minor_gas, icliq_sw, isubclw, & iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, & iovr_exp, iovr_exprand,iswmode, errflg, errmsg ) if(errflg/=0) return - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' Radiation sub-cloud initial seed =',ipsd0, & & ' IC-idate =',idate print *,' return from rad_initialize (GFS_rrtmg_setup_init) - after calling RRTMG initialization' @@ -244,7 +251,8 @@ end subroutine GFS_rrtmg_setup_init !! \htmlinclude GFS_rrtmg_setup_timestep_init.html !! subroutine GFS_rrtmg_setup_timestep_init (idate, jdate, deltsw, deltim, & - lsswr, me, iaermdl, iaerflg, isol, aeros_file, slag, sdec, cdec, & + lsswr, mpicomm, mpirank, mpiroot, & + iaermdl, iaerflg, isol, aeros_file, slag, sdec, cdec, & solcon, con_pi, co2dat_file, co2gbl_file, ictm, ico2, ntoz, ozphys,& errmsg, errflg) @@ -257,7 +265,9 @@ subroutine GFS_rrtmg_setup_timestep_init (idate, jdate, deltsw, deltim, & real(kind=kind_phys), intent(in) :: deltim real(kind=kind_phys), intent(in) :: con_pi logical, intent(in) :: lsswr - integer, intent(in) :: me + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank + integer, intent(in) :: mpiroot integer, intent(in) :: iaermdl, iaerflg, isol, ictm, ico2, ntoz type(ty_ozphys), intent(inout) :: ozphys character(len=26), intent(in) :: aeros_file, co2dat_file, co2gbl_file @@ -279,7 +289,8 @@ subroutine GFS_rrtmg_setup_timestep_init (idate, jdate, deltsw, deltim, & errmsg = '' errflg = 0 - call radupdate(idate,jdate,deltsw,deltim,lsswr,me,iaermdl, iaerflg,isol,aeros_file,& + call radupdate(idate,jdate,deltsw,deltim,lsswr,& + mpicomm,mpirank,mpiroot,iaermdl, iaerflg,isol,aeros_file,& slag,sdec,cdec,solcon,con_pi,co2dat_file,co2gbl_file,ictm,ico2,ntoz,ozphys,errflg,errmsg) end subroutine GFS_rrtmg_setup_timestep_init @@ -326,7 +337,8 @@ end subroutine GFS_rrtmg_setup_finalize !! \param solcon solar constant adjusted by sun-earth distance \f$(W/m^2)\f$ !> \section gen_radupdate General Algorithm !----------------------------------- - subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,& + subroutine radupdate( idate,jdate,deltsw,deltim,lsswr, & + mpicomm,mpirank,mpiroot, iaermdl, & iaerflg, isol, aeros_file, slag,sdec,cdec,solcon, con_pi, & co2dat_file,co2gbl_file, ictm, ico2, ntoz, ozphys, errflg, errmsg) !................................... @@ -371,7 +383,10 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,& implicit none ! --- inputs: - integer, intent(in) :: idate(:), jdate(:), me, iaermdl, iaerflg, isol, ictm, ntoz, ico2 + integer, intent(in) :: idate(:), jdate(:) + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer, intent(in) :: iaermdl, iaerflg, isol, ictm, ntoz, ico2 type(ty_ozphys),intent(inout) :: ozphys logical, intent(in) :: lsswr character(len=26),intent(in) :: aeros_file,co2dat_file,co2gbl_file @@ -443,7 +458,8 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,& call sol_update & ! --- inputs: - & ( jdate,kyear,deltsw,deltim,lsol_chg, me, & + & ( jdate,kyear,deltsw,deltim,lsol_chg, & + & mpicomm,mpirank,mpiroot, & ! --- outputs: & slag,sdec,cdec,solcon,con_pi,errmsg,errflg & & ) @@ -454,7 +470,8 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,& !> -# Call module_radiation_aerosols::aer_update(), monthly update, no !! time interpolation if ( lmon_chg ) then - call aer_update ( iyear, imon, me, iaermdl, aeros_file, errflg, errmsg ) + call aer_update ( iyear, imon, mpicomm,mpirank,mpiroot, & + iaermdl, aeros_file, errflg, errmsg ) if(errflg/=0) return endif @@ -467,7 +484,8 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,& lco2_chg = .false. endif - call gas_update ( kyear,kmon,kday,khour,lco2_chg, me, co2dat_file, & + call gas_update ( kyear,kmon,kday,khour,lco2_chg, & + mpicomm,mpirank,mpiroot, co2dat_file, & co2gbl_file, ictm, ico2, errflg, errmsg ) if(errflg/=0) return diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta index a8030d969..5bd5971a8 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta @@ -2,6 +2,7 @@ name = GFS_rrtmg_setup type = scheme dependencies_path = ../../ + dependencies = tools/mpiutil.F90 dependencies = hooks/machine.F dependencies = Radiation/radiation_aerosols.f dependencies = Radiation/radiation_astronomy.f,Radiation/radiation_clouds.f,Radiation/radiation_gases.f @@ -233,13 +234,27 @@ dimensions = () type = logical intent = in -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in [aeros_file] standard_name = aerosol_data_file long_name = aerosol data file @@ -440,13 +455,27 @@ dimensions = () type = logical intent = in -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in [iaermdl] standard_name = control_for_aerosol_radiation_scheme long_name = control of aerosol scheme in radiation diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 index df3d69bdd..8f4200f37 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 @@ -2,6 +2,7 @@ !! This file initializes the RRTMGP radiation scheme module GFS_rrtmgp_setup + use mpi_f08 use machine, only : kind_phys use module_radiation_astronomy, only : sol_init, sol_update use module_radiation_aerosols, only : aer_init, aer_update @@ -37,10 +38,10 @@ module GFS_rrtmgp_setup subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, & imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6, imp_physics_zhao_carr, & imp_physics_zhao_carr_pdf, imp_physics_mg, si, levr, ictm, isol, ico2, iaer, & - ntcw, ntoz, iovr, isubc_sw, isubc_lw, lalw1bd, idate, & - me, aeros_file, iaermdl, iaerflg, con_pi, con_t0c, con_c, con_boltz, con_plnk, & - solar_file, con_solr_2008, con_solr_2002, co2usr_file, co2cyc_file, ipsd0, & - errmsg, errflg) + ntcw, ntoz, iovr, isubc_sw, isubc_lw, lalw1bd, idate, & + mpicomm, mpirank, mpiroot, aeros_file, iaermdl, iaerflg, con_pi, con_t0c, & + con_c, con_boltz, con_plnk, solar_file, con_solr_2008, con_solr_2002, co2usr_file,& + co2cyc_file, ipsd0, errmsg, errflg) ! Inputs logical, intent(in) :: do_RRTMGP @@ -57,7 +58,8 @@ subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, con_pi, con_t0c, con_c, con_boltz, con_plnk, con_solr_2008, con_solr_2002 real(kind_phys), dimension(:), intent(in) :: & si - integer, intent(in) :: levr, ictm, isol, ico2, iaer, ntcw, ntoz, iovr, isubc_sw, isubc_lw, me + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: levr, ictm, isol, ico2, iaer, ntcw, ntoz, iovr, isubc_sw, isubc_lw, mpirank, mpiroot logical, intent(in) :: & lalw1bd integer, intent(in), dimension(:) :: & @@ -94,7 +96,7 @@ subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, ipsd0 = 17*idate(1)+43*idate(2)+37*idate(3)+23*idate(4) endif - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' In rad_initialize (GFS_rrtmgp_setup_init), before calling radinit' print *,' si = ',si print *,' levr = ',levr, & @@ -109,7 +111,7 @@ subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, ' isubc_sw = ',isubc_sw, & ' isubc_lw = ',isubc_lw, & ' ipsd0 = ',ipsd0, & - ' me = ',me + ' mpirank = ',mpirank endif loz1st = (ntoz == 0) ! first-time clim ozone data read flag @@ -120,14 +122,14 @@ subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires, if (is_initialized) return ! Call initialization routines.. - call sol_init ( me, isol, solar_file, con_solr_2008, con_solr_2002, con_pi ) - call aer_init ( levr, me, iaermdl, iaerflg, lalw1bd, aeros_file, con_pi, con_t0c, & - con_c, con_boltz, con_plnk, errflg, errmsg) + call sol_init ( mpicomm, mpirank, mpiroot, isol, solar_file, con_solr_2008, con_solr_2002, con_pi ) + call aer_init ( levr, mpicomm, mpirank, mpiroot, iaermdl, iaerflg, lalw1bd, aeros_file, con_pi, & + con_t0c, con_c, con_boltz, con_plnk, errflg, errmsg) if(errflg/=0) return - call gas_init ( me, co2usr_file, co2cyc_file, ico2, ictm, con_pi, errflg, errmsg ) + call gas_init ( mpicomm, mpirank, mpiroot, co2usr_file, co2cyc_file, ico2, ictm, con_pi, errflg, errmsg ) if(errflg/=0) return - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit' endif @@ -138,9 +140,9 @@ end subroutine GFS_rrtmgp_setup_init !> \section arg_table_GFS_rrtmgp_setup_timestep_init Argument Table !! \htmlinclude GFS_rrtmgp_setup_timestep_init.html !! - subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad, me, & - iaermdl, aeros_file, isol, slag, sdec, cdec, solcon, con_pi, co2dat_file, & - co2gbl_file, ictm, ico2, ntoz, ozphys, errmsg, errflg) + subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad, & + mpicomm, mpirank, mpiroot, iaermdl, aeros_file, isol, slag, sdec, cdec, solcon, & + con_pi, co2dat_file, co2gbl_file, ictm, ico2, ntoz, ozphys, errmsg, errflg) ! Inputs integer, intent(in) :: idate(:) @@ -149,7 +151,8 @@ subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad real(kind_phys), intent(in) :: deltim logical, intent(in) :: doSWrad real(kind_phys), intent(in) :: con_pi - integer, intent(in) :: me + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot integer, intent(in) :: iaermdl,isol,ictm,ico2,ntoz character(len=26), intent(in) :: aeros_file,co2dat_file,co2gbl_file type(ty_ozphys),intent(inout) :: ozphys @@ -217,13 +220,14 @@ subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad lsol_chg = ( isol==4 .and. lmon_chg ) endif iyear0 = iyear - call sol_update(jdate, kyear, deltsw, deltim, lsol_chg, me, slag, sdec, cdec, solcon, con_pi, errmsg, errflg) + call sol_update(jdate, kyear, deltsw, deltim, lsol_chg, mpicomm, mpirank, mpiroot, & + slag, sdec, cdec, solcon, con_pi, errmsg, errflg) if(errflg/=0) return endif ! Update aerosols... if ( lmon_chg ) then - call aer_update ( iyear, imon, me, iaermdl, aeros_file, errflg, errmsg) + call aer_update ( iyear, imon, mpicomm, mpirank, mpiroot, iaermdl, aeros_file, errflg, errmsg) if(errflg/=0) return endif @@ -234,7 +238,7 @@ subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad else lco2_chg = .false. endif - call gas_update (kyear, kmon, kday, khour, lco2_chg, me, co2dat_file, co2gbl_file, ictm,& + call gas_update (kyear, kmon, kday, khour, lco2_chg, mpicomm, mpirank, mpiroot, co2dat_file, co2gbl_file, ictm,& ico2, errflg, errmsg ) if(errflg/=0) return if (ntoz == 0) then diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta index 763790cb9..1e31e3567 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta @@ -190,13 +190,27 @@ dimensions = (4) type = integer intent = in -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in [aeros_file] standard_name = aerosol_data_file long_name = aerosol data file @@ -339,13 +353,27 @@ dimensions = () type = logical intent = in -[me] +[mpicomm] + standard_name = mpi_communicator + long_name = MPI communicator + units = index + dimensions = () + type = MPI_Comm + intent = in +[mpirank] standard_name = mpi_rank long_name = current MPI-rank units = index dimensions = () type = integer intent = in +[mpiroot] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in [aeros_file] standard_name = aerosol_data_file long_name = aerosol data file diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 index a159d899d..d9b12e4e1 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 @@ -107,7 +107,8 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, ! Check initialization status if (.not.is_initialized) then - write(errmsg,'(*(a))') "Logic error: GFS_time_vary_pre_timestep_init called before GFS_time_vary_pre_init" + write(errmsg,'(*(a))') "Logic error: GFS_time_vary_pre_timestep_init called & + &before GFS_time_vary_pre_init" errflg = 1 return end if @@ -121,11 +122,12 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, call w3difdat(jdat,idat,4,rinc8) sec = rinc8(4) else - write(errmsg,'(*(a))') "FATAL ERROR: Invalid w3kindreal or w3kindint:", w3kindreal, w3kindint + write(errmsg,'(a,2i4)') "FATAL ERROR: Invalid w3kindreal or w3kindint:", w3kindreal, w3kindint errflg = 1 return end if phour = sec/con_hr + !--- set current bucket hour zhour = phour fhour = (sec + dtp)/con_hr diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 new file mode 100644 index 000000000..52ee21c68 --- /dev/null +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 @@ -0,0 +1,207 @@ +!> \file GFS_time_vary_pre.neptune.F90 +!! Contains code related to GFS physics suite setup (generic part of time_vary_step) + + module GFS_time_vary_pre + + use funcphys, only: gfuncphys + + implicit none + + private + + public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_finalize + + logical :: is_initialized = .false. + + contains + +!>\defgroup gfs_time_vary_pre_mod GFS Time Vary Pre Module +!! This module contains code related to GFS physics suite setup. +!> @{ +!> \section arg_table_GFS_time_vary_pre_init Argument Table +!! \htmlinclude GFS_time_vary_pre_init.html +!! + subroutine GFS_time_vary_pre_init (errmsg, errflg) + + implicit none + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (is_initialized) return + + !--- Call gfuncphys (funcphys.f) to compute all physics function tables. + call gfuncphys () + + is_initialized = .true. + + end subroutine GFS_time_vary_pre_init + + +!> \section arg_table_GFS_time_vary_pre_finalize Argument Table +!! \htmlinclude GFS_time_vary_pre_finalize.html +!! + subroutine GFS_time_vary_pre_finalize(errmsg, errflg) + + implicit none + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + if (.not. is_initialized) return + + ! DH* this is the place to deallocate whatever is allocated by gfuncphys() in GFS_time_vary_pre_init + + is_initialized = .false. + + end subroutine GFS_time_vary_pre_finalize + + +!> \section arg_table_GFS_time_vary_pre_timestep_init Argument Table +!! \htmlinclude GFS_time_vary_pre_timestep_init.html +!! + subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, & + nslwr, nhfrad, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, & + kdt, julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg) + + use machine, only: kind_phys, kind_dbl_prec, kind_sngl_prec + + implicit none + + integer, intent(in) :: idate(:) + integer, intent(in) :: jdat(:), idat(:) + integer, intent(in) :: nsswr, nslwr, me, & + master, nscyc, nhfrad + logical, intent(in) :: debug + real(kind=kind_phys), intent(in) :: dtp + + integer, intent(out) :: kdt, yearlen, ipt + logical, intent(out) :: lprnt, lssav, lsswr, & + lslwr + real(kind=kind_phys), intent(out) :: sec, phour, zhour, & + fhour, julian, solhr + + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + + real(kind=kind_phys), parameter :: con_24 = 24.0_kind_phys + real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys + real(kind=kind_dbl_prec) :: rinc8(5) + + integer :: w3kindreal, w3kindint + integer :: iw3jdn + integer :: jd0, jd1 + real :: fjd + + ! Initialize CCPP error handling variables + errmsg = '' + errflg = 0 + + ! Check initialization status + if (.not.is_initialized) then + write(errmsg,'(*(a))') "Logic error: GFS_time_vary_pre_timestep_init called & + &before GFS_time_vary_pre_init" + errflg = 1 + return + end if + + !--- jdat is being updated by the host model + !--- update calendars and triggers + call w3kind(w3kindreal, w3kindint) + !--- CCPP uses w3emc_d, therefore expecting the following values + if (w3kindreal == 8 .and. w3kindint==4) then + rinc8(1:5) = 0 + call w3difdat(jdat,idat,4,rinc8) + sec = rinc8(4) + else + write(errmsg,'(a,2i4)') "FATAL ERROR: Invalid w3kindreal or w3kindint:", w3kindreal, w3kindint + errflg = 1 + return + end if + phour = sec/con_hr + + !--- set current bucket hour + zhour = phour + fhour = (sec + dtp)/con_hr + kdt = nint((sec + dtp)/dtp) + + !GJF* These calculations were originally in GFS_physics_driver.F90 for + ! NoahMP. They were moved to this routine since they only depend + ! on time (not space). Note that this code is included as-is from + ! GFS_physics_driver.F90, but it may be simplified by using more + ! NCEP W3 library calls (e.g., see W3DOXDAT, W3FS13 for Julian day + ! of year and W3DIFDAT to determine the integer number of days in + ! a given year). *GJF + ! Julian day calculation (fcst day of the year) + ! we need yearln and julian to + ! pass to noah mp sflx, idate is init, jdat is fcst;idate = jdat when kdt=1 + ! jdat is changing + ! + + jd1 = iw3jdn(jdat(1),jdat(2),jdat(3)) + jd0 = iw3jdn(jdat(1),1,1) + fjd = float(jdat(5))/24.0 + float(jdat(6))/1440.0 + + julian = float(jd1-jd0) + fjd + + ! + ! Year length + ! + ! what if the integration goes from one year to another? + ! iyr or jyr ? from 365 to 366 or from 366 to 365 + ! + ! is this against model's noleap yr assumption? + if (mod(jdat(1),4) == 0) then + yearlen = 366 + if (mod(jdat(1),100) == 0) then + yearlen = 365 + if (mod(jdat(1),400) == 0) then + yearlen = 366 + endif + endif + endif + + ipt = 1 + lprnt = .false. + lssav = .true. + + !--- radiation triggers + lsswr = (mod(kdt, nsswr) == 1) + lslwr = (mod(kdt, nslwr) == 1) + !--- allow for radiation to be called on every physics time step, if needed + if (nsswr == 1) lsswr = .true. + if (nslwr == 1) lslwr = .true. + !--- allow for radiation to be called on every physics time step + ! for the first nhfrad timesteps (for spinup, coldstarts only) + if (kdt <= nhfrad) then + lsswr = .true. + lslwr = .true. + end if + + !--- set the solar hour based on a combination of phour and time initial hour + solhr = mod(phour+idate(1),con_24) + + if ((debug) .and. (me == master)) then + print *,' sec ', sec + print *,' kdt ', kdt + print *,' nsswr ', nsswr + print *,' nslwr ', nslwr + print *,' nscyc ', nscyc + print *,' lsswr ', lsswr + print *,' lslwr ', lslwr + print *,' fhour ', fhour + print *,' phour ', phour + print *,' solhr ', solhr + endif + + end subroutine GFS_time_vary_pre_timestep_init +!> @} + end module GFS_time_vary_pre diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta new file mode 100644 index 000000000..bdf4ec8d5 --- /dev/null +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta @@ -0,0 +1,240 @@ +[ccpp-table-properties] + name = GFS_time_vary_pre + type = scheme + dependencies_path = ../../ + dependencies = tools/funcphys.f90,hooks/machine.F + +######################################################################## +[ccpp-arg-table] + name = GFS_time_vary_pre_init + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out + +######################################################################## +[ccpp-arg-table] + name = GFS_time_vary_pre_finalize + type = scheme +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out + +######################################################################## +[ccpp-arg-table] + name = GFS_time_vary_pre_timestep_init + type = scheme +[jdat] + standard_name = date_and_time_of_forecast_in_united_states_order + long_name = current forecast date and time + units = none + dimensions = (8) + type = integer + intent = in +[idat] + standard_name = date_and_time_at_model_initialization_in_iso_order + long_name = initialization date and time + units = none + dimensions = (8) + type = integer + intent = in +[dtp] + standard_name = timestep_for_physics + long_name = physics timestep + units = s + dimensions = () + type = real + kind = kind_phys + intent = in +[nsswr] + standard_name = number_of_timesteps_between_shortwave_radiation_calls + long_name = number of timesteps between shortwave radiation calls + units = + dimensions = () + type = integer + intent = in +[nslwr] + standard_name = number_of_timesteps_between_longwave_radiation_calls + long_name = number of timesteps between longwave radiation calls + units = + dimensions = () + type = integer + intent = in +[nhfrad] + standard_name = number_of_timesteps_for_concurrent_radiation_and_remainder_physics_calls_after_model_initialization + long_name = number of timesteps for radiation calls on physics timestep (coldstarts only) + units = count + dimensions = () + type = integer + intent = in +[idate] + standard_name = date_and_time_at_model_initialization_in_united_states_order + long_name = initial date with different size and ordering + units = none + dimensions = (4) + type = integer + intent = in +[debug] + standard_name = flag_for_debug_output + long_name = control flag for debug + units = flag + dimensions = () + type = logical + intent = in +[me] + standard_name = mpi_rank + long_name = current MPI-rank + units = index + dimensions = () + type = integer + intent = in +[master] + standard_name = mpi_root + long_name = master MPI-rank + units = index + dimensions = () + type = integer + intent = in +[nscyc] + standard_name = number_of_timesteps_between_surface_cycling_calls + long_name = number of timesteps between surface cycling calls + units = count + dimensions = () + type = integer + intent = in +[sec] + standard_name = forecast_time_in_seconds + long_name = seconds elapsed since model initialization + units = s + dimensions = () + type = real + kind = kind_phys + intent = out +[phour] + standard_name = forecast_time_on_previous_timestep + long_name = forecast time at the previous timestep + units = h + dimensions = () + type = real + kind = kind_phys + intent = out +[zhour] + standard_name = time_elapsed_since_diagnostics_reset + long_name = time since diagnostics variables have been zeroed + units = h + dimensions = () + type = real + kind = kind_phys + intent = out +[fhour] + standard_name = forecast_time + long_name = current forecast time + units = h + dimensions = () + type = real + kind = kind_phys + intent = out +[kdt] + standard_name = index_of_timestep + long_name = current forecast iteration + units = index + dimensions = () + type = integer + intent = out +[julian] + standard_name = forecast_julian_day + long_name = julian day + units = days + dimensions = () + type = real + kind = kind_phys + intent = out +[yearlen] + standard_name = number_of_days_in_current_year + long_name = number of days in a year + units = days + dimensions = () + type = integer + intent = out +[ipt] + standard_name = index_of_horizontal_gridpoint_for_debug_output + long_name = horizontal index for point used for diagnostic printout + units = index + dimensions = () + type = integer + intent = out +[lprnt] + standard_name = flag_print + long_name = control flag for diagnostic print out + units = flag + dimensions = () + type = logical + intent = out +[lssav] + standard_name = flag_for_diagnostics + long_name = logical flag for storing diagnostics + units = flag + dimensions = () + type = logical + intent = out +[lsswr] + standard_name = flag_for_calling_shortwave_radiation + long_name = logical flags for sw radiation calls + units = flag + dimensions = () + type = logical + intent = out +[lslwr] + standard_name = flag_for_calling_longwave_radiation + long_name = logical flags for lw radiation calls + units = flag + dimensions = () + type = logical + intent = out +[solhr] + standard_name = forecast_utc_hour + long_name = time in hours after 00z at the current timestep + units = h + dimensions = () + type = real + kind = kind_phys + intent = out +[errmsg] + standard_name = ccpp_error_message + long_name = error message for error handling in CCPP + units = none + dimensions = () + type = character + kind = len=* + intent = out +[errflg] + standard_name = ccpp_error_code + long_name = error code for error handling in CCPP + units = 1 + dimensions = () + type = integer + intent = out diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 index 5f305d24f..b8210a348 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 @@ -72,20 +72,20 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, & use machine, only: kind_phys, kind_dbl_prec, kind_sngl_prec implicit none - + integer, intent(in) :: idate(:) integer, intent(in) :: jdat(:), idat(:) integer, intent(in) :: nsswr, nslwr, me, & master, nscyc logical, intent(in) :: debug real(kind=kind_phys), intent(in) :: dtp - + integer, intent(out) :: kdt, yearlen, ipt logical, intent(out) :: lprnt, lssav, lsswr, & lslwr real(kind=kind_phys), intent(out) :: sec, phour, zhour, & fhour, julian, solhr - + character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -120,22 +120,23 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, & call w3difdat(jdat,idat,4,rinc8) sec = rinc8(4) else - write(errmsg,'(*(a))') "FATAL ERROR: Invalid w3kindreal or w3kindint:", w3kindreal, w3kindint + write(errmsg,'(a,2i4)') "FATAL ERROR: Invalid w3kindreal or w3kindint:", w3kindreal, w3kindint errflg = 1 return end if phour = sec/con_hr + !--- set current bucket hour zhour = phour fhour = (sec + dtp)/con_hr kdt = nint((sec + dtp)/dtp) - - !GJF* These calculations were originally in GFS_physics_driver.F90 for - ! NoahMP. They were moved to this routine since they only depends - ! on time (not space). Note that this code is included as-is from - ! GFS_physics_driver.F90, but it may be simplified by using more - ! NCEP W3 library calls (e.g., see W3DOXDAT, W3FS13 for Julian day - ! of year and W3DIFDAT to determine the integer number of days in + + !GJF* These calculations were originally in GFS_physics_driver.F90 for + ! NoahMP. They were moved to this routine since they only depend + ! on time (not space). Note that this code is included as-is from + ! GFS_physics_driver.F90, but it may be simplified by using more + ! NCEP W3 library calls (e.g., see W3DOXDAT, W3FS13 for Julian day + ! of year and W3DIFDAT to determine the integer number of days in ! a given year). *GJF ! Julian day calculation (fcst day of the year) ! we need yearln and julian to @@ -148,7 +149,7 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, & fjd = float(jdat(5))/24.0 + float(jdat(6))/1440.0 julian = float(jd1-jd0) + fjd - + ! ! Year length ! diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90 index b90b6fca7..6ede27fcd 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90 @@ -7,6 +7,7 @@ !! IN and CCN data. module iccninterp + use mpi_f08 implicit none private @@ -16,51 +17,60 @@ module iccninterp contains !> - SUBROUTINE read_cidata (me, master) + SUBROUTINE read_cidata (mpicomm, mpirank, mpiroot) use machine, only: kind_phys + use mpiutil, only: ccpp_bcast use iccn_def use netcdf !--- in/out - integer, intent(in) :: me - integer, intent(in) :: master + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot !--- locals integer :: ncerr integer :: i, n, k, ncid, varid,j,it real(kind=kind_phys), allocatable, dimension(:) :: hyam,hybm real(kind=4), allocatable, dimension(:,:,:) :: ci_ps + integer :: ierr - allocate (hyam(kcipl), hybm(kcipl), ci_ps(lonscip,latscip,timeci)) allocate (ciplin(lonscip,latscip,kcipl,timeci)) allocate (ccnin(lonscip,latscip,kcipl,timeci)) allocate (ci_pres(lonscip,latscip,kcipl,timeci)) - ncerr = nf90_open("cam5_4_143_NAAI_monclimo2.nc", NF90_NOWRITE, ncid) - ncerr = nf90_inq_varid(ncid, "lat", varid) - ncerr = nf90_get_var(ncid, varid, ci_lat) - ncerr = nf90_inq_varid(ncid, "lon", varid) - ncerr = nf90_get_var(ncid, varid, ci_lon) - ncerr = nf90_inq_varid(ncid, "PS", varid) - ncerr = nf90_get_var(ncid, varid, ci_ps) - ncerr = nf90_inq_varid(ncid, "hyam", varid) - ncerr = nf90_get_var(ncid, varid, hyam) - ncerr = nf90_inq_varid(ncid, "hybm", varid) - ncerr = nf90_get_var(ncid, varid, hybm) - ncerr = nf90_inq_varid(ncid, "NAAI", varid) - ncerr = nf90_get_var(ncid, varid, ciplin) - do it = 1,timeci - do k=1, kcipl - ci_pres(:,:,k,it)=hyam(k)*1.e5+hybm(k)*ci_ps(:,:,it) + + read_and_broadcast: if (mpirank==mpiroot) then + allocate (hyam(kcipl), hybm(kcipl), ci_ps(lonscip,latscip,timeci)) + ncerr = nf90_open("cam5_4_143_NAAI_monclimo2.nc", NF90_NOWRITE, ncid) + ncerr = nf90_inq_varid(ncid, "lat", varid) + ncerr = nf90_get_var(ncid, varid, ci_lat) + ncerr = nf90_inq_varid(ncid, "lon", varid) + ncerr = nf90_get_var(ncid, varid, ci_lon) + ncerr = nf90_inq_varid(ncid, "PS", varid) + ncerr = nf90_get_var(ncid, varid, ci_ps) + ncerr = nf90_inq_varid(ncid, "hyam", varid) + ncerr = nf90_get_var(ncid, varid, hyam) + ncerr = nf90_inq_varid(ncid, "hybm", varid) + ncerr = nf90_get_var(ncid, varid, hybm) + ncerr = nf90_inq_varid(ncid, "NAAI", varid) + ncerr = nf90_get_var(ncid, varid, ciplin) + do it = 1,timeci + do k=1, kcipl + ci_pres(:,:,k,it)=hyam(k)*1.e5+hybm(k)*ci_ps(:,:,it) + end do end do - end do - ncerr = nf90_close(ncid) - ncerr = nf90_open("cam5_4_143_NPCCN_monclimo2.nc", NF90_NOWRITE, ncid) - ncerr = nf90_inq_varid(ncid, "NPCCN", varid) - ncerr = nf90_get_var(ncid, varid, ccnin) - ncerr = nf90_close(ncid) + ncerr = nf90_close(ncid) + ncerr = nf90_open("cam5_4_143_NPCCN_monclimo2.nc", NF90_NOWRITE, ncid) + ncerr = nf90_inq_varid(ncid, "NPCCN", varid) + ncerr = nf90_get_var(ncid, varid, ccnin) + ncerr = nf90_close(ncid) !--- - deallocate (hyam, hybm, ci_ps) - if (me == master) then + deallocate (hyam, hybm, ci_ps) write(*,*) 'Reading in ICCN data',ci_time - endif + endif read_and_broadcast + + call ccpp_bcast(ci_lat, mpiroot, mpicomm, ierr) + call ccpp_bcast(ci_lon, mpiroot, mpicomm, ierr) + call ccpp_bcast(ci_pres, mpiroot, mpicomm, ierr) + call ccpp_bcast(ciplin, mpiroot, mpicomm, ierr) + call ccpp_bcast(ccnin, mpiroot, mpicomm, ierr) END SUBROUTINE read_cidata ! diff --git a/physics/MP/Morrison_Gettelman/aerinterp.F90 b/physics/MP/Morrison_Gettelman/aerinterp.F90 index 15963db7d..627931605 100644 --- a/physics/MP/Morrison_Gettelman/aerinterp.F90 +++ b/physics/MP/Morrison_Gettelman/aerinterp.F90 @@ -7,6 +7,7 @@ !! aerosol data for MG microphysics. module aerinterp + use mpi_f08 implicit none private read_netfaer, read_netfaer_dl, fdnx_fname @@ -36,13 +37,15 @@ logical function netcdf_check(status, errmsg, errflg, why) END function netcdf_check !!!!!!! - SUBROUTINE read_aerdata_dl (me, master, iflip, idate, FHOUR, errmsg, errflg) - use machine, only: kind_phys, kind_io4, kind_dbl_prec + SUBROUTINE read_aerdata_dl (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) + use machine, only: kind_phys, kind_dbl_prec + use mpiutil, only: ccpp_bcast use aerclm_def use netcdf !--- in/out - integer, intent(in) :: me, master, iflip, idate(4) + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, iflip, idate(4) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg real(kind=kind_phys), intent(in) :: fhour @@ -51,6 +54,7 @@ SUBROUTINE read_aerdata_dl (me, master, iflip, idate, FHOUR, errmsg, errflg) integer :: i, j, k, n, ii, imon, klev character :: fname*50, mn*2, vname*10, dy*2, myr*4 logical :: file_exist + integer :: ierr integer :: dimids(NF90_MAX_VAR_DIMS) integer :: dimlen(NF90_MAX_VAR_DIMS) integer IDAT(8),JDAT(8) @@ -63,13 +67,13 @@ SUBROUTINE read_aerdata_dl (me, master, iflip, idate, FHOUR, errmsg, errflg) ! !! =================================================================== - if (me == master) then + read_and_broadcast_1: if (mpirank==mpiroot) then if ( iflip == 0 ) then ! data from toa to sfc print *, "GFS is top-down" else print *, "GFS is bottom-up" endif - endif + !! found first day needed to interpolated IDAT = 0 IDAT(1) = IDATE(4) @@ -133,9 +137,13 @@ SUBROUTINE read_aerdata_dl (me, master, iflip, idate, FHOUR, errmsg, errflg) levsw = dimlen(3) tsaer = dimlen(4) - if(me==master) then - print *, 'MERRA2 dim: ',dimlen(1:ndims) - endif + print *, 'MERRA2 dim: ',dimlen(1:ndims) + endif read_and_broadcast_1 + + call ccpp_bcast(lonsaer, mpiroot, mpicomm, ierr) + call ccpp_bcast(latsaer, mpiroot, mpicomm, ierr) + call ccpp_bcast(levsw, mpiroot, mpicomm, ierr) + call ccpp_bcast(tsaer, mpiroot, mpicomm, ierr) ! allocate arrays @@ -146,6 +154,7 @@ SUBROUTINE read_aerdata_dl (me, master, iflip, idate, FHOUR, errmsg, errflg) endif ! construct lat/lon array + read_and_broadcast_2: if (mpirank==mpiroot) then varid = -1 if(.not.netcdf_check(nf90_inq_varid(ncid, 'lat', varid), & errmsg, errflg, 'find id of lat var')) then @@ -179,15 +188,21 @@ SUBROUTINE read_aerdata_dl (me, master, iflip, idate, FHOUR, errmsg, errflg) if(.not.netcdf_check(nf90_close(ncid), errmsg, errflg, 'close '//trim(fname))) then return endif + endif read_and_broadcast_2 + + call ccpp_bcast(aer_lat, mpiroot, mpicomm, ierr) + call ccpp_bcast(aer_lon, mpiroot, mpicomm, ierr) + call ccpp_bcast(aer_t, mpiroot, mpicomm, ierr) END SUBROUTINE read_aerdata_dl ! !********************************************************************** - SUBROUTINE read_aerdataf_dl ( me, master, iflip, idate, FHOUR, errmsg, errflg) + SUBROUTINE read_aerdataf_dl (mpicomm, mpirank, mpiroot, iflip, idate, fhour, errmsg, errflg) use machine, only: kind_phys, kind_dbl_prec use aerclm_def !--- in/out - integer, intent(in) :: me, master, iflip, idate(4) + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, iflip, idate(4) character(len=*), intent(inout) :: errmsg integer, intent(inout) :: errflg real(kind=kind_phys), intent(in) :: fhour @@ -242,20 +257,20 @@ SUBROUTINE read_aerdataf_dl ( me, master, iflip, idate, FHOUR, errmsg, errflg) enddo if(fd_upb) then t1sv = aer_t(j-1) - call read_netfaer_dl(fname_dl, j-1, iflip, 1, errmsg, errflg) - call read_netfaer_dl(fname_dl, n2sv, iflip, 2, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl, j-1, iflip, 1, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl, n2sv, iflip, 2, errmsg, errflg) else t1sv = aer_t(tsaer) - call read_netfaer_dl(fname_dl, tsaer, iflip, 1, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl, tsaer, iflip, 1, errmsg, errflg) n2sv=1 t2sv=1440. call fdnx_fname (jdat(1), jdat(2),jdat(3),fname_dl) - call read_netfaer_dl(fname_dl, n2sv, iflip, 2, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl, n2sv, iflip, 2, errmsg, errflg) end if END SUBROUTINE read_aerdataf_dl !********************************************************************** ! - SUBROUTINE aerinterpol_dl( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx2, & + SUBROUTINE aerinterpol_dl(mpicomm, mpirank, mpiroot,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx2, & ddy,iindx1,iindx2,ddx,lev,prsl,aerout, errmsg,errflg) ! use machine, only: kind_phys, kind_dbl_prec @@ -272,7 +287,9 @@ SUBROUTINE aerinterpol_dl( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx ! integer JINDX1(npts), JINDX2(npts), iINDX1(npts), iINDX2(npts) - integer me,idate(4), master, nthrds + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer idate(4), nthrds integer IDAT(8),JDAT(8) ! real(kind=kind_phys) DDY(npts), ddx(npts),ttt @@ -302,7 +319,7 @@ SUBROUTINE aerinterpol_dl( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx ! rjday is the minutes in a day rjday = jdat(5)*60+jdat(6)+jdat(7)/60. if(rjday >= t2sv .or. jdat(3).ne.n1sv) then !!need to either to read in a record or open a new file - call read_netfaer_dl(fname_dl,n2sv, iflip, 1, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl,n2sv, iflip, 1, errmsg, errflg) end if !! =================================================================== if(jdat(3).ne.n1sv) then ! a new day is produced from n2sv=1440 @@ -314,7 +331,7 @@ SUBROUTINE aerinterpol_dl( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx write(mn,'(i2.2)') jdat(2) write(dy,'(i2.2)') jdat(3) fname_dl="merra2_"//myr//mn//dy//".nc" - call read_netfaer_dl(fname_dl,n2sv, iflip, 2, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl,n2sv, iflip, 2, errmsg, errflg) else if (rjday >= t2sv) then if(t2sv < aer_t(tsaer)) then n1sv=jdat(3) @@ -325,14 +342,14 @@ SUBROUTINE aerinterpol_dl( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx write(mn,'(i2.2)') jdat(2) write(dy,'(i2.2)') jdat(3) fname_dl="merra2_"//myr//mn//dy//".nc" - call read_netfaer_dl(fname_dl,n2sv, iflip, 2, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl,n2sv, iflip, 2, errmsg, errflg) else !! need to read a new file n1sv=jdat(3) t1sv=aer_t(tsaer) n2sv=1 t2sv=1440. call fdnx_fname (jdat(1), jdat(2),jdat(3),fname_dl) - call read_netfaer_dl(fname_dl, n2sv, iflip, 2, errmsg, errflg) + call read_netfaer_dl(mpicomm, mpirank, mpiroot, fname_dl, n2sv, iflip, 2, errmsg, errflg) end if end if ! @@ -422,13 +439,15 @@ SUBROUTINE aerinterpol_dl( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx RETURN END SUBROUTINE aerinterpol_dl - SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) - use machine, only: kind_phys, kind_io4 + SUBROUTINE read_aerdata (mpicomm, mpirank, mpiroot, iflip, idate, errmsg, errflg) + use machine, only: kind_phys + use mpiutil, only: ccpp_bcast use aerclm_def use netcdf !--- in/out - integer, intent(in) :: me, master, iflip, idate(4) + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, iflip, idate(4) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg @@ -437,6 +456,7 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) integer :: i, j, k, n, ii, imon, klev character :: fname*50, myr*4, mn*2, dy*2,vname*10 logical :: file_exist + integer :: ierr integer :: dimids(NF90_MAX_VAR_DIMS) integer :: dimlen(NF90_MAX_VAR_DIMS) @@ -445,13 +465,12 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) ! !! =================================================================== - if (me == master) then + read_and_broadcast_1: if (mpirank==mpiroot) then if ( iflip == 0 ) then ! data from toa to sfc print *, "GFS is top-down" else print *, "GFS is bottom-up" endif - endif ! !! =================================================================== !! check if one file exist @@ -500,9 +519,12 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) latsaer = dimlen(2) levsw = dimlen(3) - if(me==master) then - print *, 'MERRA2 dim: ',dimlen(1:ndims) - endif + print *, 'MERRA2 dim: ',dimlen(1:ndims) + endif read_and_broadcast_1 + + call ccpp_bcast(lonsaer, mpiroot, mpicomm, ierr) + call ccpp_bcast(latsaer, mpiroot, mpicomm, ierr) + call ccpp_bcast(levsw, mpiroot, mpicomm, ierr) ! allocate arrays @@ -512,6 +534,7 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) endif ! construct lat/lon array + read_and_broadcast_2: if (mpirank==mpiroot) then varid = -1 if(.not.netcdf_check(nf90_inq_varid(ncid, 'lat', varid), & errmsg, errflg, 'find id of lat var')) then @@ -535,15 +558,20 @@ SUBROUTINE read_aerdata (me, master, iflip, idate, errmsg, errflg) if(.not.netcdf_check(nf90_close(ncid), errmsg, errflg, 'close '//trim(fname))) then return endif + endif read_and_broadcast_2 + + call ccpp_bcast(aer_lat, mpiroot, mpicomm, ierr) + call ccpp_bcast(aer_lon, mpiroot, mpicomm, ierr) END SUBROUTINE read_aerdata ! !********************************************************************** - SUBROUTINE read_aerdataf ( me, master, iflip, idate, FHOUR, errmsg, errflg) + SUBROUTINE read_aerdataf (mpicomm, mpirank, mpiroot, iflip, idate, FHOUR, errmsg, errflg) use machine, only: kind_phys, kind_dbl_prec use aerclm_def !--- in/out - integer, intent(in) :: me, master, iflip, idate(4) + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot, iflip, idate(4) character(len=*), intent(inout) :: errmsg integer, intent(inout) :: errflg real(kind=kind_phys), intent(in) :: fhour @@ -590,9 +618,9 @@ SUBROUTINE read_aerdataf ( me, master, iflip, idate, FHOUR, errmsg, errflg) n1 = n2 - 1 if (n2 > 12) n2 = n2 -12 !! =================================================================== - call read_netfaer(n1, iflip, 1, errmsg, errflg) + call read_netfaer(mpicomm, mpirank, mpiroot, n1, iflip, 1, errmsg, errflg) if(errflg/=0) return - call read_netfaer(n2, iflip, 2, errmsg, errflg) + call read_netfaer(mpicomm, mpirank, mpiroot, n2, iflip, 2, errmsg, errflg) if(errflg/=0) return !! =================================================================== n1sv=n1 @@ -601,7 +629,7 @@ SUBROUTINE read_aerdataf ( me, master, iflip, idate, FHOUR, errmsg, errflg) END SUBROUTINE read_aerdataf ! SUBROUTINE setindxaer(npts,dlat,jindx1,jindx2,ddy,dlon, & - iindx1,iindx2,ddx,me,master) + iindx1,iindx2,ddx) ! USE MACHINE, ONLY: kind_phys use aerclm_def, only: aer_lat, jaero=>latsaer, & @@ -609,7 +637,6 @@ SUBROUTINE setindxaer(npts,dlat,jindx1,jindx2,ddy,dlon, & ! implicit none ! - integer me, master integer npts, JINDX1(npts),JINDX2(npts),IINDX1(npts),IINDX2(npts) real(kind=kind_phys) dlat(npts),DDY(npts),dlon(npts),DDX(npts) ! @@ -658,7 +685,8 @@ END SUBROUTINE setindxaer !********************************************************************** !********************************************************************** ! - SUBROUTINE aerinterpol( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx2, & + SUBROUTINE aerinterpol(mpicomm,mpirank,mpiroot,nthrds,npts, & + IDATE,FHOUR,iflip, jindx1,jindx2, & ddy,iindx1,iindx2,ddx,lev,prsl,aerout, errmsg,errflg) ! use machine, only: kind_phys, kind_dbl_prec @@ -675,7 +703,9 @@ SUBROUTINE aerinterpol( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx2, ! integer JINDX1(npts), JINDX2(npts), iINDX1(npts), iINDX2(npts) - integer me,idate(4), master, nthrds + type(MPI_Comm), intent(in) :: mpicomm + integer mpirank, mpiroot + integer idate(4), nthrds integer IDAT(8),JDAT(8) ! real(kind=kind_phys) DDY(npts), ddx(npts),ttt @@ -716,12 +746,12 @@ SUBROUTINE aerinterpol( me,master,nthrds,npts,IDATE,FHOUR,iflip, jindx1,jindx2, ! need to read a new month if (n1.ne.n1sv) then #ifdef DEBUG - if (me == master) write(*,*)"read in a new month MERRA2", n2 + if (mpirank==mpiroot) write(*,*)"read in a new month MERRA2", n2 #endif !! =================================================================== - call read_netfaer(n1, iflip, 1, errmsg, errflg) + call read_netfaer(mpicomm, mpirank, mpiroot, n1, iflip, 1, errmsg, errflg) if(errflg/=0) return - call read_netfaer(n2, iflip, 2, errmsg, errflg) + call read_netfaer(mpicomm, mpirank, mpiroot, n2, iflip, 2, errmsg, errflg) if(errflg/=0) return !! =================================================================== n1sv=n1 @@ -853,11 +883,13 @@ subroutine fdnx_fname(lyear, lmn, ldy, fname) RETURN END SUBROUTINE fdnx_fname -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - subroutine read_netfaer_dl(fname, nf, iflip,nt, errmsg,errflg) + subroutine read_netfaer_dl(mpicomm, mpirank, mpiroot, fname, nf, iflip, nt, errmsg, errflg) use machine, only: kind_phys, kind_io4 + use mpiutil, only: ccpp_bcast use aerclm_def use netcdf + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot integer, intent(in) :: iflip, nf, nt character,intent(in) :: fname*50 integer, intent(out) :: errflg @@ -868,6 +900,7 @@ subroutine read_netfaer_dl(fname, nf, iflip,nt, errmsg,errflg) real(kind=kind_io4),allocatable,dimension(:,:,:,:):: buffx real(kind=kind_io4),allocatable,dimension(:,:) :: pres_tmp integer lstart(4), lcount(4) + integer ierr !! =================================================================== allocate (buff(lonsaer, latsaer, levsw)) @@ -958,14 +991,19 @@ subroutine read_netfaer_dl(fname, nf, iflip,nt, errmsg,errflg) if(.not.netcdf_check(nf90_close(ncid), errmsg, errflg, 'close '//trim(fname))) then return endif + deallocate (buff, pres_tmp) deallocate (buffx) + END SUBROUTINE read_netfaer_dl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - subroutine read_netfaer(nf, iflip,nt, errmsg,errflg) + subroutine read_netfaer(mpicomm, mpirank, mpiroot, nf, iflip, nt, errmsg, errflg) use machine, only: kind_phys, kind_io4 + use mpiutil, only: ccpp_bcast use aerclm_def use netcdf + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot integer, intent(in) :: iflip, nf, nt integer, intent(out) :: errflg character(*), intent(out) :: errmsg @@ -974,6 +1012,7 @@ subroutine read_netfaer(nf, iflip,nt, errmsg,errflg) real(kind=kind_io4),allocatable,dimension(:,:,:) :: buff real(kind=kind_io4),allocatable,dimension(:,:,:,:):: buffx real(kind=kind_io4),allocatable,dimension(:,:) :: pres_tmp + integer :: ierr !! =================================================================== allocate (buff(lonsaer, latsaer, levsw)) @@ -1067,6 +1106,7 @@ subroutine read_netfaer(nf, iflip,nt, errmsg,errflg) endif deallocate (buff, pres_tmp) deallocate (buffx) + END SUBROUTINE read_netfaer end module aerinterp diff --git a/physics/MP/TEMPO/mp_tempo.meta b/physics/MP/TEMPO/mp_tempo.meta index 0bac3e856..b677c0645 100644 --- a/physics/MP/TEMPO/mp_tempo.meta +++ b/physics/MP/TEMPO/mp_tempo.meta @@ -91,7 +91,7 @@ kind = kind_phys intent = in [con_avgd] - standard_name = avogadro_consant + standard_name = avogadro_constant long_name = Avogadro constant units = mol-1 dimensions = () diff --git a/physics/MP/Thompson/mp_thompson.meta b/physics/MP/Thompson/mp_thompson.meta index b8ff37bd4..f1d2a45f5 100644 --- a/physics/MP/Thompson/mp_thompson.meta +++ b/physics/MP/Thompson/mp_thompson.meta @@ -88,7 +88,7 @@ kind = kind_phys intent = in [con_avgd] - standard_name = avogadro_consant + standard_name = avogadro_constant long_name = Avogadro constant units = mol-1 dimensions = () diff --git a/physics/Radiation/radiation_aerosols.f b/physics/Radiation/radiation_aerosols.f index ce5054c99..7448a1933 100644 --- a/physics/Radiation/radiation_aerosols.f +++ b/physics/Radiation/radiation_aerosols.f @@ -126,6 +126,8 @@ !! radiation computations. module module_radiation_aerosols ! + use mpi_f08 + use mpiutil, only: ccpp_bcast use machine, only : kind_phys, kind_io4, kind_io8 use module_iounitdef, only : NIAERCM use module_radsw_parameters, only : NBDSW, wvnsw1=>wvnum1, & @@ -493,7 +495,8 @@ module module_radiation_aerosols !>\section gen_al General Algorithm !----------------------------------- subroutine aer_init & - & ( NLAY, me, iaermdl, iaerflg, lalw1bd, aeros_file, con_pi, & + & ( NLAY, mpicomm, mpirank, mpiroot, & + & iaermdl, iaerflg, lalw1bd, aeros_file, con_pi, & & con_t0c, con_c, con_boltz, con_plnk, errflg, errmsg) ! ================================================================== ! @@ -538,7 +541,9 @@ subroutine aer_init & ! ================================================================== ! ! --- inputs: - integer, intent(in) :: NLAY, me, iaermdl, iaerflg + integer, intent(in) :: NLAY, mpirank, mpiroot + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: iaermdl, iaerflg logical, intent(in) :: lalw1bd character(len=26),intent(in) :: aeros_file real(kind_phys), intent(in) :: con_pi,con_t0c, con_c, con_boltz, & @@ -569,7 +574,7 @@ subroutine aer_init & !> -# Call wrt_aerlog to write aerosol parameter configuration to output logs. - if ( me == 0 ) then + if ( mpirank == mpiroot ) then call wrt_aerlog(iaermdl, iaerflg, lalw1bd, errflg, errmsg) ! write aerosol param info to log file ! --- inputs: (in scope variables) @@ -635,7 +640,7 @@ subroutine aer_init & if ( iaermdl==0 .or. iaermdl==5 ) then ! opac-climatology scheme call clim_aerinit & ! --- inputs: - & ( solfwv, eirfwv, me, aeros_file, & + & ( solfwv, eirfwv, mpicomm, mpirank, mpiroot, aeros_file, & ! --- outputs: & errflg, errmsg) if(errflg/=0) return @@ -644,13 +649,13 @@ subroutine aer_init & call gocart_aerinit & ! --- inputs: - & ( solfwv, eirfwv, me, & + & ( solfwv, eirfwv, mpirank, & ! --- outputs: & errflg, errmsg) if(errflg/=0) return else - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' !!! ERROR in aerosol model scheme selection', & & ' iaermdl =',iaermdl errflg = 1 @@ -959,7 +964,7 @@ end subroutine aer_init !! !!\section gen_clim_aerinit General Algorithm subroutine clim_aerinit & - & ( solfwv, eirfwv, me, aeros_file, & ! --- inputs + & ( solfwv, eirfwv, mpicomm, mpirank, mpiroot, aeros_file, & ! --- inputs & errflg, errmsg) ! --- outputs ! ================================================================== ! @@ -1002,7 +1007,8 @@ subroutine clim_aerinit & ! --- inputs: real (kind=kind_phys), dimension(:) :: solfwv ! one wvn sol flux real (kind=kind_phys), dimension(:) :: eirfwv ! one wvn ir flux - integer, intent(in) :: me + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot character(len=26), intent(in) :: aeros_file ! --- output: (CCPP error handling) integer, intent(out) :: errflg @@ -1032,7 +1038,8 @@ subroutine clim_aerinit & ! --- ... invoke tropospheric aerosol initialization !> - call set_aercoef() to invoke tropospheric aerosol initialization. - call set_aercoef(aeros_file, errflg, errmsg) + call set_aercoef(mpicomm, mpirank, mpiroot, & + & aeros_file, errflg, errmsg) ! --- inputs: (in-scope variables, module constants) ! --- outputs: (module variables) @@ -1046,7 +1053,8 @@ subroutine clim_aerinit & !! corresponding SW radiation spectral bands. !!\section det_set_aercoef General Algorithm !-------------------------------- - subroutine set_aercoef(aeros_file,errflg, errmsg) + subroutine set_aercoef(mpicomm, mpirank, mpiroot, & + & aeros_file,errflg, errmsg) !................................ ! --- inputs: (in-scope variables, module constants) ! --- outputs: (CCPP error handling) @@ -1125,7 +1133,8 @@ subroutine set_aercoef(aeros_file,errflg, errmsg) ! ! ! ================================================================== ! ! -! --- inputs: ( none ) + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot character(len=26),intent(in) :: aeros_file ! --- output: (CCPP error handling) integer, intent(out) :: errflg @@ -1140,6 +1149,7 @@ subroutine set_aercoef(aeros_file,errflg, errmsg) logical :: file_exist character :: cline*80 + integer :: ierr ! !===> ... begin here ! @@ -1151,32 +1161,37 @@ subroutine set_aercoef(aeros_file,errflg, errmsg) !> -# Reading climatological aerosols optical data from aeros_file, !! including: - inquire (file=aeros_file, exist=file_exist) + if (mpirank==mpiroot) then + inquire (file=aeros_file, exist=file_exist) - if ( file_exist ) then - close (NIAERCM) - open (unit=NIAERCM,file=aeros_file,status='OLD', & - & action='read',form='FORMATTED') - rewind (NIAERCM) - else - errflg = 1 - errmsg = 'ERROR(set_aercoef): Requested aerosol data file '// & - & aeros_file//' not found' - return - endif ! end if_file_exist_block + if ( file_exist ) then + close (NIAERCM) + open (unit=NIAERCM,file=aeros_file,status='OLD', & + & action='read',form='FORMATTED') + rewind (NIAERCM) + else + print *,' Requested aerosol data file "',aeros_file, & + & '" not found!' + print *,' *** Stopped in subroutine aero_init !!' + errflg = 1 + errmsg = 'ERROR(set_aercoef): Requested aerosol data file '// & + & aeros_file//' not found' + return + endif ! end if_file_exist_block ! --- ... skip monthly global distribution - do m = 1, 12 - read (NIAERCM,12) cline - 12 format(a80/) - - do j = 1, JMXAE - do i = 1, IMXAE - read(NIAERCM,*) id + do m = 1, 12 + read (NIAERCM,12) cline + 12 format(a80/) + + do j = 1, JMXAE + do i = 1, IMXAE + read(NIAERCM,*) id + enddo enddo - enddo - enddo ! end do_m_block + enddo ! end do_m_block + endif ! --- ... aloocate and input aerosol optical data @@ -1201,60 +1216,76 @@ subroutine set_aercoef(aeros_file,errflg, errmsg) extstra = f_zero endif + if (mpirank==mpiroot) then !> - ending wave num for 61 aerosol spectral bands - read(NIAERCM,21) cline - 21 format(a80) - read(NIAERCM,22) iendwv(:) - 22 format(13i6) + read(NIAERCM,21) cline + 21 format(a80) + read(NIAERCM,22) iendwv(:) + 22 format(13i6) !> - atmos scale height for 5 domains, 7 profs - read(NIAERCM,21) cline - read(NIAERCM,24) haer(:,:) - 24 format(20f4.1) + read(NIAERCM,21) cline + read(NIAERCM,24) haer(:,:) + 24 format(20f4.1) !> - reference pressure for 5 domains, 7 profs - read(NIAERCM,21) cline - read(NIAERCM,26) prsref(:,:) - 26 format(10f7.2) + read(NIAERCM,21) cline + read(NIAERCM,26) prsref(:,:) + 26 format(10f7.2) !> - rh independent ext coef for 61 bands, 6 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhidext0(:,:) - 28 format(8e10.3) + read(NIAERCM,21) cline + read(NIAERCM,28) rhidext0(:,:) + 28 format(8e10.3) !> - rh independent sca coef for 61 bands, 6 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhidsca0(:,:) + read(NIAERCM,21) cline + read(NIAERCM,28) rhidsca0(:,:) !> - rh independent ssa coef for 61 bands, 6 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhidssa0(:,:) + read(NIAERCM,21) cline + read(NIAERCM,28) rhidssa0(:,:) !> - rh independent asy coef for 61 bands, 6 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhidasy0(:,:) + read(NIAERCM,21) cline + read(NIAERCM,28) rhidasy0(:,:) !> - rh dependent ext coef for 61 bands, 8 rh lev, 4 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhdpext0(:,:,:) + read(NIAERCM,21) cline + read(NIAERCM,28) rhdpext0(:,:,:) !> - rh dependent sca coef for 61 bands, 8 rh lev, 4 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhdpsca0(:,:,:) + read(NIAERCM,21) cline + read(NIAERCM,28) rhdpsca0(:,:,:) !> - rh dependent ssa coef for 61 bands, 8 rh lev, 4 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhdpssa0(:,:,:) + read(NIAERCM,21) cline + read(NIAERCM,28) rhdpssa0(:,:,:) !> - rh dependent asy coef for 61 bands, 8 rh lev, 4 species - read(NIAERCM,21) cline - read(NIAERCM,28) rhdpasy0(:,:,:) + read(NIAERCM,21) cline + read(NIAERCM,28) rhdpasy0(:,:,:) !> - stratospheric background aeros for 61 bands - read(NIAERCM,21) cline - read(NIAERCM,28) straext0(:) + read(NIAERCM,21) cline + read(NIAERCM,28) straext0(:) - close (NIAERCM) + close (NIAERCM) + endif + + ! Broadcast data + call ccpp_bcast(iendwv, mpiroot, mpicomm, ierr) + call ccpp_bcast(haer, mpiroot, mpicomm, ierr) + call ccpp_bcast(prsref, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhidext0, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhidsca0, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhidssa0, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhidasy0, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhdpext0, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhdpsca0, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhdpssa0, mpiroot, mpicomm, ierr) + call ccpp_bcast(rhdpasy0, mpiroot, mpicomm, ierr) + call ccpp_bcast(straext0, mpiroot, mpicomm, ierr) !> -# Convert pressure reference level (in mb) to sigma reference level !! assume an 1000mb reference surface pressure. @@ -1773,7 +1804,8 @@ end subroutine clim_aerinit !>\section gen_aer_upd General Algorithm !----------------------------------- subroutine aer_update & - & ( iyear, imon, me, iaermdl, aeros_file, errflg, errmsg ) + & ( iyear, imon, mpicomm, mpirank, mpiroot, & + & iaermdl, aeros_file, errflg, errmsg ) ! ================================================================== ! ! ! @@ -1803,7 +1835,9 @@ subroutine aer_update & ! ================================================================== ! ! --- inputs: - integer, intent(in) :: iyear, imon, me, iaermdl + integer, intent(in) :: iyear, imon, mpirank, mpiroot + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: iaermdl character(len=26),intent(in) :: aeros_file ! --- output: (CCPP error-handling) integer, intent(out) :: errflg @@ -1829,15 +1863,16 @@ subroutine aer_update & if ( lalwflg .or. laswflg ) then if ( iaermdl == 0 .or. iaermdl==5 ) then ! opac-climatology scheme - call trop_update(aeros_file, errflg, errmsg) - if(errflg/=0) return + call trop_update(mpicomm, mpirank, mpiroot, aeros_file, & + & errflg, errmsg) + if(errflg/=0) return endif endif !> -# Call volc_update() to update yearly stratospheric volcanic aerosol data. if ( lavoflg ) then - call volc_update(errflg, errmsg) + call volc_update(mpicomm, mpirank, mpiroot, errflg, errmsg) endif @@ -1848,7 +1883,8 @@ subroutine aer_update & !> This subroutine updates the monthly global distribution of aerosol !! profiles in five degree horizontal resolution. !-------------------------------- - subroutine trop_update(aeros_file, errflg, errmsg) + subroutine trop_update(mpicomm, mpirank, mpiroot, aeros_file, & + & errflg, errmsg) ! ================================================================== ! ! ! @@ -1885,6 +1921,8 @@ subroutine trop_update(aeros_file, errflg, errmsg) ! ! ! ================================================================== ! + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot ! --- inputs: (CCPP Interstitials) character(len=26),intent(in) :: aeros_file ! --- output: (CCPP error handling) @@ -1900,6 +1938,7 @@ subroutine trop_update(aeros_file, errflg, errmsg) logical :: file_exist character :: cline*80, ctyp*3 + integer :: ierr ! !===> ... begin here ! @@ -1910,23 +1949,26 @@ subroutine trop_update(aeros_file, errflg, errmsg) ! --- ... reading climatological aerosols data - inquire (file=aeros_file, exist=file_exist) - - if ( file_exist ) then - close(NIAERCM) - open (unit=NIAERCM,file=aeros_file,status='OLD', & + if ( mpirank==mpiroot ) then + inquire (file=aeros_file, exist=file_exist) + + if ( file_exist ) then + close(NIAERCM) + open (unit=NIAERCM,file=aeros_file,status='OLD', & & action='read',form='FORMATTED') - rewind (NIAERCM) + rewind (NIAERCM) - if ( me == 0 ) then print *,' Opened aerosol data file: ',aeros_file - endif - else - errflg = 1 - errmsg = 'ERROR(trop_update):Requested aerosol data file '// & - & aeros_file // ' not found.' - return - endif ! end if_file_exist_block + else + print *,' Requested aerosol data file "',aeros_file, & + & '" not found!' + print *,' *** Stopped in subroutine trop_update !!' + errflg = 1 + errmsg = 'ERROR(trop_update):Requested aerosol data file '// & + & aeros_file // ' not found.' + return + endif ! end if_file_exist_block + endif !$omp parallel do private(i,j,m) do j = 1, JMXAE @@ -1946,54 +1988,61 @@ subroutine trop_update(aeros_file, errflg, errmsg) enddo enddo + read_and_broadcast: if (mpirank==mpiroot) then ! --- ... loop over 12 month global distribution - Lab_do_12mon : do m = 1, 12 + Lab_do_12mon : do m = 1, 12 - read(NIAERCM,12) cline - 12 format(a80/) + read(NIAERCM,12) cline + 12 format(a80/) - if ( m /= imon ) then -! if ( me == 0 ) print *,' *** Skipped ',cline + if ( m /= imon ) then +! if ( me == 0 ) print *,' *** Skipped ',cline - do j = 1, JMXAE - do i = 1, IMXAE - read(NIAERCM,*) id + do j = 1, JMXAE + do i = 1, IMXAE + read(NIAERCM,*) id + enddo enddo - enddo - else - if ( me == 0 ) print *,' --- Reading ',cline - - do j = 1, JMXAE - do i = 1, IMXAE - read(NIAERCM,14) (idxc(k),cmix(k),k=1,NXC),kprf,denn,nc, & - & ctyp - 14 format(5(i2,e11.4),i2,f8.2,i3,1x,a3) - - kprfg(i,j) = kprf - denng(1,i,j) = denn ! num density of 1st layer - if ( kprf >= 6 ) then - denng(2,i,j) = cmix(NXC) ! num density of 2dn layer - else - denng(2,i,j) = f_zero - endif + else + if ( mpirank==mpiroot ) print *,' --- Reading ',cline + + do j = 1, JMXAE + do i = 1, IMXAE + read(NIAERCM,14) (idxc(k),cmix(k),k=1,NXC),kprf,denn,nc,& + & ctyp + 14 format(5(i2,e11.4),i2,f8.2,i3,1x,a3) + + kprfg(i,j) = kprf + denng(1,i,j) = denn ! num density of 1st layer + if ( kprf >= 6 ) then + denng(2,i,j) = cmix(NXC) ! num density of 2dn layer + else + denng(2,i,j) = f_zero + endif - tem = f_one - do k = 1, NXC-1 - idxcg(k,i,j) = idxc(k) ! component index - cmixg(k,i,j) = cmix(k) ! component mixing ratio - tem = tem - cmix(k) + tem = f_one + do k = 1, NXC-1 + idxcg(k,i,j) = idxc(k) ! component index + cmixg(k,i,j) = cmix(k) ! component mixing ratio + tem = tem - cmix(k) + enddo + idxcg(NXC,i,j) = idxc(NXC) + cmixg(NXC,i,j) = tem ! to make sure all add to 1. enddo - idxcg(NXC,i,j) = idxc(NXC) - cmixg(NXC,i,j) = tem ! to make sure all add to 1. enddo - enddo - close (NIAERCM) - exit Lab_do_12mon - endif ! end if_m_block + close (NIAERCM) + exit Lab_do_12mon + endif ! end if_m_block + + enddo Lab_do_12mon + endif read_and_broadcast - enddo Lab_do_12mon + call ccpp_bcast(kprfg, mpiroot, mpicomm, ierr) + call ccpp_bcast(denng, mpiroot, mpicomm, ierr) + call ccpp_bcast(idxcg, mpiroot, mpicomm, ierr) + call ccpp_bcast(cmixg, mpiroot, mpicomm, ierr) ! -- check print @@ -2016,7 +2065,7 @@ end subroutine trop_update !> This subroutine searches historical volcanic data sets to find and !! read in monthly 45-degree lat-zone band of optical depth. !-------------------------------- - subroutine volc_update(errflg, errmsg) + subroutine volc_update(mpicomm, mpirank, mpiroot, errflg, errmsg) !................................ ! --- inputs: (in scope variables, module variables) ! --- outputs: (CCPP error handling) @@ -2055,6 +2104,8 @@ subroutine volc_update(errflg, errmsg) ! --- inputs: (in-scope variables, module constants) ! integer :: iyear, imon, me, NIAERCM + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot ! --- output: (module variables) ! integer :: ivolae(:,:,:), kyrstr, kyrend, kyrsav, kmonsav @@ -2068,6 +2119,7 @@ subroutine volc_update(errflg, errmsg) character :: cline*80, volcano_file*32 data volcano_file / 'volcanic_aerosols_1850-1859.txt ' / + integer :: ierr ! !===> ... begin here ! @@ -2095,49 +2147,54 @@ subroutine volc_update(errflg, errmsg) ! allocate ( ivolae(12,4,10) ) ! for 12-mon,4-lat_zone,10-year ! endif ivolae(:,:,:) = 1 ! set as lowest value - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,' Request volcanic date out of range,', & & ' optical depth set to lowest value' endif else write(volcano_file(19:27),60) kyrstr,kyrend 60 format(i4.4,'-',i4.4) + read_and_broadcast: if (mpirank==mpiroot) then + inquire (file=volcano_file, exist=file_exist) + if ( file_exist ) then + close(NIAERCM) + open (unit=NIAERCM,file=volcano_file,status='OLD', & + & action='read',form='FORMATTED') - inquire (file=volcano_file, exist=file_exist) - if ( file_exist ) then - close(NIAERCM) - open (unit=NIAERCM,file=volcano_file,status='OLD', & - & action='read',form='FORMATTED') - - read(NIAERCM,62) cline - 62 format(a80) + read(NIAERCM,62) cline + 62 format(a80) ! --- check print - if ( me == 0 ) then print *,' Opened volcanic data file: ',volcano_file print *, cline - endif - do k = 1, 10 - do j = 1, 4 - read(NIAERCM,64) (ivolae(i,j,k),i=1,12) - 64 format(12i5) + do k = 1, 10 + do j = 1, 4 + read(NIAERCM,64) (ivolae(i,j,k),i=1,12) + 64 format(12i5) + enddo enddo - enddo - - close (NIAERCM) - else - errflg = 1 - errmsg = 'ERROR(volc_update): Requested volcanic data '// & - & 'file '//volcano_file//' not found!' - return - endif ! end if_file_exist_block + close (NIAERCM) + else + print *,' Requested volcanic data file "', & + & volcano_file,'" not found!' + print *,' *** Stopped in subroutine VOLC_AERINIT !!' + errflg = 1 + errmsg = 'ERROR(volc_update): Requested volcanic data '// & + & 'file '//volcano_file//' not found!' + return + endif ! end if_file_exist_block + endif read_and_broadcast + ! Prevent warnings for potentially unused variables + file_exist = .true. + cline = '' + call ccpp_bcast(ivolae, mpiroot, mpicomm, ierr) endif ! end if_iyear_block endif ! end if_kyrstr_block ! --- check print - if ( me == 0 ) then + if ( mpirank==mpiroot ) then k = mod(kyrsav,10) + 1 print *,' CHECK: Sample Volcanic data used for month, year:', & & imon, iyear @@ -3592,6 +3649,10 @@ subroutine gocart_aerinit & ! ! --- ... invoke gocart aerosol initialization + ! DH* This will need to be implemented by a host model + ! that actually uses this data + print *, 'NOTE: gocart aerosol initialization is reading input ', & + & 'data with all MPI ranks' if (KCM /= ntrcaerm ) then print *, 'ERROR in # of gocart aer species',KCM diff --git a/physics/Radiation/radiation_astronomy.f b/physics/Radiation/radiation_astronomy.f index 90ed7cd45..73b775898 100644 --- a/physics/Radiation/radiation_astronomy.f +++ b/physics/Radiation/radiation_astronomy.f @@ -88,6 +88,8 @@ !> This module sets up astronomy quantities for solar radiation calculations. module module_radiation_astronomy ! + use mpi_f08 + use mpiutil, only : ccpp_bcast use machine, only : kind_phys use module_iounitdef, only : NIRADSF ! @@ -145,7 +147,8 @@ module module_radiation_astronomy !!\param me print message control flag !>\section sol_init_gen sol_init General Algorithm subroutine sol_init & - & ( me, isolar, solar_file, con_solr, con_solr_old, con_pi ) ! --- inputs + & ( mpicomm, mpirank, mpiroot, & + & isolar, solar_file, con_solr, con_solr_old, con_pi ) ! --- inputs ! --- outputs: ( none ) ! =================================================================== ! @@ -180,18 +183,21 @@ subroutine sol_init & implicit none ! --- input: - integer, intent(in) :: me, isolar + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer, intent(in) :: isolar character(len=26), intent(in) :: solar_file real(kind=kind_phys), intent(in) :: con_solr, con_solr_old, con_pi ! --- output: ( none ) ! --- local: logical :: file_exist + integer :: ierr integer :: imonth ! !===> ... begin here ! - if ( me == 0 ) print *, VTAGAST !print out version tag + if (mpirank==mpiroot) print *, VTAGAST !print out version tag degrad = 180.0/con_pi tpi = 2.0 * con_pi @@ -210,26 +216,29 @@ subroutine sol_init & if ( isolar == 0 ) then solc0 = con_solr_old - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' - Using old fixed solar constant =', solc0 endif elseif ( isolar == 10 ) then - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' - Using new fixed solar constant =', solc0 endif elseif ( isolar == 1 ) then ! noaa ann-mean tsi in absolute scale solar_fname(15:26) = 'noaa_a0.txt' - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' - Using NOAA annual mean TSI table in ABS scale', & & ' with cycle approximation (old values)!' endif - inquire (file=solar_fname, exist=file_exist) + if ( mpirank == mpiroot ) then + inquire (file=solar_fname, exist=file_exist) + endif + call ccpp_bcast(file_exist, mpiroot, mpicomm, ierr) if ( .not. file_exist ) then isolflg = 10 - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' Requested solar data file "',solar_fname, & & '" not found!' print *,' Using the default solar constant value =',solc0,& @@ -239,16 +248,19 @@ subroutine sol_init & elseif ( isolar == 2 ) then ! noaa ann-mean tsi in tim scale solar_fname(15:26) = 'noaa_an.txt' - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' - Using NOAA annual mean TSI table in TIM scale', & & ' with cycle approximation (new values)!' endif - inquire (file=solar_fname, exist=file_exist) + if ( mpirank == mpiroot ) then + inquire (file=solar_fname, exist=file_exist) + endif + call ccpp_bcast(file_exist, mpiroot, mpicomm, ierr) if ( .not. file_exist ) then isolflg = 10 - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' Requested solar data file "',solar_fname, & & '" not found!' print *,' Using the default solar constant value =',solc0,& @@ -258,16 +270,19 @@ subroutine sol_init & elseif ( isolar == 3 ) then ! cmip5 ann-mean tsi in tim scale solar_fname(15:26) = 'cmip_an.txt' - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' - Using CMIP5 annual mean TSI table in TIM scale', & & ' with cycle approximation' endif - inquire (file=solar_fname, exist=file_exist) + if ( mpirank == mpiroot ) then + inquire (file=solar_fname, exist=file_exist) + endif + call ccpp_bcast(file_exist, mpiroot, mpicomm, ierr) if ( .not. file_exist ) then isolflg = 10 - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' Requested solar data file "',solar_fname, & & '" not found!' print *,' Using the default solar constant value =',solc0,& @@ -277,16 +292,19 @@ subroutine sol_init & elseif ( isolar == 4 ) then ! cmip5 mon-mean tsi in tim scale solar_fname(15:26) = 'cmip_mn.txt' - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' - Using CMIP5 monthly mean TSI table in TIM scale', & & ' with cycle approximation' endif - inquire (file=solar_fname, exist=file_exist) + if ( mpirank == mpiroot ) then + inquire (file=solar_fname, exist=file_exist) + endif + call ccpp_bcast(file_exist, mpiroot, mpicomm, ierr) if ( .not. file_exist ) then isolflg = 10 - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' Requested solar data file "',solar_fname, & & '" not found!' print *,' Using the default solar constant value =',solc0,& @@ -296,7 +314,7 @@ subroutine sol_init & else ! selection error isolflg = 10 - if ( me == 0 ) then + if (mpirank==mpiroot) then print *,' - !!! ERROR in selection of solar constant data', & & ' source, ISOL =',isolar print *,' Using the default solar constant value =',solc0, & @@ -325,7 +343,8 @@ end subroutine sol_init !>\section gen_sol_update sol_update General Algorithm !----------------------------------- subroutine sol_update & - & ( jdate,kyear,deltsw,deltim,lsol_chg, me, & ! --- inputs + & ( jdate,kyear,deltsw,deltim,lsol_chg, & ! --- inputs + & mpicomm,mpirank,mpiroot, & ! --- inputs & slag, sdec, cdec, solcon, con_pi, errmsg, errflg & ! --- outputs & ) @@ -380,7 +399,9 @@ subroutine sol_update & implicit none ! --- input: - integer, intent(in) :: jdate(:), kyear, me + integer, intent(in) :: jdate(:), kyear + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot logical, intent(in) :: lsol_chg real (kind=kind_phys), intent(in) :: deltsw, deltim, con_pi @@ -404,6 +425,7 @@ subroutine sol_update & logical :: file_exist character :: cline*60 + integer :: ierr ! !===> ... begin here ! @@ -427,17 +449,18 @@ subroutine sol_update & endif else ! need to read in new data iyr_sav = iyear - + iyr = iyear + if (mpirank == mpiroot) then ! --- ... check to see if the solar constant data file existed + inquire (file=solar_fname, exist=file_exist) + if ( .not. file_exist ) then + print *,' !!! ERROR! Can not find solar constant file!!!' + errflg = 1 + errmsg = "ERROR(radiation_astronomy): solar constant file"& + & // " not found" + return - inquire (file=solar_fname, exist=file_exist) - if ( .not. file_exist ) then - errflg = 1 - errmsg = "ERROR(radiation_astronomy): solar constant file"//& - & " not found" - return - else - iyr = iyear + endif close(NIRADSF) open (NIRADSF,file=solar_fname,form='formatted', & @@ -447,12 +470,21 @@ subroutine sol_update & read (NIRADSF, * ) iyr1,iyr2,icy1,icy2,smean,cline(1:60) ! read (NIRADSF, 24) iyr1,iyr2,icy1,icy2,smean,cline ! 24 format(4i5,f8.2,a60) + + print *,' Updating solar constant with cycle approx' + print *,' Opened solar constant data file: ',solar_fname +!check print *, iyr1, iyr2, icy1, icy2, smean, cline + endif - if ( me == 0 ) then - print *,' Updating solar constant with cycle approx' - print *,' Opened solar constant data file: ',solar_fname -!check print *, iyr1, iyr2, icy1, icy2, smean, cline - endif + ! Prevent warnings for potentially uninitialized data + file_exist = .true. + cline = '' + + call ccpp_bcast(iyr1, mpiroot, mpicomm, ierr) + call ccpp_bcast(iyr2, mpiroot, mpicomm, ierr) + call ccpp_bcast(icy1, mpiroot, mpicomm, ierr) + call ccpp_bcast(icy2, mpiroot, mpicomm, ierr) + call ccpp_bcast(smean, mpiroot, mpicomm, ierr) ! --- ... check if there is a upper year limit put on the data table @@ -495,7 +527,7 @@ subroutine sol_update & iyr = iyr + icy enddo Lab_dowhile1 - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' *** Year',iyear,' out of table range!', & & iyr1, iyr2 print *,' Using the closest-cycle year (',iyr,')' @@ -506,7 +538,7 @@ subroutine sol_update & iyr = iyr - icy enddo Lab_dowhile2 - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' *** Year',iyear,' out of table range!', & & iyr1, iyr2 print *,' Using the closest-cycle year (',iyr,')' @@ -520,12 +552,16 @@ subroutine sol_update & Lab_dowhile3 : do while ( i >= iyr1 ) ! read (NIRADSF,26) jyr, solc1 ! 26 format(i4,f10.4) - read (NIRADSF,*) jyr, solc1 + if (mpirank == mpiroot) then + read (NIRADSF,*) jyr, solc1 + end if + call ccpp_bcast(jyr, mpiroot, mpicomm, ierr) + call ccpp_bcast(solc1, mpiroot, mpicomm, ierr) if ( i == iyr .and. iyr == jyr ) then solc0 = smean + solc1 - if (me == 0) then + if (mpirank == mpiroot) then print *,' CHECK: Solar constant data used for year',& & iyr, solc1, solc0 endif @@ -540,7 +576,11 @@ subroutine sol_update & Lab_dowhile4 : do while ( i >= iyr1 ) ! read (NIRADSF,26) jyr, smon(:) ! 26 format(i4,12f10.4) - read (NIRADSF,*) jyr, smon(1:12) + if (mpirank == mpiroot) then + read (NIRADSF,*) jyr, smon(1:12) + end if + call ccpp_bcast(jyr, mpiroot, mpicomm, ierr) + call ccpp_bcast(smon, mpiroot, mpicomm, ierr) if ( i == iyr .and. iyr == jyr ) then do nn = 1, 12 @@ -548,7 +588,7 @@ subroutine sol_update & enddo solc0 = smean + smon(imon) - if (me == 0) then + if (mpirank == mpiroot) then print *,' CHECK: Solar constant data used for year',& & iyr,' and month',imon endif @@ -560,8 +600,7 @@ subroutine sol_update & enddo Lab_dowhile4 endif ! end if_isolflg_block - close ( NIRADSF ) - endif ! end if_file_exist_block + if (mpirank==mpiroot) close ( NIRADSF ) endif ! end if_iyr_sav_block endif ! end if_lsol_chg_block @@ -604,7 +643,7 @@ subroutine sol_update & ! --- ... diagnostic print out - if (me == 0) then + if (mpirank == mpiroot) then !> -# Call prtime() call prtime & @@ -632,7 +671,7 @@ subroutine sol_update & nstp = max(6, nswr) anginc = pid12 * dtswh / float(nstp) - if ( me == 0 ) then + if ( mpirank == mpiroot ) then print *,' for cosz calculations: nswr,deltim,deltsw,dtswh =', & & nswr,deltim,deltsw,dtswh,' anginc,nstp =',anginc,nstp endif diff --git a/physics/Radiation/radiation_gases.f b/physics/Radiation/radiation_gases.f index 784e8917e..154eacf82 100644 --- a/physics/Radiation/radiation_gases.f +++ b/physics/Radiation/radiation_gases.f @@ -115,6 +115,8 @@ !> This module sets up constant gas rofiles, such as co2, ch4, n2o, o2, and those !! of cfc gases. module module_radiation_gases + use mpi_f08 + use mpiutil, only: ccpp_bcast use machine, only : kind_phys, kind_io4 use funcphys, only : fpkapx use module_iounitdef, only : NIO3CLM, NICO2CN @@ -188,7 +190,8 @@ module module_radiation_gases !!\param errmsg error message !>\section gas_init_gen gas_init General Algorithm !----------------------------------- - subroutine gas_init( me, co2usr_file, co2cyc_file, ico2flg, & + subroutine gas_init( mpicomm, mpirank, mpiroot, co2usr_file, & + & co2cyc_file, ico2flg, & & ictmflg, con_pi, errflg, errmsg) ! =================================================================== ! @@ -231,7 +234,9 @@ subroutine gas_init( me, co2usr_file, co2cyc_file, ico2flg, & implicit none ! --- inputs: - integer, intent(in) :: me, ictmflg, ico2flg + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer, intent(in) :: ictmflg, ico2flg character(len=26),intent(in) :: co2usr_file,co2cyc_file real(kind=kind_phys), intent(in) :: con_pi @@ -247,6 +252,7 @@ subroutine gas_init( me, co2usr_file, co2cyc_file, ico2flg, & logical :: file_exist, lextpl character :: cline*100, cform*8 data cform / '(24f7.2)' / !! data format in IMXCO2*f7.2 + integer :: ierr ! !===> ... begin here ! @@ -259,7 +265,7 @@ subroutine gas_init( me, co2usr_file, co2cyc_file, ico2flg, & raddeg = 180.0/con_pi hfpi = 0.5*con_pi - if ( me == 0 ) print *, VTAGGAS ! print out version tag + if ( mpirank==mpiroot ) print *, VTAGGAS ! print out version tag kyrsav = 0 kmonsav = 1 @@ -270,7 +276,7 @@ subroutine gas_init( me, co2usr_file, co2cyc_file, ico2flg, & lab_ico2 : if ( ico2flg == 0 ) then - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,' - Using prescribed co2 global mean value=', & & co2vmr_def endif @@ -279,71 +285,73 @@ subroutine gas_init( me, co2usr_file, co2cyc_file, ico2flg, & lab_ictm : if ( ictmflg == -1 ) then ! input user provided data - inquire (file=co2usr_file, exist=file_exist) - if ( .not. file_exist ) then - errflg = 1 - errmsg = 'ERROR(gas_init): Cannot find user CO2 data file'//& - & ': '//co2usr_file - return - else - close (NICO2CN) - open(NICO2CN,file=co2usr_file,form='formatted',status='old') - rewind NICO2CN - read (NICO2CN, 25) iyr, cline, co2g1, co2g2 - 25 format(i4,a94,f7.2,16x,f5.2) - co2_glb = co2g1 * 1.0e-6 + read_and_broadcast_co2_v1: if ( mpirank==mpiroot ) then + inquire (file=co2usr_file, exist=file_exist) + if ( .not. file_exist ) then + print *,' Can not find user CO2 data file: ',co2usr_file + errflg = 1 + errmsg = 'ERROR(gas_init): Cannot find user CO2 data file' + return + else + close (NICO2CN) + open(NICO2CN,file=co2usr_file,form='formatted', & + & status='old') + rewind NICO2CN + read (NICO2CN, 25) iyr, cline, co2g1, co2g2 + 25 format(i4,a94,f7.2,16x,f5.2) + co2_glb = co2g1 * 1.0e-6 - if ( ico2flg == 1 ) then - if ( me == 0 ) then - print *,' - Using co2 global annual mean value from', & - & ' user provided data set:',co2usr_file + if ( ico2flg == 1 ) then + print *,' - Using co2 global annual mean value from', & + & ' user provided data set:',co2usr_file print *, iyr,cline(1:94),co2g1,' GROWTH RATE =', co2g2 - endif - elseif ( ico2flg == 2 ) then - allocate ( co2vmr_sav(IMXCO2,JMXCO2,12) ) + elseif ( ico2flg == 2 ) then + allocate ( co2vmr_sav(IMXCO2,JMXCO2,12) ) - do imo = 1, 12 - read (NICO2CN,cform) co2dat -!check print cform, co2dat + do imo = 1, 12 + read (NICO2CN,cform) co2dat +!check print cform, co2dat - do j = 1, JMXCO2 - do i = 1, IMXCO2 - co2vmr_sav(i,j,imo) = co2dat(i,j) * 1.0e-6 + do j = 1, JMXCO2 + do i = 1, IMXCO2 + co2vmr_sav(i,j,imo) = co2dat(i,j) * 1.0e-6 + enddo enddo enddo - enddo - if ( me == 0 ) then print *,' - Using co2 monthly 2-d data from user', & - & ' provided data set:',co2usr_file - print *, iyr,cline(1:94),co2g1,' GROWTH RATE =', co2g2 + & ' provided data set:',co2usr_file + print *, iyr,cline(1:94),co2g1,' GROWTH RATE =', co2g2 print *,' CHECK: Sample of selected months of CO2 data' do imo = 1, 12, 3 print *,' Month =',imo print *, (co2vmr_sav(1,j,imo),j=1,jmxco2) enddo - endif - else - print *,' ICO2=',ico2flg,' is not a valid selection' - errflg = 1 - errmsg = 'ERROR(gas_init): ICO2 is not a valid selection' - return - endif ! endif_ico2flg_block + else + print *,' ICO2=',ico2flg,' is not a valid selection' + errflg = 1 + errmsg = 'ERROR(gas_init): ICO2 is not valid' + return + endif ! endif_ico2flg_block - close (NICO2CN) - endif ! endif_file_exist_block + close (NICO2CN) + endif ! endif_file_exist_block + else + if ( ico2flg == 2 ) then + allocate ( co2vmr_sav(IMXCO2,JMXCO2,12) ) + endif + endif read_and_broadcast_co2_v1 else lab_ictm ! input from observed data if ( ico2flg == 1 ) then - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,' - Using observed co2 global annual mean value' - endiF + endif elseif ( ico2flg == 2 ) then allocate ( co2vmr_sav(IMXCO2,JMXCO2,12) ) - - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,' - Using observed co2 monthly 2-d data' endif else @@ -354,52 +362,66 @@ subroutine gas_init( me, co2usr_file, co2cyc_file, ico2flg, & endif if ( ictmflg == -2 ) then - inquire (file=co2cyc_file, exist=file_exist) - if ( .not. file_exist ) then - errflg = 1 - errmsg = 'ERROR(gas_init): Cannot find seasonal cycle '// & - & 'CO2 data file: '//co2cyc_file - return - else - allocate( co2cyc_sav(IMXCO2,JMXCO2,12) ) + read_and_broadcast_co2_v2: if ( mpirank==mpiroot ) then + inquire (file=co2cyc_file, exist=file_exist) + if ( .not. file_exist ) then + print *,' Can not find seasonal cycle CO2 data: ', & + & co2cyc_file + errflg = 1 + errmsg = 'ERROR(gas_init): Can not find seasonal cycle '& + & // 'CO2 data' + return + else + allocate( co2cyc_sav(IMXCO2,JMXCO2,12) ) ! --- ... read in co2 2-d seasonal cycle data - close (NICO2CN) - open (NICO2CN,file=co2cyc_file,form='formatted', & - & status='old') - rewind NICO2CN - read (NICO2CN, 35) cline, co2g1, co2g2 - 35 format(a98,f7.2,16x,f5.2) - read (NICO2CN,cform) co2dat ! skip annual mean part + close (NICO2CN) + open (NICO2CN,file=co2cyc_file,form='formatted', & + & status='old') + rewind NICO2CN + read (NICO2CN, 35) cline, co2g1, co2g2 + 35 format(a98,f7.2,16x,f5.2) + read (NICO2CN,cform) co2dat ! skip annual mean part - if ( me == 0 ) then print *,' - Superimpose seasonal cycle to mean CO2 data' print *,' Opened CO2 climatology seasonal cycle data',& & ' file: ',co2cyc_file !check print *, cline(1:98), co2g1, co2g2 - endif - do imo = 1, 12 - read (NICO2CN,45) cline, gco2cyc(imo) - 45 format(a58,f7.2) -!check print *, cline(1:58),gco2cyc(imo) - gco2cyc(imo) = gco2cyc(imo) * 1.0e-6 - - read (NICO2CN,cform) co2dat -!check print cform, co2dat - do j = 1, JMXCO2 - do i = 1, IMXCO2 - co2cyc_sav(i,j,imo) = co2dat(i,j) * 1.0e-6 + do imo = 1, 12 + read (NICO2CN,45) cline, gco2cyc(imo) + 45 format(a58,f7.2) +!check print *, cline(1:58),gco2cyc(imo) + gco2cyc(imo) = gco2cyc(imo) * 1.0e-6 + + read (NICO2CN,cform) co2dat +!check print cform, co2dat + do j = 1, JMXCO2 + do i = 1, IMXCO2 + co2cyc_sav(i,j,imo) = co2dat(i,j) * 1.0e-6 + enddo enddo enddo - enddo - close (NICO2CN) - endif ! endif_file_exist_block + close (NICO2CN) + endif ! endif_file_exist_block + else + allocate( co2cyc_sav(IMXCO2,JMXCO2,12) ) + endif read_and_broadcast_co2_v2 endif endif lab_ictm endif lab_ico2 + + ! Broadcast all necessary fields + call ccpp_bcast(co2_glb, mpiroot, mpicomm, ierr) + call ccpp_bcast(gco2cyc, mpiroot, mpicomm, ierr) + if (allocated(co2vmr_sav)) then + call ccpp_bcast(co2vmr_sav, mpiroot, mpicomm, ierr) + endif + if (allocated(co2cyc_sav)) then + call ccpp_bcast(co2cyc_sav, mpiroot, mpicomm, ierr) + endif ! !................................... end subroutine gas_init @@ -422,8 +444,8 @@ end subroutine gas_init !>\section gen_gas_update gas_update General Algorithm !----------------------------------- subroutine gas_update(iyear, imon, iday, ihour, ldoco2, & - & me, co2dat_file, co2gbl_file, ictmflg, ico2flg, & - & errflg, errmsg ) + & mpicomm, mpirank, mpiroot, co2dat_file, co2gbl_file, & + & ictmflg, ico2flg, errflg, errmsg ) ! =================================================================== ! ! ! @@ -477,7 +499,10 @@ subroutine gas_update(iyear, imon, iday, ihour, ldoco2, & implicit none ! --- inputs: - integer, intent(in) :: iyear,imon,iday,ihour,me,ictmflg,ico2flg + integer, intent(in) :: iyear, imon, iday, ihour + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer, intent(in) :: ictmflg,ico2flg character(len=26),intent(in) :: co2dat_file, co2gbl_file logical, intent(in) :: ldoco2 @@ -497,6 +522,7 @@ subroutine gas_update(iyear, imon, iday, ihour, ldoco2, & logical :: file_exist, lextpl, change character :: cline*100, cform*8, cfile1*26 data cform / '(24f7.2)' / !! data format in IMXCO2*f7.2 + integer :: ierr ! !===> ... begin here ! @@ -532,70 +558,69 @@ subroutine gas_update(iyear, imon, iday, ihour, ldoco2, & Lab_if_idyr : if ( idyr < MINYEAR .and. ictmflg > 0 ) then - if ( me == 0 ) then + read_and_broadcast_co2_v1: if ( mpirank==mpiroot ) then print *,' Requested CO2 data year',iyear,' earlier than', & & MINYEAR print *,' Which is the earliest monthly observation', & & ' data available.' print *,' Thus, historical global mean data is used' - endif ! --- ... check to see if requested co2 data file existed - inquire (file=co2gbl_file, exist=file_exist) - if ( .not. file_exist ) then - errflg = 1 - errmsg = 'ERROR(gas_update): Requested co2 data file not '// & - & 'found: '//co2gbl_file - return - else - close(NICO2CN) - open (NICO2CN,file=co2gbl_file,form='formatted',status='old') - rewind NICO2CN + inquire (file=co2gbl_file, exist=file_exist) + if ( .not. file_exist ) then + print *,' Requested co2 data file "',co2gbl_file, & + & '" not found' + errflg = 1 + errmsg = 'ERROR(gas_update): Requested co2 data file not '//& + & 'found' + return + else + close(NICO2CN) + open(NICO2CN,file=co2gbl_file,form='formatted',status='old') + rewind NICO2CN - read (NICO2CN, 24) iyr1, iyr2, cline - 24 format(i4,4x,i4,a48) + read (NICO2CN, 24) iyr1, iyr2, cline + 24 format(i4,4x,i4,a48) - if ( me == 0 ) then print *,' Opened co2 data file: ',co2gbl_file !check print *, iyr1, iyr2, cline(1:48) - endif - if ( idyr < iyr1 ) then - iyr = iyr1 -!check if ( me == 0 ) then -! print *,' Using earlist available co2 data, year=',iyr1 -!check endif - endif - - i = iyr2 - Lab_dowhile1 : do while ( i >= iyr1 ) -! read (NICO2CN,26) jyr, co2g1, co2g2 -! 26 format(i4,4x,2f7.2) - read (NICO2CN, *) jyr, co2g1, co2g2 + if ( idyr < iyr1 ) then + iyr = iyr1 +!check if ( me == 0 ) then +! print *,' Using earlist available co2 data, year=',iyr1 +!check endif + endif - if ( i == iyr .and. iyr == jyr ) then - co2_glb = (co2g1+co2g2) * 0.5e-6 - if ( ico2flg == 2 ) then - do j = 1, JMXCO2 - do i = 1, IMXCO2 - co2vmr_sav(i,j,1:6) = co2g1 * 1.0e-6 - co2vmr_sav(i,j,7:12) = co2g2 * 1.0e-6 + i = iyr2 + Lab_dowhile1 : do while ( i >= iyr1 ) +! read (NICO2CN,26) jyr, co2g1, co2g2 +! 26 format(i4,4x,2f7.2) + read (NICO2CN, *) jyr, co2g1, co2g2 + + if ( i == iyr .and. iyr == jyr ) then + co2_glb = (co2g1+co2g2) * 0.5e-6 + if ( ico2flg == 2 ) then + do j = 1, JMXCO2 + do i = 1, IMXCO2 + co2vmr_sav(i,j,1:6) = co2g1 * 1.0e-6 + co2vmr_sav(i,j,7:12) = co2g2 * 1.0e-6 + enddo enddo - enddo - endif + endif - if ( me == 0 ) print *,' Co2 data for year',iyear, & - & co2_glb - exit Lab_dowhile1 - else -!check if ( me == 0 ) print *,' Skip co2 data for year',i - i = i - 1 - endif - enddo Lab_dowhile1 + print *,' Co2 data for year',iyear, co2_glb + exit Lab_dowhile1 + else +!check if ( me == 0 ) print *,' Skip co2 data for year',i + i = i - 1 + endif + enddo Lab_dowhile1 - close ( NICO2CN ) - endif ! end if_file_exist_block + close ( NICO2CN ) + endif ! end if_file_exist_block + endif read_and_broadcast_co2_v1 else Lab_if_idyr @@ -606,113 +631,101 @@ subroutine gas_update(iyear, imon, iday, ihour, ldoco2, & 34 format(i4.4) ! --- ... check to see if requested co2 data file existed + read_and_broadcast_co2_v2: if ( mpirank==mpiroot ) then + inquire (file=cfile1, exist=file_exist) + if ( .not. file_exist ) then - inquire (file=cfile1, exist=file_exist) - if ( .not. file_exist ) then - - Lab_if_ictm : if ( ictmflg > 10 ) then ! specified year of data not found - if ( me == 0 ) then + Lab_if_ictm : if ( ictmflg > 10 ) then ! specified year of data not found print *,' Specified co2 data for year',idyr, & & ' not found !! Need to change namelist ICTM !!' - endif - errflg = 1 - errmsg = 'ERROR(gas_update): Specified co2 data for year '//& - & 'not found' - return - else Lab_if_ictm ! looking for latest available data - if ( me == 0 ) then + errflg = 1 + errmsg = 'ERROR(gas_update): Specified co2 data for year '& + & // 'not found' + return + else Lab_if_ictm ! looking for latest available data print *,' Requested co2 data for year',idyr, & & ' not found, check for other available data set' - endif - Lab_dowhile2 : do while ( iyr >= MINYEAR ) - iyr = iyr - 1 - write(cfile1(19:22),34) iyr + Lab_dowhile2 : do while ( iyr >= MINYEAR ) + iyr = iyr - 1 + write(cfile1(19:22),34) iyr - inquire (file=cfile1, exist=file_exist) - if ( me == 0 ) then + inquire (file=cfile1, exist=file_exist) print *,' Looking for CO2 file ',cfile1 - endif - if ( file_exist ) then - exit Lab_dowhile2 + if ( file_exist ) then + exit Lab_dowhile2 + endif + enddo Lab_dowhile2 + + if ( .not. file_exist ) then + print *,' Can not find co2 data source file' + errflg = 1 + errmsg = 'ERROR(gas_update): Can not find co2 data '// & + & 'source file' + return endif - enddo Lab_dowhile2 - - if ( .not. file_exist ) then - errflg = 1 - errmsg = 'ERROR(gas_update): Cannot find co2 data '// & - & 'source file: '//co2dat_file - return - endif - endif Lab_if_ictm - endif ! end if_file_exist_block + endif Lab_if_ictm + endif ! end if_file_exist_block ! --- ... read in co2 2-d data for the requested month - close(NICO2CN) - open (NICO2CN,file=cfile1,form='formatted',status='old') - rewind NICO2CN - read (NICO2CN, 36) iyr, cline, co2g1, co2g2 - 36 format(i4,a94,f7.2,16x,f5.2) + close(NICO2CN) + open (NICO2CN,file=cfile1,form='formatted',status='old') + rewind NICO2CN + read (NICO2CN, 36) iyr, cline, co2g1, co2g2 + 36 format(i4,a94,f7.2,16x,f5.2) - if ( me == 0 ) then print *,' Opened co2 data file: ',cfile1 print *, iyr, cline(1:94), co2g1,' GROWTH RATE =', co2g2 - endif ! --- ... add growth rate if needed - if ( lextpl ) then -! rate = co2g2 * (iyear - iyr) ! rate from early year -! rate = 1.60 * (iyear - iyr) ! avg rate over long period - rate = 2.00 * (iyear - iyr) ! avg rate for recent period - else - rate = 0.0 - endif + if ( lextpl ) then +! rate = co2g2 * (iyear - iyr) ! rate from early year +! rate = 1.60 * (iyear - iyr) ! avg rate over long period + rate = 2.00 * (iyear - iyr) ! avg rate for recent period + else + rate = 0.0 + endif - co2_glb = (co2g1 + rate) * 1.0e-6 - if ( me == 0 ) then + co2_glb = (co2g1 + rate) * 1.0e-6 print *,' Global annual mean CO2 data for year', & & iyear, co2_glb - endif - if ( ictmflg == -2 ) then ! need to calc ic time annual mean first + if ( ictmflg == -2 ) then ! need to calc ic time annual mean first - if ( ico2flg == 1 ) then - if ( me==0 ) then + if ( ico2flg == 1 ) then print *,' CHECK: Monthly deviations of climatology ', & & 'to be superimposed on global annual mean' print *, gco2cyc - endif - elseif ( ico2flg == 2 ) then - co2ann(:,:) = 0.0 + elseif ( ico2flg == 2 ) then + co2ann(:,:) = 0.0 - do imo = 1, 12 - read (NICO2CN,cform) co2dat -!check print cform, co2dat + do imo = 1, 12 + read (NICO2CN,cform) co2dat +!check print cform, co2dat - do j = 1, JMXCO2 - do i = 1, IMXCO2 - co2ann(i,j) = co2ann(i,j) + co2dat(i,j) + do j = 1, JMXCO2 + do i = 1, IMXCO2 + co2ann(i,j) = co2ann(i,j) + co2dat(i,j) + enddo enddo enddo - enddo - - do j = 1, JMXCO2 - do i = 1, IMXCO2 - co2ann(i,j) = co2ann(i,j) * 1.0e-6 / float(12) - enddo - enddo - do imo = 1, 12 do j = 1, JMXCO2 do i = 1, IMXCO2 - co2vmr_sav(i,j,imo) = co2ann(i,j)+co2cyc_sav(i,j,imo) + co2ann(i,j) = co2ann(i,j) * 1.0e-6 / float(12) + enddo + enddo + + do imo = 1, 12 + do j = 1, JMXCO2 + do i = 1, IMXCO2 + co2vmr_sav(i,j,imo) = co2ann(i,j)+co2cyc_sav(i,j,imo) + enddo enddo enddo - enddo - if ( me==0 ) then print *,' CHECK: Sample of 2-d annual mean of CO2 ', & & 'data used for year:',iyear print *, co2ann(1,:) @@ -722,41 +735,48 @@ subroutine gas_update(iyear, imon, iday, ihour, ldoco2, & print *,' Month =',imo print *, co2vmr_sav(1,:,imo) enddo - endif - endif ! endif_icl2flg_block + endif ! endif_icl2flg_block - else ! no need to calc ic time annual mean first + else ! no need to calc ic time annual mean first - if ( ico2flg == 2 ) then ! directly save monthly data - do imo = 1, 12 - read (NICO2CN,cform) co2dat -!check print cform, co2dat + if ( ico2flg == 2 ) then ! directly save monthly data + do imo = 1, 12 + read (NICO2CN,cform) co2dat +!check print cform, co2dat - do j = 1, JMXCO2 - do i = 1, IMXCO2 - co2vmr_sav(i,j,imo) = (co2dat(i,j) + rate) * 1.0e-6 + do j = 1, JMXCO2 + do i = 1, IMXCO2 + co2vmr_sav(i,j,imo) = (co2dat(i,j) + rate) * 1.0e-6 + enddo enddo enddo - enddo - if ( me == 0 ) then print *,' CHECK: Sample of selected months of CO2 ', & & 'data used for year:',iyear do imo = 1, 12, 3 print *,' Month =',imo print *, co2vmr_sav(1,:,imo) enddo - endif - endif ! endif_ico2flg_block - - do imo = 1, 12 - gco2cyc(imo) = 0.0 - enddo - endif ! endif_ictmflg_block - close ( NICO2CN ) + endif ! endif_ico2flg_block + do imo = 1, 12 + gco2cyc(imo) = 0.0 + enddo + endif ! endif_ictmflg_block + close ( NICO2CN ) + endif read_and_broadcast_co2_v2 endif Lab_if_idyr -! + + ! Broadcast all necessary fields + call ccpp_bcast(co2_glb, mpiroot, mpicomm, ierr) + call ccpp_bcast(gco2cyc, mpiroot, mpicomm, ierr) + if (allocated(co2vmr_sav)) then + call ccpp_bcast(co2vmr_sav, mpiroot, mpicomm, ierr) + endif + if (allocated(co2cyc_sav)) then + call ccpp_bcast(co2cyc_sav, mpiroot, mpicomm, ierr) + endif + !................................... end subroutine gas_update !----------------------------------- diff --git a/physics/Radiation/radiation_surface.f b/physics/Radiation/radiation_surface.f index 3f62b66fc..1dbe687bc 100644 --- a/physics/Radiation/radiation_surface.f +++ b/physics/Radiation/radiation_surface.f @@ -104,6 +104,8 @@ !! emissivity for LW radiation. module module_radiation_surface ! + use mpi_f08 + use mpiutil, only : ccpp_bcast use machine, only : kind_phys use module_iounitdef, only : NIRADSF use surface_perturbation, only : ppfbet @@ -139,7 +141,8 @@ module module_radiation_surface !>\section gen_sfc_init sfc_init General Algorithm !----------------------------------- subroutine sfc_init & - & ( me, ialbflg, iemsflg, semis_file, con_pi, errmsg, errflg )! --- inputs/outputs: + & ( mpicomm, mpirank, mpiroot, ialbflg, iemsflg, semis_file, & + & con_pi, errmsg, errflg ) ! --- inputs/outputs: ! ! =================================================================== ! ! ! @@ -172,7 +175,9 @@ subroutine sfc_init & implicit none ! --- inputs: - integer, intent(in) :: me, ialbflg, iemsflg + type(MPI_Comm), intent(in) :: mpicomm + integer, intent(in) :: mpirank, mpiroot + integer, intent(in) :: ialbflg, iemsflg real(kind=kind_phys), intent(in) :: con_pi character(len=26), intent(in) :: semis_file ! --- outputs: ( none ) @@ -192,8 +197,7 @@ subroutine sfc_init & ! ! Module rad2dg = 180.0 / con_pi - - if ( me == 0 ) print *, VTAGSFC ! print out version tag + if ( mpirank==mpiroot ) print *, VTAGSFC ! print out version tag !> - Initialization of surface albedo section !! \n GFS_typedefs::ialbflg @@ -202,13 +206,13 @@ subroutine sfc_init & if ( ialbflg == 1 ) then - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,' - Using MODIS based land surface albedo for sw' endif elseif ( ialbflg == 2 ) then ! use albedo from land model - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,' - Using Albedo From Land Model' endif @@ -236,30 +240,28 @@ subroutine sfc_init & ! --- check to see if requested emissivity data file existed - inquire (file=semis_file, exist=file_exist) + read_and_broadcast: if (mpirank==mpiroot) then + inquire (file=semis_file, exist=file_exist) - if ( .not. file_exist ) then - if ( me == 0 ) then + if ( .not. file_exist ) then print *,' - Using Varying Surface Emissivity for lw' print *,' Requested data file "',semis_file,'" not found!' - endif - errmsg = 'module_radiation_surface: surface emissivity + errmsg = 'module_radiation_surface: surface emissivity & file not provided' - errflg = 1 - return + errflg = 1 + return - else - close(NIRADSF) - open (NIRADSF,file=semis_file,form='formatted',status='old') - rewind NIRADSF + else + close(NIRADSF) + open (NIRADSF,file=semis_file,form='formatted',status='old') + rewind NIRADSF - read (NIRADSF,12) cline - 12 format(a80) + read (NIRADSF,12) cline + 12 format(a80) - read (NIRADSF,14) idxems - 14 format(80i1) + read (NIRADSF,14) idxems + 14 format(80i1) - if ( me == 0 ) then print *,' - Using Varying Surface Emissivity for lw' print *,' Opened data file: ',semis_file print *, cline @@ -267,14 +269,15 @@ subroutine sfc_init & ! ia = IMXEMS / 5 ! ja = JMXEMS / 5 ! print *, idxems(1:IMXEMS:ia,1:JMXEMS:ja) - endif + close(NIRADSF) + endif ! end if_file_exist_block + endif read_and_broadcast - close(NIRADSF) - endif ! end if_file_exist_block + call ccpp_bcast(idxems, mpiroot, mpicomm, errflg) elseif ( iemslw == 2 ) then ! use emiss from land model - if ( me == 0 ) then + if ( mpirank==mpiroot ) then print *,' - Using Surface Emissivity From Land Model' endif diff --git a/physics/tools/mpiutil.F90 b/physics/tools/mpiutil.F90 new file mode 100644 index 000000000..752c0512e --- /dev/null +++ b/physics/tools/mpiutil.F90 @@ -0,0 +1,245 @@ +module mpiutil + + use iso_fortran_env, only : real32, real64 + use iso_fortran_env, only : error_unit, output_unit + use mpi_f08 + + implicit none + + private + public ccpp_bcast + + interface ccpp_bcast + procedure :: bcast_i32d0 + procedure :: bcast_i32d1 + procedure :: bcast_i32d2 + procedure :: bcast_i32d3 + procedure :: bcast_r32d0 + procedure :: bcast_r64d0 + procedure :: bcast_r32d1 + procedure :: bcast_r64d1 + procedure :: bcast_r32d2 + procedure :: bcast_r64d2 + procedure :: bcast_r32d3 + procedure :: bcast_r64d3 + procedure :: bcast_r32d4 + procedure :: bcast_r64d4 + procedure :: bcast_r32d5 + procedure :: bcast_r64d5 + procedure :: bcast_ld0 + end interface ccpp_bcast + +contains + +! Helper routines for MPI broadcasting + + subroutine bcast_i32d0(arr, root, comm, ierr) + integer, intent(inout) :: arr + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, 1, MPI_INTEGER, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_i32d0") + end if + end subroutine bcast_i32d0 + + subroutine bcast_i32d1(arr, root, comm, ierr) + integer, intent(inout) :: arr(:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_INTEGER, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_i32d1") + end if + end subroutine bcast_i32d1 + + subroutine bcast_i32d2(arr, root, comm, ierr) + integer, intent(inout) :: arr(:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_INTEGER, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_i32d2") + end if + end subroutine bcast_i32d2 + + subroutine bcast_i32d3(arr, root, comm, ierr) + integer, intent(inout) :: arr(:,:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_INTEGER, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_i32d3") + end if + end subroutine bcast_i32d3 + + subroutine bcast_r32d0(arr, root, comm, ierr) + real(kind=real32), intent(inout) :: arr + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, 1, MPI_REAL, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r32d0") + end if + end subroutine bcast_r32d0 + + subroutine bcast_r64d0(arr, root, comm, ierr) + real(kind=real64), intent(inout) :: arr + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, 1, MPI_DOUBLE_PRECISION, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r64d0") + end if + end subroutine bcast_r64d0 + + subroutine bcast_r32d1(arr, root, comm, ierr) + real(kind=real32), intent(inout) :: arr(:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_REAL, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r32d1") + end if + end subroutine bcast_r32d1 + + subroutine bcast_r64d1(arr, root, comm, ierr) + real(kind=real64), intent(inout) :: arr(:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_DOUBLE_PRECISION, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r64d1") + end if + end subroutine bcast_r64d1 + + subroutine bcast_r32d2(arr, root, comm, ierr) + real(kind=real32), intent(inout) :: arr(:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_REAL, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r32d2") + end if + end subroutine bcast_r32d2 + + subroutine bcast_r64d2(arr, root, comm, ierr) + real(kind=real64), intent(inout) :: arr(:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_DOUBLE_PRECISION, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r64d2") + end if + end subroutine bcast_r64d2 + + subroutine bcast_r32d3(arr, root, comm, ierr) + real(kind=real32), intent(inout) :: arr(:,:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_REAL, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r32d3") + end if + end subroutine bcast_r32d3 + + subroutine bcast_r64d3(arr, root, comm, ierr) + real(kind=real64), intent(inout) :: arr(:,:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_DOUBLE_PRECISION, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r64d3") + end if + end subroutine bcast_r64d3 + + subroutine bcast_r32d4(arr, root, comm, ierr) + real(kind=real32), intent(inout) :: arr(:,:,:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_REAL, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r32d4") + end if + end subroutine bcast_r32d4 + + subroutine bcast_r64d4(arr, root, comm, ierr) + real(kind=real64), intent(inout) :: arr(:,:,:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_DOUBLE_PRECISION, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r64d4") + end if + end subroutine bcast_r64d4 + + subroutine bcast_r32d5(arr, root, comm, ierr) + real(kind=real32), intent(inout) :: arr(:,:,:,:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_REAL, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r32d5") + end if + end subroutine bcast_r32d5 + + subroutine bcast_r64d5(arr, root, comm, ierr) + real(kind=real64), intent(inout) :: arr(:,:,:,:,:) + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, size(arr), MPI_DOUBLE_PRECISION, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_r64d5") + end if + end subroutine bcast_r64d5 + + subroutine bcast_ld0(arr, root, comm, ierr) + logical, intent(inout) :: arr + integer, intent(in) :: root + type(MPI_Comm), intent(in) :: comm + integer, intent(out) :: ierr + call MPI_BCAST(arr, 1, MPI_LOGICAL, root, comm, ierr) + if (ierr/=MPI_SUCCESS) then + call ccpp_abort(comm, "mpiutil.F90:bcast_ld0") + end if + end subroutine bcast_ld0 + +! Temporary: helper routine to abort code until +! discussion about potential redesign of how to +! abort model runs for CCPP errors is settled. + + subroutine ccpp_abort(comm, str) +#ifdef __INTEL_COMPILER + use ifcore +#endif + implicit none + type(MPI_Comm), intent(in) :: comm + character(len=*), intent(in) :: str + integer :: ierr + write(output_unit,'(a)') "ccpp_abort: " // trim(str) + write(error_unit,'(a)') "ccpp_abort: " // trim(str) +#if defined(__INTEL_COMPILER) + call tracebackqq("ccpp_abort" // trim(str), user_exit_code=-1) +#else if defined(__GFORTRAN__) + call backtrace() +#endif + call MPI_ABORT(comm, ierr) + end subroutine ccpp_abort + +end module mpiutil From 1ff31dabade1db4e07300270214a1de9f1f7674a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 13 May 2026 20:40:34 -0600 Subject: [PATCH 03/14] First round of updates and bug fixes for capgen-ng --- physics/GWD/cires_ugwp.F90 | 16 +- physics/GWD/cires_ugwp.meta | 2 +- physics/GWD/cires_ugwp_module.F90 | 8 +- physics/GWD/cires_ugwpv1_module.F90 | 2 +- physics/GWD/ugwpv1_gsldrag.F90 | 12 +- physics/GWD/ugwpv1_gsldrag.meta | 2 +- physics/GWD/unified_ugwp.F90 | 18 +- physics/GWD/unified_ugwp.meta | 2 +- .../GFS_SCNV_generic_post.meta | 2 +- .../UFS_SCM_NEPTUNE/GFS_debug.F90 | 1638 ----------------- .../UFS_SCM_NEPTUNE/GFS_debug.meta | 972 ---------- .../GFS_phys_time_vary.fv3.F90 | 10 +- .../GFS_phys_time_vary.fv3.meta | 2 +- .../GFS_phys_time_vary.neptune.F90 | 10 +- .../GFS_phys_time_vary.neptune.meta | 2 +- .../GFS_phys_time_vary.scm.F90 | 10 +- .../GFS_phys_time_vary.scm.meta | 4 +- .../UFS_SCM_NEPTUNE/GFS_radiation_post.meta | 6 +- .../UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta | 6 +- .../UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 | 10 +- .../UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta | 7 +- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90 | 2 +- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta | 2 +- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 | 10 +- .../UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta | 4 +- .../GFS_suite_interstitial_3.F90 | 2 +- .../GFS_suite_interstitial_3.meta | 6 +- .../GFS_suite_interstitial_4.F90 | 3 +- .../GFS_suite_interstitial_4.meta | 2 + .../UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 | 10 +- .../GFS_time_vary_pre.fv3.meta | 4 +- .../GFS_time_vary_pre.neptune.F90 | 10 +- .../GFS_time_vary_pre.neptune.meta | 4 +- .../UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 | 10 +- .../GFS_time_vary_pre.scm.meta | 8 +- .../module_ccpp_suite_simulator.meta | 19 +- .../UFS_SCM_NEPTUNE/sgscloud_radpre.meta | 2 +- .../MP/Ferrier_Aligo/module_MP_FER_HIRES.F90 | 4 +- physics/MP/Ferrier_Aligo/mp_fer_hires.F90 | 14 +- physics/MP/Ferrier_Aligo/mp_fer_hires.meta | 2 +- physics/MP/GFDL/fv_sat_adj.F90 | 16 +- physics/MP/GFDL/fv_sat_adj.meta | 2 +- .../MP/GFDL/v1_2019/gfdl_cloud_microphys.F90 | 12 +- .../MP/GFDL/v1_2019/gfdl_cloud_microphys.meta | 2 +- .../GFDL/v3_2022/gfdl_cloud_microphys_v3.F90 | 12 +- .../GFDL/v3_2022/gfdl_cloud_microphys_v3.meta | 2 +- physics/MP/TEMPO/module_mp_tempo.F90 | 4 +- physics/MP/TEMPO/mp_tempo.F90 | 21 +- physics/MP/TEMPO/mp_tempo.meta | 9 +- physics/MP/TEMPO/mp_tempo_post.F90 | 10 +- physics/MP/TEMPO/mp_tempo_post.meta | 2 +- physics/MP/Thompson/module_mp_thompson.F90 | 4 +- physics/MP/Thompson/mp_thompson.F90 | 21 +- physics/MP/Thompson/mp_thompson.meta | 9 +- physics/MP/Thompson/mp_thompson_post.F90 | 10 +- physics/MP/Thompson/mp_thompson_post.meta | 2 +- physics/MP/multi_gases.F90 | 4 +- physics/Radiation/RRTMG/radsw_param.meta | 40 +- .../SFC_Models/Lake/Flake/flake_driver.F90 | 6 +- physics/SFC_Models/Land/Noah/lsm_noah.f | 10 +- physics/SFC_Models/Land/Noah/lsm_noah.meta | 2 +- .../SFC_Models/Land/Noahmp/lnd_iau_mod.F90 | 6 +- .../SFC_Models/Land/Noahmp/lnd_iau_mod.meta | 37 +- physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 | 16 +- physics/SFC_Models/Land/Noahmp/noahmpdrv.meta | 2 +- physics/SFC_Models/Land/RUC/lsm_ruc.F90 | 10 +- physics/SFC_Models/Land/RUC/lsm_ruc.meta | 2 +- 67 files changed, 222 insertions(+), 2910 deletions(-) delete mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 delete mode 100644 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.meta diff --git a/physics/GWD/cires_ugwp.F90 b/physics/GWD/cires_ugwp.F90 index f9ee82c50..59cf81ed5 100644 --- a/physics/GWD/cires_ugwp.F90 +++ b/physics/GWD/cires_ugwp.F90 @@ -16,7 +16,7 @@ module cires_ugwp use machine, only: kind_phys - use cires_ugwpv0_module, only: knob_ugwp_version, cires_ugwpv0_mod_init, cires_ugwpv0_mod_finalize + use cires_ugwpv0_module, only: knob_ugwp_version, cires_ugwpv0_mod_init, cires_ugwpv0_mod_final use ugwp_driver_v0 use gwdps, only: gwdps_run use cires_ugwp_triggers @@ -25,7 +25,7 @@ module cires_ugwp private - public cires_ugwp_init, cires_ugwp_run, cires_ugwp_finalize + public cires_ugwp_init, cires_ugwp_run, cires_ugwp_final logical :: is_initialized = .False. @@ -103,16 +103,16 @@ subroutine cires_ugwp_init (me, master, nlunit, input_nml_file, logunit, & end subroutine cires_ugwp_init ! ----------------------------------------------------------------------- -! finalize of cires_ugwp (_finalize) +! finalize of cires_ugwp (_final) ! ----------------------------------------------------------------------- !> The subroutine finalizes the CIRES UGWP #if 0 -!> \section arg_table_cires_ugwp_finalize Argument Table -!! \htmlinclude cires_ugwp_finalize.html +!> \section arg_table_cires_ugwp_final Argument Table +!! \htmlinclude cires_ugwp_final.html !! #endif - subroutine cires_ugwp_finalize(errmsg, errflg) + subroutine cires_ugwp_final(errmsg, errflg) implicit none ! @@ -125,11 +125,11 @@ subroutine cires_ugwp_finalize(errmsg, errflg) if (.not.is_initialized) return - call cires_ugwpv0_mod_finalize() + call cires_ugwpv0_mod_final() is_initialized = .false. - end subroutine cires_ugwp_finalize + end subroutine cires_ugwp_final ! ----------------------------------------------------------------------- ! originally from ugwp_driver_v0.f diff --git a/physics/GWD/cires_ugwp.meta b/physics/GWD/cires_ugwp.meta index f16ec7ce7..84a4b0d75 100644 --- a/physics/GWD/cires_ugwp.meta +++ b/physics/GWD/cires_ugwp.meta @@ -163,7 +163,7 @@ ######################################################################## [ccpp-arg-table] - name = cires_ugwp_finalize + name = cires_ugwp_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/GWD/cires_ugwp_module.F90 b/physics/GWD/cires_ugwp_module.F90 index 3695487cd..ae1ada7f9 100644 --- a/physics/GWD/cires_ugwp_module.F90 +++ b/physics/GWD/cires_ugwp_module.F90 @@ -71,7 +71,7 @@ module cires_ugwpv0_module !/ ! ! allocatable arrays, initilized during "cires_ugwp_init" & -! released during "cires_ugwp_finalize" +! released during "cires_ugwp_final" ! real, allocatable :: kvg(:), ktg(:), krad(:), kion(:) real, allocatable :: zkm(:), pmb(:) @@ -227,11 +227,11 @@ subroutine cires_ugwpv0_mod_init (me, master, nlunit, input_nml_file, logunit, & end subroutine cires_ugwpv0_mod_init ! ! ----------------------------------------------------------------------- -! finalize of cires_ugwp (_finalize) +! finalize of cires_ugwp (_final) ! ----------------------------------------------------------------------- !> This subroutine deallocate sources/spectra and some diagnostics. - subroutine cires_ugwpv0_mod_finalize + subroutine cires_ugwpv0_mod_final ! ! deallocate sources/spectra & some diagnostics need to find where "deaalocate them" ! before "end" of the FV3GFS @@ -245,5 +245,5 @@ subroutine cires_ugwpv0_mod_finalize deallocate( zkm, pmb ) deallocate( rfdis, rfdist) - end subroutine cires_ugwpv0_mod_finalize + end subroutine cires_ugwpv0_mod_final end module cires_ugwpv0_module diff --git a/physics/GWD/cires_ugwpv1_module.F90 b/physics/GWD/cires_ugwpv1_module.F90 index 534c1cb87..e250d2a02 100644 --- a/physics/GWD/cires_ugwpv1_module.F90 +++ b/physics/GWD/cires_ugwpv1_module.F90 @@ -92,7 +92,7 @@ module cires_ugwpv1_module ! ! allocatable arrays, initilized during "cires_ugwp_init" & -! released during "cires_ugwp_finalize" +! released during "cires_ugwp_final" ! real(kind=kind_phys), allocatable :: kvg(:), ktg(:), krad(:), kion(:) real(kind=kind_phys), allocatable :: zkm(:), pmb(:) diff --git a/physics/GWD/ugwpv1_gsldrag.F90 b/physics/GWD/ugwpv1_gsldrag.F90 index f4014fa10..4d34ae785 100644 --- a/physics/GWD/ugwpv1_gsldrag.F90 +++ b/physics/GWD/ugwpv1_gsldrag.F90 @@ -54,7 +54,7 @@ module ugwpv1_gsldrag private - public ugwpv1_gsldrag_init, ugwpv1_gsldrag_run, ugwpv1_gsldrag_finalize + public ugwpv1_gsldrag_init, ugwpv1_gsldrag_run, ugwpv1_gsldrag_final logical :: is_initialized = .False. @@ -249,15 +249,15 @@ subroutine ugwpv1_gsldrag_init ( & end subroutine ugwpv1_gsldrag_init ! ----------------------------------------------------------------------- -! finalize of ugwpv1_gsldrag (_finalize) +! finalize of ugwpv1_gsldrag (_final) ! ----------------------------------------------------------------------- !>@brief The subroutine finalizes the CIRES UGWP -!> \section arg_table_ugwpv1_gsldrag_finalize Argument Table -!! \htmlinclude ugwpv1_gsldrag_finalize.html +!> \section arg_table_ugwpv1_gsldrag_final Argument Table +!! \htmlinclude ugwpv1_gsldrag_final.html !! - subroutine ugwpv1_gsldrag_finalize(errmsg, errflg) + subroutine ugwpv1_gsldrag_final(errmsg, errflg) implicit none @@ -274,7 +274,7 @@ subroutine ugwpv1_gsldrag_finalize(errmsg, errflg) is_initialized = .false. - end subroutine ugwpv1_gsldrag_finalize + end subroutine ugwpv1_gsldrag_final ! ----------------------------------------------------------------------- ! originally from ugwp_driver_v0.f diff --git a/physics/GWD/ugwpv1_gsldrag.meta b/physics/GWD/ugwpv1_gsldrag.meta index a969c44d4..65b9f3cae 100644 --- a/physics/GWD/ugwpv1_gsldrag.meta +++ b/physics/GWD/ugwpv1_gsldrag.meta @@ -257,7 +257,7 @@ ######################################################################## [ccpp-arg-table] - name = ugwpv1_gsldrag_finalize + name = ugwpv1_gsldrag_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/GWD/unified_ugwp.F90 b/physics/GWD/unified_ugwp.F90 index ab5ee941c..e826e1567 100644 --- a/physics/GWD/unified_ugwp.F90 +++ b/physics/GWD/unified_ugwp.F90 @@ -35,8 +35,8 @@ module unified_ugwp use machine, only: kind_phys -! use cires_ugwp_module, only: knob_ugwp_version, cires_ugwp_mod_init, cires_ugwp_mod_finalize - use cires_ugwpv0_module, only: knob_ugwp_version, cires_ugwpv0_mod_init, cires_ugwpv0_mod_finalize +! use cires_ugwp_module, only: knob_ugwp_version, cires_ugwp_mod_init, cires_ugwp_mod_final + use cires_ugwpv0_module, only: knob_ugwp_version, cires_ugwpv0_mod_init, cires_ugwpv0_mod_final use gwdps, only: gwdps_run use cires_ugwp_triggers use ugwp_driver_v0 @@ -46,7 +46,7 @@ module unified_ugwp private - public unified_ugwp_init, unified_ugwp_run, unified_ugwp_finalize + public unified_ugwp_init, unified_ugwp_run, unified_ugwp_final logical :: is_initialized = .false. @@ -146,15 +146,15 @@ subroutine unified_ugwp_init (me, master, nlunit, input_nml_file, logunit, & end subroutine unified_ugwp_init ! ----------------------------------------------------------------------- -! finalize of unified_ugwp (_finalize) +! finalize of unified_ugwp (_final) ! ----------------------------------------------------------------------- !>@brief The subroutine finalizes the GFS UGWP -!> \section arg_table_unified_ugwp_finalize Argument Table -!! \htmlinclude unified_ugwp_finalize.html +!> \section arg_table_unified_ugwp_final Argument Table +!! \htmlinclude unified_ugwp_final.html !! - subroutine unified_ugwp_finalize(do_ugwp_v0,do_ugwp_v0_nst_only, & + subroutine unified_ugwp_final(do_ugwp_v0,do_ugwp_v0_nst_only, & errmsg, errflg) implicit none @@ -169,11 +169,11 @@ subroutine unified_ugwp_finalize(do_ugwp_v0,do_ugwp_v0_nst_only, & if (.not.is_initialized) return - if ( do_ugwp_v0 .or. do_ugwp_v0_nst_only ) call cires_ugwpv0_mod_finalize() + if ( do_ugwp_v0 .or. do_ugwp_v0_nst_only ) call cires_ugwpv0_mod_final() is_initialized = .false. - end subroutine unified_ugwp_finalize + end subroutine unified_ugwp_final ! ----------------------------------------------------------------------- ! originally from ugwp_driver_v0.f diff --git a/physics/GWD/unified_ugwp.meta b/physics/GWD/unified_ugwp.meta index 0e7bc7836..37fbb0908 100644 --- a/physics/GWD/unified_ugwp.meta +++ b/physics/GWD/unified_ugwp.meta @@ -229,7 +229,7 @@ ######################################################################## [ccpp-arg-table] - name = unified_ugwp_finalize + name = unified_ugwp_final type = scheme [do_ugwp_v0] standard_name = flag_for_ugwp_version_0 diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta index 02b6bbe54..9e8c1a4b1 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.meta @@ -184,7 +184,7 @@ [shcnvcw] standard_name = flag_for_saving_shallow_convective_cloud_area_fraction long_name = flag for shallow convective cloud - units = + units = flag dimensions = () type = logical intent = in diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 deleted file mode 100644 index ae92a4789..000000000 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90 +++ /dev/null @@ -1,1638 +0,0 @@ -!> \file GFS_debug.F90 - - -!! -!! This is the place to switch between different debug outputs. -!! - The default behavior for Intel (or any compiler other than GNU) -!! is to print mininmum, maximum and 32-bit Adler checksum for arrays. -!! - The default behavior for GNU is to mininmum, maximum and -!! mean value of arrays, because calculating the checksum leads -!! to segmentation faults with gfortran (bug in malloc?). -!! - If none of the #define preprocessor statements is used, -!! arrays are printed in full (this is often unpractical). -!! - All output to stdout/stderr from these routines are prefixed -!! with 'XXX: ' so that they can be easily removed from the log files -!! using "grep -ve 'XXX: ' ..." if needed. -!! - Only one #define statement can be active at any time -!! -!! Available options for debug output: -!! -!! #define PRINT_SUM: print mininmum, maximum and mean value of arrays -!! -!! #define PRINT_CHKSUM: mininmum, maximum and 32-bit Adler checksum for arrays -!! - -#ifdef __GFORTRAN__ -#define PRINT_SUM -#else -#define PRINT_CHKSUM -#endif - -!! -!! -!! - - module print_var_chksum - - use machine, only: kind_phys - - implicit none - - private - - public chksum_int, chksum_real, print_var - - interface print_var - module procedure print_logic_0d - module procedure print_logic_1d - module procedure print_int_0d - module procedure print_int_1d - module procedure print_int_2d - module procedure print_real_0d - module procedure print_real_1d - module procedure print_real_2d - module procedure print_real_3d - module procedure print_real_4d - end interface - - contains - - subroutine print_logic_0d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - logical, intent(in) :: var - - write(0,'(2a,3i6,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, var - - end subroutine print_logic_0d - - subroutine print_logic_1d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - logical, intent(in) :: var(:) - - integer :: i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,2i8)') 'XXX: ', trim(name), mpirank, omprank, blkno, size(var), count(var) -#else - do i=lbound(var,1),ubound(var,1) - write(0,'(2a,3i6,i6,2e16.7,1x,l)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, lat_d(i), lon_d(i), var(i) - end do -#endif - - end subroutine print_logic_1d - - subroutine print_int_0d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - integer, intent(in) :: var - - write(0,'(2a,3i6,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, var - - end subroutine print_int_0d - - subroutine print_int_1d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - integer, intent(in) :: var(:) - - integer :: i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_int(size(var),var), minval(var), maxval(var) -#else - do i=lbound(var,1),ubound(var,1) - write(0,'(2a,3i6,i6,2e16.7,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, lat_d(i), lon_d(i), var(i) - end do -#endif - - end subroutine print_int_1d - - subroutine print_int_2d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - integer, intent(in) :: var(:,:) - - integer :: i, k - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_int(size(var),var), minval(var), maxval(var) -#else - do i=lbound(var,1),ubound(var,1) - do k=lbound(var,2),ubound(var,2) - write(0,'(2a,3i6,2i6,2e16.7,i15)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, lat_d(i), lon_d(i), var(i,k) - end do - end do -#endif - - end subroutine print_int_2d - - subroutine print_real_0d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var - - write(0,'(2a,3i6,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, var - - end subroutine print_real_0d - - subroutine print_real_1d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var(:) - - integer :: i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),var), minval(var), maxval(var) -#else - do i=lbound(var,1),ubound(var,1) - write(0,'(2a,3i6,i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, lat_d(i), lon_d(i), var(i) - end do -#endif - - end subroutine print_real_1d - - subroutine print_real_2d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var(:,:) - - integer :: k, i - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) -#else - do i=lbound(var,1),ubound(var,1) - do k=lbound(var,2),ubound(var,2) - write(0,'(2a,3i6,2i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, lat_d(i), lon_d(i), var(i,k) - end do - end do -#endif - - end subroutine print_real_2d - - subroutine print_real_3d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var(:,:,:) - - integer :: k, i, l - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) -#else - do i=lbound(var,1),ubound(var,1) - do k=lbound(var,2),ubound(var,2) - do l=lbound(var,3),ubound(var,3) - write(0,'(2a,3i6,3i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, l, lat_d(i), lon_d(i), var(i,k,l) - end do - end do - end do -#endif - - end subroutine print_real_3d - - subroutine print_real_4d(mpirank, omprank, blkno, lat_d, lon_d, name, var) - - integer, intent(in) :: mpirank, omprank, blkno - real(kind_phys), intent(in) :: lat_d(:), lon_d(:) - character(len=*), intent(in) :: name - real(kind_phys), intent(in) :: var(:,:,:,:) - - integer :: k, i, l, m - -#ifdef PRINT_SUM - write(0,'(2a,3i6,3e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, sum(var), minval(var), maxval(var) -#elif defined(PRINT_CHKSUM) - write(0,'(2a,3i6,i20,2e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, chksum_real(size(var),reshape(var,(/size(var)/))), minval(var), maxval(var) -#else - do i=lbound(var,1),ubound(var,1) - do k=lbound(var,2),ubound(var,2) - do l=lbound(var,3),ubound(var,3) - do m=lbound(var,4),ubound(var,4) - write(0,'(2a,3i6,4i6,2e16.7,e35.25)') 'XXX: ', trim(name), mpirank, omprank, blkno, i, k, l, m, lat_d(i), lon_d(i), var(i,k,l,m) - end do - end do - end do - end do -#endif - - end subroutine print_real_4d - - function chksum_int(N, var) result(hash) - - integer, intent(in) :: N - integer, dimension(1:N), intent(in) :: var - integer*8, dimension(1:N) :: int_var - integer*8 :: a, b, i, hash - integer*8, parameter :: mod_adler=65521 - - a=1 - b=0 - i=1 - hash = 0 - int_var = TRANSFER(var, a, N) - - do i= 1, N - a = MOD(a + int_var(i), mod_adler) - b = MOD(b+a, mod_adler) - end do - - hash = ior(b * 65536, a) - - end function chksum_int - - function chksum_real(N, var) result(hash) - - integer, intent(in) :: N - real(kind_phys), dimension(1:N), intent(in) :: var - integer*8, dimension(1:N) :: int_var - integer*8 :: a, b, i, hash - integer*8, parameter :: mod_adler=65521 - - a=1 - b=0 - i=1 - hash = 0 - int_var = TRANSFER(var, a, N) - - do i= 1, N - a = MOD(a + int_var(i), mod_adler) - b = MOD(b+a, mod_adler) - end do - - hash = ior(b * 65536, a) - - end function chksum_real - - end module print_var_chksum - - module GFS_diagtoscreen - - use print_var_chksum, only: print_var - - use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, GFS_statein_type, & - GFS_stateout_type, GFS_sfcprop_type, & - GFS_coupling_type, GFS_grid_type, & - GFS_tbd_type, GFS_cldprop_type, & - GFS_radtend_type, GFS_diag_type - - use CCPP_typedefs, only: GFS_interstitial_type - - implicit none - - private - - public GFS_diagtoscreen_init, GFS_diagtoscreen_timestep_init, GFS_diagtoscreen_run - - contains - -!> \section arg_table_GFS_diagtoscreen_init Argument Table -!! \htmlinclude GFS_diagtoscreen_init.html -!! - subroutine GFS_diagtoscreen_init (Model, Statein, Stateout, Sfcprop, Coupling, & - Grid, Tbd, Cldprop, Radtend, Diag, Interstitial, & - errmsg, errflg) - - implicit none - - !--- interface variables - type(GFS_control_type), intent(in) :: Model - type(GFS_statein_type), intent(in) :: Statein - type(GFS_stateout_type), intent(in) :: Stateout - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_coupling_type), intent(in) :: Coupling - type(GFS_grid_type), intent(in) :: Grid - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_cldprop_type), intent(in) :: Cldprop - type(GFS_radtend_type), intent(in) :: Radtend - type(GFS_diag_type), intent(in) :: Diag - type(GFS_interstitial_type), intent(in) :: Interstitial(:) - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - call GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, & - Coupling, Grid, Tbd, Cldprop, & - Radtend, Diag, Interstitial(1), & - size(Interstitial), -999, errmsg, errflg) - - end subroutine GFS_diagtoscreen_init - -!> \section arg_table_GFS_diagtoscreen_timestep_init Argument Table -!! \htmlinclude GFS_diagtoscreen_timestep_init.html -!! - subroutine GFS_diagtoscreen_timestep_init (Model, Statein, Stateout, Sfcprop, Coupling, & - Grid, Tbd, Cldprop, Radtend, Diag, Interstitial, & - errmsg, errflg) - - implicit none - - !--- interface variables - type(GFS_control_type), intent(in) :: Model - type(GFS_statein_type), intent(in) :: Statein - type(GFS_stateout_type), intent(in) :: Stateout - type(GFS_sfcprop_type), intent(in) :: Sfcprop - type(GFS_coupling_type), intent(in) :: Coupling - type(GFS_grid_type), intent(in) :: Grid - type(GFS_tbd_type), intent(in) :: Tbd - type(GFS_cldprop_type), intent(in) :: Cldprop - type(GFS_radtend_type), intent(in) :: Radtend - type(GFS_diag_type), intent(in) :: Diag - type(GFS_interstitial_type), intent(in) :: Interstitial(:) - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - call GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, & - Coupling, Grid, Tbd, Cldprop, & - Radtend, Diag, Interstitial(1), & - size(Interstitial), -999, errmsg, errflg) - - end subroutine GFS_diagtoscreen_timestep_init - -!> \section arg_table_GFS_diagtoscreen_run Argument Table -!! \htmlinclude GFS_diagtoscreen_run.html -!! - subroutine GFS_diagtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, & - Grid, Tbd, Cldprop, Radtend, Diag, Interstitial, & - nthreads, blkno, errmsg, errflg) - - use mpi_f08 -#ifdef _OPENMP - use omp_lib -#endif - - implicit none - - !--- interface variables - type(GFS_control_type), intent(in ) :: Model - type(GFS_statein_type), intent(in ) :: Statein - type(GFS_stateout_type), intent(in ) :: Stateout - type(GFS_sfcprop_type), intent(in ) :: Sfcprop - type(GFS_coupling_type), intent(in ) :: Coupling - type(GFS_grid_type), intent(in ) :: Grid - type(GFS_tbd_type), intent(in ) :: Tbd - type(GFS_cldprop_type), intent(in ) :: Cldprop - type(GFS_radtend_type), intent(in ) :: Radtend - type(GFS_diag_type), intent(in ) :: Diag - type(GFS_interstitial_type), intent(in) :: Interstitial - integer, intent(in ) :: nthreads - integer, intent(in ) :: blkno - character(len=*), intent(out) :: errmsg - integer, intent(out) :: errflg - - !--- local variables - integer :: impi, iomp, ierr, n, idtend, iprocess, itracer - integer :: mpirank, mpisize - integer :: omprank, ompsize - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - mpirank = Model%me - mpisize = Model%ntasks -#ifdef _OPENMP - omprank = OMP_GET_THREAD_NUM() - ompsize = nthreads -#else - omprank = 0 - ompsize = 1 -#endif - -#ifdef _OPENMP -!$OMP BARRIER -#endif -! call MPI_BARRIER(Model%communicator,ierr) - - do impi=0,mpisize-1 - do iomp=0,ompsize-1 - if (mpirank==impi .and. omprank==iomp) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Model%kdt' , Model%kdt) - ! Sfcprop - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%slmsk' , Sfcprop%slmsk) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%oceanfrac' , Sfcprop%oceanfrac) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%landfrac' , Sfcprop%landfrac) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%lakefrac' , Sfcprop%lakefrac) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsfc' , Sfcprop%tsfc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsfco' , Sfcprop%tsfco) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsfcl' , Sfcprop%tsfcl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tisfc' , Sfcprop%tisfc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowd' , Sfcprop%snowd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorl' , Sfcprop%zorl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorlw' , Sfcprop%zorlw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorll' , Sfcprop%zorll) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorli' , Sfcprop%zorli) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zorlwav' , Sfcprop%zorlwav) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%fice' , Sfcprop%fice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%hprime' , Sfcprop%hprime) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sncovr' , Sfcprop%sncovr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snoalb' , Sfcprop%snoalb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alvsf' , Sfcprop%alvsf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alnsf' , Sfcprop%alnsf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alvwf' , Sfcprop%alvwf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%alnwf' , Sfcprop%alnwf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%facsf' , Sfcprop%facsf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%facwf' , Sfcprop%facwf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%slope' , Sfcprop%slope) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%slope_save', Sfcprop%slope_save) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%shdmin' , Sfcprop%shdmin) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%shdmax' , Sfcprop%shdmax) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tg3' , Sfcprop%tg3) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%vfrac' , Sfcprop%vfrac) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%vtype' , Sfcprop%vtype) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%vtype_save', Sfcprop%vtype_save) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%stype' , Sfcprop%stype) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%stype_save', Sfcprop%stype_save) - - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%scolor' , Sfcprop%scolor) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%scolore_save', Sfcprop%scolor_save) - - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%uustar' , Sfcprop%uustar) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%oro' , Sfcprop%oro) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%oro_uf' , Sfcprop%oro_uf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%hice' , Sfcprop%hice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%weasd' , Sfcprop%weasd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%weasdl' , Sfcprop%weasdl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%%weasdi' , Sfcprop%weasdi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%canopy' , Sfcprop%canopy) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%ffmm' , Sfcprop%ffmm) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%ffhh' , Sfcprop%ffhh) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%f10m' , Sfcprop%f10m) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tprcp' , Sfcprop%tprcp) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%srflag' , Sfcprop%srflag) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%slc' , Sfcprop%slc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smc' , Sfcprop%smc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%stc' , Sfcprop%stc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%t2m' , Sfcprop%t2m) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%q2m' , Sfcprop%q2m) - if (Model%nstf_name(1)>0) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tref ', Sfcprop%tref) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%z_c ', Sfcprop%z_c) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%c_0 ', Sfcprop%c_0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%c_d ', Sfcprop%c_d) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%w_0 ', Sfcprop%w_0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%w_d ', Sfcprop%w_d) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xt ', Sfcprop%xt) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xs ', Sfcprop%xs) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xu ', Sfcprop%xu) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xv ', Sfcprop%xv) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xz ', Sfcprop%xz) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%zm ', Sfcprop%zm) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xtts ', Sfcprop%xtts) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%xzts ', Sfcprop%xzts) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%d_conv ', Sfcprop%d_conv) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%ifd ', Sfcprop%ifd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%dt_cool ', Sfcprop%dt_cool) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qrain ', Sfcprop%qrain) - end if - ! CCPP/RUC only - if (Model%lsm == Model%lsm_ruc) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sh2o', Sfcprop%sh2o) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%smois', Sfcprop%smois) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tslb', Sfcprop%tslb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf_land', Sfcprop%clw_surf_land) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%clw_surf_ice', Sfcprop%clw_surf_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf_land', Sfcprop%qwv_surf_land) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%qwv_surf_ice', Sfcprop%qwv_surf_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%flag_frsoil', Sfcprop%flag_frsoil) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%rhofr', Sfcprop%rhofr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow_land', Sfcprop%tsnow_land) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%tsnow_ice', Sfcprop%tsnow_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac_land', Sfcprop%snowfallac_land) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%snowfallac_ice', Sfcprop%snowfallac_ice) - end if - ! Revised surface albedo and emissivity calculation - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%emis_lnd', Sfcprop%emis_lnd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%emis_ice', Sfcprop%emis_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%emis_wat', Sfcprop%emis_wat) - ! NoahMP and RUC - if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdirvis_lnd', Sfcprop%albdirvis_lnd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdirnir_lnd', Sfcprop%albdirnir_lnd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdifvis_lnd', Sfcprop%albdifvis_lnd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdifnir_lnd', Sfcprop%albdifnir_lnd) - end if - ! RUC only - if (Model%lsm == Model%lsm_ruc) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdirvis_ice', Sfcprop%albdirvis_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdifvis_ice', Sfcprop%albdifvis_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdirnir_ice', Sfcprop%albdirnir_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%albdifnir_ice', Sfcprop%albdifnir_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sfalb_lnd', Sfcprop%sfalb_lnd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sfalb_ice', Sfcprop%sfalb_ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%sfalb_lnd_bck', Sfcprop%sfalb_lnd_bck) - end if - ! Radtend - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%upfxc', Radtend%sfcfsw(:)%upfxc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%dnfxc', Radtend%sfcfsw(:)%dnfxc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%upfx0', Radtend%sfcfsw(:)%upfx0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcfsw%dnfx0', Radtend%sfcfsw(:)%dnfx0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%upfxc', Radtend%sfcflw(:)%upfxc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%upfx0', Radtend%sfcflw(:)%upfx0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%dnfxc', Radtend%sfcflw(:)%dnfxc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfcflw%dnfx0', Radtend%sfcflw(:)%dnfx0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%htrsw', Radtend%htrsw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%htrlw', Radtend%htrlw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%sfalb', Radtend%sfalb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%coszen', Radtend%coszen) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%tsflw', Radtend%tsflw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%semis', Radtend%semis) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%coszdg', Radtend%coszdg) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%swhc', Radtend%swhc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%lwhc', Radtend%lwhc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Radtend%lwhd', Radtend%lwhd) - ! Tbd - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%icsdsw' , Tbd%icsdsw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%icsdlw' , Tbd%icsdlw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%ozpl' , Tbd%ozpl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%h2opl' , Tbd%h2opl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%rann' , Tbd%rann) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acv' , Tbd%acv) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acvb' , Tbd%acvb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%acvt' , Tbd%acvt) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%hpbl' , Tbd%hpbl) - if(Model%imfdeepcnv>0 .or. Model%imfshalcnv>0) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%ud_mf' , Tbd%ud_mf) - endif - if (Model%do_sppt) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtdtnp' , Tbd%dtdtnp) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dtotprcp' , Tbd%dtotprcp) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dcnvprcp' , Tbd%dcnvprcp) - end if - if (Model%cplflx .or. Model%cplchm) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%drain_cpl' , Tbd%drain_cpl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%dsnow_cpl' , Tbd%dsnow_cpl) - end if - if (Model%nctp > 0 .and. Model%cscnv) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_fctd' , Tbd%phy_fctd) - end if - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_f2d' , Tbd%phy_f2d) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_f3d' , Tbd%phy_f3d) - do n=1,size(Tbd%phy_f3d(1,1,:)) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%phy_f3d_n' , Tbd%phy_f3d(:,:,n)) - end do - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%in_nm' , Tbd%in_nm) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%ccn_nm' , Tbd%ccn_nm) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%aer_nm' , Tbd%aer_nm) - if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%cactiv' , Tbd%cactiv) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%cactiv_m' , Tbd%cactiv_m) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Tbd%aod_gf' , Tbd%aod_gf) - end if - ! Diag - !call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%fluxr ', Diag%fluxr) - !do n=1,size(Diag%fluxr(1,:)) - ! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%fluxr_n ', Diag%fluxr(:,n)) - !end do - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%srunoff ', Diag%srunoff) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%evbs ', Diag%evbs) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%evcw ', Diag%evcw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sbsno ', Diag%sbsno) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%evbsa ', Diag%evbsa) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%evcwa ', Diag%evcwa) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%snohfa ', Diag%snohfa) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%transa ', Diag%transa) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sbsnoa ', Diag%sbsnoa) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%snowca ', Diag%snowca) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%soilm ', Diag%soilm) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tmpmin ', Diag%tmpmin) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tmpmax ', Diag%tmpmax) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dusfc ', Diag%dusfc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvsfc ', Diag%dvsfc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dtsfc ', Diag%dtsfc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dqsfc ', Diag%dqsfc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totprcp ', Diag%totprcp) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totice ', Diag%totice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totsnw ', Diag%totsnw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totgrp ', Diag%totgrp) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totprcpb ', Diag%totprcpb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%toticeb ', Diag%toticeb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totsnwb ', Diag%totsnwb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%totgrpb ', Diag%totgrpb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%suntim ', Diag%suntim) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%runoff ', Diag%runoff) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ep ', Diag%ep) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cldwrk ', Diag%cldwrk) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dugwd ', Diag%dugwd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvgwd ', Diag%dvgwd) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%psmean ', Diag%psmean) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cnvprcp ', Diag%cnvprcp) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cnvprcpb ', Diag%cnvprcpb) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%spfhmin ', Diag%spfhmin) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%spfhmax ', Diag%spfhmax) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%u10mmax ', Diag%u10mmax) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%v10mmax ', Diag%v10mmax) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%wind10mmax ', Diag%wind10mmax) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%rain ', Diag%rain) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%rainc ', Diag%rainc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ice ', Diag%ice) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%snow ', Diag%snow) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%graupel ', Diag%graupel) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%u10m ', Diag%u10m) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%v10m ', Diag%v10m) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dpt2m ', Diag%dpt2m) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%zlvl ', Diag%zlvl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%psurf ', Diag%psurf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%pwat ', Diag%pwat) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%t1 ', Diag%t1) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%q1 ', Diag%q1) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%u1 ', Diag%u1) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%v1 ', Diag%v1) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%chh ', Diag%chh) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%cmm ', Diag%cmm) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dlwsfci ', Diag%dlwsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ulwsfci ', Diag%ulwsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dswsfci ', Diag%dswsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dswsfcci ', Diag%dswsfcci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%nswsfci ', Diag%nswsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%uswsfci ', Diag%uswsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dusfci ', Diag%dusfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvsfci ', Diag%dvsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dtsfci ', Diag%dtsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dqsfci ', Diag%dqsfci) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%gfluxi ', Diag%gfluxi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%epi ', Diag%epi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%smcwlt2 ', Diag%smcwlt2) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%smcref2 ', Diag%smcref2) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sr ', Diag%sr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdomr ', Diag%tdomr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdomzr ', Diag%tdomzr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdomip ', Diag%tdomip) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%tdoms ', Diag%tdoms) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%trans ', Diag%trans) - ! CCPP/RUC only - if (Model%lsm == Model%lsm_ruc) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Sfcprop%wetness ', Sfcprop%wetness) - else - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%wet1 ', Diag%wet1) - end if - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%zmtnblck ', Diag%zmtnblck) - if (Model%ldiag3d) then - !do itracer=2,Model%ntracp100 - ! do iprocess=1,Model%nprocess - ! idtend = Model%dtidx(itracer,iprocess) - ! if(idtend>=1) then - ! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, & - ! 'dtend_'//Model%dtend_tracer_labels(itracer)//'_' & - ! //Model%dtend_cause_labels(iprocess), Diag%dtend(1,1,idtend)) - ! endif - ! enddo - !enddo - if (Model%qdiag3d) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%upd_mf ', Diag%upd_mf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dwn_mf ', Diag%dwn_mf) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_mf ', Diag%det_mf) - end if - end if - if(Model%lradar) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%refl_10cm ', Diag%refl_10cm) - end if - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dkt ', Diag%dkt) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dku ', Diag%dku) - ! CCPP/MYNNEDMF only - if (Model%do_mynnedmf) then - if (Model%bl_mynn_output .ne. 0) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_a ', Diag%edmf_a) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_w ', Diag%edmf_w) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_qt ', Diag%edmf_qt) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_thl ', Diag%edmf_thl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_ent ', Diag%edmf_ent) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%edmf_qc ', Diag%edmf_qc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sub_thl ', Diag%sub_thl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%sub_sqv ', Diag%sub_sqv) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_thl ', Diag%det_thl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%det_sqv ', Diag%det_sqv) - end if - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%maxwidth ', Diag%maxwidth) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%maxMF ', Diag%maxMF) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%ztop_plume ', Diag%ztop_plume) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_h ', Diag%exch_h) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%exch_m ', Diag%exch_m) - end if - ! UGWP - incomplete list - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_gw ', Diag%dudt_gw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_gw ', Diag%dvdt_gw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dtdt_gw ', Diag%dtdt_gw) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%kdis_gw ', Diag%kdis_gw) - if (Model%do_ugwp_v1 .or. Model%gwd_opt==33 .or. Model%gwd_opt==22) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_ogw ', Diag%dudt_ogw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_ogw ', Diag%dvdt_ogw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_obl ', Diag%dudt_obl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_obl ', Diag%dvdt_obl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_oss ', Diag%dudt_oss ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_oss ', Diag%dvdt_oss ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_ofd ', Diag%dudt_ofd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dvdt_ofd ', Diag%dvdt_ofd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_ogwcol ', Diag%du_ogwcol) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_ogwcol ', Diag%dv_ogwcol) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_oblcol ', Diag%du_oblcol) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_oblcol ', Diag%dv_oblcol) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_osscol ', Diag%du_osscol) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_osscol ', Diag%dv_osscol) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%du_ofdcol ', Diag%du_ofdcol) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dv_ofdcol ', Diag%dv_ofdcol) - else - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Diag%dudt_ogw ', Diag%dudt_ogw) - end if - ! Statein - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%phii' , Statein%phii) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prsi' , Statein%prsi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prsik' , Statein%prsik) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%phil' , Statein%phil) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prsl' , Statein%prsl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%prslk' , Statein%prslk) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%pgr' , Statein%pgr) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%ugrs' , Statein%ugrs) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%vgrs' , Statein%vgrs) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%vvl' , Statein%vvl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%tgrs' , Statein%tgrs) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%qgrs' , Statein%qgrs) - do n=1,size(Statein%qgrs(1,1,:)) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%qgrs_n', Statein%qgrs(:,:,n)) - end do - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%diss_est', Statein%diss_est) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%smc' , Statein%smc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%stc' , Statein%stc) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Statein%slc' , Statein%slc) - ! Stateout - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gu0', Stateout%gu0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gv0', Stateout%gv0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gt0', Stateout%gt0) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gq0', Stateout%gq0) - do n=1,size(Stateout%gq0(1,1,:)) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Stateout%gq0_n', Stateout%gq0(:,:,n)) - end do - ! Coupling - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirbmdi', Coupling%nirbmdi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirdfdi', Coupling%nirdfdi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visbmdi', Coupling%visbmdi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visdfdi', Coupling%visdfdi) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirbmui', Coupling%nirbmui) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nirdfui', Coupling%nirdfui) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visbmui', Coupling%visbmui) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%visdfui', Coupling%visdfui) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfcdsw ', Coupling%sfcdsw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfcnsw ', Coupling%sfcnsw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfcdlw ', Coupling%sfcdlw ) - if (Model%cplflx .or. Model%do_sppt .or. Model%cplchm) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%rain_cpl', Coupling%rain_cpl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%snow_cpl', Coupling%snow_cpl) - end if -! if (Model%cplwav2atm) then -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%zorlwav_cpl' , Coupling%zorlwav_cpl ) -! end if - if (Model%cplflx) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%oro_cpl' , Coupling%oro_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%slmsk_cpl' , Coupling%slmsk_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%slimskin_cpl', Coupling%slimskin_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dusfcin_cpl ', Coupling%dusfcin_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvsfcin_cpl ', Coupling%dvsfcin_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dtsfcin_cpl ', Coupling%dtsfcin_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqsfcin_cpl ', Coupling%dqsfcin_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ulwsfcin_cpl', Coupling%ulwsfcin_cpl ) -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%tseain_cpl ', Coupling%tseain_cpl ) -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%tisfcin_cpl ', Coupling%tisfcin_cpl ) -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ficein_cpl ', Coupling%ficein_cpl ) -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%hicein_cpl ', Coupling%hicein_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%hsnoin_cpl ', Coupling%hsnoin_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dusfc_cpl ', Coupling%dusfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvsfc_cpl ', Coupling%dvsfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dtsfc_cpl ', Coupling%dtsfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqsfc_cpl ', Coupling%dqsfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dlwsfc_cpl ', Coupling%dlwsfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dswsfc_cpl ', Coupling%dswsfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirbm_cpl ', Coupling%dnirbm_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirdf_cpl ', Coupling%dnirdf_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisbm_cpl ', Coupling%dvisbm_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisdf_cpl ', Coupling%dvisdf_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nlwsfc_cpl ', Coupling%nlwsfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nswsfc_cpl ', Coupling%nswsfc_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirbm_cpl ', Coupling%nnirbm_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirdf_cpl ', Coupling%nnirdf_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisbm_cpl ', Coupling%nvisbm_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisdf_cpl ', Coupling%nvisdf_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dusfci_cpl ', Coupling%dusfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvsfci_cpl ', Coupling%dvsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dtsfci_cpl ', Coupling%dtsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dqsfci_cpl ', Coupling%dqsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dlwsfci_cpl ', Coupling%dlwsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dswsfci_cpl ', Coupling%dswsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirbmi_cpl ', Coupling%dnirbmi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dnirdfi_cpl ', Coupling%dnirdfi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisbmi_cpl ', Coupling%dvisbmi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%dvisdfi_cpl ', Coupling%dvisdfi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nlwsfci_cpl ', Coupling%nlwsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nswsfci_cpl ', Coupling%nswsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirbmi_cpl ', Coupling%nnirbmi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nnirdfi_cpl ', Coupling%nnirdfi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisbmi_cpl ', Coupling%nvisbmi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nvisdfi_cpl ', Coupling%nvisdfi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%t2mi_cpl ', Coupling%t2mi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%q2mi_cpl ', Coupling%q2mi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%u10mi_cpl ', Coupling%u10mi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%v10mi_cpl ', Coupling%v10mi_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%tsfci_cpl ', Coupling%tsfci_cpl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%psurfi_cpl ', Coupling%psurfi_cpl ) - end if - if (Model%cplchm) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%rainc_cpl', Coupling%rainc_cpl) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ushfsfci ', Coupling%ushfsfci ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%pfi_lsan', Coupling%pfi_lsan ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%pfl_lsan', Coupling%pfl_lsan ) - end if - if (Model%do_sppt) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sppt_wts', Coupling%sppt_wts) - end if - if (Model%do_shum) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%shum_wts', Coupling%shum_wts) - end if - if (Model%do_skeb) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%skebu_wts', Coupling%skebu_wts ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%skebv_wts', Coupling%skebv_wts ) - end if - if (Model%lndp_type /= 0) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%sfc_wts' , Coupling%sfc_wts ) - end if - if (Model%do_ca) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca1 ', Coupling%ca1 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_deep ', Coupling%ca_deep ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_turb ', Coupling%ca_turb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_shal ', Coupling%ca_shal ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_rad ', Coupling%ca_rad ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%ca_micro ', Coupling%ca_micro ) - end if - if(Model%imp_physics == Model%imp_physics_thompson .and. Model%ltaerosol) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nwfa2d', Coupling%nwfa2d) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%nifa2d', Coupling%nifa2d) - end if - if (Model%do_RRTMGP) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%fluxlwUP_jac', Coupling%fluxlwUP_jac) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Coupling%htrlw', Coupling%htrlw) - end if - ! - ! Grid - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlon ', Grid%xlon ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlat ', Grid%xlat ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%xlat_d', Grid%xlat_d) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%sinlat', Grid%sinlat) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%coslat', Grid%coslat) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%area ', Grid%area ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%dx ', Grid%dx ) - if (Model%kdt>0 .and. Model%ntoz>0) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_o3 ', Grid%ddy_o3 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_o3', Grid%jindx1_o3) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_o3', Grid%jindx2_o3) - endif - if (Model%kdt>0 .and. Model%h2o_phys) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_h ', Grid%ddy_h ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_h', Grid%jindx1_h) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_h', Grid%jindx2_h) - endif - if (Model%kdt>0 .and. Model%do_ugwp_v1) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_j1tau ', Grid%ddy_j1tau ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%ddy_j2tau ', Grid%ddy_j2tau ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx1_tau', Grid%jindx1_tau ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Grid%jindx2_tau', Grid%jindx2_tau ) - endif - end if -#ifdef _OPENMP -!$OMP BARRIER -#endif - end do -! call MPI_BARRIER(Model%communicator,ierr) - end do - -#ifdef _OPENMP -!$OMP BARRIER -#endif -! call MPI_BARRIER(Model%communicator,ierr) - - end subroutine GFS_diagtoscreen_run - - end module GFS_diagtoscreen - - - module GFS_interstitialtoscreen - - use print_var_chksum, only: print_var - - use machine, only: kind_phys - - use GFS_typedefs, only: GFS_control_type, GFS_statein_type, & - GFS_stateout_type, GFS_sfcprop_type, & - GFS_coupling_type, GFS_grid_type, & - GFS_tbd_type, GFS_cldprop_type, & - GFS_radtend_type, GFS_diag_type - - use CCPP_typedefs, only: GFS_interstitial_type - - - implicit none - - private - - public GFS_interstitialtoscreen_run - - contains - -!> \section arg_table_GFS_interstitialtoscreen_run Argument Table -!! \htmlinclude GFS_interstitialtoscreen_run.html -!! - subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coupling, & - Grid, Tbd, Cldprop, Radtend, Diag, Interstitial, & - nthreads, blkno, errmsg, errflg) - - use mpi_f08 -#ifdef _OPENMP - use omp_lib -#endif - implicit none - - !--- interface variables - type(GFS_control_type), intent(in ) :: Model - type(GFS_statein_type), intent(in ) :: Statein - type(GFS_stateout_type), intent(in ) :: Stateout - type(GFS_sfcprop_type), intent(in ) :: Sfcprop - type(GFS_coupling_type), intent(in ) :: Coupling - type(GFS_grid_type), intent(in ) :: Grid - type(GFS_tbd_type), intent(in ) :: Tbd - type(GFS_cldprop_type), intent(in ) :: Cldprop - type(GFS_radtend_type), intent(in ) :: Radtend - type(GFS_diag_type), intent(in ) :: Diag - type(GFS_interstitial_type), intent(in) :: Interstitial - integer, intent(in ) :: nthreads - integer, intent(in ) :: blkno - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - !--- local variables - integer :: impi, iomp, ierr - integer :: mpirank, mpisize - integer :: omprank, ompsize - integer :: istart, iend, kstart, kend - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - mpirank = Model%me - call MPI_COMM_SIZE(Model%communicator, mpisize, ierr) -#ifdef _OPENMP - omprank = OMP_GET_THREAD_NUM() - ompsize = nthreads -#else - omprank = 0 - ompsize = 1 -#endif - -#ifdef _OPENMP -!$OMP BARRIER -#endif -! call MPI_BARRIER(Model%communicator,ierr) - - do impi=0,mpisize-1 - do iomp=0,ompsize-1 - if (mpirank==impi .and. omprank==iomp) then - ! Print static variables - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%itc ', Interstitial%itc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nsamftrac ', Interstitial%nsamftrac ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nscav ', Interstitial%nscav ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ntiwx ', Interstitial%ntiwx ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nvdiff ', Interstitial%nvdiff ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%trans_aero ', Interstitial%trans_aero ) - ! Print all other variables - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_land ', Interstitial%adjsfculw_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_ice ', Interstitial%adjsfculw_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjsfculw_water ', Interstitial%adjsfculw_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirbmd ', Interstitial%adjnirbmd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirbmu ', Interstitial%adjnirbmu ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirdfd ', Interstitial%adjnirdfd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjnirdfu ', Interstitial%adjnirdfu ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisbmd ', Interstitial%adjvisbmd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisbmu ', Interstitial%adjvisbmu ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisdfu ', Interstitial%adjvisdfu ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%adjvisdfd ', Interstitial%adjvisdfd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%aerodp ', Interstitial%aerodp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%alb1d ', Interstitial%alb1d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%bexp1d ', Interstitial%bexp1d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd ', Interstitial%cd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_ice ', Interstitial%cd_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_land ', Interstitial%cd_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cd_water ', Interstitial%cd_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq ', Interstitial%cdq ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_ice ', Interstitial%cdq_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_land ', Interstitial%cdq_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cdq_water ', Interstitial%cdq_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_ice ', Interstitial%chh_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_land ', Interstitial%chh_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%chh_water ', Interstitial%chh_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldf ', Interstitial%cldf ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldsa ', Interstitial%cldsa ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldtaulw ', Interstitial%cldtaulw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cldtausw ', Interstitial%cldtausw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cld1d ', Interstitial%cld1d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clw ', Interstitial%clw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clx ', Interstitial%clx ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clouds ', Interstitial%clouds ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_ice ', Interstitial%cmm_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_land ', Interstitial%cmm_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cmm_water ', Interstitial%cmm_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnvc ', Interstitial%cnvc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ctei_r ', Interstitial%ctei_r ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ctei_rml ', Interstitial%ctei_rml ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cumabs ', Interstitial%cumabs ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dd_mf ', Interstitial%dd_mf ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%de_lgth ', Interstitial%de_lgth ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%del ', Interstitial%del ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%del_gz ', Interstitial%del_gz ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%delr ', Interstitial%delr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dlength ', Interstitial%dlength ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dqdt ', Interstitial%dqdt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dqsfc1 ', Interstitial%dqsfc1 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%drain ', Interstitial%drain ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtdt ', Interstitial%dtdt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtsfc1 ', Interstitial%dtsfc1 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtzm ', Interstitial%dtzm ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dt_mf ', Interstitial%dt_mf ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt ', Interstitial%dudt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dusfcg ', Interstitial%dusfcg ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dusfc1 ', Interstitial%dusfc1 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvdftra ', Interstitial%dvdftra ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvdt ', Interstitial%dvdt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvsfcg ', Interstitial%dvsfcg ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvsfc1 ', Interstitial%dvsfc1 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dzlyr ', Interstitial%dzlyr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%elvmax ', Interstitial%elvmax ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d ', Interstitial%ep1d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_ice ', Interstitial%ep1d_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_land ', Interstitial%ep1d_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ep1d_water ', Interstitial%ep1d_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_ice ', Interstitial%evap_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_land ', Interstitial%evap_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%evap_water ', Interstitial%evap_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ext_diag_thompson_reset', Interstitial%ext_diag_thompson_reset) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%faerlw ', Interstitial%faerlw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%faersw ', Interstitial%faersw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_ice ', Interstitial%ffhh_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_land ', Interstitial%ffhh_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffhh_water ', Interstitial%ffhh_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2 ', Interstitial%fh2 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_ice ', Interstitial%fh2_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_land ', Interstitial%fh2_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fh2_water ', Interstitial%fh2_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_cice ', Interstitial%flag_cice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_guess ', Interstitial%flag_guess ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%flag_iter ', Interstitial%flag_iter ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_ice ', Interstitial%ffmm_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_land ', Interstitial%ffmm_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ffmm_water ', Interstitial%ffmm_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10 ', Interstitial%fm10 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_ice ', Interstitial%fm10_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_land ', Interstitial%fm10_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fm10_water ', Interstitial%fm10_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%frland ', Interstitial%frland ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fscav ', Interstitial%fscav ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fswtr ', Interstitial%fswtr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw ', Interstitial%gabsbdlw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_ice ', Interstitial%gabsbdlw_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_land ', Interstitial%gabsbdlw_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gabsbdlw_water ', Interstitial%gabsbdlw_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamma ', Interstitial%gamma ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamq ', Interstitial%gamq ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gamt ', Interstitial%gamt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gasvmr ', Interstitial%gasvmr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx ', Interstitial%gflx ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_ice ', Interstitial%gflx_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_land ', Interstitial%gflx_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gflx_water ', Interstitial%gflx_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gwdcu ', Interstitial%gwdcu ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%gwdcv ', Interstitial%gwdcv ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zvfun ', Interstitial%zvfun ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hffac ', Interstitial%hffac ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflxq ', Interstitial%hflxq ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_ice ', Interstitial%hflx_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_land ', Interstitial%hflx_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%hflx_water ', Interstitial%hflx_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htlwc ', Interstitial%htlwc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htlw0 ', Interstitial%htlw0 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htswc ', Interstitial%htswc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%htsw0 ', Interstitial%htsw0 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dry ', Interstitial%dry ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%idxday ', Interstitial%idxday ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icy ', Interstitial%icy ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%lake ', Interstitial%lake ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ocean ', Interstitial%ocean ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%islmsk ', Interstitial%islmsk ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%islmsk_cice ', Interstitial%islmsk_cice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wet ', Interstitial%wet ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kb ', Interstitial%kb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kbot ', Interstitial%kbot ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kcnv ', Interstitial%kcnv ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kd ', Interstitial%kd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kinver ', Interstitial%kinver ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kpbl ', Interstitial%kpbl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kt ', Interstitial%kt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ktop ', Interstitial%ktop ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%max_hourly_reset ', Interstitial%max_hourly_reset ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%mbota ', Interstitial%mbota ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%mtopa ', Interstitial%mtopa ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%nday ', Interstitial%nday ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oa4 ', Interstitial%oa4 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oc ', Interstitial%oc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%olyr ', Interstitial%olyr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%plvl ', Interstitial%plvl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%plyr ', Interstitial%plyr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%prcpmp ', Interstitial%prcpmp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%prnum ', Interstitial%prnum ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qlyr ', Interstitial%qlyr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_ice ', Interstitial%qss_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_land ', Interstitial%qss_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qss_water ', Interstitial%qss_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raddt ', Interstitial%raddt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raincd ', Interstitial%raincd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%raincs ', Interstitial%raincs ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainmcadj ', Interstitial%rainmcadj ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainp ', Interstitial%rainp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb ', Interstitial%rb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_ice ', Interstitial%rb_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_land ', Interstitial%rb_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rb_water ', Interstitial%rb_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rhc ', Interstitial%rhc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%runoff ', Interstitial%runoff ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_q ', Interstitial%save_q ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_t ', Interstitial%save_t ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_tcp ', Interstitial%save_tcp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_u ', Interstitial%save_u ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%save_v ', Interstitial%save_v ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%uvbfc ', Interstitial%scmpsw%uvbfc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%uvbf0 ', Interstitial%scmpsw%uvbf0 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%nirbm ', Interstitial%scmpsw%nirbm ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%nirdf ', Interstitial%scmpsw%nirdf ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%visbm ', Interstitial%scmpsw%visbm ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%scmpsw%visdf ', Interstitial%scmpsw%visdf ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sfcalb ', Interstitial%sfcalb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigma ', Interstitial%sigma ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmaf ', Interstitial%sigmaf ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmafrac ', Interstitial%sigmafrac ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%sigmatot ', Interstitial%sigmatot ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowc ', Interstitial%snowc ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snohf ', Interstitial%snohf ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowmt ', Interstitial%snowmt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress ', Interstitial%stress ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_ice ', Interstitial%stress_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_land ', Interstitial%stress_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%stress_water ', Interstitial%stress_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%theta ', Interstitial%theta ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tlvl ', Interstitial%tlvl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tlyr ', Interstitial%tlyr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_ice ', Interstitial%tprcp_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_land ', Interstitial%tprcp_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tprcp_water ', Interstitial%tprcp_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tseal ', Interstitial%tseal ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfa ', Interstitial%tsfa ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfc_water ', Interstitial%tsfc_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsfg ', Interstitial%tsfg ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_ice ', Interstitial%tsurf_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_land ', Interstitial%tsurf_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tsurf_water ', Interstitial%tsurf_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_ice ', Interstitial%uustar_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_land ', Interstitial%uustar_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%uustar_water ', Interstitial%uustar_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vdftra ', Interstitial%vdftra ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vegf1d ', Interstitial%vegf1d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wcbmax ', Interstitial%wcbmax ) -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_ice ', Interstitial%weasd_ice ) -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_land ', Interstitial%weasd_land ) -! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_water ', Interstitial%weasd_water ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wind ', Interstitial%wind ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work1 ', Interstitial%work1 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work2 ', Interstitial%work2 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work3 ', Interstitial%work3 ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xcosz ', Interstitial%xcosz ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xlai1d ', Interstitial%xlai1d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%xmu ', Interstitial%xmu ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%z01d ', Interstitial%z01d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zt1d ', Interstitial%zt1d ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ztmax_ice ', Interstitial%ztmax_ice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ztmax_land ', Interstitial%ztmax_land ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ztmax_water ', Interstitial%ztmax_water ) - ! UGWP - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_mtb ', Interstitial%tau_mtb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_ogw ', Interstitial%tau_ogw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_tofd ', Interstitial%tau_tofd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_ngw ', Interstitial%tau_ngw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tau_oss ', Interstitial%tau_oss ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_mtb ', Interstitial%dudt_mtb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_tms ', Interstitial%dudt_tms ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zmtb ', Interstitial%zmtb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zlwb ', Interstitial%zlwb ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zogw ', Interstitial%zogw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%zngw ', Interstitial%zngw ) - ! UGWP v1 - if (Model%do_ugwp_v1) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dudt_ngw ', Interstitial%dudt_ngw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dvdt_ngw ', Interstitial%dvdt_ngw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%dtdt_ngw ', Interstitial%dtdt_ngw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%kdis_ngw ', Interstitial%kdis_ngw ) - end if - !-- GSD drag suite - if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & - Model%gwd_opt==2 .or. Model%gwd_opt==22) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%varss ', Interstitial%varss ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ocss ', Interstitial%ocss ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%oa4ss ', Interstitial%oa4ss ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clxss ', Interstitial%clxss ) - end if - ! GFDL and Thompson MP - if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_nssl) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%graupelmp ', Interstitial%graupelmp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%icemp ', Interstitial%icemp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%rainmp ', Interstitial%rainmp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowmp ', Interstitial%snowmp ) - ! Morrison-Gettelman - else if (Model%imp_physics == Model%imp_physics_mg) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncgl ', Interstitial%ncgl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncpr ', Interstitial%ncpr ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncps ', Interstitial%ncps ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qgl ', Interstitial%qgl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qrn ', Interstitial%qrn ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qsnw ', Interstitial%qsnw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qlcn ', Interstitial%qlcn ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qicn ', Interstitial%qicn ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%w_upi ', Interstitial%w_upi ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cf_upi ', Interstitial%cf_upi ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_mfd ', Interstitial%cnv_mfd ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_dqldt ', Interstitial%cnv_dqldt ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%clcn ', Interstitial%clcn ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_fice ', Interstitial%cnv_fice ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_ndrop ', Interstitial%cnv_ndrop ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cnv_nice ', Interstitial%cnv_nice ) - end if - ! SHOC - if (Model%do_shoc) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%ncgl ', Interstitial%ncgl ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qrn ', Interstitial%qrn ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qsnw ', Interstitial%qsnw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qgl ', Interstitial%qgl ) - end if - ! Noah MP - if (Model%lsm == Model%lsm_noahmp) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%t2mmp ', Interstitial%t2mmp ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%q2mp ', Interstitial%q2mp ) - end if - ! RRTMGP - if (Model%do_RRTMGP) then - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%aerosolslw ', Interstitial%aerosolslw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%aerosolssw ', Interstitial%aerosolssw ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%precip_frac ', Interstitial%precip_frac ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwUP_allsky ', Interstitial%fluxlwUP_allsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwDOWN_allsky ', Interstitial%fluxlwDOWN_allsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwUP_clrsky ', Interstitial%fluxlwUP_clrsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxlwDOWN_clrsky ', Interstitial%fluxlwDOWN_clrsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswUP_allsky ', Interstitial%fluxswUP_allsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswDOWN_allsky ', Interstitial%fluxswDOWN_allsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswUP_clrsky ', Interstitial%fluxswUP_clrsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%fluxswDOWN_clrsky ', Interstitial%fluxswDOWN_clrsky ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%relhum ', Interstitial%relhum ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%q_lay ', Interstitial%q_lay ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%qs_lay ', Interstitial%qs_lay ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%deltaZ ', Interstitial%deltaZ ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%p_lay ', Interstitial%p_lay ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%p_lev ', Interstitial%p_lev ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%t_lay ', Interstitial%t_lay ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%t_lev ', Interstitial%t_lev ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%tv_lay ', Interstitial%tv_lay ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%cloud_overlap_param ', Interstitial%cloud_overlap_param ) - call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%precip_overlap_param', Interstitial%precip_overlap_param ) - end if - end if -#ifdef _OPENMP -!$OMP BARRIER -#endif - end do -! call MPI_BARRIER(Model%communicator,ierr) - end do - -#ifdef _OPENMP -!$OMP BARRIER -#endif -! call MPI_BARRIER(Model%communicator,ierr) - - end subroutine GFS_interstitialtoscreen_run - - end module GFS_interstitialtoscreen - - module GFS_abort - - private - - public GFS_abort_run - - contains - -!> \section arg_table_GFS_abort_run Argument Table -!! \htmlinclude GFS_abort_run.html -!! - subroutine GFS_abort_run (Model, blkno, errmsg, errflg) - - use machine, only: kind_phys - use GFS_typedefs, only: GFS_control_type - - implicit none - - !--- interface variables - type(GFS_control_type), intent(in ) :: Model - integer, intent(in ) :: blkno - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Initialize CCPP error handling variables - errmsg = '' - errflg = 0 - - if (Model%kdt==1 .and. blkno==size(Model%blksz)) then - if (Model%me==Model%master) write(0,*) "GFS_abort_run: ABORTING MODEL" - call sleep(10) - stop - end if - - end subroutine GFS_abort_run - - end module GFS_abort - - module GFS_checkland - - private - - public GFS_checkland_run - - contains - -!> \section arg_table_GFS_checkland_run Argument Table -!! \htmlinclude GFS_checkland_run.html -!! - subroutine GFS_checkland_run (me, master, blkno, im, kdt, iter, flag_iter, flag_guess, & - flag_init, flag_restart, frac_grid, isot, ivegsrc, stype,scolor, vtype, slope, & - dry, icy, wet, lake, ocean, oceanfrac, landfrac, lakefrac, slmsk, islmsk, & - zorl, zorlw, zorll, zorli, fice, errmsg, errflg ) - - use machine, only: kind_phys - - implicit none - - ! Interface variables - integer, intent(in ) :: me - integer, intent(in ) :: master - integer, intent(in ) :: blkno - integer, intent(in ) :: im - integer, intent(in ) :: kdt - integer, intent(in ) :: iter - logical, intent(in ) :: flag_iter(:) - logical, intent(in ) :: flag_guess(:) - logical, intent(in ) :: flag_init - logical, intent(in ) :: flag_restart - logical, intent(in ) :: frac_grid - integer, intent(in ) :: isot - integer, intent(in ) :: ivegsrc - integer, intent(in ) :: stype(:) - integer, intent(in ) :: scolor(:) - - integer, intent(in ) :: vtype(:) - integer, intent(in ) :: slope(:) - logical, intent(in ) :: dry(:) - logical, intent(in ) :: icy(:) - logical, intent(in ) :: wet(:) - logical, intent(in ) :: lake(:) - logical, intent(in ) :: ocean(:) - real(kind_phys), intent(in ) :: oceanfrac(:) - real(kind_phys), intent(in ) :: landfrac(:) - real(kind_phys), intent(in ) :: lakefrac(:) - real(kind_phys), intent(in ) :: slmsk(:) - integer, intent(in ) :: islmsk(:) - real(kind_phys), intent(in ) :: zorl(:) - real(kind_phys), intent(in ) :: zorlw(:) - real(kind_phys), intent(in ) :: zorll(:) - real(kind_phys), intent(in ) :: zorli(:) - real(kind_phys), intent(in ) :: fice(:) - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Local variables - integer :: i - - errflg = 0 - errmsg = '' - - write(0,'(a,i5)') 'YYY: me :', me - write(0,'(a,i5)') 'YYY: master :', master - write(0,'(a,i5)') 'YYY: blkno :', blkno - write(0,'(a,i5)') 'YYY: im :', im - write(0,'(a,i5)') 'YYY: kdt :', kdt - write(0,'(a,i5)') 'YYY: iter :', iter - write(0,'(a,1x,l)') 'YYY: flag_init :', flag_init - write(0,'(a,1x,l)') 'YYY: flag_restart :', flag_restart - write(0,'(a,1x,l)') 'YYY: frac_grid :', frac_grid - write(0,'(a,i5)') 'YYY: isot :', isot - write(0,'(a,i5)') 'YYY: ivegsrc :', ivegsrc - - do i=1,im - !if (fice(i)>0.999) then - !if (vegtype(i)==15) then - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_iter(i) :', i, blkno, flag_iter(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, flag_guess(i) :', i, blkno, flag_guess(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, stype(i) :', i, blkno, stype(i) - - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, scolor(i) :', i, blkno, scolor(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, vtype(i) :', i, blkno, vtype(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, slope(i) :', i, blkno, slope(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, dry(i) :', i, blkno, dry(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, icy(i) :', i, blkno, icy(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, wet(i) :', i, blkno, wet(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, lake(i) :', i, blkno, lake(i) - write(0,'(a,2i5,1x,1x,l)') 'YYY: i, blk, ocean(i) :', i, blkno, ocean(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, oceanfrac(i) :', i, blkno, oceanfrac(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, landfrac(i) :', i, blkno, landfrac(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, lakefrac(i) :', i, blkno, lakefrac(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, fice(i) :', i, blkno, fice(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, slmsk(i) :', i, blkno, slmsk(i) - write(0,'(a,2i5,1x,i5)') 'YYY: i, blk, islmsk(i) :', i, blkno, islmsk(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorl(i) :', i, blkno, zorl(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorlw(i) :', i, blkno, zorlw(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorli(i) :', i, blkno, zorli(i) - write(0,'(a,2i5,1x,e16.7)')'YYY: i, blk, zorll(i) :', i, blkno, zorll(i) - !end if - end do - - end subroutine GFS_checkland_run - end module GFS_checkland - - module GFS_checktracers - - private - - public GFS_checktracers_init, GFS_checktracers_timestep_init, GFS_checktracers_run - - contains - -!> \section arg_table_GFS_checktracers_init Argument Table -!! \htmlinclude GFS_checktracers_init.html -!! - subroutine GFS_checktracers_init (me, master, im, levs, ntracer, kdt, qgrs, gq0, errmsg, errflg) - - use machine, only: kind_phys - - implicit none - - ! Interface variables - integer, intent(in ) :: me - integer, intent(in ) :: master - integer, intent(in ) :: im - integer, intent(in ) :: levs - integer, intent(in ) :: ntracer - integer, intent(in ) :: kdt - real(kind_phys), intent(in ) :: qgrs(:,:,:) - real(kind_phys), intent(in ) :: gq0(:,:,:) - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - call GFS_checktracers_timestep_init (me, master, im, levs, ntracer, kdt, qgrs, gq0, errmsg, errflg) - - end subroutine GFS_checktracers_init - -!> \section arg_table_GFS_checktracers_timestep_init Argument Table -!! \htmlinclude GFS_checktracers_timestep_init.html -!! - subroutine GFS_checktracers_timestep_init (me, master, im, levs, ntracer, kdt, qgrs, gq0, errmsg, errflg) - - use machine, only: kind_phys - - implicit none - - ! Interface variables - integer, intent(in ) :: me - integer, intent(in ) :: master - integer, intent(in ) :: im - integer, intent(in ) :: levs - integer, intent(in ) :: ntracer - integer, intent(in ) :: kdt - real(kind_phys), intent(in ) :: qgrs(:,:,:) - real(kind_phys), intent(in ) :: gq0(:,:,:) - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Local variables - integer :: i, k, n - - errflg = 0 - errmsg = '' - - write(0,'(a,i5)') 'YYY: me :', me - write(0,'(a,i5)') 'YYY: master :', master - write(0,'(a,i5)') 'YYY: im :', im - write(0,'(a,i5)') 'YYY: levs :', levs - write(0,'(a,i5)') 'YYY: ntracer :', ntracer - write(0,'(a,i5)') 'YYY: kdt :', kdt - - do n=1,ntracer - do i=1,im - do k=1,levs - if (qgrs(i,k,n)<0 .or. gq0(i,k,n)<0) then - write(0,'(a,4i5,1x,2e16.7)') 'YYY: blk, n, i, k, qgrs, gq0 :', -999, n, i, k, qgrs(i,k,n), gq0(i,k,n) - end if - end do - end do - end do - - end subroutine GFS_checktracers_timestep_init - -!> \section arg_table_GFS_checktracers_run Argument Table -!! \htmlinclude GFS_checktracers_run.html -!! - subroutine GFS_checktracers_run (me, master, blkno, im, levs, ntracer, kdt, qgrs, gq0, errmsg, errflg) - - use machine, only: kind_phys - - implicit none - - ! Interface variables - integer, intent(in ) :: me - integer, intent(in ) :: master - integer, intent(in ) :: blkno - integer, intent(in ) :: im - integer, intent(in ) :: levs - integer, intent(in ) :: ntracer - integer, intent(in ) :: kdt - real(kind_phys), intent(in ) :: qgrs(:,:,:) - real(kind_phys), intent(in ) :: gq0(:,:,:) - character(len=*), intent( out) :: errmsg - integer, intent( out) :: errflg - - ! Local variables - integer :: i, k, n - - errflg = 0 - errmsg = '' - - write(0,'(a,i5)') 'YYY: me :', me - write(0,'(a,i5)') 'YYY: master :', master - write(0,'(a,i5)') 'YYY: blkno :', blkno - write(0,'(a,i5)') 'YYY: im :', im - write(0,'(a,i5)') 'YYY: levs :', levs - write(0,'(a,i5)') 'YYY: ntracer :', ntracer - write(0,'(a,i5)') 'YYY: kdt :', kdt - - do n=1,ntracer - do i=1,im - do k=1,levs - if (qgrs(i,k,n)<0 .or. gq0(i,k,n)<0) then - write(0,'(a,4i5,1x,2e16.7)') 'YYY: blk, n, i, k, qgrs, gq0 :', blkno, n, i, k, qgrs(i,k,n), gq0(i,k,n) - end if - end do - end do - end do - - end subroutine GFS_checktracers_run - - end module GFS_checktracers diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.meta deleted file mode 100644 index 3fb25af27..000000000 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.meta +++ /dev/null @@ -1,972 +0,0 @@ -[ccpp-table-properties] - name = GFS_diagtoscreen - type = scheme - dependencies = ../../hooks/machine.F - -######################################################################## -[ccpp-arg-table] - name = GFS_diagtoscreen_init - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in -[Statein] - standard_name = GFS_statein_type_instance - long_name = prognostic state data in from dycore - units = DDT - dimensions = () - type = GFS_statein_type - intent = in -[Stateout] - standard_name = GFS_stateout_type_instance - long_name = prognostic state or tendencies return to dycore - units = DDT - dimensions = () - type = GFS_stateout_type - intent = in -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of derived type GFS_sfcprop_type - units = DDT - dimensions = () - type = GFS_sfcprop_type - intent = in -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = instance of derived type GFS_coupling_type - units = DDT - dimensions = () - type = GFS_coupling_type - intent = in -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT - dimensions = () - type = GFS_grid_type - intent = in -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = instance of derived type GFS_tbd_type - units = DDT - dimensions = () - type = GFS_tbd_type - intent = in -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = instance of derived type GFS_cldprop_type - units = DDT - dimensions = () - type = GFS_cldprop_type - intent = in -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in -[Diag] - standard_name = GFS_diag_type_instance - long_name = instance of derived type GFS_diag_type - units = DDT - dimensions = () - type = GFS_diag_type - intent = in -[Interstitial] - standard_name = GFS_interstitial_type_instance_all_threads - long_name = instance of derived type GFS_interstitial_type - units = DDT - dimensions = (number_of_openmp_threads) - type = GFS_interstitial_type - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-arg-table] - name = GFS_diagtoscreen_timestep_init - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type in FV3 - units = DDT - dimensions = () - type = GFS_control_type - intent = in -[Statein] - standard_name = GFS_statein_type_instance - long_name = prognostic state data in from dycore - units = DDT - dimensions = () - type = GFS_statein_type - intent = in -[Stateout] - standard_name = GFS_stateout_type_instance - long_name = prognostic state or tendencies return to dycore - units = DDT - dimensions = () - type = GFS_stateout_type - intent = in -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of derived type GFS_sfcprop_type - units = DDT - dimensions = () - type = GFS_sfcprop_type - intent = in -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = instance of derived type GFS_coupling_type - units = DDT - dimensions = () - type = GFS_coupling_type - intent = in -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT - dimensions = () - type = GFS_grid_type - intent = in -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = instance of derived type GFS_tbd_type - units = DDT - dimensions = () - type = GFS_tbd_type - intent = in -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = instance of derived type GFS_cldprop_type - units = DDT - dimensions = () - type = GFS_cldprop_type - intent = in -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in -[Diag] - standard_name = GFS_diag_type_instance - long_name = instance of derived type GFS_diag_type - units = DDT - dimensions = () - type = GFS_diag_type - intent = in -[Interstitial] - standard_name = GFS_interstitial_type_instance_all_threads - long_name = instance of derived type GFS_interstitial_type - units = DDT - dimensions = (number_of_openmp_threads) - type = GFS_interstitial_type - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-arg-table] - name = GFS_diagtoscreen_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type in FV3 - units = DDT - dimensions = () - type = GFS_control_type - intent = in -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type in FV3 - units = DDT - dimensions = () - type = GFS_statein_type - intent = in -[Stateout] - standard_name = GFS_stateout_type_instance - long_name = instance of derived type GFS_stateout_type - units = DDT - dimensions = () - type = GFS_stateout_type - intent = in -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of type GFS_sfcprop_type in FV3 - units = DDT - dimensions = () - type = GFS_sfcprop_type - intent = in -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = instance of type GFS_coupling_type in FV3 - units = DDT - dimensions = () - type = GFS_coupling_type - intent = in -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of type GFS_grid_type in FV3 - units = DDT - dimensions = () - type = GFS_grid_type - intent = in -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = instance of type GFS_tbd_type in FV3 - units = DDT - dimensions = () - type = GFS_tbd_type - intent = in -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = instance of type GFS_cldprop_type in FV3 - units = DDT - dimensions = () - type = GFS_cldprop_type - intent = in -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of type GFS_radtend_type in FV3 - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in -[Diag] - standard_name = GFS_diag_type_instance - long_name = instance of type GFS_diag_type in FV3 - units = DDT - dimensions = () - type = GFS_diag_type - intent = in -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = instance of type GFS_interstitial_type in FV3 - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in -[nthreads] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads or fast physics schemes - units = count - dimensions = () - type = integer - intent = in -[blkno] - standard_name = ccpp_block_number - long_name = number of block for explicit data blocking in CCPP - units = index - dimensions = () - type = integer - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-table-properties] - name = GFS_interstitialtoscreen - type = scheme - dependencies = ../../hooks/machine.F - -######################################################################## -[ccpp-arg-table] - name = GFS_interstitialtoscreen_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in -[Statein] - standard_name = GFS_statein_type_instance - long_name = instance of derived type GFS_statein_type - units = DDT - dimensions = () - type = GFS_statein_type - intent = in -[Stateout] - standard_name = GFS_stateout_type_instance - long_name = instance of derived type GFS_stateout_type - units = DDT - dimensions = () - type = GFS_stateout_type - intent = in -[Sfcprop] - standard_name = GFS_sfcprop_type_instance - long_name = instance of derived type GFS_sfcprop_type - units = DDT - dimensions = () - type = GFS_sfcprop_type - intent = in -[Coupling] - standard_name = GFS_coupling_type_instance - long_name = instance of derived type GFS_coupling_type - units = DDT - dimensions = () - type = GFS_coupling_type - intent = in -[Grid] - standard_name = GFS_grid_type_instance - long_name = instance of derived type GFS_grid_type - units = DDT - dimensions = () - type = GFS_grid_type - intent = in -[Tbd] - standard_name = GFS_tbd_type_instance - long_name = instance of derived type GFS_tbd_type - units = DDT - dimensions = () - type = GFS_tbd_type - intent = in -[Cldprop] - standard_name = GFS_cldprop_type_instance - long_name = instance of derived type GFS_cldprop_type - units = DDT - dimensions = () - type = GFS_cldprop_type - intent = in -[Radtend] - standard_name = GFS_radtend_type_instance - long_name = instance of derived type GFS_radtend_type - units = DDT - dimensions = () - type = GFS_radtend_type - intent = in -[Diag] - standard_name = GFS_diag_type_instance - long_name = instance of derived type GFS_diag_type - units = DDT - dimensions = () - type = GFS_diag_type - intent = in -[Interstitial] - standard_name = GFS_interstitial_type_instance - long_name = instance of derived type GFS_interstitial_type - units = DDT - dimensions = () - type = GFS_interstitial_type - intent = in -[nthreads] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads or fast physics schemes - units = count - dimensions = () - type = integer - intent = in -[blkno] - standard_name = ccpp_block_number - long_name = number of block for explicit data blocking in CCPP - units = index - dimensions = () - type = integer - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-table-properties] - name = GFS_abort - type = scheme - dependencies = ../../hooks/machine.F - -######################################################################## -[ccpp-arg-table] - name = GFS_abort_run - type = scheme -[Model] - standard_name = GFS_control_type_instance - long_name = instance of derived type GFS_control_type - units = DDT - dimensions = () - type = GFS_control_type - intent = in -[blkno] - standard_name = ccpp_block_number - long_name = number of block for explicit data blocking in CCPP - units = index - dimensions = () - type = integer - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-table-properties] - name = GFS_checkland - type = scheme - dependencies = ../../hooks/machine.F - -######################################################################## -[ccpp-arg-table] - name = GFS_checkland_run - type = scheme -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in -[blkno] - standard_name = ccpp_block_number - long_name = number of block for explicit data blocking in CCPP - units = index - dimensions = () - type = integer - intent = in -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in -[kdt] - standard_name = index_of_timestep - long_name = current number of time steps - units = index - dimensions = () - type = integer - intent = in -[iter] - standard_name = ccpp_loop_counter - long_name = loop counter for subcycling loops in CCPP - units = index - dimensions = () - type = integer - intent = in -[flag_iter] - standard_name = flag_for_iteration - long_name = flag for iteration - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in -[flag_guess] - standard_name = flag_for_guess_run - long_name = flag for guess run - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in -[flag_init] - standard_name = flag_for_first_timestep - long_name = flag signaling first time step for time integration loop - units = flag - dimensions = () - type = logical - intent = in -[flag_restart] - standard_name = flag_for_restart - long_name = flag for restart (warmstart) or coldstart - units = flag - dimensions = () - type = logical - intent = in -[frac_grid] - standard_name = flag_for_fractional_landmask - long_name = flag for fractional grid - units = flag - dimensions = () - type = logical - intent = in -[isot] - standard_name = control_for_soil_type_dataset - long_name = soil type dataset choice - units = index - dimensions = () - type = integer - intent = in -[ivegsrc] - standard_name = control_for_vegetation_dataset - long_name = land use dataset choice - units = index - dimensions = () - type = integer - intent = in -[stype] - standard_name = soil_type_classification - long_name = soil type for lsm - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = in -[scolor] - standard_name = soil_color_classification - long_name = soil color for lsm - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = in -[vtype] - standard_name = vegetation_type_classification - long_name = vegetation type for lsm - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = in -[slope] - standard_name = surface_slope_classification - long_name = sfc slope type for lsm - units = index - dimensions = (horizontal_loop_extent) - type = integer - intent = in -[dry] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating some land surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in -[icy] - standard_name = flag_nonzero_sea_ice_surface_fraction - long_name = flag indicating some sea ice surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in -[wet] - standard_name = flag_nonzero_wet_surface_fraction - long_name = flag indicating some ocean or lake surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in -[lake] - standard_name = flag_nonzero_lake_surface_fraction - long_name = flag indicating some lake surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in -[ocean] - standard_name = flag_nonzero_ocean_surface_fraction - long_name = flag indicating some ocean surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical - intent = in -[oceanfrac] - standard_name = sea_area_fraction - long_name = fraction of horizontal grid area occupied by ocean - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[landfrac] - standard_name = land_area_fraction - long_name = fraction of horizontal grid area occupied by land - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[lakefrac] - standard_name = lake_area_fraction - long_name = fraction of horizontal grid area occupied by lake - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[slmsk] - standard_name = area_type - long_name = landmask: sea/land/ice=0/1/2 - units = flag - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[islmsk] - standard_name = sea_land_ice_mask - long_name = sea/land/ice mask (=0/1/2) - units = flag - dimensions = (horizontal_loop_extent) - type = integer - intent = in -[zorl] - standard_name = surface_roughness_length - long_name = surface roughness length - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[zorlw] - standard_name = surface_roughness_length_over_water - long_name = surface roughness length over water - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[zorll] - standard_name = surface_roughness_length_over_land - long_name = surface roughness length over land - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[zorli] - standard_name = surface_roughness_length_over_ice - long_name = surface roughness length over ice - units = cm - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[fice] - standard_name = sea_ice_area_fraction_of_sea_area_fraction - long_name = ice fraction over open water - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-table-properties] - name = GFS_checktracers - type = scheme - dependencies = ../../hooks/machine.F - -######################################################################## -[ccpp-arg-table] - name = GFS_checktracers_init - type = scheme -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in -[im] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in -[levs] - standard_name = vertical_layer_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in -[ntracer] - standard_name = number_of_tracers - long_name = number of tracers - units = count - dimensions = () - type = integer - intent = in -[kdt] - standard_name = index_of_timestep - long_name = current number of time steps - units = index - dimensions = () - type = integer - intent = in -[qgrs] - standard_name = tracer_concentration - long_name = model layer mean tracer concentration - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in -[gq0] - standard_name = tracer_concentration_of_new_state - long_name = tracer concentration updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-arg-table] - name = GFS_checktracers_timestep_init - type = scheme -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in -[im] - standard_name = horizontal_dimension - long_name = horizontal dimension - units = count - dimensions = () - type = integer - intent = in -[levs] - standard_name = vertical_layer_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in -[ntracer] - standard_name = number_of_tracers - long_name = number of tracers - units = count - dimensions = () - type = integer - intent = in -[kdt] - standard_name = index_of_timestep - long_name = current number of time steps - units = index - dimensions = () - type = integer - intent = in -[qgrs] - standard_name = tracer_concentration - long_name = model layer mean tracer concentration - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in -[gq0] - standard_name = tracer_concentration_of_new_state - long_name = tracer concentration updated by physics - units = kg kg-1 - dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out - -######################################################################## -[ccpp-arg-table] - name = GFS_checktracers_run - type = scheme -[me] - standard_name = mpi_rank - long_name = current MPI-rank - units = index - dimensions = () - type = integer - intent = in -[master] - standard_name = mpi_root - long_name = master MPI-rank - units = index - dimensions = () - type = integer - intent = in -[blkno] - standard_name = ccpp_block_number - long_name = number of block for explicit data blocking in CCPP - units = index - dimensions = () - type = integer - intent = in -[im] - standard_name = horizontal_loop_extent - long_name = horizontal loop extent - units = count - dimensions = () - type = integer - intent = in -[levs] - standard_name = vertical_layer_dimension - long_name = number of vertical levels - units = count - dimensions = () - type = integer - intent = in -[ntracer] - standard_name = number_of_tracers - long_name = number of tracers - units = count - dimensions = () - type = integer - intent = in -[kdt] - standard_name = index_of_timestep - long_name = current number of time steps - units = index - dimensions = () - type = integer - intent = in -[qgrs] - standard_name = tracer_concentration - long_name = model layer mean tracer concentration - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in -[gq0] - standard_name = tracer_concentration_of_new_state - long_name = tracer concentration updated by physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys - intent = in -[errmsg] - standard_name = ccpp_error_message - long_name = error message for error handling in CCPP - units = none - dimensions = () - type = character - kind = len=* - intent = out -[errflg] - standard_name = ccpp_error_code - long_name = error code for error handling in CCPP - units = 1 - dimensions = () - type = integer - intent = out diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 index ca21e914c..202054e2b 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90 @@ -46,7 +46,7 @@ module GFS_phys_time_vary private - public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize + public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_final real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys @@ -964,10 +964,10 @@ end subroutine find_photochem_time_index end subroutine GFS_phys_time_vary_timestep_init !> @} -!> \section arg_table_GFS_phys_time_vary_finalize Argument Table -!! \htmlinclude GFS_phys_time_vary_finalize.html +!> \section arg_table_GFS_phys_time_vary_final Argument Table +!! \htmlinclude GFS_phys_time_vary_final.html !! - subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) + subroutine GFS_phys_time_vary_final(is_initialized, errmsg, errflg) implicit none @@ -998,6 +998,6 @@ subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) is_initialized = .false. - end subroutine GFS_phys_time_vary_finalize + end subroutine GFS_phys_time_vary_final end module GFS_phys_time_vary diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta index 1bad16da8..8bd350bdc 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta @@ -1074,7 +1074,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_phys_time_vary_finalize + name = GFS_phys_time_vary_final type = scheme [is_initialized] standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 index 9f10f5883..5d94ace84 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.F90 @@ -46,7 +46,7 @@ module GFS_phys_time_vary private - public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize + public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_final real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys @@ -965,10 +965,10 @@ end subroutine find_photochem_time_index end subroutine GFS_phys_time_vary_timestep_init !> @} -!> \section arg_table_GFS_phys_time_vary_finalize Argument Table -!! \htmlinclude GFS_phys_time_vary_finalize.html +!> \section arg_table_GFS_phys_time_vary_final Argument Table +!! \htmlinclude GFS_phys_time_vary_final.html !! - subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) + subroutine GFS_phys_time_vary_final(is_initialized, errmsg, errflg) implicit none @@ -999,6 +999,6 @@ subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) is_initialized = .false. - end subroutine GFS_phys_time_vary_finalize + end subroutine GFS_phys_time_vary_final end module GFS_phys_time_vary diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta index 1bad16da8..8bd350bdc 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta @@ -1074,7 +1074,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_phys_time_vary_finalize + name = GFS_phys_time_vary_final type = scheme [is_initialized] standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 index 85fc6fc68..af97fb0b1 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.F90 @@ -40,7 +40,7 @@ module GFS_phys_time_vary private - public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_finalize + public GFS_phys_time_vary_init, GFS_phys_time_vary_timestep_init, GFS_phys_time_vary_final real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys real(kind=kind_phys), parameter :: con_99 = 99.0_kind_phys @@ -849,10 +849,10 @@ end subroutine find_photochem_time_index end subroutine GFS_phys_time_vary_timestep_init !> @} -!> \section arg_table_GFS_phys_time_vary_finalize Argument Table -!! \htmlinclude GFS_phys_time_vary_finalize.html +!> \section arg_table_GFS_phys_time_vary_final Argument Table +!! \htmlinclude GFS_phys_time_vary_final.html !! - subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) + subroutine GFS_phys_time_vary_final(is_initialized, errmsg, errflg) implicit none @@ -883,6 +883,6 @@ subroutine GFS_phys_time_vary_finalize(is_initialized, errmsg, errflg) is_initialized = .false. - end subroutine GFS_phys_time_vary_finalize + end subroutine GFS_phys_time_vary_final end module GFS_phys_time_vary diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta index 98a60e3b4..f34244b42 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta @@ -1073,7 +1073,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_phys_time_vary_finalize + name = GFS_phys_time_vary_final type = scheme [is_initialized] standard_name = flag_for_gfs_phys_time_vary_interstitial_initialization @@ -1189,7 +1189,7 @@ [nsswr] standard_name = number_of_timesteps_between_shortwave_radiation_calls long_name = number of timesteps between shortwave radiation calls - units = + units = count dimensions = () type = integer intent = in diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta index b8a05e258..41ab42cdc 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_post.meta @@ -2,9 +2,11 @@ name = GFS_radiation_post type = scheme dependencies_path = ../../ - dependencies = hooks/machine.F,Radiation/radiation_aerosols.f + dependencies = hooks/machine.F,Radiation/RRTMG/iounitdef.f,Radiation/radiation_aerosols.f dependencies = Radiation/RRTMG/radlw_param.f,Radiation/radiation_tools.F90,Radiation/RRTMGP/rte-rrtmgp/extensions/mo_heating_rates.F90 - dependencies = Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_rte_kind.F90 + dependencies = Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_rte_kind.F90,Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_rte_config.F90 + dependencies = Radiation/RRTMGP/rte-rrtmgp/rte-frontend/mo_rte_util_array_validation.F90 + dependencies = Radiation/RRTMGP/rte-rrtmgp/gas-optics/mo_gas_optics_constants.F90 ######################################################################## [ccpp-arg-table] diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta index 697aadfb5..c2d9f2d4e 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta @@ -2,11 +2,11 @@ name = GFS_rrtmg_pre type = scheme dependencies_path = ../../ - dependencies = tools/funcphys.f90,hooks/machine.F + dependencies = hooks/physcons.F90,tools/funcphys.f90,hooks/machine.F dependencies = MP/TEMPO/TEMPO/module_mp_tempo_params.F90,MP/TEMPO/TEMPO/module_mp_tempo_utils.F90 dependencies = MP/Thompson/module_mp_thompson.F90,MP/Thompson/module_mp_thompson_make_number_concentrations.F90 - dependencies = Radiation/RRTMG/radcons.f90,Radiation/radiation_aerosols.f - dependencies = Radiation/radiation_astronomy.f,Radiation/radiation_clouds.f,Radiation/radiation_gases.f + dependencies = Radiation/RRTMG/radcons.f90,Radiation/RRTMG/iounitdef.f,Radiation/radiation_aerosols.f + dependencies = Radiation/radiation_astronomy.f,Radiation/radiation_cloud_overlap.F90,Radiation/radiation_clouds.f,Radiation/radiation_gases.f dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f,Radiation/radiation_cloud_overlap.F90 dependencies = SFC_Models/Land/Noah/surface_perturbation.F90 dependencies = photochem/module_ozphys.F90 diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 index baa660dbc..b627633d5 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90 @@ -11,7 +11,7 @@ module GFS_rrtmg_setup use mpi_f08 implicit none - public GFS_rrtmg_setup_init, GFS_rrtmg_setup_timestep_init, GFS_rrtmg_setup_finalize + public GFS_rrtmg_setup_init, GFS_rrtmg_setup_timestep_init, GFS_rrtmg_setup_final private @@ -295,10 +295,10 @@ subroutine GFS_rrtmg_setup_timestep_init (idate, jdate, deltsw, deltim, & end subroutine GFS_rrtmg_setup_timestep_init -!> \section arg_table_GFS_rrtmg_setup_finalize Argument Table -!! \htmlinclude GFS_rrtmg_setup_finalize.html +!> \section arg_table_GFS_rrtmg_setup_final Argument Table +!! \htmlinclude GFS_rrtmg_setup_final.html !! - subroutine GFS_rrtmg_setup_finalize (errmsg, errflg) + subroutine GFS_rrtmg_setup_final (errmsg, errflg) implicit none @@ -315,7 +315,7 @@ subroutine GFS_rrtmg_setup_finalize (errmsg, errflg) is_initialized = .false. - end subroutine GFS_rrtmg_setup_finalize + end subroutine GFS_rrtmg_setup_final !> This subroutine checks and updates time sensitive data used by !! radiation computations. This subroutine needs to be placed inside diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta index 5bd5971a8..47c1e1279 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.meta @@ -4,9 +4,10 @@ dependencies_path = ../../ dependencies = tools/mpiutil.F90 dependencies = hooks/machine.F - dependencies = Radiation/radiation_aerosols.f - dependencies = Radiation/radiation_astronomy.f,Radiation/radiation_clouds.f,Radiation/radiation_gases.f + dependencies = Radiation/RRTMG/iounitdef.f,Radiation/radiation_aerosols.f + dependencies = Radiation/radiation_astronomy.f,Radiation/radiation_cloud_overlap.F90,Radiation/radiation_clouds.f,Radiation/radiation_gases.f dependencies = Radiation/RRTMG/radlw_main.F90,Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_main.F90,Radiation/RRTMG/radsw_param.f + dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f dependencies = MP/module_mp_radar.F90,MP/Thompson/module_mp_thompson.F90,photochem/module_ozphys.F90 ######################################################################## @@ -607,7 +608,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_rrtmg_setup_finalize + name = GFS_rrtmg_setup_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90 index a335f56a4..93388b710 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90 @@ -24,7 +24,7 @@ module GFS_rrtmgp_cloud_mp reice_min = 10.0, & !< Minimum ice size allowed by GFDL MP scheme reice_max = 150.0 !< Maximum ice size allowed by GFDL MP scheme - public GFS_rrtmgp_cloud_mp_init, GFS_rrtmgp_cloud_mp_run, GFS_rrtmgp_cloud_mp_finalize + public GFS_rrtmgp_cloud_mp_init, GFS_rrtmgp_cloud_mp_run, GFS_rrtmgp_cloud_mp_final contains diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta index d7ba78ab0..e181d3be6 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta @@ -2,7 +2,7 @@ name = GFS_rrtmgp_pre type = scheme dependencies_path = ../../ - dependencies = tools/funcphys.f90,hooks/machine.F,Radiation/radiation_aerosols.f,photochem/module_ozphys.F90 + dependencies = hooks/physcons.F90,tools/funcphys.f90,hooks/machine.F,Radiation/RRTMG/iounitdef.f,Radiation/radiation_aerosols.f,photochem/module_ozphys.F90 dependencies = Radiation/RRTMG/iounitdef.f,Radiation/radiation_astronomy.f,Radiation/radiation_gases.f,Radiation/radiation_tools.F90 ######################################################################## diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 index 8f4200f37..544df8ffa 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90 @@ -10,7 +10,7 @@ module GFS_rrtmgp_setup use module_ozphys, only : ty_ozphys implicit none - public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_timestep_init, GFS_rrtmgp_setup_finalize + public GFS_rrtmgp_setup_init, GFS_rrtmgp_setup_timestep_init, GFS_rrtmgp_setup_final private @@ -249,10 +249,10 @@ subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad end subroutine GFS_rrtmgp_setup_timestep_init -!> \section arg_table_GFS_rrtmgp_setup_finalize Argument Table -!! \htmlinclude GFS_rrtmgp_setup_finalize.html +!> \section arg_table_GFS_rrtmgp_setup_final Argument Table +!! \htmlinclude GFS_rrtmgp_setup_final.html !! - subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) + subroutine GFS_rrtmgp_setup_final (errmsg, errflg) character(len=*), intent( out) :: errmsg integer, intent( out) :: errflg @@ -265,5 +265,5 @@ subroutine GFS_rrtmgp_setup_finalize (errmsg, errflg) ! do finalization stuff if needed is_initialized = .false. - end subroutine GFS_rrtmgp_setup_finalize + end subroutine GFS_rrtmgp_setup_final end module GFS_rrtmgp_setup diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta index 1e31e3567..f6d877169 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta @@ -3,7 +3,7 @@ type = scheme dependencies_path = ../../ dependencies = hooks/machine.F,MP/module_mp_radar.F90,MP/Thompson/module_mp_thompson.F90 - dependencies = Radiation/radiation_aerosols.f,photochem/module_ozphys.F90 + dependencies = Radiation/RRTMG/iounitdef.f,Radiation/radiation_aerosols.f,photochem/module_ozphys.F90 dependencies = Radiation/radiation_gases.f,Radiation/RRTMG/iounitdef.f,Radiation/radiation_astronomy.f ######################################################################## @@ -498,7 +498,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_rrtmgp_setup_finalize + name = GFS_rrtmgp_setup_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.F90 index b3d59c095..21d02ae1a 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.F90 @@ -44,7 +44,7 @@ subroutine GFS_suite_interstitial_3_run (otsptflag, & integer, intent(in) :: ntinc, ntlnc logical, intent(in) :: ldiag3d, qdiag3d integer, dimension(:,:), intent(in) :: dtidx - real, dimension(:,:), intent(out) :: save_lnc, save_inc + real(kind=kind_phys), dimension(:,:), optional, intent(out) :: save_lnc, save_inc real(kind=kind_phys), intent(in ) :: rhcbot, rhcmax, rhcpbl, rhctop real(kind=kind_phys), intent(in ), dimension(:) :: work1, work2 diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta index 4cf339e4d..e8ba49194 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta @@ -533,7 +533,8 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = out + optional = true [save_inc] standard_name = ice_cloud_number_concentration_save long_name = ice cloud number concentration before entering a physics scheme @@ -541,7 +542,8 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = out + optional = true [ntlnc] standard_name = index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array long_name = tracer index for liquid number concentration diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 index f9a2b76ea..31960fa1a 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90 @@ -39,7 +39,8 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, tracers_total, ntr real(kind=kind_phys), intent(in ) :: con_pi, dtf real(kind=kind_phys), intent(in ), dimension(:,:) :: save_qc ! save_qi is not allocated for Zhao-Carr MP - real(kind=kind_phys), intent(in ), dimension(:,:) :: save_qi, save_lnc, save_inc + real(kind=kind_phys), intent(in ), dimension(:,:) :: save_qi + real(kind=kind_phys), intent(in ), dimension(:,:), optional :: save_lnc, save_inc ! dtend and dtidx are only allocated if ldiag3d logical, intent(in) :: ldiag3d, qdiag3d diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta index 718b6ab95..df7baae51 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta @@ -239,6 +239,7 @@ type = real kind = kind_phys intent = in + optional = true [save_inc] standard_name = ice_cloud_number_concentration_save long_name = ice cloud number concentration before entering a physics scheme @@ -247,6 +248,7 @@ type = real kind = kind_phys intent = in + optional = true [con_pi] standard_name = pi long_name = ratio of a circle's circumference to its diameter diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 index d9b12e4e1..3a5d93473 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90 @@ -9,7 +9,7 @@ module GFS_time_vary_pre private - public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_finalize + public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_final logical :: is_initialized = .false. @@ -42,10 +42,10 @@ subroutine GFS_time_vary_pre_init (errmsg, errflg) end subroutine GFS_time_vary_pre_init -!> \section arg_table_GFS_time_vary_pre_finalize Argument Table -!! \htmlinclude GFS_time_vary_pre_finalize.html +!> \section arg_table_GFS_time_vary_pre_final Argument Table +!! \htmlinclude GFS_time_vary_pre_final.html !! - subroutine GFS_time_vary_pre_finalize(errmsg, errflg) + subroutine GFS_time_vary_pre_final(errmsg, errflg) implicit none @@ -62,7 +62,7 @@ subroutine GFS_time_vary_pre_finalize(errmsg, errflg) is_initialized = .false. - end subroutine GFS_time_vary_pre_finalize + end subroutine GFS_time_vary_pre_final !> \section arg_table_GFS_time_vary_pre_timestep_init Argument Table diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.meta index bdf4ec8d5..bb2e8c35a 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.meta @@ -2,7 +2,7 @@ name = GFS_time_vary_pre type = scheme dependencies_path = ../../ - dependencies = tools/funcphys.f90,hooks/machine.F + dependencies = hooks/physcons.F90,tools/funcphys.f90,hooks/machine.F ######################################################################## [ccpp-arg-table] @@ -26,7 +26,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_time_vary_pre_finalize + name = GFS_time_vary_pre_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 index 52ee21c68..80ae601aa 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.F90 @@ -9,7 +9,7 @@ module GFS_time_vary_pre private - public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_finalize + public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_final logical :: is_initialized = .false. @@ -42,10 +42,10 @@ subroutine GFS_time_vary_pre_init (errmsg, errflg) end subroutine GFS_time_vary_pre_init -!> \section arg_table_GFS_time_vary_pre_finalize Argument Table -!! \htmlinclude GFS_time_vary_pre_finalize.html +!> \section arg_table_GFS_time_vary_pre_final Argument Table +!! \htmlinclude GFS_time_vary_pre_final.html !! - subroutine GFS_time_vary_pre_finalize(errmsg, errflg) + subroutine GFS_time_vary_pre_final(errmsg, errflg) implicit none @@ -62,7 +62,7 @@ subroutine GFS_time_vary_pre_finalize(errmsg, errflg) is_initialized = .false. - end subroutine GFS_time_vary_pre_finalize + end subroutine GFS_time_vary_pre_final !> \section arg_table_GFS_time_vary_pre_timestep_init Argument Table diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta index bdf4ec8d5..bb2e8c35a 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.neptune.meta @@ -2,7 +2,7 @@ name = GFS_time_vary_pre type = scheme dependencies_path = ../../ - dependencies = tools/funcphys.f90,hooks/machine.F + dependencies = hooks/physcons.F90,tools/funcphys.f90,hooks/machine.F ######################################################################## [ccpp-arg-table] @@ -26,7 +26,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_time_vary_pre_finalize + name = GFS_time_vary_pre_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 index b8210a348..2585d3231 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90 @@ -9,7 +9,7 @@ module GFS_time_vary_pre private - public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_finalize + public GFS_time_vary_pre_init, GFS_time_vary_pre_timestep_init, GFS_time_vary_pre_final logical :: is_initialized = .false. @@ -39,10 +39,10 @@ subroutine GFS_time_vary_pre_init (errmsg, errflg) end subroutine GFS_time_vary_pre_init -!> \section arg_table_GFS_time_vary_pre_finalize Argument Table -!! \htmlinclude GFS_time_vary_pre_finalize.html +!> \section arg_table_GFS_time_vary_pre_final Argument Table +!! \htmlinclude GFS_time_vary_pre_final.html !! - subroutine GFS_time_vary_pre_finalize(errmsg, errflg) + subroutine GFS_time_vary_pre_final(errmsg, errflg) implicit none @@ -59,7 +59,7 @@ subroutine GFS_time_vary_pre_finalize(errmsg, errflg) is_initialized = .false. - end subroutine GFS_time_vary_pre_finalize + end subroutine GFS_time_vary_pre_final !> \section arg_table_GFS_time_vary_pre_timestep_init Argument Table diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.meta index 3bebfbe65..940d836c4 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.meta @@ -2,7 +2,7 @@ name = GFS_time_vary_pre type = scheme dependencies_path = ../../ - dependencies = tools/funcphys.f90,hooks/machine.F + dependencies = hooks/physcons.F90,tools/funcphys.f90,hooks/machine.F ######################################################################## [ccpp-arg-table] @@ -26,7 +26,7 @@ ######################################################################## [ccpp-arg-table] - name = GFS_time_vary_pre_finalize + name = GFS_time_vary_pre_final type = scheme [errmsg] standard_name = ccpp_error_message @@ -73,14 +73,14 @@ [nsswr] standard_name = number_of_timesteps_between_shortwave_radiation_calls long_name = number of timesteps between shortwave radiation calls - units = + units = count dimensions = () type = integer intent = in [nslwr] standard_name = number_of_timesteps_between_longwave_radiation_calls long_name = number of timesteps between longwave radiation calls - units = + units = count dimensions = () type = integer intent = in diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.meta index 55b9e07b1..ace58583a 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/module_ccpp_suite_simulator.meta @@ -1,24 +1,9 @@ [ccpp-table-properties] name = base_physics_process type = ddt - dependencies = + dependencies = ../../hooks/machine.F + #module_name = module_ccpp_suite_simulator [ccpp-arg-table] name = base_physics_process type = ddt - -######################################################################## -[ccpp-table-properties] - name = module_ccpp_suite_simulator - type = module - dependencies = ../../hooks/machine.F - -[ccpp-arg-table] - name = module_ccpp_suite_simulator - type = module -[base_physics_process] - standard_name = base_physics_process - long_name = definition of type base_physics_process - units = DDT - dimensions = () - type = base_physics_process diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.meta index 57fa61dfe..f4658747d 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.meta @@ -2,7 +2,7 @@ name = sgscloud_radpre type = scheme dependencies_path = ../../ - dependencies = tools/funcphys.f90,hooks/machine.F + dependencies = hooks/physcons.F90,tools/funcphys.f90,hooks/machine.F dependencies = hooks/physcons.F90,Radiation/RRTMG/radcons.f90 dependencies = Radiation/radiation_clouds.f,MP/module_mp_radar.F90,MP/Thompson/module_mp_thompson.F90 diff --git a/physics/MP/Ferrier_Aligo/module_MP_FER_HIRES.F90 b/physics/MP/Ferrier_Aligo/module_MP_FER_HIRES.F90 index 43c98026b..670a03c12 100644 --- a/physics/MP/Ferrier_Aligo/module_MP_FER_HIRES.F90 +++ b/physics/MP/Ferrier_Aligo/module_MP_FER_HIRES.F90 @@ -2963,7 +2963,7 @@ REAL FUNCTION FPVSX0(T) ! END FUNCTION FPVSX0 - SUBROUTINE ferhires_finalize() + SUBROUTINE ferhires_final() IMPLICIT NONE @@ -2980,7 +2980,7 @@ SUBROUTINE ferhires_finalize() if (ALLOCATED(vsnowi)) DEALLOCATE(vsnowi) if (ALLOCATED(vel_rf)) DEALLOCATE(vel_rf) - END SUBROUTINE ferhires_finalize + END SUBROUTINE ferhires_final ! END MODULE module_mp_fer_hires diff --git a/physics/MP/Ferrier_Aligo/mp_fer_hires.F90 b/physics/MP/Ferrier_Aligo/mp_fer_hires.F90 index 1387dcbab..91b7cba71 100644 --- a/physics/MP/Ferrier_Aligo/mp_fer_hires.F90 +++ b/physics/MP/Ferrier_Aligo/mp_fer_hires.F90 @@ -7,11 +7,11 @@ module mp_fer_hires use machine, only : kind_phys use module_mp_fer_hires, only : ferrier_init_hr, FER_HIRES, & - ferhires_finalize + ferhires_final implicit none - public :: mp_fer_hires_init, mp_fer_hires_run, mp_fer_hires_finalize + public :: mp_fer_hires_init, mp_fer_hires_run, mp_fer_hires_final private @@ -338,10 +338,10 @@ SUBROUTINE mp_fer_hires_run(NCOL, NLEV, DT ,SPEC_ADV & end subroutine mp_fer_hires_run -!> \section arg_table_mp_fer_hires_finalize Argument Table -!! \htmlinclude mp_fer_hires_finalize.html +!> \section arg_table_mp_fer_hires_final Argument Table +!! \htmlinclude mp_fer_hires_final.html !! - subroutine mp_fer_hires_finalize (errmsg,errflg) + subroutine mp_fer_hires_final (errmsg,errflg) implicit none character(len=*), intent( out) :: errmsg @@ -353,9 +353,9 @@ subroutine mp_fer_hires_finalize (errmsg,errflg) if (.not.is_initialized) return - call ferhires_finalize() + call ferhires_final() is_initialized = .false. - end subroutine mp_fer_hires_finalize + end subroutine mp_fer_hires_final end module mp_fer_hires diff --git a/physics/MP/Ferrier_Aligo/mp_fer_hires.meta b/physics/MP/Ferrier_Aligo/mp_fer_hires.meta index 0838bede2..520b5d2d1 100644 --- a/physics/MP/Ferrier_Aligo/mp_fer_hires.meta +++ b/physics/MP/Ferrier_Aligo/mp_fer_hires.meta @@ -95,7 +95,7 @@ intent = out ######################################################################## [ccpp-arg-table] - name = mp_fer_hires_finalize + name = mp_fer_hires_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/MP/GFDL/fv_sat_adj.F90 b/physics/MP/GFDL/fv_sat_adj.F90 index 6fb0d73a1..aec844001 100644 --- a/physics/MP/GFDL/fv_sat_adj.F90 +++ b/physics/MP/GFDL/fv_sat_adj.F90 @@ -68,7 +68,7 @@ module fv_sat_adj #ifdef MULTI_GASES use ccpp_multi_gases_mod, only: multi_gases_init, & - multi_gases_finalize, & + multi_gases_final, & virq_qpz, vicpqd_qpz, & vicvqd_qpz, num_gas #endif @@ -77,7 +77,7 @@ module fv_sat_adj private - public fv_sat_adj_init, fv_sat_adj_run, fv_sat_adj_finalize + public fv_sat_adj_init, fv_sat_adj_run, fv_sat_adj_final logical :: is_initialized = .false. @@ -187,11 +187,11 @@ subroutine fv_sat_adj_init(do_sat_adj, kmp, nwat, ngas, rilist, cpilist, & end subroutine fv_sat_adj_init !\ingroup fast_sat_adj -!>\brief The subroutine 'fv_sat_adj_finalize' deallocates lookup tables for the saturation mixing ratio. -!! \section arg_table_fv_sat_adj_finalize Argument Table -!! \htmlinclude fv_sat_adj_finalize.html +!>\brief The subroutine 'fv_sat_adj_final' deallocates lookup tables for the saturation mixing ratio. +!! \section arg_table_fv_sat_adj_final Argument Table +!! \htmlinclude fv_sat_adj_final.html !! -subroutine fv_sat_adj_finalize (errmsg, errflg) +subroutine fv_sat_adj_final (errmsg, errflg) implicit none @@ -211,12 +211,12 @@ subroutine fv_sat_adj_finalize (errmsg, errflg) if (allocated(desw )) deallocate(desw ) #ifdef MULTI_GASES - call multi_gases_finalize() + call multi_gases_final() #endif is_initialized = .false. -end subroutine fv_sat_adj_finalize +end subroutine fv_sat_adj_final !>\defgroup fast_sat_adj GFDL In-Core Fast Saturation Adjustment Module !> @{ diff --git a/physics/MP/GFDL/fv_sat_adj.meta b/physics/MP/GFDL/fv_sat_adj.meta index 98d803583..5fc79663e 100644 --- a/physics/MP/GFDL/fv_sat_adj.meta +++ b/physics/MP/GFDL/fv_sat_adj.meta @@ -85,7 +85,7 @@ ######################################################################## [ccpp-arg-table] - name = fv_sat_adj_finalize + name = fv_sat_adj_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.F90 b/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.F90 index 6314b3577..975258fa1 100644 --- a/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.F90 +++ b/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.F90 @@ -15,7 +15,7 @@ module gfdl_cloud_microphys private - public gfdl_cloud_microphys_run, gfdl_cloud_microphys_init, gfdl_cloud_microphys_finalize + public gfdl_cloud_microphys_run, gfdl_cloud_microphys_init, gfdl_cloud_microphys_final logical :: is_initialized = .false. @@ -73,13 +73,13 @@ subroutine gfdl_cloud_microphys_init (me, master, nlunit, input_nml_file, loguni end subroutine gfdl_cloud_microphys_init ! ======================================================================= -!>\brief The subroutine 'gfdl_cloud_microphys_finalize' terminates the GFDL +!>\brief The subroutine 'gfdl_cloud_microphys_final' terminates the GFDL !! cloud microphysics. !! -!! \section arg_table_gfdl_cloud_microphys_finalize Argument Table -!! \htmlinclude gfdl_cloud_microphys_finalize.html +!! \section arg_table_gfdl_cloud_microphys_final Argument Table +!! \htmlinclude gfdl_cloud_microphys_final.html !! - subroutine gfdl_cloud_microphys_finalize(errmsg, errflg) + subroutine gfdl_cloud_microphys_final(errmsg, errflg) implicit none @@ -96,7 +96,7 @@ subroutine gfdl_cloud_microphys_finalize(errmsg, errflg) is_initialized = .false. - end subroutine gfdl_cloud_microphys_finalize + end subroutine gfdl_cloud_microphys_final !>\defgroup gfdlmp GFDL Cloud Microphysics Module !! This is cloud microphysics package for GFDL global cloud resolving model. diff --git a/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.meta b/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.meta index 2b7db1961..c1324436b 100644 --- a/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.meta +++ b/physics/MP/GFDL/v1_2019/gfdl_cloud_microphys.meta @@ -93,7 +93,7 @@ ######################################################################## [ccpp-arg-table] - name = gfdl_cloud_microphys_finalize + name = gfdl_cloud_microphys_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.F90 b/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.F90 index eae68d4f3..fe334183f 100644 --- a/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.F90 +++ b/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.F90 @@ -12,7 +12,7 @@ module gfdl_cloud_microphys_v3 private - public gfdl_cloud_microphys_v3_run, gfdl_cloud_microphys_v3_init, gfdl_cloud_microphys_v3_finalize + public gfdl_cloud_microphys_v3_run, gfdl_cloud_microphys_v3_init, gfdl_cloud_microphys_v3_final logical :: is_initialized = .false. @@ -74,13 +74,13 @@ end subroutine gfdl_cloud_microphys_v3_init ! ======================================================================= -!>\brief The subroutine 'gfdl_cloud_microphys_v3_finalize' terminates the GFDL +!>\brief The subroutine 'gfdl_cloud_microphys_v3_final' terminates the GFDL !! cloud microphysics. !! -!! \section arg_table_gfdl_cloud_microphys_v3_finalize Argument Table -!! \htmlinclude gfdl_cloud_microphys_v3_finalize.html +!! \section arg_table_gfdl_cloud_microphys_v3_final Argument Table +!! \htmlinclude gfdl_cloud_microphys_v3_final.html !! - subroutine gfdl_cloud_microphys_v3_finalize(errmsg, errflg) + subroutine gfdl_cloud_microphys_v3_final(errmsg, errflg) implicit none @@ -97,7 +97,7 @@ subroutine gfdl_cloud_microphys_v3_finalize(errmsg, errflg) is_initialized = .false. - end subroutine gfdl_cloud_microphys_v3_finalize + end subroutine gfdl_cloud_microphys_v3_final !>\defgroup gfdlmp GFDL Cloud Microphysics Module !! This is cloud microphysics package for GFDL global cloud resolving model. diff --git a/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta b/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta index 3b022bf25..1f7ada3aa 100644 --- a/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta +++ b/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta @@ -99,7 +99,7 @@ ######################################################################## [ccpp-arg-table] - name = gfdl_cloud_microphys_v3_finalize + name = gfdl_cloud_microphys_v3_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/MP/TEMPO/module_mp_tempo.F90 b/physics/MP/TEMPO/module_mp_tempo.F90 index 89c62f7ec..27a37442b 100644 --- a/physics/MP/TEMPO/module_mp_tempo.F90 +++ b/physics/MP/TEMPO/module_mp_tempo.F90 @@ -1452,7 +1452,7 @@ END SUBROUTINE tempo_3d_to_1d_driver !> @} !>\ingroup aathompson - SUBROUTINE tempo_finalize() + SUBROUTINE tempo_final() IMPLICIT NONE @@ -1496,7 +1496,7 @@ SUBROUTINE tempo_finalize() if (ALLOCATED(tnccn_act)) DEALLOCATE(tnccn_act) - END SUBROUTINE tempo_finalize + END SUBROUTINE tempo_final end module module_mp_tempo !+---+-----------------------------------------------------------------+ diff --git a/physics/MP/TEMPO/mp_tempo.F90 b/physics/MP/TEMPO/mp_tempo.F90 index 174eaac2e..c445e9105 100644 --- a/physics/MP/TEMPO/mp_tempo.F90 +++ b/physics/MP/TEMPO/mp_tempo.F90 @@ -11,11 +11,11 @@ module mp_tempo use module_mp_tempo_params use module_mp_tempo_utils, only : make_IceNumber, make_RainNumber, make_DropletNumber - use module_mp_tempo, only : tempo_init, tempo_3d_to_1d_driver, tempo_finalize + use module_mp_tempo, only : tempo_init, tempo_3d_to_1d_driver, tempo_final implicit none - public :: mp_tempo_init, mp_tempo_run, mp_tempo_finalize + public :: mp_tempo_init, mp_tempo_run, mp_tempo_final private @@ -389,7 +389,7 @@ subroutine mp_tempo_run(ncol, nlev, con_g, con_rd, & refl_10cm, fullradar_diag, & max_hail_diam_sfc, & do_radar_ref, aerfld, & - mpicomm, mpirank, mpiroot, blkno, & + mpicomm, mpirank, mpiroot, & ext_diag, diag3d, reset_diag3d, & spp_wts_mp, spp_mp, n_var_spp, & spp_prt_list, spp_var_list, & @@ -451,8 +451,7 @@ subroutine mp_tempo_run(ncol, nlev, con_g, con_rd, & logical, intent(in ) :: do_radar_ref logical, intent(in) :: sedi_semi integer, intent(in) :: decfl - ! MPI and block information - integer, intent(in) :: blkno + ! MPI information type(MPI_Comm), intent(in) :: mpicomm integer, intent(in) :: mpirank integer, intent(in) :: mpiroot @@ -568,7 +567,7 @@ subroutine mp_tempo_run(ncol, nlev, con_g, con_rd, & return endif - if (first_time_step .and. istep==1 .and. blkno==1) then + if (first_time_step .and. istep==1) then ! Check initialization state if (.not.is_initialized) then write(errmsg, fmt='((a))') 'mp_tempo_run called before mp_tempo_init' @@ -1056,10 +1055,10 @@ subroutine mp_tempo_run(ncol, nlev, con_g, con_rd, & end subroutine mp_tempo_run !>@} -!> \section arg_table_mp_tempo_finalize Argument Table -!! \htmlinclude mp_tempo_finalize.html +!> \section arg_table_mp_tempo_final Argument Table +!! \htmlinclude mp_tempo_final.html !! - subroutine mp_tempo_finalize(is_initialized, errmsg, errflg) + subroutine mp_tempo_final(is_initialized, errmsg, errflg) implicit none logical, intent(inout) :: is_initialized @@ -1072,11 +1071,11 @@ subroutine mp_tempo_finalize(is_initialized, errmsg, errflg) if (.not.is_initialized) return - call tempo_finalize() + call tempo_final() is_initialized = .false. - end subroutine mp_tempo_finalize + end subroutine mp_tempo_final subroutine get_niwfa(aerfld, nifa, nwfa, ncol, nlev) ! To calculate nifa and nwfa from bins of aerosols. diff --git a/physics/MP/TEMPO/mp_tempo.meta b/physics/MP/TEMPO/mp_tempo.meta index b677c0645..da31f332e 100644 --- a/physics/MP/TEMPO/mp_tempo.meta +++ b/physics/MP/TEMPO/mp_tempo.meta @@ -826,13 +826,6 @@ dimensions = () type = integer intent = in -[blkno] - standard_name = ccpp_block_number - long_name = number of block for explicit data blocking in CCPP - units = index - dimensions = () - type = integer - intent = in [ext_diag] standard_name = flag_for_extended_diagnostic_output_from_thompson_microphysics long_name = flag for extended diagnostic output from thompson microphysics @@ -955,7 +948,7 @@ ######################################################################## [ccpp-arg-table] - name = mp_tempo_finalize + name = mp_tempo_final type = scheme [is_initialized] standard_name = flag_for_thompson_mp_scheme_initialization diff --git a/physics/MP/TEMPO/mp_tempo_post.F90 b/physics/MP/TEMPO/mp_tempo_post.F90 index ea71d7f14..dea4e78bf 100644 --- a/physics/MP/TEMPO/mp_tempo_post.F90 +++ b/physics/MP/TEMPO/mp_tempo_post.F90 @@ -4,7 +4,7 @@ module mp_tempo_post implicit none - public :: mp_tempo_post_init, mp_tempo_post_run, mp_tempo_post_finalize + public :: mp_tempo_post_init, mp_tempo_post_run, mp_tempo_post_final private @@ -121,10 +121,10 @@ subroutine mp_tempo_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, ttendlim, end subroutine mp_tempo_post_run -!! \section arg_table_mp_tempo_post_finalize Argument Table -!! \htmlinclude mp_tempo_post_finalize.html +!! \section arg_table_mp_tempo_post_final Argument Table +!! \htmlinclude mp_tempo_post_final.html !! - subroutine mp_tempo_post_finalize(errmsg, errflg) + subroutine mp_tempo_post_final(errmsg, errflg) implicit none @@ -141,6 +141,6 @@ subroutine mp_tempo_post_finalize(errmsg, errflg) is_initialized = .false. - end subroutine mp_tempo_post_finalize + end subroutine mp_tempo_post_final end module mp_tempo_post diff --git a/physics/MP/TEMPO/mp_tempo_post.meta b/physics/MP/TEMPO/mp_tempo_post.meta index 6661948c7..bde8751ac 100644 --- a/physics/MP/TEMPO/mp_tempo_post.meta +++ b/physics/MP/TEMPO/mp_tempo_post.meta @@ -114,7 +114,7 @@ ######################################################################## [ccpp-arg-table] - name = mp_tempo_post_finalize + name = mp_tempo_post_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/MP/Thompson/module_mp_thompson.F90 b/physics/MP/Thompson/module_mp_thompson.F90 index b01bf41dd..58268e89f 100644 --- a/physics/MP/Thompson/module_mp_thompson.F90 +++ b/physics/MP/Thompson/module_mp_thompson.F90 @@ -1821,7 +1821,7 @@ end subroutine mp_gt_driver !> @} !>\ingroup aathompson - subroutine thompson_finalize() + subroutine thompson_final() implicit none @@ -1866,7 +1866,7 @@ subroutine thompson_finalize() if (ALLOCATED(tnccn_act)) DEALLOCATE(tnccn_act) - end subroutine thompson_finalize + end subroutine thompson_final !+---+-----------------------------------------------------------------+ !ctrlL diff --git a/physics/MP/Thompson/mp_thompson.F90 b/physics/MP/Thompson/mp_thompson.F90 index b3454c49f..e4a079029 100644 --- a/physics/MP/Thompson/mp_thompson.F90 +++ b/physics/MP/Thompson/mp_thompson.F90 @@ -10,7 +10,7 @@ module mp_thompson use mpi_f08 use machine, only : kind_phys - use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_finalize, calc_effectRad + use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_final, calc_effectRad use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps use module_mp_thompson, only : re_qc_min, re_qc_max, re_qi_min, re_qi_max, re_qs_min, re_qs_max @@ -18,7 +18,7 @@ module mp_thompson implicit none - public :: mp_thompson_init, mp_thompson_run, mp_thompson_finalize + public :: mp_thompson_init, mp_thompson_run, mp_thompson_final private @@ -377,7 +377,7 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & refl_10cm, fullradar_diag, & max_hail_diam_sfc, & do_radar_ref, aerfld, & - mpicomm, mpirank, mpiroot, blkno, & + mpicomm, mpirank, mpiroot, & ext_diag, diag3d, reset_diag3d, & spp_wts_mp, spp_mp, n_var_spp, & spp_prt_list, spp_var_list, & @@ -439,8 +439,7 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & logical, intent(in ) :: do_radar_ref logical, intent(in) :: sedi_semi integer, intent(in) :: decfl - ! MPI and block information - integer, intent(in) :: blkno + ! MPI information type(MPI_Comm), intent(in) :: mpicomm integer, intent(in) :: mpirank integer, intent(in) :: mpiroot @@ -553,7 +552,7 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & errmsg = '' errflg = 0 - if (first_time_step .and. istep==1 .and. blkno==1) then + if (first_time_step .and. istep==1) then ! Check initialization state if (.not.is_initialized) then write(errmsg, fmt='((a))') 'mp_thompson_run called before mp_thompson_init' @@ -916,10 +915,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & end subroutine mp_thompson_run !>@} -!> \section arg_table_mp_thompson_finalize Argument Table -!! \htmlinclude mp_thompson_finalize.html +!> \section arg_table_mp_thompson_final Argument Table +!! \htmlinclude mp_thompson_final.html !! - subroutine mp_thompson_finalize(is_initialized, errmsg, errflg) + subroutine mp_thompson_final(is_initialized, errmsg, errflg) implicit none logical, intent(inout) :: is_initialized @@ -932,11 +931,11 @@ subroutine mp_thompson_finalize(is_initialized, errmsg, errflg) if (.not.is_initialized) return - call thompson_finalize() + call thompson_final() is_initialized = .false. - end subroutine mp_thompson_finalize + end subroutine mp_thompson_final subroutine get_niwfa(aerfld, nifa, nwfa, ncol, nlev) ! To calculate nifa and nwfa from bins of aerosols. diff --git a/physics/MP/Thompson/mp_thompson.meta b/physics/MP/Thompson/mp_thompson.meta index f1d2a45f5..998fb4a44 100644 --- a/physics/MP/Thompson/mp_thompson.meta +++ b/physics/MP/Thompson/mp_thompson.meta @@ -832,13 +832,6 @@ dimensions = () type = integer intent = in -[blkno] - standard_name = ccpp_block_number - long_name = number of block for explicit data blocking in CCPP - units = index - dimensions = () - type = integer - intent = in [ext_diag] standard_name = flag_for_extended_diagnostic_output_from_thompson_microphysics long_name = flag for extended diagnostic output from thompson microphysics @@ -979,7 +972,7 @@ ######################################################################## [ccpp-arg-table] - name = mp_thompson_finalize + name = mp_thompson_final type = scheme [is_initialized] standard_name = flag_for_thompson_mp_scheme_initialization diff --git a/physics/MP/Thompson/mp_thompson_post.F90 b/physics/MP/Thompson/mp_thompson_post.F90 index 7b333f2b1..6b8fdc184 100644 --- a/physics/MP/Thompson/mp_thompson_post.F90 +++ b/physics/MP/Thompson/mp_thompson_post.F90 @@ -9,7 +9,7 @@ module mp_thompson_post implicit none - public :: mp_thompson_post_init, mp_thompson_post_run, mp_thompson_post_finalize + public :: mp_thompson_post_init, mp_thompson_post_run, mp_thompson_post_final private @@ -129,10 +129,10 @@ subroutine mp_thompson_post_run(ncol, nlev, tgrs_save, tgrs, prslk, dtp, ttendli end subroutine mp_thompson_post_run -!> \section arg_table_mp_thompson_post_finalize Argument Table -!! \htmlinclude mp_thompson_post_finalize.html +!> \section arg_table_mp_thompson_post_final Argument Table +!! \htmlinclude mp_thompson_post_final.html !! - subroutine mp_thompson_post_finalize(errmsg, errflg) + subroutine mp_thompson_post_final(errmsg, errflg) implicit none @@ -149,6 +149,6 @@ subroutine mp_thompson_post_finalize(errmsg, errflg) is_initialized = .false. - end subroutine mp_thompson_post_finalize + end subroutine mp_thompson_post_final end module mp_thompson_post diff --git a/physics/MP/Thompson/mp_thompson_post.meta b/physics/MP/Thompson/mp_thompson_post.meta index 85704316f..87fc1bdab 100644 --- a/physics/MP/Thompson/mp_thompson_post.meta +++ b/physics/MP/Thompson/mp_thompson_post.meta @@ -135,7 +135,7 @@ ######################################################################## [ccpp-arg-table] - name = mp_thompson_post_finalize + name = mp_thompson_post_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/MP/multi_gases.F90 b/physics/MP/multi_gases.F90 index 4f7c53aa4..0e241f017 100644 --- a/physics/MP/multi_gases.F90 +++ b/physics/MP/multi_gases.F90 @@ -133,14 +133,14 @@ end subroutine multi_gases_init ! ---------------------------------------------------------------- ! ---------------------------------------------------------------- - subroutine multi_gases_finalize() + subroutine multi_gases_final() if(allocated(vir )) deallocate(vir ) if(allocated(vicv)) deallocate(vicp) if(allocated(vicp)) deallocate(vicv) return - end subroutine multi_gases_finalize + end subroutine multi_gases_final ! ---------------------------------------------------------------- ! -------------------------------------------------------- diff --git a/physics/Radiation/RRTMG/radsw_param.meta b/physics/Radiation/RRTMG/radsw_param.meta index d6b734a7a..56081806b 100644 --- a/physics/Radiation/RRTMG/radsw_param.meta +++ b/physics/Radiation/RRTMG/radsw_param.meta @@ -2,6 +2,7 @@ name = topfsw_type type = ddt dependencies = + module_name = module_radsw_parameters [ccpp-arg-table] name = topfsw_type @@ -12,6 +13,7 @@ name = sfcfsw_type type = ddt dependencies = + module_name = module_radsw_parameters [ccpp-arg-table] name = sfcfsw_type @@ -21,7 +23,8 @@ [ccpp-table-properties] name = cmpfsw_type type = ddt - dependencies = + dependencies = + module_name = module_radsw_parameters [ccpp-arg-table] name = cmpfsw_type @@ -32,41 +35,8 @@ name = profsw_type type = ddt dependencies = + module_name = module_radsw_parameters [ccpp-arg-table] name = profsw_type type = ddt - -######################################################################## -[ccpp-table-properties] - name = module_radsw_parameters - type = module - dependencies = - -[ccpp-arg-table] - name = module_radsw_parameters - type = module -[topfsw_type] - standard_name = topfsw_type - long_name = definition of type topfsw_type - units = DDT - dimensions = () - type = topfsw_type -[sfcfsw_type] - standard_name = sfcfsw_type - long_name = definition of type sfcfsw_type - units = DDT - dimensions = () - type = sfcfsw_type -[cmpfsw_type] - standard_name = cmpfsw_type - long_name = definition of type cmpfsw_type - units = DDT - dimensions = () - type = cmpfsw_type -[profsw_type] - standard_name = profsw_type - long_name = definition of type profsw_type - units = DDT - dimensions = () - type = profsw_type diff --git a/physics/SFC_Models/Lake/Flake/flake_driver.F90 b/physics/SFC_Models/Lake/Flake/flake_driver.F90 index b5d54009a..6d93cfb63 100644 --- a/physics/SFC_Models/Lake/Flake/flake_driver.F90 +++ b/physics/SFC_Models/Lake/Flake/flake_driver.F90 @@ -418,14 +418,14 @@ module flake_driver_post use machine, only: kind_phys implicit none private - public flake_driver_post_init, flake_driver_post_finalize, flake_driver_post_run + public flake_driver_post_init, flake_driver_post_final, flake_driver_post_run contains subroutine flake_driver_post_init() end subroutine flake_driver_post_init - subroutine flake_driver_post_finalize() - end subroutine flake_driver_post_finalize + subroutine flake_driver_post_final() + end subroutine flake_driver_post_final !> \section arg_table_flake_driver_post Argument Table !! \htmlinclude flake_driver_post.html diff --git a/physics/SFC_Models/Land/Noah/lsm_noah.f b/physics/SFC_Models/Land/Noah/lsm_noah.f index 9f41b83d0..66b4caacd 100644 --- a/physics/SFC_Models/Land/Noah/lsm_noah.f +++ b/physics/SFC_Models/Land/Noah/lsm_noah.f @@ -13,7 +13,7 @@ module lsm_noah private - public :: lsm_noah_init, lsm_noah_run, lsm_noah_finalize + public :: lsm_noah_init, lsm_noah_run, lsm_noah_final contains @@ -69,10 +69,10 @@ subroutine lsm_noah_init(lsm, lsm_noah, me, isot, ivegsrc, nlunit, end subroutine lsm_noah_init -!> \section arg_table_lsm_noah_finalize Argument Table -!! \htmlinclude lsm_noah_finalize.html +!> \section arg_table_lsm_noah_final Argument Table +!! \htmlinclude lsm_noah_final.html !! - subroutine lsm_noah_finalize(errmsg, errflg) + subroutine lsm_noah_final(errmsg, errflg) implicit none @@ -83,7 +83,7 @@ subroutine lsm_noah_finalize(errmsg, errflg) errmsg = '' errflg = 0 - end subroutine lsm_noah_finalize + end subroutine lsm_noah_final ! ===================================================================== ! diff --git a/physics/SFC_Models/Land/Noah/lsm_noah.meta b/physics/SFC_Models/Land/Noah/lsm_noah.meta index 3270c9de6..14de0b18e 100644 --- a/physics/SFC_Models/Land/Noah/lsm_noah.meta +++ b/physics/SFC_Models/Land/Noah/lsm_noah.meta @@ -84,7 +84,7 @@ ######################################################################## [ccpp-arg-table] - name = lsm_noah_finalize + name = lsm_noah_final type = scheme [errmsg] standard_name = ccpp_error_message diff --git a/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.F90 b/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.F90 index cf32a8604..e446b9018 100644 --- a/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.F90 +++ b/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.F90 @@ -94,7 +94,7 @@ module land_iau_mod end type land_iau_control_type public land_iau_control_type, land_iau_external_data_type, land_iau_state_type, land_iau_mod_set_control, & - land_iau_mod_init, land_iau_mod_getiauforcing, land_iau_mod_finalize, calculate_landinc_mask + land_iau_mod_init, land_iau_mod_getiauforcing, land_iau_mod_final, calculate_landinc_mask contains @@ -363,7 +363,7 @@ subroutine land_iau_mod_init (Land_IAU_Control, Land_IAU_Data, Land_IAU_State, e end subroutine land_iau_mod_init -subroutine land_iau_mod_finalize(Land_IAU_Control, Land_IAU_Data, Land_IAU_state, errmsg, errflg) +subroutine land_iau_mod_final(Land_IAU_Control, Land_IAU_Data, Land_IAU_state, errmsg, errflg) implicit none @@ -383,7 +383,7 @@ subroutine land_iau_mod_finalize(Land_IAU_Control, Land_IAU_Data, Land_IAU_state if (allocated(Land_IAU_state%stc_inc)) deallocate(Land_IAU_state%stc_inc) if (allocated(Land_IAU_state%slc_inc)) deallocate(Land_IAU_state%slc_inc) -end subroutine land_iau_mod_finalize +end subroutine land_iau_mod_final subroutine land_iau_mod_getiauforcing(Land_IAU_Control, Land_IAU_Data, Land_IAU_State, errmsg, errflg) diff --git a/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.meta b/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.meta index 8541af659..daa487ad4 100644 --- a/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.meta +++ b/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.meta @@ -1,7 +1,8 @@ [ccpp-table-properties] name = land_iau_external_data_type type = ddt - dependencies = + dependencies = ../../../hooks/machine.F + module_name = land_iau_mod [ccpp-arg-table] name = land_iau_external_data_type @@ -12,7 +13,8 @@ [ccpp-table-properties] name = land_iau_state_type type = ddt - dependencies = + dependencies = ../../../hooks/machine.F + module_name = land_iau_mod [ccpp-arg-table] name = land_iau_state_type @@ -23,36 +25,9 @@ [ccpp-table-properties] name = land_iau_control_type type = ddt - dependencies = + dependencies = ../../../hooks/machine.F + module_name = land_iau_mod [ccpp-arg-table] name = land_iau_control_type type = ddt - -######################################################################## -[ccpp-table-properties] - name = land_iau_mod - type = module - dependencies = machine.F - -[ccpp-arg-table] - name = land_iau_mod - type = module -[land_iau_external_data_type] - standard_name = land_iau_external_data_type - long_name = definition of type land_iau_external_data_type - units = DDT - dimensions = () - type = land_iau_external_data_type -[land_iau_state_type] - standard_name = land_iau_state_type - long_name = definition of type land_iau_state_type - units = DDT - dimensions = () - type = land_iau_state_type -[land_iau_control_type] - standard_name = land_iau_control_type - long_name = definition of type land_iau_control_type - units = DDT - dimensions = () - type = land_iau_control_type diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 index a5f855f11..3db26b6eb 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90 @@ -18,7 +18,7 @@ module noahmpdrv ! These hold and apply Land IAU increments for soil temperature ! (possibly will extend to soil moisture increments) use land_iau_mod, only: land_iau_control_type, land_iau_external_data_type, land_iau_state_type, & - land_iau_mod_init, land_iau_mod_getiauforcing, land_iau_mod_finalize, calculate_landinc_mask + land_iau_mod_init, land_iau_mod_getiauforcing, land_iau_mod_final, calculate_landinc_mask implicit none @@ -27,7 +27,7 @@ module noahmpdrv private public :: noahmpdrv_init, noahmpdrv_run, & - noahmpdrv_timestep_init, noahmpdrv_finalize + noahmpdrv_timestep_init, noahmpdrv_final contains @@ -380,11 +380,11 @@ end subroutine noahmpdrv_timestep_init !> \ingroup NoahMP_LSM !! \brief This subroutine mirrors noahmpdrv_init -!! it calls land_iau_finalize which frees up allocated memory by IAU_init (in noahmdrv_init) -!! \section arg_table_noahmpdrv_finalize Argument Table -!! \htmlinclude noahmpdrv_finalize.html +!! it calls land_iau_final which frees up allocated memory by IAU_init (in noahmdrv_init) +!! \section arg_table_noahmpdrv_final Argument Table +!! \htmlinclude noahmpdrv_final.html !! - subroutine noahmpdrv_finalize (Land_IAU_Control, Land_IAU_Data, Land_IAU_State, errmsg, errflg) + subroutine noahmpdrv_final (Land_IAU_Control, Land_IAU_Data, Land_IAU_State, errmsg, errflg) use machine, only: kind_phys implicit none @@ -399,9 +399,9 @@ subroutine noahmpdrv_finalize (Land_IAU_Control, Land_IAU_Data, Land_IAU_State, errflg = 0 if (.not. Land_IAU_Control%do_land_iau) return - call land_iau_mod_finalize(Land_IAU_Control, Land_IAU_Data, Land_IAU_State, errmsg, errflg) + call land_iau_mod_final(Land_IAU_Control, Land_IAU_Data, Land_IAU_State, errmsg, errflg) - end subroutine noahmpdrv_finalize + end subroutine noahmpdrv_final !> \ingroup NoahMP_LSM !! \brief This subroutine is the main CCPP entry point for the NoahMP LSM. diff --git a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta index ff5d19f5a..319f7911e 100644 --- a/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta +++ b/physics/SFC_Models/Land/Noahmp/noahmpdrv.meta @@ -285,7 +285,7 @@ ####################################################################### [ccpp-arg-table] - name = noahmpdrv_finalize + name = noahmpdrv_final type = scheme [land_iau_control] standard_name = land_data_assimilation_control diff --git a/physics/SFC_Models/Land/RUC/lsm_ruc.F90 b/physics/SFC_Models/Land/RUC/lsm_ruc.F90 index 70fba9534..23a001a09 100644 --- a/physics/SFC_Models/Land/RUC/lsm_ruc.F90 +++ b/physics/SFC_Models/Land/RUC/lsm_ruc.F90 @@ -17,7 +17,7 @@ module lsm_ruc private - public :: lsm_ruc_init, lsm_ruc_run, lsm_ruc_finalize + public :: lsm_ruc_init, lsm_ruc_run, lsm_ruc_final real(kind_phys), parameter :: zero = 0.0_kind_dbl_prec, one = 1.0_kind_dbl_prec, epsln = 1.0e-8_kind_dbl_prec real(kind_phys), dimension (2), parameter, private :: d = (/0.1,0.25/) @@ -237,10 +237,10 @@ subroutine lsm_ruc_init (me, master, isot, ivegsrc, nlunit, & end subroutine lsm_ruc_init -!> \section arg_table_lsm_ruc_finalize Argument Table -!! \htmlinclude lsm_ruc_finalize.html +!> \section arg_table_lsm_ruc_final Argument Table +!! \htmlinclude lsm_ruc_final.html !! - subroutine lsm_ruc_finalize (errmsg, errflg) + subroutine lsm_ruc_final (errmsg, errflg) implicit none @@ -251,7 +251,7 @@ subroutine lsm_ruc_finalize (errmsg, errflg) errmsg = '' errflg = 0 - end subroutine lsm_ruc_finalize + end subroutine lsm_ruc_final ! ===================================================================== ! ! lsm_ruc_run: ! diff --git a/physics/SFC_Models/Land/RUC/lsm_ruc.meta b/physics/SFC_Models/Land/RUC/lsm_ruc.meta index e40cecc63..4fc8e3ad9 100644 --- a/physics/SFC_Models/Land/RUC/lsm_ruc.meta +++ b/physics/SFC_Models/Land/RUC/lsm_ruc.meta @@ -514,7 +514,7 @@ ######################################################################## [ccpp-arg-table] - name = lsm_ruc_finalize + name = lsm_ruc_final type = scheme [errmsg] standard_name = ccpp_error_message From cf1664daaed3dd1f6f3877c3ca6e9e94909202bc Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 14 May 2026 11:47:20 -0600 Subject: [PATCH 04/14] Update submodule pointer for physics/MP/TEMPO/TEMPO --- .gitmodules | 6 ++++-- physics/MP/TEMPO/TEMPO | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 1b79f9e2f..7f5d8dcf2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,8 +4,10 @@ branch = main [submodule "physics/MP/TEMPO/TEMPO"] path = physics/MP/TEMPO/TEMPO - url = https://github.com/NCAR/TEMPO - branch = main + #url = https://github.com/NCAR/TEMPO + #branch = main + url = https://github.com/climbfuji/TEMPO + branch = feature/capgen-ng [submodule "physics/SFC_Layer/MYNN/MYNN"] path = physics/SFC_Layer/MYNN/MYNN url = https://github.com/NCAR/MYNN-SFC diff --git a/physics/MP/TEMPO/TEMPO b/physics/MP/TEMPO/TEMPO index c62efd27c..748b7ba46 160000 --- a/physics/MP/TEMPO/TEMPO +++ b/physics/MP/TEMPO/TEMPO @@ -1 +1 @@ -Subproject commit c62efd27caa26f660edf24232f33f154e608b77a +Subproject commit 748b7ba46ee39d90976f0578d9c677cf94c6ebd5 From 71740fd5f00ca069c5b61ab59e64e6dc5e755883 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 14 May 2026 14:59:46 -0600 Subject: [PATCH 05/14] Minor bugfixes for building with capgen-ng in SCM --- physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta | 1 - physics/Radiation/RRTMGP/rrtmgp_lw_main.meta | 4 +++- physics/Radiation/RRTMGP/rrtmgp_sw_main.meta | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta index f6d877169..62ca9f0b9 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.meta @@ -46,7 +46,6 @@ type = integer intent = in [imp_physics_wsm6] - intent = in standard_name = identifier_for_wsm6_microphysics_scheme long_name = choice of WSM6 microphysics scheme units = flag diff --git a/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta b/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta index 9c7807c59..7aa7ca774 100644 --- a/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta +++ b/physics/Radiation/RRTMGP/rrtmgp_lw_main.meta @@ -3,7 +3,9 @@ type = scheme dependencies = ../../hooks/machine.F,../radiation_tools.F90,../mersenne_twister.f dependencies = rte-rrtmgp/rrtmgp-frontend/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90 - dependencies = rte-rrtmgp/rte-frontend/mo_rte_kind.F90,rte-rrtmgp/gas-optics/mo_gas_concentrations.F90,rte-rrtmgp/rte-frontend/mo_optical_props.F90 + dependencies = rte-rrtmgp/rte-frontend/mo_rte_kind.F90,rte-rrtmgp/gas-optics/mo_gas_concentrations.F90 + dependencies = rte-rrtmgp/rte-frontend/mo_optical_props.F90,rte-rrtmgp/rte-kernels/mo_optical_props_kernels.F90 + dependencies = rte-rrtmgp/rte-frontend/mo_rte_lw.F90,rte-rrtmgp/rte-frontend/mo_fluxes.F90 dependencies = rte-rrtmgp/rte-frontend/mo_source_functions.F90,rte-rrtmgp/rte-frontend/mo_rte_lw.F90,rte-rrtmgp/rte-frontend/mo_fluxes.F90 dependencies = rte-rrtmgp/rte-kernels/mo_fluxes_broadband_kernels.F90,rte-rrtmgp/rte-kernels/mo_rte_solver_kernels.F90 dependencies = rrtmgp_lw_gas_optics.F90, rrtmgp_lw_cloud_optics.F90,rrtmgp_sampling.F90 diff --git a/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta b/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta index a0935d84c..43b7a0642 100644 --- a/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta +++ b/physics/Radiation/RRTMGP/rrtmgp_sw_main.meta @@ -3,8 +3,12 @@ type = scheme dependencies = ../../hooks/machine.F,../radiation_tools.F90,../mersenne_twister.f dependencies = rte-rrtmgp/rrtmgp-frontend/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/extensions/mo_fluxes_byband.F90 - dependencies = rte-rrtmgp/rte-frontend/mo_rte_kind.F90,rte-rrtmgp/gas-optics/mo_gas_concentrations.F90,rte-rrtmgp/rte-frontend/mo_optical_props.F90 + dependencies = rte-rrtmgp/rte-frontend/mo_rte_kind.F90,rte-rrtmgp/gas-optics/mo_gas_concentrations.F90 + dependencies = rte-rrtmgp/rte-frontend/mo_optical_props.F90,rte-rrtmgp/rte-kernels/mo_optical_props_kernels.F90 dependencies = rte-rrtmgp/rte-frontend/mo_rte_sw.F90,rte-rrtmgp/rte-frontend/mo_fluxes.F90 + dependencies = rte-rrtmgp/rte-kernels/mo_rte_util_array.F90,rte-rrtmgp/rrtmgp-kernels/mo_gas_optics_rrtmgp_kernels.F90 + dependencies = rte-rrtmgp/gas-optics/mo_gas_optics_util_string.F90,rte-rrtmgp/gas-optics/mo_gas_optics.F90 + dependencies = rte-rrtmgp/rrtmgp-frontend/mo_cloud_optics_rrtmgp.F90 dependencies = rte-rrtmgp/rte-kernels/mo_fluxes_broadband_kernels.F90, rte-rrtmgp/rte-kernels/mo_rte_solver_kernels.F90 dependencies = rrtmgp_sw_gas_optics.F90, rrtmgp_sw_cloud_optics.F90,rrtmgp_sampling.F90 dependencies = ../../Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.F90 From 6379ed4ed193456f02a6ee37b5162dd92fae4aa8 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 20 May 2026 13:58:07 -0600 Subject: [PATCH 06/14] Metadata corrections from ccpp_validator.py --- physics/CONV/C3/cu_c3_driver.meta | 1 + physics/CONV/Grell_Freitas/cu_gf_driver.meta | 1 - physics/CONV/SAMF/samfdeepcnv.meta | 1 + physics/CONV/SAMF/samfshalcnv.meta | 1 + .../UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta | 2 +- .../UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.meta | 2 +- .../UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.F90 | 16 ++++++++-------- .../UFS_SCM_NEPTUNE/GFS_radiation_surface.meta | 6 +++--- .../UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta | 1 + .../UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta | 3 +-- .../GFS_suite_interstitial_3.meta | 4 ++-- .../GFS_suite_interstitial_4.meta | 2 +- .../GFS_surface_composites_pre.meta | 2 +- .../GFS_surface_generic_post.meta | 2 +- .../maximum_hourly_diagnostics.meta | 2 +- .../MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta | 2 +- physics/MP/NSSL/mp_nssl.meta | 12 ++++++------ physics/MP/TEMPO/mp_tempo.F90 | 2 +- physics/MP/TEMPO/mp_tempo.meta | 3 ++- physics/MP/Thompson/mp_thompson.F90 | 2 +- physics/MP/Thompson/mp_thompson.meta | 3 ++- physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta | 4 +++- physics/PBL/YSU/ysuvdif.meta | 1 + physics/PBL/saYSU/shinhongvdif.meta | 1 + physics/SFC_Layer/GFDL/gfdl_sfc_layer.meta | 1 + physics/SFC_Layer/UFS/sfc_diag.meta | 1 + physics/SFC_Models/Lake/CLM/clm_lake.meta | 10 +++++----- physics/SFC_Models/Land/RUC/lsm_ruc.meta | 2 +- physics/SFC_Models/SeaIce/CICE/sfc_sice.meta | 14 +++++++------- physics/smoke_dust/rrfs_smoke_wrapper.meta | 14 +++++++------- 30 files changed, 64 insertions(+), 54 deletions(-) diff --git a/physics/CONV/C3/cu_c3_driver.meta b/physics/CONV/C3/cu_c3_driver.meta index af411cb6b..32a493a11 100644 --- a/physics/CONV/C3/cu_c3_driver.meta +++ b/physics/CONV/C3/cu_c3_driver.meta @@ -288,6 +288,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [phil] standard_name = geopotential diff --git a/physics/CONV/Grell_Freitas/cu_gf_driver.meta b/physics/CONV/Grell_Freitas/cu_gf_driver.meta index 39a20f755..85b275c3c 100644 --- a/physics/CONV/Grell_Freitas/cu_gf_driver.meta +++ b/physics/CONV/Grell_Freitas/cu_gf_driver.meta @@ -579,7 +579,6 @@ type = real kind = kind_phys intent = in - optional = True [do_mynnedmf] standard_name = flag_for_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to activate MYNN-EDMF diff --git a/physics/CONV/SAMF/samfdeepcnv.meta b/physics/CONV/SAMF/samfdeepcnv.meta index 76d5def41..46183e1f8 100644 --- a/physics/CONV/SAMF/samfdeepcnv.meta +++ b/physics/CONV/SAMF/samfdeepcnv.meta @@ -517,6 +517,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [maxMF] standard_name = maximum_mass_flux diff --git a/physics/CONV/SAMF/samfshalcnv.meta b/physics/CONV/SAMF/samfshalcnv.meta index 6fc9c5d0f..5b5c7a2ab 100644 --- a/physics/CONV/SAMF/samfshalcnv.meta +++ b/physics/CONV/SAMF/samfshalcnv.meta @@ -549,6 +549,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [cat_adj_shal] standard_name = adjustment_for_convective_advection_time_for_shallow diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta index ea1b456e3..0ae61d859 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.meta @@ -228,7 +228,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = in + intent = inout [gq0] standard_name = tracer_concentration_of_new_state long_name = tracer concentration updated by physics diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.meta index fbd9e47d8..a0ee03654 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.meta @@ -98,7 +98,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys - intent = in + intent = inout [ntqv] standard_name = index_of_specific_humidity_in_tracer_concentration_array long_name = tracer index for water vapor (specific humidity) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.F90 b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.F90 index 46585c9da..93f3d7620 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.F90 +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.scm.F90 @@ -29,19 +29,19 @@ subroutine GFS_rad_time_vary_timestep_init (lrseeds, rseeds, ! Interface variables logical, intent(in) :: lrseeds - integer, intent(in) :: rseeds(:,:) + integer, intent(in), optional :: rseeds(:,:) integer, intent(in) :: isubc_lw, isubc_sw, cnx, cny, isc, jsc, kdt integer, intent(in) :: imp_physics, imp_physics_zhao_carr, ipsd0, ipsdlim logical, intent(in) :: lslwr, lsswr - integer, intent(inout) :: icsdsw(:), icsdlw(:) + integer, intent(inout), optional :: icsdsw(:), icsdlw(:) integer, intent(in) :: imap(:), jmap(:) real(kind_phys), intent(in) :: sec - real(kind_phys), intent(inout) :: ps_2delt(:) - real(kind_phys), intent(inout) :: ps_1delt(:) - real(kind_phys), intent(inout) :: t_2delt(:,:) - real(kind_phys), intent(inout) :: t_1delt(:,:) - real(kind_phys), intent(inout) :: qv_2delt(:,:) - real(kind_phys), intent(inout) :: qv_1delt(:,:) + real(kind_phys), intent(inout), optional :: ps_2delt(:) + real(kind_phys), intent(inout), optional :: ps_1delt(:) + real(kind_phys), intent(inout), optional :: t_2delt(:,:) + real(kind_phys), intent(inout), optional :: t_1delt(:,:) + real(kind_phys), intent(inout), optional :: qv_2delt(:,:) + real(kind_phys), intent(inout), optional :: qv_1delt(:,:) real(kind_phys), intent(in) :: t(:,:), qv(:,:), ps(:) character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta index 0192b0547..685ccb843 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.meta @@ -334,7 +334,7 @@ units = flag dimensions = (horizontal_loop_extent) type = integer - intent = inout + intent = in [alvsf] standard_name = vis_albedo_strong_cosz long_name = mean vis albedo with strong cosz dependency @@ -390,7 +390,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [semis_ice] standard_name = surface_longwave_emissivity_over_ice long_name = surface lw emissivity in fraction over ice @@ -398,7 +398,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [semis_wat] standard_name = surface_longwave_emissivity_over_water long_name = surface lw emissivity in fraction over water diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta index c2d9f2d4e..6e3cc8138 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta @@ -581,6 +581,7 @@ units = km dimensions = () type = real + kind = kind_phys intent = in [idcor] standard_name = flag_for_decorrelation_length_method diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta index e181d3be6..762a3e156 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta @@ -362,7 +362,6 @@ type = real kind = kind_phys intent = inout - optional = True [tsfg] standard_name = surface_ground_temperature_for_radiation long_name = surface ground temperature for radiation @@ -517,7 +516,7 @@ units = count dimensions = () type = integer - intent = inout + intent = out [idxday] standard_name = daytime_points long_name = daytime points diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta index e8ba49194..bf8d2b9a7 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.meta @@ -268,7 +268,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = out + intent = inout optional = True [omegain] standard_name = prognostic_updraft_velocity_in_convection @@ -277,7 +277,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = in + intent = inout optional = True [omegaout] standard_name = updraft_velocity_updated_by_physics diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta index df7baae51..01c82878d 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.meta @@ -329,7 +329,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in [dtidx] standard_name = cumulative_change_of_state_variables_outer_index long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.meta index 935b0778f..d983513ba 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.meta @@ -282,7 +282,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [tprcp] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta index 5e7949b8f..0524f9a70 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.meta @@ -454,7 +454,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout optional = True [epi] standard_name = instantaneous_surface_potential_evaporation diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta index 7108e2f97..7109d04c3 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta @@ -229,7 +229,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in [pratemax] standard_name = maximum_precipitation_rate_over_maximum_hourly_time_interval long_name = maximum precipitation rate over maximum hourly time interval diff --git a/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta b/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta index 1f7ada3aa..c8e26fe8d 100644 --- a/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta +++ b/physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3.meta @@ -385,7 +385,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = in [dtp] standard_name = timestep_for_physics long_name = physics timestep diff --git a/physics/MP/NSSL/mp_nssl.meta b/physics/MP/NSSL/mp_nssl.meta index 93a5aa65b..6af238ca2 100644 --- a/physics/MP/NSSL/mp_nssl.meta +++ b/physics/MP/NSSL/mp_nssl.meta @@ -592,7 +592,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out [rain] standard_name = lwe_thickness_of_explicit_rain_amount long_name = explicit rain fall on physics timestep @@ -600,7 +600,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out [graupel] standard_name = lwe_thickness_of_graupel_amount long_name = graupel fall on physics timestep @@ -608,7 +608,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out [ice] standard_name = lwe_thickness_of_ice_amount long_name = ice fall on physics timestep @@ -616,7 +616,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out [snow] standard_name = lwe_thickness_of_snow_amount long_name = snow fall on physics timestep @@ -624,7 +624,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = inout + intent = out [sr] standard_name = ratio_of_snowfall_to_rainfall long_name = ratio of snowfall to large-scale rainfall @@ -640,7 +640,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = out + intent = inout [do_radar_ref] standard_name = flag_for_radar_reflectivity long_name = flag for radar reflectivity diff --git a/physics/MP/TEMPO/mp_tempo.F90 b/physics/MP/TEMPO/mp_tempo.F90 index c445e9105..b949a9836 100644 --- a/physics/MP/TEMPO/mp_tempo.F90 +++ b/physics/MP/TEMPO/mp_tempo.F90 @@ -437,7 +437,7 @@ subroutine mp_tempo_run(ncol, nlev, con_g, con_rd, & real(kind_phys), intent(in ) :: dtp logical, intent(in ) :: first_time_step integer, intent(in ) :: istep, nsteps - real, intent(in ) :: dt_inner + real(kind=kind_phys), intent(in ) :: dt_inner ! Precip/rain/snow/graupel fall amounts and fraction of frozen precip real(kind_phys), intent(inout) :: prcp(:) real(kind_phys), intent(inout), optional :: rain(:) diff --git a/physics/MP/TEMPO/mp_tempo.meta b/physics/MP/TEMPO/mp_tempo.meta index da31f332e..e59ae822b 100644 --- a/physics/MP/TEMPO/mp_tempo.meta +++ b/physics/MP/TEMPO/mp_tempo.meta @@ -774,7 +774,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = out + intent = inout [max_hail_diam_sfc] standard_name = max_hail_diameter_sfc long_name = instantaneous maximum hail diameter at lowest model level @@ -855,6 +855,7 @@ units = 1 dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real + kind = kind_phys intent = in optional = True [spp_mp] diff --git a/physics/MP/Thompson/mp_thompson.F90 b/physics/MP/Thompson/mp_thompson.F90 index e4a079029..3a2fe67d4 100644 --- a/physics/MP/Thompson/mp_thompson.F90 +++ b/physics/MP/Thompson/mp_thompson.F90 @@ -425,7 +425,7 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & real(kind_phys), intent(in ) :: dtp logical, intent(in ) :: first_time_step integer, intent(in ) :: istep, nsteps - real, intent(in ) :: dt_inner + real(kind=kind_phys), intent(in ) :: dt_inner ! Precip/rain/snow/graupel fall amounts and fraction of frozen precip real(kind_phys), intent(inout) :: prcp(:) real(kind_phys), intent(inout) :: rain(:) diff --git a/physics/MP/Thompson/mp_thompson.meta b/physics/MP/Thompson/mp_thompson.meta index 998fb4a44..8da9d8a0c 100644 --- a/physics/MP/Thompson/mp_thompson.meta +++ b/physics/MP/Thompson/mp_thompson.meta @@ -780,7 +780,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = out + intent = inout [max_hail_diam_sfc] standard_name = max_hail_diameter_sfc long_name = instantaneous maximum hail diameter at lowest model level @@ -861,6 +861,7 @@ units = 1 dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real + kind = kind_phys intent = in optional = True [spp_mp] diff --git a/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta b/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta index e7b8a5a32..bdd1de461 100644 --- a/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta +++ b/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.meta @@ -109,6 +109,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [con_t0c] standard_name = temperature_at_zero_celsius @@ -362,7 +363,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = True [prsl] standard_name = air_pressure @@ -1363,6 +1364,7 @@ units = 1 dimensions = () type = real + kind = kind_phys intent = in [icloud_bl] standard_name = control_for_sgs_cloud_radiation_coupling_in_mellor_yamamda_nakanishi_niino_pbl_scheme diff --git a/physics/PBL/YSU/ysuvdif.meta b/physics/PBL/YSU/ysuvdif.meta index 0e2eb4ccd..8a34e3359 100644 --- a/physics/PBL/YSU/ysuvdif.meta +++ b/physics/PBL/YSU/ysuvdif.meta @@ -110,6 +110,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [utnp] standard_name = process_split_cumulative_tendency_of_x_wind diff --git a/physics/PBL/saYSU/shinhongvdif.meta b/physics/PBL/saYSU/shinhongvdif.meta index 3e919d78f..2e9916e5e 100644 --- a/physics/PBL/saYSU/shinhongvdif.meta +++ b/physics/PBL/saYSU/shinhongvdif.meta @@ -110,6 +110,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [utnp] standard_name = process_split_cumulative_tendency_of_x_wind diff --git a/physics/SFC_Layer/GFDL/gfdl_sfc_layer.meta b/physics/SFC_Layer/GFDL/gfdl_sfc_layer.meta index ac98437e9..13dd82300 100644 --- a/physics/SFC_Layer/GFDL/gfdl_sfc_layer.meta +++ b/physics/SFC_Layer/GFDL/gfdl_sfc_layer.meta @@ -98,6 +98,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [xlat] standard_name = latitude diff --git a/physics/SFC_Layer/UFS/sfc_diag.meta b/physics/SFC_Layer/UFS/sfc_diag.meta index e556e03ba..a1e9eee00 100644 --- a/physics/SFC_Layer/UFS/sfc_diag.meta +++ b/physics/SFC_Layer/UFS/sfc_diag.meta @@ -91,6 +91,7 @@ units = none dimensions = () type = real + kind = kind_phys intent = in [zf] standard_name = height_above_ground_at_lowest_model_layer diff --git a/physics/SFC_Models/Lake/CLM/clm_lake.meta b/physics/SFC_Models/Lake/CLM/clm_lake.meta index f2f9fb96d..604c2a12b 100644 --- a/physics/SFC_Models/Lake/CLM/clm_lake.meta +++ b/physics/SFC_Models/Lake/CLM/clm_lake.meta @@ -131,7 +131,7 @@ units = flag dimensions = (horizontal_loop_extent) type = integer - intent = inout + intent = in [clm_lake_initialized] standard_name = flag_for_clm_lake_initialization long_name = set to true in clm_lake_run after likeini is called, as a workaround for ccpp limitation @@ -328,7 +328,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [flag_iter] standard_name = flag_for_iteration long_name = flag for iteration @@ -573,7 +573,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout [lake_q2m] standard_name = specific_humidity_at_2m_from_clm_lake long_name = specific humidity at 2m from clm lake @@ -581,7 +581,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout [weasd] standard_name = lwe_thickness_of_surface_snow_amount long_name = water equiv of acc snow depth over land and sea ice @@ -746,7 +746,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [t1] standard_name = air_temperature_at_surface_adjacent_layer long_name = mean temperature at lowest model layer diff --git a/physics/SFC_Models/Land/RUC/lsm_ruc.meta b/physics/SFC_Models/Land/RUC/lsm_ruc.meta index 4fc8e3ad9..b566f2c35 100644 --- a/physics/SFC_Models/Land/RUC/lsm_ruc.meta +++ b/physics/SFC_Models/Land/RUC/lsm_ruc.meta @@ -791,7 +791,7 @@ units = index dimensions = (horizontal_loop_extent) type = integer - intent = in + intent = inout [vtype] standard_name = vegetation_type_classification long_name = vegetation type at each grid cell diff --git a/physics/SFC_Models/SeaIce/CICE/sfc_sice.meta b/physics/SFC_Models/SeaIce/CICE/sfc_sice.meta index 8436cdd1e..6b3472cf4 100644 --- a/physics/SFC_Models/SeaIce/CICE/sfc_sice.meta +++ b/physics/SFC_Models/SeaIce/CICE/sfc_sice.meta @@ -304,7 +304,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [tprcp] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice long_name = total precipitation amount in each time step over ice @@ -344,7 +344,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [qss_w] standard_name = surface_specific_humidity_over_water long_name = surface air saturation specific humidity over water @@ -352,7 +352,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [snowmt] standard_name = surface_snow_melt long_name = snow melt during timestep @@ -392,7 +392,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [evapw] standard_name = kinematic_surface_upward_latent_heat_flux_over_water long_name = kinematic surface upward latent heat flux over water @@ -400,7 +400,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [hflxi] standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice long_name = kinematic surface upward sensible heat flux over ice @@ -408,7 +408,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [hflxw] standard_name = kinematic_surface_upward_sensible_heat_flux_over_water long_name = kinematic surface upward sensible heat flux over water @@ -416,7 +416,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = in + intent = inout [islmsk] standard_name = sea_land_ice_mask_cice long_name = sea/land/ice mask cice (=0/1/2) diff --git a/physics/smoke_dust/rrfs_smoke_wrapper.meta b/physics/smoke_dust/rrfs_smoke_wrapper.meta index ba630d101..2f57bfaf2 100755 --- a/physics/smoke_dust/rrfs_smoke_wrapper.meta +++ b/physics/smoke_dust/rrfs_smoke_wrapper.meta @@ -392,7 +392,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in [us3d] standard_name = x_wind_of_new_state long_name = updated x-direction wind @@ -400,7 +400,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in [vs3d] standard_name = y_wind_of_new_state long_name = updated y-direction wind @@ -408,7 +408,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in [spechum] standard_name = specific_humidity_of_new_state long_name = water vapor specific humidity updated by physics @@ -416,7 +416,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in [w] standard_name = lagrangian_tendency_of_air_pressure long_name = layer mean vertical velocity @@ -439,7 +439,7 @@ dimensions = (horizontal_loop_extent,vertical_dimension_of_soil_internal_to_land_surface_scheme) type = real kind = kind_phys - intent = inout + intent = in optional = True [tslb] standard_name = soil_temperature_for_land_surface_model @@ -896,7 +896,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = True [hwp_ave] standard_name = hourly_wildfire_potential_average @@ -939,7 +939,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - intent = out + intent = inout optional = True [lu_nofire_out] standard_name = sum_of_land_use_fractions_for_no_fire_pixels From 724bcb3d22b493fb81975f073d2a5668e078060a Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 21 May 2026 05:43:06 -0600 Subject: [PATCH 07/14] Correct dimensions for air_pressure_at_interface in physics/MP/Ferrier_Aligo/mp_fer_hires.meta --- physics/MP/Ferrier_Aligo/mp_fer_hires.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/MP/Ferrier_Aligo/mp_fer_hires.meta b/physics/MP/Ferrier_Aligo/mp_fer_hires.meta index 520b5d2d1..0c7741951 100644 --- a/physics/MP/Ferrier_Aligo/mp_fer_hires.meta +++ b/physics/MP/Ferrier_Aligo/mp_fer_hires.meta @@ -158,7 +158,7 @@ standard_name = air_pressure_at_interface long_name = air pressure at model layer interfaces units = Pa - dimensions = (horizontal_loop_extent,vertical_layer_dimension) + dimensions = (horizontal_loop_extent,vertical_interface_dimension) type = real kind = kind_phys intent = in From 354b18db9df329a2fe1a7294eb95e257b8a6ff20 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 21 May 2026 09:51:02 -0600 Subject: [PATCH 08/14] physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta: fix intent for xlat_d and xlon_d --- .../UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta index 8bd350bdc..1c8834c31 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta @@ -2017,7 +2017,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in [xlon_d] standard_name = longitude_in_degree long_name = longitude in degree east @@ -2025,7 +2025,7 @@ dimensions = (horizontal_dimension) type = real kind = kind_phys - intent = inout + intent = in [landfrac] standard_name = land_area_fraction long_name = fraction of horizontal grid area occupied by land From 783f20c6bcbbecd7e8eb98eab1302403785c3fc3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 8 Jun 2026 10:01:06 -0600 Subject: [PATCH 09/14] Fix metadata vs Fortran inconsistencies in GFS_PBL_generic_post.meta and mp_nssl.{F90,meta} --- physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta | 2 +- physics/MP/NSSL/mp_nssl.F90 | 2 +- physics/MP/NSSL/mp_nssl.meta | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta index fc7d5e67d..5c40bb503 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.meta @@ -446,7 +446,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) type = real kind = kind_phys - intent = in + intent = out [dusfc1] standard_name = instantaneous_surface_x_momentum_flux long_name = surface momentum flux in the x-direction valid for current call diff --git a/physics/MP/NSSL/mp_nssl.F90 b/physics/MP/NSSL/mp_nssl.F90 index 0abbe14c7..4142751df 100644 --- a/physics/MP/NSSL/mp_nssl.F90 +++ b/physics/MP/NSSL/mp_nssl.F90 @@ -283,7 +283,7 @@ subroutine mp_nssl_run(ncol, nlev, con_g, con_rd, mpirank, & real(kind_phys), intent( out) :: ten_qs(:,:) real(kind_phys), intent( out) :: ten_qh(:,:) real(kind_phys), intent( out), optional :: ten_qhl(:,:) - real(kind_phys), intent( out) :: ten_cccn(:,:) + real(kind_phys), intent( out), optional :: ten_cccn(:,:) real(kind_phys), intent( out) :: ten_ccw(:,:) real(kind_phys), intent( out) :: ten_crw(:,:) real(kind_phys), intent( out) :: ten_cci(:,:) diff --git a/physics/MP/NSSL/mp_nssl.meta b/physics/MP/NSSL/mp_nssl.meta index 051d010dc..1713d5317 100644 --- a/physics/MP/NSSL/mp_nssl.meta +++ b/physics/MP/NSSL/mp_nssl.meta @@ -433,7 +433,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - intent = inout + intent = in optional = True [cccna] standard_name = activated_cloud_condensation_nuclei_number_concentration From 198bdd707d6514793b8406e8bcc6af720967792f Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 8 Jun 2026 15:28:51 -0600 Subject: [PATCH 10/14] Fix inconsistencies Fortran vs Metadata physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta --- physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta index 762a3e156..b4b50906e 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.meta @@ -22,7 +22,7 @@ units = none dimensions = () type = character - kind = len=128 + kind = len=* intent = in [active_gases_array] standard_name = list_of_active_gases_used_by_RRTMGP @@ -30,7 +30,7 @@ units = none dimensions = (number_of_active_gases_used_by_RRTMGP) type = character - kind = len=128 + kind = len=* intent = out optional = True [errmsg] From bc76b77cfecfe9aa6569ce4598beb814d865bdb0 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Wed, 10 Jun 2026 05:36:28 -0600 Subject: [PATCH 11/14] number_of_openmp_threads --> number_of_physics_threads in all schemes --- .../UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta | 8 ++++---- .../UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta | 8 ++++---- .../UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta | 8 ++++---- .../UFS_SCM_NEPTUNE/GFS_surface_generic_pre.meta | 8 ++++---- physics/MP/Ferrier_Aligo/mp_fer_hires.meta | 4 ++-- physics/MP/NSSL/mp_nssl.meta | 2 +- physics/MP/TEMPO/mp_tempo.meta | 2 +- physics/MP/Thompson/mp_thompson.meta | 2 +- physics/SFC_Layer/UFS/sfc_nst_post.meta | 4 ++-- physics/SFC_Layer/UFS/sfc_nst_pre.meta | 4 ++-- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta index 8bd350bdc..ff64a8c31 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.meta @@ -962,8 +962,8 @@ type = logical intent = in [nthrds] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer @@ -1538,8 +1538,8 @@ kind = kind_phys intent = inout [nthrds] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta index 1c8834c31..d49b61791 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.neptune.meta @@ -962,8 +962,8 @@ type = logical intent = in [nthrds] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer @@ -1538,8 +1538,8 @@ kind = kind_phys intent = inout [nthrds] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta index f34244b42..ac13fb417 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.scm.meta @@ -961,8 +961,8 @@ type = logical intent = in [nthrds] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer @@ -1515,8 +1515,8 @@ kind = kind_phys intent = inout [nthrds] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.meta b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.meta index cd8ed8f09..7ee39941e 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.meta +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.meta @@ -9,8 +9,8 @@ name = GFS_surface_generic_pre_init type = scheme [nthreads] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer @@ -121,8 +121,8 @@ name = GFS_surface_generic_pre_run type = scheme [nthreads] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer diff --git a/physics/MP/Ferrier_Aligo/mp_fer_hires.meta b/physics/MP/Ferrier_Aligo/mp_fer_hires.meta index 7033495f1..19f8b8b82 100644 --- a/physics/MP/Ferrier_Aligo/mp_fer_hires.meta +++ b/physics/MP/Ferrier_Aligo/mp_fer_hires.meta @@ -72,7 +72,7 @@ type = integer intent = in [threads] - standard_name = number_of_openmp_threads + standard_name = number_of_physics_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () @@ -258,7 +258,7 @@ type = integer intent = in [threads] - standard_name = number_of_openmp_threads + standard_name = number_of_physics_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () diff --git a/physics/MP/NSSL/mp_nssl.meta b/physics/MP/NSSL/mp_nssl.meta index 1713d5317..d6976eabb 100644 --- a/physics/MP/NSSL/mp_nssl.meta +++ b/physics/MP/NSSL/mp_nssl.meta @@ -36,7 +36,7 @@ type = integer intent = out [threads] - standard_name = number_of_openmp_threads + standard_name = number_of_physics_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () diff --git a/physics/MP/TEMPO/mp_tempo.meta b/physics/MP/TEMPO/mp_tempo.meta index b377ae445..eff196684 100644 --- a/physics/MP/TEMPO/mp_tempo.meta +++ b/physics/MP/TEMPO/mp_tempo.meta @@ -376,7 +376,7 @@ type = integer intent = in [threads] - standard_name = number_of_openmp_threads + standard_name = number_of_physics_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () diff --git a/physics/MP/Thompson/mp_thompson.meta b/physics/MP/Thompson/mp_thompson.meta index a1dfbe4bd..c10da420f 100644 --- a/physics/MP/Thompson/mp_thompson.meta +++ b/physics/MP/Thompson/mp_thompson.meta @@ -411,7 +411,7 @@ type = integer intent = in [threads] - standard_name = number_of_openmp_threads + standard_name = number_of_physics_threads long_name = number of OpenMP threads available to scheme units = count dimensions = () diff --git a/physics/SFC_Layer/UFS/sfc_nst_post.meta b/physics/SFC_Layer/UFS/sfc_nst_post.meta index caa487384..4a4de4451 100644 --- a/physics/SFC_Layer/UFS/sfc_nst_post.meta +++ b/physics/SFC_Layer/UFS/sfc_nst_post.meta @@ -161,8 +161,8 @@ kind = kind_phys intent = inout [nthreads] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer diff --git a/physics/SFC_Layer/UFS/sfc_nst_pre.meta b/physics/SFC_Layer/UFS/sfc_nst_pre.meta index e9cdef0d1..5d1987a90 100644 --- a/physics/SFC_Layer/UFS/sfc_nst_pre.meta +++ b/physics/SFC_Layer/UFS/sfc_nst_pre.meta @@ -110,8 +110,8 @@ kind = kind_phys intent = in [nthreads] - standard_name = number_of_openmp_threads - long_name = number of OpenMP threads available for physics schemes + standard_name = number_of_physics_threads + long_name = number of OpenMP threads available to scheme units = count dimensions = () type = integer From 1ed02306c204e1dd112b13b403749579ba285fd3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 23 Jun 2026 08:00:51 -0600 Subject: [PATCH 12/14] Update submodule pointer for C3 --- .gitmodules | 4 ++-- physics/CONV/C3 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 42b3ef3bf..831e6b7ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -15,5 +15,5 @@ [submodule "physics/CONV/C3"] path = physics/CONV/C3 url = https://github.com/ufs-community/c3 - branch = main - + #branch = main + branch = feature/capgen-ng diff --git a/physics/CONV/C3 b/physics/CONV/C3 index 4a4108876..068ebca1a 160000 --- a/physics/CONV/C3 +++ b/physics/CONV/C3 @@ -1 +1 @@ -Subproject commit 4a4108876b0c68ffcd08b036b480f7cbfdb62e91 +Subproject commit 068ebca1ac2a37eb9872532aabcd7f48f5f95f61 From 6904e2a0d2935c8799e5a27dd3eae880d4543764 Mon Sep 17 00:00:00 2001 From: Dustin Swales Date: Tue, 23 Jun 2026 10:32:18 -0600 Subject: [PATCH 13/14] Add optional attribute for tke vars in cires_ugwp --- physics/GWD/cires_ugwp.F90 | 2 +- physics/GWD/cires_ugwp.meta | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/physics/GWD/cires_ugwp.F90 b/physics/GWD/cires_ugwp.F90 index b8a404c35..862271fad 100644 --- a/physics/GWD/cires_ugwp.F90 +++ b/physics/GWD/cires_ugwp.F90 @@ -244,7 +244,7 @@ subroutine cires_ugwp_run(do_ugwp, me, master, im, levs, ntrac, dtp, kdt, lonr real(kind=kind_phys), intent(in), dimension(:) :: rain integer, intent(in) :: ntke - real(kind=kind_phys), intent(in), dimension(:,:) :: q_tke, dqdt_tke + real(kind=kind_phys), intent(in), dimension(:,:), optional :: q_tke, dqdt_tke logical, intent(in) :: lprnt integer, intent(in) :: ipr diff --git a/physics/GWD/cires_ugwp.meta b/physics/GWD/cires_ugwp.meta index bcaaa6187..59b59508d 100644 --- a/physics/GWD/cires_ugwp.meta +++ b/physics/GWD/cires_ugwp.meta @@ -791,6 +791,7 @@ type = real kind = kind_phys intent = in + optional = True [dqdt_tke] standard_name = process_split_cumulative_tendency_of_turbulent_kinetic_energy long_name = turbulent kinetic energy tendency due to model physics @@ -799,6 +800,7 @@ type = real kind = kind_phys intent = in + optional True [lprnt] standard_name = flag_print long_name = control flag for diagnostic print out From 3de6efae740ed673406cfe1cbc8cb2b334c13801 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 23 Jun 2026 10:33:34 -0600 Subject: [PATCH 14/14] Bug fix in physics/GWD/cires_ugwp.meta --- physics/GWD/cires_ugwp.meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics/GWD/cires_ugwp.meta b/physics/GWD/cires_ugwp.meta index 59b59508d..788a4fa27 100644 --- a/physics/GWD/cires_ugwp.meta +++ b/physics/GWD/cires_ugwp.meta @@ -800,7 +800,7 @@ type = real kind = kind_phys intent = in - optional True + optional = True [lprnt] standard_name = flag_print long_name = control flag for diagnostic print out