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

From Planets
Jump to: navigation, search
 
(13 intermediate revisions by 3 users not shown)
Line 2: Line 2:
  
 
=== some general comments and disambiguation to start with ===
 
=== some general comments and disambiguation to start with ===
−
This pages specifically focuses on the ''rcm1d.def'' file used by the 1D version of the Generic PCM.  
+
This page specifically focuses on the old ''rcm1d.def'' file used by the 1D version of the Generic PCM. The new one is this one [[The_1D_run.def_Input_File|'''this one''']].
 +
Please note that the file ''rcm1d.def'' is now only relevant for Venus and Titan, and even then, they are two very different files!
  
 
The rcm1d.def file is very similar to the [[The_run.def_Input_File|'''run.def''']] file (in fact, rcm1d.def is copied to run.def during execution of the 1D model), with the difference that the 3D options (linked to the dynamic core) are not used, and a whole bunch of new 1D-specific options (information contained in the start and startfi files) are now in the rcm1d.def file.
 
The rcm1d.def file is very similar to the [[The_run.def_Input_File|'''run.def''']] file (in fact, rcm1d.def is copied to run.def during execution of the 1D model), with the difference that the 3D options (linked to the dynamic core) are not used, and a whole bunch of new 1D-specific options (information contained in the start and startfi files) are now in the rcm1d.def file.
Line 10: Line 11:
  
 
== Outputted used_*def files ==
 
== 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).
+
When the GCM run finishes, for each of the input def files *.def, an ASCII output file '''used_*.def''' is generated (in practice this would be '''used_rcm1d.def''' and '''used_callphys.def''' for the 1D simulations). 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 ==
+
== Example of ''rcm1d.def'' file ==
  
 
<pre>
 
<pre>
−
#
+
#---------------------------------#
−
#-----------------------------------------------------------------------
+
# Run parameters for the 1D model #                                       
−
# Run control parameters:                                       
+
#---------------------------------#
−
#------------------------
 
  
−
# planet type
+
## Planetary constants
−
planet_type = generic # for pluto & exoplanets
+
## ~~~~~~~~~~~~~~~~~~~~~~~
−
planet_type = mars    # for mars
+
## NB: those are mandatory
−
planet_type = venus  # for venus
+
## ~~~~~~~~~~~~~~~~~~~~~~~
 +
## LENGTH OF A DAY in s
 +
daysec        = 86400.
 +
## GRAVITY in m s-2
 +
g              = 3.72
 +
## Radius of the planet, in m
 +
rad = 3390000
 +
## LENGTH OF A YEAR in days
 +
year_day      = 3000
 +
## MIN DIST STAR-PLANET in AU [periastron]
 +
periastr      = 1.0
 +
## MAX DIST STAR-PLANET in AU [apoastron]
 +
apoastr        = 1.0
 +
## DATE OF PERIASTRON in days
 +
peri_day      = 0.
 +
## OBLIQUITY in deg
 +
obliquit      = 0.
 +
## SURFACE PRESSURE in Pa
 +
psurf          = 100000.
  
−
# Number of days to run model for
+
## Time integration parameters
−
    nday=1
+
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
# Initial date (in solar days,=0 at Ls=0)
 +
day0          = 0
 +
# Initial local time (in hours, between 0 and 24)
 +
time          = 12
 +
# Number of time steps per sol
 +
day_step      = 40
 +
# Number of sols to run  
 +
ndt            = 1000
 +
# Number of steps between each writing in diagfi
 +
diagfi_output_rate=12
  
−
# ndynstep (overrides nday): number of dynamical steps to run for
 
−
#    ndynstep=20
 
  
−
# Number of dynamical steps per day (must be a multiple of iperiod)
+
## Vertical levels
−
day_step = 480
+
## ~~~~~~~~~~~~~~~
 +
# hybrid vertical coordinate ? (.true. for hybrid and .false. for sigma levels)
 +
hybrid        = .true.
 +
# autocompute vertical discretisation? (useful for exoplanet runs)
 +
autozlevs      = .false.
 +
# Ceiling pressure (Pa) ?
 +
pceil          = 0.00001
  
−
# Apply a Matsuno step every iperiod dynamical step
+
## Thermal properties
−
  iperiod=5
+
## ~~~~~~~~~~~~~~~~~~
 +
# Simulate global averaged conditions ?
 +
global1d      = .true.
 +
# Latitude (deg) [only used if global1d = F]
 +
latitude      = 0.0
 +
# Solar Zenith angle (deg) [only used if global1d = T]
 +
szangle        = 60.
 +
# Force specific heat capacity and molecular mass values
 +
force_cpp      = .false.
 +
# Specific heat capacity in J K-1 kg-1 [only used if force_cpp = T]
 +
cpp            = 0.
 +
# Molecular mass in g mol-1 [only used if force_cpp = T]
 +
mugaz          = 18.
 +
# Albedo of bare ground
 +
albedo        = 0.1
 +
# Emissivity of bare ground
 +
emis          = 1.0
 +
# Soil thermal inertia (SI)
 +
inertia        = 1000.
 +
# Initial CO2 ice on the surface (kg.m-2)
 +
co2ice        = 0.
  
−
# Control output information in the dynamics every iconser dynamical steps
+
## Wind profile
−
  iconser=120
+
## ~~~~~~~~~~~~
 +
## zonal eastward component of the geostrophic wind (m/s)
 +
u              = 10.
 +
# meridional northward component of the geostrophic wind (m/s)
 +
v              = 0.
  
−
# Apply dissipation every idissip dynamical steps
+
## Initial atmospheric temperature profile
−
  idissip=5
+
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
−
 
+
#
−
# dissipation operator to use (star or non-star)
+
# Type of initial temperature profile
−
  lstardis=.true.
+
#        ichoice=1  Constant Temperature: T=tref
−
 
+
#         [Mars] ichoice=2  Savidjari profile (as Seiff but with dT/dz=cte)
−
# use hybrid vertical coordinate (else will use sigma levels)
+
#         [Mars] ichoice=3  Lindner (polar profile)
−
hybrid=.true.
+
#         [Mars] ichoice=4  inversion
−
 
+
#         [Mars] ichoice=5  Seiff  (standard profile, based on Viking entry)
−
# iterate lateral dissipation operator gradiv nitergdiv times
+
#        ichoice=6  constant T  + gaussian perturbation (levels)
−
nitergdiv=1
+
#         ichoice=7  constant T  + gaussian perturbation (km)
−
 
+
#        ichoice=8  Read in an ascii file "profile"
−
# iterate lateral dissipation operator nxgradrot nitergrot times
+
ichoice        = 1
−
nitergrot=2
+
# Reference temperature tref (K)
−
 
+
tref          = 300.  
−
# iterate lateral dissipation operator divgrad niterh times
+
# Add a perturbation to profile if isin=1
−
  niterh=2
+
isin          = 0
−
 
+
# peak of gaussian perturbation (for ichoice=6 or 7)
−
# time scale (s) for shortest wavelengths for u,v (gradiv)
+
pic            = 26.522
−
  tetagdiv= 3000.
+
# width of the gaussian perturbation (for ichoice=6 or 7)
−
 
+
largeur        = 10
−
# time scale (s) for shortest wavelengths for u,v (nxgradrot)
+
# height of the gaussian perturbation (for ichoice=6 or 7)
−
tetagrot=9000.
+
hauteur        = 30.
−
 
 
−
# 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
 
  
 
</pre>
 
</pre>
Line 144: Line 129:
 
* The parsing is case-sensitive : "thisparameter=" and "ThisParameter=" are identified as two distinct keywords
 
* The parsing is case-sensitive : "thisparameter=" and "ThisParameter=" are identified as two distinct keywords
 
* The order in which the parameters are given in the file does not matter (except if a parameter is specified multiple times, clearly a bad idea, and then the last occurrence will prevail).
 
* The order in which the parameters are given in the file does not matter (except if a parameter is specified multiple times, clearly a bad idea, and then the last occurrence will prevail).
−
* Accessing a parameter and its value from ''run.def'' in the Fortran code is done using the '''getin_p''' routine, e.g.:
+
* Accessing a parameter and its value from ''rcm1d.def''/''run.def'' in the Fortran code is done using the '''getin_p''' routine, e.g.:
 
<syntaxhighlight lang="fortran">
 
<syntaxhighlight lang="fortran">
 
       call getin_p("keyword",val)
 
       call getin_p("keyword",val)
 
</syntaxhighlight>
 
</syntaxhighlight>
 
will look for the line with "keyword = " in file ''run.def'' and extract trailing value which will be use to set the value of the  '''val''' variable in the code.
 
will look for the line with "keyword = " in file ''run.def'' and extract trailing value which will be use to set the value of the  '''val''' variable in the code.
−
 
−
== Examples run.def for [[DYNAMICO]] ==
 
−
 
−
* [[run.def for Held&Suarez test case]]
 
−
* [[run.def for generic-DYNAMICO]]
 
−
* [[run.def for Venus-DYNAMICO]]
 
−
* [[run.def for Mars-DYNAMICO]]
 
−
* [[run.def for DYNAMICO-giant]]
 
−
* [[run.def for Pluto-DYNAMICO]]
 
  
 
[[Category:Inputs]]
 
[[Category:Inputs]]
Line 163: Line 139:
  
 
[[Category:Generic-LMDZ]]
 
[[Category:Generic-LMDZ]]
−
[[Category:Mars-LMDZ]]
+
[[Category:Generic-1D]]
−
[[Category:Venus-LMDZ]]
 
−
[[Category:DYNAMICO]]
 

Latest revision as of 16:16, 12 June 2026

The run.def input file and its format

some general comments and disambiguation to start with

This page specifically focuses on the old rcm1d.def file used by the 1D version of the Generic PCM. The new one is this one this one. Please note that the file rcm1d.def is now only relevant for Venus and Titan, and even then, they are two very different files!

The rcm1d.def file is very similar to the run.def file (in fact, rcm1d.def is copied to run.def during execution of the 1D model), with the difference that the 3D options (linked to the dynamic core) are not used, and a whole bunch of new 1D-specific options (information contained in the start and startfi files) are now in the rcm1d.def file.

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 this would be used_rcm1d.def and used_callphys.def for the 1D simulations). 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 rcm1d.def file

#---------------------------------#
# Run parameters for the 1D model #                                         
#---------------------------------#

## Planetary constants
## ~~~~~~~~~~~~~~~~~~~~~~~
## NB: those are mandatory
## ~~~~~~~~~~~~~~~~~~~~~~~
## LENGTH OF A DAY in s
daysec         = 86400.
## GRAVITY in m s-2
g              = 3.72
## Radius of the planet, in m
rad = 3390000
## LENGTH OF A YEAR in days
year_day       = 3000
## MIN DIST STAR-PLANET in AU [periastron]
periastr       = 1.0
## MAX DIST STAR-PLANET in AU [apoastron]
apoastr        = 1.0
## DATE OF PERIASTRON in days
peri_day       = 0.
## OBLIQUITY in deg
obliquit       = 0.
## SURFACE PRESSURE in Pa
psurf          = 100000.

## Time integration parameters
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Initial date (in solar days,=0 at Ls=0)
day0           = 0
# Initial local time (in hours, between 0 and 24)
time           = 12 
# Number of time steps per sol
day_step       = 40
# Number of sols to run 
ndt            = 1000
# Number of steps between each writing in diagfi 
diagfi_output_rate=12


## Vertical levels
## ~~~~~~~~~~~~~~~
# hybrid vertical coordinate ? (.true. for hybrid and .false. for sigma levels)
hybrid         = .true.
# autocompute vertical discretisation? (useful for exoplanet runs)
autozlevs      = .false.
# Ceiling pressure (Pa) ?
pceil          = 0.00001

## Thermal properties
## ~~~~~~~~~~~~~~~~~~
# Simulate global averaged conditions ? 
global1d       = .true.
# Latitude (deg) [only used if global1d = F]
latitude       = 0.0
# Solar Zenith angle (deg) [only used if global1d = T]
szangle        = 60. 
# Force specific heat capacity and molecular mass values
force_cpp      = .false.
# Specific heat capacity in J K-1 kg-1 [only used if force_cpp = T]
cpp            = 0.
# Molecular mass in g mol-1 [only used if force_cpp = T]
mugaz          = 18.
# Albedo of bare ground
albedo         = 0.1
# Emissivity of bare ground
emis           = 1.0
# Soil thermal inertia (SI)
inertia        = 1000.
# Initial CO2 ice on the surface (kg.m-2)
co2ice         = 0.

## Wind profile
## ~~~~~~~~~~~~
## zonal eastward component of the geostrophic wind (m/s)
u              = 10.
# meridional northward component of the geostrophic wind (m/s)
v              = 0.

## Initial atmospheric temperature profile
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Type of initial temperature profile
#         ichoice=1   Constant Temperature:  T=tref
#         [Mars] ichoice=2   Savidjari profile (as Seiff but with dT/dz=cte)
#         [Mars] ichoice=3   Lindner (polar profile)
#         [Mars] ichoice=4   inversion
#         [Mars] ichoice=5   Seiff  (standard profile, based on Viking entry)
#         ichoice=6   constant T  +  gaussian perturbation (levels)
#         ichoice=7   constant T  + gaussian perturbation (km)
#         ichoice=8   Read in an ascii file "profile" 
ichoice        = 1
# Reference temperature tref (K)
tref           = 300. 
# Add a perturbation to profile if isin=1
isin           = 0
# peak of gaussian perturbation (for ichoice=6 or 7)
pic            = 26.522
# width of the gaussian perturbation (for ichoice=6 or 7)
largeur        = 10
# height of the gaussian perturbation (for ichoice=6 or 7)
hauteur        = 30.



Notes:

  • Lines beginning with a hashtag are comments
  • values associated to keywords may be logicals, integers, reals or even strings
  • The parsing is case-sensitive : "thisparameter=" and "ThisParameter=" are identified as two distinct keywords
  • The order in which the parameters are given in the file does not matter (except if a parameter is specified multiple times, clearly a bad idea, and then the last occurrence will prevail).
  • Accessing a parameter and its value from rcm1d.def/run.def in the Fortran code is done using the getin_p routine, e.g.:
       call getin_p("keyword",val)

will look for the line with "keyword = " in file run.def and extract trailing value which will be use to set the value of the val variable in the code.