source: lmdz_wrf/trunk/WRFV3/dyn_em/README.tenddec

Last change on this file was 1, checked in by lfita, 10 years ago
  • -- --- Opening of the WRF+LMDZ coupling repository --- -- -

WRF: version v3.3
LMDZ: version v1818

More details in:

File size: 3.0 KB
Line 
12010 12 21, JM
2
3Description of code in solve_em.F that allows computation of decoupled
4horizontal and vertical advective tendencies.  This is a feature that
5was added John Wong and the WRF_CHEM developers and involves threading
6additional arrays through the RK advection routines.  The developers
7also worked with the WRF Dynamics Working Group to add placeholders
8so that this capability could be used to compute decoupled horizontal
9and vertical advective tendencies for fields in other 4D tracer arrays
10(e.g. moist, scalar, etc.).  However, these are only placeholders for
11the other tracer arrays and users wishing to make this modification to
12solve_em should read this file carefully.  THIS IS AN ADVANCED TOPIC.
13
14The logical variable tenddec defined at the top of the solve_em routine
15is set within each loops over tracers for the 4D tracer arrays in WRF.
16The variable is passed into the RK advection routines and controls whether
17or not those routines do the necessary extra computations and store or
18accumulate the results into the 3D arrays h_tendency and z_tendency, also
19defined at the top of solve_em. Currently, and with the exception of the
20loops over chemical species, tenddec is always set to false.  The chemical
21loops and the statement to declare h_tendency and z_tendency as fully
223D are guarded by #ifdef WRF_CHEM.  Otherwise, h_tendency and z_tendency
23are allocated only minimal storage to save memory.  As long as tenddec is
24false, the RK routines will not attempt to access or modify these arrays.
25
26To enable computational of decoupled horizontal and vertical advective
27tendencies for other 4D tracer arrays, first modify the declaration
28of h_tendency and z_tendency so they are fully dimensioned (as they are
29with WRF_CHEM).  Then, in the Registry, add definitions for the fields for
30which you wish to have these decoupled tendencies computed to the 4D array
31advh_t and advz_t .  Set up an index array similar to the adv_ct_indices
32array that is defined in solve_em when WRF_CHEM is defined and then
33set up assignments to that array similar to the assignments use to set
34adv_ct_indices in the routine setup_ct_indices(), which is defined in
35chem/chemics_init.F .  This will cause the rk_update_scalar routine to
36update the fields you have specified in the advh_t and advz_t arrays.
37Note that you must use your adv_*_indices array as the last index of
38the advh_t and advz_t arrays in the arguments to rk_update_scalar (see
39the call to rk_update_scalar for the chemistry species as an example).
40
41Additional note: currently advh_t and advz_t are the only 4D arrays
42defined in the Registry for this purpose. Therefore, you can only compute
43decoupled horizontal and vertical tendencies for only one non-chemistry
444D tracer array.  If you need to do this for more than one, add another
45advh_* and advz_* array to the Registry and management them separately.
46
47Only after you have done this should you modify how tenddec is set in
48the scalar loop you are working with.  Use the assignement at the top
49of the chemistry tracer loop as an example.
50
Note: See TracBrowser for help on using the repository browser.