1 | This directory contains executable files (and their source) that can be |
---|
2 | used to process the LMD Mars GCM output files (like "diagfi" or |
---|
3 | "stats"), whatever the dimension. |
---|
4 | In addition most output file from one of these program can be |
---|
5 | processes by another. |
---|
6 | |
---|
7 | The executable files should run on any Linux platform. |
---|
8 | |
---|
9 | Inputs can be provided by (1) replying to questions on screen or |
---|
10 | (2) filling the corresponding *.def and direct the input of these *.def |
---|
11 | files instead. For example : |
---|
12 | > concatnc.e < concatnc.def |
---|
13 | > zrecast.e < zrecast.def |
---|
14 | |
---|
15 | -------------------------------------------------------------------- |
---|
16 | 1) concatnc.e |
---|
17 | -------------------------------------------------------------------- |
---|
18 | |
---|
19 | This program is used to concatenate consecutive |
---|
20 | output files ("diagfi", and even "stats") for a selection of |
---|
21 | variable, in order to obtain one single big file. The time simension can |
---|
22 | be "sols" or "Ls" (in that last case, Ls will not be linear, and |
---|
23 | software like Grads may not be able to use it. To have a linear "Ls" |
---|
24 | timescale, you can use "Ls_Linear.e" (see below). |
---|
25 | |
---|
26 | Output file is : concat.nc |
---|
27 | |
---|
28 | MODIFICATION: |
---|
29 | 07/2008 Utility concatnc.F90 (not used by the gcm): improvement in order |
---|
30 | to 1) concatenate 1D variable and 2) increase the number of input files |
---|
31 | up to 1000 |
---|
32 | |
---|
33 | |
---|
34 | -------------------------------------------------------------------- |
---|
35 | 2) localtime.e |
---|
36 | -------------------------------------------------------------------- |
---|
37 | |
---|
38 | Program to redistribute and interpolate the variable a the same |
---|
39 | local times everywhere (useful to mimic satellite observations, or |
---|
40 | analyse day to day variations at a given local time). |
---|
41 | input : diagfi.nc / concat.nc / stats.nc kind of files |
---|
42 | |
---|
43 | output file is : |
---|
44 | name_of_input_file_LT.nc with pressure coordinate |
---|
45 | |
---|
46 | -------------------------------------------------------------------- |
---|
47 | 3) zrecast.e |
---|
48 | -------------------------------------------------------------------- |
---|
49 | |
---|
50 | This 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 |
---|
52 | integrating the hydrostatic equation, recasts data along the vertical |
---|
53 | direction. |
---|
54 | The vertical coordinate can be either 1) pressure, 2) above areoid |
---|
55 | altitudes, 3) above local surface altitudes or 4) distance to center of |
---|
56 | the planet. Some interpolation along the vertical direction is also |
---|
57 | done, following instructions given by user (levels may be specified |
---|
58 | or given as minimu,maximum and number of levels). |
---|
59 | For "above areoid altitudes" output, Atmospheric pressure is added to |
---|
60 | output dataset; for "pressure coordinate" outputs, the above areoid |
---|
61 | altitude of pressure is added to output dataset. |
---|
62 | |
---|
63 | Minimal requirements and dependencies: |
---|
64 | The dataset must include the following data: |
---|
65 | - surface pressure |
---|
66 | - atmospheric temperature |
---|
67 | - hybrid coordinates aps() and bps(), or sigma levels() (see section |
---|
68 | 1.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 |
---|
74 | molecular Gas Constant, may not be constant, so it is computed as |
---|
75 | R=P/(rho*T) (P=Pressure, rho=density, T=temperature) |
---|
76 | If 'rho' is not available, then we use a constant R (see section |
---|
77 | 2.2 in source file) |
---|
78 | |
---|
79 | output file is : |
---|
80 | name_of_input_file_P.nc with pressure coordinate |
---|
81 | name_of_input_file_A.nc with altitude above areoid coordinate |
---|
82 | name_of_input_file_S.nc with altitude above local surface coordinate |
---|
83 | name_of_input_file_R.nc with altitude as distance to center of planet |
---|
84 | |
---|
85 | MODIFICATION : |
---|
86 | 01/2010 : correction to interpolate above surface if density is not available. |
---|
87 | 03/2011 : added possibility to have output as distance to center of planet |
---|
88 | |
---|
89 | -------------------------------------------------------------------- |
---|
90 | 4) lslin.e |
---|
91 | -------------------------------------------------------------------- |
---|
92 | |
---|
93 | This program has been designed to interpol data in Solar Longitude (Ls) |
---|
94 | linear time coordinate (usable with grads) from Netcdf diagfi or concatnc |
---|
95 | files. |
---|
96 | output file is : lslin.nc |
---|
97 | lslin also create a lslin.ctl file that can be read |
---|
98 | directly by grads (>xdfopen lsllin.ctl) to plot in Ls coordinate to |
---|
99 | avoid some problem with grads when grads think that "the time interval |
---|
100 | is too small"... |
---|
101 | |
---|
102 | MODIFICATION |
---|
103 | 10/2007 Utility lslin.F90 (not used by the gcm) |
---|
104 | changed evaluation of 'start_var' from hard-coded values to a computed value |
---|
105 | |
---|
106 | |
---|
107 | -------------------------------------------------------------------- |
---|
108 | 5) hrecast.e |
---|
109 | -------------------------------------------------------------------- |
---|
110 | |
---|
111 | This program can interpolate GCM output on any horizontal grid (regular lat - lon) as long as it cover all the |
---|
112 | planet. The grid can be given points by points. The best way is to use the redirected input hrecast.def |
---|
113 | |
---|
114 | hrecast.e < hrecast.def |
---|
115 | |
---|
116 | |
---|
117 | -------------------------------------------------------------------- |
---|
118 | 6) expandstartfi.e |
---|
119 | -------------------------------------------------------------------- |
---|
120 | |
---|
121 | This program takes a physics start file ("startfi.nc") and recasts it |
---|
122 | on the corresponding lonxlat grid (so it contents may easily be displayed |
---|
123 | using Grads, Ferret, etc.) |
---|
124 | |
---|
125 | Simply run expandstartfi.e as a command line with arguments: |
---|
126 | |
---|
127 | expandstartfi.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 | -------------------------------------------------------------------- |
---|
133 | 6) extract.e |
---|
134 | -------------------------------------------------------------------- |
---|
135 | |
---|
136 | This program extracts (ie: interpolates) pointwise values of an atmospheric |
---|
137 | variable from a 'zrecast'ed diagfi file (works if altitude is geometrical |
---|
138 | height or a pressure vertical coordinates) |
---|
139 | user 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 | |
---|
163 | See files "extract.points.def" and "extract.profile.def" for examples of |
---|
164 | input format that would simply need to be redirected to extract.e, e.g.: |
---|
165 | |
---|
166 | extract.e < extract.points.def |
---|
167 | |
---|
168 | |
---|