Difference between revisions of "The run.def Input File"

From Planets
Jump to: navigation, search
(Example of run.def file)
Line 38: Line 38:
 
#
 
#
 
#-----------------------------------------------------------------------  
 
#-----------------------------------------------------------------------  
#Parametres de controle du run:                                        
+
# Run control parameters:                                        
#------------------------------                                         
+
#------------------------
  
 +
# planet type
 
planet_type = generic
 
planet_type = generic
  
# Nombre de jours d'integration                                       
+
# Number of days to run model for
     nday=2
+
     nday=1
  
# ndynstep overrides
+
# ndynstep (overrides nday): number of dynamical steps to run for
    ndynstep=-2000
+
#    ndynstep=20
  
# nombre de pas par jour (multiple de iperiod) ( ici pour  dt = 1 min )     
+
# Number of dynamical steps per day (must be a multiple of iperiod)
 
  day_step = 480
 
  day_step = 480
  
# periode pour le pas Matsuno (en pas)                                 
+
# Apply a Matsuno step every iperiod dynamical step
 
   iperiod=5
 
   iperiod=5
  
# periode de sortie des variables de controle (en pas)                 
+
# Control output information in the dynamics every iconser dynamical steps
 
   iconser=120
 
   iconser=120
  
# periode d'ecriture du fichier histoire (en jour)                     
+
# Apply dissipation every idissip dynamical steps
    iecri=100
 
 
 
# periode de stockage fichier histmoy (en jour)                       
 
periodav=60.
 
 
 
# periode de la dissipation (en pas)                                   
 
 
   idissip=5
 
   idissip=5
  
# choix de l'operateur de dissipation (star ou  non star )            
+
# dissipation operator to use (star or non-star)
 
  lstardis=.true.
 
  lstardis=.true.
  
# avec ou sans coordonnee hybrides
+
# use hybrid vertical coordinate (else will use sigma levels)
 
  hybrid=.true.
 
  hybrid=.true.
  
# nombre d'iterations de l'operateur de dissipation   gradiv          
+
# iterate lateral dissipation operator gradiv nitergdiv times
 
nitergdiv=1
 
nitergdiv=1
  
# nombre d'iterations de l'operateur de dissipation nxgradrot        
+
# iterate lateral dissipation operator nxgradrot nitergrot times
 
nitergrot=2
 
nitergrot=2
  
# nombre d'iterations de l'operateur de dissipation divgrad          
+
# iterate lateral dissipation operator divgrad niterh times
 
   niterh=2
 
   niterh=2
  
# temps de dissipation des plus petites long.d ondes pour u,v (gradiv)
+
# time scale (s) for shortest wavelengths for u,v (gradiv)
 
  tetagdiv= 3000.
 
  tetagdiv= 3000.
  
# temps de dissipation des plus petites long.d ondes pour u,v(nxgradrot)
+
# time scale (s) for shortest wavelengths for u,v (nxgradrot)
 
  tetagrot=9000.
 
  tetagrot=9000.
  
# temps de dissipation des plus petites long.d ondes pour  h ( divgrad)  
+
# time scale (s) for shortest wavelengths for h (divgrad)
 
  tetatemp=9000.
 
  tetatemp=9000.
  
# coefficient pour gamdissip                                             
+
# multiplicative constants for dissipation with altitude:
 +
# coefficient for middle atmosphere (~20-70km)
 +
dissip_fac_mid = 2
 +
# coefficient for upper atmosphere (~100km+)
 +
dissip_fac_up = 10
 +
 
 +
# coefficient for gamdissip                                             
 
   coefdis=0.
 
   coefdis=0.
  
# choix du shema d'integration temporelle (Matsuno ou Matsuno-leapfrog)  
+
# time marching scheme (Matsuno if purmats is true, else Matsuno-Leapfrog)
 
   purmats=.false.
 
   purmats=.false.
  
# avec ou sans physique                                               
+
# run with (true) or without (false) physics
 
   physic=.true.
 
   physic=.true.
  
# periode de la physique (en pas)                                     
+
# call physics every iphysiq dynamical steps
 
   iphysiq=10
 
   iphysiq=10
  
# choix d'une grille reguliere                                         
+
# Use a regular grid
 
   grireg=.true.
 
   grireg=.true.
  
# frequence (en pas) de l'ecriture du fichier diagfi              
+
# Output in diagfi file every ecritphy dynamical steps
 
  ecritphy=120
 
  ecritphy=120
# ecritphy=10
 
  
# longitude en degres du centre du zoom                                
+
# longitude (degrees) of zoom center
 
   clon=63.
 
   clon=63.
  
# latitude en degres du centre du zoom                                
+
# latitude (degrees) of zoom center
 
   clat=0.
 
   clat=0.
  
# facteur de grossissement du zoom,selon longitude                     
+
# enhancement factor of zoom, along longitudes
 
   grossismx=1.
 
   grossismx=1.
  
# facteur de grossissement du zoom ,selon latitude                     
+
# enhancement factor of zoom, along latitudes
 
  grossismy=1.
 
  grossismy=1.
  
Fonction  f(y) hyperbolique  si = .true. , sinon  sinusoidale       
+
Use an hyperbolic function f(y) if .true., else use a sine
 
   fxyhypb=.false.
 
   fxyhypb=.false.
  
# extension en longitude  de la zone du zoom ( fraction de la zone totale)
+
# extention along longitudes of zoom region (fraction of global domain)
 
   dzoomx= 0.
 
   dzoomx= 0.
  
# extension en latitude de la zone  du zoom ( fraction de la zone totale)
+
# extention along latitudes of zoom region (fraction of global domain)
 
   dzoomy=0.
 
   dzoomy=0.
  
# raideur du zoom en  X
+
# zoom stiffness along longitudes
 
     taux=2.
 
     taux=2.
  
# raideur du zoom en  Y
+
# zoom stiffness along latitudes
 
     tauy=2.
 
     tauy=2.
  
Fonction f(y) avec y = Sin(latit.) si = .TRUE. ,  Sinon y = latit.
+
Function f(y) as y = Sin(latitude) if = .true. ,  else y = latitude
 
   ysinus= .false.
 
   ysinus= .false.
  
# Avec sponge layer
+
# Use a sponge layer
 
   callsponge  = .true.
 
   callsponge  = .true.
 
   
 
   
# Sponge:  mode0(u=v=0), mode1(u=umoy,v=0), mode2(u=umoy,v=vmoy)
+
# Sponge layer extends over topmost nsponge layers
 +
  nsponge = 3
 +
 
 +
# Sponge:  relaxed towards teta=teta_ave
 +
#        and mode0(u=v=0), mode1(u=u_ave,v=0), mode2(u=u_ave,v=v_ave)
 
   mode_sponge= 2
 
   mode_sponge= 2
  
# Sponge:  hauteur de sponge (km)
+
# Sponge layer time scale (s):  tetasponge
  hsponge= 90
 
 
 
# Sponge:  tetasponge (secondes)
 
 
   tetasponge = 50000
 
   tetasponge = 50000
  
 
# some definitions for the physics, in file 'callphys.def'
 
# some definitions for the physics, in file 'callphys.def'
 
INCLUDEDEF=callphys.def
 
INCLUDEDEF=callphys.def
 +
 
</pre>
 
</pre>
  
 
'''Note''': Lines beginning with a hashtag are not read
 
'''Note''': Lines beginning with a hashtag are not read

Revision as of 14:43, 26 July 2022

The run.def input file and its format

The run.def file is a text file that is read at run time by the GCM (and must thus be present in the same directory as the executable). It contains the values of various parameters that the user can specify (as "key = value", where "key" is a predefined keyword and "value" may be a real, an integer, a string or a logical) and modify depending on the specific simulation that is intended, e.g. the line:

planet_type = generic

means that when the GCM will run, it will set parameter planet_type (which identifies the physics package that is used) to generic.

Any line starting with # is a comment, e.g.

# Number of days to run model for

The order in which parameters are given in the run.def file is not important, except if a parameter value is given more than once (not recommended!), then it is the last occurrence that prevails.

Worth knowing about: if a given "key" is not present in the file, then a default value (hard coded in the code) will be used for the related parameter.

*.def files included in run.def

The run.def file can include other files (based on the same format, lines containing "key = value" or comments) using the INCLUDEDEF keyword, e.g.:

INCLUDEDEF=callphys.def

This is a convenient way to separate related sets of parameters in separate files; common practice is to put dynamics related parameters in run.def and physics related parameters in callphys.def

Reference def files

Reference *.def files are provided in the LMDZ.GENERIC/deftank directory

Outputted used_*def files

When the GCM run finishes, for each of the input def files *.def, an ASCII output file used_*.def is generated (in practice these would be used_run.def and used_callphys.def). These files contain, along the same format as the *.def input files, the "key = value" that were used, along with comments about whether "value" was read in the input def file or if the code default was used (i.e. the sought "keyword" was not present in the input def files).

Example of run.def file

#
#----------------------------------------------------------------------- 
# Run control parameters:                                         
#------------------------

# planet type
planet_type = generic

# Number of days to run model for 
     nday=1

# ndynstep (overrides nday): number of dynamical steps to run for
#     ndynstep=20

# Number of dynamical steps per day (must be a multiple of iperiod)
 day_step = 480

# Apply a Matsuno step every iperiod dynamical step
  iperiod=5

# Control output information in the dynamics every iconser dynamical steps
  iconser=120

# Apply dissipation every idissip dynamical steps
  idissip=5

# dissipation operator to use (star or non-star)
 lstardis=.true.

# use hybrid vertical coordinate (else will use sigma levels)
 hybrid=.true.

# iterate lateral dissipation operator gradiv nitergdiv times
nitergdiv=1

# iterate lateral dissipation operator nxgradrot nitergrot times
nitergrot=2

# iterate lateral dissipation operator divgrad niterh times
   niterh=2

# time scale (s) for shortest wavelengths for u,v (gradiv)
 tetagdiv= 3000.

# time scale (s) for shortest wavelengths for u,v (nxgradrot)
 tetagrot=9000.

# time scale (s) for shortest wavelengths for h (divgrad)
 tetatemp=9000.

# multiplicative constants for dissipation with altitude:
# coefficient for middle atmosphere (~20-70km)
dissip_fac_mid = 2
# coefficient for upper atmosphere (~100km+)
dissip_fac_up = 10

# coefficient for gamdissip                                            
  coefdis=0.

# time marching scheme (Matsuno if purmats is true, else Matsuno-Leapfrog)
  purmats=.false.

# run with (true) or without (false) physics
   physic=.true.

# call physics every iphysiq dynamical steps
  iphysiq=10

# Use a regular grid
  grireg=.true.

# Output in diagfi file every ecritphy dynamical steps
 ecritphy=120

# longitude (degrees) of zoom center
   clon=63.

# latitude (degrees) of zoom center
   clat=0.

# enhancement factor of zoom, along longitudes
  grossismx=1.

# enhancement factor of zoom, along latitudes
 grossismy=1.

#  Use an hyperbolic function f(y) if .true., else use a sine
  fxyhypb=.false.

# extention along longitudes of zoom region (fraction of global domain)
   dzoomx= 0.

# extention along latitudes of zoom region (fraction of global domain)
   dzoomy=0.

# zoom stiffness along longitudes
    taux=2.

# zoom stiffness along latitudes
    tauy=2.

#  Function  f(y) as y = Sin(latitude) if = .true. ,  else  y = latitude
  ysinus= .false.

# Use a sponge layer
  callsponge  = .true.
 
# Sponge layer extends over topmost nsponge layers
  nsponge = 3

# Sponge:  relaxed towards teta=teta_ave
#        and mode0(u=v=0), mode1(u=u_ave,v=0), mode2(u=u_ave,v=v_ave)
  mode_sponge= 2

# Sponge layer time scale (s):  tetasponge
  tetasponge = 50000

# some definitions for the physics, in file 'callphys.def'
INCLUDEDEF=callphys.def

Note: Lines beginning with a hashtag are not read