GridStat trouble reading probabilistic grib field #2107
-
Hi MET team, I am trying to calculate some probability statistics using the grid_stat tool. I have defined my forecast dictionary as such:
When I run grid_stat, it produces the following error:
However, if I remove Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Lindsay: Getting the format right for probabilities can be tough. The True/False is for netCDF files, whereas grib/grib2 files need a dictionary specified in the prob variable. I'm guessing you need to change the format of your input data to look something like: fcst = {
} *I'm not sure if I set the thresh_hi and thresh_lo you are wanting to use as I just picked one that was in the file. But, the above values pull record number 21. If I instead set prob = { name = "TMP"; thresh_hi = 258.15;}, it will pull record number 28. I was able to get it to read data making the changes above. Let me know if this works for you. More information about probability and grib can be found here, and we have a grib probability example on github. Tina |
Beta Was this translation helpful? Give feedback.
Hi Lindsay:
Getting the format right for probabilities can be tough. The True/False is for netCDF files, whereas grib/grib2 files need a dictionary specified in the prob variable. I'm guessing you need to change the format of your input data to look something like:
fcst = {
}
*I'm not sure if I set the thresh_hi and thresh_lo you are wanting to use as I just picked one that was in the file. But, the above values pull record number 21. If I instead set prob = { name = "TMP"; thresh_hi = 258.15;}, it will pull record number 28.
I was able …