;Name: ; PFSSMOD ; ; Purpose: ; Main wrapper program to call the PFSS model and get back out the ; parameters: pressure, density, temp, br, bth, bphi ; ;Keyword inputs: ; ; PFSSFILE: Filename (inluding extention) of the save file you want to ; look at This can be gotten with the pfss_viewer SSWIDL ; command, or by setting DATE and then later referring to ; saved file. You have to have the pfss package installed in ; SSWIDL. Default is set to file in $FORWARD_DB$ directory. ; Inputted as a string. ; PFSSFILE OVERWRITES RTOP and DATE AND TOPOLOGY IF SET and DIFFERENT. ; BE CAREFUL FOR EXAMPLE IF YOU WANT CMER AND BANGLE TO BE FOR ; A SOMEWHAT DIFFERENT DATE THAN THE ONE IN THE CUBE - in this ; case, you should explicitly define CMER, and BANG as keywords ; In other words -- if you use keyword PFSSFILE, DATE will ; be completely ignored and actually replaced by NOW in PFSSFILE. ; Note widget should not send PFSSFILE explicitly, that is, ; for most calls it will send date but not pfssfile; ; unless pfssfile as a file is selected via the widget ; or if READPRAMS is set it will use that PFSSFILE ; (if there is one; generally, it will not be saved in READPRAMS ; unless it is an original keyword) ; ; DATE: if this is set, it will look for datacube ; for this date (or close to it). If not in WORKING_DIR (or local if WORKING_DIR not ; set) will download. If PFSSFILE set, it will overrule and overwrite DATE. ; ; **TO SUMMARIZE ** there are three different potential observer point of view inputs ; ; 1) CMER/BANG - if these are set as keywords, they take precedence and ; *define* the observer's point of view ; These keywords are not defined or used in this subroutine, however. ; ; 2) PFSSFILE - if explicitly set, this will be the datacube used ; for the PFSS model-- the date associated with it (NOW) is ; the date the boundary condition is centered on. This will ; overwrite/replace DATE even if it is explicitly set, and will define ; CMER/BANG if they are *not* explicitly set in the function call ; (note, if PFSSFILE is changed in the widget, CMER/BANG will be updated) ; ; 3) DATE - if this is the only thing set, it will define CMER/BANG ; as the Earth's view on that date; ; also PFSSFILE as described above. ; (note, if DATE is changed in the widget, CMER/BANG and PFSSFILE ; will be updated) ; ; *So, for example, one might want to know what STEREO saw on a particular day and time: ; one would set DATE to that day and time, CMER and BANG to STEREO's view for that day and ; time, and then PFSSFILE would be a close-by time (but not exactly the same as DATE) ; that represented the time of the boundary condition. ; The DATE itself would not have a huge impact on the result, except to the extent that ; some issues of instrument calibration have a dependency on DATE, and of course in ; picking the PFSSFILE to use. ; ; The FORWARD plot will indicate all three of these points of view in the plot title, ; via "PFSS Cube" (the boundary condition date associated with PFSSFILE), ; "observer's date" (DATE), and then explicit CMER + BANG ; ; WORKING_DIR: see above ; ; RTOP: the location of the pfss source surface. it defaults to 2.5 ; and only can be something different if you specify a DATE ; and no PFSSFILE, or if it is different in the PFSSFILE ; from 2.5 ; NOTE: if set to negative -- will use abs. value for cube top, ; but, will call PFSS_GET_POTL_COEFFS with no RTOP which forces ; source surface at infinity ; ; HYDRO: hydrostatic atmospheric model. The options are: ; ; HYDRO=1; exponential isothermal hydrostatic equilibrium ; (DEFAULT) ; HYDRO=2; radial hydrostatic equilibrium ; HYDRO=3; Vasquez et al 2003 hydrostatic atmosphere ; ; VELIMPOSE - impose a velocity of constant magnitude VELIMPOSE directed along the field ; overwrites any velocity field already loaded in if nonzero ; UNITS KM/SEC ; DEFAULT 0.d0 ; ; TOPOLOGY - preprocess PFSS datacube by drawing field lines through every point ; takes a while, but allows storage of information about closed vs open ; which then allows different hydrostatic models on each ; also stores info needed for quick calculation of expansion factor (line=EXPFAC) ; it defaults to 0 and only can be something different if you specify a DATE ; and no PFSSFILE, or if it is different in the PFSSFILE from 0 ; If PFSSFILE set, it will overrule TOPOLOGY ; ; DENSPROF - ; For HYDRO=1, DENSPROF = density at coronal base in CGS units of 5d8 ; For HYDRO=2, DENSPROF can be array [A,B,C,D,E,F] ; or multiplier of array [densprof*A,B,densprof*C,D,densprof*E,F] ; (note for widget it has to be multiplier, so, scalar) ; dens = A*r^-B + C*r^-D + E*r^-F ; and inside PFSSMOD program A,B,C,D,E,F defaults to WSM streamer values ; For HYDRO=3, DENSPROF can be array [A1,A2,A3,A4,A5,aa,bb,alpha,beta] ; or multiplier of array as above ; dens=A1*exp(A2/r)*r^-2*(1+A3/r+A4/r^2+A5/r^3) ; temp=TE*(aa+1)/(aa+bb*r^alpha + (1-bb)*r^-beta) ; and inside FOR_DIPOLE program A1,A2,A3,A4,A5,aa,bb,alpha,beta ; defaults to Vasquez streamer values ; Note- default=1 for all ; ; T0 ; isothermal temperature value ; DEFAULT 1.5D6 ; ; ODENSPROF, OT0 - only used if TOPOLOGY=1 -- sets plasma for open field ; follows same form as DENSPROF - but HYDRO=1 ODENSPROF is CGS units of 1d8 ; and inside PFSSMOD A,B,C,D,E,F defaults to WSM coronal hole values ; or A1,A2,A3,A4,A5,aa,bb,alpha,beta to Vasquez 2003 values ; ; DELTAR - step for radial derivative (e.g. LINE=NINST) ; DEFAULT 0.01d0 ; ; FLDUSE - BMAG or BPOS - for torus instability index calculation ; DEFAULT BPOS ; ; RINDEX - array of r values for custom grid -- only used if rtop ne 2.5