; ncl-talk: 17 February 2020: Vanucia Schumacher ; "I would like to know how I can extract the date information (YYYYMMDD) and coords (LAT LON) ; for each non-missing value from the variable obtained? ; ; And how could I plot these points, because they are 14 valid pixels (cells-size) ; and when I plot only 1 pixel appears ;======================================================================================= ; Comment: ; The source array is VERY SPARSELY populated: 99.9999999% of values are missing ; The mean array has 99.9995% missing. ; ; Graphics Response: Raster mode requires 4 'adjacent' grid values to be non-missing ; The data do npt support this requirement ;====================================================================================== ;----- Data dir = "./" fil = systemfunc("cd "+dir+" ; ls nfr_2017_1km.nc") pth = dir+fil dat = addfiles(pth,"r") rname = "nfr" r = dat[:]->$rname$ ;;r@_FillValue = -999 ; why? printVarSummary(r) ; [time | 365] x [lat | 1410] x [lon | 1840] printMinMax(r,0) ;----- Explore input data: (365,1410,1840) optsd = True optsd@PrintStat = True statr = stat_dispersion(r, optsd ) print("-------------------------") ;----- Time mean at each grid point xSumTime = dim_sum_n_Wrap( r, 0 ) printVarSummary(xSumTime) ; (1410,1840) printMinMax(xSumTime,0) ; min=1 max=3 ;----- Explore mean array: (1410,1840) statx = stat_dispersion(xSumTime, optsd ) print("-------------------------") ymdh = cd_calendar(r&time,-3) ; [365]=> yyyymmddhh ;;print(ymdh) ;;print("-------------------------") ;-----Print YMDH, LAT, LON, R YMDH = conform(r,ymdh ,0) ; broadcast (replicate); (365,1410,1840] LAT = conform(r,r&lat,1) ; broadcast (replicate) LON = conform(r,r&lon,2) ; broadcast (replicate) R1D = ndtooned(r) YMDH1D = ndtooned(YMDH) LAT1D = ndtooned(LAT) LON1D = ndtooned(LON) IVALID = ind(.not.ismissing(R1D)) ; 1D indices of non-missing values. print(YMDH1D(IVALID)+" "+LAT1D(IVALID)+" "+LON1D(IVALID)+" "+R1D(IVALID)) ;=====================================================================================