Difference between revisions of "Mars 1D testphys1d program"

From Planets
Jump to: navigation, search
m (Inputs)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Overview ==
+
It is possible to run the Mars PCM in a "single-column" configuration: this is the so-called 1D Mars PCM whose program is '''testphys1d'''. It is quite useful for some studies and or when developing and testing parametrizations.
It is possible to run the Mars PCM in a "single-column" configuration (quite useful for some studies and or when developing and testing parametrizations).
 
  
== Compiling testphys1d ==
+
== Compilation ==
The main program ''testphys1d'' is compiled using the same compilation script [[The makelmdz fcm GCM Compilation Script|makelmdz_fcm]] than the 3D model except that:
+
The main program '''testphys1d''' is compiled using the same compilation script, [[The makelmdz fcm GCM Compilation Script|makelmdz_fcm]], as for the 3D Mars PCM. Nevertheless, there are few modifications:
* the ''-d'' option requires only one argument, the number of vertical levels
+
* the ''-d'' option requires only one argument, the number of vertical levels;
* the main program to compile is ''testphys1d'' rather than ''gcm''
+
* the main program to compile is ''testphys1d'' rather than ''gcm''.
So for instance to compile a case for 54 vertical levels one would run something like
+
So for instance to compile a case for 54 vertical levels one would run something like:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
makelmdz_fcm -arch somearch -d 54 -p mars testphys1d
 
makelmdz_fcm -arch somearch -d 54 -p mars testphys1d
 
</syntaxhighlight>
 
</syntaxhighlight>
  
== testphys1d inputs ==
+
== Inputs ==
Just like the gcm the 1D model needs some inputs to run. The main difference is that it does not require a ''start'' (initial conditions) file. Some ''def'' files are however needed:
+
Like the ''gcm'' program, the ''testphys1d'' program needs some inputs to be able to run. The needed files are:
* z2sig.def : definition of vertical levels
+
* <code>z2sig.def</code> for the definition of vertical levels;
* traceur.def : definition of tracers the model will run with. Note that at run time testphys1d looks for optional ''profile_sometracername'' files which contain initial values (surface value on the first line and then one value for each layer to describe the profile) of the tracer quantities.
+
* <code>traceur.def</code> for the definition of tracers that the user wants the model to run with;
* callphys.def : definition of parametrizations to switch on (just like in the 3D PCM)
+
* <code>callphys.def</code> for the definition of parametrizations that the user wants the model to run with;
* run.def : the run configuration file; similar to the one for the 3D PCM described here [[The run.def Input File]], but adapted to the 1D case. Note that there is an example of a ''run.def'' file for testphys1d in LMDZ.MARS/deftank (file ''run.def.1d'')
+
* <code>run.def</code> for the run configuration, which is similar to the one for the 3D PCM described here [[The run.def Input File]]. It has to be be adapted to the 1D case. An example file, called <code>run.def.1d</code>, is available in <code>LMDZ.MARS/deftank</code>.
  
== testphys1d outputs ==
+
Unlike the ''gcm'' program, the ''testphys1d'' program can run without starting files, that is without <code>startfi.nc</code> and <code>start.nc</code>. This is the case by default (<code>startfiles_1D=.false.</code>). However, in this setting, it needs the profiles of each tracer. They consist in files called ''profile_sometracername'' containing column-wise the initial values of the considered tracer. Then, the first line corresponds to the surface tracer and the following lines correspond to the layers. When the program ends, it will produce by its own a <code>startfi.nc</code> file initialized with the default settings.
Testphys1d can output diagfi.nc and stats.nc files, and just like for the GCM optional ''diagfi.def'' and ''stats.def'' ASCII files can be used to specify which variable needs be outputted.  
+
 
 +
In the case of <code>startfiles_1D=.true.</code> set in the <code>run.def</code>, the program will look for starting files, that is a <code>startfi.nc</code> file and a <code>start1D.txt</code> file. The latter is specific to the 1D model and an example can be found in <code>LMDZ.MARS/deftank</code>. If the starting files are present, it will read them to initialize the run accordingly and it will create a <code>restartfi.nc</code> file and a <code>restart1D.txt</code> file at the end of the run. If these starting files are not present, it will start as in the previous (default) case but it will still create the restarting files at the end.
 +
 
 +
== Outputs ==
 +
The program ''testphys1d'' can output <code>diagfi.nc</code> and <code>stats.nc</code> files. Just like for the 3D PCM model, the optional <code>diagfi.def</code> and <code>stats.def</code> files can be respectively added to specify which variables need be outputted.
 +
 
 +
As described in the previous section, if <code>startfiles_1D=.true.</code> in the <code>run.def</code>, then ''testphys1d'' will create a <code>restartfi.nc</code> file and a <code>restart1D.txt</code> file at the end of the run.
 +
This option is particularly useful when one wants to make chained simulations with the 1D model.
  
 
[[Category:Mars-Model]]
 
[[Category:Mars-Model]]
 
[[Category:Mars-1D]]
 
[[Category:Mars-1D]]

Latest revision as of 16:06, 19 June 2024

It is possible to run the Mars PCM in a "single-column" configuration: this is the so-called 1D Mars PCM whose program is testphys1d. It is quite useful for some studies and or when developing and testing parametrizations.

Compilation

The main program testphys1d is compiled using the same compilation script, makelmdz_fcm, as for the 3D Mars PCM. Nevertheless, there are few modifications:

  • the -d option requires only one argument, the number of vertical levels;
  • the main program to compile is testphys1d rather than gcm.

So for instance to compile a case for 54 vertical levels one would run something like:

makelmdz_fcm -arch somearch -d 54 -p mars testphys1d

Inputs

Like the gcm program, the testphys1d program needs some inputs to be able to run. The needed files are:

  • z2sig.def for the definition of vertical levels;
  • traceur.def for the definition of tracers that the user wants the model to run with;
  • callphys.def for the definition of parametrizations that the user wants the model to run with;
  • run.def for the run configuration, which is similar to the one for the 3D PCM described here The run.def Input File. It has to be be adapted to the 1D case. An example file, called run.def.1d, is available in LMDZ.MARS/deftank.

Unlike the gcm program, the testphys1d program can run without starting files, that is without startfi.nc and start.nc. This is the case by default (startfiles_1D=.false.). However, in this setting, it needs the profiles of each tracer. They consist in files called profile_sometracername containing column-wise the initial values of the considered tracer. Then, the first line corresponds to the surface tracer and the following lines correspond to the layers. When the program ends, it will produce by its own a startfi.nc file initialized with the default settings.

In the case of startfiles_1D=.true. set in the run.def, the program will look for starting files, that is a startfi.nc file and a start1D.txt file. The latter is specific to the 1D model and an example can be found in LMDZ.MARS/deftank. If the starting files are present, it will read them to initialize the run accordingly and it will create a restartfi.nc file and a restart1D.txt file at the end of the run. If these starting files are not present, it will start as in the previous (default) case but it will still create the restarting files at the end.

Outputs

The program testphys1d can output diagfi.nc and stats.nc files. Just like for the 3D PCM model, the optional diagfi.def and stats.def files can be respectively added to specify which variables need be outputted.

As described in the previous section, if startfiles_1D=.true. in the run.def, then testphys1d will create a restartfi.nc file and a restart1D.txt file at the end of the run. This option is particularly useful when one wants to make chained simulations with the 1D model.