; NAME : dumpm ; PURPOSE : ; dumpm, mparam ; CATEGORY : ; solar magnetic field computation package (MAGPACK2) ; CALLING SEQUENCE : ; print the contents of mparam ; INPUTS : ; mparam ; OPTIONAL INPUT PARAMETERS : ; none ; KEYWORD PARAMETERS : ; none ; OUTPUTS : ; print mparam on screen ; COMMON BLOCKS : none ; SIDE EFFECTS : none ; RESTRICTIONS : none ; PROCEDURE : ; ; MODIFICATION HISTORY : ; T.Sakurai, 1992 ; ;------------------------------------------------------------------------ ; pro dumpm, mparam ; magfile = ' ' read,'(proc.dumpm) enter input file name > ',magfile openr, unitm, magfile, /get_lun readmh1, unitm, mparam specs = defspecs(nspec) print,'parameters in ',magfile printmp, mparam ; point_lun,unitm,320 mhdr2 = defmh2( ) nx = mparam.nx ny = mparam.ny nbytem = mparam.nbytem k = 0 while (not eof(unitm)) do begin readu,unitm, mhdr2 spec=mhdr2.spec factor=float(mhdr2.factor) if ( abs(nbytem) eq 2) then a=intarr(nx,ny) if ( abs(nbytem) eq 4) then a=lonarr(nx,ny) readu, unitm, a if ( nbytem lt 0 ) then byteorder,a nlast = (nbytem*nx*ny) mod 80 if ( nlast ne 0 and not eof(unitm) ) then begin skipstr = replicate(' ', 80 - nlast ) readu,unitm,skipstr end a=factor*a for i=0, nspec-1 do begin if strupcase(strtrim(spec)) eq specs(i) then begin print, k, '-th record is ', specs(i) k = k+1 goto, escape endif endfor print,k,'-th record: invalid spec ',spec escape: endwhile free_lun, unitm return end