!***********************************************************************
!* GNU Lesser General Public License
!*
!* This file is part of the FV3 dynamical core.
!*
!* The FV3 dynamical core is free software: you can redistribute it
!* and/or modify it under the terms of the
!* GNU Lesser General Public License as published by the
!* Free Software Foundation, either version 3 of the License, or
!* (at your option) any later version.
!*
!* The FV3 dynamical core is distributed in the hope that it will be
!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!* See the GNU General Public License for more details.
!*
!* You should have received a copy of the GNU Lesser General Public
!* License along with the FV3 dynamical core.
!* If not, see .
!***********************************************************************
module test_cases_mod
!
!
! Module Name |
! Functions Included |
!
!
! constants_mod |
! cnst_radius=>radius, pi=>pi_8, omega, grav, kappa, rdgas, cp_air, rvgas |
!
!
! diag_manager_mod |
! diag_axis_init, register_diag_field,
! register_static_field, send_data, diag_grid_init |
!
!
! field_manager_mod |
! MODEL_ATMOS |
!
!
! fv_arrays_mod |
! fv_grid_type, fv_flags_type, fv_grid_bounds_type, R_GRID |
!
!
! fv_diagnostics_mod |
! prt_maxmin, ppme, eqv_pot, qcly0 |
!
!
! fv_grid_tools_mod |
! todeg, missing, spherical_to_cartesian |
!
!
! fv_eta_mod |
! compute_dz_L32, compute_dz_L101, set_hybrid_z,
! gw_1d,hybrid_z_dz |
!
!
! fv_mp_mod |
! ng, is_master,is,js,ie,je, isd,jsd,ied,jed,
! domain_decomp, fill_corners, XDir, YDir, mp_stop,
! mp_reduce_sum, mp_reduce_max, mp_gather, mp_bcst |
!
!
! fv_sg_mod |
! qsmith |
!
!
! fv_surf_map_mod |
! surfdrv |
!
!
! init_hydro_mod |
! p_var, hydro_eq |
!
!
! mpp_mod |
! mpp_error, FATAL, mpp_root_pe, mpp_broadcast, mpp_sum,
! mpp_pe, mpp_chksum, stdout |
!
!
! mpp_domains_mod |
! mpp_update_domains, domain2d |
!
>
!
! mpp_parameter_mod |
! AGRID_PARAM=>AGRID,CGRID_NE_PARAM=>CGRID_NE,SCALAR_PAIR |
!
!
! time_manager_mod |
! time_type, get_date, get_time |
!
!
! tracer_manager_mod |
! get_tracer_index |
!
!
#ifdef OVERLOAD_R4
use constantsR4_mod, only: cnst_radius=>radius, pi=>pi_8, omega, grav, kappa, rdgas, cp_air, rvgas
#else
use constants_mod, only: cnst_radius=>radius, pi=>pi_8, omega, grav, kappa, rdgas, cp_air, rvgas
#endif
use init_hydro_mod, only: p_var, hydro_eq
use fv_mp_mod, only: is_master, &
domain_decomp, fill_corners, XDir, YDir, &
mp_stop, mp_reduce_sum, mp_reduce_max, mp_gather, mp_bcst
use fv_grid_utils_mod, only: cubed_to_latlon, great_circle_dist, mid_pt_sphere, &
ptop_min, inner_prod, get_latlon_vector, get_unit_vect2, &
g_sum, latlon2xyz, cart_to_latlon, make_eta_level, f_p, project_sphere_v
use fv_surf_map_mod, only: surfdrv
use fv_grid_tools_mod, only: todeg, missing, spherical_to_cartesian
use fv_eta_mod, only: compute_dz_L32, compute_dz_L101, set_hybrid_z, gw_1d, &
hybrid_z_dz
use mpp_mod, only: mpp_error, FATAL, mpp_root_pe, mpp_broadcast, mpp_sum
use mpp_mod, only: stdlog, input_nml_file
use fms_mod, only: check_nml_error, close_file, open_namelist_file
use mpp_domains_mod, only: mpp_update_domains, domain2d
use mpp_parameter_mod, only: AGRID_PARAM=>AGRID,CGRID_NE_PARAM=>CGRID_NE, &
SCALAR_PAIR
use fv_sg_mod, only: qsmith
use fv_diagnostics_mod, only: prt_maxmin, ppme, eqv_pot, qcly0
!!! DEBUG CODE
use mpp_mod, only: mpp_pe, mpp_chksum, stdout
!!! END DEBUG CODE
use fv_arrays_mod, only: fv_grid_type, fv_flags_type, fv_grid_bounds_type, R_GRID
use tracer_manager_mod, only: get_tracer_index
use field_manager_mod, only: MODEL_ATMOS
implicit none
private
!!! A NOTE ON TEST CASES
!!! If you have a DRY test case with no physics, be sure to set adiabatic = .TRUE. in your runscript.
!!!! This is especially important for nonhydrostatic cases in which delz will be initialized with the
!!!! virtual temperature effect.
! Test Case Number (cubed-sphere domain)
! -1 = Divergence conservation test
! 0 = Idealized non-linear deformational flow
! 1 = Cosine Bell advection
! 2 = Zonal geostrophically balanced flow
! 3 = non-rotating potential flow
! 4 = Tropical cyclones (merger of Rankine vortices)
! 5 = Zonal geostrophically balanced flow over an isolated mountain
! 6 = Rossby Wave number 4
! 7 = Barotropic instability
! ! 8 = Potential flow (as in 5 but no rotation and initially at rest)
! 8 = "Soliton" propagation twin-vortex along equator
! 9 = Polar vortex
! 10 = hydrostatically balanced 3D test with idealized mountain
! 11 = Use this for cold starting the climate model with USGS terrain
! 12 = Jablonowski & Williamson Baroclinic test case (Steady State)
! 13 = Jablonowski & Williamson Baroclinic test case Perturbation
! -13 = DCMIP 2016 J&W BC Wave, with perturbation
! 14 = Use this for cold starting the Aqua-planet model
! 15 = Small Earth density current
! 16 = 3D hydrostatic non-rotating Gravity waves
! 17 = 3D hydrostatic rotating Inertial Gravity waves (case 6-3-0)
! 18 = 3D mountain-induced Rossby wave
! 19 = As in 15 but without rotation
! 20 = 3D non-hydrostatic lee vortices; non-rotating (small planet)
! 21 = 3D non-hydrostatic lee vortices; rotating (small planet)
! 30 = Super-Cell storm, curved hodograph, centered at OKC, no rotation
! 31 = Super-Cell storm, curved hodograph, centered at OKC, with rotation
! 32 = Super-Cell storm, straight hodograph, centered at OKC, no rotation
! 33 = HIWPP Schar mountain waves, Ridge mountain (M1)
! 34 = HIWPP Schar mountain waves, Circular mountain (M2)
! 35 = HIWPP Schar mountain waves, Circular mountain with shear (M3)
! 36 = HIWPP Super_Cell; no perturbation
! 37 = HIWPP Super_Cell; with the prescribed thermal
! 44 = Lock-exchange on the sphere; atm at rest with no mountain
! 45 = New test
! 51 = 3D tracer advection (deformational nondivergent flow)
! 55 = TC
! -55 = DCMIP 2016 TC test
! 101 = 3D non-hydrostatic Large-Eddy-Simulation (LES) with hybrid_z IC
integer :: sphum, theta_d
real(kind=R_GRID), parameter :: radius = cnst_radius
real(kind=R_GRID), parameter :: one = 1.d0
integer :: test_case = 11
logical :: bubble_do = .false.
real :: alpha = 0.0
integer :: Nsolitons = 1
real :: soliton_size = 750.e3, soliton_Umax = 50.
! Case 0 parameters
real :: p0_c0 = 3.0
real :: rgamma = 5.0
real :: lat0 = pi/2.0 !< pi/4.8
real :: lon0 = 0.0 !