Pre- and post-processing scripts

Usually one can use the scripts from the environment.  This is always the official (closed) version.

But you might also want to ask either Bernard Dugas (Bernard.Dugas@ec.gc.ca) or Katja Winger (Katja.Winger@ec.gc.ca) if there is a newer updated version of the scripts.

There are two types of scripts:
  1.   version-dependent, that change with model versions (found in ${gemclim}/scripts/*) and
  2.   version-invariant, that do not change (found in ${ARMNLIB}/scripts/Climat_*)

In case you want to modify and use some of these scripts you must put your (modified) copies of any version-dependent scripts into your '~/modeles/GEMCLIM/v_3.3.0/scripts' directory and any version-invariant scripts into the '~/ovbin' directory.

After having created the directory '~/modeles/GEMCLIM/v_3.3.0/scripts' you need to reset the model environment again so that this directory gets added to your 'PATH'!

In climate mode, the pre- and post-processing are going to use several extra scripts which will never be used in non- climate mode GEM. The names for all of these scripts start with 'Climat_...'.

Furthermore, some of the "normal" non-climate scripts may work differently in climate mode.

You can find here


Calling sequences for the GEM/GEMCLIM models, scripts and jobs

Given is the script name, if it gets called or submitted and on which machine it runs. Note that in the following, ${launch_mach} is where the model was started, ${mach} is where the model was run, ${arch_mach} is where the archives are to be stored and ${dest_mach} is the main post-processing machine. Finally, ${lehost} stands for the main front-end that is used here to handle most of the actual job submissions and file transfers (defaults to pollux at CMC/RPN).

Pre processing and model run
Post processing in non-climate mode
Post processing in climate mode

Pre processing and model run





List of scripts in alphabetical order

Scripts starting with "Climat_" are only used when the model is running in climate mode. All other scripts are used in both climate and non-climate modes, unless noted otherwise.

Climat_archive_pilot

Is put in the delayed_jobs directory and submitted by pilot_job. Runs on ${arch_mach}.
Position in flowchart

Climat_beta

Is called from Climat_lancer_diag. Runs on ${dest_mach}. Position in flowchart

Climat_check_rdiag

Is called from Climat_strip_phy. Runs on ${dest_mach}.  Position in flowchart

Climat_diag

Is called from Climat_lancer_diag and Climat_diag_phy. Runs on ${dest_mach}.
1. Position in flowchart     2. Position in flowchart     3. Position in flowchart

Climat_diag_phy

Is called from Climat_lancer_diag. Runs on ${dest_mach}. Position in flowchart

Climat_eta2preshyb

Is called from Climat_prepare_job and Climat_strip_phy. Runs on launching machine and ${dest_mach}, respectively. 1. Position in flowchart     2. Position in flowchart

Climat_get_grtyp

Is called from Climat_diag, Climat_make_zonaux and Climat_surfacc_mean. Runs on ${dest_mach}. 1. Position in flowchart      2. Position in flowchart

Climat_lancer_diag

Is called from diag-job. Runs on ${dest_mach}.
Position in flowchart

Climat_launch_next_interval.sh

Is called from the model job which got created by Um_launch. Runs on ${mach}. Position in flowchart

Climat_make_covar

Is called from Climat_diag. Runs on ${dest_mach}. Position in flowchart

Climat_make_gaussien

Is called from Climat_strip_phy. Runs on ${dest_mach}. Runs on ${dest_mach}.  Position in flowchart

Climat_make_mean

Is called from Climat_diag. Runs on ${dest_mach}. Position in flowchart

Climat_make_zonaux

Is called from Climat_diag. Runs on ${dest_mach}. Position in flowchart

Climat_mdpr_clean

Is called from Climat_lancer_diag after the diagnostics have been done 1) if archiving is requested and 2) if the interval between time samples is less than and is a subset of 12 hours. Each call 'removes' every second md- and pr-file, correctly accounting for variables that are accumulations, averages, minima or maxima. More than one call to this script may be required to reduce the final sampling interval to 12 hours in the archives. Runs on ${dest_mach}.
A more detailed description of the way this procedure actually works can be found here.

Position in flowchart

Climat_multi_diag

This script is not part of the automatic pre or post processing.
It can be called after the diagnostics have been done.

Climat_mv2cfs

Is called from Climat_diag, Climat_diag_phy and Climat_lancer_diag. Runs on ${dest_mach}. 1. Position in flowchart   2. Position in flowchart   3. Position in flowchart  4. Position in flowchart

Climat_post_processing

Is called from the post_job. Runs on ${dest_mach}
Position in flowchart

Climat_prepare_job

Is called from 'Um_launch'. Runs on ${launch_mach}, the machine on which the experiment was launched.
Prepares the configuration files for Climate mode processing.
Position in flowchart

Climat_rotate_vectors

Is called from Climat_strip_phy. Runs on ${dest_mach}. Position in flowchart  

Climat_save_analysis

Is called from back_job. Runs on ${mach}.
Position in flowchart

Climat_save_listings

Is called by the post-processing job that finishes last. This can be the last post_job or, if no diagnostics are required, the last diag_job. Runs on ${dest_mach}.
Position in flowchart

Climat_save_pilot

Is called from pilot_job. Runs on ${dest_mach}.
Position in flowchart

Climat_save_restarts

Is called at the end of a model job interval either from Climat_post_processing  or from Climat_launch_next_interval.sh (when a continuing job is submitted). Runs on ${mach}and ${launch_mach}, respectively
Position #1 in flowchart     Position #2 in flowchart

Climat_series_temporelles

Is called from Climat_lancer_diag. Runs on ${dest_mach}. Position in flowchart

Climat_strip_phy

Is called from rassemble_job. Runs on ${dest_mach}.
Position in flowchart

Climat_surfacc_mean

Is called from Climat_diag_phy. Runs on ${dest_mach}. Position in flowchart

Climat_var_test

Is called from Climat_prepare_job. Runs on ${launch_mach}, the machine on which the experiment was launched.
Verifies that several variables are set correctly.

Position in flowchart

Climat_xfer

Is called from Um_xfer.sh. Runs on ${mach}.
Position in flowchart

Climat_xfer_pilot

Is called from Climat_post_processing. Runs on ${dest_mach}
Position in flowchart

Um_delam

Is called from Um_xfer.sh resp. Climat_xfer. Runs on ${mach}.
This script is only needed for model versions 3.1.2 and older.
Position in flowchart

Um_launch

Main script to launch the model. Runs on ${mach} resp. ${launch_mach} Position in flowchart

Um_loadbin

Is called from Um_launch. Runs on ${mach} resp. ${launch_mach} Position in flowchart

Um_maindriver.sh

Is called from the entry and the model job created in Um_launch. Runs on ${mach} resp. ${launch_mach}. 1. Position in flowchart     2. Position in flowchart

Um_preprep

Is called from Um_launch. Runs on ${mach} resp. ${launch_mach}. Position in flowchart

Um_runent.sh

Is called from Um_maindriver.sh.
This script is the main entry script.
It usually runs on ${mach}, except in LAM-Climate mode when it runs on ${launch_mach}, the launching machine.
Position in flowchart

Um_runmod.sh

Is called from Um_maindriver.sh. Runs on ${mach}.
This script is the main model script.
Position in flowchart

Um_shipstuff

Is called from Um_launch. Runs on ${mach} resp. ${launch_mach}.
This script updates the content of ${EXECDIR} on ${MACH}.
Position in flowchart

Um_xfer

Is called from Um_xfer_prep.sh. Runs on ${mach}. It is only used in non-climate mode.
Position in flowchart

Um_xfer.sh

Is called either at the end of a model clone subjob from Um_launch or from the model at run-time to do a "cleanup". Runs on ${mach}.
Position in flowchart

Um_xfer_cpac

This script is not called anymore. It was last called in version 3.1.0. There it was called by Um_xfer resp. Climat_xfer.

Um_xfer_mach

Is called from Um_xfer. Runs on ${mach}. It is only used in non-climate mode.
Position in flowchart

Um_xfer_mvf

This script is not called anymore. It was last called in version 3.1.0. There it was called by Um_xfer resp. Climat_xfer.

Um_xfer_prep.sh

Is called from from a job created and submitted by Um_xfer.sh but only in non-climate mode. Runs on ${mach}. Position in flowchart

Um_xfer_rsync

Is called from Climat_post_processing, Climat_save_listings, Climat_save_pilot, Climat_xfer and Um_xfer.
1. Position in flowchart   2. Position in flowchart   3. Position in flowchart   4.+5. Position in flowchart

d2z

Is called from Um_xfer_prep.sh resp. Climat_post_processing. Runs on ${mach}. 1. Position in flowchart      2. Position in flowchart

delam

Is called from Um_delam. Runs on ${mach}. Is only used for version 3.1.2 and older.


List of jobs in alphabetical order

The following jobs are created by the scripts, although most of the jobs are only created and used in climate mode, they are indicated with *. Jobs only created and used in non-climate mode are indicated with *. For each pre- and post-processing, new jobs get created. In climate mode, at the end of each model job interval, when the diagnostics get saved, the code of these "post-processing jobs" is packed in a zip-file called 'jobs_${exp}.zip' and this archive is saved in the same directory as the diagnostics, namely ${arch_mach}:${arch_dir}


anal_job *


Is created and submitted from Climat_save_analysis. Runs on ${lehost}.
Position in flowchart


archfer_job *


Is created and submitted from diag_job. Runs on ${lehost}.
Position in flowchart


back_job *


Is created and submitted from Climat_xfer. Runs on ${mach}.
===>  See flux diagram for calling sequence of back_job, xfer_job, and post_job!  <===

Position in flowchart


continue_with_next_job
*

Is created and submitted from Climat_launch_next_interval.sh. Runs on ${launch_mach}, the machine on which the first model job got launched.
Position in flowchart


d2z_job
*

Is created from Climat_post_processing and called from the post_processing_job. Runs on 1, 2, 4 or 8 cpu's. Runs on ${dest_mach}.
Position in flowchart


diag_job
*

Is created from Climat_post_processing and submitted from the rassemble_job. Runs on 1, 2, 4 or 8 cpu's. Runs on ${dest_mach}.
Position in flowchart


entry-job:   ${_job}_${exp}_E


Is created and submitted from Um_launch. Runs on ${mach} except for LAM-Climate mode where it runs on ${launch_mach}, the machine from which the model was launched.
Position in flowchart


file-transfer job:   ${_job}_${exp}_FT_${endstep}


Is created and submitted from Um_xfer_prep.sh. Runs on ${lehost}.
Position in flowchart


model-job:   ${_job}_${exp}_M


Is created from Um_launch and submitted from soumet_la_job. Runs on ${mach}.
Position in flowchart


pil_job
*

Is created and submitted from Climat_xfer_pilot. Runs on ${lehost}.
Position in flowchart


pilot_job
*

Is created from Climat_post_processing and called from the post_processing_job. Runs on 1, 2, 4 or 8 cpu's. Runs on ${dest_mach}.
Position in flowchart


post_job
*

Is created from Climat_xfer and submitted or called (depending if it will be a long job or not) from xfer_job or directly from Climat_xfer. Runs on ${dest_mach}.
===>  See flux diagram for calling sequence of back_job, xfer_job, and post_job!  <===

Position in flowchart


post_processing_job
*

Is created and submitted from Climat_post_processing. Runs on 1,2 ,4 or 8 cpu's. Runs on ${dest_mach}.
Position in flowchart


preclimdiagpr_job
*

Is created and called from Climat_lancer_diag. Runs on 1, 2, 4 or 8 cpu's. Runs on ${dest_mach}.
Position in flowchart


prepare-file-transfer job:   ${_job}_${exp}_PREPFT_${endstep} *


Is created and submitted from Um_xfer.sh. Runs on ${mach}.
Position in flowchart


rassemble_job
*

Is created from Climat_post_processing and called from the post_processing_job. Runs on 1, 2, 4 or 8 cpu's. Runs on ${dest_mach}.
Position in flowchart


save_listings_job
*

Is created and submitted from Climat_save_listings. Runs on ${lehost}.

save_job
*

Is created and submitted from Climat_save_restarts. Runs on ${lehost}.
1. Position in flowchart     2. Position in flowchart


soumet_la_job


Is created from Um_launch and called from the entry job. Runs on ${mach}.
Position in flowchart


xfer_job
*

Is created from Climat_xfer and submitted from back_job or directly from Climat_xfer. Runs on ${lehost}.
===>  See flux diagram for calling sequence of back_job, xfer_job, and post_job!  <===

Position in flowchart


*
Jobs only created and used in climate mode
* Jobs only created and used in non-climate mode




Author: Katja Winger
Last update: June 2006