[gradsusr] Contingency Table
Amulya Chevuturi
amulya.chevuturi at gmail.com
Wed Apr 30 00:18:33 EDT 2014
Dear Grads Users
I am trying to build contingency table for model verification using grads.
Currently my model and observation are both at exactly same resolution. So
I have written the following script. But it is not giving me the count of
Yes/Yes, No/No etc correctly. How am I supposed to build contingency table
using grads if someone can please help.
Following is the script.
'reinit'
'open model.ctl'
'set t 3'
'set y 57 208'
'set x 72 228'
'define a = rain'
'close 1'
'open observation.ctl'
'set t 3'
'set y 57 208'
'set x 72 228'
'define b = prec'
n1=0
n2=0
n3=0
n4=0
j=72
while (j<=228)
'set y 'j
i=57
while (i<=208)
'set x 'i
if(a>0&b>0)
n1=n1+1
else
if(a<=0&b<=0)
n2=n2+1
else
if(a<=0&b>0)
n3=n3+1
else
if(a>0&b<=0)
n4=n4+1
endif
endif
endif
endif
i=i+1
endwhile
j=j+1
endwhile
say n1
say n2
say n3
say n4
'close 1'
Or is anyother method available for making contingency tables for forecast
verification with grads?
Please let me know.
Regards
Amulya Chevuturi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140430/220f6f63/attachment.html
More information about the gradsusr
mailing list