<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jleconte</id>
		<title>Planets - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jleconte"/>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Special:Contributions/Jleconte"/>
		<updated>2026-06-11T07:14:15Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Convective_adjustment_scheme_in_the_generic_PCM&amp;diff=2712</id>
		<title>Convective adjustment scheme in the generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Convective_adjustment_scheme_in_the_generic_PCM&amp;diff=2712"/>
				<updated>2025-04-30T09:26:35Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''IMPORTANT''': This page concerns the convadj routine in the Generic physics package (by the way the latest version may be checked here on the trac: https://trac.lmd.jussieu.fr/Planeto/browser/trunk/LMDZ.GENERIC/libf/phystd/convadj.F&lt;br /&gt;
&lt;br /&gt;
== Overview of the convadj routine ==&lt;br /&gt;
The dry convective adjustment is simply a scheme which accounts for the fact that a thermally unstable profile will rapidly be mixed by unresolved (sub-grid-scale) vertical motion and brought back to being stable. This process will not only affect the temperature of the parcel but also tracers and winds (as the convective motion also transports momentum).&lt;br /&gt;
&lt;br /&gt;
It can be turned on with the convadj=.True. keyword. &lt;br /&gt;
&lt;br /&gt;
== Description of assumptions and computations ==&lt;br /&gt;
* Estimation of whether a profile is thermally unstable is done by checking the sign of the vertical gradient of potential temperature $$\partial \theta / \partial z$$ (negative when unstable) &lt;br /&gt;
* Unstable regions are brought back to being adiabatic, i.e. such that :  $$\partial \theta / \partial z = 0$$, while conserving the enthalpy of the column&lt;br /&gt;
* based on the &amp;quot;intensity&amp;quot; of the instability, estimated from the relative enthaply exchange necessary to restore the adiabaticity of the profile, related momentum mixing is evaluated and converted to tendencies on the horizontal winds of the air parcel. This momentum transfer evaluation is also used to estimate tracer transfer.&lt;br /&gt;
&lt;br /&gt;
== Mean molecular weight effect ==&lt;br /&gt;
If you have a condensing generic tracer and the virtual_theta_correction keyword is True, then the instability of the column is inferred from the gradient of the virtual potential temperature to account for the mean molecular weight effect. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
See Hourdin et al. JAS 1993 https://doi.org/10.1175/1520-0469(1993)050%3C3625:MVATAS%3E2.0.CO;2&lt;br /&gt;
&lt;br /&gt;
[[Category:Generic-Model]]&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Physics_of_the_Generic_PCM&amp;diff=2707</id>
		<title>Physics of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Physics_of_the_Generic_PCM&amp;diff=2707"/>
				<updated>2025-04-30T09:15:34Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: /* Thermal plume (thermcell_mod.F90) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the various physical parametrizations of the Generic PCM and the chronology of their call through the physical iteration. This chronology is important because some variables need to be updated by certain processes before others (examples).   &lt;br /&gt;
During one physical iteration, the code passes through multiple sub-routines each encapsulating a parametrization. The sub-routines usually take as arguments:&lt;br /&gt;
*the dynamical values of the state variables&lt;br /&gt;
*the dynamical tendencies of the state variables&lt;br /&gt;
*any additional relevant variable&lt;br /&gt;
*any additional relevant tendency&lt;br /&gt;
and it returns in general tendencies (of the state variables as well as of any other relevant variable).&lt;br /&gt;
&lt;br /&gt;
Work in progress. Need to add links.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
==First call==&lt;br /&gt;
Some initializations only need to be done at the very first iteration (e.g. examples).&lt;br /&gt;
==Each call==&lt;br /&gt;
Some other initializations need to be done at each iteration (e.g. examples).&lt;br /&gt;
&lt;br /&gt;
=Radiative transfer=&lt;br /&gt;
==Correlated-k==&lt;br /&gt;
The main radiative transfer solver of the Generic PCM implements the correlated-k method, which provides a flexible and quick way to solve radiative transfer equations, particularly suited for GCMs. More informations here.&lt;br /&gt;
==Newtonian relaxation==&lt;br /&gt;
Newton was a very relaxed physicist, still inspiring us today.&lt;br /&gt;
==No atmosphere==&lt;br /&gt;
If you have no atmosphere, why do you need a GCM?&lt;br /&gt;
&lt;br /&gt;
=Vertical diffusion=&lt;br /&gt;
Compute the vertical diffusion due to turbulence in the planetary boundary layer&lt;br /&gt;
==vdifc==&lt;br /&gt;
The &amp;quot;old&amp;quot; vertical diffusion routine.&lt;br /&gt;
==turbdiff==&lt;br /&gt;
The new (and improved!) vertical diffusion routine&lt;br /&gt;
&lt;br /&gt;
=Convection=&lt;br /&gt;
&lt;br /&gt;
Convective mixing in an atmosphere column involves non-resolved, sub-grid processes. To treat convectively unstable regions, there are two mutually exclusive options (convadj.F90 and thermcell_mod.F90). These processes are parameterized using the following routines:&lt;br /&gt;
&lt;br /&gt;
==Dry convection (convadj.F90)==&lt;br /&gt;
&lt;br /&gt;
This is the simplest and most robust parametrization for dry convective adjustment without free parameters. More info [[Convective_adjustment_scheme_in_the_generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Thermal plume (thermcell_mod.F90)==&lt;br /&gt;
This module implements a more accurate and sophisticated parametrization of convection, although it involves several free parameters that need to be tuned for each planet. More info [[Thermal_plume_model_Generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Non-orographic gravity waves:  (''nonoro_gwd_ran_mod.F90'') ==&lt;br /&gt;
&lt;br /&gt;
Parametrization of the momentum flux deposition due to a discrete number of gravity waves randomly generated by setting their waves characteristics (set as Gaussian distribution).  &lt;br /&gt;
&lt;br /&gt;
More info [[Non orographic gravity waves drag|here]].&lt;br /&gt;
&lt;br /&gt;
=CO2 condensation=&lt;br /&gt;
Inheriting from the Mars PCM where it is the background species, CO2 condensation is treated as a dedicated step in the Generic PCM's physics. Does that only concern CO2 as a background gas? Or does it work also if CO2 is a non-background variable gas? In any case more info here.&lt;br /&gt;
&lt;br /&gt;
=Tracers=&lt;br /&gt;
Many things can be advected by tracers in the Generic PCM, like chemical species or aerosols. Physical processes involving tracers are parameterized using the following routines:&lt;br /&gt;
&lt;br /&gt;
==Volcano==&lt;br /&gt;
This routine parameterizes a source of tracers corresponding to volcanic eruption. More information here.&lt;br /&gt;
&lt;br /&gt;
==Water/ice==&lt;br /&gt;
Water aerosols (liquid or solid) are created (resp. consumed) by condensation (resp. vaporization or sublimation), consuming (resp. releasing) latent heat in the atmosphere. In the Generic PCM, the (atmospheric part of the) water cycle is handled by various routines, as explained here.&lt;br /&gt;
&lt;br /&gt;
==Photochemistry==&lt;br /&gt;
Chemistry can turn molecules into other molecules, by the action of temperature (thermochemistry) or UV light (photochemistry). This is handled by the photochemistry routine, described [[Photochemistry|here]].&lt;br /&gt;
&lt;br /&gt;
==Generic condensation==&lt;br /&gt;
On Earth, only water condenses in the atmosphere, but on other planets (which the Generic PCM aims at simulating), many other chemicals can undergo state change. To take that into account, the Generic PCM has a flexible scheme to deal with any arbitrary species, as desbribed [[Radiative_Generic_Condensable_Specie|here]].&lt;br /&gt;
&lt;br /&gt;
==Sedimentation==&lt;br /&gt;
What goes up must come down, as explained [[Sedimentation_of_tracers_in_the_generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
This section essentially takes care that the condensation of a major species (e.g. water vapor in steam-rich atmospheres) affects other species, as described here.&lt;br /&gt;
&lt;br /&gt;
==Slab ocean==&lt;br /&gt;
This routine solves for big fish eating small fish, as described [[Slab_ocean_model|here]].&lt;br /&gt;
&lt;br /&gt;
==Surface==&lt;br /&gt;
The surface part of the water cycle is handled here, as the hydrology page describes.&lt;br /&gt;
&lt;br /&gt;
=Heat Conduction in the Subsurface=&lt;br /&gt;
The conduction of heat in the subsurface is solved as described [[Soil_Thermal_Conduction_in_the_Generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
=Diagnostics/write outputs=&lt;br /&gt;
Nothing very physical here, just writting the outputs! By the way, if you want to know how to output new variables in the [[diagfi.nc]] or [[XIOS]] file, check out [[Outputs|this page]].&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Physics_of_the_Generic_PCM&amp;diff=2705</id>
		<title>Physics of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Physics_of_the_Generic_PCM&amp;diff=2705"/>
				<updated>2025-04-30T09:12:43Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: /* Dry convection (convadj.F90) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the various physical parametrizations of the Generic PCM and the chronology of their call through the physical iteration. This chronology is important because some variables need to be updated by certain processes before others (examples).   &lt;br /&gt;
During one physical iteration, the code passes through multiple sub-routines each encapsulating a parametrization. The sub-routines usually take as arguments:&lt;br /&gt;
*the dynamical values of the state variables&lt;br /&gt;
*the dynamical tendencies of the state variables&lt;br /&gt;
*any additional relevant variable&lt;br /&gt;
*any additional relevant tendency&lt;br /&gt;
and it returns in general tendencies (of the state variables as well as of any other relevant variable).&lt;br /&gt;
&lt;br /&gt;
Work in progress. Need to add links.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
==First call==&lt;br /&gt;
Some initializations only need to be done at the very first iteration (e.g. examples).&lt;br /&gt;
==Each call==&lt;br /&gt;
Some other initializations need to be done at each iteration (e.g. examples).&lt;br /&gt;
&lt;br /&gt;
=Radiative transfer=&lt;br /&gt;
==Correlated-k==&lt;br /&gt;
The main radiative transfer solver of the Generic PCM implements the correlated-k method, which provides a flexible and quick way to solve radiative transfer equations, particularly suited for GCMs. More informations here.&lt;br /&gt;
==Newtonian relaxation==&lt;br /&gt;
Newton was a very relaxed physicist, still inspiring us today.&lt;br /&gt;
==No atmosphere==&lt;br /&gt;
If you have no atmosphere, why do you need a GCM?&lt;br /&gt;
&lt;br /&gt;
=Vertical diffusion=&lt;br /&gt;
Compute the vertical diffusion due to turbulence in the planetary boundary layer&lt;br /&gt;
==vdifc==&lt;br /&gt;
The &amp;quot;old&amp;quot; vertical diffusion routine.&lt;br /&gt;
==turbdiff==&lt;br /&gt;
The new (and improved!) vertical diffusion routine&lt;br /&gt;
&lt;br /&gt;
=Convection=&lt;br /&gt;
&lt;br /&gt;
Convective mixing in an atmosphere column involves non-resolved, sub-grid processes. To treat convectively unstable regions, there are two mutually exclusive options (convadj.F90 and thermcell_mod.F90). These processes are parameterized using the following routines:&lt;br /&gt;
&lt;br /&gt;
==Dry convection (convadj.F90)==&lt;br /&gt;
&lt;br /&gt;
This is the simplest and most robust parametrization for dry convective adjustment without free parameters. More info [[Convective_adjustment_scheme_in_the_generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Thermal plume (thermcell_mod.F90)==&lt;br /&gt;
This module implements a more accurate and sophisticated parametrization of convection. More info [[Thermal_plume_model_Generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Non-orographic gravity waves:  (''nonoro_gwd_ran_mod.F90'') ==&lt;br /&gt;
&lt;br /&gt;
Parametrization of the momentum flux deposition due to a discrete number of gravity waves randomly generated by setting their waves characteristics (set as Gaussian distribution).  &lt;br /&gt;
&lt;br /&gt;
More info [[Non orographic gravity waves drag|here]].&lt;br /&gt;
&lt;br /&gt;
=CO2 condensation=&lt;br /&gt;
Inheriting from the Mars PCM where it is the background species, CO2 condensation is treated as a dedicated step in the Generic PCM's physics. Does that only concern CO2 as a background gas? Or does it work also if CO2 is a non-background variable gas? In any case more info here.&lt;br /&gt;
&lt;br /&gt;
=Tracers=&lt;br /&gt;
Many things can be advected by tracers in the Generic PCM, like chemical species or aerosols. Physical processes involving tracers are parameterized using the following routines:&lt;br /&gt;
&lt;br /&gt;
==Volcano==&lt;br /&gt;
This routine parameterizes a source of tracers corresponding to volcanic eruption. More information here.&lt;br /&gt;
&lt;br /&gt;
==Water/ice==&lt;br /&gt;
Water aerosols (liquid or solid) are created (resp. consumed) by condensation (resp. vaporization or sublimation), consuming (resp. releasing) latent heat in the atmosphere. In the Generic PCM, the (atmospheric part of the) water cycle is handled by various routines, as explained here.&lt;br /&gt;
&lt;br /&gt;
==Photochemistry==&lt;br /&gt;
Chemistry can turn molecules into other molecules, by the action of temperature (thermochemistry) or UV light (photochemistry). This is handled by the photochemistry routine, described [[Photochemistry|here]].&lt;br /&gt;
&lt;br /&gt;
==Generic condensation==&lt;br /&gt;
On Earth, only water condenses in the atmosphere, but on other planets (which the Generic PCM aims at simulating), many other chemicals can undergo state change. To take that into account, the Generic PCM has a flexible scheme to deal with any arbitrary species, as desbribed [[Radiative_Generic_Condensable_Specie|here]].&lt;br /&gt;
&lt;br /&gt;
==Sedimentation==&lt;br /&gt;
What goes up must come down, as explained [[Sedimentation_of_tracers_in_the_generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
This section essentially takes care that the condensation of a major species (e.g. water vapor in steam-rich atmospheres) affects other species, as described here.&lt;br /&gt;
&lt;br /&gt;
==Slab ocean==&lt;br /&gt;
This routine solves for big fish eating small fish, as described [[Slab_ocean_model|here]].&lt;br /&gt;
&lt;br /&gt;
==Surface==&lt;br /&gt;
The surface part of the water cycle is handled here, as the hydrology page describes.&lt;br /&gt;
&lt;br /&gt;
=Heat Conduction in the Subsurface=&lt;br /&gt;
The conduction of heat in the subsurface is solved as described [[Soil_Thermal_Conduction_in_the_Generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
=Diagnostics/write outputs=&lt;br /&gt;
Nothing very physical here, just writting the outputs! By the way, if you want to know how to output new variables in the [[diagfi.nc]] or [[XIOS]] file, check out [[Outputs|this page]].&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Physics_of_the_Generic_PCM&amp;diff=2703</id>
		<title>Physics of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Physics_of_the_Generic_PCM&amp;diff=2703"/>
				<updated>2025-04-30T09:09:23Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the various physical parametrizations of the Generic PCM and the chronology of their call through the physical iteration. This chronology is important because some variables need to be updated by certain processes before others (examples).   &lt;br /&gt;
During one physical iteration, the code passes through multiple sub-routines each encapsulating a parametrization. The sub-routines usually take as arguments:&lt;br /&gt;
*the dynamical values of the state variables&lt;br /&gt;
*the dynamical tendencies of the state variables&lt;br /&gt;
*any additional relevant variable&lt;br /&gt;
*any additional relevant tendency&lt;br /&gt;
and it returns in general tendencies (of the state variables as well as of any other relevant variable).&lt;br /&gt;
&lt;br /&gt;
Work in progress. Need to add links.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
==First call==&lt;br /&gt;
Some initializations only need to be done at the very first iteration (e.g. examples).&lt;br /&gt;
==Each call==&lt;br /&gt;
Some other initializations need to be done at each iteration (e.g. examples).&lt;br /&gt;
&lt;br /&gt;
=Radiative transfer=&lt;br /&gt;
==Correlated-k==&lt;br /&gt;
The main radiative transfer solver of the Generic PCM implements the correlated-k method, which provides a flexible and quick way to solve radiative transfer equations, particularly suited for GCMs. More informations here.&lt;br /&gt;
==Newtonian relaxation==&lt;br /&gt;
Newton was a very relaxed physicist, still inspiring us today.&lt;br /&gt;
==No atmosphere==&lt;br /&gt;
If you have no atmosphere, why do you need a GCM?&lt;br /&gt;
&lt;br /&gt;
=Vertical diffusion=&lt;br /&gt;
Compute the vertical diffusion due to turbulence in the planetary boundary layer&lt;br /&gt;
==vdifc==&lt;br /&gt;
The &amp;quot;old&amp;quot; vertical diffusion routine.&lt;br /&gt;
==turbdiff==&lt;br /&gt;
The new (and improved!) vertical diffusion routine&lt;br /&gt;
&lt;br /&gt;
=Convection=&lt;br /&gt;
&lt;br /&gt;
Convective mixing in an atmosphere column involves non-resolved, sub-grid processes. To treat convectively unstable regions, there are two mutually exclusive options (convadj.F90 and thermcell_mod.F90). These processes are parameterized using the following routines:&lt;br /&gt;
&lt;br /&gt;
==Dry convection (convadj.F90)==&lt;br /&gt;
More info [[Convective_adjustment_scheme_in_the_generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Thermal plume (thermcell_mod.F90)==&lt;br /&gt;
This module implements a more accurate and sophisticated parametrization of convection. More info [[Thermal_plume_model_Generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Non-orographic gravity waves:  (''nonoro_gwd_ran_mod.F90'') ==&lt;br /&gt;
&lt;br /&gt;
Parametrization of the momentum flux deposition due to a discrete number of gravity waves randomly generated by setting their waves characteristics (set as Gaussian distribution).  &lt;br /&gt;
&lt;br /&gt;
More info [[Non orographic gravity waves drag|here]].&lt;br /&gt;
&lt;br /&gt;
=CO2 condensation=&lt;br /&gt;
Inheriting from the Mars PCM where it is the background species, CO2 condensation is treated as a dedicated step in the Generic PCM's physics. Does that only concern CO2 as a background gas? Or does it work also if CO2 is a non-background variable gas? In any case more info here.&lt;br /&gt;
&lt;br /&gt;
=Tracers=&lt;br /&gt;
Many things can be advected by tracers in the Generic PCM, like chemical species or aerosols. Physical processes involving tracers are parameterized using the following routines:&lt;br /&gt;
&lt;br /&gt;
==Volcano==&lt;br /&gt;
This routine parameterizes a source of tracers corresponding to volcanic eruption. More information here.&lt;br /&gt;
&lt;br /&gt;
==Water/ice==&lt;br /&gt;
Water aerosols (liquid or solid) are created (resp. consumed) by condensation (resp. vaporization or sublimation), consuming (resp. releasing) latent heat in the atmosphere. In the Generic PCM, the (atmospheric part of the) water cycle is handled by various routines, as explained here.&lt;br /&gt;
&lt;br /&gt;
==Photochemistry==&lt;br /&gt;
Chemistry can turn molecules into other molecules, by the action of temperature (thermochemistry) or UV light (photochemistry). This is handled by the photochemistry routine, described [[Photochemistry|here]].&lt;br /&gt;
&lt;br /&gt;
==Generic condensation==&lt;br /&gt;
On Earth, only water condenses in the atmosphere, but on other planets (which the Generic PCM aims at simulating), many other chemicals can undergo state change. To take that into account, the Generic PCM has a flexible scheme to deal with any arbitrary species, as desbribed [[Radiative_Generic_Condensable_Specie|here]].&lt;br /&gt;
&lt;br /&gt;
==Sedimentation==&lt;br /&gt;
What goes up must come down, as explained [[Sedimentation_of_tracers_in_the_generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
==Updates==&lt;br /&gt;
This section essentially takes care that the condensation of a major species (e.g. water vapor in steam-rich atmospheres) affects other species, as described here.&lt;br /&gt;
&lt;br /&gt;
==Slab ocean==&lt;br /&gt;
This routine solves for big fish eating small fish, as described [[Slab_ocean_model|here]].&lt;br /&gt;
&lt;br /&gt;
==Surface==&lt;br /&gt;
The surface part of the water cycle is handled here, as the hydrology page describes.&lt;br /&gt;
&lt;br /&gt;
=Heat Conduction in the Subsurface=&lt;br /&gt;
The conduction of heat in the subsurface is solved as described [[Soil_Thermal_Conduction_in_the_Generic_PCM|here]].&lt;br /&gt;
&lt;br /&gt;
=Diagnostics/write outputs=&lt;br /&gt;
Nothing very physical here, just writting the outputs! By the way, if you want to know how to output new variables in the [[diagfi.nc]] or [[XIOS]] file, check out [[Outputs|this page]].&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=The_start.nc_and_startfi.nc_input_files&amp;diff=2151</id>
		<title>The start.nc and startfi.nc input files</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=The_start.nc_and_startfi.nc_input_files&amp;diff=2151"/>
				<updated>2024-10-16T09:58:41Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== GCM initial condition files ==&lt;br /&gt;
&lt;br /&gt;
To run, the GCM requires initial conditions (i.e. values of state variables at a given instant). These are provided as two NetCDF files, '''start.nc''' (which contains state variables for the dynamics) and '''startfi.nc''' (state variables for the physics). As these files contain information about fields at given grid points, they must be ''at the same resolution'' as the GCM; in other words, the GCM does not do any interpolation of initial conditions which must thus be provided on the exact same grid that the model uses.&lt;br /&gt;
&lt;br /&gt;
== start.nc file Contents ==&lt;br /&gt;
A dump of the header of a typical '''start.nc''' (obtained via '''ncdump -h start.nc''') will show contents of the likes of:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf start {&lt;br /&gt;
dimensions:&lt;br /&gt;
	index = 100 ;&lt;br /&gt;
	rlonu = 33 ;&lt;br /&gt;
	latitude = 33 ;&lt;br /&gt;
	longitude = 33 ;&lt;br /&gt;
	rlatv = 32 ;&lt;br /&gt;
	altitude = 15 ;&lt;br /&gt;
	interlayer = 16 ;&lt;br /&gt;
	Time = UNLIMITED ; // (1 currently)&lt;br /&gt;
variables:&lt;br /&gt;
	float controle(index) ;&lt;br /&gt;
		controle:title = &amp;quot;Parametres de controle&amp;quot; ;&lt;br /&gt;
	float rlonu(rlonu) ;&lt;br /&gt;
		rlonu:title = &amp;quot;Longitudes des points U&amp;quot; ;&lt;br /&gt;
	float rlatu(latitude) ;&lt;br /&gt;
		rlatu:title = &amp;quot;Latitudes des points U&amp;quot; ;&lt;br /&gt;
	float rlonv(longitude) ;&lt;br /&gt;
		rlonv:title = &amp;quot;Longitudes des points V&amp;quot; ;&lt;br /&gt;
	float rlatv(rlatv) ;&lt;br /&gt;
		rlatv:title = &amp;quot;Latitudes des points V&amp;quot; ;&lt;br /&gt;
	float ap(interlayer) ;&lt;br /&gt;
		ap:title = &amp;quot;Coef A: hybrid pressure levels&amp;quot; ;&lt;br /&gt;
	float bp(interlayer) ;&lt;br /&gt;
		bp:title = &amp;quot;Coef B: hybrid sigma levels&amp;quot; ;&lt;br /&gt;
	float aps(altitude) ;&lt;br /&gt;
		aps:title = &amp;quot;Coef AS: hybrid pressure at midlayers&amp;quot; ;&lt;br /&gt;
	float bps(altitude) ;&lt;br /&gt;
		bps:title = &amp;quot;Coef BS: hybrid sigma at midlayers&amp;quot; ;&lt;br /&gt;
	float presnivs(altitude) ;&lt;br /&gt;
	float latitude(latitude) ;&lt;br /&gt;
		latitude:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
		latitude:long_name = &amp;quot;North latitude&amp;quot; ;&lt;br /&gt;
	float longitude(longitude) ;&lt;br /&gt;
		longitude:long_name = &amp;quot;East longitude&amp;quot; ;&lt;br /&gt;
		longitude:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
	float altitude(altitude) ;&lt;br /&gt;
		altitude:long_name = &amp;quot;pseudo-alt&amp;quot; ;&lt;br /&gt;
		altitude:units = &amp;quot;km&amp;quot; ;&lt;br /&gt;
		altitude:positive = &amp;quot;up&amp;quot; ;&lt;br /&gt;
	float cu(latitude, rlonu) ;&lt;br /&gt;
		cu:title = &amp;quot;Coefficient de passage pour U&amp;quot; ;&lt;br /&gt;
	float cv(rlatv, longitude) ;&lt;br /&gt;
		cv:title = &amp;quot;Coefficient de passage pour V&amp;quot; ;&lt;br /&gt;
	float aire(latitude, longitude) ;&lt;br /&gt;
		aire:title = &amp;quot;Aires de chaque maille&amp;quot; ;&lt;br /&gt;
	float phisinit(latitude, longitude) ;&lt;br /&gt;
		phisinit:title = &amp;quot;Geopotentiel au sol&amp;quot; ;&lt;br /&gt;
	float Time(Time) ;&lt;br /&gt;
		Time:title = &amp;quot;Temps de simulation&amp;quot; ;&lt;br /&gt;
		Time:units = &amp;quot;days since    1-01-01 00:00:00&amp;quot; ;&lt;br /&gt;
	float ucov(Time, altitude, latitude, rlonu) ;&lt;br /&gt;
		ucov:title = &amp;quot;Vitesse U&amp;quot; ;&lt;br /&gt;
	float vcov(Time, altitude, rlatv, longitude) ;&lt;br /&gt;
		vcov:title = &amp;quot;Vitesse V&amp;quot; ;&lt;br /&gt;
	float teta(Time, altitude, latitude, longitude) ;&lt;br /&gt;
		teta:title = &amp;quot;Temperature&amp;quot; ;&lt;br /&gt;
	float co2_ice(Time, altitude, latitude, longitude) ;&lt;br /&gt;
		co2_ice:title = &amp;quot;Traceur co2_ice&amp;quot; ;&lt;br /&gt;
	float h2o_ice(Time, altitude, latitude, longitude) ;&lt;br /&gt;
		h2o_ice:title = &amp;quot;Traceur h2o_ice&amp;quot; ;&lt;br /&gt;
	float h2o_vap(Time, altitude, latitude, longitude) ;&lt;br /&gt;
		h2o_vap:title = &amp;quot;Traceur h2o_vap&amp;quot; ;&lt;br /&gt;
	float masse(Time, altitude, latitude, longitude) ;&lt;br /&gt;
		masse:title = &amp;quot;C est quoi ?&amp;quot; ;&lt;br /&gt;
	float ps(Time, latitude, longitude) ;&lt;br /&gt;
		ps:title = &amp;quot;Pression au sol&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes:&lt;br /&gt;
		:title = &amp;quot;Dynamic start file&amp;quot; ;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== controle ===&lt;br /&gt;
The variable &amp;quot;controle&amp;quot; lists a set of parameters.&lt;br /&gt;
The first three parameters are always:&lt;br /&gt;
* 1          : im         (physical points)&lt;br /&gt;
* 2          : jm         (nb of layers)&lt;br /&gt;
* 3          : lllm       &lt;br /&gt;
&lt;br /&gt;
Then there is either for the generic/mars/pluto model:&lt;br /&gt;
* 4          : day_ref &lt;br /&gt;
or for earth/titan:&lt;br /&gt;
* 4          : day_ini &lt;br /&gt;
* 5          : annee_ref&lt;br /&gt;
&lt;br /&gt;
Then idecal is set to 4 in the generic/mars/pluto model and 5 for earth/titan.&lt;br /&gt;
&lt;br /&gt;
The list follows as such:&lt;br /&gt;
* idecal+1   : rad       (planet radius)&lt;br /&gt;
* idecal+2   : omeg      (angular speed) &lt;br /&gt;
* idecal+3   : g         (surface gravity)&lt;br /&gt;
* idecal+4   : cpp       (heat capacity at constant pressure)&lt;br /&gt;
* idecal+5   : rcp       (R/cp of the dry gas, used to compute R and mu from cpp)&lt;br /&gt;
* idecal+6   : daysec    (seconds in a day)  &lt;br /&gt;
* idecal+7   : dtvr      (seconds in a dynamic step?)    &lt;br /&gt;
* idecal+8   : etot0     (energie)    &lt;br /&gt;
* idecal+9   : ptot0     &lt;br /&gt;
* idecal+10  : ztot0     (enstrophie?)    &lt;br /&gt;
* idecal+11  : stot0     (entropie?)&lt;br /&gt;
* idecal+12  : ang0          &lt;br /&gt;
* idecal+13  : pa        (transition pressure between sigma and p coordinates in hybrid coordinates. Used in computation of ap and bp) &lt;br /&gt;
* idecal+14  : preff     (used in ap(l)+bp(l)*preff)   &lt;br /&gt;
* idecal+15  : clon        &lt;br /&gt;
* idecal+16  : clat       &lt;br /&gt;
* idecal+17  : grossismx  &lt;br /&gt;
* idecal+18  : grossismy&lt;br /&gt;
&lt;br /&gt;
=== Other parameters ===&lt;br /&gt;
TODO: EXPLAIN SOME MAIN VARIABLES/DIMENSIONS&lt;br /&gt;
&lt;br /&gt;
== startfi.nc File Contents ==&lt;br /&gt;
A dump of the header of a typical '''startfi.nc''' (obtained via '''ncdump -h startfi.nc''') will show contents of the likes of:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
netcdf startfi {&lt;br /&gt;
dimensions:&lt;br /&gt;
	index = 100 ;&lt;br /&gt;
	physical_points = 994 ;&lt;br /&gt;
	subsurface_layers = 18 ;&lt;br /&gt;
	nlayer_plus_1 = 16 ;&lt;br /&gt;
	number_of_advected_fields = 3 ;&lt;br /&gt;
	nlayer = 15 ;&lt;br /&gt;
variables:&lt;br /&gt;
	float controle(index) ;&lt;br /&gt;
		controle:title = &amp;quot;Control parameters&amp;quot; ;&lt;br /&gt;
	float soildepth(subsurface_layers) ;&lt;br /&gt;
		soildepth:title = &amp;quot;Soil mid-layer depth&amp;quot; ;&lt;br /&gt;
	float longitude(physical_points) ;&lt;br /&gt;
		longitude:title = &amp;quot;Longitudes of physics grid&amp;quot; ;&lt;br /&gt;
	float latitude(physical_points) ;&lt;br /&gt;
		latitude:title = &amp;quot;Latitudes of physics grid&amp;quot; ;&lt;br /&gt;
	float area(physical_points) ;&lt;br /&gt;
		area:title = &amp;quot;Mesh area&amp;quot; ;&lt;br /&gt;
	float phisfi(physical_points) ;&lt;br /&gt;
		phisfi:title = &amp;quot;Geopotential at the surface&amp;quot; ;&lt;br /&gt;
	float albedodat(physical_points) ;&lt;br /&gt;
		albedodat:title = &amp;quot;Albedo of bare ground&amp;quot; ;&lt;br /&gt;
	float ZMEA(physical_points) ;&lt;br /&gt;
		ZMEA:title = &amp;quot;Relief: mean relief&amp;quot; ;&lt;br /&gt;
	float ZSTD(physical_points) ;&lt;br /&gt;
		ZSTD:title = &amp;quot;Relief: standard deviation&amp;quot; ;&lt;br /&gt;
	float ZSIG(physical_points) ;&lt;br /&gt;
		ZSIG:title = &amp;quot;Relief: sigma parameter&amp;quot; ;&lt;br /&gt;
	float ZGAM(physical_points) ;&lt;br /&gt;
		ZGAM:title = &amp;quot;Relief: gamma parameter&amp;quot; ;&lt;br /&gt;
	float ZTHE(physical_points) ;&lt;br /&gt;
		ZTHE:title = &amp;quot;Relief: theta parameter&amp;quot; ;&lt;br /&gt;
	float inertiedat(subsurface_layers, physical_points) ;&lt;br /&gt;
		inertiedat:title = &amp;quot;Soil thermal inertia&amp;quot; ;&lt;br /&gt;
	float tsurf(physical_points) ;&lt;br /&gt;
		tsurf:title = &amp;quot;Surface temperature&amp;quot; ;&lt;br /&gt;
	float tsoil(subsurface_layers, physical_points) ;&lt;br /&gt;
		tsoil:title = &amp;quot;Soil temperature&amp;quot; ;&lt;br /&gt;
	float emis(physical_points) ;&lt;br /&gt;
		emis:title = &amp;quot;Surface emissivity&amp;quot; ;&lt;br /&gt;
	float q2(nlayer_plus_1, physical_points) ;&lt;br /&gt;
		q2:title = &amp;quot;pbl wind variance&amp;quot; ;&lt;br /&gt;
	float cloudfrac(nlayer, physical_points) ;&lt;br /&gt;
		cloudfrac:title = &amp;quot;Cloud fraction&amp;quot; ;&lt;br /&gt;
	float totcloudfrac(physical_points) ;&lt;br /&gt;
		totcloudfrac:title = &amp;quot;Total fraction&amp;quot; ;&lt;br /&gt;
	float hice(physical_points) ;&lt;br /&gt;
		hice:title = &amp;quot;Height of oceanic ice&amp;quot; ;&lt;br /&gt;
	float co2_ice(physical_points) ;&lt;br /&gt;
		co2_ice:title = &amp;quot;tracer on surface&amp;quot; ;&lt;br /&gt;
	float h2o_ice(physical_points) ;&lt;br /&gt;
		h2o_ice:title = &amp;quot;tracer on surface&amp;quot; ;&lt;br /&gt;
	float h2o_vap(physical_points) ;&lt;br /&gt;
		h2o_vap:title = &amp;quot;tracer on surface&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
// global attributes:&lt;br /&gt;
		:title = &amp;quot;Physics start file&amp;quot; ;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TODO: EXPLAIN SOME MAIN VARIABLES/DIMENSIONS/GRID STRUCTURE&lt;br /&gt;
&lt;br /&gt;
[[Category:Inputs]]&lt;br /&gt;
[[Category:WhatIs]]&lt;br /&gt;
[[Category:Generic-LMDZ]]&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=1778</id>
		<title>Advanced Use of the GCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=1778"/>
				<updated>2023-12-20T10:37:04Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Running in parallel ==&lt;br /&gt;
&lt;br /&gt;
For large simulation (long run, high resolution etc...), the computational cost can be huge and hence the run time very long.&lt;br /&gt;
To overcome this issue, the model can be run in parallel. This however requires a few extra steps (compared to compiling and running the serial version of the code).&lt;br /&gt;
For all the details see [[Parallelism | the dedicated page]].&lt;br /&gt;
&lt;br /&gt;
== Disambiguation between ifort, mpif90, etc. ==&lt;br /&gt;
&lt;br /&gt;
For users not used to compilers and/or compiling and running codes in parallel, namely in MPI mode, there is often some confusion which hopefully the following paragraph might help clarify:&lt;br /&gt;
* the compiler (typically gfortran, ifort, pgfortran, etc.) is the required tool to compile the Fortran source code and generate an executable. It is strongly recommended that libraries used by a program are also compiled using the same compiler. Thus if you plan to use different compilers to compile the model, note that you should also have at hand versions of the libraries it uses also compiled with these compilers.&lt;br /&gt;
* the MPI (Message Passing Interface) library is a library used to solve problems using multiple processes by enabling message-passing between the otherwise independent processes. There are a number of available MPI libraries out there, e.g. OpenMPI, MPICH or IntelMPI to name a few (you can check out the [[Building an MPI library]] page for some information about installing an MPI library). The important point here is that on a given machine the MPI library is related to a given compiler and that it provides related wrappers to compile and run with. Typically (but not always) the compiler wrapper is '''mpif90''' and the execution wrapper is '''mpirun'''. If you want to know which compiler is wrapped in the '''mpif90''' compiler wrapper, check out the output of:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpif90 --version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* In addition a second type of parallelism, shared memory parallelism known as OpenMP, is also implemented in the code. In contradistinction to MPI, OpenMP does not require an external library but is instead implemented as a compiler feature. At run time one must then specify some dedicated environment variables (such as OMP_NUM_THREADS and OMP_STACKSIZE) to specify the number of threads to use per process.&lt;br /&gt;
* In practice one should favor compiling and running with both MPI and OPenMP enabled.&lt;br /&gt;
* For much more detailed information about compiling and running in parallel, check out the [[Parallelism | the page dedicated to Parallelism]].&lt;br /&gt;
&lt;br /&gt;
== A word about the IOIPSL and XIOS libraries ==&lt;br /&gt;
* The IOIPSL (Input Output IPSL) library is a library that has developed by the IPSL community to handle input and outputs of (mostly terrestrial) climate models. For the Generic PCM only a small part of this library is actually used, related to reading and processing the input [[The_run.def_Input_File | run.def]] file. For more details check out the [[The IOIPSL Library]] page.&lt;br /&gt;
* The [https://forge.ipsl.jussieu.fr/ioserver/wiki XIOS] (Xml I/O Server) library is based on client-server principles where the server manages the outputs asynchronously from the client (the climate model) so that the bottleneck of writing data in a parallel environment is alleviated. All aspects of the outputs (name, units, file, post-processing operations, etc.) are then controlled by dedicated XML files which are read at run-time. Using XIOS is currently optional (and requires compiling the GCM with the XIOS library). More about the XIOS library, how to install and use it, etc. [[The XIOS Library| here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Playing with the output files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the output temporal resolution and time duration ===&lt;br /&gt;
&lt;br /&gt;
* To change the total time of a simulation, you need to open the 'For all the details see [[The_run.def_Input_File | run.def]]. file and change the variable 'nday':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nday = 1000 # this means the simulation will run for 1000 days ; and that the associated output files will also be computed for a total duration of 1000 days&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: in the example, they are not necessarily 1000 Earth days, because it depends on the definition of the day duration that has been taken in the start files.&lt;br /&gt;
&lt;br /&gt;
* To change the temporal resolution of the output files, you need to open the [[The_run.def_Input_File | run.def]] file and change the variable 'ecritphy':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ecritphy = 200 # this means the simulation will write variables in the output files every 200 time steps of the simulation.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The output temporal resolution of the output files then depends also on the number of timestep per day ('day_step' variable in [[The_run.def_Input_File | run.def]] file). In this example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nday = 1000&lt;br /&gt;
daystep = 800&lt;br /&gt;
ecritphy = 200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output file will provide results every 0.25 days (800/200), and for a total duration of 1000 days (so 4000 time values in total).&lt;br /&gt;
&lt;br /&gt;
=== Changing the output variable ===&lt;br /&gt;
&lt;br /&gt;
To select the variable provided in the output file diagfi.nc, you simply need to add the list of variables needed in the [[The_diagfi.def_Input_File | diagfi.def]].&lt;br /&gt;
&lt;br /&gt;
Note for experts: Some technical variables need to be de-commented in 'physiq_mod.F90' file to be written in the output files.&lt;br /&gt;
&lt;br /&gt;
=== Spectral outputs ===&lt;br /&gt;
&lt;br /&gt;
It is possible to provide spectral outputs such as the OLR (Outgoing Longwave Radiation, i.e. the thermal emission of the planet at the top of the atmosphere), the OSR (Outgoing Stellar Radiation, i.e. the light reflected by the planet at the top of the atmosphere), or the GSR (Ground Stellar Radiation, i.e. the light emitted by the star that reaches the surface of the planet).&lt;br /&gt;
&lt;br /&gt;
For this, you need to activate the option 'specOLR' in the [[The_callphys.def_Input_File | callphys.def]] file, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
specOLR    = .true.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simulations will then create diagspec_VI.nc and diagspec_IR.nc files (along with the standard diagfi.nc file), which contain the spectra of OLR, OSR, GSR, etc.&lt;br /&gt;
&lt;br /&gt;
Note: The resolution of the spectra is defined by that of the correlated-k (opacity) files used for the simulation.&lt;br /&gt;
&lt;br /&gt;
=== Statistical outputs ===&lt;br /&gt;
&lt;br /&gt;
TBD (explain how to compute stats.nc files as well as what is inside)&lt;br /&gt;
&lt;br /&gt;
== How to Change Vertical and Horizontal Resolutions ==&lt;br /&gt;
&lt;br /&gt;
=== When you are using the regular longitude/latitude horizontal grid ===&lt;br /&gt;
To run at a different grid resolution than available initial conditions files, one needs to use the tools ''newstart.e'' and ''start2archive.e''&lt;br /&gt;
&lt;br /&gt;
For example, to create initial states at grid resolution 32×24×25 from NetCDF files start and startfi at grid resolution 64×48×32 :&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at grid resolution 64×48×32 using old file ''z2sig.def'' used previously&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled at grid resolution 32×24×25, using a new file ''z2sig.def'' (more details below on the choice of the ''z2sig.def'').&lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
&lt;br /&gt;
==== What you need to ''know'' about the ''z2sig.def'' file ====&lt;br /&gt;
&lt;br /&gt;
For a model with Nlay layers, the [[The_z2sig.def_Input_File | z2sig.def]] file must contain at least Nlay+1 lines (the other not being read).&lt;br /&gt;
&lt;br /&gt;
The first line is a scale height ($$H$$). The following lines are the target pseudo-altitudes for the model from the bottom up ($$z_i$$).&lt;br /&gt;
The units do not matter as long as you use the same ones for both. &lt;br /&gt;
&lt;br /&gt;
The model will use these altitudes to compute a target pressure grid ($$p_i$$ ) as follows:&lt;br /&gt;
\begin{align}&lt;br /&gt;
  \label{def:pseudoalt}&lt;br /&gt;
  p_i &amp;amp;= p_s \exp(-z_i/H),&lt;br /&gt;
\end{align}&lt;br /&gt;
where $$p_s$$ is the surface pressure. &lt;br /&gt;
&lt;br /&gt;
As you can see, the scale height and pseudo altitudes enter the equation only through their ratio. So they do not have to to be the real scale-height and altitudes of the atmosphere you are simulating.&lt;br /&gt;
So you can use the same [[The_z2sig.def_Input_File | z2sig.def]].def for different planets. &lt;br /&gt;
&lt;br /&gt;
There is no hard rule to follow to determine the altitude/pressure levels you should use. As a rule of thumb, layers should be thiner near the surface to properly resolve the surface boundary layer. Then they should gradually increase in size over a couple scale heights and transition to constant thickness above that. Of course, some specific applications may require thinner layers in some specific parts of the atmospheres. &lt;br /&gt;
&lt;br /&gt;
A little trick for those who prefer to think in terms of (log)pressure: if you use $$H=  1/\ln 10 \approx 0.43429448$$, then $$z_i=x$$ corresponds to a pressure difference with the surface of exactly x pressure decades (i.e. at $$z=1$$, $$p=0.1p_s$$). This is particularly useful for giant-planet applications.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- [NOT RELEVANT??] If you want to create starts files with tracers for 50 layers using a start archive.nc obtained for 32 layers, do not forget to use the ini_q option in newstart in order to correctly initialize tracers value for layer 33 to layer 50. You just have to answer yes to the question on thermosphere initialization if you want to initialize the thermosphere part only (l=33 to l=50), and no if you want to initialize tracers for all layers (l=0 to l=50). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''WE SHOULD WRITE A PAGE (LINK HERE) ABOUT HYBRID VERTICAL COORDINATES'''&lt;br /&gt;
&lt;br /&gt;
=== When you are using the DYNAMICO icosahedral horizontal grid ===&lt;br /&gt;
&lt;br /&gt;
The horizontal resolution for the DYNAMICO dynamical core is managed from several setting files, online during the execution. &lt;br /&gt;
To this purpose, each part  of the GCM managing the in/output fields ('''ICOSAGCM''', '''ICOSA_LMDZ''', '''XIOS''') requires to know the input and output grids: &lt;br /&gt;
&lt;br /&gt;
'''1. ''context_lmdz_physics.xml'':'''&lt;br /&gt;
&lt;br /&gt;
You can find several grid setup already defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;domain_definition&amp;gt;&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_96_95&amp;quot; ni_glo=&amp;quot;96&amp;quot; nj_glo=&amp;quot;95&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_144_142&amp;quot; ni_glo=&amp;quot;144&amp;quot; nj_glo=&amp;quot;142&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_512_360&amp;quot; ni_glo=&amp;quot;512&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_720_360&amp;quot; ni_glo=&amp;quot;720&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/domain_definition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the output grid for the physics fields is defined by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is an half-degree horizontal resolution. To change this resolution, you have to change name of the '''domain_ref''' grid, for instance: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_96_95&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. ''run_icosa.def'': setting file to execute a simulation''' &lt;br /&gt;
&lt;br /&gt;
In this file, regarding of the horizontal resolution intended, you have to set the number of subdivision on the main triangle. &lt;br /&gt;
For reminder, each hexagonal mesh is divided in several main triangles and each main triangles are divided in suitable number of sub-triangles according the horizontal resolution&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
#nbp --&amp;gt; number of subdivision on a main triangle: integer (default=40)&lt;br /&gt;
#              nbp = sqrt((nbr_lat x nbr_lon)/10)&lt;br /&gt;
#              nbp:                 20   40   80  160&lt;br /&gt;
#              T-edge length (km): 500  250  120   60&lt;br /&gt;
#              Example: nbp(128x96) = 35 -&amp;gt; 40&lt;br /&gt;
#                       nbp(256x192)= 70 -&amp;gt; 80&lt;br /&gt;
#                       nbp(360x720)= 160 -&amp;gt; 160&lt;br /&gt;
nbp = 160&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have chosen the 96_95 output grid in ''context_lmdz_physics.xml'', you have to calculate $$nbp = \sqrt(96x95) / 10 = 10$$ and  in this case &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nbp = 20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the number of subdivision of the main triangle, you have to define the number subdivision over each direction. At this stage you need to be careful as the number of subdivisions on each direction:&lt;br /&gt;
* needs to be set according to the number of subdivisions on the main triangle '''nbp'''&lt;br /&gt;
* will determine the number of processors on which the GCM will be most effective&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
#nsplit_i=1&lt;br /&gt;
#nsplit_j=1&lt;br /&gt;
#omp_level_size=1&lt;br /&gt;
###############################################################&lt;br /&gt;
## There must be less MPIxOpenMP processes than the 10 x nsplit_i x nsplit_j tiles&lt;br /&gt;
## typically for pure MPI runs, let nproc = 10 x nsplit_i x nsplit_j&lt;br /&gt;
## it is better to have nbp/nsplit_i  &amp;gt; 10 and nbp/nplit_j &amp;gt; 10&lt;br /&gt;
###############################################################&lt;br /&gt;
#### 40 noeuds de 24 processeurs = 960 procs&lt;br /&gt;
nsplit_i=12&lt;br /&gt;
nsplit_j=8&lt;br /&gt;
&lt;br /&gt;
#### 50 noeuds de 24 processeurs = 1200 procs&lt;br /&gt;
#nsplit_i=10&lt;br /&gt;
#nsplit_j=12&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the same example as above, the 96_95 output grid requires:&lt;br /&gt;
$$nsplit_i &amp;lt; 2$$ and $$nsplit_j &amp;lt; 2$$&lt;br /&gt;
We advise you to select:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
nsplit_i=1&lt;br /&gt;
nsplit_j=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and using 10 processors.&lt;br /&gt;
&lt;br /&gt;
== How to Change the Topography (or remove it) ==&lt;br /&gt;
&lt;br /&gt;
The generic model can use in principle any type of surface topography, provided that the topographic data file is available in the right format, and put in the right place. The information content on the surface topography is contained in the ''startfi.nc'', and we do have developed tools (see below) to modify the ''startfi.nc'' to account for a new surface topography.&lt;br /&gt;
&lt;br /&gt;
To change the surface topography of a simulation, we recommend to follow the procedure detailed below:&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at the same (horizontal and vertical) resolution than the ''start.nc'' and ''startfi.nc'' files.&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled again at the same (horizontal and vertical) resolution. &lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
* At some point, the script ''newstart.e'' asks you to chose the surface topography you want from the list of files available in your 'datagcm/surface_data/' directory. &lt;br /&gt;
&lt;br /&gt;
We do have a repository of for Venus, Earth and Mars through time available at https://web.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/surface_data/. You can download the surface topography files and place them in your 'datagcm/surface_data/' directory.&lt;br /&gt;
&lt;br /&gt;
We also offer a tutorial to design new topography maps here: https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Building_Surface_Topography_Files&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Special note: To remove the topography, you can simply add the following tag in callphys.def:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nosurf  = .true.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to Change the Stellar Spectrum ==&lt;br /&gt;
&lt;br /&gt;
To simulate the effect of the star's radiation on a given planetary atmosphere, it is necessary to accurately represent the stellar spectrum (spectral shape and total bolometric flux) at the top of this atmosphere. In the model, we have set up two different options to model the stellar spectra of any star.&lt;br /&gt;
&lt;br /&gt;
=== Black Body Stellar Spectra ===&lt;br /&gt;
&lt;br /&gt;
First, it is possible to simply use a black body. In this case, the stellar spectrum depends only on the effective temperature of the star which is provided to the model.&lt;br /&gt;
&lt;br /&gt;
For this, you need to activate the option 'stelbbody' in the [[The_callphys.def_Input_File | callphys.def]] file, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stelbbody  = .true.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then add, also in the [[The_callphys.def_Input_File | callphys.def]] file, the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stelTbb   = 3500.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to specify the effective temperature of the host star. (in this example, we have chosen a M-star with an effective temperature of 3500K)&lt;br /&gt;
&lt;br /&gt;
=== Pre-Tabulated spectra ===&lt;br /&gt;
&lt;br /&gt;
Second, the model can read a file containing any pre-computed stellar spectrum. Traditionally, we have used synthetic spectra from the PHOENIX database, that we adapt to the Generic PCM by decreasing the spectral resolution (use 10000 points with a fixed spectral resolution of 0.001 micron) and by adapting the units (in W/m2/micron). This is the option that is generally preferred to better represent the effect of the star (whose real spectrum can strongly deviate from the black body approximation).&lt;br /&gt;
&lt;br /&gt;
For this, you need to make sure the option 'stelbbody' in the [[The_callphys.def_Input_File | callphys.def]] file is equal to .false. (it not specified, by default stelbbody is assumed to be .false.).&lt;br /&gt;
&lt;br /&gt;
Then you need to add in the [[The_callphys.def_Input_File | callphys.def]] file, the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
startype = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and change the value of startype depending on the star you want to model. (here 1 means we use the solar spectrum)&lt;br /&gt;
&lt;br /&gt;
To know which stellar spectra are available, you need to open the file LMDZ.GENERIC/libf/phystd/ave_stelspec.F90 and adapt the value of startype accordingly. You also need to make sure the spectra are available in your /datadir/stellar_spectra (or /datagcm/stellar_spectra) directory.&lt;br /&gt;
&lt;br /&gt;
To calculate the true stellar spectrum at the top of the atmosphere, the Generic PCM renormalizes the stellar spectrum by the bolometric flux at 1 Astronomical Unit (AU) provided by the user, which it then converts into the true stellar spectrum by using the star-planet distance. &lt;br /&gt;
&lt;br /&gt;
To specify the flux at 1 AU, you need to add in the [[The_callphys.def_Input_File | callphys.def]] file, the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Fat1AU = 1366.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(here 1366W/m2 corresponds to the flux at 1AU for the Sun)&lt;br /&gt;
&lt;br /&gt;
1st NOTE: We will improve this second part (Martin and Mathilde) by the end of 2022.&lt;br /&gt;
&lt;br /&gt;
2nd NOTE: The Generic PCM eventually has the capability to run without any stellar flux. To do that, you can simply put Fat1AU = 0. (@LUCAS_TEINTURIER, could you check that?)&lt;br /&gt;
&lt;br /&gt;
== How to Change the Opacity Tables ==&lt;br /&gt;
&lt;br /&gt;
To change the opacity tables (generated &amp;quot;offline&amp;quot; for a given set of pressures, temperatures, a given composition and a specific spectral decomposition), follow these steps:&lt;br /&gt;
&lt;br /&gt;
* copy your directory containing your opacity tables in .... It has to contain...  [[Building_Opacity_Tables | you need to build opacity tables]]&lt;br /&gt;
* change corrkdir = ... in [[The_callphys.def_Input_File | callphys.def]] with the name of that directory.&lt;br /&gt;
* change gases.def: it has to be consistent with Q.dat. A special case concerns...&lt;br /&gt;
* change -b option when compiling the model with makelmdz_fcm: it has to correspond to the number of bands (in the IR x in the visible) of the new opacity tables. For instance, compile with -b 38x26 if you used 38 bands in the infrared and 26 in the visible to generate the opacity tables.&lt;br /&gt;
&lt;br /&gt;
== How to Manage Tracers ==&lt;br /&gt;
&lt;br /&gt;
Tracers are managed thanks to the [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def''] file.&lt;br /&gt;
&lt;br /&gt;
Specific treatment of some tracers (e.g., water vapor cycle) can be added directly in the model and an option added in [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def''] file.&lt;br /&gt;
&lt;br /&gt;
== Use the Z of LMDZ : Zoomed version ==&lt;br /&gt;
&lt;br /&gt;
Do we need this? Has anyone already made use of the zoom module?&lt;br /&gt;
&lt;br /&gt;
[[Category:Generic-Model]]&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=1777</id>
		<title>Advanced Use of the GCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=1777"/>
				<updated>2023-12-20T10:36:13Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Running in parallel ==&lt;br /&gt;
&lt;br /&gt;
For large simulation (long run, high resolution etc...), the computational cost can be huge and hence the run time very long.&lt;br /&gt;
To overcome this issue, the model can be run in parallel. This however requires a few extra steps (compared to compiling and running the serial version of the code).&lt;br /&gt;
For all the details see [[Parallelism | the dedicated page]].&lt;br /&gt;
&lt;br /&gt;
== Disambiguation between ifort, mpif90, etc. ==&lt;br /&gt;
&lt;br /&gt;
For users not used to compilers and/or compiling and running codes in parallel, namely in MPI mode, there is often some confusion which hopefully the following paragraph might help clarify:&lt;br /&gt;
* the compiler (typically gfortran, ifort, pgfortran, etc.) is the required tool to compile the Fortran source code and generate an executable. It is strongly recommended that libraries used by a program are also compiled using the same compiler. Thus if you plan to use different compilers to compile the model, note that you should also have at hand versions of the libraries it uses also compiled with these compilers.&lt;br /&gt;
* the MPI (Message Passing Interface) library is a library used to solve problems using multiple processes by enabling message-passing between the otherwise independent processes. There are a number of available MPI libraries out there, e.g. OpenMPI, MPICH or IntelMPI to name a few (you can check out the [[Building an MPI library]] page for some information about installing an MPI library). The important point here is that on a given machine the MPI library is related to a given compiler and that it provides related wrappers to compile and run with. Typically (but not always) the compiler wrapper is '''mpif90''' and the execution wrapper is '''mpirun'''. If you want to know which compiler is wrapped in the '''mpif90''' compiler wrapper, check out the output of:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mpif90 --version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* In addition a second type of parallelism, shared memory parallelism known as OpenMP, is also implemented in the code. In contradistinction to MPI, OpenMP does not require an external library but is instead implemented as a compiler feature. At run time one must then specify some dedicated environment variables (such as OMP_NUM_THREADS and OMP_STACKSIZE) to specify the number of threads to use per process.&lt;br /&gt;
* In practice one should favor compiling and running with both MPI and OPenMP enabled.&lt;br /&gt;
* For much more detailed information about compiling and running in parallel, check out the [[Parallelism | the page dedicated to Parallelism]].&lt;br /&gt;
&lt;br /&gt;
== A word about the IOIPSL and XIOS libraries ==&lt;br /&gt;
* The IOIPSL (Input Output IPSL) library is a library that has developed by the IPSL community to handle input and outputs of (mostly terrestrial) climate models. For the Generic PCM only a small part of this library is actually used, related to reading and processing the input [[The_run.def_Input_File | run.def]] file. For more details check out the [[The IOIPSL Library]] page.&lt;br /&gt;
* The [https://forge.ipsl.jussieu.fr/ioserver/wiki XIOS] (Xml I/O Server) library is based on client-server principles where the server manages the outputs asynchronously from the client (the climate model) so that the bottleneck of writing data in a parallel environment is alleviated. All aspects of the outputs (name, units, file, post-processing operations, etc.) are then controlled by dedicated XML files which are read at run-time. Using XIOS is currently optional (and requires compiling the GCM with the XIOS library). More about the XIOS library, how to install and use it, etc. [[The XIOS Library| here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Playing with the output files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing the output temporal resolution and time duration ===&lt;br /&gt;
&lt;br /&gt;
* To change the total time of a simulation, you need to open the 'For all the details see [[The_run.def_Input_File | run.def]]. file and change the variable 'nday':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nday = 1000 # this means the simulation will run for 1000 days ; and that the associated output files will also be computed for a total duration of 1000 days&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: in the example, they are not necessarily 1000 Earth days, because it depends on the definition of the day duration that has been taken in the start files.&lt;br /&gt;
&lt;br /&gt;
* To change the temporal resolution of the output files, you need to open the [[The_run.def_Input_File | run.def]] file and change the variable 'ecritphy':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ecritphy = 200 # this means the simulation will write variables in the output files every 200 time steps of the simulation.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The output temporal resolution of the output files then depends also on the number of timestep per day ('day_step' variable in [[The_run.def_Input_File | run.def]] file). In this example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nday = 1000&lt;br /&gt;
daystep = 800&lt;br /&gt;
ecritphy = 200&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output file will provide results every 0.25 days (800/200), and for a total duration of 1000 days (so 4000 time values in total).&lt;br /&gt;
&lt;br /&gt;
=== Changing the output variable ===&lt;br /&gt;
&lt;br /&gt;
To select the variable provided in the output file diagfi.nc, you simply need to add the list of variables needed in the [[The_diagfi.def_Input_File | diagfi.def]].&lt;br /&gt;
&lt;br /&gt;
Note for experts: Some technical variables need to be de-commented in 'physiq_mod.F90' file to be written in the output files.&lt;br /&gt;
&lt;br /&gt;
=== Spectral outputs ===&lt;br /&gt;
&lt;br /&gt;
It is possible to provide spectral outputs such as the OLR (Outgoing Longwave Radiation, i.e. the thermal emission of the planet at the top of the atmosphere), the OSR (Outgoing Stellar Radiation, i.e. the light reflected by the planet at the top of the atmosphere), or the GSR (Ground Stellar Radiation, i.e. the light emitted by the star that reaches the surface of the planet).&lt;br /&gt;
&lt;br /&gt;
For this, you need to activate the option 'specOLR' in the [[The_callphys.def_Input_File | callphys.def]] file, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
specOLR    = .true.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The simulations will then create diagspec_VI.nc and diagspec_IR.nc files (along with the standard diagfi.nc file), which contain the spectra of OLR, OSR, GSR, etc.&lt;br /&gt;
&lt;br /&gt;
Note: The resolution of the spectra is defined by that of the correlated-k (opacity) files used for the simulation.&lt;br /&gt;
&lt;br /&gt;
=== Statistical outputs ===&lt;br /&gt;
&lt;br /&gt;
TBD (explain how to compute stats.nc files as well as what is inside)&lt;br /&gt;
&lt;br /&gt;
== How to Change Vertical and Horizontal Resolutions ==&lt;br /&gt;
&lt;br /&gt;
=== When you are using the regular longitude/latitude horizontal grid ===&lt;br /&gt;
To run at a different grid resolution than available initial conditions files, one needs to use the tools ''newstart.e'' and ''start2archive.e''&lt;br /&gt;
&lt;br /&gt;
For example, to create initial states at grid resolution 32×24×25 from NetCDF files start and startfi at grid resolution 64×48×32 :&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at grid resolution 64×48×32 using old file ''z2sig.def'' used previously&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled at grid resolution 32×24×25, using a new file ''z2sig.def'' (more details below on the choice of the ''z2sig.def'').&lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
&lt;br /&gt;
==== What you need to ''know'' about the ''z2sig.def'' file ====&lt;br /&gt;
&lt;br /&gt;
For a model with Nlay layers, the [[The_z2sig.def_Input_File | z2sig.def]] file must contain at least Nlay+1 lines (the other not being read).&lt;br /&gt;
&lt;br /&gt;
The first line is a scale height ($$H$$). The following lines are the target pseudo-altitudes for the model from the bottom up ($$z_i$$).&lt;br /&gt;
The units do not matter as long as you use the same ones for both. &lt;br /&gt;
&lt;br /&gt;
The model will use these altitudes to compute a target pressure grid ($$p_i$$ ) as follows:&lt;br /&gt;
\begin{align}&lt;br /&gt;
  \label{def:pseudoalt}&lt;br /&gt;
  p_i &amp;amp;= p_s \exp(-z_i/H),&lt;br /&gt;
\end{align}&lt;br /&gt;
where $$p_s$$ is the surface pressure. &lt;br /&gt;
&lt;br /&gt;
As you can see, the scale height and pseudo altitudes enter the equation only through their ratio. So they do not have to to be the real scale-height and altitudes of the atmosphere you are simulating.&lt;br /&gt;
So you can use the same [[The_z2sig.def_Input_File | z2sig.def]].def for different planets. &lt;br /&gt;
&lt;br /&gt;
There is no hard rule to follow to determine the altitude/pressure levels you should use. As a rule of thumb, layers should be thiner near the surface to properly resolve the surface boundary layer. Then they should gradually increase in size over a couple scale heights and transition to constant thickness above that. Of course, some specific applications may require thinner layers in some specific parts of the atmospheres. &lt;br /&gt;
&lt;br /&gt;
A little trick for those who prefer to think in terms of (log)pressure: if you use $$H=  1/\ln 10 \approx 0.43429448$$, then $$z_i=x$$ corresponds to a pressure difference with the surface of exactly x pressure decades (i.e. at $$z=1$$, $$p=0.1p_s$$. This is particularly useful for giant-planet applications.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- [NOT RELEVANT??] If you want to create starts files with tracers for 50 layers using a start archive.nc obtained for 32 layers, do not forget to use the ini_q option in newstart in order to correctly initialize tracers value for layer 33 to layer 50. You just have to answer yes to the question on thermosphere initialization if you want to initialize the thermosphere part only (l=33 to l=50), and no if you want to initialize tracers for all layers (l=0 to l=50). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''WE SHOULD WRITE A PAGE (LINK HERE) ABOUT HYBRID VERTICAL COORDINATES'''&lt;br /&gt;
&lt;br /&gt;
=== When you are using the DYNAMICO icosahedral horizontal grid ===&lt;br /&gt;
&lt;br /&gt;
The horizontal resolution for the DYNAMICO dynamical core is managed from several setting files, online during the execution. &lt;br /&gt;
To this purpose, each part  of the GCM managing the in/output fields ('''ICOSAGCM''', '''ICOSA_LMDZ''', '''XIOS''') requires to know the input and output grids: &lt;br /&gt;
&lt;br /&gt;
'''1. ''context_lmdz_physics.xml'':'''&lt;br /&gt;
&lt;br /&gt;
You can find several grid setup already defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;domain_definition&amp;gt;&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_96_95&amp;quot; ni_glo=&amp;quot;96&amp;quot; nj_glo=&amp;quot;95&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_144_142&amp;quot; ni_glo=&amp;quot;144&amp;quot; nj_glo=&amp;quot;142&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_512_360&amp;quot; ni_glo=&amp;quot;512&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_720_360&amp;quot; ni_glo=&amp;quot;720&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/domain_definition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the output grid for the physics fields is defined by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is an half-degree horizontal resolution. To change this resolution, you have to change name of the '''domain_ref''' grid, for instance: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_96_95&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. ''run_icosa.def'': setting file to execute a simulation''' &lt;br /&gt;
&lt;br /&gt;
In this file, regarding of the horizontal resolution intended, you have to set the number of subdivision on the main triangle. &lt;br /&gt;
For reminder, each hexagonal mesh is divided in several main triangles and each main triangles are divided in suitable number of sub-triangles according the horizontal resolution&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
#nbp --&amp;gt; number of subdivision on a main triangle: integer (default=40)&lt;br /&gt;
#              nbp = sqrt((nbr_lat x nbr_lon)/10)&lt;br /&gt;
#              nbp:                 20   40   80  160&lt;br /&gt;
#              T-edge length (km): 500  250  120   60&lt;br /&gt;
#              Example: nbp(128x96) = 35 -&amp;gt; 40&lt;br /&gt;
#                       nbp(256x192)= 70 -&amp;gt; 80&lt;br /&gt;
#                       nbp(360x720)= 160 -&amp;gt; 160&lt;br /&gt;
nbp = 160&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have chosen the 96_95 output grid in ''context_lmdz_physics.xml'', you have to calculate $$nbp = \sqrt(96x95) / 10 = 10$$ and  in this case &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nbp = 20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the number of subdivision of the main triangle, you have to define the number subdivision over each direction. At this stage you need to be careful as the number of subdivisions on each direction:&lt;br /&gt;
* needs to be set according to the number of subdivisions on the main triangle '''nbp'''&lt;br /&gt;
* will determine the number of processors on which the GCM will be most effective&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
#nsplit_i=1&lt;br /&gt;
#nsplit_j=1&lt;br /&gt;
#omp_level_size=1&lt;br /&gt;
###############################################################&lt;br /&gt;
## There must be less MPIxOpenMP processes than the 10 x nsplit_i x nsplit_j tiles&lt;br /&gt;
## typically for pure MPI runs, let nproc = 10 x nsplit_i x nsplit_j&lt;br /&gt;
## it is better to have nbp/nsplit_i  &amp;gt; 10 and nbp/nplit_j &amp;gt; 10&lt;br /&gt;
###############################################################&lt;br /&gt;
#### 40 noeuds de 24 processeurs = 960 procs&lt;br /&gt;
nsplit_i=12&lt;br /&gt;
nsplit_j=8&lt;br /&gt;
&lt;br /&gt;
#### 50 noeuds de 24 processeurs = 1200 procs&lt;br /&gt;
#nsplit_i=10&lt;br /&gt;
#nsplit_j=12&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the same example as above, the 96_95 output grid requires:&lt;br /&gt;
$$nsplit_i &amp;lt; 2$$ and $$nsplit_j &amp;lt; 2$$&lt;br /&gt;
We advise you to select:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
nsplit_i=1&lt;br /&gt;
nsplit_j=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and using 10 processors.&lt;br /&gt;
&lt;br /&gt;
== How to Change the Topography (or remove it) ==&lt;br /&gt;
&lt;br /&gt;
The generic model can use in principle any type of surface topography, provided that the topographic data file is available in the right format, and put in the right place. The information content on the surface topography is contained in the ''startfi.nc'', and we do have developed tools (see below) to modify the ''startfi.nc'' to account for a new surface topography.&lt;br /&gt;
&lt;br /&gt;
To change the surface topography of a simulation, we recommend to follow the procedure detailed below:&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at the same (horizontal and vertical) resolution than the ''start.nc'' and ''startfi.nc'' files.&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled again at the same (horizontal and vertical) resolution. &lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
* At some point, the script ''newstart.e'' asks you to chose the surface topography you want from the list of files available in your 'datagcm/surface_data/' directory. &lt;br /&gt;
&lt;br /&gt;
We do have a repository of for Venus, Earth and Mars through time available at https://web.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/surface_data/. You can download the surface topography files and place them in your 'datagcm/surface_data/' directory.&lt;br /&gt;
&lt;br /&gt;
We also offer a tutorial to design new topography maps here: https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Building_Surface_Topography_Files&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Special note: To remove the topography, you can simply add the following tag in callphys.def:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nosurf  = .true.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to Change the Stellar Spectrum ==&lt;br /&gt;
&lt;br /&gt;
To simulate the effect of the star's radiation on a given planetary atmosphere, it is necessary to accurately represent the stellar spectrum (spectral shape and total bolometric flux) at the top of this atmosphere. In the model, we have set up two different options to model the stellar spectra of any star.&lt;br /&gt;
&lt;br /&gt;
=== Black Body Stellar Spectra ===&lt;br /&gt;
&lt;br /&gt;
First, it is possible to simply use a black body. In this case, the stellar spectrum depends only on the effective temperature of the star which is provided to the model.&lt;br /&gt;
&lt;br /&gt;
For this, you need to activate the option 'stelbbody' in the [[The_callphys.def_Input_File | callphys.def]] file, as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stelbbody  = .true.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then add, also in the [[The_callphys.def_Input_File | callphys.def]] file, the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stelTbb   = 3500.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to specify the effective temperature of the host star. (in this example, we have chosen a M-star with an effective temperature of 3500K)&lt;br /&gt;
&lt;br /&gt;
=== Pre-Tabulated spectra ===&lt;br /&gt;
&lt;br /&gt;
Second, the model can read a file containing any pre-computed stellar spectrum. Traditionally, we have used synthetic spectra from the PHOENIX database, that we adapt to the Generic PCM by decreasing the spectral resolution (use 10000 points with a fixed spectral resolution of 0.001 micron) and by adapting the units (in W/m2/micron). This is the option that is generally preferred to better represent the effect of the star (whose real spectrum can strongly deviate from the black body approximation).&lt;br /&gt;
&lt;br /&gt;
For this, you need to make sure the option 'stelbbody' in the [[The_callphys.def_Input_File | callphys.def]] file is equal to .false. (it not specified, by default stelbbody is assumed to be .false.).&lt;br /&gt;
&lt;br /&gt;
Then you need to add in the [[The_callphys.def_Input_File | callphys.def]] file, the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
startype = 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and change the value of startype depending on the star you want to model. (here 1 means we use the solar spectrum)&lt;br /&gt;
&lt;br /&gt;
To know which stellar spectra are available, you need to open the file LMDZ.GENERIC/libf/phystd/ave_stelspec.F90 and adapt the value of startype accordingly. You also need to make sure the spectra are available in your /datadir/stellar_spectra (or /datagcm/stellar_spectra) directory.&lt;br /&gt;
&lt;br /&gt;
To calculate the true stellar spectrum at the top of the atmosphere, the Generic PCM renormalizes the stellar spectrum by the bolometric flux at 1 Astronomical Unit (AU) provided by the user, which it then converts into the true stellar spectrum by using the star-planet distance. &lt;br /&gt;
&lt;br /&gt;
To specify the flux at 1 AU, you need to add in the [[The_callphys.def_Input_File | callphys.def]] file, the following line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Fat1AU = 1366.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(here 1366W/m2 corresponds to the flux at 1AU for the Sun)&lt;br /&gt;
&lt;br /&gt;
1st NOTE: We will improve this second part (Martin and Mathilde) by the end of 2022.&lt;br /&gt;
&lt;br /&gt;
2nd NOTE: The Generic PCM eventually has the capability to run without any stellar flux. To do that, you can simply put Fat1AU = 0. (@LUCAS_TEINTURIER, could you check that?)&lt;br /&gt;
&lt;br /&gt;
== How to Change the Opacity Tables ==&lt;br /&gt;
&lt;br /&gt;
To change the opacity tables (generated &amp;quot;offline&amp;quot; for a given set of pressures, temperatures, a given composition and a specific spectral decomposition), follow these steps:&lt;br /&gt;
&lt;br /&gt;
* copy your directory containing your opacity tables in .... It has to contain...  [[Building_Opacity_Tables | you need to build opacity tables]]&lt;br /&gt;
* change corrkdir = ... in [[The_callphys.def_Input_File | callphys.def]] with the name of that directory.&lt;br /&gt;
* change gases.def: it has to be consistent with Q.dat. A special case concerns...&lt;br /&gt;
* change -b option when compiling the model with makelmdz_fcm: it has to correspond to the number of bands (in the IR x in the visible) of the new opacity tables. For instance, compile with -b 38x26 if you used 38 bands in the infrared and 26 in the visible to generate the opacity tables.&lt;br /&gt;
&lt;br /&gt;
== How to Manage Tracers ==&lt;br /&gt;
&lt;br /&gt;
Tracers are managed thanks to the [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def''] file.&lt;br /&gt;
&lt;br /&gt;
Specific treatment of some tracers (e.g., water vapor cycle) can be added directly in the model and an option added in [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def''] file.&lt;br /&gt;
&lt;br /&gt;
== Use the Z of LMDZ : Zoomed version ==&lt;br /&gt;
&lt;br /&gt;
Do we need this? Has anyone already made use of the zoom module?&lt;br /&gt;
&lt;br /&gt;
[[Category:Generic-Model]]&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=727</id>
		<title>Overview of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=727"/>
				<updated>2022-09-01T07:31:58Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: /* Our team of developers (by alphabetical order) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is a GCM ==&lt;br /&gt;
&lt;br /&gt;
A Global Climate Model (GCM) like the Generic PCM calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
To do that, the model solves 3D hydrodynamic equations that describe how atmospheric winds are created by various physical forcings (radiative heating/cooling, etc.) and how these winds transport and redistribute the various atmospheric fields (temperature, tracers, etc.). However, it can be shown that to a good level of approximation, the various forcings can be computed using only local conditions in a column of atmosphere, whereas long-range couplings between various points of the planet are mediated through atmospheric transport. &lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
For these reasons, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a 3D dynamical core''' abble to integrate in time the general equations for atmospheric circulation when the various local forcings are known. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In practice, we have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid), and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* The physical model calculates the local time derivatives of the various variables -- called the tendencies -- ((δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon: for example, heating due to absorption of solar radiation and infrared cooling, mixing due to turbulence in the planetary boundary layer, condensation/evaporation of water vapor, etc. These tendencies are calculated via parameterization of the processes involved that try to capture the physical behavior of the atmopshere at the subgrid scale. &lt;br /&gt;
* These tendencies are passed to the dynamical core that integrates the model forward in time to the next time step, t + δt, by solving the hydrodynamical equations. &lt;br /&gt;
* This new state can be used to recompute the tendencies for the next time step and so on. &lt;br /&gt;
&lt;br /&gt;
== Philosophy of the Generic PCM ==&lt;br /&gt;
&lt;br /&gt;
The accuracy and predictive power of any GCM is often dictated by the choice made for the physical phenomena that are included and for the way they are parametrized. To be accurate, many Earth-centric climate models use very complex parametrizations that are heavily tuned on Earth observations. Such parametrizations can, however, behave very poorly far from the parameter space where they have been validated, thus reducing their predictive power for exotic atmospheres. &lt;br /&gt;
&lt;br /&gt;
As the goal of the Generic PCM is to model the climate of very different planets with the same model, a particular emphasis has been put on using simple parametrizations based as much as possible on ab-initio physical equations and conservation principles to avoid unphysical behaviors in extreme regimes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GCM inputs and outputs ==&lt;br /&gt;
&lt;br /&gt;
[[File:Inout-eps-converted-to-1.png|thumb|input/output data]]&lt;br /&gt;
&lt;br /&gt;
The input files are the files needed to initialize the model (state of the atmosphere at instant t0 as well as a dataset of boundary conditions). The output files are “historical files”, archives of the atmospheric flow history as simulated by the model: the “diagfi files”, the “stats files”, the daily averages, and so on. The &amp;quot;parameter files&amp;quot; are the files describing the physical parameters of the planet, as well as the physical parameterizations used in the model. The figure (on the right) shows the main architecture of the Generic PCM.&lt;br /&gt;
&lt;br /&gt;
==== start and startfi files ====&lt;br /&gt;
&lt;br /&gt;
GCM simulations needs a list of initial conditions/parameters to be run. This includes, for example, the initial temperature field, wind field, cloud field, position of water reservoirs on the surface, etc.&lt;br /&gt;
&lt;br /&gt;
In the Generic PCM, initial conditions/parameters are stored in two files named &amp;quot;start.nc&amp;quot; and &amp;quot;startfi.nc&amp;quot;. At each new run, the GCM reads these two files to set up the proper set of initial conditions.&lt;br /&gt;
&lt;br /&gt;
==== start vs restart files ====&lt;br /&gt;
&lt;br /&gt;
At the end of each GCM simulation, the Generic PCM produces several output files, and notably two files named &amp;quot;restart.nc&amp;quot; and &amp;quot;restartfi.nc&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
These two files store all the final conditions of the model, which includes, for example, the initial temperature field, wind field, cloud field, position of water reservoirs on the surface, etc.&lt;br /&gt;
&lt;br /&gt;
These &amp;quot;restart.nc&amp;quot; and &amp;quot;restartfi.nc&amp;quot; have the exact same architecture than the &amp;quot;start.nc&amp;quot; and &amp;quot;startfi.nc&amp;quot; files, and can thus be used as initial conditions for a new Generic PCM simulation.&lt;br /&gt;
&lt;br /&gt;
==== parameter (.def) files ====&lt;br /&gt;
&lt;br /&gt;
The parameter files (listed below) are files required by the Generic PCM to run.&lt;br /&gt;
&lt;br /&gt;
List of needed .def files:&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def'']: Physical parameters used in the simulation&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_run.def_Input_File ''run.def'']: Numerical parameters used in the simulation&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_gases.def_Input_File ''gases.def'']: List of gases in the simulations&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def'']: Numerical tracers in the simulations&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_z2sig.def_Input_File ''z2sig.def'']: Pseudo-altitudes (in km) at which the user wants to set the vertical levels&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_diagfi.def_Input_File ''diagfi.def''] (optionnal): List of wanted outputs&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== input data ====&lt;br /&gt;
&lt;br /&gt;
The Generic PCM requires several inputs in order to run. This includes, for instance:&lt;br /&gt;
* opacity tables&lt;br /&gt;
* aerosols optical properties&lt;br /&gt;
* stellar spectrum&lt;br /&gt;
&lt;br /&gt;
These data can be modified/adapted by the users depending on the planet to be simulated.&lt;br /&gt;
&lt;br /&gt;
==== output files ====&lt;br /&gt;
&lt;br /&gt;
At the end of each GCM simulation, the Generic PCM produces several output files, and notably a file named &amp;quot;diagfi.nc&amp;quot;. This file is an archive of the atmospheric/surface fields (temperatures, winds, clouds, etc.) along the GCM simulation. This is the file that contains most of the information needed to analyze/understand the content of a GCM simulation.&lt;br /&gt;
&lt;br /&gt;
nb: The Generic PCM can also produce extra output files, such as the &amp;quot;diagspec.nc&amp;quot; files (that keep track of the spectral radiative fluxes in the GCM), the &amp;quot;stats.nc&amp;quot; (that keep track of statistical information along the GCM simulation), etc.&lt;br /&gt;
&lt;br /&gt;
== Our team of developers (by alphabetical order) ==&lt;br /&gt;
&lt;br /&gt;
'''Active contributors'''&lt;br /&gt;
&lt;br /&gt;
*Deborah Bardet&lt;br /&gt;
*Benjamin Charnay (permanent, LESIA)&lt;br /&gt;
*Guillaume Chaverot&lt;br /&gt;
*François Forget (permanent, LMD)&lt;br /&gt;
*Gabriella Gilli&lt;br /&gt;
*Sandrine Guerlet (permanent, LMD)&lt;br /&gt;
*Yassin Jaziri&lt;br /&gt;
*Sébastien Lebonnois (permanent, LMD)&lt;br /&gt;
*Jeremy Leconte (permanent, LAB)&lt;br /&gt;
*Gwenael Milcareck&lt;br /&gt;
*Ehouarn Millour (permanent, LMD)&lt;br /&gt;
*Diogo Quirino&lt;br /&gt;
*Aymeric Spiga (permanent, LMD)&lt;br /&gt;
*Lucas Teinturier&lt;br /&gt;
*Martin Turbet (permanent, LMD)&lt;br /&gt;
*Romain Vandemeulebrouck&lt;br /&gt;
&lt;br /&gt;
'''Past contributors and/or collaborators'''&lt;br /&gt;
&lt;br /&gt;
*Tanguy Bertrand&lt;br /&gt;
*Alexandre Boissinot&lt;br /&gt;
*Emeline Bolmont&lt;br /&gt;
*Antony Delavois&lt;br /&gt;
*Thomas Dubos&lt;br /&gt;
*Vincent Eymet&lt;br /&gt;
*Frédéric Hourdin&lt;br /&gt;
*Franck Lefèvre&lt;br /&gt;
*Maxence Lefèvre&lt;br /&gt;
*Laura Kerber&lt;br /&gt;
*Franck Selsis&lt;br /&gt;
*Jan Vatant d'Olonne&lt;br /&gt;
*Margaux Vals&lt;br /&gt;
*Robin Wordsworth&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=726</id>
		<title>Overview of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=726"/>
				<updated>2022-09-01T07:31:23Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: /* Our team of developers (by alphabetical order) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is a GCM ==&lt;br /&gt;
&lt;br /&gt;
A Global Climate Model (GCM) like the Generic PCM calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
To do that, the model solves 3D hydrodynamic equations that describe how atmospheric winds are created by various physical forcings (radiative heating/cooling, etc.) and how these winds transport and redistribute the various atmospheric fields (temperature, tracers, etc.). However, it can be shown that to a good level of approximation, the various forcings can be computed using only local conditions in a column of atmosphere, whereas long-range couplings between various points of the planet are mediated through atmospheric transport. &lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
For these reasons, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a 3D dynamical core''' abble to integrate in time the general equations for atmospheric circulation when the various local forcings are known. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In practice, we have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid), and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* The physical model calculates the local time derivatives of the various variables -- called the tendencies -- ((δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon: for example, heating due to absorption of solar radiation and infrared cooling, mixing due to turbulence in the planetary boundary layer, condensation/evaporation of water vapor, etc. These tendencies are calculated via parameterization of the processes involved that try to capture the physical behavior of the atmopshere at the subgrid scale. &lt;br /&gt;
* These tendencies are passed to the dynamical core that integrates the model forward in time to the next time step, t + δt, by solving the hydrodynamical equations. &lt;br /&gt;
* This new state can be used to recompute the tendencies for the next time step and so on. &lt;br /&gt;
&lt;br /&gt;
== Philosophy of the Generic PCM ==&lt;br /&gt;
&lt;br /&gt;
The accuracy and predictive power of any GCM is often dictated by the choice made for the physical phenomena that are included and for the way they are parametrized. To be accurate, many Earth-centric climate models use very complex parametrizations that are heavily tuned on Earth observations. Such parametrizations can, however, behave very poorly far from the parameter space where they have been validated, thus reducing their predictive power for exotic atmospheres. &lt;br /&gt;
&lt;br /&gt;
As the goal of the Generic PCM is to model the climate of very different planets with the same model, a particular emphasis has been put on using simple parametrizations based as much as possible on ab-initio physical equations and conservation principles to avoid unphysical behaviors in extreme regimes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GCM inputs and outputs ==&lt;br /&gt;
&lt;br /&gt;
[[File:Inout-eps-converted-to-1.png|thumb|input/output data]]&lt;br /&gt;
&lt;br /&gt;
The input files are the files needed to initialize the model (state of the atmosphere at instant t0 as well as a dataset of boundary conditions). The output files are “historical files”, archives of the atmospheric flow history as simulated by the model: the “diagfi files”, the “stats files”, the daily averages, and so on. The &amp;quot;parameter files&amp;quot; are the files describing the physical parameters of the planet, as well as the physical parameterizations used in the model. The figure (on the right) shows the main architecture of the Generic PCM.&lt;br /&gt;
&lt;br /&gt;
==== start and startfi files ====&lt;br /&gt;
&lt;br /&gt;
GCM simulations needs a list of initial conditions/parameters to be run. This includes, for example, the initial temperature field, wind field, cloud field, position of water reservoirs on the surface, etc.&lt;br /&gt;
&lt;br /&gt;
In the Generic PCM, initial conditions/parameters are stored in two files named &amp;quot;start.nc&amp;quot; and &amp;quot;startfi.nc&amp;quot;. At each new run, the GCM reads these two files to set up the proper set of initial conditions.&lt;br /&gt;
&lt;br /&gt;
==== start vs restart files ====&lt;br /&gt;
&lt;br /&gt;
At the end of each GCM simulation, the Generic PCM produces several output files, and notably two files named &amp;quot;restart.nc&amp;quot; and &amp;quot;restartfi.nc&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
These two files store all the final conditions of the model, which includes, for example, the initial temperature field, wind field, cloud field, position of water reservoirs on the surface, etc.&lt;br /&gt;
&lt;br /&gt;
These &amp;quot;restart.nc&amp;quot; and &amp;quot;restartfi.nc&amp;quot; have the exact same architecture than the &amp;quot;start.nc&amp;quot; and &amp;quot;startfi.nc&amp;quot; files, and can thus be used as initial conditions for a new Generic PCM simulation.&lt;br /&gt;
&lt;br /&gt;
==== parameter (.def) files ====&lt;br /&gt;
&lt;br /&gt;
The parameter files (listed below) are files required by the Generic PCM to run.&lt;br /&gt;
&lt;br /&gt;
List of needed .def files:&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def'']: Physical parameters used in the simulation&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_run.def_Input_File ''run.def'']: Numerical parameters used in the simulation&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_gases.def_Input_File ''gases.def'']: List of gases in the simulations&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def'']: Numerical tracers in the simulations&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_z2sig.def_Input_File ''z2sig.def'']: Pseudo-altitudes (in km) at which the user wants to set the vertical levels&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_diagfi.def_Input_File ''diagfi.def''] (optionnal): List of wanted outputs&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== input data ====&lt;br /&gt;
&lt;br /&gt;
The Generic PCM requires several inputs in order to run. This includes, for instance:&lt;br /&gt;
* opacity tables&lt;br /&gt;
* aerosols optical properties&lt;br /&gt;
* stellar spectrum&lt;br /&gt;
&lt;br /&gt;
These data can be modified/adapted by the users depending on the planet to be simulated.&lt;br /&gt;
&lt;br /&gt;
==== output files ====&lt;br /&gt;
&lt;br /&gt;
At the end of each GCM simulation, the Generic PCM produces several output files, and notably a file named &amp;quot;diagfi.nc&amp;quot;. This file is an archive of the atmospheric/surface fields (temperatures, winds, clouds, etc.) along the GCM simulation. This is the file that contains most of the information needed to analyze/understand the content of a GCM simulation.&lt;br /&gt;
&lt;br /&gt;
nb: The Generic PCM can also produce extra output files, such as the &amp;quot;diagspec.nc&amp;quot; files (that keep track of the spectral radiative fluxes in the GCM), the &amp;quot;stats.nc&amp;quot; (that keep track of statistical information along the GCM simulation), etc.&lt;br /&gt;
&lt;br /&gt;
== Our team of developers (by alphabetical order) ==&lt;br /&gt;
&lt;br /&gt;
'''Active contributors'''&lt;br /&gt;
&lt;br /&gt;
*Deborah Bardet&lt;br /&gt;
*Benjamin Charnay (permanent, LESIA)&lt;br /&gt;
*Guillaume Chaverot&lt;br /&gt;
*François Forget (permanent, LMD)&lt;br /&gt;
*Gabriella Gilli&lt;br /&gt;
*Sandrine Guerlet (permanent, LMD)&lt;br /&gt;
*Yassin Jaziri&lt;br /&gt;
*Jeremy Leconte (permanent, LAB)&lt;br /&gt;
*Sébastien Lebonnois (permanent, LMD)&lt;br /&gt;
*Gwenael Milcareck&lt;br /&gt;
*Ehouarn Millour (permanent, LMD)&lt;br /&gt;
*Diogo Quirino&lt;br /&gt;
*Aymeric Spiga (permanent, LMD)&lt;br /&gt;
*Lucas Teinturier&lt;br /&gt;
*Martin Turbet (permanent, LMD)&lt;br /&gt;
*Romain Vandemeulebrouck&lt;br /&gt;
&lt;br /&gt;
'''Past contributors and/or collaborators'''&lt;br /&gt;
&lt;br /&gt;
*Tanguy Bertrand&lt;br /&gt;
*Alexandre Boissinot&lt;br /&gt;
*Emeline Bolmont&lt;br /&gt;
*Antony Delavois&lt;br /&gt;
*Thomas Dubos&lt;br /&gt;
*Vincent Eymet&lt;br /&gt;
*Frédéric Hourdin&lt;br /&gt;
*Franck Lefèvre&lt;br /&gt;
*Maxence Lefèvre&lt;br /&gt;
*Laura Kerber&lt;br /&gt;
*Franck Selsis&lt;br /&gt;
*Jan Vatant d'Olonne&lt;br /&gt;
*Margaux Vals&lt;br /&gt;
*Robin Wordsworth&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=725</id>
		<title>Overview of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=725"/>
				<updated>2022-09-01T07:30:23Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is a GCM ==&lt;br /&gt;
&lt;br /&gt;
A Global Climate Model (GCM) like the Generic PCM calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
To do that, the model solves 3D hydrodynamic equations that describe how atmospheric winds are created by various physical forcings (radiative heating/cooling, etc.) and how these winds transport and redistribute the various atmospheric fields (temperature, tracers, etc.). However, it can be shown that to a good level of approximation, the various forcings can be computed using only local conditions in a column of atmosphere, whereas long-range couplings between various points of the planet are mediated through atmospheric transport. &lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
For these reasons, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a 3D dynamical core''' abble to integrate in time the general equations for atmospheric circulation when the various local forcings are known. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In practice, we have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid), and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* The physical model calculates the local time derivatives of the various variables -- called the tendencies -- ((δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon: for example, heating due to absorption of solar radiation and infrared cooling, mixing due to turbulence in the planetary boundary layer, condensation/evaporation of water vapor, etc. These tendencies are calculated via parameterization of the processes involved that try to capture the physical behavior of the atmopshere at the subgrid scale. &lt;br /&gt;
* These tendencies are passed to the dynamical core that integrates the model forward in time to the next time step, t + δt, by solving the hydrodynamical equations. &lt;br /&gt;
* This new state can be used to recompute the tendencies for the next time step and so on. &lt;br /&gt;
&lt;br /&gt;
== Philosophy of the Generic PCM ==&lt;br /&gt;
&lt;br /&gt;
The accuracy and predictive power of any GCM is often dictated by the choice made for the physical phenomena that are included and for the way they are parametrized. To be accurate, many Earth-centric climate models use very complex parametrizations that are heavily tuned on Earth observations. Such parametrizations can, however, behave very poorly far from the parameter space where they have been validated, thus reducing their predictive power for exotic atmospheres. &lt;br /&gt;
&lt;br /&gt;
As the goal of the Generic PCM is to model the climate of very different planets with the same model, a particular emphasis has been put on using simple parametrizations based as much as possible on ab-initio physical equations and conservation principles to avoid unphysical behaviors in extreme regimes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GCM inputs and outputs ==&lt;br /&gt;
&lt;br /&gt;
[[File:Inout-eps-converted-to-1.png|thumb|input/output data]]&lt;br /&gt;
&lt;br /&gt;
The input files are the files needed to initialize the model (state of the atmosphere at instant t0 as well as a dataset of boundary conditions). The output files are “historical files”, archives of the atmospheric flow history as simulated by the model: the “diagfi files”, the “stats files”, the daily averages, and so on. The &amp;quot;parameter files&amp;quot; are the files describing the physical parameters of the planet, as well as the physical parameterizations used in the model. The figure (on the right) shows the main architecture of the Generic PCM.&lt;br /&gt;
&lt;br /&gt;
==== start and startfi files ====&lt;br /&gt;
&lt;br /&gt;
GCM simulations needs a list of initial conditions/parameters to be run. This includes, for example, the initial temperature field, wind field, cloud field, position of water reservoirs on the surface, etc.&lt;br /&gt;
&lt;br /&gt;
In the Generic PCM, initial conditions/parameters are stored in two files named &amp;quot;start.nc&amp;quot; and &amp;quot;startfi.nc&amp;quot;. At each new run, the GCM reads these two files to set up the proper set of initial conditions.&lt;br /&gt;
&lt;br /&gt;
==== start vs restart files ====&lt;br /&gt;
&lt;br /&gt;
At the end of each GCM simulation, the Generic PCM produces several output files, and notably two files named &amp;quot;restart.nc&amp;quot; and &amp;quot;restartfi.nc&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
These two files store all the final conditions of the model, which includes, for example, the initial temperature field, wind field, cloud field, position of water reservoirs on the surface, etc.&lt;br /&gt;
&lt;br /&gt;
These &amp;quot;restart.nc&amp;quot; and &amp;quot;restartfi.nc&amp;quot; have the exact same architecture than the &amp;quot;start.nc&amp;quot; and &amp;quot;startfi.nc&amp;quot; files, and can thus be used as initial conditions for a new Generic PCM simulation.&lt;br /&gt;
&lt;br /&gt;
==== parameter (.def) files ====&lt;br /&gt;
&lt;br /&gt;
The parameter files (listed below) are files required by the Generic PCM to run.&lt;br /&gt;
&lt;br /&gt;
List of needed .def files:&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def'']: Physical parameters used in the simulation&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_run.def_Input_File ''run.def'']: Numerical parameters used in the simulation&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_gases.def_Input_File ''gases.def'']: List of gases in the simulations&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def'']: Numerical tracers in the simulations&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_z2sig.def_Input_File ''z2sig.def'']: Pseudo-altitudes (in km) at which the user wants to set the vertical levels&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_diagfi.def_Input_File ''diagfi.def''] (optionnal): List of wanted outputs&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== input data ====&lt;br /&gt;
&lt;br /&gt;
The Generic PCM requires several inputs in order to run. This includes, for instance:&lt;br /&gt;
* opacity tables&lt;br /&gt;
* aerosols optical properties&lt;br /&gt;
* stellar spectrum&lt;br /&gt;
&lt;br /&gt;
These data can be modified/adapted by the users depending on the planet to be simulated.&lt;br /&gt;
&lt;br /&gt;
==== output files ====&lt;br /&gt;
&lt;br /&gt;
At the end of each GCM simulation, the Generic PCM produces several output files, and notably a file named &amp;quot;diagfi.nc&amp;quot;. This file is an archive of the atmospheric/surface fields (temperatures, winds, clouds, etc.) along the GCM simulation. This is the file that contains most of the information needed to analyze/understand the content of a GCM simulation.&lt;br /&gt;
&lt;br /&gt;
nb: The Generic PCM can also produce extra output files, such as the &amp;quot;diagspec.nc&amp;quot; files (that keep track of the spectral radiative fluxes in the GCM), the &amp;quot;stats.nc&amp;quot; (that keep track of statistical information along the GCM simulation), etc.&lt;br /&gt;
&lt;br /&gt;
== Our team of developers (by alphabetical order) ==&lt;br /&gt;
&lt;br /&gt;
'''Active contributors'''&lt;br /&gt;
&lt;br /&gt;
*Benjamin Charnay (permanent, LESIA)&lt;br /&gt;
*Guillaume Chaverot&lt;br /&gt;
*Deborah Bardet&lt;br /&gt;
*François Forget (permanent, LMD)&lt;br /&gt;
*Gabriella Gilli&lt;br /&gt;
*Sandrine Guerlet (permanent, LMD)&lt;br /&gt;
*Yassin Jaziri&lt;br /&gt;
*Jeremy Leconte (permanent, LAB)&lt;br /&gt;
*Sébastien Lebonnois (permanent, LMD)&lt;br /&gt;
*Gwenael Milcareck&lt;br /&gt;
*Ehouarn Millour (permanent, LMD)&lt;br /&gt;
*Diogo Quirino&lt;br /&gt;
*Aymeric Spiga (permanent, LMD)&lt;br /&gt;
*Lucas Teinturier&lt;br /&gt;
*Martin Turbet (permanent, LMD)&lt;br /&gt;
*Romain Vandemeulebrouck&lt;br /&gt;
&lt;br /&gt;
'''Past contributors and/or collaborators'''&lt;br /&gt;
&lt;br /&gt;
*Tanguy Bertrand&lt;br /&gt;
*Alexandre Boissinot&lt;br /&gt;
*Emeline Bolmont&lt;br /&gt;
*Antony Delavois&lt;br /&gt;
*Thomas Dubos&lt;br /&gt;
*Vincent Eymet&lt;br /&gt;
*Frédéric Hourdin&lt;br /&gt;
*Franck Lefèvre&lt;br /&gt;
*Maxence Lefèvre&lt;br /&gt;
*Laura Kerber&lt;br /&gt;
*Franck Selsis&lt;br /&gt;
*Jan Vatant d'Olonne&lt;br /&gt;
*Margaux Vals&lt;br /&gt;
*Robin Wordsworth&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=702</id>
		<title>Overview of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=702"/>
				<updated>2022-08-31T15:43:08Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is a GCM? ==&lt;br /&gt;
&lt;br /&gt;
Our Global Climate Model (GCM) calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* We calculate the evolution (the tendencies) (δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon, calculated via the parameterization thereof (e.g., heating due to absorption of solar radiation, mixing due to turbulence in the planetary boundary layer, etc.). &lt;br /&gt;
* In order to move on to the next time step, t + δt, we can calculate X&amp;lt;sub&amp;gt;t+δt&amp;lt;/sub&amp;gt; from X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; and (δX/δt). This is formally known as the time integration of the variables. (For example, X&amp;lt;sub&amp;gt;t+δt&amp;lt;/sub&amp;gt; = X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; + (δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;δt + (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;δt + ...)&lt;br /&gt;
&lt;br /&gt;
The main task of the model is to calculate these tendencies (δX/δt) arising from the different parameterized phenomena.&lt;br /&gt;
&lt;br /&gt;
TO BE MODIFIED (AND COMPLETED) by Jeremy&lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
== Physical vs dynamical core ==&lt;br /&gt;
&lt;br /&gt;
In practice, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a dynamical core''' containing the numerical solution of the general equations for atmospheric circulation. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
In practice, we do have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid) and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
TO BE MODIFIED (AND COMPLETED) by Aymeric&lt;br /&gt;
&lt;br /&gt;
== What is a GCM (alternative version by JL) ==&lt;br /&gt;
&lt;br /&gt;
A Global Climate Model (GCM) like the Generic PCM calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
To do that, the model solves 3D hydrodynamic equations that describe how atmospheric winds are created by various physical forcings (radiative heating/cooling, etc.) and how these winds transport and redistribute the various atmospheric fields (temperature, tracers, etc.). However, it can be shown that to a good level of approximation, the various forcings can be computed using only local conditions in a column of atmosphere, whereas long-range couplings between various points of the planet are mediated through atmospheric transport. &lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
For these reasons, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a 3D dynamical core''' abble to integrate in time the general equations for atmospheric circulation when the various local forcings are known. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In practice, we have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid), and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* The physical model calculates the local time derivatives of the various variables -- called the tendencies -- ((δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon: for example, heating due to absorption of solar radiation and infrared cooling, mixing due to turbulence in the planetary boundary layer, condensation/evaporation of water vapor, etc. These tendencies are calculated via parameterization of the processes involved that try to capture the physical behavior of the atmopshere at the subgrid scale. &lt;br /&gt;
* These tendencies are passed to the dynamical core that integrates the model forward in time to the next time step, t + δt, by solving the hydrodynamical equations. &lt;br /&gt;
* This new state can be used to recompute the tendencies for the next time step and so on. &lt;br /&gt;
&lt;br /&gt;
== Philosophy of the Generic PCM ==&lt;br /&gt;
&lt;br /&gt;
The accuracy and predictive power of any GCM is often dictated by the choice made for the physical phenomena that are included and for the way they are parametrized. To be accurate, many Earth-centric climate models use very complex parametrization that are heavily tuned on Earth observations. Such parametrization can, however, behave very poorly far from the parameter space where they have been validated, thus reducing their predictive power for exotic atmospheres. &lt;br /&gt;
&lt;br /&gt;
As the goal of the Generic PCM is to model the climate of very different planets with the same model, a particular emphasis has been put on using simple parametrizations based as much as possible on ab-initio physical equations and conservation principles to avoid unphysical behaviors in extreme regimes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GCM inputs and outputs ==&lt;br /&gt;
&lt;br /&gt;
[[File:Inout-eps-converted-to-1.png|thumb|input/output data]]&lt;br /&gt;
&lt;br /&gt;
The input files are the files needed to initialize the model (state of the atmosphere at instant t0 as well as a dataset of boundary conditions). The output files are “historical files”, archives of the atmospheric flow history as simulated by the model, the “diagfi files”, the “stats files”, the daily averages, and so on.&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== start and startfi files ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== start vs restart files ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== .def files ====&lt;br /&gt;
&lt;br /&gt;
List of needed .def files:&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def'']: Physical parameters&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_run.def_Input_File ''run.def'']: Numerical parameters&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_gases.def_Input_File ''gases.def'']: List of gases&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def'']: Numerical traceurs in the atmosphere&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_z2sig.def_Input_File ''z2sig.def'']: Pseudo-altitudes (in km) at which the user wants to set the vertical levels&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_diagfi.def_Input_File ''diagfi.def''] (optionnal): List of wanted outputs&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== input data ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== output files ====&lt;br /&gt;
&lt;br /&gt;
diagfi.nc&lt;br /&gt;
diagspec_IR.nc / diagspec_VI.nc&lt;br /&gt;
stats.nc&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
== Our team of developers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=701</id>
		<title>Overview of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=701"/>
				<updated>2022-08-31T15:42:50Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is a GCM? ==&lt;br /&gt;
&lt;br /&gt;
Our Global Climate Model (GCM) calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* We calculate the evolution (the tendencies) (δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon, calculated via the parameterization thereof (e.g., heating due to absorption of solar radiation, mixing due to turbulence in the planetary boundary layer, etc.). &lt;br /&gt;
* In order to move on to the next time step, t + δt, we can calculate X&amp;lt;sub&amp;gt;t+δt&amp;lt;/sub&amp;gt; from X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; and (δX/δt). This is formally known as the time integration of the variables. (For example, X&amp;lt;sub&amp;gt;t+δt&amp;lt;/sub&amp;gt; = X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; + (δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;δt + (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;δt + ...)&lt;br /&gt;
&lt;br /&gt;
The main task of the model is to calculate these tendencies (δX/δt) arising from the different parameterized phenomena.&lt;br /&gt;
&lt;br /&gt;
TO BE MODIFIED (AND COMPLETED) by Jeremy&lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
== Physical vs dynamical core ==&lt;br /&gt;
&lt;br /&gt;
In practice, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a dynamical core''' containing the numerical solution of the general equations for atmospheric circulation. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
In practice, we do have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid) and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
TO BE MODIFIED (AND COMPLETED) by Aymeric&lt;br /&gt;
&lt;br /&gt;
== What is a GCM (alternative version by JL) ==&lt;br /&gt;
&lt;br /&gt;
A Global Climate Model (GCM) like the Generic PCM calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
To do that, the model solves 3D hydrodynamic equations that describe how atmospheric winds are created by various physical forcings (radiative heating/cooling, etc.) and how these winds transport and redistribute the various atmospheric fields (temperature, tracers, etc.). However, it can be shown that to a good level of approximation, the various forcings can be computed using only local conditions in a column of atmosphere, whereas long-range couplings between various points of the planet are mediated through atmospheric transport. &lt;br /&gt;
&lt;br /&gt;
For these reasons, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
* '''a 3D dynamical core''' abble to integrate in time the general equations for atmospheric circulation when the various local forcings are known. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In practice, we have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid), and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* The physical model calculates the local time derivatives of the various variables -- called the tendencies -- ((δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon: for example, heating due to absorption of solar radiation and infrared cooling, mixing due to turbulence in the planetary boundary layer, condensation/evaporation of water vapor, etc. These tendencies are calculated via parameterization of the processes involved that try to capture the physical behavior of the atmopshere at the subgrid scale. &lt;br /&gt;
* These tendencies are passed to the dynamical core that integrates the model forward in time to the next time step, t + δt, by solving the hydrodynamical equations. &lt;br /&gt;
* This new state can be used to recompute the tendencies for the next time step and so on. &lt;br /&gt;
&lt;br /&gt;
== Philosophy of the Generic PCM ==&lt;br /&gt;
&lt;br /&gt;
The accuracy and predictive power of any GCM is often dictated by the choice made for the physical phenomena that are included and for the way they are parametrized. To be accurate, many Earth-centric climate models use very complex parametrization that are heavily tuned on Earth observations. Such parametrization can, however, behave very poorly far from the parameter space where they have been validated, thus reducing their predictive power for exotic atmospheres. &lt;br /&gt;
&lt;br /&gt;
As the goal of the Generic PCM is to model the climate of very different planets with the same model, a particular emphasis has been put on using simple parametrizations based as much as possible on ab-initio physical equations and conservation principles to avoid unphysical behaviors in extreme regimes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GCM inputs and outputs ==&lt;br /&gt;
&lt;br /&gt;
[[File:Inout-eps-converted-to-1.png|thumb|input/output data]]&lt;br /&gt;
&lt;br /&gt;
The input files are the files needed to initialize the model (state of the atmosphere at instant t0 as well as a dataset of boundary conditions). The output files are “historical files”, archives of the atmospheric flow history as simulated by the model, the “diagfi files”, the “stats files”, the daily averages, and so on.&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== start and startfi files ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== start vs restart files ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== .def files ====&lt;br /&gt;
&lt;br /&gt;
List of needed .def files:&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def'']: Physical parameters&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_run.def_Input_File ''run.def'']: Numerical parameters&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_gases.def_Input_File ''gases.def'']: List of gases&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def'']: Numerical traceurs in the atmosphere&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_z2sig.def_Input_File ''z2sig.def'']: Pseudo-altitudes (in km) at which the user wants to set the vertical levels&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_diagfi.def_Input_File ''diagfi.def''] (optionnal): List of wanted outputs&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== input data ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== output files ====&lt;br /&gt;
&lt;br /&gt;
diagfi.nc&lt;br /&gt;
diagspec_IR.nc / diagspec_VI.nc&lt;br /&gt;
stats.nc&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
== Our team of developers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=700</id>
		<title>Overview of the Generic PCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Overview_of_the_Generic_PCM&amp;diff=700"/>
				<updated>2022-08-31T15:39:54Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is a GCM? ==&lt;br /&gt;
&lt;br /&gt;
Our Global Climate Model (GCM) calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* We calculate the evolution (the tendencies) (δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon, calculated via the parameterization thereof (e.g., heating due to absorption of solar radiation, mixing due to turbulence in the planetary boundary layer, etc.). &lt;br /&gt;
* In order to move on to the next time step, t + δt, we can calculate X&amp;lt;sub&amp;gt;t+δt&amp;lt;/sub&amp;gt; from X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; and (δX/δt). This is formally known as the time integration of the variables. (For example, X&amp;lt;sub&amp;gt;t+δt&amp;lt;/sub&amp;gt; = X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; + (δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;δt + (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;δt + ...)&lt;br /&gt;
&lt;br /&gt;
The main task of the model is to calculate these tendencies (δX/δt) arising from the different parameterized phenomena.&lt;br /&gt;
&lt;br /&gt;
TO BE MODIFIED (AND COMPLETED) by Jeremy&lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
== Physical vs dynamical core ==&lt;br /&gt;
&lt;br /&gt;
In practice, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a dynamical core''' containing the numerical solution of the general equations for atmospheric circulation. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
In practice, we do have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid) and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
TO BE MODIFIED (AND COMPLETED) by Aymeric&lt;br /&gt;
&lt;br /&gt;
== What is a GCM (alternative version by JL) ==&lt;br /&gt;
&lt;br /&gt;
A Global Climate Model (GCM) like the Generic PCM calculates the temporal evolution of the different variables (temperature, pressure, mass, mixing ratio of tracers/gas/clouds, winds, etc.) that control or describe the planetary meteorology and climate at different points of a 3D “grid” that covers the entire atmosphere.&lt;br /&gt;
&lt;br /&gt;
To do that, the model solves 3D hydrodynamic equations that describe how atmospheric winds are created by various physical forcings (radiative heating/cooling, etc.) and how these winds transport and redistribute the various atmospheric fields (temperature, tracers, etc.). However, it can be shown that to a good level of approximation, the various forcings can be computed using only local conditions in a column of atmosphere, whereas long-range couplings between various points of the planet are mediated through atmospheric transport. &lt;br /&gt;
&lt;br /&gt;
For these reasons, the 3D model is split in two components:&lt;br /&gt;
&lt;br /&gt;
* '''a 3D dynamical core''' abble to integrate in time the general equations for atmospheric circulation when the various local forcings are known. This component (including source code) is common to all terrestrial-type atmospheres, and applicable in certain cases to the upper atmospheres of gas giant planets.&lt;br /&gt;
* '''a physical package''' that is specific to the planet in question (as it takes into account dedicated parametrizations representative of ongoing physical processes) and which computes atmospheric processes in each atmospheric column (which are sub-grid-scale from the point of view of the dynamical core).&lt;br /&gt;
&lt;br /&gt;
[[File:Didi-eps-converted-to-1.png|thumb|Physics / Dynamics interface]]&lt;br /&gt;
&lt;br /&gt;
In practice, we have several '''dynamical cores''' available with the model: LMDZ (global longitude/latitude grid), DYNAMICO (icosaedric grid), and WRF (rectangular box for local/regional studies)&lt;br /&gt;
&lt;br /&gt;
From an initial state, the model calculates the temporal evolution of these variables, one timestep after another:&lt;br /&gt;
* At instant t, variables X&amp;lt;sub&amp;gt;t&amp;lt;/sub&amp;gt; (temperature for example) are known at every grid point of the atmosphere.&lt;br /&gt;
* The physical model calculates the local time derivatives of the various variables -- called the tendencies -- ((δX/δt)&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, (δX/δt)&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, etc.) due to each physical phenomenon: for example, heating due to absorption of solar radiation and infrared cooling, mixing due to turbulence in the planetary boundary layer, condensation/evaporation of water vapor, etc. These tendencies are calculated via parameterization of the processes involved that try to capture the physical behavior of the atmopshere at the subgrid scale. &lt;br /&gt;
* These tendencies are passed to the dynamical core that integrates the model forward in time to the next time step, t + δt, by solving the hydrodynamical equations. &lt;br /&gt;
* This new state can be used to recompute the tendencies for the next time step and so on. &lt;br /&gt;
&lt;br /&gt;
== Philosophy of the Generic PCM ==&lt;br /&gt;
&lt;br /&gt;
The accuracy and predictive power of any GCM is often dictated by the choice made for the physical phenomena that are included and for the way they are parametrized. To be accurate, many Earth-centric climate models use very complex parametrization that are heavily tuned on Earth observations. Such parametrization can, however, behave very poorly far from the parameter space where they have been validated, thus reducing their predictive power for exotic atmospheres. &lt;br /&gt;
&lt;br /&gt;
As the goal of the Generic PCM is to model the climate of very different planets with the same model, a particular emphasis has been put on using simple parametrizations based as much as possible on ab-initio physical equations and conservation principles to avoid unphysical behaviors in extreme regimes. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== GCM inputs and outputs ==&lt;br /&gt;
&lt;br /&gt;
[[File:Inout-eps-converted-to-1.png|thumb|input/output data]]&lt;br /&gt;
&lt;br /&gt;
The input files are the files needed to initialize the model (state of the atmosphere at instant t0 as well as a dataset of boundary conditions). The output files are “historical files”, archives of the atmospheric flow history as simulated by the model, the “diagfi files”, the “stats files”, the daily averages, and so on.&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== start and startfi files ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== start vs restart files ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== .def files ====&lt;br /&gt;
&lt;br /&gt;
List of needed .def files:&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def'']: Physical parameters&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_run.def_Input_File ''run.def'']: Numerical parameters&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_gases.def_Input_File ''gases.def'']: List of gases&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def'']: Numerical traceurs in the atmosphere&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_z2sig.def_Input_File ''z2sig.def'']: Pseudo-altitudes (in km) at which the user wants to set the vertical levels&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_diagfi.def_Input_File ''diagfi.def''] (optionnal): List of wanted outputs&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== input data ====&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
==== output files ====&lt;br /&gt;
&lt;br /&gt;
diagfi.nc&lt;br /&gt;
diagspec_IR.nc / diagspec_VI.nc&lt;br /&gt;
stats.nc&lt;br /&gt;
etc.&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
== Our team of developers ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=423</id>
		<title>Advanced Use of the GCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=423"/>
				<updated>2022-06-22T10:54:37Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Running in parallel ==&lt;br /&gt;
&lt;br /&gt;
For large simulation (long run, high resolution etc...), the waiting time can becomes very long.&lt;br /&gt;
To overcome this issue, the model can works in parallel.&lt;br /&gt;
It first needs to be compiled in parallel mode and then be run with a specific command.&lt;br /&gt;
For all the details see the dedicated page [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Parallelism Parallelism]&lt;br /&gt;
&lt;br /&gt;
== Distinctions beween ifort, mpi, etc. ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Ehouarn ?&lt;br /&gt;
&lt;br /&gt;
== Distinction between using IOIPSL or XIOS ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Ehouarn ?&lt;br /&gt;
&lt;br /&gt;
== How to Change Vertical and Horizontal Resolutions ==&lt;br /&gt;
&lt;br /&gt;
=== When you are using the regular longitude/latitude horizontal grid ===&lt;br /&gt;
To run at a different grid resolution than available initial conditions files, one needs to use the tools ''newstart.e'' and ''start2archive.e''&lt;br /&gt;
&lt;br /&gt;
For example, to create initial states at grid resolution 32×24×25 from NetCDF files start and startfi at grid resolution 64×48×32 :&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at grid resolution 64×48×32 using old file ''z2sig.def'' used previously&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled at grid resolution 32×24×25, using a new file ''z2sig.def'' (more details below on the choice of the ''z2sig.def'').&lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
&lt;br /&gt;
==== What you need to ''know'' about the ''z2sig.def'' file ====&lt;br /&gt;
&lt;br /&gt;
For a model with Nlay layers, the z2sig.def file must contain at least Nlay+1 lines (the other not being read).&lt;br /&gt;
&lt;br /&gt;
The first line is a scale height ($$H$$). The following lines are the target pseudo-altitudes for the model from the bottom up ($$z_i$$).&lt;br /&gt;
The units do not matter as long as you use the same ones for both. &lt;br /&gt;
&lt;br /&gt;
The model will use these altitudes to compute a target pressure grid ($$p_i$$ ) as follows:&lt;br /&gt;
\begin{align}&lt;br /&gt;
  \label{def:pseudoalt}&lt;br /&gt;
  p_i &amp;amp;= p_s \exp(-z_i/H),&lt;br /&gt;
\end{align}&lt;br /&gt;
where $$p_s$$ is the surface pressure. &lt;br /&gt;
&lt;br /&gt;
As you can see, the scale height and pseudo altitudes enter the equation only through their ratio. So they do not have to to be the real scale-height and altitudes of the atmosphere you are simulating.&lt;br /&gt;
So you can use the same z2sig.def for different planets. &lt;br /&gt;
&lt;br /&gt;
There is no hard rule to follow to determine the altitude/pressure levels you should use. As a rule of thumb, layers should be thiner near the surface to properly resolve the surface boundary layer. Then they should gradually increase in size over a couple scale heights and transition to constant thickness above that. Of course, some specific applications may require thinner layers in some specific parts of the atmospheres. &lt;br /&gt;
&lt;br /&gt;
A little trick for those who prefer to think in terms of (log)pressure: if you use $$H= - \ln 0.1 \approx 2.30259$$, then $$z_i=x$$ corresponds to a pressure difference with the surface of exactly x pressure decades. This is particularly useful for giant-planet applications.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- [NOT RELEVANT??] If you want to create starts files with tracers for 50 layers using a start archive.nc obtained for 32 layers, do not forget to use the ini_q option in newstart in order to correctly initialize tracers value for layer 33 to layer 50. You just have to answer yes to the question on thermosphere initialization if you want to initialize the thermosphere part only (l=33 to l=50), and no if you want to initialize tracers for all layers (l=0 to l=50). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== When you are using the DYNAMICO icosahedral horizontal grid ===&lt;br /&gt;
&lt;br /&gt;
The horizontal resolution for the DYNAMICO dynamical core is managed from several setting files, online during the execution. &lt;br /&gt;
To this purpose, each part  of the GCM managing the in/output fields ('''ICOSAGCM''', '''ICOSA_LMDZ''', '''XIOS''') requires to know the input and output grids: &lt;br /&gt;
&lt;br /&gt;
'''1. ''context_lmdz_physics.xml'':'''&lt;br /&gt;
&lt;br /&gt;
You can find several grid setup already defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;domain_definition&amp;gt;&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_96_95&amp;quot; ni_glo=&amp;quot;96&amp;quot; nj_glo=&amp;quot;95&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_144_142&amp;quot; ni_glo=&amp;quot;144&amp;quot; nj_glo=&amp;quot;142&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_512_360&amp;quot; ni_glo=&amp;quot;512&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_720_360&amp;quot; ni_glo=&amp;quot;720&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/domain_definition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the output grid for the physics fields is defined by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is an half-degree horizontal resolution. To change this resolution, you have to change name of the '''domain_ref''' grid, for instance: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_96_95&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. ''run_icosa.def'': setting file to execute a simulation''' &lt;br /&gt;
&lt;br /&gt;
In this file, regarding of the horizontal resolution intended, you have to set the number of subdivision on the main triangle. &lt;br /&gt;
For reminder, each hexagonal mesh is divided in several main triangles and each main triangles are divided in suitable number of sub-triangles according the horizontal resolution&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
#nbp --&amp;gt; number of subdivision on a main triangle: integer (default=40)&lt;br /&gt;
#              nbp = sqrt((nbr_lat x nbr_lon)/10)&lt;br /&gt;
#              nbp:                 20   40   80  160&lt;br /&gt;
#              T-edge length (km): 500  250  120   60&lt;br /&gt;
#              Example: nbp(128x96) = 35 -&amp;gt; 40&lt;br /&gt;
#                       nbp(256x192)= 70 -&amp;gt; 80&lt;br /&gt;
#                       nbp(360x720)= 160 -&amp;gt; 160&lt;br /&gt;
nbp = 160&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have chosen the 96_95 output grid in ''context_lmdz_physics.xml'', you have to calculate $$nbp = \sqrt(96x95) / 10 = 10$$ and  in this case &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nbp = 20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the number of subdivision of the main triangle, you have to define the number subdivision over each direction. At this stage you need to be careful as the number of subdivisions on each direction:&lt;br /&gt;
* needs to be set according to the number of subdivisions on the main triangle '''nbp'''&lt;br /&gt;
* will determine the number of processors on which the GCM will be most effective&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
#nsplit_i=1&lt;br /&gt;
#nsplit_j=1&lt;br /&gt;
#omp_level_size=1&lt;br /&gt;
###############################################################&lt;br /&gt;
## There must be less MPIxOpenMP processes than the 10 x nsplit_i x nsplit_j tiles&lt;br /&gt;
## typically for pure MPI runs, let nproc = 10 x nsplit_i x nsplit_j&lt;br /&gt;
## it is better to have nbp/nsplit_i  &amp;gt; 10 and nbp/nplit_j &amp;gt; 10&lt;br /&gt;
###############################################################&lt;br /&gt;
#### 40 noeuds de 24 processeurs = 960 procs&lt;br /&gt;
nsplit_i=12&lt;br /&gt;
nsplit_j=8&lt;br /&gt;
&lt;br /&gt;
#### 50 noeuds de 24 processeurs = 1200 procs&lt;br /&gt;
#nsplit_i=10&lt;br /&gt;
#nsplit_j=12&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the same example as above, the 96_95 output grid requires:&lt;br /&gt;
$$nsplit_i &amp;lt; 2$$ and $$nsplit_j &amp;lt; 2$$&lt;br /&gt;
We advise you to select:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
nsplit_i=1&lt;br /&gt;
nsplit_j=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and using 10 processors.&lt;br /&gt;
&lt;br /&gt;
== How to Change the Topography (or remove it) ==&lt;br /&gt;
&lt;br /&gt;
The generic model can use in principle any type of surface topography, provided that the topographic data file is available in the right format, and put in the right place. The information content on the surface topography is contained in the ''startfi.nc'', and we do have developed tools (see below) to modify the ''startfi.nc'' to account for a new surface topography.&lt;br /&gt;
&lt;br /&gt;
To change the surface topography of a simulation, we recommend to follow the procedure detailed below:&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at the same (horizontal and vertical) resolution than the ''start.nc'' and ''startfi.nc'' files.&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled again at the same (horizontal and vertical) resolution. &lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
* At some point, the script ''newstart.e'' asks you to chose the surface topography you want from the list of files available in your 'datagcm/surface_data/' directory. &lt;br /&gt;
&lt;br /&gt;
We do have a repository of for Venus, Earth and Mars through time available at https://web.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/surface_data/. You can download the surface topography files and place them in your 'datagcm/surface_data/' directory.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Special note: How to remove the topography?&lt;br /&gt;
&lt;br /&gt;
TBD by Gwenael?&lt;br /&gt;
&lt;br /&gt;
== How to Change the Opacity Tables ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Sandrine ?&lt;br /&gt;
&lt;br /&gt;
== How to Manage Tracers ==&lt;br /&gt;
&lt;br /&gt;
Tracers are managed thanks to the [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def''] file.&lt;br /&gt;
&lt;br /&gt;
Specific treatment of some tracers (e.g., water vapor cycle) can be added directly in the model and an option added in [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def''] file.&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=422</id>
		<title>Advanced Use of the GCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=422"/>
				<updated>2022-06-22T10:49:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Running in parallel ==&lt;br /&gt;
&lt;br /&gt;
For large simulation (long run, high resolution etc...), the waiting time can becomes very long.&lt;br /&gt;
To overcome this issue, the model can works in parallel.&lt;br /&gt;
It first needs to be compiled in parallel mode and then be run with a specific command.&lt;br /&gt;
For all the details see the dedicated page [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Parallelism Parallelism]&lt;br /&gt;
&lt;br /&gt;
== Distinctions beween ifort, mpi, etc. ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Ehouarn ?&lt;br /&gt;
&lt;br /&gt;
== Distinction between using IOIPSL or XIOS ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Ehouarn ?&lt;br /&gt;
&lt;br /&gt;
== How to Change Vertical and Horizontal Resolutions ==&lt;br /&gt;
&lt;br /&gt;
=== When you are using the regular longitude/latitude horizontal grid ===&lt;br /&gt;
To run at a different grid resolution than available initial conditions files, one needs to use the tools ''newstart.e'' and ''start2archive.e''&lt;br /&gt;
&lt;br /&gt;
For example, to create initial states at grid resolution 32×24×25 from NetCDF files start and startfi at grid resolution 64×48×32 :&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at grid resolution 64×48×32 using old file ''z2sig.def'' used previously&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled at grid resolution 32×24×25, using a new file ''z2sig.def'' (more details below on the choice of the ''z2sig.def'').&lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
&lt;br /&gt;
==== What you need to ''know'' about the ''z2sig.def'' file ====&lt;br /&gt;
&lt;br /&gt;
For a model with Nlay layers, the z2sig.def file must contain at least Nlay+1 lines (the other not being read).&lt;br /&gt;
&lt;br /&gt;
The first line is a scale height ($$H$$). The following lines are the target pseudo-altitudes for the model from the bottom up ($$z_i$$).&lt;br /&gt;
The units do not matter as long as you use the same ones for both. &lt;br /&gt;
&lt;br /&gt;
The model will use these altitudes to compute a target pressure grid ($$p_i$$ ) as follows:&lt;br /&gt;
\begin{align}&lt;br /&gt;
  \label{def:pseudoalt}&lt;br /&gt;
  p_i &amp;amp;= p_s \exp(-z_i/H),&lt;br /&gt;
\end{align}&lt;br /&gt;
where $$p_s$$ is the surface pressure. &lt;br /&gt;
&lt;br /&gt;
As you can see, the scale height and pseudo altitudes enter the equation only through their ratio. So they do not have to to be the real scale-height and altitudes of the atmosphere you are simulating.&lt;br /&gt;
So you can use the same z2sig.def for different planets. &lt;br /&gt;
&lt;br /&gt;
There is no hard rule to follow to determine the altitude/pressure levels you should use. As a rule of thumb, layers should be thiner near the surface to properly resolve the surface boundary layer. Then they should gradually increase in size over a couple scale heights and transition to constant thickness above that. Of course, some specific applications may require thinner layers in some specific parts of the atmospheres. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- [NOT RELEVANT??] If you want to create starts files with tracers for 50 layers using a start archive.nc obtained for 32 layers, do not forget to use the ini_q option in newstart in order to correctly initialize tracers value for layer 33 to layer 50. You just have to answer yes to the question on thermosphere initialization if you want to initialize the thermosphere part only (l=33 to l=50), and no if you want to initialize tracers for all layers (l=0 to l=50). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== When you are using the DYNAMICO icosahedral horizontal grid ===&lt;br /&gt;
&lt;br /&gt;
The horizontal resolution for the DYNAMICO dynamical core is managed from several setting files, online during the execution. &lt;br /&gt;
To this purpose, each part  of the GCM managing the in/output fields ('''ICOSAGCM''', '''ICOSA_LMDZ''', '''XIOS''') requires to know the input and output grids: &lt;br /&gt;
&lt;br /&gt;
'''1. ''context_lmdz_physics.xml'':'''&lt;br /&gt;
&lt;br /&gt;
You can find several grid setup already defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;domain_definition&amp;gt;&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_96_95&amp;quot; ni_glo=&amp;quot;96&amp;quot; nj_glo=&amp;quot;95&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_144_142&amp;quot; ni_glo=&amp;quot;144&amp;quot; nj_glo=&amp;quot;142&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_512_360&amp;quot; ni_glo=&amp;quot;512&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_720_360&amp;quot; ni_glo=&amp;quot;720&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/domain_definition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the output grid for the physics fields is defined by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is an half-degree horizontal resolution. To change this resolution, you have to change name of the '''domain_ref''' grid, for instance: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_96_95&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. ''run_icosa.def'': setting file to execute a simulation''' &lt;br /&gt;
&lt;br /&gt;
In this file, regarding of the horizontal resolution intended, you have to set the number of subdivision on the main triangle. &lt;br /&gt;
For reminder, each hexagonal mesh is divided in several main triangles and each main triangles are divided in suitable number of sub-triangles according the horizontal resolution&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
#nbp --&amp;gt; number of subdivision on a main triangle: integer (default=40)&lt;br /&gt;
#              nbp = sqrt((nbr_lat x nbr_lon)/10)&lt;br /&gt;
#              nbp:                 20   40   80  160&lt;br /&gt;
#              T-edge length (km): 500  250  120   60&lt;br /&gt;
#              Example: nbp(128x96) = 35 -&amp;gt; 40&lt;br /&gt;
#                       nbp(256x192)= 70 -&amp;gt; 80&lt;br /&gt;
#                       nbp(360x720)= 160 -&amp;gt; 160&lt;br /&gt;
nbp = 160&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have chosen the 96_95 output grid in ''context_lmdz_physics.xml'', you have to calculate $$nbp = \sqrt(96x95) / 10 = 10$$ and  in this case &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nbp = 20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the number of subdivision of the main triangle, you have to define the number subdivision over each direction. At this stage you need to be careful as the number of subdivisions on each direction:&lt;br /&gt;
* needs to be set according to the number of subdivisions on the main triangle '''nbp'''&lt;br /&gt;
* will determine the number of processors on which the GCM will be most effective&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
#nsplit_i=1&lt;br /&gt;
#nsplit_j=1&lt;br /&gt;
#omp_level_size=1&lt;br /&gt;
###############################################################&lt;br /&gt;
## There must be less MPIxOpenMP processes than the 10 x nsplit_i x nsplit_j tiles&lt;br /&gt;
## typically for pure MPI runs, let nproc = 10 x nsplit_i x nsplit_j&lt;br /&gt;
## it is better to have nbp/nsplit_i  &amp;gt; 10 and nbp/nplit_j &amp;gt; 10&lt;br /&gt;
###############################################################&lt;br /&gt;
#### 40 noeuds de 24 processeurs = 960 procs&lt;br /&gt;
nsplit_i=12&lt;br /&gt;
nsplit_j=8&lt;br /&gt;
&lt;br /&gt;
#### 50 noeuds de 24 processeurs = 1200 procs&lt;br /&gt;
#nsplit_i=10&lt;br /&gt;
#nsplit_j=12&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the same example as above, the 96_95 output grid requires:&lt;br /&gt;
$$nsplit_i &amp;lt; 2$$ and $$nsplit_j &amp;lt; 2$$&lt;br /&gt;
We advise you to select:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
nsplit_i=1&lt;br /&gt;
nsplit_j=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and using 10 processors.&lt;br /&gt;
&lt;br /&gt;
== How to Change the Topography (or remove it) ==&lt;br /&gt;
&lt;br /&gt;
The generic model can use in principle any type of surface topography, provided that the topographic data file is available in the right format, and put in the right place. The information content on the surface topography is contained in the ''startfi.nc'', and we do have developed tools (see below) to modify the ''startfi.nc'' to account for a new surface topography.&lt;br /&gt;
&lt;br /&gt;
To change the surface topography of a simulation, we recommend to follow the procedure detailed below:&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at the same (horizontal and vertical) resolution than the ''start.nc'' and ''startfi.nc'' files.&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled again at the same (horizontal and vertical) resolution. &lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
* At some point, the script ''newstart.e'' asks you to chose the surface topography you want from the list of files available in your 'datagcm/surface_data/' directory. &lt;br /&gt;
&lt;br /&gt;
We do have a repository of for Venus, Earth and Mars through time available at https://web.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/surface_data/. You can download the surface topography files and place them in your 'datagcm/surface_data/' directory.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Special note: How to remove the topography?&lt;br /&gt;
&lt;br /&gt;
TBD by Gwenael?&lt;br /&gt;
&lt;br /&gt;
== How to Change the Opacity Tables ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Sandrine ?&lt;br /&gt;
&lt;br /&gt;
== How to Manage Tracers ==&lt;br /&gt;
&lt;br /&gt;
Tracers are managed thanks to the [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def''] file.&lt;br /&gt;
&lt;br /&gt;
Specific treatment of some tracers (e.g., water vapor cycle) can be added directly in the model and an option added in [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def''] file.&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=421</id>
		<title>Advanced Use of the GCM</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Advanced_Use_of_the_GCM&amp;diff=421"/>
				<updated>2022-06-22T10:35:24Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: /* What you need to know about the z2sig.def file (change of vertical resolution only) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Running in parallel ==&lt;br /&gt;
&lt;br /&gt;
For large simulation (long run, high resolution etc...), the waiting time can becomes very long.&lt;br /&gt;
To overcome this issue, the model can works in parallel.&lt;br /&gt;
It first needs to be compiled in parallel mode and then be run with a specific command.&lt;br /&gt;
For all the details see the dedicated page [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Parallelism Parallelism]&lt;br /&gt;
&lt;br /&gt;
== Distinctions beween ifort, mpi, etc. ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Ehouarn ?&lt;br /&gt;
&lt;br /&gt;
== Distinction between using IOIPSL or XIOS ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Ehouarn ?&lt;br /&gt;
&lt;br /&gt;
== How to Change Vertical and Horizontal Resolutions ==&lt;br /&gt;
&lt;br /&gt;
=== When you are using the regular longitude/latitude horizontal grid ===&lt;br /&gt;
To run at a different grid resolution than available initial conditions files, one needs to use the tools ''newstart.e'' and ''start2archive.e''&lt;br /&gt;
&lt;br /&gt;
For example, to create initial states at grid resolution 32×24×25 from NetCDF files start and startfi at grid resolution 64×48×32 :&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at grid resolution 64×48×32 using old file ''z2sig.def'' used previously&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled at grid resolution 32×24×25, using a new file ''z2sig.def'' (more details below on the choice of the ''z2sig.def'').&lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
&lt;br /&gt;
==== What you need to ''know'' about the ''z2sig.def'' file ====&lt;br /&gt;
&lt;br /&gt;
For a model with Nlay layers, the z2sig.def file must contain at least Nlay+1 lines (the other not being read).&lt;br /&gt;
&lt;br /&gt;
The first line is a scale height ($$H$$. The following lines are the target pseudo-altitudes for the model from the bottom up ($$z_i$$).&lt;br /&gt;
The units do not matter as long as you use the same ones for both. &lt;br /&gt;
&lt;br /&gt;
The model will use these altitudes to compute a target pressure grid ($$p_i$$ ) as follows:&lt;br /&gt;
\begin{align}&lt;br /&gt;
  \label{def:pseudoalt}&lt;br /&gt;
  p_i &amp;amp;= p_s \exp(-z_i/H)&lt;br /&gt;
\end{align}&lt;br /&gt;
&lt;br /&gt;
The scale height and pseudo altitudes do not have to It does not have to be the real scale height of the panet, you can choose the one you want (and the unit you want).&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Jeremy&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- [NOT RELEVANT??] If you want to create starts files with tracers for 50 layers using a start archive.nc obtained for 32 layers, do not forget to use the ini_q option in newstart in order to correctly initialize tracers value for layer 33 to layer 50. You just have to answer yes to the question on thermosphere initialization if you want to initialize the thermosphere part only (l=33 to l=50), and no if you want to initialize tracers for all layers (l=0 to l=50). --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== When you are using the DYNAMICO icosahedral horizontal grid ===&lt;br /&gt;
&lt;br /&gt;
The horizontal resolution for the DYNAMICO dynamical core is managed from several setting files, online during the execution. &lt;br /&gt;
To this purpose, each part  of the GCM managing the in/output fields ('''ICOSAGCM''', '''ICOSA_LMDZ''', '''XIOS''') requires to know the input and output grids: &lt;br /&gt;
&lt;br /&gt;
'''1. ''context_lmdz_physics.xml'':'''&lt;br /&gt;
&lt;br /&gt;
You can find several grid setup already defined:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line&amp;gt;&lt;br /&gt;
&amp;lt;domain_definition&amp;gt;&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_96_95&amp;quot; ni_glo=&amp;quot;96&amp;quot; nj_glo=&amp;quot;95&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_144_142&amp;quot; ni_glo=&amp;quot;144&amp;quot; nj_glo=&amp;quot;142&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_512_360&amp;quot; ni_glo=&amp;quot;512&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;  &amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_720_360&amp;quot; ni_glo=&amp;quot;720&amp;quot; nj_glo=&amp;quot;360&amp;quot; type=&amp;quot;rectilinear&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;generate_rectilinear_domain/&amp;gt;&lt;br /&gt;
      &amp;lt;interpolate_domain order=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/domain&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/domain_definition&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, the output grid for the physics fields is defined by &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_720_360&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is an half-degree horizontal resolution. To change this resolution, you have to change name of the '''domain_ref''' grid, for instance: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;domain id=&amp;quot;dom_out&amp;quot; domain_ref=&amp;quot;dom_96_95&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. ''run_icosa.def'': setting file to execute a simulation''' &lt;br /&gt;
&lt;br /&gt;
In this file, regarding of the horizontal resolution intended, you have to set the number of subdivision on the main triangle. &lt;br /&gt;
For reminder, each hexagonal mesh is divided in several main triangles and each main triangles are divided in suitable number of sub-triangles according the horizontal resolution&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
#nbp --&amp;gt; number of subdivision on a main triangle: integer (default=40)&lt;br /&gt;
#              nbp = sqrt((nbr_lat x nbr_lon)/10)&lt;br /&gt;
#              nbp:                 20   40   80  160&lt;br /&gt;
#              T-edge length (km): 500  250  120   60&lt;br /&gt;
#              Example: nbp(128x96) = 35 -&amp;gt; 40&lt;br /&gt;
#                       nbp(256x192)= 70 -&amp;gt; 80&lt;br /&gt;
#                       nbp(360x720)= 160 -&amp;gt; 160&lt;br /&gt;
nbp = 160&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have chosen the 96_95 output grid in ''context_lmdz_physics.xml'', you have to calculate $$nbp = \sqrt(96x95) / 10 = 10$$ and  in this case &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nbp = 20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the number of subdivision of the main triangle, you have to define the number subdivision over each direction. At this stage you need to be careful as the number of subdivisions on each direction:&lt;br /&gt;
* needs to be set according to the number of subdivisions on the main triangle '''nbp'''&lt;br /&gt;
* will determine the number of processors on which the GCM will be most effective&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
#nsplit_i=1&lt;br /&gt;
#nsplit_j=1&lt;br /&gt;
#omp_level_size=1&lt;br /&gt;
###############################################################&lt;br /&gt;
## There must be less MPIxOpenMP processes than the 10 x nsplit_i x nsplit_j tiles&lt;br /&gt;
## typically for pure MPI runs, let nproc = 10 x nsplit_i x nsplit_j&lt;br /&gt;
## it is better to have nbp/nsplit_i  &amp;gt; 10 and nbp/nplit_j &amp;gt; 10&lt;br /&gt;
###############################################################&lt;br /&gt;
#### 40 noeuds de 24 processeurs = 960 procs&lt;br /&gt;
nsplit_i=12&lt;br /&gt;
nsplit_j=8&lt;br /&gt;
&lt;br /&gt;
#### 50 noeuds de 24 processeurs = 1200 procs&lt;br /&gt;
#nsplit_i=10&lt;br /&gt;
#nsplit_j=12&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the same example as above, the 96_95 output grid requires:&lt;br /&gt;
$$nsplit_i &amp;lt; 2$$ and $$nsplit_j &amp;lt; 2$$&lt;br /&gt;
We advise you to select:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
## sub splitting of main rhombus : integer (default=1)&lt;br /&gt;
nsplit_i=1&lt;br /&gt;
nsplit_j=1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and using 10 processors.&lt;br /&gt;
&lt;br /&gt;
== How to Change the Topography (or remove it) ==&lt;br /&gt;
&lt;br /&gt;
The generic model can use in principle any type of surface topography, provided that the topographic data file is available in the right format, and put in the right place. The information content on the surface topography is contained in the ''startfi.nc'', and we do have developed tools (see below) to modify the ''startfi.nc'' to account for a new surface topography.&lt;br /&gt;
&lt;br /&gt;
To change the surface topography of a simulation, we recommend to follow the procedure detailed below:&lt;br /&gt;
&lt;br /&gt;
* Create file ''start_archive.nc'' with ''start2archive.e'' compiled at the same (horizontal and vertical) resolution than the ''start.nc'' and ''startfi.nc'' files.&lt;br /&gt;
* Create files ''restart.nc'' and ''restartfi.nc'' with ''newstart.e'' compiled again at the same (horizontal and vertical) resolution. &lt;br /&gt;
* While executing ''newstart.e'', you need to choose the answer '0 - from a file start_archive' and then press enter to all other requests.&lt;br /&gt;
* At some point, the script ''newstart.e'' asks you to chose the surface topography you want from the list of files available in your 'datagcm/surface_data/' directory. &lt;br /&gt;
&lt;br /&gt;
We do have a repository of for Venus, Earth and Mars through time available at https://web.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/surface_data/. You can download the surface topography files and place them in your 'datagcm/surface_data/' directory.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Special note: How to remove the topography?&lt;br /&gt;
&lt;br /&gt;
TBD by Gwenael?&lt;br /&gt;
&lt;br /&gt;
== How to Change the Opacity Tables ==&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED by Sandrine ?&lt;br /&gt;
&lt;br /&gt;
== How to Manage Tracers ==&lt;br /&gt;
&lt;br /&gt;
Tracers are managed thanks to the [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_traceur.def_Input_File ''traceur.def''] file.&lt;br /&gt;
&lt;br /&gt;
Specific treatment of some tracers (e.g., water vapor cycle) can be added directly in the model and an option added in [https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/The_callphys.def_Input_File ''callphys.def''] file.&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Tool_Box&amp;diff=327</id>
		<title>Tool Box</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Tool_Box&amp;diff=327"/>
				<updated>2022-05-11T09:44:20Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: /* python scripts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-processing Tools ==&lt;br /&gt;
=== newstart ===&lt;br /&gt;
=== start2archive ===&lt;br /&gt;
=== visualization tools ===&lt;br /&gt;
=== other third party scripts and tools ===&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
== Post-processing tools ==&lt;br /&gt;
=== zrecast ===&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
=== mass stream function ===&lt;br /&gt;
&lt;br /&gt;
The mass stream function (and the total angular momentum) can be computed from a diagfi.nc or a stats.nc, using the '''streamfunction.F90''' script. The script is located at&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
trunk/LMDZ.GENERIC/utilities&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile the script, open the ''compile'' file in the same directory and do the following:&lt;br /&gt;
* Replace &amp;quot;pgf90&amp;quot; with your favorite fortran compiler &lt;br /&gt;
* replace &amp;quot;/distrib/local/netcdf/pgi_7.1-6_32/lib&amp;quot; with the lib address and directory that contains your NetCDF library (file ''libnetcdf.a'').&lt;br /&gt;
* Replace &amp;quot;/distrib/local/netcdf/pgi_7.1-6_32/include&amp;quot; with the address of the directory that contains the NetCDF include file (''netcdf.inc'').&lt;br /&gt;
* You can mess with the compiling options but it is not mandatory.&lt;br /&gt;
&lt;br /&gt;
Once the script is compiled, copy it in the same directory as your '''.nc''' file and run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./streamfunction.e&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script will ask you for the name of your '''.nc''' file, and will run and produce a new '''nameofyourfile_stream.nc''' file.&lt;br /&gt;
&lt;br /&gt;
'''Be careful''' : In this new file, all fields are temporally and zonally averaged.&lt;br /&gt;
&lt;br /&gt;
If you want to use '''python''' instead of '''fortran''', you can take a look at this [https://github.com/aymeric-spiga/dynanalysis repo]. It hosts a tool to perform dynamical analysis of GCM simulations (and therefore, it computes the mass stream function and a lot of other stuff), but it is tailored for Dynamico only. This repo also takes care of recasting (it does the job of both ''zrecast.F90'' and ''streamfunction.F90'')&lt;br /&gt;
&lt;br /&gt;
== Continuing Simulations ==&lt;br /&gt;
&lt;br /&gt;
=== manually ===&lt;br /&gt;
&lt;br /&gt;
At the end of a simulation, the model generates restart files (files 'restart.nc' and 'restartfi.nc') which contain the final state of the model. The 'restart.nc' and 'restartfi.nc' files have the same format as the 'start.nc' and 'startfi.nc' files, respectively. &lt;br /&gt;
&lt;br /&gt;
These files can in fact be used as initial states to continue the simulation, using the following renaming command lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mv restart.nc start.nc&lt;br /&gt;
mv restartfi.nc startfi.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running a simulation with these start files will in fact resume the simulation from where the previous run ended.&lt;br /&gt;
&lt;br /&gt;
=== with bash scripts ===&lt;br /&gt;
&lt;br /&gt;
We have set up very simple bash scripts to automatize the launching of chain simulations. Here is an example of bash script that does the job:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
###########################################################################&lt;br /&gt;
# Script to perform several chained LMD Mars GCM simulations&lt;br /&gt;
# SET HERE the maximum total number of simulations&lt;br /&gt;
&lt;br /&gt;
nummax=100&lt;br /&gt;
&lt;br /&gt;
###########################################################################&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;---------------------------------------------------------&amp;quot;&lt;br /&gt;
echo &amp;quot;STARTING LOOP RUN&amp;quot;&lt;br /&gt;
echo &amp;quot;---------------------------------------------------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dir=`pwd`&lt;br /&gt;
machine=`hostname`&lt;br /&gt;
address=`whoami`&lt;br /&gt;
&lt;br /&gt;
# Look for file &amp;quot;num_run&amp;quot; which should contain &lt;br /&gt;
# the value of the previously computed season&lt;br /&gt;
# (defaults to 0 if file &amp;quot;num_run&amp;quot; does not exist)&lt;br /&gt;
if [[ -r num_run ]] ; then&lt;br /&gt;
  echo &amp;quot;found file num_run&amp;quot;&lt;br /&gt;
  numold=`cat num_run`&lt;br /&gt;
else&lt;br /&gt;
  numold=0&lt;br /&gt;
fi&lt;br /&gt;
echo &amp;quot;numold is set to&amp;quot; ${numold}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Set value of current season &lt;br /&gt;
(( numnew = ${numold} + 1 ))&lt;br /&gt;
echo &amp;quot;numnew is set to&amp;quot; ${numnew}&lt;br /&gt;
&lt;br /&gt;
# Look for initialization data files (exit if none found)&lt;br /&gt;
if [[ ( -r start${numold}.nc  &amp;amp;&amp;amp;  -r startfi${numold}.nc ) ]] ; then&lt;br /&gt;
   \cp -f start${numold}.nc start.nc&lt;br /&gt;
   \cp -f startfi${numold}.nc startfi.nc&lt;br /&gt;
else&lt;br /&gt;
   if (( ${numold} == 99999 )) ; then&lt;br /&gt;
    echo &amp;quot;No run because previous run crashed ! (99999 in num_run)&amp;quot;&lt;br /&gt;
    exit&lt;br /&gt;
   else&lt;br /&gt;
   echo &amp;quot;Where is file start&amp;quot;${numold}&amp;quot;.nc??&amp;quot;&lt;br /&gt;
   exit&lt;br /&gt;
   fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Run GCM -- THIS LINE NEEDS TO BE MODIFIED WITH THE CORRECT GCM EXECUTION COMMAND&lt;br /&gt;
mpirun -np 8 gcm_64x48x26_phystd_para.e &amp;lt; diagfi.def &amp;gt; lrun${numnew}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Check if run ended normaly and copy datafiles&lt;br /&gt;
if [[ ( -r restartfi.nc  &amp;amp;&amp;amp;  -r restart.nc ) ]] ; then&lt;br /&gt;
  echo &amp;quot;Run seems to have ended normaly&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  \mv -f restart.nc start${numnew}.nc&lt;br /&gt;
  \mv -f restartfi.nc startfi${numnew}.nc  &lt;br /&gt;
    &lt;br /&gt;
else&lt;br /&gt;
  if [[ -r num_run ]] ; then&lt;br /&gt;
    \mv -f num_run num_run.crash&lt;br /&gt;
  else&lt;br /&gt;
    echo &amp;quot;No file num_run to build num_run.crash from !!&amp;quot;&lt;br /&gt;
    # Impose a default value of 0 for num_run&lt;br /&gt;
    echo 0 &amp;gt; num_run.crash&lt;br /&gt;
  fi&lt;br /&gt;
 echo 99999 &amp;gt; num_run&lt;br /&gt;
 exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Copy other datafiles that may have been generated&lt;br /&gt;
if [[ -r diagfi.nc ]] ; then&lt;br /&gt;
  \mv -f diagfi.nc diagfi${numnew}.nc&lt;br /&gt;
fi&lt;br /&gt;
if [[ -r diagsoil.nc ]] ; then&lt;br /&gt;
  \mv -f diagsoil.nc diagsoil${numnew}.nc&lt;br /&gt;
fi&lt;br /&gt;
if [[ -r stats.nc ]] ; then&lt;br /&gt;
  \mv -f stats.nc stats${numnew}.nc&lt;br /&gt;
fi&lt;br /&gt;
if [[ -f profiles.dat ]] ; then&lt;br /&gt;
  \mv -f profiles.dat profiles${numnew}.dat&lt;br /&gt;
  \mv -f profiles.hdr profiles${numnew}.hdr&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Prepare things for upcoming runs by writing&lt;br /&gt;
# value of computed season in file num_run&lt;br /&gt;
echo ${numnew} &amp;gt; num_run&lt;br /&gt;
&lt;br /&gt;
# If we are over nummax : stop&lt;br /&gt;
if (( $numnew + 1 &amp;gt; $nummax )) ; then&lt;br /&gt;
   exit&lt;br /&gt;
else&lt;br /&gt;
   \cp -f run_gnome exe_mars&lt;br /&gt;
   ./exe_mars&lt;br /&gt;
fi &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of what this bash script does''':&lt;br /&gt;
&lt;br /&gt;
* It reads the file 'num_run' which contains the step of the simulation. &lt;br /&gt;
If num_run is&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
then the script expects to read start5.nc and startfi5.nc.&lt;br /&gt;
* It modifies start5.nc and startfi5.nc into start.nc and startfi.nc, respectively.&lt;br /&gt;
* It runs the GCM.&lt;br /&gt;
* It modifies restart.nc and restartfi.nc into start6.nc and startfi6.nc&lt;br /&gt;
* It rewrite num_run as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
6&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* It restarts the loop until num_run reaches the value (defined in nummax):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualization software ==&lt;br /&gt;
=== Panoply ===&lt;br /&gt;
Panoply is a user-friendly tool for viewing raw NetCDF data, available here: https://www.giss.nasa.gov/tools/panoply/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Example panoply.png|thumb|Screenshot of panoply showing here LMD Generic results for the exoplanet TRAPPIST-1e]]&lt;br /&gt;
&lt;br /&gt;
=== Planetoplot ===&lt;br /&gt;
&lt;br /&gt;
Planetoplot is a in-house, python based library developped to vizualize LMDG data.&lt;br /&gt;
&lt;br /&gt;
The code and documentation can be found at: https://nbviewer.org/github/aymeric-spiga/planetoplot/blob/master/tutorial/planetoplot_tutorial.ipynb&lt;br /&gt;
&lt;br /&gt;
=== ncview ===&lt;br /&gt;
=== paraview ===&lt;br /&gt;
=== planetoplot ===&lt;br /&gt;
=== python scripts ===&lt;br /&gt;
&lt;br /&gt;
The xarray python library is a very good tool to easily load and plot netcdf data.&lt;br /&gt;
&lt;br /&gt;
TBD&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	<entry>
		<id>http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Tool_Box&amp;diff=325</id>
		<title>Tool Box</title>
		<link rel="alternate" type="text/html" href="http://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php?title=Tool_Box&amp;diff=325"/>
				<updated>2022-05-11T09:43:10Z</updated>
		
		<summary type="html">&lt;p&gt;Jleconte: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Pre-processing Tools ==&lt;br /&gt;
=== newstart ===&lt;br /&gt;
=== start2archive ===&lt;br /&gt;
=== visualization tools ===&lt;br /&gt;
=== other third party scripts and tools ===&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
== Post-processing tools ==&lt;br /&gt;
=== zrecast ===&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;br /&gt;
&lt;br /&gt;
=== mass stream function ===&lt;br /&gt;
&lt;br /&gt;
The mass stream function (and the total angular momentum) can be computed from a diagfi.nc or a stats.nc, using the '''streamfunction.F90''' script. The script is located at&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
trunk/LMDZ.GENERIC/utilities&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile the script, open the ''compile'' file in the same directory and do the following:&lt;br /&gt;
* Replace &amp;quot;pgf90&amp;quot; with your favorite fortran compiler &lt;br /&gt;
* replace &amp;quot;/distrib/local/netcdf/pgi_7.1-6_32/lib&amp;quot; with the lib address and directory that contains your NetCDF library (file ''libnetcdf.a'').&lt;br /&gt;
* Replace &amp;quot;/distrib/local/netcdf/pgi_7.1-6_32/include&amp;quot; with the address of the directory that contains the NetCDF include file (''netcdf.inc'').&lt;br /&gt;
* You can mess with the compiling options but it is not mandatory.&lt;br /&gt;
&lt;br /&gt;
Once the script is compiled, copy it in the same directory as your '''.nc''' file and run &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./streamfunction.e&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The script will ask you for the name of your '''.nc''' file, and will run and produce a new '''nameofyourfile_stream.nc''' file.&lt;br /&gt;
&lt;br /&gt;
'''Be careful''' : In this new file, all fields are temporally and zonally averaged.&lt;br /&gt;
&lt;br /&gt;
If you want to use '''python''' instead of '''fortran''', you can take a look at this [https://github.com/aymeric-spiga/dynanalysis repo]. It hosts a tool to perform dynamical analysis of GCM simulations (and therefore, it computes the mass stream function and a lot of other stuff), but it is tailored for Dynamico only. This repo also takes care of recasting (it does the job of both ''zrecast.F90'' and ''streamfunction.F90'')&lt;br /&gt;
&lt;br /&gt;
== Continuing Simulations ==&lt;br /&gt;
&lt;br /&gt;
=== manually ===&lt;br /&gt;
&lt;br /&gt;
At the end of a simulation, the model generates restart files (files 'restart.nc' and 'restartfi.nc') which contain the final state of the model. The 'restart.nc' and 'restartfi.nc' files have the same format as the 'start.nc' and 'startfi.nc' files, respectively. &lt;br /&gt;
&lt;br /&gt;
These files can in fact be used as initial states to continue the simulation, using the following renaming command lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mv restart.nc start.nc&lt;br /&gt;
mv restartfi.nc startfi.nc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running a simulation with these start files will in fact resume the simulation from where the previous run ended.&lt;br /&gt;
&lt;br /&gt;
=== with bash scripts ===&lt;br /&gt;
&lt;br /&gt;
We have set up very simple bash scripts to automatize the launching of chain simulations. Here is an example of bash script that does the job:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
###########################################################################&lt;br /&gt;
# Script to perform several chained LMD Mars GCM simulations&lt;br /&gt;
# SET HERE the maximum total number of simulations&lt;br /&gt;
&lt;br /&gt;
nummax=100&lt;br /&gt;
&lt;br /&gt;
###########################################################################&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;---------------------------------------------------------&amp;quot;&lt;br /&gt;
echo &amp;quot;STARTING LOOP RUN&amp;quot;&lt;br /&gt;
echo &amp;quot;---------------------------------------------------------&amp;quot;&lt;br /&gt;
&lt;br /&gt;
dir=`pwd`&lt;br /&gt;
machine=`hostname`&lt;br /&gt;
address=`whoami`&lt;br /&gt;
&lt;br /&gt;
# Look for file &amp;quot;num_run&amp;quot; which should contain &lt;br /&gt;
# the value of the previously computed season&lt;br /&gt;
# (defaults to 0 if file &amp;quot;num_run&amp;quot; does not exist)&lt;br /&gt;
if [[ -r num_run ]] ; then&lt;br /&gt;
  echo &amp;quot;found file num_run&amp;quot;&lt;br /&gt;
  numold=`cat num_run`&lt;br /&gt;
else&lt;br /&gt;
  numold=0&lt;br /&gt;
fi&lt;br /&gt;
echo &amp;quot;numold is set to&amp;quot; ${numold}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Set value of current season &lt;br /&gt;
(( numnew = ${numold} + 1 ))&lt;br /&gt;
echo &amp;quot;numnew is set to&amp;quot; ${numnew}&lt;br /&gt;
&lt;br /&gt;
# Look for initialization data files (exit if none found)&lt;br /&gt;
if [[ ( -r start${numold}.nc  &amp;amp;&amp;amp;  -r startfi${numold}.nc ) ]] ; then&lt;br /&gt;
   \cp -f start${numold}.nc start.nc&lt;br /&gt;
   \cp -f startfi${numold}.nc startfi.nc&lt;br /&gt;
else&lt;br /&gt;
   if (( ${numold} == 99999 )) ; then&lt;br /&gt;
    echo &amp;quot;No run because previous run crashed ! (99999 in num_run)&amp;quot;&lt;br /&gt;
    exit&lt;br /&gt;
   else&lt;br /&gt;
   echo &amp;quot;Where is file start&amp;quot;${numold}&amp;quot;.nc??&amp;quot;&lt;br /&gt;
   exit&lt;br /&gt;
   fi&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Run GCM -- THIS LINE NEEDS TO BE MODIFIED WITH THE CORRECT GCM EXECUTION COMMAND&lt;br /&gt;
mpirun -np 8 gcm_64x48x26_phystd_para.e &amp;lt; diagfi.def &amp;gt; lrun${numnew}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Check if run ended normaly and copy datafiles&lt;br /&gt;
if [[ ( -r restartfi.nc  &amp;amp;&amp;amp;  -r restart.nc ) ]] ; then&lt;br /&gt;
  echo &amp;quot;Run seems to have ended normaly&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  \mv -f restart.nc start${numnew}.nc&lt;br /&gt;
  \mv -f restartfi.nc startfi${numnew}.nc  &lt;br /&gt;
    &lt;br /&gt;
else&lt;br /&gt;
  if [[ -r num_run ]] ; then&lt;br /&gt;
    \mv -f num_run num_run.crash&lt;br /&gt;
  else&lt;br /&gt;
    echo &amp;quot;No file num_run to build num_run.crash from !!&amp;quot;&lt;br /&gt;
    # Impose a default value of 0 for num_run&lt;br /&gt;
    echo 0 &amp;gt; num_run.crash&lt;br /&gt;
  fi&lt;br /&gt;
 echo 99999 &amp;gt; num_run&lt;br /&gt;
 exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Copy other datafiles that may have been generated&lt;br /&gt;
if [[ -r diagfi.nc ]] ; then&lt;br /&gt;
  \mv -f diagfi.nc diagfi${numnew}.nc&lt;br /&gt;
fi&lt;br /&gt;
if [[ -r diagsoil.nc ]] ; then&lt;br /&gt;
  \mv -f diagsoil.nc diagsoil${numnew}.nc&lt;br /&gt;
fi&lt;br /&gt;
if [[ -r stats.nc ]] ; then&lt;br /&gt;
  \mv -f stats.nc stats${numnew}.nc&lt;br /&gt;
fi&lt;br /&gt;
if [[ -f profiles.dat ]] ; then&lt;br /&gt;
  \mv -f profiles.dat profiles${numnew}.dat&lt;br /&gt;
  \mv -f profiles.hdr profiles${numnew}.hdr&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Prepare things for upcoming runs by writing&lt;br /&gt;
# value of computed season in file num_run&lt;br /&gt;
echo ${numnew} &amp;gt; num_run&lt;br /&gt;
&lt;br /&gt;
# If we are over nummax : stop&lt;br /&gt;
if (( $numnew + 1 &amp;gt; $nummax )) ; then&lt;br /&gt;
   exit&lt;br /&gt;
else&lt;br /&gt;
   \cp -f run_gnome exe_mars&lt;br /&gt;
   ./exe_mars&lt;br /&gt;
fi &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of what this bash script does''':&lt;br /&gt;
&lt;br /&gt;
* It reads the file 'num_run' which contains the step of the simulation. &lt;br /&gt;
If num_run is&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
5&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
then the script expects to read start5.nc and startfi5.nc.&lt;br /&gt;
* It modifies start5.nc and startfi5.nc into start.nc and startfi.nc, respectively.&lt;br /&gt;
* It runs the GCM.&lt;br /&gt;
* It modifies restart.nc and restartfi.nc into start6.nc and startfi6.nc&lt;br /&gt;
* It rewrite num_run as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
6&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* It restarts the loop until num_run reaches the value (defined in nummax):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
100&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Visualization software ==&lt;br /&gt;
=== Panoply ===&lt;br /&gt;
Panoply is a user-friendly tool for viewing raw NetCDF data, available here: https://www.giss.nasa.gov/tools/panoply/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Example panoply.png|thumb|Screenshot of panoply showing here LMD Generic results for the exoplanet TRAPPIST-1e]]&lt;br /&gt;
&lt;br /&gt;
=== Planetoplot ===&lt;br /&gt;
&lt;br /&gt;
Planetoplot is a in-house, python based library developped to vizualize LMDG data.&lt;br /&gt;
&lt;br /&gt;
The code and documentation can be found at: https://nbviewer.org/github/aymeric-spiga/planetoplot/blob/master/tutorial/planetoplot_tutorial.ipynb&lt;br /&gt;
&lt;br /&gt;
=== ncview ===&lt;br /&gt;
=== paraview ===&lt;br /&gt;
=== planetoplot ===&lt;br /&gt;
=== python scripts ===&lt;br /&gt;
&lt;br /&gt;
TO BE COMPLETED&lt;/div&gt;</summary>
		<author><name>Jleconte</name></author>	</entry>

	</feed>