Changeset 477 for trunk/UTIL


Ignore:
Timestamp:
Dec 16, 2011, 10:10:27 AM (13 years ago)
Author:
acolaitis
Message:

PYTHON. Now works with outputs from testphys1d.e.

Location:
trunk/UTIL/PYTHON
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/myplot.py

    r475 r477  
    10111011   what_I_plot = array(what_I_plot)
    10121012   shape = what_I_plot.shape
    1013    if indextime is None:
     1013   if indextime is None and len(time) > 1:
    10141014      print "AXIS is time"
    10151015      x = time
    10161016      count = count+1
    1017    if indexlon is None:
     1017   if indexlon is None and len(lon) > 1:
    10181018      print "AXIS is lon"
    10191019      if count == 0: x = lon
    10201020      else: y = lon
    10211021      count = count+1
    1022    if indexlat is None:
     1022   if indexlat is None and len(lon) > 1:
    10231023      print "AXIS is lat"
    10241024      if count == 0: x = lat
    10251025      else: y = lat
    10261026      count = count+1
    1027    if indexvert is None and dim0 is 4:
     1027   if indexvert is None and ((dim0 is 4) or (y is None)):
    10281028      print "AXIS is vert"
    10291029      if vertmode == 0: # vertical axis is as is (GCM grid)
  • trunk/UTIL/PYTHON/planetoplot.py

    r475 r477  
    9696    if slon is not None: vlon = slon[0][0]
    9797    if slat is not None: vlat = slat[0][0]
    98     if mapmode == 0:       winds=False
    99     elif mapmode == 1:     
    100         if svert is None:  svert = readslices(str(level)) ; nvert=1
    101         if stime is None and mrate is None:
    102            stime = readslices(str(0)) ; ntime=1 ## this is a default choice
    103            print "WELL... nothing about time axis. I took default: first time reference stored in file."
    10498    if mrate is not None and len(var) > 1: errormess("multivar not allowed in movies. should be fixed soon!")
    10599    zelen = len(namefiles)*len(var)
     
    128122      typefile = whatkindfile(nc)                                 
    129123      if typefile in ['mesoideal']:   mapmode=0;winds=False
     124      elif typefile in ['gcm'] and len(nc.variables["longitude"][:]) is 1 and len(nc.variables["latitude"][:]) is 1:       mapmode=0;winds=False
     125      if mapmode == 0:       winds=False
     126      elif mapmode == 1:
     127          if svert is None:  svert = readslices(str(level)) ; nvert=1
     128          if stime is None and mrate is None:
     129             stime = readslices(str(0)) ; ntime=1 ## this is a default choice
     130             print "WELL... nothing about time axis. I took default: first time reference stored in file."
     131
    130132      if firstfile: print "********** MAPMODE: ", mapmode
    131133      if firstfile:                 typefile0 = typefile
Note: See TracChangeset for help on using the changeset viewer.