;+ ; NAME: ; locgrid_onespot ; PURPOSE: (one line) ; Return location arrays for a rectangular projection map ; DESCRIPTION: ; Return location arrays for a rectangular projection map ; CATEGORY: ; Volatile Transport ; CALLING SEQUENCE: ; locgrid_onespot, lat_deg, lon_deg, lat_delta_deg, lon_delta_deg, n_loc, lat, lon, angarea_delta ; INPUTS: ; lon_deg - center longitude (degress) ; lat_deg - center latitude (degress) ; lon_delta_deg - full width in longitude (degrees) ; lat_delta_deg - full width in latitude (degrees) ; OUTPUTS: ; n_loc - number of locations (always one). ; lat - latitude center of each location (radians) ; lon - longitude center of each location (radians) ; angarea_delta - angular area of each location (ster) ; ; n_vert - number of vertices ; lon_vert - lonitude of vertices ; lat_vert - latitude of vertices ; vert[6,n_loc] - indices of vertices ; PROCEDURE ; The exact area of a latitude band is the area from ; north pole to the bottom of the band minus the area ; from the north pole to the top of the band. This ; is multiplied by the fraction of longitude coverage. ; MODIFICATION HISTORY: ; Written 2011 Aug 3, by Leslie Young, SwRI ; 2015 Apr 11, move to grahics IDL library ;- pro locgrid_onespot, lon_deg, lat_deg, lon_delta_deg, lat_delta_deg, n_loc, lon, lat, angarea_delta, $ n_vert, lon_vert, lat_vert, vert deg = !dpi/180.d n_loc = 1 lat = reform(lat_deg * deg, 1) lon = reform(lon_deg * deg, 1) lat_delta = lat_delta_deg * deg lon_delta = lon_delta_deg * deg angarea_delta = reform( lon_delta* ( sin(lat + lat_delta/2) - sin(lat - lat_delta/2)), 1) n_vert = 4 lon_vert = lon[0] + [-1,1,1,-1] * lon_delta / 2. lat_vert = lat[0] + [-1,-1,1,1] * lat_delta / 2. vert = replicate(-1,6,n_vert) vert[0:3,0] = [0,1,2,3] end