C+ C NAME: C T3D_write_bb C PURPOSE: C Write tomography plasma (magnetic field) output to t3d* file C CALLING SEQUENCE: subroutine T3D_write_bb(cPrefix, t3d, BR3D, BT3D, iStrAdd, cStrAdd, cFile) C INPUTS: C cPrefix character*4 C prefix used to start name of output file C t3d(*) real (not used anymore) C C BR3D(nLng,nLat,nRad) real C BT3D(nLng,nLat,nRad) real C C iStrAdd integer # strings to be added to the file header C cStrAdd(*)*(*) character C strings to be added to file header C Only strings with non-zero length are written. C All strings receive the prefix 'User: ' C OUTPUTS: C (to file b3d*) C cFile*(*) character C name of t3d* output file C only the name and type is set. The file is C created in the current directory. C INCLUDE: include 't3d_array.h' C CALLS: C T3D_iget, T3D_header, itrim, WR2DARR C PROCEDURE: C DEC-2000, Kevin Nguyen, Paul Hick (UCSD; pphick@ucsd.edu) C NOV-2001, Tamsen Dunn (UCSD; tdunn@ucsd.edu) C Removed time dimension. Subroutine should now be called inside the time C loop in the time-dependent tomography. C- character cPrefix*(*) real BR3D(*) real BT3D(*) integer iStrAdd character cStrAdd(*)*(*) character cFile*(*) parameter (nStr = T3D__NELEMENTS) character cStr(nStr)*120 character cFmt*7 /'(F10.4)'/ call T3D_iget(T3D__NLNG,0,nLng) call T3D_iget(T3D__NLAT,0,nLat) call T3D_iget(T3D__NRAD,0,nRad) if (itrim(cPrefix) .eq. 0) cPrefix = 'bb3d' call T3D_header(cPrefix, cFile, nStr, cStr, J) do I=1,iStrAdd K = itrim(cStrAdd(I)) if (K .gt. 0) then J = J+1 cStr(J) = ' User: '//cStrAdd(I)(:K) end if end do J = J+1 cStr(J) = 'Radial (r^2*B_r)/tangential (r*B_t) magnetic field' call WR2DARR(3,nLng,nLat*nRad,BR3D,cFile,cFmt,.FALSE.,J,cStr(1)) call WR2DARR(4,nLng,nLat*nRad,BT3D,cFile,cFmt,.FALSE.,0,cStr(1)) return end