Contact: B. Wyman Reviewers: Change history: WebCVS Log for bgrid_horiz_diff.f90
B-grid dynamical core module that performs linear horizontal mixing.
This module has the following features: - horizontal mixing of temperature, prognostic tracers, and momentum - horizontal mixing achieved using 5-pt Shapiro filter, higher-order mixing achieved by re-applying lower-order results - full control of coefficients and accuracy through namelist input and tracer manager (field table)
bgrid_horiz_mod bgrid_masks_mod bgrid_prog_var_mod bgrid_halo_mod bgrid_change_grid_mod fms_mod constants_mod field_manager_mod tracer_manager_mod
use bgrid_horiz_diff_mod [ ,only: horiz_diff_init, horiz_diff ] horiz_diff_init Mandatory initialization routine for bgrid_horiz_diff_mod. Initializes horizontal damping control parameters. horiz_diff Updates prognostic variable tendencies with horizontal damping tendencies. Other user interface options: 1) A namelist interface called bgrid_horiz_diff_nml is read from file input.nml. 2) Parameters for individual tracers may be set in the tracer "field_table".
call horiz_diff_init ( Hgrid ) DESCRIPTION Initializes the horizontal damping module. This routine reads the bgrid_horiz_diff_nml namelist, queries the tracer manager for damping scheme options, and then defines damping control parameters (stored internally). This routine must be called before calling subroutine horiz_diff. INPUT Hgrid Data structure containing horizontal grid constants. [horiz_grid_type]
call horiz_diff ( Hgrid, Masks, nplev, dt, dpde, pres, Var, Var_dt ) DESCRIPTION This routine computes horizontal damping tendencies using the prognostic variables at the next time level. The routine returns updated prognostic variable tendencies, while leaving the prognostic variables unmodified. The initialization routine must be called first. INPUT Masks grid masking constants [grid_mask_type] nplev number of "pure" pressure levels at the top of the model [integer] dt adjustment time step [real] dpde current pressure thickness of model layers [real, dimension(Hgrid%ilb:,Hgrid%jlb:,:)] pres pressure at model levels (i.e., mean of model layers) [real, dimension(Hgrid%ilb:,Hgrid%jlb:,:)] Var prognostic variables at the end of the last dynamics time step [prog_var_type] INPUT/OUTPUT Hgrid horizontal grid constants [horiz_grid_type] Var_dt prognostic variable tendencies, accumulated since the variables were updated in Var [prog_var_type] NOTES The damping is applied to "current" prognostic fields that have been updated with their time tendencies. For example, temp(current) = Var % t + dt * Var_dt % t.
&bgrid_horiz_diff_nml damp_scheme_wind The horizontal damping scheme. damp_scheme_temp Determines how horizontal damping coefficients vary with latitude. Possible values are: damp_scheme__ = 0 -- No damping = 1 -- Coefficients are isotropic and uniform with latitude = 2 -- Coefficients are isotropic and increase poleward of "reflat" as a function of deq**2/d**2, where deq and d are the diagonal grid distances at the equator and in the current grid box. Equatorward of "reflat" coefficients are the same as scheme 1. = 3 -- Coefficients are isotropic and increase poleward of "reflat" as a function of dxeq**2/dx**2, where dxeq and dx are the x-axis grid distances at the equator and in the current grid box. Equatorward of "reflat" coefficients are the same as scheme 1. = 4 -- Coefficients are non-isotropic, x-axis coefficients use scheme 2, and y-axis coefficients use scheme 1. = 5 -- Coefficients are non-isotropic, x-axis coefficients use scheme 3, and y-axis coefficients use scheme 1. NOTES: Schemes 2-5 provide increased damping in higher latitudes. For the non-isotropic schemes (4 & 5), the x-axis coefficients are never less than the y-axis coefficients. Momentum is controlled using "damp_scheme_wind". Temperature and tracers are controlled using "damp_scheme_temp". [integer, default: damp_scheme___ = 1] reflat Latitude cutoff (in degrees) at which increased damping in high latitudes is applied. Equatorward of this latitude uniform damping (scheme=1) is applied, while poleward of this latitude enhanced damping (scheme 2-5) is applied. This variable is only used when damp_scheme_wind > 1 or damp_scheme_temp > 1. [real, default: reflat = 85.] damp_order_wind Damping order for momentum, temperature, and the default for damp_order_temp all prognostic tracers. Only positive, even numbers are allowed. damp_order_tracer Very little testing has been done with other than fourth order. [integer, default: damp_order___ = 4] damp_coeff_wind Damping coefficients for momentum, temperature, and the default damp_coeff_temp for all prognostic tracers. Coefficients are normalized by their damp_coeff_tracer maximum value, and must be in the range: 0 <= coeff <= 1. [real, default: damp_coeff___ = 0.35] slope_corr_wind The topographic slope correction coefficients for momentum, slope_corr_temp temperature, and the default for all prognostic tracers. slope_corr_tracer Values must be in the range: 0.0 (no correction) to 1.0 (full correction). The array of size 4 corresponds to coefficients for model levels (/ 1:nlev-3, nlev-2, nlev-1, nlev /). [real, dimension(4), default: slope_corr___ = (/0,0,0,0/)]
Methods:
Schemes:
Parameters:
Examples:
'diff_horiz', 'linear', 'coeff=.20,order=2,slope=1.,1.,1.,0.5' 'diff_horiz', 'none', 'coeff=0.'
FATAL errors in bgrid_horiz_diff_mod input array has the wrong dimensions. The horizontal dimensions of input data does not agree with the horizontal indexing in the "Hgrid" data structure. invalid damping scheme The namelist value must be in the range: 0 <= damp_scheme <= 5. invalid damping method, ..... You have specified an invalid "diff_horiz" method in the field_table. The valid methods are: "LINEAR" or "NONE". invalid damping order The damping order must be a positive, even number (0,2,4,....). Check your input values in the namelist and field_table. invalid damping coeff Damping coefficients must be in the range: 0. <= coeff <= 1. Check your input values in the namelist and field_table. invalid slope correction coeff Slope correction coefficients must be in the range: 0. <= coeff <= 1. Check your input values in the namelist and field_table.
* The second-order damping operator is positive-definite. * A damping order > 2 is not positive-definite and may produce small negative values with sharp gradients.
None.