OR1proc OR 1proc
(→Files & structure) |
(→or_1-proc.config) |
||
(No se muestran 18 ediciones intermedias realizadas por un usuario) | |||
Línea 1: | Línea 1: | ||
ORCHIDEE's work-flow management for 1 processor. |
ORCHIDEE's work-flow management for 1 processor. |
||
− | Climate runs require simulations for long periods of time. Geophysical models require different sources of forcing. Usually one should not and ofently can not prepare boundary conditions for all the period of the run (usually more than 10 years). Instead, models perform long simulations by `chunks' or fractions of the period making use of restart files. For each of these chunks, forcing data has to be prepared. |
+ | Climate runs require simulations for long periods of time. Geophysical models require different sources of forcing. Usually one should not and ofently can not prepare boundary conditions for all the period of the run (usually more than 10 years). Instead, models perform long simulations by `chunks' or fractions of the period making use of restart files (in ORCHIDEE 1 year). For each of these chunks, forcing data has to be prepared. |
One could do this manually waiting until the end of the run. It is much more efficient if a work-flow can be generated in order to concatenated the chunks in an automatic way. |
One could do this manually waiting until the end of the run. It is much more efficient if a work-flow can be generated in order to concatenated the chunks in an automatic way. |
||
Línea 12: | Línea 12: | ||
** ORtemplate: Folder with an example of ORCHIDEE's <code>run.def</code>; <code>bin/</code>, folder with the compiled binaries: <code>orchideedriver</code>, <code>orchidee_ol</code>, <code>rebuild</code> |
** ORtemplate: Folder with an example of ORCHIDEE's <code>run.def</code>; <code>bin/</code>, folder with the compiled binaries: <code>orchideedriver</code>, <code>orchidee_ol</code>, <code>rebuild</code> |
||
** python: Folder with required work-flow python scripts: <code>change_namelist.py</code> |
** python: Folder with required work-flow python scripts: <code>change_namelist.py</code> |
||
− | ** shell: Folder with the work-flow scripts: <code>run_multi-or_1proc.bash</code>, <code>prepare_forcings.bash</code>; configuration file: <code>or_multi-config.txt</code>; <code>rebuild.bash</code> shell to rebuild ORCHIDEE's output files |
+ | ** shell: Folder with the work-flow scripts: <code>run_multi-or_1proc.bash</code>, <code>prepare_forcings.bash</code>; configuration file: <code>or_1-proc.config</code>; <code>rebuild.bash</code> shell to rebuild ORCHIDEE's output files |
− | * forcings: Folder with all the anciallary data and meteorological forcings |
+ | * forcings: Folder with all the ancialliary data and meteorological forcings: work-flow expects to find a folder labelled <code>ATMOS</code> with the atmospheric forcings, and any organization of folders for the rest of the data (it is sorted with <code>IGCM/SRF/</code> original IPSL-ORCHIDEE sorting of forcings) |
− | == or_multi-config.txt == |
+ | == or_1-proc.config == |
This is the main file for the work-flow and the unique one to be modified by the user. It contains the definition of a series of variables. As an example: |
This is the main file for the work-flow and the unique one to be modified by the user. It contains the definition of a series of variables. As an example: |
||
<pre> |
<pre> |
||
Línea 25: | Línea 25: | ||
# config |
# config |
||
+ | pyBIN=/usr/bin/python |
||
+ | OUTfolder=/home/administrador/installOR/testORnewdriver |
||
foldOR1proc=/home/administrador/installOR |
foldOR1proc=/home/administrador/installOR |
||
− | components=${foldOR1proc}/components |
+ | forcingfolder=/home/administrador/installOR/forcings |
− | batsHOME=${components}/shell |
||
− | pyH=${components}/python |
||
− | binfolder=${components}/ORtemplate/bin |
||
− | forcingfolder=${foldOR1proc}/forcings |
||
− | OUTfolder=/home/administrador/installOR/test_multi-run |
||
− | # Anciliary data 1 file without year (original name of the files with the ancilliary data [origFilen]@[ORfilen]) |
+ | # Anciliary data 1 file without year (original name of the files with the ancilliary data [folderName, since |
− | filestolink='alb_bg_modisopt_2D_ESA_v2.nc@alb_bg.nc:' |
+ | ${forcings}]@[origFilen]@[ORfilen]) |
− | filestolink=${filestolink}'cartepente2d_15min.nc@cartepente2d_15min.nc:' |
+ | filestolink=IGCM/SRF/albedo@alb_bg_modisopt_2D_ESA_v3.nc@alb_bg.nc:IGCM/SRF@cartepente2d_15min.nc@cartepente2d_15min.nc: |
− | filestolink=${filestolink}'reftemp.nc@reftemp.nc:routing.nc@routing.nc:' |
+ | IGCM/SRF@reftemp.nc@reftemp.nc:IGCM/SRF@routing.nc@routing.nc:IGCM/SRF/SOIL/soil_bulk_and_ph.nc@soil_bulk_and_ph.nc: |
− | filestolink=${filestolink}'soil_bulk_and_ph.nc@soil_bulk_and_ph.nc:' |
+ | IGCM/SRF@soils_param.nc@soils_param.nc |
− | filestolink=${filestolink}'soils_param.nc@soils_param.nc' |
||
− | # Anciliary data 1 file with year (original name of the files with the ancilliary data [origFilen]@[ORfilen], [YYYY] to be changed by the correspondant year) |
+ | # Anciliary data 1 file with year (original name of the files with the ancillary data [folderName, since |
− | filestolinkyr='PFTmap_YYYY.nc@PFTmap.nc:woodharvest_YYYY.nc@woodharvest.nc' |
+ | ${forcings}]@[origFilen]@[ORfilen], [YYYY] to be changed by the correspondent year) |
+ | filestolinkyr=IGCM/SRF/PFTMAPS/CMIP6/ESA-LUH2v2/historical/15PFT.v2@PFTmap_YYYY.nc@PFTmap.nc: |
||
+ | IGCM/SRF/WOODHARVEST/LUH2v2/historical4@woodharvest_YYYY.nc@woodharvest.nc |
||
− | # Anciliary data 3 files with year-1,year,year+1 (original name of the files with the ancilliary data [origFilen]@[ORfilen], [YYYY] to be changed by the correspondant year-1, year, yerar+1) |
+ | # Anciliary data 3 files with year-1,year,year+1 (original name of the files with the ancilliary data |
− | filestolink3yr='cruncep_halfdeg_YYYY.nc@cruncep_halfdeg_YYYY.nc' |
+ | [folderName, since ${forcings}]@[origFilen]@[ORfilen], [YYYY] to be changed by the correspondant year-1, year, yerar+1) |
+ | filestolink3yr= |
||
− | # Atmospheric forcing as [ForcingName]@[HeaderForcingFiles] [assuming ${forcingfolder}/ATMOS/{ForcingName}/{HeaderForcingFiles}_YYYY.nc] |
+ | # Atmospheric forcing as [ForcingName]@[HeaderForcingFiles] [assuming ${forcingfolder}/ATMOS/{ForcingName}/ |
− | atmos='CRUNCEP@cruncep_halfdeg' |
+ | {HeaderForcingFiles}_YYYY.nc] |
+ | atmos=CRUNCEP@cruncep_halfdeg |
||
− | # Additional parameters for run.def as [paramName1]:[values1];...;[paramNameN]:[valuesN] (! for spaces) |
+ | # Additional parameters for run.def as [paramName1]@[values1];...;[paramNameN]@[valuesN] (! for spaces) |
addparams= |
addparams= |
||
</pre> |
</pre> |
||
− | * period: period of simulation providing the initial and the ending year in format <code>[iyear]-[eyear]</code> |
+ | * <code>period</code>: period of simulation providing the initial and the ending year in format <code>[iyear]-[eyear]</code> |
− | * pyBIN: path to the binary of python (2.x version is required) |
+ | * <code>pyBIN</code>: path to the binary of python (2.x version is required) |
− | * OUTfolder: path to the place where the simulation will be performed |
+ | * <code>OUTfolder</code>: path to the place where the simulation will be performed |
− | * foldOR1proc: path to the main folder ot the work-flow manager |
+ | * <code>foldOR1proc</code>: path to the main folder to the work-flow manager |
− | * components: path to the components of the work-flow (no need to be changed) |
+ | * <code>forcingfolder</code>: path to the folder with the forcing data (atmospheric under <code>ATMOS</code>, and the rest) |
− | * shellHOME: path to the shell scripts of the work-flow (no need to be changed) |
+ | * <code>filestolink</code>: ':' separated list of values for the ancillary data that comes from files without year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE) |
− | * pyH: path to the python scripts of the work-flow (no need to be changed) |
+ | * <code>filestolinkyr</code>: ':' separated list of values for the ancillary data that comes from files with year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE. Name of the files must contain the string chain 'YYYY' that will be automatically changed) |
− | * binfolder: path to the binaries of the work-flow (no need to be changed) |
+ | * <code>filestolink3yr</code>: ':' separated list of values for the ancillary data that comes from files with year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE. Name of the files must contain the string chain 'YYYY' that will be automatically changed as year-1, year, yerar+1) |
− | * forcingfolder: path to the forcings of the work-flow (no need to be changed) |
+ | * atmos Atmospheric forcing as [ForcingName]@[HeaderForcingFiles] [assuming ${forcingfolder}/ATMOS/[ForcingName]/{HeaderForcingFiles}_YYYY.nc] |
− | * filestolink: ':' separated list of values for the anciliary data that comes from files without year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE) |
+ | * <code>addparams</code>: ';' separated list of additional parameters for <code>run.def</code> as <code>[paramName1]@[values1]</code> (using ! for spaces) |
− | * filestolinkyr: ':' separated list of values for the ancillary data that comes from files with year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE. Name of the files must contain the string chain 'YYYY' that will be automatically changed) |
||
− | * filestolink3yr: ':' separated list of values for the ancillary data that comes from files with year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE. Name of the files must contain the string chain 'YYYY' that will be automatically changed as year-1, year, yerar+1) |
||
− | * atmos Atmospheric forcing as [ForcingName]@[HeaderForcingFiles] [assuming ${forcingfolder}/ATMOS/{ForcingName}/{HeaderForcingFiles}_YYYY.nc] |
||
− | * addparams: ';' separated list of additional parameters for <code>run.def</code> as <code>[paramName1]:[values1] (using ! for spaces) |
||
= How to run = |
= How to run = |
||
One located at the desired output folder <code>[OUTfolder]</code>: |
One located at the desired output folder <code>[OUTfolder]</code>: |
||
− | # copy the file <code>or_multi-config.txt<code> |
+ | # copy the file <code>or_1-proc.config</code> |
# link the main work-flow manager script: <code>run_multi-or_1proc.bash</code> |
# link the main work-flow manager script: <code>run_multi-or_1proc.bash</code> |
||
− | # adapt the content of <code>or_multi-config.txt<code> to the experiment |
+ | # adapt the content of <code>or_1-proc.config</code> to the experiment |
# run the work-flow (recommending to run it in background as the example) |
# run the work-flow (recommending to run it in background as the example) |
||
<pre> |
<pre> |
||
$ cd [OUTfolder] |
$ cd [OUTfolder] |
||
− | $ cp [foldOR1proc]/components/shell/or_multi-config.txt ./ |
+ | $ cp [foldOR1proc]/components/shell/or_1-proc.config ./ |
$ ln -s [foldOR1proc]/components/shell/run_multi-or_1proc.bash ./ |
$ ln -s [foldOR1proc]/components/shell/run_multi-or_1proc.bash ./ |
||
− | $ vim or_multi-config.txt |
+ | $ vim or_1-proc.config |
$ nohup ./run_multi-or_1proc.bash >& run_multi_or_1proc.log & |
$ nohup ./run_multi-or_1proc.bash >& run_multi_or_1proc.log & |
||
</pre> |
</pre> |
||
+ | |||
+ | Whilst experiment is running a new file is created <code>chunk_attempts.inf</code>. In each is listed the number of attempts carried out to simulate a given chunk. If the number is greater than 2, in order to avoid an infinite loop of the work-flow, experiment is stopped. |
||
= orout = |
= orout = |
||
Línea 79: | Línea 83: | ||
* <code>used_run.def</code>: ORCHIDEE's full configuration (also with the parameters not set in <code>run.def</code>) file used to run the chunk |
* <code>used_run.def</code>: ORCHIDEE's full configuration (also with the parameters not set in <code>run.def</code>) file used to run the chunk |
||
* <code>out_orchidee_0000</code>: ORCHIDEE's standard output for the simulation |
* <code>out_orchidee_0000</code>: ORCHIDEE's standard output for the simulation |
||
+ | * <code>run_or.log</code>: standard output of the execution of the model |
Última revisión de 11:20 18 jul 2019
ORCHIDEE's work-flow management for 1 processor.
Climate runs require simulations for long periods of time. Geophysical models require different sources of forcing. Usually one should not and ofently can not prepare boundary conditions for all the period of the run (usually more than 10 years). Instead, models perform long simulations by `chunks' or fractions of the period making use of restart files (in ORCHIDEE 1 year). For each of these chunks, forcing data has to be prepared.
One could do this manually waiting until the end of the run. It is much more efficient if a work-flow can be generated in order to concatenated the chunks in an automatic way.
Here is presented a very simple work-flow manager for off-line ORCHIDEE simulations on single processor machines.
Contenido |
[editar] Files & structure
It is assumed that ORCHIDEE has already been installed into the machine, and user already has downloaded all the required data for the run. On a main folder called [foldOR1proc]
(as example) it is expected to contain:
- components: with two additional folders
- ORtemplate: Folder with an example of ORCHIDEE's
run.def
;bin/
, folder with the compiled binaries:orchideedriver
,orchidee_ol
,rebuild
- python: Folder with required work-flow python scripts:
change_namelist.py
- shell: Folder with the work-flow scripts:
run_multi-or_1proc.bash
,prepare_forcings.bash
; configuration file:or_1-proc.config
;rebuild.bash
shell to rebuild ORCHIDEE's output files
- ORtemplate: Folder with an example of ORCHIDEE's
- forcings: Folder with all the ancialliary data and meteorological forcings: work-flow expects to find a folder labelled
ATMOS
with the atmospheric forcings, and any organization of folders for the rest of the data (it is sorted withIGCM/SRF/
original IPSL-ORCHIDEE sorting of forcings)
[editar] or_1-proc.config
This is the main file for the work-flow and the unique one to be modified by the user. It contains the definition of a series of variables. As an example:
# scratch scratch=true # Period of simulation period=1990-2010 # config pyBIN=/usr/bin/python OUTfolder=/home/administrador/installOR/testORnewdriver foldOR1proc=/home/administrador/installOR forcingfolder=/home/administrador/installOR/forcings # Anciliary data 1 file without year (original name of the files with the ancilliary data [folderName, since ${forcings}]@[origFilen]@[ORfilen]) filestolink=IGCM/SRF/albedo@alb_bg_modisopt_2D_ESA_v3.nc@alb_bg.nc:IGCM/SRF@cartepente2d_15min.nc@cartepente2d_15min.nc: IGCM/SRF@reftemp.nc@reftemp.nc:IGCM/SRF@routing.nc@routing.nc:IGCM/SRF/SOIL/soil_bulk_and_ph.nc@soil_bulk_and_ph.nc: IGCM/SRF@soils_param.nc@soils_param.nc # Anciliary data 1 file with year (original name of the files with the ancillary data [folderName, since ${forcings}]@[origFilen]@[ORfilen], [YYYY] to be changed by the correspondent year) filestolinkyr=IGCM/SRF/PFTMAPS/CMIP6/ESA-LUH2v2/historical/15PFT.v2@PFTmap_YYYY.nc@PFTmap.nc: IGCM/SRF/WOODHARVEST/LUH2v2/historical4@woodharvest_YYYY.nc@woodharvest.nc # Anciliary data 3 files with year-1,year,year+1 (original name of the files with the ancilliary data [folderName, since ${forcings}]@[origFilen]@[ORfilen], [YYYY] to be changed by the correspondant year-1, year, yerar+1) filestolink3yr= # Atmospheric forcing as [ForcingName]@[HeaderForcingFiles] [assuming ${forcingfolder}/ATMOS/{ForcingName}/ {HeaderForcingFiles}_YYYY.nc] atmos=CRUNCEP@cruncep_halfdeg # Additional parameters for run.def as [paramName1]@[values1];...;[paramNameN]@[valuesN] (! for spaces) addparams=
-
period
: period of simulation providing the initial and the ending year in format[iyear]-[eyear]
-
pyBIN
: path to the binary of python (2.x version is required) -
OUTfolder
: path to the place where the simulation will be performed -
foldOR1proc
: path to the main folder to the work-flow manager -
forcingfolder
: path to the folder with the forcing data (atmospheric underATMOS
, and the rest) -
filestolink
: ':' separated list of values for the ancillary data that comes from files without year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE) -
filestolinkyr
: ':' separated list of values for the ancillary data that comes from files with year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE. Name of the files must contain the string chain 'YYYY' that will be automatically changed) -
filestolink3yr
: ':' separated list of values for the ancillary data that comes from files with year dependency (in format [origFilen]@[ORfilen]; [origFilen], original name of the file; [ORfilen]: expected name by ORCCHIDEE. Name of the files must contain the string chain 'YYYY' that will be automatically changed as year-1, year, yerar+1) - atmos Atmospheric forcing as [ForcingName]@[HeaderForcingFiles] [assuming ${forcingfolder}/ATMOS/[ForcingName]/{HeaderForcingFiles}_YYYY.nc]
-
addparams
: ';' separated list of additional parameters forrun.def
as[paramName1]@[values1]
(using ! for spaces)
[editar] How to run
One located at the desired output folder [OUTfolder]
:
- copy the file
or_1-proc.config
- link the main work-flow manager script:
run_multi-or_1proc.bash
- adapt the content of
or_1-proc.config
to the experiment - run the work-flow (recommending to run it in background as the example)
$ cd [OUTfolder] $ cp [foldOR1proc]/components/shell/or_1-proc.config ./ $ ln -s [foldOR1proc]/components/shell/run_multi-or_1proc.bash ./ $ vim or_1-proc.config $ nohup ./run_multi-or_1proc.bash >& run_multi_or_1proc.log &
Whilst experiment is running a new file is created chunk_attempts.inf
. In each is listed the number of attempts carried out to simulate a given chunk. If the number is greater than 2, in order to avoid an infinite loop of the work-flow, experiment is stopped.
[editar] orout
Along the experiment the work-flow will create in [OUTfolder]
a new directory called orout
within which will be antother folder with the output of each year of simulation. Work-flow manager looks for the presence of sechiba_rest_out.nc
in orout/[year]
in order to determine if such chunk should be run.
Inside the folder user will also find:
-
run.def
: ORCHIDEE's configuration file used to run the chunk -
used_run.def
: ORCHIDEE's full configuration (also with the parameters not set inrun.def
) file used to run the chunk -
out_orchidee_0000
: ORCHIDEE's standard output for the simulation -
run_or.log
: standard output of the execution of the model