Plotting the terminator on a map [message #7371] |
Fri, 08 November 1996 00:00  |
nicholas
Messages: 22 Registered: January 1994
|
Junior Member |
|
|
Does anyone have a routine to plot the day/night terminator on a map
projection given the date and time? Don't want to reinvent the wheel if
it is out there .....
-Andy
----------------------------------
Andrew Nicholas
Naval Research Lab
Code : 7623
(202) 767-2441 voice
(202) 767-9388 fax
nicholas@uap.nrl.navy.mil
-----------------------------------
|
|
|
Re: Plotting the terminator on a map [message #7432 is a reply to message #7371] |
Tue, 12 November 1996 00:00  |
sterner
Messages: 106 Registered: February 1991
|
Senior Member |
|
|
nicholas@uap.nrl.navy.mil (Andy Nicholas) writes:
> Does anyone have a routine to plot the day/night terminator on a map
> projection given the date and time? Don't want to reinvent the wheel if
> it is out there .....
My IDL library has what you need. Details on getting the
library are available at ftp://fermi.jhuapl.edu/www/s1r/idl/idl.html
under the link The JHU/APL/S1R IDL Library.
The following routines from my IDL library are of interest:
sunpos: Compute sun position from date/time and long/lat.
rb2ll: From range, bearing compute latitude, longitude.
makex: Make an array with specified start, end and step values.
(The last is just a convenience, findgen can be used instead).
Here are the steps:
sunpos,systime(),zone=-5,sublng=x,sublat=y
rb2ll,x,y,90,/deg,makex(0,360,10),xx,yy
map_set,/cont
plots,xx,yy
plots,x,y,psym=2
The first line computes the sun's position, in this example for
the current time. Time may be in the form returned by the IDL
function systime or in Julian Seconds (explained in the above
web site). It is assumed to be UT unless a zone number is given,
above Eastern Standard Time is used (zone=-5) and the subsolar
lat and long are returned.
The second line takes a reference point and one or more ranges and
bearings and returns the lat/longs of the resulting points. In the
above example the points every 10 degrees in bearing and 90 degrees
along the earth's surface away from the subsolar point are returned.
This is the terminator (you could use range a bit more than 90 degrees
to allow for atmospheric refraction, but 90 deg is pretty
reasonable).
Then just do a map_set and plot.
Ray Sterner sterner@tesla.jhuapl.edu
The Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
WWW Home page: http://fermi.jhuapl.edu/s1r/people/res/res.html
|
|
|