Ignore:
Timestamp:
11/03/10 16:50:59 (14 years ago)
Author:
brocksce
Message:

IGCM_sys_ncap replaced by IGCM_sys_ncap2 because ncap2 can do more than ncap
Added correction of climatological axis in create_se
Added all different calendars
Added defdim("tbnds",2)
Added test to handle time_counter and time UNLIMITED dimension (for CPL component)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_create_se

    r376 r377  
    562562        var_unlim=$(ncdump -h ${RESULT_SE}|grep UNLIMITED| cut -d ' ' -f 1) 
    563563 
    564         # add modulo attribute on time axis 
    565         IGCM_sys_ncatted -a modulo,${var_unlim},c,c," " ${RESULT_SE} 
     564        # Put correct climatological axis following calendar  
     565        if [[ ${var_unlim} = time* ]] ; 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 
    566587        # 
    567588        eval IGCM_sys_Put_Out ${RESULT_SE} \${R_OUT_${comp}}/Analyse/SE/${RESULT_SE} 
Note: See TracChangeset for help on using the changeset viewer.