#-Q- cesium #!/bin/ksh #-Q- cesium ###################### #-Q- cesium ## CESIUM CEA ## #-Q- cesium ###################### #-Q- cesium #MSUB -r SE # Nom du job #-Q- cesium #MSUB -N 1 # Reservation du noeud #-Q- cesium #MSUB -n 1 # Reservation du processus #-Q- cesium #MSUB -T 86400 # Limite de temps elapsed du job #-Q- cesium #MSUB -E "-j o" #-Q- cesium #MSUB -E "-S /bin/ksh" #-Q- platine #!/usr/bin/ksh #-Q- platine ################### #-Q- platine ## PLATINE CEA ## #-Q- platine ################### #-Q- platine #BSUB -J SE # Nom du job #-Q- platine #BSUB -N # message a la fin du job #-Q- platine #BSUB -n 1 # reservation des processeurs pour le job #-Q- platine #BSUB -W 1:00 # Limite temps #-Q- platine #BSUB -q post # Passage en queue post #-Q- platine #BSUB -L /bin/ksh #-Q- sx8brodie #!/bin/ksh #-Q- sx8brodie ####################### #-Q- sx8brodie ## SX8BRODIE IDRIS ## #-Q- sx8brodie ####################### #-Q- sx8brodie # Temps Elapsed max. d'une requete hh:mm:ss #-Q- sx8brodie # @ wall_clock_limit = 10:00:00 #-Q- sx8brodie # Nom du travail LoadLeveler #-Q- sx8brodie # @ job_name = SE #-Q- sx8brodie # Fichier de sortie standard du travail #-Q- sx8brodie # @ output = $(job_name).$(jobid) #-Q- sx8brodie # Fichier de sortie d'erreur du travail #-Q- sx8brodie # @ error = $(job_name).$(jobid) #-Q- sx8brodie # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) #-Q- sx8brodie # @ notification = error #-Q- sx8brodie # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $MASTER ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER #-Q- sx8brodie # @ queue #-Q- aix6 #!/bin/ksh #-Q- aix6 ####################### #-Q- aix6 ## VARGAS IDRIS ## #-Q- aix6 ####################### #-Q- aix6 # Temps Elapsed max. d'une requete hh:mm:ss #-Q- aix6 # @ wall_clock_limit = 10:00:00 #-Q- aix6 # Nom du travail LoadLeveler #-Q- aix6 # @ job_name = SE #-Q- aix6 # Fichier de sortie standard du travail #-Q- aix6 # @ output = $(job_name).$(jobid) #-Q- aix6 # Fichier de sortie d'erreur du travail #-Q- aix6 # @ error = $(job_name).$(jobid) #-Q- aix6 # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) #-Q- aix6 # @ notification = error #-Q- aix6 # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $MASTER ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER #-Q- aix6 # @ queue #-Q- ulam #!/bin/ksh #-Q- ulam ####################### #-Q- ulam ## ULAM IDRIS ## #-Q- ulam ####################### #-Q- ulam # Temps Elapsed max. d'une requete hh:mm:ss #-Q- ulam # @ wall_clock_limit = 10:00:00 #-Q- ulam # Nom du travail LoadLeveler #-Q- ulam # @ job_name = SE #-Q- ulam # Fichier de sortie standard du travail #-Q- ulam # @ output = $(job_name).$(jobid) #-Q- ulam # Fichier de sortie d'erreur du travail #-Q- ulam # @ error = $(job_name).$(jobid) #-Q- ulam # pour recevoir un mail en cas de depassement du temps Elapsed (ou autre pb.) #-Q- ulam # @ notification = error #-Q- ulam # @ environment = $DEBUG_debug ; $MODIPSL ; $libIGCM ; $libIGCM_SX ; $SUBMIT_DIR ; $REBUILD_DIR ; $RebuildFromArchive ; $POST_DIR ; $MASTER ; $DateBegin ; $PeriodDateBegin ; $PeriodDateEnd ; $NbRebuildDir ; $StandAlone ; $RESOL_ATM ; $RESOL_OCE ; $RESOL_ICE ; $RESOL_MBG ; $RESOL_SRF ; $RESOL_SBG ; $MASTER #-Q- ulam # @ queue #-Q- sx8mercure #!/bin/ksh #-Q- sx8mercure ###################### #-Q- sx8mercure ## SX8MERCURE CEA ## #-Q- sx8mercure ###################### #-Q- sx8mercure #PBS -N SE # Nom du job #-Q- sx8mercure #PBS -j o # regroupement des stdout et stderr #-Q- sx8mercure #PBS -S /usr/bin/ksh # shell de soumission #-Q- sx8mercure #PBS -l memsz_job=1gb # Limite memoire a 1 Go #-Q- sx8mercure #PBS -l cputim_job=1:00:00 # Limite temps a 1 heures #-Q- sx8mercure #PBS -q scalaire #-Q- sx9mercure #!/bin/ksh #-Q- sx9mercure ######################### #-Q- sx9mercure ## CESIUM FOR SX9 CEA ## #-Q- sx9mercure ######################### #-Q- sx9mercure #MSUB -r SE # Nom du job #-Q- sx9mercure #MSUB -N 1 # Reservation du noeud #-Q- sx9mercure #MSUB -n 1 # Reservation du processus #-Q- sx9mercure #MSUB -T 86400 # Limite de temps elapsed du job #-Q- sx9mercure #MSUB -E "-j o" #-Q- sx9mercure #MSUB -E "-S /bin/ksh" #-Q- titane #!/bin/ksh #-Q- titane ###################### #-Q- titane ## TITANE CEA ## #-Q- titane ###################### #-Q- titane #MSUB -r SE # Nom du job #-Q- titane #MSUB -N 1 # Reservation du noeud #-Q- titane #MSUB -n 1 # Reservation du processus #-Q- titane #MSUB -T 86400 # Limite de temps elapsed du job #-Q- titane #MSUB -E "-j o" #-Q- titane #MSUB -E "-S /bin/ksh" #-Q- titane ##MSUB -e nco.out # Sortie standard #-Q- titane ##MSUB -o nco.out # Sortie standard #-Q- lxiv8 ###################### #-Q- lxiv8 ## OBELIX LSCE ## #-Q- lxiv8 ###################### #-Q- lxiv8 #PBS -N SE #-Q- lxiv8 #PBS -m a #-Q- lxiv8 #PBS -j oe #-Q- lxiv8 #PBS -q medium #-Q- lxiv8 #PBS -o SE.$$ #-Q- lxiv8 #PBS -S /bin/ksh #-Q- default #!/bin/ksh #-Q- default ################## #-Q- default ## DEFAULT HOST ## #-Q- default ################## #************************************************************** # Author: Sebastien Denvil # Contact: Sebastien.Denvil__at__ipsl.jussieu.fr # $Revision:: $ Revision of last commit # $Author:: $ Author of last commit # $Date:: $ Date of last commit # IPSL (2006) # This software is governed by the CeCILL licence see libIGCM/libIGCM_CeCILL.LIC # #************************************************************** #set -eu #set -vx date #-Q- sx8brodie export OMP_NUM_THREADS=1 #-Q- aix6 export OMP_NUM_THREADS=1 #-Q- ulam export OMP_NUM_THREADS=1 ######################################################################## #D- Flag to determine if this job in a standalone mode #D- Default : value from AA_job if any StandAlone=${StandAlone:=true} #D- Low level debug : to bypass lib test checks and stack construction #D- Default : value from AA_job if any libIGCM=${libIGCM:=::modipsl::/libIGCM} # WARNING for StandAlone used : To run this script on some machine, # you must check MirrorlibIGCM variable in sys library. # If this variable is true, you must use libIGCM_POST path instead # of your running libIGCM directory. #D- Flag to determine if rebuild process has been performed asynchronously #D- Possible value true or false. #D- If true raw files has allready been patched by rebuild job #D- If false create_ts will patch the raw files #D- Default : Value from AA_job if any. Usefull in StandAlone case. RebuildFrequency=${RebuildFrequency:=true} #D- Flag to determine atlas job's output directory #D- Default : value from libIGCM_post.ksh if any POST_DIR=${POST_DIR:=${PBS_O_WORKDIR:=$(pwd)}} #D- Increased verbosity (1, 2, 3) #D- Default : value from AA_job if any Verbosity=${Verbosity:=3} #D- Low level debug : to bypass lib test checks and stack construction #D- Default : value from AA_job if any DEBUG_debug=${DEBUG_debug:=false} #D- TEMPORARY Flag to determine atmospheric resolution #D- Default : value from atmospheric driver if any RESOL_ATM=${RESOL_ATM:=ALL} #D- Flag to determine surface resolution #D- Default : value from surface driver if any RESOL_SRF=ALL #D- Flag to determine surface resolution #D- Default : value from surface driver if any RESOL_SBG=ALL #D- TEMPORARY Flag to determine ocean resolution #D- Default : value from ocean driver if any RESOL_OCE=${RESOL_OCE:=ORCA2} #D- TEMPORARY Flag to determine ice resolution #D- Default : value from ice driver if any RESOL_ICE=${RESOL_ICE:=ORCA2} #D- TEMPORARY Flag to determine marine biogeochemistry resolution #D- Default : value from ice driver if any RESOL_MBG=${RESOL_MBG:=ORCA2} ######################################################################## . ${libIGCM}/libIGCM_debug/libIGCM_debug.ksh ( ${DEBUG_debug} ) && IGCM_debug_Check . ${libIGCM}/libIGCM_card/libIGCM_card.ksh ( ${DEBUG_debug} ) && IGCM_card_Check . ${libIGCM}/libIGCM_date/libIGCM_date.ksh ( ${DEBUG_debug} ) && IGCM_date_Check #------- . ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh ######################################################################## #set -vx IGCM_sys_MkdirWork ${RUN_DIR_PATH} IGCM_sys_Cd ${RUN_DIR_PATH} # ------------------------------------------------------------------ # Test if all was right before proceeding further # ------------------------------------------------------------------ IGCM_debug_Verif_Exit_Post if [ ${StandAlone} = true ] ; then CARD_DIR=${SUBMIT_DIR} else CARD_DIR=${RUN_DIR_PATH}/$( basename ${SUBMIT_DIR} ) IGCM_sys_Get_Master ${SUBMIT_DIR} ${RUN_DIR_PATH} fi # # First of all # IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card UserChoices typeset option for option in ${config_UserChoices[*]} ; do IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card UserChoices ${option} done # echo IGCM_debug_Print 1 "DefineArrayFromOption : config_UserChoices" IGCM_debug_PrintVariables 3 config_UserChoices_JobName IGCM_debug_PrintVariables 3 config_UserChoices_LongName IGCM_debug_PrintVariables 3 config_UserChoices_TagName IGCM_debug_PrintVariables 3 config_UserChoices_SpaceName IGCM_debug_PrintVariables 3 config_UserChoices_ExperimentName IGCM_debug_PrintVariables 3 config_UserChoices_CalendarType IGCM_debug_PrintVariables 3 config_UserChoices_DateBegin IGCM_debug_PrintVariables 3 config_UserChoices_DateEnd IGCM_debug_PrintVariables 3 config_UserChoices_PeriodLength echo #================================== #R_SAVE : Job output directory if ( [ ! X${config_UserChoices_SpaceName} = X ] && [ ! X${config_UserChoices_ExperimentName} = X ] ) ; then FreeName=$( echo ${config_UserChoices_JobName} | sed 's/.*_//' ) R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} R_DODS=${config_UserChoices_TagName}/${config_UserChoices_SpaceName}/${config_UserChoices_ExperimentName}/${FreeName} else R_SAVE=${R_OUT}/${config_UserChoices_TagName}/${config_UserChoices_JobName} R_DODS=${config_UserChoices_TagName}/${config_UserChoices_JobName} fi # IGCM_card_DefineArrayFromSection ${CARD_DIR}/config.card ListOfComponents # IGCM_card_DefineVariableFromOption ${CARD_DIR}/config.card Post SeasonalFrequency # # Determine period for seasonnal average. Default : value from AA_job if any # DateBegin=${DateBegin:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateBegin} )} # PeriodDateEnd=${PeriodDateEnd:=$( IGCM_date_ConvertFormatToGregorian ${config_UserChoices_DateEnd} )} # freq=$( echo ${config_Post_SeasonalFrequency} | sed -e "s/[yY]//" ) # an_fin=$(( $( IGCM_date_ConvertGregorianDateToJulian ${PeriodDateEnd} ) / 1000 )) an_deb=$( IGCM_date_YearDigit $(( an_fin - freq + 1 )) ) an_fin=$( IGCM_date_YearDigit ${an_fin} ) # # For each component selected determine which files need post-processing # for comp in ${config_ListOfComponents[*]} ; do # IGCM_card_DefineArrayFromOption ${CARD_DIR}/config.card ListOfComponents ${comp} eval compname=\${config_ListOfComponents_${comp}[0]} > /dev/null 2>&1 # card=${CARD_DIR}/COMP/${compname}.card IGCM_card_DefineArrayFromOption ${card} OutputFiles List # ListFilesName=${compname}_OutputFiles_List eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 # if [ X${FileName0} != X${NULL_STR} ] ; then # # INITIALISATION # eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 typeset i=2 # until [ $i -gt $NbFiles ]; do # eval flag_post=\${${ListFilesName}[$i]} > /dev/null 2>&1 # if [ X${flag_post} != XNONE ] ; then # # Check if seasonal is required for this file # IGCM_card_DefineArrayFromSection ${card} ${flag_post} # # Seasonal case : If option Seasonal is not found (old cards) put SEASONAL ON by default # # variable option allready typeset above for option in $( eval echo \${${compname}_${flag_post}[*]} ) ; do if [ ${option} = Seasonal ] ; then FoundSeasonal=true IGCM_card_DefineVariableFromOption ${card} ${flag_post} Seasonal fi done # if [ ! X${FoundSeasonal} = Xtrue ] ; then eval ${compname}_${flag_post}_Seasonal=ON fi # if [ ! X$( eval echo \${${compname}_${flag_post}_Seasonal} ) = XON ] ; then (( i=i+3 )) continue fi # # CREATE LIST # FILE=$( echo ${flag_post} | awk "-FPost_" '{print $2}' ) # DIRECTORY=${R_SAVE}/${comp}/Analyse/SE # TestedFile=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${FILE}.nc # IGCM_sys_TestFileArchive ${DIRECTORY}/${TestedFile} if [ ! $? = 0 ] ; then eval set +A LISTE_FILE_${comp} \$\{LISTE_FILE_${comp}[*]} ${FILE} if [ ! ${RebuildFrequency} = true ] ; then IGCM_card_DefineArrayFromOption ${card} Post_${FILE} Patches eval set +A LISTE_PATCHES_${FILE} \$\{${compname}_Post_${FILE}_Patches[*]} if [ X$( eval echo \${LISTE_PATCHES_${FILE}[0]} ) != X${NULL_STR} ]; then for Patch in $( eval echo \${LISTE_PATCHES_${FILE}[*]} ); do if [ Xload${Patch} != X ] ; then . ${libIGCM}/libIGCM_post/IGCM_${Patch}.ksh eval load${Patch}=loaded fi done fi fi fi fi (( i=i+3 )) done # until [ $i -eq $NbFiles ] fi done # for comp for comp in ${config_ListOfComponents[*]} ; do # eval R_OUT_${comp}=${R_SAVE}/${comp} # i=0 for file in $( eval echo \${LISTE_FILE_${comp}[*]} ); do # # Determine in which output can we find file # IE : Output/MO or Output/DA or ... # FlagDir=$( echo ${file} | awk -F "_" '{print $1}' ) case ${FlagDir} in 1Y) FreqDir=YE ;; 1M) FreqDir=MO ;; 5D|1D) FreqDir=DA ;; HF) FreqDir=HF ;; 3H) FreqDir=HF ;; INS) FreqDir=INS ;; esac # RESULT_SE=${config_UserChoices_JobName}_SE_${an_deb}_${an_fin}_${file}.nc # Do not redoo an existing SE IGCM_sys_TestFileArchive ${R_SAVE}/${comp}/Analyse/SE/${RESULT_SE} if [ $? = 0 ] ; then continue fi # eval file_path=\${R_OUT_${comp}}/Output/${FreqDir}/ # case ${config_UserChoices_PeriodLength} in # For Yearly simulation : 1Y|1y) (( an = an_deb )) # Initialize array #set -A liste_file_se #set -A liste_file_se_tmp unset liste_file_se unset liste_file_se_tmp while [ ${an} -le ${an_fin} ] ; do moisL=$( IGCM_date_DaysInMonth ${an} ${mois} ) # an4=$(printf "%04i\n" ${an} ) # diy=$( IGCM_date_DaysInYear $an4 ) afin=$( IGCM_date_AddDaysToGregorianDate ${an4}0101 $(( diy - 1 )) ) date=${an4}0101_${afin} #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc (( an = an + 1 )) done # IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH} IGCM_debug_Verif_Exit_Post # Apply IGCM_Patch if needed if [ ! ${RebuildFrequency} = true ] ; then if [ X$( eval echo \${LISTE_PATCHES_${file}[0]} ) != X${NULL_STR} ]; then for file_t in $( eval echo ${liste_file_se_tmp[*]} ); do for Patch in $( eval echo \${LISTE_PATCHES_${file}[*]} ); do IGCM_${Patch} ${file_t} done done fi fi # Search of common list of variables to be treated nbfile=0 for file_common_var in ${liste_file_se_tmp[*]} ; do ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncra (( nbfile = nbfile + 1 )) done list_var_final_ncra=`cat tmpfile_ncra | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','` IGCM_sys_Rm tmpfile_ncra # detect time counter : time or time_counter ie unlimited variable var_unlim=$(ncdump -h ${liste_file_se_tmp[1]}|grep UNLIMITED| cut -d ' ' -f 1) for mois in 01 02 03 04 05 06 07 08 09 10 11 12 ; do # (( nb = ${mois} - 1 )) # OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc IGCM_sys_ncra -O -v ${list_var_final_ncra} -d ${var_unlim},${nb},,12 ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]} done IGCM_sys_Rm ${liste_file_se_tmp[*]} ;; # For Monthly simulation : 1M|1m) for mois in 01 02 03 04 05 06 07 08 09 10 11 12 ; do # (( nb = ${mois} - 1 )) # OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc # (( an = an_deb )) # Initialize array #set -A liste_file_se #set -A liste_file_se_tmp unset liste_file_se unset liste_file_se_tmp while [ ${an} -le ${an_fin} ] ; do moisL=$( IGCM_date_DaysInMonth ${an} ${mois} ) # an4=$(printf "%04i\n" ${an} ) # date=${an4}${mois}01_${an4}${mois}${moisL} #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc (( an = an + 1 )) done # IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH} IGCM_debug_Verif_Exit_Post # Apply IGCM_Patch if needed if [ ! ${RebuildFrequency} = true ] ; then if [ X$( eval echo \${LISTE_PATCHES_${file}[0]} ) != X${NULL_STR} ]; then for file_t in $( eval echo ${liste_file_se_tmp[*]} ); do for Patch in $( eval echo \${LISTE_PATCHES_${file}[*]} ); do IGCM_${Patch} ${file_t} done done fi fi # Search of common list of variables to be treated nbfile=0 for file_common_var in ${liste_file_se_tmp[*]} ; do ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncra (( nbfile = nbfile + 1 )) done list_var_final_ncra=`cat tmpfile_ncra | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','` IGCM_sys_Rm tmpfile_ncra IGCM_sys_ncra -O -v ${list_var_final_ncra} ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]} IGCM_sys_Rm ${liste_file_se_tmp[*]} done ;; *D|*d) for mois in 01 02 03 04 05 06 07 08 09 10 11 12 ; do # (( nb = ${mois} - 1 )) # OUT_SE[${nb}]=${config_UserChoices_JobName}_SE${mois}_${an_deb}_${an_fin}_${file}.nc # (( an = an_deb )) # Initialize array #set -A liste_file_se #set -A liste_file_se_tmp unset liste_file_se unset liste_file_se_tmp while [ ${an} -le ${an_fin} ] ; do moisL=$( IGCM_date_DaysInMonth ${an} ${mois} ) # an4=$(printf "%04i\n" ${an} ) # length_d=$(( ${config_UserChoices_PeriodLength} - 1 )) # for one day if [ ${length_d} -eq 1 ] ; then (( length_d = 0 )) fi (( day = 1 )) while [ ${day} -le ${moisL} ] ; do day2=$(printf "%02i\n" ${day} ) day_beg=${an4}${mois}${day2} day_end=$( IGCM_date_AddDaysToGregorianDate ${day_beg} ${length_d} ) date=${an4}${mois}${day_beg}_${an4}${mois}${day_end} #set +A liste_file_se ${liste_file_se[*]} ${file_path}${config_UserChoices_JobName}_${date}_${file}.nc #set +A liste_file_se_tmp ${liste_file_se_tmp[*]} ${config_UserChoices_JobName}_${date}_${file}.nc liste_file_se[${#liste_file_se[*]}]=${file_path}${config_UserChoices_JobName}_${date}_${file}.nc liste_file_se_tmp[${#liste_file_se_tmp[*]}]=${config_UserChoices_JobName}_${date}_${file}.nc (( day = day + 1 )) done (( an = an + 1 )) done # IGCM_sys_Get /l liste_file_se[*] ${RUN_DIR_PATH} IGCM_debug_Verif_Exit_Post # Apply IGCM_Patch if needed if [ ! ${RebuildFrequency} = true ] ; then if [ X$( eval echo \${LISTE_PATCHES_${file}[0]} ) != X${NULL_STR} ]; then for file_t in $( eval echo ${liste_file_se_tmp[*]} ); do for Patch in $( eval echo \${LISTE_PATCHES_${file}[*]} ); do IGCM_${Patch} ${file_t} done done fi fi # Search of common list of variables to be treated nbfile=0 for file_common_var in ${liste_file_se_tmp[*]} ; do ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncra (( nbfile = nbfile + 1 )) done list_var_final_ncra=`cat tmpfile_ncra | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','` IGCM_sys_Rm tmpfile_ncra IGCM_sys_ncra -O -v ${list_var_final_ncra} ${liste_file_se_tmp[*]} ${OUT_SE[${nb}]} IGCM_sys_Rm ${liste_file_se_tmp[*]} done ;; esac # # Search of common list of variables to be treated nbfile=0 for file_common_var in ${OUT_SE[*]} ; do ncdump -h ${file_common_var} | grep -E 'float|double' | cut -f 1 -d '(' | cut -f 2 -d ' ' >> tmpfile_ncrcat (( nbfile = nbfile + 1 )) done list_var_final_ncrcat=`cat tmpfile_ncrcat | sort | uniq -c | awk -v nbfile=$nbfile '{if ($1 == nbfile) {print $2}}' | paste -s -d ','` IGCM_sys_Rm tmpfile_ncrcat IGCM_sys_ncrcat -O -v ${list_var_final_ncrcat} ${OUT_SE[*]} ${RESULT_SE} # IGCM_sys_Rm ${OUT_SE[*]} # # detect time counter : time or time_counter ie unlimited variable var_unlim=$(ncdump -h ${RESULT_SE}|grep UNLIMITED| cut -d ' ' -f 1) # Put correct climatological axis following calendar case ${config_UserChoices_CalendarType} in 360d|360_day) # 360 days ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15, 45, 75, 105, 135, 165, 195, 225, 255, 285, 315, 345.} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 30, 30, 60, 60, 90, 90, 120, 120, 150, 150, 180, 180, 210, 210, 240, 240, 270, 270, 300, 300, 330, 330, 360.} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"360_day\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" ;; noleap|365_day) # 365 days ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 349.5} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 31, 31, 59, 59, 90, 90, 120, 120, 151, 151, 181, 181, 212, 212, 243, 243, 273, 273, 304, 304, 334, 334, 365.} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"365_day\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" ;; all_leap|366_day) # 366 days ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15.5, 45.5, 75.5, 106, 136.5, 167, 197.5, 228.5, 259, 289.5, 320, 350.5} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 31, 31, 60, 60, 91, 91, 121, 121, 152, 152, 182, 182, 213, 213, 244, 244, 274, 274, 305, 305, 335, 335, 366.} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"366_day\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" ;; leap|gregorian|standard) # 365.2425 days ncap2cmd="'defdim(\"tbnds\",2) ; ${var_unlim}[${var_unlim}]={15.5, 45.12125, 74.7425, 105.2425, 135.7425, 166.2425, 196.7425, 227.7425, 258.2425, 288.7425, 319.2425, 349.7425} ; ${var_unlim}_bnds[${var_unlim},tbnds]={0, 31, 31, 59.2425, 59.2425, 90.2425, 90.2425, 120.2425, 120.2425, 151.2425, 151.2425, 181.2425, 181.2425, 212.2425, 212.2425, 243.2425, 243.2425, 273.2425, 273.2425, 304.2425, 304.2425, 334.2425, 334.2425, 365.2425} ; ${var_unlim}@units=\"days since 0000-01-01 00:00:00\" ; ${var_unlim}@time_origin=\"01-JAN-0000 00:00:00\" ; ${var_unlim}@calendar=\"gregorian\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" ;; esac eval IGCM_sys_ncap2 -Oh -s $ncap2cmd ${RESULT_SE} tmp.nc IGCM_sys_Rm ${RESULT_SE} IGCM_sys_Mv tmp.nc ${RESULT_SE} # eval IGCM_sys_Put_Out ${RESULT_SE} \${R_OUT_${comp}}/Analyse/SE/${RESULT_SE} IGCM_sys_Rm ${RESULT_SE} # done done # DODS copy for comp in ${config_ListOfComponents[*]} ; do IGCM_sys_TestDirArchive ${R_SAVE}/${comp}/Analyse/SE [ $? = 0 ] && IGCM_sys_Put_Dods ${comp}/Analyse/SE done YEARS=${an_deb}_${an_fin} DIR_OUT=SE export POST_DIR; export SUBMIT_DIR; export libIGCM; export R_INIT; export R_BC; export StandAlone export RESOL_ATM; export RESOL_OCE ; export RESOL_ICE ; export RESOL_MBG ; export RESOL_SRF ; export RESOL_SBG export R_SAVE; export config_UserChoices_JobName; export config_UserChoices_TagName; export YEARS; export DIR_OUT listVarEnv="POST_DIR,SUBMIT_DIR,libIGCM,R_INIT,R_BC,StandAlone,RESOL_ATM,RESOL_OCE,RESOL_ICE,RESOL_MBG,RESOL_SRF,RESOL_SBG,R_SAVE,config_UserChoices_JobName,config_UserChoices_TagName,YEARS,DIR_OUT" export listVarEnv; #D- # -------------------------------------------------------------------- #D- Test if all was right before ATLAS # -------------------------------------------------------------------- IGCM_debug_Verif_Exit_Post if [ ${config_UserChoices_TagName} = "IPSLCM4_v1_OASIS3" ] || \ [ ${config_UserChoices_TagName} = "IPSLCM4_v2" ] || \ [ ${config_UserChoices_TagName} = "IPSL_ESM_V1" ] ; then # Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCHIDEE ; Script_Post_Output=atlas_LDMZ.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_LMDZ ; Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCA_LIM ; Script_Post_Output=additionnal.${PeriodDateEnd} ; IGCM_sys_QsubPost additionnal ; # elif [ ${config_UserChoices_TagName} = "IPSLCM5" ] || \ [ ${config_UserChoices_TagName} = "IPSLCM5A" ] || \ [ ${config_UserChoices_TagName} = "IPSLCM5B" ] || \ [ ${config_UserChoices_TagName} = "IPSLCM5A-MR" ] ; then Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCHIDEE ; Script_Post_Output=atlas_LDMZ.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_LMDZ ; Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCA_LIM ; Script_Post_Output=atlas_PISCES.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_PISCES ; # elif [ ${config_UserChoices_TagName} = "LMDZ4OR" ] || \ [ ${config_UserChoices_TagName} = "LMDZOR" ] || \ [ ${config_UserChoices_TagName} = "LMDZ4OR_v2" ] ; then # Script_Post_Output=atlas_LDMZ.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_LMDZ ; Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCHIDEE ; # elif [ ${config_UserChoices_TagName} = "LMDZ" ] ; then # Script_Post_Output=atlas_LDMZ.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_LMDZ ; # elif [ ${config_UserChoices_TagName} = "OL" ] || \ [ ${config_UserChoices_TagName} = "OL2" ] ; then # Script_Post_Output=atlas_ORCHIDEE.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCHIDEE ; # elif [ ${config_UserChoices_TagName} = "ORCA2_LIM" ] || [ ${config_UserChoices_TagName} = "ORCA2_LIM2" ] ; then # Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCA_LIM ; elif [ ${config_UserChoices_TagName} = "ORCA2_LIM2_PISCES" ] ; then # Script_Post_Output=atlas_ORCA_LIM.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_ORCA_LIM ; Script_Post_Output=atlas_PISCES.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_PISCES ; elif [ ${config_UserChoices_TagName} = "ORCA2_OFF_PISCES" ] ; then # Script_Post_Output=atlas_PISCES.${PeriodDateEnd} ; IGCM_sys_QsubPost atlas_PISCES ; # fi # Clean RUN_DIR_PATH (necessary for cesium) IGCM_sys_RmRunDir -Rf ${RUN_DIR_PATH}