Changes between Initial Version and Version 1 of Doc/Setup


Ignore:
Timestamp:
03/24/14 16:17:09 (10 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/Setup

    v1 v1  
     1{{{ 
     2#!html 
     3<h1>Simulation setup</h1> 
     4}}} 
     5---- 
     6[[NoteBox(note,This chapter describes how to setup your simulation., 600px)]]  
     7 
     8[[TOC(heading=Table of contents,depth=1,inline)]] 
     9[[PageOutline(1,Table of contents,pullout)]] 
     10---- 
     11 
     12# Create submission directory # 
     13The configuration directory contains tools to [wiki:DocDcompil compile] (Makefile and AA_make) and tools to run a simulation, i.e.  
     14 * two directories (EXPERIMENTS and GENERAL) allow you to create submission directories for your model configuration; 
     15 * if one or several submission directories (e.g. EXP00, OOL_SEC_STO, historical, EXP_AER, etc...) have already been created, you can directly go to the [#Theworkingdirectory next step].  
     16 
     17In the EXPERIMENTS directory you will find subdirectories for each model configuration (included the one you work with). For example:  
     18 * IPSLCM5_v5 includes LMDZOR, LMDZ 
     19 * IPSLCM5CHT_v5 includes IPSLCM5, LMDZOR, LMDZORINCA 
     20 * LMDZOR_v5 includes LMDZ 
     21 * LMDZORINCA_v5 includes LMDZOR, LMDZ 
     22 
     23 
     24Each of these subdirectories may contain a reference experiment (e.g. clim and amip for LMDZOR, NMHC_AER, AER and GES for LMDZORINCA, piControl, historical and cie for IPSLCM5_v5) and the file config.card which will be your simulation's initial setup.  
     25 
     26Before preparing the working directory you must know which kind of simulation you want to perform. Then, you must copy the config.card file at the same level as the main Makefile.  
     27[[BR]] For example, to perform a clim experiment with LMDZOR_v5: 
     28{{{ 
     29#!sh  
     30cd modipsl/config/LMDZOR_v5 
     31cp EXPERIMENTS/LMDZOR/clim/config.card .  
     32}}} 
     33 
     34[[Image(creation_exp_v5.jpg, 50%)]]  
     35 
     36The header of config.card contains the '''!JobName''' field for which you must specify your simulation's  name. Then run the ins_job script that will in first time ask you, if you are working on TGCC, your id group, and then create a directory for your experiment. If you are working on IDRIS it will directly create a directory for your experiment.  
     37[[BR]] In the previous example, a simulation called ''DIADEME'' is created: 
     38{{{ 
     39#!sh  
     40cd modipsl/config/LMDZOR_v5 
     41cp EXPERIMENTS/LMDZOR/clim/config.card . 
     42ls  
     43  AA_Make Makefile EXPERIMENTS GENERAL config.card 
     44vi config.card    # Change JobName=DIADEME 
     45../../util/ins_job 
     46ls  
     47  AA_Make Makefile EXPERIMENTS GENERAL DIADEME 
     48}}} 
     49The config.card file is deleted and a directory called DIADEME is created.  
     50 
     51 
     52---- 
     53# Contents of the submission directory # 
     54The contents of the new directory are described below.  
     55 
     56{{{ 
     57#!sh  
     58cd DIADEME 
     59ls  
     60  config.card COMP/ PARAM/ POST/ DRIVER/ 
     61}}} 
     62[[BR]] 
     63 
     64## config.card ## 
     65The config.card file contains the settings of your simulation configuration. The file contains several sections with the simulation settings (e.g. name, duration, processors' number, post processing, initial state).  
     66[[BR]]Below is a list of the file sections: 
     67 
     68### The [!UserChoices] section ### 
     69 
     70 * !JobName --> simulation name   
     71 * !ExperimentName --> experiment name (following the CMIP5 nomenclature for the IPCC simulations)  
     72 * !SpaceName --> allows you to distribute the simulations of a same experiment on different spaces TEST, DEVT, or PROD 
     73 * !LongName --> description of your simulation  
     74 * !TagName --> '''do not change this field'''; describes to which configuration family your experiment belongs  
     75 * !ExpType --> '''do not change this field'''; allows you to find the EXPERIMENTS directory in which you are working  
     76 * !DateBegin --> simulation start date (yyyy-mm-dd) 
     77 * !DateEnd --> simulation end date. It must be the last day "included" in your simulation 
     78 * !PeriodLength --> frequency of the executable run. This parameter can be 1M, 1Y or 10Y 
     79 * !JobNumProcTot --> number of processors required by your simulation. This parameter depends on the configurations and on the resolutions. For example, a configuration containing LMDZ in 96x95 can use 32 processors at the most. 
     80 
     81The parameters !ExperimentName and !SpaceName are optional. They will only impact the storage architecture of your outputs.  
     82[[BR]] For example :  
     83{{{ 
     84#!sh  
     85JobName=DIADEME 
     86ExperimentName=REINE 
     87SpaceName=TEST 
     88TagName=LMDZOR 
     89 
     90--> the output will be stored in : IGCM_OUT/LMDZOR/TEST/REINE/DIADEME 
     91 
     92JobName=DIADEME 
     93TagName=LMDZOR 
     94 
     95--> the output will be stored in: IGCM_OUT/LMDZOR/DIADEME 
     96}}} 
     97 
     98[[NoteBox(warn,The character "_" is not allowed in the variables !JobName\, !ExperimentName and !SpaceName, 600px)]] 
     99 
     100[[NoteBox(note,if !SpaceName=TEST all output will be store on scratchdir (on curie) or workdir (on ada), 600px)]] 
     101#### !PeriodLength #### 
     102The parameter !PeriodLength allows you to determine the continuous length of a simulation period for your configuration, i.e. the frequency at which restart files are created. '''The maximum !PeriodLength for any LMDZ model is 1M'''.  
     103 
     104 
     105### The [Restarts] section ### 
     106The Restarts section allow to start from an existing simulation. This simulation can be found at the archive machine or at local scratch- or workdir. Activate by setting '''!OverRule=y'''. All components(e.g. ATM, SRF, etc) will then use the same simulation as restart state.   
     107 
     108{{{ 
     109#!sh  
     110[Restarts] 
     111OverRule=y 
     112RestartDate=1999-12-31                                  # Last day of the experience used as restart for all components 
     113RestartJobName=EXP00                                    # Define restart simulation name for all components 
     114RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/pdControl # Path Server Group Login 
     115}}} 
     116 
     117The root path for the '''!RestartPath''' depend on the computing center. They are: 
     118{{{ 
     119#!sh  
     120${ARCHIVE}                           # The storage machine of the computing center 
     121                                     # (CCCSTOREDIR or GAYA). This space can contain   
     122                                     # tar of restarts or  
     123                                     # usual restarts files 
     124/ccc/store/cont003/dsm/login         # TGCC 
     125/u/rech/ces/login                    # IDRIS 
     126 
     127${SCRATCHDIR}                        # The large TGCC workspace (no backup)  
     128 
     129/ccc/scratch/cont003/dsm/login       # This kind of space can contain  
     130                                     # usual restarts files 
     131 
     132${WORKDIR}                           # The large IDRIS workspace (no backup) 
     133                                     
     134/workgpfs/rech/ces/login             # This kind of space can contain  
     135                                     # usual restarts files 
     136}}} 
     137 
     138[[NoteBox(note, libIGCM manages the difference in treatment between a path pointing to restart files that are directly accessible (without pack) and a path pointing to restart files that are in tar format (after pack). The management is made according to the path you provided. ,600px)]] 
     139 
     140  
     141### The [ATM], ..., sections of the model components ### 
     142 
     143This section for each of the model components allows you to:  
     144 * '''define the output frequency'''; 
     145 * '''define whether this component is installed''' which will only be considered if you specified '''!OverRule=n''' in the [Restarts] section. 
     146 
     147The possible settings for the '''!RestartPath''' options are the same as for the [Restarts] section. 
     148 
     149The possible settings for the '''!WriteFrequency''' options are: 
     150 * 1M    (monthly) 
     151 * 5D    (5-day) 
     152 * 1D    (daily) 
     153 * HF    (6-hour high frequency) 
     154 * HF3h  (real-time 3-hour frequency - specific to LMDZ) 
     155 * HF3hm (3-hour averaged high frequency - specific to LMDZ) 
     156 * STN   (instantaneous output only for the CFMIP stations - specific to LMDZ). 
     157 
     158 
     159{{{ 
     160#!sh  
     161[ATM] 
     162WriteFrequency="1M 1D"                                  # Activate the writing frequency of this component 
     163Restart=y                                               # If config_Restarts_OverRule == 'n' next 4 params are read 
     164RestartDate=1999-12-31                                  # Last day of the experience used as restart for this component if Restart=y 
     165RestartJobName=piControl25                              # Define restart simulation name for this component 
     166RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/PROD/piControl # Path Server Group Login 
     167}}} 
     168 
     169 
     170'''!WriteFrequency specific to the model components'''[[BR]] 
     171 
     172 * '''LMDZ''' : ([ATM]) Each of the frequencies settings 1M, 1D, HF, HF3h, HF3hm, and STN correspond to a given output file. For example, if you specify ''1M'', a histmth.nc file will be created. If you want to change the output frequency in the histmth file you must change the corresponding lmdz parameter file. See [wiki:DocImodelBlmdz here]. 
     173 
     174 * '''ORCHIDEE'''  
     175   * '''[SRF]''' : The first frequency corresponds to the output frequency for the sechiba_history.nc file. The available frequencies are: xY, xM, 5D, 1D and xs, where x is an integer and s means seconds. This file is required. If you add HF, a second sechiba_out_2.nc file will be written with the 3H frequency.  
     176   * '''[SBG]''' : Only one frequency (xY, xM, 5D, 1D or xs) can be specified. It applies to the stomate_history.nc file. The stomate_history_ipcc.nc file always contains daily outputs.  
     177 
     178 * '''INCA''' : the section !WriteFrequency does not work. Click [wiki:DocImodelDinca here] to learn more about how to change the writing frequency. 
     179 
     180### The section [Executable] ### 
     181This section contains one line for each model component giving the executable's name in the bin/ directory and the executable's name copied to the working directory. You should only change this section if your executable is running in parallel using MPI and OpenMP or if you have changed the executable's name. 
     182{{{ 
     183#!sh 
     184[Executable] 
     185#D- For each component, Real name of executable, Name of executable for oasis, optional : number of MPI task, number of OpenMP thread. 
     186ATM= (gcm.e, lmdz.x) 
     187SRF= ("", "") 
     188... 
     189}}} 
     190Note : (",") indicates that this component has no executable. It is defined in a library linked to another executable (e.g. Orchidee in LMDZOR or Inca in LMDZINCA).  
     191 
     192### The [Post] section ### 
     193 
     194The options of the [Post] section will allow you to set or disable the frequencies for submitting [wiki:DocFsimu#PostprocessingwithlibIGCM post processing jobs] by changing the 5 following options (see the diagram below). 
     195 
     196If you do not wish to run post processing jobs, you must specify '''NONE''' for both '''!TimeSeriesFrequency''' and '''!SeasonalFrequency'''. 
     197 
     198'''!RebuildFrequency''' and '''!PackFrequency''' should not be disabled except in the case of running in expert mode. 
     199 
     200[[Image(wiki:DocFsimu:chaine.jpg, 50%)]] 
     201 
     202{{{ 
     203#!sh  
     204RebuildFrequency=1Y          # Frequency of rebuild submission (use NONE for DRYRUN=3) 
     205PackFrequency=1Y             # If absent default to RebuildFrequency.  
     206TimeSeriesFrequency=1Y       # Frequency of post-processing submission (NONE if you don't want) 
     207SeasonalFrequency=2Y         # Seasonal average period (NONE if you don't want,  
     208                             # 2Y at least, 10Y by default) 
     209SeasonalFrequencyOffset=0    # Offset for seasonal average first start dates ;  
     210                             # same unit as SeasonalFrequency 
     211}}} 
     212 
     213## COMP directory ## 
     214 
     215This directory contains the architecture (or map) of each model component. Each map specifies inputs and outputs required by a component. 
     216 
     217Input files of each component are organized into different '''sections'''. 
     218 
     219 * '''[!UserChoices]''' contains specific options. 
     220  -->  used by the component's drivers (e.g.: lmdz.driver) 
     221 
     222 * '''[!InitialStateFiles]''' '''Initial conditions''' files such as vegetation maps, topography,... 
     223  --> retrieved by the IGCM_comp_GetInputInitialStateFiles function 
     224 
     225 * '''[!BoundaryFiles]''' '''Boundary conditions''' files such as forcings or a LAI 
     226  --> retrieved by the IGCM_comp_GetInputBoundaryFiles function 
     227 
     228 * '''[!SmoothFiles]''' '''Time-varying boundary conditions''' files such as aerosols 
     229  --> retrieved by the IGCM_comp_GetInputSmoothFiles function 
     230 
     231 * '''[!ParametersFiles]''' '''Parameters''' files such as namelist or the run.def file 
     232  --> retrieved by the IGCM_comp_GetInputParametersFiles function 
     233 
     234 * '''[!RestartFiles]''' '''Restart''' files 
     235  --> retrieved by the IGCM_comp_GetInputRestartFiles function 
     236 
     237 
     238 
     239### The [!UserChoices] section ### 
     240 
     241Contains several options which change the simulation setup by ''drivers'' files of the components (lmdz.driver, opa9.driver, ...). For example : 
     242 
     243{{{ 
     244#!sh 
     245[UserChoices] 
     246# Physics package to use :  
     247# LMDZ_Physics=AP for standard/old physics(default), can be used with LMDZ4_AR5 or LMDZ5/trunk sources  
     248# LMDZ_Physics=NPv3.1 for new physics, to be used with LMDZ5/trunk revision 1554 or later 
     249LMDZ_Physics=AP 
     250}}} 
     251 
     252See the description for LMDZ [wiki:DocImodelBlmdz#lmdz.card here]. 
     253 
     254 
     255### The [!InitialStateFiles] section ### 
     256 
     257Files needed to create initial files. This section is not activated if you chose to start or continue from an existing simulation (Section [Restart] in config.card). The files in this list will be only copied at the startup of your simulation.  
     258 
     259{{{ 
     260#!sh 
     261# ------------------------------------------------------------------ 
     262#D- Get initial state (Etat0, carteveg,relief...) 
     263#D- READ AND USE BY GCM FOR ONLY FOR THE FIRST EXECUTION. 
     264# ------------------------------------------------------------------ 
     265[InitialStateFiles]    # IGCM_comp_GetInputInitialStateFiles from main Job 
     266List= (SOURCE, DESTINATION) 
     267}}} 
     268 
     269### The [!BoundaryFiles] section ### 
     270 
     271The files containing the boundary conditions are copied to the working directory. 
     272 
     273The files in the '''List''' list will be copied at each integration period (one 1-month integration per period in general). A job can consist of several periods (!PeriodNb). 
     274 
     275The files in the '''!ListNonDel''' list will only be copied for the first period of each job. These files will be accessible but will not change during the simulation.  
     276 
     277{{{ 
     278#!sh 
     279# ------------------------------------------------------------------ 
     280#D- Get Boundaries Conditions (SST, WIND[X,Y,Z], LAI ...) 
     281#D- READ AND USE BY GCM AT EACH EXECUTION. 
     282# ------------------------------------------------------------------ 
     283[BoundaryFiles]        # IGCM_comp_GetInputBoundaryFiles 
     284List=   (SOURCE, DESTINATION) 
     285ListNonDel= (SOURCE, DESTINATION) 
     286}}} 
     287 
     288[[NoteBox(warn, Be very careful : if there is any space at the end of a line\, libIGCM will not taking in account the next line in the list, 600px)]] 
     289### The [!SmoothFiles] section ### 
     290These are also files containing boundary conditions but their retrieval is only done at specific time integrals and it is not systematic. 
     291'''1:12:''' means that the file will be copied to the working directory at the first integration step and then every 12 iterations until the simulation is finished. 
     292 
     293{{{ 
     294#!sh 
     295# ------------------------------------------------------------------ 
     296#D- Get SmoothFiles Conditions (SST, WIND[X,Y,Z], LAI ...) 
     297#D- READ AND USE BY GCM AT EACH EXECUTION but varying in time 
     298# ------------------------------------------------------------------ 
     299[SmoothFiles]          # IGCM_comp_GetInputSmoothFiles 
     300List= (SOURCE, DESTINATION, FREQUENCE DE COPIE) 
     301}}} 
     302 
     303### The [!ParametersFiles] section ### 
     304 
     305The parameter files of the component (namelist, run.def,...) 
     306 
     307{{{ 
     308#!sh 
     309# ------------------------------------------------------------------ 
     310#D- Get parameters text files updated by job (.def, namelist ...) 
     311#D- READ AND USE BY GCM AT EACH EXECUTION. 
     312# ------------------------------------------------------------------ 
     313[ParametersFiles]      # IGCM_comp_GetInputParametersFiles 
     314List=   (SOURCE, DESTINATION) 
     315}}} 
     316 
     317### The [!RestartFiles] section ### 
     318 
     319The files providing the restart data. '''You must not change this section''' it is needed to link the jobs.  
     320 
     321{{{ 
     322#!sh 
     323# ------------------------------------------------------------------ 
     324#D- Get restart files (restartphy.nc, orca_restart.nc ...) 
     325#D- READ AND USE BY GCM AT EACH EXECUTION. 
     326# ------------------------------------------------------------------ 
     327[RestartFiles]         # IGCM_comp_GetInputRestartFiles 
     328List=   (MODEL OUTPUT NAME, ARCHIVED NAME, MODEL INPUT NAME) 
     329}}} 
     330 
     331### The [!OutputText] section ### 
     332 
     333This section contains text files which will be produced during the simulation and model input parameter files. You might want to save these files. 
     334 
     335{{{ 
     336#!sh  
     337[OutputText] 
     338List= (NAME OF TEXT1 FILE, NAME OF TEXT2 FILE ....)  
     339}}} 
     340 
     341This files will be saved in tar stored in the output directory  
     342 * TGCC :  
     343$STOREDIR/IGCM_OUT/!TagName/[!SpaceName]/[!ExperimentName]/!JobName/DEBUG 
     344 * IDRIS :  
     345$GAYA//IGCM_OUT/!TagName/[!SpaceName]/[!ExperimentName]/!JobName/DEBUG 
     346 
     347### The [!OutputFiles] section ### 
     348 
     349The netcdf files produced by the simulation are listed in this paragraph. This paragraph is associated with the [Post_***] sections. 
     350 
     351{{{ 
     352#!sh 
     353[OutputFiles] 
     354List = (OUTPUT_FILE_NAME, SAVE_PATH, POSSIBLE ASSOCIATED POST PROCESSING) 
     355}}} 
     356 
     357Refer to this [wiki:DocFsimu#TimeSeries chapter] to learn everything about this section.  
     358## DRIVER directory ## 
     359 
     360This directory contains the different ''drivers'' (predefined libIGCM functions for the component) of the different configuration's components. These drivers modify the parameter files of each component (*.def, namelist, ...) setting the integration times, the outputs, and the forcing files. 
     361 
     362'''Note''' : If this directory does not exist the ''driver'' files are located in the COMP directory.  
     363 
     364## PARAM directory ## 
     365 
     366This directory contains input text files for the configuration's components. 
     367 
     368## POST directory ## 
     369 
     370This directory contains configuration files for additional diagnostic output. Click [wiki:DocFsimu#Addingavariabletothemonitoring here] for more details. 
     371 
     372---- 
     373# Set up initial state for the simulation  # 
     374 
     375[[NoteBox(note,When you setup a simulation make sure that the list of input files in each card file of the model components and the selected options correspond to your experiment., 600px)]]  
     376 
     377There are three different ways to define your simulation's initial conditions:  
     378 * [wiki:DocEsetup#TheRestartssection Start using restart files from an existing simulation] by setting ''!OverRule=y'' in the [Restart] section of the config.card file 
     379 * [wiki:DocEsetup#TheATM...sectionsofthemodelcomponents Start using different restart files from different simulations for each model component] by setting ''Restart=y'' in each associated part of the config.card file. ''!OverRule=n'' must be set in config.card. 
     380 * [wiki:DocEsetup#COMPdirectory Use the default section InitialStateFiles in the comp.card file of the model components] in config.card you must have ''!OverRule=n'' and and ''Restart=n'' for this case. 
     381 
     382 
     383## Example for different restart ## 
     384 
     385### Example with !OverRule=y ###  
     386If you wish to use the start state of a given simulation, set in config.card:  
     387{{{ 
     388#======================================================================== 
     389#D-- Restarts - 
     390[Restarts] 
     391#D- If you want a GENERAL RULE FOR ALL COMPONENTS RESTARTS, put this flag to 'y' 
     392OverRule=y 
     393#D- Last day of the experience used as restart 
     394RestartDate=1869-12-30 
     395#D- Define restart simulation name 
     396RestartJobName=CD1 
     397#D- Path Server Group Login 
     398RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/pdControl 
     399}}} 
     400[[BR]] 
     401For the same case but if the simulation was performed by someone else, you must give the complete path of the directory, for example: 
     402{{{ 
     403#!sh 
     404RestartPath=/u/rech/lab/plabxxx/IGCM_OUT/IPSLCM5A/DEVT/pdControl  
     405# or RestartPath=/dmnfs/contxxx/login/IGCM_OUT/IPSLCM5A/DEVT/pdControl 
     406}}} 
     407[[BR]] 
     408 
     409### Example with !OverRule=n and [COMP]/Restart=y ###  
     410You can also distinguish the setup parameters for each model components. Set `OverRule=n` and use the `Restart`, `RestartDate`, `RestartJobName` and `RestartPath` parameters for each model component (section). For example, use restart files for the atmosphere but not for the surface component. For the surface component the !InitialStateFiles will then be used : 
     411{{{ 
     412#D-- ATM - 
     413[ATM] 
     414# 
     415WriteFrequency="1M 1D HF" 
     416# If config_Restarts_OverRule == 'n' all params are read 
     417Restart= y 
     418# Last day of the experience used as restart for this component 
     419RestartDate=1999-12-30 
     420# Define restart simulation name 
     421RestartJobName=2L18 
     422RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/pdControl 
     423# 
     424#D-- SRF - 
     425[SRF] 
     426# 
     427WriteFrequency="1M" 
     428# If config_Restarts_OverRule == 'n' all params are read 
     429Restart= n 
     430# Last day of the experience used as restart for this component 
     431RestartDate=1999-12-30 
     432# Define restart simulation name 
     433RestartJobName=2L18 
     434RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/pdControl 
     435}}} 
     436 
     437## Note for LMDZ ## 
     438 
     439[[NoteBox(note,To obtain exactly the same outputs in different simulations\, you must choose the same LMDZ `Bands` files. This is explained in `COMP/lmdz.card` with the `LMDZ_NbPeriod_adjust` and `LMDZ_Bands_file_name` parameters.,600px)]] 
     440{{{ 
     441#!sh 
     442LMDZ_NbPeriod_adjust=0 
     443# To force the use of this Bands file, set LMDZ_NbPeriod_adjust=0 and replace XXXXXXX by Restart Job Name 
     444LMDZ_Bands_file_name=${ARCHIVE}/IGCM_OUT/IPSLCM5/CEPRO0/ATM/Debug/CEPRO0_Bands_96x95x39_3prc.dat_3 
     445}}} 
     446 Click [wiki:DocImodelBlmdz#ParallelismandtheBandsfile here] for more details. 
     447 
     448 
     449---- 
     450# Main job of the simulation # 
     451 
     452The main job contains scripts that will be executed by the system. With libIGCM, this job is unique (in the beginning AA_job and later Job_MYJOBNAME) for all type of configurations. It contains all scripts to initialize a simulation, to summarize the chosen model configuration and to run identical experiments for all model components. It resubmits itself in order to continue the simulation if needed. 
     453 
     454The job header depends on the machine type. It contains the job name and the parameters. '''Real-times''' must be chosen to match the specific classes for the computing machine and according to the simulation length (test or production). 
     455 
     456At TGCC you must specify the project number: [wiki:DocBenvBtgcc#Projectandcomputingneeds  #MSUB -A MY_PROJECT]. 
     457 
     458You should change the !PeriodNb parameter in the job to change the number of runs in one job (see the example of computation in the next section) : 
     459{{{ 
     460#D- Number of execution in one job 
     461PeriodNb=1 
     462}}} 
     463 
     464In some cases, you must set a variable RUN_DIR_PATH in order to avoid deleting the working directory. 
     465{{{ 
     466#D- Define running directory 
     467#D- Default=${TMPDIR} ie temporary batch directory 
     468#RUN_DIR_PATH=/workdir/or/scratchdir/of/this/machine 
     469}}} 
     470 
     471Here is the diagram of the steps in AA_job : 
     472 
     473[[Image(AA_job.jpg, 50%)]] 
     474 
     475## Choosing !PeriodNb ## 
     476To avoid starting a lot of short jobs which might be queued, the production job starts n integrations ''(!PeriodNb)'', whose length are [wiki:DocEsetup#PeriodLength PeriodLength.] 
     477 
     478These are calculated as followed: [[BR]] 
     479Time limit = !PeriodNb * max(Real time of a !PeriodLength) 
     480 
     481where ''Time limit'' is the requested time in the job header. [[BR]] 
     482 
     483At the end of a simulation, the run.card file returns the used CPU time for each simulation step. This will allow you to perform this computation. It is therefore important, for each simulation with a new configuration, to perform a 1-3 month test to estimate beforehand the CPU time.  
     484 
     485 
     486---- 
     487# Prepare a new experiment # 
     488There are two ways to prepare a new working directory for your model configuration:  
     489 1. Start again from the first step described above by copying the desired config.card file to your configuration directory using a new !JobName.  
     490 2. Copy an existing submission directory, delete the files created by the [wiki:DocFsimu#Endofthesimulation simulation], and change !JobName in config.card.  
     491 
     492[[BR]]For example:  
     493{{{ 
     494#!sh 
     495cd modipsl/config/LMDZOR_v5 
     496cp -r DIADEME CHOUCROUTE 
     497cd CHOUCROUTE 
     498rm -f Job_DIADEME run.card Script_Output_DIADEME.000001  
     499vi config.card 
     500   JobName=CHOUCROUTE  
     501../../../util/ins_job 
     502}}} 
     503 
     504 
     505[[NoteBox(note, The ins_job script allows you to create a submission directory from a config.card file or if the directory already exists it allows you to only create the job corresponding to config.card. ins_job will not overwrite a directory or an existing job.,600px)]] 
     506 
     507## Post-processing jobs ## 
     508 
     509Jobs headers for post-processing have to be carefully checked, especially elapsed time limits. They are in libIGCM directory (xxx.job) and are adapted for IPSLCM5A with 1Y for !RebuildFrequency and !PackFrequency. Change time limits if you use larger frequencies. 
     510