C+ C NAME: C BList_WSO C PURPOSE: C Retrieve information about source surface file for magnetic field. C This routine applies to the regular WSO files downloaded from C the WSO web site. C CALLING SEQUENCE: integer function BList_WSO(cFile, NCoff, TFound,XCFoundBeg,XCFoundEnd,NrFound,R0,Scale) C INPUTS: C cFile*(*) character fully-qualified name of file containing C source surface map C NCoff integer Carrington offset subtracted from C TFound, XCFoundBeg, XCFoundEnd C OUTPUTS: C BList_WSO integer return status (0=Failure,1=Success) C C TFound real Time assigned to source surface map C XCFoundBeg real Start Carrington variable C XCFoundEnd real End Carrington variable C NrFound integer version number C R0 real source surface distance (in AU) C Scale real conversion factor from muT to nT. C The data read by BRead_WSO will be C multiplied by this constant, i.e. C BRead_WSO returns data in nT. C INCLUDE: include 'openfile.h' include 'filparts.h' include 'sun.h' C EXTERNAL: external EARTH C CALLS: C iSetFileSpec, iGetFileSpec, Str2Flt C SEE ALSO: C BListAll, MapReadSingle, MapReadTimes, BRead_WSO, BList_WSO_NOAA C PROCEDURE: C All timing information is retrieved by analyzing the C file name. The source surface distance is hardcoded. C C The regular WSO files from NOAA have file names of the type C wso1986_010_1.dat, i.e. containing a Carrington rotation number, C a heliographic longitude in degrees, and (optionally) a file C version number. C Records in the file cover latitudes from -70 to +70 degrees. C Each record is prefixed with a string of type CT1986:010. C The CR and longitude in the file name correspond to the FIRST C record in the file. C C For the example wso1986_010_1.dat, the output values would be: C C XCFoundBeg = 1986+(1-10/360) = 1986.9722 C XCFoundEnd = 1987.9722 = XCFoundBeg+1 C TFound = 1987.4722 = XCFoundBeg+0.5 C NrFound = 1 C R0 = 0.069786090 (= 15 solar radii in AU) C Scale = 1000.0 (= is conversion from muT to nT) C MODIFICATION HISTORY: C MAY-2002, Paul Hick (UCSD/CASS) C- character cFile*(*) integer NCoff real TFound real XCFoundBeg real XCFoundEnd integer NrFound real R0 character cSay *9 /'BList_WSO'/ character cName*256 real rVec(3) BList_WSO = 0 I = iSetFileSpec(cFile) I = iGetFileSpec(FIL__NAME,FIL__TYPE,cName) !------- ! Retrieve the time assigned to the synoptic map, ! and the start and end Carrington variable. ! For now we assume that this can be obtained from ! the file name, e.g. wso1889_360_1 I = 3 call Str2Flt(cName,I,rVec) if (I .eq. 1) then ! Set missing longitude to 360.0 rVec(2) = 360.0 I = 2 end if if (I .eq. 2) then ! Set missing version number to 1 rVec(3) = 1 I = 3 end if if (I .eq. 3) then !------- ! Here we assume that the file names contain ! a rotation number and a start longitude XCFoundBeg = rVec(1)-NCoff+(1.0-rVec(2)/360.0) TFound = XCFoundBeg + 0.5 XCFoundEnd = XCFoundBeg + 1.0 NrFound = nint(rVec(3)) BList_WSO = 1 end if R0 = 15.0*sngl(SUN__RAU) ! Source surface at 15 Rsun Scale = 1000.0 ! Conversion factor from file units (muT) to nT return end