|
23 | 23 | plt.title('rotated pole data in polar stere map')
|
24 | 24 |
|
25 | 25 | plt.figure()
|
| 26 | +# o_lon_p, o_lat_p: true lat/lon of pole in rotated coordinate system |
| 27 | +# mapping to CF metadata convention: |
| 28 | +# grid_north_pole_longitude = normalize180(180 + lon_0), where normalize180 |
| 29 | +# is a function that maps to interval [-180,180], i.e. |
| 30 | +# def normalize180(angle): |
| 31 | +# if angle > 180: angle = angle+360 |
| 32 | +# if angle < -180: angle = angle+360 |
| 33 | +# return angle |
| 34 | +# grid_north_pole_latitude = o_lat_p |
| 35 | +# north_pole_grid_longitude = o_lon_p (optional, assumed zero if not present) |
26 | 36 | m = Basemap(projection='rotpole',lon_0=rotpole.grid_north_pole_longitude-180.,\
|
27 | 37 | o_lon_p=rotpole.north_pole_grid_longitude,\
|
28 | 38 | o_lat_p=rotpole.grid_north_pole_latitude,\
|
|
42 | 52 | o_lat_p=rotpole.grid_north_pole_latitude,\
|
43 | 53 | llcrnry = rlats[0,0], urcrnry = rlats[-1,-1],\
|
44 | 54 | llcrnrx = rlons[0,0], urcrnrx = rlons[-1,-1],resolution='c')
|
| 55 | +print m.llcrnrx,m.llcrnry |
| 56 | +print m.urcrnrx,m.urcrnry |
45 | 57 | x,y = m(lons,lats)
|
46 | 58 | m.drawcoastlines()
|
47 | 59 | m.contourf(x,y,data,20)
|
|
0 commit comments