pro read_forecast,date,pv_arr,t_arr,m_arr,lats,lons,theta,err=err,source=source,$ nmc=nmc,dir=dir,trop_hgt=trop_hgt,badvals=badvals,standard=standard ;+ ; read the forecast data ; there are three types of files ; the fa file is the augmented file ; the f file is the standard file ; the fNMC file is the NMC only file ;- err=1 source='No Data' if n_elements(dir) eq 0 then dir='Macintosh HD:Applications:RSI:IDL 5.2:my idl stuff:' if strmid(date,0,2) eq '99' then datex='19'+strmid(date,0,2)+'-'+strmid(date,2,2)+'-'+strmid(date,4,2) else $ datex='20'+strmid(date,0,2)+'-'+strmid(date,2,2)+'-'+strmid(date,4,2) seq='a' luke: if keyword_set(nmc) then seq='NMC' if keyword_set(standard) then seq='' if seq ne 'a' then on_ioerror,skipp else on_ioerror,retryit file=dir+'f'+seq+datex+'T12.xdr' openr,unit,/xdr,/get_lun,file i1=long(0) & i2=long(0) readu,unit,i1,i2 theta=0. source='xxx' pv_arr=fltarr(i1,i2) & lons=fltarr(i1) & lats=fltarr(i2) & m_arr=pv_arr & t_arr=pv_arr rdf=pv_arr & trop_hgt=pv_arr readu,unit,pv_arr,t_arr,m_arr,lats,lons,theta,source if seq ne 'a' then goto,bb readu,unit,trop_hgt readu,unit,badvals bb: pv_arr=pv_arr*1.0e5 free_lun,unit lat00=90 lon00=0 err=0 return retryit: ; try a standard file seq='' goto,luke skipp: print,'Unable to find file for: '+file return end