pro bin_ex ; This procedure uses the read_netcdf procedure to read in ; WACCM results define arrays that correspond to ut, geopotential height, lon, lat, pressure lev, temp and meridional winds-- A.Fernandez (07.17.06) ; ; ******MUST********* .run read_netcdf ; *******BEFORE****** .run bin-ex.pro ; ;READING NETCDF FILES WITH READ_NETCDF.PRO x=strarr(3) fpath='/sundog/d/alisha/Apr_conhr/' fname='Apr15con.nc' x(0)= fpath+fname fpath='/sundog/d/alisha/Apr_qboehr/' fname='Apr15qboe.nc' x(1)= fpath+fname ;warning: with three files exceeds memory ;fpath='/sundog/d/alisha/Apr_qbowhr/' ;fname='Apr15qbow.nc' ;x(2)= fpath+fname for n=0,1 do begin print, x(n) print, 'n=', n read_netcdf, x(n), data, data_att, status ;which variables are in the file? help, data, /struct ;what are the attributes? for i=0, n_elements(data_att)-1 do print, data_att(i) ut= data.time ht= data.Z3 lon= data.lon lat= data.lat lev= data.lev ;t being the waccm temp with longtitutde and ut(4D) ;temp= data.t ;create a temp array of meridional winds mer=data.v endfor stop end