; Use this main program as an example of how to call the get_ascat_averaged reading routine version = '_v02.1' ; edit line below to YOUR DATA PATH file_path = 'G:\ftp\ascat\metopa\bmaps' + version + '\' ; enter year, month, day (dates shown here match the verification file data) for year=2007,2007 do begin for month=10,10 do begin for day=22,22 do begin yyyy = string(year,format='(i4.4)') mm = string(month,format='(i2.2)') dd = string(day,format='(i2.2)') for itype=0,2 do begin ; read three types of time_averaged data (1:3-day, 2:week and 3:month) ; create file name of data file to read print,'' case itype of 0: BEGIN ;3-day filename = 'ascat_' + yyyy+mm+dd + version + '_3day.gz' print, '**3-day** file: ' + filename filename = file_path + 'y'+yyyy+'\' + 'm'+mm+'\' + filename END 1: BEGIN ;week week_end = '27' ; weekly files end on saturday, for the verification file saturday is the 27th filename = 'ascat_' + yyyy+mm+week_end + version + '.gz' print, '**weekly** file: ' + filename filename = file_path + 'weeks\' + filename END 2: BEGIN ;month filename = 'ascat_' + yyyy+mm + version + '.gz' print, '**monthly** file: ' + filename filename = file_path + 'y'+yyyy+'\' + 'm'+mm+'\' + filename END endcase ; read scatterometer data get_ascat_averaged,filename, windspd,winddir,scatflag,radrain,sosmap,ierr if(ierr eq 1) then goto, nofile good=where(windspd le 50.0, cntgood) if (cntgood eq 0) then goto, nofile ; write out data in verification file print, ' ilon ilat windspd winddir scatflag radrain sosmap' for ilat=273,277 do begin ;for qscat and seawinds verification 273,277 for ilon=169,174 do begin ;for qscat and seawinds verification 169,174 print,ilon+1,ilat+1,$ windspd[ilon,ilat],winddir[ilon,ilat],$ scatflag[ilon,ilat],radrain[ilon,ilat],$ sosmap[ilon,ilat],$ format='(2i6,2f9.2,i5,2f12.2)' endfor ;ilon endfor ;ilat nofile: if(cntgood eq 0) then print,'file not found: ', filename endfor ;file type endfor ;day endfor ;month endfor ;year end