[Previous]
[Next]
NAME:
MAP_CarrTime
PURPOSE:
Get start and end (in Julian days) of Carrington rotation IROT
CALLING SEQUENCE:
subroutine MAP_CarrTime(IROT,JDCar)
INPUTS:
IROT integer Carrington rotation number
OUTPUTS:
JDCar(2) double precision Start and end time (JD)
CALLS: ***
EARTH, Julian, MAP_TZERO
INCLUDE:
include 'sun.h'
EXTERNAL:
external EARTH
PROCEDURE:
The approximate start time is estimated based on the starttime of
Carrington rotation 1750 and the synodic rotation rate of Earth.
MAP_TZERO is used to refine the estimate.
MODIFICATION HISTORY:
AUG-1993, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
MAP_DATA
PURPOSE:
Get modified Carrington variable for spacecraft location and observed
locations
CATEGORY:
Celestial mechanics
CALLING SEQUENCE:
subroutine MAP_DATA(SC_NAME,iYr,N,NOBS,Doy,ZOBS,XSC,XOBS,nCar,JDCar)
INPUTS:
SC_NAME real external function; identifies spacecraft
iYr integer year
N integer # observation times
NOBS integer # observations at each time
(e.g. # sectors for Helios data)
Doy(N) real day of year (fraction for time of day)
ZOBS(N,NOBS) real heliographic longitudes of observed
locations (degrees, in [0,360))
OUTPUTS:
XSC(N) real modified Carrington variable for
spacecraft locations
XOBS(N,NOBS) real modified Carrington variable for
observed locations
nCar integer # start times of Carrington rotations
JDCar(nCar) double precision Carrington start times in Julian days
(JDCar is output from subroutine MAP_TZERO)
CALLS: ***
MAP_TZERO, XMAP_OBS_POS, XMAP_SC_POS
EXTERNAL:
external SC_NAME
PROCEDURE:
> Loop over all observation time (N) and all simultaneous observations
(NOBS) at each time.
> SC_NAME must also be declared EXTERNAL in the calling program
SC_NAME is a user-written function which calculates the heliographic
longitude XLNG of a spacecraft for a given time iYr,Doy
The call to SC_NAME has the form:
XLNG = SC_NAME(iYr,Doy)
where iYr (integer*4) and Doy (real*4) are input and XLNG (real*4)
is output.
> SC_NAME is available for Helios A (function HELIOS_1), Helios B
(HELIOS_2) and Earth (EARTH); the function EARTH_ELIMB and EARTH_WLIMB
can be used to handle earth-based limb observations.
MODIFICATION HISTORY:
JAN-1992, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
MAP_TZERO
PURPOSE:
Calculate list of start times for subsequent 'Carrington rotations'
CATEGORY:
Celestial mechanics
CALLING SEQUENCE:
subroutine MAP_TZERO(SC_NAME,iYr,Doy_IN,DELDOY,nCar,JDCar)
INPUTS:
SC_NAME real external function; identifies spacecraft
iYr integer year
Doy_IN real doy of year; including fraction for time of day
DELDOY real required accuracy (in days) for the Carrington
start times JDCar
nCar integer # start times to be calculated
OUTPUTS:
JDCar(nCar) double precision Carrington start times in Julian days
CALLS: ***
Dbl2Str, Flt2Str, Int2Str, Julian, Say, Str2Str
CALLED BY:
MAP_CarrTime, MAP_DATA, N_CARRINGTON
PROCEDURE:
> SC_NAME must be declared EXTERNAL in the calling program unit.
SC_NAME is a user-written function which calculates the heliographic
longitude XLNG of a spacecraft for a given time iYr,Doy
The call to SC_NAME has the form:
XLNG = SC_NAME(iYr,Doy)
where iYr (integer*4) and Doy (real*4) are input and XLNG (real*4)
is output.
> iYr,Doy_IN is the time where the search for start times begins.
the first nCar Carrington start times after iYr,Doy_IN are calculated
> The spacecraft is supposed to move in the ecliptic, circling the Sun in
the same direction as Earth (direct motion)
> The start time of a new Carrington rotation is defined as the time for
which the heliographic longitude of the spacecraft is zero.
MODIFICATION HISTORY:
JAN-1992, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
MapWarp
PURPOSE:
Convert the vertical scale of a synoptic map from latitude to
sin(latitude) or v.v.
CALLING SEQUENCE:
subroutine MapWarp(NX,NY,Z, YLB,YLE, ZMIN,ZMAX)
INPUTS:
NX,NY integer dimension of input grid
Z(NX,NY,2) real grid fnc-values
YLB,YLE real latitude (or sin(latitude))
corresponding to bottom (i=1) and top (i=NY)
row of input array Z.
OUTPUTS:
Z(NX,NY,2) real grid fnc-values in the new grid
YLB,YLE real sin(latitude) (or latitude) of bottom
and top row of output array Z
CALLS: ***
ArrR4GetMinMax, ArrR4Mask, BadR4, asind, nrInterpol, sind
PROCEDURE:
> If the input values of YLB and YLE are both in the range [-1,1]
the conversion is from sin(latitude) to latitude.
> Otherwise the conversion is from latitude to sin(latitude)
> For each longitude (column in array Z(I,J=1..NX,1) a cubic spline
is calculated based on all unflagged grid points (Z(I,J,2) .eq. -1).
The spline is used to calculate the fnc-values in the new grid.
Grid points in the output grid are assigned the same flag status
(value Z(.,.,2)) as the nearest grid point of the old grid in the
latitudinal direction of the old grid.
MODIFICATION HISTORY:
JUN-93, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
math
PURPOSE:
Define mathematical constants
INCLUDED BY:
BadI4, BadI8, BadR4, BadR8, CvR4, CvR8, EqKepler, EqKeplerd, GridSphere3D, IPSBase, IPSFuncQ
KeplerOrbit, RebinSphere, SUNRA, SunRadius, ThomsonFarY, ThomsonLOS, ThomsonLOS3D
ThomsonLOSFar, ThomsonLOSStep, ThomsonMid, ThomsonMidFar, ThomsonMidpoint
ThomsonMidpointFar, ThomsonS10, Time2KeplerOrbit, Time2SunRA, Time2SunRadius
TinyR4, asind, cosd, dasind, dcosd, pInfR4, smei_base, smei_cal, smei_eclipse
PROCEDURE:
[Previous]
[Next]
NAME:
MATRIX_INV_R4
PURPOSE:
Matrix inversion
CATEGORY:
Math: matrix algebra
CALLING SEQUENCE:
function MATRIX_INV_R4(N,A,IK,JK)
INPUTS:
N integer dimension of the NxN matrix A
A real*4 matrix
IK,JK integer scratch arrays
OUTPUTS:
MATRIX_INV_R4 integer 0 if inversion not succesfull; 1 if succesfull
A real*4 inverse matrix
PROCEDURE:
Matrix inversion by Gauss-Jordan elimination with full pivoting
MODIFICATION HISTORY:
Joop Gronenschild (SRON)
[Previous]
[Next]
NAME:
MATRIX_INV_R8
PURPOSE:
Matrix inversion
CATEGORY:
Math: matrix algebra
CALLING SEQUENCE:
function MATRIX_INV_R8(N,A,IK,JK)
INPUTS:
N integer dimension of the NxN matrix A
A double precision matrix
IK,JK integer scratch arrays
OUTPUTS:
MATRIX_INV_R8 integer 0 if inversion not succesfull; 1 if succesfull
A double precision inverse matrix
PROCEDURE:
Matrix inversion by Gauss-Jordan elimination with full pivoting
MODIFICATION HISTORY:
Joop Gronenschild (SRON)
[Previous]
[Next]
NAME:
MessengerOrbit
PURPOSE:
Calculate Messenger orbit (position and velocity vectors)
CATEGORY:
/gen/for/lib/ephem
CALLING SEQUENCE:
subroutine MessengerOrbit(iYr,Doy,RR,VV)
INPUTS:
iYr integer year
Doy real day of year
OUTPUTS:
RR(3) real position vector: ecliptic longitude and
latitude (deg), radial distance (AU)
VV(5) real velocity vector: ecliptic longitude and
latitude (deg), magnitude, radial and
tangential velocity (AU/day)
(will be zero if the Messenger orbital
data base is used; see PROCEDURE).
CALLS: ***
Julian, KeplerOrbit, Say
PROCEDURE:
Times have to be later than 2007/01/01 00 UT
MODIFICATION HISTORY:
JUL-1998, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
JAN-2012, John Clover (UCSD/CASS)
Modified existing Stereo element program to use
Messenger elements
[Previous]
[Next]
NAME:
MidExp
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
subroutine MidExp( Funk, AA,BB,S,N )
INPUTS:
OUTPUTS:
INCLUDE:
include 'midpnt_inc.h'
PROCEDURE:
See Numerical Recipes
MODIFICATION HISTORY:
JUN-1993, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
MidInf
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
subroutine MidInf( Funk, AA,BB,S,N )
INPUTS:
OUTPUTS:
CALLED BY:
ThomsonLOS, ThomsonLOS3D
EXTERNAL BY:
ThomsonLOS, ThomsonLOS3D
INCLUDE:
include 'midpnt_inc.h'
PROCEDURE:
See Numerical Recipes
MODIFICATION HISTORY:
JUN-1993, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
MidPnt
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
subroutine MidPnt(Func, A,B,S,N)
INPUTS:
OUTPUTS:
INCLUDE:
include 'midpnt_inc.h'
PROCEDURE:
See Numerical Recipes
MODIFICATION HISTORY:
JUN-1993, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
midpnt_inc
INCLUDED BY:
MidExp, MidInf, MidPnt, MidSql, MidSqu
PROCEDURE:
Common part of the Mid* functions used in nrQRomo
[Previous]
[Next]
NAME:
MidSql
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
subroutine MidSql( Funk, AA,BB,S,N )
INPUTS:
OUTPUTS:
INCLUDE:
include 'midpnt_inc.h'
PROCEDURE:
See Numerical Recipes
MODIFICATION HISTORY:
JUN-1993, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
MidSqu
PURPOSE:
CATEGORY:
CALLING SEQUENCE:
subroutine MidSqu( Funk, AA,BB,S,N )
INPUTS:
OUTPUTS:
INCLUDE:
include 'midpnt_inc.h'
PROCEDURE:
See Numerical Recipes
MODIFICATION HISTORY:
JUN-1993, Paul Hick (UCSD)
[Previous]
[Next]
NAME:
mkenv
PURPOSE:
Process logicals and symbols
CATEGORY:
Environment
CALLING SEQUENCE:
mkenv [-sym -log] [-set -get -del] [-value_only] [name=value]
INPUTS:
Command line switches and arguments
-sym process a logical
-log process a symbol
If neither is set then -log is assumed
-get get value of symbol or logical
-set set a symbol or logical
-delete delete a symbol or logical
If neither is set then
-get is assumed if no name=value pair is specified
-set is assumed if a name=value pair is specified
-value_only Only used if -get is set.
By default -get will display a line of the form
Logical: name = value
if the logical or symbol is defined, or
Logical: name is not defined
if the logical or symbol doesn't exist.
If -value_only is set then only the name of the logical
or symbol is displayed if it exists; it it doesn't then
nothing is displayed. This is useful for extracting the
the value and storing it in a script variable:
value=$($exe/mkenv -log -get temp)
sets 'value' to the value of the logical temp, or to the
null string (if temp doesn't exist).
name=value name: name of the logical or symbol
value: value to be assigned to logical or symbol
OUTPUTS:
If -get is used a line is written to standard output giving the value
of the specified logical or symbol.
The exit status of the program is 0 on failure and 1 on success.
CALLS: ***
ForeignArg, LocFirst, Say, Str2Str, iCheckDirectory, iDeleteLogical [1]
iDeleteLogical [2], iDeleteLogical [3], iDeleteSymbol [1], iDeleteSymbol [2]
iDeleteSymbol [3], iGetFileSpec, iGetLogical [1], iGetLogical [2]
iGetLogical [3], iGetSymbol [1], iGetSymbol [2], iGetSymbol [3], iSetLogical [1]
iSetLogical [2], iSetLogical [3], iSetSymbol [1], iSetSymbol [2], iSetSymbol [3]
icompress, itrim, lowercase
INCLUDE:
include 'dirspec [1].h'
include 'dirspec [2].h'
include 'dirspec [3].h'
include 'dirspec [4].h'
SIDE EFFECTS:
-set and -delete update the ~/LOGFIL.TXT file
PROCEDURE:
This program is useful primarily on Linux and Unix for maintaining the
file ~/LOGFIL.TXT containing 'logical' and 'symbol' definitions.
MODIFICATION HISTORY:
JUL-2000, Paul Hick (UCSD; pphick@ucsd.edu)
[Previous]
[Next]
NAME:
MVBITS
PURPOSE:
Copy bits
CATEGORY:
Machine-dependent functions: Unix
CALLING SEQUENCE:
subroutine MVBITS(M,I,LL,N,J)
INPUTS:
M integer source
I integer first bit in source M to be transferred
LL integer number of bits in bit-field to be transferred
J integer starting bit in destination N where bit-field
is to be deposited
OUTPUTS:
N integer destination; only bits [J,J+LL-1] will be
modified.
CALLS: ***
BIC, BIS, BIT
PROCEDURE:
Works like the MVBITS subroutine on the VAX