pro mtraj_fixvals,latin,lonin ;+ ; NAME: ; mtraj_fixvals ; PURPOSE: ; This procedure runs with the trajectory model ; and fixes up errant points too close to the pole or ; to close to the equator ; CATEGORY: ; trajectory ; CALLING SEQUENCE: ; traj_fixvals,latin,lonin,qm,minlat=minlat ; INPUTS: ; inputs: latin, lonin, vector of latitudes, longitudes ; OPTIONAL INPUT PARAMETERS: ; KEYWORD PARAMETERS: ; minlat = minimum latitude ; OUTPUTS: ; latin, lonin ; OPTIONAL OUTPUT PARAMETERS: ; COMMON BLOCKS: ; SIDE EFFECTS: ; RESTRICTIONS: ; PROCEDURE: ; Fix up latitudes and longitudes so that they are not out of range. ; Input valuies are modified ; REQUIRED ROUTINES: ; MODIFICATION HISTORY: ; mr schoeberl, cleaned up 2/26/92 ; $Header: /science/trajectory/programs/traj_fixvals.pro,v 1.6 1994/01/25 17:08:21 schom Exp $ ;- ; check for a pole point ; parcel has crossed pole n = where(latin gt 90.) if n(0) ge 0 then begin latin(n)=(180.-latin(n)) ;hemis lonin(n)=lonin(n)+180. endif n = where(latin lt -90.) if n(0) ge 0 then begin latin(n)=-(180.+latin(n)) ;hemis lonin(n)=lonin(n)+180. endif ; longitude fix lonin = lonin mod 360 n=where(lonin lt 0.) if n(0) ge 0 then lonin(n)=lonin(n)+360. return end