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

Last change on this file since 626 was 293, checked in by emillour, 13 years ago

Update of Mars GCM tool 'extract': extracted values are now sent to an ASCII output file ('infile_var.dat', where 'inifil' is the input file name and 'var' is the extracted variable).
EM

File size: 7.0 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
105
106
107--------------------------------------------------------------------
1085) hrecast.e
109--------------------------------------------------------------------
110
111This program can interpolate GCM output on any horizontal grid (regular lat - lon) as long as it cover all the
112planet. The grid can be given points by points. The best way is to use the redirected input hrecast.def
113
114hrecast.e < hrecast.def
115
116
117--------------------------------------------------------------------
1186) expandstartfi.e
119--------------------------------------------------------------------
120
121This program takes a physics start file ("startfi.nc") and recasts it
122on the corresponding  lonxlat grid (so it contents may easily be displayed
123using Grads, Ferret, etc.)
124
125Simply run expandstartfi.e as a command line with arguments:
126
127expandstartfi.e  [infile.nc] [outfile.nc]
128
129     (if infile is not specified, "startfi.nc" is used as default)
130     (if outfile is not specified, it is built as "infile_ex.nc")
131
132--------------------------------------------------------------------
1336) extract.e
134--------------------------------------------------------------------
135
136This program extracts (ie: interpolates) pointwise values of an atmospheric
137variable from a 'zrecast'ed diagfi file (works if altitude is geometrical
138height or a pressure vertical coordinates)
139user has to specify:
140- name of input file
141- date (in sols) offset wrt the input file (e.g. if the input file "begins"
142  at Ls=0, then the offset is 0; if the input file begins at Ls=30, the
143  offset date corresponding to the first 3 months is 61+66+66=193 sols, etc.)
144- the "extraction mode":
145     1: extract individual values; user will specify values of
146        lon lat alt Ls LT (all on a same line)
147        on as many lines as there are sought values
148     2: extract a profile: user will specify on a first line the values of
149        lon lat Ls LT (all on a same line)
150        and then only specify values of altitudes (m or Pa depending on the
151        coordinate in the input file), one per line, at which values are
152        sought
153 - output values are sent to (ASCII) output file 'infile_var_.dat', where
154   'infile' is the input file name (without trailing '.nc') and
155   'var' is the sought variable, for extraction mode 1 as
156   lines of "lon lat alt Ls LT value" and for a profile (extraction mode 2)
157   as lines of "alt value"
158
159  NB: If there is no data to do an appropriate interpolation to extract
160      the sought value, then a "missing_value" (taken from the variable's
161      attribute in the input file, most likely -9.99E33) is returned.
162
163See files "extract.points.def" and "extract.profile.def" for examples of
164input format that would simply need to be redirected to extract.e, e.g.:
165
166extract.e < extract.points.def
167
168 
Note: See TracBrowser for help on using the repository browser.