; Procedure: TRUERR.PRO ; Purpose: List of where range tests fail and where values are ; invalid in 'truewind.pro'. Also prints out number of ; records which are complete, incomplete partially, ; incomplete entirely, and where range tests fail. ; Accessed when selection #1, #2, #3, or the default ; is chosen. PRO truerr, num, crse, cspd, hd, wdir, wspd, wmis, nw, nwpm, nwam, nwf PRINT, ' ' PRINT, '------------------------------------------------------------------------------------' PRINT, ' ' PRINT, ' TRUEWINDS ERRORS' PRINT, ' ******************' for i=0,num-1 do begin if( ((crse(i) LT 0.0)OR(crse(i) GT 360.0)) AND (crse(i) $ NE wmis(0)) ) then $ PRINT, FORMAT="(' Truewinds range test failed. Course value #', I3, ' invalid.')", (i+1) if( (cspd(i) LT 0.0) AND (cspd(i) NE wmis(1)) )then $ PRINT, FORMAT="(' Truewinds range test failed. Vessel speed value #', I3, ' invalid.')", (i+1) if( ((wdir(i) LT 0.0)OR(wdir(i) GT 360.0)) AND (wdir(i) $ NE wmis(2)) ) then $ PRINT, FORMAT="(' Truewinds range test failed. Apparent wind direction value #', I3, ' invalid.')", (i+1) if( (wspd(i) LT 0.0) AND (wspd(i) NE wmis(3)) ) then $ PRINT, FORMAT="(' Truewinds range test failed. Wind speed value #', I3, ' invalid.')", (i+1) if( ((hd(i) LT 0.0)OR(hd(i) GT 360.0)) AND $ (hd(i) NE wmis(4)) ) then $ PRINT, FORMAT="(' Truewinds range test failed. Ship heading value #', I3, ' invalid.')", (i+1) endfor PRINT, ' ' for i=0,num-1 do begin if(crse(i) EQ wmis(0)) then $ PRINT, FORMAT="(' Truewinds data test: Course value #',I3,' missing.')", (i+1) if(cspd(i) EQ wmis(1)) then $ PRINT, FORMAT="(' Truewinds data test: Vessel speed value #',I3,' missing.')", (i+1) if(wdir(i) EQ wmis(2)) then $ PRINT, FORMAT="(' Truewinds data test: Wind direction value #',I3,' missing.')", (i+1) if(wspd(i) EQ wmis(3)) then $ PRINT, FORMAT="(' Truewinds data test: Wind speed value #',I3,' missing.')", (i+1) if(hd(i) EQ wmis(4)) then $ PRINT, FORMAT="(' Truewinds data test: Ship heading value#',I3,' missing.')", (i+1) endfor PRINT, ' ' PRINT, '------------------------------------------------------------------------------------' PRINT, ' ' PRINT, ' SUMMARY OF CONCURRENT OBSERVATIONS' PRINT, ' ************************************' PRINT, ' no data missing =', nw PRINT, ' part of data missing =', nwpm PRINT, ' all data missing =', nwam PRINT, ' failed range tests =', nwf END