The Plate Carree projection
The Plate Carree projection (regular lon/lat grid) is named eqc in Proj.4. Pyresample uses the Proj.4 naming.
Assuming the file areas.yaml has the following area definition:
pc_world:
description: Plate Carree world map
projection:
proj: eqc
ellps: WGS84
shape:
height: 480
width: 640
area_extent:
lower_left_xy: [-20037508.34, -10018754.17]
upper_right_xy: [20037508.34, 10018754.17]
Example usage:
>>> import matplotlib.pyplot as plt
>>> from pyresample import load_area, save_quicklook
>>> from pyresample.kd_tree import resample_nearest
>>> area_def = load_area('areas.yaml', 'pc_world')
>>> result = resample_nearest(swath_def, tb37v, area_def, radius_of_influence=20000, fill_value=None)
>>> save_quicklook('tb37v_pc.png', area_def, result, num_meridians=None, num_parallels=None, label='Tb 37v (K)')
Assuming lons, lats and tb37v are initialized with real data (like above we use AMSR-2 data in this example) the result might look something like this:
The Globe projections
From v0.7.12 pyresample can use the geos, ortho and nsper projections with Basemap. Starting with v1.9.0 quicklooks are now generated with Cartopy which should also work with these projections. Again assuming the area-config file areas.yaml has the following definition for an ortho projection area:
ortho:
description: Ortho globe
projection:
proj: ortho
lon_0: 40.
lat_0: -40.
a: 6370997.0
shape:
height: 480
width: 640
area_extent:
lower_left_xy: [-10000000, -10000000]
upper_right_xy: [10000000, 10000000]
Example usage:
>>> from pyresample import load_area, save_quicklook, SwathDefinition
>>> from pyresample.kd_tree import resample_nearest
>>> from pyresample import load_area
>>> area_def = load_area('areas.yaml', 'ortho')
>>> swath_def = SwathDefinition(lons, lats)
>>> result = resample_nearest(swath_def, tb37v, area_def, radius_of_influence=20000, fill_value=None)
>>> save_quicklook('tb37v_ortho.png', area_def, result, num_meridians=None, num_parallels=None, label='Tb 37v (K)')
Assuming lons, lats and tb37v are initialized with real data, like in the above examples, the result might look something like this: