Ignore:
Timestamp:
01/28/15 23:25:24 (10 years ago)
Author:
dlcheng
Message:

Updated export script formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/writejsfile.py

    r19044 r19045  
     1import numpy
    12from writejsfield import writejsfield
    23def writejsfile(filename,model,keyname):
     
    4748                fid.write('result["shortlabel"]="{0}";\n'.format(results[i].shortlabel))
    4849                fid.write('result["unit"]="{0}";\n'.format(results[i].unit))
    49                 if len(results[i].data[2])>1:
     50                if type(results[i].data)==numpy.float64:
    5051                        fid.write('result["time_range"]=[{0},{1}];\n'.format(results[i].time_range[0],results[i].time_range[1]))
    5152                fid.write('results["{0}"]=result;\n'.format(i))
Note: See TracChangeset for help on using the changeset viewer.