; ; Simple IDL procedure to read half degree netCDF UWM/COADS ; surface marine fluxes. Both monthly and weekly climatologies are ; supported. ; ; Usage: uwmread5,a,time,file_name ; ; Output: ; ; a a 720x180 float array is returned ; ; ; Input: ; ; time for the monthly climatology, enter a number ; from 1 to 12 (jan=1, feb=2,...,dec=12) ; for the weekly climatology, enter a number ; from 1 to 52 for each week of the year. ; file_name netCDF file name (e.g., 'sst_clm.nc') ; ; Example: ; ; IDL> uwmread5,a,12,'sst_clm.nc' ; ; See also: uwm_read.pro to read the 1x1 degree UWM/COADS files. ; ;...................................................................... PRO uwmread5,a,time,filen ; Read data from file ; ------------------- idim = 720 ; horizontal dimension jdim = 360 ; meridional dimension cdfid = NCDF_OPEN(filen) varid = NCDF_VARID(cdfid, 'var') offset = [ 0, 0, time-1 ] count = [ idim, jdim, 1] NCDF_VARGET, cdfid, varid, a, COUNT=count, OFFSET=offset NCDF_CLOSE, cdfid ; Create longitude/latitude ; ------------------------- ; nx = 720 ; ny = 360 ; lat = FINDGEN(ny)*0.5 - 89.75 ; lon = FINDGEN(nx)*0.5 + 0.25 ; All done ; -------- end