[ncl-talk] Calculation of Significant Values with Grid Data

Atul Saini atulsainimail at gmail.com
Mon Nov 9 06:37:16 MST 2020


Dear NCL,
                     *How to get the significant result using the ttest
function in NCL.*
*                     Please find the script in red below (script and data
files attached) with this mail.*
                     Your suggestion and guidance is highly important to me.
                     Please reply as soon as possible.


;************************************************
;************************************************
;************************************************
begin
;************************************************
; read in netCDF file
;************************************************
anom_main=addfile("Main_RF_JJAS_plus1SD_all_year.nc","r")
nrml_main=addfile("Main_RF_JJAS_plus1SD_Normal_Final.nc","r")
;************************************************
anom_main_a=anom_main->rf(0,:,:)
nrml_main_a=nrml_main->rf(0,:,:)
;************************************************
X = nrml_main_a; treated
Y = anom_main_a; control
;************************************************
siglvl= 0.10
aveX= dim_avg (X) ; 23.6; dim_avg_n (X,0)
aveY= dim_avg (Y) ; 19.222
varX= dim_variance (X); 17.083; dim_variance_n (X,0)
varY= dim_variance (Y); 13.477
XEqv = equiv_sample_size (X, siglvl,0)
YEqv = equiv_sample_size (X, siglvl,0)
wgty = 1
X_N = wgt_areaave (XEqv, wgty, 1., 0); wgty could be gaussian weights
Y_N = wgt_areaave (YEqv, wgty, 1., 0)
iflag = True ; population variance similar
;tval_opt= False ; p-value only
prob = ttest(aveX,varX,X_N,aveY,varY,Y_N,iflag,False)
;************************************************
*print(prob)*
;************************************************
;************************************************
;************************************************
Regards,

*                                   Mob. No. +91-8130662361 /
+91-9868636507*
*
https://www.researchgate.net/profile/Atul_Saini3
<https://www.researchgate.net/profile/Atul_Saini3>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201109/009aef01/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sig_level.ncl
Type: application/octet-stream
Size: 1067 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201109/009aef01/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Main_RF_JJAS_plus1SD_Normal_Final.nc
Type: application/x-netcdf
Size: 73076 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201109/009aef01/attachment-0002.nc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WestCentral_rf_JJAS_plus1SD_all_year.nc
Type: application/x-netcdf
Size: 1011706 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201109/009aef01/attachment-0003.nc>


More information about the ncl-talk mailing list