arlmet.Grid.subset#
- Grid.subset(window)[source]#
Build a new grid definition for a rectangular subset.
- Parameters:
window (
GridWindow) – Zero-based half-open window into the parent grid.- Returns:
New grid whose cells are the window’s cells of this grid, at the same positions.
- Return type:
Notes
A projected grid keeps this grid’s sync point (
sync_lat,sync_lon) and moves only its grid coordinates,sync_xandsync_y, by the window’s start, so they may lie outside the subset (sync_y = -326for a crop that starts at row 328). A new corner sync point would be the corner cell’s latitude and longitude, which the index record stores as 7 characters (0.01 degree for a longitude past 100 degrees): the whole subset would move by up to 0.15 cells of a 3 km grid. HYSPLIT’s map routines take a sync point anywhere.A lat-lon grid’s sync point is always its first cell (HYSPLIT ignores
sync_xandsync_ythere), so the subset’s is the window’s corner cell, a whole number of cells from this grid’s. It is stored exactly when the spacing is a multiple of 0.01 degree. The subset is written as HYSPLIT’sxtrct_gridwrites a crop:sync_lonin 0-360 east andpole_lat/pole_lonits last cell, sopole_loncan pass 360. HYSPLIT’sgbl2xymeasures a longitude from a negativesync_lononly whenpole_lonis not negative (gblset’sPRIME); a 0-360sync_lonneeds no such case. The window covering the whole grid returns this grid unchanged.