You are on page 1of 1

pro

r_data, infile=infile,lat,lev,month,afield,pfield,component=component,field=field

if not keyword_set(infile) then infile=''
if not keyword_set(component) then component='e3'
if not keyword_set(field) then field='t'
ncid=NCDF_OPEN(infile,/NOWRITE)

id_lat=NCDF_VARID(ncid,'lat')
NCDF_VARGET,ncid,id_lat,lat
id_lev=NCDF_VARID(ncid,'lev')
NCDF_VARGET,ncid,id_lev,lev
id_month=NCDF_VARID(ncid,'month')
NCDF_VARGET,ncid,id_month, month
id_avar=NCDF_VARID(ncid,'amp_'+component+'_'+field)
NCDF_VARGET,ncid,id_avar,afield
id_pvar=NCDF_VARID(ncid,'phase_'+component+'_'+field)
NCDF_VARGET,ncid,id_pvar,pfield

;amp_di=fltarr(nlat,nlev,nmonth)-999.
;phase_di=fltarr(nlat,nlev,nmonth)-999.

NCDF_CLOSE,ncid

;help,lat,lev,month,afield,pfield
;print,afield(22,43,*)
end

You might also like