source: trunk/libIGCM/AA_metrics_LMDZ @ 1456

Last change on this file since 1456 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
RevLine 
[1159]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::
[1274]9#-Q- curie #MSUB -c ::default_core::
[1159]10#-Q- curie #MSUB -Q normal
11#-Q- curie #MSUB -A ::default_project::
12#-Q- curie set +x
[1437]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::
[1448]24#-Q- irene ###MSUB -m store,work,scratch
25#-Q- irene #MSUB -E '--licenses=fs_unshare,fs_work,fs_store,fs_scratch'
[1437]26#-Q- irene set +x
[1159]27#-Q- ada #!/bin/ksh
28#-Q- ada #######################
29#-Q- ada ## ADA         IDRIS ##
30#-Q- ada #######################
[1409]31#-Q- ada # @ job_type = mpich
[1159]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
[1290]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)
[1159]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
[1184]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
[1159]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
[1356]85#D- Task type DO NOT CHANGE (computing, post-processing or checking)
[1159]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
[1166]96. ${libIGCM}/libIGCM_comp/libIGCM_comp.ksh
[1159]97#-------
[1192]98IGCM_sys_MkdirWork ${RUN_DIR_PATH}
99IGCM_sys_Cd ${RUN_DIR_PATH}
100#-------
[1159]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# ------------------------------------------------------------------
[1206]112IGCM_debug_Verif_Exit
[1159]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
[1189]135# ------------------------------------------------------------------
136# Activate BigBrother so as to supervise this job
137# ------------------------------------------------------------------
138IGCM_debug_BigBro_Initialize
139
[1159]140#==================================
141# Then set up several directories
142#==================================
143R_OUT_ATM=${R_SAVE}/ATM
144DIR_OUT=${DIR_OUT:=SE}
[1209]145RUN_DIR=${RUN_DIR_PATH}
[1159]146IGCM_sys_MkdirArchive ${R_FIGR}
147IGCM_sys_MkdirWork ${RUN_DIR}
148IGCM_sys_Cd ${RUN_DIR}
[1202]149IGCM_sys_MkdirWork METRICS/SE_${YEARS}
[1159]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}
[1221]155IGCM_sys_Get ${R_OUT_ATM}/Analyse/${DIR_OUT}/${config_UserChoices_JobName}_SE_${YEARS}_1M_histmthNMC.nc ${RUN_DIR}
[1159]156
157#==================================
[1202]158# Group of metrics we will compute
[1159]159#==================================
[1221]160GroupsOfMetrics='LMDZ_PCMDI LMDZ_JetLat LMDZ_OverOceanRegions'
[1308]161MP_Version=v3
[1159]162
[1335]163#==================================
[1364]164# SET UP THE PATH (wont be done in libIGCM_sys because setup_runtime.sh is way too intrusive)
[1335]165#==================================
[1364]166. ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/bin/setup_runtime.sh
[1335]167
[1202]168for metricsGroupName in ${GroupsOfMetrics} ; do
[1159]169
[1202]170  #==================================
[1221]171  # Appropriate configuration template
[1202]172  #==================================
[1222]173  IGCM_sys_Cp ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/doc/parameter_files/input_parameters_${metricsGroupName}_template.py template.py
[1159]174
[1202]175  #==================================
[1221]176  # Configure template for histmth.nc
[1202]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}\'
[1203]186  IGCM_comp_modifyFile template.py ModelFreeSpace "\"${config_UserChoices_LongName}\""
[1202]187  IGCM_comp_modifyFile template.py case_id \'${metricsGroupName}\'
[1365]188  IGCM_comp_modifyFile template.py obs_data_path  \'${R_IN}/ReferenceDatasets/climatos\'
[1209]189  IGCM_comp_modifyFile template.py metrics_output_path \'${RUN_DIR}/METRICS/SE_${YEARS}\'
[1202]190  IGCM_comp_modifyFile template.py model_clims_interpolated_output \'${RUN_DIR}\'
[1162]191
[1202]192  #==================================
193  # Compute metrics
194  #==================================
[1222]195  python ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/bin/pcmdi_metrics_driver.py -p template.py
[1202]196
[1221]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    #==================================
[1222]207    python ${PCMDI_MP}/work_install_${MP_Version}/PCMDI_METRICS/bin/pcmdi_metrics_driver.py -p template.py
[1221]208  fi
209
[1202]210  #==================================
211  # Export metrics to mongoDB system
212  #==================================
213  IGCM_debug_sendAMQP_Metrics METRICS/SE_${YEARS}/${metricsGroupName} ${metricsGroupName}
214
215done
216
[1162]217#==================================
[1159]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}
[1189]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.