Changeset 287


Ignore:
Timestamp:
06/04/10 09:11:49 (14 years ago)
Author:
mmaipsl
Message:

PB, MM: Add TS_MO_YE means production of yearly mean from TS MOnthly files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_create_ts

    r279 r287  
    7272#-Q- titane ##MSUB -e nco.out        # Sortie standard 
    7373#-Q- titane ##MSUB -o nco.out        # Sortie standard 
     74#-Q- lxiv8 ###################### 
     75#-Q- lxiv8 ## OBELIX      LSCE ## 
     76#-Q- lxiv8 ###################### 
     77#-Q- lxiv8 #PBS -N TS 
     78#-Q- lxiv8 #PBS -m a 
     79#-Q- lxiv8 #PBS -j oe 
     80#-Q- lxiv8 #PBS -q medium 
     81#-Q- lxiv8 #PBS -o TS.$$ 
     82#-Q- lxiv8 #PBS -S /bin/ksh 
    7483#-Q- default #!/bin/ksh 
    7584#-Q- default ################## 
     
    108117#D- Default : Value from AA_job if any. Usefull in StandAlone case if you want to continue a time series 
    109118CompletedFlag=${CompletedFlag:=} 
     119CompletedFlag=$( IGCM_date_ConvertFormatToGregorian ${CompletedFlag} ) 
    110120 
    111121#D- Flag to determine task type this script will perform. 
     
    421431            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    422432            IGCM_date_GetYearMonth ${1} year month 
     433            year=$( IGCM_date_SupressZeros ${year} ) 
    423434            (( Length=0 )) 
    424435            (( i=0 )) 
     
    431442            PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 
    432443            IGCM_date_GetYearMonth ${1} year month 
     444            year=$( IGCM_date_SupressZeros ${year} ) 
    433445            (( year0 = year )) 
    434446            if [ $(( month + 1 )) -lt 13 ] ; then 
     
    469481            PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' ) 
    470482            IGCM_date_GetYearMonth ${1} year month 
     483            year=$( IGCM_date_SupressZeros ${year} ) 
    471484            if [ X${2} = Xend ] ; then 
    472485                (( year = year - PeriodLengthInYears + 1)) 
     
    482495            PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' ) 
    483496            IGCM_date_GetYearMonth ${1} year month 
     497            year=$( IGCM_date_SupressZeros ${year} ) 
    484498            if [ X${2} = Xend ] ; then 
    485499                (( month = month - PeriodLengthInMonths + 1 )) 
     
    821835                    IGCM_sys_Rm ${file1} ${file2} 
    822836                fi 
     837 
    823838                # 
    824839                if [ "${DEPOT}" = "TRUE" ] ; then 
     
    827842                    #${ncatted} -a modulo,time_counter,c,c," " ${file_out} 
    828843                    file_before=${config_UserChoices_JobName}_${DateBegin}_${DATE_FIN_JOB_B}_${FlagDir}_${var}.nc 
     844                    # 
    829845                    eval IGCM_sys_Put_Out ${file_out} \${R_OUT_${comp}}/Analyse/${TS_Dir}/${file_out} 
    830846                    [ "${FLAG_B}" = "TRUE" ] && eval MENAGE \${R_OUT_${comp}}/Analyse/${TS_Dir} ${file_before} ${file_out} 
     847                    # 
     848                    if [ ${FlagDir} = "1M" ] ; then 
     849                        # Compute yearly average considering calendar 
     850                        file_before_YE=${config_UserChoices_JobName}_${DateBegin}_${DATE_FIN_JOB_B}_1Y_${var}.nc 
     851                        file_out_YE=${config_UserChoices_JobName}_${DATE_BUILD_END}_1Y_${var}.nc 
     852                        # 
     853                        # Note that the date information in the outputfile is the date of the last contributing time step in the input file 
     854                        IGCM_sys_cdo -settunits,days -divdpy -yearsum -muldpm ${file_out} ${file_out_YE} 
     855                        # 
     856                        eval IGCM_sys_Put_Out ${file_out_YE} \${R_OUT_${comp}}/Analyse/TS_MO_YE/${file_out_YE} 
     857                        [ "${FLAG_B}" = "TRUE" ] && eval MENAGE \${R_OUT_${comp}}/Analyse/TS_MO_YE/ ${file_before_YE} ${file_out_YE} 
     858                    fi 
     859                    # 
    831860                    IGCM_sys_Rm ${file_out} 
    832861                    # 
     
    848877# DODS copy 
    849878for comp in ${config_ListOfComponents[*]} ; do 
    850     for TS_Dir in TS_YE TS_MO TS_DA TS_HF TS_INS ; do 
     879    for TS_Dir in TS_YE TS_MO TS_MO_YE TS_DA TS_HF TS_INS ; do 
    851880        IGCM_sys_TestDirArchive ${R_SAVE}/${comp}/Analyse/${TS_Dir} 
    852881        [ $? = 0 ] && IGCM_sys_Put_Dods ${comp}/Analyse/${TS_Dir} 
Note: See TracChangeset for help on using the changeset viewer.