def get_lonlat(self):
rlon, rlat = self.resolution<EOL>Nlon = int(<NUM_LIT> / rlon)<EOL>Nlat = int(<NUM_LIT> / rlat) + self.halfpolar<EOL>elon = np.arange(Nlon + <NUM_LIT:1>) * rlon - np.array(<NUM_LIT>)<EOL>elon -= rlon / <NUM_LIT> * self.center180<EOL>elat = np.arange(Nlat + <NUM_LIT:1>) * rlat - np.array(<NUM_LIT>)<EOL>elat -= rlat / <NUM_LIT> * self.halfpolar<EOL>elat[<NUM_LIT:0>] = -<NUM_LIT><EOL>elat[-<NUM_LIT:1>] = <NUM_LIT><EOL>clon = (elon - (rlon / <NUM_LIT>))[<NUM_LIT:1>:]<EOL>clat = np.arange(Nlat) * rlat - np.array(<NUM_LIT>)<EOL>if self.halfpolar:<EOL><INDENT>clat[<NUM_LIT:0>] = (elat[<NUM_LIT:0>] + elat[<NUM_LIT:1>]) / <NUM_LIT><EOL>clat[-<NUM_LIT:1>] = -clat[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>clat += (elat[<NUM_LIT:1>] - elat[<NUM_LIT:0>]) / <NUM_LIT><EOL><DEDENT>return {<EOL>"<STR_LIT>": clon, "<STR_LIT>": clat,<EOL>"<STR_LIT>": elon, "<STR_LIT>": elat<EOL>}<EOL>
Calculate longitude-latitude grid for a specified resolution and
configuration / ordering.

Parameters
----------
rlon, rlat : float
    Resolution (in degrees) of longitude and latitude grids.
halfpolar : bool (default=True)
    Polar grid boxes span half of rlat relative to the other grid cells.
center180 : bool (default=True)
    Longitude grid should be centered at 180 degrees.