Changeset 556 in lmdz_wrf


Ignore:
Timestamp:
Jul 3, 2015, 2:59:35 PM (10 years ago)
Author:
lfita
Message:

Adding `None' values in 'writing_str_nc'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/read_ISD.py

    r555 r556  
    272272    Nvals = len(values)
    273273    for iv in range(Nvals):   
    274         stringv=values[iv] 
     274        if values[iv] is None:
     275            stringv = 'None'
     276        else:
     277            stringv = values[iv] 
    275278        charvals = np.chararray(Lchar)
    276279        Lstr = len(stringv)
     
    627630    quit(-1)
    628631else:
     632    print opts.stloc.split(',')
    629633    stationdesc = [opts.stloc.split(',')[0], np.float(opts.stloc.split(',')[1]),     \
    630634      np.float(opts.stloc.split(',')[2]), np.float(opts.stloc.split(',')[3])]
     
    774778set_attribute(objfile,'version_script',version)
    775779
    776 # Adding three variables with the station location, longitude, latitude and height
     780# Adding three variables with the station name, location, longitude, latitude and height
    777781adding_station_desc(objfile,stationdesc)
    778782
Note: See TracChangeset for help on using the changeset viewer.