C+ C NAME: C BField_Get C PURPOSE: C Read magnetic source surface files C CATEGORY: C Tomography C CALLING SEQUENCE: logical function BField_Get(iB,TTime,XCbeg,XCend,BR) C INPUTS: C iB integer identifies the type of magnetic source surface map C to be used (see include file b3d_param.h). C TTime(nTim) real (time-dependent tomography only) C Times at which magnetic field is required C XCbeg(nTim) real start Carrington variable of matrix (- NCoff) C XCend(nTim) real end Carrington variable of matrix (- NCoff) C (range of matrix typically is three Carrington rotations C OUTPUTS: C BR(nLng,nLat,nTim) real radial magnetic fieldi C CALLS: C T3D_Read_B, Say, cHideLogical, itrim C SEE ALSO: C BField_Choose C EXPLICIT: integer BList_WSO integer BRead_WSO integer BList_WSO_NOAA integer BRead_WSO_NOAA integer BList_NSO_NOAA integer BRead_NSO_NOAA C EXTERNAL: external BList_WSO external BRead_WSO external BList_WSO_NOAA external BRead_WSO_NOAA external BList_NSO_NOAA external BRead_NSO_NOAA C INCLUDE: include 'b3d_param.h' include 'filparts.h' C PROCEDURE: C Process magnetic source surface files. C MODIFICATION HISTORY: C AUG-2002, Paul Hick (UCSD/CASS) C JUN-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C Added code to process NSO_NOAA maps. C- real TTime(*) real XCbeg(*) real XCend(*) real BR (*) character cSay*13 logical T3D_Read_B logical BField_Choose character cHideLogical*(FIL__LENGTH) character cVar(*)*(*) ! Needed by entry point BField_Choose character cWild(B3D__N)*(FIL__LENGTH) ! Initialized by BField_Choose save cWild cSay = 'BField_Get' BField_Get = .FALSE. !------- ! Check which magnetic field data to read. ! Currently the choice is between the original WSO maps and the ! WSO files modified by Nick. The magnetic field is returned in nano Tesla (nT). if (itrim(cWild(iB)) .ne. 0) then ! Skip (not specified on cmd line) if (iB .eq. B3D__WSO) then ! WSO files BField_Get = T3D_Read_B(cWild(iB),BList_WSO,BRead_WSO,TTime,XCbeg,XCend,BR) else if (iB .eq. B3D__WSO_NOAA) then ! Nicks WSO files BField_Get = T3D_Read_B(cWild(iB),BList_WSO_NOAA,BRead_WSO_NOAA,TTime,XCbeg,XCend,BR) else if (iB .eq. B3D__NSO_NOAA) then ! Nicks NSO files BField_Get = T3D_Read_B(cWild(iB),BList_NSO_NOAA,BRead_NSO_NOAA,TTime,XCbeg,XCend,BR) end if end if return C+ C NAME: C BField_Choose C PURPOSE: C Choose type of source surface magnetic maps C CATEGORY: C Tomography C CALLING SEQUENCE: entry BField_Choose(iVar,cVar) C INPUTS: C iVar integer # entries in cVar C cVar(iVar)*(*) character command line arguments (usually set up by C a call to href=ForeignArg=) C OUTPUTS: C BField_Choose logical set .TRUE. if magnetic source surface data are C processed. C CALLS: C ForeignFile, Say, itrim, cHideLogical C SEE ALSO: C BField_Get C PROCEDURE: C Entry point in BField_Get. C C The input array cVar is searched for string like 'wso=' or C 'wso_noaa=' (as defined in b3d_param.h) to decide on which types of C magnetic source surface maps to use (currently one or more of WSO, C WSO_NOAA or NSO_NOAA can be selected). If a match is found, then the C corresponding cWild entry is set. If no match is found then cWild is C set to the blank string. C MODIFICATION HISTORY: C AUG-2002, Paul Hick (UCSD/CASS) C JUN-2003, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C Prepared for use with multiple types of magnetic source surface maps. C Made BField_Choose and entry point in bField_Get to allow saving the C cWild information internally. C- cSay = 'BField_Choose' BField_Choose = .FALSE. do I=1,B3D__N call ForeignFile(-iVar-1,cVar,B3D__STRCMD(I),cWild(I)) if (itrim(cWild(I)) .gt. 0) then call Say(cSay,'I',B3D__STRCMD(I),'maps in '//cHideLogical(cWild(I))) BField_Choose = .TRUE. end if end do return end