Ignore:
Timestamp:
Oct 14, 2010 11:15:06 AM (14 years ago)
Author:
heinze
Message:

Bugfix: enable plot of data if it is of kind double instead of kind float

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/NCL/timeseries.ncl

    r566 r585  
    170170   ListSetType(f,"cat")
    171171
    172    vNam=getfilevarnames(f_att)
    173    vNam_static=vNam
     172   vNam  =getfilevarnames(f_att)
     173   vType = getfilevartypes(f_att,vNam)
     174   vNam_static = vNam
     175
     176   if ((all(vType .eq. "double"))) then ;distinction if data is double or float
     177      check_vType = True
     178   else
     179      check_vType = False
     180   end if
    174181
    175182   print(" ")
     
    356363                                 
    357364   n=0
    358    minE=1.E27
    359    maxE=-1.E27
    360    minus=1.E27
    361    maxus=-1.E27
    362    minu=1.E27
    363    maxu=-1.E27
    364    minz=1.E27
    365    maxz=-1.E27
    366    minw=1.E27
    367    maxw=-1.E27
    368    minp=1.E27
    369    maxp=-1.E27
    370    mins=1.E27
    371    maxs=-1.E27
    372 
    373    data   = new((/dim,(end_time_step-start_time_step)+1/),float)
    374    unit   = new(dim,string)
    375    data_0 = new((end_time_step-start_time_step)+1,float)
     365   if (check_vType) then
     366      minE  =  100000.d
     367      maxE  = -100000.d
     368      minus =  100000.d
     369      maxus = -100000.d
     370      minu  =  100000.d
     371      maxu  = -100000.d
     372      minz  =  100000.d
     373      maxz  = -100000.d
     374      minw  =  100000.d
     375      maxw  = -100000.d
     376      minp  =  100000.d
     377      maxp  = -100000.d
     378      mins  =  100000.d
     379      maxs  = -100000.d
     380   else
     381      minE  =  100000.
     382      maxE  = -100000.
     383      minus =  100000.
     384      maxus = -100000.
     385      minu  =  100000.
     386      maxu  = -100000.
     387      minz  =  100000.
     388      maxz  = -100000.
     389      minw  =  100000.
     390      maxw  = -100000.
     391      minp  =  100000.
     392      maxp  = -100000.
     393      mins  =  100000.
     394      maxs  = -100000.
     395   end if
     396
     397   if (check_vType) then
     398      data   = new((/dim,(end_time_step-start_time_step)+1/),double)
     399      data_0 = new((end_time_step-start_time_step)+1,double)
     400      mini   = new(dim,double)
     401      maxi   = new(dim,double)
     402   else
     403      data   = new((/dim,(end_time_step-start_time_step)+1/),float)
     404      data_0 = new((end_time_step-start_time_step)+1,float)
     405      mini   = new(dim,float)
     406      maxi   = new(dim,float)
     407   end if
     408   unit   = new(dim,string)   
    376409   data_0 = 0.0
    377    mini   = new(dim,float)
    378    maxi   = new(dim,float)
     410 
    379411   
    380412   if (over .EQ. 1) then
Note: See TracChangeset for help on using the changeset viewer.