source: trunk/LMDZ.MARS/util/README.exec @ 1733

Last change on this file since 1733 was 1409, checked in by emillour, 10 years ago

Mars GCM:
Update of lslin utility: Added possibility to bin data (instead of interpolating) over the time intervals.
FF

File size: 7.1 KB
Line 
1This directory contains executable files (and their source) that can be
2used to process the LMD Mars GCM output files (like "diagfi" or
3"stats"), whatever the dimension.
4In addition most output file from one of these program can be
5processes by another.
6
7The executable files should run on any Linux platform.
8
9Inputs can be provided by (1) replying to questions on screen or
10(2) filling the corresponding  *.def and direct the input of these *.def
11files instead. For example :
12> concatnc.e < concatnc.def
13> zrecast.e < zrecast.def
14
15--------------------------------------------------------------------
161) concatnc.e
17--------------------------------------------------------------------
18
19This program is used to concatenate consecutive
20output files ("diagfi", and even "stats") for a selection of
21variable, in order to obtain one single big file. The time simension can
22be "sols" or "Ls" (in that last case, Ls will not be linear, and
23software like Grads may not be able to use it. To have a linear "Ls"
24timescale, you can use "Ls_Linear.e" (see below).
25
26Output file is : concat.nc
27
28MODIFICATION:
2907/2008 Utility concatnc.F90 (not used by the gcm): improvement in order
30to 1) concatenate 1D variable and 2) increase the number of input files
31up to 1000
32
33
34--------------------------------------------------------------------
352) localtime.e
36--------------------------------------------------------------------
37
38Program to redistribute and interpolate the variable a the same
39local times everywhere (useful to mimic satellite observations, or
40analyse day to day variations at a given local time).
41input : diagfi.nc  / concat.nc / stats.nc kind of files
42
43output file is :
44name_of_input_file_LT.nc with pressure coordinate
45
46--------------------------------------------------------------------
473) zrecast.e
48--------------------------------------------------------------------
49
50This program reads 4D (lon-lat-alt-time) fields from GCM output files
51(ie: diagfi.nc time series or concat.nc or stats.nc files) and, by
52integrating the hydrostatic equation, recasts data along the vertical
53direction.
54The vertical coordinate can be either 1) pressure, 2) above areoid
55altitudes, 3) above local surface altitudes or 4) distance to center of
56the planet. Some interpolation along the vertical direction is also
57done, following instructions given by user (levels may be specified
58or given as minimu,maximum and number of levels).
59For "above areoid altitudes" output, Atmospheric pressure is added to
60output dataset; for "pressure coordinate" outputs, the above areoid
61altitude of pressure is added to output dataset.
62
63Minimal requirements and dependencies:
64The dataset must include the following data:
65- surface pressure
66- atmospheric temperature
67- hybrid coordinates aps() and bps(), or sigma levels() (see section
681.3.2)
69- ground geopotential (in input file; if not found, it is sought
70  in a 'diagfi.nc' file. If not found there, it is then sought in
71  a 'phisinit.nc' file  (see section 1.3.3 of program)
72
73- When integration the hydrostatic equation, we assume that R, the
74molecular Gas Constant, may not be constant, so it is computed as
75R=P/(rho*T) (P=Pressure, rho=density, T=temperature)
76If 'rho' is not available, then we use a constant R (see section
772.2 in source file)
78
79output file is :
80name_of_input_file_P.nc with pressure coordinate
81name_of_input_file_A.nc with altitude above areoid coordinate
82name_of_input_file_S.nc with altitude above local surface coordinate
83name_of_input_file_R.nc with altitude as distance to center of planet
84
85MODIFICATION :
8601/2010 : correction to interpolate above surface if density is not available.
8703/2011 : added possibility to have output as distance to center of planet
88
89--------------------------------------------------------------------
904) lslin.e
91--------------------------------------------------------------------
92
93This program has been designed to interpol data in Solar Longitude (Ls)
94linear time coordinate (usable with grads) from Netcdf diagfi or concatnc 
95files.
96output file is : lslin.nc
97lslin also create a lslin.ctl file that can be read
98directly by grads (>xdfopen lsllin.ctl) to plot in Ls coordinate to
99avoid some problem with grads when grads think that "the time interval
100is too small"...
101
102MODIFICATION
10310/2007 Utility lslin.F90 (not used by the gcm)
104changed evaluation of 'start_var' from hard-coded values to a computed value
10504/2015 Added possibility to bin data (instead of interpolating) over
106the time intervals
107
108--------------------------------------------------------------------
1095) hrecast.e
110--------------------------------------------------------------------
111
112This program can interpolate GCM output on any horizontal grid (regular lat - lon) as long as it cover all the
113planet. The grid can be given points by points. The best way is to use the redirected input hrecast.def
114
115hrecast.e < hrecast.def
116
117
118--------------------------------------------------------------------
1196) expandstartfi.e
120--------------------------------------------------------------------
121
122This program takes a physics start file ("startfi.nc") and recasts it
123on the corresponding  lonxlat grid (so it contents may easily be displayed
124using Grads, Ferret, etc.)
125
126Simply run expandstartfi.e as a command line with arguments:
127
128expandstartfi.e  [infile.nc] [outfile.nc]
129
130     (if infile is not specified, "startfi.nc" is used as default)
131     (if outfile is not specified, it is built as "infile_ex.nc")
132
133--------------------------------------------------------------------
1346) extract.e
135--------------------------------------------------------------------
136
137This program extracts (ie: interpolates) pointwise values of an atmospheric
138variable from a 'zrecast'ed diagfi file (works if altitude is geometrical
139height or a pressure vertical coordinates)
140user has to specify:
141- name of input file
142- date (in sols) offset wrt the input file (e.g. if the input file "begins"
143  at Ls=0, then the offset is 0; if the input file begins at Ls=30, the
144  offset date corresponding to the first 3 months is 61+66+66=193 sols, etc.)
145- the "extraction mode":
146     1: extract individual values; user will specify values of
147        lon lat alt Ls LT (all on a same line)
148        on as many lines as there are sought values
149     2: extract a profile: user will specify on a first line the values of
150        lon lat Ls LT (all on a same line)
151        and then only specify values of altitudes (m or Pa depending on the
152        coordinate in the input file), one per line, at which values are
153        sought
154 - output values are sent to (ASCII) output file 'infile_var_.dat', where
155   'infile' is the input file name (without trailing '.nc') and
156   'var' is the sought variable, for extraction mode 1 as
157   lines of "lon lat alt Ls LT value" and for a profile (extraction mode 2)
158   as lines of "alt value"
159
160  NB: If there is no data to do an appropriate interpolation to extract
161      the sought value, then a "missing_value" (taken from the variable's
162      attribute in the input file, most likely -9.99E33) is returned.
163
164See files "extract.points.def" and "extract.profile.def" for examples of
165input format that would simply need to be redirected to extract.e, e.g.:
166
167extract.e < extract.points.def
168
169 
Note: See TracBrowser for help on using the repository browser.