From Bill Blackwell/SVERDRUP: Below is the latest set of interface headers for CXORAD. The changes made affect only the inputs to the code. Following is a list of brief descriptions of the changes between this version of the code's inputs and the earlier version provided to CSC: * LUNIT, the file unit number variable is now an array so to accommodate the use in CXORAD (and CRMFLX) 3 data files: magnetosphere, magnetosheath, and solar wind. The previous version only had the magnetosphere database. * IUSESW has been changed. It now allows the user to choose from 3 options. * All inputs related to the magnetosheath flux calculations have been dropped. There are several new input variables related to smoothing operations. The enclosed text file provides a short description of these smoothing operation input variables. The smoothing control input variables are: VARIABLE DEFAULT LOW-LIMIT HIGH-LIMIT __________________________________________________________ SMOOTH1 3 N/A N/A NFLXGET 5 2 10 NDROPHI 1 0 7 NDROPLO 1 0 7 LOGFLG 2 N/A N/A RNGTOL 3.0 0.1 5.0 FPCHI 80 50 100 FPCLO 20 0 50 SMOOTH2 0 N/A N/A *** NOTE *** These defaults and input limits are preliminary and may be changed later. CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C REQUIREMENT REFERENCE NUMBERS: 3.5.3.7 C C PURPOSE: Given Chandra's ephemeris and fluence threshold level per orbit, C this routine calculates the protection and turn-on event times and C locations. C C INPUT DATA: SUN AND SPACECRAFT EPHEMERIS, FLUENCE LEVELS C C OUTPUT DATA: SCIENCE INSTRUMENT TURN-ON AND TURN-OFF EVENT TIMES C C INVOCATION METHOD: FORTRAN SUBROUTINE CALL C SUBROUTINE CXORAD(EPHSTP,NUMEPH,SUNECI,EPHECI,EPHDATE, $ ISPECI,FLUTHR,FLUTOL,FLULVL,REARTH,RNGMIN,LUNIT,IUSESW,IUSEMSH, $ FSWIMN,FSWI95,FSWI50,FSWISD,FMSHIMN,FMSHI95,FMSHI50,FMSHISD, $ NUMKPS,XKPIN,FRACKP,OFFEVNT,TONEVNT,ACISIN,ACISOUT,ECITON, $ ECISAFE,GSETON,GSESAFE,GSMTON,GSMSAFE,FLUWARN,CXOFLUE,CXOTIME) C C ARGUMENT LIST: C C ARGUMENT NAME TYPE USE DESCRIPTION C ---------------- ---- --- ----------------------------------- C C EPHSTP R*4 I Time step between ephemeris points. C (sec) C C NUMEPH I*4 I Number of points in ephemeris. C C SUNECI R*8 I Array containing Sun ephemeris points in ECI C coordinate system (km). C SUNECI(I,1) = x coordinate of Ith ephemeris point. C SUNECI(I,2) = y coordinate of Ith ephemeris point. C SUNECI(I,3) = z coordinate of Ith ephemeris point. C C EPHECI R*8 I Array containing Chandra ephemeris points in ECI C coordinate system (km). C EPHECI(I,1) = x coordinate of Ith ephemeris point. C EPHECI(I,2) = y coordinate of Ith ephemeris point. C EPHECI(I,3) = z coordinate of Ith ephemeris point. C C EPHDATE I*4 I Integer array containing dates of Sun and Chandra C ephemeris points. C EPHDATE(I,1) = Year (YYYY) of Ith ephemeris point. C EPHDATE(I,2) = Day (DDD) of Year of Ith ephemeris point. C EPHDATE(I,3) = Hour (HH) of Day of Ith ephemeris point. C EPHDATE(I,4) = Minute (MM) of Hour of Ith ephemeris point. C EPHDATE(I,5) = Second (SS) of Minute of Ith ephemeris point. C C ISPECI I*4 I Ion species calculation control flag. C ISPECI = 1 -> calculate proton environment. C ISPECI = 2 -> calculate helium environment. C ISPECI = 3 -> calculate CNO environment. C C FLUTHR R*4 I Fluence per orbit threshold (ions/cm^2-sr-MeV). C C FLUTOL R*4 I Fluence calculation tolerance (% of fluence threshold). C C FLULVL I*4 I Percentile level (e.g., 50%, 95%) of particle flux C environment used in fluence calculation. C FLULVL = 1 -> mean flux used C FLULVL = 2 -> 95% flux used C FLULVL = 3 -> 50% flux used C C REARTH R*8 I Radius of the Earth (km) C C RNGMIN R*4 I Minimum geocentric range that ion flux C calculations are performed (Re) C C LUNIT I*4 I Array of unit numbers used in opening CRM's database files. C LUNIT(1) = magnetosphere database unit number C LUNIT(2) = magnetosheath database unit number C LUNIT(3) = solar wind database unit number C C IUSESW I*4 I flag for control of solar wind flux calculation: C IUSESW = 1 if user supplied uniform flux value used. C IUSESW = 2 if database used. C IUSESW = 3 if sum of database value and user supplied uniform C flux value used. C C FSWIMN R*4 I user supplied mean uniform solar wind flux for the C selected species (#/[cm^2-sec-sr-MeV]). C C FSWI95 R*4 I user supplied 95% level uniform solar wind flux for C the selected species (#/[cm^2-sec-sr-MeV]). C C FSWI50 R*4 I user supplied 50% level uniform solar wind flux for C the selected species (#/[cm^2-sec-sr-MeV]). C C FSWISD R*4 I user supplied std. dev. of uniform solar wind flux C for the selected species (#/[cm^2-sec-sr-MeV]). C C NUMKPS I*4 I number of Kp index intervals used as input distribution. C C XKPIN R*4 I array of Kp interval midpoint values. C C FRACKP R*4 I array containing the fraction (value between 0. & 1.) of C the corresponding Kp interval. C C SMOOTH1 I*4 I flag for control of database smoothing filter: C SMOOTH1 = 0 if no data smoothing is used. C SMOOTH1 = 1 if spike rejection and near neighbor flux. C SMOOTH1 = 2 if spike rejection with range weighted scaling of flux. C SMOOTH1 = 3 if spike rejection with average flux. C SMOOTH1 = 4 if spatial average of flux in volume specified by RNGTOL. C SMOOTH1 = 5 if spatial average of flux in volume specified by C RNGTOL, with the specified number of high and low C flux values inside the volume dropped first. C SMOOTH1 = 6 if spatial averaging of flux in volume specified by C RNGTOL, with percentile threshold limits on flux values. C C NFLXGET I*4 I number of flux values to get for smoothing filter. C (used if SMOOTH1 = 1,2, or 3) C C NDROPHI I*4 I number of high flux values to drop for smoothing filter. C (used if SMOOTH1 = 1,2,3, or 5) C C NDROPLO I*4 I number of low flux values to drop for smoothing filter. C (used if SMOOTH1 = 1,2,3, or 5) C C LOGFLG I*4 I flag controlling how flux average is performed. C LOGFLG = 1 if log10 of flux values used. C LOGFLG = 2 if linear flux values used. C (used if SMOOTH1 = 2,3,4,5, or 6) C C RNGTOL R*4 I range tolerance from near-neigbor used in spatial averaging of C database (Re). C (used if SMOOTH1 = 4,5 or 6) C C FPCHI I*4 I upper percentile limit for spatial averaging of flux. C (used if SMOOTH1 = 6) C C FPCLO I*4 I lower percentile limit for spatial averaging of flux. C (used if SMOOTH1 = 6) C C SMOOTH2 I*4 I flag for control of flux smoothing along orbit. C SMOOTH2 = 0 if no data smoothing is used along orbit. C SMOOTH2 = 1 if data smoothing is used along orbit. C C OFFEVNT L*4 O ACIS protection event flag. C OFFEVNT = .TRUE. if a protection event is found before the C last position prior to the minimum range. C C TONEVNT L*4 O ACIS turn-on event flag. C TONEVNT = .TRUE. if a turn-on event is found after the C first position beyond the minimum range. C C ACISIN I*4 O ACIS placed in focal plane (turn-on event). C ACISIN(1) = Year (YYYY) of event. C ACISIN(2) = Day (DDD) of Year of event. C ACISIN(3) = Hour (HH) of Day of event. C ACISIN(4) = Minute (MM) of Hour of event. C ACISIN(5) = Second (SS) of Minute of event. C C ACISOUT I*4 O ACIS taken out of focal plane (protection event). C ACISOUT(1) = Year (YYYY) of event. C ACISOUT(2) = Day (DDD) of Year of event. C ACISOUT(3) = Hour (HH) of Day of event. C ACISOUT(4) = Minute (MM) of Hour of event. C ACISOUT(5) = Second (SS) of Minute of event. C C ECITON R*8 O Array containing ECI coordinates of turn-on C event (km). C ECITON(1) = x coordinate of turn-on event. C ECITON(2) = y coordinate of turn-on event. C ECITON(3) = z coordinate of turn-on event. C C ECISAFE R*8 O Array containing ECI coordinates of protection C (turn-off) event (km). C ECISAFE(1) = x coordinate of protection event. C ECISAFE(2) = y coordinate of protection event. C ECISAFE(3) = z coordinate of protection event. C C GSETON R*8 O Array containing GSE coordinates of turn-on C event (Re). C GSETON(1) = x coordinate of turn-on event. C GSETON(2) = y coordinate of turn-on event. C GSETON(3) = z coordinate of turn-on event. C C GSESAFE R*8 O Array containing GSE coordinates of protection C (turn-off) event (Re). C GSESAFE(1) = x coordinate of protection event. C GSESAFE(2) = y coordinate of protection event. C GSESAFE(3) = z coordinate of protection event. C C GSMTON R*8 O Array containing GSM coordinates of turn-on C event (Re). C GSMTON(1) = x coordinate of turn-on event. C GSMTON(2) = y coordinate of turn-on event. C GSMTON(3) = z coordinate of turn-on event. C C GSMSAFE R*8 O Array containing GSM coordinates of protection C (turn-off) event (Re). C GSMSAFE(1) = x coordinate of protection event. C GSMSAFE(2) = y coordinate of protection event. C GSMSAFE(3) = z coordinate of protection event. C C FLUWARN I*4 O Integer array containing warning flags. C FLUWARN(1) = 0 if ephemeris time step is OK. C FLUWARN(1) = 1 if ephemeris time step too large. C FLUWARN(2) = 0 if fluence tolerance OK. C FLUWARN(2) = 1 if fluence tolerance too large. C FLUWARN(3) = 0 if Kp distribution fractions add to 1. C FLUWARN(3) = 1 if Kp distribution fractions do not add to 1. C C CXOFLUE R*4 O Fluence calculated for this ephemeris (ions/[cm^2-sr-MeV]). C C CXOTIME R*4 O Time duration of fluence calculation (sec). C C C EXTERNAL VARIABLES: NONE C C EXTERNAL REFERENCES: list subroutines called here, if any C C DEVELOPMENT HISTORY: C DESCRIPTION C AUTHOR RELEASE DATE OF CHANGE C ------------ ------- --------- --------------------------------------- C B. BLACKWELL TBD 7/00 ORIGINAL VERSION C C C NOTES: EPHECI is the ephemeris for 1 orbit or less. Nominally, it will C cover an interval from perigee to perigee. Exceptions will be partial C orbits at the start or end of an ephemeris file or run time spans C that are less than one orbit. C C If the ephemeris' time step is too large, or if the tolerance C on the fluence calculation tolerance is too small,the C appropriate flag in FLUWARN is set and a warning message C is written. C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C INCLUDE 'MAXEPH1.PAR' INCLUDE 'MAXKPS.PAR' C REAL*8 SUNECI(MAXEPH1,3),EPHECI(MAXEPH1,3),ECITON(3),ECISAFE(3) REAL*8 REARTH REAL*4 EPHGSE(MAXEPH1,3),EPHGSM(MAXEPH1,3) REAL*4 FLUX(MAXEPH1),FLUE(MAXEPH1),TSPAN(MAXEPH1) REAL*4 XKPIN(MAXKPS),FRACKP(MAXKPS) REAL*4 GSETON(3),GSESAFE(3),GSMTON(3),GSMSAFE(3) INTEGER *4 IDFLUX(MAXEPH1),ISTART(MAXEPH1),ISTOP(MAXEPH1) INTEGER*4 EPHDATE(MAXEPH1,5),ISPECI,ACISIN(5),ACISOUT(5), $ FLUWARN(3),FLULVL,SMOOTH1(6),SMOOTH2,FPCHI,FPCLO,LUNIT(3) LOGICAL*4 OFFEVNT, TONEVNT C ×mùÛN½ó