Changeset 2847 in lmdz_wrf for trunk/tools/nc_var_tools.py


Ignore:
Timestamp:
Jul 12, 2020, 8:05:23 PM (4 years ago)
Author:
lfita
Message:

Adding 360. longitude issue... on `lonlat_polygon'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r2846 r2847  
    2313423134    onc.close()
    2313523135
     23136    nlon = np.min(lon)
     23137    xlon = np.max(lon)
     23138    # Fixing 360 issue
     23139    if xlon > 180.:
     23140        print (infmsg)
     23141        print ('  ' + fname + ": transforming longitudes to -180,180 !!")
     23142        lon = np.where(lon > 180., lon-360., lon)
     23143        nlon = np.min(lon)
     23144        xlon = np.max(lon)
     23145
    2313623146    # getting vertices
    2313723147    overtf = open(asciipolygfile, 'r')
Note: See TracChangeset for help on using the changeset viewer.