[1954] | 1 | \chapter{1D version of the Mars model} |
---|
| 2 | |
---|
| 3 | \label{sc:testphys1d} |
---|
| 4 | |
---|
| 5 | The physical part of the model can be used to generate realistic |
---|
| 6 | 1-D simulations (one atmosphere column). |
---|
| 7 | In practice, the simulation is controlled from a main program called |
---|
| 8 | \verb+ testphys1d.F+ which, after initialization, then calls the master |
---|
| 9 | subroutine of the physics \verb+ physiq.F+ described in the preceeding |
---|
| 10 | chapters. |
---|
| 11 | |
---|
| 12 | \section{Compilation} |
---|
| 13 | To compile the Martian model in 1-D with |
---|
| 14 | 29 layers, simply type |
---|
| 15 | (in compliance with the makelmdz\_fcm function manual described in section |
---|
| 16 | \ref{sc:compil1}) |
---|
| 17 | |
---|
| 18 | \begin{verbatim} |
---|
| 19 | makelmdz_fcm -arch local -d 29 -p mars testphys1d |
---|
| 20 | \end{verbatim} |
---|
| 21 | |
---|
| 22 | You will find executable {\bf testphys1d\_29\_phymars\_seq.e} |
---|
| 23 | (the compiled model) |
---|
| 24 | in the {\tt bin} subdirectory from which you ran the makelmdz\_fcm command. |
---|
| 25 | |
---|
| 26 | \section{1-D runs and input files} |
---|
| 27 | |
---|
| 28 | The 1-D model does not use an initial state file (the simulation must be long |
---|
| 29 | enough to obtain a balanced state). Thus, to generate a simulation simply |
---|
| 30 | type: |
---|
| 31 | |
---|
| 32 | \begin{verbatim} |
---|
| 33 | ./testphys1d.e |
---|
| 34 | \end{verbatim} |
---|
| 35 | |
---|
| 36 | The following example files are available in the {\tt deftank} directory |
---|
| 37 | (copy them into your working directory first): |
---|
| 38 | |
---|
| 39 | - {\bf callphys.def}~: controls the options in the physics, |
---|
| 40 | just like for the 3D GCM. |
---|
| 41 | |
---|
| 42 | - {\bf z2sig.def}~: |
---|
| 43 | controls the vertical discretization |
---|
| 44 | (no change needed, in general), functions as with the 3D GCM. |
---|
| 45 | |
---|
| 46 | - {\bf traceur.def}~: |
---|
| 47 | controls the tracer names (this file may not be present, as long |
---|
| 48 | as you run without tracers (option {\tt tracer=.false.} in |
---|
| 49 | callphys.def) |
---|
| 50 | |
---|
| 51 | - {\bf run.def}~: controls the 1-D run parameters and initializations |
---|
| 52 | (this is actally file {\tt run.def.1d} the {\tt deftank} directory, |
---|
| 53 | which must be renamed {\tt run.def} to be read by the program).\\ |
---|
| 54 | |
---|
| 55 | The last file is different from the 3D GCM's {\tt run.def} input file, |
---|
| 56 | as it contains options specific to the 1-D model, as shown in the example |
---|
| 57 | below: |
---|
| 58 | {\footnotesize |
---|
| 59 | \input{input/run.def.1d.tex} |
---|
| 60 | } |
---|
| 61 | Note that, just as for the 3-D GCM {\tt run.def} file, input |
---|
| 62 | parameters may be given in any order, or even not given at all |
---|
| 63 | (in which case default values are used by the program). |
---|
| 64 | |
---|
| 65 | Initial conditions for tracers can be provided as ASCII text files; when |
---|
| 66 | {\bf testphys1d.e} runs, it looks for a {\tt profile\_*} file, where {\tt *} |
---|
| 67 | stands for a tracer name (as given in the traceur.def file) to initialize |
---|
| 68 | the tracer profile. The data in the file should be given as one value per |
---|
| 69 | line, first line for the surface value (in kg/m2), followed by values for each |
---|
| 70 | atmospheric layer (going from bottom to top of the atmosphere). |
---|
| 71 | If no {\tt profile\_*} file is found, then the tracer values are initialized |
---|
| 72 | to zero (except for the 'co2' tracer, which will be set to 0.95). |
---|
| 73 | |
---|
| 74 | \section{Output data} |
---|
| 75 | |
---|
| 76 | During the entire 1D simulation, you can obtain output data for any |
---|
| 77 | variable from any physical subroutine by using subroutine \verb+ writediagfi+ |
---|
| 78 | (as when runing 3D simulations, but specifying the correct dimensions for the field) \\ |
---|
| 79 | |
---|
| 80 | Example of a call to subroutine {\tt writediagfi} requesting |
---|
| 81 | temperature output: |
---|
| 82 | (\verb+ ngrid+ horizontal point, \verb+ nlayer + layers, variable |
---|
| 83 | \verb+ zt + called ``temp'' in K units): |
---|
| 84 | |
---|
| 85 | \begin{verbatim} |
---|
| 86 | CALL WRITEDIAGFI(ngrid,'temp','Temperature','K',1,zt) |
---|
| 87 | \end{verbatim} |
---|
| 88 | |
---|
| 89 | |
---|