(See also the MesoNH User's Guide Chapter 4.)
No specific operation is needed in the preliminary stages of a MesoNH simulation
(generation of the initial and coupling files) until the model itself is
MAINPROG=MODEL in procedure
The following parameters must be set in the namelist file
The 'initial coordinates' Lagrangian tracers are initialized
then computed as soon as the flag
LLG=.TRUE. is activated.
If so, three 3D scalar fields named
LGZM will be produced in model outputs, corresponding
respectively to the initial coordinates , , for instant "M",
(i.e., where is the current simulation time and the
model time-step), plus three fields named
for instant "T" (i.e., ). All these fields are expressed in
Initialization - Reinitializations
As long as the flag
LINIT_LG=.FALSE., the initialization
time of the tracers is unique and corresponds to the model START.
supplementary reinitializations of the tracers will occur at every RESTART of
In this case, the Lagrangian evolution given by
LGZM origins at the time of the most recent RESTART.
CSV_ADV_SCHEME specifies the advection scheme used for
advecting the Scalar Variables, including the Lagrangian tracers.
The other possible options are
(see the MesoNH Users Guide for details - §4.2.4 for version
By default the sub-grid turbulent transport of the Lagrangian tracers
LGZM is taken into account through the
turbulence parametrization as for any other scalar variable of the model (see
the MesoNH documentations for turbulence-scheme options).
LNOMIXLG=.TRUE. turns off the turbulence parametrization for the
Lagrangian tracers (nevertheless active for the other scalar variables).
The involved parameters in the namelist file
DIAG1.nam are in
LTRAJ=.TRUE., programme DIAG
LGZMof the input FM-file from meters into kilometers then saves them into the output diachronic file;
Y(in km) (these fields can be helpful later when using DIAPROG, e.g., to plot horizontal displacements such as given by
X - LGXM);
NAM_STO_FILEif the latter is not empty, and operates the related post-processing and writings (see below Advanced DIAGnostics).
!!! Warning !!!
LTRAJ=.FALSE. the Lagrangian tracers will be
absent in the output diachronic file.
In the most simple case, the Lagrangian tracers were initialized at the model
START then no reinitialization occurred during the run
LINIT_LG=.FALSE. or simulation without RESTART).
If so, set
LTRAJ=.TRUE. but keep the namelist
The present groups in the output diachronic file will be:
A specific post-processing whose specifications have to be prescribed in
NAM_STO_FILE, may be useful or even necessary in two cases:
LINIT_LG=.TRUE.during the model run),
LINIT_LG=.FALSE.for all simulation segments but one wants to access physical quantities that the Lagrangian parcels had at the time of the model START (after equation 1.1).
Important remark :
This post-processing can also be performed on Linux PC independently
from, and after, the program DIAG with the specific program
compute_r00_pc available with the package
of "tools related to MesoNH"
This way may be more convenient and more flexible in most cases, and is
recommended whenever possible.
The latter program works with diachronic
files from DIAG as input and modifies them to add supplemental groups. These
input files must contain the groups
that are obtained with DIAG as indicated just above (i.e., in
NAM_DIAG; empty namelist
Please see the documentation on
compute_r00_pc for specific use, but note
that this program does exactly the same job as DIAG, and that the required
input namelists are almost the same. The content is described below for DIAG.
This can be done with the following paradigmatic example for file
&NAM_DIAG ......., LTRAJ=.TRUE. / &NAM_DIAG_FILE YSUFFIX='t0' ,YINIFILE(1) = "SIMUL.1.SEG04.001" ,YINIFILE(2) = "SIMUL.1.SEG03.001" ,YINIFILE(3) = "SIMUL.1.SEG02.001" ,YINIFILE(4) = "SIMUL.1.SEG01.001" ,YINIFILE(5) = "INIT_MNH_FILE" / &NAM_STO_FILE CFILES(1) = "SIMUL.1.SEG04.001", CFILES(2) = "SIMUL.1.SEG03.001", CFILES(3) = "SIMUL.1.SEG02.001", CFILES(4) = "SIMUL.1.SEG01.001", CFILES(5) = "INIT_MNH_FILE", NSTART_SUPP(1)=4, NSTART_SUPP(2)=2 /
In the example the simulation has been performed in 4 segments with output
*.001) at segment ends only.
List of the MesoNH files to be treated by DIAG (one output LFI-file per file
NAM_DIAG, the catenation process
(Eq.1.7-1.9) will be applied for each listed
file - except the earliest one (i.e., the last one of the list).
Suffix added to the MesoNH file name in order to form the output file
name. In the given example, the treatment of file
produce the diachronic file
This suffix can be used to indicate back to what time the Lagrangian tracer
segments are catenated (time of the initial file
In the following, is the time of the currently treated file
YINIFILE(n), and the times of the model restarts (start at
Following the catenation process of §1.2.3 (Fig.1.1),
one needs at each step to know at
restart time the initial location of the Lagrangian parcels at the
previous restart time . This is precisely the information given by
LGZT fields at time .
Thus for the catenation process of file
YINIFILE(n) back to time ,
programme DIAG needs to have all the restart-time files prior
to time as input (of course in addition to
YINIFILE(n)). This is the purpose of the STOrage namelist
NAM_STO_FILE. Since the catenation process goes back in time, these files
have to be anti-chronologically ordered.
List of the restart-time MesoNH files. It is OBLIGATORY to order the files ANTI-CHRONOLOGICALLY. The last file in the list must be at the time from which one wants to track the Lagrangian evolution (this file can be the simulation initialization file if one wants to go back to the start time). ALL restart-files, and ONLY these, have to appear in the list2.1.
Masdev4_5 Bug2) and previous versions of MesoNH,
YINIFILE(n)MUST EXACTLY MATCH
CFILES(n)for any .
YINIFILE(n)are obligatorily restart-time files2.2and thence catenated Lagrangian evolutions computed with DIAG necessarily end in coincidence with simulation segments2.3.
LGZM: as in the model output file (also in meters). The time origin for these 'initial' coordinates corresponds to the most recent restart prior to .
Z000: initial coordinates (in meters) resulting from the catenation process. The time origin for these is .
RV000initial value of potential temperature and water-vapor content, respectively, i.e., and that the Lagrangian parcels had at (equation 1.1 for or ).
Remark : If using the "tool"
on Linux PC, it is
possible to choose not only and , but also any other quantity
present in the diachronic input file (and also potential vorticity even if not
present) - see the specific documentation on the MesoNH www for details. This
possibility will be implemented in DIAG in a forthcoming bugfix of MesoNH.
If at any step of the catenation process a Lagrangian parcel is found to
originate from outside the model domain, this parcel is flagged in the resulting
RV000 as "coming from
outside"2.4 with the special value -1.E+11 (that
will be later recognized by DIAPROG - see
NSTART_SUPP(m)=n produces a supplementary set of 'initial' coordinates
'initial' physical quantities originating at the time of file
This fields will be suffixed with
00m (instead of
For the above example of namelist, the following two sets of fields will be produced:
RV001, corresponding to a catenation back to the time of file
RV002, corresponding to a catenation back to the time of file
.FALSE.) of the Lagrangian tracers, which were initialized at the model start (file
&NAM_DIAG ......., LTRAJ=.TRUE. / &NAM_DIAG_FILE YSUFFIX='t0' ,YINIFILE(1) = "SIMUL.1.SEG04.003" ,YINIFILE(2) = "INIT_MNH_FILE" / &NAM_STO_FILE CFILES(1) = "SIMUL.1.SEG04.003", CFILES(2) = "INIT_MNH_FILE" /
DIAG will produce the following fields:
LGZM(in meters). The time origin is at the model start.
Z000: trivially match
RV000initial potential temperature and water-vapor content at the time of the model start (equation 1.1 for or ).
For most plots allowed by DIAPROG and involving the Lagrangian tracers, it is necessary to make the following variable initializations:
XSPVAL=-1.E+11(which is the value used by program DIAG to flag the absence of Lagrangian information at some points).
XHMAXhave obligatorily to be specified.
RV00n, can of course be plotted as any other conventional group with DIAPROG: 2D horizontal or vertical cross-sections, horizontal or vertical profiles, etc. (see the DIAPROG Documentation). Examples are given here that may have some common interest for MesoNH users.
Figure 2.1(a) shows the initial altitude of the parcels present at the altitude m in the case of a developing baroclinic wave over western Europe. The initial altitude is here shot after a 18-hours model-run without run-time reinitialization. Parcels in the ascent ahead of the trough originate from altitudes below 7000m and thus have m (colors blue to green). Parcels in the descent of upper-level air behind the trough originate from altitudes above 7000m and thus have m (colors light green to purple). It is noteworthy that such a plot enables to immediately identify coherent air-masses (here the rising warm-conveyor belt ahead of the trough or the upper-level air intrusion behind it) without any kind of parcel preselection (as otherwise needed in classical trajectory-based methods). The colored plot is here obtained with the following commands:
LCOLAREA=T LISO=F NIMNMX=1 XISOMIN_LGZM=4.500 XISOMAX_LGZM=9.500 XDIAINT_LGZM=.250 LCOLZERO=T NCOLZERO=12 LGZM(*.001)_Z_7000
Superimposition of other fields (here contours and wind arrows) can be
obtained in the classical way (
Remark the factor that turns the initial altitude into kilometers.
Figure 2.1(b) shows the initial ordinate of the parcels on the isentrope K after the same 18-hours evolution. This plot makes strikingly visible the southwards intrusion of subpolar air (high values of , colors yellow to purple) behind the trough and the northwards intrusion of subtropical air (low values of , colors blue to green) ahead of the trough. The strong gradient of off the eastern shore of Spain indicates the close proximity of air masses with very different geographical origins. This reveals there active frontogenesis2.5.
The colored plot is here obtained with the following commands
LISO=T LCOLINE=T NIMNMX=1 XISOMIN_LGYM=-1000000 XISOMAX_LGYM=4750000 XDIAINT_LGYM=250000 LGYM_TH_315
Handling millions of meters can be avoided by conversion into kilometers in the following way.:
... XISOMIN_LGYM=-1000 XISOMAX_LGYM=4750 XDIAINT_LGYM=250 LGYM(*.001)_TH_315
Figure 2.2 exemplifies how the Lagrangian tracer can capture the dynamics of a convective plume. The simulation uses a reversible microphysical cycle (i.e., without precipitation) so that the total water content (cloud water + vapor) is conserved by the flow. The simulation is started with a horizontally uniform distribution. Therefore the surfaces are expected to coincide with surfaces, what is well shown in the figure, where the -contour encompasses the wet plume which develops in the shape of a mushroom. The plot is here obtained with the following commands (after having appropriately defined the vertical cross-section and specified the color-scale parameters for in the classical way).
XISOMIN_LGZM=1.5 XISOMAX_LGZM=1.5 XDIAINT_LGZM=1 MRC_CV__PLUS_MRV_CV__ON_LGZM(*.001)_CV_
As second example, Figure 2.3 shows the vertical Lagrangian displacement over 30 min in a vertical cross-section along an organized orographically triggered convection line. The net vertical displacement is , where is the initial altitude of the Lagrangian parcel 30 min before. The ambient flow is from left to right. The weak positive values at low-levels over the upwind side of the first relief correspond to orographic uplift. This triggers deep convection cells rising up to the tropopause. These deep ascents are signed by the high positive values of at high-levels. Organized low-level subsidence (negative values) is also well visible more downstream over the plain, due to convective downdrafts.
In this simulation, reinitializations of the Lagrangian tracers were made every
5 min and a catenation has been performed in order to retrieve the
30min-evolution. The group used in DIAPROG for is in this case the
Z000. The command sequence for this plot is as follows
(after having appropriately defined the vertical cross-section in the classical
... LISO=T LCOLAREA=T LCOLZERO=T NCOLZERO=8 XISOMIN_Z000=-3.250 XISOMAX_Z000=9.750 XDIAINT_Z000=.500 ALT(*.001)_CV__MINUS_Z000(*.001)_CV_
Remark: Horizontal displacement can also be plotted using the
Y (that are available as soon as the Lagrangian
tracers are) and the operator
_MINUS_, for example
Z00n) is by definition a conserved quantity even in complex (in particular, highly diabatic) atmospheric flows.
DIAPROG allows to plot any group from the input diachronic file on iso- surfaces - just as one can make plots on isobar, iso-, iso-, etc. , surfaces. Iso-'s have the advantage to be true material surfaces (unlike iso- or iso- that are only approximately material surfaces), that are initially horizontal then deformed by the flow (as in the vertical cross-sections of Fig.2.2).
Such plots are exemplified in Fig.2.4. Panels (a-b) show the actual altitude of the points of the material surface m 1 and 4 hours after initialization of the tracer . Coherent ascendant (subsident) air-masses are well visible as regions with actual altitudes greater (resp. lower) than the initial altitude 2000 m.
A horizontal plot of a group on an iso- surface, e.g., on a m isosurface as in Fig.2.4, is produced by DIAPROG upon request of type
ALT_SV3_2000(altitude to be prescribed in m).
Figures 2.4(c-d) show the net diabatic change on the same m surface. It reveals that the ascendant air-masses have experienced strong diabatic heating (these bands indeed accompany frontal rain production) while the air-pool that has subsided down to the Gulf of Genoa has experienced significative cooling. Figures 2.4(c-d) are obtained with
Options for plots on iso- surfaces can be precised with setting the
LGZM is used as , i.e., the plot is on a material surface deformed
since the most recent model RESTART (or START if no reinitialization of the
Lagrangian tracers meanwhile).
The group that has to be used as is prescribed with the (character) variable
CGROUPSV3. For instance
LXYZ00=T CGROUPSV3='Z001' THM_SV3_1500allows to choose the time origin for the material surface evolution among the 's corresponding to the
Z00i's (if computed by DIAG - see §2.2).
The above possibility remains available for any kind of group precised in
CGROUPSV3. For instance
LXYZ00=T CGROUPSV3='TH000' THM_SV3_300plots the potential temperature on the iso-K surface, i.e., the material surface that coincided with the isentrope 300 K at the initial time . This example may be of interest since it provides whether the Lagrangian parcels of the considered surface have been diabatically cooled or heated, and how much.
The group precised in
CGROUPSV3 can as well have nothing to do with
Lagrangian considerations. For example
LXYZ00=T CGROUPSV3='REHU' THM_SV3_90simply plots the potential temperature on a surface defined by a relative humidity of 90%.
_SV3_must be INTEGER. However
LCHREEL=T(default=F) allows the use of REAL values.
DIAPROG allows to track an ensemble of Lagrangian parcels that are initially contained in a box prescribed by the user, in the form of a plume of stars.
The box is defined by prescription of the minimum and maximum Cartesian coordinates of the points within the box:
XXL=x_min XXH=x_max XYL=y_min XYH=y_max XZL=z_min XZH=z_maxAll six values have to be given in meters. You can use
convxy2ijto convert grid indices or geographical coordinates (lat,lon) into the required Cartesian coordinates (see DIAPROG documentation).
DIAPROG computes a 3D mask corresponding to true occurrences for the
( ) AND ( ) AND ( ).
(This condition can be simply interpreted as "the Lagrangian parcel currently considered was initially present in the box".)
Again the time origin for , , can be either the instant of the
most recent RESTART (
LGYM used - default
option) or an earlier START or RESTART instant. For the latter case one
has to precise which from the (
Z00i)'s have to be
used, in the same manner as for plots on isosurfaces. For instance
LXYZ00=T CGROUPSV3='Z002'allows to use
Z002as , , .
The plots show both the initial box and a plume of stars marking the true occurrences of the mask (i.e., the Lagrangian parcels from the box) at the current time, in projections onto the three Cartesian planes (horizontal), (vertical W-E) and (vertical S-N). Examples are given in figures 2.5(a-d).
After definition of a mask (XXL=,..., XZH=), such plots are obtained with the following commands:
LMASK3D_XY=Tproduces a horizontal plot (as Fig.2.5a),
LMASK3D_XZ=Tproduces a W-E vertical plot (as Fig.2.5b),
LMASK3D_YZ=Tproduces a S-N vertical plot (as Fig.2.5c).
These three plots (in the above order) can also be produced together with
the single command
The plot domains are controlled with the classical parameters:
(XZ plots delimited with
XHMAX; YZ plots delimited with
After definition of a mask, it is also possible to plot in horizontal projection the value of any 3D group on the top of the particle plume (i.e., at any point of true occurrence of the mask condition, and of maximum altitude on a given vertical). For example
ALT_MSKTOP__K_2plot the value of the altitude (
ALT) of the mask top (the suffix
_K_2makes no sense but is necessary for the syntax).
As default option the field is plotted with isocontours. However this requires a minimum of four contiguous 'true' points. Thus the value of the considered group on isolated 'true' points does not appear in an isocontoured plot. It is however possible to visualize it in the form of a plume of colored stars instead of contours:
LMARKER=T THM_MSKTOP__K_2(same color scale as for the contours). Examples of both options are given in figure 2.5(e-f). Remark the apparently reduced size of the plume when
Figure 2.5 is obtained with the following sequence:
XHMIN=0 XHMAX=12000 ! NIGRNC=5 L2CONT=T XLWCONT=1 ! XXL=300000 XXH=900000 XYL=3000000 XYH=3600000 XZL=4000 XZH=8000 ! ! use of tracers initialized on 09 February 2002 at 12 UTC ! (triplet X000,Y000,Z000) ! LXYZ00=T CGROUPSV3='Z000' ! ! Panels (a-c) ! _file1_'FRANK.1.10_00.002_d12' LMASK3D=T ! ! Panel (d) ! _file2_'FRANK.1.10_12.002_d12' LMASK3D_XY=T ! LISO=F LCOLAREA=T NIMNMX=2 XISOLEV=1000,2000,3000,4000,5000,6000,7000,8000,9999. ! ! Panel (e) ! LMARKER=T ALT_MSKTOP__K_2 ! ! Panel (f) ! LMARKER=F ALT_MSKTOP__K_2
L2CONT=Tis needed to superimpose the continents to horizontal plots.
LINDAX=F LGEOG=Fand set
NCHITVYMJ=to change the label interval (see DIAPROG Documentation for details).
As noted in §1.2.3, the algorithm of Eq.1.7-1.9 (sketched in Fig. 1.1) can also be used with DIAPROG to compute backtrajectories.
As the Lagrangian tracers at every RESTART times in the considered while are required, DIAPROG needs to open several files simultaneously that must be ordered ANTICHRONOLOGICALLY.
For example we consider a simulation with 6-hourly spaced restarts on 09 and 10/02/2002. For the while 12UTC - 12UTC the loading sequence is as follows:
_file1_'SIMUL.1.10_12.001' _file2_'SIMUL.1.10_06.001' _file3_'SIMUL.1.10_00.001' _file4_'SIMUL.1.09_18.001' _file1__file2__file3__file4_Note that the file on 09/10, 18 UTC contains the location of the parcels 6 hours earlier, so the file on 09/02, 12 UTC is not needed for trajectories back to that time.
The coordinates of the end points for one or several backjectories are specified
in three lists
XZPART corresponding to the
abscissas, ordinates and altitudes of the end points. The lists must have
matching numbers of elements and be ended with '
9999.'. For example
for specifying N backtrajectories:
XXPART=x1,x2,x3,...,xN,9999. XYPART=y1,y2,y3,...,yN,9999. XXPART=z1,z2,z3,...,zN,9999.These coordinates must all be expressed in meters. (
convxy2ijcan be helpful, see DIAPROG documentation.)
Three plots in the projection planes (horizontal), (vertical W-E) and (vertical S-N) are produced (in this order) with the command
LTRAJ3D=T(automatically set back to false after computation).
A trajectory appears as a chain of stars marking the successive locations of the considered Lagrangian parcel at the RESTART times, and connected to each other with segments (the end point appears as a small circle instead of a star), as illustrated in figures 2.6(a,c,e).
If several trajectories are requested in the same plot (N>1), each single trajectory appears with its own color.
L2CONT=Tis needed to superimpose the continents to horizontal plots.
It is possible to track along the parcel trajectory the evolution of any 3D
group present in the considered diachronic files. This group must be specified
CTRAJ_GROUP and the option is activated with
LTRAJ_GROUP. For example to track the potential temperature of the
LTRAJ_GROUP=T CTRAJ_GROUP='THM' LTRAJ3D=TThis results in six plots ordered as for the example in figure 2.6.
For tracking another group it is necessary to change
to request again the trajectory computation (
In summary, the example (Fig.2.6) is produced with the following sequence:
! ! loading sequence ! _file1_'SIMUL.1.10_12.001' _file2_'SIMUL.1.10_06.001' _file3_'SIMUL.1.10_00.001' _file4_'SIMUL.1.09_18.001' _file1__file2__file3__file4_ ! ! end point(s) prescription (only one trajectory in this example) ! XXPART=2850000,9999. XYPART=2300000,9999. XZPART= 4800,9999. ! ! plot options ! XHMIN=0 XHMAX=12000 NIGRNC=5 L2CONT=T XLWCONT=1 ! ! request of trajectory(ies) with potential temperature tracking ! LTRAJ_GROUP=T CTRAJ_GROUP='THM' LTRAJ3D=T
The end points of the streamlines are specified in the same way as for
The computation of streamlines is performed upon the following command sequence:
_file1_'SIMUL.1.02UTC.001' _file1__file1_ XXPART=x1,x2,x3,...,xN,9999. XYPART=y1,y2,y3,...,yN,9999. XXPART=z1,z2,z3,...,zN,9999. ! ! (possibly) L2CONT=T ! LFLUX3D=T
In the example the flow must be quasi-stationary between 02 UTC and the prior
restart. DIAPROG uses the fields
LGZM 100 times
in loop to compute streamlines backwards from the prescribed end points. As for
backtrajectories, three plots are generated in the , , projection
planes with identical appearance.