;============================================================================= ;dimensions: ; longitude = 36 ; ; latitude = 18 ; ; month = 12 ; ; diurnal = 3 ; ;Variables: ; float cloud_fraction_table(diurnal, month, latitude, longitude) ; ; float ice_cloud_fraction_table(diurnal, month, latitude, longitude) ; ; float water_cloud_fraction_table(diurnal, month, latitude, longitude) ; ; ; ; global attributes: ; :description = "Andy Heidinger made this" ; ; :number_longitudes = 36.f ; ; :number_latitudes = 18.f ; ; :number_months = 12.f ; ; :number_times = 3.f ; ; :latitude_min = -90.f ; ; :latitude_max = 90.f ; ; :longitude_min = -180.f ; ; :longitude_max = 180.f ; ; :longitude_spacing = 10.f ; ; :latitude_spacing = 10.f ; ;============================================================================ pro READ_PRIOR, File_Name, Prior missing = -999.0 sd_id = ncdf_open(File_Name) if (sd_id lt 0) then begin print, 'ERROR: NB Prior File Read Failed' print, 'Default Priors Used' print, ' filename is: ', File_Name return endif ncdf_attget,sd_id, /global, "number_longitudes", nlon_prior ncdf_attget,sd_id, /global, "number_latitudes", nlat_prior ncdf_attget,sd_id, /global, "number_months", nmonths_prior ncdf_attget,sd_id, /global, "number_times", ndiurnal_prior Prior = {nlon: nlon_prior, $ nlat: nlat_prior, $ nmonths: nmonths_prior, $ ndiurnal: ndiurnal_prior, $ dlon: 0.0, $ dlat: 0.0, $ lon_min: 0.0, $ lon_max: 0.0, $ lat_min: 0.0, $ lat_max: 0.0, $ Table: fltarr(nlon_prior,nlat_prior,nmonths_prior, ndiurnal_prior), $ Ice_Table: fltarr(nlon_prior,nlat_prior,nmonths_prior, ndiurnal_prior), $ Water_Table: fltarr(nlon_prior,nlat_prior,nmonths_prior, ndiurnal_prior)} ncdf_attget,sd_id, /global, "longitude_spacing", x & Prior.dlon = x ncdf_attget,sd_id, /global, "latitude_spacing", x & Prior.dlat = x ncdf_attget,sd_id, /global, "longitude_min", x & Prior.lon_min = x ncdf_attget,sd_id, /global, "longitude_max", x & Prior.lon_max = x ncdf_attget,sd_id, /global, "latitude_min", x & Prior.lat_min = x ncdf_attget,sd_id, /global, "latitude_max", x & Prior.lat_max = x sds_id = ncdf_varid(sd_id,'cloud_fraction_table') ncdf_varget, sd_id, sds_id, x & Prior.Table = x x = !null sds_id = ncdf_varid(sd_id,'ice_cloud_fraction_table') if (sds_id ge 0) then begin ncdf_varget, sd_id, sds_id, x & Prior.Ice_Table = x endif else begin Prior.Ice_Table[*,*,*,*] = missing endelse x = !null sds_id = ncdf_varid(sd_id,'water_cloud_fraction_table') if (sds_id ge 0) then begin ncdf_varget, sd_id, sds_id, x & Prior.Water_Table = x endif else begin Prior.Water_Table[*,*,*,*] = missing endelse x = !null ncdf_close, sd_id end