Changeset 1215 for trunk


Ignore:
Timestamp:
Apr 2, 2014, 3:15:23 PM (11 years ago)
Author:
tblmd
Message:

enforces increasing longitudes when longitudes becomes negative after being positive

File:
1 edited

Legend:

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

    r1201 r1215  
    14511451          elif len(self.field_x.shape)*len(self.field_y.shape) == 9:
    14521452               if self.verbose: print "**** OK. reducing lon and lat as 2D fields. get rid of time."
    1453                self.field_x = self.field_x[0,:,:]
     1453               # if longitudes are crossing 180 deg limit, then modify longitude vector
     1454               self.field_x = self.field_x[0,:,:]
     1455               for j in range(self.field_x[0,:].size-1):
     1456                        if (self.field_x[0,j+1]-self.field_x[0,j] < 0.):
     1457                                self.field_x[:,j+1]=self.field_x[:,j+1]+360.
    14541458               self.field_y = self.field_y[0,:,:]
    14551459          # if xy axis are apparently undefined, set 2D grid points axis.
Note: See TracChangeset for help on using the changeset viewer.