[Thread Prev][Thread Next][Index]

[ferret_users] creating a mask for calculating Equatable Threat Score(ETS)



SORRY I  FORGOT TO PASTE THE THREAD LINK

http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2006/msg00229.html


Dear ALL users
I have two dataset Observed and Model output with  3months on each file. I want to calcuate ETS for 10mm/day, 20mm/day and 50mm/day threshold. I began by defining mask for observed and model as shown below but got the following error when I want to save the ETS value as .dat.

use "/media/anyuola/Transcend/GEORGE/OBS/cru_pr_Oct_Dec_1997_2002_2006.nc"! d=1
use "/media/anyuola/Transcend/GEORGE/OBS/chirps_monthly_Oct_Dec_1997_2002_2006_rg.nc"! d=2
use "/media/anyuola/Transcend/GEORGE/OBS/cru_pr_Mar_May_1998_2003_2007.nc" ! d=3
use "/media/anyuola/Transcend/GEORGE/OBS/chirps_monthly_mar_may_1998_2003_2007_rg.nc"! d=4

use "/media/anyuola/Transcend/GEORGE/BML/WET/BML_monthly_Oct_Dec_1997_2002_2006.nc" ! d=5
use "/media/anyuola/Transcend/GEORGE/GRELL/WET/GRELL_monthly_Oct_Dec_1997_2002_2006.nc" ! d=6
use "/media/anyuola/Transcend/GEORGE/KF/WET/KF_monthly_Oct_Dec_1997_2002_2006.nc" ! d=7
use "/media/anyuola/Transcend/GEORGE/KFT/WET/KFT_monthly_Oct_Dec_1997_2002_2006.nc" ! d=8

use "/media/anyuola/Transcend/GEORGE/BML/WET/BML_monthly_mar_may_1998_2003_2007.nc" ! d=9
use "/media/anyuola/Transcend/GEORGE/GRELL/WET/GRELL_monthly_mar_may_1998_2003_2007.nc" ! d=10
use "/media/anyuola/Transcend/GEORGE/KF/WET/KF_monthly_mar_may_1998_2003_2007.nc" ! d=11
use "/media/anyuola/Transcend/GEORGE/KFT/WET/KFT_monthly_mar_may_1998_2003_2007.nc" ! d=12



!define threshhold mask
let mask1 = IF pre[i=1:160,j=1:88,l=1:3,d=1] GE 10 then 1
let mask=pre[d=1]*mask1
list mask
stat mask
!let mask1 = IF rainnc[i=1:200,j=1:200,l=1]+rainc[i=1:200,j=1:200,l=1] GE $3 then 1
let mask2 = IF pr[i=1:160,j=1:88,l=1:3,k=1,d=5] GE 10 then 1
let mask1=pr[d=5]*mask2
list mask1
stat mask1

!a is hits yes-yes
let a = IF mask EQ mask1 AND mask EQ 1 then 1
!let a1 = 'a[i=1:199@sum,j=1:199@sum]'
  let a1 = a[i=1:160@sum,j=1:88@sum]
!list a1

!b is forecast yes obs no
let b = IF mask1 EQ 1 AND mask EQ 0 then 1
let b1 = b[i=1:160@sum,j=1:88@sum]

!c is forecast no obs yes
let c = IF mask1 EQ 0 AND mask EQ 1 then 1
let c1 = c[i=1:160@sum,j=1:88@sum]

!d is no no
let d = IF mask EQ mask1 AND mask EQ 0 then 1
let d1 = d[i=1:160@sum,j=1:88@sum]

!ar is  a+b * a+c / a +b +c +d
let ar = ((a1+b1)*(a1+c1))/(a1+b1+c1+d1)

let ets = (a1-ar)/(a1+b1+c1-ar)
save/file =ets.dat ets

let bias = (a1+b1)/(a1+c1)

! bias and ETS are calculated
message/continue "ETS and bias are calculated"


save/file =ets.dat ets
           *** NOTE: Ambiguous coordinates on T axis: PRE[D=1]*MASK1
           *** NOTE: Ambiguous coordinates on T axis: IF MASK EQ MASK1 AND MASK EQ 0 THEN 1
           *** NOTE: Ambiguous coordinates on T axis: IF MASK EQ MASK1 AND MASK EQ 0 THEN 1
           *** NOTE: Ambiguous coordinates on T axis: IF MASK1 EQ 0 AND MASK EQ 1 THEN 1
           *** NOTE: Ambiguous coordinates on T axis: ((A1+B1)*(A1+C1))/(A1+B1+C1+D1)
           *** NOTE: Ambiguous coordinates on T axis: IF MASK1 EQ 1 AND MASK EQ 0 THEN 1
           *** NOTE: Ambiguous coordinates on T axis: IF MASK EQ MASK1 AND MASK EQ 1 THEN 1
           *** NOTE: Ambiguous coordinates on T axis: IF MASK EQ MASK1 AND MASK EQ 1 THEN 1
           *** NOTE: Ambiguous coordinates on T axis: ((A1+B1)*(A1+C1))/(A1+B1+C1+D1)
           *** NOTE: Ambiguous coordinates on T axis: ((A1+B1)*(A1+C1))/(A1+B1+C1+D1)
           *** NOTE: Ambiguous coordinates on T axis: ((A1+B1)*(A1+C1))/(A1+B1+C1+D1)
           *** NOTE: Ambiguous coordinates on T axis: ((A1+B1)*(A1+C1))/(A1+B1+C1+D1)
           *** NOTE: Ambiguous coordinates on T axis: ((A1+B1)*(A1+C1))/(A1+B1+C1+D1)
           *** NOTE: Ambiguous coordinates on T axis: (A1-AR)/(A1+B1+C1-AR)
           *** NOTE: Ambiguous coordinates on T axis: (A1-AR)/(A1+B1+C1-AR)
 **ERROR: illegal limits: MASK1 is not in the range T=35717:39065
          Axis extremes are T=19971002:19971232
LIST/FORMAT=CDF/file =ets.dat ets
Command file, command group, or REPEAT execution aborted


Could someone help here kindly
http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2006/msg00229.html    I have used these thread to follow but seemingly I cant get the correct way out

Attached is two datasets and script


Attachment: test_mask.jnl
Description: Binary data

Attachment: cru_pr_Oct_Dec_1997_2002_2006.nc
Description: Cdf file

Attachment: BML_monthly_Oct_Dec_1997_2002_2006.nc
Description: Cdf file


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement