function read_nc_psf,filename,rec,idim,jdim,type ;+ ; This can be used to read in any 2D field from a GMI netcdf ; file, not just surface pressure. ; ; Written by SES, updated 7/17/07 ;- cdfid=ncdf_open(filename) ; read in type speciesid=ncdf_varid(cdfid,type) ; Define the dimensions of the array (lon x lat) spec=fltarr(idim,jdim) ; If there is only 1 time record, then use count=[ni,nj]. Last element of ; offset and count is time record. ; ncdf_varget,cdfid,speciesid,spec,count=[idim,jdim,1],offset=[0,0,rec-1] ncdf_close,cdfid return, spec end