From e671787322feb0a14d213c871bdc75be75ff64c4 Mon Sep 17 00:00:00 2001 From: "Samuel Trahan (NOAA contractor)" <39415369+SamuelTrahanNOAA@users.noreply.github.com> Date: Wed, 18 May 2022 20:01:11 -0400 Subject: [PATCH] Merge May 16 EMC develop to gsl/develop (#144) * Feature/ccpp codeowners (#442) * Per-file CODEOWNERS in ccpp/physics to set up automatic review requests * Code cleanup. Remove used code/variables. Fix minor inconsistencies. (#440) * Remove ESMF Alarm and TimeInterval variables from module_fv3_config. * Variables nfhmax, nfhmax_hf are unused outside InitializeAdvertise. Declared them as local variables. * There is no need to keep duplicates of all time related variables in atm_int_state when we can easily access them from atm_int_state%Atm. * Remove redundant call to fms_init * Add few missing ESMF_LogFoundError checks in module_fcst_grid_comp.F90 * Delete time_utils.F90. Unused. * print only actual errors to stderr, everything else to stdout * Move realizeConnectedCplFields to module_cplfields from module_cap_cpl * Declare Atmos as module variable, and remove atmos_internalstate_wrapper * Move code from clock_cplIntval to InitializeAdvertise * Removed INTERNAL_FILE_NML from atmos_model.F90 * CCPP cloud cover change for Thompson MP associated with Xu Randall (#443) * Remove old comments from GFS_typedefs.F90. * Update logic that sets Model%cnvcld = .false. * Wrapper for ccpp-physics #806, #807, #813 (#447) * CCPP physics updates from PR #806(only diagnostic changes for RRTMGP - small diag-only RT impact for tests involving RRTMGP),#807 (only aborting model if sfc emis file not present when needed) ,#813(only SCM-specific physics changes) * Wrapper for ccpp-physics #808 and 816 (roughness length over ice and NoahMP tsurf bugfix) (#452) This PR contains the ccpp physics PR #808 and #816. 808 addresses an error in the momentum roughness length over tiles with ice. 816 fixes an occasional segfault bug related to the tsurf variable in NoahMP and updates to "improve snow simulation in NoahMP for P8". * Use 'model set run clock' routine in FV3 NUOPC cap. (#450) * Add 'SetRunClock' specialization routine to FV3 NUOPC cap, which sets fv3 model clock. FV3 cap does not keep local copy of clock (clock_fv3) as saved module variable anymore. * Minor code cleanup. * Clean up iovr=4 (exponential cloud overlapping method) in RRTMG (#445) Clean up the exponential cloud overlapping method in RRTMG, which reflects the practice of the pre-2018 operational HWRF model. * Bug fix for dimensions of eta level variables and WAM variables in Fortran code and CCPP metadata (#431) * Add additional diagnostic arrays for radiation-microphysics development * Bug fixes for WAM model runs with levr < levs * Update inline post with latest UPP release upp_v10.0.11 (#449) * Update UPP revision * Add foundation temperaure in GFS read interface for inline post. * Wrapper for ccpp-physics #812 (#453) * update submodule pointer for regression testing of ccpp-physics#812 * MYNN sfclay (RAP suite) restart reproducibility, P8 suite definition files (#455) * Fix uninitialized variable zmtnblck in ccpp/data/GFS_typedefs.F90 * Fix typo in CCPP standard name for ncnvwind in ccpp/data/GFS_typedefs.meta * Add ten 2d variables required for MYNNSFC restart reproducibility to ccpp/driver/GFS_restart.F90 * create initial p8 suites, P8 initial SDFs as copies of FV3_GFS_v16_coupled_nsstNoahmpUGWPv1 and FV3_GFS_v16_nsstNoahmpUGWPv1 Co-authored-by: Denise Worthen * Fixes on initializing snow depth over ice and changes z0ice (#461) * modify FV3GFS_io.F90 by fixing errors associated with initializing snow depth over ice in the case where both land and water coexist (i.e. fractional grid case) * z0ice is changed to 1.0 cm from 1.1cm in atmos_model.F90 * Radar-derived microphysics temperature tendencies similar to operational HRRR (#457) - implements a feature of the operational HRRR, radar-derived microphysics temperature tendencies applied in the first N minutes of the forecast to improve clouds in the first few hours. * HRRR-like radar-derived temperature tendencies * Give a warning when convection is enabled with radar tten * Fix uninitialized variable zmtnblck in ccpp/data/GFS_typedefs.F90 * Add ten 2d variables required for MYNNSFC restart reproducibility to ccpp/driver/GFS_restart.F90 * fixing snod bug in atmos_model.F90 (#465) * Thompson MP cloud tuning (#463) * Improve cloud fraction when using Thompson MP. See NCAR/ccpp-physics#809 for more details. * Feature/hwrf legacy (#459) * Added a new suite definition file: suite_FV3_HAFS_v0_thompson_tedmf_gfdlsf.xml. This SDF is a legacy hwrf SDF but only the GFDL surface layer scheme and the Thompson scheme are kept. * CCPP: Update consistency checks and effective radii calculation for Thompson MP (#462) * This PR updates the submodule pointer for ccpp-physics for the changes described in NCAR/ccpp-physics#786 (Update consistency checks and effective radii calculation for Thompson MP) * Unified write_netcdf, add single file 'cubed_sphere_grid' output (#466) * Unify write_netcdf and write_netcdf_parallel modules. * Add support for writing 'cubed_sphere_grid' history files in a single netcdf file * Code refactoring and cleanup. * Change standard name and unit of CCPP error flag variable in CCPP framework and physics (#467) *Change standard name and unit of CCPP error flag variable in CCPP framework and physics. * Add code to enable ESMF managed threading (#469) * Implement ESMF-managed-threading for fcstComp and wrtComp's. * Revisions to repair iovr=5 cloud overlap option (#471) *This PR addresses part 2 of CCPP issue #748 to activate the exponential-random cloud overlap method (iovr=5) in RRTMG. * Add 2d decomposition on the write grid comp (#470) * update write grid comp to have 2D decomposition on output grid. * combine PR#468: Bug fix in FV3GFS_io.F90 for allocation of temp2d Co-authored-by: Ted Mansell * 4DIAU bug when iau_filter_increments=T (#458) * Add lsm_cold_start variable for RUC LSM SCM support and gwdps bugfix (combined) (#475) * add lsm_cold_start variable in GFS_typedefs.F90/meta and update ccpp/physics for testing * includes @SMoorthi-emc 's bugfix for gwdps.f. * add lon info in the write group (#476) * Multiple output grids (#480) Update fv3 cap and write grid component to enable outputting multiple domains. This is done be creating an array of fcstGrids, and array of rout handles where each element of these arrays correspond to one atm domain. In the write grid component updates were made to allow grid spec parameters for each output grid to be specified separately. Co-authored-by: Gerhard Theurich * GPU-enabled version of Grell-Freitas convection in ccpp-physics (#479) * Enable Thompson MP when coupling with UFS-Aerosols (#484) * Add support for Stochastically Perturbed Parameterizations (SPP) in FV3 and add the FV3_RRFS_v1alpha SDF. (#454) Adds the necessary code in fv3atm to allow for Stochastically Perturbed Parameterizations (SPP) in a set of RAP/HRRR-based physics parameterizations. Specific to the fv3atm repository, code in this PR defines the necessary variables associated with various SPP-related fields (e.g., logical to activate SPP, parameterization-specific SPP variables, etc.) that are then passed to ccpp-physics. * lateral boundary fix for regional runs (#482) * Feature: NSSL Microphysics support (#472) Supports CCPP with new NSSL microphysics scheme, which has separate hydrometeor categories for graupel and hail (Mansell et al. 2010, JAS). This PR allows fv3atm to compile correctly with CCPP+NSSL, but a further update to atmos_cubed_sphere is needed to run correctly. The NSSL scheme is used in NSSL's daily FV3 convection-allowing forecasts, and the scheme itself is aimed at this scale (dx <= 4km). Testing is underway also with a preliminary Warn-on-Forecast FV3 ensemble. * Add p8b SDF (#491) * add p8 suite files * fix 2phases intermediate restart Co-authored-by: Raffaele Montuoro Co-authored-by: Jun Wang * Split CCPP finalize into physics_finalize and (framework) finalize; minor CCPP cleanup and documentation updates (#487) * Minor cleanup and documentation updates for CCPP; split CCPP finalize into physics_finalize and (framework) finalize * Add 'valid time' variable using ISO string format (#492) Add 'valid time' variable using ISO string format to netcdf history files. Use double precision variable to set value of 'time' attribute in wrt comp import state Update ccpp/physics (setting surface-related interstitial variables for SCM prescribed-surface-flux mode) Update inline_post_stub.F90 subroutine interfaces to match inline_post.F90 Co-authored-by: Ted Mansell Co-authored-by: Grant Firl * Fix Lambert Conformal Conic mapping in the write component on the southern hemisphere (#497) Subroutine `lambert` in the write component has been fixed to do the mapping on the southern hemisphere correctly. * Rectify total number of Thompson MP species for PBL mixing (#509) * update upp revision (#505) * move some parameters in mynn surface layer to namelist options * land surface upgrades for p8c (#499) * Added capability for cdmbgwd(1) to scale GSL blocking drag (#502) * release/p8c: it is related to ccpp-physics PBL and cumulus updates plus a bug fix to the Thompson scheme PR #882 (#503) * change ccpp-physics branch to feature/p8c_pbl_cp branch * change ccpp/physics in feature/p8c_pbl_cp branch * revised GFS_typedefs.F90 for the paramters in the saSAS scheme * sync upp * Revert "sync upp" This reverts commit 429d0469c92d200fa058aca6c6bd17adac7f9568. * sync upp to 0185bb9 * Merge remote-tracking branch remote/main for ccpp-physics and update .gitmodules * Bring AQM model into UFS (#511) * Reset to zero coupling arrays for accumulated snow, large scale rain, and convective rain at the end of each coupling step if coupling with chemistry model. * Properly set kind type of literal constants defining zero and one. * Initialize to zero canopy resistance output variablein noah/osu land-surface model subdriver. * Re-implement radiation diagnostic output involving spectral band layer cloud optical depths (0.55 and 10 mu channels) to prevent floating invalid errors due to uninitialized optical depth arrays. * Temporarily disable filling export fields during the NUOPC Realize phase since it breaks coupling with aerosol component. * Increase maximum number of input aerosol scavenging factors to accommodate AQM/CMAQ 5.2.1 chemical tracers. * Remove inst_pres_height_surface from chemistryFieldNames as its imported already elsewhere Co-authored-by: Raffaele Montuoro * RRTMGP for prototype 8 (#498) * Add explict treatment of convective cloud to RRTMGP. * Some cleanup and bug fixes from previous commit. working now with Thompson MP plus radiatively active convective cloud. * Updated physics. New interstitials. * Added explicit MYNN-EDMF cloud coupling to RRTMGP. * Added switches for sgs clouds in GP. * Replaced cld_mynn_ naming convention with cld_pbl_ * Fixed inconsistency between G/GP in Thompson MP. * Some more cleanup of cloud-fraction... * Pulled in Qingfu's changes to ccpp-physics * Synced physics with main * Updated physics. * Revert change from previous commits (sampling of different cloud types). New SDFs for p8c * Changed arguments to implied shape. * Renamed scheme file in SDF. Now common to both RRTMG and RRTMGP SDFs * Syntax error in ccpp-physics * Revert changes to names * Renamed p8_rrtmgp SDFs * Added bounding to temperature at layer-interface used by RRTMGP. * Reorder loop * Combined gp sw and lw aerosol routines. Modest speedup (~4%) * HAFS related moving-nesting, nest coupling, and movable output grid capabilities (#501) * Add the storm-following or specified moving-nesting capability for both the regional and global configuration. * Expand the UFS/HAFS FV3ATM-HYCOM ocean coupling to support the static and moving nesting configuration. * Expand the write grid component to support outputting the moving nest domain properly. * Five HAFS related moving-nesting regression tests are added to test these newly added features. The regional_hafs RT was removed. Co-authored-by: Dom Heinzeller Co-authored-by: Dom Heinzeller Co-authored-by: Grant Firl Co-authored-by: Daniel Rosen Co-authored-by: man.zhang Co-authored-by: William Ramstrom Co-authored-by: Ufuk Turuncoglu Co-authored-by: Dusan Jovic Co-authored-by: A-Kyle Co-authored-by: Gerhard Theurich Co-authored-by: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> * Split GFS_typedefs.F90, rename CCPP_interstitial, import ccpp_t from ccpp_types (#508) * Split GFS_typedefs.F90: move GFS_interstitial_type to CCPP_typedefs.F90; Rename CCPP_interstitial to GFDL_interstitial; Import ccpp_t from ccpp_types instead of ccpp_api * Add bugfix in ccpp/data/GFS_typedefs.meta: mark input_nml_file as active only if the number of lines in the file is greater than zero * Fix uninitialized min_rand variable in Thompson MP when using SPP (#516) * Pass SPP namelist entries outside of stochastic physics routines. * Fixes to SPP metadata * Add active attribute to spp_prt_list * Add active metadata flag to spp_stddev_cutoff * Add active metadata flag for spp_var_list * A bug fix for wet scavenging of aerosols and a minor modification for moisture property calculation (#520) * Update ccpp_prebuild_config.py for one-to-one CCPP physics schemes/files (#519) * point to gsl/merge-develop branch * Point to gsl/merge-develop-to-community branch for ccpp/physics * Corrections to merge + joe updates * Point .gitmodules to Sam's fork * Correct issues found by reviewers * Rename mynnpbl to mynnedmf * Remove some empty _init and _finalize routines and update a comment in sgscloud_radpre * Feature/lndp noahmp2 : add land perturbation scheme for Noah-MP fractional veg (#513) Updates to allow land perturbation scheme to be applied for Noah-MP. Main code changes: -added lsm_noahmp model option to lndp_type==2 land perturbation scheme (fv3-atm, stochastic_physics) -updated comments -cleaned up the namelists to make the different options clearer. Removed misleading lndp_each_step variable from gfs_physics_nml, and replaced it with "lndp_model_type" in the nam_sfcperts namelist for the different forecast types (cycling DA, short forecasts, perturbing only initial conditions) (fv3-atm, stochastic_physics, ufs-weather-model) NOTE: see note below, re: specification of smc perturbation for RAP/HRRR/etc (lndp_model_type==2) -revised code in stochastic_physics_wrapper to only allocate arrays that will be used when passed into lndp_apply_perts (fv3-atm) -deleted unused albedo arrays in stochastic_physics_wrapper and lndp_apply_perts (fv3-atm, stochastic_physics) -fixed bug causing precision errors when calculating the soil moisture ice content (often ~0.0; stochastic_physics) -fixed bug in which lndp_apply_perts wasn't called for nscyc = 0. (fv3-atm) -increased max_nvar_lndp at Jeff Ator's request (fv3-atm) -added a new test for the Noah-MP and lndp==2 combination (ufs-weather-model) * Add \file to smoke files * Add hailcast code in atmos_cubed_sphere (#528) * Combine PROD and REPRO build options into 'Release' build type (#524) Combined PROD and REPRO build modes into 'Release' build type. Now only 'Debug' and 'Release' build type are supported. Both build types must produce bit-for-bit reproducible outputs using different number of threads, mpi tasks, different domain decomposition, have reproducible restarts etc. * Unify inline post (#521) * Unify global and regional inline posts and add bug fix for dx/dy computation. * Update upp revision to dc8bc68 * Set up different configurations of read max/min 2m T for global and regional FV3. * adding bug fix from jili dong and removing U* averaging * adding bug fix from jili dong and removing U* averaging * Remove some commented-out code from cu_gf_driver in ccpp-physics. * Turn rrtmg smoke band 10 into a model namelist variable * Switch ccpp-physics smoke arguments to implied shape * Remove some stops and gotos from ccpp-physics smoke * Remove some hard-coded constants and rename some meta entries * Change RRTMGP to RRTMG in two P8 SDFs (#527) * Change RRTMGP to RRTMG in suite_FV3_GFS_v17_p8 and suite_FV3_GFS_v17_coupled_p8 * deleted or modified some SDFs related to RRTMGP or Thompson schemes * added a new SDF file for P8 with rrtmgp * Rename some standard_names, change a unit, and remove a "use physcons" * NSSL ccpp-physics bugfixes and new ccpp-framework debugging feature (#529) * Set num3d correctly when using radar_tten * Only add cnv_3d_ud_mf to the restart files when needed * Pass some chemistry varibles to mynn_bl_driver correctly * Correct argument passing within mynn edmf * point to NCAR main ccpp/physics * merge gsl institutional fork (#526) Merge in GSL institutional fork * point to sam's repo * ccpp/physics: Change to GSL CODEOWNERS * Returned the comments on soil resistance back. * point to gsl/develop for ccpp/physics Co-authored-by: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Co-authored-by: Dom Heinzeller Co-authored-by: Grant Firl Co-authored-by: mzhangw Co-authored-by: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Co-authored-by: Denise Worthen Co-authored-by: SMoorthi-emc <47667426+SMoorthi-emc@users.noreply.github.com> Co-authored-by: ChunxiZhang-NOAA <49283036+ChunxiZhang-NOAA@users.noreply.github.com> Co-authored-by: Jun Wang <37633869+junwang-noaa@users.noreply.github.com> Co-authored-by: Ted Mansell Co-authored-by: Jeff Whitaker Co-authored-by: Gerhard Theurich Co-authored-by: DomHeinzeller <58610420+DomHeinzeller@users.noreply.github.com> Co-authored-by: Raffaele Montuoro Co-authored-by: JeffBeck-NOAA <55201531+JeffBeck-NOAA@users.noreply.github.com> Co-authored-by: MatthewPyle-NOAA <48285220+MatthewPyle-NOAA@users.noreply.github.com> Co-authored-by: Ted Mansell <37668594+MicroTed@users.noreply.github.com> Co-authored-by: Jessica Meixner Co-authored-by: Jun Wang Co-authored-by: joeolson42 Co-authored-by: HelinWei-NOAA <48133472+HelinWei-NOAA@users.noreply.github.com> Co-authored-by: mdtoyNOAA <73618848+mdtoyNOAA@users.noreply.github.com> Co-authored-by: Brian Curtis <64433609+BrianCurtis-NOAA@users.noreply.github.com> Co-authored-by: dustinswales Co-authored-by: Bin Liu Co-authored-by: Dom Heinzeller Co-authored-by: Grant Firl Co-authored-by: Daniel Rosen Co-authored-by: man.zhang Co-authored-by: William Ramstrom Co-authored-by: Ufuk Turuncoglu Co-authored-by: Dusan Jovic Co-authored-by: A-Kyle Co-authored-by: ClaraDraper-NOAA <33430543+ClaraDraper-NOAA@users.noreply.github.com> Co-authored-by: BinLi-NOAA --- CMakeLists.txt | 9 +- atmos_cubed_sphere | 2 +- atmos_model.F90 | 381 +- ccpp/CMakeLists.txt | 17 +- ccpp/config/ccpp_prebuild_config.py | 95 +- ccpp/data/CCPP_data.F90 | 10 +- ccpp/data/CCPP_data.meta | 8 +- ccpp/data/CCPP_typedefs.F90 | 1597 +++++++- ccpp/data/CCPP_typedefs.meta | 2988 ++++++++++++++- ccpp/data/GFS_typedefs.F90 | 1896 ++-------- ccpp/data/GFS_typedefs.meta | 3277 ++--------------- ccpp/driver/CCPP_driver.F90 | 50 +- ccpp/driver/GFS_diagnostics.F90 | 19 +- ccpp/driver/GFS_init.F90 | 5 +- ccpp/driver/GFS_restart.F90 | 15 +- ccpp/framework | 2 +- ccpp/physics | 2 +- ccpp/suites/suite_FV3_CPT_v0.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_csawmg.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_csawmgshoc.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_gfdlmp.xml | 2 +- .../suite_FV3_GFS_2017_gfdlmp_noahmp.xml | 2 +- .../suite_FV3_GFS_2017_gfdlmp_regional.xml | 2 +- ...uite_FV3_GFS_2017_gfdlmp_regional_c768.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_h2ophys.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_myj.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_ntiedtke.xml | 2 +- .../suites/suite_FV3_GFS_2017_ozphys_2015.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_sas.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_satmedmf.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_satmedmfq.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_shinhong.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_stretched.xml | 2 +- ccpp/suites/suite_FV3_GFS_2017_ysu.xml | 2 +- ccpp/suites/suite_FV3_GFS_cpld_rasmgshoc.xml | 2 +- .../suite_FV3_GFS_cpld_rasmgshocnsst.xml | 2 +- ...suite_FV3_GFS_cpld_rasmgshocnsst_flake.xml | 2 +- .../suite_FV3_GFS_cpld_rasmgshocnsst_ugwp.xml | 2 +- ..._FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp.xml | 2 +- .../suite_FV3_GFS_cpldnst_rasmgshoc.xml | 2 +- ccpp/suites/suite_FV3_GFS_rasmgshoc.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15_gf.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15_gf_thompson.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15_mynn.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15_ras.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15_rasmgshoc.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15_thompson.xml | 2 +- .../suite_FV3_GFS_v15_thompson_mynn.xml | 2 +- ...suite_FV3_GFS_v15_thompson_mynn_lam3km.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15p2.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15p2_RRTMGP.xml | 104 - ccpp/suites/suite_FV3_GFS_v15p2_no_nsst.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15plus.xml | 2 +- ccpp/suites/suite_FV3_GFS_v15plusras.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_coupled.xml | 2 +- .../suite_FV3_GFS_v16_coupled_noahmp.xml | 2 +- .../suite_FV3_GFS_v16_coupled_nsstNoahmp.xml | 2 +- ...e_FV3_GFS_v16_coupled_nsstNoahmpUGWPv1.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_coupled_p8.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_couplednsst.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_csawmg.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_flake.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_no_nsst.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_noahmp.xml | 2 +- .../suite_FV3_GFS_v16_nsstNoahmpUGWPv1.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_p8.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_ras.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_thompson.xml | 2 +- ccpp/suites/suite_FV3_GFS_v16_ugwpv1.xml | 2 +- ...p.xml => suite_FV3_GFS_v17_coupled_p8.xml} | 55 +- ...16_RRTMGP.xml => suite_FV3_GFS_v17_p8.xml} | 57 +- ...gp.xml => suite_FV3_GFS_v17_p8_rrtmgp.xml} | 36 +- .../suite_FV3_GFSv17alp_cpldnsstrasnoahmp.xml | 2 +- ...te_FV3_GFSv17alp_cpldnsstrasugwpnoahmp.xml | 2 +- ...te_FV3_GFSv17alp_cpldnsstrasugwprrtmgp.xml | 105 - ...te_FV3_GFSv17alp_cpldnsstsasugwpnoahmp.xml | 2 +- .../suite_FV3_GFSv17alpha_cpldnsstras.xml | 2 +- ...uite_FV3_GFSv17alpha_cpldnsstras_flake.xml | 2 +- ...suite_FV3_GFSv17alpha_cpldnsstras_ugwp.xml | 2 +- ...uite_FV3_GFSv17alpha_cpldnsstrasnoshal.xml | 2 +- .../suite_FV3_GFSv17alpha_cpldnsstsas.xml | 2 +- ...suite_FV3_GFSv17alpha_cpldnsstsas_ugwp.xml | 2 +- ccpp/suites/suite_FV3_GFSv17alpha_ras.xml | 2 +- .../suite_FV3_GFSv17alpha_ras_flake.xml | 2 +- .../suites/suite_FV3_GFSv17alpha_ras_ugwp.xml | 2 +- ccpp/suites/suite_FV3_GFSv17alpha_sas.xml | 2 +- .../suites/suite_FV3_HAFS_v0_gfdlmp_tedmf.xml | 2 +- .../suite_FV3_HAFS_v0_gfdlmp_tedmf_nonsst.xml | 2 +- ...uite_FV3_HAFS_v0_thompson_tedmf_gfdlsf.xml | 6 +- ccpp/suites/suite_FV3_HRRR.xml | 2 +- ccpp/suites/suite_FV3_HRRR_smoke.xml | 2 +- ccpp/suites/suite_FV3_RAP.xml | 2 +- ccpp/suites/suite_FV3_RAP_RRTMGP.xml | 11 +- ccpp/suites/suite_FV3_RAP_cires_ugwp.xml | 2 +- ccpp/suites/suite_FV3_RAP_flake.xml | 2 +- ccpp/suites/suite_FV3_RAP_noah.xml | 2 +- .../suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml | 2 +- .../suite_FV3_RAP_noah_sfcdiff_ugwpv1.xml | 2 +- ...uite_FV3_RAP_noah_sfcdiff_unified_ugwp.xml | 2 +- ccpp/suites/suite_FV3_RAP_sfcdiff.xml | 2 +- ccpp/suites/suite_FV3_RAP_unified_ugwp.xml | 2 +- ccpp/suites/suite_FV3_RRFS_v1alpha.xml | 2 +- ccpp/suites/suite_FV3_RRFS_v1beta.xml | 2 +- ...n_RRTMGP.xml => suite_FV3_RRFS_v1nssl.xml} | 47 +- cpl/module_cap_cpl.F90 | 34 +- cpl/module_cplfields.F90 | 21 +- fv3_cap.F90 | 390 +- io/inline_post.F90 | 27 +- io/inline_post_stub.F90 | 6 +- io/module_write_internal_state.F90 | 3 - io/module_write_netcdf.F90 | 37 +- io/module_wrt_grid_comp.F90 | 732 +++- io/{post_regional.F90 => post_fv3.F90} | 496 ++- io/post_gfs.F90 | 2631 ------------- io/post_nems_routines.F90 | 4 +- module_fcst_grid_comp.F90 | 474 ++- module_fv3_config.F90 | 1 + .../stochastic_physics_wrapper.F90 | 246 +- upp | 2 +- 123 files changed, 7690 insertions(+), 8374 deletions(-) delete mode 100644 ccpp/suites/suite_FV3_GFS_v15p2_RRTMGP.xml rename ccpp/suites/{suite_FV3_GFS_v16_coupled_p7_rrtmgp.xml => suite_FV3_GFS_v17_coupled_p8.xml} (67%) rename ccpp/suites/{suite_FV3_GFS_v16_RRTMGP.xml => suite_FV3_GFS_v17_p8.xml} (66%) rename ccpp/suites/{suite_FV3_GFS_v16_p7_rrtmgp.xml => suite_FV3_GFS_v17_p8_rrtmgp.xml} (83%) delete mode 100644 ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwprrtmgp.xml rename ccpp/suites/{suite_FV3_GFS_v15_thompson_mynn_RRTMGP.xml => suite_FV3_RRFS_v1nssl.xml} (61%) rename io/{post_regional.F90 => post_fv3.F90} (87%) delete mode 100644 io/post_gfs.F90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 718ba11b4..169ca6e93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,9 @@ set(use_WRTCOMP ON) set(GFS_PHYS ON) set(GFS_TYPES ON) set(USE_GFSL63 ON) +if(MOVING_NEST) + set(MOVING_NEST ON) +endif() add_subdirectory(atmos_cubed_sphere) ############################################################################### @@ -22,7 +25,7 @@ add_subdirectory(atmos_cubed_sphere) if(INLINE_POST) set(BUILD_POSTEXEC OFF) add_subdirectory(upp) - set(POST_SRC io/inline_post.F90 io/post_nems_routines.F90 io/post_gfs.F90 io/post_regional.F90) + set(POST_SRC io/inline_post.F90 io/post_nems_routines.F90 io/post_fv3.F90) else() set(POST_SRC io/inline_post_stub.F90) list(APPEND _fv3atm_defs_private NO_INLINE_POST) @@ -32,6 +35,10 @@ if(NOT PARALLEL_NETCDF) list(APPEND _fv3atm_defs_private NO_PARALLEL_NETCDF) endif() +if(MOVING_NEST) + list(APPEND _fv3atm_defs_private MOVING_NEST) +endif() + add_library(fv3atm atmos_model.F90 fv3_cap.F90 diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 7ce7aa94b..fad4c9f1f 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 7ce7aa94b33b5f3cb351867df50a2ad624bb405f +Subproject commit fad4c9f1fc29c0cbb47df9a07a573249155a1c42 diff --git a/atmos_model.F90 b/atmos_model.F90 index 291c2bf69..35433c774 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -63,6 +63,7 @@ module atmos_model_mod use atmosphere_mod, only: atmosphere_restart use atmosphere_mod, only: atmosphere_end use atmosphere_mod, only: atmosphere_state_update +use atmosphere_mod, only: atmosphere_fill_nest_cpl use atmosphere_mod, only: atmos_phys_driver_statein use atmosphere_mod, only: atmosphere_control_data use atmosphere_mod, only: atmosphere_resolution, atmosphere_domain @@ -101,6 +102,9 @@ module atmos_model_mod block_data_copy_or_fill, & block_data_combine_fractions +#ifdef MOVING_NEST +use fv_moving_nest_main_mod, only: update_moving_nest, dump_moving_nest +#endif !----------------------------------------------------------------------- implicit none @@ -126,14 +130,16 @@ module atmos_model_mod integer :: layout(2) ! computer task laytout logical :: regional ! true if domain is regional logical :: nested ! true if there is a nest + logical :: moving_nest_parent ! true if this grid has a moving nest child + logical :: is_moving_nest ! true if this is a moving nest grid integer :: ngrids ! integer :: mygrid ! integer :: mlon, mlat integer :: iau_offset ! iau running window length logical :: pe ! current pe. real(kind=8), pointer, dimension(:) :: ak, bk - real, pointer, dimension(:,:) :: lon_bnd => null() ! local longitude axis grid box corners in radians. - real, pointer, dimension(:,:) :: lat_bnd => null() ! local latitude axis grid box corners in radians. + real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lon_bnd => null() ! local longitude axis grid box corners in radians. + real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lat_bnd => null() ! local latitude axis grid box corners in radians. real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lon => null() ! local longitude axis grid box centers in radians. real(kind=GFS_kind_phys), pointer, dimension(:,:) :: lat => null() ! local latitude axis grid box centers in radians. real(kind=GFS_kind_phys), pointer, dimension(:,:) :: dx, dy @@ -149,6 +155,14 @@ module atmos_model_mod ! to calculate gradient on cubic sphere grid. ! +! these two arrays, lon_bnd_work and lat_bnd_work are 'working' arrays, always allocated +! as (nlon+1, nlat+1) and are used to get the corner lat/lon values from the dycore. +! these values are then copied to Atmos%lon_bnd, Atmos%lat_bnd which are allocated with +! sizes that correspond to the corner coordinates distgrid in fcstGrid +real(kind=GFS_kind_phys), pointer, dimension(:,:), save :: lon_bnd_work => null() +real(kind=GFS_kind_phys), pointer, dimension(:,:), save :: lat_bnd_work => null() +integer, save :: i_bnd_size, j_bnd_size + integer :: fv3Clock, getClock, updClock, setupClock, radClock, physClock !----------------------------------------------------------------------- @@ -274,6 +288,17 @@ subroutine update_atmos_radiation_physics (Atmos) call assign_importdata(jdat(:),rc) if (rc/=0) call mpp_error(FATAL, 'Call to assign_importdata failed') + ! Currently for FV3ATM, it is only enabled for parent domain coupling + ! with other model components. In this case, only the parent domain + ! receives coupled fields through the above assign_importdata step. Thus, + ! an extra step is needed to fill the coupling variables in the nest, + ! by downscaling the coupling variables from its parent. + if (Atmos%ngrids > 1) then + if (GFS_control%cplocn2atm .or. GFS_control%cplwav2atm) then + call atmosphere_fill_nest_cpl(Atm_block, GFS_control, GFS_data) + endif + endif + ! Calculate total non-physics tendencies by substracting old GFS Stateout ! variables from new/updated GFS Statein variables (gives the tendencies ! due to anything else than physics) @@ -528,12 +553,35 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) !----------------------------------------------------------------------- call atmosphere_resolution (nlon, nlat, global=.false.) call atmosphere_resolution (mlon, mlat, global=.true.) - call alloc_atmos_data_type (nlon, nlat, Atmos) - call atmosphere_domain (Atmos%domain, Atmos%layout, Atmos%regional, Atmos%nested, Atmos%ngrids, Atmos%mygrid, Atmos%pelist) + call atmosphere_domain (Atmos%domain, Atmos%layout, Atmos%regional, Atmos%nested, & + Atmos%moving_nest_parent, Atmos%is_moving_nest, & + Atmos%ngrids, Atmos%mygrid, Atmos%pelist) call atmosphere_diag_axes (Atmos%axes) call atmosphere_etalvls (Atmos%ak, Atmos%bk, flip=flip_vc) - call atmosphere_grid_bdry (Atmos%lon_bnd, Atmos%lat_bnd, global=.false.) + + call atmosphere_control_data (isc, iec, jsc, jec, nlev, p_hydro, hydro, tile_num) + + allocate (Atmos%lon(nlon,nlat), Atmos%lat(nlon,nlat)) call atmosphere_grid_ctr (Atmos%lon, Atmos%lat) + + i_bnd_size = nlon + j_bnd_size = nlat + if (iec == mlon) then + ! we are on task at the 'east' edge of the cubed sphere face or regional domain + ! corner arrays should have one extra element in 'i' direction + i_bnd_size = nlon + 1 + end if + if (jec == mlat) then + ! we are on task at the 'north' edge of the cubed sphere face or regional domain + ! corner arrays should have one extra element in 'j' direction + j_bnd_size = nlat + 1 + end if + allocate (Atmos%lon_bnd(i_bnd_size,j_bnd_size), Atmos%lat_bnd(i_bnd_size,j_bnd_size)) + allocate (lon_bnd_work(nlon+1,nlat+1), lat_bnd_work(nlon+1,nlat+1)) + call atmosphere_grid_bdry (lon_bnd_work, lat_bnd_work) + Atmos%lon_bnd(1:i_bnd_size,1:j_bnd_size) = lon_bnd_work(1:i_bnd_size,1:j_bnd_size) + Atmos%lat_bnd(1:i_bnd_size,1:j_bnd_size) = lat_bnd_work(1:i_bnd_size,1:j_bnd_size) + call atmosphere_hgt (Atmos%layer_hgt, 'layer', relative=.false., flip=flip_vc) call atmosphere_hgt (Atmos%level_hgt, 'level', relative=.false., flip=flip_vc) @@ -551,7 +599,6 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step) !----------------------------------------------------------------------- !--- before going any further check definitions for 'blocks' !----------------------------------------------------------------------- - call atmosphere_control_data (isc, iec, jsc, jec, nlev, p_hydro, hydro, tile_num) call define_blocks_packed ('atmos_model', Atm_block, isc, iec, jsc, jec, nlev, & blocksize, block_message) @@ -762,8 +809,23 @@ subroutine update_atmos_model_dynamics (Atmos) type (atmos_data_type), intent(in) :: Atmos call set_atmosphere_pelist() +#ifdef MOVING_NEST + ! W. Ramstrom, AOML/HRD -- May 28, 2021 + ! Evaluates whether to move nest, then performs move if needed + if (Atmos%moving_nest_parent .or. Atmos%is_moving_nest ) then + call update_moving_nest (Atm_block, GFS_control, GFS_data, Atmos%Time) + endif +#endif call mpp_clock_begin(fv3Clock) call atmosphere_dynamics (Atmos%Time) +#ifdef MOVING_NEST + ! W. Ramstrom, AOML/HRD -- June 9, 2021 + ! Debugging output of moving nest code. Called from this level to access needed input variables. + if (Atmos%moving_nest_parent .or. Atmos%is_moving_nest ) then + call dump_moving_nest (Atm_block, GFS_control, GFS_data, Atmos%Time) + endif +#endif + call mpp_clock_end(fv3Clock) end subroutine update_atmos_model_dynamics @@ -920,6 +982,14 @@ subroutine update_atmos_model_state (Atmos, rc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return + !--- conditionally update the coordinate arrays for moving domains + if (Atmos%is_moving_nest) then + call atmosphere_grid_ctr (Atmos%lon, Atmos%lat) + call atmosphere_grid_bdry (lon_bnd_work, lat_bnd_work, global=.false.) + Atmos%lon_bnd(1:i_bnd_size,1:j_bnd_size) = lon_bnd_work(1:i_bnd_size,1:j_bnd_size) + Atmos%lat_bnd(1:i_bnd_size,1:j_bnd_size) = lat_bnd_work(1:i_bnd_size,1:j_bnd_size) + endif + end subroutine update_atmos_model_state ! @@ -975,12 +1045,17 @@ subroutine atmos_model_end (Atmos) endif ! Fast physics (from dynamics) are finalized in atmosphere_end above; -! standard/slow physics (from CCPP) are finalized in CCPP_step 'finalize'. +! standard/slow physics (from CCPP) are finalized in CCPP_step 'physics_finalize'. + call CCPP_step (step="physics_finalize", nblks=Atm_block%nblks, ierr=ierr) + if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP physics_finalize step failed') + ! The CCPP framework for all cdata structures is finalized in CCPP_step 'finalize'. call CCPP_step (step="finalize", nblks=Atm_block%nblks, ierr=ierr) if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP finalize step failed') - call dealloc_atmos_data_type (Atmos) + deallocate (Atmos%lon, Atmos%lat) + deallocate (Atmos%lon_bnd, Atmos%lat_bnd) + deallocate (lon_bnd_work, lat_bnd_work) end subroutine atmos_model_end @@ -1170,16 +1245,20 @@ subroutine update_atmos_chemistry(state, rc) integer :: nb, ix, i, j, k, k1, it integer :: ib, jb - real(ESMF_KIND_R8), dimension(:,:,:), pointer :: prsl, phil, & - prsi, phii, & - temp, cldfra, & - pflls, pfils, & - ua, va, slc + real(ESMF_KIND_R8), dimension(:,:,:), pointer :: cldfra, & + pfils, pflls, & + phii, phil, & + prsi, prsl, & + slc, smc, & + stc, temp, & + ua, va + real(ESMF_KIND_R8), dimension(:,:,:,:), pointer :: q - real(ESMF_KIND_R8), dimension(:,:), pointer :: hpbl, area, rainc, & - uustar, rain, slmsk, tsfc, shfsfc, zorl, focn, flake, fice, & - fsnow, u10m, v10m, swet + real(ESMF_KIND_R8), dimension(:,:), pointer :: aod, area, canopy, cmm, & + dqsfc, dtsfc, fice, flake, focn, fsnow, hpbl, nswsfc, oro, psfc, & + q2m, rain, rainc, rca, shfsfc, slmsk, stype, swet, t2m, tsfc, & + u10m, uustar, v10m, vfrac, xlai, zorl ! logical, parameter :: diag = .true. @@ -1200,6 +1279,12 @@ subroutine update_atmos_chemistry(state, rc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return + if (GFS_control%cplaqm) then + call cplFieldGet(state,'inst_tracer_diag_aod', farrayPtr2d=aod, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + end if + !--- do not import tracer concentrations by default ntb = nt + 1 nte = nt @@ -1256,26 +1341,41 @@ subroutine update_atmos_chemistry(state, rc) end do end if + if (GFS_control%cplaqm) then + !--- other diagnostics +!$OMP parallel do default (none) & +!$OMP shared (nj, ni, Atm_block, GFS_Data, aod) & +!$OMP private (j, jb, i, ib, nb, ix) + do j = 1, nj + jb = j + Atm_block%jsc - 1 + do i = 1, ni + ib = i + Atm_block%isc - 1 + nb = Atm_block%blkno(ib,jb) + ix = Atm_block%ixp(ib,jb) + GFS_Data(nb)%IntDiag%aod(ix) = aod(i,j) + enddo + enddo + end if + if (GFS_control%debug) then write(6,'("update_atmos: ",a,": qgrs - min/max/avg",3g16.6)') & trim(state), minval(q), maxval(q), sum(q)/size(q) + if (GFS_control%cplaqm) & + write(6,'("update_atmos: ",a,": aod - min/max ",3g16.6)') & + trim(state), minval(aod), maxval(aod) end if case ('export') !--- retrieve references to allocated memory for each field - call cplFieldGet(state,'inst_pres_interface', farrayPtr3d=prsi, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_pres_levels', farrayPtr3d=prsl, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_geop_interface', farrayPtr3d=phii, rc=localrc) + call cplFieldGet(state,'inst_geop_levels', farrayPtr3d=phil, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_geop_levels', farrayPtr3d=phil, rc=localrc) + call cplFieldGet(state,'inst_geop_interface', farrayPtr3d=phii, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return @@ -1324,28 +1424,10 @@ subroutine update_atmos_chemistry(state, rc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_up_sensi_heat_flx', farrayPtr2d=shfsfc, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_surface_roughness', farrayPtr2d=zorl, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_soil_moisture_content', farrayPtr3d=slc, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return - - call cplFieldGet(state,'inst_liq_nonconv_tendency_levels', & - farrayPtr3d=pflls, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return - - call cplFieldGet(state,'inst_ice_nonconv_tendency_levels', & - farrayPtr3d=pfils, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_cloud_frac_levels', farrayPtr3d=cldfra, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return @@ -1358,25 +1440,113 @@ subroutine update_atmos_chemistry(state, rc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'inst_surface_soil_wetness', farrayPtr2d=swet, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'ice_fraction_in_atm', farrayPtr2d=fice, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'lake_fraction', farrayPtr2d=flake, rc=localrc) + call cplFieldGet(state,'surface_snow_area_fraction', farrayPtr2d=fsnow, rc=localrc) if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__, rcToReturn=rc)) return - call cplFieldGet(state,'ocean_fraction', farrayPtr2d=focn, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return + if (GFS_Control%cplaqm) then - call cplFieldGet(state,'surface_snow_area_fraction', farrayPtr2d=fsnow, rc=localrc) - if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__, rcToReturn=rc)) return + call cplFieldGet(state,'canopy_moisture_storage', farrayPtr2d=canopy, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_aerodynamic_conductance', farrayPtr2d=cmm, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_laten_heat_flx', farrayPtr2d=dqsfc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_sensi_heat_flx', farrayPtr2d=dtsfc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_net_sw_flx', farrayPtr2d=nswsfc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'height', farrayPtr2d=oro, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_pres_height_surface', farrayPtr2d=psfc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_spec_humid_height2m', farrayPtr2d=q2m, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_canopy_resistance', farrayPtr2d=rca, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_soil_moisture_content', farrayPtr3d=smc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'temperature_of_soil_layer', farrayPtr3d=stc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_temp_height2m', farrayPtr2d=t2m, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_vegetation_area_frac', farrayPtr2d=vfrac, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'leaf_area_index', farrayPtr2d=xlai, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'soil_type', farrayPtr2d=stype, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + else + + call cplFieldGet(state,'inst_pres_interface', farrayPtr3d=prsi, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_liq_nonconv_tendency_levels', & + farrayPtr3d=pflls, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_ice_nonconv_tendency_levels', & + farrayPtr3d=pfils, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'lake_fraction', farrayPtr2d=flake, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'ocean_fraction', farrayPtr2d=focn, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_up_sensi_heat_flx', farrayPtr2d=shfsfc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_soil_moisture_content', farrayPtr3d=slc, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + call cplFieldGet(state,'inst_surface_soil_wetness', farrayPtr2d=swet, rc=localrc) + if (ESMF_LogFoundError(rcToCheck=localrc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + end if !--- handle all three-dimensional variables !$OMP parallel do default (none) & @@ -1392,7 +1562,6 @@ subroutine update_atmos_chemistry(state, rc) nb = Atm_block%blkno(ib,jb) ix = Atm_block%ixp(ib,jb) !--- interface values - prsi(i,j,k) = GFS_data(nb)%Statein%prsi(ix,k) phii(i,j,k) = GFS_data(nb)%Statein%phii(ix,k) !--- layer values prsl(i,j,k) = GFS_Data(nb)%Statein%prsl(ix,k) @@ -1401,8 +1570,13 @@ subroutine update_atmos_chemistry(state, rc) ua (i,j,k) = GFS_Data(nb)%Stateout%gu0(ix,k) va (i,j,k) = GFS_Data(nb)%Stateout%gv0(ix,k) cldfra(i,j,k) = GFS_Data(nb)%IntDiag%cldfra(ix,k) - pfils (i,j,k) = GFS_Data(nb)%Coupling%pfi_lsan(ix,k) - pflls (i,j,k) = GFS_Data(nb)%Coupling%pfl_lsan(ix,k) + if (.not.GFS_Control%cplaqm) then + !--- interface values + prsi(i,j,k) = GFS_data(nb)%Statein%prsi(ix,k) + !--- layer values + pfils (i,j,k) = GFS_Data(nb)%Coupling%pfi_lsan(ix,k) + pflls (i,j,k) = GFS_Data(nb)%Coupling%pfl_lsan(ix,k) + end if enddo enddo enddo @@ -1416,8 +1590,9 @@ subroutine update_atmos_chemistry(state, rc) ib = i + Atm_block%isc - 1 nb = Atm_block%blkno(ib,jb) ix = Atm_block%ixp(ib,jb) - prsi(i,j,k) = GFS_data(nb)%Statein%prsi(ix,k) phii(i,j,k) = GFS_data(nb)%Statein%phii(ix,k) + if (.not.GFS_Control%cplaqm) & + prsi(i,j,k) = GFS_data(nb)%Statein%prsi(ix,k) enddo enddo @@ -1441,9 +1616,11 @@ subroutine update_atmos_chemistry(state, rc) !$OMP parallel do default (none) & !$OMP shared (nj, ni, Atm_block, GFS_data, GFS_Control, & -!$OMP hpbl, area, rainc, rain, uustar, & -!$OMP fice, flake, focn, fsnow, u10m, v10m, & -!$OMP slmsk, tsfc, shfsfc, zorl, slc, swet) & +!$OMP area, canopy, cmm, dqsfc, dtsfc, fice, & +!$OMP flake, focn, fsnow, hpbl, nswsfc, oro, & +!$OMP psfc, q2m, rain, rainc, rca, shfsfc, slc, & +!$OMP slmsk, smc, stc, stype, swet, t2m, tsfc, & +!$OMP u10m, uustar, v10m, vfrac, xlai, zorl) & !$OMP private (j, jb, i, ib, nb, ix) do j = 1, nj jb = j + Atm_block%jsc - 1 @@ -1458,20 +1635,46 @@ subroutine update_atmos_chemistry(state, rc) + GFS_Data(nb)%Coupling%snow_cpl(ix) uustar(i,j) = GFS_Data(nb)%Sfcprop%uustar(ix) slmsk(i,j) = GFS_Data(nb)%Sfcprop%slmsk(ix) - shfsfc(i,j) = GFS_Data(nb)%Coupling%ushfsfci(ix) tsfc(i,j) = GFS_Data(nb)%Coupling%tsfci_cpl(ix) zorl(i,j) = GFS_Data(nb)%Sfcprop%zorl(ix) - slc(i,j,:) = GFS_Data(nb)%Sfcprop%slc(ix,:) u10m(i,j) = GFS_Data(nb)%Coupling%u10mi_cpl(ix) v10m(i,j) = GFS_Data(nb)%Coupling%v10mi_cpl(ix) - focn(i,j) = GFS_Data(nb)%Sfcprop%oceanfrac(ix) - flake(i,j) = max(zero, GFS_Data(nb)%Sfcprop%lakefrac(ix)) fice(i,j) = GFS_Data(nb)%Sfcprop%fice(ix) fsnow(i,j) = GFS_Data(nb)%Sfcprop%sncovr(ix) - if (GFS_Control%lsm == GFS_Control%lsm_ruc) then - swet(i,j) = GFS_Data(nb)%Sfcprop%wetness(ix) + if (GFS_Control%cplaqm) then + canopy(i,j) = GFS_Data(nb)%Sfcprop%canopy(ix) + cmm(i,j) = GFS_Data(nb)%IntDiag%cmm(ix) + dqsfc(i,j) = GFS_Data(nb)%Coupling%dqsfci_cpl(ix) + dtsfc(i,j) = GFS_Data(nb)%Coupling%dtsfci_cpl(ix) + nswsfc(i,j) = GFS_Data(nb)%Coupling%nswsfci_cpl(ix) + oro(i,j) = max(0.d0, GFS_Data(nb)%Sfcprop%oro(ix)) + psfc(i,j) = GFS_Data(nb)%Coupling%psurfi_cpl(ix) + q2m(i,j) = GFS_Data(nb)%Coupling%q2mi_cpl(ix) + rca(i,j) = GFS_Data(nb)%Sfcprop%rca(ix) + smc(i,j,:) = GFS_Data(nb)%Sfcprop%smc(ix,:) + stc(i,j,:) = GFS_Data(nb)%Sfcprop%stc(ix,:) + t2m(i,j) = GFS_Data(nb)%Coupling%t2mi_cpl(ix) + vfrac(i,j) = GFS_Data(nb)%Sfcprop%vfrac(ix) + xlai(i,j) = GFS_Data(nb)%Sfcprop%xlaixy(ix) + if (nint(slmsk(i,j)) == 2) then + if (GFS_Control%isot == 1) then + stype(i,j) = 16._ESMF_KIND_R8 + else + stype(i,j) = 9._ESMF_KIND_R8 + endif + else + stype(i,j) = real(int( GFS_Data(nb)%Sfcprop%stype(ix)+0.5 ), kind=ESMF_KIND_R8) + endif else - swet(i,j) = GFS_Data(nb)%IntDiag%wet1(ix) + flake(i,j) = max(zero, GFS_Data(nb)%Sfcprop%lakefrac(ix)) + focn(i,j) = GFS_Data(nb)%Sfcprop%oceanfrac(ix) + shfsfc(i,j) = GFS_Data(nb)%Coupling%ushfsfci(ix) + slc(i,j,:) = GFS_Data(nb)%Sfcprop%slc(ix,:) + if (GFS_Control%lsm == GFS_Control%lsm_ruc) then + swet(i,j) = GFS_Data(nb)%Sfcprop%wetness(ix) + else + swet(i,j) = GFS_Data(nb)%IntDiag%wet1(ix) + end if end if enddo enddo @@ -1496,7 +1699,6 @@ subroutine update_atmos_chemistry(state, rc) if (GFS_control%debug) then ! -- diagnostics - write(6,'("update_atmos: prsi - min/max/avg",3g16.6)') minval(prsi), maxval(prsi), sum(prsi)/size(prsi) write(6,'("update_atmos: phii - min/max/avg",3g16.6)') minval(phii), maxval(phii), sum(phii)/size(phii) write(6,'("update_atmos: prsl - min/max/avg",3g16.6)') minval(prsl), maxval(prsl), sum(prsl)/size(prsl) write(6,'("update_atmos: phil - min/max/avg",3g16.6)') minval(phil), maxval(phil), sum(phil)/size(phil) @@ -1508,21 +1710,40 @@ subroutine update_atmos_chemistry(state, rc) write(6,'("update_atmos: hpbl - min/max/avg",3g16.6)') minval(hpbl), maxval(hpbl), sum(hpbl)/size(hpbl) write(6,'("update_atmos: rainc - min/max/avg",3g16.6)') minval(rainc), maxval(rainc), sum(rainc)/size(rainc) write(6,'("update_atmos: rain - min/max/avg",3g16.6)') minval(rain), maxval(rain), sum(rain)/size(rain) - write(6,'("update_atmos: shfsfc - min/max/avg",3g16.6)') minval(shfsfc), maxval(shfsfc), sum(shfsfc)/size(shfsfc) write(6,'("update_atmos: slmsk - min/max/avg",3g16.6)') minval(slmsk), maxval(slmsk), sum(slmsk)/size(slmsk) write(6,'("update_atmos: tsfc - min/max/avg",3g16.6)') minval(tsfc), maxval(tsfc), sum(tsfc)/size(tsfc) write(6,'("update_atmos: area - min/max/avg",3g16.6)') minval(area), maxval(area), sum(area)/size(area) write(6,'("update_atmos: zorl - min/max/avg",3g16.6)') minval(zorl), maxval(zorl), sum(zorl)/size(zorl) - write(6,'("update_atmos: slc - min/max/avg",3g16.6)') minval(slc), maxval(slc), sum(slc)/size(slc) write(6,'("update_atmos: cldfra - min/max/avg",3g16.6)') minval(cldfra), maxval(cldfra), sum(cldfra)/size(cldfra) write(6,'("update_atmos: fice - min/max/avg",3g16.6)') minval(fice), maxval(fice), sum(fice)/size(fice) - write(6,'("update_atmos: flake - min/max/avg",3g16.6)') minval(flake), maxval(flake), sum(flake)/size(flake) - write(6,'("update_atmos: focn - min/max/avg",3g16.6)') minval(focn), maxval(focn), sum(focn)/size(focn) write(6,'("update_atmos: pfils - min/max/avg",3g16.6)') minval(pfils), maxval(pfils), sum(pfils)/size(pfils) write(6,'("update_atmos: pflls - min/max/avg",3g16.6)') minval(pflls), maxval(pflls), sum(pflls)/size(pflls) - write(6,'("update_atmos: swet - min/max/avg",3g16.6)') minval(swet), maxval(swet), sum(swet)/size(swet) write(6,'("update_atmos: u10m - min/max/avg",3g16.6)') minval(u10m), maxval(u10m), sum(u10m)/size(u10m) write(6,'("update_atmos: v10m - min/max/avg",3g16.6)') minval(v10m), maxval(v10m), sum(v10m)/size(v10m) + if (GFS_Control%cplaqm) then + write(6,'("update_atmos: canopy - min/max/avg",3g16.6)') minval(canopy), maxval(canopy), sum(canopy)/size(canopy) + write(6,'("update_atmos: cmm - min/max/avg",3g16.6)') minval(cmm), maxval(cmm), sum(cmm)/size(cmm) + write(6,'("update_atmos: dqsfc - min/max/avg",3g16.6)') minval(dqsfc), maxval(dqsfc), sum(dqsfc)/size(dqsfc) + write(6,'("update_atmos: dtsfc - min/max/avg",3g16.6)') minval(dtsfc), maxval(dtsfc), sum(dtsfc)/size(dtsfc) + write(6,'("update_atmos: nswsfc - min/max/avg",3g16.6)') minval(nswsfc), maxval(nswsfc), sum(nswsfc)/size(nswsfc) + write(6,'("update_atmos: oro - min/max/avg",3g16.6)') minval(oro), maxval(oro), sum(oro)/size(oro) + write(6,'("update_atmos: psfc - min/max/avg",3g16.6)') minval(psfc), maxval(psfc), sum(psfc)/size(psfc) + write(6,'("update_atmos: q2m - min/max/avg",3g16.6)') minval(q2m), maxval(q2m), sum(q2m)/size(q2m) + write(6,'("update_atmos: rca - min/max/avg",3g16.6)') minval(rca), maxval(rca), sum(rca)/size(rca) + write(6,'("update_atmos: smc - min/max/avg",3g16.6)') minval(smc), maxval(smc), sum(smc)/size(smc) + write(6,'("update_atmos: stc - min/max/avg",3g16.6)') minval(stc), maxval(stc), sum(stc)/size(stc) + write(6,'("update_atmos: t2m - min/max/avg",3g16.6)') minval(t2m), maxval(t2m), sum(t2m)/size(t2m) + write(6,'("update_atmos: vfrac - min/max/avg",3g16.6)') minval(vfrac), maxval(vfrac), sum(vfrac)/size(vfrac) + write(6,'("update_atmos: xlai - min/max/avg",3g16.6)') minval(xlai), maxval(xlai), sum(xlai)/size(xlai) + write(6,'("update_atmos: stype - min/max/avg",3g16.6)') minval(stype), maxval(stype), sum(stype)/size(stype) + else + write(6,'("update_atmos: prsi - min/max/avg",3g16.6)') minval(prsi), maxval(prsi), sum(prsi)/size(prsi) + write(6,'("update_atmos: flake - min/max/avg",3g16.6)') minval(flake), maxval(flake), sum(flake)/size(flake) + write(6,'("update_atmos: focn - min/max/avg",3g16.6)') minval(focn), maxval(focn), sum(focn)/size(focn) + write(6,'("update_atmos: shfsfc - min/max/avg",3g16.6)') minval(shfsfc), maxval(shfsfc), sum(shfsfc)/size(shfsfc) + write(6,'("update_atmos: slc - min/max/avg",3g16.6)') minval(slc), maxval(slc), sum(slc)/size(slc) + write(6,'("update_atmos: swet - min/max/avg",3g16.6)') minval(swet), maxval(swet), sum(swet)/size(swet) + end if end if case default @@ -1532,24 +1753,6 @@ subroutine update_atmos_chemistry(state, rc) end subroutine update_atmos_chemistry ! - subroutine alloc_atmos_data_type (nlon, nlat, Atmos) - integer, intent(in) :: nlon, nlat - type(atmos_data_type), intent(inout) :: Atmos - allocate ( Atmos % lon_bnd (nlon+1,nlat+1), & - Atmos % lat_bnd (nlon+1,nlat+1), & - Atmos % lon (nlon,nlat), & - Atmos % lat (nlon,nlat) ) - - end subroutine alloc_atmos_data_type - - subroutine dealloc_atmos_data_type (Atmos) - type(atmos_data_type), intent(inout) :: Atmos - deallocate (Atmos%lon_bnd, & - Atmos%lat_bnd, & - Atmos%lon, & - Atmos%lat ) - end subroutine dealloc_atmos_data_type - subroutine assign_importdata(jdat, rc) use module_cplfields, only: importFields, nImportFields, queryImportFields, & diff --git a/ccpp/CMakeLists.txt b/ccpp/CMakeLists.txt index 7f1af3301..f204904a3 100644 --- a/ccpp/CMakeLists.txt +++ b/ccpp/CMakeLists.txt @@ -10,13 +10,9 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Release' as none was specified.") set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "Coverage") + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") endif() -#------------------------------------------------------------------------------ -# CMake Modules -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/framework/cmake") - #------------------------------------------------------------------------------ # Call to CCPP code generator if(DEBUG) @@ -54,21 +50,13 @@ if(MPI) add_definitions(-DMPI) endif() -#------------------------------------------------------------------------------ -# Set additional flags for debug build -if(DEBUG) - if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -init=snan,arrays") - endif() -endif() - #------------------------------------------------------------------------------ # Set flag for 32bit dynamics build if(32BIT) message(STATUS "Compile CCPP slow physics with 64-bit precision, fast physics with 32-bit precision") add_definitions(-DOVERLOAD_R4) if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") - set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64 -no-prec-div -no-prec-sqrt") + set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64") elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") set(CMAKE_Fortran_FLAGS_PHYSICS "-fdefault-real-8 -fdefault-double-8") endif() @@ -117,7 +105,6 @@ add_library( # Compile GFS_diagnostics.F90 without optimization, this leads to out of memory errors on wcoss_dell_p3 set_property(SOURCE driver/GFS_diagnostics.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "-O0") - target_link_libraries(fv3ccpp PUBLIC ccpp_framework) target_link_libraries(fv3ccpp PUBLIC ccpp_physics) diff --git a/ccpp/config/ccpp_prebuild_config.py b/ccpp/config/ccpp_prebuild_config.py index 8723f89b1..a95b86203 100755 --- a/ccpp/config/ccpp_prebuild_config.py +++ b/ccpp/config/ccpp_prebuild_config.py @@ -47,7 +47,8 @@ 'module_radlw_parameters' : '', }, 'CCPP_typedefs' : { - 'CCPP_interstitial_type' : 'CCPP_interstitial', + 'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)', + 'GFDL_interstitial_type' : 'GFDL_interstitial', 'CCPP_typedefs' : '', }, 'CCPP_data' : { @@ -55,7 +56,6 @@ }, 'GFS_typedefs' : { 'GFS_control_type' : 'GFS_Control', - 'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)', 'GFS_data_type' : 'GFS_Data(cdata%blk_no)', 'GFS_diag_type' : 'GFS_Data(cdata%blk_no)%Intdiag', 'GFS_tbd_type' : 'GFS_Data(cdata%blk_no)%Tbd', @@ -96,11 +96,16 @@ # Relative path to source (from where ccpp_prebuild.py is called) : [ list of physics sets in which scheme may be called ]; # current restrictions are that each scheme can only belong to one physics set, and all schemes within one group in the # suite definition file have to belong to the same physics set - 'physics/physics/GFS_DCNV_generic.F90', - 'physics/physics/GFS_GWD_generic.F90', - 'physics/physics/GFS_MP_generic.F90', - 'physics/physics/GFS_PBL_generic.F90', - 'physics/physics/GFS_SCNV_generic.F90', + 'physics/physics/GFS_DCNV_generic_pre.F90', + 'physics/physics/GFS_DCNV_generic_post.F90', + 'physics/physics/GFS_GWD_generic_pre.F90', + 'physics/physics/GFS_GWD_generic_post.F90', + 'physics/physics/GFS_MP_generic_pre.F90', + 'physics/physics/GFS_MP_generic_post.F90', + 'physics/physics/GFS_PBL_generic_pre.F90', + 'physics/physics/GFS_PBL_generic_post.F90', + 'physics/physics/GFS_SCNV_generic_pre.F90', + 'physics/physics/GFS_SCNV_generic_post.F90', 'physics/physics/GFS_debug.F90', 'physics/physics/GFS_phys_time_vary.fv3.F90', 'physics/physics/GFS_rad_time_vary.fv3.F90', @@ -109,10 +114,22 @@ 'physics/physics/GFS_rrtmg_pre.F90', 'physics/physics/GFS_rrtmg_setup.F90', 'physics/physics/GFS_stochastics.F90', - 'physics/physics/GFS_suite_interstitial.F90', - 'physics/physics/GFS_surface_generic.F90', - 'physics/physics/GFS_surface_composites.F90', - 'physics/physics/GFS_surface_loop_control.F90', + 'physics/physics/GFS_suite_interstitial_rad_reset.F90', + 'physics/physics/GFS_suite_interstitial_phys_reset.F90', + 'physics/physics/GFS_suite_interstitial_1.F90', + 'physics/physics/GFS_suite_interstitial_2.F90', + 'physics/physics/GFS_suite_stateout_reset.F90', + 'physics/physics/GFS_suite_stateout_update.F90', + 'physics/physics/GFS_suite_interstitial_3.F90', + 'physics/physics/GFS_suite_interstitial_4.F90', + 'physics/physics/GFS_suite_interstitial_5.F90', + 'physics/physics/GFS_surface_generic_pre.F90', + 'physics/physics/GFS_surface_generic_post.F90', + 'physics/physics/GFS_surface_composites_pre.F90', + 'physics/physics/GFS_surface_composites_inter.F90', + 'physics/physics/GFS_surface_composites_post.F90', + 'physics/physics/GFS_surface_loop_control_part1.F90', + 'physics/physics/GFS_surface_loop_control_part2.F90', 'physics/physics/GFS_time_vary_pre.fv3.F90', 'physics/physics/cires_ugwp.F90', 'physics/physics/cires_ugwp_post.F90', @@ -121,20 +138,25 @@ 'physics/physics/ugwpv1_gsldrag.F90', 'physics/physics/ugwpv1_gsldrag_post.F90', 'physics/physics/cnvc90.f', + 'physics/physics/cs_conv_pre.F90', 'physics/physics/cs_conv.F90', + 'physics/physics/cs_conv_post.F90', 'physics/physics/cs_conv_aw_adj.F90', 'physics/physics/cu_ntiedtke_pre.F90', 'physics/physics/cu_ntiedtke.F90', 'physics/physics/cu_ntiedtke_post.F90', - 'physics/physics/dcyc2.f', + 'physics/physics/dcyc2t3.f', 'physics/physics/drag_suite.F90', - 'physics/physics/gcm_shoc.F90', + 'physics/physics/shoc.F90', 'physics/physics/get_prs_fv3.F90', + 'physics/physics/get_phi_fv3.F90', 'physics/physics/gfdl_cloud_microphys.F90', - 'physics/physics/gfdl_fv_sat_adj.F90', + 'physics/physics/fv_sat_adj.F90', 'physics/physics/gfdl_sfc_layer.F90', - 'physics/physics/gscond.f', + 'physics/physics/zhaocarr_gscond.f', + 'physics/physics/gwdc_pre.f', 'physics/physics/gwdc.f', + 'physics/physics/gwdc_post.f', 'physics/physics/gwdps.f', 'physics/physics/h2ophys.f', 'physics/physics/samfdeepcnv.f', @@ -143,28 +165,30 @@ 'physics/physics/shalcnv.F', 'physics/physics/maximum_hourly_diagnostics.F90', 'physics/physics/m_micro.F90', - 'physics/physics/m_micro_interstitial.F90', + 'physics/physics/m_micro_pre.F90', + 'physics/physics/m_micro_post.F90', 'physics/physics/cu_gf_driver_pre.F90', 'physics/physics/cu_gf_driver.F90', 'physics/physics/cu_gf_driver_post.F90', - 'physics/physics/moninedmf.f', + 'physics/physics/hedmf.f', 'physics/physics/moninshoc.f', 'physics/physics/satmedmfvdif.F', 'physics/physics/satmedmfvdifq.F', 'physics/physics/shinhongvdif.F90', 'physics/physics/ysuvdif.F90', - 'physics/physics/module_MYNNPBL_wrapper.F90', - 'physics/physics/module_MYNNSFC_wrapper.F90', - 'physics/physics/module_SGSCloud_RadPre.F90', - 'physics/physics/module_SGSCloud_RadPost.F90', - 'physics/physics/module_MYJSFC_wrapper.F90', - 'physics/physics/module_MYJPBL_wrapper.F90', + 'physics/physics/mynnedmf_wrapper.F90', + 'physics/physics/mynnsfc_wrapper.F90', + 'physics/physics/sgscloud_radpre.F90', + 'physics/physics/sgscloud_radpost.F90', + 'physics/physics/myjsfc_wrapper.F90', + 'physics/physics/myjpbl_wrapper.F90', 'physics/physics/mp_thompson_pre.F90', 'physics/physics/mp_thompson.F90', 'physics/physics/mp_thompson_post.F90', + 'physics/physics/mp_nssl.F90' , 'physics/physics/ozphys.f', 'physics/physics/ozphys_2015.f', - 'physics/physics/precpd.f', + 'physics/physics/zhaocarr_precpd.f', 'physics/physics/phys_tend.F90', 'physics/physics/radlw_main.F90', 'physics/physics/radsw_main.F90', @@ -173,16 +197,18 @@ 'physics/physics/rrtmg_lw_post.F90', 'physics/physics/rrtmg_lw_pre.F90', 'physics/physics/rrtmg_sw_post.F90', - 'physics/physics/rrtmg_sw_pre.F90', + 'physics/physics/rad_sw_pre.F90', 'physics/physics/sfc_diag.f', 'physics/physics/sfc_diag_post.F90', - 'physics/physics/sfc_drv_ruc.F90', + 'physics/physics/lsm_ruc.F90', 'physics/physics/sfc_cice.f', 'physics/physics/sfc_diff.f', - 'physics/physics/sfc_drv.f', - 'physics/physics/sfc_noahmp_drv.F90', + 'physics/physics/lsm_noah.f', + 'physics/physics/noahmpdrv.F90', 'physics/physics/flake_driver.F90', + 'physics/physics/sfc_nst_pre.f', 'physics/physics/sfc_nst.f', + 'physics/physics/sfc_nst_post.f', 'physics/physics/sfc_ocean.F', 'physics/physics/sfc_sice.f', # HAFS FER_HIRES @@ -196,28 +222,24 @@ 'physics/physics/rrtmgp_lw_cloud_optics.F90', 'physics/physics/rrtmgp_sw_gas_optics.F90', 'physics/physics/rrtmgp_sw_cloud_optics.F90', - 'physics/physics/rrtmgp_sw_aerosol_optics.F90', + 'physics/physics/rrtmgp_aerosol_optics.F90', 'physics/physics/rrtmgp_lw_rte.F90', 'physics/physics/rrtmgp_sw_rte.F90', - 'physics/physics/rrtmgp_lw_aerosol_optics.F90', 'physics/physics/GFS_rrtmgp_setup.F90', 'physics/physics/GFS_rrtmgp_pre.F90', 'physics/physics/rrtmgp_lw_pre.F90', - 'physics/physics/GFS_rrtmgp_sw_pre.F90', 'physics/physics/GFS_rrtmgp_lw_post.F90', 'physics/physics/rrtmgp_lw_cloud_sampling.F90', 'physics/physics/rrtmgp_sw_cloud_sampling.F90', 'physics/physics/GFS_cloud_diagnostics.F90', - 'physics/physics/GFS_rrtmgp_thompsonmp_pre.F90', - 'physics/physics/GFS_rrtmgp_gfdlmp_pre.F90', - 'physics/physics/GFS_rrtmgp_zhaocarr_pre.F90', - 'physics/physics/GFS_rrtmgp_cloud_overlap_pre.F90', + 'physics/physics/GFS_rrtmgp_cloud_mp.F90', + 'physics/physics/GFS_rrtmgp_cloud_overlap.F90', 'physics/physics/GFS_rrtmgp_sw_post.F90' ] # Default build dir, relative to current working directory, # if not specified as command-line argument -DEFAULT_BUILD_DIR = 'FV3' +DEFAULT_BUILD_DIR = 'build' # Auto-generated makefile/cmakefile snippets that contain all type definitions TYPEDEFS_MAKEFILE = '{build_dir}/physics/CCPP_TYPEDEFS.mk' @@ -245,6 +267,7 @@ STATIC_API_SRCFILE = '{build_dir}/physics/CCPP_STATIC_API.sh' # Directory for writing HTML pages generated from metadata files +# used by metadata2html.py for generating scientific documentation METADATA_HTML_OUTPUT_DIR = '{build_dir}/physics/physics/docs' # HTML document containing the model-defined CCPP variables diff --git a/ccpp/data/CCPP_data.F90 b/ccpp/data/CCPP_data.F90 index dbb646035..9bba44641 100644 --- a/ccpp/data/CCPP_data.F90 +++ b/ccpp/data/CCPP_data.F90 @@ -5,10 +5,10 @@ module CCPP_data !! use ccpp_types, only: ccpp_t - use CCPP_typedefs, only: CCPP_interstitial_type + use CCPP_typedefs, only: GFS_interstitial_type, & + GFDL_interstitial_type use GFS_typedefs, only: GFS_control_type, & - GFS_data_type, & - GFS_interstitial_type + GFS_data_type implicit none @@ -18,7 +18,7 @@ module CCPP_data cdata_domain, & cdata_block, & ccpp_suite, & - CCPP_interstitial, & + GFDL_interstitial, & GFS_control, & GFS_data, & GFS_interstitial @@ -34,7 +34,7 @@ module CCPP_data !------------------------------------------------------! ! CCPP data containers for dynamics (fast physics) ! !------------------------------------------------------! - type(CCPP_interstitial_type), save, target :: CCPP_interstitial + type(GFDL_interstitial_type), save, target :: GFDL_interstitial !------------------------------------------------------! ! CCPP containers for the six tiles used in dynamics, ! diff --git a/ccpp/data/CCPP_data.meta b/ccpp/data/CCPP_data.meta index 3541b4724..6029873da 100644 --- a/ccpp/data/CCPP_data.meta +++ b/ccpp/data/CCPP_data.meta @@ -12,12 +12,12 @@ units = DDT dimensions = () type = ccpp_t -[CCPP_interstitial] - standard_name = CCPP_interstitial_type_instance - long_name = instance of derived type CCPP_interstitial_type +[GFDL_interstitial] + standard_name = GFDL_interstitial_type_instance + long_name = instance of derived type GFDL_interstitial_type units = DDT dimensions = () - type = CCPP_interstitial_type + type = GFDL_interstitial_type [GFS_Control] standard_name = GFS_control_type_instance long_name = instance of derived type GFS_control_type diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 1e2171838..0f4e15d62 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -4,18 +4,453 @@ module CCPP_typedefs !! \htmlinclude CCPP_typedefs.html !! - use machine, only: kind_grid, kind_dyn + ! Physics kind defininitions needed for interstitial DDTs + use machine, only: kind_grid, kind_dyn, kind_phys + + ! Constants/dimensions needed for interstitial DDTs + use ozne_def, only: oz_coeff + use GFS_typedefs, only: clear_val, LTP + + ! Physics type defininitions needed for interstitial DDTs + use module_radsw_parameters, only: profsw_type, cmpfsw_type, NBDSW + use module_radlw_parameters, only: proflw_type, NBDLW + use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp + use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str + use mo_cloud_optics, only: ty_cloud_optics + use mo_gas_concentrations, only: ty_gas_concs + use mo_source_functions, only: ty_source_func_lw + use GFS_typedefs, only: GFS_control_type implicit none private - public CCPP_interstitial_type + ! To ensure that these values match what's in the physics, array + ! sizes are compared in the auto-generated physics caps in debug mode + ! from module_radiation_aerosols + integer, parameter :: NF_AESW = 3 + integer, parameter :: NF_AELW = 3 + integer, parameter :: NSPC = 5 + integer, parameter :: NSPC1 = NSPC + 1 + ! from module_radiation_clouds + integer, parameter :: NF_CLDS = 9 + ! from module_radiation_gases + integer, parameter :: NF_VGAS = 10 + ! from module_radiation_surface + integer, parameter :: NF_ALBD = 4 + + ! GFS_interstitial_type !< fields required to replace interstitial code in GFS_{physics,radiation}_driver.F90 in CCPP + public GFS_interstitial_type -!! \section arg_table_CCPP_interstitial_type Argument Table -!! \htmlinclude CCPP_interstitial_type.html + ! GFDL_interstitial_type !< fields required to replace interstitial code in FV3 dycore (fv_mapz.F90) in CCPP + public GFDL_interstitial_type + +!! \section arg_table_GFS_interstitial_type +!! \htmlinclude GFS_interstitial_type.html !! - type CCPP_interstitial_type + type GFS_interstitial_type + + real (kind=kind_phys), pointer :: adjsfculw_land(:) => null() !< + real (kind=kind_phys), pointer :: adjsfculw_ice(:) => null() !< + real (kind=kind_phys), pointer :: adjsfculw_water(:) => null() !< + real (kind=kind_phys), pointer :: adjnirbmd(:) => null() !< + real (kind=kind_phys), pointer :: adjnirbmu(:) => null() !< + real (kind=kind_phys), pointer :: adjnirdfd(:) => null() !< + real (kind=kind_phys), pointer :: adjnirdfu(:) => null() !< + real (kind=kind_phys), pointer :: adjvisbmd(:) => null() !< + real (kind=kind_phys), pointer :: adjvisbmu(:) => null() !< + real (kind=kind_phys), pointer :: adjvisdfu(:) => null() !< + real (kind=kind_phys), pointer :: adjvisdfd(:) => null() !< + real (kind=kind_phys), pointer :: aerodp(:,:) => null() !< + real (kind=kind_phys), pointer :: alb1d(:) => null() !< + real (kind=kind_phys), pointer :: alpha(:,:) => null() !< + real (kind=kind_phys), pointer :: bexp1d(:) => null() !< + real (kind=kind_phys), pointer :: cd(:) => null() !< + real (kind=kind_phys), pointer :: cd_ice(:) => null() !< + real (kind=kind_phys), pointer :: cd_land(:) => null() !< + real (kind=kind_phys), pointer :: cd_water(:) => null() !< + real (kind=kind_phys), pointer :: cdq(:) => null() !< + real (kind=kind_phys), pointer :: cdq_ice(:) => null() !< + real (kind=kind_phys), pointer :: cdq_land(:) => null() !< + real (kind=kind_phys), pointer :: cdq_water(:) => null() !< + real (kind=kind_phys), pointer :: cf_upi(:,:) => null() !< + real (kind=kind_phys), pointer :: chh_ice(:) => null() !< + real (kind=kind_phys), pointer :: chh_land(:) => null() !< + real (kind=kind_phys), pointer :: chh_water(:) => null() !< + real (kind=kind_phys), pointer :: clcn(:,:) => null() !< + real (kind=kind_phys), pointer :: cldf(:) => null() !< + real (kind=kind_phys), pointer :: cldsa(:,:) => null() !< + real (kind=kind_phys), pointer :: cldtaulw(:,:) => null() !< + real (kind=kind_phys), pointer :: cldtausw(:,:) => null() !< + real (kind=kind_phys), pointer :: cld1d(:) => null() !< + real (kind=kind_phys), pointer :: clouds(:,:,:) => null() !< + real (kind=kind_phys), pointer :: clw(:,:,:) => null() !< + real (kind=kind_phys), pointer :: clx(:,:) => null() !< + real (kind=kind_phys), pointer :: cmm_ice(:) => null() !< + real (kind=kind_phys), pointer :: cmm_land(:) => null() !< + real (kind=kind_phys), pointer :: cmm_water(:) => null() !< + real (kind=kind_phys), pointer :: cnv_dqldt(:,:) => null() !< + real (kind=kind_phys), pointer :: cnv_fice(:,:) => null() !< + real (kind=kind_phys), pointer :: cnv_mfd(:,:) => null() !< + real (kind=kind_phys), pointer :: cnv_ndrop(:,:) => null() !< + real (kind=kind_phys), pointer :: cnv_nice(:,:) => null() !< + real (kind=kind_phys), pointer :: cnvc(:,:) => null() !< + real (kind=kind_phys), pointer :: cnvw(:,:) => null() !< + real (kind=kind_phys), pointer :: ctei_r(:) => null() !< + real (kind=kind_phys), pointer :: ctei_rml(:) => null() !< + real (kind=kind_phys), pointer :: cumabs(:) => null() !< + real (kind=kind_phys), pointer :: dd_mf(:,:) => null() !< + real (kind=kind_phys), pointer :: de_lgth(:) => null() !< + real (kind=kind_phys), pointer :: del(:,:) => null() !< + real (kind=kind_phys), pointer :: del_gz(:,:) => null() !< + real (kind=kind_phys), pointer :: delr(:,:) => null() !< + real (kind=kind_phys), pointer :: dlength(:) => null() !< + real (kind=kind_phys), pointer :: dqdt(:,:,:) => null() !< + real (kind=kind_phys), pointer :: dqsfc1(:) => null() !< + real (kind=kind_phys), pointer :: drain(:) => null() !< + real (kind=kind_phys), pointer :: dtdt(:,:) => null() !< + real (kind=kind_phys), pointer :: dtsfc1(:) => null() !< + real (kind=kind_phys), pointer :: dtzm(:) => null() !< + real (kind=kind_phys), pointer :: dt_mf(:,:) => null() !< + real (kind=kind_phys), pointer :: dudt(:,:) => null() !< + real (kind=kind_phys), pointer :: dusfcg(:) => null() !< + real (kind=kind_phys), pointer :: dusfc1(:) => null() !< + real (kind=kind_phys), pointer :: dvdftra(:,:,:) => null() !< + real (kind=kind_phys), pointer :: dvdt(:,:) => null() !< + real (kind=kind_phys), pointer :: dvsfcg(:) => null() !< + real (kind=kind_phys), pointer :: dvsfc1(:) => null() !< + real (kind=kind_phys), pointer :: dzlyr(:,:) => null() !< + real (kind=kind_phys), pointer :: elvmax(:) => null() !< + real (kind=kind_phys), pointer :: ep1d(:) => null() !< + real (kind=kind_phys), pointer :: ep1d_ice(:) => null() !< + real (kind=kind_phys), pointer :: ep1d_land(:) => null() !< + real (kind=kind_phys), pointer :: ep1d_water(:) => null() !< + real (kind=kind_phys), pointer :: evap_ice(:) => null() !< + real (kind=kind_phys), pointer :: evap_land(:) => null() !< + real (kind=kind_phys), pointer :: evap_water(:) => null() !< + real (kind=kind_phys), pointer :: evbs(:) => null() !< + real (kind=kind_phys), pointer :: evcw(:) => null() !< + real (kind=kind_phys), pointer :: pah(:) => null() !< + real (kind=kind_phys), pointer :: ecan(:) => null() !< + real (kind=kind_phys), pointer :: etran(:) => null() !< + real (kind=kind_phys), pointer :: edir(:) => null() !< + real (kind=kind_phys), pointer :: faerlw(:,:,:,:) => null() !< + real (kind=kind_phys), pointer :: faersw(:,:,:,:) => null() !< + real (kind=kind_phys), pointer :: ffhh_ice(:) => null() !< + real (kind=kind_phys), pointer :: ffhh_land(:) => null() !< + real (kind=kind_phys), pointer :: ffhh_water(:) => null() !< + real (kind=kind_phys), pointer :: fh2(:) => null() !< + real (kind=kind_phys), pointer :: fh2_ice(:) => null() !< + real (kind=kind_phys), pointer :: fh2_land(:) => null() !< + real (kind=kind_phys), pointer :: fh2_water(:) => null() !< + logical, pointer :: flag_cice(:) => null() !< + logical, pointer :: flag_guess(:) => null() !< + logical, pointer :: flag_iter(:) => null() !< + real (kind=kind_phys), pointer :: ffmm_ice(:) => null() !< + real (kind=kind_phys), pointer :: ffmm_land(:) => null() !< + real (kind=kind_phys), pointer :: ffmm_water(:) => null() !< + real (kind=kind_phys), pointer :: fm10(:) => null() !< + real (kind=kind_phys), pointer :: fm10_ice(:) => null() !< + real (kind=kind_phys), pointer :: fm10_land(:) => null() !< + real (kind=kind_phys), pointer :: fm10_water(:) => null() !< + real (kind=kind_phys) :: frain !< + real (kind=kind_phys), pointer :: frland(:) => null() !< + real (kind=kind_phys), pointer :: fscav(:) => null() !< + real (kind=kind_phys), pointer :: fswtr(:) => null() !< + real (kind=kind_phys), pointer :: gabsbdlw(:) => null() !< + real (kind=kind_phys), pointer :: gabsbdlw_ice(:) => null() !< + real (kind=kind_phys), pointer :: gabsbdlw_land(:) => null() !< + real (kind=kind_phys), pointer :: gabsbdlw_water(:) => null() !< + real (kind=kind_phys), pointer :: gamma(:) => null() !< + real (kind=kind_phys), pointer :: gamq(:) => null() !< + real (kind=kind_phys), pointer :: gamt(:) => null() !< + real (kind=kind_phys), pointer :: gasvmr(:,:,:) => null() !< + real (kind=kind_phys), pointer :: gflx(:) => null() !< + real (kind=kind_phys), pointer :: gflx_ice(:) => null() !< + real (kind=kind_phys), pointer :: gflx_land(:) => null() !< + real (kind=kind_phys), pointer :: gflx_water(:) => null() !< + real (kind=kind_phys), pointer :: graupelmp(:) => null() !< + real (kind=kind_phys), pointer :: gwdcu(:,:) => null() !< + real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !< + real (kind=kind_phys), pointer :: zvfun(:) => null() !< + real (kind=kind_phys), pointer :: hffac(:) => null() !< + real (kind=kind_phys), pointer :: hflxq(:) => null() !< + real (kind=kind_phys), pointer :: hflx_ice(:) => null() !< + real (kind=kind_phys), pointer :: hflx_land(:) => null() !< + real (kind=kind_phys), pointer :: hflx_water(:) => null() !< + !--- radiation variables that need to be carried over from radiation to physics + real (kind=kind_phys), pointer :: htlwc(:,:) => null() !< + real (kind=kind_phys), pointer :: htlw0(:,:) => null() !< + real (kind=kind_phys), pointer :: htswc(:,:) => null() !< + real (kind=kind_phys), pointer :: htsw0(:,:) => null() !< + ! + real (kind=kind_phys), pointer :: icemp(:) => null() !< + logical, pointer :: dry(:) => null() !< + integer, pointer :: idxday(:) => null() !< + logical, pointer :: icy(:) => null() !< + logical, pointer :: lake(:) => null() !< + logical, pointer :: use_flake(:) => null() !< + logical, pointer :: ocean(:) => null() !< + integer :: ipr !< + integer, pointer :: islmsk(:) => null() !< + integer, pointer :: islmsk_cice(:) => null() !< + integer :: itc !< + logical, pointer :: wet(:) => null() !< + integer :: kb !< + integer, pointer :: kbot(:) => null() !< + integer, pointer :: kcnv(:) => null() !< + integer :: kd !< + integer, pointer :: kinver(:) => null() !< + integer, pointer :: kpbl(:) => null() !< + integer :: kt !< + integer, pointer :: ktop(:) => null() !< + integer :: latidxprnt !< + integer :: levi !< + integer :: lmk !< + integer :: lmp !< + integer, pointer :: mbota(:,:) => null() !< + logical :: mg3_as_mg2 !< + integer, pointer :: mtopa(:,:) => null() !< + integer :: nbdlw !< + integer :: nbdsw !< + real (kind=kind_phys), pointer :: ncgl(:,:) => null() !< + real (kind=kind_phys), pointer :: ncpi(:,:) => null() !< + real (kind=kind_phys), pointer :: ncpl(:,:) => null() !< + real (kind=kind_phys), pointer :: ncpr(:,:) => null() !< + real (kind=kind_phys), pointer :: ncps(:,:) => null() !< + integer :: ncstrac !< + integer :: nday !< + integer :: nf_aelw !< + integer :: nf_aesw !< + integer :: nn !< + integer :: nsamftrac !< + integer :: nscav !< + integer :: nspc1 !< + integer :: ntcwx !< + integer :: ntiwx !< + integer :: ntrwx !< + integer :: ntk !< + integer :: ntkev !< + integer :: nvdiff !< + real (kind=kind_phys), pointer :: oa4(:,:) => null() !< + real (kind=kind_phys), pointer :: oc(:) => null() !< + real (kind=kind_phys), pointer :: olyr(:,:) => null() !< + logical , pointer :: otspt(:,:) => null() !< + logical , pointer :: otsptflag(:) => null() !< + integer :: oz_coeffp5 !< + logical :: phys_hydrostatic !< + real (kind=kind_phys), pointer :: plvl(:,:) => null() !< + real (kind=kind_phys), pointer :: plyr(:,:) => null() !< + real (kind=kind_phys), pointer :: prcpmp(:) => null() !< + real (kind=kind_phys), pointer :: prnum(:,:) => null() !< + real (kind=kind_phys), pointer :: q2mp(:) => null() !< + real (kind=kind_phys), pointer :: qgl(:,:) => null() !< + real (kind=kind_phys), pointer :: qicn(:,:) => null() !< + real (kind=kind_phys), pointer :: qlcn(:,:) => null() !< + real (kind=kind_phys), pointer :: qlyr(:,:) => null() !< + real (kind=kind_phys), pointer :: qrn(:,:) => null() !< + real (kind=kind_phys), pointer :: qsnw(:,:) => null() !< + real (kind=kind_phys), pointer :: qss_ice(:) => null() !< + real (kind=kind_phys), pointer :: qss_land(:) => null() !< + real (kind=kind_phys), pointer :: qss_water(:) => null() !< + logical :: radar_reset !< + real (kind=kind_phys) :: raddt !< + real (kind=kind_phys), pointer :: rainmp(:) => null() !< + real (kind=kind_phys), pointer :: raincd(:) => null() !< + real (kind=kind_phys), pointer :: raincs(:) => null() !< + real (kind=kind_phys), pointer :: rainmcadj(:) => null() !< + real (kind=kind_phys), pointer :: rainp(:,:) => null() !< + real (kind=kind_phys), pointer :: rb(:) => null() !< + real (kind=kind_phys), pointer :: rb_ice(:) => null() !< + real (kind=kind_phys), pointer :: rb_land(:) => null() !< + real (kind=kind_phys), pointer :: rb_water(:) => null() !< + logical :: max_hourly_reset !< + logical :: ext_diag_thompson_reset !< + real (kind=kind_phys), pointer :: rhc(:,:) => null() !< + real (kind=kind_phys), pointer :: runoff(:) => null() !< + real (kind=kind_phys), pointer :: save_q(:,:,:) => null() !< + real (kind=kind_phys), pointer :: save_t(:,:) => null() !< + real (kind=kind_phys), pointer :: save_tcp(:,:) => null() !< + real (kind=kind_phys), pointer :: save_u(:,:) => null() !< + real (kind=kind_phys), pointer :: save_v(:,:) => null() !< + real (kind=kind_phys), pointer :: sbsno(:) => null() !< + type (cmpfsw_type), pointer :: scmpsw(:) => null() !< + real (kind=kind_phys), pointer :: sfcalb(:,:) => null() !< + real (kind=kind_phys), pointer :: sigma(:) => null() !< + real (kind=kind_phys), pointer :: sigmaf(:) => null() !< + real (kind=kind_phys), pointer :: sigmafrac(:,:) => null() !< + real (kind=kind_phys), pointer :: sigmatot(:,:) => null() !< + logical :: skip_macro !< + real (kind=kind_phys), pointer :: snowc(:) => null() !< + real (kind=kind_phys), pointer :: snohf(:) => null() !< + real (kind=kind_phys), pointer :: snowmp(:) => null() !< + real (kind=kind_phys), pointer :: snowmt(:) => null() !< + real (kind=kind_phys), pointer :: stress(:) => null() !< + real (kind=kind_phys), pointer :: stress_ice(:) => null() !< + real (kind=kind_phys), pointer :: stress_land(:) => null() !< + real (kind=kind_phys), pointer :: stress_water(:) => null() !< + real (kind=kind_phys), pointer :: t2mmp(:) => null() !< + real (kind=kind_phys), pointer :: theta(:) => null() !< + real (kind=kind_phys), pointer :: tlvl(:,:) => null() !< + real (kind=kind_phys), pointer :: tlyr(:,:) => null() !< + real (kind=kind_phys), pointer :: tprcp_ice(:) => null() !< + real (kind=kind_phys), pointer :: tprcp_land(:) => null() !< + real (kind=kind_phys), pointer :: tprcp_water(:) => null() !< + integer :: tracers_start_index !< + integer :: tracers_total !< + integer :: tracers_water !< + logical :: trans_aero !< + real (kind=kind_phys), pointer :: trans(:) => null() !< + real (kind=kind_phys), pointer :: tseal(:) => null() !< + real (kind=kind_phys), pointer :: tsfa(:) => null() !< + real (kind=kind_phys), pointer :: tsfc_water(:) => null() !< + real (kind=kind_phys), pointer :: tsfg(:) => null() !< + real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !< + real (kind=kind_phys), pointer :: tsurf_land(:) => null() !< + real (kind=kind_phys), pointer :: tsurf_water(:) => null() !< + real (kind=kind_phys), pointer :: ud_mf(:,:) => null() !< + real (kind=kind_phys), pointer :: uustar_ice(:) => null() !< + real (kind=kind_phys), pointer :: uustar_land(:) => null() !< + real (kind=kind_phys), pointer :: uustar_water(:) => null() !< + real (kind=kind_phys), pointer :: vdftra(:,:,:) => null() !< + real (kind=kind_phys), pointer :: vegf1d(:) => null() !< + real (kind=kind_phys) :: lndp_vgf !< + + real (kind=kind_phys), pointer :: w_upi(:,:) => null() !< + real (kind=kind_phys), pointer :: wcbmax(:) => null() !< + real (kind=kind_phys), pointer :: wind(:) => null() !< + real (kind=kind_phys), pointer :: work1(:) => null() !< + real (kind=kind_phys), pointer :: work2(:) => null() !< + real (kind=kind_phys), pointer :: work3(:) => null() !< + real (kind=kind_phys), pointer :: xcosz(:) => null() !< + real (kind=kind_phys), pointer :: xlai1d(:) => null() !< + real (kind=kind_phys), pointer :: xmu(:) => null() !< + real (kind=kind_phys), pointer :: z01d(:) => null() !< + real (kind=kind_phys), pointer :: zt1d(:) => null() !< + real (kind=kind_phys), pointer :: ztmax_ice(:) => null() !< + real (kind=kind_phys), pointer :: ztmax_land(:) => null() !< + real (kind=kind_phys), pointer :: ztmax_water(:) => null() !< +!================================================================================================== +! UGWP - five mechnanisms of momentum deposition due to various types of GWs +! (oss, ofd, obl, ogw) + ngw = sum( sso + ngw) +!================================================================================================== +! nGWs + real (kind=kind_phys), pointer :: dudt_ngw(:,:) => null() !< + real (kind=kind_phys), pointer :: dvdt_ngw(:,:) => null() !< + real (kind=kind_phys), pointer :: dtdt_ngw(:,:) => null() !< + real (kind=kind_phys), pointer :: kdis_ngw(:,:) => null() !< + + real (kind=kind_phys), pointer :: tau_oss(: ) => null() !< instantaneous momentum flux due to OSS + real (kind=kind_phys), pointer :: tau_tofd(:) => null() !< instantaneous momentum flux due to TOFD + real (kind=kind_phys), pointer :: tau_mtb(:) => null() !< instantaneous momentum of mountain blocking drag + real (kind=kind_phys), pointer :: tau_ogw(:) => null() !< instantaneous momentum flux of OGWs + real (kind=kind_phys), pointer :: tau_ngw(:) => null() !< instantaneous momentum flux of NGWs + + real (kind=kind_phys), pointer :: zngw(:) => null() !< launch levels of NGWs + real (kind=kind_phys), pointer :: zmtb(:) => null() !< mountain blocking height + real (kind=kind_phys), pointer :: zlwb(:) => null() !< low level wave breaking height + real (kind=kind_phys), pointer :: zogw(:) => null() !< height of OGW-launch + + real (kind=kind_phys), pointer :: dudt_mtb(:,:) => null() !< daily aver u-wind tend due to mountain blocking + real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS + + ! RRTMGP + real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< + real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< + real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: relhum(:,:) => null() !< + real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: q_lay(:,:) => null() !< + real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !< + real (kind=kind_phys), pointer :: deltaZc(:,:) => null() !< + real (kind=kind_phys), pointer :: deltaP(:,:) => null() !< + real (kind=kind_phys), pointer :: cloud_overlap_param(:,:) => null() !< Cloud overlap parameter + real (kind=kind_phys), pointer :: cnv_cloud_overlap_param(:,:) => null() !< Convective cloud overlap parameter + real (kind=kind_phys), pointer :: precip_overlap_param(:,:) => null() !< Precipitation overlap parameter + real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< + real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. + real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. + real (kind=kind_phys), pointer :: cld_frac(:,:) => null() !< Total cloud fraction + real (kind=kind_phys), pointer :: cld_lwp(:,:) => null() !< Cloud liquid water path + real (kind=kind_phys), pointer :: cld_reliq(:,:) => null() !< Cloud liquid effective radius + real (kind=kind_phys), pointer :: cld_iwp(:,:) => null() !< Cloud ice water path + real (kind=kind_phys), pointer :: cld_reice(:,:) => null() !< Cloud ice effecive radius + real (kind=kind_phys), pointer :: cld_swp(:,:) => null() !< Cloud snow water path + real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius + real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path + real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius + real (kind=kind_phys), pointer :: precip_frac(:,:) => null() !< Precipitation fraction + real (kind=kind_phys), pointer :: cld_cnv_frac(:,:) => null() !< SGS convective cloud fraction + real (kind=kind_phys), pointer :: cld_cnv_lwp(:,:) => null() !< SGS convective cloud liquid water path + real (kind=kind_phys), pointer :: cld_cnv_reliq(:,:) => null() !< SGS convective cloud liquid effective radius + real (kind=kind_phys), pointer :: cld_cnv_iwp(:,:) => null() !< SGS convective cloud ice water path + real (kind=kind_phys), pointer :: cld_cnv_reice(:,:) => null() !< SGS convective cloud ice effecive radius + real (kind=kind_phys), pointer :: cld_pbl_lwp(:,:) => null() !< SGS PBL cloud liquid water path + real (kind=kind_phys), pointer :: cld_pbl_reliq(:,:) => null() !< SGS PBL cloud liquid effective radius + real (kind=kind_phys), pointer :: cld_pbl_iwp(:,:) => null() !< SGS PBL cloud ice water path + real (kind=kind_phys), pointer :: cld_pbl_reice(:,:) => null() !< SGS PBL cloud ice effecive radius + real (kind=kind_phys), pointer :: fluxlwUP_allsky(:,:) => null() !< RRTMGP upward longwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxlwDOWN_allsky(:,:) => null() !< RRTMGP downward longwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxlwUP_clrsky(:,:) => null() !< RRTMGP upward longwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxlwDOWN_clrsky(:,:) => null() !< RRTMGP downward longwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxswUP_allsky(:,:) => null() !< RRTMGP upward shortwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile + real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile + real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile + real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< + real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_nir_dif(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_uvvis_dir(:,:) => null() !< + real (kind=kind_phys), pointer :: sfc_alb_uvvis_dif(:,:) => null() !< + real (kind=kind_phys), pointer :: toa_src_lw(:,:) => null() !< + real (kind=kind_phys), pointer :: toa_src_sw(:,:) => null() !< + type(proflw_type), pointer :: flxprf_lw(:,:) => null() !< DDT containing RRTMGP longwave fluxes + type(profsw_type), pointer :: flxprf_sw(:,:) => null() !< DDT containing RRTMGP shortwave fluxes + type(ty_optical_props_2str) :: lw_optical_props_cloudsByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: lw_optical_props_clouds !< RRTMGP DDT + type(ty_optical_props_2str) :: lw_optical_props_precipByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: lw_optical_props_precip !< RRTMGP DDT + type(ty_optical_props_2str) :: lw_optical_props_cnvcloudsByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: lw_optical_props_cnvclouds !< RRTMGP DDT + type(ty_optical_props_2str) :: lw_optical_props_MYNNcloudsByBand !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_clrsky !< RRTMGP DDT + type(ty_optical_props_1scl) :: lw_optical_props_aerosol !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_clouds !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_precipByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_precip !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_clrsky !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_cnvcloudsByBand !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_cnvclouds !< RRTMGP DDT + type(ty_optical_props_2str) :: sw_optical_props_MYNNcloudsByBand !< RRTMGP DDT + type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT + type(ty_source_func_lw) :: sources !< RRTMGP DDT + + !-- GSL drag suite + real (kind=kind_phys), pointer :: varss(:) => null() !< + real (kind=kind_phys), pointer :: ocss(:) => null() !< + real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !< + real (kind=kind_phys), pointer :: clxss(:,:) => null() !< + + !-- 3D diagnostics + integer :: rtg_ozone_index, rtg_tke_index + + contains + + procedure :: create => gfs_interstitial_create !< allocate array data + procedure :: rad_reset => gfs_interstitial_rad_reset !< reset array data for radiation + procedure :: phys_reset => gfs_interstitial_phys_reset !< reset array data for physics + + end type GFS_interstitial_type + +!! \section arg_table_GFDL_interstitial_type Argument Table +!! \htmlinclude GFDL_interstitial_type.html +!! + type GFDL_interstitial_type real(kind_dyn) :: akap real(kind_dyn) :: bdt @@ -73,28 +508,1126 @@ module CCPP_typedefs contains - procedure :: create => interstitial_create !< allocate array data - procedure :: reset => interstitial_reset !< reset array data - procedure :: mprint => interstitial_print !< print array data + procedure :: create => gfdl_interstitial_create !< allocate array data + procedure :: reset => gfdl_interstitial_reset !< reset array data + procedure :: mprint => gfdl_interstitial_print !< print array data - end type CCPP_interstitial_type + end type GFDL_interstitial_type contains -!----------------------------- -! CCPP_interstitial_type -!----------------------------- - subroutine interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd, jed, npz, ng, & - dt_atmos, p_split, k_split, zvir, p_ref, ak, bk, & - do_ql, do_qi, do_qr, do_qs, do_qg, do_qa, & - kappa, hydrostatic, do_sat_adj, & - delp, delz, area, peln, phis, pkz, pt, & - qvi, qv, ql, qi, qr, qs, qg, qc, q_con, & - nthreads, nwat, ngas, rilist, cpilist, mpirank, mpiroot) +!---------------------- +! GFS_interstitial_type +!---------------------- + + subroutine gfs_interstitial_create (Interstitial, IM, Model) + ! + implicit none + ! + class(GFS_interstitial_type) :: Interstitial + integer, intent(in) :: IM + type(GFS_control_type), intent(in) :: Model + integer :: iGas + ! + allocate (Interstitial%otspt (Model%ntracp1,2)) + allocate (Interstitial%otsptflag (Model%ntrac)) + ! Set up numbers of tracers for PBL, convection, etc: sets + ! Interstitial%{nvdiff,mg3_as_mg2,nn,tracers_total,ntcwx,ntiwx,ntk,ntkev,otspt,nsamftrac,ncstrac,nscav} + call gfs_interstitial_setup_tracers(Interstitial, Model) + ! Allocate arrays + allocate (Interstitial%adjsfculw_land (IM)) + allocate (Interstitial%adjsfculw_ice (IM)) + allocate (Interstitial%adjsfculw_water (IM)) + allocate (Interstitial%adjnirbmd (IM)) + allocate (Interstitial%adjnirbmu (IM)) + allocate (Interstitial%adjnirdfd (IM)) + allocate (Interstitial%adjnirdfu (IM)) + allocate (Interstitial%adjvisbmd (IM)) + allocate (Interstitial%adjvisbmu (IM)) + allocate (Interstitial%adjvisdfu (IM)) + allocate (Interstitial%adjvisdfd (IM)) + allocate (Interstitial%aerodp (IM,NSPC1)) + allocate (Interstitial%alb1d (IM)) + if (.not. Model%do_RRTMGP) then + ! RRTMGP uses its own cloud_overlap_param + allocate (Interstitial%alpha (IM,Model%levr+LTP)) + end if + allocate (Interstitial%bexp1d (IM)) + allocate (Interstitial%cd (IM)) + allocate (Interstitial%cd_ice (IM)) + allocate (Interstitial%cd_land (IM)) + allocate (Interstitial%cd_water (IM)) + allocate (Interstitial%cdq (IM)) + allocate (Interstitial%cdq_ice (IM)) + allocate (Interstitial%cdq_land (IM)) + allocate (Interstitial%cdq_water (IM)) + allocate (Interstitial%chh_ice (IM)) + allocate (Interstitial%chh_land (IM)) + allocate (Interstitial%chh_water (IM)) + allocate (Interstitial%cldf (IM)) + allocate (Interstitial%cldsa (IM,5)) + allocate (Interstitial%cldtaulw (IM,Model%levr+LTP)) + allocate (Interstitial%cldtausw (IM,Model%levr+LTP)) + allocate (Interstitial%cld1d (IM)) + allocate (Interstitial%clouds (IM,Model%levr+LTP,NF_CLDS)) + allocate (Interstitial%clw (IM,Model%levs,Interstitial%nn)) + allocate (Interstitial%clx (IM,4)) + allocate (Interstitial%cmm_ice (IM)) + allocate (Interstitial%cmm_land (IM)) + allocate (Interstitial%cmm_water (IM)) + allocate (Interstitial%cnvc (IM,Model%levs)) + allocate (Interstitial%cnvw (IM,Model%levs)) + allocate (Interstitial%ctei_r (IM)) + allocate (Interstitial%ctei_rml (IM)) + allocate (Interstitial%cumabs (IM)) + allocate (Interstitial%dd_mf (IM,Model%levs)) + allocate (Interstitial%de_lgth (IM)) + allocate (Interstitial%del (IM,Model%levs)) + allocate (Interstitial%del_gz (IM,Model%levs+1)) + allocate (Interstitial%delr (IM,Model%levr+LTP)) + allocate (Interstitial%dlength (IM)) + allocate (Interstitial%dqdt (IM,Model%levs,Model%ntrac)) + allocate (Interstitial%dqsfc1 (IM)) + allocate (Interstitial%drain (IM)) + allocate (Interstitial%dtdt (IM,Model%levs)) + allocate (Interstitial%dtsfc1 (IM)) + allocate (Interstitial%dt_mf (IM,Model%levs)) + allocate (Interstitial%dtzm (IM)) + allocate (Interstitial%dudt (IM,Model%levs)) + allocate (Interstitial%dusfcg (IM)) + allocate (Interstitial%dusfc1 (IM)) + allocate (Interstitial%dvdt (IM,Model%levs)) + allocate (Interstitial%dvsfcg (IM)) + allocate (Interstitial%dvsfc1 (IM)) + allocate (Interstitial%dvdftra (IM,Model%levs,Interstitial%nvdiff)) + allocate (Interstitial%dzlyr (IM,Model%levr+LTP)) + allocate (Interstitial%elvmax (IM)) + allocate (Interstitial%ep1d (IM)) + allocate (Interstitial%ep1d_ice (IM)) + allocate (Interstitial%ep1d_land (IM)) + allocate (Interstitial%ep1d_water (IM)) + allocate (Interstitial%evap_ice (IM)) + allocate (Interstitial%evap_land (IM)) + allocate (Interstitial%evap_water (IM)) + allocate (Interstitial%evbs (IM)) + allocate (Interstitial%evcw (IM)) + allocate (Interstitial%pah (IM)) + allocate (Interstitial%ecan (IM)) + allocate (Interstitial%etran (IM)) + allocate (Interstitial%edir (IM)) + allocate (Interstitial%faerlw (IM,Model%levr+LTP,NBDLW,NF_AELW)) + allocate (Interstitial%faersw (IM,Model%levr+LTP,NBDSW,NF_AESW)) + allocate (Interstitial%ffhh_ice (IM)) + allocate (Interstitial%ffhh_land (IM)) + allocate (Interstitial%ffhh_water (IM)) + allocate (Interstitial%fh2 (IM)) + allocate (Interstitial%fh2_ice (IM)) + allocate (Interstitial%fh2_land (IM)) + allocate (Interstitial%fh2_water (IM)) + allocate (Interstitial%flag_cice (IM)) + allocate (Interstitial%flag_guess (IM)) + allocate (Interstitial%flag_iter (IM)) + allocate (Interstitial%ffmm_ice (IM)) + allocate (Interstitial%ffmm_land (IM)) + allocate (Interstitial%ffmm_water (IM)) + allocate (Interstitial%fm10 (IM)) + allocate (Interstitial%fm10_ice (IM)) + allocate (Interstitial%fm10_land (IM)) + allocate (Interstitial%fm10_water (IM)) + allocate (Interstitial%frland (IM)) + allocate (Interstitial%fscav (Interstitial%nscav)) + allocate (Interstitial%fswtr (Interstitial%nscav)) + allocate (Interstitial%gabsbdlw (IM)) + allocate (Interstitial%gabsbdlw_ice (IM)) + allocate (Interstitial%gabsbdlw_land (IM)) + allocate (Interstitial%gabsbdlw_water (IM)) + allocate (Interstitial%gamma (IM)) + allocate (Interstitial%gamq (IM)) + allocate (Interstitial%gamt (IM)) + allocate (Interstitial%gasvmr (IM,Model%levr+LTP,NF_VGAS)) + allocate (Interstitial%gflx (IM)) + allocate (Interstitial%gflx_ice (IM)) + allocate (Interstitial%gflx_land (IM)) + allocate (Interstitial%gflx_water (IM)) + allocate (Interstitial%gwdcu (IM,Model%levs)) + allocate (Interstitial%gwdcv (IM,Model%levs)) + allocate (Interstitial%zvfun (IM)) + allocate (Interstitial%hffac (IM)) + allocate (Interstitial%hflxq (IM)) + allocate (Interstitial%hflx_ice (IM)) + allocate (Interstitial%hflx_land (IM)) + allocate (Interstitial%hflx_water (IM)) + allocate (Interstitial%htlwc (IM,Model%levr+LTP)) + allocate (Interstitial%htlw0 (IM,Model%levr+LTP)) + allocate (Interstitial%htswc (IM,Model%levr+LTP)) + allocate (Interstitial%htsw0 (IM,Model%levr+LTP)) + allocate (Interstitial%dry (IM)) + allocate (Interstitial%idxday (IM)) + allocate (Interstitial%icy (IM)) + allocate (Interstitial%lake (IM)) + allocate (Interstitial%use_flake (IM)) + allocate (Interstitial%ocean (IM)) + allocate (Interstitial%islmsk (IM)) + allocate (Interstitial%islmsk_cice (IM)) + allocate (Interstitial%wet (IM)) + allocate (Interstitial%kbot (IM)) + allocate (Interstitial%kcnv (IM)) + allocate (Interstitial%kinver (IM)) + allocate (Interstitial%kpbl (IM)) + allocate (Interstitial%ktop (IM)) + allocate (Interstitial%mbota (IM,3)) + allocate (Interstitial%mtopa (IM,3)) + allocate (Interstitial%oa4 (IM,4)) + allocate (Interstitial%oc (IM)) + allocate (Interstitial%olyr (IM,Model%levr+LTP)) + allocate (Interstitial%plvl (IM,Model%levr+1+LTP)) + allocate (Interstitial%plyr (IM,Model%levr+LTP)) + allocate (Interstitial%prnum (IM,Model%levs)) + allocate (Interstitial%qlyr (IM,Model%levr+LTP)) + allocate (Interstitial%prcpmp (IM)) + allocate (Interstitial%qss_ice (IM)) + allocate (Interstitial%qss_land (IM)) + allocate (Interstitial%qss_water (IM)) + allocate (Interstitial%raincd (IM)) + allocate (Interstitial%raincs (IM)) + allocate (Interstitial%rainmcadj (IM)) + allocate (Interstitial%rainp (IM,Model%levs)) + allocate (Interstitial%rb (IM)) + allocate (Interstitial%rb_ice (IM)) + allocate (Interstitial%rb_land (IM)) + allocate (Interstitial%rb_water (IM)) + allocate (Interstitial%rhc (IM,Model%levs)) + allocate (Interstitial%runoff (IM)) + allocate (Interstitial%save_q (IM,Model%levs,Model%ntrac)) + allocate (Interstitial%save_t (IM,Model%levs)) + allocate (Interstitial%save_tcp (IM,Model%levs)) + allocate (Interstitial%save_u (IM,Model%levs)) + allocate (Interstitial%save_v (IM,Model%levs)) + allocate (Interstitial%sbsno (IM)) + allocate (Interstitial%scmpsw (IM)) + allocate (Interstitial%sfcalb (IM,NF_ALBD)) + allocate (Interstitial%sigma (IM)) + allocate (Interstitial%sigmaf (IM)) + allocate (Interstitial%sigmafrac (IM,Model%levs)) + allocate (Interstitial%sigmatot (IM,Model%levs)) + allocate (Interstitial%snowc (IM)) + allocate (Interstitial%snohf (IM)) + allocate (Interstitial%snowmt (IM)) + allocate (Interstitial%stress (IM)) + allocate (Interstitial%stress_ice (IM)) + allocate (Interstitial%stress_land (IM)) + allocate (Interstitial%stress_water (IM)) + allocate (Interstitial%theta (IM)) + allocate (Interstitial%tlvl (IM,Model%levr+1+LTP)) + allocate (Interstitial%tlyr (IM,Model%levr+LTP)) + allocate (Interstitial%tprcp_ice (IM)) + allocate (Interstitial%tprcp_land (IM)) + allocate (Interstitial%tprcp_water (IM)) + allocate (Interstitial%trans (IM)) + allocate (Interstitial%tseal (IM)) + allocate (Interstitial%tsfa (IM)) + allocate (Interstitial%tsfc_water (IM)) + allocate (Interstitial%tsfg (IM)) + allocate (Interstitial%tsurf_ice (IM)) + allocate (Interstitial%tsurf_land (IM)) + allocate (Interstitial%tsurf_water (IM)) + allocate (Interstitial%ud_mf (IM,Model%levs)) + allocate (Interstitial%uustar_ice (IM)) + allocate (Interstitial%uustar_land (IM)) + allocate (Interstitial%uustar_water (IM)) + allocate (Interstitial%vdftra (IM,Model%levs,Interstitial%nvdiff)) !GJF first dimension was set as 'IX' in GFS_physics_driver + allocate (Interstitial%vegf1d (IM)) + allocate (Interstitial%wcbmax (IM)) + allocate (Interstitial%wind (IM)) + allocate (Interstitial%work1 (IM)) + allocate (Interstitial%work2 (IM)) + allocate (Interstitial%work3 (IM)) + allocate (Interstitial%xcosz (IM)) + allocate (Interstitial%xlai1d (IM)) + allocate (Interstitial%xmu (IM)) + allocate (Interstitial%z01d (IM)) + allocate (Interstitial%zt1d (IM)) + allocate (Interstitial%ztmax_ice (IM)) + allocate (Interstitial%ztmax_land (IM)) + allocate (Interstitial%ztmax_water (IM)) + + ! RRTMGP + if (Model%do_RRTMGP) then + allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) + allocate (Interstitial%tv_lay (IM, Model%levs)) + allocate (Interstitial%relhum (IM, Model%levs)) + allocate (Interstitial%qs_lay (IM, Model%levs)) + allocate (Interstitial%q_lay (IM, Model%levs)) + allocate (Interstitial%deltaZ (IM, Model%levs)) + allocate (Interstitial%deltaZc (IM, Model%levs)) + allocate (Interstitial%deltaP (IM, Model%levs)) + allocate (Interstitial%p_lev (IM, Model%levs+1)) + allocate (Interstitial%p_lay (IM, Model%levs)) + allocate (Interstitial%t_lev (IM, Model%levs+1)) + allocate (Interstitial%t_lay (IM, Model%levs)) + allocate (Interstitial%cloud_overlap_param (IM, Model%levs)) + allocate (Interstitial%precip_overlap_param (IM, Model%levs)) + allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) + allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) + allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) + allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) + allocate (Interstitial%cld_frac (IM, Model%levs)) + allocate (Interstitial%cld_lwp (IM, Model%levs)) + allocate (Interstitial%cld_reliq (IM, Model%levs)) + allocate (Interstitial%cld_iwp (IM, Model%levs)) + allocate (Interstitial%cld_reice (IM, Model%levs)) + allocate (Interstitial%cld_swp (IM, Model%levs)) + allocate (Interstitial%cld_resnow (IM, Model%levs)) + allocate (Interstitial%cld_rwp (IM, Model%levs)) + allocate (Interstitial%cld_rerain (IM, Model%levs)) + allocate (Interstitial%precip_frac (IM, Model%levs)) + allocate (Interstitial%cld_cnv_frac (IM, Model%levs)) + allocate (Interstitial%cnv_cloud_overlap_param(IM, Model%levs)) + allocate (Interstitial%cld_cnv_lwp (IM, Model%levs)) + allocate (Interstitial%cld_cnv_reliq (IM, Model%levs)) + allocate (Interstitial%cld_cnv_iwp (IM, Model%levs)) + allocate (Interstitial%cld_cnv_reice (IM, Model%levs)) + allocate (Interstitial%cld_pbl_lwp (IM, Model%levs)) + allocate (Interstitial%cld_pbl_reliq (IM, Model%levs)) + allocate (Interstitial%cld_pbl_iwp (IM, Model%levs)) + allocate (Interstitial%cld_pbl_reice (IM, Model%levs)) + allocate (Interstitial%flxprf_lw (IM, Model%levs+1)) + allocate (Interstitial%flxprf_sw (IM, Model%levs+1)) + allocate (Interstitial%sfc_emiss_byband (Model%rrtmgp_nBandsLW,IM)) + allocate (Interstitial%sec_diff_byband (Model%rrtmgp_nBandsLW,IM)) + allocate (Interstitial%sfc_alb_nir_dir (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_nir_dif (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_uvvis_dir (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%sfc_alb_uvvis_dif (Model%rrtmgp_nBandsSW,IM)) + allocate (Interstitial%toa_src_sw (IM,Model%rrtmgp_nGptsSW)) + allocate (Interstitial%toa_src_lw (IM,Model%rrtmgp_nGptsLW)) + ! + ! gas_concentrations (ty_gas_concs) + ! + Interstitial%gas_concentrations%ncol = IM + Interstitial%gas_concentrations%nlay = Model%levs + allocate(Interstitial%gas_concentrations%gas_name(Model%nGases)) + allocate(Interstitial%gas_concentrations%concs(Model%nGases)) + do iGas=1,Model%nGases + allocate(Interstitial%gas_concentrations%concs(iGas)%conc(IM, Model%levs)) + enddo + ! + ! lw_optical_props_clrsky (ty_optical_props_1scl) + ! + allocate(Interstitial%lw_optical_props_clrsky%tau( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_clrsky%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_clrsky%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_clrsky%gpt2band( Model%rrtmgp_nGptsLW )) + ! + ! lw_optical_props_aerosol (ty_optical_props_1scl) + ! + allocate(Interstitial%lw_optical_props_aerosol%tau( IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_aerosol%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_aerosol%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_aerosol%gpt2band( Model%rrtmgp_nBandsLW )) + ! + ! lw_optical_props_cloudsByBand (ty_optical_props_2str) + ! + allocate(Interstitial%lw_optical_props_cloudsByBand%tau(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cloudsByBand%ssa(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cloudsByBand%g( IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cloudsByBand%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cloudsByBand%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cloudsByBand%gpt2band( Model%rrtmgp_nBandsLW )) + ! + ! lw_optical_props_cnvcloudsByBand (ty_optical_props_2str) + ! + allocate(Interstitial%lw_optical_props_cnvcloudsByBand%tau(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cnvcloudsByBand%ssa(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cnvcloudsByBand%g( IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cnvcloudsByBand%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cnvcloudsByBand%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cnvcloudsByBand%gpt2band( Model%rrtmgp_nBandsLW )) + ! + ! lw_optical_props_MYNNcloudsByBand (ty_optical_props_2str) + ! + allocate(Interstitial%lw_optical_props_MYNNcloudsByBand%tau(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_MYNNcloudsByBand%ssa(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_MYNNcloudsByBand%g( IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_MYNNcloudsByBand%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_MYNNcloudsByBand%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_MYNNcloudsByBand%gpt2band( Model%rrtmgp_nBandsLW )) + ! + ! lw_optical_props_precipByBand (ty_optical_props_2str) + ! + allocate(Interstitial%lw_optical_props_precipByBand%tau(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_precipByBand%ssa(IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_precipByBand%g( IM, Model%levs, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_precipByBand%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_precipByBand%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_precipByBand%gpt2band( Model%rrtmgp_nBandsLW )) + ! + ! lw_optical_props_clouds (ty_optical_props_2str) + ! + allocate(Interstitial%lw_optical_props_clouds%tau( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_clouds%ssa( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_clouds%g( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_clouds%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_clouds%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_clouds%gpt2band( Model%rrtmgp_nGptsLW )) + ! + ! lw_optical_props_cnvclouds (ty_optical_props_2str) + ! + allocate(Interstitial%lw_optical_props_cnvclouds%tau( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_cnvclouds%ssa( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_cnvclouds%g( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_cnvclouds%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cnvclouds%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_cnvclouds%gpt2band( Model%rrtmgp_nGptsLW )) + ! + ! lw_optical_props_precip (ty_optical_props_2str) + ! + allocate(Interstitial%lw_optical_props_precip%tau( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_precip%ssa( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_precip%g( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%lw_optical_props_precip%band2gpt (2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_precip%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%lw_optical_props_precip%gpt2band( Model%rrtmgp_nGptsLW )) + ! + ! sources (ty_source_func_lw) + ! + allocate(Interstitial%sources%sfc_source( IM, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%sources%lay_source( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%sources%lev_source_inc( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%sources%lev_source_dec( IM, Model%levs, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%sources%sfc_source_Jac( IM, Model%rrtmgp_nGptsLW )) + allocate(Interstitial%sources%band2gpt ( 2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%sources%band_lims_wvn ( 2, Model%rrtmgp_nBandsLW )) + allocate(Interstitial%sources%gpt2band( Model%rrtmgp_nGptsLW )) + end if + +! UGWP common + allocate (Interstitial%tau_mtb (IM)) + allocate (Interstitial%tau_ogw (IM)) + allocate (Interstitial%tau_tofd (IM)) + allocate (Interstitial%tau_ngw (IM)) + allocate (Interstitial%tau_oss (IM)) + allocate (Interstitial%dudt_mtb (IM,Model%levs)) + allocate (Interstitial%dudt_tms (IM,Model%levs)) + allocate (Interstitial%zmtb (IM) ) + allocate (Interstitial%zlwb (IM) ) + allocate (Interstitial%zogw (IM) ) + allocate (Interstitial%zngw (IM) ) + +! CIRES UGWP v1 + if (Model%do_ugwp_v1) then + allocate (Interstitial%dudt_ngw (IM,Model%levs)) + allocate (Interstitial%dvdt_ngw (IM,Model%levs)) + allocate (Interstitial%dtdt_ngw (IM,Model%levs)) + allocate (Interstitial%kdis_ngw (IM,Model%levs)) + end if + +!-- GSL drag suite + if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & + Model%gwd_opt==2 .or. Model%gwd_opt==22 ) then + allocate (Interstitial%varss (IM)) + allocate (Interstitial%ocss (IM)) + allocate (Interstitial%oa4ss (IM,4)) + allocate (Interstitial%clxss (IM,4)) + end if +! + ! Allocate arrays that are conditional on physics choices + if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson & + .or. Model%imp_physics == Model%imp_physics_nssl & + ) then + allocate (Interstitial%graupelmp (IM)) + allocate (Interstitial%icemp (IM)) + allocate (Interstitial%rainmp (IM)) + allocate (Interstitial%snowmp (IM)) + else if (Model%imp_physics == Model%imp_physics_mg) then + allocate (Interstitial%ncgl (IM,Model%levs)) + allocate (Interstitial%ncpr (IM,Model%levs)) + allocate (Interstitial%ncps (IM,Model%levs)) + allocate (Interstitial%qgl (IM,Model%levs)) + allocate (Interstitial%qrn (IM,Model%levs)) + allocate (Interstitial%qsnw (IM,Model%levs)) + allocate (Interstitial%qlcn (IM,Model%levs)) + allocate (Interstitial%qicn (IM,Model%levs)) + allocate (Interstitial%w_upi (IM,Model%levs)) + allocate (Interstitial%cf_upi (IM,Model%levs)) + allocate (Interstitial%cnv_mfd (IM,Model%levs)) + allocate (Interstitial%cnv_dqldt (IM,Model%levs)) + allocate (Interstitial%clcn (IM,Model%levs)) + allocate (Interstitial%cnv_fice (IM,Model%levs)) + allocate (Interstitial%cnv_ndrop (IM,Model%levs)) + allocate (Interstitial%cnv_nice (IM,Model%levs)) + end if + if (Model%do_shoc) then + if (.not. associated(Interstitial%qrn)) allocate (Interstitial%qrn (IM,Model%levs)) + if (.not. associated(Interstitial%qsnw)) allocate (Interstitial%qsnw (IM,Model%levs)) + ! DH* updated version of shoc from May 22 2019 (not yet in CCPP) doesn't use qgl? remove? + if (.not. associated(Interstitial%qgl)) allocate (Interstitial%qgl (IM,Model%levs)) + ! *DH + allocate (Interstitial%ncpi (IM,Model%levs)) + allocate (Interstitial%ncpl (IM,Model%levs)) + end if + if (Model%lsm == Model%lsm_noahmp) then + allocate (Interstitial%t2mmp (IM)) + allocate (Interstitial%q2mp (IM)) + end if + ! + ! Set components that do not change + Interstitial%frain = Model%dtf/Model%dtp + Interstitial%ipr = min(IM,10) + Interstitial%latidxprnt = 1 + Interstitial%levi = Model%levs+1 + Interstitial%lmk = Model%levr+LTP + Interstitial%lmp = Model%levr+1+LTP + Interstitial%nbdlw = NBDLW + Interstitial%nbdsw = NBDSW + Interstitial%nf_aelw = NF_AELW + Interstitial%nf_aesw = NF_AESW + Interstitial%nspc1 = NSPC1 + if (Model%oz_phys .or. Model%oz_phys_2015) then + Interstitial%oz_coeffp5 = oz_coeff+5 + else + Interstitial%oz_coeffp5 = 5 + endif + ! + Interstitial%skip_macro = .false. + ! The value phys_hydrostatic from dynamics does not match the + ! hardcoded value for calling GFDL MP in GFS_physics_driver.F90, + ! which is set to .true. + Interstitial%phys_hydrostatic = .true. + ! + ! Reset all other variables + call Interstitial%rad_reset (Model) + call Interstitial%phys_reset (Model) + ! + end subroutine gfs_interstitial_create + + subroutine gfs_interstitial_setup_tracers(Interstitial, Model) + ! + implicit none + ! + class(GFS_interstitial_type) :: Interstitial + type(GFS_control_type), intent(in) :: Model + integer :: n, tracers + logical :: ltest + + !first, initialize the values (in case the values don't get initialized within if statements below) + Interstitial%nvdiff = Model%ntrac + Interstitial%mg3_as_mg2 = .false. + Interstitial%nn = Model%ntrac + 1 + Interstitial%itc = 0 + Interstitial%ntk = 0 + Interstitial%ntkev = 0 + Interstitial%tracers_total = 0 + Interstitial%otspt(:,:) = .true. + Interstitial%otsptflag(:) = .true. + Interstitial%nsamftrac = 0 + Interstitial%ncstrac = 0 + Interstitial%ntcwx = 0 + Interstitial%ntiwx = 0 + Interstitial%ntrwx = 0 + + ! perform aerosol convective transport and PBL diffusion + Interstitial%trans_aero = Model%cplchm .and. Model%trans_trac + + if (Model%imp_physics == Model%imp_physics_thompson) then + if (Model%ltaerosol) then + Interstitial%nvdiff = 12 + else + Interstitial%nvdiff = 9 + endif + if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1 + elseif ( Model%imp_physics == Model%imp_physics_nssl ) then + if (Model%me == Model%master) write(0,*) 'nssl_settings1: nvdiff,ntrac = ', Interstitial%nvdiff, Model%ntrac + + IF ( Model%nssl_hail_on ) THEN + Interstitial%nvdiff = 16 ! Model%ntrac ! 17 + ELSE + Interstitial%nvdiff = 13 ! turn off hail q,N, and volume + ENDIF + ! write(*,*) 'NSSL: nvdiff, ntrac = ',Interstitial%nvdiff, Model%ntrac + if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1 + IF ( Model%nssl_ccn_on ) THEN + Interstitial%nvdiff = Interstitial%nvdiff + 1 + ENDIF + if (Model%me == Model%master) write(0,*) 'nssl_settings2: nvdiff,ntrac = ', Interstitial%nvdiff, Model%ntrac + + elseif (Model%imp_physics == Model%imp_physics_wsm6) then + Interstitial%nvdiff = Model%ntrac -3 + if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1 + elseif (Model%ntclamt > 0) then ! for GFDL MP don't diffuse cloud amount + Interstitial%nvdiff = Model%ntrac - 1 + endif + + if (Model%imp_physics == Model%imp_physics_mg) then + if (abs(Model%fprcp) == 1) then + Interstitial%mg3_as_mg2 = .false. + elseif (Model%fprcp >= 2) then + if(Model%ntgl > 0 .and. (Model%mg_do_graupel .or. Model%mg_do_hail)) then + Interstitial%mg3_as_mg2 = .false. + else ! MG3 code run without graupel/hail i.e. as MG2 + Interstitial%mg3_as_mg2 = .true. + endif + endif + endif + + Interstitial%nscav = Model%ntrac - Model%ncnd + 2 + + if (Interstitial%nvdiff == Model%ntrac) then + Interstitial%ntcwx = Model%ntcw + Interstitial%ntiwx = Model%ntiw + Interstitial%ntrwx = Model%ntrw + else + if (Model%imp_physics == Model%imp_physics_wsm6) then + Interstitial%ntcwx = 2 + Interstitial%ntiwx = 3 + elseif (Model%imp_physics == Model%imp_physics_thompson) then + Interstitial%ntcwx = 2 + Interstitial%ntiwx = 3 + Interstitial%ntrwx = 4 + elseif (Model%imp_physics == Model%imp_physics_nssl) then + Interstitial%ntcwx = 2 + Interstitial%ntiwx = 3 + Interstitial%ntrwx = 4 + elseif (Model%imp_physics == Model%imp_physics_gfdl) then + Interstitial%ntcwx = 2 + Interstitial%ntiwx = 3 + Interstitial%ntrwx = 4 + ! F-A MP scheme + elseif (Model%imp_physics == Model%imp_physics_fer_hires) then + Interstitial%ntcwx = 2 + Interstitial%ntiwx = 3 + Interstitial%ntrwx = 4 + elseif (Model%imp_physics == Model%imp_physics_mg) then + Interstitial%ntcwx = 2 + Interstitial%ntiwx = 3 + Interstitial%ntrwx = 4 + elseif (Model%imp_physics == Model%imp_physics_zhao_carr) then + Interstitial%ntcwx = 2 + endif + endif + + if (Model%cplchm) then + ! Only the following microphysics schemes are supported with coupled chemistry + if (Model%imp_physics == Model%imp_physics_zhao_carr) then + Interstitial%nvdiff = 3 + elseif (Model%imp_physics == Model%imp_physics_mg) then + if (Model%ntgl > 0) then + Interstitial%nvdiff = 12 + else + Interstitial%nvdiff = 10 + endif + elseif (Model%imp_physics == Model%imp_physics_gfdl) then + Interstitial%nvdiff = 7 + elseif (Model%imp_physics == Model%imp_physics_thompson) then + if (Model%ltaerosol) then + Interstitial%nvdiff = 12 + else + Interstitial%nvdiff = 9 + endif + else + write(0,*) "Selected microphysics scheme is not supported when coupling with chemistry" + stop + endif + if (Interstitial%trans_aero) Interstitial%nvdiff = Interstitial%nvdiff + Model%ntchm + if (Model%ntke > 0) Interstitial%nvdiff = Interstitial%nvdiff + 1 ! adding tke to the list + endif + + if (Model%ntke > 0) Interstitial%ntkev = Interstitial%nvdiff + + if (Model%ntiw > 0) then + if (Model%ntclamt > 0) then + Interstitial%nn = Model%ntrac - 2 + else + Interstitial%nn = Model%ntrac - 1 + endif + elseif (Model%ntcw > 0) then + Interstitial%nn = Model%ntrac + else + Interstitial%nn = Model%ntrac + 1 + endif + + if (Model%cscnv .or. Model%satmedmf .or. Model%trans_trac ) then + Interstitial%otspt(:,:) = .true. ! otspt is used only for cscnv + Interstitial%otspt(1:3,:) = .false. ! this is for sp.hum, ice and liquid water + Interstitial%otsptflag(:) = .true. + tracers = 2 + do n=2,Model%ntrac + ltest = ( n /= Model%ntcw .and. n /= Model%ntiw .and. n /= Model%ntclamt .and. & + n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. & + n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc .and. & + n /= Model%nthl .and. n /= Model%nthnc .and. n /= Model%ntgv .and. & + n /= Model%nthv .and. n /= Model%ntccn .and. n /= Model%ntccna ) + Interstitial%otsptflag(n) = ltest + if ( ltest ) then + tracers = tracers + 1 + if (Model%ntke == n ) then + Interstitial%otspt(tracers+1,1) = .false. + Interstitial%ntk = tracers + endif + if (Model%ntlnc == n .or. Model%ntinc == n .or. Model%ntrnc == n .or. Model%ntsnc == n .or. Model%ntgnc == n) & +! if (ntlnc == n .or. ntinc == n .or. ntrnc == n .or. ntsnc == n .or.& +! ntrw == n .or. ntsw == n .or. ntgl == n) & + Interstitial%otspt(tracers+1,1) = .false. + if (Interstitial%trans_aero .and. Model%ntchs == n) Interstitial%itc = tracers + endif + enddo + Interstitial%tracers_total = tracers - 2 + endif ! end if_ras or cfscnv or samf + if (.not. Model%satmedmf .and. .not. Model%trans_trac .and. & + .not. Model%ras .and. .not. Model%do_shoc) then + Interstitial%nsamftrac = 0 + else + Interstitial%nsamftrac = Interstitial%tracers_total + endif + Interstitial%ncstrac = Interstitial%tracers_total + 3 + + end subroutine gfs_interstitial_setup_tracers + + subroutine gfs_interstitial_rad_reset (Interstitial, Model) + ! + implicit none + ! + class(GFS_interstitial_type) :: Interstitial + type(GFS_control_type), intent(in) :: Model + integer :: iGas + ! + Interstitial%aerodp = clear_val + Interstitial%alb1d = clear_val + if (.not. Model%do_RRTMGP) then + Interstitial%alpha = clear_val + end if + Interstitial%cldsa = clear_val + Interstitial%cldtaulw = clear_val + Interstitial%cldtausw = clear_val + Interstitial%clouds = clear_val + Interstitial%de_lgth = clear_val + Interstitial%delr = clear_val + Interstitial%dzlyr = clear_val + Interstitial%faerlw = clear_val + Interstitial%faersw = clear_val + Interstitial%gasvmr = clear_val + Interstitial%htlwc = clear_val + Interstitial%htlw0 = clear_val + Interstitial%htswc = clear_val + Interstitial%htsw0 = clear_val + Interstitial%idxday = 0 + Interstitial%kb = 0 + Interstitial%kd = 0 + Interstitial%kt = 0 + Interstitial%mbota = 0 + Interstitial%mtopa = 0 + Interstitial%nday = 0 + Interstitial%olyr = clear_val + Interstitial%plvl = clear_val + Interstitial%plyr = clear_val + Interstitial%qlyr = clear_val + Interstitial%raddt = clear_val + Interstitial%sfcalb = clear_val + Interstitial%tlvl = clear_val + Interstitial%tlyr = clear_val + Interstitial%tsfa = clear_val + Interstitial%tsfg = clear_val + + ! Interstitials used by both RRTMG and RRTMGP + Interstitial%scmpsw%uvbfc = clear_val + Interstitial%scmpsw%uvbf0 = clear_val + Interstitial%scmpsw%nirbm = clear_val + Interstitial%scmpsw%nirdf = clear_val + Interstitial%scmpsw%visbm = clear_val + Interstitial%scmpsw%visdf = clear_val + if (Model%do_RRTMGP) then + Interstitial%tracer = clear_val + Interstitial%tv_lay = clear_val + Interstitial%relhum = clear_val + Interstitial%qs_lay = clear_val + Interstitial%q_lay = clear_val + Interstitial%deltaZ = clear_val + Interstitial%deltaZc = clear_val + Interstitial%deltaP = clear_val + Interstitial%p_lev = clear_val + Interstitial%p_lay = clear_val + Interstitial%t_lev = clear_val + Interstitial%t_lay = clear_val + Interstitial%cloud_overlap_param = clear_val + Interstitial%precip_overlap_param = clear_val + Interstitial%fluxlwUP_allsky = clear_val + Interstitial%fluxlwDOWN_allsky = clear_val + Interstitial%fluxlwUP_clrsky = clear_val + Interstitial%fluxlwDOWN_clrsky = clear_val + Interstitial%fluxswUP_allsky = clear_val + Interstitial%fluxswDOWN_allsky = clear_val + Interstitial%fluxswUP_clrsky = clear_val + Interstitial%fluxswDOWN_clrsky = clear_val + Interstitial%aerosolslw = clear_val + Interstitial%aerosolssw = clear_val + Interstitial%cld_frac = clear_val + Interstitial%cld_lwp = clear_val + Interstitial%cld_reliq = clear_val + Interstitial%cld_iwp = clear_val + Interstitial%cld_reice = clear_val + Interstitial%cld_swp = clear_val + Interstitial%cld_resnow = clear_val + Interstitial%cld_rwp = clear_val + Interstitial%cld_rerain = clear_val + Interstitial%precip_frac = clear_val + Interstitial%cld_cnv_frac = clear_val + Interstitial%cnv_cloud_overlap_param = clear_val + Interstitial%cld_cnv_lwp = clear_val + Interstitial%cld_cnv_reliq = clear_val + Interstitial%cld_cnv_iwp = clear_val + Interstitial%cld_cnv_reice = clear_val + Interstitial%cld_pbl_lwp = clear_val + Interstitial%cld_pbl_reliq = clear_val + Interstitial%cld_pbl_iwp = clear_val + Interstitial%cld_pbl_reice = clear_val + Interstitial%sfc_emiss_byband = clear_val + Interstitial%sec_diff_byband = clear_val + Interstitial%sfc_alb_nir_dir = clear_val + Interstitial%sfc_alb_nir_dif = clear_val + Interstitial%sfc_alb_uvvis_dir = clear_val + Interstitial%sfc_alb_uvvis_dif = clear_val + Interstitial%toa_src_sw = clear_val + Interstitial%toa_src_lw = clear_val + do iGas=1,Model%nGases + Interstitial%gas_concentrations%concs(iGas)%conc = clear_val + end do + Interstitial%lw_optical_props_clrsky%tau = clear_val + Interstitial%lw_optical_props_aerosol%tau = clear_val + Interstitial%lw_optical_props_clouds%tau = clear_val + Interstitial%lw_optical_props_clouds%ssa = clear_val + Interstitial%lw_optical_props_clouds%g = clear_val + Interstitial%lw_optical_props_precip%tau = clear_val + Interstitial%lw_optical_props_precip%ssa = clear_val + Interstitial%lw_optical_props_precip%g = clear_val + Interstitial%lw_optical_props_cloudsByBand%tau = clear_val + Interstitial%lw_optical_props_cloudsByBand%ssa = clear_val + Interstitial%lw_optical_props_cloudsByBand%g = clear_val + Interstitial%lw_optical_props_precipByBand%tau = clear_val + Interstitial%lw_optical_props_precipByBand%ssa = clear_val + Interstitial%lw_optical_props_precipByBand%g = clear_val + Interstitial%lw_optical_props_cnvcloudsByBand%tau = clear_val + Interstitial%lw_optical_props_cnvcloudsByBand%ssa = clear_val + Interstitial%lw_optical_props_cnvcloudsByBand%g = clear_val + Interstitial%lw_optical_props_MYNNcloudsByBand%tau = clear_val + Interstitial%lw_optical_props_MYNNcloudsByBand%ssa = clear_val + Interstitial%lw_optical_props_MYNNcloudsByBand%g = clear_val + Interstitial%lw_optical_props_cnvclouds%tau = clear_val + Interstitial%lw_optical_props_cnvclouds%ssa = clear_val + Interstitial%lw_optical_props_cnvclouds%g = clear_val + Interstitial%sources%sfc_source = clear_val + Interstitial%sources%lay_source = clear_val + Interstitial%sources%lev_source_inc = clear_val + Interstitial%sources%lev_source_dec = clear_val + Interstitial%sources%sfc_source_Jac = clear_val + Interstitial%flxprf_lw%upfxc = clear_val + Interstitial%flxprf_lw%dnfxc = clear_val + Interstitial%flxprf_lw%upfx0 = clear_val + Interstitial%flxprf_lw%dnfx0 = clear_val + Interstitial%flxprf_sw%upfxc = clear_val + Interstitial%flxprf_sw%dnfxc = clear_val + Interstitial%flxprf_sw%upfx0 = clear_val + Interstitial%flxprf_sw%dnfx0 = clear_val + end if + ! + end subroutine gfs_interstitial_rad_reset + + subroutine gfs_interstitial_phys_reset (Interstitial, Model) + ! + implicit none + ! + class(GFS_interstitial_type) :: Interstitial + type(GFS_control_type), intent(in) :: Model + ! + Interstitial%adjsfculw_land = clear_val + Interstitial%adjsfculw_ice = clear_val + Interstitial%adjsfculw_water = clear_val + Interstitial%adjnirbmd = clear_val + Interstitial%adjnirbmu = clear_val + Interstitial%adjnirdfd = clear_val + Interstitial%adjnirdfu = clear_val + Interstitial%adjvisbmd = clear_val + Interstitial%adjvisbmu = clear_val + Interstitial%adjvisdfu = clear_val + Interstitial%adjvisdfd = clear_val + Interstitial%bexp1d = clear_val + Interstitial%cd = clear_val + Interstitial%cd_ice = Model%huge + Interstitial%cd_land = Model%huge + Interstitial%cd_water = Model%huge + Interstitial%cdq = clear_val + Interstitial%cdq_ice = Model%huge + Interstitial%cdq_land = Model%huge + Interstitial%cdq_water = Model%huge + Interstitial%chh_ice = Model%huge + Interstitial%chh_land = Model%huge + Interstitial%chh_water = Model%huge + Interstitial%cld1d = clear_val + Interstitial%cldf = clear_val + Interstitial%clw = clear_val + Interstitial%clw(:,:,2) = -999.9 + Interstitial%clx = clear_val + Interstitial%cmm_ice = Model%huge + Interstitial%cmm_land = Model%huge + Interstitial%cmm_water = Model%huge + Interstitial%cnvc = clear_val + Interstitial%cnvw = clear_val + Interstitial%ctei_r = clear_val + Interstitial%ctei_rml = clear_val + Interstitial%cumabs = clear_val + Interstitial%dd_mf = clear_val + Interstitial%del = clear_val + Interstitial%del_gz = clear_val + Interstitial%dlength = clear_val + Interstitial%dqdt = clear_val + Interstitial%dqsfc1 = clear_val + Interstitial%drain = clear_val + Interstitial%dt_mf = clear_val + Interstitial%dtdt = clear_val + Interstitial%dtsfc1 = clear_val + Interstitial%dtzm = clear_val + Interstitial%dudt = clear_val + Interstitial%dusfcg = clear_val + Interstitial%dusfc1 = clear_val + Interstitial%dvdftra = clear_val + Interstitial%dvdt = clear_val + Interstitial%dvsfcg = clear_val + Interstitial%dvsfc1 = clear_val + Interstitial%elvmax = clear_val + Interstitial%ep1d = clear_val + Interstitial%ep1d_ice = Model%huge + Interstitial%ep1d_land = Model%huge + Interstitial%ep1d_water = Model%huge + Interstitial%evap_ice = Model%huge + Interstitial%evap_land = Model%huge + Interstitial%evap_water = Model%huge + Interstitial%evbs = clear_val + Interstitial%evcw = clear_val + Interstitial%pah = clear_val + Interstitial%ecan = clear_val + Interstitial%etran = clear_val + Interstitial%edir = clear_val + Interstitial%ffhh_ice = Model%huge + Interstitial%ffhh_land = Model%huge + Interstitial%ffhh_water = Model%huge + Interstitial%fh2 = clear_val + Interstitial%fh2_ice = Model%huge + Interstitial%fh2_land = Model%huge + Interstitial%fh2_water = Model%huge + Interstitial%flag_cice = .false. + Interstitial%flag_guess = .false. + Interstitial%flag_iter = .true. + Interstitial%ffmm_ice = Model%huge + Interstitial%ffmm_land = Model%huge + Interstitial%ffmm_water = Model%huge + Interstitial%fm10 = clear_val + Interstitial%fm10_ice = Model%huge + Interstitial%fm10_land = Model%huge + Interstitial%fm10_water = Model%huge + Interstitial%frland = clear_val + Interstitial%fscav = clear_val + Interstitial%fswtr = clear_val + Interstitial%gabsbdlw = clear_val + Interstitial%gabsbdlw_ice = clear_val + Interstitial%gabsbdlw_land = clear_val + Interstitial%gabsbdlw_water = clear_val + Interstitial%gamma = clear_val + Interstitial%gamq = clear_val + Interstitial%gamt = clear_val + Interstitial%gflx = clear_val + Interstitial%gflx_ice = clear_val + Interstitial%gflx_land = clear_val + Interstitial%gflx_water = clear_val + Interstitial%gwdcu = clear_val + Interstitial%gwdcv = clear_val + Interstitial%zvfun = clear_val + Interstitial%hffac = clear_val + Interstitial%hflxq = clear_val + Interstitial%hflx_ice = Model%huge + Interstitial%hflx_land = Model%huge + Interstitial%hflx_water = Model%huge + Interstitial%dry = .false. + Interstitial%icy = .false. + Interstitial%lake = .false. + Interstitial%use_flake = .false. + Interstitial%ocean = .false. + Interstitial%islmsk = 0 + Interstitial%islmsk_cice = 0 + Interstitial%wet = .false. + Interstitial%kbot = Model%levs + Interstitial%kcnv = 0 + Interstitial%kinver = Model%levs + Interstitial%kpbl = 0 + Interstitial%ktop = 1 + Interstitial%oa4 = clear_val + Interstitial%oc = clear_val + Interstitial%prcpmp = clear_val + Interstitial%prnum = clear_val + Interstitial%qss_ice = Model%huge + Interstitial%qss_land = Model%huge + Interstitial%qss_water = Model%huge + Interstitial%raincd = clear_val + Interstitial%raincs = clear_val + Interstitial%rainmcadj = clear_val + Interstitial%rainp = clear_val + Interstitial%rb = clear_val + Interstitial%rb_ice = Model%huge + Interstitial%rb_land = Model%huge + Interstitial%rb_water = Model%huge + Interstitial%rhc = clear_val + Interstitial%runoff = clear_val + Interstitial%save_q = clear_val + Interstitial%save_t = clear_val + Interstitial%save_tcp = clear_val + Interstitial%save_u = clear_val + Interstitial%save_v = clear_val + Interstitial%sbsno = clear_val + Interstitial%sigma = clear_val + Interstitial%sigmaf = clear_val + Interstitial%sigmafrac = clear_val + Interstitial%sigmatot = clear_val + Interstitial%snowc = clear_val + Interstitial%snohf = clear_val + Interstitial%snowmt = clear_val + Interstitial%stress = clear_val + Interstitial%stress_ice = Model%huge + Interstitial%stress_land = Model%huge + Interstitial%stress_water = Model%huge + Interstitial%theta = clear_val + Interstitial%tprcp_ice = Model%huge + Interstitial%tprcp_land = Model%huge + Interstitial%tprcp_water = Model%huge + Interstitial%trans = clear_val + Interstitial%tseal = clear_val + Interstitial%tsfc_water = Model%huge + Interstitial%tsurf_ice = Model%huge + Interstitial%tsurf_land = Model%huge + Interstitial%tsurf_water = Model%huge + Interstitial%ud_mf = clear_val + Interstitial%uustar_ice = Model%huge + Interstitial%uustar_land = Model%huge + Interstitial%uustar_water = Model%huge + Interstitial%vdftra = clear_val + Interstitial%vegf1d = clear_val + Interstitial%lndp_vgf = clear_val + Interstitial%wcbmax = clear_val + Interstitial%wind = Model%huge + Interstitial%work1 = clear_val + Interstitial%work2 = clear_val + Interstitial%work3 = clear_val + Interstitial%xcosz = clear_val + Interstitial%xlai1d = clear_val + Interstitial%xmu = clear_val + Interstitial%z01d = clear_val + Interstitial%zt1d = clear_val + Interstitial%ztmax_ice = clear_val + Interstitial%ztmax_land = clear_val + Interstitial%ztmax_water = clear_val + +! UGWP common + Interstitial%tau_mtb = clear_val + Interstitial%tau_ogw = clear_val + Interstitial%tau_tofd = clear_val + Interstitial%tau_ngw = clear_val + Interstitial%tau_oss = clear_val + Interstitial%dudt_mtb = clear_val + Interstitial%dudt_tms = clear_val + Interstitial%zmtb = clear_val + Interstitial%zlwb = clear_val + Interstitial%zogw = clear_val + Interstitial%zngw = clear_val + +! CIRES UGWP v1 + if (Model%do_ugwp_v1) then + Interstitial%dudt_ngw = clear_val + Interstitial%dvdt_ngw = clear_val + Interstitial%dtdt_ngw = clear_val + Interstitial%kdis_ngw = clear_val + end if + +!-- GSL drag suite + if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & + Model%gwd_opt==2 .or. Model%gwd_opt==22) then + Interstitial%varss = clear_val + Interstitial%ocss = clear_val + Interstitial%oa4ss = clear_val + Interstitial%clxss = clear_val + end if +! + ! Reset fields that are conditional on physics choices + if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson & + .or. Model%imp_physics == Model%imp_physics_nssl & + ) then + Interstitial%graupelmp = clear_val + Interstitial%icemp = clear_val + Interstitial%rainmp = clear_val + Interstitial%snowmp = clear_val + else if (Model%imp_physics == Model%imp_physics_mg) then + Interstitial%ncgl = clear_val + Interstitial%ncpr = clear_val + Interstitial%ncps = clear_val + Interstitial%qgl = clear_val + Interstitial%qrn = clear_val + Interstitial%qsnw = clear_val + Interstitial%qlcn = clear_val + Interstitial%qicn = clear_val + Interstitial%w_upi = clear_val + Interstitial%cf_upi = clear_val + Interstitial%cnv_mfd = clear_val + Interstitial%cnv_dqldt = clear_val + Interstitial%clcn = clear_val + Interstitial%cnv_fice = clear_val + Interstitial%cnv_ndrop = clear_val + Interstitial%cnv_nice = clear_val + end if + if (Model%do_shoc) then + Interstitial%qrn = clear_val + Interstitial%qsnw = clear_val + ! DH* updated version of shoc from May 22 2019 doesn't use qgl? remove? + Interstitial%qgl = clear_val + ! *DH + Interstitial%ncpi = clear_val + Interstitial%ncpl = clear_val + end if + if (Model%lsm == Model%lsm_noahmp) then + Interstitial%t2mmp = clear_val + Interstitial%q2mp = clear_val + end if + ! + ! Set flag for resetting maximum hourly output fields + Interstitial%max_hourly_reset = mod(Model%kdt-1, nint(Model%avg_max_length/Model%dtp)) == 0 + ! Use same logic in UFS to reset Thompson extended diagnostics + Interstitial%ext_diag_thompson_reset = Interstitial%max_hourly_reset + ! + ! Set flag for resetting radar reflectivity calculation + if (Model%nsradar_reset<0) then + Interstitial%radar_reset = .true. + else + Interstitial%radar_reset = mod(Model%kdt-1, nint(Model%nsradar_reset/Model%dtp)) == 0 + end if + ! + end subroutine gfs_interstitial_phys_reset + +!----------------------- +! GFDL_interstitial_type +!----------------------- + + subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd, jed, npz, ng, & + dt_atmos, p_split, k_split, zvir, p_ref, ak, bk, & + do_ql, do_qi, do_qr, do_qs, do_qg, do_qa, & + kappa, hydrostatic, do_sat_adj, & + delp, delz, area, peln, phis, pkz, pt, & + qvi, qv, ql, qi, qr, qs, qg, qc, q_con, & + nthreads, nwat, ngas, rilist, cpilist, mpirank, mpiroot) ! implicit none ! - class(CCPP_interstitial_type) :: Interstitial + class(GFDL_interstitial_type) :: Interstitial integer, intent(in) :: is integer, intent(in) :: ie integer, intent(in) :: isd @@ -190,7 +1723,7 @@ subroutine interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd, jed Interstitial%ng = ng Interstitial%npz = npz Interstitial%npzp1 = npz+1 - ! Set up links from CCPP_interstitial DDT to ATM DDT + ! Set up links from GFDL_interstitial DDT to ATM DDT Interstitial%delp => delp Interstitial%delz => delz Interstitial%area => area @@ -240,18 +1773,18 @@ subroutine interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd, jed Interstitial%mpiroot = mpiroot ! ! Calculate vertical pressure levels - call interstitital_calculate_pressure_levels(Interstitial, npz, p_ref, ak, bk) + call gfdl_interstitital_calculate_pressure_levels(Interstitial, npz, p_ref, ak, bk) ! ! Reset all other variables call Interstitial%reset() ! - end subroutine interstitial_create + end subroutine gfdl_interstitial_create - subroutine interstitital_calculate_pressure_levels(Interstitial, npz, p_ref, ak, bk) + subroutine gfdl_interstitital_calculate_pressure_levels(Interstitial, npz, p_ref, ak, bk) implicit none - class(CCPP_interstitial_type) :: Interstitial + class(GFDL_interstitial_type) :: Interstitial integer, intent(in) :: npz real(kind_dyn), intent(in) :: p_ref real(kind_dyn), intent(in) :: ak(:) @@ -275,13 +1808,13 @@ subroutine interstitital_calculate_pressure_levels(Interstitial, npz, p_ref, ak, Interstitial%kmp = k if ( Interstitial%pfull(k) > 10.E2 ) exit enddo - end subroutine interstitital_calculate_pressure_levels + end subroutine gfdl_interstitital_calculate_pressure_levels - subroutine interstitial_reset (Interstitial) + subroutine gfdl_interstitial_reset (Interstitial) ! implicit none ! - class(CCPP_interstitial_type) :: Interstitial + class(GFDL_interstitial_type) :: Interstitial ! Interstitial%cappa = 0.0 Interstitial%dtdt = 0.0 @@ -291,13 +1824,13 @@ subroutine interstitial_reset (Interstitial) Interstitial%te0_2d = 0.0 Interstitial%te0 = 0.0 ! - end subroutine interstitial_reset + end subroutine gfdl_interstitial_reset - subroutine interstitial_print(Interstitial) + subroutine gfdl_interstitial_print(Interstitial) ! implicit none ! - class(CCPP_interstitial_type) :: Interstitial + class(GFDL_interstitial_type) :: Interstitial ! ! Print static variables write (0,'(a)') 'Interstitial_print' @@ -359,7 +1892,7 @@ subroutine interstitial_print(Interstitial) write (0,*) 'Interstitial%nthreads = ', Interstitial%nthreads write (0,*) 'Interstitial_print: end' ! - end subroutine interstitial_print + end subroutine gfdl_interstitial_print end module CCPP_typedefs diff --git a/ccpp/data/CCPP_typedefs.meta b/ccpp/data/CCPP_typedefs.meta index 9dfabe739..fcdaa0e8a 100644 --- a/ccpp/data/CCPP_typedefs.meta +++ b/ccpp/data/CCPP_typedefs.meta @@ -1,10 +1,2973 @@ [ccpp-table-properties] - name = CCPP_interstitial_type + name = GFS_interstitial_type type = ddt dependencies = [ccpp-arg-table] - name = CCPP_interstitial_type + name = GFS_interstitial_type + type = ddt +[adjsfculw_water] + standard_name = surface_upwelling_longwave_flux_over_water + long_name = surface upwelling longwave flux at current time over water + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjsfculw_land] + standard_name = surface_upwelling_longwave_flux_over_land + long_name = surface upwelling longwave flux at current time over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjsfculw_ice] + standard_name = surface_upwelling_longwave_flux_over_ice + long_name = surface upwelling longwave flux at current time over ice + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjnirbmd] + standard_name = surface_downwelling_direct_near_infrared_shortwave_flux + long_name = surface downwelling beam near-infrared shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjnirbmu] + standard_name = surface_upwelling_direct_near_infrared_shortwave_flux + long_name = surface upwelling beam near-infrared shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjnirdfd] + standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux + long_name = surface downwelling diffuse near-infrared shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjnirdfu] + standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux + long_name = surface upwelling diffuse near-infrared shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjvisbmd] + standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux + long_name = surface downwelling beam ultraviolet plus visible shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjvisbmu] + standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux + long_name = surface upwelling beam ultraviolet plus visible shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjvisdfu] + standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux + long_name = surface upwelling diffuse ultraviolet plus visible shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[adjvisdfd] + standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux + long_name = surface downwelling diffuse ultraviolet plus visible shortwave flux at current time + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[aerodp] + standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles + long_name = vertical integrated optical depth for various aerosol species + units = none + dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) + type = real + kind = kind_phys +[alb1d] + standard_name = surface_albedo_perturbation + long_name = surface albedo perturbation + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[alpha] + standard_name = cloud_overlap_decorrelation_parameter + long_name = cloud overlap decorrelation parameter for RRTMG (but not for RRTMGP) + units = frac + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[bexp1d] + standard_name = perturbation_of_soil_type_b_parameter + long_name = perturbation of soil type "b" parameter + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cd] + standard_name = surface_drag_coefficient_for_momentum_in_air + long_name = surface exchange coeff for momentum + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cd_water] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_water + long_name = surface exchange coeff for momentum over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cd_land] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_land + long_name = surface exchange coeff for momentum over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cd_ice] + standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice + long_name = surface exchange coeff for momentum over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cdq] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air + long_name = surface exchange coeff heat & moisture + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cdq_water] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water + long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cdq_land] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land + long_name = surface exchange coeff heat & moisture over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cdq_ice] + standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice + long_name = surface exchange coeff heat & moisture over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[chh_water] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water + long_name = thermal exchange coefficient over water + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[chh_land] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land + long_name = thermal exchange coefficient over land + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[chh_ice] + standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice + long_name = thermal exchange coefficient over ice + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cf_upi] + standard_name = convective_cloud_fraction_for_microphysics + long_name = convective cloud fraction for microphysics + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[clcn] + standard_name = convective_cloud_volume_fraction + long_name = convective cloud volume fraction + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[cldf] + standard_name = cloud_area_fraction + long_name = fraction of grid box area in which updrafts occur + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cldsa] + standard_name = cloud_area_fraction_for_radiation + long_name = fraction of clouds for low, middle, high, total and BL + units = frac + dimensions = (horizontal_loop_extent,5) + type = real + kind = kind_phys +[cldtaulw] + standard_name = cloud_optical_depth_layers_at_10mu_band + long_name = approx 10mu band layer cloud optical depth + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[cldtausw] + standard_name = cloud_optical_depth_layers_at_0p55mu_band + long_name = approx .55mu band layer cloud optical depth + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[cld1d] + standard_name = cloud_work_function + long_name = cloud work function + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[clouds(:,:,1)] + standard_name = total_cloud_fraction + long_name = layer total cloud fraction + units = frac + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,2)] + standard_name = cloud_liquid_water_path + long_name = layer cloud liquid water path + units = g m-2 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,3)] + standard_name = mean_effective_radius_for_liquid_cloud + long_name = mean effective radius for liquid cloud + units = um + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,4)] + standard_name = cloud_ice_water_path + long_name = layer cloud ice water path + units = g m-2 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,5)] + standard_name = mean_effective_radius_for_ice_cloud + long_name = mean effective radius for ice cloud + units = um + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,6)] + standard_name = cloud_rain_water_path + long_name = cloud rain water path + units = g m-2 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,7)] + standard_name = mean_effective_radius_for_rain_drop + long_name = mean effective radius for rain drop + units = um + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,8)] + standard_name = cloud_snow_water_path + long_name = cloud snow water path + units = g m-2 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clouds(:,:,9)] + standard_name = mean_effective_radius_for_snow_flake + long_name = mean effective radius for snow flake + units = um + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[clw] + standard_name = convective_transportable_tracers + long_name = array to contain cloud water and other convective trans. tracers + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) + type = real + kind = kind_phys +[clw(:,:,1)] + standard_name = ice_water_mixing_ratio_convective_transport_tracer + long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[clw(:,:,2)] + standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer + long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[clw(:,:,index_for_turbulent_kinetic_energy_convective_transport_tracer)] + standard_name = turbulent_kinetic_energy_convective_transport_tracer + long_name = turbulent kinetic energy in the convectively transported tracer array + units = m2 s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[clx] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height + long_name = frac. of grid box with by subgrid height_above_mean_sea_level higher than critical height + units = frac + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys +[clxss] + standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale + long_name = frac. of grid box with by subgrid height_above_mean_sea_level higher than critical height small scale + units = frac + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys + active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) +[cmm_water] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water + long_name = momentum exchange coefficient over water + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cmm_land] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land + long_name = momentum exchange coefficient over land + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cmm_ice] + standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ice + long_name = momentum exchange coefficient over ice + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cnv_dqldt] + standard_name = tendency_of_cloud_water_due_to_convective_microphysics + long_name = tendency of cloud water due to convective microphysics + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[cnv_fice] + standard_name = ice_fraction_in_convective_tower + long_name = ice fraction in convective tower + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[cnv_mfd] + standard_name = detrained_mass_flux + long_name = detrained mass flux + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[cnv_ndrop] + standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment + long_name = droplet number concentration in convective detrainment + units = m-3 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[cnv_nice] + standard_name = number_concentration_of_ice_crystals_for_detrainment + long_name = crystal number concentration in convective detrainment + units = m-3 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[cnvc] + standard_name = convective_cloud_cover + long_name = convective cloud cover + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[cnvw] + standard_name = convective_cloud_water_mixing_ratio + long_name = moist convective cloud water mixing ratio + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[ctei_r] + standard_name = cloud_top_entrainment_instability_value + long_name = cloud top entrainment instability value + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ctei_rml] + standard_name = grid_sensitive_critical_cloud_top_entrainment_instability_criteria + long_name = grid sensitive critical cloud top entrainment instability criteria + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[cumabs] + standard_name = maximum_column_heating_rate + long_name = maximum heating rate in column + units = K s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dd_mf] + standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux + long_name = (downdraft mass flux) * delt + units = kg m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[de_lgth] + standard_name = cloud_decorrelation_length + long_name = cloud decorrelation length + units = km + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[del] + standard_name = air_pressure_difference_between_midlayers + long_name = air pressure difference between midlayers + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[del_gz] + standard_name = geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature + long_name = difference between mid-layer geopotentials divided by mid-layer virtual temperature + units = m2 s-2 K-1 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys +[delr] + standard_name = layer_pressure_thickness_for_radiation + long_name = layer pressure thickness on radiation levels + units = hPa + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[dlength] + standard_name = characteristic_grid_length_scale + long_name = representative horizontal length scale of grid box + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dqdt] + standard_name = process_split_cumulative_tendency_of_tracers + long_name = updated tendency of the tracers due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) + type = real + kind = kind_phys +[dqdt(:,:,index_of_specific_humidity_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_specific_humidity + long_name = water vapor specific humidity tendency due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_cloud_liquid_water_mixing_ratio + long_name = cloud condensed water mixing ratio tendency due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_cloud_ice_mixing_ratio + long_name = cloud condensed water mixing ratio tendency due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_ozone_mixing_ratio_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_ozone_mixing_ratio + long_name = ozone mixing ratio tendency due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_cloud_liquid_water_particles_in_air + long_name = number concentration of cloud droplets (liquid) tendency due to model physics + units = kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array > 0) +[dqdt(:,:,index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_cloud_ice_water_crystals_in_air + long_name = number concentration of ice tendency due to model physics + units = kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_hygroscopic_aerosols + long_name = number concentration of water-friendly aerosols tendency due to model physics + units = kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array > 0) +[dqdt(:,:,index_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols + long_name = number concentration of ice-friendly aerosols tendency due to model physics + units = kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (index_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_in_tracer_concentration_array > 0) +[dqdt(:,:,index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array)] + standard_name = tendency_of_cloud_condensation_nuclei_number_concentration_due_to_model_physics + long_name = number concentration of cloud condensation nuclei tendency due to model physics + units = kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array > 0 ) +[dqdt(:,:,index_of_rain_mixing_ratio_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_rain_mixing_ratio + long_name = ratio of mass of rain water tendency to mass of dry air plus vapor (without condensates) due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_snow_mixing_ratio_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_snow_mixing_ratio + long_name = ratio of mass of snow water tendency to mass of dry air plus vapor (without condensates) due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_graupel_mixing_ratio_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_graupel_mixing_ratio + long_name = ratio of mass of graupel tendency to mass of dry air plus vapor (without condensates) due to model physics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqdt(:,:,index_of_turbulent_kinetic_energy_in_tracer_concentration_array)] + standard_name = process_split_cumulative_tendency_of_turbulent_kinetic_energy + long_name = turbulent kinetic energy tendency due to model physics + units = J s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dqsfc1] + standard_name = instantaneous_surface_upward_latent_heat_flux + long_name = surface upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[drain] + standard_name = subsurface_runoff_flux + long_name = subsurface runoff flux + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dtdt] + standard_name = process_split_cumulative_tendency_of_air_temperature + long_name = air temperature tendency due to model physics + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dtsfc1] + standard_name = instantaneous_surface_upward_sensible_heat_flux + long_name = surface upward sensible heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dtzm] + standard_name = mean_change_over_depth_in_sea_water_temperature + long_name = mean of dT(z) (zsea1 to zsea2) + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dt_mf] + standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux + long_name = (detrainment mass flux) * delt + units = kg m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dudt] + standard_name = process_split_cumulative_tendency_of_x_wind + long_name = zonal wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dusfcg] + standard_name = instantaneous_x_stress_due_to_gravity_wave_drag + long_name = zonal surface stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dusfc1] + standard_name = instantaneous_surface_x_momentum_flux + long_name = x momentum flux + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dvdftra] + standard_name = tendency_of_vertically_diffused_tracer_concentration + long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) + type = real + kind = kind_phys +[dvdt] + standard_name = process_split_cumulative_tendency_of_y_wind + long_name = meridional wind tendency due to model physics + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dvsfcg] + standard_name = instantaneous_y_stress_due_to_gravity_wave_drag + long_name = meridional surface stress due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dvsfc1] + standard_name = instantaneous_surface_y_momentum_flux + long_name = y momentum flux + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dzlyr] + standard_name = layer_thickness_for_radiation + long_name = layer thickness on radiation levels + units = km + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[elvmax] + standard_name = maximum_subgrid_orography + long_name = maximum of subgrid height_above_mean_sea_level + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ep1d] + standard_name = surface_upward_potential_latent_heat_flux + long_name = surface upward potential latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ep1d_water] + standard_name = surface_upward_potential_latent_heat_flux_over_water + long_name = surface upward potential latent heat flux over water + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ep1d_land] + standard_name = surface_upward_potential_latent_heat_flux_over_land + long_name = surface upward potential latent heat flux over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ep1d_ice] + standard_name = surface_upward_potential_latent_heat_flux_over_ice + long_name = surface upward potential latent heat flux over ice + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[evap_water] + standard_name = kinematic_surface_upward_latent_heat_flux_over_water + long_name = kinematic surface upward latent heat flux over water + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[evap_land] + standard_name = kinematic_surface_upward_latent_heat_flux_over_land + long_name = kinematic surface upward latent heat flux over land + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[evap_ice] + standard_name = kinematic_surface_upward_latent_heat_flux_over_ice + long_name = kinematic surface upward latent heat flux over ice + units = kg kg-1 m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[evbs] + standard_name = soil_upward_latent_heat_flux + long_name = soil upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[evcw] + standard_name = canopy_upward_latent_heat_flux + long_name = canopy upward latent heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[pah] + standard_name = total_precipitation_advected_heat + long_name = precipitation advected heat - total + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ecan] + standard_name = evaporation_of_intercepted_water + long_name = evaporation of intercepted water + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[etran] + standard_name = transpiration_rate + long_name = transpiration rate + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[edir] + standard_name = soil_surface_evaporation_rate + long_name = soil surface evaporation rate + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[faerlw] + standard_name = aerosol_optical_properties_for_longwave_bands_01_16 + long_name = aerosol optical properties for longwave bands 01-16 + units = mixed + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) + type = real + kind = kind_phys +[faerlw(:,:,:,1)] + standard_name = aerosol_optical_depth_for_longwave_bands_01_16 + long_name = aerosol optical depth for longwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys +[faerlw(:,:,:,2)] + standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 + long_name = aerosol single scattering albedo for longwave bands 01-16 + units = frac + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys +[faerlw(:,:,:,3)] + standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 + long_name = aerosol asymmetry parameter for longwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) + type = real + kind = kind_phys +[faersw] + standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 + long_name = aerosol optical properties for shortwave bands 01-16 + units = mixed + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) + type = real + kind = kind_phys +[faersw(:,:,:,1)] + standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 + long_name = aerosol optical depth for shortwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys +[faersw(:,:,:,2)] + standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 + long_name = aerosol single scattering albedo for shortwave bands 01-16 + units = frac + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys +[faersw(:,:,:,3)] + standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 + long_name = aerosol asymmetry parameter for shortwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) + type = real + kind = kind_phys +[ffhh_water] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_water + long_name = Monin-Obukhov similarity function for heat over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ffhh_land] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_land + long_name = Monin-Obukhov similarity function for heat over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ffhh_ice] + standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice + long_name = Monin-Obukhov similarity function for heat over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fh2] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m + long_name = Monin-Obukhov similarity parameter for heat at 2m + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fh2_water] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_water + long_name = Monin-Obukhov similarity parameter for heat at 2m over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fh2_land] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land + long_name = Monin-Obukhov similarity parameter for heat at 2m over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fh2_ice] + standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice + long_name = Monin-Obukhov similarity parameter for heat at 2m over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[flag_cice] + standard_name = flag_for_cice + long_name = flag for cice + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[flag_guess] + standard_name = flag_for_guess_run + long_name = flag for guess run + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[flag_iter] + standard_name = flag_for_iteration + long_name = flag for iteration + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[ffmm_water] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water + long_name = Monin-Obukhov similarity function for momentum over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ffmm_land] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land + long_name = Monin-Obukhov similarity function for momentum over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ffmm_ice] + standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice + long_name = Monin-Obukhov similarity function for momentum over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fm10] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m + long_name = Monin-Obukhov similarity parameter for momentum at 10m + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fm10_water] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water + long_name = Monin-Obukhov similarity parameter for momentum at 10m over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fm10_land] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land + long_name = Monin-Obukhov similarity parameter for momentum at 10m over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fm10_ice] + standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice + long_name = Monin-Obukhov similarity parameter for momentum at 10m over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[frain] + standard_name = dynamics_to_physics_timestep_ratio + long_name = ratio of dynamics timestep to physics timestep + units = none + dimensions = () + type = real + kind = kind_phys +[frland] + standard_name = land_area_fraction_for_microphysics + long_name = land area fraction used in microphysics schemes + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[fscav] + standard_name = fraction_of_tracer_scavenged + long_name = fraction of the tracer (aerosols) that is scavenged by convection + units = km-1 + dimensions = (number_of_tracers_scavenged) + type = real + kind = kind_phys +[fswtr] + standard_name = fraction_of_cloud_top_water_scavenged + long_name = fraction of the tracer (cloud top water) that is scavenged by convection + units = km-1 + dimensions = (number_of_tracers_scavenged) + type = real + kind = kind_phys +[gabsbdlw] + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground + long_name = total sky surface downward longwave flux absorbed by the ground + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gabsbdlw_water] + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_water + long_name = total sky surface downward longwave flux absorbed by the ground over water + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gabsbdlw_land] + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land + long_name = total sky surface downward longwave flux absorbed by the ground over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gabsbdlw_ice] + standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ice + long_name = total sky surface downward longwave flux absorbed by the ground over ice + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gamma] + standard_name = anisotropy_of_subgrid_orography + long_name = anisotropy of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gamq] + standard_name = countergradient_mixing_term_for_water_vapor + long_name = countergradient mixing term for water vapor + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gamt] + standard_name = countergradient_mixing_term_for_temperature + long_name = countergradient mixing term for temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gasvmr(:,:,1)] + standard_name = volume_mixing_ratio_of_co2 + long_name = volume mixing ratio co2 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,2)] + standard_name = volume_mixing_ratio_of_n2o + long_name = volume mixing ratio no2 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,3)] + standard_name = volume_mixing_ratio_of_ch4 + long_name = volume mixing ratio ch4 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,4)] + standard_name = volume_mixing_ratio_of_o2 + long_name = volume mixing ratio o2 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,5)] + standard_name = volume_mixing_ratio_of_co + long_name = volume mixing ratio co + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,6)] + standard_name = volume_mixing_ratio_of_cfc11 + long_name = volume mixing ratio cfc11 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,7)] + standard_name = volume_mixing_ratio_of_cfc12 + long_name = volume mixing ratio cfc12 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,8)] + standard_name = volume_mixing_ratio_of_cfc22 + long_name = volume mixing ratio cfc22 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,9)] + standard_name = volume_mixing_ratio_of_ccl4 + long_name = volume mixing ratio ccl4 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gasvmr(:,:,10)] + standard_name = volume_mixing_ratio_of_cfc113 + long_name = volume mixing ratio cfc113 + units = m3 m-3 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[gflx] + standard_name = upward_heat_flux_in_soil + long_name = soil heat flux + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gflx_water] + standard_name = upward_heat_flux_in_soil_over_water + long_name = soil heat flux over water + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gflx_land] + standard_name = upward_heat_flux_in_soil_over_land + long_name = soil heat flux over land + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[gflx_ice] + standard_name = upward_heat_flux_in_soil_over_ice + long_name = soil heat flux over ice + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[graupelmp] + standard_name = lwe_thickness_of_graupel_amount + long_name = explicit graupel fall on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme) +[gwdcu] + standard_name = tendency_of_x_wind_due_to_convective_gravity_wave_drag + long_name = zonal wind tendency due to convective gravity wave drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[gwdcv] + standard_name = tendency_of_y_wind_due_to_convective_gravity_wave_drag + long_name = meridional wind tendency due to convective gravity wave drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[zvfun] + standard_name = function_of_surface_roughness_length_and_green_vegetation_fraction + long_name = function of surface roughness length and green vegetation fraction + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[hffac] + standard_name = surface_upward_sensible_heat_flux_reduction_factor + long_name = surface upward sensible heat flux reduction factor from canopy heat storage + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[hflxq] + standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation + long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[hflx_water] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_water + long_name = kinematic surface upward sensible heat flux over water + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[hflx_land] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_land + long_name = kinematic surface upward sensible heat flux over land + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[hflx_ice] + standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice + long_name = kinematic surface upward sensible heat flux over ice + units = K m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[htlwc] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels + long_name = total sky heating rate due to longwave radiation + units = K s-1 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[htlw0] + standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels + long_name = clear sky heating rate due to longwave radiation + units = K s-1 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[htswc] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels + long_name = total sky heating rate due to shortwave radiation + units = K s-1 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[htsw0] + standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels + long_name = clear sky heating rates due to shortwave radiation + units = K s-1 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[icemp] + standard_name = lwe_thickness_of_ice_amount + long_name = explicit ice fall on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme) +[dry] + standard_name = flag_nonzero_land_surface_fraction + long_name = flag indicating presence of some land surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[idxday] + standard_name = daytime_points + long_name = daytime points + units = index + dimensions = (horizontal_loop_extent) + type = integer +[icy] + standard_name = flag_nonzero_sea_ice_surface_fraction + long_name = flag indicating presence of some sea ice surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[lake] + standard_name = flag_nonzero_lake_surface_fraction + long_name = flag indicating presence of some lake surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[use_flake] + standard_name = flag_for_using_flake + long_name = flag indicating lake points using flake model + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[ocean] + standard_name = flag_nonzero_ocean_surface_fraction + long_name = flag indicating presence of some ocean surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[ipr] + standard_name = horizontal_index_of_printed_column + long_name = horizontal index of printed column + units = index + dimensions = () + type = integer +[islmsk] + standard_name = sea_land_ice_mask + long_name = sea/land/ice mask (=0/1/2) + units = flag + dimensions = (horizontal_loop_extent) + type = integer +[islmsk_cice] + standard_name = sea_land_ice_mask_cice + long_name = sea/land/ice mask cice (=0/1/2) + units = flag + dimensions = (horizontal_loop_extent) + type = integer +[itc] + standard_name = index_of_first_chemical_tracer_for_convection + long_name = index of first chemical tracer transported/scavenged by convection + units = index + dimensions = () + type = integer +[wet] + standard_name = flag_nonzero_wet_surface_fraction + long_name = flag indicating presence of some ocean or lake surface area fraction + units = flag + dimensions = (horizontal_loop_extent) + type = logical +[kb] + standard_name = vertical_index_difference_between_layer_and_lower_bound + long_name = vertical index difference between layer and lower bound + units = index + dimensions = () + type = integer +[kbot] + standard_name = vertical_index_at_cloud_base + long_name = vertical index at cloud base + units = index + dimensions = (horizontal_loop_extent) + type = integer +[kcnv] + standard_name = flag_deep_convection + long_name = flag indicating whether convection occurs in column (0 or 1) + units = flag + dimensions = (horizontal_loop_extent) + type = integer +[kd] + standard_name = vertical_index_difference_between_inout_and_local + long_name = vertical index difference between in/out and local + units = index + dimensions = () + type = integer +[kinver] + standard_name = index_of_highest_temperature_inversion + long_name = index of highest temperature inversion + units = index + dimensions = (horizontal_loop_extent) + type = integer +[kpbl] + standard_name = vertical_index_at_top_of_atmosphere_boundary_layer + long_name = vertical index at top atmospheric boundary layer + units = index + dimensions = (horizontal_loop_extent) + type = integer +[kt] + standard_name = vertical_index_difference_between_layer_and_upper_bound + long_name = vertical index difference between layer and upper bound + units = index + dimensions = () + type = integer +[ktop] + standard_name = vertical_index_at_cloud_top + long_name = vertical index at cloud top + units = index + dimensions = (horizontal_loop_extent) + type = integer +[latidxprnt] + standard_name = latitude_index_in_debug_printouts + long_name = latitude index in debug printouts + units = index + dimensions = () + type = integer +[levi] + standard_name = vertical_interface_dimension_interstitial + long_name = vertical interface dimension + units = count + dimensions = () + type = integer +[lmk] + standard_name = adjusted_vertical_layer_dimension_for_radiation + long_name = adjusted number of vertical layers for radiation + units = count + dimensions = () + type = integer +[lmp] + standard_name = adjusted_vertical_level_dimension_for_radiation + long_name = adjusted number of vertical levels for radiation + units = count + dimensions = () + type = integer +[mbota] + standard_name = model_layer_number_at_cloud_base + long_name = vertical indices for low, middle and high cloud bases + units = index + dimensions = (horizontal_loop_extent,3) + type = integer +[mg3_as_mg2] + standard_name = flag_mg3_as_mg2 + long_name = flag for controlling prep for Morrison-Gettelman microphysics + units = flag + dimensions = () + type = logical +[mtopa] + standard_name = model_layer_number_at_cloud_top + long_name = vertical indices for low, middle and high cloud tops + units = index + dimensions = (horizontal_loop_extent,3) + type = integer +[nbdlw] + standard_name = number_of_aerosol_bands_for_longwave_radiation + long_name = number of aerosol bands for longwave radiation + units = count + dimensions = () + type = integer +[nbdsw] + standard_name = number_of_aerosol_bands_for_shortwave_radiation + long_name = number of aerosol bands for shortwave radiation + units = count + dimensions = () + type = integer +[ncgl] + standard_name = local_graupel_number_concentration + long_name = number concentration of graupel local to physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[ncpi] + standard_name = local_ice_number_concentration + long_name = number concentration of ice local to physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_shoc) +[ncpl] + standard_name = local_condesed_water_number_concentration + long_name = number concentration of condensed water local to physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_shoc) +[ncpr] + standard_name = local_rain_number_concentration + long_name = number concentration of rain local to physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[ncps] + standard_name = local_snow_number_concentration + long_name = number concentration of snow local to physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[ncstrac] + standard_name = number_of_tracers_for_CS + long_name = number of convectively transported tracers in Chikira-Sugiyama deep convection scheme + units = count + dimensions = () + type = integer +[nday] + standard_name = daytime_points_dimension + long_name = daytime points dimension + units = count + dimensions = () + type = integer +[nf_aelw] + standard_name = number_of_aerosol_output_fields_for_longwave_radiation + long_name = number of aerosol output fields for longwave radiation + units = count + dimensions = () + type = integer +[nf_aesw] + standard_name = number_of_aerosol_output_fields_for_shortwave_radiation + long_name = number of aerosol output fields for shortwave radiation + units = count + dimensions = () + type = integer +[nn] + standard_name = number_of_tracers_for_convective_transport + long_name = number of tracers for convective transport + units = count + dimensions = () + type = integer +[nsamftrac] + standard_name = number_of_tracers_for_samf + long_name = number of tracers for scale-aware mass flux schemes + units = count + dimensions = () + type = integer +[nscav] + standard_name = number_of_tracers_scavenged + long_name = number of tracers scavenged + units = count + dimensions = () + type = integer +[nspc1] + standard_name = number_of_species_for_aerosol_optical_depth + long_name = number of species for output aerosol optical depth plus total + units = count + dimensions = () + type = integer +[ntcwx] + standard_name = index_for_liquid_cloud_condensate_vertical_diffusion_tracer + long_name = index for liquid cloud condensate in the vertically diffused tracer array + units = index + dimensions = () + type = integer +[ntiwx] + standard_name = index_for_ice_cloud_condensate_vertical_diffusion_tracer + long_name = index for ice cloud condensate in the vertically diffused tracer array + units = index + dimensions = () + type = integer +[ntrwx] + standard_name = index_for_rain_water_vertical_diffusion_tracer + long_name = tracer index for rain water in the vertically diffused tracer array + units = index + dimensions = () + type = integer +[ntk] + standard_name = index_for_turbulent_kinetic_energy_convective_transport_tracer + long_name = index for turbulent kinetic energy in the convectively transported tracer array + units = index + dimensions = () + type = integer +[ntkev] + standard_name = index_for_turbulent_kinetic_energy_vertical_diffusion_tracer + long_name = index for turbulent kinetic energy in the vertically diffused tracer array + units = index + dimensions = () + type = integer +[nvdiff] + standard_name = number_of_vertical_diffusion_tracers + long_name = number of tracers to diffuse vertically + units = count + dimensions = () + type = integer +[oa4] + standard_name = asymmetry_of_subgrid_orography + long_name = asymmetry of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys +[varss] + standard_name = standard_deviation_of_subgrid_orography_small_scale + long_name = standard deviation of subgrid height_above_mean_sea_level small scale + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) +[oa4ss] + standard_name = asymmetry_of_subgrid_orography_small_scale + long_name = asymmetry of subgrid height_above_mean_sea_level small scale + units = none + dimensions = (horizontal_loop_extent,4) + type = real + kind = kind_phys + active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) +[oc] + standard_name = convexity_of_subgrid_orography + long_name = convexity of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ocss] + standard_name = convexity_of_subgrid_orography_small_scale + long_name = convexity of subgrid height_above_mean_sea_level small scale + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) +[olyr] + standard_name = ozone_concentration_at_layer_for_radiation + long_name = ozone concentration layer + units = kg kg-1 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[otspt] + standard_name = flag_convective_tracer_transport + long_name = flag to enable tracer transport by updrafts/downdrafts[(:,1)] or subsidence [(:,2)] + units = flag + dimensions = (number_of_tracers_plus_one,2) + type = logical +[otsptflag] + standard_name = flag_convective_tracer_transport_interstitial + long_name = flag for interstitial tracer transport + units = flag + dimensions = (number_of_tracers) + type = logical +[oz_coeffp5] + standard_name = number_of_coefficients_in_ozone_forcing_data_plus_five + long_name = number of coefficients in ozone forcing data plus five + units = index + dimensions = () + type = integer +[phys_hydrostatic] + standard_name = flag_for_hydrostatic_heating_from_physics + long_name = flag for use of hydrostatic heating in physics + units = flag + dimensions = () + type = logical +[plvl] + standard_name = air_pressure_at_interface_for_radiation_in_hPa + long_name = air pressure at vertical interface for radiation calculation + units = hPa + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) + type = real + kind = kind_phys +[plyr] + standard_name = air_pressure_at_layer_for_radiation_in_hPa + long_name = air pressure at vertical layer for radiation calculation + units = hPa + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[prnum] + standard_name = prandtl_number + long_name = turbulent Prandtl number + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[q2mp] + standard_name = specific_humidity_at_2m_from_noahmp + long_name = 2 meter specific humidity from noahmp + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) +[qgl] + standard_name = local_graupel_mixing_ratio + long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) +[qicn] + standard_name = mass_fraction_of_convective_cloud_ice + long_name = mass fraction of convective cloud ice water + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[qlcn] + standard_name = mass_fraction_of_convective_cloud_liquid_water + long_name = mass fraction of convective cloud liquid water + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[qlyr] + standard_name = water_vapor_specific_humidity_at_layer_for_radiation + long_name = specific humidity layer + units = kg kg-1 + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[qrn] + standard_name = local_rain_water_mixing_ratio + long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) +[qsnw] + standard_name = local_snow_water_mixing_ratio + long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) +[prcpmp] + standard_name = lwe_thickness_of_explicit_precipitation_amount + long_name = explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[qss_water] + standard_name = surface_specific_humidity_over_water + long_name = surface air saturation specific humidity over water + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[qss_land] + standard_name = surface_specific_humidity_over_land + long_name = surface air saturation specific humidity over land + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[qss_ice] + standard_name = surface_specific_humidity_over_ice + long_name = surface air saturation specific humidity over ice + units = kg kg-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[radar_reset] + standard_name = flag_for_resetting_radar_reflectivity_calculation + long_name = flag for resetting radar reflectivity calculation + units = flag + dimensions = () + type = logical +[raddt] + standard_name = time_step_for_radiation + long_name = radiation time step + units = s + dimensions = () + type = real + kind = kind_phys +[raincd] + standard_name = lwe_thickness_of_deep_convective_precipitation_amount + long_name = deep convective rainfall amount on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[raincs] + standard_name = lwe_thickness_of_shallow_convective_precipitation_amount + long_name = shallow convective rainfall amount on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[rainmcadj] + standard_name = lwe_thickness_of_moist_convective_adj_precipitation_amount + long_name = adjusted moist convective rainfall amount on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[rainmp] + standard_name = lwe_thickness_of_explicit_rain_amount + long_name = explicit rain on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme) +[rainp] + standard_name = tendency_of_rain_water_mixing_ratio_due_to_microphysics + long_name = tendency of rain water mixing ratio due to microphysics + units = kg kg-1 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[rb] + standard_name = bulk_richardson_number_at_lowest_model_level + long_name = bulk Richardson number at the surface + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[rb_water] + standard_name = bulk_richardson_number_at_lowest_model_level_over_water + long_name = bulk Richardson number at the surface over water + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[rb_land] + standard_name = bulk_richardson_number_at_lowest_model_level_over_land + long_name = bulk Richardson number at the surface over land + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[rb_ice] + standard_name = bulk_richardson_number_at_lowest_model_level_over_ice + long_name = bulk Richardson number at the surface over ice + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[max_hourly_reset] + standard_name = flag_reset_maximum_hourly_fields + long_name = flag for resetting maximum hourly fields + units = flag + dimensions = () + type = logical +[ext_diag_thompson_reset] + standard_name = flag_reset_extended_diagnostics_output_arrays_from_thompson_microphysics + long_name = flag for resetting extended diagnostics output arrays from thompson microphysics + units = flag + dimensions = () + type = logical +[rhc] + standard_name = critical_relative_humidity + long_name = critical relative humidity + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[rho1] + standard_name = air_density_at_lowest_model_layer + long_name = air density at lowest model layer + units = kg m-3 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[runoff] + standard_name = surface_runoff_flux + long_name = surface runoff flux + units = kg m-2 s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[save_q(:,:,index_of_ozone_mixing_ratio_in_tracer_concentration_array)] + standard_name = ozone_mixing_ratio_save + long_name = ozone mixing ratio before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_of_turbulent_kinetic_energy_in_tracer_concentration_array)] + standard_name = turbulent_kinetic_energy_save + long_name = turbulent kinetic energy before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array)] + standard_name = cloud_condensed_water_mixing_ratio_save + long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_of_snow_mixing_ratio_in_tracer_concentration_array)] + standard_name = snow_mixing_ratio_save + long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array)] + standard_name = ice_water_mixing_ratio_save + long_name = cloud ice water mixing ratio before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_of_specific_humidity_in_tracer_concentration_array)] + standard_name = water_vapor_specific_humidity_save + long_name = water vapor specific humidity before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array)] + standard_name = liquid_cloud_number_concentration_save + long_name = liquid cloud number concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q(:,:,index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array)] + standard_name = ice_cloud_number_concentration_save + long_name = ice cloud number concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_q] + standard_name = tracer_concentration_save + long_name = tracer concentration before entering a physics scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) + type = real + kind = kind_phys +[save_t] + standard_name = air_temperature_save + long_name = air temperature before entering a physics scheme + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_tcp] + standard_name = air_temperature_save_from_convective_parameterization + long_name = air temperature after cumulus parameterization + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_u] + standard_name = x_wind_save + long_name = x-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[save_v] + standard_name = y_wind_save + long_name = y-wind before entering a physics scheme + units = m s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[sbsno] + standard_name = snow_deposition_sublimation_upward_latent_heat_flux + long_name = latent heat flux from snow depo/subl + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[scmpsw] + standard_name = components_of_surface_downward_shortwave_fluxes + long_name = derived type for special components of surface downward shortwave fluxes + units = W m-2 + dimensions = (horizontal_loop_extent) + type = cmpfsw_type +[sfcalb] + standard_name = surface_albedo_components + long_name = surface albedo IR/UV/VIS components + units = frac + dimensions = (horizontal_loop_extent,number_of_components_for_surface_albedo) + type = real + kind = kind_phys +[sfcalb(:,1)] + standard_name = surface_albedo_due_to_near_IR_direct + long_name = surface albedo due to near IR direct beam + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[sfcalb(:,2)] + standard_name = surface_albedo_due_to_near_IR_diffused + long_name = surface albedo due to near IR diffused beam + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[sfcalb(:,3)] + standard_name = surface_albedo_due_to_UV_and_VIS_direct + long_name = surface albedo due to UV+VIS direct beam + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[sfcalb(:,4)] + standard_name = surface_albedo_due_to_UV_and_VIS_diffused + long_name = surface albedo due to UV+VIS diffused beam + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[sigma] + standard_name = slope_of_subgrid_orography + long_name = slope of subgrid height_above_mean_sea_level + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[sigmaf] + standard_name = bounded_vegetation_area_fraction + long_name = areal fractional cover of green vegetation bounded on the bottom + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[sigmafrac] + standard_name = convective_updraft_area_fraction + long_name = convective updraft area fraction + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[sigmatot] + standard_name = convective_updraft_area_fraction_at_model_interfaces + long_name = convective updraft area fraction at model interfaces + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[skip_macro] + standard_name = flag_skip_macro + long_name = flag to skip cloud macrophysics in Morrison scheme + units = flag + dimensions = () + type = logical +[snowc] + standard_name = surface_snow_area_fraction + long_name = surface snow area fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[snohf] + standard_name = snow_freezing_rain_upward_latent_heat_flux + long_name = latent heat flux due to snow and frz rain + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[snowmp] + standard_name = lwe_thickness_of_snow_amount + long_name = explicit snow fall on physics timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_nssl_microphysics_scheme) +[snowmt] + standard_name = surface_snow_melt + long_name = snow melt during timestep + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[stress] + standard_name = surface_wind_stress + long_name = surface wind stress + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[stress_water] + standard_name = surface_wind_stress_over_water + long_name = surface wind stress over water + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[stress_land] + standard_name = surface_wind_stress_over_land + long_name = surface wind stress over land + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[stress_ice] + standard_name = surface_wind_stress_over_ice + long_name = surface wind stress over ice + units = m2 s-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[t2mmp] + standard_name = temperature_at_2m_from_noahmp + long_name = 2 meter temperature from noahmp + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys + active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) +[theta] + standard_name = angle_from_east_of_maximum_subgrid_orographic_variations + long_name = angle with_respect to east of maximum subgrid orographic variations + units = degree + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tlvl] + standard_name = air_temperature_at_interface_for_radiation + long_name = air temperature at vertical interface for radiation calculation + units = K + dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) + type = real + kind = kind_phys +[tlyr] + standard_name = air_temperature_at_layer_for_radiation + long_name = air temperature at vertical layer for radiation calculation + units = K + dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) + type = real + kind = kind_phys +[tprcp_water] + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_water + long_name = total precipitation amount in each time step over water + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tprcp_land] + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land + long_name = total precipitation amount in each time step over land + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tprcp_ice] + standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice + long_name = total precipitation amount in each time step over ice + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tracers_start_index] + standard_name = start_index_of_other_tracers + long_name = beginning index of the non-water tracer species + units = index + dimensions = () + type = integer +[tracers_total] + standard_name = number_of_total_tracers + long_name = total number of tracers + units = count + dimensions = () + type = integer +[trans_aero] + standard_name = flag_for_aerosol_convective_transport_and_PBL_diffusion + long_name = flag for aerosol convective transport and PBL diffusion + units = flag + dimensions = () + type = logical +[trans] + standard_name = transpiration_flux + long_name = total plant transpiration rate + units = W m-2 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tseal] + standard_name = surface_skin_temperature_for_nsst + long_name = ocean surface skin temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsfa] + standard_name = surface_air_temperature_for_radiation + long_name = lowest model layer air temperature for radiation + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsfc_water] + standard_name = surface_skin_temperature_over_water + long_name = surface skin temperature over water + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsfg] + standard_name = surface_ground_temperature_for_radiation + long_name = surface ground temperature for radiation + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsurf_water] + standard_name = surface_skin_temperature_after_iteration_over_water + long_name = surface skin temperature after iteration over water + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsurf_land] + standard_name = surface_skin_temperature_after_iteration_over_land + long_name = surface skin temperature after iteration over land + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tsurf_ice] + standard_name = surface_skin_temperature_after_iteration_over_ice + long_name = surface skin temperature after iteration over ice + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tracers_water] + standard_name = number_of_water_tracers + long_name = number of water-related tracers + units = count + dimensions = () + type = integer +[uustar_water] + standard_name = surface_friction_velocity_over_water + long_name = surface friction velocity over water + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[uustar_land] + standard_name = surface_friction_velocity_over_land + long_name = surface friction velocity over land + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[uustar_ice] + standard_name = surface_friction_velocity_over_ice + long_name = surface friction velocity over ice + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[vdftra] + standard_name = vertically_diffused_tracer_concentration + long_name = tracer concentration diffused by PBL scheme + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) + type = real + kind = kind_phys +[lndp_vgf] + standard_name = magnitude_of_perturbation_of_vegetation_fraction + long_name = magnitude of perturbation of vegetation fraction + units = frac + dimensions = () + type = real + kind = kind_phys +[vegf1d] + standard_name = perturbation_of_vegetation_fraction + long_name = perturbation of vegetation fraction + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[w_upi] + standard_name = vertical_velocity_for_updraft + long_name = vertical velocity for updraft + units = m s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) +[wcbmax] + standard_name = maximum_updraft_velocity_at_cloud_base + long_name = maximum updraft velocity at cloud base + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[wind] + standard_name = wind_speed_at_lowest_model_layer + long_name = wind speed at lowest model level + units = m s-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[work1] + standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes + long_name = grid size related coefficient used in scale-sensitive schemes + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[work2] + standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes_complement + long_name = complement to work1 + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[work3] + standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer + long_name = Exner function ratio bt midlayer and interface at 1st layer + units = ratio + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[xcosz] + standard_name = instantaneous_cosine_of_zenith_angle + long_name = cosine of zenith angle at current time + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[xlai1d] + standard_name = perturbation_of_leaf_area_index + long_name = perturbation of leaf area index + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[xmu] + standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes + long_name = zenith angle temporal adjustment factor for shortwave + units = none + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[z01d] + standard_name = perturbation_of_momentum_roughness_length + long_name = perturbation of momentum roughness length + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ztmax_water] + standard_name = bounded_surface_roughness_length_for_heat_over_water + long_name = bounded surface roughness length for heat over water + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ztmax_land] + standard_name = bounded_surface_roughness_length_for_heat_over_land + long_name = bounded surface roughness length for heat over land + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[ztmax_ice] + standard_name = bounded_surface_roughness_length_for_heat_over_ice + long_name = bounded surface roughness length for heat over ice + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[zt1d] + standard_name = perturbation_of_heat_to_momentum_roughness_length_ratio + long_name = perturbation of heat to momentum roughness length ratio + units = frac + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[zmtb] + standard_name = height_of_mountain_blocking + long_name = height of mountain blocking drag + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dudt_ngw] + standard_name = tendency_of_x_wind_due_to_nonorographic_gravity_wave_drag + long_name = zonal wind tendency due to non-stationary GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) +[dvdt_ngw] + standard_name = tendency_of_y_wind_due_to_nonorographic_gravity_wave_drag + long_name = meridional wind tendency due to non-stationary GWs + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) +[dtdt_ngw] + standard_name = tendency_of_air_temperature_due_to_nonorographic_gravity_wave_drag + long_name = air temperature tendency due to non-stationary GWs + units = K s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) +[kdis_ngw] + standard_name = atmosphere_momentum_diffusivity_due_to_nonorographic_gravity_wave_drag + long_name = eddy mixing due to non-stationary GWs + units = m2 s-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) +[zlwb] + standard_name = height_of_low_level_wave_breaking + long_name = height of low level wave breaking + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[zogw] + standard_name = height_of_launch_level_of_orographic_gravity_wave + long_name = height of launch level of orographic gravity wave + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[zngw] + standard_name = height_of_launch_level_of_nonorographic_gravity_waves + long_name = height of launch level of non-stationary GWs + units = m + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tau_tofd] + standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag + long_name = instantaneous momentum flux due to TOFD + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tau_mtb] + standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag + long_name = instantaneous momentum flux due to mountain blocking drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tau_ogw] + standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag + long_name = instantaneous momentum flux due to orographic gravity wave drag + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tau_oss] + standard_name = momentum_flux_due_to_subgrid_scale_orographic_gravity_wave_drag + long_name = momentum flux or stress due to SSO including OBL-OSS-OFD + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[tau_ngw] + standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave + long_name = instantaneous momentum flux due to nonstationary gravity waves + units = Pa + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[dudt_mtb] + standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag + long_name = instantaneous change in x wind due to mountain blocking drag + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[dudt_tms] + standard_name = tendency_of_x_wind_due_to_turbulent_orographic_form_drag + long_name = instantaneous change in x wind due to TOFD + units = m s-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys +[qs_lay] + standard_name = saturation_vapor_pressure + long_name = saturation vapor pressure + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[q_lay] + standard_name = water_vapor_mixing_ratio + long_name = water vaport mixing ratio + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[p_lay] + standard_name = air_pressure_at_layer_for_RRTMGP + long_name = air pressure layer + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[p_lev] + standard_name = air_pressure_at_interface_for_RRTMGP + long_name = air pressure level + units = Pa + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[t_lay] + standard_name = air_temperature_at_layer_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[t_lev] + standard_name = air_temperature_at_interface_for_RRTMGP + long_name = air temperature layer + units = K + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[tv_lay] + standard_name = virtual_temperature + long_name = layer virtual temperature + units = K + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[relhum] + standard_name = relative_humidity + long_name = layer relative humidity + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[deltaZ] + standard_name = layer_thickness + long_name = layer_thickness + units = m + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[deltaZc] + standard_name = layer_thickness_from_layer_center + long_name = layer_thickness + units = m + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[deltaP] + standard_name = layer_thickness_in_Pa + long_name = layer_thickness_in_Pa + units = Pa + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[tracer] + standard_name = chemical_tracers + long_name = chemical tracers + units = g g-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cloud_overlap_param] + standard_name = cloud_overlap_param + long_name = cloud overlap parameter for RRTMGP (but not for RRTMG) + units = km + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[precip_overlap_param] + standard_name = precip_overlap_param + long_name = precipitation overlap parameter + units = km + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxlwUP_allsky] + standard_name = RRTMGP_lw_flux_profile_upward_allsky + long_name = RRTMGP upward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxlwDOWN_allsky] + standard_name = RRTMGP_lw_flux_profile_downward_allsky + long_name = RRTMGP downward longwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxlwUP_clrsky] + standard_name = RRTMGP_lw_flux_profile_upward_clrsky + long_name = RRTMGP upward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxlwDOWN_clrsky] + standard_name = RRTMGP_lw_flux_profile_downward_clrsky + long_name = RRTMGP downward longwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxswUP_allsky] + standard_name = RRTMGP_sw_flux_profile_upward_allsky + long_name = RRTMGP upward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxswDOWN_allsky] + standard_name = RRTMGP_sw_flux_profile_downward_allsky + long_name = RRTMGP downward shortwave all-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxswUP_clrsky] + standard_name = RRTMGP_sw_flux_profile_upward_clrsky + long_name = RRTMGP upward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[fluxswDOWN_clrsky] + standard_name = RRTMGP_sw_flux_profile_downward_clrsky + long_name = RRTMGP downward shortwave clr-sky flux profile + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[flxprf_lw] + standard_name = RRTMGP_lw_fluxes + long_name = lw fluxes total sky / csk and up / down at levels + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = proflw_type + active = (flag_for_rrtmgp_radiation_scheme) +[flxprf_sw] + standard_name = RRTMGP_sw_fluxes + long_name = sw fluxes total sky / csk and up / down at levels + units = W m-2 + dimensions = (horizontal_loop_extent,vertical_interface_dimension) + type = profsw_type + active = (flag_for_rrtmgp_radiation_scheme) +[aerosolslw] + standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 + long_name = aerosol optical properties for longwave bands 01-16 + units = mixed + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands,number_of_aerosol_output_fields_for_longwave_radiation) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[aerosolslw(:,:,:,1)] + standard_name = RRTMGP_aerosol_optical_depth_for_longwave_bands_01_16 + long_name = aerosol optical depth for longwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) + type = real + kind = kind_phys +[aerosolslw(:,:,:,2)] + standard_name = RRTMGP_aerosol_single_scattering_albedo_for_longwave_bands_01_16 + long_name = aerosol single scattering albedo for longwave bands 01-16 + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) + type = real + kind = kind_phys +[aerosolslw(:,:,:,3)] + standard_name = RRTMGP_aerosol_asymmetry_parameter_for_longwave_bands_01_16 + long_name = aerosol asymmetry parameter for longwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) + type = real + kind = kind_phys +[aerosolssw] + standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 + long_name = aerosol optical properties for shortwave bands 01-16 + units = mixed + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands, number_of_aerosol_output_fields_for_shortwave_radiation) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[aerosolssw(:,:,:,1)] + standard_name = RRTMGP_aerosol_optical_depth_for_shortwave_bands_01_16 + long_name = aerosol optical depth for shortwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) + type = real + kind = kind_phys +[aerosolssw(:,:,:,2)] + standard_name = RRTMGP_aerosol_single_scattering_albedo_for_shortwave_bands_01_16 + long_name = aerosol single scattering albedo for shortwave bands 01-16 + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) + type = real + kind = kind_phys +[aerosolssw(:,:,:,3)] + standard_name = RRTMGP_aerosol_asymmetry_parameter_for_shortwave_bands_01_16 + long_name = aerosol asymmetry parameter for shortwave bands 01-16 + units = none + dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) + type = real + kind = kind_phys +[precip_frac] + standard_name = precipitation_fraction_by_layer + long_name = precipitation fraction in each layer + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cnv_cloud_overlap_param] + standard_name = convective_cloud_overlap_param + long_name = convective cloud overlap parameter + units = km + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_cnv_frac] + standard_name = convective_cloud_fraction_for_RRTMGP + long_name = layer convective cloud fraction + units = frac + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_cnv_lwp] + standard_name = convective_cloud_liquid_water_path + long_name = layer convective cloud liquid water path + units = g m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_cnv_iwp] + standard_name = convective_cloud_ice_water_path + long_name = layer convective cloud ice water path + units = g m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_cnv_reliq] + standard_name = mean_effective_radius_for_liquid_convective_cloud + long_name = mean effective radius for liquid convective cloud + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_cnv_reice] + standard_name = mean_effective_radius_for_ice_convective_cloud + long_name = mean effective radius for ice convective cloud + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_pbl_lwp] + standard_name = MYNN_SGS_cloud_liquid_water_path + long_name = layer convective cloud liquid water path + units = g m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_pbl_iwp] + standard_name = MYNN_SGS_cloud_ice_water_path + long_name = layer convective cloud ice water path + units = g m-2 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_pbl_reliq] + standard_name = mean_effective_radius_for_liquid_MYNN_SGS_cloud + long_name = mean effective radius for liquid MYNN_SGS cloud + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[cld_pbl_reice] + standard_name = mean_effective_radius_for_ice_MYNN_SGS_cloud + long_name = mean effective radius for ice MYNN_SGS cloud + units = um + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_clrsky] + standard_name = shortwave_optical_properties_for_clear_sky + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_cloudsByBand] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_cnvcloudsByBand] + standard_name = shortwave_optical_properties_for_convective_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str +[sw_optical_props_MYNNcloudsByBand] + standard_name = shortwave_optical_properties_for_MYNN_EDMF_PBL_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_cnvclouds] + standard_name = shortwave_optical_properties_for_convective_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_precipByBand] + standard_name = shortwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_precip] + standard_name = shortwave_optical_properties_for_precipitation + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_clouds] + standard_name = shortwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[sw_optical_props_aerosol] + standard_name = shortwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[gas_concentrations] + standard_name = Gas_concentrations_for_RRTMGP_suite + long_name = DDT containing gas concentrations for RRTMGP radiation scheme + units = DDT + dimensions = () + type = ty_gas_concs + active = (flag_for_rrtmgp_radiation_scheme) +[sources] + standard_name = longwave_source_function + long_name = Fortran DDT containing RRTMGP source functions + units = DDT + dimensions = () + type = ty_source_func_lw + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_clrsky] + standard_name = longwave_optical_properties_for_clear_sky + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_clouds] + standard_name = longwave_optical_properties_for_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_precip] + standard_name = longwave_optical_properties_for_precipitation + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_cloudsByBand] + standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_cnvcloudsByBand] + standard_name = longwave_optical_properties_for_convective_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_MYNNcloudsByBand] + standard_name = longwave_optical_properties_for_MYNN_EDMF_PBL_cloudy_atmosphere_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_cnvclouds] + standard_name = longwave_optical_properties_for_convective_cloudy_atmosphere + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_precipByBand] + standard_name = longwave_optical_properties_for_precipitation_by_band + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_2str + active = (flag_for_rrtmgp_radiation_scheme) +[lw_optical_props_aerosol] + standard_name = longwave_optical_properties_for_aerosols + long_name = Fortran DDT containing RRTMGP optical properties + units = DDT + dimensions = () + type = ty_optical_props_1scl + active = (flag_for_rrtmgp_radiation_scheme) +[sfc_emiss_byband] + standard_name = surface_emissivity_in_each_RRTMGP_LW_band + long_name = surface emissivity in each RRTMGP LW band + units = none + dimensions = (number_of_longwave_bands,horizontal_loop_extent) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[sec_diff_byband] + standard_name = secant_of_diffusivity_angle_each_RRTMGP_LW_band + long_name = secant of diffusivity angle in each RRTMGP LW band + units = none + dimensions = (number_of_longwave_bands,horizontal_loop_extent) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[sfc_alb_nir_dir] + standard_name = surface_albedo_nearIR_direct + long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) + units = none + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[sfc_alb_nir_dif] + standard_name = surface_albedo_nearIR_diffuse + long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) + units = none + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[sfc_alb_uvvis_dir] + standard_name = surface_albedo_uvvis_direct + long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) + units = none + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[sfc_alb_uvvis_dif] + standard_name = surface_albedo_uvvis_diffuse + long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) + units = none + dimensions = (number_of_shortwave_bands,horizontal_loop_extent) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[toa_src_lw] + standard_name = toa_incident_lw_flux_by_spectral_point + long_name = TOA longwave incident flux at each spectral points + units = W m-2 + dimensions = (horizontal_loop_extent,number_of_longwave_spectral_points) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[toa_src_sw] + standard_name = toa_incident_sw_flux_by_spectral_point + long_name = TOA shortwave incident flux at each spectral points + units = W m-2 + dimensions = (horizontal_loop_extent,number_of_shortwave_spectral_points) + type = real + kind = kind_phys + active = (flag_for_rrtmgp_radiation_scheme) +[rtg_ozone_index] + standard_name = vertically_diffused_tracer_index_of_ozone + long_name = number of tracers + units = count + dimensions = () + type = integer + +######################################################################## +[ccpp-table-properties] + name = GFDL_interstitial_type + type = ddt + dependencies = + +[ccpp-arg-table] + name = GFDL_interstitial_type type = ddt [akap] standard_name = kappa_dry_for_fast_physics @@ -343,14 +3306,25 @@ [ccpp-table-properties] name = CCPP_typedefs type = module - dependencies = ../physics/physics/machine.F + relative_path = ../physics/physics + dependencies = machine.F,ozne_def.f,radlw_param.f,radsw_param.f + dependencies = rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rte/mo_optical_props.F90 + dependencies = rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90 + dependencies = rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rte/mo_rte_config.F90 + dependencies = rte-rrtmgp/rte/mo_source_functions.F90 [ccpp-arg-table] name = CCPP_typedefs type = module -[CCPP_interstitial_type] - standard_name = CCPP_interstitial_type - long_name = definition of type CCPP_interstitial_type +[GFS_interstitial_type] + standard_name = GFS_interstitial_type + long_name = definition of type GFS_interstitial_type + units = DDT + dimensions = () + type = GFS_interstitial_type +[GFDL_interstitial_type] + standard_name = GFDL_interstitial_type + long_name = definition of type GFDL_interstitial_type units = DDT dimensions = () - type = CCPP_interstitial_type + type = GFDL_interstitial_type diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index a5d7fda42..9c8735b95 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1,83 +1,65 @@ - module GFS_typedefs - use machine, only: kind_phys,kind_dbl_prec - use physcons, only: con_cp, con_fvirt, con_g, & - con_hvap, con_hfus, con_pi, con_rd, con_rv, & - con_t0c, con_cvap, con_cliq, con_eps, con_epsq, & - con_epsm1, con_ttp, rlapse, con_jcal, con_rhw0, & - con_sbc, con_tice, cimin, con_p0, rhowater, & - con_csol, con_epsqs, con_rocp, con_rog, & - con_omega, con_rerth, con_psat, karman, rainmin - - use module_radsw_parameters, only: topfsw_type, sfcfsw_type, profsw_type, cmpfsw_type, NBDSW - use module_radlw_parameters, only: topflw_type, sfcflw_type, proflw_type, NBDLW - use ozne_def, only: levozp, oz_coeff - use h2o_def, only: levh2o, h2o_coeff - use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp - use mo_optical_props, only: ty_optical_props_1scl,ty_optical_props_2str - use mo_cloud_optics, only: ty_cloud_optics - use mo_gas_concentrations, only: ty_gas_concs - use mo_source_functions, only: ty_source_func_lw - - implicit none - - ! To ensure that these values match what's in the physics, - ! array sizes are compared during model init in GFS_rrtmg_setup_init() - private :: NF_AESW, NF_AELW, NSPC, NSPC1, NF_CLDS, NF_VGAS, NF_ALBD, ntrcaerm - ! from module_radiation_aerosols - integer, parameter :: NF_AESW = 3 - integer, parameter :: NF_AELW = 3 - integer, parameter :: NSPC = 5 - integer, parameter :: NSPC1 = NSPC + 1 - ! from module_radiation_clouds - integer, parameter :: NF_CLDS = 9 - ! from module_radiation_gases - integer, parameter :: NF_VGAS = 10 - ! from module_radiation_surface - integer, parameter :: NF_ALBD = 4 - ! from aerclm_def - integer, parameter :: ntrcaerm = 15 - - ! This will be set later in GFS_Control%initialize, since - ! it depends on the runtime config (Model%aero_in) - private :: ntrcaer - integer :: ntrcaer - - ! If these are changed to >99, need to adjust formatting string in GFS_diagnostics.F90 (and names in diag_tables) - integer, parameter :: naux2dmax = 20 !< maximum number of auxiliary 2d arrays in output (for debugging) - integer, parameter :: naux3dmax = 20 !< maximum number of auxiliary 3d arrays in output (for debugging) - - integer, parameter :: dfi_radar_max_intervals = 4 !< Number of radar-derived temperature tendency and/or convection suppression intervals. Do not change. - - real(kind=kind_phys), parameter :: limit_unspecified = 1e12 !< special constant for "namelist value was not provided" in radar-derived temperature tendency limit range + use machine, only: kind_phys, kind_dbl_prec + use physcons, only: con_cp, con_fvirt, con_g, & + con_hvap, con_hfus, con_pi, con_rd, con_rv, & + con_t0c, con_cvap, con_cliq, con_eps, con_epsq, & + con_epsm1, con_ttp, rlapse, con_jcal, con_rhw0, & + con_sbc, con_tice, cimin, con_p0, rhowater, & + con_csol, con_epsqs, con_rocp, con_rog, & + con_omega, con_rerth, con_psat, karman, rainmin + + use module_radsw_parameters, only: topfsw_type, sfcfsw_type + use module_radlw_parameters, only: topflw_type, sfcflw_type + use ozne_def, only: levozp, oz_coeff + use h2o_def, only: levh2o, h2o_coeff + + implicit none + + ! To ensure that these values match what's in the physics, array + ! sizes are compared in the auto-generated physics caps in debug mode + ! from aerclm_def + integer, parameter, private :: ntrcaerm = 15 + + ! This will be set later in GFS_Control%initialize, since + ! it depends on the runtime config (Model%aero_in) + integer, private :: ntrcaer + + ! If these are changed to >99, need to adjust formatting string in GFS_diagnostics.F90 (and names in diag_tables) + integer, parameter :: naux2dmax = 20 !< maximum number of auxiliary 2d arrays in output (for debugging) + integer, parameter :: naux3dmax = 20 !< maximum number of auxiliary 3d arrays in output (for debugging) + + integer, parameter :: dfi_radar_max_intervals = 4 !< Number of radar-derived temperature tendency and/or convection suppression intervals. Do not change. + + real(kind=kind_phys), parameter :: limit_unspecified = 1e12 !< special constant for "namelist value was not provided" in radar-derived temperature tendency limit range + !> \section arg_table_GFS_typedefs !! \htmlinclude GFS_typedefs.html !! - !--- version of physics - character(len=64) :: phys_version = 'v2018 FV3GFS BETA VERSION PHYSICS' - - !--- parameter constants used for default initializations - real(kind=kind_phys), parameter :: zero = 0.0_kind_phys -! real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue - real(kind=kind_phys), parameter :: clear_val = zero - !real(kind=kind_phys), parameter :: clear_val = -9.9999e80 - real(kind=kind_phys), parameter :: rann_init = 0.6_kind_phys - real(kind=kind_phys), parameter :: cn_one = 1._kind_phys - real(kind=kind_phys), parameter :: cn_100 = 100._kind_phys - real(kind=kind_phys), parameter :: cn_th = 1000._kind_phys - real(kind=kind_phys), parameter :: cn_hr = 3600._kind_phys - - ! optional extra top layer on top of low ceiling models - ! this parameter was originally defined in the radiation driver - ! (and is still for standard non-CCPP builds), but is required - ! here for CCPP to allocate arrays used for the interstitial - ! calculations previously in GFS_{physics,radiation}_driver.F90 - ! LTP=0: no extra top layer - integer, parameter :: LTP = 0 ! no extra top layer - !integer, parameter :: LTP = 1 ! add an extra top layer + !--- version of physics + character(len=64) :: phys_version = 'v2021 UFS PHYSICS' + + !--- parameter constants used for default initializations + real(kind=kind_phys), parameter :: zero = 0.0_kind_phys + !real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue + real(kind=kind_phys), parameter :: clear_val = zero + !real(kind=kind_phys), parameter :: clear_val = -9.9999e80 + real(kind=kind_phys), parameter :: rann_init = 0.6_kind_phys + real(kind=kind_phys), parameter :: cn_one = 1._kind_phys + real(kind=kind_phys), parameter :: cn_100 = 100._kind_phys + real(kind=kind_phys), parameter :: cn_th = 1000._kind_phys + real(kind=kind_phys), parameter :: cn_hr = 3600._kind_phys + + ! optional extra top layer on top of low ceiling models + ! this parameter was originally defined in the radiation driver + ! (and is still for standard non-CCPP builds), but is required + ! here for CCPP to allocate arrays used for the interstitial + ! calculations previously in GFS_{physics,radiation}_driver.F90 + ! LTP=0: no extra top layer + integer, parameter :: LTP = 0 ! no extra top layer + !integer, parameter :: LTP = 1 ! add an extra top layer !---------------- ! Data Containers @@ -96,8 +78,7 @@ module GFS_typedefs ! GFS_cldprop_type !< cloud fields needed by radiation from physics ! GFS_radtend_type !< radiation tendencies needed in physics ! GFS_diag_type !< fields targetted for diagnostic output -! GFS_interstitial_type !< fields required to replace interstitial code in GFS_{physics,radiation}_driver.F90 in CCPP -! GFS_data_type !< combined type of all of the above except GFS_control_type and GFS_interstitial_type +! GFS_data_type !< combined type of all of the above except GFS_control_type !-------------------------------------------------------------------------------- ! GFS_init_type @@ -298,6 +279,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: ffmm (:) => null() !< fm parameter from PBL scheme real (kind=kind_phys), pointer :: ffhh (:) => null() !< fh parameter from PBL scheme real (kind=kind_phys), pointer :: f10m (:) => null() !< fm at 10m - Ratio of sigma level 1 wind and 10m wind + real (kind=kind_phys), pointer :: rca (:) => null() !< canopy resistance real (kind=kind_phys), pointer :: tprcp (:) => null() !< sfc_fld%tprcp - total precipitation real (kind=kind_phys), pointer :: srflag (:) => null() !< sfc_fld%srflag - snow/rain flag for precipitation real (kind=kind_phys), pointer :: slc (:,:) => null() !< liquid soil moisture @@ -680,8 +662,10 @@ module GFS_typedefs logical :: cplocn2atm !< default yes ocn->atm coupling logical :: cplwav !< default no cplwav collection logical :: cplwav2atm !< default no wav->atm coupling + logical :: cplaqm !< default no cplaqm collection logical :: cplchm !< default no cplchm collection logical :: rrfs_smoke !< default no rrfs_smoke collection + integer :: dust_smoke_rrtmg_band_number !< band number to affect in rrtmg_pre from smoke and dust logical :: use_cice_alb !< default .false. - i.e. don't use albedo imported from the ice model logical :: cpl_imp_mrg !< default no merge import with internal forcings logical :: cpl_imp_dbg !< default no write import data to file post merge @@ -778,6 +762,7 @@ module GFS_typedefs logical :: doG_cldoptics !< Use legacy RRTMG cloud-optics? logical :: doGP_cldoptics_PADE !< Use RRTMGP cloud-optics: PADE approximation? logical :: doGP_cldoptics_LUT !< Use RRTMGP cloud-optics: LUTs? + integer :: iovr_convcld !< Cloud-overlap assumption for convective-cloud integer :: rrtmgp_nrghice !< Number of ice-roughness categories integer :: rrtmgp_nGauss_ang !< Number of angles used in Gaussian quadrature logical :: do_GPsw_Glw !< If set to true use rrtmgp for SW calculation, rrtmg for LW. @@ -787,6 +772,8 @@ module GFS_typedefs real(kind_phys) :: lfnc_k !< Logistic function transition depth (Pa) real(kind_phys) :: lfnc_p0 !< Logistic function transition level (Pa) logical :: doGP_lwscat !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics + logical :: doGP_sgs_cnv !< If true, include SubGridScale convective cloud in RRTMGP + logical :: doGP_sgs_mynn !< If true, include SubGridScale MYNN-EDMF cloud in RRTMGP real(kind_phys) :: minGPpres !< Minimum pressure allowed in RRTMGP. real(kind_phys) :: maxGPpres !< Maximum pressure allowed in RRTMGP. real(kind_phys) :: minGPtemp !< Minimum temperature allowed in RRTMGP. @@ -820,6 +807,8 @@ module GFS_typedefs integer :: idcor_con = 0 !< choice for decorrelation-length: Use constant value integer :: idcor_hogan = 1 !< choice for decorrelation-length: (https://rmets.onlinelibrary.wiley.com/doi/full/10.1002/qj.647) integer :: idcor_oreopoulos = 2 !< choice for decorrelation-length: (10.5194/acp-12-9097-2012) + integer :: imp_physics_nssl = 17 !< choice of NSSL microphysics scheme with background CCN + integer :: imp_physics_nssl2mccn = 18 !< choice of NSSL microphysics scheme with predicted CCN (compatibility) !--- Z-C microphysical parameters real(kind=kind_phys) :: psautco(2) !< [in] auto conversion coeff from ice to snow real(kind=kind_phys) :: prautco(2) !< [in] auto conversion coeff from cloud to rain @@ -873,6 +862,14 @@ module GFS_typedefs real(kind=kind_phys) :: shoc_parm(5) !< critical pressure in Pa for tke dissipation in shoc integer :: ncnd !< number of cloud condensate types + !--- NSSL microphysics params + real(kind=kind_phys) :: nssl_cccn !< CCN concentration (m-3) + real(kind=kind_phys) :: nssl_alphah !< graupel shape parameter + real(kind=kind_phys) :: nssl_alphahl !< hail shape parameter + logical :: nssl_hail_on !< NSSL flag to activate the hail category + logical :: nssl_ccn_on !< NSSL flag to activate the CCN category + logical :: nssl_invertccn !< NSSL flag to treat CCN as activated (true) or unactivated (false) + !--- Thompson's microphysical parameters logical :: ltaerosol !< flag for aerosol version logical :: lradar !< flag for radar reflectivity @@ -919,9 +916,6 @@ module GFS_typedefs logical :: usemonalb !< flag to read surface diffused shortwave albedo from input file for NOAH LSM WRFv4 real(kind=kind_phys) :: aoasis !< potential evaporation multiplication factor for NOAH LSM WRFv4 integer :: fasdas !< flag to use "flux-adjusting surface data assimilation system"; 0 = OFF, 1 = ON - integer :: isurban !< vegetation/land use type corresponding to the urban environment for the chosen ivegsrc - integer :: isice !< vegetation/land use type corresponding to permanent ice/snow for the chosen ivegsrc - integer :: iswater !< vegetation/land use type corresponding to water bodies for the chosen ivegsrc integer :: iopt_thcnd !< option to treat thermal conductivity in Noah LSM (new in 3.8) !< = 1, original (default) !< = 2, McCumber and Pielke for silt loam and sandy loam @@ -939,6 +933,7 @@ module GFS_typedefs integer :: iopt_snf !rainfall & snowfall (1-jordan91; 2->bats; 3->noah) integer :: iopt_tbot !lower boundary of soil temperature (1->zero-flux; 2->noah) integer :: iopt_stc !snow/soil temperature time scheme (only layer 1) + integer :: iopt_trs !thermal roughness scheme (1-z0h=z0m; 2-czil; 3-ec;4-kb inversed) logical :: use_ufo !< flag for gcycle surface option @@ -1078,6 +1073,10 @@ module GFS_typedefs integer :: bl_mynn_output !< flag to initialize and write out extra 3D arrays integer :: icloud_bl !< flag for coupling sgs clouds to radiation real(kind=kind_phys) :: bl_mynn_closure !< flag to determine closure level of MYNN + logical :: sfclay_compute_flux!< flag for thermal roughness lengths over water in mynnsfclay + logical :: sfclay_compute_diag!< flag for computing surface diagnostics in mynnsfclay + integer :: isftcflx !< flag for thermal roughness lengths over water in mynnsfclay + integer :: iz0tlnd !< flag for thermal roughness lengths over land in mynnsfclay real(kind=kind_phys) :: var_ric real(kind=kind_phys) :: coef_ric_l real(kind=kind_phys) :: coef_ric_s @@ -1201,17 +1200,15 @@ module GFS_typedefs logical :: do_shum logical :: do_skeb integer :: skeb_npass - integer :: lndp_type + integer :: lndp_type ! integer indicating land perturbation scheme type: + ! 0 - none + ! 1 - scheme from Gehne et al, MWR, 2019. (Noah only, not maintained?) + ! 2 - scheme from Draper, JHM, 2021. real(kind=kind_phys) :: sppt_amp ! pjp cloud perturbations integer :: n_var_lndp - logical :: lndp_each_step ! flag to indicate that land perturbations are applied at every time step, - ! otherwise they are applied only after gcycle is run - character(len=3) , pointer :: lndp_var_list(:) ! dimension here must match n_var_max_lndp in stochy_nml_def - real(kind=kind_phys), pointer :: lndp_prt_list(:) ! dimension here must match n_var_max_lndp in stochy_nml_def - ! also previous code had dimension 5 for each pert, to allow - ! multiple patterns. It wasn't fully coded (and wouldn't have worked - ! with nlndp>1, so I just dropped it). If we want to code it properly, - ! we'd need to make this dim(6,5). + ! next two are duplicated here to support lndp_type=1. If delete that scheme, could remove from GFS defs? + character(len=3) , pointer :: lndp_var_list(:) + real(kind=kind_phys), pointer :: lndp_prt_list(:) logical :: do_spp ! Overall flag to turn on SPP or not integer :: spp_pbl integer :: spp_sfc @@ -1219,8 +1216,9 @@ module GFS_typedefs integer :: spp_rad integer :: spp_gwd integer :: n_var_spp - character(len=3) , pointer :: spp_var_list(:) ! dimension here must match n_var_spp in stochy_nml_def - real(kind=kind_phys), pointer :: spp_prt_list(:) ! dimension here must match n_var_spp in stochy_nml_def + character(len=3) , pointer :: spp_var_list(:) + real(kind=kind_phys), pointer :: spp_prt_list(:) + real(kind=kind_phys), pointer :: spp_stddev_cutoff(:) !--- tracer handling character(len=32), pointer :: tracer_names(:) !< array of initialized tracers from dynamic core @@ -1269,13 +1267,19 @@ module GFS_typedefs integer :: ntrw !< tracer index for rain water integer :: ntsw !< tracer index for snow water integer :: ntgl !< tracer index for graupel + integer :: nthl !< tracer index for hail integer :: ntclamt !< tracer index for cloud amount integer :: ntlnc !< tracer index for liquid number concentration integer :: ntinc !< tracer index for ice number concentration integer :: ntrnc !< tracer index for rain number concentration integer :: ntsnc !< tracer index for snow number concentration integer :: ntgnc !< tracer index for graupel number concentration - integer :: ntke !< tracer index for sgs kinetic energy + integer :: nthnc !< tracer index for hail number concentration + integer :: ntccn !< tracer index for CCN + integer :: ntccna !< tracer index for activated CCN + integer :: ntgv !< tracer index for graupel particle volume + integer :: nthv !< tracer index for hail particle volume + integer :: ntke !< tracer index for kinetic energy integer :: nto !< tracer index for oxygen ion integer :: nto2 !< tracer index for oxygen integer :: ntwa !< tracer index for water friendly aerosol @@ -1884,6 +1888,9 @@ module GFS_typedefs ! Extended output diagnostics for Thompson MP real (kind=kind_phys), pointer :: thompson_ext_diag3d (:,:,:) => null() ! extended diagnostic 3d output arrays from Thompson MP + ! Diagnostics for coupled air quality model + real (kind=kind_phys), pointer :: aod (:) => null() !< instantaneous aerosol optical depth ( n/a ) + ! Auxiliary output arrays for debugging real (kind=kind_phys), pointer :: aux2d(:,:) => null() !< auxiliary 2d arrays in output (for debugging) real (kind=kind_phys), pointer :: aux3d(:,:,:)=> null() !< auxiliary 2d arrays in output (for debugging) @@ -1894,399 +1901,9 @@ module GFS_typedefs procedure :: phys_zero => diag_phys_zero end type GFS_diag_type -!--------------------------------------------------------------------- -! GFS_interstitial_type -! fields required for interstitial code in CCPP schemes, previously -! in GFS_{physics,radiation}_driver.F90 -!--------------------------------------------------------------------- -!! \section arg_table_GFS_interstitial_type -!! \htmlinclude GFS_interstitial_type.html -!! - type GFS_interstitial_type - - real (kind=kind_phys), pointer :: adjsfculw_land(:) => null() !< - real (kind=kind_phys), pointer :: adjsfculw_ice(:) => null() !< - real (kind=kind_phys), pointer :: adjsfculw_water(:) => null() !< - real (kind=kind_phys), pointer :: adjnirbmd(:) => null() !< - real (kind=kind_phys), pointer :: adjnirbmu(:) => null() !< - real (kind=kind_phys), pointer :: adjnirdfd(:) => null() !< - real (kind=kind_phys), pointer :: adjnirdfu(:) => null() !< - real (kind=kind_phys), pointer :: adjvisbmd(:) => null() !< - real (kind=kind_phys), pointer :: adjvisbmu(:) => null() !< - real (kind=kind_phys), pointer :: adjvisdfu(:) => null() !< - real (kind=kind_phys), pointer :: adjvisdfd(:) => null() !< - real (kind=kind_phys), pointer :: aerodp(:,:) => null() !< - real (kind=kind_phys), pointer :: alb1d(:) => null() !< - real (kind=kind_phys), pointer :: alpha(:,:) => null() !< - real (kind=kind_phys), pointer :: bexp1d(:) => null() !< - real (kind=kind_phys), pointer :: cd(:) => null() !< - real (kind=kind_phys), pointer :: cd_ice(:) => null() !< - real (kind=kind_phys), pointer :: cd_land(:) => null() !< - real (kind=kind_phys), pointer :: cd_water(:) => null() !< - real (kind=kind_phys), pointer :: cdq(:) => null() !< - real (kind=kind_phys), pointer :: cdq_ice(:) => null() !< - real (kind=kind_phys), pointer :: cdq_land(:) => null() !< - real (kind=kind_phys), pointer :: cdq_water(:) => null() !< - real (kind=kind_phys), pointer :: cf_upi(:,:) => null() !< - real (kind=kind_phys), pointer :: chh_ice(:) => null() !< - real (kind=kind_phys), pointer :: chh_land(:) => null() !< - real (kind=kind_phys), pointer :: chh_water(:) => null() !< - real (kind=kind_phys), pointer :: clcn(:,:) => null() !< - real (kind=kind_phys), pointer :: cldf(:) => null() !< - real (kind=kind_phys), pointer :: cldsa(:,:) => null() !< - real (kind=kind_phys), pointer :: cldtaulw(:,:) => null() !< - real (kind=kind_phys), pointer :: cldtausw(:,:) => null() !< - real (kind=kind_phys), pointer :: cld1d(:) => null() !< - real (kind=kind_phys), pointer :: clouds(:,:,:) => null() !< - real (kind=kind_phys), pointer :: clw(:,:,:) => null() !< - real (kind=kind_phys), pointer :: clx(:,:) => null() !< - real (kind=kind_phys), pointer :: cmm_ice(:) => null() !< - real (kind=kind_phys), pointer :: cmm_land(:) => null() !< - real (kind=kind_phys), pointer :: cmm_water(:) => null() !< - real (kind=kind_phys), pointer :: cnv_dqldt(:,:) => null() !< - real (kind=kind_phys), pointer :: cnv_fice(:,:) => null() !< - real (kind=kind_phys), pointer :: cnv_mfd(:,:) => null() !< - real (kind=kind_phys), pointer :: cnv_ndrop(:,:) => null() !< - real (kind=kind_phys), pointer :: cnv_nice(:,:) => null() !< - real (kind=kind_phys), pointer :: cnvc(:,:) => null() !< - real (kind=kind_phys), pointer :: cnvw(:,:) => null() !< - real (kind=kind_phys), pointer :: ctei_r(:) => null() !< - real (kind=kind_phys), pointer :: ctei_rml(:) => null() !< - real (kind=kind_phys), pointer :: cumabs(:) => null() !< - real (kind=kind_phys), pointer :: dd_mf(:,:) => null() !< - real (kind=kind_phys), pointer :: de_lgth(:) => null() !< - real (kind=kind_phys), pointer :: del(:,:) => null() !< - real (kind=kind_phys), pointer :: del_gz(:,:) => null() !< - real (kind=kind_phys), pointer :: delr(:,:) => null() !< - real (kind=kind_phys), pointer :: dlength(:) => null() !< - real (kind=kind_phys), pointer :: dqdt(:,:,:) => null() !< - real (kind=kind_phys), pointer :: dqsfc1(:) => null() !< - real (kind=kind_phys), pointer :: drain(:) => null() !< - real (kind=kind_phys), pointer :: dtdt(:,:) => null() !< - real (kind=kind_phys), pointer :: dtsfc1(:) => null() !< - real (kind=kind_phys), pointer :: dtzm(:) => null() !< - real (kind=kind_phys), pointer :: dt_mf(:,:) => null() !< - real (kind=kind_phys), pointer :: dudt(:,:) => null() !< - real (kind=kind_phys), pointer :: dusfcg(:) => null() !< - real (kind=kind_phys), pointer :: dusfc1(:) => null() !< - real (kind=kind_phys), pointer :: dvdftra(:,:,:) => null() !< - real (kind=kind_phys), pointer :: dvdt(:,:) => null() !< - real (kind=kind_phys), pointer :: dvsfcg(:) => null() !< - real (kind=kind_phys), pointer :: dvsfc1(:) => null() !< - real (kind=kind_phys), pointer :: dzlyr(:,:) => null() !< - real (kind=kind_phys), pointer :: elvmax(:) => null() !< - real (kind=kind_phys), pointer :: ep1d(:) => null() !< - real (kind=kind_phys), pointer :: ep1d_ice(:) => null() !< - real (kind=kind_phys), pointer :: ep1d_land(:) => null() !< - real (kind=kind_phys), pointer :: ep1d_water(:) => null() !< - real (kind=kind_phys), pointer :: evap_ice(:) => null() !< - real (kind=kind_phys), pointer :: evap_land(:) => null() !< - real (kind=kind_phys), pointer :: evap_water(:) => null() !< - real (kind=kind_phys), pointer :: evbs(:) => null() !< - real (kind=kind_phys), pointer :: evcw(:) => null() !< - real (kind=kind_phys), pointer :: pah(:) => null() !< - real (kind=kind_phys), pointer :: ecan(:) => null() !< - real (kind=kind_phys), pointer :: etran(:) => null() !< - real (kind=kind_phys), pointer :: edir(:) => null() !< - real (kind=kind_phys), pointer :: faerlw(:,:,:,:) => null() !< - real (kind=kind_phys), pointer :: faersw(:,:,:,:) => null() !< - real (kind=kind_phys), pointer :: ffhh_ice(:) => null() !< - real (kind=kind_phys), pointer :: ffhh_land(:) => null() !< - real (kind=kind_phys), pointer :: ffhh_water(:) => null() !< - real (kind=kind_phys), pointer :: fh2(:) => null() !< - real (kind=kind_phys), pointer :: fh2_ice(:) => null() !< - real (kind=kind_phys), pointer :: fh2_land(:) => null() !< - real (kind=kind_phys), pointer :: fh2_water(:) => null() !< - logical, pointer :: flag_cice(:) => null() !< - logical, pointer :: flag_guess(:) => null() !< - logical, pointer :: flag_iter(:) => null() !< - real (kind=kind_phys), pointer :: ffmm_ice(:) => null() !< - real (kind=kind_phys), pointer :: ffmm_land(:) => null() !< - real (kind=kind_phys), pointer :: ffmm_water(:) => null() !< - real (kind=kind_phys), pointer :: fm10(:) => null() !< - real (kind=kind_phys), pointer :: fm10_ice(:) => null() !< - real (kind=kind_phys), pointer :: fm10_land(:) => null() !< - real (kind=kind_phys), pointer :: fm10_water(:) => null() !< - real (kind=kind_phys) :: frain !< - real (kind=kind_phys), pointer :: frland(:) => null() !< - real (kind=kind_phys), pointer :: fscav(:) => null() !< - real (kind=kind_phys), pointer :: fswtr(:) => null() !< - real (kind=kind_phys), pointer :: gabsbdlw(:) => null() !< - real (kind=kind_phys), pointer :: gabsbdlw_ice(:) => null() !< - real (kind=kind_phys), pointer :: gabsbdlw_land(:) => null() !< - real (kind=kind_phys), pointer :: gabsbdlw_water(:) => null() !< - real (kind=kind_phys), pointer :: gamma(:) => null() !< - real (kind=kind_phys), pointer :: gamq(:) => null() !< - real (kind=kind_phys), pointer :: gamt(:) => null() !< - real (kind=kind_phys), pointer :: gasvmr(:,:,:) => null() !< - real (kind=kind_phys), pointer :: gflx(:) => null() !< - real (kind=kind_phys), pointer :: gflx_ice(:) => null() !< - real (kind=kind_phys), pointer :: gflx_land(:) => null() !< - real (kind=kind_phys), pointer :: gflx_water(:) => null() !< - real (kind=kind_phys), pointer :: graupelmp(:) => null() !< - real (kind=kind_phys), pointer :: gwdcu(:,:) => null() !< - real (kind=kind_phys), pointer :: gwdcv(:,:) => null() !< - real (kind=kind_phys), pointer :: zvfun(:) => null() !< - real (kind=kind_phys), pointer :: hffac(:) => null() !< - real (kind=kind_phys), pointer :: hflxq(:) => null() !< - real (kind=kind_phys), pointer :: hflx_ice(:) => null() !< - real (kind=kind_phys), pointer :: hflx_land(:) => null() !< - real (kind=kind_phys), pointer :: hflx_water(:) => null() !< - !--- radiation variables that need to be carried over from radiation to physics - real (kind=kind_phys), pointer :: htlwc(:,:) => null() !< - real (kind=kind_phys), pointer :: htlw0(:,:) => null() !< - real (kind=kind_phys), pointer :: htswc(:,:) => null() !< - real (kind=kind_phys), pointer :: htsw0(:,:) => null() !< - ! - real (kind=kind_phys), pointer :: icemp(:) => null() !< - logical, pointer :: dry(:) => null() !< - integer, pointer :: idxday(:) => null() !< - logical, pointer :: icy(:) => null() !< - logical, pointer :: lake(:) => null() !< - logical, pointer :: use_flake(:) => null() !< - logical, pointer :: ocean(:) => null() !< - integer :: ipr !< - integer, pointer :: islmsk(:) => null() !< - integer, pointer :: islmsk_cice(:) => null() !< - integer :: itc !< - logical, pointer :: wet(:) => null() !< - integer :: kb !< - integer, pointer :: kbot(:) => null() !< - integer, pointer :: kcnv(:) => null() !< - integer :: kd !< - integer, pointer :: kinver(:) => null() !< - integer, pointer :: kpbl(:) => null() !< - integer :: kt !< - integer, pointer :: ktop(:) => null() !< - integer :: latidxprnt !< - integer :: levi !< - integer :: lmk !< - integer :: lmp !< - integer, pointer :: mbota(:,:) => null() !< - logical :: mg3_as_mg2 !< - integer, pointer :: mtopa(:,:) => null() !< - integer :: nbdlw !< - integer :: nbdsw !< - real (kind=kind_phys), pointer :: ncgl(:,:) => null() !< - real (kind=kind_phys), pointer :: ncpi(:,:) => null() !< - real (kind=kind_phys), pointer :: ncpl(:,:) => null() !< - real (kind=kind_phys), pointer :: ncpr(:,:) => null() !< - real (kind=kind_phys), pointer :: ncps(:,:) => null() !< - integer :: ncstrac !< - integer :: nday !< - integer :: nf_aelw !< - integer :: nf_aesw !< - integer :: nn !< - integer :: nsamftrac !< - integer :: nscav !< - integer :: nspc1 !< - integer :: ntcwx !< - integer :: ntiwx !< - integer :: ntrwx !< - integer :: ntk !< - integer :: ntkev !< - integer :: nvdiff !< - real (kind=kind_phys), pointer :: oa4(:,:) => null() !< - real (kind=kind_phys), pointer :: oc(:) => null() !< - real (kind=kind_phys), pointer :: olyr(:,:) => null() !< - logical , pointer :: otspt(:,:) => null() !< - integer :: oz_coeffp5 !< - logical :: phys_hydrostatic !< - real (kind=kind_phys), pointer :: plvl(:,:) => null() !< - real (kind=kind_phys), pointer :: plyr(:,:) => null() !< - real (kind=kind_phys), pointer :: prcpmp(:) => null() !< - real (kind=kind_phys), pointer :: prnum(:,:) => null() !< - real (kind=kind_phys), pointer :: q2mp(:) => null() !< - real (kind=kind_phys), pointer :: qgl(:,:) => null() !< - real (kind=kind_phys), pointer :: qicn(:,:) => null() !< - real (kind=kind_phys), pointer :: qlcn(:,:) => null() !< - real (kind=kind_phys), pointer :: qlyr(:,:) => null() !< - real (kind=kind_phys), pointer :: qrn(:,:) => null() !< - real (kind=kind_phys), pointer :: qsnw(:,:) => null() !< - real (kind=kind_phys), pointer :: qss_ice(:) => null() !< - real (kind=kind_phys), pointer :: qss_land(:) => null() !< - real (kind=kind_phys), pointer :: qss_water(:) => null() !< - logical :: radar_reset !< - real (kind=kind_phys) :: raddt !< - real (kind=kind_phys), pointer :: rainmp(:) => null() !< - real (kind=kind_phys), pointer :: raincd(:) => null() !< - real (kind=kind_phys), pointer :: raincs(:) => null() !< - real (kind=kind_phys), pointer :: rainmcadj(:) => null() !< - real (kind=kind_phys), pointer :: rainp(:,:) => null() !< - real (kind=kind_phys), pointer :: rb(:) => null() !< - real (kind=kind_phys), pointer :: rb_ice(:) => null() !< - real (kind=kind_phys), pointer :: rb_land(:) => null() !< - real (kind=kind_phys), pointer :: rb_water(:) => null() !< - logical :: max_hourly_reset !< - logical :: ext_diag_thompson_reset !< - real (kind=kind_phys), pointer :: rhc(:,:) => null() !< - real (kind=kind_phys), pointer :: runoff(:) => null() !< - real (kind=kind_phys), pointer :: save_q(:,:,:) => null() !< - real (kind=kind_phys), pointer :: save_t(:,:) => null() !< - real (kind=kind_phys), pointer :: save_tcp(:,:) => null() !< - real (kind=kind_phys), pointer :: save_u(:,:) => null() !< - real (kind=kind_phys), pointer :: save_v(:,:) => null() !< - real (kind=kind_phys), pointer :: sbsno(:) => null() !< - type (cmpfsw_type), pointer :: scmpsw(:) => null() !< - real (kind=kind_phys), pointer :: sfcalb(:,:) => null() !< - real (kind=kind_phys), pointer :: sigma(:) => null() !< - real (kind=kind_phys), pointer :: sigmaf(:) => null() !< - real (kind=kind_phys), pointer :: sigmafrac(:,:) => null() !< - real (kind=kind_phys), pointer :: sigmatot(:,:) => null() !< - logical :: skip_macro !< - real (kind=kind_phys), pointer :: snowc(:) => null() !< - real (kind=kind_phys), pointer :: snohf(:) => null() !< - real (kind=kind_phys), pointer :: snowmp(:) => null() !< - real (kind=kind_phys), pointer :: snowmt(:) => null() !< - real (kind=kind_phys), pointer :: stress(:) => null() !< - real (kind=kind_phys), pointer :: stress_ice(:) => null() !< - real (kind=kind_phys), pointer :: stress_land(:) => null() !< - real (kind=kind_phys), pointer :: stress_water(:) => null() !< - real (kind=kind_phys), pointer :: t2mmp(:) => null() !< - real (kind=kind_phys), pointer :: theta(:) => null() !< - real (kind=kind_phys), pointer :: tlvl(:,:) => null() !< - real (kind=kind_phys), pointer :: tlyr(:,:) => null() !< - real (kind=kind_phys), pointer :: tprcp_ice(:) => null() !< - real (kind=kind_phys), pointer :: tprcp_land(:) => null() !< - real (kind=kind_phys), pointer :: tprcp_water(:) => null() !< - integer :: tracers_start_index !< - integer :: tracers_total !< - integer :: tracers_water !< - logical :: trans_aero !< - real (kind=kind_phys), pointer :: trans(:) => null() !< - real (kind=kind_phys), pointer :: tseal(:) => null() !< - real (kind=kind_phys), pointer :: tsfa(:) => null() !< - real (kind=kind_phys), pointer :: tsfc_water(:) => null() !< - real (kind=kind_phys), pointer :: tsfg(:) => null() !< - real (kind=kind_phys), pointer :: tsurf_ice(:) => null() !< - real (kind=kind_phys), pointer :: tsurf_land(:) => null() !< - real (kind=kind_phys), pointer :: tsurf_water(:) => null() !< - real (kind=kind_phys), pointer :: uustar_ice(:) => null() !< - real (kind=kind_phys), pointer :: uustar_land(:) => null() !< - real (kind=kind_phys), pointer :: uustar_water(:) => null() !< - real (kind=kind_phys), pointer :: vdftra(:,:,:) => null() !< - real (kind=kind_phys), pointer :: vegf1d(:) => null() !< - real (kind=kind_phys) :: lndp_vgf !< - - real (kind=kind_phys), pointer :: w_upi(:,:) => null() !< - real (kind=kind_phys), pointer :: wcbmax(:) => null() !< - real (kind=kind_phys), pointer :: wind(:) => null() !< - real (kind=kind_phys), pointer :: work1(:) => null() !< - real (kind=kind_phys), pointer :: work2(:) => null() !< - real (kind=kind_phys), pointer :: work3(:) => null() !< - real (kind=kind_phys), pointer :: xcosz(:) => null() !< - real (kind=kind_phys), pointer :: xlai1d(:) => null() !< - real (kind=kind_phys), pointer :: xmu(:) => null() !< - real (kind=kind_phys), pointer :: z01d(:) => null() !< - real (kind=kind_phys), pointer :: zt1d(:) => null() !< - real (kind=kind_phys), pointer :: ztmax_ice(:) => null() !< - real (kind=kind_phys), pointer :: ztmax_land(:) => null() !< - real (kind=kind_phys), pointer :: ztmax_water(:) => null() !< -!================================================================================================== -! UGWP - five mechnanisms of momentum deposition due to various types of GWs -! (oss, ofd, obl, ogw) + ngw = sum( sso + ngw) -!================================================================================================== -! nGWs - real (kind=kind_phys), pointer :: dudt_ngw(:,:) => null() !< - real (kind=kind_phys), pointer :: dvdt_ngw(:,:) => null() !< - real (kind=kind_phys), pointer :: dtdt_ngw(:,:) => null() !< - real (kind=kind_phys), pointer :: kdis_ngw(:,:) => null() !< - - real (kind=kind_phys), pointer :: tau_oss(: ) => null() !< instantaneous momentum flux due to OSS - real (kind=kind_phys), pointer :: tau_tofd(:) => null() !< instantaneous momentum flux due to TOFD - real (kind=kind_phys), pointer :: tau_mtb(:) => null() !< instantaneous momentum of mountain blocking drag - real (kind=kind_phys), pointer :: tau_ogw(:) => null() !< instantaneous momentum flux of OGWs - real (kind=kind_phys), pointer :: tau_ngw(:) => null() !< instantaneous momentum flux of NGWs - - real (kind=kind_phys), pointer :: zngw(:) => null() !< launch levels of NGWs - real (kind=kind_phys), pointer :: zmtb(:) => null() !< mountain blocking height - real (kind=kind_phys), pointer :: zlwb(:) => null() !< low level wave breaking height - real (kind=kind_phys), pointer :: zogw(:) => null() !< height of OGW-launch - - real (kind=kind_phys), pointer :: dudt_mtb(:,:) => null() !< daily aver u-wind tend due to mountain blocking - real (kind=kind_phys), pointer :: dudt_tms(:,:) => null() !< daily aver u-wind tend due to TMS - - ! RRTMGP - real (kind=kind_phys), pointer :: p_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: p_lev(:,:) => null() !< - real (kind=kind_phys), pointer :: t_lev(:,:) => null() !< - real (kind=kind_phys), pointer :: t_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: relhum(:,:) => null() !< - real (kind=kind_phys), pointer :: tv_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: qs_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: q_lay(:,:) => null() !< - real (kind=kind_phys), pointer :: deltaZ(:,:) => null() !< - real (kind=kind_phys), pointer :: cloud_overlap_param(:,:) => null() !< Cloud overlap parameter - real (kind=kind_phys), pointer :: precip_overlap_param(:,:) => null() !< Precipitation overlap parameter - real (kind=kind_phys), pointer :: tracer(:,:,:) => null() !< - real (kind=kind_phys), pointer :: aerosolslw(:,:,:,:) => null() !< Aerosol radiative properties in each LW band. - real (kind=kind_phys), pointer :: aerosolssw(:,:,:,:) => null() !< Aerosol radiative properties in each SW band. - real (kind=kind_phys), pointer :: cld_frac(:,:) => null() !< Total cloud fraction - real (kind=kind_phys), pointer :: cld_lwp(:,:) => null() !< Cloud liquid water path - real (kind=kind_phys), pointer :: cld_reliq(:,:) => null() !< Cloud liquid effective radius - real (kind=kind_phys), pointer :: cld_iwp(:,:) => null() !< Cloud ice water path - real (kind=kind_phys), pointer :: cld_reice(:,:) => null() !< Cloud ice effecive radius - real (kind=kind_phys), pointer :: cld_swp(:,:) => null() !< Cloud snow water path - real (kind=kind_phys), pointer :: cld_resnow(:,:) => null() !< Cloud snow effective radius - real (kind=kind_phys), pointer :: cld_rwp(:,:) => null() !< Cloud rain water path - real (kind=kind_phys), pointer :: cld_rerain(:,:) => null() !< Cloud rain effective radius - real (kind=kind_phys), pointer :: precip_frac(:,:) => null() !< Precipitation fraction - real (kind=kind_phys), pointer :: fluxlwUP_allsky(:,:) => null() !< RRTMGP upward longwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxlwDOWN_allsky(:,:) => null() !< RRTMGP downward longwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxlwUP_clrsky(:,:) => null() !< RRTMGP upward longwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxlwDOWN_clrsky(:,:) => null() !< RRTMGP downward longwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxswUP_allsky(:,:) => null() !< RRTMGP upward shortwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxswDOWN_allsky(:,:) => null() !< RRTMGP downward shortwave all-sky flux profile - real (kind=kind_phys), pointer :: fluxswUP_clrsky(:,:) => null() !< RRTMGP upward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: fluxswDOWN_clrsky(:,:) => null() !< RRTMGP downward shortwave clr-sky flux profile - real (kind=kind_phys), pointer :: sfc_emiss_byband(:,:) => null() !< - real (kind=kind_phys), pointer :: sec_diff_byband(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_nir_dir(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_nir_dif(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_uvvis_dir(:,:) => null() !< - real (kind=kind_phys), pointer :: sfc_alb_uvvis_dif(:,:) => null() !< - real (kind=kind_phys), pointer :: toa_src_lw(:,:) => null() !< - real (kind=kind_phys), pointer :: toa_src_sw(:,:) => null() !< - type(proflw_type), pointer :: flxprf_lw(:,:) => null() !< DDT containing RRTMGP longwave fluxes - type(profsw_type), pointer :: flxprf_sw(:,:) => null() !< DDT containing RRTMGP shortwave fluxes - type(ty_optical_props_2str) :: lw_optical_props_cloudsByBand !< RRTMGP DDT - type(ty_optical_props_2str) :: lw_optical_props_clouds !< RRTMGP DDT - type(ty_optical_props_2str) :: lw_optical_props_precipByBand !< RRTMGP DDT - type(ty_optical_props_2str) :: lw_optical_props_precip !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_clrsky !< RRTMGP DDT - type(ty_optical_props_1scl) :: lw_optical_props_aerosol !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_cloudsByBand !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_clouds !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_precipByBand !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_precip !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_clrsky !< RRTMGP DDT - type(ty_optical_props_2str) :: sw_optical_props_aerosol !< RRTMGP DDT - type(ty_gas_concs) :: gas_concentrations !< RRTMGP DDT - type(ty_source_func_lw) :: sources !< RRTMGP DDT - - !-- GSL drag suite - real (kind=kind_phys), pointer :: varss(:) => null() !< - real (kind=kind_phys), pointer :: ocss(:) => null() !< - real (kind=kind_phys), pointer :: oa4ss(:,:) => null() !< - real (kind=kind_phys), pointer :: clxss(:,:) => null() !< - - !-- 3D diagnostics - integer :: rtg_ozone_index, rtg_tke_index - - contains - procedure :: create => interstitial_create !< allocate array data - procedure :: rad_reset => interstitial_rad_reset !< reset array data for radiation - procedure :: phys_reset => interstitial_phys_reset !< reset array data for physics - - end type GFS_interstitial_type - -!------------------------- -! GFS sub-containers -!------------------------- - -!------------------------------------------------------------------------------------ -! combined type of all of the above except GFS_control_type and GFS_interstitial_type -!------------------------------------------------------------------------------------ +!---------------------------------------------------------- +! combined type of all of the above except GFS_control_type +!---------------------------------------------------------- !! \section arg_table_GFS_data_type !! \htmlinclude GFS_data_type.html !! @@ -2310,7 +1927,7 @@ module GFS_typedefs GFS_coupling_type public GFS_control_type, GFS_grid_type, GFS_tbd_type, & GFS_cldprop_type, GFS_radtend_type, GFS_diag_type - public GFS_interstitial_type, GFS_data_type + public GFS_data_type !******************************************************************************************* CONTAINS @@ -2631,6 +2248,12 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%dt_cool = zero Sfcprop%qrain = zero endif + if (Model%lsm == Model%lsm_noah) then + allocate (Sfcprop%xlaixy (IM)) + allocate (Sfcprop%rca (IM)) + Sfcprop%xlaixy = clear_val + Sfcprop%rca = clear_val + end if if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then allocate(Sfcprop%raincprv (IM)) allocate(Sfcprop%rainncprv (IM)) @@ -3050,6 +2673,23 @@ subroutine coupling_create (Coupling, IM, Model) Coupling%pfl_lsan = clear_val endif + ! -- additional coupling options for air quality + if (Model%cplaqm .and. .not.Model%cplflx) then + !--- outgoing instantaneous quantities + allocate (Coupling%dtsfci_cpl (IM)) + allocate (Coupling%dqsfci_cpl (IM)) + allocate (Coupling%nswsfci_cpl (IM)) + allocate (Coupling%t2mi_cpl (IM)) + allocate (Coupling%q2mi_cpl (IM)) + allocate (Coupling%psurfi_cpl (IM)) + Coupling%dtsfci_cpl = clear_val + Coupling%dqsfci_cpl = clear_val + Coupling%nswsfci_cpl = clear_val + Coupling%t2mi_cpl = clear_val + Coupling%q2mi_cpl = clear_val + Coupling%psurfi_cpl = clear_val + endif + !--- stochastic physics option if (Model%do_sppt .or. Model%ca_global) then allocate (Coupling%sppt_wts (IM,Model%levs)) @@ -3229,8 +2869,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: cplocn2atm = .true. !< default yes cplocn2atm coupling (turn on the feedback from ocn to atm) logical :: cplwav = .false. !< default no cplwav collection logical :: cplwav2atm = .false. !< default no cplwav2atm coupling + logical :: cplaqm = .false. !< default no cplaqm collection logical :: cplchm = .false. !< default no cplchm collection logical :: rrfs_smoke = .false. !< default no rrfs_smoke collection + integer :: dust_smoke_rrtmg_band_number = 10!< band number to affect in rrtmg_pre from smoke and dust logical :: use_cice_alb = .false. !< default no cice albedo logical :: cpl_imp_mrg = .false. !< default no merge import with internal forcings logical :: cpl_imp_dbg = .false. !< default no write import data to file post merge @@ -3303,6 +2945,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: doG_cldoptics = .false. !< Use legacy RRTMG cloud-optics? logical :: doGP_cldoptics_PADE = .false. !< Use RRTMGP cloud-optics: PADE approximation? logical :: doGP_cldoptics_LUT = .false. !< Use RRTMGP cloud-optics: LUTs? + integer :: iovr_convcld = 1 !< Cloud-overlap assumption for convective-cloud (defaults to iovr if not set) integer :: rrtmgp_nrghice = 3 !< Number of ice-roughness categories integer :: rrtmgp_nGauss_ang = 1 !< Number of angles used in Gaussian quadrature logical :: do_GPsw_Glw = .false. @@ -3311,6 +2954,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: lfnc_k = -999 !< real(kind=kind_phys) :: lfnc_p0 = -999 !< logical :: doGP_lwscat = .false. !< If true, include scattering in longwave cloud-optics, only compatible w/ GP cloud-optics + logical :: doGP_sgs_cnv = .false. !< If true, include SubGridScale convective cloud in RRTMGP + logical :: doGP_sgs_mynn = .false. !< If true, include SubGridScale MYNN-EDMF cloud in RRTMGP !--- Z-C microphysical parameters integer :: imp_physics = 99 !< choice of cloud scheme real(kind=kind_phys) :: psautco(2) = (/6.0d-4,3.0d-4/) !< [in] auto conversion coeff from ice to snow @@ -3359,6 +3004,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: fh_dfi_radar(1+dfi_radar_max_intervals) = -2e10 !< begin&end of four timespans over which radar_tten is applied logical :: do_cap_suppress = .true. !< set .true. to turn on convection suppression in GF scheme during limited intervals when fh_dfi_radar is enabled + !--- NSSL microphysics params + real(kind=kind_phys) :: nssl_cccn = 0.6e9 !< CCN concentration (m-3) + real(kind=kind_phys) :: nssl_alphah = 0.0 !< graupel shape parameter + real(kind=kind_phys) :: nssl_alphahl = 1.0 !< hail shape parameter + logical :: nssl_hail_on = .false. !< NSSL flag to activate the hail category + logical :: nssl_ccn_on = .true. !< NSSL flag to activate the CCN category + logical :: nssl_invertccn = .true. !< NSSL flag to treat CCN as activated (true) or unactivated (false) + !--- Thompson microphysical parameters logical :: ltaerosol = .false. !< flag for aerosol version logical :: lradar = .false. !< flag for radar reflectivity @@ -3410,6 +3063,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: iopt_snf = 1 !rainfall & snowfall (1-jordan91; 2->bats; 3->noah) integer :: iopt_tbot = 2 !lower boundary of soil temperature (1->zero-flux; 2->noah) integer :: iopt_stc = 1 !snow/soil temperature time scheme (only layer 1) + integer :: iopt_trs = 2 !thermal roughness scheme (1-z0h=z0m; 2-czil; 3-ec;4-kb reversed) logical :: use_ufo = .false. !< flag for gcycle surface option @@ -3516,6 +3170,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: bl_mynn_closure = 2.6 !< <= 2.5 only prognose tke !< 2.5 < and < 3.0, prognose tke and q'2 !< >= 3.0, prognose tke, q'2, T'2, and T'q' + logical :: sfclay_compute_diag = .false. + logical :: sfclay_compute_flux = .false. + integer :: isftcflx = 0 + integer :: iz0tlnd = 0 real(kind=kind_phys) :: var_ric = 1.0 real(kind=kind_phys) :: coef_ric_l = 0.16 real(kind=kind_phys) :: coef_ric_s = 0.25 @@ -3554,12 +3212,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & real(kind=kind_phys) :: ral_ts = 0.0d0 !< time scale for Rayleigh damping in days !--- mass flux deep convection -! real(kind=kind_phys) :: clam_deep = 0.1 !< c_e for deep convection (Han and Pan, 2011, eq(6)) - real(kind=kind_phys) :: clam_deep = 0.07 !< c_e for deep convection (Han and Pan, 2011, eq(6)) + real(kind=kind_phys) :: clam_deep = 0.1 !< c_e for deep convection (Han and Pan, 2011, eq(6)) real(kind=kind_phys) :: c0s_deep = 0.002 !< convective rain conversion parameter real(kind=kind_phys) :: c1_deep = 0.002 !< conversion parameter of detrainment from liquid water into grid-scale cloud water - real(kind=kind_phys) :: betal_deep = 0.01 !< fraction factor of downdraft air mass reaching ground surface over land - real(kind=kind_phys) :: betas_deep = 0.01 !< fraction factor of downdraft air mass reaching ground surface over sea + real(kind=kind_phys) :: betal_deep = 0.05 !< fraction factor of downdraft air mass reaching ground surface over land + real(kind=kind_phys) :: betas_deep = 0.05 !< fraction factor of downdraft air mass reaching ground surface over sea real(kind=kind_phys) :: evef = 0.09 !< evaporation factor from convective rain real(kind=kind_phys) :: evfact_deep = 0.3 !< evaporation factor from convective rain real(kind=kind_phys) :: evfactl_deep = 0.3 !< evaporation factor from convective rain over land @@ -3689,7 +3346,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: skeb_npass = 11 integer :: lndp_type = 0 integer :: n_var_lndp = 0 - logical :: lndp_each_step = .false. integer :: n_var_spp = 0 integer :: spp_pbl = 0 integer :: spp_sfc = 0 @@ -3715,7 +3371,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: fire_turb = .false. ! enh vertmix option by MYNN PBL !--- aerosol scavenging factors - integer, parameter :: max_scav_factors = 25 + integer, parameter :: max_scav_factors = 183 character(len=40) :: fscav_aero(max_scav_factors) real(kind=kind_phys) :: radar_tten_limits(2) = (/ limit_unspecified, limit_unspecified /) @@ -3729,9 +3385,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & naux3d, aux2d_time_avg, aux3d_time_avg, fhcyc, & thermodyn_id, sfcpress_id, & !--- coupling parameters - cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplchm, & - cpl_imp_mrg, cpl_imp_dbg, rrfs_smoke, & - use_cice_alb, & + cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplaqm, & + cplchm, cpl_imp_mrg, cpl_imp_dbg, rrfs_smoke, & + use_cice_alb, dust_smoke_rrtmg_band_number, & #ifdef IDEA_PHYS lsidea, weimer_model, f107_kp_size, f107_kp_interval, & f107_kp_skip_size, f107_kp_data_size, f107_kp_read_in_start, & @@ -3751,7 +3407,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & doG_cldoptics, doGP_cldoptics_PADE, doGP_cldoptics_LUT, & rrtmgp_nrghice, rrtmgp_nGauss_ang, do_GPsw_Glw, & use_LW_jacobian, doGP_lwscat, damp_LW_fluxadj, lfnc_k, & - lfnc_p0, & + lfnc_p0, iovr_convcld, doGP_sgs_cnv, doGP_sgs_mynn, & ! IN CCN forcing iccn, & !--- microphysical parameterizations @@ -3765,6 +3421,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ltaerosol, lradar, nsradar_reset, lrefres, ttendlim, & ext_diag_thompson, dt_inner, lgfdlmprad, & sedi_semi, decfl, & + nssl_cccn, nssl_alphah, nssl_alphahl, & + nssl_invertccn, nssl_hail_on, nssl_ccn_on, & !--- max hourly avg_max_length, & !--- land/surface model control @@ -3774,6 +3432,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ! Noah MP options iopt_dveg,iopt_crs,iopt_btr,iopt_run,iopt_sfc, iopt_frz, & iopt_inf, iopt_rad,iopt_alb,iopt_snf,iopt_tbot,iopt_stc, & + iopt_trs, & ! GFDL surface layer options lcurr_sf, pert_cd, ntsflg, sfenth, & !--- lake model control @@ -3788,6 +3447,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & bl_mynn_edmf_tke, bl_mynn_mixlength, bl_mynn_cloudmix, & bl_mynn_mixqt, bl_mynn_output, icloud_bl, bl_mynn_tkeadvect, & bl_mynn_closure, bl_mynn_tkebudget, & + isftcflx, iz0tlnd, sfclay_compute_flux, sfclay_compute_diag, & ! *DH gwd_opt, do_ugwp_v0, do_ugwp_v0_orog_only, & do_ugwp_v0_nst_only, & @@ -3804,7 +3464,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & dlqf, rbcr, shoc_parm, psauras, prauras, wminras, & do_sppt, do_shum, do_skeb, & do_spp, n_var_spp, & - lndp_type, n_var_lndp, lndp_each_step, & + lndp_type, n_var_lndp, & pert_mp,pert_clds,pert_radtend, & !--- Rayleigh friction prslrd0, ral_ts, ldiag_ugwp, do_ugwp, do_tofd, & @@ -4046,13 +3706,15 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%cplocn2atm = cplocn2atm Model%cplwav = cplwav Model%cplwav2atm = cplwav2atm - Model%cplchm = cplchm + Model%cplaqm = cplaqm + Model%cplchm = cplchm .or. cplaqm Model%use_cice_alb = use_cice_alb Model%cpl_imp_mrg = cpl_imp_mrg Model%cpl_imp_dbg = cpl_imp_dbg !--- RRFS Smoke Model%rrfs_smoke = rrfs_smoke + Model%dust_smoke_rrtmg_band_number = dust_smoke_rrtmg_band_number Model%seas_opt = seas_opt Model%dust_opt = dust_opt Model%biomass_burn_opt = biomass_burn_opt @@ -4177,11 +3839,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%doG_cldoptics = doG_cldoptics Model%doGP_cldoptics_PADE = doGP_cldoptics_PADE Model%doGP_cldoptics_LUT = doGP_cldoptics_LUT + Model%iovr_convcld = iovr_convcld Model%use_LW_jacobian = use_LW_jacobian Model%damp_LW_fluxadj = damp_LW_fluxadj Model%lfnc_k = lfnc_k Model%lfnc_p0 = lfnc_p0 Model%doGP_lwscat = doGP_lwscat + Model%doGP_sgs_cnv = doGP_sgs_cnv + Model%doGP_sgs_mynn = doGP_sgs_mynn if (Model%do_RRTMGP) then ! RRTMGP incompatible with levr /= levs if (Model%levr /= Model%levs) then @@ -4193,6 +3858,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & write(0,*) "Logic error, RRTMGP Longwave cloud-scattering not supported with RRTMG cloud-optics." stop end if + if (Model%doGP_sgs_mynn .and. .not. do_mynnedmf) then + write(0,*) "Logic error, RRTMGP flag doGP_sgs_mynn only works with do_mynnedmf=.true." + stop + endif if (Model%doGP_cldoptics_PADE .and. Model%doGP_cldoptics_LUT) then write(0,*) "Logic error, Both RRTMGP cloud-optics options cannot be selected. " stop @@ -4266,6 +3935,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%tcr = tcr Model%tcrf = 1.0/(tcr-tf) +!-- NSSL microphysics params + Model%nssl_cccn = nssl_cccn + Model%nssl_alphah = nssl_alphah + Model%nssl_alphahl = nssl_alphahl + Model%nssl_hail_on = nssl_hail_on + Model%nssl_ccn_on = nssl_ccn_on + Model%nssl_invertccn = nssl_invertccn + !--- Thompson MP parameters Model%ltaerosol = ltaerosol Model%lradar = lradar @@ -4286,7 +3963,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- GFDL MP parameters Model%lgfdlmprad = lgfdlmprad -!--- Thompson,GFDL MP parameter +!--- Thompson,GFDL,NSSL MP parameter Model%lrefres = lrefres !--- land/surface model parameters @@ -4308,8 +3985,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & end if ! DH* TODO - need to clean up how different land surface models handle initializing zs and dzs ! For Noah and NoahMP, hardcode here for the moment; for RUC, these variables get initialized - ! in the RUC LSM init calls; for Noah WRF4, dzs gets initialized in sfc_noah_wrfv4_interstitial - ! init, and zs doesn't get used at all. + ! in the RUC LSM init calls. ! Allocate variables to store depth/thickness of soil layers allocate (Model%zs (Model%lsoil_lsm)) allocate (Model%dzs(Model%lsoil_lsm)) @@ -4370,9 +4046,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lsnow_lsm_lbound = 0 Model%lsnow_lsm_ubound = 0 end if - Model%isurban = -999 !GJF isurban is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init - Model%isice = -999 !GJF isice is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init - Model%iswater = -999 !GJF iswater is only used in NOAH WRFv4 and is initialized in sfc_noah_GFS_interstitial.F90/sfc_noah_GFS_pre_init Model%iopt_thcnd = iopt_thcnd Model%ua_phys = ua_phys Model%usemonalb = usemonalb @@ -4405,6 +4078,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%iopt_snf = iopt_snf Model%iopt_tbot = iopt_tbot Model%iopt_stc = iopt_stc + Model%iopt_trs = iopt_trs !--- tuning parameters for physical parameterizations Model%ras = ras @@ -4505,6 +4179,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%bl_mynn_closure = bl_mynn_closure Model%bl_mynn_tkebudget = bl_mynn_tkebudget Model%icloud_bl = icloud_bl + Model%isftcflx = isftcflx + Model%iz0tlnd = iz0tlnd + Model%sfclay_compute_flux = sfclay_compute_flux + Model%sfclay_compute_diag = sfclay_compute_diag Model%var_ric = var_ric Model%coef_ric_l = coef_ric_l Model%coef_ric_s = coef_ric_s @@ -4616,7 +4294,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- stochastic surface perturbation options Model%lndp_type = lndp_type Model%n_var_lndp = n_var_lndp - Model%lndp_each_step = lndp_each_step Model%do_spp = do_spp Model%n_var_spp = n_var_spp @@ -4630,8 +4307,10 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if (Model%do_spp) then allocate(Model%spp_var_list(Model%n_var_spp)) allocate(Model%spp_prt_list(Model%n_var_spp)) + allocate(Model%spp_stddev_cutoff(Model%n_var_spp)) Model%spp_var_list(:) = '' Model%spp_prt_list(:) = clear_val + Model%spp_stddev_cutoff(:) = clear_val end if !--- cellular automata options @@ -4697,12 +4376,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%ntrw = get_tracer_index(Model%tracer_names, 'rainwat', Model%me, Model%master, Model%debug) Model%ntsw = get_tracer_index(Model%tracer_names, 'snowwat', Model%me, Model%master, Model%debug) Model%ntgl = get_tracer_index(Model%tracer_names, 'graupel', Model%me, Model%master, Model%debug) + Model%nthl = get_tracer_index(Model%tracer_names, 'hailwat', Model%me, Model%master, Model%debug) Model%ntclamt = get_tracer_index(Model%tracer_names, 'cld_amt', Model%me, Model%master, Model%debug) Model%ntlnc = get_tracer_index(Model%tracer_names, 'water_nc', Model%me, Model%master, Model%debug) Model%ntinc = get_tracer_index(Model%tracer_names, 'ice_nc', Model%me, Model%master, Model%debug) Model%ntrnc = get_tracer_index(Model%tracer_names, 'rain_nc', Model%me, Model%master, Model%debug) Model%ntsnc = get_tracer_index(Model%tracer_names, 'snow_nc', Model%me, Model%master, Model%debug) Model%ntgnc = get_tracer_index(Model%tracer_names, 'graupel_nc', Model%me, Model%master, Model%debug) + Model%nthnc = get_tracer_index(Model%tracer_names, 'hail_nc', Model%me, Model%master, Model%debug) + Model%ntccn = get_tracer_index(Model%tracer_names, 'ccn_nc', Model%me, Model%master, Model%debug) + Model%ntccna = get_tracer_index(Model%tracer_names, 'ccna_nc', Model%me, Model%master, Model%debug) + Model%ntgv = get_tracer_index(Model%tracer_names, 'graupel_vol',Model%me, Model%master, Model%debug) + Model%nthv = get_tracer_index(Model%tracer_names, 'hail_vol', Model%me, Model%master, Model%debug) Model%ntke = get_tracer_index(Model%tracer_names, 'sgs_tke', Model%me, Model%master, Model%debug) Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef', Model%me, Model%master, Model%debug) Model%ntwa = get_tracer_index(Model%tracer_names, 'liq_aero', Model%me, Model%master, Model%debug) @@ -4839,12 +4524,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & call label_dtend_tracer(Model,100+Model%ntrw,'rainwat','rain water','kg kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntsw,'snowwat','snow water','kg kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntgl,'graupel','graupel','kg kg-1 s-1') + call label_dtend_tracer(Model,100+Model%nthl,'hailwat','hail','kg kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntclamt,'cld_amt','cloud amount integer','kg kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntlnc,'water_nc','liquid number concentration','kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntinc,'ice_nc','ice number concentration','kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntrnc,'rain_nc','rain number concentration','kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntsnc,'snow_nc','snow number concentration','kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntgnc,'graupel_nc','graupel number concentration','kg-1 s-1') + call label_dtend_tracer(Model,100+Model%nthnc,'hail_nc','hail number concentration','kg-1 s-1') + call label_dtend_tracer(Model,100+Model%ntccn,'ccn_nc','CCN number concentration','kg-1 s-1') + call label_dtend_tracer(Model,100+Model%ntgv,'graupel_vol','graupel volume','m3 kg-1 s-1') + call label_dtend_tracer(Model,100+Model%nthv,'hail_vol','hail volume','m3 kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntke,'sgs_tke','turbulent kinetic energy','J s-1') call label_dtend_tracer(Model,100+Model%nqrimef,'q_rimef','mass weighted rime factor','kg-1 s-1') call label_dtend_tracer(Model,100+Model%ntwa,'liq_aero','number concentration of water-friendly aerosols','kg-1 s-1') @@ -4911,14 +4601,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if(itrac==Model%ntchs) exit ! remaining tracers are chemical if ( itrac /= Model%ntcw .and. itrac /= Model%ntiw .and. itrac /= Model%ntclamt .and. & itrac /= Model%ntrw .and. itrac /= Model%ntsw .and. itrac /= Model%ntrnc .and. & - itrac /= Model%ntsnc .and. itrac /= Model%ntgl .and. itrac /= Model%ntgnc) then + itrac /= Model%ntsnc .and. itrac /= Model%ntgl .and. itrac /= Model%ntgnc .and. & + itrac /= Model%nthl .and. itrac /= Model%nthnc .and. itrac /= Model%nthv .and. & + itrac /= Model%ntgv ) then call fill_dtidx(Model,dtend_select,100+itrac,Model%index_of_process_scnv,have_scnv) call fill_dtidx(Model,dtend_select,100+itrac,Model%index_of_process_dcnv,have_dcnv) else if(Model%ntchs<=0 .or. itrac 1 ) THEN + IF (Model%me == Model%master) then + write(*,*) 'NSSL micro: error! CCN is OFF (nssl_ccn_on = F) but ntccn > 1.' + write(*,*) 'Should either remove ccn_nc from field_table or set nssl_ccn_on = .true.' + write(0,*) 'NSSL micro: error! CCN is OFF (nssl_ccn_on = F) but ntccn > 1.' + write(0,*) 'Should either remove ccn_nc from field_table or set nssl_ccn_on = .true.' + ENDIF + stop + ENDIF + Model%ntccn = -99 + Model%ntccna = -99 + ELSEIF ( Model%ntccn < 1 ) THEN + if (Model%me == Model%master) then + write(*,*) 'NSSL micro: error! CCN is ON but ntccn < 1. Must have ccn_nc in field_table if nssl_ccn_on=T' + write(0,*) 'NSSL micro: error! CCN is ON but ntccn < 1. Must have ccn_nc in field_table if nssl_ccn_on=T' + ENDIF + stop + ELSE + if (Model%me == Model%master) then + write(*,*) 'NSSL micro: CCN is ON' + ENDIF + IF ( Model%ntccna > 1 .and. Model%me == Model%master ) THEN + write(*,*) 'NSSL micro: CCNA is ON' + ENDIF + ENDIF + + if (Model%me == Model%master) then + write(*,*) 'Model%nthl = ',Model%nthl + ENDIF + IF ( ( Model%nthl < 1 ) ) THEN ! check if hail is in the field_table. If not, set flag so the microphysics knows. + if (Model%me == Model%master) then + write(*,*) 'NSSL micro: hail is OFF' + IF ( nssl_hail_on ) write(*,*) 'Namelist had nssl_hail_on=true, but tracer config does not have hailwat' + ENDIF + nssl_hail_on = .false. + Model%nssl_hail_on = .false. + ! pretend that hail exists so that bad arrays are not passed to microphysics +! Model%nthl = Max( 1, Model%ntgl ) +! Model%nthv = Max( 1, Model%ntgv ) +! Model%nthnc = Max( 1, Model%ntgnc ) + ELSE + nssl_hail_on = .true. + Model%nssl_hail_on = .true. + if (Model%me == Model%master) then + write(*,*) 'NSSL micro: hail is ON' + IF ( .not. nssl_hail_on ) write(*,*) 'Namelist had nssl_hail_on=false, but tracer config has hailwat' + ENDIF + IF ( Model%nthv < 1 .or. Model%nthnc < 1 ) THEN + if (Model%me == Model%master) THEN + write(0,*) 'missing needed tracers for NSSL hail! nthl > 1 but either volume or number is not in field_table' + write(0,*) 'nthv, nthnc = ', Model%nthv, Model%nthnc + ENDIF + stop + ENDIF + ENDIF + + Model%nssl_hail_on = nssl_hail_on + + IF ( ( Model%ntccn < 1 ) ) THEN ! check if ccn is in the field_table. If not, set flag so the microphysics knows. + if (Model%me == Model%master) then + write(*,*) 'NSSL micro: CCN is OFF' + ENDIF + nssl_ccn_on = .false. + Model%nssl_ccn_on = .false. + ELSE + nssl_ccn_on = .true. + Model%nssl_ccn_on = .true. + if (Model%me == Model%master) then + write(*,*) 'NSSL micro: CCN is ON' + ENDIF + ENDIF + + IF ( Model%ntgl < 1 .or. Model%ntgv < 1 .or. Model%ntgnc < 1 .or. & + Model%ntsw < 1 .or. Model%ntsnc < 1 .or. & + Model%ntrw < 1 .or. Model%ntrnc < 1 .or. & + Model%ntiw < 1 .or. Model%ntinc < 1 .or. & + Model%ntcw < 1 .or. Model%ntlnc < 1 & + ) THEN + if (Model%me == Model%master) write(0,*) 'missing needed tracers for NSSL!' + stop + ENDIF + + + ENDIF !} + ! To ensure that these values match what's in the physics, ! array sizes are compared during model init in GFS_phys_time_vary_init() ! @@ -5090,9 +4878,19 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ' bl_mynn_cloudpdf=',Model%bl_mynn_cloudpdf, & ' bl_mynn_mixlength=',Model%bl_mynn_mixlength, & ' bl_mynn_edmf=',Model%bl_mynn_edmf, & - ' bl_mynn_output=',Model%bl_mynn_output + ' bl_mynn_output=',Model%bl_mynn_output, & + ' bl_mynn_closure=',Model%bl_mynn_closure endif + !--- mynn surface layer scheme + if (Model%do_mynnsfclay) then + if (Model%me == Model%master) print *,' MYNN surface layer scheme is used:', & + ' isftcflx=',Model%isftcflx, & + ' iz0tlnd=',Model%iz0tlnd, & + ' sfclay_compute_diag=',Model%sfclay_compute_diag, & + ' sfclay_compute_flux=',Model%sfclay_compute_flux + end if + !--- set number of cloud types if (Model%cscnv) then Model%nctp = nint(Model%cs_parm(5)) @@ -5134,6 +4932,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & print *,'iopt_snf = ', Model%iopt_snf print *,'iopt_tbot = ',Model%iopt_tbot print *,'iopt_stc = ', Model%iopt_stc + print *,'iopt_trs = ', Model%iopt_trs elseif (Model%lsm == Model%lsm_ruc) then print *,' RUC Land Surface Model used' else @@ -5343,6 +5142,39 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !Model%nseffr = 3 !if (Model%me == Model%master) print *,' Using wsm6 microphysics' + elseif (Model%imp_physics == Model%imp_physics_nssl) then !NSSL microphysics + Model%npdf3d = 0 + Model%num_p3d = 4 ! for size of phy3d + Model%num_p2d = 1 + Model%pdfcld = .false. + Model%shcnvcw = .false. + IF ( Model%nssl_hail_on ) THEN + i = 1 + ELSE + i = 0 + ENDIF + if ( nwat /= 6+i ) then + print *,' NSSL MP requires nwat to be set to ', 6+i,' - job aborted, nssl_hail_on = ',nssl_hail_on + stop + end if + Model%nleffr = 1 + Model%nieffr = 2 + Model%nseffr = 3 + Model%nreffr = 4 + Model%lradar = .true. + if (.not. Model%effr_in) then + print *,' NSSL MP requires effr_in to be set to .true., changing value from false to true' + Model%effr_in = .true. + effr_in = .true. + ENDIF + if (Model%me == Model%master) print *,' Using NSSL double moment microphysics', & + ' nssl_ccn_on =',Model%nssl_ccn_on, & + ' nssl_invertccn =',Model%nssl_invertccn, & + ' lradar =',Model%lradar, & + ' num_p3d =',Model%num_p3d, & + ' num_p2d =',Model%num_p2d + + elseif (Model%imp_physics == Model%imp_physics_thompson) then !Thompson microphysics Model%npdf3d = 0 Model%num_p3d = 3 @@ -5751,11 +5583,31 @@ subroutine control_print(Model) print *, ' cplocn2atm : ', Model%cplocn2atm print *, ' cplwav : ', Model%cplwav print *, ' cplwav2atm : ', Model%cplwav2atm + print *, ' cplaqm : ', Model%cplaqm print *, ' cplchm : ', Model%cplchm print *, ' rrfs_smoke : ', Model%rrfs_smoke print *, ' use_cice_alb : ', Model%use_cice_alb print *, ' cpl_imp_mrg : ', Model%cpl_imp_mrg print *, ' cpl_imp_dbg : ', Model%cpl_imp_dbg + if(model%rrfs_smoke) then + print *, ' ' + print *, 'smoke parameters' + print *, 'dust_smoke_rrtmg_band_number : ',Model%dust_smoke_rrtmg_band_number + print *, 'seas_opt : ',Model%seas_opt + print *, 'dust_opt : ',Model%dust_opt + print *, 'biomass_burn_opt : ',Model%biomass_burn_opt + print *, 'drydep_opt : ',Model%drydep_opt + print *, 'wetdep_ls_opt : ',Model%wetdep_ls_opt + print *, 'do_plumerise : ',Model%do_plumerise + print *, 'plumerisefire_frq: ',Model%plumerisefire_frq + print *, 'addsmoke_flag : ',Model%addsmoke_flag + print *, 'smoke_forecast : ',Model%smoke_forecast + print *, 'aero_ind_fdb : ',Model%aero_ind_fdb + print *, 'aero_dir_fdb : ',Model%aero_dir_fdb + print *, 'rrfs_smoke_debug : ',Model%rrfs_smoke_debug + print *, 'mix_chem : ',Model%mix_chem + print *, 'fire_turb : ',Model%fire_turb + endif print *, ' ' print *, ' lsidea : ', Model%lsidea print *, ' ' @@ -5822,6 +5674,9 @@ subroutine control_print(Model) print *, ' lfnc_k : ', Model%lfnc_k print *, ' lfnc_p0 : ', Model%lfnc_p0 print *, ' doGP_lwscat : ', Model%doGP_lwscat + print *, ' doGP_sgs_cnv : ', Model%doGP_sgs_cnv + print *, ' doGP_sgs_mynn : ', Model%doGP_sgs_cnv + print *, ' iovr_convcld : ', Model%iovr_convcld endif print *, ' ' print *, 'microphysical switch' @@ -5849,6 +5704,15 @@ subroutine control_print(Model) print *, ' decfl : ', Model%decfl print *, ' ' endif + if (Model%imp_physics == Model%imp_physics_nssl) then + print *, ' NSSL microphysical parameters' + print *, ' nssl_cccn - CCCN background CCN conc. : ', Model%nssl_cccn + print *, ' nssl_alphah - graupel shape parameter : ', Model%nssl_alphah + print *, ' nssl_alphahl - hail shape parameter : ', Model%nssl_alphahl + print *, ' nssl_hail_on - hail activation flag : ', Model%nssl_hail_on + print *, ' lradar - radar refl. flag : ', Model%lradar + print *, ' lrefres : ', Model%lrefres + endif if (Model%imp_physics == Model%imp_physics_mg) then print *, ' M-G microphysical parameters' print *, ' fprcp : ', Model%fprcp @@ -5924,6 +5788,7 @@ subroutine control_print(Model) print *, ' iopt_snf : ', Model%iopt_snf print *, ' iopt_tbot : ', Model%iopt_tbot print *, ' iopt_stc : ', Model%iopt_stc + print *, ' iopt_trs : ', Model%iopt_trs endif print *, ' use_ufo : ', Model%use_ufo print *, ' lcurr_sf : ', Model%lcurr_sf @@ -6072,7 +5937,6 @@ subroutine control_print(Model) print *, ' do_skeb : ', Model%do_skeb print *, ' lndp_type : ', Model%lndp_type print *, ' n_var_lndp : ', Model%n_var_lndp - print *, ' lndp_each_step : ', Model%lndp_each_step print *, ' do_spp : ', Model%do_spp print *, ' n_var_spp : ', Model%n_var_spp print *, ' ' @@ -6110,12 +5974,18 @@ subroutine control_print(Model) print *, ' ntrw : ', Model%ntrw print *, ' ntsw : ', Model%ntsw print *, ' ntgl : ', Model%ntgl + print *, ' nthl : ', Model%nthl print *, ' ntclamt : ', Model%ntclamt print *, ' ntlnc : ', Model%ntlnc print *, ' ntinc : ', Model%ntinc print *, ' ntrnc : ', Model%ntrnc print *, ' ntsnc : ', Model%ntsnc print *, ' ntgnc : ', Model%ntgnc + print *, ' nthnc : ', Model%nthnc + print *, ' ntccn : ', Model%ntccn + print *, ' ntccna : ', Model%ntccna + print *, ' ntgv : ', Model%ntgv + print *, ' nthv : ', Model%nthv print *, ' ntke : ', Model%ntke print *, ' nto : ', Model%nto print *, ' nto2 : ', Model%nto2 @@ -7013,6 +6883,13 @@ subroutine diag_create (Diag, IM, Model) Diag%thompson_ext_diag3d = clear_val endif + ! Air quality diagnostics + ! -- initialize diagnostic variables + if (Model%cplaqm) then + allocate (Diag%aod(IM)) + Diag%aod = zero + end if + ! Auxiliary arrays in output for debugging if (Model%naux2d>0) then allocate (Diag%aux2d(IM,Model%naux2d)) @@ -7283,1007 +7160,4 @@ subroutine diag_phys_zero (Diag, Model, linit, iauwindow_center) end subroutine diag_phys_zero - !------------------------- - ! GFS_interstitial_type%create - !------------------------- - subroutine interstitial_create (Interstitial, IM, Model) - ! - implicit none - ! - class(GFS_interstitial_type) :: Interstitial - integer, intent(in) :: IM - type(GFS_control_type), intent(in) :: Model - integer :: iGas - ! - allocate (Interstitial%otspt (Model%ntracp1,2)) - ! Set up numbers of tracers for PBL, convection, etc: sets - ! Interstitial%{nvdiff,mg3_as_mg2,nn,tracers_total,ntcwx,ntiwx,ntk,ntkev,otspt,nsamftrac,ncstrac,nscav} - call interstitial_setup_tracers(Interstitial, Model) - ! Allocate arrays - allocate (Interstitial%adjsfculw_land (IM)) - allocate (Interstitial%adjsfculw_ice (IM)) - allocate (Interstitial%adjsfculw_water (IM)) - allocate (Interstitial%adjnirbmd (IM)) - allocate (Interstitial%adjnirbmu (IM)) - allocate (Interstitial%adjnirdfd (IM)) - allocate (Interstitial%adjnirdfu (IM)) - allocate (Interstitial%adjvisbmd (IM)) - allocate (Interstitial%adjvisbmu (IM)) - allocate (Interstitial%adjvisdfu (IM)) - allocate (Interstitial%adjvisdfd (IM)) - allocate (Interstitial%aerodp (IM,NSPC1)) - allocate (Interstitial%alb1d (IM)) - if (.not. Model%do_RRTMGP) then - ! RRTMGP uses its own cloud_overlap_param - allocate (Interstitial%alpha (IM,Model%levr+LTP)) - end if - allocate (Interstitial%bexp1d (IM)) - allocate (Interstitial%cd (IM)) - allocate (Interstitial%cd_ice (IM)) - allocate (Interstitial%cd_land (IM)) - allocate (Interstitial%cd_water (IM)) - allocate (Interstitial%cdq (IM)) - allocate (Interstitial%cdq_ice (IM)) - allocate (Interstitial%cdq_land (IM)) - allocate (Interstitial%cdq_water (IM)) - allocate (Interstitial%chh_ice (IM)) - allocate (Interstitial%chh_land (IM)) - allocate (Interstitial%chh_water (IM)) - allocate (Interstitial%cldf (IM)) - allocate (Interstitial%cldsa (IM,5)) - allocate (Interstitial%cldtaulw (IM,Model%levr+LTP)) - allocate (Interstitial%cldtausw (IM,Model%levr+LTP)) - allocate (Interstitial%cld1d (IM)) - allocate (Interstitial%clouds (IM,Model%levr+LTP,NF_CLDS)) - allocate (Interstitial%clw (IM,Model%levs,Interstitial%nn)) - allocate (Interstitial%clx (IM,4)) - allocate (Interstitial%cmm_ice (IM)) - allocate (Interstitial%cmm_land (IM)) - allocate (Interstitial%cmm_water (IM)) - allocate (Interstitial%cnvc (IM,Model%levs)) - allocate (Interstitial%cnvw (IM,Model%levs)) - allocate (Interstitial%ctei_r (IM)) - allocate (Interstitial%ctei_rml (IM)) - allocate (Interstitial%cumabs (IM)) - allocate (Interstitial%dd_mf (IM,Model%levs)) - allocate (Interstitial%de_lgth (IM)) - allocate (Interstitial%del (IM,Model%levs)) - allocate (Interstitial%del_gz (IM,Model%levs+1)) - allocate (Interstitial%delr (IM,Model%levr+LTP)) - allocate (Interstitial%dlength (IM)) - allocate (Interstitial%dqdt (IM,Model%levs,Model%ntrac)) - allocate (Interstitial%dqsfc1 (IM)) - allocate (Interstitial%drain (IM)) - allocate (Interstitial%dtdt (IM,Model%levs)) - allocate (Interstitial%dtsfc1 (IM)) - allocate (Interstitial%dt_mf (IM,Model%levs)) - allocate (Interstitial%dtzm (IM)) - allocate (Interstitial%dudt (IM,Model%levs)) - allocate (Interstitial%dusfcg (IM)) - allocate (Interstitial%dusfc1 (IM)) - allocate (Interstitial%dvdt (IM,Model%levs)) - allocate (Interstitial%dvsfcg (IM)) - allocate (Interstitial%dvsfc1 (IM)) - allocate (Interstitial%dvdftra (IM,Model%levs,Interstitial%nvdiff)) - allocate (Interstitial%dzlyr (IM,Model%levr+LTP)) - allocate (Interstitial%elvmax (IM)) - allocate (Interstitial%ep1d (IM)) - allocate (Interstitial%ep1d_ice (IM)) - allocate (Interstitial%ep1d_land (IM)) - allocate (Interstitial%ep1d_water (IM)) - allocate (Interstitial%evap_ice (IM)) - allocate (Interstitial%evap_land (IM)) - allocate (Interstitial%evap_water (IM)) - allocate (Interstitial%evbs (IM)) - allocate (Interstitial%evcw (IM)) - allocate (Interstitial%pah (IM)) - allocate (Interstitial%ecan (IM)) - allocate (Interstitial%etran (IM)) - allocate (Interstitial%edir (IM)) - allocate (Interstitial%faerlw (IM,Model%levr+LTP,NBDLW,NF_AELW)) - allocate (Interstitial%faersw (IM,Model%levr+LTP,NBDSW,NF_AESW)) - allocate (Interstitial%ffhh_ice (IM)) - allocate (Interstitial%ffhh_land (IM)) - allocate (Interstitial%ffhh_water (IM)) - allocate (Interstitial%fh2 (IM)) - allocate (Interstitial%fh2_ice (IM)) - allocate (Interstitial%fh2_land (IM)) - allocate (Interstitial%fh2_water (IM)) - allocate (Interstitial%flag_cice (IM)) - allocate (Interstitial%flag_guess (IM)) - allocate (Interstitial%flag_iter (IM)) - allocate (Interstitial%ffmm_ice (IM)) - allocate (Interstitial%ffmm_land (IM)) - allocate (Interstitial%ffmm_water (IM)) - allocate (Interstitial%fm10 (IM)) - allocate (Interstitial%fm10_ice (IM)) - allocate (Interstitial%fm10_land (IM)) - allocate (Interstitial%fm10_water (IM)) - allocate (Interstitial%frland (IM)) - allocate (Interstitial%fscav (Interstitial%nscav)) - allocate (Interstitial%fswtr (Interstitial%nscav)) - allocate (Interstitial%gabsbdlw (IM)) - allocate (Interstitial%gabsbdlw_ice (IM)) - allocate (Interstitial%gabsbdlw_land (IM)) - allocate (Interstitial%gabsbdlw_water (IM)) - allocate (Interstitial%gamma (IM)) - allocate (Interstitial%gamq (IM)) - allocate (Interstitial%gamt (IM)) - allocate (Interstitial%gasvmr (IM,Model%levr+LTP,NF_VGAS)) - allocate (Interstitial%gflx (IM)) - allocate (Interstitial%gflx_ice (IM)) - allocate (Interstitial%gflx_land (IM)) - allocate (Interstitial%gflx_water (IM)) - allocate (Interstitial%gwdcu (IM,Model%levs)) - allocate (Interstitial%gwdcv (IM,Model%levs)) - allocate (Interstitial%zvfun (IM)) - allocate (Interstitial%hffac (IM)) - allocate (Interstitial%hflxq (IM)) - allocate (Interstitial%hflx_ice (IM)) - allocate (Interstitial%hflx_land (IM)) - allocate (Interstitial%hflx_water (IM)) - allocate (Interstitial%htlwc (IM,Model%levr+LTP)) - allocate (Interstitial%htlw0 (IM,Model%levr+LTP)) - allocate (Interstitial%htswc (IM,Model%levr+LTP)) - allocate (Interstitial%htsw0 (IM,Model%levr+LTP)) - allocate (Interstitial%dry (IM)) - allocate (Interstitial%idxday (IM)) - allocate (Interstitial%icy (IM)) - allocate (Interstitial%lake (IM)) - allocate (Interstitial%use_flake (IM)) - allocate (Interstitial%ocean (IM)) - allocate (Interstitial%islmsk (IM)) - allocate (Interstitial%islmsk_cice (IM)) - allocate (Interstitial%wet (IM)) - allocate (Interstitial%kbot (IM)) - allocate (Interstitial%kcnv (IM)) - allocate (Interstitial%kinver (IM)) - allocate (Interstitial%kpbl (IM)) - allocate (Interstitial%ktop (IM)) - allocate (Interstitial%mbota (IM,3)) - allocate (Interstitial%mtopa (IM,3)) - allocate (Interstitial%oa4 (IM,4)) - allocate (Interstitial%oc (IM)) - allocate (Interstitial%olyr (IM,Model%levr+LTP)) - allocate (Interstitial%plvl (IM,Model%levr+1+LTP)) - allocate (Interstitial%plyr (IM,Model%levr+LTP)) - allocate (Interstitial%prnum (IM,Model%levs)) - allocate (Interstitial%qlyr (IM,Model%levr+LTP)) - allocate (Interstitial%prcpmp (IM)) - allocate (Interstitial%qss_ice (IM)) - allocate (Interstitial%qss_land (IM)) - allocate (Interstitial%qss_water (IM)) - allocate (Interstitial%raincd (IM)) - allocate (Interstitial%raincs (IM)) - allocate (Interstitial%rainmcadj (IM)) - allocate (Interstitial%rainp (IM,Model%levs)) - allocate (Interstitial%rb (IM)) - allocate (Interstitial%rb_ice (IM)) - allocate (Interstitial%rb_land (IM)) - allocate (Interstitial%rb_water (IM)) - allocate (Interstitial%rhc (IM,Model%levs)) - allocate (Interstitial%runoff (IM)) - allocate (Interstitial%save_q (IM,Model%levs,Model%ntrac)) - allocate (Interstitial%save_t (IM,Model%levs)) - allocate (Interstitial%save_tcp (IM,Model%levs)) - allocate (Interstitial%save_u (IM,Model%levs)) - allocate (Interstitial%save_v (IM,Model%levs)) - allocate (Interstitial%sbsno (IM)) - allocate (Interstitial%scmpsw (IM)) - allocate (Interstitial%sfcalb (IM,NF_ALBD)) - allocate (Interstitial%sigma (IM)) - allocate (Interstitial%sigmaf (IM)) - allocate (Interstitial%sigmafrac (IM,Model%levs)) - allocate (Interstitial%sigmatot (IM,Model%levs)) - allocate (Interstitial%snowc (IM)) - allocate (Interstitial%snohf (IM)) - allocate (Interstitial%snowmt (IM)) - allocate (Interstitial%stress (IM)) - allocate (Interstitial%stress_ice (IM)) - allocate (Interstitial%stress_land (IM)) - allocate (Interstitial%stress_water (IM)) - allocate (Interstitial%theta (IM)) - allocate (Interstitial%tlvl (IM,Model%levr+1+LTP)) - allocate (Interstitial%tlyr (IM,Model%levr+LTP)) - allocate (Interstitial%tprcp_ice (IM)) - allocate (Interstitial%tprcp_land (IM)) - allocate (Interstitial%tprcp_water (IM)) - allocate (Interstitial%trans (IM)) - allocate (Interstitial%tseal (IM)) - allocate (Interstitial%tsfa (IM)) - allocate (Interstitial%tsfc_water (IM)) - allocate (Interstitial%tsfg (IM)) - allocate (Interstitial%tsurf_ice (IM)) - allocate (Interstitial%tsurf_land (IM)) - allocate (Interstitial%tsurf_water (IM)) - allocate (Interstitial%uustar_ice (IM)) - allocate (Interstitial%uustar_land (IM)) - allocate (Interstitial%uustar_water (IM)) - allocate (Interstitial%vdftra (IM,Model%levs,Interstitial%nvdiff)) !GJF first dimension was set as 'IX' in GFS_physics_driver - allocate (Interstitial%vegf1d (IM)) - allocate (Interstitial%wcbmax (IM)) - allocate (Interstitial%wind (IM)) - allocate (Interstitial%work1 (IM)) - allocate (Interstitial%work2 (IM)) - allocate (Interstitial%work3 (IM)) - allocate (Interstitial%xcosz (IM)) - allocate (Interstitial%xlai1d (IM)) - allocate (Interstitial%xmu (IM)) - allocate (Interstitial%z01d (IM)) - allocate (Interstitial%zt1d (IM)) - allocate (Interstitial%ztmax_ice (IM)) - allocate (Interstitial%ztmax_land (IM)) - allocate (Interstitial%ztmax_water (IM)) - - ! RRTMGP - if (Model%do_RRTMGP) then - allocate (Interstitial%tracer (IM, Model%levs,Model%ntrac)) - allocate (Interstitial%tv_lay (IM, Model%levs)) - allocate (Interstitial%relhum (IM, Model%levs)) - allocate (Interstitial%qs_lay (IM, Model%levs)) - allocate (Interstitial%q_lay (IM, Model%levs)) - allocate (Interstitial%deltaZ (IM, Model%levs)) - allocate (Interstitial%p_lev (IM, Model%levs+1)) - allocate (Interstitial%p_lay (IM, Model%levs)) - allocate (Interstitial%t_lev (IM, Model%levs+1)) - allocate (Interstitial%t_lay (IM, Model%levs)) - allocate (Interstitial%cloud_overlap_param (IM, Model%levs)) - allocate (Interstitial%precip_overlap_param (IM, Model%levs)) - allocate (Interstitial%fluxlwUP_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxlwDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswUP_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswDOWN_allsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswUP_clrsky (IM, Model%levs+1)) - allocate (Interstitial%fluxswDOWN_clrsky (IM, Model%levs+1)) - allocate (Interstitial%aerosolslw (IM, Model%levs, Model%rrtmgp_nBandsLW, NF_AELW)) - allocate (Interstitial%aerosolssw (IM, Model%levs, Model%rrtmgp_nBandsSW, NF_AESW)) - allocate (Interstitial%cld_frac (IM, Model%levs)) - allocate (Interstitial%cld_lwp (IM, Model%levs)) - allocate (Interstitial%cld_reliq (IM, Model%levs)) - allocate (Interstitial%cld_iwp (IM, Model%levs)) - allocate (Interstitial%cld_reice (IM, Model%levs)) - allocate (Interstitial%cld_swp (IM, Model%levs)) - allocate (Interstitial%cld_resnow (IM, Model%levs)) - allocate (Interstitial%cld_rwp (IM, Model%levs)) - allocate (Interstitial%cld_rerain (IM, Model%levs)) - allocate (Interstitial%precip_frac (IM, Model%levs)) - allocate (Interstitial%flxprf_lw (IM, Model%levs+1)) - allocate (Interstitial%flxprf_sw (IM, Model%levs+1)) - allocate (Interstitial%sfc_emiss_byband (Model%rrtmgp_nBandsLW,IM)) - allocate (Interstitial%sec_diff_byband (Model%rrtmgp_nBandsLW,IM)) - allocate (Interstitial%sfc_alb_nir_dir (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_nir_dif (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_uvvis_dir (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%sfc_alb_uvvis_dif (Model%rrtmgp_nBandsSW,IM)) - allocate (Interstitial%toa_src_sw (IM,Model%rrtmgp_nGptsSW)) - allocate (Interstitial%toa_src_lw (IM,Model%rrtmgp_nGptsLW)) - ! - ! gas_concentrations (ty_gas_concs) - ! - Interstitial%gas_concentrations%ncol = IM - Interstitial%gas_concentrations%nlay = Model%levs - allocate(Interstitial%gas_concentrations%gas_name(Model%nGases)) - allocate(Interstitial%gas_concentrations%concs(Model%nGases)) - do iGas=1,Model%nGases - allocate(Interstitial%gas_concentrations%concs(iGas)%conc(IM, Model%levs)) - enddo - ! - ! lw_optical_props_clrsky (ty_optical_props_1scl) - ! - allocate(Interstitial%lw_optical_props_clrsky%tau( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%lw_optical_props_clrsky%band2gpt (2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_clrsky%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_clrsky%gpt2band( Model%rrtmgp_nGptsLW )) - ! - ! lw_optical_props_aerosol (ty_optical_props_1scl) - ! - allocate(Interstitial%lw_optical_props_aerosol%tau( IM, Model%levs, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_aerosol%band2gpt (2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_aerosol%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_aerosol%gpt2band( Model%rrtmgp_nBandsLW )) - ! - ! lw_optical_props_cloudsByBand (ty_optical_props_2str) - ! - allocate(Interstitial%lw_optical_props_cloudsByBand%tau(IM, Model%levs, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_cloudsByBand%ssa(IM, Model%levs, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_cloudsByBand%g( IM, Model%levs, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_cloudsByBand%band2gpt (2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_cloudsByBand%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_cloudsByBand%gpt2band( Model%rrtmgp_nBandsLW )) - ! - ! lw_optical_props_precipByBand (ty_optical_props_2str) - ! - allocate(Interstitial%lw_optical_props_precipByBand%tau(IM, Model%levs, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_precipByBand%ssa(IM, Model%levs, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_precipByBand%g( IM, Model%levs, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_precipByBand%band2gpt (2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_precipByBand%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_precipByBand%gpt2band( Model%rrtmgp_nBandsLW )) - ! - ! lw_optical_props_clouds (ty_optical_props_2str) - ! - allocate(Interstitial%lw_optical_props_clouds%tau( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%lw_optical_props_clouds%ssa( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%lw_optical_props_clouds%g( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%lw_optical_props_clouds%band2gpt (2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_clouds%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_clouds%gpt2band( Model%rrtmgp_nGptsLW )) - ! - ! lw_optical_props_precip (ty_optical_props_2str) - ! - allocate(Interstitial%lw_optical_props_precip%tau( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%lw_optical_props_precip%ssa( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%lw_optical_props_precip%g( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%lw_optical_props_precip%band2gpt (2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_precip%band_lims_wvn(2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%lw_optical_props_precip%gpt2band( Model%rrtmgp_nGptsLW )) - ! - ! sources (ty_source_func_lw) - ! - allocate(Interstitial%sources%sfc_source( IM, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%sources%lay_source( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%sources%lev_source_inc( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%sources%lev_source_dec( IM, Model%levs, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%sources%sfc_source_Jac( IM, Model%rrtmgp_nGptsLW )) - allocate(Interstitial%sources%band2gpt ( 2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%sources%band_lims_wvn ( 2, Model%rrtmgp_nBandsLW )) - allocate(Interstitial%sources%gpt2band( Model%rrtmgp_nGptsLW )) - end if - -! UGWP common - allocate (Interstitial%tau_mtb (IM)) - allocate (Interstitial%tau_ogw (IM)) - allocate (Interstitial%tau_tofd (IM)) - allocate (Interstitial%tau_ngw (IM)) - allocate (Interstitial%tau_oss (IM)) - allocate (Interstitial%dudt_mtb (IM,Model%levs)) - allocate (Interstitial%dudt_tms (IM,Model%levs)) - allocate (Interstitial%zmtb (IM) ) - allocate (Interstitial%zlwb (IM) ) - allocate (Interstitial%zogw (IM) ) - allocate (Interstitial%zngw (IM) ) - -! CIRES UGWP v1 - if (Model%do_ugwp_v1) then - allocate (Interstitial%dudt_ngw (IM,Model%levs)) - allocate (Interstitial%dvdt_ngw (IM,Model%levs)) - allocate (Interstitial%dtdt_ngw (IM,Model%levs)) - allocate (Interstitial%kdis_ngw (IM,Model%levs)) - end if - -!-- GSL drag suite - if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & - Model%gwd_opt==2 .or. Model%gwd_opt==22 ) then - allocate (Interstitial%varss (IM)) - allocate (Interstitial%ocss (IM)) - allocate (Interstitial%oa4ss (IM,4)) - allocate (Interstitial%clxss (IM,4)) - end if -! - ! Allocate arrays that are conditional on physics choices - if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then - allocate (Interstitial%graupelmp (IM)) - allocate (Interstitial%icemp (IM)) - allocate (Interstitial%rainmp (IM)) - allocate (Interstitial%snowmp (IM)) - else if (Model%imp_physics == Model%imp_physics_mg) then - allocate (Interstitial%ncgl (IM,Model%levs)) - allocate (Interstitial%ncpr (IM,Model%levs)) - allocate (Interstitial%ncps (IM,Model%levs)) - allocate (Interstitial%qgl (IM,Model%levs)) - allocate (Interstitial%qrn (IM,Model%levs)) - allocate (Interstitial%qsnw (IM,Model%levs)) - allocate (Interstitial%qlcn (IM,Model%levs)) - allocate (Interstitial%qicn (IM,Model%levs)) - allocate (Interstitial%w_upi (IM,Model%levs)) - allocate (Interstitial%cf_upi (IM,Model%levs)) - allocate (Interstitial%cnv_mfd (IM,Model%levs)) - allocate (Interstitial%cnv_dqldt (IM,Model%levs)) - allocate (Interstitial%clcn (IM,Model%levs)) - allocate (Interstitial%cnv_fice (IM,Model%levs)) - allocate (Interstitial%cnv_ndrop (IM,Model%levs)) - allocate (Interstitial%cnv_nice (IM,Model%levs)) - end if - if (Model%do_shoc) then - if (.not. associated(Interstitial%qrn)) allocate (Interstitial%qrn (IM,Model%levs)) - if (.not. associated(Interstitial%qsnw)) allocate (Interstitial%qsnw (IM,Model%levs)) - ! DH* updated version of shoc from May 22 2019 (not yet in CCPP) doesn't use qgl? remove? - if (.not. associated(Interstitial%qgl)) allocate (Interstitial%qgl (IM,Model%levs)) - ! *DH - allocate (Interstitial%ncpi (IM,Model%levs)) - allocate (Interstitial%ncpl (IM,Model%levs)) - end if - if (Model%lsm == Model%lsm_noahmp) then - allocate (Interstitial%t2mmp (IM)) - allocate (Interstitial%q2mp (IM)) - end if - ! - ! Set components that do not change - Interstitial%frain = Model%dtf/Model%dtp - Interstitial%ipr = min(IM,10) - Interstitial%latidxprnt = 1 - Interstitial%levi = Model%levs+1 - Interstitial%lmk = Model%levr+LTP - Interstitial%lmp = Model%levr+1+LTP - Interstitial%nbdlw = NBDLW - Interstitial%nbdsw = NBDSW - Interstitial%nf_aelw = NF_AELW - Interstitial%nf_aesw = NF_AESW - Interstitial%nspc1 = NSPC1 - if (Model%oz_phys .or. Model%oz_phys_2015) then - Interstitial%oz_coeffp5 = oz_coeff+5 - else - Interstitial%oz_coeffp5 = 5 - endif - ! - Interstitial%skip_macro = .false. - ! The value phys_hydrostatic from dynamics does not match the - ! hardcoded value for calling GFDL MP in GFS_physics_driver.F90, - ! which is set to .true. - Interstitial%phys_hydrostatic = .true. - ! - ! Reset all other variables - call Interstitial%rad_reset (Model) - call Interstitial%phys_reset (Model) - ! - end subroutine interstitial_create - - subroutine interstitial_setup_tracers(Interstitial, Model) - ! - implicit none - ! - class(GFS_interstitial_type) :: Interstitial - type(GFS_control_type), intent(in) :: Model - integer :: n, tracers - - !first, initialize the values (in case the values don't get initialized within if statements below) - Interstitial%nvdiff = Model%ntrac - Interstitial%mg3_as_mg2 = .false. - Interstitial%nn = Model%ntrac + 1 - Interstitial%itc = 0 - Interstitial%ntk = 0 - Interstitial%ntkev = 0 - Interstitial%tracers_total = 0 - Interstitial%otspt(:,:) = .true. - Interstitial%nsamftrac = 0 - Interstitial%ncstrac = 0 - Interstitial%ntcwx = 0 - Interstitial%ntiwx = 0 - Interstitial%ntrwx = 0 - - ! perform aerosol convective transport and PBL diffusion - Interstitial%trans_aero = Model%cplchm .and. Model%trans_trac - - if (Model%imp_physics == Model%imp_physics_thompson) then - if (Model%ltaerosol) then - Interstitial%nvdiff = 12 - else - Interstitial%nvdiff = 9 - endif - if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1 - elseif (Model%imp_physics == Model%imp_physics_wsm6) then - Interstitial%nvdiff = Model%ntrac -3 - if (Model%satmedmf) Interstitial%nvdiff = Interstitial%nvdiff + 1 - elseif (Model%ntclamt > 0) then ! for GFDL MP don't diffuse cloud amount - Interstitial%nvdiff = Model%ntrac - 1 - endif - - if (Model%imp_physics == Model%imp_physics_mg) then - if (abs(Model%fprcp) == 1) then - Interstitial%mg3_as_mg2 = .false. - elseif (Model%fprcp >= 2) then - if(Model%ntgl > 0 .and. (Model%mg_do_graupel .or. Model%mg_do_hail)) then - Interstitial%mg3_as_mg2 = .false. - else ! MG3 code run without graupel/hail i.e. as MG2 - Interstitial%mg3_as_mg2 = .true. - endif - endif - endif - - Interstitial%nscav = Model%ntrac - Model%ncnd + 2 - - if (Interstitial%nvdiff == Model%ntrac) then - Interstitial%ntcwx = Model%ntcw - Interstitial%ntiwx = Model%ntiw - Interstitial%ntrwx = Model%ntrw - else - if (Model%imp_physics == Model%imp_physics_wsm6) then - Interstitial%ntcwx = 2 - Interstitial%ntiwx = 3 - elseif (Model%imp_physics == Model%imp_physics_thompson) then - Interstitial%ntcwx = 2 - Interstitial%ntiwx = 3 - Interstitial%ntrwx = 4 - elseif (Model%imp_physics == Model%imp_physics_gfdl) then - Interstitial%ntcwx = 2 - Interstitial%ntiwx = 3 - Interstitial%ntrwx = 4 - ! F-A MP scheme - elseif (Model%imp_physics == Model%imp_physics_fer_hires) then - Interstitial%ntcwx = 2 - Interstitial%ntiwx = 3 - Interstitial%ntrwx = 4 - elseif (Model%imp_physics == Model%imp_physics_mg) then - Interstitial%ntcwx = 2 - Interstitial%ntiwx = 3 - Interstitial%ntrwx = 4 - elseif (Model%imp_physics == Model%imp_physics_zhao_carr) then - Interstitial%ntcwx = 2 - endif - endif - - if (Model%cplchm) then - ! Only the following microphysics schemes are supported with coupled chemistry - if (Model%imp_physics == Model%imp_physics_zhao_carr) then - Interstitial%nvdiff = 3 - elseif (Model%imp_physics == Model%imp_physics_mg) then - if (Model%ntgl > 0) then - Interstitial%nvdiff = 12 - else - Interstitial%nvdiff = 10 - endif - elseif (Model%imp_physics == Model%imp_physics_gfdl) then - Interstitial%nvdiff = 7 - elseif (Model%imp_physics == Model%imp_physics_thompson) then - if (Model%ltaerosol) then - Interstitial%nvdiff = 12 - else - Interstitial%nvdiff = 9 - endif - else - write(0,*) "Selected microphysics scheme is not supported when coupling with chemistry" - stop - endif - if (Interstitial%trans_aero) Interstitial%nvdiff = Interstitial%nvdiff + Model%ntchm - if (Model%ntke > 0) Interstitial%nvdiff = Interstitial%nvdiff + 1 ! adding tke to the list - endif - - if (Model%ntke > 0) Interstitial%ntkev = Interstitial%nvdiff - - if (Model%ntiw > 0) then - if (Model%ntclamt > 0) then - Interstitial%nn = Model%ntrac - 2 - else - Interstitial%nn = Model%ntrac - 1 - endif - elseif (Model%ntcw > 0) then - Interstitial%nn = Model%ntrac - else - Interstitial%nn = Model%ntrac + 1 - endif - - if (Model%cscnv .or. Model%satmedmf .or. Model%trans_trac ) then - Interstitial%otspt(:,:) = .true. ! otspt is used only for cscnv - Interstitial%otspt(1:3,:) = .false. ! this is for sp.hum, ice and liquid water - tracers = 2 - do n=2,Model%ntrac - if ( n /= Model%ntcw .and. n /= Model%ntiw .and. n /= Model%ntclamt .and. & - n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. & - n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc) then - tracers = tracers + 1 - if (Model%ntke == n ) then - Interstitial%otspt(tracers+1,1) = .false. - Interstitial%ntk = tracers - endif - if (Model%ntlnc == n .or. Model%ntinc == n .or. Model%ntrnc == n .or. Model%ntsnc == n .or. Model%ntgnc == n) & -! if (ntlnc == n .or. ntinc == n .or. ntrnc == n .or. ntsnc == n .or.& -! ntrw == n .or. ntsw == n .or. ntgl == n) & - Interstitial%otspt(tracers+1,1) = .false. - if (Interstitial%trans_aero .and. Model%ntchs == n) Interstitial%itc = tracers - endif - enddo - Interstitial%tracers_total = tracers - 2 - endif ! end if_ras or cfscnv or samf - if (.not. Model%satmedmf .and. .not. Model%trans_trac .and. & - .not. Model%ras .and. .not. Model%do_shoc) then - Interstitial%nsamftrac = 0 - else - Interstitial%nsamftrac = Interstitial%tracers_total - endif - Interstitial%ncstrac = Interstitial%tracers_total + 3 - - end subroutine interstitial_setup_tracers - - subroutine interstitial_rad_reset (Interstitial, Model) - ! - implicit none - ! - class(GFS_interstitial_type) :: Interstitial - type(GFS_control_type), intent(in) :: Model - integer :: iGas - ! - Interstitial%aerodp = clear_val - Interstitial%alb1d = clear_val - if (.not. Model%do_RRTMGP) then - Interstitial%alpha = clear_val - end if - Interstitial%cldsa = clear_val - Interstitial%cldtaulw = clear_val - Interstitial%cldtausw = clear_val - Interstitial%clouds = clear_val - Interstitial%de_lgth = clear_val - Interstitial%delr = clear_val - Interstitial%dzlyr = clear_val - Interstitial%faerlw = clear_val - Interstitial%faersw = clear_val - Interstitial%gasvmr = clear_val - Interstitial%htlwc = clear_val - Interstitial%htlw0 = clear_val - Interstitial%htswc = clear_val - Interstitial%htsw0 = clear_val - Interstitial%idxday = 0 - Interstitial%kb = 0 - Interstitial%kd = 0 - Interstitial%kt = 0 - Interstitial%mbota = 0 - Interstitial%mtopa = 0 - Interstitial%nday = 0 - Interstitial%olyr = clear_val - Interstitial%plvl = clear_val - Interstitial%plyr = clear_val - Interstitial%qlyr = clear_val - Interstitial%raddt = clear_val - Interstitial%sfcalb = clear_val - Interstitial%tlvl = clear_val - Interstitial%tlyr = clear_val - Interstitial%tsfa = clear_val - Interstitial%tsfg = clear_val - - ! Interstitials used by both RRTMG and RRTMGP - Interstitial%scmpsw%uvbfc = clear_val - Interstitial%scmpsw%uvbf0 = clear_val - Interstitial%scmpsw%nirbm = clear_val - Interstitial%scmpsw%nirdf = clear_val - Interstitial%scmpsw%visbm = clear_val - Interstitial%scmpsw%visdf = clear_val - if (Model%do_RRTMGP) then - Interstitial%tracer = clear_val - Interstitial%tv_lay = clear_val - Interstitial%relhum = clear_val - Interstitial%qs_lay = clear_val - Interstitial%q_lay = clear_val - Interstitial%deltaZ = clear_val - Interstitial%p_lev = clear_val - Interstitial%p_lay = clear_val - Interstitial%t_lev = clear_val - Interstitial%t_lay = clear_val - Interstitial%cloud_overlap_param = clear_val - Interstitial%precip_overlap_param = clear_val - Interstitial%fluxlwUP_allsky = clear_val - Interstitial%fluxlwDOWN_allsky = clear_val - Interstitial%fluxlwUP_clrsky = clear_val - Interstitial%fluxlwDOWN_clrsky = clear_val - Interstitial%fluxswUP_allsky = clear_val - Interstitial%fluxswDOWN_allsky = clear_val - Interstitial%fluxswUP_clrsky = clear_val - Interstitial%fluxswDOWN_clrsky = clear_val - Interstitial%aerosolslw = clear_val - Interstitial%aerosolssw = clear_val - Interstitial%cld_frac = clear_val - Interstitial%cld_lwp = clear_val - Interstitial%cld_reliq = clear_val - Interstitial%cld_iwp = clear_val - Interstitial%cld_reice = clear_val - Interstitial%cld_swp = clear_val - Interstitial%cld_resnow = clear_val - Interstitial%cld_rwp = clear_val - Interstitial%cld_rerain = clear_val - Interstitial%precip_frac = clear_val - Interstitial%sfc_emiss_byband = clear_val - Interstitial%sec_diff_byband = clear_val - Interstitial%sfc_alb_nir_dir = clear_val - Interstitial%sfc_alb_nir_dif = clear_val - Interstitial%sfc_alb_uvvis_dir = clear_val - Interstitial%sfc_alb_uvvis_dif = clear_val - Interstitial%toa_src_sw = clear_val - Interstitial%toa_src_lw = clear_val - do iGas=1,Model%nGases - Interstitial%gas_concentrations%concs(iGas)%conc = clear_val - end do - Interstitial%lw_optical_props_clrsky%tau = clear_val - Interstitial%lw_optical_props_aerosol%tau = clear_val - Interstitial%lw_optical_props_clouds%tau = clear_val - Interstitial%lw_optical_props_clouds%ssa = clear_val - Interstitial%lw_optical_props_clouds%g = clear_val - Interstitial%lw_optical_props_precip%tau = clear_val - Interstitial%lw_optical_props_precip%ssa = clear_val - Interstitial%lw_optical_props_precip%g = clear_val - Interstitial%lw_optical_props_cloudsByBand%tau = clear_val - Interstitial%lw_optical_props_cloudsByBand%ssa = clear_val - Interstitial%lw_optical_props_cloudsByBand%g = clear_val - Interstitial%lw_optical_props_precipByBand%tau = clear_val - Interstitial%lw_optical_props_precipByBand%ssa = clear_val - Interstitial%lw_optical_props_precipByBand%g = clear_val - Interstitial%sources%sfc_source = clear_val - Interstitial%sources%lay_source = clear_val - Interstitial%sources%lev_source_inc = clear_val - Interstitial%sources%lev_source_dec = clear_val - Interstitial%sources%sfc_source_Jac = clear_val - Interstitial%flxprf_lw%upfxc = clear_val - Interstitial%flxprf_lw%dnfxc = clear_val - Interstitial%flxprf_lw%upfx0 = clear_val - Interstitial%flxprf_lw%dnfx0 = clear_val - Interstitial%flxprf_sw%upfxc = clear_val - Interstitial%flxprf_sw%dnfxc = clear_val - Interstitial%flxprf_sw%upfx0 = clear_val - Interstitial%flxprf_sw%dnfx0 = clear_val - end if - ! - end subroutine interstitial_rad_reset - - subroutine interstitial_phys_reset (Interstitial, Model) - ! - implicit none - ! - class(GFS_interstitial_type) :: Interstitial - type(GFS_control_type), intent(in) :: Model - ! - Interstitial%adjsfculw_land = clear_val - Interstitial%adjsfculw_ice = clear_val - Interstitial%adjsfculw_water = clear_val - Interstitial%adjnirbmd = clear_val - Interstitial%adjnirbmu = clear_val - Interstitial%adjnirdfd = clear_val - Interstitial%adjnirdfu = clear_val - Interstitial%adjvisbmd = clear_val - Interstitial%adjvisbmu = clear_val - Interstitial%adjvisdfu = clear_val - Interstitial%adjvisdfd = clear_val - Interstitial%bexp1d = clear_val - Interstitial%cd = clear_val - Interstitial%cd_ice = Model%huge - Interstitial%cd_land = Model%huge - Interstitial%cd_water = Model%huge - Interstitial%cdq = clear_val - Interstitial%cdq_ice = Model%huge - Interstitial%cdq_land = Model%huge - Interstitial%cdq_water = Model%huge - Interstitial%chh_ice = Model%huge - Interstitial%chh_land = Model%huge - Interstitial%chh_water = Model%huge - Interstitial%cld1d = clear_val - Interstitial%cldf = clear_val - Interstitial%clw = clear_val - Interstitial%clw(:,:,2) = -999.9 - Interstitial%clx = clear_val - Interstitial%cmm_ice = Model%huge - Interstitial%cmm_land = Model%huge - Interstitial%cmm_water = Model%huge - Interstitial%cnvc = clear_val - Interstitial%cnvw = clear_val - Interstitial%ctei_r = clear_val - Interstitial%ctei_rml = clear_val - Interstitial%cumabs = clear_val - Interstitial%dd_mf = clear_val - Interstitial%del = clear_val - Interstitial%del_gz = clear_val - Interstitial%dlength = clear_val - Interstitial%dqdt = clear_val - Interstitial%dqsfc1 = clear_val - Interstitial%drain = clear_val - Interstitial%dt_mf = clear_val - Interstitial%dtdt = clear_val - Interstitial%dtsfc1 = clear_val - Interstitial%dtzm = clear_val - Interstitial%dudt = clear_val - Interstitial%dusfcg = clear_val - Interstitial%dusfc1 = clear_val - Interstitial%dvdftra = clear_val - Interstitial%dvdt = clear_val - Interstitial%dvsfcg = clear_val - Interstitial%dvsfc1 = clear_val - Interstitial%elvmax = clear_val - Interstitial%ep1d = clear_val - Interstitial%ep1d_ice = Model%huge - Interstitial%ep1d_land = Model%huge - Interstitial%ep1d_water = Model%huge - Interstitial%evap_ice = Model%huge - Interstitial%evap_land = Model%huge - Interstitial%evap_water = Model%huge - Interstitial%evbs = clear_val - Interstitial%evcw = clear_val - Interstitial%pah = clear_val - Interstitial%ecan = clear_val - Interstitial%etran = clear_val - Interstitial%edir = clear_val - Interstitial%ffhh_ice = Model%huge - Interstitial%ffhh_land = Model%huge - Interstitial%ffhh_water = Model%huge - Interstitial%fh2 = clear_val - Interstitial%fh2_ice = Model%huge - Interstitial%fh2_land = Model%huge - Interstitial%fh2_water = Model%huge - Interstitial%flag_cice = .false. - Interstitial%flag_guess = .false. - Interstitial%flag_iter = .true. - Interstitial%ffmm_ice = Model%huge - Interstitial%ffmm_land = Model%huge - Interstitial%ffmm_water = Model%huge - Interstitial%fm10 = clear_val - Interstitial%fm10_ice = Model%huge - Interstitial%fm10_land = Model%huge - Interstitial%fm10_water = Model%huge - Interstitial%frland = clear_val - Interstitial%fscav = clear_val - Interstitial%fswtr = clear_val - Interstitial%gabsbdlw = clear_val - Interstitial%gabsbdlw_ice = clear_val - Interstitial%gabsbdlw_land = clear_val - Interstitial%gabsbdlw_water = clear_val - Interstitial%gamma = clear_val - Interstitial%gamq = clear_val - Interstitial%gamt = clear_val - Interstitial%gflx = clear_val - Interstitial%gflx_ice = clear_val - Interstitial%gflx_land = clear_val - Interstitial%gflx_water = clear_val - Interstitial%gwdcu = clear_val - Interstitial%gwdcv = clear_val - Interstitial%zvfun = clear_val - Interstitial%hffac = clear_val - Interstitial%hflxq = clear_val - Interstitial%hflx_ice = Model%huge - Interstitial%hflx_land = Model%huge - Interstitial%hflx_water = Model%huge - Interstitial%dry = .false. - Interstitial%icy = .false. - Interstitial%lake = .false. - Interstitial%use_flake = .false. - Interstitial%ocean = .false. - Interstitial%islmsk = 0 - Interstitial%islmsk_cice = 0 - Interstitial%wet = .false. - Interstitial%kbot = Model%levs - Interstitial%kcnv = 0 - Interstitial%kinver = Model%levs - Interstitial%kpbl = 0 - Interstitial%ktop = 1 - Interstitial%oa4 = clear_val - Interstitial%oc = clear_val - Interstitial%prcpmp = clear_val - Interstitial%prnum = clear_val - Interstitial%qss_ice = Model%huge - Interstitial%qss_land = Model%huge - Interstitial%qss_water = Model%huge - Interstitial%raincd = clear_val - Interstitial%raincs = clear_val - Interstitial%rainmcadj = clear_val - Interstitial%rainp = clear_val - Interstitial%rb = clear_val - Interstitial%rb_ice = Model%huge - Interstitial%rb_land = Model%huge - Interstitial%rb_water = Model%huge - Interstitial%rhc = clear_val - Interstitial%runoff = clear_val - Interstitial%save_q = clear_val - Interstitial%save_t = clear_val - Interstitial%save_tcp = clear_val - Interstitial%save_u = clear_val - Interstitial%save_v = clear_val - Interstitial%sbsno = clear_val - Interstitial%sigma = clear_val - Interstitial%sigmaf = clear_val - Interstitial%sigmafrac = clear_val - Interstitial%sigmatot = clear_val - Interstitial%snowc = clear_val - Interstitial%snohf = clear_val - Interstitial%snowmt = clear_val - Interstitial%stress = clear_val - Interstitial%stress_ice = Model%huge - Interstitial%stress_land = Model%huge - Interstitial%stress_water = Model%huge - Interstitial%theta = clear_val - Interstitial%tprcp_ice = Model%huge - Interstitial%tprcp_land = Model%huge - Interstitial%tprcp_water = Model%huge - Interstitial%trans = clear_val - Interstitial%tseal = clear_val - Interstitial%tsfc_water = Model%huge - Interstitial%tsurf_ice = Model%huge - Interstitial%tsurf_land = Model%huge - Interstitial%tsurf_water = Model%huge - Interstitial%uustar_ice = Model%huge - Interstitial%uustar_land = Model%huge - Interstitial%uustar_water = Model%huge - Interstitial%vdftra = clear_val - Interstitial%vegf1d = clear_val - Interstitial%lndp_vgf = clear_val - Interstitial%wcbmax = clear_val - Interstitial%wind = Model%huge - Interstitial%work1 = clear_val - Interstitial%work2 = clear_val - Interstitial%work3 = clear_val - Interstitial%xcosz = clear_val - Interstitial%xlai1d = clear_val - Interstitial%xmu = clear_val - Interstitial%z01d = clear_val - Interstitial%zt1d = clear_val - Interstitial%ztmax_ice = clear_val - Interstitial%ztmax_land = clear_val - Interstitial%ztmax_water = clear_val - -! UGWP common - Interstitial%tau_mtb = clear_val - Interstitial%tau_ogw = clear_val - Interstitial%tau_tofd = clear_val - Interstitial%tau_ngw = clear_val - Interstitial%tau_oss = clear_val - Interstitial%dudt_mtb = clear_val - Interstitial%dudt_tms = clear_val - Interstitial%zmtb = clear_val - Interstitial%zlwb = clear_val - Interstitial%zogw = clear_val - Interstitial%zngw = clear_val - -! CIRES UGWP v1 - if (Model%do_ugwp_v1) then - Interstitial%dudt_ngw = clear_val - Interstitial%dvdt_ngw = clear_val - Interstitial%dtdt_ngw = clear_val - Interstitial%kdis_ngw = clear_val - end if - -!-- GSL drag suite - if (Model%gwd_opt==3 .or. Model%gwd_opt==33 .or. & - Model%gwd_opt==2 .or. Model%gwd_opt==22) then - Interstitial%varss = clear_val - Interstitial%ocss = clear_val - Interstitial%oa4ss = clear_val - Interstitial%clxss = clear_val - end if -! - ! Reset fields that are conditional on physics choices - if (Model%imp_physics == Model%imp_physics_gfdl .or. Model%imp_physics == Model%imp_physics_thompson) then - Interstitial%graupelmp = clear_val - Interstitial%icemp = clear_val - Interstitial%rainmp = clear_val - Interstitial%snowmp = clear_val - else if (Model%imp_physics == Model%imp_physics_mg) then - Interstitial%ncgl = clear_val - Interstitial%ncpr = clear_val - Interstitial%ncps = clear_val - Interstitial%qgl = clear_val - Interstitial%qrn = clear_val - Interstitial%qsnw = clear_val - Interstitial%qlcn = clear_val - Interstitial%qicn = clear_val - Interstitial%w_upi = clear_val - Interstitial%cf_upi = clear_val - Interstitial%cnv_mfd = clear_val - Interstitial%cnv_dqldt = clear_val - Interstitial%clcn = clear_val - Interstitial%cnv_fice = clear_val - Interstitial%cnv_ndrop = clear_val - Interstitial%cnv_nice = clear_val - end if - if (Model%do_shoc) then - Interstitial%qrn = clear_val - Interstitial%qsnw = clear_val - ! DH* updated version of shoc from May 22 2019 doesn't use qgl? remove? - Interstitial%qgl = clear_val - ! *DH - Interstitial%ncpi = clear_val - Interstitial%ncpl = clear_val - end if - if (Model%lsm == Model%lsm_noahmp) then - Interstitial%t2mmp = clear_val - Interstitial%q2mp = clear_val - end if - ! - ! Set flag for resetting maximum hourly output fields - Interstitial%max_hourly_reset = mod(Model%kdt-1, nint(Model%avg_max_length/Model%dtp)) == 0 - ! Use same logic in UFS to reset Thompson extended diagnostics - Interstitial%ext_diag_thompson_reset = Interstitial%max_hourly_reset - ! - ! Set flag for resetting radar reflectivity calculation - if (Model%nsradar_reset<0) then - Interstitial%radar_reset = .true. - else - Interstitial%radar_reset = mod(Model%kdt-1, nint(Model%nsradar_reset/Model%dtp)) == 0 - end if - ! - end subroutine interstitial_phys_reset - end module GFS_typedefs diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index ec4a18432..0c7cf73dd 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -195,6 +195,14 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys +[qgrs(:,:,index_of_hail_mixing_ratio_in_tracer_concentration_array)] + standard_name = hail_mixing_ratio + long_name = ratio of mass of hail to mass of dry air plus vapor (without condensates) + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (index_of_hail_mixing_ratio_in_tracer_concentration_array > 0) [qgrs(:,:,index_of_ozone_mixing_ratio_in_tracer_concentration_array)] standard_name = ozone_mixing_ratio long_name = ozone mixing ratio @@ -254,6 +262,46 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys +[qgrs(:,:,index_of_mass_number_concentration_of_hail_in_tracer_concentration_array)] + standard_name = mass_number_concentration_of_hail_in_air + long_name = number concentration of hail + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = (index_of_mass_number_concentration_of_hail_in_tracer_concentration_array > 0) +[qgrs(:,:,index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array)] + standard_name = cloud_condensation_nuclei_number_concentration + long_name = number concentration of cloud condensation nuclei + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array > 0 ) +[qgrs(:,:,index_of_activated_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array)] + standard_name = activated_cloud_condensation_nuclei_number_concentration + long_name = number concentration of activated cloud condensation nuclei + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_activated_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array > 0 ) +[qgrs(:,:,index_of_graupel_volume_in_tracer_concentration_array)] + standard_name = graupel_volume + long_name = graupel particle volume + units = m3 kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_graupel_volume_in_tracer_concentration_array > 0 ) +[qgrs(:,:,index_of_hail_volume_in_tracer_concentration_array)] + standard_name = hail_volume + long_name = hail particle volume + units = m3 kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_hail_volume_in_tracer_concentration_array > 0 ) [qgrs(:,:,index_of_turbulent_kinetic_energy_in_tracer_concentration_array)] standard_name = turbulent_kinetic_energy long_name = turbulent kinetic energy @@ -261,14 +309,14 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[qgrs(:,:,index_for_smoke)] +[qgrs(:,:,index_for_smoke_in_tracer_concentration_array)] standard_name = smoke_tracer_concentration long_name = concentration of smoke units = kg kg-1 dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys -[qgrs(:,:,index_for_dust)] +[qgrs(:,:,index_for_dust_in_tracer_concentration_array)] standard_name = dust_tracer_concentration long_name = concentration of dust units = kg kg-1 @@ -397,6 +445,14 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys +[gq0(:,:,index_of_hail_mixing_ratio_in_tracer_concentration_array)] + standard_name = hail_mixing_ratio_of_new_state + long_name = ratio of mass of hail to mass of dry air plus vapor (without condensates) updated by physics + units = kg kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_hail_mixing_ratio_in_tracer_concentration_array > 0 ) [gq0(:,:,index_of_mass_weighted_rime_factor_in_tracer_concentration_array)] standard_name = mass_weighted_rime_factor_of_new_state long_name = mass weighted rime factor updated by physics @@ -456,6 +512,46 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys +[gq0(:,:,index_of_mass_number_concentration_of_hail_in_tracer_concentration_array)] + standard_name = mass_number_concentration_of_hail_of_new_state + long_name = number concentration of hail updated by physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_mass_number_concentration_of_hail_in_tracer_concentration_array > 0 ) +[gq0(:,:,index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array)] + standard_name = cloud_condensation_nuclei_number_concentration_of_new_state + long_name = number concentration of cloud condensation nuclei updated by physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array > 0 ) +[gq0(:,:,index_of_activated_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array)] + standard_name = activated_cloud_condensation_nuclei_number_concentration_of_new_state + long_name = number concentration of cloud condensation nuclei updated by physics + units = kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_activated_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array > 0 ) +[gq0(:,:,index_of_graupel_volume_in_tracer_concentration_array)] + standard_name = graupel_volume_of_new_state + long_name = graupel volume updated by physics + units = m3 kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_graupel_volume_in_tracer_concentration_array > 0 ) +[gq0(:,:,index_of_hail_volume_in_tracer_concentration_array)] + standard_name = hail_volume_of_new_state + long_name = hail volume updated by physics + units = m3 kg-1 + dimensions = (horizontal_loop_extent,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_hail_volume_in_tracer_concentration_array > 0 ) [gq0(:,:,index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array)] standard_name = cloud_area_fraction_in_atmosphere_layer_of_new_state long_name = cloud fraction updated by physics @@ -641,7 +737,7 @@ dimensions = (horizontal_dimension,12,5) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [emi_in] standard_name = anthropogenic_background_input long_name = anthropogenic background input @@ -649,7 +745,7 @@ dimensions = (horizontal_dimension,1) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [smoke_GBBEPx] standard_name = emission_smoke_GBBEPx long_name = emission fire GBBEPx @@ -657,7 +753,7 @@ dimensions = (horizontal_dimension,24,3) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [z0base] standard_name = baseline_surface_roughness_length long_name = baseline surface roughness length for momentum in meter @@ -897,6 +993,13 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys +[rca] + standard_name = aerodynamic_resistance_in_canopy + long_name = canopy resistance + units = s m-1 + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys [tprcp] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step @@ -1320,7 +1423,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .and. flag_for_reading_leaf_area_index_from_input)) + active = (control_for_land_surface_scheme == identifier_for_noah_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme .or. (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme .and. flag_for_reading_leaf_area_index_from_input)) [xsaixy] standard_name = stem_area_index long_name = stem area index @@ -2019,7 +2122,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) [dqsfci_cpl] standard_name = surface_upward_latent_heat_flux_for_coupling long_name = instantaneous sfc latent heat flux @@ -2027,7 +2130,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) [dlwsfci_cpl] standard_name = surface_downwelling_longwave_flux_for_coupling long_name = instantaneous sfc downward lw flux @@ -2091,7 +2194,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) [nnirbmi_cpl] standard_name = surface_net_downwelling_direct_nir_shortwave_flux_for_coupling long_name = instantaneous net nir beam sfc downward sw flux @@ -2131,7 +2234,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) [q2mi_cpl] standard_name = specific_humidity_at_2m_for_coupling long_name = instantaneous Q2m @@ -2139,7 +2242,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) [u10mi_cpl] standard_name = x_wind_at_10m_for_coupling long_name = instantaneous U10m @@ -2171,7 +2274,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_air_quality_coupling) [ulwsfcin_cpl] standard_name = surface_upwelling_longwave_flux_from_coupled_process long_name = surface upwelling LW flux for coupling @@ -2337,7 +2440,7 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [nwfa2d] standard_name = tendency_of_hygroscopic_aerosols_at_surface_adjacent_layer long_name = instantaneous water-friendly sfc aerosol source @@ -2361,7 +2464,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [emseas] standard_name = emission_of_seas_for_smoke long_name = emission of seas for smoke @@ -2369,7 +2472,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [emanoc] standard_name = emission_of_anoc_for_thompson_mp long_name = emission of anoc for thompson mp @@ -2377,71 +2480,71 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [ebb_smoke_hr] - standard_name = surfce_emission_of_smoke + standard_name = surface_smoke_emission long_name = emission of surface smoke units = ug m-2 s-1 dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [frp_hr] standard_name = frp_hourly - long_name = hourly frp - units = mw + long_name = hourly fire radiative power + units = MW dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [frp_std_hr] standard_name = frp_std_hourly - long_name = hourly std frp - units = mw + long_name = hourly stdandard deviation of fire radiative power + units = MW dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [fhist] - standard_name = fhist - long_name = fire hist + standard_name = fire_hist + long_name = coefficient to scale the fire activity depending on the fire duration units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [coef_bb_dc] standard_name = coef_bb_dc - long_name = coef bb dc from plumerise + long_name = coef to estimate the fire emission units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [ebu_smoke] standard_name = ebu_smoke - long_name = smoke buffer of ebu + long_name = buffer of vertical fire emission units = various dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [smoke_ext] - standard_name = smoke_ext - long_name = smoke optical extinction + standard_name = extinction_coefficient_in_air_due_to_smoke + long_name = extinction coefficient in air due to smoke units = various dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [dust_ext] - standard_name = dust_ext - long_name = dust optical extinction + standard_name = extinction_coefficient_in_air_due_to_dust + long_name = extinction coefficient in air due to dust units = various dimensions = (horizontal_loop_extent,vertical_layer_dimension) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [chem3d] standard_name = chem3d_mynn_pbl_transport long_name = mynn pbl transport of smoke and dust @@ -2449,31 +2552,31 @@ dimensions = (horizontal_loop_extent,vertical_layer_dimension,2) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [min_fplume] - standard_name = min_fplume - long_name = miminum plume height + standard_name = minimum_fire_plume_sigma_pressure_level + long_name = minimum model level of fire plumerise units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [max_fplume] - standard_name = max_fplume - long_name = maximum plume height + standard_name = maximum_fire_plume_sigma_pressure_level + long_name = maximum model level of fire plumerise units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [rrfs_hwp] - standard_name = rrfs_hwp + standard_name = hourly_wildfire_potential long_name = rrfs hourly fire weather potential units = none dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [ushfsfci] standard_name = surface_upward_sensible_heat_flux_for_chemistry_coupling long_name = instantaneous upward sensible heat flux for chemistry coupling @@ -2619,6 +2722,7 @@ dimensions = (number_of_lines_in_internal_namelist) type = character kind = len=256 + active = (number_of_lines_in_internal_namelist > 0) [logunit] standard_name = iounit_of_log long_name = fortran unit number for logfile @@ -2817,6 +2921,12 @@ units = flag dimensions = () type = logical +[cplaqm] + standard_name = flag_for_air_quality_coupling + long_name = flag controlling cplaqm collection (default off) + units = flag + dimensions = () + type = logical [cplchm] standard_name = flag_for_chemistry_coupling long_name = flag controlling cplchm collection (default off) @@ -2824,11 +2934,17 @@ dimensions = () type = logical [rrfs_smoke] - standard_name = flag_for_rrfs_smoke_coupling + standard_name = do_smoke_coupling long_name = flag controlling rrfs_smoke collection (default off) units = flag dimensions = () type = logical +[dust_smoke_rrtmg_band_number] + standard_name = index_of_shortwave_band_affected_by_smoke + long_name = rrtmg band number that smoke and dust should affect + units = count + dimensions = () + type = integer [cpl_imp_mrg] standard_name = flag_for_merging_imported_data long_name = flag controlling cpl_imp_mrg for imported data (default off) @@ -3216,6 +3332,24 @@ units = flag dimensions = () type = logical +[doGP_sgs_cnv] + standard_name = flag_to_include_sgs_convective_cloud_in_RRTMGP + long_name = logical flag to control sgs convective cloud in RRTMGP + units = flag + dimensions = () + type = logical +[doGP_sgs_mynn] + standard_name = flag_to_include_sgs_MYNN_EDMF_cloud_in_RRTMGP + long_name = logical flag to control MYNN-EDMF PBL cloud in RRTMGP + units = flag + dimensions = () + type = logical +[iovr_convcld] + standard_name = flag_for_convective_cloud_overlap_method_for_radiation + long_name = flag for convective cloud overlap method + units = flag + dimensions = () + type = integer [rrtmgp_nrghice] standard_name = number_of_ice_roughness_categories long_name = number of ice-roughness categories in RRTMGP calculation (Model%rrtmgp_nrghice) @@ -3340,6 +3474,18 @@ units = flag dimensions = () type = integer +[imp_physics_nssl] + standard_name = identifier_for_nssl_microphysics_scheme + long_name = choice of NSSL 2-moment microphysics scheme + units = flag + dimensions = () + type = integer +[imp_physics_nssl2mccn] + standard_name = identifier_for_nssl2mccn_microphysics_scheme + long_name = choice of NSSL 2-moment microphysics scheme with CCN + units = flag + dimensions = () + type = integer [iovr_exp] standard_name = flag_for_exponential_cloud_overlap_method long_name = choice of exponential cloud overlap method @@ -3572,6 +3718,45 @@ dimensions = () type = character kind = len=16 +[nssl_cccn] + standard_name = nssl_ccn_concentration + long_name = CCN concentration + units = m-3 + dimensions = () + type = real + kind = kind_phys +[nssl_alphah] + standard_name = nssl_alpha_graupel + long_name = graupel PSD shape parameter in NSSL micro + units = none + dimensions = () + type = real + kind = kind_phys +[nssl_alphahl] + standard_name = nssl_alpha_hail + long_name = hail PSD shape parameter in NSSL micro + units = none + dimensions = () + type = real + kind = kind_phys +[nssl_ccn_on] + standard_name = nssl_ccn_on + long_name = CCN activation flag in NSSL micro + units = flag + dimensions = () + type = logical +[nssl_hail_on] + standard_name = nssl_hail_on + long_name = hail activation flag in NSSL micro + units = flag + dimensions = () + type = logical +[nssl_invertccn] + standard_name = nssl_invertccn + long_name = flag to invert CCN in NSSL micro + units = flag + dimensions = () + type = logical [tf] standard_name = all_ice_cloud_threshold_temperature long_name = threshold temperature below which all cloud is ice @@ -3943,24 +4128,6 @@ units = index dimensions = () type = integer -[isurban] - standard_name = index_of_urban_vegetation_category - long_name = index of the urban vegetation category in the chosen vegetation dataset - units = index - dimensions = () - type = integer -[isice] - standard_name = index_of_ice_vegetation_category - long_name = index of the permanent snow/ice category in the chosen vegetation dataset - units = index - dimensions = () - type = integer -[iswater] - standard_name = index_of_water_vegetation_category - long_name = index of the water body vegetation category in the chosen vegetation dataset - units = index - dimensions = () - type = integer [iopt_thcnd] standard_name = control_for_land_surface_scheme_thermal_conductivity_option long_name = choice for thermal conductivity option (see module_sf_noahlsm) @@ -4052,6 +4219,12 @@ units = index dimensions = () type = integer +[iopt_trs] + standard_name = control_for_land_surface_scheme_surface_thermal_roughness + long_name = choice for surface thermal roughness option (see noahmp module for definition) + units = index + dimensions = () + type = integer [use_ufo] standard_name = flag_for_gcycle_surface_option long_name = flag for gcycle surface option @@ -4863,19 +5036,29 @@ dimensions = () type = integer [spp_prt_list] - standard_name =magnitude_of_spp_perturbations + standard_name = magnitude_of_spp_perturbations long_name = magnitude of spp perturbations units = 1 - dimensions = (number_of_spp_schemes_perturbed) + dimensions = (number_of_perturbed_spp_schemes) + type = real + kind = kind_phys + active = (do_stochastically_perturbed_parameterizations) +[spp_stddev_cutoff] + standard_name = magnitude_of_spp_standard_deviation_cutoff + long_name = magnitude of spp standard deviation cutoff + units = 1 + dimensions = (number_of_perturbed_spp_schemes) type = real kind = kind_phys + active = (do_stochastically_perturbed_parameterizations) [spp_var_list] standard_name = perturbed_spp_schemes long_name = perturbed spp schemes units = none - dimensions = (number_of_spp_schemes_perturbed) + dimensions = (number_of_perturbed_spp_schemes) type = character kind = len=3 + active = (do_stochastically_perturbed_parameterizations) [spp_pbl] standard_name = control_for_pbl_spp_perturbations long_name = control for pbl spp perturbations @@ -5122,6 +5305,12 @@ units = index dimensions = () type = integer +[nthl] + standard_name = index_of_hail_mixing_ratio_in_tracer_concentration_array + long_name = tracer index for hail + units = index + dimensions = () + type = integer [ntclamt] standard_name = index_of_cloud_area_fraction_in_atmosphere_layer_in_tracer_concentration_array long_name = tracer index for cloud amount integer @@ -5158,6 +5347,36 @@ units = index dimensions = () type = integer +[nthnc] + standard_name = index_of_mass_number_concentration_of_hail_in_tracer_concentration_array + long_name = tracer index for hail number concentration + units = index + dimensions = () + type = integer +[ntccn] + standard_name = index_of_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array + long_name = tracer index for cloud condensation nuclei number concentration + units = index + dimensions = () + type = integer +[ntccna] + standard_name = index_of_activated_cloud_condensation_nuclei_number_concentration_in_tracer_concentration_array + long_name = tracer index for activated cloud condensation nuclei number concentration + units = index + dimensions = () + type = integer +[ntgv] + standard_name = index_of_graupel_volume_in_tracer_concentration_array + long_name = tracer index for graupel particle volume + units = index + dimensions = () + type = integer +[nthv] + standard_name = index_of_hail_volume_in_tracer_concentration_array + long_name = tracer index for hail particle volume + units = index + dimensions = () + type = integer [ntke] standard_name = index_of_turbulent_kinetic_energy_in_tracer_concentration_array long_name = tracer index for turbulent kinetic energy @@ -5183,13 +5402,13 @@ dimensions = () type = integer [ntsmoke] - standard_name = index_for_smoke + standard_name = index_for_smoke_in_tracer_concentration_array long_name = tracer index for smoke units = index dimensions = () type = integer [ntdust] - standard_name = index_for_dust + standard_name = index_for_dust_in_tracer_concentration_array long_name = tracer index for dust units = index dimensions = () @@ -5304,103 +5523,103 @@ dimensions = () type = integer [mix_chem] - standard_name = rrfs_smoke_mynn_tracer_mixing + standard_name = do_planetary_boundary_layer_smoke_mixing long_name = flag for rrfs smoke mynn tracer mixing units = flag dimensions = () type = logical - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [fire_turb] - standard_name = rrfs_smoke_mynn_enh_vermix + standard_name = do_planetary_boundary_layer_fire_enhancement long_name = flag for rrfs smoke mynn enh vermix units = flag dimensions = () type = logical - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [seas_opt] - standard_name = rrfs_smoke_sea_salt_opt + standard_name = control_for_smoke_sea_salt long_name = rrfs smoke sea salt emission option units = index dimensions = () type = integer - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [dust_opt] - standard_name = rrfs_smoke_dust_opt + standard_name = control_for_smoke_dust long_name = rrfs smoke dust chem option units = index dimensions = () type = integer - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [biomass_burn_opt] - standard_name = rrfs_smoke_biomass_burn_opt + standard_name = control_for_smoke_biomass_burn long_name = rrfs smoke biomass burning option units = index dimensions = () type = integer - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [drydep_opt] - standard_name = rrfs_smoke_drydep_opt + standard_name = control_for_smoke_dry_deposition long_name = rrfs smoke dry deposition option units = index dimensions = () type = integer - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [wetdep_ls_opt] - standard_name = rrfs_smoke_wetdep_ls_opt + standard_name = control_for_smoke_wet_deposition long_name = rrfs smoke large scale wet deposition option units = index dimensions = () type = integer - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [do_plumerise] - standard_name = rrfs_smoke_plumerise_flag + standard_name = do_smoke_plumerise long_name = rrfs smoke plumerise option units = index dimensions = () type = logical - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [plumerisefire_frq] - standard_name = rrfs_smoke_plumerisefire_frq + standard_name = smoke_plumerise_frequency long_name = rrfs smoke add smoke option - units = index + units = min dimensions = () type = integer - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [addsmoke_flag] - standard_name = rrfs_smoke_addsmoke_flag + standard_name = control_for_smoke_biomass_burning_emissions long_name = rrfs smoke add smoke option units = index dimensions = () type = integer - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [smoke_forecast] - standard_name = rrfs_smoke_smoke_forecast_opt + standard_name = do_smoke_forecast long_name = flag for rrfs smoke forecast units = flag dimensions = () type = logical - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [aero_ind_fdb] - standard_name = rrfs_smoke_aero_ind_fdb_opt - long_name = flag for rrfs wfa ifa emission + standard_name = do_smoke_aerosol_indirect_feedback + long_name = flag for wfa ifa emission indirect feedback units = flag dimensions = () type = logical - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [aero_dir_fdb] - standard_name = rrfs_smoke_dust_rad_fdb_opt - long_name = flag for rrfs smoke dust rad feedback + standard_name = do_smoke_aerosol_direct_feedback + long_name = flag for smoke and dust radiation feedback units = flag dimensions = () type = logical - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [rrfs_smoke_debug] - standard_name = rrfs_smoke_plumerise_debug + standard_name = do_smoke_debug long_name = flag for rrfs smoke plumerise debug units = flag dimensions = () type = logical - active = (flag_for_rrfs_smoke_coupling) + active = (do_smoke_coupling) [ncnvcld3d] standard_name = number_of_convective_cloud_variables_in_xyz_dimensioned_restart_array long_name = number of convective 3d clouds fields @@ -5811,7 +6030,7 @@ [bl_mynn_closure] standard_name = control_for_closure_level_in_mellor_yamada_nakanishi_niino_pbl_scheme long_name = flag to determine the closure level for the mynn - units = flag + units = 1 dimensions = () type = real [icloud_bl] @@ -5820,6 +6039,30 @@ units = flag dimensions = () type = integer +[isftcflx] + standard_name = control_for_thermal_roughness_lengths_over_water + long_name = flag for thermal roughness lengths over water in mynnsfclay + units = 1 + dimensions = () + type = integer +[iz0tlnd] + standard_name = control_for_thermal_roughness_lengths_over_land + long_name = flag for thermal roughness lengths over land in mynnsfclay + units = 1 + dimensions = () + type = integer +[sfclay_compute_flux] + standard_name = do_compute_surface_scalar_fluxes + long_name = flag for computing surface scalar fluxes in mynnsfclay + units = flag + dimensions = () + type = logical +[sfclay_compute_diag] + standard_name = do_compute_surface_diagnostics + long_name = flag for computing surface diagnostics in mynnsfclay + units = flag + dimensions = () + type = logical [var_ric] standard_name = control_for_variable_bulk_richardson_number long_name = flag for calculating variable bulk richardson number for hurricane PBL @@ -7773,7 +8016,7 @@ type = integer active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme) [exch_h] - standard_name = atmosphere_heat_diffusivity_for_mynnpbl + standard_name = atmosphere_heat_diffusivity_for_mynnedmf long_name = diffusivity for heat for MYNN PBL (defined for all mass levels) units = m2 s-1 dimensions = (horizontal_loop_extent,vertical_layer_dimension) @@ -7781,7 +8024,7 @@ kind = kind_phys active = (flag_for_mellor_yamada_nakanishi_niino_pbl_scheme) [exch_m] - standard_name = atmosphere_momentum_diffusivity_for_mynnpbl + standard_name = atmosphere_momentum_diffusivity_for_mynnedmf long_name = diffusivity for momentum for MYNN PBL (defined for all mass levels) units = m2 s-1 dimensions = (horizontal_loop_extent,vertical_layer_dimension) @@ -8067,2823 +8310,12 @@ ######################################################################## [ccpp-table-properties] - name = GFS_interstitial_type + name = GFS_data_type type = ddt dependencies = [ccpp-arg-table] - name = GFS_interstitial_type - type = ddt -[adjsfculw_water] - standard_name = surface_upwelling_longwave_flux_over_water - long_name = surface upwelling longwave flux at current time over water - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjsfculw_land] - standard_name = surface_upwelling_longwave_flux_over_land - long_name = surface upwelling longwave flux at current time over land - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjsfculw_ice] - standard_name = surface_upwelling_longwave_flux_over_ice - long_name = surface upwelling longwave flux at current time over ice - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjnirbmd] - standard_name = surface_downwelling_direct_near_infrared_shortwave_flux - long_name = surface downwelling beam near-infrared shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjnirbmu] - standard_name = surface_upwelling_direct_near_infrared_shortwave_flux - long_name = surface upwelling beam near-infrared shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjnirdfd] - standard_name = surface_downwelling_diffuse_near_infrared_shortwave_flux - long_name = surface downwelling diffuse near-infrared shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjnirdfu] - standard_name = surface_upwelling_diffuse_near_infrared_shortwave_flux - long_name = surface upwelling diffuse near-infrared shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjvisbmd] - standard_name = surface_downwelling_direct_ultraviolet_and_visible_shortwave_flux - long_name = surface downwelling beam ultraviolet plus visible shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjvisbmu] - standard_name = surface_upwelling_direct_ultraviolet_and_visible_shortwave_flux - long_name = surface upwelling beam ultraviolet plus visible shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjvisdfu] - standard_name = surface_upwelling_diffuse_ultraviolet_and_visible_shortwave_flux - long_name = surface upwelling diffuse ultraviolet plus visible shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[adjvisdfd] - standard_name = surface_downwelling_diffuse_ultraviolet_and_visible_shortwave_flux - long_name = surface downwelling diffuse ultraviolet plus visible shortwave flux at current time - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[aerodp] - standard_name = atmosphere_optical_thickness_due_to_ambient_aerosol_particles - long_name = vertical integrated optical depth for various aerosol species - units = none - dimensions = (horizontal_loop_extent,number_of_species_for_aerosol_optical_depth) - type = real - kind = kind_phys -[alb1d] - standard_name = surface_albedo_perturbation - long_name = surface albedo perturbation - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[alpha] - standard_name = cloud_overlap_decorrelation_parameter - long_name = cloud overlap decorrelation parameter for RRTMG (but not for RRTMGP) - units = frac - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[bexp1d] - standard_name = perturbation_of_soil_type_b_parameter - long_name = perturbation of soil type "b" parameter - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cd] - standard_name = surface_drag_coefficient_for_momentum_in_air - long_name = surface exchange coeff for momentum - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cd_water] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_water - long_name = surface exchange coeff for momentum over water - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cd_land] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_land - long_name = surface exchange coeff for momentum over land - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cd_ice] - standard_name = surface_drag_coefficient_for_momentum_in_air_over_ice - long_name = surface exchange coeff for momentum over ice - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cdq] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air - long_name = surface exchange coeff heat & moisture - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cdq_water] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_water - long_name = surface exchange coeff heat surface exchange coeff heat & moisture over ocean moisture over water - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cdq_land] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_land - long_name = surface exchange coeff heat & moisture over land - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cdq_ice] - standard_name = surface_drag_coefficient_for_heat_and_moisture_in_air_over_ice - long_name = surface exchange coeff heat & moisture over ice - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[chh_water] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_water - long_name = thermal exchange coefficient over water - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[chh_land] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_land - long_name = thermal exchange coefficient over land - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[chh_ice] - standard_name = surface_drag_mass_flux_for_heat_and_moisture_in_air_over_ice - long_name = thermal exchange coefficient over ice - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cf_upi] - standard_name = convective_cloud_fraction_for_microphysics - long_name = convective cloud fraction for microphysics - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[clcn] - standard_name = convective_cloud_volume_fraction - long_name = convective cloud volume fraction - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[cldf] - standard_name = cloud_area_fraction - long_name = fraction of grid box area in which updrafts occur - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cldsa] - standard_name = cloud_area_fraction_for_radiation - long_name = fraction of clouds for low, middle, high, total and BL - units = frac - dimensions = (horizontal_loop_extent,5) - type = real - kind = kind_phys -[cldtaulw] - standard_name = cloud_optical_depth_layers_at_10mu_band - long_name = approx 10mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[cldtausw] - standard_name = cloud_optical_depth_layers_at_0p55mu_band - long_name = approx .55mu band layer cloud optical depth - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[cld1d] - standard_name = cloud_work_function - long_name = cloud work function - units = m2 s-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[clouds(:,:,1)] - standard_name = total_cloud_fraction - long_name = layer total cloud fraction - units = frac - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,2)] - standard_name = cloud_liquid_water_path - long_name = layer cloud liquid water path - units = g m-2 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,3)] - standard_name = mean_effective_radius_for_liquid_cloud - long_name = mean effective radius for liquid cloud - units = um - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,4)] - standard_name = cloud_ice_water_path - long_name = layer cloud ice water path - units = g m-2 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,5)] - standard_name = mean_effective_radius_for_ice_cloud - long_name = mean effective radius for ice cloud - units = um - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,6)] - standard_name = cloud_rain_water_path - long_name = cloud rain water path - units = g m-2 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,7)] - standard_name = mean_effective_radius_for_rain_drop - long_name = mean effective radius for rain drop - units = um - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,8)] - standard_name = cloud_snow_water_path - long_name = cloud snow water path - units = g m-2 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clouds(:,:,9)] - standard_name = mean_effective_radius_for_snow_flake - long_name = mean effective radius for snow flake - units = um - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[clw] - standard_name = convective_transportable_tracers - long_name = array to contain cloud water and other convective trans. tracers - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers_for_convective_transport) - type = real - kind = kind_phys -[clw(:,:,1)] - standard_name = ice_water_mixing_ratio_convective_transport_tracer - long_name = ratio of mass of ice water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[clw(:,:,2)] - standard_name = cloud_condensed_water_mixing_ratio_convective_transport_tracer - long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) in the convectively transported tracer array - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[clw(:,:,index_for_turbulent_kinetic_energy_convective_transport_tracer)] - standard_name = turbulent_kinetic_energy_convective_transport_tracer - long_name = turbulent kinetic energy in the convectively transported tracer array - units = m2 s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[clx] - standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height - long_name = frac. of grid box with by subgrid height_above_mean_sea_level higher than critical height - units = frac - dimensions = (horizontal_loop_extent,4) - type = real - kind = kind_phys -[clxss] - standard_name = fraction_of_grid_box_with_subgrid_orography_higher_than_critical_height_small_scale - long_name = frac. of grid box with by subgrid height_above_mean_sea_level higher than critical height small scale - units = frac - dimensions = (horizontal_loop_extent,4) - type = real - kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) -[cmm_water] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water - long_name = momentum exchange coefficient over water - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cmm_land] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_land - long_name = momentum exchange coefficient over land - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cmm_ice] - standard_name = surface_drag_wind_speed_for_momentum_in_air_over_ice - long_name = momentum exchange coefficient over ice - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cnv_dqldt] - standard_name = tendency_of_cloud_water_due_to_convective_microphysics - long_name = tendency of cloud water due to convective microphysics - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[cnv_fice] - standard_name = ice_fraction_in_convective_tower - long_name = ice fraction in convective tower - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[cnv_mfd] - standard_name = detrained_mass_flux - long_name = detrained mass flux - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[cnv_ndrop] - standard_name = number_concentration_of_cloud_liquid_water_particles_for_detrainment - long_name = droplet number concentration in convective detrainment - units = m-3 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[cnv_nice] - standard_name = number_concentration_of_ice_crystals_for_detrainment - long_name = crystal number concentration in convective detrainment - units = m-3 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[cnvc] - standard_name = convective_cloud_cover - long_name = convective cloud cover - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[cnvw] - standard_name = convective_cloud_water_mixing_ratio - long_name = moist convective cloud water mixing ratio - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[ctei_r] - standard_name = cloud_top_entrainment_instability_value - long_name = cloud top entrainment instability value - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ctei_rml] - standard_name = grid_sensitive_critical_cloud_top_entrainment_instability_criteria - long_name = grid sensitive critical cloud top entrainment instability criteria - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[cumabs] - standard_name = maximum_column_heating_rate - long_name = maximum heating rate in column - units = K s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dd_mf] - standard_name = instantaneous_atmosphere_downdraft_convective_mass_flux - long_name = (downdraft mass flux) * delt - units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[de_lgth] - standard_name = cloud_decorrelation_length - long_name = cloud decorrelation length - units = km - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[del] - standard_name = air_pressure_difference_between_midlayers - long_name = air pressure difference between midlayers - units = Pa - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[del_gz] - standard_name = geopotential_difference_between_midlayers_divided_by_midlayer_virtual_temperature - long_name = difference between mid-layer geopotentials divided by mid-layer virtual temperature - units = m2 s-2 K-1 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys -[delr] - standard_name = layer_pressure_thickness_for_radiation - long_name = layer pressure thickness on radiation levels - units = hPa - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[dlength] - standard_name = characteristic_grid_length_scale - long_name = representative horizontal length scale of grid box - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dqdt] - standard_name = process_split_cumulative_tendency_of_tracers - long_name = updated tendency of the tracers due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys -[dqdt(:,:,index_of_specific_humidity_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_specific_humidity - long_name = water vapor specific humidity tendency due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_cloud_liquid_water_mixing_ratio - long_name = cloud condensed water mixing ratio tendency due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_cloud_ice_mixing_ratio - long_name = cloud condensed water mixing ratio tendency due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_ozone_mixing_ratio_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_ozone_mixing_ratio - long_name = ozone mixing ratio tendency due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_cloud_liquid_water_particles_in_air - long_name = number concentration of cloud droplets (liquid) tendency due to model physics - units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array > 0) -[dqdt(:,:,index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_cloud_ice_water_crystals_in_air - long_name = number concentration of ice tendency due to model physics - units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_hygroscopic_aerosols - long_name = number concentration of water-friendly aerosols tendency due to model physics - units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (index_of_mass_number_concentration_of_hygroscopic_aerosols_in_tracer_concentration_array > 0) -[dqdt(:,:,index_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols - long_name = number concentration of ice-friendly aerosols tendency due to model physics - units = kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (index_of_mass_number_concentration_of_nonhygroscopic_ice_nucleating_aerosols_in_tracer_concentration_array > 0) -[dqdt(:,:,index_of_rain_mixing_ratio_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_rain_mixing_ratio - long_name = ratio of mass of rain water tendency to mass of dry air plus vapor (without condensates) due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_snow_mixing_ratio_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_snow_mixing_ratio - long_name = ratio of mass of snow water tendency to mass of dry air plus vapor (without condensates) due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_graupel_mixing_ratio_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_graupel_mixing_ratio - long_name = ratio of mass of graupel tendency to mass of dry air plus vapor (without condensates) due to model physics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqdt(:,:,index_of_turbulent_kinetic_energy_in_tracer_concentration_array)] - standard_name = process_split_cumulative_tendency_of_turbulent_kinetic_energy - long_name = turbulent kinetic energy tendency due to model physics - units = J s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dqsfc1] - standard_name = instantaneous_surface_upward_latent_heat_flux - long_name = surface upward latent heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[drain] - standard_name = subsurface_runoff_flux - long_name = subsurface runoff flux - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dtdt] - standard_name = process_split_cumulative_tendency_of_air_temperature - long_name = air temperature tendency due to model physics - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dtsfc1] - standard_name = instantaneous_surface_upward_sensible_heat_flux - long_name = surface upward sensible heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dtzm] - standard_name = mean_change_over_depth_in_sea_water_temperature - long_name = mean of dT(z) (zsea1 to zsea2) - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dt_mf] - standard_name = instantaneous_atmosphere_detrainment_convective_mass_flux - long_name = (detrainment mass flux) * delt - units = kg m-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dudt] - standard_name = process_split_cumulative_tendency_of_x_wind - long_name = zonal wind tendency due to model physics - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dusfcg] - standard_name = instantaneous_x_stress_due_to_gravity_wave_drag - long_name = zonal surface stress due to orographic gravity wave drag - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dusfc1] - standard_name = instantaneous_surface_x_momentum_flux - long_name = x momentum flux - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dvdftra] - standard_name = tendency_of_vertically_diffused_tracer_concentration - long_name = updated tendency of the tracers due to vertical diffusion in PBL scheme - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) - type = real - kind = kind_phys -[dvdt] - standard_name = process_split_cumulative_tendency_of_y_wind - long_name = meridional wind tendency due to model physics - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dvsfcg] - standard_name = instantaneous_y_stress_due_to_gravity_wave_drag - long_name = meridional surface stress due to orographic gravity wave drag - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dvsfc1] - standard_name = instantaneous_surface_y_momentum_flux - long_name = y momentum flux - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dzlyr] - standard_name = layer_thickness_for_radiation - long_name = layer thickness on radiation levels - units = km - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[elvmax] - standard_name = maximum_subgrid_orography - long_name = maximum of subgrid height_above_mean_sea_level - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ep1d] - standard_name = surface_upward_potential_latent_heat_flux - long_name = surface upward potential latent heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ep1d_water] - standard_name = surface_upward_potential_latent_heat_flux_over_water - long_name = surface upward potential latent heat flux over water - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ep1d_land] - standard_name = surface_upward_potential_latent_heat_flux_over_land - long_name = surface upward potential latent heat flux over land - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ep1d_ice] - standard_name = surface_upward_potential_latent_heat_flux_over_ice - long_name = surface upward potential latent heat flux over ice - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[evap_water] - standard_name = kinematic_surface_upward_latent_heat_flux_over_water - long_name = kinematic surface upward latent heat flux over water - units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[evap_land] - standard_name = kinematic_surface_upward_latent_heat_flux_over_land - long_name = kinematic surface upward latent heat flux over land - units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[evap_ice] - standard_name = kinematic_surface_upward_latent_heat_flux_over_ice - long_name = kinematic surface upward latent heat flux over ice - units = kg kg-1 m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[evbs] - standard_name = soil_upward_latent_heat_flux - long_name = soil upward latent heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[evcw] - standard_name = canopy_upward_latent_heat_flux - long_name = canopy upward latent heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[pah] - standard_name = total_precipitation_advected_heat - long_name = precipitation advected heat - total - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ecan] - standard_name = evaporation_of_intercepted_water - long_name = evaporation of intercepted water - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[etran] - standard_name = transpiration_rate - long_name = transpiration rate - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[edir] - standard_name = soil_surface_evaporation_rate - long_name = soil surface evaporation rate - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[faerlw] - standard_name = aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = mixed - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys -[faerlw(:,:,:,1)] - standard_name = aerosol_optical_depth_for_longwave_bands_01_16 - long_name = aerosol optical depth for longwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys -[faerlw(:,:,:,2)] - standard_name = aerosol_single_scattering_albedo_for_longwave_bands_01_16 - long_name = aerosol single scattering albedo for longwave bands 01-16 - units = frac - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys -[faerlw(:,:,:,3)] - standard_name = aerosol_asymmetry_parameter_for_longwave_bands_01_16 - long_name = aerosol asymmetry parameter for longwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_longwave_radiation) - type = real - kind = kind_phys -[faersw] - standard_name = aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = mixed - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation,number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - kind = kind_phys -[faersw(:,:,:,1)] - standard_name = aerosol_optical_depth_for_shortwave_bands_01_16 - long_name = aerosol optical depth for shortwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys -[faersw(:,:,:,2)] - standard_name = aerosol_single_scattering_albedo_for_shortwave_bands_01_16 - long_name = aerosol single scattering albedo for shortwave bands 01-16 - units = frac - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys -[faersw(:,:,:,3)] - standard_name = aerosol_asymmetry_parameter_for_shortwave_bands_01_16 - long_name = aerosol asymmetry parameter for shortwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation,number_of_aerosol_bands_for_shortwave_radiation) - type = real - kind = kind_phys -[ffhh_water] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_water - long_name = Monin-Obukhov similarity function for heat over water - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ffhh_land] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_land - long_name = Monin-Obukhov similarity function for heat over land - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ffhh_ice] - standard_name = Monin_Obukhov_similarity_function_for_heat_over_ice - long_name = Monin-Obukhov similarity function for heat over ice - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fh2] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m - long_name = Monin-Obukhov similarity parameter for heat at 2m - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fh2_water] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_water - long_name = Monin-Obukhov similarity parameter for heat at 2m over water - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fh2_land] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_land - long_name = Monin-Obukhov similarity parameter for heat at 2m over land - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fh2_ice] - standard_name = Monin_Obukhov_similarity_function_for_heat_at_2m_over_ice - long_name = Monin-Obukhov similarity parameter for heat at 2m over ice - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[flag_cice] - standard_name = flag_for_cice - long_name = flag for cice - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[flag_guess] - standard_name = flag_for_guess_run - long_name = flag for guess run - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[flag_iter] - standard_name = flag_for_iteration - long_name = flag for iteration - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[ffmm_water] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_water - long_name = Monin-Obukhov similarity function for momentum over water - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ffmm_land] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_land - long_name = Monin-Obukhov similarity function for momentum over land - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ffmm_ice] - standard_name = Monin_Obukhov_similarity_function_for_momentum_over_ice - long_name = Monin-Obukhov similarity function for momentum over ice - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fm10] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m - long_name = Monin-Obukhov similarity parameter for momentum at 10m - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fm10_water] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_water - long_name = Monin-Obukhov similarity parameter for momentum at 10m over water - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fm10_land] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_land - long_name = Monin-Obukhov similarity parameter for momentum at 10m over land - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fm10_ice] - standard_name = Monin_Obukhov_similarity_function_for_momentum_at_10m_over_ice - long_name = Monin-Obukhov similarity parameter for momentum at 10m over ice - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[frain] - standard_name = dynamics_to_physics_timestep_ratio - long_name = ratio of dynamics timestep to physics timestep - units = none - dimensions = () - type = real - kind = kind_phys -[frland] - standard_name = land_area_fraction_for_microphysics - long_name = land area fraction used in microphysics schemes - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[fscav] - standard_name = fraction_of_tracer_scavenged - long_name = fraction of the tracer (aerosols) that is scavenged by convection - units = km-1 - dimensions = (number_of_tracers_scavenged) - type = real - kind = kind_phys -[fswtr] - standard_name = fraction_of_cloud_top_water_scavenged - long_name = fraction of the tracer (cloud top water) that is scavenged by convection - units = km-1 - dimensions = (number_of_tracers_scavenged) - type = real - kind = kind_phys -[gabsbdlw] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground - long_name = total sky surface downward longwave flux absorbed by the ground - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gabsbdlw_water] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_water - long_name = total sky surface downward longwave flux absorbed by the ground over water - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gabsbdlw_land] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_land - long_name = total sky surface downward longwave flux absorbed by the ground over land - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gabsbdlw_ice] - standard_name = surface_downwelling_longwave_flux_absorbed_by_ground_over_ice - long_name = total sky surface downward longwave flux absorbed by the ground over ice - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gamma] - standard_name = anisotropy_of_subgrid_orography - long_name = anisotropy of subgrid height_above_mean_sea_level - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gamq] - standard_name = countergradient_mixing_term_for_water_vapor - long_name = countergradient mixing term for water vapor - units = kg kg-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gamt] - standard_name = countergradient_mixing_term_for_temperature - long_name = countergradient mixing term for temperature - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gasvmr(:,:,1)] - standard_name = volume_mixing_ratio_of_co2 - long_name = volume mixing ratio co2 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,2)] - standard_name = volume_mixing_ratio_of_n2o - long_name = volume mixing ratio no2 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,3)] - standard_name = volume_mixing_ratio_of_ch4 - long_name = volume mixing ratio ch4 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,4)] - standard_name = volume_mixing_ratio_of_o2 - long_name = volume mixing ratio o2 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,5)] - standard_name = volume_mixing_ratio_of_co - long_name = volume mixing ratio co - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,6)] - standard_name = volume_mixing_ratio_of_cfc11 - long_name = volume mixing ratio cfc11 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,7)] - standard_name = volume_mixing_ratio_of_cfc12 - long_name = volume mixing ratio cfc12 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,8)] - standard_name = volume_mixing_ratio_of_cfc22 - long_name = volume mixing ratio cfc22 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,9)] - standard_name = volume_mixing_ratio_of_ccl4 - long_name = volume mixing ratio ccl4 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gasvmr(:,:,10)] - standard_name = volume_mixing_ratio_of_cfc113 - long_name = volume mixing ratio cfc113 - units = m3 m-3 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[gflx] - standard_name = upward_heat_flux_in_soil - long_name = soil heat flux - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gflx_water] - standard_name = upward_heat_flux_in_soil_over_water - long_name = soil heat flux over water - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gflx_land] - standard_name = upward_heat_flux_in_soil_over_land - long_name = soil heat flux over land - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[gflx_ice] - standard_name = upward_heat_flux_in_soil_over_ice - long_name = soil heat flux over ice - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[graupelmp] - standard_name = lwe_thickness_of_graupel_amount - long_name = explicit graupel fall on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme) -[gwdcu] - standard_name = tendency_of_x_wind_due_to_convective_gravity_wave_drag - long_name = zonal wind tendency due to convective gravity wave drag - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[gwdcv] - standard_name = tendency_of_y_wind_due_to_convective_gravity_wave_drag - long_name = meridional wind tendency due to convective gravity wave drag - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[zvfun] - standard_name = function_of_surface_roughness_length_and_green_vegetation_fraction - long_name = function of surface roughness length and green vegetation fraction - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[hffac] - standard_name = surface_upward_sensible_heat_flux_reduction_factor - long_name = surface upward sensible heat flux reduction factor from canopy heat storage - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[hflxq] - standard_name = kinematic_surface_upward_sensible_heat_flux_reduced_by_surface_roughness_and_vegetation - long_name = kinematic surface upward sensible heat flux reduced by surface roughness and vegetation - units = K m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[hflx_water] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_water - long_name = kinematic surface upward sensible heat flux over water - units = K m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[hflx_land] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_land - long_name = kinematic surface upward sensible heat flux over land - units = K m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[hflx_ice] - standard_name = kinematic_surface_upward_sensible_heat_flux_over_ice - long_name = kinematic surface upward sensible heat flux over ice - units = K m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[htlwc] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step_and_radiation_levels - long_name = total sky heating rate due to longwave radiation - units = K s-1 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[htlw0] - standard_name = tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels - long_name = clear sky heating rate due to longwave radiation - units = K s-1 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[htswc] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_on_radiation_time_step_and_radiation_levels - long_name = total sky heating rate due to shortwave radiation - units = K s-1 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[htsw0] - standard_name = tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky_on_radiation_time_step_and_radiation_levels - long_name = clear sky heating rates due to shortwave radiation - units = K s-1 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[icemp] - standard_name = lwe_thickness_of_ice_amount - long_name = explicit ice fall on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme) -[dry] - standard_name = flag_nonzero_land_surface_fraction - long_name = flag indicating presence of some land surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[idxday] - standard_name = daytime_points - long_name = daytime points - units = index - dimensions = (horizontal_loop_extent) - type = integer -[icy] - standard_name = flag_nonzero_sea_ice_surface_fraction - long_name = flag indicating presence of some sea ice surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[lake] - standard_name = flag_nonzero_lake_surface_fraction - long_name = flag indicating presence of some lake surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[use_flake] - standard_name = flag_for_using_flake - long_name = flag indicating lake points using flake model - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[ocean] - standard_name = flag_nonzero_ocean_surface_fraction - long_name = flag indicating presence of some ocean surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[ipr] - standard_name = horizontal_index_of_printed_column - long_name = horizontal index of printed column - units = index - dimensions = () - type = integer -[islmsk] - standard_name = sea_land_ice_mask - long_name = sea/land/ice mask (=0/1/2) - units = flag - dimensions = (horizontal_loop_extent) - type = integer -[islmsk_cice] - standard_name = sea_land_ice_mask_cice - long_name = sea/land/ice mask cice (=0/1/2) - units = flag - dimensions = (horizontal_loop_extent) - type = integer -[itc] - standard_name = index_of_first_chemical_tracer_for_convection - long_name = index of first chemical tracer transported/scavenged by convection - units = index - dimensions = () - type = integer -[wet] - standard_name = flag_nonzero_wet_surface_fraction - long_name = flag indicating presence of some ocean or lake surface area fraction - units = flag - dimensions = (horizontal_loop_extent) - type = logical -[kb] - standard_name = vertical_index_difference_between_layer_and_lower_bound - long_name = vertical index difference between layer and lower bound - units = index - dimensions = () - type = integer -[kbot] - standard_name = vertical_index_at_cloud_base - long_name = vertical index at cloud base - units = index - dimensions = (horizontal_loop_extent) - type = integer -[kcnv] - standard_name = flag_deep_convection - long_name = flag indicating whether convection occurs in column (0 or 1) - units = flag - dimensions = (horizontal_loop_extent) - type = integer -[kd] - standard_name = vertical_index_difference_between_inout_and_local - long_name = vertical index difference between in/out and local - units = index - dimensions = () - type = integer -[kinver] - standard_name = index_of_highest_temperature_inversion - long_name = index of highest temperature inversion - units = index - dimensions = (horizontal_loop_extent) - type = integer -[kpbl] - standard_name = vertical_index_at_top_of_atmosphere_boundary_layer - long_name = vertical index at top atmospheric boundary layer - units = index - dimensions = (horizontal_loop_extent) - type = integer -[kt] - standard_name = vertical_index_difference_between_layer_and_upper_bound - long_name = vertical index difference between layer and upper bound - units = index - dimensions = () - type = integer -[ktop] - standard_name = vertical_index_at_cloud_top - long_name = vertical index at cloud top - units = index - dimensions = (horizontal_loop_extent) - type = integer -[latidxprnt] - standard_name = latitude_index_in_debug_printouts - long_name = latitude index in debug printouts - units = index - dimensions = () - type = integer -[levi] - standard_name = vertical_interface_dimension_interstitial - long_name = vertical interface dimension - units = count - dimensions = () - type = integer -[lmk] - standard_name = adjusted_vertical_layer_dimension_for_radiation - long_name = adjusted number of vertical layers for radiation - units = count - dimensions = () - type = integer -[lmp] - standard_name = adjusted_vertical_level_dimension_for_radiation - long_name = adjusted number of vertical levels for radiation - units = count - dimensions = () - type = integer -[mbota] - standard_name = model_layer_number_at_cloud_base - long_name = vertical indices for low, middle and high cloud bases - units = index - dimensions = (horizontal_loop_extent,3) - type = integer -[mg3_as_mg2] - standard_name = flag_mg3_as_mg2 - long_name = flag for controlling prep for Morrison-Gettelman microphysics - units = flag - dimensions = () - type = logical -[mtopa] - standard_name = model_layer_number_at_cloud_top - long_name = vertical indices for low, middle and high cloud tops - units = index - dimensions = (horizontal_loop_extent,3) - type = integer -[nbdlw] - standard_name = number_of_aerosol_bands_for_longwave_radiation - long_name = number of aerosol bands for longwave radiation - units = count - dimensions = () - type = integer -[nbdsw] - standard_name = number_of_aerosol_bands_for_shortwave_radiation - long_name = number of aerosol bands for shortwave radiation - units = count - dimensions = () - type = integer -[ncgl] - standard_name = local_graupel_number_concentration - long_name = number concentration of graupel local to physics - units = kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[ncpi] - standard_name = local_ice_number_concentration - long_name = number concentration of ice local to physics - units = kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_shoc) -[ncpl] - standard_name = local_condesed_water_number_concentration - long_name = number concentration of condensed water local to physics - units = kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_shoc) -[ncpr] - standard_name = local_rain_number_concentration - long_name = number concentration of rain local to physics - units = kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[ncps] - standard_name = local_snow_number_concentration - long_name = number concentration of snow local to physics - units = kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[ncstrac] - standard_name = number_of_tracers_for_CS - long_name = number of convectively transported tracers in Chikira-Sugiyama deep convection scheme - units = count - dimensions = () - type = integer -[nday] - standard_name = daytime_points_dimension - long_name = daytime points dimension - units = count - dimensions = () - type = integer -[nf_aelw] - standard_name = number_of_aerosol_output_fields_for_longwave_radiation - long_name = number of aerosol output fields for longwave radiation - units = count - dimensions = () - type = integer -[nf_aesw] - standard_name = number_of_aerosol_output_fields_for_shortwave_radiation - long_name = number of aerosol output fields for shortwave radiation - units = count - dimensions = () - type = integer -[nn] - standard_name = number_of_tracers_for_convective_transport - long_name = number of tracers for convective transport - units = count - dimensions = () - type = integer -[nsamftrac] - standard_name = number_of_tracers_for_samf - long_name = number of tracers for scale-aware mass flux schemes - units = count - dimensions = () - type = integer -[nscav] - standard_name = number_of_tracers_scavenged - long_name = number of tracers scavenged - units = count - dimensions = () - type = integer -[nspc1] - standard_name = number_of_species_for_aerosol_optical_depth - long_name = number of species for output aerosol optical depth plus total - units = count - dimensions = () - type = integer -[ntcwx] - standard_name = index_for_liquid_cloud_condensate_vertical_diffusion_tracer - long_name = index for liquid cloud condensate in the vertically diffused tracer array - units = index - dimensions = () - type = integer -[ntiwx] - standard_name = index_for_ice_cloud_condensate_vertical_diffusion_tracer - long_name = index for ice cloud condensate in the vertically diffused tracer array - units = index - dimensions = () - type = integer -[ntrwx] - standard_name = index_for_rain_water_vertical_diffusion_tracer - long_name = tracer index for rain water in the vertically diffused tracer array - units = index - dimensions = () - type = integer -[ntk] - standard_name = index_for_turbulent_kinetic_energy_convective_transport_tracer - long_name = index for turbulent kinetic energy in the convectively transported tracer array - units = index - dimensions = () - type = integer -[ntkev] - standard_name = index_for_turbulent_kinetic_energy_vertical_diffusion_tracer - long_name = index for turbulent kinetic energy in the vertically diffused tracer array - units = index - dimensions = () - type = integer -[nvdiff] - standard_name = number_of_vertical_diffusion_tracers - long_name = number of tracers to diffuse vertically - units = count - dimensions = () - type = integer -[oa4] - standard_name = asymmetry_of_subgrid_orography - long_name = asymmetry of subgrid height_above_mean_sea_level - units = none - dimensions = (horizontal_loop_extent,4) - type = real - kind = kind_phys -[varss] - standard_name = standard_deviation_of_subgrid_orography_small_scale - long_name = standard deviation of subgrid height_above_mean_sea_level small scale - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) -[oa4ss] - standard_name = asymmetry_of_subgrid_orography_small_scale - long_name = asymmetry of subgrid height_above_mean_sea_level small scale - units = none - dimensions = (horizontal_loop_extent,4) - type = real - kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) -[oc] - standard_name = convexity_of_subgrid_orography - long_name = convexity of subgrid height_above_mean_sea_level - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ocss] - standard_name = convexity_of_subgrid_orography_small_scale - long_name = convexity of subgrid height_above_mean_sea_level small scale - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) -[olyr] - standard_name = ozone_concentration_at_layer_for_radiation - long_name = ozone concentration layer - units = kg kg-1 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[otspt] - standard_name = flag_convective_tracer_transport - long_name = flag to enable tracer transport by updrafts/downdrafts[(:,1)] or subsidence [(:,2)] - units = flag - dimensions = (number_of_tracers_plus_one,2) - type = logical -[oz_coeffp5] - standard_name = number_of_coefficients_in_ozone_forcing_data_plus_five - long_name = number of coefficients in ozone forcing data plus five - units = index - dimensions = () - type = integer -[phys_hydrostatic] - standard_name = flag_for_hydrostatic_heating_from_physics - long_name = flag for use of hydrostatic heating in physics - units = flag - dimensions = () - type = logical -[plvl] - standard_name = air_pressure_at_interface_for_radiation_in_hPa - long_name = air pressure at vertical interface for radiation calculation - units = hPa - dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) - type = real - kind = kind_phys -[plyr] - standard_name = air_pressure_at_layer_for_radiation_in_hPa - long_name = air pressure at vertical layer for radiation calculation - units = hPa - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[prnum] - standard_name = prandtl_number - long_name = turbulent Prandtl number - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[q2mp] - standard_name = specific_humidity_at_2m_from_noahmp - long_name = 2 meter specific humidity from noahmp - units = kg kg-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) -[qgl] - standard_name = local_graupel_mixing_ratio - long_name = ratio of mass of graupel to mass of dry air plus vapor (without condensates) local to physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) -[qicn] - standard_name = mass_fraction_of_convective_cloud_ice - long_name = mass fraction of convective cloud ice water - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[qlcn] - standard_name = mass_fraction_of_convective_cloud_liquid_water - long_name = mass fraction of convective cloud liquid water - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[qlyr] - standard_name = water_vapor_specific_humidity_at_layer_for_radiation - long_name = specific humidity layer - units = kg kg-1 - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[qrn] - standard_name = local_rain_water_mixing_ratio - long_name = ratio of mass of rain water to mass of dry air plus vapor (without condensates) local to physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) -[qsnw] - standard_name = local_snow_water_mixing_ratio - long_name = ratio of mass of snow water to mass of dry air plus vapor (without condensates) local to physics - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme .or. flag_for_shoc) -[prcpmp] - standard_name = lwe_thickness_of_explicit_precipitation_amount - long_name = explicit precipitation (rain, ice, snow, graupel, ...) on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[qss_water] - standard_name = surface_specific_humidity_over_water - long_name = surface air saturation specific humidity over water - units = kg kg-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[qss_land] - standard_name = surface_specific_humidity_over_land - long_name = surface air saturation specific humidity over land - units = kg kg-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[qss_ice] - standard_name = surface_specific_humidity_over_ice - long_name = surface air saturation specific humidity over ice - units = kg kg-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[radar_reset] - standard_name = flag_for_resetting_radar_reflectivity_calculation - long_name = flag for resetting radar reflectivity calculation - units = flag - dimensions = () - type = logical -[raddt] - standard_name = time_step_for_radiation - long_name = radiation time step - units = s - dimensions = () - type = real - kind = kind_phys -[raincd] - standard_name = lwe_thickness_of_deep_convective_precipitation_amount - long_name = deep convective rainfall amount on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[raincs] - standard_name = lwe_thickness_of_shallow_convective_precipitation_amount - long_name = shallow convective rainfall amount on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[rainmcadj] - standard_name = lwe_thickness_of_moist_convective_adj_precipitation_amount - long_name = adjusted moist convective rainfall amount on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[rainmp] - standard_name = lwe_thickness_of_explicit_rain_amount - long_name = explicit rain on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme) -[rainp] - standard_name = tendency_of_rain_water_mixing_ratio_due_to_microphysics - long_name = tendency of rain water mixing ratio due to microphysics - units = kg kg-1 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[rb] - standard_name = bulk_richardson_number_at_lowest_model_level - long_name = bulk Richardson number at the surface - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[rb_water] - standard_name = bulk_richardson_number_at_lowest_model_level_over_water - long_name = bulk Richardson number at the surface over water - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[rb_land] - standard_name = bulk_richardson_number_at_lowest_model_level_over_land - long_name = bulk Richardson number at the surface over land - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[rb_ice] - standard_name = bulk_richardson_number_at_lowest_model_level_over_ice - long_name = bulk Richardson number at the surface over ice - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[max_hourly_reset] - standard_name = flag_reset_maximum_hourly_fields - long_name = flag for resetting maximum hourly fields - units = flag - dimensions = () - type = logical -[ext_diag_thompson_reset] - standard_name = flag_reset_extended_diagnostics_output_arrays_from_thompson_microphysics - long_name = flag for resetting extended diagnostics output arrays from thompson microphysics - units = flag - dimensions = () - type = logical -[rhc] - standard_name = critical_relative_humidity - long_name = critical relative humidity - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[rho1] - standard_name = air_density_at_lowest_model_layer - long_name = air density at lowest model layer - units = kg m-3 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[runoff] - standard_name = surface_runoff_flux - long_name = surface runoff flux - units = kg m-2 s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[save_q(:,:,index_of_ozone_mixing_ratio_in_tracer_concentration_array)] - standard_name = ozone_mixing_ratio_save - long_name = ozone mixing ratio before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q(:,:,index_of_turbulent_kinetic_energy_in_tracer_concentration_array)] - standard_name = turbulent_kinetic_energy_save - long_name = turbulent kinetic energy before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q(:,:,index_of_cloud_liquid_water_mixing_ratio_in_tracer_concentration_array)] - standard_name = cloud_condensed_water_mixing_ratio_save - long_name = ratio of mass of cloud water to mass of dry air plus vapor (without condensates) before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q(:,:,index_of_cloud_ice_mixing_ratio_in_tracer_concentration_array)] - standard_name = ice_water_mixing_ratio_save - long_name = cloud ice water mixing ratio before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q(:,:,index_of_snow_mixing_ratio_in_tracer_concentration_array)] - standard_name = snow_mixing_ratio_save - long_name = cloud snow mixing ratio before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q(:,:,index_of_specific_humidity_in_tracer_concentration_array)] - standard_name = water_vapor_specific_humidity_save - long_name = water vapor specific humidity before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q(:,:,index_of_mass_number_concentration_of_cloud_droplets_in_tracer_concentration_array)] - standard_name = liquid_cloud_number_concentration_save - long_name = liquid cloud number concentration before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q(:,:,index_of_mass_number_concentration_of_cloud_ice_in_tracer_concentration_array)] - standard_name = ice_cloud_number_concentration_save - long_name = ice cloud number concentration before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_q] - standard_name = tracer_concentration_save - long_name = tracer concentration before entering a physics scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys -[save_t] - standard_name = air_temperature_save - long_name = air temperature before entering a physics scheme - units = K - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_tcp] - standard_name = air_temperature_save_from_convective_parameterization - long_name = air temperature after cumulus parameterization - units = K - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_u] - standard_name = x_wind_save - long_name = x-wind before entering a physics scheme - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[save_v] - standard_name = y_wind_save - long_name = y-wind before entering a physics scheme - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[sbsno] - standard_name = snow_deposition_sublimation_upward_latent_heat_flux - long_name = latent heat flux from snow depo/subl - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[scmpsw] - standard_name = components_of_surface_downward_shortwave_fluxes - long_name = derived type for special components of surface downward shortwave fluxes - units = W m-2 - dimensions = (horizontal_loop_extent) - type = cmpfsw_type -[sfcalb] - standard_name = surface_albedo_components - long_name = surface albedo IR/UV/VIS components - units = frac - dimensions = (horizontal_loop_extent,number_of_components_for_surface_albedo) - type = real - kind = kind_phys -[sfcalb(:,1)] - standard_name = surface_albedo_due_to_near_IR_direct - long_name = surface albedo due to near IR direct beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[sfcalb(:,2)] - standard_name = surface_albedo_due_to_near_IR_diffused - long_name = surface albedo due to near IR diffused beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[sfcalb(:,3)] - standard_name = surface_albedo_due_to_UV_and_VIS_direct - long_name = surface albedo due to UV+VIS direct beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[sfcalb(:,4)] - standard_name = surface_albedo_due_to_UV_and_VIS_diffused - long_name = surface albedo due to UV+VIS diffused beam - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[sigma] - standard_name = slope_of_subgrid_orography - long_name = slope of subgrid height_above_mean_sea_level - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[sigmaf] - standard_name = bounded_vegetation_area_fraction - long_name = areal fractional cover of green vegetation bounded on the bottom - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[sigmafrac] - standard_name = convective_updraft_area_fraction - long_name = convective updraft area fraction - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[sigmatot] - standard_name = convective_updraft_area_fraction_at_model_interfaces - long_name = convective updraft area fraction at model interfaces - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[skip_macro] - standard_name = flag_skip_macro - long_name = flag to skip cloud macrophysics in Morrison scheme - units = flag - dimensions = () - type = logical -[snowc] - standard_name = surface_snow_area_fraction - long_name = surface snow area fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[snohf] - standard_name = snow_freezing_rain_upward_latent_heat_flux - long_name = latent heat flux due to snow and frz rain - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[snowmp] - standard_name = lwe_thickness_of_snow_amount - long_name = explicit snow fall on physics timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_gfdl_microphysics_scheme .or. control_for_microphysics_scheme == identifier_for_thompson_microphysics_scheme) -[snowmt] - standard_name = surface_snow_melt - long_name = snow melt during timestep - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[stress] - standard_name = surface_wind_stress - long_name = surface wind stress - units = m2 s-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[stress_water] - standard_name = surface_wind_stress_over_water - long_name = surface wind stress over water - units = m2 s-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[stress_land] - standard_name = surface_wind_stress_over_land - long_name = surface wind stress over land - units = m2 s-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[stress_ice] - standard_name = surface_wind_stress_over_ice - long_name = surface wind stress over ice - units = m2 s-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[t2mmp] - standard_name = temperature_at_2m_from_noahmp - long_name = 2 meter temperature from noahmp - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) -[theta] - standard_name = angle_from_east_of_maximum_subgrid_orographic_variations - long_name = angle with_respect to east of maximum subgrid orographic variations - units = degree - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tlvl] - standard_name = air_temperature_at_interface_for_radiation - long_name = air temperature at vertical interface for radiation calculation - units = K - dimensions = (horizontal_loop_extent,adjusted_vertical_level_dimension_for_radiation) - type = real - kind = kind_phys -[tlyr] - standard_name = air_temperature_at_layer_for_radiation - long_name = air temperature at vertical layer for radiation calculation - units = K - dimensions = (horizontal_loop_extent,adjusted_vertical_layer_dimension_for_radiation) - type = real - kind = kind_phys -[tprcp_water] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_water - long_name = total precipitation amount in each time step over water - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tprcp_land] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_land - long_name = total precipitation amount in each time step over land - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tprcp_ice] - standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep_over_ice - long_name = total precipitation amount in each time step over ice - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tracers_start_index] - standard_name = start_index_of_other_tracers - long_name = beginning index of the non-water tracer species - units = index - dimensions = () - type = integer -[tracers_total] - standard_name = number_of_total_tracers - long_name = total number of tracers - units = count - dimensions = () - type = integer -[trans_aero] - standard_name = flag_for_aerosol_convective_transport_and_PBL_diffusion - long_name = flag for aerosol convective transport and PBL diffusion - units = flag - dimensions = () - type = logical -[trans] - standard_name = transpiration_flux - long_name = total plant transpiration rate - units = W m-2 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tseal] - standard_name = surface_skin_temperature_for_nsst - long_name = ocean surface skin temperature - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tsfa] - standard_name = surface_air_temperature_for_radiation - long_name = lowest model layer air temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tsfc_water] - standard_name = surface_skin_temperature_over_water - long_name = surface skin temperature over water - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tsfg] - standard_name = surface_ground_temperature_for_radiation - long_name = surface ground temperature for radiation - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tsurf_water] - standard_name = surface_skin_temperature_after_iteration_over_water - long_name = surface skin temperature after iteration over water - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tsurf_land] - standard_name = surface_skin_temperature_after_iteration_over_land - long_name = surface skin temperature after iteration over land - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tsurf_ice] - standard_name = surface_skin_temperature_after_iteration_over_ice - long_name = surface skin temperature after iteration over ice - units = K - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tracers_water] - standard_name = number_of_water_tracers - long_name = number of water-related tracers - units = count - dimensions = () - type = integer -[uustar_water] - standard_name = surface_friction_velocity_over_water - long_name = surface friction velocity over water - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[uustar_land] - standard_name = surface_friction_velocity_over_land - long_name = surface friction velocity over land - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[uustar_ice] - standard_name = surface_friction_velocity_over_ice - long_name = surface friction velocity over ice - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[vdftra] - standard_name = vertically_diffused_tracer_concentration - long_name = tracer concentration diffused by PBL scheme - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_vertical_diffusion_tracers) - type = real - kind = kind_phys -[lndp_vgf] - standard_name = magnitude_of_perturbation_of_vegetation_fraction - long_name = magnitude of perturbation of vegetation fraction - units = frac - dimensions = () - type = real - kind = kind_phys -[vegf1d] - standard_name = perturbation_of_vegetation_fraction - long_name = perturbation of vegetation fraction - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[w_upi] - standard_name = vertical_velocity_for_updraft - long_name = vertical velocity for updraft - units = m s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (control_for_microphysics_scheme == identifier_for_morrison_gettelman_microphysics_scheme) -[wcbmax] - standard_name = maximum_updraft_velocity_at_cloud_base - long_name = maximum updraft velocity at cloud base - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[wind] - standard_name = wind_speed_at_lowest_model_layer - long_name = wind speed at lowest model level - units = m s-1 - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[work1] - standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes - long_name = grid size related coefficient used in scale-sensitive schemes - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[work2] - standard_name = grid_size_related_coefficient_used_in_scale_sensitive_schemes_complement - long_name = complement to work1 - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[work3] - standard_name = ratio_of_exner_function_between_midlayer_and_interface_at_lowest_model_layer - long_name = Exner function ratio bt midlayer and interface at 1st layer - units = ratio - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[xcosz] - standard_name = instantaneous_cosine_of_zenith_angle - long_name = cosine of zenith angle at current time - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[xlai1d] - standard_name = perturbation_of_leaf_area_index - long_name = perturbation of leaf area index - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[xmu] - standard_name = zenith_angle_temporal_adjustment_factor_for_shortwave_fluxes - long_name = zenith angle temporal adjustment factor for shortwave - units = none - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[z01d] - standard_name = perturbation_of_momentum_roughness_length - long_name = perturbation of momentum roughness length - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ztmax_water] - standard_name = bounded_surface_roughness_length_for_heat_over_water - long_name = bounded surface roughness length for heat over water - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ztmax_land] - standard_name = bounded_surface_roughness_length_for_heat_over_land - long_name = bounded surface roughness length for heat over land - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[ztmax_ice] - standard_name = bounded_surface_roughness_length_for_heat_over_ice - long_name = bounded surface roughness length for heat over ice - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[zt1d] - standard_name = perturbation_of_heat_to_momentum_roughness_length_ratio - long_name = perturbation of heat to momentum roughness length ratio - units = frac - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[zmtb] - standard_name = height_of_mountain_blocking - long_name = height of mountain blocking drag - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dudt_ngw] - standard_name = tendency_of_x_wind_due_to_nonorographic_gravity_wave_drag - long_name = zonal wind tendency due to non-stationary GWs - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) -[dvdt_ngw] - standard_name = tendency_of_y_wind_due_to_nonorographic_gravity_wave_drag - long_name = meridional wind tendency due to non-stationary GWs - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) -[dtdt_ngw] - standard_name = tendency_of_air_temperature_due_to_nonorographic_gravity_wave_drag - long_name = air temperature tendency due to non-stationary GWs - units = K s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) -[kdis_ngw] - standard_name = atmosphere_momentum_diffusivity_due_to_nonorographic_gravity_wave_drag - long_name = eddy mixing due to non-stationary GWs - units = m2 s-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_ugwp_version_1 .or. control_for_drag_suite_gravity_wave_drag==33 .or. control_for_drag_suite_gravity_wave_drag==22 .or. control_for_drag_suite_gravity_wave_drag==3 .or. control_for_drag_suite_gravity_wave_drag==2) -[zlwb] - standard_name = height_of_low_level_wave_breaking - long_name = height of low level wave breaking - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[zogw] - standard_name = height_of_launch_level_of_orographic_gravity_wave - long_name = height of launch level of orographic gravity wave - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[zngw] - standard_name = height_of_launch_level_of_nonorographic_gravity_waves - long_name = height of launch level of non-stationary GWs - units = m - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tau_tofd] - standard_name = instantaneous_momentum_flux_due_to_turbulent_orographic_form_drag - long_name = instantaneous momentum flux due to TOFD - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tau_mtb] - standard_name = instantaneous_momentum_flux_due_to_mountain_blocking_drag - long_name = instantaneous momentum flux due to mountain blocking drag - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tau_ogw] - standard_name = instantaneous_momentum_flux_due_to_orographic_gravity_wave_drag - long_name = instantaneous momentum flux due to orographic gravity wave drag - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tau_oss] - standard_name = momentum_flux_due_to_subgrid_scale_orographic_gravity_wave_drag - long_name = momentum flux or stress due to SSO including OBL-OSS-OFD - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[tau_ngw] - standard_name = instantaneous_momentum_flux_due_to_nonstationary_gravity_wave - long_name = instantaneous momentum flux due to nonstationary gravity waves - units = Pa - dimensions = (horizontal_loop_extent) - type = real - kind = kind_phys -[dudt_mtb] - standard_name = instantaneous_change_in_x_wind_due_to_mountain_blocking_drag - long_name = instantaneous change in x wind due to mountain blocking drag - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[dudt_tms] - standard_name = tendency_of_x_wind_due_to_turbulent_orographic_form_drag - long_name = instantaneous change in x wind due to TOFD - units = m s-2 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys -[qs_lay] - standard_name = saturation_vapor_pressure - long_name = saturation vapor pressure - units = Pa - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[q_lay] - standard_name = water_vapor_mixing_ratio - long_name = water vaport mixing ratio - units = kg kg-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[p_lay] - standard_name = air_pressure_at_layer_for_RRTMGP - long_name = air pressure layer - units = Pa - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[p_lev] - standard_name = air_pressure_at_interface_for_RRTMGP - long_name = air pressure level - units = Pa - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[t_lay] - standard_name = air_temperature_at_layer_for_RRTMGP - long_name = air temperature layer - units = K - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[t_lev] - standard_name = air_temperature_at_interface_for_RRTMGP - long_name = air temperature layer - units = K - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[tv_lay] - standard_name = virtual_temperature - long_name = layer virtual temperature - units = K - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[relhum] - standard_name = relative_humidity - long_name = layer relative humidity - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[deltaZ] - standard_name = layer_thickness - long_name = layer_thickness - units = m - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[tracer] - standard_name = chemical_tracers - long_name = chemical tracers - units = g g-1 - dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[cloud_overlap_param] - standard_name = cloud_overlap_param - long_name = cloud overlap parameter for RRTMGP (but not for RRTMG) - units = km - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[precip_overlap_param] - standard_name = precip_overlap_param - long_name = precipitation overlap parameter - units = km - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxlwUP_allsky] - standard_name = RRTMGP_lw_flux_profile_upward_allsky - long_name = RRTMGP upward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxlwDOWN_allsky] - standard_name = RRTMGP_lw_flux_profile_downward_allsky - long_name = RRTMGP downward longwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxlwUP_clrsky] - standard_name = RRTMGP_lw_flux_profile_upward_clrsky - long_name = RRTMGP upward longwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxlwDOWN_clrsky] - standard_name = RRTMGP_lw_flux_profile_downward_clrsky - long_name = RRTMGP downward longwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxswUP_allsky] - standard_name = RRTMGP_sw_flux_profile_upward_allsky - long_name = RRTMGP upward shortwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxswDOWN_allsky] - standard_name = RRTMGP_sw_flux_profile_downward_allsky - long_name = RRTMGP downward shortwave all-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxswUP_clrsky] - standard_name = RRTMGP_sw_flux_profile_upward_clrsky - long_name = RRTMGP upward shortwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[fluxswDOWN_clrsky] - standard_name = RRTMGP_sw_flux_profile_downward_clrsky - long_name = RRTMGP downward shortwave clr-sky flux profile - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[flxprf_lw] - standard_name = RRTMGP_lw_fluxes - long_name = lw fluxes total sky / csk and up / down at levels - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = proflw_type - active = (flag_for_rrtmgp_radiation_scheme) -[flxprf_sw] - standard_name = RRTMGP_sw_fluxes - long_name = sw fluxes total sky / csk and up / down at levels - units = W m-2 - dimensions = (horizontal_loop_extent,vertical_interface_dimension) - type = profsw_type - active = (flag_for_rrtmgp_radiation_scheme) -[aerosolslw] - standard_name = RRTMGP_aerosol_optical_properties_for_longwave_bands_01_16 - long_name = aerosol optical properties for longwave bands 01-16 - units = mixed - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands,number_of_aerosol_output_fields_for_longwave_radiation) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[aerosolslw(:,:,:,1)] - standard_name = RRTMGP_aerosol_optical_depth_for_longwave_bands_01_16 - long_name = aerosol optical depth for longwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) - type = real - kind = kind_phys -[aerosolslw(:,:,:,2)] - standard_name = RRTMGP_aerosol_single_scattering_albedo_for_longwave_bands_01_16 - long_name = aerosol single scattering albedo for longwave bands 01-16 - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) - type = real - kind = kind_phys -[aerosolslw(:,:,:,3)] - standard_name = RRTMGP_aerosol_asymmetry_parameter_for_longwave_bands_01_16 - long_name = aerosol asymmetry parameter for longwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_longwave_bands) - type = real - kind = kind_phys -[aerosolssw] - standard_name = RRTMGP_aerosol_optical_properties_for_shortwave_bands_01_16 - long_name = aerosol optical properties for shortwave bands 01-16 - units = mixed - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands, number_of_aerosol_output_fields_for_shortwave_radiation) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[aerosolssw(:,:,:,1)] - standard_name = RRTMGP_aerosol_optical_depth_for_shortwave_bands_01_16 - long_name = aerosol optical depth for shortwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) - type = real - kind = kind_phys -[aerosolssw(:,:,:,2)] - standard_name = RRTMGP_aerosol_single_scattering_albedo_for_shortwave_bands_01_16 - long_name = aerosol single scattering albedo for shortwave bands 01-16 - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) - type = real - kind = kind_phys -[aerosolssw(:,:,:,3)] - standard_name = RRTMGP_aerosol_asymmetry_parameter_for_shortwave_bands_01_16 - long_name = aerosol asymmetry parameter for shortwave bands 01-16 - units = none - dimensions = (horizontal_loop_extent,vertical_layer_dimension, number_of_shortwave_bands) - type = real - kind = kind_phys -[precip_frac] - standard_name = precipitation_fraction_by_layer - long_name = precipitation fraction in each layer - units = frac - dimensions = (horizontal_loop_extent,vertical_layer_dimension) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[sw_optical_props_clrsky] - standard_name = shortwave_optical_properties_for_clear_sky - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[sw_optical_props_cloudsByBand] - standard_name = shortwave_optical_properties_for_cloudy_atmosphere_by_band - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[sw_optical_props_precipByBand] - standard_name = shortwave_optical_properties_for_precipitation_by_band - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[sw_optical_props_precip] - standard_name = shortwave_optical_properties_for_precipitation - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[sw_optical_props_clouds] - standard_name = shortwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[sw_optical_props_aerosol] - standard_name = shortwave_optical_properties_for_aerosols - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[gas_concentrations] - standard_name = Gas_concentrations_for_RRTMGP_suite - long_name = DDT containing gas concentrations for RRTMGP radiation scheme - units = DDT - dimensions = () - type = ty_gas_concs - active = (flag_for_rrtmgp_radiation_scheme) -[sources] - standard_name = longwave_source_function - long_name = Fortran DDT containing RRTMGP source functions - units = DDT - dimensions = () - type = ty_source_func_lw - active = (flag_for_rrtmgp_radiation_scheme) -[lw_optical_props_clrsky] - standard_name = longwave_optical_properties_for_clear_sky - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - active = (flag_for_rrtmgp_radiation_scheme) -[lw_optical_props_clouds] - standard_name = longwave_optical_properties_for_cloudy_atmosphere - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[lw_optical_props_precip] - standard_name = longwave_optical_properties_for_precipitation - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[lw_optical_props_cloudsByBand] - standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[lw_optical_props_precipByBand] - standard_name = longwave_optical_properties_for_precipitation_by_band - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_2str - active = (flag_for_rrtmgp_radiation_scheme) -[lw_optical_props_aerosol] - standard_name = longwave_optical_properties_for_aerosols - long_name = Fortran DDT containing RRTMGP optical properties - units = DDT - dimensions = () - type = ty_optical_props_1scl - active = (flag_for_rrtmgp_radiation_scheme) -[sfc_emiss_byband] - standard_name = surface_emissivity_in_each_RRTMGP_LW_band - long_name = surface emissivity in each RRTMGP LW band - units = none - dimensions = (number_of_longwave_bands,horizontal_loop_extent) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[sec_diff_byband] - standard_name = secant_of_diffusivity_angle_each_RRTMGP_LW_band - long_name = secant of diffusivity angle in each RRTMGP LW band - units = none - dimensions = (number_of_longwave_bands,horizontal_loop_extent) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[sfc_alb_nir_dir] - standard_name = surface_albedo_nearIR_direct - long_name = near-IR (direct) surface albedo (sfc_alb_nir_dir) - units = none - dimensions = (number_of_shortwave_bands,horizontal_loop_extent) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[sfc_alb_nir_dif] - standard_name = surface_albedo_nearIR_diffuse - long_name = near-IR (diffuse) surface albedo (sfc_alb_nir_dif) - units = none - dimensions = (number_of_shortwave_bands,horizontal_loop_extent) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[sfc_alb_uvvis_dir] - standard_name = surface_albedo_uvvis_direct - long_name = UVVIS (direct) surface albedo (sfc_alb_uvvis_dir) - units = none - dimensions = (number_of_shortwave_bands,horizontal_loop_extent) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[sfc_alb_uvvis_dif] - standard_name = surface_albedo_uvvis_diffuse - long_name = UVVIS (diffuse) surface albedo (sfc_alb_uvvis_dif) - units = none - dimensions = (number_of_shortwave_bands,horizontal_loop_extent) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[toa_src_lw] - standard_name = toa_incident_lw_flux_by_spectral_point - long_name = TOA longwave incident flux at each spectral points - units = W m-2 - dimensions = (horizontal_loop_extent,number_of_longwave_spectral_points) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[toa_src_sw] - standard_name = toa_incident_sw_flux_by_spectral_point - long_name = TOA shortwave incident flux at each spectral points - units = W m-2 - dimensions = (horizontal_loop_extent,number_of_shortwave_spectral_points) - type = real - kind = kind_phys - active = (flag_for_rrtmgp_radiation_scheme) -[rtg_ozone_index] - standard_name = vertically_diffused_tracer_index_of_ozone - long_name = number of tracers - units = count - dimensions = () - type = integer - -######################################################################## -[ccpp-table-properties] - name = GFS_data_type - type = ddt - dependencies = - -[ccpp-arg-table] - name = GFS_data_type + name = GFS_data_type type = ddt [Statein] standard_name = GFS_statein_type_instance @@ -10945,9 +8377,8 @@ name = GFS_typedefs type = module relative_path = ../physics/physics - dependencies = machine.F,physcons.F90,radlw_param.f,radsw_param.f,GFDL_parse_tracers.F90 - dependencies = rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rte/mo_optical_props.F90,rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90 - dependencies = rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rte/mo_rte_config.F90,rte-rrtmgp/rte/mo_source_functions.F90 + dependencies = machine.F,physcons.F90,radlw_param.f,radsw_param.f + dependencies = GFDL_parse_tracers.F90,h2o_def.f,ozne_def.f [ccpp-arg-table] name = GFS_typedefs @@ -10988,12 +8419,6 @@ units = DDT dimensions = () type = GFS_grid_type -[GFS_interstitial_type] - standard_name = GFS_interstitial_type - long_name = definition of type GFS_interstitial_type - units = DDT - dimensions = () - type = GFS_interstitial_type [GFS_radtend_type] standard_name = GFS_radtend_type long_name = definition of type GFS_radtend_type diff --git a/ccpp/driver/CCPP_driver.F90 b/ccpp/driver/CCPP_driver.F90 index 392b37151..fd6814bf5 100644 --- a/ccpp/driver/CCPP_driver.F90 +++ b/ccpp/driver/CCPP_driver.F90 @@ -1,6 +1,6 @@ module CCPP_driver - use ccpp_api, only: ccpp_t + use ccpp_types, only: ccpp_t use ccpp_static_api, only: ccpp_physics_init, & ccpp_physics_timestep_init, & @@ -101,8 +101,8 @@ subroutine CCPP_step (step, nblks, ierr) else if (trim(step)=="physics_init") then ! Since the physics init step is independent of the blocking structure, - ! we can use cdata_domain here. Since we don't use threading on the outside, - ! we can allow threading inside the physics init routines. + ! we can use cdata_domain. And since we don't use threading on the host + ! model side, we can allow threading inside the physics init routines. GFS_control%nthreads = nthrds call ccpp_physics_init(cdata_domain, suite_name=trim(ccpp_suite), ierr=ierr) @@ -116,8 +116,8 @@ subroutine CCPP_step (step, nblks, ierr) else if (trim(step)=="timestep_init") then ! Since the physics timestep init step is independent of the blocking structure, - ! we can use cdata_domain here. Since we don't use threading on the outside, - ! we can allow threading inside the timestep init (time_vary) routines. + ! we can use cdata_domain. And since we don't use threading on the host + ! model side, we can allow threading inside the timestep init (time_vary) routines. GFS_control%nthreads = nthrds call ccpp_physics_timestep_init(cdata_domain, suite_name=trim(ccpp_suite), group_name="time_vary", ierr=ierr) @@ -159,11 +159,11 @@ subroutine CCPP_step (step, nblks, ierr) ! *DH 20210104 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - ! Radiation and stochastic physics + ! Radiation, physics and and stochastic physics - threaded regions using blocked data structures else if (trim(step)=="radiation" .or. trim(step)=="physics" .or. trim(step)=="stochastics") then ! Set number of threads available to physics schemes to one, - ! because threads are used on the outside for blocking + ! because threads are used on the host model side for blocking GFS_control%nthreads = 1 !$OMP parallel num_threads (nthrds) & @@ -188,8 +188,8 @@ subroutine CCPP_step (step, nblks, ierr) call ccpp_physics_run(cdata_block(nb,ntX), suite_name=trim(ccpp_suite), group_name=trim(step), ierr=ierr2) if (ierr2/=0) then write(0,'(2a,3(a,i4),a)') "An error occurred in ccpp_physics_run for group ", trim(step), & - ", block ", nb, " and thread ", nt, " (ntX=", ntX, ")" - write(0,'(a)') trim(cdata_block(nb,nt)%errmsg) + ", block ", nb, " and thread ", nt, " (ntX=", ntX, "):" + write(0,'(a)') trim(cdata_block(nb,ntX)%errmsg) ierr = ierr + ierr2 end if end do @@ -202,7 +202,7 @@ subroutine CCPP_step (step, nblks, ierr) else if (trim(step)=="timestep_finalize") then ! Since the physics timestep finalize step is independent of the blocking structure, - ! we can use cdata_domain here. Since we don't use threading on the outside, + ! we can use cdata_domain. And since we don't use threading on the host model side, ! we can allow threading inside the timestep finalize (time_vary) routines. GFS_control%nthreads = nthrds @@ -213,27 +213,23 @@ subroutine CCPP_step (step, nblks, ierr) return end if - ! Finalize - else if (trim(step)=="finalize") then + ! Physics finalize + else if (trim(step)=="physics_finalize") then - ! Loop over blocks, don't use threading on the outside but allowing threading - ! inside the finalization, similar to what is done for the initialization + ! Since the physics finalize step is independent of the blocking structure, + ! we can use cdata_domain. And since we don't use threading on the host + ! model side, we can allow threading inside the physics finalize routines. GFS_control%nthreads = nthrds - ! Fast physics are finalized in atmosphere_end, loop over - ! all blocks and threads to finalize all other physics - do nt=1,nthrdsX - do nb=1,nblks - !--- Finalize CCPP physics - call ccpp_physics_finalize(cdata_block(nb,nt), suite_name=trim(ccpp_suite), ierr=ierr) - if (ierr/=0) then - write(0,'(a,i4,a,i4)') "An error occurred in ccpp_physics_finalize for block ", nb, " and thread ", nt - write(0,'(a)') trim(cdata_block(nb,nt)%errmsg) - return - end if - end do - end do + call ccpp_physics_finalize(cdata_domain, suite_name=trim(ccpp_suite), ierr=ierr) + if (ierr/=0) then + write(0,'(a)') "An error occurred in ccpp_physics_finalize" + write(0,'(a)') trim(cdata_domain%errmsg) + return + end if + ! Finalize + else if (trim(step)=="finalize") then ! Deallocate cdata structure for blocks and threads if (allocated(cdata_block)) deallocate(cdata_block) diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 8b4954e60..dd8eaed80 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -2377,26 +2377,16 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop if (Model%lndp_type /= 0) then idx = idx + 1 - ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'sfc_wts1' + ExtDiag(idx)%axes = 3 + ExtDiag(idx)%name = 'sfc_wts' ExtDiag(idx)%desc = 'perturbation amplitude' ExtDiag(idx)%unit = 'none' ExtDiag(idx)%mod_name = 'gfs_phys' allocate (ExtDiag(idx)%data(nblks)) do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%sfc_wts(:,1) + ExtDiag(idx)%data(nb)%var3 => Coupling(nb)%sfc_wts(:,:) enddo - idx = idx + 1 - ExtDiag(idx)%axes = 2 - ExtDiag(idx)%name = 'sfc_wts2' - ExtDiag(idx)%desc = 'perturbation amplitude' - ExtDiag(idx)%unit = 'none' - ExtDiag(idx)%mod_name = 'gfs_phys' - allocate (ExtDiag(idx)%data(nblks)) - do nb = 1,nblks - ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%sfc_wts(:,2) - enddo endif if (Model%do_ca) then @@ -3721,7 +3711,8 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop enddo ! Cloud effective radii from Microphysics - if (Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_fer_hires) then + if (Model%imp_physics == Model%imp_physics_thompson .or. Model%imp_physics == Model%imp_physics_fer_hires .or. & + Model%imp_physics == Model%imp_physics_nssl ) then idx = idx + 1 ExtDiag(idx)%axes = 3 ExtDiag(idx)%name = 'cleffr' diff --git a/ccpp/driver/GFS_init.F90 b/ccpp/driver/GFS_init.F90 index 70f0f8494..793ed4c2e 100644 --- a/ccpp/driver/GFS_init.F90 +++ b/ccpp/driver/GFS_init.F90 @@ -6,8 +6,8 @@ module GFS_init GFS_sfcprop_type, GFS_coupling_type, & GFS_control_type, GFS_grid_type, & GFS_tbd_type, GFS_cldprop_type, & - GFS_radtend_type, GFS_diag_type, & - GFS_interstitial_type + GFS_radtend_type, GFS_diag_type + use CCPP_typedefs, only: GFS_interstitial_type implicit none @@ -17,6 +17,7 @@ module GFS_init ! Public entities !---------------- public GFS_initialize !< GFS initialization routine + public GFS_grid_populate !< Lat/lon/area setting -- exposed for moving nest CONTAINS !******************************************************************************************* diff --git a/ccpp/driver/GFS_restart.F90 b/ccpp/driver/GFS_restart.F90 index 1ffaed4dc..73e181b5f 100644 --- a/ccpp/driver/GFS_restart.F90 +++ b/ccpp/driver/GFS_restart.F90 @@ -133,7 +133,7 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & Restart%num3d = Model%ntot3d+1 endif ! General Convection - if (Model%imfdeepcnv .ge. 0 .or. Model%imfshalcnv .ge. 0) then + if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then Restart%num3d = Restart%num3d + 1 endif ! GF @@ -145,6 +145,14 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & Restart%num3d = Restart%num3d + 9 endif + if (Model%num_dfi_radar > 0) then + do itime=1,Model%dfi_radar_max_intervals + if(Model%ix_dfi_radar(itime)>0) then + Restart%num3d = Restart%num3d + 1 + endif + enddo + endif + allocate (Restart%name2d(Restart%num2d)) allocate (Restart%name3d(Restart%num3d)) allocate (Restart%data(nblks,max(Restart%num2d,Restart%num3d))) @@ -429,8 +437,9 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, & num = Model%ntot3d endif - !--Convection variable used in CB cloud fraction - if (Model%imfdeepcnv .ge. 0 .or. Model%imfshalcnv .ge. 0) then + !--Convection variable used in CB cloud fraction. Presently this + !--is only needed in sgscloud_radpre for imfdeepcnv == imfdeepcnv_gf. + if (Model%imfdeepcnv == Model%imfdeepcnv_gf) then num = num + 1 Restart%name3d(num) = 'cnv_3d_ud_mf' do nb = 1,nblks diff --git a/ccpp/framework b/ccpp/framework index a55457fe3..1968d572b 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit a55457fe3ef66e1651c94f99e72aba3362b105a2 +Subproject commit 1968d572bdc05ae612a6177bbd41cd2ac9759dd4 diff --git a/ccpp/physics b/ccpp/physics index 2bdc8706a..7f8b2119c 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 2bdc8706a97074b0929903eb4afbefedd8fb6312 +Subproject commit 7f8b2119ce8c2d098a6371ec2a4dfb0ad269eaba diff --git a/ccpp/suites/suite_FV3_CPT_v0.xml b/ccpp/suites/suite_FV3_CPT_v0.xml index 97780d609..b239bdb0a 100644 --- a/ccpp/suites/suite_FV3_CPT_v0.xml +++ b/ccpp/suites/suite_FV3_CPT_v0.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017.xml b/ccpp/suites/suite_FV3_GFS_2017.xml index e9a558052..01996d34b 100644 --- a/ccpp/suites/suite_FV3_GFS_2017.xml +++ b/ccpp/suites/suite_FV3_GFS_2017.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_csawmg.xml b/ccpp/suites/suite_FV3_GFS_2017_csawmg.xml index 634b6f1bc..dd7a2d421 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_csawmg.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_csawmg.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_csawmgshoc.xml b/ccpp/suites/suite_FV3_GFS_2017_csawmgshoc.xml index 3cf427182..a8210303d 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_csawmgshoc.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_csawmgshoc.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp.xml b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp.xml index fc50b260d..4538a691c 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_noahmp.xml b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_noahmp.xml index 77ffb364b..8e7e56605 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_noahmp.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_noahmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional.xml b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional.xml index b68ae6324..a7aeda91a 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional_c768.xml b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional_c768.xml index d9b253972..94ea0134a 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional_c768.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_gfdlmp_regional_c768.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_h2ophys.xml b/ccpp/suites/suite_FV3_GFS_2017_h2ophys.xml index 0f74901cb..9c481b3b0 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_h2ophys.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_h2ophys.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_myj.xml b/ccpp/suites/suite_FV3_GFS_2017_myj.xml index 44fbc8e8b..bc426c0dd 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_myj.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_myj.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_ntiedtke.xml b/ccpp/suites/suite_FV3_GFS_2017_ntiedtke.xml index 5f7e38fc6..98cb3f658 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_ntiedtke.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_ntiedtke.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_ozphys_2015.xml b/ccpp/suites/suite_FV3_GFS_2017_ozphys_2015.xml index 8cadb634c..82ca8a779 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_ozphys_2015.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_ozphys_2015.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_sas.xml b/ccpp/suites/suite_FV3_GFS_2017_sas.xml index 2a3c81ce8..0a5409419 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_sas.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_sas.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_satmedmf.xml b/ccpp/suites/suite_FV3_GFS_2017_satmedmf.xml index 554a8e27a..2b2d9b87d 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_satmedmf.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_satmedmf.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_satmedmfq.xml b/ccpp/suites/suite_FV3_GFS_2017_satmedmfq.xml index 665b592d1..1f7072b28 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_satmedmfq.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_satmedmfq.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_shinhong.xml b/ccpp/suites/suite_FV3_GFS_2017_shinhong.xml index 8e97dcff7..1a47f747f 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_shinhong.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_shinhong.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_stretched.xml b/ccpp/suites/suite_FV3_GFS_2017_stretched.xml index afce01ff5..1c213c760 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_stretched.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_stretched.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_2017_ysu.xml b/ccpp/suites/suite_FV3_GFS_2017_ysu.xml index b5421d98e..677530687 100644 --- a/ccpp/suites/suite_FV3_GFS_2017_ysu.xml +++ b/ccpp/suites/suite_FV3_GFS_2017_ysu.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshoc.xml b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshoc.xml index 49aef95fd..339c0b087 100644 --- a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshoc.xml +++ b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshoc.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst.xml b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst.xml index 48454781d..9a1e946ba 100644 --- a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst.xml +++ b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_flake.xml b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_flake.xml index e271f2adb..8de2261ac 100644 --- a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_flake.xml +++ b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_flake.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_ugwp.xml b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_ugwp.xml index 2c844d67a..63a8d22c0 100644 --- a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_ugwp.xml +++ b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsst_ugwp.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp.xml b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp.xml index 7a4ac83b5..a04344b22 100644 --- a/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp.xml +++ b/ccpp/suites/suite_FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_cpldnst_rasmgshoc.xml b/ccpp/suites/suite_FV3_GFS_cpldnst_rasmgshoc.xml index 73db27626..cd37e1b4a 100644 --- a/ccpp/suites/suite_FV3_GFS_cpldnst_rasmgshoc.xml +++ b/ccpp/suites/suite_FV3_GFS_cpldnst_rasmgshoc.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_rasmgshoc.xml b/ccpp/suites/suite_FV3_GFS_rasmgshoc.xml index f81376bc1..201c074c5 100644 --- a/ccpp/suites/suite_FV3_GFS_rasmgshoc.xml +++ b/ccpp/suites/suite_FV3_GFS_rasmgshoc.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15.xml b/ccpp/suites/suite_FV3_GFS_v15.xml index e2910d586..c712c71fe 100644 --- a/ccpp/suites/suite_FV3_GFS_v15.xml +++ b/ccpp/suites/suite_FV3_GFS_v15.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_gf.xml b/ccpp/suites/suite_FV3_GFS_v15_gf.xml index ac4d30e09..f0422a5af 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_gf.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_gf.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_gf_thompson.xml b/ccpp/suites/suite_FV3_GFS_v15_gf_thompson.xml index 333a9f966..747e6fa0a 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_gf_thompson.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_gf_thompson.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_mynn.xml b/ccpp/suites/suite_FV3_GFS_v15_mynn.xml index 765911524..7cfeaee11 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_mynn.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_mynn.xml @@ -21,7 +21,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_ras.xml b/ccpp/suites/suite_FV3_GFS_v15_ras.xml index c97e8ca3f..e03b8b3a8 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_ras.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_ras.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_rasmgshoc.xml b/ccpp/suites/suite_FV3_GFS_v15_rasmgshoc.xml index 13c386267..c0d95d323 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_rasmgshoc.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_rasmgshoc.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_thompson.xml b/ccpp/suites/suite_FV3_GFS_v15_thompson.xml index a26ec33fd..b911e489c 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_thompson.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_thompson.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml index 882f4ada0..b52da32cd 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml index f5da59232..3bca27630 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml +++ b/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15p2.xml b/ccpp/suites/suite_FV3_GFS_v15p2.xml index 10c8e363a..e87305c66 100644 --- a/ccpp/suites/suite_FV3_GFS_v15p2.xml +++ b/ccpp/suites/suite_FV3_GFS_v15p2.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15p2_RRTMGP.xml b/ccpp/suites/suite_FV3_GFS_v15p2_RRTMGP.xml deleted file mode 100644 index 4628d385f..000000000 --- a/ccpp/suites/suite_FV3_GFS_v15p2_RRTMGP.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - fv_sat_adj - - - - - GFS_time_vary_pre - GFS_rrtmgp_setup - GFS_rad_time_vary - GFS_phys_time_vary - - - - - GFS_suite_interstitial_rad_reset - GFS_rrtmgp_pre - GFS_radiation_surface - GFS_rrtmgp_gfdlmp_pre - GFS_rrtmgp_cloud_overlap_pre - GFS_cloud_diagnostics - GFS_rrtmgp_sw_pre - rrtmgp_sw_gas_optics - rrtmgp_sw_aerosol_optics - rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling - rrtmgp_sw_rte - GFS_rrtmgp_sw_post - rrtmgp_lw_pre - rrtmgp_lw_gas_optics - rrtmgp_lw_aerosol_optics - rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling - rrtmgp_lw_rte - GFS_rrtmgp_lw_post - - - - - GFS_suite_interstitial_phys_reset - GFS_suite_stateout_reset - get_prs_fv3 - GFS_suite_interstitial_1 - GFS_surface_generic_pre - GFS_surface_composites_pre - dcyc2t3 - GFS_surface_composites_inter - GFS_suite_interstitial_2 - - - - sfc_diff - GFS_surface_loop_control_part1 - sfc_nst_pre - sfc_nst - sfc_nst_post - lsm_noah - sfc_sice - GFS_surface_loop_control_part2 - - - - GFS_surface_composites_post - sfc_diag - sfc_diag_post - GFS_surface_generic_post - GFS_PBL_generic_pre - hedmf - GFS_PBL_generic_post - GFS_GWD_generic_pre - cires_ugwp - cires_ugwp_post - GFS_GWD_generic_post - GFS_suite_stateout_update - ozphys_2015 - h2ophys - get_phi_fv3 - GFS_suite_interstitial_3 - GFS_DCNV_generic_pre - samfdeepcnv - GFS_DCNV_generic_post - GFS_SCNV_generic_pre - samfshalcnv - GFS_SCNV_generic_post - GFS_suite_interstitial_4 - cnvc90 - GFS_MP_generic_pre - gfdl_cloud_microphys - GFS_MP_generic_post - maximum_hourly_diagnostics - phys_tend - - - - - GFS_stochastics - - - - diff --git a/ccpp/suites/suite_FV3_GFS_v15p2_no_nsst.xml b/ccpp/suites/suite_FV3_GFS_v15p2_no_nsst.xml index d5c965ccb..870ee75d9 100644 --- a/ccpp/suites/suite_FV3_GFS_v15p2_no_nsst.xml +++ b/ccpp/suites/suite_FV3_GFS_v15p2_no_nsst.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15plus.xml b/ccpp/suites/suite_FV3_GFS_v15plus.xml index ef91b9a8b..61c11cd5e 100644 --- a/ccpp/suites/suite_FV3_GFS_v15plus.xml +++ b/ccpp/suites/suite_FV3_GFS_v15plus.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15plusras.xml b/ccpp/suites/suite_FV3_GFS_v15plusras.xml index 1bbbe4ae3..1317676d1 100644 --- a/ccpp/suites/suite_FV3_GFS_v15plusras.xml +++ b/ccpp/suites/suite_FV3_GFS_v15plusras.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16.xml b/ccpp/suites/suite_FV3_GFS_v16.xml index 2f76cee2b..122b937e1 100644 --- a/ccpp/suites/suite_FV3_GFS_v16.xml +++ b/ccpp/suites/suite_FV3_GFS_v16.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_coupled.xml b/ccpp/suites/suite_FV3_GFS_v16_coupled.xml index b529bf27f..90c1b3ce6 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_coupled.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_coupled.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_coupled_noahmp.xml b/ccpp/suites/suite_FV3_GFS_v16_coupled_noahmp.xml index 306b37656..96d615e33 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_coupled_noahmp.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_coupled_noahmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmp.xml b/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmp.xml index ccc58c0a5..70676ec7f 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmp.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmpUGWPv1.xml b/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmpUGWPv1.xml index a745a5056..9825441a5 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmpUGWPv1.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_coupled_nsstNoahmpUGWPv1.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_coupled_p8.xml b/ccpp/suites/suite_FV3_GFS_v16_coupled_p8.xml index 423d37f6d..df3364d0e 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_coupled_p8.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_coupled_p8.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_couplednsst.xml b/ccpp/suites/suite_FV3_GFS_v16_couplednsst.xml index df4c32414..a00d4dfaf 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_couplednsst.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_couplednsst.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml b/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml index 3f782047f..8c32e3d76 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_csawmg.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_flake.xml b/ccpp/suites/suite_FV3_GFS_v16_flake.xml index 60d245402..12c48225f 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_flake.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_flake.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml b/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml index b3de0328d..d8cafbbd0 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_no_nsst.xml b/ccpp/suites/suite_FV3_GFS_v16_no_nsst.xml index ff5408de5..9191333a9 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_no_nsst.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_no_nsst.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_noahmp.xml b/ccpp/suites/suite_FV3_GFS_v16_noahmp.xml index d2594fb48..dc941c20b 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_noahmp.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_noahmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_nsstNoahmpUGWPv1.xml b/ccpp/suites/suite_FV3_GFS_v16_nsstNoahmpUGWPv1.xml index 27bd85442..a9b051b10 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_nsstNoahmpUGWPv1.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_nsstNoahmpUGWPv1.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_p8.xml b/ccpp/suites/suite_FV3_GFS_v16_p8.xml index 8828f503a..deede436e 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_p8.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_p8.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_ras.xml b/ccpp/suites/suite_FV3_GFS_v16_ras.xml index fd43954ca..be4aa4a13 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_ras.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_ras.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_thompson.xml b/ccpp/suites/suite_FV3_GFS_v16_thompson.xml index 43283b636..2bdd8a9e7 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_thompson.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_thompson.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_ugwpv1.xml b/ccpp/suites/suite_FV3_GFS_v16_ugwpv1.xml index 915e0b837..c477a1531 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_ugwpv1.xml +++ b/ccpp/suites/suite_FV3_GFS_v16_ugwpv1.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v16_coupled_p7_rrtmgp.xml b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml similarity index 67% rename from ccpp/suites/suite_FV3_GFS_v16_coupled_p7_rrtmgp.xml rename to ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml index 055f14dde..4a2cb64fc 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_coupled_p7_rrtmgp.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml @@ -1,16 +1,11 @@ - + - - - fv_sat_adj - - GFS_time_vary_pre - GFS_rrtmgp_setup + GFS_rrtmg_setup GFS_rad_time_vary GFS_phys_time_vary @@ -18,25 +13,15 @@ GFS_suite_interstitial_rad_reset - GFS_rrtmgp_pre + GFS_rrtmg_pre GFS_radiation_surface - GFS_rrtmgp_gfdlmp_pre - GFS_rrtmgp_cloud_overlap_pre - GFS_cloud_diagnostics - GFS_rrtmgp_sw_pre - rrtmgp_sw_gas_optics - rrtmgp_sw_aerosol_optics - rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling - rrtmgp_sw_rte - GFS_rrtmgp_sw_post - rrtmgp_lw_pre - rrtmgp_lw_gas_optics - rrtmgp_lw_aerosol_optics - rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling - rrtmgp_lw_rte - GFS_rrtmgp_lw_post + rad_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post @@ -73,8 +58,8 @@ satmedmfvdifq GFS_PBL_generic_post GFS_GWD_generic_pre - ugwpv1_gsldrag - ugwpv1_gsldrag_post + unified_ugwp + unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update ozphys_2015 @@ -90,15 +75,21 @@ GFS_suite_interstitial_4 cnvc90 GFS_MP_generic_pre - gfdl_cloud_microphys - GFS_MP_generic_post - maximum_hourly_diagnostics - phys_tend - + mp_thompson_pre + + + mp_thompson + + + mp_thompson_post + GFS_MP_generic_post + maximum_hourly_diagnostics + GFS_stochastics + phys_tend diff --git a/ccpp/suites/suite_FV3_GFS_v16_RRTMGP.xml b/ccpp/suites/suite_FV3_GFS_v17_p8.xml similarity index 66% rename from ccpp/suites/suite_FV3_GFS_v16_RRTMGP.xml rename to ccpp/suites/suite_FV3_GFS_v17_p8.xml index d161e34b1..c4b295a6d 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_RRTMGP.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8.xml @@ -1,16 +1,11 @@ - + - - - fv_sat_adj - - GFS_time_vary_pre - GFS_rrtmgp_setup + GFS_rrtmg_setup GFS_rad_time_vary GFS_phys_time_vary @@ -18,25 +13,15 @@ GFS_suite_interstitial_rad_reset - GFS_rrtmgp_pre + GFS_rrtmg_pre GFS_radiation_surface - GFS_rrtmgp_gfdlmp_pre - GFS_rrtmgp_cloud_overlap_pre - GFS_cloud_diagnostics - GFS_rrtmgp_sw_pre - rrtmgp_sw_gas_optics - rrtmgp_sw_aerosol_optics - rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling - rrtmgp_sw_rte - GFS_rrtmgp_sw_post - rrtmgp_lw_pre - rrtmgp_lw_gas_optics - rrtmgp_lw_aerosol_optics - rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling - rrtmgp_lw_rte - GFS_rrtmgp_lw_post + rad_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw + rrtmg_lw_post + GFS_rrtmg_post @@ -58,7 +43,7 @@ sfc_nst_pre sfc_nst sfc_nst_post - lsm_noah + noahmpdrv sfc_sice GFS_surface_loop_control_part2 @@ -72,8 +57,8 @@ satmedmfvdifq GFS_PBL_generic_post GFS_GWD_generic_pre - cires_ugwp - cires_ugwp_post + unified_ugwp + unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update ozphys_2015 @@ -89,15 +74,21 @@ GFS_suite_interstitial_4 cnvc90 GFS_MP_generic_pre - gfdl_cloud_microphys - GFS_MP_generic_post - maximum_hourly_diagnostics - phys_tend - + mp_thompson_pre + + + mp_thompson + + + mp_thompson_post + GFS_MP_generic_post + maximum_hourly_diagnostics + GFS_stochastics + phys_tend diff --git a/ccpp/suites/suite_FV3_GFS_v16_p7_rrtmgp.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml similarity index 83% rename from ccpp/suites/suite_FV3_GFS_v16_p7_rrtmgp.xml rename to ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml index e02969d3f..8b87043f4 100644 --- a/ccpp/suites/suite_FV3_GFS_v16_p7_rrtmgp.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_rrtmgp.xml @@ -1,12 +1,7 @@ - + - - - fv_sat_adj - - GFS_time_vary_pre @@ -20,19 +15,18 @@ GFS_suite_interstitial_rad_reset GFS_rrtmgp_pre GFS_radiation_surface - GFS_rrtmgp_gfdlmp_pre - GFS_rrtmgp_cloud_overlap_pre + GFS_rrtmgp_cloud_mp + GFS_rrtmgp_cloud_overlap GFS_cloud_diagnostics - GFS_rrtmgp_sw_pre + rad_sw_pre + rrtmgp_aerosol_optics rrtmgp_sw_gas_optics - rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics - rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics rrtmgp_lw_cloud_sampling rrtmgp_lw_rte @@ -72,8 +66,8 @@ satmedmfvdifq GFS_PBL_generic_post GFS_GWD_generic_pre - ugwpv1_gsldrag - ugwpv1_gsldrag_post + unified_ugwp + unified_ugwp_post GFS_GWD_generic_post GFS_suite_stateout_update ozphys_2015 @@ -89,15 +83,21 @@ GFS_suite_interstitial_4 cnvc90 GFS_MP_generic_pre - gfdl_cloud_microphys - GFS_MP_generic_post - maximum_hourly_diagnostics - phys_tend - + mp_thompson_pre + + + mp_thompson + + + mp_thompson_post + GFS_MP_generic_post + maximum_hourly_diagnostics + GFS_stochastics + phys_tend diff --git a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasnoahmp.xml b/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasnoahmp.xml index 0f9268de2..c5289bef9 100644 --- a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasnoahmp.xml +++ b/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasnoahmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwpnoahmp.xml b/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwpnoahmp.xml index 8b1a37662..c5595cd16 100644 --- a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwpnoahmp.xml +++ b/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwpnoahmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwprrtmgp.xml b/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwprrtmgp.xml deleted file mode 100644 index ab494c52a..000000000 --- a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstrasugwprrtmgp.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - fv_sat_adj - - - - - GFS_time_vary_pre - GFS_rrtmgp_setup - GFS_rad_time_vary - GFS_phys_time_vary - - - - - GFS_suite_interstitial_rad_reset - GFS_rrtmgp_pre - GFS_radiation_surface - GFS_rrtmgp_gfdlmp_pre - GFS_rrtmgp_cloud_overlap_pre - GFS_cloud_diagnostics - GFS_rrtmgp_sw_pre - rrtmgp_sw_gas_optics - rrtmgp_sw_aerosol_optics - rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling - rrtmgp_sw_rte - GFS_rrtmgp_sw_post - rrtmgp_lw_pre - rrtmgp_lw_gas_optics - rrtmgp_lw_aerosol_optics - rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling - rrtmgp_lw_rte - GFS_rrtmgp_lw_post - - - - - GFS_suite_interstitial_phys_reset - GFS_suite_stateout_reset - get_prs_fv3 - GFS_suite_interstitial_1 - GFS_surface_generic_pre - GFS_surface_composites_pre - dcyc2t3 - GFS_surface_composites_inter - GFS_suite_interstitial_2 - - - - sfc_diff - GFS_surface_loop_control_part1 - lsm_noah - sfc_cice - sfc_sice - sfc_nst_pre - sfc_nst - sfc_nst_post - GFS_surface_loop_control_part2 - - - - GFS_surface_composites_post - sfc_diag - sfc_diag_post - GFS_surface_generic_post - GFS_PBL_generic_pre - satmedmfvdifq - GFS_PBL_generic_post - GFS_GWD_generic_pre - ugwpv1_gsldrag - ugwpv1_gsldrag_post - GFS_GWD_generic_post - GFS_suite_stateout_update - ozphys_2015 - h2ophys - get_phi_fv3 - GFS_suite_interstitial_3 - GFS_DCNV_generic_pre - rascnv - GFS_DCNV_generic_post - GFS_SCNV_generic_pre - samfshalcnv - GFS_SCNV_generic_post - GFS_suite_interstitial_4 - cnvc90 - GFS_MP_generic_pre - gfdl_cloud_microphys - GFS_MP_generic_post - maximum_hourly_diagnostics - phys_tend - - - - - GFS_stochastics - - - - diff --git a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstsasugwpnoahmp.xml b/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstsasugwpnoahmp.xml index 10d0043aa..a9ca7c5cb 100644 --- a/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstsasugwpnoahmp.xml +++ b/ccpp/suites/suite_FV3_GFSv17alp_cpldnsstsasugwpnoahmp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras.xml b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras.xml index 640228132..bd5b1a1c9 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_flake.xml b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_flake.xml index 7e8fd184c..88c8b13db 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_flake.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_flake.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_ugwp.xml b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_ugwp.xml index 69ab6dc53..cf285cd2d 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_ugwp.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstras_ugwp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstrasnoshal.xml b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstrasnoshal.xml index 98a7faca0..d1d640ccf 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstrasnoshal.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstrasnoshal.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas.xml b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas.xml index b18b457ca..5ff64b4db 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas_ugwp.xml b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas_ugwp.xml index 6b6dd9c2d..8f9f07899 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas_ugwp.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_cpldnsstsas_ugwp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_ras.xml b/ccpp/suites/suite_FV3_GFSv17alpha_ras.xml index 8b48ccfd9..10fff2a8c 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_ras.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_ras.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_ras_flake.xml b/ccpp/suites/suite_FV3_GFSv17alpha_ras_flake.xml index d1bdac439..6c8947356 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_ras_flake.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_ras_flake.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_ras_ugwp.xml b/ccpp/suites/suite_FV3_GFSv17alpha_ras_ugwp.xml index 786cbb074..cbd6bf517 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_ras_ugwp.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_ras_ugwp.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFSv17alpha_sas.xml b/ccpp/suites/suite_FV3_GFSv17alpha_sas.xml index 6238d52f0..1b0940e2d 100644 --- a/ccpp/suites/suite_FV3_GFSv17alpha_sas.xml +++ b/ccpp/suites/suite_FV3_GFSv17alpha_sas.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf.xml b/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf.xml index 3285f72a6..cb94cc03a 100644 --- a/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf.xml +++ b/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf_nonsst.xml b/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf_nonsst.xml index 97437e886..c588d8598 100644 --- a/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf_nonsst.xml +++ b/ccpp/suites/suite_FV3_HAFS_v0_gfdlmp_tedmf_nonsst.xml @@ -20,7 +20,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_HAFS_v0_thompson_tedmf_gfdlsf.xml b/ccpp/suites/suite_FV3_HAFS_v0_thompson_tedmf_gfdlsf.xml index 652c5eabb..3e35b94a8 100644 --- a/ccpp/suites/suite_FV3_HAFS_v0_thompson_tedmf_gfdlsf.xml +++ b/ccpp/suites/suite_FV3_HAFS_v0_thompson_tedmf_gfdlsf.xml @@ -15,7 +15,7 @@ GFS_suite_interstitial_rad_reset GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre @@ -75,11 +75,7 @@ cnvc90 GFS_MP_generic_pre mp_thompson_pre - - mp_thompson - - mp_thompson_post GFS_MP_generic_post maximum_hourly_diagnostics diff --git a/ccpp/suites/suite_FV3_HRRR.xml b/ccpp/suites/suite_FV3_HRRR.xml index b5842046f..a4c5b7dbc 100644 --- a/ccpp/suites/suite_FV3_HRRR.xml +++ b/ccpp/suites/suite_FV3_HRRR.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_HRRR_smoke.xml b/ccpp/suites/suite_FV3_HRRR_smoke.xml index 450007623..e3f51c14d 100644 --- a/ccpp/suites/suite_FV3_HRRR_smoke.xml +++ b/ccpp/suites/suite_FV3_HRRR_smoke.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP.xml b/ccpp/suites/suite_FV3_RAP.xml index 66fab81d6..f03c1a1e8 100644 --- a/ccpp/suites/suite_FV3_RAP.xml +++ b/ccpp/suites/suite_FV3_RAP.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_RRTMGP.xml b/ccpp/suites/suite_FV3_RAP_RRTMGP.xml index 83542fae6..9377033cc 100644 --- a/ccpp/suites/suite_FV3_RAP_RRTMGP.xml +++ b/ccpp/suites/suite_FV3_RAP_RRTMGP.xml @@ -13,26 +13,23 @@ GFS_suite_interstitial_rad_reset - sgscloud_radpre GFS_rrtmgp_pre GFS_radiation_surface - GFS_rrtmgp_thompsonmp_pre - GFS_rrtmgp_cloud_overlap_pre + GFS_rrtmgp_cloud_mp + GFS_rrtmgp_cloud_overlap GFS_cloud_diagnostics - GFS_rrtmgp_sw_pre + rad_sw_pre + rrtmgp_aerosol_optics rrtmgp_sw_gas_optics - rrtmgp_sw_aerosol_optics rrtmgp_sw_cloud_optics rrtmgp_sw_cloud_sampling rrtmgp_sw_rte GFS_rrtmgp_sw_post rrtmgp_lw_pre rrtmgp_lw_gas_optics - rrtmgp_lw_aerosol_optics rrtmgp_lw_cloud_optics rrtmgp_lw_cloud_sampling rrtmgp_lw_rte - sgscloud_radpost GFS_rrtmgp_lw_post diff --git a/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml b/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml index 7f43ed2b8..3530d16ef 100644 --- a/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml +++ b/ccpp/suites/suite_FV3_RAP_cires_ugwp.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_flake.xml b/ccpp/suites/suite_FV3_RAP_flake.xml index 734f6dd89..be66bbaa0 100644 --- a/ccpp/suites/suite_FV3_RAP_flake.xml +++ b/ccpp/suites/suite_FV3_RAP_flake.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_noah.xml b/ccpp/suites/suite_FV3_RAP_noah.xml index dd4eb76f9..f5ce01c87 100644 --- a/ccpp/suites/suite_FV3_RAP_noah.xml +++ b/ccpp/suites/suite_FV3_RAP_noah.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml index f849a2b62..b0bf553bb 100644 --- a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml +++ b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_cires_ugwp.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_ugwpv1.xml b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_ugwpv1.xml index 924398609..00ef6952c 100644 --- a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_ugwpv1.xml +++ b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_ugwpv1.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_unified_ugwp.xml b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_unified_ugwp.xml index f639f233f..5230d75d6 100644 --- a/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_unified_ugwp.xml +++ b/ccpp/suites/suite_FV3_RAP_noah_sfcdiff_unified_ugwp.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_sfcdiff.xml b/ccpp/suites/suite_FV3_RAP_sfcdiff.xml index 82acb849a..0793433c6 100644 --- a/ccpp/suites/suite_FV3_RAP_sfcdiff.xml +++ b/ccpp/suites/suite_FV3_RAP_sfcdiff.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml b/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml index b79398ef7..0b04d9622 100644 --- a/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml +++ b/ccpp/suites/suite_FV3_RAP_unified_ugwp.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RRFS_v1alpha.xml b/ccpp/suites/suite_FV3_RRFS_v1alpha.xml index b3622828e..11b555375 100644 --- a/ccpp/suites/suite_FV3_RRFS_v1alpha.xml +++ b/ccpp/suites/suite_FV3_RRFS_v1alpha.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_RRFS_v1beta.xml b/ccpp/suites/suite_FV3_RRFS_v1beta.xml index 51e0f03cb..97228c0a6 100644 --- a/ccpp/suites/suite_FV3_RRFS_v1beta.xml +++ b/ccpp/suites/suite_FV3_RRFS_v1beta.xml @@ -16,7 +16,7 @@ sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface - rrtmg_sw_pre + rad_sw_pre rrtmg_sw rrtmg_sw_post rrtmg_lw_pre diff --git a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_RRTMGP.xml b/ccpp/suites/suite_FV3_RRFS_v1nssl.xml similarity index 61% rename from ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_RRTMGP.xml rename to ccpp/suites/suite_FV3_RRFS_v1nssl.xml index 87459ed65..d2a2ae911 100644 --- a/ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_RRTMGP.xml +++ b/ccpp/suites/suite_FV3_RRFS_v1nssl.xml @@ -1,11 +1,11 @@ - + GFS_time_vary_pre - GFS_rrtmgp_setup + GFS_rrtmg_setup GFS_rad_time_vary GFS_phys_time_vary @@ -14,26 +14,16 @@ GFS_suite_interstitial_rad_reset sgscloud_radpre - GFS_rrtmgp_pre + GFS_rrtmg_pre GFS_radiation_surface - GFS_rrtmgp_thompsonmp_pre - GFS_rrtmgp_cloud_overlap_pre - GFS_cloud_diagnostics - GFS_rrtmgp_sw_pre - rrtmgp_sw_gas_optics - rrtmgp_sw_aerosol_optics - rrtmgp_sw_cloud_optics - rrtmgp_sw_cloud_sampling - rrtmgp_sw_rte - GFS_rrtmgp_sw_post - rrtmgp_lw_pre - rrtmgp_lw_gas_optics - rrtmgp_lw_aerosol_optics - rrtmgp_lw_cloud_optics - rrtmgp_lw_cloud_sampling - rrtmgp_lw_rte + rad_sw_pre + rrtmg_sw + rrtmg_sw_post + rrtmg_lw_pre + rrtmg_lw sgscloud_radpost - GFS_rrtmgp_lw_post + rrtmg_lw_post + GFS_rrtmg_post @@ -50,12 +40,12 @@ - sfc_diff + mynnsfc_wrapper GFS_surface_loop_control_part1 sfc_nst_pre sfc_nst sfc_nst_post - lsm_noah + noahmpdrv sfc_sice GFS_surface_loop_control_part2 @@ -74,19 +64,8 @@ ozphys_2015 h2ophys get_phi_fv3 - GFS_suite_interstitial_3 - GFS_DCNV_generic_pre - samfdeepcnv - GFS_DCNV_generic_post - GFS_SCNV_generic_pre - samfshalcnv - GFS_SCNV_generic_post - GFS_suite_interstitial_4 - cnvc90 GFS_MP_generic_pre - mp_thompson_pre - mp_thompson - mp_thompson_post + mp_nssl GFS_MP_generic_post maximum_hourly_diagnostics phys_tend diff --git a/cpl/module_cap_cpl.F90 b/cpl/module_cap_cpl.F90 index d69f6c989..be8dcd67b 100644 --- a/cpl/module_cap_cpl.F90 +++ b/cpl/module_cap_cpl.F90 @@ -186,7 +186,7 @@ subroutine state_diagnose(State,string, rc) type(ESMF_StateItem_Flag) :: itemType real(ESMF_KIND_R8), pointer :: dataPtr2d(:,:) real(ESMF_KIND_R8), pointer :: dataPtr3d(:,:,:) - integer :: lrc, dimCount + integer :: lrc, localDeCount, dimCount character(len=*),parameter :: subname='(FV3: state_diagnose)' lstring = '' @@ -211,23 +211,25 @@ subroutine state_diagnose(State,string, rc) call ESMF_StateGet(State, itemName=trim(itemNameList(n)), field=lfield, rc=lrc) if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - call ESMF_FieldGet(lfield, dimCount=dimcount, rc=lrc) + call ESMF_FieldGet(lfield, localDeCount=localDeCount, dimCount=dimcount, rc=lrc) if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - if(dimcount == 2)then - call ESMF_FieldGet(lfield, farrayPtr=dataPtr2d, rc=lrc) - if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - write(tmpstr,'(A,3g14.7)') trim(subname)//' '//trim(lstring)//':'//trim(itemNameList(n))//' ', & - minval(dataPtr2d),maxval(dataPtr2d),sum(dataPtr2d) - call ESMF_LogWrite(trim(tmpstr), ESMF_LOGMSG_INFO, rc=lrc) - else - call ESMF_FieldGet(lfield, farrayPtr=dataPtr3d, rc=lrc) - if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - write(tmpstr,'(A,3g14.7)') trim(subname)//' '//trim(lstring)//':'//trim(itemNameList(n))//' ', & - minval(dataPtr3d),maxval(dataPtr3d),sum(dataPtr3d) - call ESMF_LogWrite(trim(tmpstr), ESMF_LOGMSG_INFO, rc=lrc) + if(localDeCount.gt.0) then + if(dimcount == 2)then + call ESMF_FieldGet(lfield, farrayPtr=dataPtr2d, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + write(tmpstr,'(A,3g14.7)') trim(subname)//' '//trim(lstring)//':'//trim(itemNameList(n))//' ', & + minval(dataPtr2d),maxval(dataPtr2d),sum(dataPtr2d) + call ESMF_LogWrite(trim(tmpstr), ESMF_LOGMSG_INFO, rc=lrc) + else + call ESMF_FieldGet(lfield, farrayPtr=dataPtr3d, rc=lrc) + if (ESMF_LogFoundError(rcToCheck=lrc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + write(tmpstr,'(A,3g14.7)') trim(subname)//' '//trim(lstring)//':'//trim(itemNameList(n))//' ', & + minval(dataPtr3d),maxval(dataPtr3d),sum(dataPtr3d) + call ESMF_LogWrite(trim(tmpstr), ESMF_LOGMSG_INFO, rc=lrc) + end if end if end if enddo diff --git a/cpl/module_cplfields.F90 b/cpl/module_cplfields.F90 index 68d6f10d8..06f11ab94 100644 --- a/cpl/module_cplfields.F90 +++ b/cpl/module_cplfields.F90 @@ -26,7 +26,7 @@ module module_cplfields ! l : model levels (3D) ! s : surface (2D) ! t : tracers (4D) - integer, public, parameter :: NexportFields = 105 + integer, public, parameter :: NexportFields = 111 type(ESMF_Field), target, public :: exportFields(NexportFields) type(FieldInfo), dimension(NexportFields), public, parameter :: exportFieldsInfo = [ & @@ -110,6 +110,12 @@ module module_cplfields FieldInfo("lake_fraction ", "s"), & FieldInfo("ocean_fraction ", "s"), & FieldInfo("surface_snow_area_fraction ", "s"), & + FieldInfo("canopy_moisture_storage ", "s"), & + FieldInfo("inst_aerodynamic_conductance ", "s"), & + FieldInfo("inst_canopy_resistance ", "s"), & + FieldInfo("leaf_area_index ", "s"), & + FieldInfo("temperature_of_soil_layer ", "g"), & + FieldInfo("height ", "s"), & ! For JEDI @@ -142,7 +148,7 @@ module module_cplfields FieldInfo("t2m ", "s") ] ! Import Fields ---------------------------------------- - integer, public, parameter :: NimportFields = 42 + integer, public, parameter :: NimportFields = 43 logical, public :: importFieldsValid(NimportFields) type(ESMF_Field), target, public :: importFields(NimportFields) @@ -164,6 +170,7 @@ module module_cplfields FieldInfo("inst_ice_vis_dif_albedo ", "s"), & FieldInfo("inst_ice_vis_dir_albedo ", "s"), & FieldInfo("wave_z0_roughness_length ", "s"), & + FieldInfo("inst_tracer_diag_aod ", "s"), & ! For JEDI ! dynamics @@ -219,7 +226,15 @@ module module_cplfields "ice_fraction_in_atm ", & "lake_fraction ", & "ocean_fraction ", & - "surface_snow_area_fraction " & + "surface_snow_area_fraction ", & + "inst_vegetation_area_frac ", & + "canopy_moisture_storage ", & + "inst_aerodynamic_conductance ", & + "inst_canopy_resistance ", & + "leaf_area_index ", & + "soil_type ", & + "temperature_of_soil_layer ", & + "height " & ] ! Methods diff --git a/fv3_cap.F90 b/fv3_cap.F90 index 87dbe0e69..0c72a2cd1 100644 --- a/fv3_cap.F90 +++ b/fv3_cap.F90 @@ -29,7 +29,7 @@ module fv3gfs_cap_mod ! use module_fv3_config, only: quilting, output_fh, & nfhout, nfhout_hf, nsout, dt_atmos, & - calendar, & + calendar, cpl_grid_id, & cplprint_flag,output_1st_tstep_rst, & first_kdt @@ -39,21 +39,14 @@ module fv3gfs_cap_mod lead_wrttask, last_wrttask, & nsout_io, iau_offset, lflname_fulltime ! - use module_fcst_grid_comp, only: fcstSS => SetServices, & - fcstGrid, numLevels, numSoilLayers, & - numTracers, mygrid, grid_number_on_all_pets + use module_fcst_grid_comp, only: fcstSS => SetServices use module_wrt_grid_comp, only: wrtSS => SetServices ! - use module_cplfields, only: nExportFields, exportFields, exportFieldsInfo, & - nImportFields, importFields, importFieldsInfo, & - importFieldsValid, queryImportFields + use module_cplfields, only: importFieldsValid, queryImportFields - use module_cplfields, only: realizeConnectedCplFields use module_cap_cpl, only: diagnose_cplFields - use atmos_model_mod, only: setup_exportdata - implicit none private public SetServices @@ -71,6 +64,9 @@ module fv3gfs_cap_mod type(ESMF_FieldBundle), allocatable :: wrtFB(:,:) type(ESMF_RouteHandle), allocatable :: routehandle(:,:) + type(ESMF_RouteHandle), allocatable :: gridRedistRH(:,:) + type(ESMF_Grid), allocatable :: srcGrid(:,:), dstGrid(:,:) + logical, allocatable :: is_moving_FB(:) logical :: profile_memory = .true. @@ -177,13 +173,13 @@ subroutine InitializeAdvertise(gcomp, rc) character(len=10) :: value character(240) :: msgString logical :: isPresent, isSet - type(ESMF_VM) :: vm, fcstVM + type(ESMF_VM) :: vm, wrtVM type(ESMF_Time) :: currTime, startTime type(ESMF_TimeInterval) :: timeStep, rsthour type(ESMF_Config) :: cf type(ESMF_RegridMethod_Flag) :: regridmethod - integer :: i, j, k, urc, ist + integer :: i, j, k, urc, ist, grid_id integer :: noutput_fh, nfh, nfh2 integer :: petcount integer :: nfhmax_hf @@ -196,7 +192,14 @@ subroutine InitializeAdvertise(gcomp, rc) type(ESMF_StateItem_Flag), allocatable :: fcstItemTypeList(:) character(20) :: cwrtcomp integer :: isrcTermProcessing - type(ESMF_Info) :: parentInfo, childInfo + type(ESMF_Info) :: parentInfo, childInfo, info + logical, allocatable :: is_moving(:) + logical :: needGridTransfer + type(ESMF_DistGrid) :: providerDG, acceptorDG + type(ESMF_Grid) :: grid, providerGrid + integer :: fieldCount, ii + type(ESMF_FieldBundle) :: mirrorFB + type(ESMF_Field), allocatable :: fieldList(:) character(len=*),parameter :: subname='(fv3_cap:InitializeAdvertise)' real(kind=8) :: MPI_Wtime, timeis, timerhs @@ -216,6 +219,12 @@ subroutine InitializeAdvertise(gcomp, rc) call NUOPC_ModelGet(gcomp, driverClock=clock, importState=importState, exportState=exportState, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeGet(gcomp, name="cpl_grid_id", value=value, defaultValue="1", & + convention="NUOPC", purpose="Instance", rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + cpl_grid_id = ESMF_UtilString2Int(value, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeGet(gcomp, name="ProfileMemory", value=value, defaultValue="false", & convention="NUOPC", purpose="Instance", rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return @@ -356,16 +365,13 @@ subroutine InitializeAdvertise(gcomp, rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return -! obtain fcst VM - call ESMF_GridCompGet(fcstComp, vm=fcstVM, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! create fcst state fcstState = ESMF_StateCreate(rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! call fcst Initialize (including creating fcstgrid and fcst fieldbundle) call ESMF_GridCompInitialize(fcstComp, exportState=fcstState, & - clock=clock, userRc=urc, rc=rc) + clock=clock, phase=1, userRc=urc, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return @@ -380,7 +386,27 @@ subroutine InitializeAdvertise(gcomp, rc) if(mype == 0) print *,'af fcstCom FBCount= ',FBcount ! ! set start time for output - output_startfh = 0. + output_startfh = 0. +! +! query the is_moving array from the fcstState (was set by fcstComp.Initialize() above) + call ESMF_InfoGetFromHost(fcstState, info=info, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoGetAlloc(info, key="is_moving", values=is_moving, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + needGridTransfer = any(is_moving) + + allocate(is_moving_fb(FBcount)) + is_moving_fb = .false. ! init + + write(msgString,'(A,L4)') trim(subname)//" needGridTransfer = ", needGridTransfer + call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + write(msgString,'(A,8L4)') trim(subname)//" is_moving = ", is_moving + call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! !----------------------------------------------------------------------- !*** create and initialize Write component(s). @@ -391,6 +417,7 @@ subroutine InitializeAdvertise(gcomp, rc) allocate(fcstFB(FBCount), fcstItemNameList(FBCount), fcstItemTypeList(FBCount)) allocate(wrtComp(write_groups), wrtState(write_groups) ) allocate(wrtFB(FBCount,write_groups), routehandle(FBCount,write_groups)) + allocate(srcGrid(FBCount,write_groups), dstGrid(FBCount,write_groups), gridRedistRH(FBCount,write_groups)) allocate(lead_wrttask(write_groups), last_wrttask(write_groups)) allocate(petList(wrttasks_per_group)) allocate(originPetList(num_pes_fcst+wrttasks_per_group)) @@ -419,6 +446,9 @@ subroutine InitializeAdvertise(gcomp, rc) line=__LINE__, file=__FILE__, rcToReturn=rc) return endif + call ESMF_AttributeGet(fcstFB(i), convention="NetCDF", purpose="FV3", name="grid_id", value=grid_id, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + is_moving_fb(i) = is_moving(grid_id) enddo ! k = num_pes_fcst @@ -461,31 +491,28 @@ subroutine InitializeAdvertise(gcomp, rc) call ESMF_GridCompSet(gridcomp=wrtComp(i),config=CF,rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! create wrtstate(i) - wrtstate(i) = ESMF_StateCreate(rc=rc) +! create wrtState(i) + wrtState(i) = ESMF_StateCreate(rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! add the fcst FieldBundles to the wrtState(i) so write component can ! use this info to create mirror objects - call ESMF_AttributeCopy(fcstState, wrtState(i), & - attcopy=ESMF_ATTCOPY_REFERENCE, rc=rc) + call ESMF_AttributeCopy(fcstState, wrtState(i), attcopy=ESMF_ATTCOPY_REFERENCE, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return call ESMF_StateAdd(wrtState(i), fcstFB, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! call into wrtComp(i) Initialize - call ESMF_GridCompInitialize(wrtComp(i), importState=wrtstate(i), & - clock=clock, phase=1, userRc=urc, rc=rc) + call ESMF_GridCompInitialize(wrtComp(i), importState=wrtState(i), clock=clock, phase=1, userRc=urc, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return ! remove fcst FieldBundles from the wrtState(i) because done with it call ESMF_StateRemove(wrtState(i), fcstItemNameList, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! reconcile the wrtComp(i)'s export state +! reconcile the wrtComp(i)'s import state call ESMF_StateReconcile(wrtState(i), rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return @@ -495,68 +522,202 @@ subroutine InitializeAdvertise(gcomp, rc) attcopy=ESMF_ATTCOPY_REFERENCE, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! loop over all FieldBundle in the states and precompute Regrid operation - do j=1, FBcount +! deal with GridTransfer if needed + + if (needGridTransfer) then - ! access the mirrored FieldBundle in the wrtState(i) - call ESMF_StateGet(wrtState(i), & - itemName="mirror_"//trim(fcstItemNameList(j)), & - fieldbundle=wrtFB(j,i), rc=rc) - if(mype == 0) print *,'af get wrtfb=',"mirror_"//trim(fcstItemNameList(j)),' rc=',rc + ! obtain wrtComp VM needed for acceptor DistGrid + call ESMF_GridCompGet(wrtComp(i), vm=wrtVM, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! determine regridmethod - if (index(fcstItemNameList(j),"_bilinear") >0 ) then - regridmethod = ESMF_REGRIDMETHOD_BILINEAR - else if (index(fcstItemNameList(j),"_patch") >0) then - regridmethod = ESMF_REGRIDMETHOD_PATCH - else if (index(fcstItemNameList(j),"_nearest_stod") >0) then - regridmethod = ESMF_REGRIDMETHOD_NEAREST_STOD - else if (index(fcstItemNameList(j),"_nearest_dtos") >0) then - regridmethod = ESMF_REGRIDMETHOD_NEAREST_DTOS - else if (index(fcstItemNameList(j),"_conserve") >0) then - regridmethod = ESMF_REGRIDMETHOD_CONSERVE - else - call ESMF_LogSetError(ESMF_RC_ARG_BAD, & - msg="Unable to determine regrid method.", & - line=__LINE__, file=__FILE__, rcToReturn=rc) - return - endif + ! loop over all FieldBundle in the states, for moving nests initiate GridTransfer + do j=1, FBcount + if (is_moving_fb(j)) then + ! access the fcst (provider) Grid + call ESMF_FieldBundleGet(fcstFB(j), grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! access the mirror FieldBundle on the wrtComp + call ESMF_StateGet(wrtState(i), itemName="mirror_"//trim(fcstItemNameList(j)), fieldbundle=mirrorFB, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! determine whether there are fields in the mirror FieldBundle + call ESMF_FieldBundleGet(mirrorFB, fieldCount=fieldCount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (fieldCount > 0) then + ! access the providerDG + call ESMF_GridGet(grid, distgrid=providerDG, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! construct an acceptorDG with the same number of DEs for the acceptor side + acceptorDG = ESMF_DistGridCreate(providerDG, vm=wrtVM, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! need a grid on the accptor side to carry the acceptorDG + grid = ESMF_GridEmptyCreate(vm=wrtVM, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! set the acceptorDG + call ESMF_GridSet(grid, distgrid=acceptorDG, vm=wrtVM, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! associate the grid with the mirror FieldBundle + call ESMF_FieldBundleSet(mirrorFB, grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + endif + endif + enddo + + ! Call into wrtComp(i) Initialize() phase=2 to re-balance the mirrored grid distribution on its PETs + call ESMF_GridCompInitialize(wrtComp(i), importState=wrtState(i), clock=clock, phase=2, userRc=urc, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return + + ! Reconcile any changes (re-balanced grid distribution) across the wrtState(i) + call ESMF_StateReconcile(wrtState(i), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - call ESMF_LogWrite('bf FieldBundleRegridStore', ESMF_LOGMSG_INFO, rc=rc) - write(msgString,"(A,I2.2,',',I2.2,A)") "calling into wrtFB(",j,i, ") FieldBundleRegridStore()...." - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - - if (i==1) then -! this is a Store() for the first wrtComp -> must do the Store() - call ESMF_FieldBundleRegridStore(fcstFB(j), wrtFB(j,1), & - regridMethod=regridmethod, routehandle=routehandle(j,1), & - unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, & - srcTermProcessing=isrcTermProcessing, rc=rc) - -! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - if (rc /= ESMF_SUCCESS) then - write(0,*)'fv3_cap.F90:InitializeAdvertise error in ESMF_FieldBundleRegridStore' - call ESMF_LogWrite('fv3_cap.F90:InitializeAdvertise error in ESMF_FieldBundleRegridStore', ESMF_LOGMSG_ERROR, rc=rc) - call ESMF_Finalize(endflag=ESMF_END_ABORT) + ! loop over all FieldBundle in the states, for moving nests handle GridTransfer + do j=1, FBcount + if (is_moving_fb(j)) then + ! access the fcst (provider) Grid + call ESMF_FieldBundleGet(fcstFB(j), grid=providerGrid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! access the mirror FieldBundle on the wrtComp + call ESMF_StateGet(wrtState(i), itemName="mirror_"//trim(fcstItemNameList(j)), fieldbundle=mirrorFB, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! determine whether there are fields in the mirror FieldBundle + call ESMF_FieldBundleGet(mirrorFB, fieldCount=fieldCount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (fieldCount > 0) then + ! access the field in the mirror FieldBundle + allocate(fieldList(fieldCount)) + call ESMF_FieldBundleGet(mirrorFB, fieldList=fieldList, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! access the balanced mirror Grid from the first Field in the mirror FieldBundle + call ESMF_FieldGet(fieldList(1), grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! access the balanced mirror DistGrid from the mirror Grid + call ESMF_GridGet(grid, distgrid=acceptorDG, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! construct a complete balanced mirror Grid with redistributed coordinates + call ESMF_TraceRegionEnter("ESMF_GridCreate(fromGrid,newDistGrid)", rc=rc) + grid = ESMF_GridCreate(providerGrid, acceptorDG, routehandle=gridRedistRH(j,i), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_TraceRegionExit("ESMF_GridCreate(fromGrid,newDistGrid)", rc=rc) + ! keep src and dst Grids for run-loop + srcGrid(j,i) = providerGrid + dstGrid(j,i) = grid + ! loop over all the mirror fields and set the balanced mirror Grid + do ii=1, fieldCount + call ESMF_FieldEmptySet(fieldList(ii), grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + enddo + ! clean-up + deallocate(fieldList) + endif endif - call ESMF_LogWrite('af FieldBundleRegridStore', ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + enddo - originPetList(1:num_pes_fcst) = fcstPetList(:) - originPetList(num_pes_fcst+1:) = petList(:) + ! Call into wrtComp(i) Initialize() phase=3 to finish up creating the mirror Fields + call ESMF_GridCompInitialize(wrtComp(i), importState=wrtState(i), clock=clock, phase=3, userRc=urc, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return + ! Reconcile any changes (finished mirror Fields) across the wrtState(i) + call ESMF_StateReconcile(wrtState(i), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + endif + +! loop over all FieldBundle in the states and precompute Regrid operation + do j=1, FBcount + ! decide between Redist() and Regrid() + if (is_moving_fb(j)) then + ! this is a moving domain -> use a static Redist() to move data to wrtComp(:) + ! access the mirror FieldBundle in the wrtState(i) + call ESMF_StateGet(wrtState(i), & + itemName="mirror_"//trim(fcstItemNameList(j)), & + fieldbundle=wrtFB(j,i), rc=rc) + if (i==1) then + ! this is a Store() for the first wrtComp -> must do the Store() + call ESMF_TraceRegionEnter("ESMF_FieldBundleRedistStore()", rc=rc) + call ESMF_FieldBundleRedistStore(fcstFB(j), wrtFB(j,1), & + routehandle=routehandle(j,1), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_TraceRegionExit("ESMF_FieldBundleRedistStore()", rc=rc) + originPetList(1:num_pes_fcst) = fcstPetList(:) + originPetList(num_pes_fcst+1:) = petList(:) + else + targetPetList(1:num_pes_fcst) = fcstPetList(:) + targetPetList(num_pes_fcst+1:) = petList(:) + call ESMF_TraceRegionEnter("ESMF_RouteHandleCreate() in lieu of ESMF_FieldBundleRedistStore()", rc=rc) + routehandle(j,i) = ESMF_RouteHandleCreate(routehandle(j,1), & + originPetList=originPetList, & + targetPetList=targetPetList, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_TraceRegionExit("ESMF_RouteHandleCreate() in lieu of ESMF_FieldBundleRedistStore()", rc=rc) + endif else - targetPetList(1:num_pes_fcst) = fcstPetList(:) - targetPetList(num_pes_fcst+1:) = petList(:) - routehandle(j,i) = ESMF_RouteHandleCreate(routehandle(j,1), & - originPetList=originPetList, & - targetPetList=targetPetList, rc=rc) + ! this is a static domain -> do Regrid() "on the fly" when sending data to wrtComp(:) + ! access the output FieldBundle in the wrtState(i) + call ESMF_StateGet(wrtState(i), & + itemName="output_"//trim(fcstItemNameList(j)), & + fieldbundle=wrtFB(j,i), rc=rc) + if(mype == 0) print *,'af get wrtfb=',"output_"//trim(fcstItemNameList(j)),' rc=',rc if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! determine regridmethod + if (index(fcstItemNameList(j),"_bilinear") >0 ) then + regridmethod = ESMF_REGRIDMETHOD_BILINEAR + else if (index(fcstItemNameList(j),"_patch") >0) then + regridmethod = ESMF_REGRIDMETHOD_PATCH + else if (index(fcstItemNameList(j),"_nearest_stod") >0) then + regridmethod = ESMF_REGRIDMETHOD_NEAREST_STOD + else if (index(fcstItemNameList(j),"_nearest_dtos") >0) then + regridmethod = ESMF_REGRIDMETHOD_NEAREST_DTOS + else if (index(fcstItemNameList(j),"_conserve") >0) then + regridmethod = ESMF_REGRIDMETHOD_CONSERVE + else + call ESMF_LogSetError(ESMF_RC_ARG_BAD, & + msg="Unable to determine regrid method.", & + line=__LINE__, file=__FILE__, rcToReturn=rc) + return + endif + + call ESMF_LogWrite('bf FieldBundleRegridStore', ESMF_LOGMSG_INFO, rc=rc) + write(msgString,"(A,I2.2,',',I2.2,A)") "calling into wrtFB(",j,i, ") FieldBundleRegridStore()...." + call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) + + if (i==1) then + ! this is a Store() for the first wrtComp -> must do the Store() + call ESMF_TraceRegionEnter("ESMF_FieldBundleRegridStore()", rc=rc) + call ESMF_FieldBundleRegridStore(fcstFB(j), wrtFB(j,1), & + regridMethod=regridmethod, routehandle=routehandle(j,1), & + unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, & + srcTermProcessing=isrcTermProcessing, rc=rc) + +! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (rc /= ESMF_SUCCESS) then + write(0,*)'fv3_cap.F90:InitializeAdvertise error in ESMF_FieldBundleRegridStore' + call ESMF_LogWrite('fv3_cap.F90:InitializeAdvertise error in ESMF_FieldBundleRegridStore', ESMF_LOGMSG_ERROR, rc=rc) + call ESMF_Finalize(endflag=ESMF_END_ABORT) + endif + call ESMF_TraceRegionExit("ESMF_FieldBundleRegridStore()", rc=rc) + call ESMF_LogWrite('af FieldBundleRegridStore', ESMF_LOGMSG_INFO, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + originPetList(1:num_pes_fcst) = fcstPetList(:) + originPetList(num_pes_fcst+1:) = petList(:) + + else + targetPetList(1:num_pes_fcst) = fcstPetList(:) + targetPetList(num_pes_fcst+1:) = petList(:) + call ESMF_TraceRegionEnter("ESMF_RouteHandleCreate() in lieu of ESMF_FieldBundleRegridStore()", rc=rc) + routehandle(j,i) = ESMF_RouteHandleCreate(routehandle(j,1), & + originPetList=originPetList, & + targetPetList=targetPetList, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_TraceRegionExit("ESMF_RouteHandleCreate() in lieu of ESMF_FieldBundleRegridStore()", rc=rc) + + endif + write(msgString,"(A,I2.2,',',I2.2,A)") "... returned from wrtFB(",j,i, ") FieldBundleRegridStore()." + call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) endif - write(msgString,"(A,I2.2,',',I2.2,A)") "... returned from wrtFB(",j,i, ") FieldBundleRegridStore()." - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) enddo ! j=1, FBcount ! end write_groups @@ -719,21 +880,12 @@ subroutine InitializeAdvertise(gcomp, rc) ! ! --- advertise Fields in importState and exportState ------------------- - ! importable fields: - do i = 1, size(importFieldsInfo) - call NUOPC_Advertise(importState, & - StandardName=trim(importFieldsInfo(i)%name), & - SharePolicyField='share', vm=fcstVM, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - end do +! call fcst Initialize (advertise phase) + call ESMF_GridCompInitialize(fcstComp, importState=importState, exportState=exportState, & + clock=clock, phase=2, userRc=urc, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - ! exportable fields: - do i = 1, size(exportFieldsInfo) - call NUOPC_Advertise(exportState, & - StandardName=trim(exportFieldsInfo(i)%name), & - SharePolicyField='share', vm=fcstVM, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - end do + if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return if(mype==0) print *,'in fv3_cap, aft import, export fields in atmos' if(mype==0) print *,'in fv3_cap, init time=',MPI_Wtime()-timeis @@ -749,39 +901,24 @@ subroutine InitializeRealize(gcomp, rc) ! local variables character(len=*),parameter :: subname='(fv3gfs_cap:InitializeRealize)' + type(ESMF_Clock) :: clock type(ESMF_State) :: importState, exportState - logical :: isPetLocal + integer :: urc rc = ESMF_SUCCESS ! query for importState and exportState - call NUOPC_ModelGet(gcomp, importState=importState, exportState=exportState, rc=rc) + call NUOPC_ModelGet(gcomp, driverClock=clock, importState=importState, exportState=exportState, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! --- conditionally realize or remove Fields in importState and exportState ------------------- - isPetLocal = ESMF_GridCompIsPetLocal(fcstComp, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - if (isPetLocal) then - - ! -- realize connected fields in exportState - call realizeConnectedCplFields(exportState, fcstGrid(mygrid), & - numLevels, numSoilLayers, numTracers, & - exportFieldsInfo, 'FV3 Export', exportFields, 0.0_ESMF_KIND_R8, rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - ! -- initialize export fields if applicable - call setup_exportdata(rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - ! -- realize connected fields in importState - call realizeConnectedCplFields(importState, fcstGrid(mygrid), & - numLevels, numSoilLayers, numTracers, & - importFieldsInfo, 'FV3 Import', importFields, 9.99e20_ESMF_KIND_R8, rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! call fcst Initialize (realize phase) + call ESMF_GridCompInitialize(fcstComp, importState=importState, exportState=exportState, & + clock=clock, phase=3, userRc=urc, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - end if + if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return end subroutine InitializeRealize @@ -911,24 +1048,35 @@ subroutine ModelAdvance_phase2(gcomp, rc) output: if (ANY(nint(output_fh(:)*3600.0) == nfseconds)) then ! - if (mype == 0 .or. mype == lead_wrttask(1)) print *,' aft fcst run output time=',nfseconds, & - 'FBcount=',FBcount,'na=',na + if (mype == 0 .or. mype == lead_wrttask(1)) print *,' aft fcst run output time=',nfseconds, & + 'FBcount=',FBcount,'na=',na + + call ESMF_TraceRegionEnter("ESMF_VMEpoch:fcstFB->wrtFB", rc=rc) call ESMF_VMEpochEnter(epoch=ESMF_VMEpoch_Buffer, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return do j=1, FBCount - call ESMF_FieldBundleRegrid(fcstFB(j), wrtFB(j,n_group), & - routehandle=routehandle(j, n_group), & - termorderflag=(/ESMF_TERMORDER_SRCSEQ/), rc=rc) + if (is_moving_fb(j)) then + ! Grid coords need to be redistributed to the mirror Grid on wrtComp + call ESMF_GridRedist(srcGrid(j, n_group), dstGrid(j, n_group), routehandle=gridRedistRH(j, n_group), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + endif + + ! execute the routehandle from fcstFB -> wrtFB (either Regrid() or Redist()) + call ESMF_FieldBundleSMM(fcstFB(j), wrtFB(j,n_group), & + routehandle=routehandle(j, n_group), & + termorderflag=(/ESMF_TERMORDER_SRCSEQ/), rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! + enddo call ESMF_VMEpochExit(rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_TraceRegionExit("ESMF_VMEpoch:fcstFB->wrtFB", rc=rc) + call ESMF_LogWrite('Model Advance: before wrtcomp run ', ESMF_LOGMSG_INFO, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return @@ -1151,7 +1299,7 @@ subroutine ModelFinalize(gcomp, rc) !*** finalize grid comps if( quilting ) then do i = 1, write_groups - call ESMF_GridCompFinalize(wrtComp(i), importState=wrtstate(i),userRc=urc, rc=rc) + call ESMF_GridCompFinalize(wrtComp(i), importState=wrtState(i),userRc=urc, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return enddo diff --git a/io/inline_post.F90 b/io/inline_post.F90 index 2e123346e..57b9f8d5d 100644 --- a/io/inline_post.F90 +++ b/io/inline_post.F90 @@ -7,8 +7,7 @@ module inline_post use module_fv3_io_def, only : wrttasks_per_group,filename_base, & output_grid use write_internal_state, only : wrt_internal_state - use post_gfs, only : post_getattr_gfs, post_run_gfs - use post_regional, only : post_getattr_regional, post_run_regional + use post_fv3, only : post_getattr_fv3, post_run_fv3 implicit none @@ -21,6 +20,7 @@ subroutine inline_post_run(wrt_int_state,grid_id,mypei,mpicomp,lead_write, ! ! revision history: ! Jul 2019 J. Wang create interface to run inline post for FV3 +! Apr 2022 W. Meng unify global and regional inline posts ! ! !----------------------------------------------------------------------- @@ -38,18 +38,16 @@ subroutine inline_post_run(wrt_int_state,grid_id,mypei,mpicomp,lead_write, integer,intent(in) :: mynfmin integer,intent(in) :: mynfsec ! - if(mypei == 0) print *,'inline_post_run, output_grid=',trim(output_grid(grid_id)) + if(mypei == 0) print *,'inline_post_run, output_grid=',trim(output_grid(grid_id)), & + ', call post_run_fv3' if(trim(output_grid(grid_id)) == 'gaussian_grid' & - .or. trim(output_grid(grid_id)) == 'global_latlon') then - call post_run_gfs(wrt_int_state, mypei, mpicomp, lead_write, & - mynfhr, mynfmin,mynfsec) - else if( trim(output_grid(grid_id)) == 'regional_latlon' & - .or. trim(output_grid(grid_id)) == 'rotated_latlon' & + .or. trim(output_grid(grid_id)) == 'global_latlon' & + .or. trim(output_grid(grid_id)) == 'regional_latlon' & + .or. trim(output_grid(grid_id)) == 'rotated_latlon' & .or. trim(output_grid(grid_id)) == 'lambert_conformal') then - if(mypei == 0) print *,'inline_post_run, call post_run_regional' - call post_run_regional(wrt_int_state, mypei, mpicomp, lead_write, & + call post_run_fv3(wrt_int_state, mypei, mpicomp, lead_write, & mynfhr, mynfmin,mynfsec) - endif + endif ! end subroutine inline_post_run @@ -66,12 +64,11 @@ subroutine inline_post_getattr(wrt_int_state,grid_id) integer, intent(in) :: grid_id ! if(trim(output_grid(grid_id)) == 'gaussian_grid' & - .or. trim(output_grid(grid_id)) == 'global_latlon') then - call post_getattr_gfs(wrt_int_state) - else if( trim(output_grid(grid_id)) == 'regional_latlon' & + .or. trim(output_grid(grid_id)) == 'global_latlon' & + .or. trim(output_grid(grid_id)) == 'regional_latlon' & .or. trim(output_grid(grid_id)) == 'rotated_latlon' & .or. trim(output_grid(grid_id)) == 'lambert_conformal') then - call post_getattr_regional(wrt_int_state,grid_id) + call post_getattr_fv3(wrt_int_state,grid_id) endif ! end subroutine inline_post_getattr diff --git a/io/inline_post_stub.F90 b/io/inline_post_stub.F90 index f33c78d6e..40ad2a203 100644 --- a/io/inline_post_stub.F90 +++ b/io/inline_post_stub.F90 @@ -13,7 +13,7 @@ module inline_post contains - subroutine inline_post_run(wrt_int_state,mypei,mpicomp,lead_write, & + subroutine inline_post_run(wrt_int_state,grid_id,mypei,mpicomp,lead_write, & mynfhr,mynfmin,mynfsec) ! ! revision history: @@ -28,6 +28,7 @@ subroutine inline_post_run(wrt_int_state,mypei,mpicomp,lead_write, & ! type(wrt_internal_state),intent(in) :: wrt_int_state integer,intent(in) :: mypei + integer,intent(in) :: grid_id integer,intent(in) :: mpicomp integer,intent(in) :: lead_write integer,intent(in) :: mynfhr @@ -40,11 +41,12 @@ end subroutine inline_post_run ! !----------------------------------------------------------------------- ! - subroutine inline_post_getattr(wrt_int_state) + subroutine inline_post_getattr(wrt_int_state,grid_id) ! implicit none ! type(wrt_internal_state),intent(inout) :: wrt_int_state + integer,intent(in) :: grid_id ! ! print *,'in stub inline_post_getattr - not supported on this machine, return' diff --git a/io/module_write_internal_state.F90 b/io/module_write_internal_state.F90 index 9c9ebbe26..8b9bb0b1d 100644 --- a/io/module_write_internal_state.F90 +++ b/io/module_write_internal_state.F90 @@ -79,8 +79,6 @@ module write_internal_state !------------------------------------- ! type(ESMF_Time) :: io_basetime - type(ESMF_TimeInterval) :: io_currtimediff - real :: nfhour integer :: idate(7) integer :: fdate(7) ! @@ -89,7 +87,6 @@ module write_internal_state !----------------------------------------- ! logical :: output_history - logical :: write_netcdfflag ! !----------------------------------------- !*** POST flags and required variables diff --git a/io/module_write_netcdf.F90 b/io/module_write_netcdf.F90 index 1445d5e04..c11e45b4b 100644 --- a/io/module_write_netcdf.F90 +++ b/io/module_write_netcdf.F90 @@ -80,8 +80,8 @@ subroutine write_netcdf(wrtfb, filename, & integer :: ncerr,ierr integer :: ncid integer :: oldMode - integer :: im_dimid, jm_dimid, tile_dimid, pfull_dimid, phalf_dimid, time_dimid - integer :: im_varid, jm_varid, tile_varid, lon_varid, lat_varid + integer :: im_dimid, jm_dimid, tile_dimid, pfull_dimid, phalf_dimid, time_dimid, ch_dimid + integer :: im_varid, jm_varid, tile_varid, lon_varid, lat_varid, timeiso_varid integer, dimension(:), allocatable :: dimids_2d, dimids_3d integer, dimension(:), allocatable :: varids logical shuffle @@ -213,6 +213,7 @@ subroutine write_netcdf(wrtfb, filename, & ! define dimensions [grid_xt, grid_yta ,(pfull/phalf), (tile), time] ncerr = nf90_def_dim(ncid, "grid_xt", im, im_dimid); NC_ERR_STOP(ncerr) ncerr = nf90_def_dim(ncid, "grid_yt", jm, jm_dimid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_dim(ncid, "nchars", 20, ch_dimid); NC_ERR_STOP(ncerr) if (lm > 1) then call add_dim(ncid, "pfull", pfull_dimid, wrtgrid, rc) call add_dim(ncid, "phalf", phalf_dimid, wrtgrid, rc) @@ -229,18 +230,24 @@ subroutine write_netcdf(wrtfb, filename, & ncerr = nf90_put_att(ncid, jm_varid, "cartesian_axis", "Y"); NC_ERR_STOP(ncerr) if (is_cubed_sphere) then ncerr = nf90_def_var(ncid, "tile", NF90_INT, tile_dimid, tile_varid); NC_ERR_STOP(ncerr) - ncerr = nf90_put_att(ncid, tile_varid, "long_name", "cubed-spehere face"); NC_ERR_STOP(ncerr) + ncerr = nf90_put_att(ncid, tile_varid, "long_name", "cubed-sphere face"); NC_ERR_STOP(ncerr) end if + ncerr = nf90_def_var(ncid, "time_iso", NF90_CHAR, [ch_dimid,time_dimid], timeiso_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_put_att(ncid, timeiso_varid, "long_name", "valid time"); NC_ERR_STOP(ncerr) + ncerr = nf90_put_att(ncid, timeiso_varid, "description", "ISO 8601 datetime string"); NC_ERR_STOP(ncerr) + ! coordinate variable attributes based on output_grid type if (trim(output_grid(grid_id)) == 'gaussian_grid' .or. & trim(output_grid(grid_id)) == 'global_latlon' .or. & - trim(output_grid(grid_id)) == 'regional_latlon') then + trim(output_grid(grid_id)) == 'regional_latlon' .or. & + trim(output_grid(grid_id)) == 'regional_latlon_moving') then ncerr = nf90_put_att(ncid, im_varid, "long_name", "T-cell longitude"); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, im_varid, "units", "degrees_E"); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, jm_varid, "long_name", "T-cell latiitude"); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, jm_varid, "units", "degrees_N"); NC_ERR_STOP(ncerr) - else if (trim(output_grid(grid_id)) == 'rotated_latlon') then + else if (trim(output_grid(grid_id)) == 'rotated_latlon' .or. & + trim(output_grid(grid_id)) == 'rotated_latlon_moving') then ncerr = nf90_put_att(ncid, im_varid, "long_name", "rotated T-cell longiitude"); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, im_varid, "units", "degrees"); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, jm_varid, "long_name", "rotated T-cell latiitude"); NC_ERR_STOP(ncerr) @@ -275,6 +282,7 @@ subroutine write_netcdf(wrtfb, filename, & ncerr = nf90_var_par_access(ncid, lon_varid, NF90_INDEPENDENT); NC_ERR_STOP(ncerr) ncerr = nf90_var_par_access(ncid, jm_varid, NF90_INDEPENDENT); NC_ERR_STOP(ncerr) ncerr = nf90_var_par_access(ncid, lat_varid, NF90_INDEPENDENT); NC_ERR_STOP(ncerr) + ncerr = nf90_var_par_access(ncid, timeiso_varid, NF90_INDEPENDENT); NC_ERR_STOP(ncerr) if (is_cubed_sphere) then ncerr = nf90_var_par_access(ncid, tile_varid, NF90_INDEPENDENT); NC_ERR_STOP(ncerr) end if @@ -483,9 +491,11 @@ subroutine write_netcdf(wrtfb, filename, & allocate (x(im)) if (trim(output_grid(grid_id)) == 'gaussian_grid' .or. & trim(output_grid(grid_id)) == 'global_latlon' .or. & - trim(output_grid(grid_id)) == 'regional_latlon') then + trim(output_grid(grid_id)) == 'regional_latlon' .or. & + trim(output_grid(grid_id)) == 'regional_latlon_moving') then ncerr = nf90_put_var(ncid, im_varid, values=array_r8(:,jstart), start=[istart], count=[iend-istart+1]); NC_ERR_STOP(ncerr) - else if (trim(output_grid(grid_id)) == 'rotated_latlon') then + else if (trim(output_grid(grid_id)) == 'rotated_latlon' .or. & + trim(output_grid(grid_id)) == 'rotated_latlon_moving') then do i=1,im x(i) = lon1(grid_id) + (lon2(grid_id)-lon1(grid_id))/(im-1) * (i-1) end do @@ -532,9 +542,11 @@ subroutine write_netcdf(wrtfb, filename, & allocate (y(jm)) if (trim(output_grid(grid_id)) == 'gaussian_grid' .or. & trim(output_grid(grid_id)) == 'global_latlon' .or. & - trim(output_grid(grid_id)) == 'regional_latlon') then + trim(output_grid(grid_id)) == 'regional_latlon' .or. & + trim(output_grid(grid_id)) == 'regional_latlon_moving') then ncerr = nf90_put_var(ncid, jm_varid, values=array_r8(istart,:), start=[jstart], count=[jend-jstart+1]); NC_ERR_STOP(ncerr) - else if (trim(output_grid(grid_id)) == 'rotated_latlon') then + else if (trim(output_grid(grid_id)) == 'rotated_latlon' .or. & + trim(output_grid(grid_id)) == 'rotated_latlon_moving') then do j=1,jm y(j) = lat1(grid_id) + (lat2(grid_id)-lat1(grid_id))/(jm-1) * (j-1) end do @@ -560,6 +572,13 @@ subroutine write_netcdf(wrtfb, filename, & ncerr = nf90_put_var(ncid, tile_varid, values=[1,2,3,4,5,6]); NC_ERR_STOP(ncerr) end if + ! write time_iso (timeiso_varid) + if (do_io) then + call ESMF_AttributeGet(wrtgrid, convention="NetCDF", purpose="FV3", & + name="time_iso", value=varcval, rc=rc); ESMF_ERR_RETURN(rc) + ncerr = nf90_put_var(ncid, timeiso_varid, values=[trim(varcval)]); NC_ERR_STOP(ncerr) + end if + ! write variables (fields) do i=1, fieldCount diff --git a/io/module_wrt_grid_comp.F90 b/io/module_wrt_grid_comp.F90 index 0bbf2a221..bf140a1ac 100644 --- a/io/module_wrt_grid_comp.F90 +++ b/io/module_wrt_grid_comp.F90 @@ -8,7 +8,7 @@ module module_wrt_grid_comp !*** At initialization step, write grid is defined. The forecast field !*** bundle is mirrored and output field information inside the field !*** bundle is used to create ESMF field on the write grid and added in -!*** the mirror field bundle on write grid component. Also the IO_BaseTime +!*** the output field bundle on write grid component. Also the IO_BaseTime !*** is set to the initial clock time. !*** At the run step, output time is set from the write grid comp clock !*** the ESMF field bundles that contains the data on write grid are @@ -101,8 +101,16 @@ subroutine SetServices(wrt_comp, rc) rc = ESMF_SUCCESS - call ESMF_GridCompSetEntryPoint(wrt_comp, ESMF_METHOD_INITIALIZE, & - userRoutine=wrt_initialize, rc=rc) + call ESMF_GridCompSetEntryPoint(wrt_comp, ESMF_METHOD_INITIALIZE, phase=1, & + userRoutine=wrt_initialize_p1, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridCompSetEntryPoint(wrt_comp, ESMF_METHOD_INITIALIZE, phase=2, & + userRoutine=wrt_initialize_p2, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridCompSetEntryPoint(wrt_comp, ESMF_METHOD_INITIALIZE, phase=3, & + userRoutine=wrt_initialize_p3, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return call ESMF_GridCompSetEntryPoint(wrt_comp, ESMF_METHOD_RUN, & @@ -119,7 +127,7 @@ end subroutine SetServices !####################################################################### !----------------------------------------------------------------------- ! - subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) + subroutine wrt_initialize_p1(wrt_comp, imp_state_write, exp_state_write, clock, rc) ! !----------------------------------------------------------------------- !*** INITIALIZE THE WRITE GRIDDED COMPONENT. @@ -143,6 +151,7 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) integer :: vm_mpi_comm character(40) :: fieldName type(ESMF_Config) :: cf, cf_output_grid + type(ESMF_Info) :: info type(ESMF_DELayout) :: delayout type(ESMF_Grid) :: fcstGrid type(ESMF_Grid), allocatable :: wrtGrid(:) @@ -151,11 +160,11 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) type(ESMF_Decomp_Flag) :: decompflagPTile(2,6) type(ESMF_StateItem_Flag), allocatable :: fcstItemTypeList(:) - type(ESMF_FieldBundle) :: fcstFB, fieldbundle + type(ESMF_FieldBundle) :: fcstFB, fieldbundle, mirrorFB type(ESMF_Field), allocatable :: fcstField(:) type(ESMF_TypeKind_Flag) :: typekind character(len=80), allocatable :: fieldnamelist(:) - integer :: fieldDimCount, gridDimCount + integer :: fieldDimCount, gridDimCount, tk integer, allocatable :: petMap(:) integer, allocatable :: gridToFieldMap(:) integer, allocatable :: ungriddedLBound(:) @@ -167,6 +176,7 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) integer :: valueI4 real(ESMF_KIND_R4) :: valueR4 real(ESMF_KIND_R8) :: valueR8 + logical, allocatable :: is_moving(:) integer :: attCount, jidx, idx, noutfile character(19) :: newdate @@ -235,7 +245,7 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) !*** get configuration variables !----------------------------------------------------------------------- ! - call esmf_GridCompGet(gridcomp=wrt_comp,config=CF,rc=RC) + call ESMF_GridCompGet(gridcomp=wrt_comp,config=CF,rc=RC) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__)) return ! bail out ! variables for post @@ -295,6 +305,11 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) enddo endif + call ESMF_InfoGetFromHost(imp_state_write, info=info, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoGetAlloc(info, key="is_moving", values=is_moving, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeGet(imp_state_write, convention="NetCDF", purpose="FV3", & name="ngrids", value=ngrids, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return @@ -365,13 +380,13 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) jtasks = ntasks endif - if(trim(output_grid(n)) == 'gaussian_grid' .or. trim(output_grid(n)) == 'global_latlon') then + if (trim(output_grid(n)) == 'gaussian_grid' .or. trim(output_grid(n)) == 'global_latlon') then call ESMF_ConfigGetAttribute(config=cf_output_grid, value=imo(n), label ='imo:',rc=rc) call ESMF_ConfigGetAttribute(config=cf_output_grid, value=jmo(n), label ='jmo:',rc=rc) if (lprnt) then print *,'imo=',imo(n),'jmo=',jmo(n) end if - else if(trim(output_grid(n)) == 'regional_latlon') then + else if (trim(output_grid(n)) == 'regional_latlon') then call ESMF_ConfigGetAttribute(config=cf_output_grid, value=lon1(n), label ='lon1:',rc=rc) call ESMF_ConfigGetAttribute(config=cf_output_grid, value=lat1(n), label ='lat1:',rc=rc) call ESMF_ConfigGetAttribute(config=cf_output_grid, value=lon2(n), label ='lon2:',rc=rc) @@ -398,10 +413,21 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) imo(n) = (lon2(n)-lon1(n))/dlon(n) + 1 jmo(n) = (lat2(n)-lat1(n))/dlat(n) + 1 if (lprnt) then - print *,'lon1=',lon1(n),' lat1=',lat1(n) - print *,'lon2=',lon2(n),' lat2=',lat2(n) - print *,'dlon=',dlon(n),' dlat=',dlat(n) + print *,'cen_lon=',cen_lon(n),' cen_lat=',cen_lat(n) + print *,'lon1 =',lon1(n), ' lat1 =',lat1(n) + print *,'lon2 =',lon2(n), ' lat2 =',lat2(n) + print *,'dlon =',dlon(n), ' dlat =',dlat(n) + print *,'imo =',imo(n), ' jmo =',jmo(n) + end if + else if (trim(output_grid(n)) == 'rotated_latlon_moving' .or. & + trim(output_grid(n)) == 'regional_latlon_moving') then + call ESMF_ConfigGetAttribute(config=cf_output_grid, value=imo(n), label ='imo:', rc=rc) + call ESMF_ConfigGetAttribute(config=cf_output_grid, value=jmo(n), label ='jmo:', rc=rc) + call ESMF_ConfigGetAttribute(config=cf_output_grid, value=dlon(n), label ='dlon:',rc=rc) + call ESMF_ConfigGetAttribute(config=cf_output_grid, value=dlat(n), label ='dlat:',rc=rc) + if (lprnt) then print *,'imo =',imo(n), ' jmo =',jmo(n) + print *,'dlon=',dlon(n),' dlat=',dlat(n) end if else if (trim(output_grid(n)) == 'lambert_conformal') then call ESMF_ConfigGetAttribute(config=cf_output_grid, value=cen_lon(n), label ='cen_lon:',rc=rc) @@ -683,8 +709,10 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) deallocate(lat, lon) - else if ( trim(output_grid(n)) == 'regional_latlon' .or. & - trim(output_grid(n)) == 'rotated_latlon' .or. & + else if ( trim(output_grid(n)) == 'regional_latlon' .or. & + trim(output_grid(n)) == 'regional_latlon_moving' .or. & + trim(output_grid(n)) == 'rotated_latlon' .or. & + trim(output_grid(n)) == 'rotated_latlon_moving' .or. & trim(output_grid(n)) == 'lambert_conformal' ) then wrtGrid(n) = ESMF_GridCreateNoPeriDim(minIndex=(/1,1/), & @@ -713,6 +741,9 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) enddo enddo wrt_int_state%post_maptype = 0 + else if ( trim(output_grid(n)) == 'regional_latlon_moving' ) then + ! Do not compute lonPtr, latPtr here. Will be done in the run phase + wrt_int_state%post_maptype = 0 else if ( trim(output_grid(n)) == 'rotated_latlon' ) then do j=lbound(lonPtr,2),ubound(lonPtr,2) do i=lbound(lonPtr,1),ubound(lonPtr,1) @@ -725,6 +756,9 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) enddo enddo wrt_int_state%post_maptype = 207 + else if ( trim(output_grid(n)) == 'rotated_latlon_moving' ) then + ! Do not compute lonPtr, latPtr here. Will be done in the run phase + wrt_int_state%post_maptype = 207 else if ( trim(output_grid(n)) == 'lambert_conformal' ) then lon1_r8 = dble(lon1(n)) lat1_r8 = dble(lat1(n)) @@ -773,8 +807,8 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) else - write(0,*)"wrt_initialize: Unknown output_grid ", trim(output_grid(n)) - call ESMF_LogWrite("wrt_initialize: Unknown output_grid "//trim(output_grid(n)),ESMF_LOGMSG_ERROR,rc=RC) + write(0,*)"wrt_initialize_p1: Unknown output_grid ", trim(output_grid(n)) + call ESMF_LogWrite("wrt_initialize_p1: Unknown output_grid "//trim(output_grid(n)),ESMF_LOGMSG_ERROR,rc=RC) call ESMF_Finalize(endflag=ESMF_END_ABORT) endif @@ -806,7 +840,7 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) if (lprnt) print *,'in wrt initial, with iau, io_baseline time=',idate,'rc=',rc endif ! -!--- Look at the incoming FieldBundles in the imp_state_write, and mirror them +!--- Look at the incoming FieldBundles in the imp_state_write, and mirror them as 'output_' bundles ! call ESMF_StateGet(imp_state_write, itemCount=FBCount, rc=rc) @@ -845,27 +879,39 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) name="grid_id", value=grid_id, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -!--- check grid dim count first +!--- get grid dim count call ESMF_GridGet(wrtGrid(grid_id), dimCount=gridDimCount, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! create a mirror FieldBundle and add it to importState - fieldbundle = ESMF_FieldBundleCreate(name="mirror_"//trim(fcstItemNameList(i)), rc=rc) - +! create a mirrored 'output_' FieldBundle and add it to importState + fieldbundle = ESMF_FieldBundleCreate(name="output_"//trim(fcstItemNameList(i)), rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return call ESMF_StateAdd(imp_state_write, (/fieldbundle/), rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! copy the fcstFB Attributes to the mirror FieldBundle +! copy the fcstFB Attributes to the 'output_' FieldBundle call ESMF_AttributeCopy(fcstFB, fieldbundle, attcopy=ESMF_ATTCOPY_REFERENCE, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! - call ESMF_FieldBundleGet(fcstFB, fieldCount=fieldCount, rc=rc) +! grids in fcstFB for which 'is_moving' is .true. must provide a first level mirror for the Redist() target + if (is_moving(grid_id)) then + +! create a mirrored 'mirror_' FieldBundle and add it to importState + mirrorFB = ESMF_FieldBundleCreate(name="mirror_"//trim(fcstItemNameList(i)), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_StateAdd(imp_state_write, (/mirrorFB/), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + +! copy the fcstFB Attributes to the 'mirror_' FieldBundle + call ESMF_AttributeCopy(fcstFB, mirrorFB, attcopy=ESMF_ATTCOPY_REFERENCE, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + endif + +! deal with all of the Fields inside this fcstFB + call ESMF_FieldBundleGet(fcstFB, fieldCount=fieldCount, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return if (fieldCount > 0) then @@ -901,7 +947,7 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! create the mirror field +! create the output field call ESMF_LogWrite("call field create on wrt comp",ESMF_LOGMSG_INFO,rc=RC) field_work = ESMF_FieldCreate(wrtGrid(grid_id), typekind, name=fieldName, & @@ -931,11 +977,35 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) ! if (lprnt) print *,' i=',i,' j=',j,' outfilename=',trim(outfilename(j,i)) -! add the mirror field to the mirror FieldBundle +! add the output field to the 'output_' FieldBundle call ESMF_FieldBundleAdd(fieldbundle, (/field_work/), rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return +! deal with grids for which 'is_moving' is .true. + if (is_moving(grid_id)) then + ! create an empty field that will serve as acceptor for GridTransfer of fcstGrid + field_work = ESMF_FieldEmptyCreate(name=fieldName, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! use attributes to carry information for later FieldEmptyComplete() + call ESMF_InfoGetFromHost(field_work, info=info, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + tk = typekind ! convert TypeKind_Flag to integer + call ESMF_InfoSet(info, key="typekind", value=tk, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoSet(info, key="gridToFieldMap", values=gridToFieldMap, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoSet(info, key="ungriddedLBound", values=ungriddedLBound, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoSet(info, key="ungriddedUBound", values=ungriddedUBound, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! add to 'mirror_' FieldBundle + call ESMF_FieldBundleAdd(mirrorFB, (/field_work/), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + endif + ! local garbage collection deallocate(gridToFieldMap, ungriddedLBound, ungriddedUBound) enddo @@ -975,12 +1045,12 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) do n=1, FBcount - call ESMF_StateGet(imp_state_write, itemName="mirror_"//trim(fcstItemNameList(n)), & + call ESMF_StateGet(imp_state_write, itemName="output_"//trim(fcstItemNameList(n)), & fieldbundle=fcstFB, rc=rc) if( index(trim(fcstItemNameList(n)),trim(FBlist_outfilename(i))) == 1 ) then ! -! copy the mirror fcstfield bundle Attributes to the output field bundle +! copy the fcstfield bundle Attributes to the output field bundle call ESMF_AttributeCopy(fcstFB, wrt_int_state%wrtFB(i), & attcopy=ESMF_ATTCOPY_REFERENCE, rc=rc) @@ -1045,9 +1115,11 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) call ESMF_AttributeSet(wrt_int_state%wrtFB(i), convention="NetCDF", purpose="FV3", & name="jm", value=jmo(grid_id), rc=rc) - else if (trim(output_grid(grid_id)) == 'regional_latlon' & + else if (trim(output_grid(grid_id)) == 'regional_latlon' & + .or. trim(output_grid(grid_id)) == 'regional_latlon_moving' & .or. trim(output_grid(grid_id)) == 'global_latlon') then + ! for 'regional_latlon_moving' lon1/2 and lat1/2 will be overwritten in run phase call ESMF_AttributeSet(wrt_int_state%wrtFB(i), convention="NetCDF", purpose="FV3", & name="grid", value="latlon", rc=rc) call ESMF_AttributeAdd(wrt_int_state%wrtFB(i), convention="NetCDF", purpose="FV3", & @@ -1065,7 +1137,8 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) call ESMF_AttributeSet(wrt_int_state%wrtFB(i), convention="NetCDF", purpose="FV3", & name="dlat", value=dlat(grid_id), rc=rc) - else if (trim(output_grid(grid_id)) == 'rotated_latlon') then + else if (trim(output_grid(grid_id)) == 'rotated_latlon' & + .or. trim(output_grid(grid_id)) == 'rotated_latlon_moving') then call ESMF_AttributeSet(wrt_int_state%wrtFB(i), convention="NetCDF", purpose="FV3", & name="grid", value="rotated_latlon", rc=rc) @@ -1078,6 +1151,7 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) "lat2 ",& "dlon ",& "dlat "/), rc=rc) + ! for 'rotated_latlon_moving' cen_lon and cen_lat will be overwritten in run phase call ESMF_AttributeSet(wrt_int_state%wrtFB(i), convention="NetCDF", purpose="FV3", & name="cen_lon", value=cen_lon(grid_id), rc=rc) call ESMF_AttributeSet(wrt_int_state%wrtFB(i), convention="NetCDF", purpose="FV3", & @@ -1368,12 +1442,6 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) deallocate(attNameList, attNameList2, typekindList) ! !----------------------------------------------------------------------- -!*** SET THE FIRST HISTORY FILE'S TIME INDEX. -!----------------------------------------------------------------------- -! - wrt_int_state%NFHOUR = 0 -! -!----------------------------------------------------------------------- !*** Initialize for POST !----------------------------------------------------------------------- ! @@ -1387,7 +1455,198 @@ subroutine wrt_initialize(wrt_comp, imp_state_write, exp_state_write, clock, rc) ! !----------------------------------------------------------------------- ! - end subroutine wrt_initialize + end subroutine wrt_initialize_p1 +! +!----------------------------------------------------------------------- +!####################################################################### +!----------------------------------------------------------------------- +! + subroutine wrt_initialize_p2(wrt_comp, imp_state_write, exp_state_write, clock, rc) +! +!----------------------------------------------------------------------- +!*** INITIALIZE THE WRITE GRIDDED COMPONENT. +!----------------------------------------------------------------------- +! + type(esmf_GridComp) :: wrt_comp + type(ESMF_State) :: imp_state_write, exp_state_write + type(esmf_Clock) :: clock + integer,intent(out) :: rc +! +!*** LOCAL VARIABLES + type(ESMF_Info) :: info + logical, allocatable :: is_moving(:) + type(ESMF_StateItem_Flag), allocatable :: itemTypeList(:) + character(len=ESMF_MAXSTR),allocatable :: itemNameList(:) + integer :: i, j, bundleCount, fieldCount + type(ESMF_FieldBundle) :: mirrorFB + type(ESMF_Field), allocatable :: fieldList(:) + type(ESMF_Grid) :: grid + type(ESMF_DistGrid) :: acceptorDG, newAcceptorDG +! +! +!----------------------------------------------------------------------- +!*********************************************************************** +!----------------------------------------------------------------------- +! + rc = ESMF_SUCCESS +! + call ESMF_InfoGetFromHost(imp_state_write, info=info, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoGetAlloc(info, key="is_moving", values=is_moving, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_StateGet(imp_state_write, itemCount=bundleCount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + allocate(itemNameList(bundleCount), itemTypeList(bundleCount)) + + call ESMF_StateGet(imp_state_write, itemNameList=itemNameList, & + itemTypeList=itemTypeList, & + !itemorderflag=ESMF_ITEMORDER_ADDORDER, & + rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + do i=1, bundleCount + + if (itemTypeList(i) == ESMF_STATEITEM_FIELDBUNDLE) then + + if (index(trim(itemNameList(i)), "mirror_")==1) then + ! this is a 'mirror_' FieldBundle -> GridTransfer acceptor side + call ESMF_StateGet(imp_state_write, itemName=trim(itemNameList(i)), fieldbundle=mirrorFB, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! access the grid that is passed in from the provider side + call ESMF_FieldBundleGet(mirrorFB, grid=grid, fieldCount=fieldCount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! access the acceptor DistGrid + call ESMF_GridGet(grid, distgrid=acceptorDG, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! rebalance the acceptor DistGrid across the local PETs + newAcceptorDG = ESMF_DistGridCreate(acceptorDG, balanceflag=.true., rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! create a new Grid on the rebalanced DistGrid + grid = ESMF_GridCreate(newAcceptorDG, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! point all of the acceptor fields to the new acceptor Grid + allocate(fieldList(fieldCount)) + call ESMF_FieldBundleGet(mirrorFB, fieldList=fieldList, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + do j=1, fieldCount + call ESMF_FieldEmptySet(fieldList(j), grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + enddo + ! clean-up + deallocate(fieldList) + endif + + else ! anything but a FieldBundle in the state is unexpected here + call ESMF_LogSetError(ESMF_RC_ARG_BAD, msg="Only FieldBundles supported in fcstState.", line=__LINE__, file=__FILE__) + return + endif + + enddo + +!----------------------------------------------------------------------- +! + end subroutine wrt_initialize_p2 +! +!----------------------------------------------------------------------- +!####################################################################### +!----------------------------------------------------------------------- +! + subroutine wrt_initialize_p3(wrt_comp, imp_state_write, exp_state_write, clock, rc) +! +!----------------------------------------------------------------------- +!*** INITIALIZE THE WRITE GRIDDED COMPONENT. +!----------------------------------------------------------------------- +! + type(esmf_GridComp) :: wrt_comp + type(ESMF_State) :: imp_state_write, exp_state_write + type(esmf_Clock) :: clock + integer,intent(out) :: rc +!*** LOCAL VARIABLES + type(ESMF_Info) :: info + logical, allocatable :: is_moving(:) + type(ESMF_StateItem_Flag), allocatable :: itemTypeList(:) + character(len=ESMF_MAXSTR),allocatable :: itemNameList(:) + integer :: i, j, bundleCount, fieldCount + type(ESMF_FieldBundle) :: mirrorFB + type(ESMF_Field), allocatable :: fieldList(:) + type(ESMF_TypeKind_Flag) :: typekind + integer :: tk + integer, allocatable :: gridToFieldMap(:) + integer, allocatable :: ungriddedLBound(:) + integer, allocatable :: ungriddedUBound(:) + +! +! +!----------------------------------------------------------------------- +!*********************************************************************** +!----------------------------------------------------------------------- +! + rc = ESMF_SUCCESS +! + call ESMF_InfoGetFromHost(imp_state_write, info=info, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoGetAlloc(info, key="is_moving", values=is_moving, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_StateGet(imp_state_write, itemCount=bundleCount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + allocate(itemNameList(bundleCount), itemTypeList(bundleCount)) + + call ESMF_StateGet(imp_state_write, itemNameList=itemNameList, & + itemTypeList=itemTypeList, & + !itemorderflag=ESMF_ITEMORDER_ADDORDER, & + rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + do i=1, bundleCount + + if (itemTypeList(i) == ESMF_STATEITEM_FIELDBUNDLE) then + + if (index(trim(itemNameList(i)), "mirror_")==1) then + ! this is a 'mirror_' FieldBundle -> GridTransfer acceptor side + call ESMF_StateGet(imp_state_write, itemName=trim(itemNameList(i)), fieldbundle=mirrorFB, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! finish creating all the mirror Fields + call ESMF_FieldBundleGet(mirrorFB, fieldCount=fieldCount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + allocate(fieldList(fieldCount)) + call ESMF_FieldBundleGet(mirrorFB, fieldList=fieldList, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + do j=1, fieldCount + ! first access information stored on the field needed for completion + call ESMF_InfoGetFromHost(fieldList(j), info=info, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoGet(info, key="typekind", value=tk, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + typekind = tk ! convert integer into TypeKind_Flag + call ESMF_InfoGetAlloc(info, key="gridToFieldMap", values=gridToFieldMap, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoGetAlloc(info, key="ungriddedLBound", values=ungriddedLBound, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_InfoGetAlloc(info, key="ungriddedUBound", values=ungriddedUBound, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! now complete the field creation + call ESMF_FieldEmptyComplete(fieldList(j), typekind=typekind, gridToFieldMap=gridToFieldMap, & + ungriddedLBound=ungriddedLBound, ungriddedUBound=ungriddedUBound, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + enddo + ! clean-up + deallocate(fieldList) + endif + + else ! anything but a FieldBundle in the state is unexpected here + call ESMF_LogSetError(ESMF_RC_ARG_BAD, msg="Only FieldBundles supported in fcstState.", line=__LINE__, file=__FILE__) + return + endif + + enddo + +!----------------------------------------------------------------------- +! + end subroutine wrt_initialize_p3 ! !----------------------------------------------------------------------- !####################################################################### @@ -1408,20 +1667,25 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) !*** local variables ! TYPE(ESMF_VM) :: VM - type(ESMF_FieldBundle) :: file_bundle + type(ESMF_FieldBundle) :: file_bundle, mirror_bundle + type(ESMF_StateItem_Flag) :: itemType type(ESMF_Time) :: currtime + type(ESMF_TimeInterval) :: io_currtimediff type(ESMF_Grid) :: fbgrid, wrtGrid type(ESMF_State),save :: stateGridFB type(optimizeT), save :: optimize(4) type(ESMF_GridComp), save, allocatable :: compsGridFB(:) + type(ESMF_RouteHandle) :: rh + type(ESMF_RegridMethod_Flag) :: regridmethod + integer :: srcTermProcessing ! type(write_wrap) :: wrap type(wrt_internal_state),pointer :: wrt_int_state ! - integer :: i,j,n,mype,nolog, grid_id + integer :: i,j,n,mype,nolog, grid_id, localPet ! - integer :: nf_hours,nf_seconds, nf_minutes, & - nseconds,nseconds_num,nseconds_den + integer :: nf_hours,nf_seconds,nf_minutes + real(ESMF_KIND_R8) :: nfhour ! integer :: nbdl, date(6), ndig, nnnn integer :: step=1 @@ -1429,10 +1693,30 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) logical :: opened logical :: lmask_fields ! - character(esmf_maxstr) :: filename,compname + character(esmf_maxstr) :: filename,compname, traceString character(40) :: cfhour, cform - real(ESMF_KIND_R8) :: time -! + character(20) :: time_iso +! + type(ESMF_Grid) :: grid + type(ESMF_Info) :: info + real(ESMF_KIND_R8), allocatable :: values(:) + character(160) :: msgString + type(ESMF_Field), allocatable :: fieldList(:) + type(ESMF_Array) :: coordArray(2) + type(ESMF_DistGrid) :: coordDG + type(ESMF_DELayout) :: coordDL + integer :: fieldCount, deCount, rootPet + integer :: minIndexPTile(2,1), maxIndexPTile(2,1), centerIndex(2) + integer, allocatable :: minIndexPDe(:,:), maxIndexPDe(:,:), petMap(:) + real(ESMF_KIND_R8), pointer :: farrayPtr(:,:) + real(ESMF_KIND_R8) :: centerCoord(2) + + integer :: ii, jj + real(ESMF_KIND_R8), pointer :: lonPtr(:,:), latPtr(:,:) + real(ESMF_KIND_R8) :: rot_lon, rot_lat + real(ESMF_KIND_R8) :: geo_lon, geo_lat + real(ESMF_KIND_R8), parameter :: rtod=180.0/pi + real(kind=8) :: MPI_Wtime real(kind=8) :: tbeg real(kind=8) :: wbeg,wend @@ -1450,7 +1734,7 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) !----------------------------------------------------------------------- !*** get the current write grid comp name, and internal state ! - call ESMF_GridCompGet(wrt_comp, name=compname, rc=rc) + call ESMF_GridCompGet(wrt_comp, name=compname, localPet=localPet, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! Provide log message indicating which wrtComp is active @@ -1475,77 +1759,220 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) !*** get current time and elapsed forecast time call ESMF_ClockGet(clock=CLOCK, currTime=CURRTIME, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return call ESMF_TimeGet(time=currTime,yy=date(1),mm=date(2),dd=date(3),h=date(4), & m=date(5),s=date(6),rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + wrt_int_state%fdate(7) = 1 wrt_int_state%fdate(1:6) = date(1:6) + write(time_iso,'(I4,"-",I2.2,"-",I2.2,"T",I2.2,":",I2.2,":",I2.2,"Z")') date(1:6) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! if(mype == lead_write_task) print *,'in wrt run, curr time=',date -! call ESMF_TimeGet(time=wrt_int_state%IO_BASETIME,yy=date(1),mm=date(2),dd=date(3),h=date(4), & m=date(5),s=date(6),rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + io_currtimediff = currtime - wrt_int_state%IO_BASETIME + + call ESMF_TimeIntervalGet(timeinterval=io_currtimediff & + ,h_r8=nfhour,h=nf_hours,m=nf_minutes,s=nf_seconds,rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! print *,'in wrt run, io_baseline time=',date -! - wrt_int_state%IO_CURRTIMEDIFF = CURRTIME-wrt_int_state%IO_BASETIME -! - call ESMF_TimeIntervalGet(timeinterval=wrt_int_state%IO_CURRTIMEDIFF & - ,h =nf_hours & !<-- Hours of elapsed time - ,m =nf_minutes & !<-- Minutes of elapsed time - ,s =nseconds & !<-- Seconds of elapsed time - ,sN =nseconds_num & !<-- Numerator of fractional elapsed seconds - ,sD =nseconds_den & !<-- denominator of fractional elapsed seconds - ,rc =RC) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! if (lprnt) print *,'in wrt run, nf_hours=',nf_hours,nf_minutes,nseconds, & -! 'nseconds_num=',nseconds_num,nseconds_den,'mype=',mype -! - nf_seconds = nf_hours*3600+nf_minuteS*60+nseconds+real(nseconds_num)/real(nseconds_den) - wrt_int_state%nfhour = nf_seconds/3600. - nf_hours = int(nf_seconds/3600.) - if(lprnt) print *,'in write grid comp, nf_hours=',nf_hours - ! if iau_offset > nf_hours, don't write out anything if (nf_hours < 0) return - nf_minutes = int((nf_seconds-nf_hours*3600.)/60.) - nseconds = int(nf_seconds-nf_hours*3600.-nf_minutes*60.) if (nsout > 0 .or. lflname_fulltime) then ndig = max(log10(nf_hours+0.5)+1., 3.) write(cform, '("(I",I1,".",I1,",A1,I2.2,A1,I2.2)")') ndig, ndig - write(cfhour, cform) nf_hours,'-',nf_minutes,'-',nseconds + write(cfhour, cform) nf_hours,'-',nf_minutes,'-',nf_seconds else ndig = max(log10(nf_hours+0.5)+1., 3.) write(cform, '("(I",I1,".",I1,")")') ndig, ndig write(cfhour, cform) nf_hours endif ! - if(lprnt) print *,'in wrt run, nf_hours=',nf_hours,nf_minutes,nseconds, & - 'nseconds_num=',nseconds_num,nseconds_den,' FBCount=',FBCount,' cfhour=',trim(cfhour) - -! if(lprnt) print *,'in wrt run, cfhour=',cfhour, & -! print *,'in wrt run, cfhour=',cfhour, & -! ' nf_seconds=',nf_seconds,wrt_int_state%nfhour - -! access the time Attribute which is updated by the driver each time - call ESMF_AttributeGet(imp_state_write, convention="NetCDF", purpose="FV3", & - name="time", value=time, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - + if(lprnt) print *,'in wrt run, nfhour=',nfhour,' cfhour=',trim(cfhour) ! !----------------------------------------------------------------------- -!*** loop on the files that need to write out +!*** loop on the "output_" FieldBundles, i.e. files that need to write out !----------------------------------------------------------------------- do i=1, FBCount - call ESMF_StateGet(imp_state_write, itemName="mirror_"//trim(fcstItemNameList(i)), & + call ESMF_StateGet(imp_state_write, itemName="output_"//trim(fcstItemNameList(i)), & fieldbundle=file_bundle, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! see whether a "mirror_" FieldBundle exists, i.e. dealing with moving domain that needs updated Regrid() here. + call ESMF_StateGet(imp_state_write, itemName="mirror_"//trim(fcstItemNameList(i)), & + itemType=itemType, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + if (itemType == ESMF_STATEITEM_FIELDBUNDLE) then + ! Regrid() for a moving domain + call ESMF_LogWrite("Regrid() for moving domain: mirror_"//trim(fcstItemNameList(i)), ESMF_LOGMSG_INFO, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_StateGet(imp_state_write, itemName="mirror_"//trim(fcstItemNameList(i)), & + fieldbundle=mirror_bundle, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! Find the centerCoord of the moving domain + + call ESMF_FieldBundleGet(mirror_bundle, fieldCount=fieldCount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + allocate(fieldList(fieldCount)) + call ESMF_FieldBundleGet(mirror_bundle, fieldList=fieldList, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_FieldGet(fieldList(1), grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + deallocate(fieldList) + + call ESMF_GridGetCoord(grid, coordDim=1, array=coordArray(1), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_GridGetCoord(grid, coordDim=2, array=coordArray(2), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_ArrayGet(coordArray(1), distgrid=coordDG, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_DistGridGet(coordDG, deCount=deCount, minIndexPTile=minIndexPTile, maxIndexPTile=maxIndexPTile, & + delayout=coordDL, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + allocate(petMap(deCount),minIndexPDe(2,deCount), maxIndexPDe(2,deCount)) + call ESMF_DELayoutGet(coordDL, petMap=petMap, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_DistGridGet(coordDG, minIndexPDe=minIndexPDe, maxIndexPDe=maxIndexPDe, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + centerIndex(1) = (maxIndexPTile(1,1)-minIndexPTile(1,1)+1)/2 + centerIndex(2) = (maxIndexPTile(2,1)-minIndexPTile(2,1)+1)/2 + +! write(msgString,*) "Determined centerIndex: ", centerIndex +! call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_DEBUG, rc=rc) +! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + do n=1, deCount + if (minIndexPDe(1,n)<=centerIndex(1) .and. centerIndex(1)<=maxIndexPDe(1,n) .and. & + minIndexPDe(2,n)<=centerIndex(2) .and. centerIndex(2)<=maxIndexPDe(2,n)) then + ! found the DE that holds the center coordinate + rootPet = petMap(n) + if (localPet == rootPet) then + ! center DE is on local PET -> fill centerCoord locally + call ESMF_ArrayGet(coordArray(1), farrayPtr=farrayPtr, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + centerCoord(1) = farrayPtr(centerIndex(1)-minIndexPDe(1,n)+1,centerIndex(2)-minIndexPDe(2,n)+1) + call ESMF_ArrayGet(coordArray(2), farrayPtr=farrayPtr, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + centerCoord(2) = farrayPtr(centerIndex(1)-minIndexPDe(1,n)+1,centerIndex(2)-minIndexPDe(2,n)+1) +! write(msgString,*) "Found centerCoord: ", centerCoord +! call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_DEBUG, rc=rc) +! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + endif + exit + endif + enddo + + deallocate(petMap,minIndexPDe,maxIndexPDe) + + call ESMF_VMBroadcast(vm, centerCoord, count=2, rootPet=rootPet, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + write(msgString,*) "All PETs know centerCoord in radians: ", centerCoord + call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_DEBUG, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! determine regridmethod + if (index(fcstItemNameList(i),"_bilinear") >0 ) then + traceString = "-bilinear" + regridmethod = ESMF_REGRIDMETHOD_BILINEAR + else if (index(fcstItemNameList(i),"_patch") >0) then + traceString = "-patch" + regridmethod = ESMF_REGRIDMETHOD_PATCH + else if (index(fcstItemNameList(i),"_nearest_stod") >0) then + traceString = "-nearest_stod" + regridmethod = ESMF_REGRIDMETHOD_NEAREST_STOD + else if (index(fcstItemNameList(i),"_nearest_dtos") >0) then + traceString = "-nearest_dtos" + regridmethod = ESMF_REGRIDMETHOD_NEAREST_DTOS + else if (index(fcstItemNameList(i),"_conserve") >0) then + traceString = "-conserve" + regridmethod = ESMF_REGRIDMETHOD_CONSERVE + else + call ESMF_LogSetError(ESMF_RC_ARG_BAD, & + msg="Unable to determine regrid method.", & + line=__LINE__, file=__FILE__, rcToReturn=rc) + return + endif + srcTermProcessing = 1 ! have this fixed for bit-for-bit reproducibility + ! RegridStore() + + ! update output grid coordinates based of fcstgrid center lat/lon + call ESMF_FieldBundleGet(file_bundle, grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_GridGetCoord(grid, coordDim=1, farrayPtr=lonPtr, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_GridGetCoord(grid, coordDim=2, farrayPtr=latPtr, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeGet(mirror_bundle, convention="NetCDF", purpose="FV3", & + name="grid_id", value=grid_id, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + if (trim(output_grid(grid_id)) == 'regional_latlon_moving' .or. & + trim(output_grid(grid_id)) == 'rotated_latlon_moving') then + n = grid_id + cen_lon(n) = centerCoord(1)*rtod + cen_lat(n) = centerCoord(2)*rtod + if (cen_lon(n) > 180.0) cen_lon(n) = cen_lon(n) - 360.0 + cen_lon(n) = NINT(cen_lon(n)*1000.0)/1000.0 + cen_lat(n) = NINT(cen_lat(n)*1000.0)/1000.0 + endif + + if (trim(output_grid(grid_id)) == 'regional_latlon_moving') then + lon1(n) = cen_lon(n) - 0.5 * (imo(n)-1) * dlon(n) + lat1(n) = cen_lat(n) - 0.5 * (jmo(n)-1) * dlat(n) + lon2(n) = cen_lon(n) + 0.5 * (imo(n)-1) * dlon(n) + lat2(n) = cen_lat(n) + 0.5 * (jmo(n)-1) * dlat(n) + do jj=lbound(lonPtr,2),ubound(lonPtr,2) + do ii=lbound(lonPtr,1),ubound(lonPtr,1) + lonPtr(ii,jj) = lon1(n) + (lon2(n)-lon1(n))/(imo(n)-1) * (ii-1) + latPtr(ii,jj) = lat1(n) + (lat2(n)-lat1(n))/(jmo(n)-1) * (jj-1) + enddo + enddo + else if (trim(output_grid(grid_id)) == 'rotated_latlon_moving') then + lon1(n) = - 0.5 * (imo(n)-1) * dlon(n) + lat1(n) = - 0.5 * (jmo(n)-1) * dlat(n) + lon2(n) = 0.5 * (imo(n)-1) * dlon(n) + lat2(n) = 0.5 * (jmo(n)-1) * dlat(n) + do jj=lbound(lonPtr,2),ubound(lonPtr,2) + do ii=lbound(lonPtr,1),ubound(lonPtr,1) + rot_lon = lon1(n) + (lon2(n)-lon1(n))/(imo(n)-1) * (ii-1) + rot_lat = lat1(n) + (lat2(n)-lat1(n))/(jmo(n)-1) * (jj-1) + call rtll(rot_lon, rot_lat, geo_lon, geo_lat, dble(cen_lon(n)), dble(cen_lat(n))) + if (geo_lon < 0.0) geo_lon = geo_lon + 360.0 + lonPtr(ii,jj) = geo_lon + latPtr(ii,jj) = geo_lat + enddo + enddo + endif + + call ESMF_TraceRegionEnter("ESMF_FieldBundleRegridStore()"//trim(traceString), rc=rc) + call ESMF_FieldBundleRegridStore(mirror_bundle, file_bundle, & + regridMethod=regridmethod, routehandle=rh, & + unmappedaction=ESMF_UNMAPPEDACTION_IGNORE, & + srcTermProcessing=srcTermProcessing, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_TraceRegionExit("ESMF_FieldBundleRegridStore()"//trim(traceString), rc=rc) + ! Regrid() + call ESMF_TraceRegionEnter("ESMF_FieldBundleRegrid()"//trim(traceString), rc=rc) + call ESMF_FieldBundleRegrid(mirror_bundle, file_bundle, & + routehandle=rh, termorderflag=(/ESMF_TERMORDER_SRCSEQ/), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_TraceRegionExit("ESMF_FieldBundleRegrid()"//trim(traceString), rc=rc) + ! RegridRelease() + call ESMF_FieldBundleRegridRelease(routehandle=rh, noGarbage=.true., rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! done + call ESMF_LogWrite("Done Regrid() for moving domain: mirror_"//trim(fcstItemNameList(i)), ESMF_LOGMSG_INFO, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + endif + !recover fields from cartesian vector and sfc pressure call recover_fields(file_bundle,rc) enddo @@ -1570,7 +1997,7 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) endif call inline_post_run(wrt_int_state, 1, mype, wrt_mpi_comm, lead_write_task, & - nf_hours, nf_minutes,nseconds) + nf_hours, nf_minutes, nf_seconds) wend = MPI_Wtime() if (lprnt) then write(*,'(A,F10.5,A,I4.2,A,I2.2)')' actual inline post Time is ',wend-wbeg & @@ -1592,6 +2019,44 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) name="grid_id", value=grid_id, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! update lon1/2 and lat1/2 for regional_latlon_moving + if (trim(output_grid(grid_id)) == 'regional_latlon_moving') then + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lon1", value=lon1(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lat1", value=lat1(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lon2", value=lon2(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lat2", value=lat2(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + endif + + ! update cen_lon/cen_lat, lon1/2 and lat1/2 for rotated_latlon_moving + if (trim(output_grid(grid_id)) == 'rotated_latlon_moving') then + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="cen_lon", value=cen_lon(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="cen_lat", value=cen_lat(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lon1", value=lon1(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lat1", value=lat1(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lon2", value=lon2(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_AttributeSet(wrt_int_state%wrtFB(nbdl), convention="NetCDF", purpose="FV3", & + name="lat2", value=lat2(grid_id), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + endif + if(step == 1) then file_bundle = wrt_int_state%wrtFB(nbdl) endif @@ -1649,7 +2114,12 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return call ESMF_AttributeSet(fbgrid, convention="NetCDF", purpose="FV3", & - name="time", value=real(wrt_int_state%nfhour,ESMF_KIND_R8), rc=rc) + name="time", value=nfhour, rc=rc) + + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_AttributeSet(fbgrid, convention="NetCDF", purpose="FV3", & + name="time_iso", value=trim(time_iso), rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return @@ -1711,8 +2181,10 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) ,' at Fcst ',NF_HOURS,':',NF_MINUTES endif - else if (trim(output_grid(grid_id)) == 'regional_latlon' .or. & - trim(output_grid(grid_id)) == 'rotated_latlon' .or. & + else if (trim(output_grid(grid_id)) == 'regional_latlon' .or. & + trim(output_grid(grid_id)) == 'regional_latlon_moving' .or. & + trim(output_grid(grid_id)) == 'rotated_latlon' .or. & + trim(output_grid(grid_id)) == 'rotated_latlon_moving' .or. & trim(output_grid(grid_id)) == 'lambert_conformal') then !mask fields according to sfc pressure @@ -1765,7 +2237,7 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) enddo ! open(nolog,file='logf'//trim(cfhour),form='FORMATTED') - write(nolog,100)wrt_int_state%nfhour,idate(1:6) + write(nolog,100)nfhour,idate(1:6) 100 format(' completed fv3gfs fhour=',f10.3,2x,6(i4,2x)) close(nolog) endif @@ -3568,45 +4040,55 @@ end subroutine rtll subroutine lambert(stlat1,stlat2,c_lat,c_lon,glon,glat,x,y,inv) !------------------------------------------------------------------------------- - real(ESMF_KIND_R8), intent(in) :: stlat1,stlat2,c_lat,c_lon - real(ESMF_KIND_R8), intent(inout) :: glon, glat + real(ESMF_KIND_R8), intent(in) :: stlat1,stlat2,c_lat,c_lon + real(ESMF_KIND_R8), intent(inout) :: glon, glat real(ESMF_KIND_R8), intent(inout) :: x, y - integer, intent(in) :: inv + integer, intent(in) :: inv !------------------------------------------------------------------------------- -! real(ESMF_KIND_R8), parameter :: pi=3.14159265358979323846 - real(ESMF_KIND_R8), parameter :: dtor=pi/180.0 - real(ESMF_KIND_R8), parameter :: rtod=180.0/pi +! real(ESMF_KIND_R8), parameter :: pi = 3.14159265358979323846 + real(ESMF_KIND_R8), parameter :: dtor = pi/180.0 + real(ESMF_KIND_R8), parameter :: rtod = 180.0/pi real(ESMF_KIND_R8), parameter :: a = 6371200.0 !------------------------------------------------------------------------------- -! inv == 1 (glon,glat) ---> (x,y) lat/lon to grid -! inv == -1 (x,y) ---> (glon,glat) grid to lat/lon +! inv == 1 (glon,glat) ---> (x,y) +! inv == -1 (x,y) ---> (glon,glat) - real(ESMF_KIND_R8) :: en,f,rho,rho0, dlon, theta + real(ESMF_KIND_R8) :: xp, yp, en, de, rho, rho0, rho2, dlon, theta, dr2 + real(ESMF_KIND_R8) :: h = 1.0 - IF (stlat1 == stlat2) THEN - en=sin(stlat1*dtor) - ELSE - en=log(cos(stlat1*dtor)/cos(stlat2*dtor))/ & - log(tan((45+0.5*stlat2)*dtor)/tan((45+0.5*stlat1)*dtor)) - ENDIF + ! For reference see: + ! John P. Snyder (1987), Map projections: A working manual (pp. 104-110) + ! https://doi.org/10.3133/pp1395 + + if (stlat1 == stlat2) then + en = sin(stlat1*dtor) + else + en = log(cos(stlat1*dtor)/cos(stlat2*dtor)) / & + log(tan((45+0.5*stlat2)*dtor)/tan((45+0.5*stlat1)*dtor)) ! (15-3) + endif + h = sign(1.0_ESMF_KIND_R8,en) - f=(cos(stlat1*dtor)*tan((45+0.5*stlat1)*dtor)**en)/en - rho0=a*f/(tan((45+0.5*c_lat)*dtor)**en) + de = a*(cos(stlat1*dtor)*tan((45+0.5*stlat1)*dtor)**en)/en ! (15-2) + rho0 = de/(tan((45+0.5*c_lat)*dtor)**en) ! (15-1a) if (inv == 1) then ! FORWARD TRANSFORMATION - rho=a*f/(tan((45+0.5*glat)*dtor)**en) - dlon=modulo(glon-c_lon+180+3600,360.)-180.D0 - theta=en*dlon*dtor - x=rho*sin(theta) - y=rho0-rho*cos(theta) + rho = de/(tan((45+0.5*glat)*dtor)**en) ! (15-1) + dlon = modulo(glon-c_lon+180.0+3600.0,360.0)-180.0 + theta = en*dlon*dtor ! (14-4) + x = rho*sin(theta) ! (14-1) + y = rho0-rho*cos(theta) ! (14-2) else if (inv == -1) then ! INVERSE TRANSFORMATION - y=rho0-y - rho = sqrt(x*x+y*y) - theta=atan2(x,y) - glon=c_lon+(theta/en)*rtod - glon=modulo(glon+180+3600,360.)-180.D0 -! glat=(2.0*atan((a*f/rho)**(1.0/en))-0.5*pi)*rtod - glat=(0.5*pi-2.0*atan((rho/(a*f))**(1.0/en)))*rtod + xp = h*x; + yp = h*(rho0-y) + theta = atan2(xp,yp) ! (14-11) + glon = c_lon+(theta/en)*rtod ! (14-9) + glon = modulo(glon+180.0+3600.0,360.0)-180.0 + rho2 = xp*xp+yp*yp ! (14-10) + if (rho2 == 0.0) then + glat = h*90.0 + else + glat = 2.0*atan((de*de/rho2)**(1.0/(2.0*en)))*rtod-90.0 ! (15-5) + endif else write (unit=*,fmt=*) " lambert: unknown inv argument" return diff --git a/io/post_regional.F90 b/io/post_fv3.F90 similarity index 87% rename from io/post_regional.F90 rename to io/post_fv3.F90 index a42e10475..81c62dd66 100644 --- a/io/post_regional.F90 +++ b/io/post_fv3.F90 @@ -2,7 +2,7 @@ !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !----------------------------------------------------------------------- ! -module post_regional +module post_fv3 use module_fv3_io_def, only : wrttasks_per_group,filename_base, & lon1, lat1, lon2, lat2, dlon, dlat, & @@ -16,16 +16,26 @@ module post_regional integer mype, nbdl logical setvar_atmfile, setvar_sfcfile, read_postcntrl - public post_run_regional, post_getattr_regional + public post_run_fv3, post_getattr_fv3 contains - subroutine post_run_regional(wrt_int_state,mypei,mpicomp,lead_write, & + subroutine post_run_fv3(wrt_int_state,mypei,mpicomp,lead_write, & mynfhr,mynfmin,mynfsec) ! ! revision history: ! Jul 2019 J. Wang create interface to run inline post for FV3 ! Sep 2020 J. Dong/J. Wang create interface to run inline post for FV3-LAM +! Apr 2021 R. Sun Added variables for Thomspon MP +! Apr 2022 W. Meng 1)unify global and regional inline post interfaces +! 2)add bug fix for dx/dy computation +! 3)add reading pwat from FV3 +! 4)remove some variable initializations +! 5)read max/min 2m T from tmax_max2m/tmin_min2m +! for GFS, and from t02max/min for RRFS +! and HAFS. +! 6)read 3D cloud fraction from cld_amt for GFDL MP, +! and from cldfra for other MPs. ! !----------------------------------------------------------------------- !*** run post on write grid comp @@ -69,13 +79,13 @@ subroutine post_run_regional(wrt_int_state,mypei,mpicomp,lead_write, & ! real(kind=8) :: btim0, btim1, btim2, btim3,btim4,btim5,btim6,btim7 ! +! print *,'in post_run start' !----------------------------------------------------------------------- !*** set up dimensions !----------------------------------------------------------------------- ! btim0 = MPI_Wtime() - modelname = "FV3R" grib = "grib2" gridtype = "A" nsoil = 4 @@ -143,7 +153,7 @@ subroutine post_run_regional(wrt_int_state,mypei,mpicomp,lead_write, & if(mype==0) print *,'bf set_postvars,ifmin=',ifmin,'ifhr=',ifhr setvar_atmfile=.false. setvar_sfcfile=.false. - call set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & + call set_postvars_fv3(wrt_int_state,mpicomp,setvar_atmfile, & setvar_sfcfile) ! print *,'af set_postvars,setvar_atmfile=',setvar_atmfile, & @@ -216,11 +226,11 @@ subroutine post_run_regional(wrt_int_state,mypei,mpicomp,lead_write, & ! endif - end subroutine post_run_regional + end subroutine post_run_fv3 ! !----------------------------------------------------------------------- ! - subroutine post_getattr_regional(wrt_int_state,grid_id) + subroutine post_getattr_fv3(wrt_int_state,grid_id) ! use esmf use ctlblk_mod, only: im, jm, mpi_comm_comp,gdsdegr,spval @@ -251,6 +261,7 @@ subroutine post_getattr_regional(wrt_int_state,grid_id) type(ESMF_FieldBundle) :: fldbundle ! spval = 9.99e20 +! field bundle do nfb=1, wrt_int_state%FBcount fldbundle = wrt_int_state%wrtFB(nfb) @@ -348,6 +359,22 @@ subroutine post_getattr_regional(wrt_int_state,grid_id) ! if(mype==0) print*,'rotated latlon,lonstart,latstart,cenlon,cenlat,dyval,dxval', & ! lonstart_r,lonlast_r,latstart_r,latlast_r,cenlon,cenlat,dyval,dxval + else if(trim(output_grid(grid_id)) == 'gaussian_grid') then + MAPTYPE=4 + gridtype='A' + + lonstart = nint(wrt_int_state%lonstart*gdsdegr) + lonlast = nint(wrt_int_state%lonlast*gdsdegr) + latstart = nint(wrt_int_state%latstart*gdsdegr) + latlast = nint(wrt_int_state%latlast*gdsdegr) + else if(trim(output_grid(grid_id)) == 'global_latlon') then + MAPTYPE=0 + gridtype='A' + + lonstart = nint(wrt_int_state%lonstart*gdsdegr) + lonlast = nint(wrt_int_state%lonlast*gdsdegr) + latstart = nint(wrt_int_state%latstart*gdsdegr) + latlast = nint(wrt_int_state%latlast*gdsdegr) endif ! look at the field bundle attributes @@ -428,16 +455,18 @@ subroutine post_getattr_regional(wrt_int_state,grid_id) ! enddo !end nfb ! - end subroutine post_getattr_regional + end subroutine post_getattr_fv3 !----------------------------------------------------------------------- !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !----------------------------------------------------------------------- ! - subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & + subroutine set_postvars_fv3(wrt_int_state,mpicomp,setvar_atmfile, & setvar_sfcfile) ! ! revision history: ! Jul 2019 J. Wang Initial code +! Apr 2022 W. Meng Unify set_postvars_gfs and +! set_postvars_regional to set_postvars_fv3 ! !----------------------------------------------------------------------- !*** set up post fields from nmint_state @@ -447,15 +476,15 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & use vrbls3d, only: t, q, uh, vh, wh, alpint, dpres, zint, zmid, o3, & qqr, qqs, cwm, qqi, qqw, qqg, omga, cfr, pmid, & q2, rlwtt, rswtt, tcucn, tcucns, train, el_pbl, & - pint, exch_h, ref_10cm, extcof55, aextc55, u, v + pint, exch_h, ref_10cm, qqni, qqnr, qqnwfa, qqnifa use vrbls2d, only: f, pd, sigt4, fis, pblh, ustar, z0, ths, qs, twbs,& qwbs, avgcprate, cprate, avgprec, prec, lspa, sno,& cldefi, th10, q10, tshltr, pshltr, tshltr, albase,& - avgalbedo, avgtcdc, czen, czmean, mxsnal, radot, & - cfrach, cfracl, cfracm, avgcfrach, qshltr, & + avgalbedo, avgtcdc, czen, czmean, mxsnal,landfrac,& + radot, cfrach, cfracl, cfracm, avgcfrach, qshltr, & avgcfracl, avgcfracm, cnvcfr, islope, cmc, grnflx,& vegfrc, acfrcv, ncfrcv, acfrst, ncfrst, ssroff, & - bgroff, rlwin, & + bgroff, rlwin, & rlwtoa, cldwork, alwin, alwout, alwtoa, rswin, & rswinc, rswout, aswin, auvbin, auvbinc, aswout, & aswtoa, sfcshx, sfclhx, subshx, snopcx, sfcux, & @@ -464,20 +493,21 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & acsnow, acsnom, sst, thz0, qz0, uz0, vz0, ptop, & htop, pbot, hbot, ptopl, pbotl, ttopl, ptopm, & pbotm, ttopm, ptoph, pboth, pblcfr, ttoph, runoff,& + tecan, tetran, tedir, twa, & maxtshltr, mintshltr, maxrhshltr, minrhshltr, & dzice, smcwlt, suntime, fieldcapa, htopd, hbotd, & htops, hbots, aswintoa, maxqshltr, minqshltr, & - acond, sr, u10h, v10h, avgedir, avgecan, & + acond, sr, u10h, v10h, avgedir, avgecan,paha,pahi,& avgetrans, avgesnow, avgprec_cont, avgcprate_cont,& avisbeamswin, avisdiffswin, airbeamswin, airdiffswin, & alwoutc, alwtoac, aswoutc, aswtoac, alwinc, aswinc,& - avgpotevp, snoavg, ti, si, cuppt, & + avgpotevp, snoavg, ti, si, cuppt, fdnsst, & w_up_max, w_dn_max, up_heli_max,up_heli_min, & up_heli_max03,up_heli_min03,rel_vort_max01, & rel_vort_max, rel_vort_maxhy1, refd_max, & refdm10c_max, u10max, v10max, wspd10max, sfcuxi, & sfcvxi, t10m, t10avg, psfcavg, akhsavg, akmsavg, & - albedo, tg, prate_max + albedo, tg, prate_max, pwat use soil, only: sldpth, sh2o, smc, stc use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice use ctlblk_mod, only: im, jm, lm, lp1, jsta, jend, jsta_2l, jend_2u, jsta_m,jend_m, & @@ -485,8 +515,8 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & tprec, tclod, trdlw, trdsw, tsrfc, tmaxmin, theat, & ardlw, ardsw, asrfc, avrain, avcnvc, iSF_SURFACE_PHYSICS,& td3d, idat, sdat, ifhr, ifmin, dt, nphs, dtq2, pt_tbl, & - alsl, spl, ihrst - use params_mod, only: erad, dtr, capa, p1000 + alsl, spl, ihrst, modelname + use params_mod, only: erad, dtr, capa, p1000, small use gridspec_mod,only: latstart, latlast, lonstart, lonlast, cenlon, cenlat, & dxval, dyval, truelat2, truelat1, psmapf, cenlat, & lonstartv, lonlastv, cenlonv, latstartv, latlastv, & @@ -539,7 +569,6 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & type(ESMF_TypeKind_Flag) :: typekind type(ESMF_TypeKind_Flag) :: attTypeKind - real, parameter :: small=1.e-6 ! !----------------------------------------------------------------------- !*** INTEGER SCALAR/1D HISTORY VARIABLES @@ -548,6 +577,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & imp_physics = wrt_int_state%imp_physics !set GFS mp physics to 99 for Zhao scheme dtp = wrt_int_state%dtp iSF_SURFACE_PHYSICS = 2 + spval = 9.99e20 ! ! nems gfs has zhour defined tprec = float(wrt_int_state%fhzero) @@ -560,6 +590,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & ! if(mype==0)print*,'MP_PHYSICS= ',imp_physics,'nbdl=',nbdl, 'tprec=',tprec,'tclod=',tclod, & ! 'dtp=',dtp,'tmaxmin=',tmaxmin,'jsta=',jsta,jend,im,jm +! write(6,*) 'maptype and gridtype is ', maptype,gridtype ! !$omp parallel do default(shared),private(i,j) do j=jsta,jend @@ -569,12 +600,14 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo + call exch(gdlat(1,jsta_2l)) + !$omp parallel do default(none),private(i,j,ip1), & !$omp& shared(jsta,jend_m,im,dx,gdlat,gdlon,dy) do j = jsta, jend_m - do i = 1, im + do i = 1, im-1 ip1 = i + 1 - if (ip1 > im) ip1 = ip1 - im + !if (ip1 > im) ip1 = ip1 - im dx(i,j) = erad*cos(gdlat(i,j)*dtr)*(gdlon(ip1,j)-gdlon(i,j))*dtr dy(i,j) = erad*(gdlat(i,j+1)-gdlat(i,j))*dtr ! like A*DPH end do @@ -595,21 +628,6 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & ! pt = ak5(1) -! GFS may not have model derived radar ref. -! TKE -! cloud amount -!$omp parallel do default(none),private(i,j,l), & -!$omp& shared(lm,jsta,jend,im,spval,ref_10cm,q2,cfr) - do l=1,lm - do j=jsta,jend - do i=1,im - ref_10cm(i,j,l) = SPVAL - q2(i,j,l) = SPVAL - cfr(i,j,l) = SPVAL - enddo - enddo - enddo - ! GFS does not have surface specific humidity ! inst sensible heat flux ! inst latent heat flux @@ -619,7 +637,6 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & qs(i,j) = SPVAL twbs(i,j) = SPVAL qwbs(i,j) = SPVAL - ths(i,j) = SPVAL enddo enddo @@ -641,7 +658,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & lspa(i,j) = SPVAL th10(i,j) = SPVAL q10(i,j) = SPVAL - albase(i,j) = 0. + albase(i,j) = SPVAL enddo enddo @@ -664,7 +681,6 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & do i=1,im czen(i,j) = SPVAL czmean(i,j) = SPVAL - radot(i,j) = SPVAL cfrach(i,j) = SPVAL cfracl(i,j) = SPVAL cfracm(i,j) = SPVAL @@ -682,7 +698,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & ! cfrcv to 1 ! time averaged cloud fraction, set acfrst to spval, ncfrst to 1 ! UNDERGROUND RUNOFF, bgroff -! inst incoming sfc longwave, rlwin +! inst incoming sfc longwave ! inst model top outgoing longwave,rlwtoa ! inst incoming sfc shortwave, rswin ! inst incoming clear sky sfc shortwave, rswinc @@ -690,7 +706,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & ! snow phase change heat flux, snopcx ! GFS does not use total momentum flux,sfcuvx !$omp parallel do default(none),private(i,j),shared(jsta,jend,im,spval), & -!$omp& shared(acfrcv,ncfrcv,acfrst,ncfrst,bgroff,rlwin,rlwtoa,rswin,rswinc,rswout,snopcx,sfcuvx) +!$omp& shared(acfrcv,ncfrcv,acfrst,ncfrst,bgroff,rlwtoa,rswin,rswinc,rswout,snopcx,sfcuvx) do j=jsta,jend do i=1,im acfrcv(i,j) = spval @@ -698,13 +714,8 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & acfrst(i,j) = spval ncfrst(i,j) = 1.0 bgroff(i,j) = spval - rlwin(i,j) = spval rlwtoa(i,j) = spval - rswin(i,j) = spval rswinc(i,j) = spval - rswout(i,j) = spval - snopcx(i,j) = spval - sfcuvx(i,j) = spval enddo enddo @@ -761,8 +772,6 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & qz0(i,j) = spval uz0(i,j) = spval vz0(i,j) = spval - maxrhshltr(i,j) = SPVAL - minrhshltr(i,j) = SPVAL enddo enddo @@ -815,48 +824,6 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & ! tstart = 0. ! -!** initialize cloud water and ice mixing ratio -!$omp parallel do default(none),private(i,j,l),shared(lm,jsta,jend,im), & -!$omp& shared(qqw,qqr,qqs,qqi) - do l = 1,lm - do j = jsta, jend - do i = 1,im - qqw(i,j,l) = 0. - qqr(i,j,l) = 0. - qqs(i,j,l) = 0. - qqi(i,j,l) = 0. - enddo - enddo - enddo -! -!** temporary fix: initialize t10m, t10avg, psfcavg, akhsavg, akmsavg, -!** albedo, tg -!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im), & -!$omp& shared(t10m,t10avg,psfcavg,akhsavg,akmsavg,albedo,tg) - do j=jsta_2l,jend_2u - do i=1,im - t10m(i,j) = 0. - t10avg(i,j) = 0. - psfcavg(i,j) = 0. - akhsavg(i,j) = 0. - akmsavg(i,j) = 0. - albedo(i,j) = 0. - tg(i,j) = 0. - enddo - enddo -!$omp parallel do default(none),private(i,j,k),shared(jsta_2l,jend_2u,im,lm), & -!$omp& shared(extcof55,aextc55,u,v) - do k=1,lm - do j=jsta_2l,jend_2u - do i=1,im - extcof55(i,j,k) = 0. - aextc55(i,j,k) = 0. - u(i,j,k) = 0. - v(i,j,k) = 0. - enddo - enddo - enddo -! !----------------------------------------------------------------------------- ! get post fields !----------------------------------------------------------------------------- @@ -1093,6 +1060,18 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif + ! foundation temperature + if(trim(fieldname)=='tref') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,fdnsst) + do j=jsta,jend + do i=ista, iend + if (arrayr42d(i,j) /= spval) then + fdnsst(i,j) = arrayr42d(i,j) + endif + enddo + enddo + endif + ! convective precip in m per physics time step if(trim(fieldname)=='cpratb_ave') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,dtq2,arrayr42d,avgcprate,fillValue,spval) @@ -1171,7 +1150,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & if (arrayr42d(i,j) /= spval .and. abs(arrayr42d(i,j)-fillValue) > small) then cprate(i,j) = max(0.,arrayr42d(i,j)) * (dtq2*0.001) * 1000./dtp else - cprate(i,j) = spval + cprate(i,j) = 0. endif enddo enddo @@ -1342,6 +1321,17 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif + ! land fraction + if(trim(fieldname)=='lfrac') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,landfrac,arrayr42d,sm) + do j=jsta,jend + do i=ista, iend + landfrac(i,j) = arrayr42d(i,j) + if (sm(i,j) /= 0.0) landfrac(i,j) = spval + enddo + enddo + endif + ! ave high cloud fraction if(trim(fieldname)=='tcdc_avehcl') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgcfrach,arrayr42d,fillValue) @@ -2002,12 +1992,110 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & do j=jsta,jend do i=ista, iend pbot(i,j) = arrayr42d(i,j) - if( abs(arrayr42d(i,j)-fillValue) < small) pbot(i,j) = spval + if( abs(arrayr42d(i,j)-fillValue) < small) pbot(i,j) = spval if(pbot(i,j) <= 0.0) pbot(i,j) = spval enddo enddo endif + ! time averaged low cloud top pressure + if(trim(fieldname)=='pres_avelct') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ptopl,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + ptopl(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) ptopl(i,j) = spval + enddo + enddo + endif + + ! time averaged low cloud bottom pressure + if(trim(fieldname)=='pres_avelcb') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pbotl,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + pbotl(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) pbotl(i,j) = spval + enddo + enddo + endif + + ! time averaged low cloud top temperature + if(trim(fieldname)=='tmp_avelct') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ttopl,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + ttopl(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) ttopl(i,j) = spval + enddo + enddo + endif + + ! time averaged middle cloud top pressure + if(trim(fieldname)=='pres_avemct') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ptopm,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + ptopm(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) ptopm(i,j) = spval + enddo + enddo + endif + ! time averaged middle cloud bottom pressure + if(trim(fieldname)=='pres_avemcb') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pbotm,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + pbotm(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) pbotm(i,j) = spval + enddo + enddo + endif + + ! time averaged middle cloud top temperature + if(trim(fieldname)=='tmp_avemct') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ttopm,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + ttopm(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) ttopm(i,j) = spval + enddo + enddo + endif + + ! time averaged high cloud top pressure + if(trim(fieldname)=='pres_avehct') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ptoph,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + ptoph(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) ptoph(i,j) = spval + enddo + enddo + endif + + ! time averaged high cloud bottom pressure + if(trim(fieldname)=='pres_avehcb') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pboth,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + pboth(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) pboth(i,j) = spval + enddo + enddo + endif + + ! time averaged high cloud top temperature + if(trim(fieldname)=='tmp_avehct') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ttoph,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + ttoph(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) ttoph(i,j) = spval + enddo + enddo + endif + ! time averaged boundary layer cloud cover if(trim(fieldname)=='tcdc_avebndcl') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pblcfr,arrayr42d,fillValue) @@ -2043,7 +2131,66 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif + ! accumulated evaporation of intercepted water + if(trim(fieldname)=='ecan_acc') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,tecan,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + tecan(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) tecan(i,j) = spval + if (sm(i,j) /= 0.0) tecan(i,j) = spval + enddo + enddo + endif + + ! accumulated plant transpiration + if(trim(fieldname)=='etran_acc') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,tetran,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + tetran(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) tetran(i,j) = spval + if (sm(i,j) /= 0.0) tetran(i,j) = spval + enddo + enddo + endif + + ! accumulated soil surface evaporation + if(trim(fieldname)=='edir_acc') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,tedir,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + tedir(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) tedir(i,j) = spval + if (sm(i,j) /= 0.0) tedir(i,j) = spval + enddo + enddo + endif + + ! total water storage in aquifer + if(trim(fieldname)=='wa_acc') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,twa,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + twa(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) twa(i,j) = spval + if (sm(i,j) /= 0.0) twa(i,j) = spval + enddo + enddo + endif + ! shelter max temperature + if(modelname=='GFS') then + if(trim(fieldname)=='tmax_max2m') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,maxtshltr,arrayr42d,fillValue,spval) + do j=jsta,jend + do i=ista, iend + maxtshltr(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) maxtshltr(i,j) = spval + enddo + enddo + endif + else if(trim(fieldname)=='t02max') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,maxtshltr,arrayr42d,fillValue,spval) do j=jsta,jend @@ -2053,9 +2200,10 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo endif + endif ! shelter min temperature - if(trim(fieldname)=='t02min') then + if(trim(fieldname)=='t02min' .or. trim(fieldname)=='tmin_min2m') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,mintshltr,arrayr42d,fillValue,spval) do j=jsta,jend do i=ista, iend @@ -2087,6 +2235,28 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif + ! shelter max specific humidity + if(trim(fieldname)=='spfhmax_max2m') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,maxqshltr,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + maxqshltr(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) maxqshltr(i,j) = spval + enddo + enddo + endif + + ! shelter min temperature + if(trim(fieldname)=='spfhmin_min2m') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,minqshltr,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + minqshltr(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) minqshltr(i,j) = spval + enddo + enddo + endif + ! ice thickness if(trim(fieldname)=='icetk') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,dzice,arrayr42d,fillValue,spval) @@ -2279,6 +2449,30 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif + ! AVERAGED PRECIP ADVECTED HEAT FLUX + if(trim(fieldname)=='pah_ave') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,paha,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + paha(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) paha(i,j) = spval + if (sm(i,j) /= 0.0) paha(i,j) = spval + enddo + enddo + endif + + ! instantaneous PRECIP ADVECTED HEAT FLUX + if(trim(fieldname)=='pahi') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pahi,arrayr42d,sm,fillValue) + do j=jsta,jend + do i=ista, iend + pahi(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) pahi(i,j) = spval + if (sm(i,j) /= 0.0) pahi(i,j) = spval + enddo + enddo + endif + ! plant transpiration if(trim(fieldname)=='trans_ave') then !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgetrans,arrayr42d,sm,fillValue) @@ -2326,10 +2520,22 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo endif + + + ! snow phase change heat flux + if(trim(fieldname)=='pwat') then + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pwat,arrayr42d,fillValue) + do j=jsta,jend + do i=ista, iend + pwat(i,j) = arrayr42d(i,j) + if( abs(arrayr42d(i,j)-fillValue) < small) pwat(i,j) = spval + enddo + enddo + endif ! model level upvvelmax if(trim(fieldname)=='upvvelmax') then - !$omp parallel do default(none) private(i,j,l) shared(jsta,jend,ista,iend,spval,w_up_max,arrayr42d,fillvalue) + !$omp parallel do default(none) private(i,j,l) shared(jsta,jend,ista,iend,spval,w_up_max,arrayr42d,fillValue) do j=jsta,jend do i=ista, iend w_up_max(i,j) = arrayr42d(i,j) @@ -2340,7 +2546,7 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & ! model level dnvvelmax if(trim(fieldname)=='dnvvelmax') then - !$omp parallel do default(none) private(i,j,l) shared(jsta,jend,ista,iend,spval,w_dn_max,arrayr42d,fillvalue) + !$omp parallel do default(none) private(i,j,l) shared(jsta,jend,ista,iend,spval,w_dn_max,arrayr42d,fillValue) do j=jsta,jend do i=ista, iend w_dn_max(i,j) = arrayr42d(i,j) @@ -2588,7 +2794,11 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & endif ! model level ozone mixing ratio +#ifdef MULTI_GASES + if(trim(fieldname)=='spo3') then +#else if(trim(fieldname)=='o3mr') then +#endif !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,o3,arrayr43d,fillvalue,spval) do l=1,lm do j=jsta,jend @@ -2600,8 +2810,8 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif -! for GFDL MP -! if (imp_physics == 11) then +! for GFDL MP or Thompson MP + if (imp_physics == 11 .or. imp_physics == 8) then ! model level cloud water mixing ratio if(trim(fieldname)=='clwmr') then !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqw,arrayr43d,fillvalue,spval) @@ -2672,10 +2882,79 @@ subroutine set_postvars_regional(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo endif -!gfdlmp -! endif + + if(imp_physics == 8) then + ! model level rain number + if(trim(fieldname)=='ncrain') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnr,arrayr43d,spval,fillvalue) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqnr(i,j,l)=arrayr43d(i,j,l) + if(abs(arrayr43d(i,j,l)-fillvalue)0) then - do i=1,size(paramset) - if (associated(paramset(i)%param)) then - if (size(paramset(i)%param)>0) then - deallocate(paramset(i)%param) - nullify(paramset(i)%param) - endif - endif - enddo - deallocate(paramset) - nullify(paramset) - endif - endif - num_pset = 0 - call read_xml() - if(mype==0) print *,'af read_xml,name=',trim(filenameflat),'ifhr=',ifhr - read_postcntrl = .false. - endif - endif -! - IEOF = 0 - npset = 0 - icount_calmict = 0 - do while( IEOF == 0) -! - if(grib == "grib2") then - npset = npset + 1 - call set_outflds(kth,th,kpv,pv) - if(allocated(datapd))deallocate(datapd) - allocate(datapd(wrt_int_state%im,jte-jts+1,nrecout+100)) -!$omp parallel do default(none),private(i,j,k),shared(nrecout,jend,jsta,im,datapd) - do k=1,nrecout+100 - do j=1,jend+1-jsta - do i=1,im - datapd(i,j,k) = 0. - enddo - enddo - enddo - call get_postfilename(post_fname) - if (mype==0) write(0,*)'post_fname=',trim(post_fname) -! - if ( ieof == 0) call process(kth,kpv,th(1:kth),pv(1:kpv),iostatusD3D) -! - call mpi_barrier(mpicomp,ierr) - call gribit2(post_fname) - if(allocated(datapd))deallocate(datapd) - if(allocated(fld_info))deallocate(fld_info) - if(npset >= num_pset) exit - - endif -! - enddo -! - endif - - end subroutine post_run_gfs -! -!----------------------------------------------------------------------- -! - subroutine post_getattr_gfs(wrt_int_state) -! - use esmf - use ctlblk_mod, only: im, jm, mpi_comm_comp - use masks, only: gdlat, gdlon, dx, dy - use gridspec_mod, only: latstart, latlast, lonstart, & - lonlast, cenlon, cenlat -! - implicit none -! - type(wrt_internal_state),intent(inout) :: wrt_int_state -! -! local variable - integer i,j,k,n,kz, attcount, nfb - integer ni,naryi,nr4,nr8,rc - integer aklen,varival - real(4) varr4val - real(8) varr8val - character(80) attName, hydrostatics, fldname - type(ESMF_TypeKind_Flag) :: typekind - real(4), dimension(:), allocatable :: ak4,bk4 - real(8), dimension(:), allocatable :: ak8,bk8 - type(ESMF_FieldBundle) :: fldbundle -! -! field bundle - do nfb=1, wrt_int_state%FBcount - fldbundle = wrt_int_state%wrtFB(nfb) - -! look at the field bundle attributes - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - attnestflag=ESMF_ATTNEST_OFF, Count=attcount, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__,file=__FILE__))return ! bail out -! - aklen=0. - do i=1, attCount - - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - attnestflag=ESMF_ATTNEST_OFF, attributeIndex=i, name=attName, & - typekind=typekind, itemCount=n, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__,file=__FILE__))return ! bail out - - if (typekind==ESMF_TYPEKIND_I4 ) then - if(n==1) then - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - name=trim(attName), value=varival, rc=rc) - if (trim(attName) == 'ncnsto') wrt_int_state%ntrac=varival - if (trim(attName) == 'ncld') wrt_int_state%ncld=varival - if (trim(attName) == 'nsoil') wrt_int_state%nsoil=varival - if (trim(attName) == 'fhzero') wrt_int_state%fhzero=varival - if (trim(attName) == 'imp_physics') wrt_int_state%imp_physics=varival - endif - else if (typekind==ESMF_TYPEKIND_R4) then - if(n==1) then - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - name=trim(attName), value=varr4val, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - if (trim(attName) == 'dtp') then - wrt_int_state%dtp=varr4val - endif - else if(n>1) then - if(trim(attName) =="ak") then - if(allocated(wrt_int_state%ak)) deallocate(wrt_int_state%ak) - allocate(wrt_int_state%ak(n)) - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - name=trim(attName), valueList=wrt_int_state%ak, rc=rc) - wrt_int_state%lm = n-1 - else if(trim(attName) =="bk") then - if(allocated(wrt_int_state%bk)) deallocate(wrt_int_state%bk) - allocate(wrt_int_state%bk(n)) - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - name=trim(attName), valueList=wrt_int_state%bk, rc=rc) - endif - endif - else if (typekind==ESMF_TYPEKIND_R8) then - if(n==1) then - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - name=trim(attName), value=varr8val, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - if (trim(attName) == 'dtp') then - wrt_int_state%dtp=varr8val - endif - else if(n>1) then - if(trim(attName) =="ak") then - if(allocated(wrt_int_state%ak)) deallocate(wrt_int_state%ak) - allocate(wrt_int_state%ak(n)) - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - name=trim(attName), valueList=wrt_int_state%ak, rc=rc) - wrt_int_state%lm = n-1 - else if(trim(attName) =="bk") then - if(allocated(wrt_int_state%bk)) deallocate(wrt_int_state%bk) - allocate(wrt_int_state%bk(n)) - call ESMF_AttributeGet(fldbundle, convention="NetCDF", purpose="FV3", & - name=trim(attName), valueList=wrt_int_state%bk, rc=rc) - endif - wrt_int_state%lm = size(wrt_int_state%ak) - 1 - endif - endif -! - enddo -! - enddo !end nfb -! print *,'in post_getattr, dtp=',wrt_int_state%dtp -! - end subroutine post_getattr_gfs -!----------------------------------------------------------------------- -!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -!----------------------------------------------------------------------- -! - subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & - setvar_sfcfile) -! -! revision history: -! Jul 2019 J. Wang Initial code -! -!----------------------------------------------------------------------- -!*** set up post fields from nmint_state -!----------------------------------------------------------------------- -! - use esmf - use vrbls3d, only: t, q, uh, vh, wh, alpint, dpres, zint, zmid, o3, & - qqr, qqs, cwm, qqi, qqw, qqg, omga, cfr, pmid, & - q2, rlwtt, rswtt, tcucn, tcucns, train, el_pbl, & - pint, exch_h, ref_10cm, qqni,qqnr,qqnwfa,qqnifa - use vrbls2d, only: f, pd, sigt4, fis, pblh, ustar, z0, ths, qs, twbs,& - qwbs, avgcprate, cprate, avgprec, prec, lspa, sno,& - cldefi, th10, q10, tshltr, pshltr, tshltr, albase,& - avgalbedo, avgtcdc, czen, czmean, mxsnal,landfrac,& - radot, cfrach, cfracl, cfracm, avgcfrach, qshltr, & - avgcfracl, avgcfracm, cnvcfr, islope, cmc, grnflx,& - vegfrc, acfrcv, ncfrcv, acfrst, ncfrst, ssroff, & - bgroff, rlwin, & - rlwtoa, cldwork, alwin, alwout, alwtoa, rswin, & - rswinc, rswout, aswin, auvbin, auvbinc, aswout, & - aswtoa, sfcshx, sfclhx, subshx, snopcx, sfcux, & - sfcvx, sfcuvx, gtaux, gtauy, potevp, u10, v10, & - smstav, smstot, ivgtyp, isltyp, sfcevp, sfcexc, & - acsnow, acsnom, sst, thz0, qz0, uz0, vz0, ptop, & - htop, pbot, hbot, ptopl, pbotl, ttopl, ptopm, & - pbotm, ttopm, ptoph, pboth, pblcfr, ttoph, runoff,& - tecan, tetran, tedir, twa, & - maxtshltr, mintshltr, maxrhshltr, minrhshltr, & - dzice, smcwlt, suntime, fieldcapa, htopd, hbotd, & - htops, hbots, aswintoa, maxqshltr, minqshltr, & - acond, sr, u10h, v10h, avgedir, avgecan,paha,pahi,& - avgetrans, avgesnow, avgprec_cont, avgcprate_cont,& - avisbeamswin, avisdiffswin, airbeamswin, airdiffswin, & - alwoutc, alwtoac, aswoutc, aswtoac, alwinc, aswinc,& - avgpotevp, snoavg, ti, si, cuppt, fdnsst - use soil, only: sldpth, sh2o, smc, stc - use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice - use ctlblk_mod, only: im, jm, lm, lp1, jsta, jend, jsta_2l, jend_2u, jsta_m,jend_m, & - lsm, pt, imp_physics, spval, mpi_comm_comp, gdsdegr, & - tprec, tclod, trdlw, trdsw, tsrfc, tmaxmin, theat, & - ardlw, ardsw, asrfc, avrain, avcnvc, iSF_SURFACE_PHYSICS,& - td3d, idat, sdat, ifhr, ifmin, dt, nphs, dtq2, pt_tbl, & - alsl, spl, ihrst - use params_mod, only: erad, dtr, capa, p1000 - use gridspec_mod,only: latstart, latlast, lonstart, lonlast, cenlon, cenlat - use lookup_mod, only: thl, plq, ptbl, ttbl, rdq, rdth, rdp, rdthe, pl, & - qs0, sqs, sthe, ttblq, rdpq, rdtheq, stheq, the0q, the0 - use physcons, only: grav => con_g, fv => con_fvirt, rgas => con_rd, & - eps => con_eps, epsm1 => con_epsm1 - use rqstfld_mod -! -! use write_internal_state, only: wrt_internal_state -! -!----------------------------------------------------------------------- -! - implicit none -! - include 'mpif.h' -! -!----------------------------------------------------------------------- -! - type(wrt_internal_state),intent(in) :: wrt_int_state - integer,intent(in) :: mpicomp - logical,intent(inout) :: setvar_atmfile,setvar_sfcfile -! -!----------------------------------------------------------------------- -! - integer i, ip1, j, l, k, n, iret, ibdl, rc, kstart, kend - integer ista,iend,fieldDimCount,gridDimCount,ncount_field - integer jdate(8) - logical foundland, foundice, found - real(4) rinc(5) - real tlmh,RADI,TMP,ES,TV,RHOAIR,tem,tstart,dtp - real, dimension(:),allocatable :: ak5, bk5 - real(4),dimension(:,:),pointer :: arrayr42d - real(8),dimension(:,:),pointer :: arrayr82d - real(4),dimension(:,:,:),pointer :: arrayr43d - real(8),dimension(:,:,:),pointer :: arrayr83d - real,dimension(:), allocatable :: slat,qstl - real,external::FPVSNEW - real,dimension(:,:),allocatable :: dummy, p2d, t2d, q2d, qs2d, & - cw2d, cfr2d - character(len=80) :: fieldname, wrtFBName - type(ESMF_Grid) :: wrtGrid - type(ESMF_Field) :: theField - type(ESMF_Field), allocatable :: fcstField(:) - type(ESMF_TypeKind_Flag) :: typekind -! -!----------------------------------------------------------------------- -!*** INTEGER SCALAR/1D HISTORY VARIABLES -!----------------------------------------------------------------------- -! - imp_physics = wrt_int_state%imp_physics !set GFS mp physics to 99 for Zhao scheme - dtp = wrt_int_state%dtp - iSF_SURFACE_PHYSICS = 2 - spval = 9.99e20 - -! -! nems gfs has zhour defined - tprec = float(wrt_int_state%fhzero) - tclod = tprec - trdlw = tprec - trdsw = tprec - tsrfc = tprec - tmaxmin = tprec - td3d = tprec - if(mype==0)print*,'MP_PHYSICS= ',imp_physics,'nbdl=',nbdl, 'tprec=',tprec,'tclod=',tclod, & - 'dtp=',dtp,'tmaxmin=',tmaxmin - -! write(6,*) 'maptype and gridtype is ', maptype,gridtype -! -!$omp parallel do default(shared),private(i,j) - do j=jsta,jend - do i=1,im - gdlat(i,j) = wrt_int_state%latPtr(i,j) - gdlon(i,j) = wrt_int_state%lonPtr(i,j) - enddo - enddo -! - lonstart = nint(wrt_int_state%lonstart*gdsdegr) - lonlast = nint(wrt_int_state%lonlast*gdsdegr) - latstart = nint(wrt_int_state%latstart*gdsdegr) - latlast = nint(wrt_int_state%latlast*gdsdegr) -! print*,'latstart,latlast B bcast= ',latstart,latlast -! print*,'lonstart,lonlast B bcast= ',lonstart,lonlast - -!$omp parallel do default(none),private(i,j,ip1), & -!$omp& shared(jsta,jend_m,im,dx,gdlat,gdlon,dy) - do j = jsta, jend_m - do i = 1, im - ip1 = i + 1 - if (ip1 > im) ip1 = ip1 - im - dx(i,j) = erad*cos(gdlat(i,j)*dtr)*(gdlon(ip1,j)-gdlon(i,j))*dtr - dy(i,j) = erad*(gdlat(i,j)-gdlat(i,j+1))*dtr ! like A*DPH - end do - end do -! - if(.not. allocated(ak5)) allocate(ak5(lm+1),bk5(lm+1)) - do i=1,lm+1 - ak5(i) = wrt_int_state%ak(i) - bk5(i) = wrt_int_state%bk(i) - enddo - -!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,f,gdlat) - do j=jsta,jend - do i=1,im - f(I,J) = 1.454441e-4*sin(gdlat(i,j)*dtr) ! 2*omeg*sin(phi) - end do - end do -! -! GFS does not output PD - pt = ak5(1) - -! GFS may not have model derived radar ref. -! TKE -! cloud amount -!$omp parallel do default(none),private(i,j,l), & -!$omp& shared(lm,jsta,jend,im,spval,ref_10cm,q2,cfr) - do l=1,lm - do j=jsta,jend - do i=1,im - ref_10cm(i,j,l) = SPVAL - q2(i,j,l) = SPVAL - cfr(i,j,l) = SPVAL - enddo - enddo - enddo - -! GFS does not have surface specific humidity -! inst sensible heat flux -! inst latent heat flux -!$omp parallel do default(none),private(i,j),shared(jsta,jend,im,spval,qs,twbs,qwbs,ths,fdnsst) - do j=jsta,jend - do i=1,im - qs(i,j) = SPVAL - twbs(i,j) = SPVAL - qwbs(i,j) = SPVAL - ths(i,j) = SPVAL - fdnsst(i,j) = SPVAL - enddo - enddo - -! GFS set up DT to compute accumulated fields, set it to one - dtq2 = wrt_int_state%dtp - nphs = 2. - dt = dtq2/nphs -! -! GFS does not have convective cloud efficiency -! similated precip -! 10 m theta -! 10 m humidity -! snow free albedo -!$omp parallel do default(none), private(i,j), shared(jsta,jend,im,spval), & -!$omp& shared(cldefi,lspa,th10,q10,albase) - do j=jsta,jend - do i=1,im - cldefi(i,j) = SPVAL - lspa(i,j) = SPVAL - th10(i,j) = SPVAL - q10(i,j) = SPVAL - albase(i,j) = SPVAL - enddo - enddo - -! GFS does not have convective precip -!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,cprate) - do j=jsta,jend - do i=1,im - cprate(i,j) = 0. - enddo - enddo - -! GFS probably does not use zenith angle, czen, czmean -! inst surface outgoing longwave, radot -! inst cloud fraction for high, middle, and low cloud, -! cfrach -! inst ground heat flux, grnflx -!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,spval), & -!$omp& shared(czen,czmean,radot,cfrach,cfracl,cfracm,grnflx) - do j=jsta,jend - do i=1,im - czen(i,j) = SPVAL - czmean(i,j) = SPVAL - radot(i,j) = SPVAL - cfrach(i,j) = SPVAL - cfracl(i,j) = SPVAL - cfracm(i,j) = SPVAL - grnflx(i,j) = SPVAL - enddo - enddo -! -! GFS doesn not yet output soil layer thickness, assign SLDPTH to be the same as nam - sldpth(1) = 0.10 - sldpth(2) = 0.3 - sldpth(3) = 0.6 - sldpth(4) = 1.0 - -! GFS does not output time averaged convective and strat cloud fraction, set acfrcv to spval, n -! cfrcv to 1 -! time averaged cloud fraction, set acfrst to spval, ncfrst to 1 -! UNDERGROUND RUNOFF, bgroff -! inst incoming sfc longwave, rlwin -! inst model top outgoing longwave,rlwtoa -! inst incoming sfc shortwave, rswin -! inst incoming clear sky sfc shortwave, rswinc -! inst outgoing sfc shortwave, rswout -! snow phase change heat flux, snopcx -! GFS does not use total momentum flux,sfcuvx -!$omp parallel do default(none),private(i,j),shared(jsta,jend,im,spval), & -!$omp& shared(acfrcv,ncfrcv,acfrst,ncfrst,bgroff,rlwin,rlwtoa,rswin,rswinc,rswout,snopcx,sfcuvx) - do j=jsta,jend - do i=1,im - acfrcv(i,j) = spval - ncfrcv(i,j) = 1.0 - acfrst(i,j) = spval - ncfrst(i,j) = 1.0 - bgroff(i,j) = spval - rlwin(i,j) = spval - rlwtoa(i,j) = spval - rswin(i,j) = spval - rswinc(i,j) = spval - rswout(i,j) = spval - snopcx(i,j) = spval - sfcuvx(i,j) = spval - enddo - enddo - -! GFS incoming sfc longwave has been averaged over 6 hr bucket, set ARDLW to 1 - ardlw = 1.0 -! GFS incoming sfc longwave has been averaged, set ARDLW to 1 - ardsw = 1.0 -! GFS surface flux has been averaged, set ASRFC to 1 - asrfc = 1.0 - -! GFS does not have temperature tendency due to long wave radiation -! temperature tendency due to short wave radiation -! temperature tendency due to latent heating from convection -! temperature tendency due to latent heating from grid scale - do l=1,lm -!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,spval,l), & -!$omp& shared(rlwtt,rswtt,tcucn,tcucns,train) - do j=jsta_2l,jend_2u - do i=1,im - rlwtt(i,j,l) = spval - rswtt(i,j,l) = spval - tcucn(i,j,l) = spval - tcucns(i,j,l) = spval - train(i,j,l) = spval - enddo - enddo - enddo - -! set avrain to 1 - avrain = 1.0 - avcnvc = 1.0 - theat = 6.0 ! just in case GFS decides to output T tendency - -! GFS does not have temperature tendency due to latent heating from grid scale - train = spval - -! GFS does not have soil moisture availability, smstav -! accumulated surface evaporatio, sfcevp -! averaged accumulated snow, acsnow -! snow melt,acsnom -! humidity at roughness length, qz0 -! u at roughness length, uz0 -! v at roughness length, vz0 -! shelter rh max, maxrhshltr -! shelter rh min, minrhshltr -!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,spval), & -!$omp& shared(smstav,sfcevp,acsnow,acsnom,qz0,uz0,vz0,maxrhshltr,minrhshltr) - do j=jsta_2l,jend_2u - do i=1,im - smstav(i,j) = spval - sfcevp(i,j) = spval - acsnow(i,j) = spval - acsnom(i,j) = spval - qz0(i,j) = spval - uz0(i,j) = spval - vz0(i,j) = spval - maxrhshltr(i,j) = SPVAL - minrhshltr(i,j) = SPVAL - enddo - enddo - -! GFS does not have mixing length,el_pbl -! exchange coefficient, exch_h - do l=1,lm -!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,l,spval,el_pbl,exch_h) - do j=jsta_2l,jend_2u - do i=1,im - el_pbl(i,j,l) = spval - exch_h(i,j,l) = spval - enddo - enddo - enddo - -! GFS does not have deep convective cloud top and bottom fields -!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,spval), & -!$omp& shared(htopd,hbotd,htops,hbots,cuppt) - do j=jsta_2l,jend_2u - do i=1,im - htopd(i,j) = SPVAL - hbotd(i,j) = SPVAL - htops(i,j) = SPVAL - hbots(i,j) = SPVAL - cuppt(i,j) = SPVAL - enddo - enddo -! -! get inital date - sdat(1) = wrt_int_state%idate(2) !month - sdat(2) = wrt_int_state%idate(3) !day - sdat(3) = wrt_int_state%idate(1) !year - ihrst = wrt_int_state%idate(4) !hour - - idat(1) = wrt_int_state%fdate(2) - idat(2) = wrt_int_state%fdate(3) - idat(3) = wrt_int_state%fdate(1) - idat(4) = wrt_int_state%fdate(4) - idat(5) = wrt_int_state%fdate(5) -! - if(mype==0) print *,'idat=',idat,'sdat=',sdat,'ihrst=',ihrst -! CALL W3DIFDAT(JDATE,IDATE,0,RINC) -! -! if(mype==0)print *,' rinc=',rinc -! ifhr = nint(rinc(2)+rinc(1)*24.) -! if(mype==0)print *,' ifhr=',ifhr -! ifmin = nint(rinc(3)) -! if(ifhr /= nint(fhour))print*,'find wrong Grib file';stop -! if(mype==0)print*,' in INITPOST ifhr ifmin =',ifhr,ifmin -! - tstart = 0. -! -!** initialize cloud water and ice mixing ratio -!$omp parallel do default(none),private(i,j,l),shared(lm,jsta,jend,im), & -!$omp& shared(qqw,qqr,qqs,qqi) - do l = 1,lm - do j = jsta, jend - do i = 1,im - qqw(i,j,l) = 0. - qqr(i,j,l) = 0. - qqs(i,j,l) = 0. - qqi(i,j,l) = 0. - enddo - enddo - enddo -! -!----------------------------------------------------------------------------- -! get post fields -!----------------------------------------------------------------------------- -! - foundland = .false. - foundice = .false. - get_lsmsk: do ibdl=1, wrt_int_state%FBCount - -! find lans sea mask - found = .false. - call ESMF_FieldBundleGet(wrt_int_state%wrtFB(ibdl),fieldName='land',isPresent=found, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out -! if(mype==0) print *,'ibdl=',ibdl,'land, found=',found - if (found) then - call ESMF_FieldBundleGet(wrt_int_state%wrtFB(ibdl),'land',field=theField, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - call ESMF_FieldGet(theField, localDe=0, farrayPtr=arrayr42d, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - ista = lbound(arrayr42d,1) - iend = ubound(arrayr42d,1) - !$omp parallel do default(none),private(i,j),shared(jsta,jend,ista,iend,spval,arrayr42d,sm) - do j=jsta, jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) sm(i,j) = 1.- arrayr42d(i,j) - enddo - enddo - foundland = .true. - endif - -! find ice fraction - found = .false. - call ESMF_FieldBundleGet(wrt_int_state%wrtFB(ibdl),'icec',isPresent=found, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out -! if(mype==0) print *,'ibdl=',ibdl,'ice, found=',found - if (found) then - call ESMF_FieldBundleGet(wrt_int_state%wrtFB(ibdl),'icec',field=theField, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - call ESMF_FieldGet(theField, localDe=0, farrayPtr=arrayr42d, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - ista = lbound(arrayr42d,1) - iend = ubound(arrayr42d,1) - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sice,arrayr42d,sm) - do j=jsta, jend - do i=ista, iend - sice(i,j) = arrayr42d(i,j) - if (sm(i,j) /= spval .and. sm(i,j) == 0.0) sice(i,j) = 0.0 - enddo - enddo - foundice = .true. - endif - - enddo get_lsmsk - if (.not.foundland .or. .not.foundice) then - rc=999 - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - endif - if(mype==0) print *,'after find sm and sice,imp_physics=',imp_physics,'nbdl=',wrt_int_state%FBCount -! - file_loop_all: do ibdl=1, wrt_int_state%FBCount -! -! get grid dimension count -! if(mype==0) print *,'in setvar, read field, ibdl=',ibdl,'idim=', & -! ista,iend,'jdim=',jsta,jend - call ESMF_FieldBundleGet(wrt_int_state%wrtFB(ibdl), grid=wrtGrid, & - fieldCount=ncount_field, name=wrtFBName,rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - call ESMF_GridGet(wrtgrid, dimCount=gridDimCount, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - -! if(mype==0) print *,'in setvar, allocate fcstField,ibdl=',ibdl,'count=',ncount_field,'wrtFBname=',trim(wrtFBName) - allocate(fcstField(ncount_field)) - call ESMF_FieldBundleGet(wrt_int_state%wrtFB(ibdl), & - fieldList=fcstField, itemorderflag=ESMF_ITEMORDER_ADDORDER, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - -! if(mype==0) print *,'in setvar, read field, ibdl=',ibdl, 'nfield=',ncount_field - do n=1, ncount_field -! - call ESMF_FieldGet(fcstField(n),typekind=typekind, name=fieldname, & - dimCount=fieldDimCount,rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - if (index(trim(fieldname),"vector") >0) cycle -! -!** for 2D fields - if (fieldDimCount == 2) then - - if (typekind == ESMF_TYPEKIND_R4) then - call ESMF_FieldGet(fcstField(n), localDe=0, farrayPtr=arrayr42d, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - else if (typekind == ESMF_TYPEKIND_R8) then - call ESMF_FieldGet(fcstField(n), localDe=0, farrayPtr=arrayr82d, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - allocate( arrayr42d(ista:iend,jsta:jend)) - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,arrayr42d,arrayr82d) - do j=jsta, jend - do i=ista, iend - arrayr42d(i,j) = arrayr82d(i,j) - enddo - enddo - endif - - ! Terrain height (*G later) - if(trim(fieldname)=='hgtsfc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,fis,arrayr42d) - do j=jsta,jend - do i=ista, iend - fis(i,j)=arrayr42d(i,j) - enddo - enddo - endif - - ! Surface pressure -! if(trim(fieldname)=='pressfc') then -! !$omp parallel do private(i,j) -! do j=jsta,jend -! do i=ista, iend -! pint(i,j,lp1)=arrayr42d(i,j) -! enddo -! enddo -! endif - - ! PBL height using nemsio - if(trim(fieldname)=='hpbl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pblh,arrayr42d) - do j=jsta,jend - do i=ista, iend - pblh(i,j)=arrayr42d(i,j) - enddo - enddo - endif - - ! frictional velocity - if(trim(fieldname)=='fricv') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ustar,arrayr42d) - do j=jsta,jend - do i=ista, iend - ustar(i,j)=arrayr42d(i,j) - enddo - enddo - endif - - ! roughness length - if(trim(fieldname)=='sfcr') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,z0,arrayr42d) - do j=jsta,jend - do i=ista, iend - z0(i,j)=arrayr42d(i,j) - enddo - enddo - endif - - ! sfc exchange coeff - if(trim(fieldname)=='sfexc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,sfcexc,arrayr42d) - do j=jsta,jend - do i=ista, iend - sfcexc(i,j)=arrayr42d(i,j) - enddo - enddo - endif - - ! aerodynamic conductance - if(trim(fieldname)=='acond') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,acond,arrayr42d) - do j=jsta,jend - do i=ista, iend - acond(i,j)=arrayr42d(i,j) - enddo - enddo - endif - - ! surface potential T - if(trim(fieldname)=='tmpsfc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,ths) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - ths(i,j) = arrayr42d(i,j) - endif - enddo - enddo - endif - - ! foundation temperature - if(trim(fieldname)=='tref') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,fdnsst) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - fdnsst(i,j) = arrayr42d(i,j) - endif - enddo - enddo - endif - - ! convective precip in m per physics time step - if(trim(fieldname)=='cpratb_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgcprate) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) & - avgcprate(i,j) = arrayr42d(i,j) * (dtq2*0.001) - enddo - enddo - endif - - ! continuous bucket convective precip in m per physics time step - if(trim(fieldname)=='cprat_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgcprate_cont) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - avgcprate_cont(i,j) = arrayr42d(i,j) * (dtq2*0.001) - endif - enddo - enddo - endif - - ! time averaged bucketed precip rate - if(trim(fieldname)=='prateb_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgprec) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - avgprec(i,j) = arrayr42d(i,j) * (dtq2*0.001) - endif - enddo - enddo - endif - - ! time averaged continuous precip rate in m per physics time step - if(trim(fieldname)=='prate_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgprec_cont) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - avgprec_cont(i,j) = arrayr42d(i,j) * (dtq2*0.001) - endif - enddo - enddo - endif - - ! precip rate in m per physics time step - if(trim(fieldname)=='tprcp') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,dtp,arrayr42d,prec) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - prec(i,j) = arrayr42d(i,j) * (dtq2*0.001) * 1000./dtp - endif - enddo - enddo - endif - - ! convective precip rate in m per physics time step - if(trim(fieldname)=='cnvprcp') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,dtp,arrayr42d,cprate) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - cprate(i,j) = max(0.,arrayr42d(i,j)) * (dtq2*0.001) * 1000./dtp - endif - enddo - enddo - endif - - ! inst snow water eqivalent - if(trim(fieldname)=='weasd') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sno,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - sno(i,j) = arrayr42d(i,j) - if (sm(i,j) == 1.0 .and. sice(i,j)==0.)sno(i,j) = spval - enddo - enddo - endif - - ! ave snow cover - if(trim(fieldname)=='snowc_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,snoavg,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - snoavg(i,j) = arrayr42d(i,j) - if (sm(i,j)==1.0 .and. sice(i,j)==0.) snoavg(i,j) = spval - if (snoavg(i,j) /= spval) snoavg(i,j) = snoavg(i,j)/100. - enddo - enddo - endif - - ! snow depth in mm - if(trim(fieldname)=='snod') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,si,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - si(i,j) = arrayr42d(i,j) - if (sm(i,j)==1.0 .and. sice(i,j)==0.) si(i,j)=spval - if (si(i,j) /= spval) si(i,j) = si(i,j) * 1000.0 - enddo - enddo - endif - - ! 2m potential T (computed later) - if(trim(fieldname)=='tmp2m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,tshltr,arrayr42d) - do j=jsta,jend - do i=ista, iend - tshltr(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! surface potential T - if(trim(fieldname)=='spfh2m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,qshltr,arrayr42d) - do j=jsta,jend - do i=ista, iend - qshltr(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! mid day avg albedo in fraction - if(trim(fieldname)=='albdo_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgalbedo,arrayr42d) - do j=jsta,jend - do i=ista, iend - avgalbedo(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - avgalbedo(i,j) = avgalbedo(i,j) * 0.01 - endif - enddo - enddo - endif - - ! time averaged column cloud fraction - if(trim(fieldname)=='tcdc_aveclm') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgtcdc,arrayr42d) - do j=jsta,jend - do i=ista, iend - avgtcdc(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - avgtcdc(i,j) = avgtcdc(i,j) * 0.01 - endif - enddo - enddo - endif - - ! maximum snow albedo in fraction - if(trim(fieldname)=='snoalb') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,mxsnal,arrayr42d) - do j=jsta,jend - do i=ista, iend - mxsnal(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - mxsnal(i,j) = mxsnal(i,j) * 0.01 - endif - enddo - enddo - endif - - ! land fraction - if(trim(fieldname)=='lfrac') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,landfrac,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - landfrac(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) landfrac(i,j) = spval - enddo - enddo - endif - - - ! ave high cloud fraction - if(trim(fieldname)=='tcdc_avehcl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgcfrach,arrayr42d) - do j=jsta,jend - do i=ista, iend - avgcfrach(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - avgcfrach(i,j) = avgcfrach(i,j) * 0.01 - endif - enddo - enddo - endif - - ! ave low cloud fraction - if(trim(fieldname)=='tcdc_avelcl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgcfracl,arrayr42d) - do j=jsta,jend - do i=ista, iend - avgcfracl(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - avgcfracl(i,j) = avgcfracl(i,j) * 0.01 - endif - enddo - enddo - endif - - ! ave middle cloud fraction - if(trim(fieldname)=='tcdc_avemcl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgcfracm,arrayr42d) - do j=jsta,jend - do i=ista, iend - avgcfracm(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - avgcfracm(i,j) = avgcfracm(i,j) * 0.01 - endif - enddo - enddo - endif - - ! inst convective cloud fraction - if(trim(fieldname)=='tcdccnvcl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,cnvcfr,arrayr42d) - do j=jsta,jend - do i=ista, iend - cnvcfr(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - cnvcfr(i,j) = cnvcfr(i,j) * 0.01 - endif - enddo - enddo - endif - - ! slope type - if(trim(fieldname)=='sltyp') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,islope) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) < spval) then - islope(i,j) = nint(arrayr42d(i,j)) - else - islope(i,j) = 0 - endif - enddo - enddo - endif - - ! time averaged column cloud fraction - if(trim(fieldname)=='cnwat') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,cmc,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - cmc(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) cmc(i,j) = cmc(i,j) * 0.001 - if (sm(i,j) /= 0.0) cmc(i,j) = spval - enddo - enddo - endif - - ! frozen precip fraction - if(trim(fieldname)=='cpofp') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,sr) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) /= spval) then - !set range within (0,1) - sr(i,j) = min(1.,max(0.,arrayr42d(i,j))) - else - sr(i,j) = spval - endif - enddo - enddo - endif - - ! sea ice skin temperature - if(trim(fieldname)=='tisfc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sice,arrayr42d,ti) - do j=jsta,jend - do i=ista,iend - if (arrayr42d(i,j) /= spval) then - ti(i,j) = arrayr42d(i,j) - if (sice(i,j) == spval .or. sice(i,j) == 0.) ti(i,j)=spval - else - ti(i,j) = spval - endif - enddo - enddo - endif - - ! vegetation fraction - if(trim(fieldname)=='veg') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,vegfrc,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - vegfrc(i,j) = arrayr42d(i,j) - if (arrayr42d(i,j) /= spval) then - vegfrc(i,j) = vegfrc(i,j) * 0.01 - else - vegfrc(i,j) = 0.0 - endif - if (sm(i,j) /= 0.0) vegfrc(i,j) = spval - enddo - enddo - endif - - ! liquid volumetric soil mpisture in fraction - if(trim(fieldname)=='soill1') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - sh2o(i,j,1) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) sh2o(i,j,1) = spval - enddo - enddo - endif - - ! liquid volumetric soil mpisture in fraction - if(trim(fieldname)=='soill2') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - sh2o(i,j,2) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) sh2o(i,j,2) = spval - enddo - enddo - endif - - ! liquid volumetric soil mpisture in fraction - if(trim(fieldname)=='soill3') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - sh2o(i,j,3) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) sh2o(i,j,3) = spval - enddo - enddo - endif - - ! liquid volumetric soil mpisture in fraction - if(trim(fieldname)=='soill4') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - sh2o(i,j,4) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) sh2o(i,j,4) = spval - enddo - enddo - endif - - ! volumetric soil moisture - if(trim(fieldname)=='soilw1') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - smc(i,j,1) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) smc(i,j,1) = spval - enddo - enddo - endif - - ! volumetric soil moisture - if(trim(fieldname)=='soilw2') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - smc(i,j,2) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) smc(i,j,2) = spval - enddo - enddo - endif - - ! volumetric soil moisture - if(trim(fieldname)=='soilw3') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - smc(i,j,3) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) smc(i,j,3) = spval - enddo - enddo - endif - - ! volumetric soil moisture - if(trim(fieldname)=='soilw4') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - smc(i,j,4) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) smc(i,j,4) = spval - enddo - enddo - endif - - ! soil temperature - if(trim(fieldname)=='soilt1') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - stc(i,j,1) = arrayr42d(i,j) - !mask open water areas, combine with sea ice tmp - if (sm(i,j) /= 0.0 .and. sice(i,j) ==0.) stc(i,j,1) = spval - enddo - enddo - endif - - ! soil temperature - if(trim(fieldname)=='soilt2') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - stc(i,j,2) = arrayr42d(i,j) - !mask open water areas, combine with sea ice tmp - if (sm(i,j) /= 0.0 .and. sice(i,j) ==0.) stc(i,j,2) = spval - enddo - enddo - endif - - ! soil temperature - if(trim(fieldname)=='soilt3') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - stc(i,j,3) = arrayr42d(i,j) - !mask open water areas, combine with sea ice tmp - if (sm(i,j) /= 0.0 .and. sice(i,j) ==0.) stc(i,j,3) = spval - enddo - enddo - endif - - ! soil temperature - if(trim(fieldname)=='soilt4') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - stc(i,j,4) = arrayr42d(i,j) - !mask open water areas, combine with sea ice tmp - if (sm(i,j) /= 0.0 .and. sice(i,j) ==0.) stc(i,j,4) = spval - enddo - enddo - endif - - ! time averaged incoming sfc longwave - if(trim(fieldname)=='dlwrf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwin,arrayr42d) - do j=jsta,jend - do i=ista, iend - alwin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! inst incoming sfc longwave - if(trim(fieldname)=='dlwrf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,rlwin,arrayr42d) - do j=jsta,jend - do i=ista, iend - rlwin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged outgoing sfc longwave, CLDRAD puts a minus sign - if(trim(fieldname)=='ulwrf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,alwout,arrayr42d) - do j=jsta,jend - do i=ista, iend - alwout(i,j) = arrayr42d(i,j) - if (alwout(i,j) /= spval) alwout(i,j) = -alwout(i,j) - enddo - enddo - endif - - ! inst outgoing sfc longwave - if(trim(fieldname)=='ulwrf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,radot,arrayr42d) - do j=jsta,jend - do i=ista, iend - radot(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged outgoing model top longwave - if(trim(fieldname)=='ulwrf_avetoa') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwtoa,arrayr42d) - do j=jsta,jend - do i=ista, iend - alwtoa(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged incoming sfc shortwave - if(trim(fieldname)=='dswrf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswin,arrayr42d) - do j=jsta,jend - do i=ista, iend - aswin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! inst incoming sfc shortwave - if(trim(fieldname)=='dswrf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,rswin,arrayr42d) - do j=jsta,jend - do i=ista, iend - rswin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged incoming sfc uv-b - if(trim(fieldname)=='duvb_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,auvbin,arrayr42d) - do j=jsta,jend - do i=ista, iend - auvbin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged incoming sfc clear sky uv-b - if(trim(fieldname)=='cduvb_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,auvbinc,arrayr42d) - do j=jsta,jend - do i=ista, iend - auvbinc(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged outgoing sfc shortwave,CLDRAD puts a minus sign - if(trim(fieldname)=='uswrf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,aswout,arrayr42d) - do j=jsta,jend - do i=ista, iend - aswout(i,j) = arrayr42d(i,j) - if (aswout(i,j) /= spval) aswout(i,j) = -aswout(i,j) - enddo - enddo - endif - - ! inst outgoing sfc shortwave - if(trim(fieldname)=='uswrf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,rswout,arrayr42d) - do j=jsta,jend - do i=ista, iend - rswout(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged model top incoming shortwave - if(trim(fieldname)=='dswrf_avetoa') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswintoa,arrayr42d) - do j=jsta,jend - do i=ista, iend - aswintoa(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! ime averaged model top outgoing shortwave - if(trim(fieldname)=='uswrf_avetoa') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswtoa,arrayr42d) - do j=jsta,jend - do i=ista, iend - aswtoa(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface sensible heat flux, multiplied by -1 because - ! wrf model fluxhas reversed sign convention using gfsio - if(trim(fieldname)=='shtfl_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sfcshx,arrayr42d) - do j=jsta,jend - do i=ista, iend - sfcshx(i,j) = arrayr42d(i,j) - if (sfcshx(i,j) /= spval) sfcshx(i,j) = -sfcshx(i,j) - enddo - enddo - endif - - ! inst surface sensible heat flux - if(trim(fieldname)=='shtfl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,twbs,arrayr42d) - do j=jsta,jend - do i=ista, iend - twbs(i,j) = arrayr42d(i,j) - if (twbs(i,j) /= spval) twbs(i,j) = -twbs(i,j) - enddo - enddo - endif - - ! time averaged surface latent heat flux, multiplied by -1 because - ! wrf model flux has reversed sign vonvention using gfsio - if(trim(fieldname)=='lhtfl_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sfclhx,arrayr42d) - do j=jsta,jend - do i=ista, iend - sfclhx(i,j) = arrayr42d(i,j) - if (sfclhx(i,j) /= spval) sfclhx(i,j) = -sfclhx(i,j) - enddo - enddo - endif - - ! inst surface latent heat flux - if(trim(fieldname)=='lhtfl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,qwbs,arrayr42d) - do j=jsta,jend - do i=ista, iend - qwbs(i,j) = arrayr42d(i,j) - if (qwbs(i,j) /= spval) qwbs(i,j) = -qwbs(i,j) - enddo - enddo - endif - - ! time averaged ground heat flux - if(trim(fieldname)=='gflux_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,subshx,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - subshx(i,j) = arrayr42d(i,j) - if (sm(i,j) == 1.0 .and. sice(i,j) ==0.) subshx(i,j) = spval - enddo - enddo - endif - - ! inst ground heat flux - if(trim(fieldname)=='gflux') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,grnflx,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - grnflx(i,j) = arrayr42d(i,j) - if (sm(i,j) == 1.0 .and. sice(i,j) ==0.) grnflx(i,j) = spval - enddo - enddo - endif - - ! time averaged zonal momentum flux - if(trim(fieldname)=='uflx_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,sfcux,arrayr42d) - do j=jsta,jend - do i=ista, iend - sfcux(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged meridional momentum flux - if(trim(fieldname)=='vflx_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,sfcvx,arrayr42d) - do j=jsta,jend - do i=ista, iend - sfcvx(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged zonal gravity wave stress - if(trim(fieldname)=='u-gwd_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,gtaux,arrayr42d) - do j=jsta,jend - do i=ista, iend - gtaux(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged meridional gravity wave stress - if(trim(fieldname)=='v-gwd_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,gtauy,arrayr42d) - do j=jsta,jend - do i=ista, iend - gtauy(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged accumulated potential evaporation - if(trim(fieldname)=='pevpr_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgpotevp,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - avgpotevp(i,j) = arrayr42d(i,j) - if (sm(i,j) == 1.0 .and. sice(i,j) ==0.) avgpotevp(i,j) = spval - enddo - enddo - endif - - ! inst potential evaporation - if(trim(fieldname)=='pevpr') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,potevp,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - potevp(i,j) = arrayr42d(i,j) - if (sm(i,j) == 1.0 .and. sice(i,j) ==0.) potevp(i,j) = spval - enddo - enddo - endif - - ! 10 m u - if(trim(fieldname)=='ugrd10m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,u10,arrayr42d,u10h) - do j=jsta,jend - do i=ista, iend - u10(i,j) = arrayr42d(i,j) - u10h(i,j) = u10(i,j) - enddo - enddo - endif - - ! 10 m v - if(trim(fieldname)=='vgrd10m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,v10,arrayr42d,v10h) - do j=jsta,jend - do i=ista, iend - v10(i,j) = arrayr42d(i,j) - v10h(i,j) = v10(i,j) - enddo - enddo - endif - - ! vegetation type - if(trim(fieldname)=='vtype') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,ivgtyp) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) < spval) then - ivgtyp(i,j) = nint(arrayr42d(i,j)) - else - ivgtyp(i,j) = 0 - endif - enddo - enddo - endif - - ! soil type - if(trim(fieldname)=='sotyp') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,isltyp) - do j=jsta,jend - do i=ista, iend - if (arrayr42d(i,j) < spval) then - isltyp(i,j) = nint(arrayr42d(i,j)) - else - isltyp(i,j) = 0 - endif - enddo - enddo - endif - - ! inst cloud top pressure - if(trim(fieldname)=='prescnvclt') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ptop,arrayr42d) - do j=jsta,jend - do i=ista, iend - ptop(i,j) = arrayr42d(i,j) - if(ptop(i,j) <= 0.0) ptop(i,j) = spval - enddo - enddo - endif - - ! inst cloud bottom pressure - if(trim(fieldname)=='prescnvclb') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pbot,arrayr42d) - do j=jsta,jend - do i=ista, iend - pbot(i,j) = arrayr42d(i,j) - if(pbot(i,j) <= 0.0) pbot(i,j) = spval - enddo - enddo - endif - - ! time averaged low cloud top pressure - if(trim(fieldname)=='pres_avelct') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ptopl,arrayr42d) - do j=jsta,jend - do i=ista, iend - ptopl(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged low cloud bottom pressure - if(trim(fieldname)=='pres_avelcb') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pbotl,arrayr42d) - do j=jsta,jend - do i=ista, iend - pbotl(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged low cloud top temperature - if(trim(fieldname)=='tmp_avelct') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ttopl,arrayr42d) - do j=jsta,jend - do i=ista, iend - ttopl(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged middle cloud top pressure - if(trim(fieldname)=='pres_avemct') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ptopm,arrayr42d) - do j=jsta,jend - do i=ista, iend - ptopm(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged middle cloud bottom pressure - if(trim(fieldname)=='pres_avemcb') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pbotm,arrayr42d) - do j=jsta,jend - do i=ista, iend - pbotm(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged middle cloud top temperature - if(trim(fieldname)=='tmp_avemct') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ttopm,arrayr42d) - do j=jsta,jend - do i=ista, iend - ttopm(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged high cloud top pressure - if(trim(fieldname)=='pres_avehct') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ptoph,arrayr42d) - do j=jsta,jend - do i=ista, iend - ptoph(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged high cloud bottom pressure - if(trim(fieldname)=='pres_avehcb') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pboth,arrayr42d) - do j=jsta,jend - do i=ista, iend - pboth(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged high cloud top temperature - if(trim(fieldname)=='tmp_avehct') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ttoph,arrayr42d) - do j=jsta,jend - do i=ista, iend - ttoph(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged boundary layer cloud cover - if(trim(fieldname)=='tcdc_avebndcl') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pblcfr,arrayr42d) - do j=jsta,jend - do i=ista, iend - pblcfr(i,j) = arrayr42d(i,j) - if (pblcfr(i,j) < spval) pblcfr(i,j) = pblcfr(i,j) * 0.01 - enddo - enddo - endif - - ! cloud work function - if(trim(fieldname)=='cwork_aveclm') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,cldwork,arrayr42d) - do j=jsta,jend - do i=ista, iend - cldwork(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! water runoff - if(trim(fieldname)=='watr_acc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,runoff,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - runoff(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) runoff(i,j) = spval - enddo - enddo - endif - - ! accumulated evaporation of intercepted water - if(trim(fieldname)=='ecan_acc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,tecan,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - tecan(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) tecan(i,j) = spval - enddo - enddo - endif - - ! accumulated plant transpiration - if(trim(fieldname)=='etran_acc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,tetran,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - tetran(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) tetran(i,j) = spval - enddo - enddo - endif - - ! accumulated soil surface evaporation - if(trim(fieldname)=='edir_acc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,tedir,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - tedir(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) tedir(i,j) = spval - enddo - enddo - endif - - ! total water storage in aquifer - if(trim(fieldname)=='wa_acc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,twa,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - twa(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) twa(i,j) = spval - enddo - enddo - endif - - ! shelter max temperature - if(trim(fieldname)=='tmax_max2m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,maxtshltr,arrayr42d) - do j=jsta,jend - do i=ista, iend - maxtshltr(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! shelter min temperature - if(trim(fieldname)=='tmin_min2m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,mintshltr,arrayr42d) - do j=jsta,jend - do i=ista, iend - mintshltr(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! ice thickness - if(trim(fieldname)=='icetk') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,dzice,arrayr42d) - do j=jsta,jend - do i=ista, iend - dzice(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! wilting point - if(trim(fieldname)=='wilt') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend, spval,smcwlt,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - smcwlt(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) smcwlt(i,j) = spval - enddo - enddo - endif - - ! sunshine duration - if(trim(fieldname)=='sunsd_acc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,suntime,arrayr42d) - do j=jsta,jend - do i=ista, iend - suntime(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! field capacity - if(trim(fieldname)=='fldcp') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,fieldcapa,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - fieldcapa(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) fieldcapa(i,j) = spval - enddo - enddo - endif - - ! time averaged surface visible beam downward solar flux - if(trim(fieldname)=='vbdsf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,avisbeamswin,arrayr42d) - do j=jsta,jend - do i=ista, iend - avisbeamswin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface visible diffuse downward solar flux - if(trim(fieldname)=='vddsf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,avisdiffswin,arrayr42d) - do j=jsta,jend - do i=ista, iend - avisdiffswin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface near IR beam downward solar flux - if(trim(fieldname)=='nbdsf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,airbeamswin,arrayr42d) - do j=jsta,jend - do i=ista, iend - airbeamswin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface near IR diffuse downward solar flux - if(trim(fieldname)=='nddsf_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,airdiffswin,arrayr42d) - do j=jsta,jend - do i=ista, iend - airdiffswin(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface clear sky outgoing LW - if(trim(fieldname)=='csulf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwoutc,arrayr42d) - do j=jsta,jend - do i=ista, iend - alwoutc(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged TOA clear sky outgoing LW - if(trim(fieldname)=='csulftoa') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwtoac,arrayr42d) - do j=jsta,jend - do i=ista, iend - alwtoac(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface clear sky outgoing SW - if(trim(fieldname)=='csusf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswoutc,arrayr42d) - do j=jsta,jend - do i=ista, iend - aswoutc(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged TOA clear sky outgoing SW - if(trim(fieldname)=='csusftoa') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswtoac,arrayr42d) - do j=jsta,jend - do i=ista, iend - aswtoac(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface clear sky incoming LW - if(trim(fieldname)=='csdlf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwinc,arrayr42d) - do j=jsta,jend - do i=ista, iend - alwinc(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! time averaged surface clear sky incoming SW - if(trim(fieldname)=='csdsf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswinc,arrayr42d) - do j=jsta,jend - do i=ista, iend - aswinc(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! shelter max specific humidity - if(trim(fieldname)=='spfhmax_max2m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,maxqshltr,arrayr42d) - do j=jsta,jend - do i=ista, iend - maxqshltr(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! shelter min temperature - if(trim(fieldname)=='spfhmin_min2m') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,minqshltr,arrayr42d) - do j=jsta,jend - do i=ista, iend - minqshltr(i,j) = arrayr42d(i,j) - enddo - enddo - endif - - ! storm runoffs - if(trim(fieldname)=='ssrun_acc') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ssroff,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - ssroff(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) ssroff(i,j) = spval - enddo - enddo - endif - - ! direct soil evaporation - if(trim(fieldname)=='evbs_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgedir,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - avgedir(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) avgedir(i,j) = spval - enddo - enddo - endif - - ! canopy water evap - if(trim(fieldname)=='evcw_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgecan,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - avgecan(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) avgecan(i,j) = spval - enddo - enddo - endif - - ! AVERAGED PRECIP ADVECTED HEAT FLUX - if(trim(fieldname)=='pah_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,paha,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - paha(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) paha(i,j) = spval - enddo - enddo - endif - - ! instantaneous PRECIP ADVECTED HEAT FLUX - if(trim(fieldname)=='pahi') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pahi,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - pahi(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) pahi(i,j) = spval - enddo - enddo - endif - - ! plant transpiration - if(trim(fieldname)=='trans_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgetrans,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - avgetrans(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) avgetrans(i,j) = spval - enddo - enddo - endif - - ! snow sublimation - if(trim(fieldname)=='sbsno_ave') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgesnow,arrayr42d,sm,sice) - do j=jsta,jend - do i=ista, iend - avgesnow(i,j) = arrayr42d(i,j) - if (sm(i,j)==1.0 .and. sice(i,j)==0.) avgesnow(i,j)=spval - enddo - enddo - endif - - ! total soil moisture - if(trim(fieldname)=='soilm') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smstot,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - smstot(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) smstot(i,j) = spval - enddo - enddo - endif - - ! snow phase change heat flux - if(trim(fieldname)=='snohf') then - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,snopcx,arrayr42d,sm) - do j=jsta,jend - do i=ista, iend - snopcx(i,j) = arrayr42d(i,j) - if (sm(i,j) /= 0.0) snopcx(i,j) = spval - enddo - enddo - endif - -! else if (fieldDimCount > gridDimCount) then - else if (fieldDimCount ==3) then - if (typekind == ESMF_TYPEKIND_R4) then - call ESMF_FieldGet(fcstField(n), localDe=0, farrayPtr=arrayr43d, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - else if (typekind == ESMF_TYPEKIND_R8) then - call ESMF_FieldGet(fcstField(n), localDe=0, farrayPtr=arrayr83d, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, file=__FILE__)) return ! bail out - allocate(arrayr43d(ista:iend,jsta:jend,kstart:kend)) - arrayr43d = 0. - do k=kstart,kend - !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,k,arrayr43d,arrayr83d) - do j=jsta,jend - do i=ista,iend - arrayr43d(i,j,k) = arrayr83d(i,j,k) - enddo - enddo - enddo - endif - - ! model level T - if(trim(fieldname)=='tmp') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,t,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - t(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - - !! sig4 - !$omp parallel do default(none) private(i,j,tlmh) shared(lm,jsta,jend,ista,iend,t,sigt4) - do j=jsta,jend - do i=ista, iend - tlmh = t(i,j,lm) * t(i,j,lm) - sigt4(i,j) = 5.67E-8 * tlmh * tlmh - enddo - enddo - endif - - ! model level spfh - if(trim(fieldname)=='spfh') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,q,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - q(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level u wind - if(trim(fieldname)=='ugrd') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,uh,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - uh(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level v wind - if(trim(fieldname)=='vgrd') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,vh,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - vh(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level pressure thinkness - if(trim(fieldname)=='dpres') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,dpres,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - dpres(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level gh thinkness, model output negative delz - if(trim(fieldname)=='delz') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,zint,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - zint(i,j,l)=-1.*arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level w - if(trim(fieldname)=='dzdt') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,wh,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - wh(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level ozone mixing ratio -#ifdef MULTI_GASES - if(trim(fieldname)=='spo3') then -#else - if(trim(fieldname)=='o3mr') then -#endif - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,o3,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - o3(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - -! for GFDL MP or Thompson MP - if (imp_physics == 11 .or. imp_physics == 8) then - ! model level cloud water mixing ratio - if(trim(fieldname)=='clwmr') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqw,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqw(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level ice mixing ratio - if(trim(fieldname)=='icmr') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqi,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqi(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level rain water mixing ratio - if(trim(fieldname)=='rwmr') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqr,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqr(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level snow mixing ratio - if(trim(fieldname)=='snmr') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqs,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqs(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level rain water mixing ratio - if(trim(fieldname)=='grle') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqg,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqg(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - if(imp_physics == 8) then - ! model level rain number - if(trim(fieldname)=='ncrain') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnr,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqnr(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level rain number - if(trim(fieldname)=='ncice') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqni,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqni(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level rain number - if(trim(fieldname)=='nwfa') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnwfa,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqnwfa(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level rain number - if(trim(fieldname)=='nifa') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnifa,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - qqnifa(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - endif !if(imp_physics == 8) then -!gfdlmp - endif - - ! model level cloud amount - if(trim(fieldname)=='cld_amt') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,cfr,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - cfr(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif - - ! model level ref3d - if(trim(fieldname)=='ref3D') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,ref_10cm,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - ref_10cm(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo -! print *,'in gfs_post, get ref_10cm=',maxval(ref_10cm), minval(ref_10cm) - endif - - ! model level ref3d - if(trim(fieldname)=='tke') then - !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,q2,arrayr43d) - do l=1,lm - do j=jsta,jend - do i=ista, iend - q2(i,j,l)=arrayr43d(i,j,l) - enddo - enddo - enddo - endif -!3d fields - endif - -! end loop ncount_field - enddo - - if ( index(trim(wrt_int_state%wrtFB_names(ibdl)),trim(filename_base(1))) > 0) & - setvar_atmfile = .true. - if ( index(trim(wrt_int_state%wrtFB_names(ibdl)),trim(filename_base(2))) > 0) & - setvar_sfcfile = .true. - deallocate(fcstField) - -! end file_loop_all - enddo file_loop_all - -! recompute full layer of zint -!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,lp1,spval,zint,fis) - do j=jsta,jend - do i=1,im - if (fis(i,j) /= spval) then - zint(i,j,lp1) = fis(i,j) - fis(i,j) = fis(i,j) * grav - endif - enddo - enddo - - do l=lm,1,-1 -!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,omga,wh,dpres,zint) - do j=jsta,jend - do i=1,im - omga(i,j,l) = (-1.) * wh(i,j,l) * dpres(i,j,l)/zint(i,j,l) - zint(i,j,l) = zint(i,j,l) + zint(i,j,l+1) - enddo - enddo - enddo - -! compute pint from top down -!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,ak5,pint) - do j=jsta,jend - do i=1,im - pint(i,j,1) = ak5(1) - end do - end do - - do l=2,lp1 -!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,pint,dpres) - do j=jsta,jend - do i=1,im - pint(i,j,l) = pint(i,j,l-1) + dpres(i,j,l-1) - enddo - enddo - end do - -!compute pmid from averaged two layer pint - do l=lm,1,-1 -!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,pmid,pint) - do j=jsta,jend - do i=1,im - pmid(i,j,l) = 0.5*(pint(i,j,l)+pint(i,j,l+1)) - enddo - enddo - enddo - -!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,spval,pt,pd,pint) - do j=jsta,jend - do i=1,im - pd(i,j) = spval - pint(i,j,1) = pt - end do - end do -! print *,'in setvar, pt=',pt,'ak5(lp1)=', ak5(lp1),'ak5(1)=',ak5(1) - -! compute alpint - do l=lp1,1,-1 -!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,alpint,pint) - do j=jsta,jend - do i=1,im - alpint(i,j,l)=log(pint(i,j,l)) - end do - end do - end do - -! compute zmid - do l=lm,1,-1 -!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,zmid,zint,pmid,alpint) - do j=jsta,jend - do i=1,im - zmid(i,j,l)=zint(i,j,l+1)+(zint(i,j,l)-zint(i,j,l+1))* & - (log(pmid(i,j,l))-alpint(i,j,l+1))/ & - (alpint(i,j,l)-alpint(i,j,l+1)) - end do - end do - end do -! print *,'in post_gfs,zmid=',maxval(zmid(1:im,jsta:jend,1)), & -! minval(zmid(1:im,jsta:jend,1)),maxloc(zmid(1:im,jsta:jend,1)), & -! 'zint=',maxval(zint(1:im,jsta:jend,2)),minval(zint(1:im,jsta:jend,1)), & -! 'pmid=',maxval(pmid(1:im,jsta:jend,1)),minval(pmid(1:im,jsta:jend,1)), & -! 'alpint=',maxval(alpint(1:im,jsta:jend,2)),minval(alpint(1:im,jsta:jend,2)) -! print *,'in post_gfs,alpint=',maxval(alpint(1:im,jsta:jend,1)), & -! minval(alpint(1:im,jsta:jend,1)) - -! surface potential T, and potential T at roughness length -!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,lp1,sm,ths,sst,thz0,pint) - do j=jsta,jend - do i=ista, iend - !assign sst - if (sm(i,j) /= 0.0 .and. ths(i,j) /= spval) then - sst(i,j) = ths(i,j) - else - sst(i,j) = spval - endif - if (ths(i,j) /= spval) then - ths(i,j) = ths(i,j)* (p1000/pint(i,j,lp1))**capa - thz0(i,j) = ths(i,j) - endif - enddo - enddo - -! compute cwm for gfdlmp or Thompson - if( imp_physics == 11 .or. imp_physics == 8) then - do l=1,lm -!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,ista,iend,cwm,qqg,qqs,qqr,qqi,qqw) - do j=jsta,jend - do i=ista,iend - cwm(i,j,l)=qqg(i,j,l)+qqs(i,j,l)+qqr(i,j,l)+qqi(i,j,l)+qqw(i,j,l) - enddo - enddo - enddo - endif - -! estimate 2m pres and convert t2m to theta -!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,lm,pshltr,pint,tshltr) - do j=jsta,jend - do i=ista, iend - pshltr(I,J)=pint(i,j,lm+1)*EXP(-0.068283/tshltr(i,j)) - tshltr(i,j)= tshltr(i,j)*(p1000/pshltr(I,J))**CAPA - enddo - enddo - -!htop - do j=jsta,jend - do i=1,im - htop(i,j) = spval - if(ptop(i,j) < spval)then - do l=1,lm - if(ptop(i,j) <= pmid(i,j,l))then - htop(i,j)=l - exit - end if - end do - end if - end do - end do - -! hbot - do j=jsta,jend - do i=1,im - hbot(i,j) = spval - if(pbot(i,j) < spval)then - do l=lm,1,-1 - if(pbot(i,j) >= pmid(i,j,l)) then - hbot(i,j) = l - exit - end if - end do - end if - end do - end do - -! generate look up table for lifted parcel calculations - thl = 210. - plq = 70000. - pt_tbl = 10000. ! this is for 100 hPa added by Moorthi - - call table(ptbl,ttbl,pt_tbl, & - rdq,rdth,rdp,rdthe,pl,thl,qs0,sqs,sthe,the0) - - call tableq(ttblq,rdpq,rdtheq,plq,thl,stheq,the0q) - - if(mype == 0)then - write(6,*)' SPL (POSTED PRESSURE LEVELS) BELOW: ' - write(6,51) (SPL(L),L=1,LSM) - 50 format(14(F4.1,1X)) - 51 format(8(F8.1,1X)) - endif -! -!$omp parallel do default(none) private(l) shared(lsm,alsl,spl) - do l = 1,lsm - alsl(l) = log(spl(l)) - end do -! -! print *,'in gfs_post, end ref_10cm=',maxval(ref_10cm), minval(ref_10cm) -!!! above is fv3 change -! -!more fields need to be computed -! - end subroutine set_postvars_gfs - - - end module post_gfs diff --git a/io/post_nems_routines.F90 b/io/post_nems_routines.F90 index 4d0792284..995349224 100644 --- a/io/post_nems_routines.F90 +++ b/io/post_nems_routines.F90 @@ -153,7 +153,7 @@ subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,nlunit,post_namelist) use ctlblk_mod, only : komax,fileNameD3D,lsm,lsmp1,spl,spldef, & lsmdef,ALSL,me,d3d_on,gocart_on,hyb_sigp,& pthresh,novegtype,ivegsrc,icu_physics, & - isf_surface_physics + isf_surface_physics,modelname,submodelname ! ! revision history: ! Jul 2019 Jun Wang: read post namelist @@ -167,6 +167,7 @@ subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,nlunit,post_namelist) real,dimension(komax) :: po,th,pv namelist/nampgb/kpo,po,kth,th,kpv,pv,popascal,d3d_on,gocart_on, & hyb_sigp + namelist/model_inputs/modelname,submodelname integer l,k,iret !--------------------------------------------------------------------- ! @@ -195,6 +196,7 @@ subroutine read_postnmlt(kpo,kth,kpv,po,th,pv,nlunit,post_namelist) ! read(nlunit) !skip outform ! read(nlunit,'(a19)') DateStr ! read(nlunit) !skil full modelname + read(nlunit,model_inputs,iostat=iret,end=119) read(nlunit,nampgb,iostat=iret,end=119) endif 119 continue diff --git a/module_fcst_grid_comp.F90 b/module_fcst_grid_comp.F90 index 7fe309d3f..886f23a23 100644 --- a/module_fcst_grid_comp.F90 +++ b/module_fcst_grid_comp.F90 @@ -17,6 +17,7 @@ module module_fcst_grid_comp ! use mpi use esmf + use nuopc use time_manager_mod, only: time_type, set_calendar_type, set_time, & set_date, month_name, & @@ -41,7 +42,7 @@ module module_fcst_grid_comp use fms_mod, only: error_mesg, fms_init, fms_end, & write_version_number, uppercase - use mpp_mod, only: mpp_init, mpp_pe, mpp_npes, mpp_root_pe, & + use mpp_mod, only: mpp_init, mpp_pe, mpp_npes, mpp_root_pe, mpp_set_current_pelist, & mpp_error, FATAL, WARNING, NOTE use mpp_mod, only: mpp_clock_id, mpp_clock_begin @@ -64,10 +65,16 @@ module module_fcst_grid_comp use module_fv3_io_def, only: num_pes_fcst, num_files, filename_base, & nbdlphys, iau_offset use module_fv3_config, only: dt_atmos, fcst_mpi_comm, fcst_ntasks, & - quilting, calendar, & + quilting, calendar, cpl_grid_id, & cplprint_flag, restart_endfcst use get_stochy_pattern_mod, only: write_stoch_restart_atm + use module_cplfields, only: nExportFields, exportFields, exportFieldsInfo, & + nImportFields, importFields, importFieldsInfo + use module_cplfields, only: realizeConnectedCplFields + + use atmos_model_mod, only: setup_exportdata + use CCPP_data, only: GFS_control ! !----------------------------------------------------------------------- ! @@ -82,11 +89,9 @@ module module_fcst_grid_comp type(atmos_data_type), save :: Atmos type(ESMF_GridComp),dimension(:),allocatable :: fcstGridComp - type(ESMF_Grid), dimension(:),allocatable :: fcstGrid integer :: ngrids, mygrid - integer,dimension(:),allocatable :: grid_number_on_all_pets(:) - integer :: num_atmos_calls, intrm_rst + integer :: intrm_rst, n_atmsteps !----- coupled model data ----- @@ -100,8 +105,7 @@ module module_fcst_grid_comp ! !----------------------------------------------------------------------- ! - public SetServices, fcstGrid, ngrids, mygrid, grid_number_on_all_pets - public numLevels, numSoilLayers, numTracers + public SetServices ! contains ! @@ -117,7 +121,13 @@ subroutine SetServices(fcst_comp, rc) rc = ESMF_SUCCESS call ESMF_GridCompSetEntryPoint(fcst_comp, ESMF_METHOD_INITIALIZE, & - userRoutine=fcst_initialize, rc=rc) + userRoutine=fcst_initialize, phase=1, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_GridCompSetEntryPoint(fcst_comp, ESMF_METHOD_INITIALIZE, & + userRoutine=fcst_advertise, phase=2, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_GridCompSetEntryPoint(fcst_comp, ESMF_METHOD_INITIALIZE, & + userRoutine=fcst_realize, phase=3, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! call ESMF_GridCompSetEntryPoint(fcst_comp, ESMF_METHOD_RUN, & @@ -151,6 +161,9 @@ subroutine SetServicesNest(nest, rc) integer,dimension(2,6):: decomptile !define delayout for the 6 cubed-sphere tiles integer,dimension(2) :: regdecomp !define delayout for the nest grid type(ESMF_Decomp_Flag):: decompflagPTile(2,6) + character(3) :: myGridStr + type(ESMF_DistGrid) :: distgrid + type(ESMF_Array) :: array rc = ESMF_SUCCESS @@ -160,6 +173,12 @@ subroutine SetServicesNest(nest, rc) call ESMF_GridCompSetEntryPoint(nest, ESMF_METHOD_INITIALIZE, userRoutine=init_phys_fb, phase=2, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_GridCompSetEntryPoint(nest, ESMF_METHOD_INITIALIZE, userRoutine=init_advertise, phase=3, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridCompSetEntryPoint(nest, ESMF_METHOD_INITIALIZE, userRoutine=init_realize, phase=4, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_GridCompGet(nest, name=name, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return @@ -203,6 +222,69 @@ subroutine SetServicesNest(nest, rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return endif + ! - Create coordinate arrays around allocations held within Atmos data structure and set in Grid + + call ESMF_GridGet(grid, staggerloc=ESMF_STAGGERLOC_CENTER, distgrid=distgrid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + array = ESMF_ArrayCreate(distgrid, farray=Atmos%lon, indexflag=ESMF_INDEX_DELOCAL, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridSetCoord(grid, coordDim=1, staggerLoc=ESMF_STAGGERLOC_CENTER, array=array, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + array = ESMF_ArrayCreate(distgrid, farray=Atmos%lat, indexflag=ESMF_INDEX_DELOCAL, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridSetCoord(grid, coordDim=2, staggerLoc=ESMF_STAGGERLOC_CENTER, array=array, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridGet(grid, staggerloc=ESMF_STAGGERLOC_CORNER, distgrid=distgrid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + array = ESMF_ArrayCreate(distgrid, farray=Atmos%lon_bnd, indexflag=ESMF_INDEX_DELOCAL, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridSetCoord(grid, coordDim=1, staggerLoc=ESMF_STAGGERLOC_CORNER, array=array, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + array = ESMF_ArrayCreate(distgrid, farray=Atmos%lat_bnd, indexflag=ESMF_INDEX_DELOCAL, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_GridSetCoord(grid, coordDim=2, staggerLoc=ESMF_STAGGERLOC_CORNER, array=array, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + !TODO: Consider aligning mask treatment with coordinates... especially if it requires updates for moving + call addLsmask2grid(grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! - Add Attributes used by output + + call ESMF_AttributeAdd(grid, convention="NetCDF", purpose="FV3", & + attrList=(/"ESMF:gridded_dim_labels"/), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_AttributeSet(grid, convention="NetCDF", purpose="FV3", & + name="ESMF:gridded_dim_labels", valueList=(/"grid_xt", "grid_yt"/), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + +!test to write out vtk file: +! if( cplprint_flag ) then +! call ESMF_GridWriteVTK(grid, staggerloc=ESMF_STAGGERLOC_CENTER, & +! filename='fv3cap_fv3Grid', rc=rc) +! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return +! endif +! +! Write grid to netcdf file + if( cplprint_flag ) then + write (myGridStr,"(I0)") mygrid + call wrt_fcst_grid(grid, "diagnostic_FV3_fcstGrid"//trim(mygridStr)//".nc", & + regridArea=.TRUE., rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + endif + + ! - Hold on to the grid by GridComp + call ESMF_GridCompSet(nest, grid=grid, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return @@ -306,6 +388,85 @@ end subroutine init_phys_fb !----------------------------------------------------------------------- !####################################################################### !----------------------------------------------------------------------- +! + subroutine init_advertise(nest, importState, exportState, clock, rc) +! + type(ESMF_GridComp) :: nest + type(ESMF_State) :: importState, exportState + type(ESMF_Clock) :: clock + integer,intent(out) :: rc +! +!*** local variables +! + integer :: i + + rc = ESMF_SUCCESS +! + ! importable fields: + do i = 1, size(importFieldsInfo) + call NUOPC_Advertise(importState, & + StandardName=trim(importFieldsInfo(i)%name), & + SharePolicyField='share', rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + end do + + ! exportable fields: + do i = 1, size(exportFieldsInfo) + call NUOPC_Advertise(exportState, & + StandardName=trim(exportFieldsInfo(i)%name), & + SharePolicyField='share', rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + end do + +! +!----------------------------------------------------------------------- +! + end subroutine init_advertise +! +!----------------------------------------------------------------------- +!####################################################################### +!----------------------------------------------------------------------- +! + subroutine init_realize(nest, importState, exportState, clock, rc) +! + type(ESMF_GridComp) :: nest + type(ESMF_State) :: importState, exportState + type(ESMF_Clock) :: clock + integer,intent(out) :: rc +! +!*** local variables +! + type(ESMF_Grid) :: grid + + rc = ESMF_SUCCESS +! + ! access this domain grid + call ESMF_GridCompGet(nest, grid=grid, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! -- realize connected fields in exportState + call realizeConnectedCplFields(exportState, grid, & + numLevels, numSoilLayers, numTracers, & + exportFieldsInfo, 'FV3 Export', exportFields, 0.0_ESMF_KIND_R8, rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! -- initialize export fields if applicable + call setup_exportdata(rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! -- realize connected fields in importState + call realizeConnectedCplFields(importState, grid, & + numLevels, numSoilLayers, numTracers, & + importFieldsInfo, 'FV3 Import', importFields, 9.99e20_ESMF_KIND_R8, rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return +! +!----------------------------------------------------------------------- +! + end subroutine init_realize +! +!----------------------------------------------------------------------- +!####################################################################### +!----------------------------------------------------------------------- ! subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) ! @@ -324,13 +485,10 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) ! type(ESMF_VM) :: VM type(ESMF_Time) :: CurrTime, StartTime, StopTime - type(ESMF_TimeInterval) :: RunDuration type(ESMF_Config) :: cf - integer :: Run_length integer,dimension(6) :: date, date_end ! - character(len=9) :: month integer :: initClock, unit, total_inttime integer :: mype character(4) dateSY @@ -348,7 +506,6 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) type(ESMF_DELayout) :: delayout type(ESMF_DistGrid) :: distgrid - real(ESMF_KIND_R8),dimension(:,:), pointer :: glatPtr, glonPtr integer :: jsc, jec, isc, iec, nlev type(domain2D) :: domain integer :: n, fcstNpes, tmpvar, k @@ -356,7 +513,6 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) integer, allocatable, dimension(:) :: isl, iel, jsl, jel integer, allocatable, dimension(:,:,:) :: deBlockList integer, allocatable, dimension(:) :: petListNest - integer :: tlb(2), tub(2) integer :: globalTileLayout(2) integer :: nestRootPet, peListSize(1) @@ -377,6 +533,8 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) type(time_type) :: iautime integer :: io_unit, calendar_type_res, date_res(6), date_init_res(6) + integer,allocatable :: grid_number_on_all_pets(:) + logical,allocatable :: is_moving_on_all_pets(:), is_moving(:) ! !----------------------------------------------------------------------- !*********************************************************************** @@ -523,19 +681,11 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) endif ! fexist endif ! mype == 0 - RunDuration = StopTime - CurrTime - - CALL ESMF_TimeIntervalGet(RunDuration, S=Run_length, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! call diag_manager_init (TIME_INIT=date) call diag_manager_set_time_end(Time_end) ! Time_step = set_time (dt_atmos,0) - num_atmos_calls = Run_length / dt_atmos - if (mype == 0) write(*,*)'num_atmos_calls=',num_atmos_calls,'time_init=', & - date_init,'time=',date,'time_end=',date_end,'dt_atmos=',dt_atmos, & - 'Run_length=',Run_length + if (mype == 0) write(*,*)'time_init=', date_init,'time=',date,'time_end=',date_end,'dt_atmos=',dt_atmos ! set up forecast time array that controls when to write out restart files frestart = 0 @@ -588,22 +738,19 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) ! if to write out restart at the end of forecast restart_endfcst = .false. if ( ANY(frestart(:) == total_inttime) ) restart_endfcst = .true. +! frestart only contains intermediate restart + do i=1,size(frestart) + if(frestart(i) == total_inttime) then + frestart(i) = 0 + exit + endif + enddo if (mype == 0) print *,'frestart=',frestart(1:10)/3600, 'restart_endfcst=',restart_endfcst, & 'total_inttime=',total_inttime ! if there is restart writing during integration intrm_rst = 0 if (frestart(1)>0) intrm_rst = 1 -! -!----- write time stamps (for start time and end time) ------ - call mpp_open( unit, 'time_stamp.out', nohdrs=.TRUE. ) - month = month_name(date(2)) - if ( mpp_pe() == mpp_root_pe() ) write (unit,20) date, month(1:3) - month = month_name(date_end(2)) - if ( mpp_pe() == mpp_root_pe() ) write (unit,20) date_end, month(1:3) - call mpp_close (unit) - 20 format (6i4,2x,a3) -! !------ initialize component models ------ call atmos_model_init (Atmos, Time_init, Time, Time_step) @@ -634,12 +781,24 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) ngrids = Atmos%ngrids mygrid = Atmos%mygrid - allocate(grid_number_on_all_pets(fcst_ntasks)) + allocate(grid_number_on_all_pets(fcst_ntasks), is_moving_on_all_pets(fcst_ntasks)) call mpi_allgather(mygrid, 1, MPI_INTEGER, & grid_number_on_all_pets, 1, MPI_INTEGER, & fcst_mpi_comm, rc) + call mpi_allgather(Atmos%is_moving_nest, 1, MPI_LOGICAL, & + is_moving_on_all_pets, 1, MPI_LOGICAL, & + fcst_mpi_comm, rc) + allocate(is_moving(ngrids)) + do n=1, fcst_ntasks + is_moving(grid_number_on_all_pets(n)) = is_moving_on_all_pets(n) + enddo + deallocate(grid_number_on_all_pets, is_moving_on_all_pets) - allocate (fcstGrid(ngrids),fcstGridComp(ngrids)) + call ESMF_InfoGetFromHost(exportState, info=info, rc=rc); ESMF_ERR_ABORT(rc) + call ESMF_InfoSet(info, key="is_moving", values=is_moving, rc=rc); ESMF_ERR_ABORT(rc) + deallocate(is_moving) + + allocate (fcstGridComp(ngrids)) do n=1,ngrids pelist => null() @@ -689,62 +848,10 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return - deallocate(petListNest) end if - - if (ESMF_GridCompIsPetLocal(fcstGridComp(n), rc=rc)) then - call ESMF_GridCompGet(fcstGridComp(n), grid=fcstGrid(n), rc=rc); ESMF_ERR_ABORT(rc) - - call ESMF_GridAddCoord(fcstGrid(n), staggerLoc=ESMF_STAGGERLOC_CENTER, rc=rc); ESMF_ERR_ABORT(rc) - call ESMF_GridAddCoord(fcstGrid(n), staggerLoc=ESMF_STAGGERLOC_CORNER, rc=rc); ESMF_ERR_ABORT(rc) - - ! define "center" coordinate values - call ESMF_GridGetCoord(fcstGrid(n), coordDim=1, staggerLoc=ESMF_STAGGERLOC_CENTER, & - totalLBound=tlb, totalUBound=tub, & - farrayPtr=glonPtr, rc=rc); ESMF_ERR_ABORT(rc) - glonPtr(tlb(1):tub(1),tlb(2):tub(2)) = Atmos%lon(tlb(1):tub(1),tlb(2):tub(2)) - - call ESMF_GridGetCoord(fcstGrid(n), coordDim=2, staggerLoc=ESMF_STAGGERLOC_CENTER, & - totalLBound=tlb, totalUBound=tub, & - farrayPtr=glatPtr, rc=rc); ESMF_ERR_ABORT(rc) - glatPtr(tlb(1):tub(1),tlb(2):tub(2)) = Atmos%lat(tlb(1):tub(1),tlb(2):tub(2)) - - ! define "corner" coordinate values - call ESMF_GridGetCoord(fcstGrid(n), coordDim=1, staggerLoc=ESMF_STAGGERLOC_CORNER, & - totalLBound=tlb, totalUBound=tub, & - farrayPtr=glonPtr, rc=rc); ESMF_ERR_ABORT(rc) - glonPtr(tlb(1):tub(1),tlb(2):tub(2)) = Atmos%lon_bnd(tlb(1):tub(1),tlb(2):tub(2)) - - call ESMF_GridGetCoord(fcstGrid(n), coordDim=2, staggerLoc=ESMF_STAGGERLOC_CORNER, & - totalLBound=tlb, totalUBound=tub, & - farrayPtr=glatPtr, rc=rc); ESMF_ERR_ABORT(rc) - glatPtr(tlb(1):tub(1),tlb(2):tub(2)) = Atmos%lat_bnd(tlb(1):tub(1),tlb(2):tub(2)) - end if ! IsPetLocal - end do -! - !! FIXME - if ( .not. Atmos%nested ) then !! global only - call addLsmask2grid(fcstGrid(mygrid), rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! print *,'call addLsmask2grid after fcstGrid, rc=',rc - endif - -!test to write out vtk file: -! if( cplprint_flag ) then -! call ESMF_GridWriteVTK(fcstGrid, staggerloc=ESMF_STAGGERLOC_CENTER, & -! filename='fv3cap_fv3Grid', rc=rc) -! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! endif -! -! Write grid to netcdf file - if( cplprint_flag ) then - call wrt_fcst_grid(fcstGrid(mygrid), "diagnostic_FV3_fcstGrid.nc", & - regridArea=.TRUE., rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - endif ! Add gridfile Attribute to the exportState call ESMF_AttributeAdd(exportState, convention="NetCDF", purpose="FV3", & @@ -773,21 +880,6 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) name="top_parent_is_global", value=top_parent_is_global, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! Add dimension Attributes to Grid - do n=1,ngrids - if (ESMF_GridCompIsPetLocal(fcstGridComp(n), rc=rc)) then - - call ESMF_AttributeAdd(fcstGrid(n), convention="NetCDF", purpose="FV3", & - attrList=(/"ESMF:gridded_dim_labels"/), rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - call ESMF_AttributeSet(fcstGrid(n), convention="NetCDF", purpose="FV3", & - name="ESMF:gridded_dim_labels", valueList=(/"grid_xt", "grid_yt"/), rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - endif - end do - ! Add time Attribute to the exportState call ESMF_AttributeAdd(exportState, convention="NetCDF", purpose="FV3", & attrList=(/ "time ", & @@ -832,7 +924,26 @@ subroutine fcst_initialize(fcst_comp, importState, exportState, clock, rc) call ESMF_AttributeSet(exportState, convention="NetCDF", purpose="FV3", & name="time:calendar", value=uppercase(trim(calendar)), rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! + +! Add time_iso Attribute to the exportState + call ESMF_AttributeAdd(exportState, convention="NetCDF", purpose="FV3", & + attrList=(/ "time_iso ", & + "time_iso:long_name ", & + "time_iso:description " /), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_AttributeSet(exportState, convention="NetCDF", purpose="FV3", & + name="time_iso", value="yyyy-mm-ddThh:mm:ssZ", rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_AttributeSet(exportState, convention="NetCDF", purpose="FV3", & + name="time_iso:description", value="ISO 8601 Date String", rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_AttributeSet(exportState, convention="NetCDF", purpose="FV3", & + name="time_iso:long_name", value="valid time", rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + ! Create FieldBundle for Fields that need to be regridded bilinear if( quilting ) then @@ -932,6 +1043,91 @@ end subroutine fcst_initialize !----------------------------------------------------------------------- !####################################################################### !----------------------------------------------------------------------- +! + subroutine fcst_advertise(fcst_comp, importState, exportState, clock, rc) +! +!----------------------------------------------------------------------- +!*** INITIALIZE THE FORECAST GRIDDED COMPONENT. +!----------------------------------------------------------------------- +! + type(esmf_GridComp) :: fcst_comp + type(ESMF_State) :: importState, exportState + type(esmf_Clock) :: clock + integer,intent(out) :: rc +! +!*** local variables + type(ESMF_VM) :: vm + integer :: mype + integer :: n + integer :: urc + +! +!----------------------------------------------------------------------- +!*********************************************************************** +!----------------------------------------------------------------------- +! + call ESMF_VMGetCurrent(vm=vm,rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_VMGet(vm=vm, localPet=mype, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (mype == 0) write(*,*)'fcst_advertise, cpl_grid_id=',cpl_grid_id + + call ESMF_GridCompInitialize(fcstGridComp(cpl_grid_id), importState=importState, & + exportState=exportState, phase=3, userrc=urc, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return +! +!----------------------------------------------------------------------- +! + end subroutine fcst_advertise +! +!----------------------------------------------------------------------- +!####################################################################### +!----------------------------------------------------------------------- +! + subroutine fcst_realize(fcst_comp, importState, exportState, clock, rc) +! +!----------------------------------------------------------------------- +!*** INITIALIZE THE FORECAST GRIDDED COMPONENT. +!----------------------------------------------------------------------- +! + type(esmf_GridComp) :: fcst_comp + type(ESMF_State) :: importState, exportState + type(esmf_Clock) :: clock + integer,intent(out) :: rc +! +!*** local variables + type(ESMF_VM) :: vm + integer :: mype + integer :: n + integer :: urc + +! +!----------------------------------------------------------------------- +!*********************************************************************** +!----------------------------------------------------------------------- +! + call ESMF_VMGetCurrent(vm=vm,rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + call ESMF_VMGet(vm=vm, localPet=mype, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (mype == 0) write(*,*)'fcst_realize, cpl_grid_id=',cpl_grid_id + + call ESMF_GridCompInitialize(fcstGridComp(cpl_grid_id), importState=importState, & + exportState=exportState, phase=4, userrc=urc, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__, rcToReturn=rc)) return +! +! +!----------------------------------------------------------------------- +! + end subroutine fcst_realize +! +!----------------------------------------------------------------------- +!####################################################################### +!----------------------------------------------------------------------- ! subroutine fcst_run_phase_1(fcst_comp, importState, exportState,clock,rc) ! @@ -946,8 +1142,7 @@ subroutine fcst_run_phase_1(fcst_comp, importState, exportState,clock,rc) ! !*** local variables ! - integer :: mype, na - integer(kind=ESMF_KIND_I8) :: ntimestep_esmf + integer :: mype, seconds real(kind=8) :: mpi_wtime, tbeg1 ! !----------------------------------------------------------------------- @@ -961,11 +1156,9 @@ subroutine fcst_run_phase_1(fcst_comp, importState, exportState,clock,rc) ! call ESMF_GridCompGet(fcst_comp, localpet=mype, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return -! - call ESMF_ClockGet(clock, advanceCount=NTIMESTEP_ESMF, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - na = NTIMESTEP_ESMF + call get_time(Atmos%Time - Atmos%Time_init, seconds) + n_atmsteps = seconds/dt_atmos ! !----------------------------------------------------------------------- ! *** call fcst integration subroutines @@ -977,7 +1170,8 @@ subroutine fcst_run_phase_1(fcst_comp, importState, exportState,clock,rc) call atmos_model_exchange_phase_1 (Atmos, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - if (mype == 0) write(*,*)"PASS: fcstRUN phase 1, na = ",na, ' time is ', mpi_wtime()-tbeg1 + if (mype == 0) write(*,'(A,I16,A,F16.6)')'PASS: fcstRUN phase 1, n_atmsteps = ', & + n_atmsteps,' time is ',mpi_wtime()-tbeg1 ! !----------------------------------------------------------------------- ! @@ -1000,8 +1194,7 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc) ! !*** local variables ! - integer :: mype, na, date(6), seconds - integer(kind=ESMF_KIND_I8) :: ntimestep_esmf + integer :: mype, date(6), seconds character(len=64) :: timestamp integer :: unit real(kind=8) :: mpi_wtime, tbeg1 @@ -1017,11 +1210,6 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc) ! call ESMF_GridCompGet(fcst_comp, localpet=mype, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - call ESMF_ClockGet(clock, advanceCount=NTIMESTEP_ESMF, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - - na = NTIMESTEP_ESMF ! !----------------------------------------------------------------------- ! *** call fcst integration subroutines @@ -1034,35 +1222,34 @@ subroutine fcst_run_phase_2(fcst_comp, importState, exportState,clock,rc) !--- intermediate restart if (intrm_rst>0) then - if (na /= num_atmos_calls-1) then - call get_time(Atmos%Time - Atmos%Time_init, seconds) - if (ANY(frestart(:) == seconds)) then - if (mype == 0) write(*,*)'write out restart at na=',na,' seconds=',seconds, & - 'integration lenght=',na*dt_atmos/3600. - - timestamp = date_to_string (Atmos%Time) - call atmos_model_restart(Atmos, timestamp) - call write_stoch_restart_atm('RESTART/'//trim(timestamp)//'.atm_stoch.res.nc') - - !----- write restart file ------ - if (mpp_pe() == mpp_root_pe())then - call get_date (Atmos%Time, date(1), date(2), date(3), & - date(4), date(5), date(6)) - call mpp_open( unit, 'RESTART/'//trim(timestamp)//'.coupler.res', nohdrs=.TRUE. ) - write( unit, '(i6,8x,a)' )calendar_type, & - '(Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)' - - write( unit, '(6i6,8x,a)' )date_init, & - 'Model start time: year, month, day, hour, minute, second' - write( unit, '(6i6,8x,a)' )date, & - 'Current model time: year, month, day, hour, minute, second' - call mpp_close(unit) - endif + call get_time(Atmos%Time - Atmos%Time_init, seconds) + if (ANY(frestart(:) == seconds)) then + if (mype == 0) write(*,*)'write out restart at n_atmsteps=',n_atmsteps,' seconds=',seconds, & + 'integration length=',n_atmsteps*dt_atmos/3600. + + timestamp = date_to_string (Atmos%Time) + call atmos_model_restart(Atmos, timestamp) + call write_stoch_restart_atm('RESTART/'//trim(timestamp)//'.atm_stoch.res.nc') + + !----- write restart file ------ + if (mpp_pe() == mpp_root_pe())then + call get_date (Atmos%Time, date(1), date(2), date(3), & + date(4), date(5), date(6)) + call mpp_open( unit, 'RESTART/'//trim(timestamp)//'.coupler.res', nohdrs=.TRUE. ) + write( unit, '(i6,8x,a)' )calendar_type, & + '(Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)' + + write( unit, '(6i6,8x,a)' )date_init, & + 'Model start time: year, month, day, hour, minute, second' + write( unit, '(6i6,8x,a)' )date, & + 'Current model time: year, month, day, hour, minute, second' + call mpp_close(unit) endif endif endif - if (mype == 0) write(*,*)"PASS: fcstRUN phase 2, na = ",na, ' time is ', mpi_wtime()-tbeg1 + if (mype == 0) write(*,'(A,I16,A,F16.6)')'PASS: fcstRUN phase 2, n_atmsteps = ', & + n_atmsteps,' time is ',mpi_wtime()-tbeg1 ! !----------------------------------------------------------------------- ! @@ -1106,8 +1293,9 @@ subroutine fcst_finalize(fcst_comp, importState, exportState,clock,rc) if( restart_endfcst ) then call get_date (Atmos%Time, date(1), date(2), date(3), & date(4), date(5), date(6)) - call mpp_open( unit, 'RESTART/coupler.res', nohdrs=.TRUE. ) + call mpp_set_current_pelist() if (mpp_pe() == mpp_root_pe())then + call mpp_open( unit, 'RESTART/coupler.res', nohdrs=.TRUE. ) write( unit, '(i6,8x,a)' )calendar_type, & '(Calendar: no_calendar=0, thirty_day_months=1, julian=2, gregorian=3, noleap=4)' @@ -1115,8 +1303,8 @@ subroutine fcst_finalize(fcst_comp, importState, exportState,clock,rc) 'Model start time: year, month, day, hour, minute, second' write( unit, '(6i6,8x,a)' )date, & 'Current model time: year, month, day, hour, minute, second' + call mpp_close(unit) endif - call mpp_close(unit) endif call diag_manager_end (Atmos%Time) diff --git a/module_fv3_config.F90 b/module_fv3_config.F90 index 64522ec8e..bb3546772 100644 --- a/module_fv3_config.F90 +++ b/module_fv3_config.F90 @@ -17,6 +17,7 @@ module module_fv3_config integer :: first_kdt integer :: fcst_mpi_comm, fcst_ntasks ! + integer :: cpl_grid_id logical :: cplprint_flag logical :: quilting, output_1st_tstep_rst logical :: restart_endfcst diff --git a/stochastic_physics/stochastic_physics_wrapper.F90 b/stochastic_physics/stochastic_physics_wrapper.F90 index ae67c0daf..e630fcdd3 100644 --- a/stochastic_physics/stochastic_physics_wrapper.F90 +++ b/stochastic_physics/stochastic_physics_wrapper.F90 @@ -23,18 +23,15 @@ module stochastic_physics_wrapper_mod real(kind=kind_phys), dimension(:,:), allocatable, save :: vfrac !albedo real(kind=kind_phys), dimension(:,:), allocatable, save :: snoalb - real(kind=kind_phys), dimension(:,:), allocatable, save :: alvsf real(kind=kind_phys), dimension(:,:), allocatable, save :: alnsf - real(kind=kind_phys), dimension(:,:), allocatable, save :: alvwf real(kind=kind_phys), dimension(:,:), allocatable, save :: alnwf - real(kind=kind_phys), dimension(:,:), allocatable, save :: facsf - real(kind=kind_phys), dimension(:,:), allocatable, save :: facwf !emissivity real(kind=kind_phys), dimension(:,:), allocatable, save :: semis !roughness length for land real(kind=kind_phys), dimension(:,:), allocatable, save :: zorll - real(kind=kind_phys), dimension(:,:), allocatable, save :: stype + !real(kind=kind_phys), dimension(:,:), allocatable, save :: stype + integer, dimension(:,:), allocatable, save :: stype ! For cellular automata real(kind=kind_phys), dimension(:,:), allocatable, save :: sst @@ -79,7 +76,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr) type(block_control_type), intent(inout) :: Atm_block integer, intent(out) :: ierr - integer :: nthreads, nb, levs, maxblk, nblks, n + integer :: nthreads, nb, levs, maxblk, nblks, n, v logical :: param_update_flag #ifdef _OPENMP @@ -109,7 +106,7 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr) GFS_Control%input_nml_file, GFS_Control%fn_nml, GFS_Control%nlunit, xlon, xlat, GFS_Control%do_sppt, GFS_Control%do_shum, & GFS_Control%do_skeb, GFS_Control%lndp_type, GFS_Control%n_var_lndp, GFS_Control%use_zmtnblck, GFS_Control%skeb_npass, & GFS_Control%lndp_var_list, GFS_Control%lndp_prt_list, & - GFS_Control%n_var_spp, GFS_Control%spp_var_list, GFS_Control%spp_prt_list, GFS_Control%do_spp, & + GFS_Control%n_var_spp, GFS_Control%spp_var_list, GFS_Control%spp_prt_list, GFS_Control%spp_stddev_cutoff, GFS_Control%do_spp, & GFS_Control%ak, GFS_Control%bk, nthreads, GFS_Control%master, GFS_Control%communicator, ierr) if (ierr/=0) then write(6,*) 'call to init_stochastic_physics failed' @@ -143,29 +140,34 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr) end select end do end if - if ( GFS_Control%lndp_type == 2 ) then ! this scheme updates through forecast - allocate(sfc_wts(1:nblks,maxblk,1:GFS_Control%n_var_lndp)) - end if - if (GFS_Control%lndp_type == 2) then ! save wts, and apply lndp scheme - if (GFS_Control%lsm == GFS_Control%lsm_noah) then + if ( GFS_Control%lndp_type == 2 ) then + allocate(sfc_wts(1:nblks,maxblk,1:GFS_Control%n_var_lndp)) + if ( (GFS_Control%lsm == GFS_Control%lsm_noah) .or. (GFS_Control%lsm == GFS_Control%lsm_noahmp)) then lsoil = GFS_Control%lsoil elseif (GFS_Control%lsm == GFS_Control%lsm_ruc) then lsoil = GFS_Control%lsoil_lsm endif allocate(smc (1:nblks, maxblk, lsoil)) - allocate(slc (1:nblks, maxblk, lsoil)) - allocate(stc (1:nblks, maxblk, lsoil)) - allocate(stype (1:nblks, maxblk)) - allocate(vfrac (1:nblks, maxblk)) - allocate(snoalb(1:nblks, maxblk)) - allocate(alvsf (1:nblks, maxblk)) - allocate(alnsf (1:nblks, maxblk)) - allocate(alvwf (1:nblks, maxblk)) - allocate(alnwf (1:nblks, maxblk)) - allocate(facsf (1:nblks, maxblk)) - allocate(facwf (1:nblks, maxblk)) - allocate(semis (1:nblks, maxblk)) - allocate(zorll (1:nblks, maxblk)) + do v = 1,GFS_Control%n_var_lndp + select case (trim(GFS_Control%lndp_var_list(v))) + case('smc') + allocate(slc (1:nblks, maxblk, lsoil)) + allocate(stype (1:nblks, maxblk)) + case('stc') + allocate(stc (1:nblks, maxblk, lsoil)) + case('vgf') + allocate(vfrac (1:nblks, maxblk)) + case('alb') + allocate(alnsf (1:nblks, maxblk)) + allocate(alnwf (1:nblks, maxblk)) + case('sal') + allocate(snoalb(1:nblks, maxblk)) + case('emi') + allocate(semis (1:nblks, maxblk)) + case('zol') + allocate(zorll (1:nblks, maxblk)) + endselect + enddo endif @@ -255,53 +257,76 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr) end select end do end if + if (GFS_Control%lndp_type == 2) then ! save wts, and apply lndp scheme do nb=1,nblks GFS_Data(nb)%Coupling%sfc_wts(:,:) = sfc_wts(nb,1:GFS_Control%blksz(nb),:) end do - + do nb=1,nblks - stype(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%stype(:) - vfrac(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%vfrac(:) - snoalb(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%snoalb(:) - alvsf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%alvsf(:) - alnsf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%alnsf(:) - alvwf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%alvwf(:) - alnwf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%alnwf(:) - facsf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%facsf(:) - facwf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%facwf(:) - semis(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Radtend%semis(:) - zorll(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%zorll(:) - end do + do v = 1,GFS_Control%n_var_lndp + ! used to identify locations with land model (=soil) + if ((GFS_Control%lsm == GFS_Control%lsm_ruc) ) then + smc(nb,1:GFS_Control%blksz(nb),1:lsoil) = GFS_Data(nb)%Sfcprop%smois(1:GFS_Control%blksz(nb),1:lsoil) + else ! noah or noah-MP + smc(nb,1:GFS_Control%blksz(nb),1:lsoil) = GFS_Data(nb)%Sfcprop%smc(1:GFS_Control%blksz(nb),1:lsoil) + endif + + select case (trim(GFS_Control%lndp_var_list(v))) + case('smc') + ! stype used to fetch soil params + stype(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%stype(1:GFS_Control%blksz(nb)) + if ((GFS_Control%lsm == GFS_Control%lsm_ruc) ) then + slc(nb,1:GFS_Control%blksz(nb),1:lsoil) = GFS_Data(nb)%Sfcprop%sh2o(1:GFS_Control%blksz(nb),1:lsoil) + else ! noah or noah-MP + slc(nb,1:GFS_Control%blksz(nb),1:lsoil) = GFS_Data(nb)%Sfcprop%slc(1:GFS_Control%blksz(nb),1:lsoil) + endif + case('stc') + if ((GFS_Control%lsm == GFS_Control%lsm_ruc) ) then + stc(nb,1:GFS_Control%blksz(nb),1:lsoil) = GFS_Data(nb)%Sfcprop%tslb(1:GFS_Control%blksz(nb),1:lsoil) + else ! noah or noah-MP + stc(nb,1:GFS_Control%blksz(nb),1:lsoil) = GFS_Data(nb)%Sfcprop%stc(1:GFS_Control%blksz(nb),1:lsoil) + endif + case('vgf') + if ( (GFS_Control%lsm == GFS_Control%lsm_noahmp) ) then + ! assumes iopt_dveg = 4 (will be checked later) + vfrac(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%shdmax(1:GFS_Control%blksz(nb)) + else ! ruc or noah-MP + vfrac(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%vfrac(1:GFS_Control%blksz(nb)) + endif + case('alb') + alnsf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%alnsf(1:GFS_Control%blksz(nb)) + alnwf(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%alnwf(1:GFS_Control%blksz(nb)) + case('sal') + snoalb(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%snoalb(1:GFS_Control%blksz(nb)) + case('emi') + semis(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Radtend%semis(1:GFS_Control%blksz(nb)) + case('zol') + zorll(nb,1:GFS_Control%blksz(nb)) = GFS_Data(nb)%Sfcprop%zorll(1:GFS_Control%blksz(nb)) + endselect + enddo + enddo - if (GFS_Control%lsm == GFS_Control%lsm_noah) then - do nb=1,nblks - smc(nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Sfcprop%smc(:,:) - slc(nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Sfcprop%slc(:,:) - stc(nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Sfcprop%stc(:,:) - end do - elseif (GFS_Control%lsm == GFS_Control%lsm_ruc) then - do nb=1,nblks - smc(nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Sfcprop%smois(:,:) - slc(nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Sfcprop%sh2o(:,:) - stc(nb,1:GFS_Control%blksz(nb),:) = GFS_Data(nb)%Sfcprop%tslb(:,:) - end do - endif + param_update_flag = .false. + ! noah and noah-MP treated differently, as global cycle doesn't overwrite shdmax for Noah-MP ! determine whether land paramaters have been over-written to ! trigger applying perturbations (logic copied from GFS_driver), - ! or if perturbations should be applied at every time step - if (mod(GFS_Control%kdt,GFS_Control%nscyc) == 1 ) then - param_update_flag = .true. - else - param_update_flag = .false. + if ( (GFS_Control%lsm == GFS_Control%lsm_noah) .and. GFS_Control%nscyc > 0) then + if (mod(GFS_Control%kdt,GFS_Control%nscyc) == 1 ) then + param_update_flag = .true. + endif endif - - call lndp_apply_perts(GFS_Control%blksz, GFS_Control%lsm, GFS_Control%lsm_noah, GFS_Control%lsm_ruc, lsoil, & - GFS_Control%dtp, GFS_Control%kdt, GFS_Control%lndp_each_step, & + if ( ( GFS_Control%nscyc == 0 .or. GFS_Control%lsm == GFS_Control%lsm_noahmp) .and. GFS_Control%first_time_step ) then + ! call once at start of the forecast. + param_update_flag = .true. + endif + + call lndp_apply_perts(GFS_Control%blksz, GFS_Control%lsm, GFS_Control%lsm_noah, GFS_Control%lsm_ruc, & + GFS_Control%lsm_noahmp, GFS_Control%iopt_dveg, lsoil, GFS_Control%dtp, GFS_Control%kdt, & GFS_Control%n_var_lndp, GFS_Control%lndp_var_list, GFS_Control%lndp_prt_list, & sfc_wts, xlon, xlat, stype, GFS_Control%pores, GFS_Control%resid,param_update_flag, & - smc, slc, stc, vfrac, alvsf, alnsf, alvwf, alnwf, facsf, facwf, snoalb, semis, zorll, ierr) + smc, slc, stc, vfrac, alnsf, alnwf, snoalb, semis, zorll, ierr) if (ierr/=0) then write(6,*) 'call to GFS_apply_lndp failed' @@ -309,34 +334,43 @@ subroutine stochastic_physics_wrapper (GFS_Control, GFS_Data, Atm_block, ierr) endif do nb=1,nblks - GFS_Data(nb)%Sfcprop%vfrac(:) = vfrac(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%snoalb(:) = snoalb(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%alvsf(:) = alvsf(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%alnsf(:) = alnsf(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%alvwf(:) = alvwf(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%alnwf(:) = alnwf(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%facsf(:) = facsf(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%facwf(:) = facwf(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Radtend%semis(:) = semis(nb,1:GFS_Control%blksz(nb)) - GFS_Data(nb)%Sfcprop%zorll(:) = zorll(nb,1:GFS_Control%blksz(nb)) - enddo - - if (GFS_Control%lsm == GFS_Control%lsm_noah) then - do nb=1,nblks - GFS_Data(nb)%Sfcprop%smc(:,:) = smc(nb,1:GFS_Control%blksz(nb),:) - GFS_Data(nb)%Sfcprop%slc(:,:) = slc(nb,1:GFS_Control%blksz(nb),:) - GFS_Data(nb)%Sfcprop%stc(:,:) = stc(nb,1:GFS_Control%blksz(nb),:) - enddo - elseif (GFS_Control%lsm == GFS_Control%lsm_ruc) then - do nb=1,nblks - GFS_Data(nb)%Sfcprop%smois(:,:) = smc(nb,1:GFS_Control%blksz(nb),:) - GFS_Data(nb)%Sfcprop%sh2o(:,:) = slc(nb,1:GFS_Control%blksz(nb),:) - GFS_Data(nb)%Sfcprop%tslb(:,:) = stc(nb,1:GFS_Control%blksz(nb),:) - enddo - endif - + do v = 1,GFS_Control%n_var_lndp + + select case (trim(GFS_Control%lndp_var_list(v))) + case('smc') + if ((GFS_Control%lsm == GFS_Control%lsm_ruc) ) then + GFS_Data(nb)%Sfcprop%smois(1:GFS_Control%blksz(nb),1:lsoil) = smc(nb,1:GFS_Control%blksz(nb),1:lsoil) + GFS_Data(nb)%Sfcprop%sh2o(1:GFS_Control%blksz(nb),1:lsoil) = slc(nb,1:GFS_Control%blksz(nb),1:lsoil) + else ! noah or noah-MP + GFS_Data(nb)%Sfcprop%smc(1:GFS_Control%blksz(nb),1:lsoil) = smc(nb,1:GFS_Control%blksz(nb),1:lsoil) + GFS_Data(nb)%Sfcprop%slc(1:GFS_Control%blksz(nb),1:lsoil) = slc(nb,1:GFS_Control%blksz(nb),1:lsoil) + endif + case('stc') + if ((GFS_Control%lsm == GFS_Control%lsm_ruc) ) then + GFS_Data(nb)%Sfcprop%tslb(1:GFS_Control%blksz(nb),1:lsoil) = stc(nb,1:GFS_Control%blksz(nb),1:lsoil) + else ! noah or noah-MP + GFS_Data(nb)%Sfcprop%stc(1:GFS_Control%blksz(nb),1:lsoil) = stc(nb,1:GFS_Control%blksz(nb),1:lsoil) + endif + case('vgf') + if ( (GFS_Control%lsm == GFS_Control%lsm_noahmp) ) then + GFS_Data(nb)%Sfcprop%shdmax(1:GFS_Control%blksz(nb)) = vfrac(nb,1:GFS_Control%blksz(nb)) + else + GFS_Data(nb)%Sfcprop%vfrac(1:GFS_Control%blksz(nb)) = vfrac(nb,1:GFS_Control%blksz(nb)) + endif + case('alb') + GFS_Data(nb)%Sfcprop%alnsf(1:GFS_Control%blksz(nb)) = alnsf(nb,1:GFS_Control%blksz(nb)) + GFS_Data(nb)%Sfcprop%alnwf(1:GFS_Control%blksz(nb)) = alnwf(nb,1:GFS_Control%blksz(nb)) + case('sal') + GFS_Data(nb)%Sfcprop%snoalb(1:GFS_Control%blksz(nb)) = snoalb(nb,1:GFS_Control%blksz(nb)) + case('emi') + GFS_Data(nb)%Radtend%semis(1:GFS_Control%blksz(nb)) = semis(nb,1:GFS_Control%blksz(nb)) + case('zol') + GFS_Data(nb)%Sfcprop%zorll(1:GFS_Control%blksz(nb)) = zorll(nb,1:GFS_Control%blksz(nb)) + end select + enddo + enddo endif ! lndp block - end if + endif ! if do* block if (GFS_Control%do_ca) then @@ -409,42 +443,40 @@ subroutine stochastic_physics_wrapper_end (GFS_Control) if (GFS_Control%do_spp) then if (allocated(spp_wts)) deallocate(spp_wts) end if - if ( GFS_Control%lndp_type == 2 ) then ! this scheme updates through forecast + if ( GFS_Control%lndp_type == 2 ) then lsoil = -999 if (allocated(sfc_wts)) deallocate(sfc_wts) end if - if (GFS_Control%lndp_type == 2) then ! save wts, and apply lndp scheme + if (GFS_Control%lndp_type == 2) then if (allocated(smc)) deallocate(smc) if (allocated(slc)) deallocate(slc) if (allocated(stc)) deallocate(stc) if (allocated(stype)) deallocate(stype) if (allocated(vfrac)) deallocate(vfrac) if (allocated(snoalb)) deallocate(snoalb) - if (allocated(alvsf)) deallocate(alvsf) if (allocated(alnsf)) deallocate(alnsf) - if (allocated(alvwf)) deallocate(alvwf) if (allocated(alnwf)) deallocate(alnwf) - if (allocated(facsf)) deallocate(facsf) - if (allocated(facwf)) deallocate(facwf) if (allocated(semis)) deallocate(semis) if (allocated(zorll)) deallocate(zorll) endif call finalize_stochastic_physics() endif - if(GFS_Control%ca_sgs)then - deallocate(sst ) - deallocate(lmsk ) - deallocate(lake ) - deallocate(condition ) - deallocate(ca_deep_cpl ) - deallocate(ca_turb_cpl ) - deallocate(ca_shal_cpl ) - endif - if(GFS_Control%ca_global)then - deallocate(ca1_cpl ) - deallocate(ca2_cpl ) - deallocate(ca3_cpl ) - endif + if(GFS_Control%do_ca)then + if(GFS_Control%ca_sgs)then + deallocate(sst ) + deallocate(lmsk ) + deallocate(lake ) + deallocate(condition ) + deallocate(ca_deep_cpl ) + deallocate(ca_turb_cpl ) + deallocate(ca_shal_cpl ) + endif + if(GFS_Control%ca_global)then + deallocate(ca1_cpl ) + deallocate(ca2_cpl ) + deallocate(ca3_cpl ) + endif + endif end subroutine stochastic_physics_wrapper_end end module stochastic_physics_wrapper_mod diff --git a/upp b/upp index 0dc3c0c1d..dc8bc684a 160000 --- a/upp +++ b/upp @@ -1 +1 @@ -Subproject commit 0dc3c0c1dbdcdc5025dff0c6b06b16aa2a7ddda9 +Subproject commit dc8bc684a3e38eae5ff4431e24672b6382127d70