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

From Planets
Jump to: navigation, search
 
Line 52: Line 52:
 
# Number of sols to run  
 
# Number of sols to run  
 
ndt            = 1000
 
ndt            = 1000
# Number of steps between each writting in diagfi  
+
# Number of steps between each writing in diagfi  
ecritphy=100
+
diagfi_output_rate=12
  
  
Line 138: Line 138:
  
 
[[Category:Generic-LMDZ]]
 
[[Category:Generic-LMDZ]]
 +
[[Category:Generic-1D]]

Latest revision as of 15:09, 30 April 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 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.