Ignore:
Timestamp:
02/04/07 14:22:16 (13 years ago)
Author:
domlowe
Message:

more on calendars etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/API/genSubset.py

    r2356 r2361  
    8484    calset=False 
    8585    for gridOrd in ords: 
    86         if gridOrd.coordAxisLabel.CONTENT==timeName: 
    87              
     86        if gridOrd.coordAxisLabel.CONTENT==timeName:       
    8887            try: 
    89                 caltype=gridOrd.coordAxisValues.timePositionList.frame.split(':',1)[0] 
    90                 calunits=gridOrd.coordAxisValues.timePositionList.frame.split(':',1)[1] 
     88                caltype=gridOrd.coordAxisValues.timePositionList.frame.split(':',2)[1] 
     89                calunits=gridOrd.coordAxisValues.timePositionList.frame.split(':',2)[2] 
    9190                csml.csmllibs.csmltime.setcdtimeCalendar(caltype) 
    9291                calset=True 
    9392            except:pass 
    9493    if calset!=True: 
    95         csml.csmllibs.csmltime.setcdtimeCalendar(csml.csmllibs.csmltime.cdtime.DefaultCalendar)     
     94        csml.csmllibs.csmltime.setcdtimeCalendar(csml.csmllibs.csmltime.cdtime.DefaultCalendar)         
    9695    try: 
    97         caltype=gridOrd.timePositionList.frame.split(':',1)[0] 
    98         calunits=gridOrd.timePositionList.frame.split(':',1)[1] 
     96        caltype=gridOrd.coordAxisValues.timePositionList.frame.split(':',2)[1] 
     97        calunits=gridOrd.coordAxisValues.timePositionList.frame.split(':',2)[2] 
    9998        csml.csmllibs.csmltime.setcdtimeCalendar(caltype) 
    10099    except: 
    101         csml.csmllibs.csmltime.setcdtimeCalendar(csml.csmllibs.csmltime.cdtime.DefaultCalendar) 
    102          
     100        csml.csmllibs.csmltime.setcdtimeCalendar(csml.csmllibs.csmltime.cdtime.DefaultCalendar)         
    103101    return calunits, caltype 
    104102 
     
    160158 
    161159def getTheData(feature, selection, times,timeName): 
    162     print selection 
    163     print times 
    164     print timeName 
    165160     
    166161    #SOME OF THIS SHOULD PROBABLY BE IN THE DATA IO LAYER 
Note: See TracChangeset for help on using the changeset viewer.