source: trunk/LMDZ.MARS/util/README @ 2443

Last change on this file since 2443 was 2443, checked in by abierjon, 4 years ago

Mars GCM:
Changes in aeroptical.F90 :

  • add the flag nf90_64bit_offset when creating the output file. Without it, the program couldn't deal with large files (concat) with multiple aerosols
  • modify the code structure to make it a bit less memory-intensive
  • add topdust in computed aerosol opacities
  • add the possibility to compute absorption opacities, instead of extinction : the user must specify 'ext' or 'abs' in aeroptical.def
  • update the description of aeroptical in util/README

+ adapt simu_MCS to take into account aeroptical output variables when choosing

the binning reference

+ add outputs for topdust in physiq_mod

AB

File size: 9.4 KB
Line 
1This directory contains source codes of utilities (programs) that can be
2used to process the LMD Mars GCM output files (like "diagfi" or
3"stats").
4In addition most output file from one of these program can then be
5processed by another.
6
7See script "compile" for instructions and recommendations to compile
8the utilities. Once adequately modified, that script can be used to
9compile each utility; e.g. to build the zrecast.e utility program:
10> compile zrecast
11
12Note that inputs can be provided by (1) replying to questions on screen or
13(2) filling the corresponding  *.def and redirecting the input of these *.def
14files instead. For example :
15> concatnc.e < concatnc.def
16> zrecast.e < zrecast.def
17
18--------------------------------------------------------------------
191) concatnc.e : concatenate successive GCM output files
20--------------------------------------------------------------------
21
22This program is used to concatenate consecutive
23output files ("diagfi", and even "stats") for a selection of
24variable, in order to obtain one single big file. The time dimension can
25be "sols" or "Ls" (in that last case, Ls will not be linear, and
26software like Grads may not be able to use it. To have a linear "Ls"
27timescale, you can use "Ls_Linear.e" (see below).
28You can also add a "Ls" variable corresponding solar longitude for each
29timestep by using the "adls" option.
30
31Output file is : concat.nc
32
33--------------------------------------------------------------------
342) zrecast.e : put GCM data in physical vertical coordinate
35--------------------------------------------------------------------
36
37GCM outputs are in GCM hybrid coordinate which do not correspond to any
38physical vertical coordinate ! zrecast is NECESSARY to make any publishable
39scientific figure.
40
41This program reads 4D (lon-lat-alt-time) fields from GCM output files
42(ie: diagfi.nc time series or concat.nc or stats.nc files) and, by
43integrating the hydrostatic equation, recasts data along the vertical
44direction.
45The vertical coordinate can be either 1) pressure, 2) above areoid
46altitudes, 3) above local surface altitudes or 4) distance to center of
47the planet. Some interpolation along the vertical direction is also
48done, following instructions given by user (levels may be specified
49or given as minimu,maximum and number of levels).
50For "above areoid altitudes" output, Atmospheric pressure is added to
51output dataset; for "pressure coordinate" outputs, the above areoid
52altitude of pressure is added to output dataset.
53
54Minimal requirements and dependencies:
55The dataset must include the following data:
56- surface pressure
57- atmospheric temperature
58- hybrid coordinates aps() and bps(), or sigma levels()
59- ground geopotential (in input file; if not found, it is sought
60  in a 'diagfi.nc' file. If not found there, it is then sought in
61  a 'phisinit.nc' file  (see section 1.3.3 of program)
62
63- When integration the hydrostatic equation, we assume that R, the
64molecular Gas Constant, may not be constant, so it is computed as
65R=P/(rho*T) (P=Pressure, rho=density, T=temperature)
66If 'rho' is not available, then we use a constant R (see section
672.2 in source file)
68
69- Vertical interpolation : note that density (kg.m-3) and species density
70(e.g. in molecules.cm-3) must be vertically interpolated in log-space. For
71that purpose, these variables names must start with "rho" (exemple : rho for
72density, rho_co2, rho_o2, etc....)
73
74output file is :
75name_of_input_file_P.nc with pressure coordinate
76name_of_input_file_A.nc with altitude above areoid coordinate
77name_of_input_file_S.nc with altitude above local surface coordinate
78name_of_input_file_R.nc with altitude as distance to center of planet
79
80--------------------------------------------------------------------
813) localtime.e : put GCM data in local time coordinate
82--------------------------------------------------------------------
83
84Program to redistribute and interpolate the variable a the same
85local times everywhere (useful to mimic satellite observations, or
86analyse day to day variations at a given local time).
87input : diagfi.nc  / concat.nc / stats.nc kind of files
88
89output file is : name_of_input_file_LT.nc
90
91--------------------------------------------------------------------
924) lslin.e : redistribute and AVERAGE gcm output in Ls coordinate.
93--------------------------------------------------------------------
94
95This program has been designed to interpol data in Solar Longitude (Ls)
96linear time coordinate (usable with grads) from Netcdf diagfi or concatnc 
97files and to AVERAGE the instantaneous data in Ls period (for comparison with
98binned dataset, for instance).
99
100lslin also creates a lslin.ctl file that can be read
101directly by grads (>xdfopen lsllin.ctl) to plot in Ls coordinate to
102avoid some problem with grads when grads think that "the time interval
103is too small"...
104
105Output file is : name_of_input_file_LS.nc
106
107--------------------------------------------------------------------
1085) solzenangle.e : select GCM data at a given solar zenith angle
109--------------------------------------------------------------------
110
111Program to redistribute and interpolate the variable a the same
112solar zenith angle (notably useful to mimic satellite observations and in particular
113SOLAR OCCULTATIONS by choosing solar zenith angle = 90°)
114The user choose between Morning and Evening side.
115
116input : diagfi.nc  / concat.nc / stats.nc kind of files
117
118On the morning side output file (1 output per sol per grid point) is :
119 name_of_input_file_MO.nc 
120
121On the evening side output file is (1 output per sol per grid point):
122 name_of_input_file_EV.nc 
123
124--------------------------------------------------------------------
1256) hrecast.e : interpolate data at another horizontal grid resolution.
126--------------------------------------------------------------------
127
128This program can interpolate GCM output on any horizontal grid (regular
129lat - lon) as long as it cover all the planet.
130The grid can be given points by points. The best way is to use the
131redirected input hrecast.def
132
133hrecast.e < hrecast.def
134
135
136--------------------------------------------------------------------
1377) expandstartfi.e : to plot data in a startfi.nc file
138--------------------------------------------------------------------
139
140In startfi.nc file, data are not plotable because the horizontal coordinate
141in only a 1D list of all atmospheric columns on the planets.
142This program takes a physics start file ("startfi.nc") and recasts it
143on the corresponding  lonxlat grid (so it contents may easily be displayed
144using Python, Grads, Ferret, etc.)
145
146Simply run expandstartfi.e as a command line with arguments:
147
148expandstartfi.e  [infile.nc] [outfile.nc]
149
150     (if infile is not specified, "startfi.nc" is used as default)
151     (if outfile is not specified, it is built as "infile_ex.nc")
152
153--------------------------------------------------------------------
1548) extract.e : get data at specific coordinates for comparison with observations
155--------------------------------------------------------------------
156
157This program extracts (ie: interpolates) pointwise values of an atmospheric
158variable from a 'zrecast'ed diagfi file (works if altitude is geometrical
159height or a pressure vertical coordinates)
160user has to specify:
161- name of input file
162- date (in sols) offset wrt the input file (e.g. if the input file "begins"
163  at Ls=0, then the offset is 0; if the input file begins at Ls=30, the
164  offset date corresponding to the first 3 months is 61+66+66=193 sols, etc.)
165- the "extraction mode":
166     1: extract individual values; user will specify values of
167        lon lat alt Ls LT (all on a same line)
168        on as many lines as there are sought values
169     2: extract a profile: user will specify on a first line the values of
170        lon lat Ls LT (all on a same line)
171        and then only specify values of altitudes (m or Pa depending on the
172        coordinate in the input file), one per line, at which values are
173        sought
174 - output values are sent to (ASCII) output file 'infile_var_.dat', where
175   'infile' is the input file name (without trailing '.nc') and
176   'var' is the sought variable, for extraction mode 1 as
177   lines of "lon lat alt Ls LT value" and for a profile (extraction mode 2)
178   as lines of "alt value"
179
180  NB: If there is no data to do an appropriate interpolation to extract
181      the sought value, then a "missing_value" (taken from the variable's
182      attribute in the input file, most likely -9.99E33) is returned.
183
184See files "extract.points.def" and "extract.profile.def" for examples of
185input format that would simply need to be redirected to extract.e, e.g.:
186
187extract.e < extract.points.def
188
189--------------------------------------------------------------------
1909) aeroptical.e : compute aerosol opacities at a given wavelength
191--------------------------------------------------------------------
192
193Program to compute opacities [1/km] of all aerosols from dust, water ice,
194stormdust and topdust present in the input file, at a wavelength given by the user.
195Computation is made from the aerosol mass mixing ratios and effective radius,
196associated with air density (rho) and files containing the aerosol
197optical properties (generally present in the GCM datadir/ directory).
198The user have to precise the type of opacity : extinction or absorption.
199
200NB : water ice effective radius is known to be a bit inaccurate in the GCM,
201so reffwice can be prescribed by the user.
202
203input : diagfi.nc  / concat.nc / stats.nc kind of files
204
205output file is :
206 name_of_input_file_OPAext.nc for extinction opacities
207 name_of_input_file_OPAabs.nc for absorption opacities
208
209aeroptical.e < aeroptical.def
Note: See TracBrowser for help on using the repository browser.