Template Fortran routines for the initialization and the simple-physics forcing
We have provided a set of stand-alone Fortran routines that compute the initial conditions for all test cases (please click on "Attachments" below). They are named
- dcmip_initial_conditions_test_1_2_3_v5.f90 (note this is version 5 (7/21/2012), please disregard earlier versions)
- v2: bug fixes in the tracer initialization for height-based models
- v3: test 3-1: the density is now initialized with the unperturbed background temperature (not the perturbed temperature)
- v3: constants converted to double precision
- v4: modified tracers in test 1-1, now with cutoff altitudes. Outside of the vertical domain all tracers are set to 0
- v4: modified cos-term in vertical velocity (now cos(2 pi t/tau)) in test 1-1, now completing one full up and down cycle
- v4: added subroutine test1_advection_orography for test 1-3
- v4: added subroutine test2_steady_state_mountain for test 2-0
- v4: modified parameter list for tests 2-1 and 2-2 (routine test2_schaer_mountain): addition of parameters hybrid_eta, hyam, hybm
if the logical flag hybrid_eta is true then the pressure in pressure-based model with hybrid sigma-p (eta) coordinates is computed internally. In that case the hybrid coefficients hyam and hybm need to be supplied via the parameter list, otherwise they are not used.
- v5: test 1-1: modiﬁed vertical velocity and zonal velocity. The vertical velocity has a new tapering function, and an adjustment is added to the zonal velocity to fulﬁll the continuity equation. This ensures that the advection process written in the advective or conservative form is equivalent.
- v5: no cutoff altitude for the tracers in test 1-1 (reverses a change from version v4)
- v5: test 1-2: modiﬁed meridional wind and vertical velocity equation with a new amplitude w0 and positions z1 and z2 that determine the initial location of the tracer.
- dcmip_initial_conditions_test_4_v3.f90 (note this is version 3 from 7/20/2012, please disregard earlier versions)
- v2: correction of a typo (removal of 1/a) in the dthetadphi equation
- v2: initialization of tracer q2 with the absolute value of Ertel Potential Vorticity (EPV)
- v3: newly added if-construct in Fortran routine prevents division by zero in the relative vorticity (zeta) calculation in case the perturbation center point, its antipode, or the north or south poles are part of the computational grid
- dcmip_initial_conditions_test_5_v1.f90 (version 1)
Their inline documentation makes these routines self-explanatory. The input parameter list needs to be supplied with the position of a single grid point. The routines can either be included into the GCM source code or be used to compute an initial data ﬁle. Some output parameters might not be needed, depending on the model design.
In addition, we have provided a template Fortran routine
- simple_physics_v5.f90 (note this is version 5, please disregard earlier versions)
- v2: removal of some NCAR CAM-specific 'use' associations
- v3: corrected precl(i) computation, the precipitation rate is now computed via a vertical integral, the previous single-level computation in v2 was a bug
- v3: corrected dtdt(i,1) computation, the term '-(i,1)' was missing the temperature variable: '-t(i,1)'
- v4: modified and enhanced parameter list to make the routine truly standalone, the number of columns and vertical levels have been added: pcols, pver
- v4: 'ncol' has been removed, 'pcols' is used instead
- v5: the sea surface temperature (SST) field Tsurf is now an array, the SST now depends on the latitude
- v5: addition of the latitude array 'lat' and the flag 'test' in the parameter list
if test = 0: constant SST is used, correct setting for the tropical cyclone test case 5-1
if test = 1: newly added latitude-dependent SST is used, correct setting for the moist baroclinic wave test with simple-physics (test 4-3)
The simple-physics routine implements the suggested simpliﬁed physical forcing mechanisms  in the recommended order (1) large-scale condensation, (2) surface ﬂuxes, and (3) boundary-layer mixing. These processes are coupled in a time-split manner so that each mechanism already updates the state variables that are used for the next parameterization step. The template routine has been developed for NCAR’s Community Atmosphere Model (CAM). It therefore needs to be tailored to match model-speciﬁc requirements such as the choice of the prognostic variables. The template routine assumes that the state variables u, v, T , p and q are co-located at full model levels. In addition, it assumes that the level indices follow a top-down approach with level index 1 located at the topmost level. If the vertical ordering of the levels is reversed, with level index 1 denoting the lowermost level, adjustments of the template routine are needed. In addition, all partial height derivatives have been expressed as pressure derivatives with the help of the hydrostatic equation as CAM is a pressure-based model. This could potentially be changed for models with height-based vertical coordinates.
Last Update: Aug. 3, 2012, 2:33 p.m. by Jillian Wallis