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

From Planets
Jump to: navigation, search
(Outputted used_*def files)
(Example of run.def file)
Line 15: Line 15:
  
 
<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          = 700000.
  
# Number of days to run model for
+
mugaz = 44.0
    nday=1
+
cpp = 846.0
  
# ndynstep (overrides nday): number of dynamical steps to run for
+
## Time integration parameters
#     ndynstep=20
+
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 +
# 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            = 10000
 +
# Number of steps between each writting in diagfi
 +
ecritphy=400
  
# Number of dynamical steps per day (must be a multiple of iperiod)
 
day_step = 480
 
  
# Apply a Matsuno step every iperiod dynamical step
+
## Vertical levels
  iperiod=5
+
## ~~~~~~~~~~~~~~~
 +
# 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
  
# Control output information in the dynamics every iconser dynamical steps
+
## Thermal properties
  iconser=120
+
## ~~~~~~~~~~~~~~~~~~
 +
# 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          = 0.
 +
# 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.
  
# Apply dissipation every idissip dynamical steps
+
## Wind profile
  idissip=5
+
## ~~~~~~~~~~~~
 +
## zonal eastward component of the geostrophic wind (m/s)
 +
u              = 10.
 +
# meridional northward component of the geostrophic wind (m/s)
 +
v              = 0.
  
# dissipation operator to use (star or non-star)
+
## Initial atmospheric temperature profile
lstardis=.true.
+
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+
#
# use hybrid vertical coordinate (else will use sigma levels)
+
# Type of initial temperature profile
hybrid=.true.
+
#         ichoice=1   Constant Temperature:  T=tref
 
+
#         [Mars] ichoice=2   Savidjari profile (as Seiff but with dT/dz=cte)
# iterate lateral dissipation operator gradiv nitergdiv times
+
#         [Mars] ichoice=3  Lindner (polar profile)
nitergdiv=1
+
#         [Mars] ichoice=4  inversion
 
+
#         [Mars] ichoice=5   Seiff  (standard profile, based on Viking entry)
# iterate lateral dissipation operator nxgradrot nitergrot times
+
#        ichoice=6   constant T  +  gaussian perturbation (levels)
nitergrot=2
+
#         ichoice=7   constant T + gaussian perturbation (km)
 
+
#         ichoice=8   Read in an ascii file "profile"
# iterate lateral dissipation operator divgrad niterh times
+
ichoice        = 1
  niterh=2
+
# Reference temperature tref (K)
 
+
tref          = 300.  
# time scale (s) for shortest wavelengths for u,v (gradiv)
+
# Add a perturbation to profile if isin=1
tetagdiv= 3000.
+
isin          = 0
 
+
# peak of gaussian perturbation (for ichoice=6 or 7)
# time scale (s) for shortest wavelengths for u,v (nxgradrot)
+
pic            = 26.522
tetagrot=9000.
+
# width of the gaussian perturbation (for ichoice=6 or 7)
 
+
largeur        = 10
# time scale (s) for shortest wavelengths for h (divgrad)
+
# height of the gaussian perturbation (for ichoice=6 or 7)
tetatemp=9000.
+
hauteur        = 30.
 
 
# 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 131:
 
* 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)

Revision as of 11:54, 5 March 2025

The run.def input file and its format

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.

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 run.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          = 700000.

mugaz = 44.0
cpp = 846.0

## 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            = 10000
# Number of steps between each writting in diagfi 
ecritphy=400


## 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          = 0.
# 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.

Examples run.def for DYNAMICO