Changeset 1424 for TI02-CSML


Ignore:
Timestamp:
21/08/06 09:22:20 (13 years ago)
Author:
domlowe
Message:

added identification of longitude/latitude axes where variable names make it possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/parser/API/ops_GridSeriesFeature.py

    r1423 r1424  
    190190    nc.addAxis('t',floatTimes,isTime=1,units=calunits,calendar=caltype) 
    191191    for ordinate in ordinates: 
     192        lon,lat=None,None 
     193        if ordinate.definesAxis=='longitude': 
     194            lon=1 
     195        if ordinate.definesAxis=='latitude': 
     196            lat=1 
    192197        #convert to list 
    193198        vals=[] 
    194199        for val in ordinate.axisValues.split(','): 
    195200            vals.append(float(val)) 
    196         nc.addAxis(ordinate.definesAxis,vals) 
    197     #nc.addVariable(data,'lala', axes,history='blah blah', units='flakesperminute',long_name='snowfall_at_surface') 
     201        nc.addAxis(ordinate.definesAxis,vals,isLon=lon,isLat=lat) 
    198202    if len(ordinates)==3: 
    199203        axes=['t',axisorder[1],axisorder[2],axisorder[3]] 
Note: See TracChangeset for help on using the changeset viewer.