<div dir="ltr">Hi Everyone<div><br></div><div>I sent the following email a while back not sure if it reached the NCL community. </div><div><br></div><div>Kindly let me know if someone has a solution to it. </div><div><br></div><div>Also will the support for NCL be decommissioned prior to complete migration to NCL-python ?</div><div><br></div><div>Regards <br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">ali mughal</strong> <span dir="auto"><<a href="mailto:mughalali655@gmail.com">mughalali655@gmail.com</a>></span><br>Date: Mon, Apr 29, 2024 at 2:49 PM<br>Subject: stat_desp code<br>To: <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>>, Ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>><br></div><br><br><div dir="ltr">Hi <div>My following little code is not providing value of the percentiles probably because of missing values <br><br>dir_agcd = "/data2/WRF_ERA5_out/SWWA/AGCD_regrid_mon/means/"<br>dir_wrf = "/data2/WRF_ERA5_out/SWWA/wrf_seasmean/"<br>ens = "R3"<br>yr_start = "1980"<br>yr_end = "2019"<br>nlon = 523<br>nlat = 346<br>opt = True<br>system("mkdir -p " + diro)<br>f_agcd_tmax = addfile(dir_agcd + "agcd_v1-0-1_" + "tmax_" + yr_start + "_" + yr_end + "_<a href="http://seasmean.nc" target="_blank">seasmean.nc</a>", "r")<br>agcd_tmax = f_agcd_tmax->tmax<br>delete(f_agcd_tmax)<br>f_wrf_tasmax = addfile(dir_wrf + "tasmax_" + ens + "_" + yr_start + "_" + yr_end + "_<a href="http://seasmean.nc" target="_blank">seasmean.nc</a>", "r")<br>wrf_tasmax = (f_wrf_tasmax->tasmax)<br>wrf_tasmax = wrf_tasmax-273<br>delete(f_wrf_tasmax)<br><br>do i = 0, nlat - 1, 1<br> do j = 0, nlon - 1, 1<br> agcd_tmax_out = agcd_tmax(:, i, j)<br> if all(ismissing(agcd_tmax_out)) .eq. False then<br> wrf_tasmax_out = wrf_tasmax(:, i, j)<br> stat_agcd_tmax = stat_dispersion(agcd_tmax_out, opt)<br> stat_wrf_tasmax = stat_dispersion(wrf_tasmax_out, opt)<br> else<br> delete(agcd_tmax_out)<br> end if<br> end do<br>end do<br>print(stat_agcd_tmax)<br>print(stat_wrf_tasmax)<br></div><div><br></div><div>Output </div><div>Variable: stat_agcd_tmax<br>Type: float<br>Total Size: 120 bytes<br> 30 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [30]<br>Coordinates:<br>Number Of Attributes: 2<br> long_name : Robust Dispersion Statistics<br> _FillValue : 1e+20<br>(0) 31.07983<br>(1) 0.768555<br>(2) 29.00586<br>(3) 29.96567<br>(4) 30.07379<br>(5) 30.28866<br>(6) 30.6044<br>(7) 30.78744<br>(8) 31.18414<br>(9) 31.38833<br>(10) 31.58258<br>(11) 31.85179<br>(12) 31.96011<br>(13) 32.05429<br>(14) 32.88403<br>(15) 3.878166<br>(16) 5.046049<br>(17) 0.7660876<br>(18) 156<br>(19) 156<br>(20) 0<br>(21) 0<br>(22) 1e+20<br>(23) 1e+20<br>(24) 1e+20<br>(25) 1e+20<br>(26) 1e+20<br>(27) 1e+20<br>(28) -0.2533386<br>(29) -0.2925659<br><br><br>Variable: stat_wrf_tasmax<br>Type: float<br>Total Size: 120 bytes<br> 30 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [30]<br>Coordinates:<br>Number Of Attributes: 3<br> units : K<br> long_name : Robust Dispersion Statistics: Daily Maximum Near-Surface Air Temperature<br> _FillValue : 1e+20<br>(0) 25.65089<br>(1) 0.8997155<br>(2) 23.26544<br>(3) 24.28622<br>(4) 24.36398<br>(5) 24.49762<br>(6) 25.16293<br>(7) 25.38058<br>(8) 25.80746<br>(9) 26.04553<br>(10) 26.27335<br>(11) 26.43805<br>(12) 26.66354<br>(13) 26.73364<br>(14) 28.01169<br>(15) 4.746246<br>(16) 5.275275<br>(17) 0.8968271<br>(18) 156<br>(19) 156<br>(20) 0<br>(21) 0<br>(22) 1e+20<br>(23) 1e+20<br>(24) 1e+20<br>(25) 1e+20<br>(26) 1e+20<br>(27) 1e+20<br>(28) -0.4017957<br>(29) -0.3656675<br></div><div><br><br></div></div>
</div></div></div>