PRO READ_NETCDF2, infile ;+ ; Name: ; READ_NETCDF_WRF ; Purpose: ; This is program to read in WRF output file and then do a number of statistics on the data. ; READ_NETCDF1 ; Inputs: ; infile : name of wrf ncdf file typically of form "wrfout_d01_0001-01-01_00:00:00" ; Output: ; not sure, will continue to evolve as I add more complexity to it ; Author and history: ; Erik T Crosman, 2009. ;- COMPILE_OPT IDL2 ;Set compile options iid = NCDF_OPEN(infile) ;Open input file ;NCDF_VARGET, iid, 'U', xwind ;Read U wind ;NCDF_VARGET, iid, 'V', Vwind ;Read V wind ;NCDF_VARGET, iid, 'W', Wwind ;Read W wind NCDF_VARGET, iid, 'T', Pert_theta ;Perturbation potential temperature ;NCDF_VARGET, iid, 'ITIMESTEP', timesteps ;Total time steps of various runs ;NCDF_VARGET, iid, 'HFX', sfcflux ;Value of the heat flux ;NCDF_VARGET, iid, 'ZNU', vertical ;Eta values NCDF_ATTGET, iid, 'T', 'longname', T_name NCDF_ATTGET, iid, 'T', 'units', T_units time_name = STRING(T_name) time_units = STRING(T_units) print, time_name print, time_units NCDF_CLOSE, iid ;Close input file ;HELP, U, V, W, T, ITIMESTEP, HFX, ZNU ;Print info about variables HELP, T ;PLOT, w, T, PSYM = 1, /YNOZERO, $ ;Plot data ; XTITLE = 'w', $ ; YTITLE = 'T' END