Ignore:
Timestamp:
14/06/07 12:13:02 (14 years ago)
Author:
domlowe
Message:

fixing bug with single time selection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/testfiles/gridseries/subset.py

    r2569 r2585  
    4343#define a selection (based on the domain) 
    4444subsetDictionary={} 
    45 subsetDictionary['time']=('2794-12-1T0:0:0.0', '2804-12-1T0:0:0.0') 
     45#subsetDictionary['time']=('2794-12-1T0:0:0.0', '2804-12-1T0:0:0.0') 
     46subsetDictionary['time']='2704-12-01T00:00:00.0' 
    4647#subsetDictionary['latitude']=(-90,60) 
    4748#subsetDictionary['longitude']=(-31.1265,30.258) 
     
    5051#request subsetted data from features (can set paths here) and add to container 
    5152#subset a feature 
    52 csmlContainer.add(feature.subsetToGridSeries(outputdir,ncname='mygridseries.nc',**subsetDictionary)) 
    5353 
    54 #subset another feature (in fact it's the same feature again, but this time subsetting to a profileseries) 
    55 subsetDictionary={} 
    56 subsetDictionary['time']=('2794-12-1T0:0:0.0','2904-12-1T0:0:0.0') 
    57 subsetDictionary['latitude']=(75) 
    58 subsetDictionary['longitude']=(45) 
     54f.subsetToGridSeries(ncname='tmp1.nc', outputdir='.', latitude=(-90, 
     55> 
     56> 90), longitude=(-180,180), time='1975-07-15T00:00:00.0') 
    5957 
    60 ##assigning profileseries feature to variable 
    61 #print 'subset grid to profileseries' 
    62 psfeature, file, descriptor =feature.subsetToProfileSeries(outputdir, ncname='myprofileseries.nc',**subsetDictionary) 
    63 csmlContainer.add([psfeature,file, descriptor]) 
     58    #csmlContainer.add(feature.subsetToGridSeries(outputdir,ncname='mygridseries.nc',**subsetDictionary)) 
     59csmlContainer.add(feature.subsetToGridSeries(outputdir,ncname='mygridseries.nc',latitude=(-90,90), longitude=(-180,180),time='2704-12-01T00:00:00.0')) 
     60 
     61##subset another feature (in fact it's the same feature again, but this time subsetting to a profileseries) 
     62#subsetDictionary={} 
     63#subsetDictionary['time']=('2794-12-1T0:0:0.0','2904-12-1T0:0:0.0') 
     64#subsetDictionary['latitude']=(75) 
     65#subsetDictionary['longitude']=(45) 
     66 
     67###assigning profileseries feature to variable 
     68##print 'subset grid to profileseries' 
     69#psfeature, file, descriptor =feature.subsetToProfileSeries(outputdir, ncname='myprofileseries.nc',**subsetDictionary) 
     70#csmlContainer.add([psfeature,file, descriptor]) 
    6471 
    6572#Now subset this New ProfileSeries feature into a Profile feature 
Note: See TracChangeset for help on using the changeset viewer.