Changeset 379 for trunk


Ignore:
Timestamp:
11/04/10 15:15:51 (14 years ago)
Author:
brocksce
Message:

Correction on calendar can now be applied for any var_unlim

Location:
trunk/libIGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_create_multi_se

    r378 r379  
    407407         
    408408        # Put correct climatological axis following calendar  
    409         if [[ ${var_unlim} = time_counter ]] ; then 
    410                 case ${config_UserChoices_CalendarType} in 
    411                         360d) 
    412                                 # 360 days 
    413                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15, 45, 75, 105, 135, 165, 195, 225, 255, 285, 315, 345.} ; time_counter_bnds[time_counter,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.} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="360_day" ; time_counter@bounds="time_counter_bnds"' ${RESULT_MULTI_SE} tmp.nc 
    414                                 ;; 
    415                         noleap) 
    416                                 # 365 days 
    417                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 349.5} ; time_counter_bnds[time_counter,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.} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="noleap" ; time_counter@bounds="time_counter_bnds"' ${RESULT_MULTI_SE} tmp.nc 
    418                                 ;; 
    419                         all_leap) 
    420                                 # 366 days 
    421                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15.5, 45.5, 75.5, 106, 136.5, 167, 197.5, 228.5, 259, 289.5, 320, 350.5} ; time_counter_bnds[time_counter,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.} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="all_leap" ; time_counter@bounds="time_counter_bnds"' ${RESULT_MULTI_SE} tmp.nc 
    422                                 ;; 
    423                         leap|gregorian) 
    424                                 # 365.2425 days 
    425                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15.5, 45.12125, 74.7425, 105.2425, 135.7425, 166.2425, 196.7425, 227.7425, 258.2425, 288.7425, 319.2425, 349.7425} ; time_counter_bnds[time_counter,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} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="gregorian" ; time_counter@bounds="time_counter_bnds"' ${RESULT_MULTI_SE} tmp.nc 
    426                                 ;; 
    427                 esac 
    428                 IGCM_sys_Rm ${RESULT_MULTI_SE} 
    429                 IGCM_sys_Mv tmp.nc ${RESULT_MULTI_SE} 
    430         fi 
     409        case ${config_UserChoices_CalendarType} in 
     410                360d) 
     411                        # 360 days 
     412                        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\"'" 
     413                        ;; 
     414                noleap) 
     415                        # 365 days 
     416                        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=\"noleap\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" 
     417                        ;; 
     418                all_leap) 
     419                        # 366 days 
     420                        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=\"all_leap\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" 
     421                        ;; 
     422                leap|gregorian) 
     423                        # 365.2425 days 
     424                        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\"'" 
     425                        ;; 
     426        esac 
     427        eval IGCM_sys_ncap2 -Oh -s $ncap2cmd ${RESULT_MULTI_SE} tmp.nc 
     428        IGCM_sys_Rm ${RESULT_MULTI_SE} 
     429        IGCM_sys_Mv tmp.nc ${RESULT_MULTI_SE} 
    431430        # 
    432431        eval IGCM_sys_Put_Out ${RESULT_MULTI_SE} \${R_OUT_${comp}}/Analyse/${DIR_OUT}/${RESULT_MULTI_SE} 
  • trunk/libIGCM/AA_create_se

    r378 r379  
    563563 
    564564        # Put correct climatological axis following calendar  
    565         if [[ ${var_unlim} = time_counter ]] ; then 
    566                 case ${config_UserChoices_CalendarType} in 
    567                         360d) 
    568                                 # 360 days 
    569                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15, 45, 75, 105, 135, 165, 195, 225, 255, 285, 315, 345.} ; time_counter_bnds[time_counter,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.} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="360_day" ; time_counter@bounds="time_counter_bnds"' ${RESULT_SE} tmp.nc 
    570                                 ;; 
    571                         noleap) 
    572                                 # 365 days 
    573                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15.5, 45, 74.5, 105, 135.5, 166, 196.5, 227.5, 258, 288.5, 319, 349.5} ; time_counter_bnds[time_counter,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.} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="noleap" ; time_counter@bounds="time_counter_bnds"' ${RESULT_SE} tmp.nc 
    574                                 ;; 
    575                         all_leap) 
    576                                 # 366 days 
    577                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15.5, 45.5, 75.5, 106, 136.5, 167, 197.5, 228.5, 259, 289.5, 320, 350.5} ; time_counter_bnds[time_counter,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.} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="all_leap" ; time_counter@bounds="time_counter_bnds"' ${RESULT_SE} tmp.nc 
    578                                 ;; 
    579                         leap|gregorian) 
    580                                 # 365.2425 days 
    581                                 IGCM_sys_ncap2 -Oh -s 'defdim("tbnds",2) ; time_counter[time_counter]={15.5, 45.12125, 74.7425, 105.2425, 135.7425, 166.2425, 196.7425, 227.7425, 258.2425, 288.7425, 319.2425, 349.7425} ; time_counter_bnds[time_counter,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} ; time_counter@units="days since 0000-01-01 00:00:00" ; time_counter@time_origin="01-JAN 0000 00:00:00" ; time_counter@calendar="gregorian" ; time_counter@bounds="time_counter_bnds"' ${RESULT_SE} tmp.nc 
    582                                 ;; 
    583                 esac 
    584                 IGCM_sys_Rm ${RESULT_SE} 
    585                 IGCM_sys_Mv tmp.nc ${RESULT_SE} 
    586         fi 
     565        case ${config_UserChoices_CalendarType} in 
     566                360d) 
     567                        # 360 days 
     568                        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\"'" 
     569                        ;; 
     570                noleap) 
     571                        # 365 days 
     572                        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=\"noleap\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" 
     573                        ;; 
     574                all_leap) 
     575                        # 366 days 
     576                        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=\"all_leap\" ; ${var_unlim}@bounds=\"${var_unlim}_bnds\"'" 
     577                        ;; 
     578                leap|gregorian) 
     579                        # 365.2425 days 
     580                        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\"'" 
     581                        ;; 
     582        esac 
     583        eval IGCM_sys_ncap2 -Oh -s $ncap2cmd ${RESULT_MULTI_SE} tmp.nc 
     584        IGCM_sys_Rm ${RESULT_SE} 
     585        IGCM_sys_Mv tmp.nc ${RESULT_SE} 
    587586        # 
    588587        eval IGCM_sys_Put_Out ${RESULT_SE} \${R_OUT_${comp}}/Analyse/SE/${RESULT_SE} 
Note: See TracChangeset for help on using the changeset viewer.