[1954] | 1 | \chapter{Input/Output} |
---|
| 2 | \label{sc:io} |
---|
| 3 | |
---|
| 4 | \section{NetCDF format} |
---|
| 5 | |
---|
| 6 | %%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 7 | GCM input/output data are written in {\bf NetCDF} format |
---|
| 8 | (Network Common Data Form). NetCDF is an interface used to store and access |
---|
| 9 | geophysical data, and a library that provides an implementation of this |
---|
| 10 | interface. The NetCDF library also defines a machine-independent format for |
---|
| 11 | representing scientific data. |
---|
| 12 | Together, the interface, library and format support the creation, access and |
---|
| 13 | sharing of scientific data. NetCDF was developed at the Unidata Program Center |
---|
| 14 | in Boulder, Colorado. The freely available source can be obtained from |
---|
| 15 | the Unidata website: |
---|
| 16 | \begin{verbatim} |
---|
| 17 | http://www.unidata.ucar.edu/software/netcdf |
---|
| 18 | \end{verbatim} |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | %%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 22 | |
---|
| 23 | A data set in NetCDF format is a single file, as it is self-descriptive. |
---|
| 24 | |
---|
| 25 | \subsection{NetCDF text representation: ncdump} |
---|
| 26 | |
---|
| 27 | This utility is included in the NetCDF library. |
---|
| 28 | It generates the CDL representation (text format of the file content) to the standard output |
---|
| 29 | from the NetCDF file specified as input. |
---|
| 30 | |
---|
| 31 | \paragraph{Main options for the ncdump command} |
---|
| 32 | |
---|
| 33 | \begin{center} |
---|
| 34 | {\it ncdump diagfi.nc} |
---|
| 35 | \end{center} |
---|
| 36 | |
---|
| 37 | \noindent |
---|
| 38 | dump contents of NetCDF file {\tt diagfi.nc} to standard output |
---|
| 39 | (i.e. the screen). |
---|
| 40 | |
---|
| 41 | \begin{center} |
---|
| 42 | {\it ncdump -c diagfi.nc} |
---|
| 43 | \end{center} |
---|
| 44 | |
---|
| 45 | \noindent |
---|
| 46 | Displays the {\bf coordinate} variable values (variables which are also |
---|
| 47 | dimensions), as well as the declarations, variables and attribute values. |
---|
| 48 | The values of the non-coordinate variable data are not displayed at |
---|
| 49 | the output. |
---|
| 50 | |
---|
| 51 | \begin{center} |
---|
| 52 | {\it ncdump -h diagfi.nc} |
---|
| 53 | \end{center} |
---|
| 54 | |
---|
| 55 | \noindent |
---|
| 56 | Shows only the informative header of the file, which is the declaration |
---|
| 57 | of the dimensions, variables and attributes, but not the values of these |
---|
| 58 | variables. The output is identical to that in option {\bf -c} except for |
---|
| 59 | the fact that the coordinated variable values are not included. |
---|
| 60 | |
---|
| 61 | \begin{center} |
---|
| 62 | {\it ncdump -v var1,...,varn diagfi.nc} |
---|
| 63 | \end{center} |
---|
| 64 | |
---|
| 65 | \noindent |
---|
| 66 | The output includes the specific variable values, |
---|
| 67 | as well as all the dimensions, variables and attributes. |
---|
| 68 | More that one variable can be specified in the list following this option. |
---|
| 69 | The list must be a simple argument for the command, and must not contain any |
---|
| 70 | spaces. If no variable is specified, the command displays all the values of |
---|
| 71 | the variables in the file by default. |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | \subsection{Graphic visualization of NetCDF files using GrAds} |
---|
| 75 | |
---|
| 76 | GrAdS (The Grid Analysis and Display System) is a graphic software developed |
---|
| 77 | by Brian Doty at the "Center for Ocean-Land-Atmosphere (COLA)". |
---|
| 78 | |
---|
| 79 | One of its functions is to enable data stored in NetCDF format to be |
---|
| 80 | visualized directly. In figure~\ref{fg:grads} for example, we can see the |
---|
| 81 | GrADS visualization of the temperature data at a given moment. |
---|
| 82 | % |
---|
| 83 | \begin{figure} |
---|
| 84 | \centering |
---|
| 85 | \includegraphics[width=0.5\textwidth,angle=270]{Fig/grads.pdf} |
---|
| 86 | \caption{Example of temperature data at a given time using |
---|
| 87 | GrADS visualization\label{fg:grads}} |
---|
| 88 | \end{figure} |
---|
| 89 | % |
---|
| 90 | However, unlike NetCDF, GrADS only recognizes files where all the variables are stored on the same horizontal grid. |
---|
| 91 | These variables can be in 1, 2, 3 or 4 dimensions (X,Y,Z and t).\\ |
---|
| 92 | |
---|
| 93 | GrADS can also be obtained from: |
---|
| 94 | \begin{verbatim} |
---|
| 95 | http://grads.iges.org/grads/ |
---|
| 96 | \end{verbatim} |
---|
| 97 | |
---|
| 98 | \subsection{Graphic visualization of NetCDF files using Ferret} |
---|
| 99 | |
---|
| 100 | Ferret may also be used to visualize the contents of NetCDF files. Download intruction and documentation are available from the official website: |
---|
| 101 | \begin{verbatim} |
---|
| 102 | https://ferret.pmel.noaa.gov/Ferret/ |
---|
| 103 | \end{verbatim} |
---|
| 104 | |
---|
| 105 | \section{Input and parameter files} |
---|
| 106 | |
---|
| 107 | %{\bf \it Examples of initialization files can be found in directory |
---|
| 108 | %\begin{verbatim}$PATH1/LMDZ.MARS/deftank \end{verbatim}} |
---|
| 109 | \label{loc:entrees} |
---|
| 110 | |
---|
| 111 | The (3D version of the) GCM requires |
---|
| 112 | the input of two initialization files (in NetCDF format):\\ |
---|
| 113 | -{\bf start.nc} |
---|
| 114 | contains the initial states of the dynamical variables.\\ |
---|
| 115 | -{\bf startfi.nc} |
---|
| 116 | contains the initial states of the physical variables.\\ |
---|
| 117 | Note that collections of initial states can be retreived at:\\ |
---|
| 118 | \verb+http://www.lmd.jussieu.fr/~lmdz/planets/mars/starts+ \\ |
---|
| 119 | Extracting {\tt start.nc} and {\tt startfi.nc} from these archived |
---|
| 120 | requires using program {\tt newstart}, as described in |
---|
| 121 | section~\ref{sc:newstart}.\\ |
---|
| 122 | |
---|
| 123 | \noindent |
---|
| 124 | To run, the GCM also requires the four following |
---|
| 125 | parameter files (ascii text files):\\ |
---|
| 126 | -{\bf run.def} the parameters of the dynamical part of the program, |
---|
| 127 | and the temporal integration of the model.\\ |
---|
| 128 | -{\bf callphys.def} the parameters for calling the physical part.\\ |
---|
| 129 | -{\bf traceur.def} the names of the tracer to use.\\ |
---|
| 130 | -{\bf z2sig.def} |
---|
| 131 | the vertical distribution of the atmospheric layers.\\ |
---|
| 132 | Examples of these parameter files can be found in the |
---|
| 133 | \verb+LMDZ.MARS/deftank+ directory. |
---|
| 134 | |
---|
| 135 | \subsection{run.def} |
---|
| 136 | \label{vb:run.def} |
---|
| 137 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 138 | % run.def: les param sont lus dans dyn3d/defrun.F |
---|
| 139 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 140 | |
---|
| 141 | A typical {\tt run.def} file is given as an example below. |
---|
| 142 | The choice of variables to be set is simple (e.g. |
---|
| 143 | {\tt nday} number of modeled days to run), |
---|
| 144 | while the others do not need to be changed for normal use.\\ |
---|
| 145 | The format of the {\tt run.def} file is quite straightforward |
---|
| 146 | (and flexible): values given to parameters must be given as: |
---|
| 147 | \begin{verbatim} |
---|
| 148 | parameter = value |
---|
| 149 | \end{verbatim} |
---|
| 150 | Any blank line or line beginning with symbol {\bf \#} is |
---|
| 151 | a comment, and instruction lines may be written in any order. |
---|
| 152 | Moreover, not specifying a parameter/value set (e.g. deleting it |
---|
| 153 | or commenting it out) means you want the GCM to use a default built-in value. |
---|
| 154 | Additionally, one may use a specific keyword {\bf INCLUDEDEF} to specify |
---|
| 155 | another (text) file in which to also read values of parameters; e.g.: |
---|
| 156 | \begin{verbatim} |
---|
| 157 | INCLUDEDEF=callphys.def |
---|
| 158 | \end{verbatim} |
---|
| 159 | |
---|
| 160 | |
---|
| 161 | \noindent Here are some details about some of the parameters which may be |
---|
| 162 | set in {\tt run.def}: |
---|
| 163 | \begin{itemize} |
---|
| 164 | \item {\bf day\_step}, the number of dynamical steps per day to use for |
---|
| 165 | the time integration. This needs to be large enough for the model |
---|
| 166 | to remain stable (this is related to the CFL stability criterion |
---|
| 167 | which essentially depends on the horizontal resolution of the model). |
---|
| 168 | On Mars, in theory, the GCM can run with |
---|
| 169 | {\tt day\_step}=480 using the 64$\times$48 grid, but model stability |
---|
| 170 | improves when this number is higher: {\tt day\_step}=960 is recommended |
---|
| 171 | when using the 64$\times$48 grid. According to the CFL criterion, |
---|
| 172 | {\tt day\_step} should vary in proportion with the resolution: for example |
---|
| 173 | {\tt day\_step}=480 using the 32$\times$24 horizontal resolution. |
---|
| 174 | Note that {\tt day\_step} must also be divisible by {\tt iperiod}. |
---|
| 175 | |
---|
| 176 | \item {\bf tetagdiv, tetagrot, tetatemp} control the dissipation intensity. |
---|
| 177 | It is better to limit the dissipation intensity |
---|
| 178 | (tetagdiv, tetagrot, tetatemp should not be too low). |
---|
| 179 | However the model diverges if tetagdiv, tetagrot, tetatemp are too high, |
---|
| 180 | especially if there is a lot of dust in the atmosphere. \\ |
---|
| 181 | Example used with nitergdiv=1 and nitergrot=niterh=2 : \\ |
---|
| 182 | - using the 32$\times$24 grid tetagdiv=6000~s ; tetagrot=tetatemp=30000~s \\ |
---|
| 183 | - using the 64$\times$48 grid: tetagdiv=2500~s ; tetagrot=tetatemp=5000~s |
---|
| 184 | |
---|
| 185 | \item {\bf idissip} is the time step used for the dissipation: |
---|
| 186 | dissipation is computed and added every {\tt idissip} dynamical |
---|
| 187 | time step. If {\tt idissip} is |
---|
| 188 | too short, the model waste time in these calculations. But if idissip is too |
---|
| 189 | long, the dissipation will not be parametrized correctly and the model will |
---|
| 190 | be more likely to diverge. |
---|
| 191 | A check must be made, so that: |
---|
| 192 | {\tt idissip}~$<$~{\tt tetagdiv}$\times${\tt daystep}/88775 |
---|
| 193 | (same rule for {\tt tetagrot} and {\tt tetatemp}). |
---|
| 194 | This is tested automatically during the run. |
---|
| 195 | |
---|
| 196 | \item {\bf iphysiq} is the time step used for the physics: |
---|
| 197 | physical tendencies are computed every {\tt iphysiq} dynamical time step. |
---|
| 198 | In practice, we |
---|
| 199 | usually set the physical time step to be of the order of half an hour. |
---|
| 200 | We thus generally set {\tt iphysiq}= {\tt day\_step}/48 |
---|
| 201 | |
---|
| 202 | \end{itemize} |
---|
| 203 | |
---|
| 204 | \noindent |
---|
| 205 | {\it Example of run.def file: } |
---|
| 206 | {\footnotesize |
---|
| 207 | \input{input/run.tex} |
---|
| 208 | } |
---|
| 209 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 210 | |
---|
| 211 | |
---|
| 212 | \subsection{callphys.def} |
---|
| 213 | \label{sc:callphys.def} |
---|
| 214 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 215 | % callphys.def: les param sont lus dans phymars/inifis.F |
---|
| 216 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 217 | The {\tt callphys.def} file (along the same format |
---|
| 218 | as the {\tt run.def} file) contains parameter/value sets |
---|
| 219 | for the physics.\\ |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | \noindent |
---|
| 223 | {\it Example of callphys.def file: } |
---|
| 224 | {\footnotesize |
---|
| 225 | \input{input/callphys.tex} |
---|
| 226 | } |
---|
| 227 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 228 | |
---|
| 229 | \subsection{traceur.def} |
---|
| 230 | \label{sc:traceur.def} |
---|
| 231 | Tracers in input ({\tt start.nc} and {\tt startfi.nc}) and output |
---|
| 232 | files ({\tt restart.nc} and {\tt restartfi.nc}) are stored using |
---|
| 233 | individual tracer names (e.g. {\tt co2} for CO2 gas, {\tt h2o\_vap} |
---|
| 234 | for water vapour, {\tt h2o\_ice} for water ice, ...).\\ |
---|
| 235 | The first line of the {\tt traceur.def} file (an ASCII file) must |
---|
| 236 | contain the number of tracers to load and use (this number should |
---|
| 237 | be the same as given to the {\tt -t} option of the {\tt makegcm} |
---|
| 238 | script when the GCM was compiled), followed by the tracer names |
---|
| 239 | (one per line). Note that if the corresponding tracers are not |
---|
| 240 | found in input files {\tt start.nc} and {\tt startfi.nc}, then the |
---|
| 241 | tracer is initialized to zero.\\ |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | \noindent {\it Example of a traceur.def file}: |
---|
| 245 | with CO2, dust distribution moments, (water ice) cloud condensation nuclei moments, water vapour and water ice tracers |
---|
| 246 | {\footnotesize |
---|
| 247 | \begin{verbatim} |
---|
| 248 | 7 |
---|
| 249 | co2 |
---|
| 250 | dust_number |
---|
| 251 | dust_mass |
---|
| 252 | ccn_number |
---|
| 253 | ccn_mass |
---|
| 254 | h2o_ice |
---|
| 255 | h2o_vap |
---|
| 256 | \end{verbatim} |
---|
| 257 | } |
---|
| 258 | |
---|
| 259 | \subsection{z2sig.def} |
---|
| 260 | The {\tt Z2sig.def} file contains the pseudo-altitudes |
---|
| 261 | (in km) at which the user wants to set the vertical levels.\\ |
---|
| 262 | Note that levels should be unevenly spread, with a higher resolution |
---|
| 263 | near the surface in order to capture the rapid variations of variables |
---|
| 264 | there. It is recommended to use the altitude levels as set in the |
---|
| 265 | {\tt z2sig.def} file provided in the {\tt deftank} directory.\\ |
---|
| 266 | |
---|
| 267 | |
---|
| 268 | \noindent |
---|
| 269 | {\it Example of z2sig.def file |
---|
| 270 | (this version for 49 layers between 0 and 300~km):} |
---|
| 271 | {\footnotesize |
---|
| 272 | \input{input/z2sig.tex} |
---|
| 273 | } |
---|
| 274 | |
---|
| 275 | \subsection{Initialization files: start and startfi} |
---|
| 276 | |
---|
| 277 | % |
---|
| 278 | \begin{figure}[h] |
---|
| 279 | \centering |
---|
| 280 | \framebox[0.8\textwidth][c]{\includegraphics[width=0.7\textwidth]{Fig/netcdf.pdf}} |
---|
| 281 | \caption{Organization of NetCDF files \label{fg:netcdf}} |
---|
| 282 | \end{figure} |
---|
| 283 | % |
---|
| 284 | Files {\tt start.nc} and {\tt startfi.nc}, like all the NetCDF files of |
---|
| 285 | the GCM, |
---|
| 286 | are constructed on the same model (see NetCDF file composition, |
---|
| 287 | figure~\ref{fg:netcdf}). They contain:\\ |
---|
| 288 | - a header with a ``control'' variable followed by a series of variables |
---|
| 289 | defining the (physical and dynamical) grids \\ |
---|
| 290 | - a series of non temporal variables that give information about surface |
---|
| 291 | conditions on the planet.\\ |
---|
| 292 | - a ``time'' variable giving the values of the different instants at which |
---|
| 293 | the temporal variables are stored |
---|
| 294 | (a single time value (t=0) for start, |
---|
| 295 | as it describes the dynamical initial states, |
---|
| 296 | and no time values for startfi, as it describes only a physical state).\\ |
---|
| 297 | |
---|
| 298 | To dump (in text format) the contents of a {\tt start.nc} file using the |
---|
| 299 | {\tt ncdump} command:\\ |
---|
| 300 | |
---|
| 301 | \noindent |
---|
| 302 | {\it ncdump -h start.nc}\\ |
---|
| 303 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 304 | % List START |
---|
| 305 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 306 | \input{input/dyn_list.tex} |
---|
| 307 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 308 | |
---|
| 309 | \noindent |
---|
| 310 | List of contents of a {\tt startfi.nc} file:\\ |
---|
| 311 | |
---|
| 312 | \noindent |
---|
| 313 | {\it ncdump -h startfi.nc}\\ |
---|
| 314 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 315 | % List startfi |
---|
| 316 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 317 | \input{input/fi_list.tex} |
---|
| 318 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | |
---|
| 322 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 323 | % Description des start et startfi |
---|
| 324 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 325 | |
---|
| 326 | \paragraph{Physical and dynamical headers} |
---|
| 327 | |
---|
| 328 | There are two types of headers: one for the physical headers, |
---|
| 329 | and one for the dynamical headers. |
---|
| 330 | The headers always begin with a ``control' variable |
---|
| 331 | (described below), that is allocated differently in the physical and |
---|
| 332 | dynamical parts. |
---|
| 333 | The other variables in the header concern the (physical and dynamical) grids. |
---|
| 334 | They are the following:\\ |
---|
| 335 | |
---|
| 336 | \noindent |
---|
| 337 | the horizontal coordinates\\ |
---|
| 338 | - {\bf rlonu}, {\bf rlatu}, {\bf rlonv}, {\bf rlatv} for the dynamical part,\\ |
---|
| 339 | - {\bf lati}, {\bf long} for the physical part,\\ |
---|
| 340 | |
---|
| 341 | \noindent |
---|
| 342 | the coefficients for passing from the physical grid to the dynamical grid\\ |
---|
| 343 | - {\bf cu},{\bf cv} only in the dynamical header\\ |
---|
| 344 | |
---|
| 345 | \noindent |
---|
| 346 | and finally, the grid box areas\\ |
---|
| 347 | - {\bf aire} for the dynamical part,\\ |
---|
| 348 | - {\bf area} for the physical part.\\ |
---|
| 349 | |
---|
| 350 | \paragraph{Surface conditions} |
---|
| 351 | |
---|
| 352 | The surface conditions are mostly given in the physical NetCDF files by |
---|
| 353 | variables:\\ |
---|
| 354 | - {\bf phisfi} for the initial state of surface geopotential,\\ |
---|
| 355 | - {\bf albedodat} for the bare ground albedo,\\ |
---|
| 356 | - {\bf inertiedat} for the surface thermal inertia,\\ |
---|
| 357 | - {\bf zmea}, {\bf zstd}, {\bf zsig}, {\bf zgam} and {\bf zthe} for |
---|
| 358 | the subgrid scale topography.\\ |
---|
| 359 | |
---|
| 360 | \noindent |
---|
| 361 | For the dynamics:\\ |
---|
| 362 | - {\bf physinit} for the initial state of surface geopotential\\ |
---|
| 363 | |
---|
| 364 | \noindent |
---|
| 365 | Remark: variables {\bf phisfi} and {\bf physinit} contain the same information |
---|
| 366 | (surface geopotential), but {\bf phisfi} gives the geopotential values on the |
---|
| 367 | physical grid, while {\bf physinit} give the values on the dynamical grid.\\ |
---|
| 368 | |
---|
| 369 | \paragraph{Physical and dynamical state variables} |
---|
| 370 | To save disk space, the initialization files store the variables used by |
---|
| 371 | the model, rather than the ``natural'' variables.\\ |
---|
| 372 | |
---|
| 373 | \noindent |
---|
| 374 | For the dynamics: |
---|
| 375 | \begin{description} |
---|
| 376 | \item - {\bf ucov} and {\bf vcov} the covariant winds\\ |
---|
| 377 | These variables are linked to the ``natural'' winds by\\ |
---|
| 378 | \verb+ucov = cu * u+ and \verb+vcov = cv * v+ |
---|
| 379 | \item - {\bf teta} the potential temperature,\\ |
---|
| 380 | or more precisely, the potential enthalpy linked to temperature {\bf T} by |
---|
| 381 | $\theta = T\dep{\frac{P}{Pref}}^{-K}$ |
---|
| 382 | \item - the tracers, |
---|
| 383 | \item - {\bf ps} surface pressure. |
---|
| 384 | \item - {\bf masse} the atmosphere mass in each grid box. |
---|
| 385 | \end{description} |
---|
| 386 | |
---|
| 387 | \noindent |
---|
| 388 | ``Vectorial'' variables {\bf ucov} and {\bf vcov} are stored on |
---|
| 389 | ``staggered'' grids u and v respectively (in the dynamics) |
---|
| 390 | (see section \ref{fg:grid}).\\ |
---|
| 391 | Scalar variables {\bf h}, {\bf q} (tracers), {\bf ps}, {\bf masse} are stored |
---|
| 392 | on the ``scalar'' grid of the dynamical part.\\ |
---|
| 393 | |
---|
| 394 | \noindent |
---|
| 395 | For the physics: |
---|
| 396 | \begin{description} |
---|
| 397 | \item - {\bf co2ice} surface dry ice, |
---|
| 398 | \item - {\bf tsurf} surface temperature, |
---|
| 399 | \item - {\bf tsoil} temperatures at different layers under the surface, |
---|
| 400 | \item - {\bf emis} surface emissivity, |
---|
| 401 | \item - {\bf q2} wind variance,\\ |
---|
| 402 | or more precisely, the square root of the turbulent kinetic energy. |
---|
| 403 | \item - the surface ``tracer'' budget |
---|
| 404 | (kg.m$^{-2}$),\\ |
---|
| 405 | \end{description} |
---|
| 406 | |
---|
| 407 | \noindent |
---|
| 408 | All these variables are stored on the ``physical'' grid |
---|
| 409 | (see section \ref{fg:grid}).\\ |
---|
| 410 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 411 | |
---|
| 412 | \paragraph{The ``control'' array} |
---|
| 413 | |
---|
| 414 | \indent |
---|
| 415 | Both physical and dynamical headers of the GCM NetCDF files start with |
---|
| 416 | a {\bf controle} variable. This variable is an array of 100 reals (the vector |
---|
| 417 | called {\tt tab\_cntrl} in the program), which contains the program control |
---|
| 418 | parameters. |
---|
| 419 | Parameters differ between the physical and dynamical sections, and examples |
---|
| 420 | of both are listed below. The contents of table {\tt tab\_cntrl} can also |
---|
| 421 | be checked with the command {\tt ncdump -ff -v controle}.\\ |
---|
| 422 | |
---|
| 423 | \noindent |
---|
| 424 | {\bf The "control" array in the header of a dynamical NetCDF file: |
---|
| 425 | start} |
---|
| 426 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 427 | % tab_cntrl (dynamique) dans dyn3d/inimomo.F |
---|
| 428 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 429 | \input{input/dyn_cntl.tex} |
---|
| 430 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 431 | |
---|
| 432 | \noindent |
---|
| 433 | {\bf The "controle" array in the header of a physical NetCDF file: |
---|
| 434 | startfi.nc} |
---|
| 435 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 436 | % tab_cntrl (physique) dans phymars/iniwritefi.F |
---|
| 437 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 438 | \input{input/fi_cntl.tex} |
---|
| 439 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 440 | |
---|
| 441 | \newpage |
---|
| 442 | \section{Output files} |
---|
| 443 | |
---|
| 444 | \subsection{NetCDF restart files - restart.nc and restartfi.nc} |
---|
| 445 | These files are of the exact same format as {\tt start.nc} and |
---|
| 446 | {\tt startfi.nc} |
---|
| 447 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 448 | % Description des fichiers de Sortie |
---|
| 449 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 450 | |
---|
| 451 | \subsection{ NetCDF file - diagfi.nc} |
---|
| 452 | NetCDF file {\tt diagfi.nc} stores the instantaneous physical variables |
---|
| 453 | throughout the simulation at regular intervals |
---|
| 454 | (set by the value of parameter {\tt ecritphy} in |
---|
| 455 | parameter file {\tt run.def}; note that {\tt ecritphy} should be a |
---|
| 456 | multiple of {\tt iphysiq} as well as a divisor of {\tt day\_step}). |
---|
| 457 | |
---|
| 458 | \noindent |
---|
| 459 | {\bf Any variable from any sub-routine of the physics can be stored |
---|
| 460 | by calling subroutine} {\tt writediagfi}. |
---|
| 461 | Moreover, one may add a {\tt diagfi.def} file containing only the names |
---|
| 462 | of variables to output (one per line) in the directory where the GCM is |
---|
| 463 | run, in order to have only thoses listed outputed in the {\tt diagfi.nc} |
---|
| 464 | file.\\ |
---|
| 465 | |
---|
| 466 | \noindent |
---|
| 467 | Illustrative example of the contents of a {\tt diagfi.nc} |
---|
| 468 | file (using ncdump):\\ |
---|
| 469 | \noindent |
---|
| 470 | {\it ncdump -h diagfi.nc}\\ |
---|
| 471 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 472 | % List DIAGFI |
---|
| 473 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 474 | % temporaire!!! |
---|
| 475 | \input{input/diag_list.tex} |
---|
| 476 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 477 | |
---|
| 478 | \noindent |
---|
| 479 | The structure of the file is thus as follows: |
---|
| 480 | \begin{description} |
---|
| 481 | \item- the dimensions |
---|
| 482 | \item- variable ``time'' containing the time of the timestep stored in the |
---|
| 483 | file (in Martian days since the beginning of the run) |
---|
| 484 | \item- variable ``control'' containing many parameters, as described above. |
---|
| 485 | \item- from `` rhonu'' to 'phisinit'': a list of data describing the |
---|
| 486 | geometrical coordinates of the data file, plus the surface topography |
---|
| 487 | \item- finally, all the 2D or 3D data stored in the run. |
---|
| 488 | \end{description} |
---|
| 489 | |
---|
| 490 | |
---|
| 491 | \subsection{Stats files} |
---|
| 492 | |
---|
| 493 | As an option ({\tt stats} must be set to {\tt .true.} in {\tt callphys.def}), |
---|
| 494 | the model can accumulate any |
---|
| 495 | variable from any subroutine of the physics by calling |
---|
| 496 | subroutine \verb+ wstat+ |
---|
| 497 | \\ \\ |
---|
| 498 | \noindent |
---|
| 499 | This save is performed at regular intervals 12 times a day. |
---|
| 500 | An average of the daily evolutions over the whole run is calculated |
---|
| 501 | (for example, for a 10 day run, the averages of the variable values at |
---|
| 502 | 0hTU, 2hTU, 4hTU,...24hTU are calculated), along with RMS standard |
---|
| 503 | deviations of the variables. This ouput is given in |
---|
| 504 | file {\tt stats.nc}.\\ |
---|
| 505 | |
---|
| 506 | |
---|
| 507 | \noindent |
---|
| 508 | Illustrative example of the contents of a {\tt stats.nc} file (using ncdump):\\ |
---|
| 509 | \noindent |
---|
| 510 | {\it ncdump -h stats.nc}\\ |
---|
| 511 | \input{input/stats_list.tex} |
---|
| 512 | |
---|
| 513 | \noindent |
---|
| 514 | The structure of the file is simillar to the {\tt diagfi.nc} file, |
---|
| 515 | except that, as stated before, the average of variables are given for |
---|
| 516 | 12 times of the day and that RMS standard deviation are also provided. |
---|
| 517 | |
---|