Changeset 1091 for trunk/UTIL


Ignore:
Timestamp:
Nov 7, 2013, 10:18:48 AM (11 years ago)
Author:
aslmd
Message:

PLANETOPLOT. better handling of map projections.

File:
1 edited

Legend:

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

    r1084 r1091  
    757757            #mertab = np.r_[wlon[0]:wlon[1]:steplon] ; merlab = [0,0,0,1]
    758758            #partab = np.r_[wlat[0]:wlat[1]:steplat] ; parlab = [1,0,0,0]
    759             mertab = np.r_[-180.:180.:steplon] ; merlab = [0,0,0,1] #-360:360.
     759            if np.abs(wlon[0]) < 180.1 and np.abs(wlon[1]) < 180.1:
     760                mertab = np.r_[-180.:180.:steplon]
     761            else:
     762                mertab = np.r_[0.:360.:steplon]
     763            merlab = [0,0,0,1]
    760764            partab = np.r_[-90.:90.:steplat] ; parlab = [1,0,0,0]
    761765            format = '%.1f'
     
    770774            elif self.proj in ["ortho","moll","robin"]:
    771775                wlat[0] = None ; wlat[1] = None ; wlon[0] = None ; wlon[1] = None
     776                lon_0 = np.ceil(lon_0) # reverse map if lon_0 is slightly below 180 with [0,360]
    772777                steplon = 30. ; steplat = 30.
    773778                if self.proj in ["moll"]: steplon = 60.
Note: See TracChangeset for help on using the changeset viewer.