Changeset 5885


Ignore:
Timestamp:
26/10/09 16:20:20 (10 years ago)
Author:
domlowe
Message:

replacing NaNs? with mask

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/service/imps/data_reader_geoplot_backend/data_readers/csml_data_reader.py

    r5848 r5885  
    99from cows.service.imps.csmlbackend.csmlcommon import CSMLConnector 
    1010from cows.service.imps.csmlbackend.wms_csmllayer import CSMLwmsDimension 
    11  
     11from numpy import nan_to_num 
    1212import logging 
    1313 
     
    145145             
    146146            variable =  netcdf(feature.id, squeeze=1) 
    147              
    148147            self.varcache[cacheKey] = variable 
    149148        else: 
    150149            variable = self.varcache[cacheKey] 
    151          
     150 
     151        #replace any NaN's with a number 
     152        a=nan_to_num(variable) 
     153        variable[:]=a 
    152154        return variable 
    153155     
Note: See TracChangeset for help on using the changeset viewer.