Changeset 1015 for trunk/UTIL


Ignore:
Timestamp:
Jul 31, 2013, 11:36:52 AM (11 years ago)
Author:
tnavarro
Message:

small change with time axis operation mars_dayini

Location:
trunk/UTIL/PYTHON/planetoplot_v2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/planetoplot_v2/pp.py

    r991 r1015  
    5454parser.add_option('-d','--directory',action='store',dest='folder',type="string",default="./",help="directory of output files")
    5555parser.add_option('-s','--changetime',action='store',dest='changetime',type="string",default=None,\
    56                   help="transformation on time axis : [None] | mars_sol2ls | mars_meso_ls | mars_meso_sol | mars_meso_utc | mars_meso_lt ")
     56                  help="transformation on time axis : [None] | mars_sol2ls | mars_dayini | mars_meso_ls | mars_meso_sol | mars_meso_utc | mars_meso_lt ")
    5757parser.add_option('-p','--print',action='store_true',dest='savtxt',default=False,help="[1D] output field+coord in an ASCII file")
    5858parser.add_option('--stridex',action='store',dest='stridex',type="int",default=1,help="Load data every stridex grid points over x dimension")
  • trunk/UTIL/PYTHON/planetoplot_v2/ppclass.py

    r1014 r1015  
    13691369        if self.changetime is not None:
    13701370            if self.verbose: print "**** OK. Converting time axis:",self.changetime
    1371             ### option added by T. Navarro
    1372             if self.changetime == "mars_sol2ls":
    1373                 self.field_t =  self.field_t \
    1374                               + self.f.variables['controle'][3]%669 \
    1375                               + self.f.variables['controle'][26]
     1371            ### option added by T. Navarro
     1372            if self.changetime == "mars_sol2ls":
     1373                if "controle" in self.f.variables:
     1374                   self.field_t =  self.field_t \
     1375                                 + self.f.variables['controle'][3]%669 \
     1376                                 + self.f.variables['controle'][26]
    13761377                self.field_t = ppcompute.mars_sol2ls(self.field_t)
    1377             elif self.changetime == "marsdayini":
     1378            elif self.changetime == "mars_dayini" and "controle" in self.f.variables:
    13781379                self.field_t =  self.field_t \
    13791380                              + self.f.variables['controle'][3]%669 \
Note: See TracChangeset for help on using the changeset viewer.