read_mfi_readme.txt Examples of fortran, c and IDL programs that read Wind/MFI cdf or ascii files. List of files: C: read_mfi_cdf_h0.c (requires CDF library)* read_mfi_asc_3s.c read_mfi_asc_1m.c read_mfi_asc_1h.c Fortran: read_mfi_asc_1h.f (requires CDF library)* read_mfi_asc_3s.f read_mfi_asc_1m.f read_mfi_asc_1h.f IDL: read_mfi_cdf_h0.pro (IDL 4.0 or better) read_mfi_asc_3s.pro read_mfi_asc_1m.pro read_mfi_asc_1h.pro * The CDF library can be obtained at http://nssdc.gsfc.nasa.gov/cdf Formats that may help in reading the 3-s, 1-m and hourly averages ascii files Fortran users: (assuming the variable types are properly declared) <3-s ascii> Any one of the following statements should give the same results read(lun,*) yr,mon,day,hr,min,sec,bxgse,bygse,bzgse,bygsm,bzgsm,bt 1 bxgsmrms,bygsmrms,bzgsmrms,btrms,npts OR with a format statement: read(lun,1001) yr,mon,day,hr,min,sec,bxgse,bygse,bzgse,bygsm,bzgsm,bt 1 bxgsmrms,bygsmrms,bzgsmrms,btrms,npts Choose one from: 1001 format(I4,4(1x,I2),F4.1,6(1x,F9.3),4(1x,F8.3),1x,I5) 1001 format(I4,4(1x,I2),F4.0,6(1x,F9.0),4(1x,F8.0),1x,I5) 1001 format(I4,4(1x,I2),E4.1,6(1x,E9.2),4(1x,E8.1),1x,I5) 1001 format(I4,4(1x,I2),E4.0,6(1x,E9.0),4(1x,E8.0),1x,I5) 1001 format(I4,4I3,F4.0,6F10.0,4F9.0,I6) 1001 format(I4,4I3,E4.0,6E10.0,4E9.0,I6) <1-m ascii> read(lun,*) yr,mon,day,hr,min,sec,bxgse,bygse,bzgse,bygsm,bzgsm,bt 1 bxgsmrms,bygsmrms,bzgsmrms,btrms,npts, 2 pxgse,pygse,pzgse,pygsm,pzgsm OR with a format statement: read(lun,1001) yr,mon,day,hr,min,sec,bxgse,bygse,bzgse,bygsm,bzgsm,bt 1 bxgsmrms,bygsmrms,bzgsmrms,btrms,npts, 2 pxgse,pygse,pzgse,pygsm,pzgsm Choose one from: 1001 format(I4,5(1x,I2),6(1x,F9.3),4(1x,F8.3),1x,I5,5(1x,F8.3)) 1001 format(I4,5(1x,I2),6(1x,F9.0),4(1x,F8.0),1x,I5,5(1x,F8.3)) 1001 format(I4,5(1x,I2),6(1x,E9.2),4(1x,E8.1),1x,I5,5(1x,E8.1)) 1001 format(I4,5(1x,I2),6(1x,E9.0),4(1x,E8.0),1x,I5,5(1x,E8.0)) 1001 format(I4,5I3,6F10.0,4F9.0,I6,5F9.1) 1001 format(I4,5I3,6E10.0,4E9.0,I6,5E9.0) <1-h ascii> read(lun,*) yr,mon,day,hr,min,sec,bxgse,bygse,bzgse,bygsm,bzgsm,bt 1 bxgsmrms,bygsmrms,bzgsmrms,btrms,npts, 2 pxgse,pygse,pzgse,pygsm,pzgsm OR with a format statement: read(lun,1001) yr,mon,day,hr,min,bxgse,bygse,bzgse,bygsm,bzgsm,bt 1 bxgsmrms,bygsmrms,bzgsmrms,btrms,npts, 2 pxgse,pygse,pzgse,pygsm,pzgsm Choose one from: 1001 format(I4,4(1x,I2),6(1x,F9.3),4(1x,F8.3),1x,I5,5(1x,F8.3)) 1001 format(I4,4(1x,I2),6(1x,F9.0),4(1x,F8.0),1x,I5,5(1x,F8.3)) 1001 format(I4,4(1x,I2),6(1x,E9.2),4(1x,E8.1),1x,I5,5(1x,E8.1)) 1001 format(I4,4(1x,I2),6(1x,E9.0),4(1x,E8.0),1x,I5,5(1x,E8.0)) 1001 format(I4,4I3,6F10.0,4F9.0,I6,5F9.1) 1001 format(I4,4I3,6E10.0,4E9.0,I6,5E9.0) C users: (assuming the variable types are properly decalared) <3-s ascii> fscanf(fr,"%d %d %d %d %d %f %f %f %f %f %f %f %f %f %f %f %d", yr,mon,day,hr,min,sec,bxgse,bygse,bzgse,bygsm,bzgsm,bt bxgsmrms,bygsmrms,bzgsmrms,btrms,npts); <1-m ascii> fscanf(fr, "%d %d %d %d %d %d %f %f %f %f %f %f %f %f %f %f %d %f %f %f %f %f", yr,mon,day,hr,min,sec,bxgse,bygse,bzgse,bygsm,bzgsm,bt bxgsmrms,bygsmrms,bzgsmrms,btrms,npts, pxgse,pygse,pzgse,pygsm,pzgsm); <1-h ascii> fscanf(fr, "%d %d %d %d %d %f %f %f %f %f %f %f %f %f %f %d %f %f %f %f %f", yr,mon,day,hr,min,bxgse,bygse,bzgse,bygsm,bzgsm,bt bxgsmrms,bygsmrms,bzgsmrms,btrms,npts, pxgse,pygse,pzgse,pygsm,pzgsm);