source: trunk/libIGCM/AA_metrics_LMDZ @ 1451

Last change on this file since 1451 was 1448, checked in by jgipsl, 6 years ago

Change in headers at irene : temporary remove option -m and use a workaround given by the TGCC. This change is done to avoid problems with resubmitting from job when submitting the main job from workdir.

  • Property svn:keywords set to Revision Author Date
File size: 9.0 KB
Line 
1#-Q- curie ######################
2#-Q- curie ## CURIE   TGCC/CEA ##
3#-Q- curie ######################
4#-Q- curie #MSUB -r METRICS_LMDZ       # Nom du job
5#-Q- curie #MSUB -eo
6#-Q- curie #MSUB -n 1              # Reservation du processus
7#-Q- curie #MSUB -T 14400          # Limite de temps elapsed du job
8#-Q- curie #MSUB -q ::default_node::
9#-Q- curie #MSUB -c ::default_core::
10#-Q- curie #MSUB -Q normal
11#-Q- curie #MSUB -A ::default_project::
12#-Q- curie set +x
13#-Q- irene ######################
14#-Q- irene ## IRENE   TGCC/CEA ##
15#-Q- irene ######################
16#-Q- irene #MSUB -r METRICS_LMDZ   # Job name
17#-Q- irene #MSUB -eo
18#-Q- irene #MSUB -n 1
19#-Q- irene #MSUB -T 14400          # Maximum elapsed time
20#-Q- irene #MSUB -q skylake
21#-Q- irene #MSUB -c 4
22#-Q- irene #MSUB -Q normal
23#-Q- irene #MSUB -A ::default_project::
24#-Q- irene ###MSUB -m store,work,scratch
25#-Q- irene #MSUB -E '--licenses=fs_unshare,fs_work,fs_store,fs_scratch'
26#-Q- irene set +x
27#-Q- ada #!/bin/ksh
28#-Q- ada #######################
29#-Q- ada ## ADA         IDRIS ##
30#-Q- ada #######################
31#-Q- ada # @ job_type = mpich
32#-Q- ada # @ requirements = (Feature == "prepost")
33#-Q- ada # Temps Elapsed max. d'une requete hh:mm:ss
34#-Q- ada # @ wall_clock_limit = 4:00:00
35#-Q- ada # Nom du travail LoadLeveler
36#-Q- ada # @ job_name   = METRICS_LMDZ
37#-Q- ada # Fichier de sortie standard du travail
38#-Q- ada # @ output     = $(job_name).$(jobid)
39#-Q- ada # Fichier de sortie d'erreur du travail
40#-Q- ada # @ error      =  $(job_name).$(jobid)
41#-Q- ada # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.)
42#-Q- ada # @ notification = error
43#-Q- ada # @ environment  = $POST_DIR ; $Script_Post_Output ; $SUBMIT_DIR ; $libIGCM ; $DEBUG_debug ; $BigBrother ; $postProcessingStopLevel ; $R_INIT ; $R_BC ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $YEARS ; $DIR_OUT ; $MASTER ; $libIGCM_SX ; wall_clock_limit=$(wall_clock_limit)
44#-Q- ada # @ queue
45#-Q- lxiv8 ######################
46#-Q- lxiv8 ## OBELIX      LSCE ##
47#-Q- lxiv8 ######################
48#-Q- lxiv8 #PBS -N METRICS_LMDZ
49#-Q- lxiv8 #PBS -m a
50#-Q- lxiv8 #PBS -j oe
51#-Q- lxiv8 #PBS -q test
52#-Q- lxiv8 #PBS -o METRICS_LMDZ.$$
53#-Q- lxiv8 #PBS -S /bin/ksh
54#-Q- ifort_CICLAD ######################
55#-Q- ifort_CICLAD ##   CICLAD    IPSL ##
56#-Q- ifort_CICLAD ######################
57#-Q- ifort_CICLAD #PBS -N METRICS_LMDZ
58#-Q- ifort_CICLAD #PBS -m a
59#-Q- ifort_CICLAD #PBS -j oe
60#-Q- ifort_CICLAD #PBS -q std
61#-Q- ifort_CICLAD #PBS -S /bin/ksh
62#-Q- default #!/bin/ksh
63#-Q- default ##################
64#-Q- default ## DEFAULT HOST ##
65#-Q- default ##################
66
67#**************************************************************
68# Author: Sebastien Denvil
69# Contact: Sebastien.Denvil__at__ipsl.jussieu.fr
70# $Revision::                                          $ Revision of last commit
71# $Author::                                            $ Author of last commit
72# $Date::                                              $ Date of last commit
73# IPSL (2006)
74#  This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC
75#
76#**************************************************************
77
78#set -eu
79#set -vx
80
81date
82
83#-Q- ada export OMP_NUM_THREADS=1
84
85#D- Task type DO NOT CHANGE (computing, post-processing or checking)
86TaskType=post-processing
87
88######################################################################
89
90. ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh
91. ${libIGCM}/libIGCM_card/libIGCM_card.ksh
92. ${libIGCM}/libIGCM_date/libIGCM_date.ksh
93#-------
94. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh
95. ${libIGCM}/libIGCM_config/libIGCM_config.ksh
96. ${libIGCM}/libIGCM_comp/libIGCM_comp.ksh
97#-------
98IGCM_sys_MkdirWork ${RUN_DIR_PATH}
99IGCM_sys_Cd ${RUN_DIR_PATH}
100#-------
101( ${DEBUG_debug} ) && IGCM_debug_Check
102( ${DEBUG_debug} ) && IGCM_card_Check
103( ${DEBUG_debug} ) && IGCM_date_Check
104
105######################################################################
106
107#set -vx
108
109# ------------------------------------------------------------------
110# Test if all was right before proceeding further
111# ------------------------------------------------------------------
112IGCM_debug_Verif_Exit
113
114if [ ${StandAlone} = true ] ; then
115    CARD_DIR=${SUBMIT_DIR}
116else
117    CARD_DIR=${RUN_DIR_PATH}
118    IGCM_sys_Get_Master ${SUBMIT_DIR}/config.card ${RUN_DIR_PATH}
119    IGCM_sys_Get_Master ${SUBMIT_DIR}/run.card    ${RUN_DIR_PATH}
120    IGCM_sys_Get_Master ${SUBMIT_DIR}/COMP        ${RUN_DIR_PATH}
121    IGCM_sys_Get_Master ${SUBMIT_DIR}/POST        ${RUN_DIR_PATH}
122fi
123
124#==================================
125# First of all
126#
127# Read libIGCM compatibility version in config.card
128# Read UserChoices section
129# Read Ensemble section
130# Read Post section
131# Define all netcdf output directories
132#==================================
133IGCM_config_CommonConfiguration ${CARD_DIR}/config.card
134
135# ------------------------------------------------------------------
136# Activate BigBrother so as to supervise this job
137# ------------------------------------------------------------------
138IGCM_debug_BigBro_Initialize
139
140#==================================
141# Then set up several directories
142#==================================
143R_OUT_ATM=${R_SAVE}/ATM
144DIR_OUT=${DIR_OUT:=SE}
145RUN_DIR=${RUN_DIR_PATH}
146IGCM_sys_MkdirArchive ${R_FIGR}
147IGCM_sys_MkdirWork ${RUN_DIR}
148IGCM_sys_Cd ${RUN_DIR}
149IGCM_sys_MkdirWork METRICS/SE_${YEARS}
150
151#==================================
152# Get the file
153#==================================
154IGCM_sys_Get ${R_OUT_ATM}/Analyse/${DIR_OUT}/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc ${RUN_DIR}
155IGCM_sys_Get ${R_OUT_ATM}/Analyse/${DIR_OUT}/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmthNMC.nc ${RUN_DIR}
156
157#==================================
158# Group of metrics we will compute
159#==================================
160GroupsOfMetrics='LMDZ_PCMDI LMDZ_JetLat LMDZ_OverOceanRegions'
161MP_Version=v3
162
163#==================================
164# SET UP THE PATH (wont be done in libIGCM_sys because setup_runtime.sh is way too intrusive)
165#==================================
166. ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/bin/setup_runtime.sh
167
168for metricsGroupName in ${GroupsOfMetrics} ; do
169
170  #==================================
171  # Appropriate configuration template
172  #==================================
173  IGCM_sys_Cp ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/doc/parameter_files/input_parameters_${metricsGroupName}_template.py template.py
174
175  #==================================
176  # Configure template for histmth.nc
177  #==================================
178  IGCM_comp_modifyFile template.py path_and_filename \'./${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc\'
179  IGCM_comp_modifyFile template.py filename \'${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc\'
180  IGCM_comp_modifyFile template.py attributes_provided \'IPSL_Extended\'
181  IGCM_comp_modifyFile template.py Login  \'${LOGIN}\'
182  IGCM_comp_modifyFile template.py model_versions \[\'${config_UserChoices_TagName}\'\]
183  IGCM_comp_modifyFile template.py experiment  \'${config_UserChoices_ExperimentName}\'
184  IGCM_comp_modifyFile template.py realization \'${config_UserChoices_JobName}\'
185  IGCM_comp_modifyFile template.py project_id \'IPSL\-${config_UserChoices_SpaceName}\'
186  IGCM_comp_modifyFile template.py ModelFreeSpace "\"${config_UserChoices_LongName}\""
187  IGCM_comp_modifyFile template.py case_id \'${metricsGroupName}\'
188  IGCM_comp_modifyFile template.py obs_data_path  \'${R_IN}/ReferenceDatasets/climatos\'
189  IGCM_comp_modifyFile template.py metrics_output_path \'${RUN_DIR}/METRICS/SE_${YEARS}\'
190  IGCM_comp_modifyFile template.py model_clims_interpolated_output \'${RUN_DIR}\'
191
192  #==================================
193  # Compute metrics
194  #==================================
195  python ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/bin/pcmdi_metrics_driver.py -p template.py
196
197  if [ ${metricsGroupName} != "LMDZ_OverOceanRegions" ] ; then
198    #==================================
199    # (Re)Configure template for histmthNMC.nc
200    #==================================
201    IGCM_comp_modifyFile template.py path_and_filename \'./${config_UserChoices_JobName}_SE_${YEARS}_1M_histmthNMC.nc\'
202    IGCM_comp_modifyFile template.py filename \'${config_UserChoices_JobName}_SE_${YEARS}_1M_histmthNMC.nc\'
203
204    #==================================
205    # Compute metrics for histmthNMC.nc
206    #==================================
207    python ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/bin/pcmdi_metrics_driver.py -p template.py
208  fi
209
210  #==================================
211  # Export metrics to mongoDB system
212  #==================================
213  IGCM_debug_sendAMQP_Metrics METRICS/SE_${YEARS}/${metricsGroupName} ${metricsGroupName}
214
215done
216
217#==================================
218# Save files
219#==================================
220IGCM_sys_Put_Dir METRICS ${R_FIGR}
221IGCM_sys_Rm -Rf METRICS
222IGCM_sys_Rm ${config_UserChoices_JobName}_SE_${YEARS}_1M_histmth.nc
223
224# Clean RUN_DIR_PATH (necessary for cesium and titane only)
225IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}
226
227# ------------------------------------------------------------------
228# Finalize BigBrother to inform that the jobs end
229# ------------------------------------------------------------------
230IGCM_debug_BigBro_Finalize
Note: See TracBrowser for help on using the repository browser.