[1906] | 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 | 04/2015 Added possibility to bin data (instead of interpolating) over |
---|
| 106 | the time intervals |
---|
| 107 | |
---|
| 108 | -------------------------------------------------------------------- |
---|
| 109 | 5) hrecast.e |
---|
| 110 | -------------------------------------------------------------------- |
---|
| 111 | |
---|
| 112 | This program can interpolate GCM output on any horizontal grid (regular lat - lon) as long as it cover all the |
---|
| 113 | planet. The grid can be given points by points. The best way is to use the redirected input hrecast.def |
---|
| 114 | |
---|
| 115 | hrecast.e < hrecast.def |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | -------------------------------------------------------------------- |
---|
| 119 | 6) expandstartfi.e |
---|
| 120 | -------------------------------------------------------------------- |
---|
| 121 | |
---|
| 122 | This program takes a physics start file ("startfi.nc") and recasts it |
---|
| 123 | on the corresponding lonxlat grid (so it contents may easily be displayed |
---|
| 124 | using Grads, Ferret, etc.) |
---|
| 125 | |
---|
| 126 | Simply run expandstartfi.e as a command line with arguments: |
---|
| 127 | |
---|
| 128 | expandstartfi.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 | -------------------------------------------------------------------- |
---|
| 134 | 6) extract.e |
---|
| 135 | -------------------------------------------------------------------- |
---|
| 136 | |
---|
| 137 | This program extracts (ie: interpolates) pointwise values of an atmospheric |
---|
| 138 | variable from a 'zrecast'ed diagfi file (works if altitude is geometrical |
---|
| 139 | height or a pressure vertical coordinates) |
---|
| 140 | user 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 | |
---|
| 164 | See files "extract.points.def" and "extract.profile.def" for examples of |
---|
| 165 | input format that would simply need to be redirected to extract.e, e.g.: |
---|
| 166 | |
---|
| 167 | extract.e < extract.points.def |
---|
| 168 | |
---|
| 169 | |
---|
[1907] | 170 | -------------------------------------------------------------------- |
---|
| 171 | 7) extrapol_icefield.e |
---|
| 172 | -------------------------------------------------------------------- |
---|
| 173 | |
---|
| 174 | This program is a tool to accelerate the calculation of ice fieds evolution. |
---|
| 175 | |
---|
| 176 | It uses data files (diagfi.nc) to extrapolate surface |
---|
| 177 | physical fields (ice fields typically) in time. |
---|
| 178 | |
---|
| 179 | 1. We load data file(s) 'diagfi.nc' and get dimensions (longitude,latitude,altitude,time). |
---|
| 180 | 2. We get a surface field from the loaded 'diagfi.nc' file. |
---|
| 181 | 3. We make the extrapolation. |
---|
| 182 | 4. We load a start file 'startfi.nc' and copy it into a new start file 'startfi_extrapolated.nc'. |
---|
| 183 | 5. We modify the 'startfi_extrapolated.nc' according to the extrapolation calculations. |
---|
| 184 | |
---|
| 185 | --> 'startfi_extrapolated.nc' is the interpolated new start file that can be used to run new GCM simulations |
---|
| 186 | |
---|
| 187 | Author : M. Turbet (2016) [Adapted from E. Millour previous work] |
---|
| 188 | |
---|