[Met_help] [rt.rap.ucar.edu #68775] History for Mode Tool

John Halley Gotway via RT met_help at ucar.edu
Fri Oct 3 12:26:02 MDT 2014


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Hi....

I'm currently using MET software for verification of NWP forecast at the South African Weather Service. I have successfully used the Poinstat and the Gridstat tool and the results are promising. Now I want to use the MODE tool for spatial verification of rainfall forecasts. My questions  is it possible to use the TRMM netcdf data  as observations with the MODE tool ? Please give me some guidance on how to format the TRMM data to the format that will be accepted by the MODE tool.

Thank you in advance
E.P




----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: Mode Tool
From: John Halley Gotway
Time: Wed Aug 27 10:15:29 2014

Elewani,

Yes, you can use TRMM data in MET.  However the tricky step might be
in
getting it and your forecast data on a common grid.  Just like grid-
stat,
MODE requires that the input datasets be on the same grid.

Just go to the MET website:
   http://www.dtcenter.org/met/users/downloads/observation_data.php

And follow the links to the TRMM data.  I'd suggest using the binary
data
which is a little quicker and easier to process.  Then run it through
the
Rscript that's provided on that page to put it in a form that MET can
handle.  Here's an example of pulling a TRMM binary file, reformatting
it
with that Rscript, and then plotting it using the plot_data_plane
tool:

wget
ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/Derived_Products/3B42_V7/Daily/2014/3B42_daily.2014.02.15.7.bin
wget http://www.dtcenter.org/met/users/downloads/Rscripts/trmmbin2nc.R
Rscript trmmbin2nc.R 3B42_daily.2014.02.15.7.bin
3B42_daily.2014.02.15.7.nc
METv4.1/bin/plot_data_plane 3B42_daily.2014.02.15.7.nc
3B42_daily.2014.02.15.7.ps 'name="APCP_24"; level="(*,*)";'

The resulting image is attached.

The TRMM data goes from -50 to 50 degrees latitude all the way around
the
globe at 1/4 degree resolution.  Take a look at the Rscript for the
line:
   # Output domain specification

Those "out_" settings define what portion of the TRMM data you'd like
to
use.  By default it's selecting out a region over the United States
(as
shown in the picture).  But you could easily change those settings to
pull
out data over South Africa.

Hope that helps get you going.

Thanks,
John



On Wed, Aug 27, 2014 at 5:40 AM, Elelwani Phaduli via RT
<met_help at ucar.edu>
wrote:

>
> Wed Aug 27 05:40:02 2014: Request 68775 was acted upon.
> Transaction: Ticket created by Elelwani.Phaduli at weathersa.co.za
>        Queue: met_help
>      Subject: Mode Tool
>        Owner: Nobody
>   Requestors: Elelwani.Phaduli at weathersa.co.za
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68775 >
>
>
> Hi....
>
> I'm currently using MET software for verification of NWP forecast at
the
> South African Weather Service. I have successfully used the Poinstat
and
> the Gridstat tool and the results are promising. Now I want to use
the MODE
> tool for spatial verification of rainfall forecasts. My questions
is it
> possible to use the TRMM netcdf data  as observations with the MODE
tool ?
> Please give me some guidance on how to format the TRMM data to the
format
> that will be accepted by the MODE tool.
>
> Thank you in advance
> E.P
>
>
>
>

------------------------------------------------
Subject: RE: [rt.rap.ucar.edu #68775] Mode Tool
From: Elelwani Phaduli
Time: Thu Sep 18 02:59:21 2014

Hi Paul.

Still experiencing a slight problem with TRMM and model data
preparations. I'm trying to run the MODE tool with the regridded data
but I get the following error.

ERROR  : process_fcst_obs_files() -> The forecast and observation
grids do not match: Projection: Lat/Lon Nx: 81 Ny: 53 lat_ll: 35.000
lon_ll: -15.000 delta_lat: 0.250 delta_lon: 0.250 != Projection:
Lat/Lon Nx: 81 Ny: 53 lat_ll: -35.000 lon_ll: -15.000 delta_lat: 0.250
delta_lon: 0.250

But when I view  my model data using wgrib -V the dimensions looks
right. Same applies to the dimensions of the TRMM data. I used ncdump
to view my TRMM netcdf file.

I have loaded all the data(before and after regridding) into your FTP
server to check.

Thank you in advance.
E.P



-----Original Message-----
From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
Sent: Wednesday, August 27, 2014 6:16 PM
To: Elelwani Phaduli
Subject: Re: [rt.rap.ucar.edu #68775] Mode Tool

Elewani,

Yes, you can use TRMM data in MET.  However the tricky step might be
in getting it and your forecast data on a common grid.  Just like
grid-stat, MODE requires that the input datasets be on the same grid.

Just go to the MET website:
   http://www.dtcenter.org/met/users/downloads/observation_data.php

And follow the links to the TRMM data.  I'd suggest using the binary
data which is a little quicker and easier to process.  Then run it
through the Rscript that's provided on that page to put it in a form
that MET can handle.  Here's an example of pulling a TRMM binary file,
reformatting it with that Rscript, and then plotting it using the
plot_data_plane tool:

wget
ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/Derived_Products/3B42_V7/Daily/2014/3B42_daily.2014.02.15.7.bin
wget http://www.dtcenter.org/met/users/downloads/Rscripts/trmmbin2nc.R
Rscript trmmbin2nc.R 3B42_daily.2014.02.15.7.bin
3B42_daily.2014.02.15.7.nc METv4.1/bin/plot_data_plane
3B42_daily.2014.02.15.7.nc 3B42_daily.2014.02.15.7.ps 'name="APCP_24";
level="(*,*)";'

The resulting image is attached.

The TRMM data goes from -50 to 50 degrees latitude all the way around
the globe at 1/4 degree resolution.  Take a look at the Rscript for
the line:
   # Output domain specification

Those "out_" settings define what portion of the TRMM data you'd like
to use.  By default it's selecting out a region over the United States
(as shown in the picture).  But you could easily change those settings
to pull out data over South Africa.

Hope that helps get you going.

Thanks,
John



On Wed, Aug 27, 2014 at 5:40 AM, Elelwani Phaduli via RT
<met_help at ucar.edu>
wrote:

>
> Wed Aug 27 05:40:02 2014: Request 68775 was acted upon.
> Transaction: Ticket created by Elelwani.Phaduli at weathersa.co.za
>        Queue: met_help
>      Subject: Mode Tool
>        Owner: Nobody
>   Requestors: Elelwani.Phaduli at weathersa.co.za
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68775
> >
>
>
> Hi....
>
> I'm currently using MET software for verification of NWP forecast at
> the South African Weather Service. I have successfully used the
> Poinstat and the Gridstat tool and the results are promising. Now I
> want to use the MODE tool for spatial verification of rainfall
> forecasts. My questions  is it possible to use the TRMM netcdf data
as observations with the MODE tool ?
> Please give me some guidance on how to format the TRMM data to the
> format that will be accepted by the MODE tool.
>
> Thank you in advance
> E.P
>
>
>
>



------------------------------------------------
Subject: Mode Tool
From: John Halley Gotway
Time: Fri Sep 19 11:09:41 2014

Elewani,

Thanks for posting sample data to our ftp site.  I see that you're
trying
to run MODE but are having problems getting the input datasets onto
the
same domain.  Based on the error message you sent, I see the grids
defined
as:

   Projection: Lat/Lon Nx: 81 Ny: 53 lat_ll:  35.000 lon_ll: -15.000
delta_lat: 0.250 delta_lon: 0.250
   Projection: Lat/Lon Nx: 81 Ny: 53 lat_ll: -35.000 lon_ll: -15.000
delta_lat: 0.250 delta_lon: 0.250

The difference here is in "lat_ll" which is set to 35.0 in the
forecast and
-35.0 in the observation.  To debug this, I first ran both of these
file
through the plot_data_plane tool in MET to see an image of them:

   plot_data_plane 2012102000_nmm_d01.0.25.grb
2012102000_nmm_d01.0.25.ps
'name="APCP"; level="A24";'
   plot_data_plane 3B42_daily.2012.10.21.7.nc
3B42_daily.2012.10.21.7.ps
'name="APCP_24"; level="(*,*)";'

I converted the output to png and attached the two images.  As you can
see,
one is over South Africa (lat = -35) and another is over Europe (lat =
35).  But I understand why you're confused.  When you run wgrib, you
see
this:

wgrib -d 1 -V 2012102000_nmm_d01.0.25.grb
  ...
  latlon: lat  -35.000000 to 35.000000 by 0.250000  nxny 4293
          long 15.000000 to 0.250000 by 0.250000, (81 x 53) scan 0
mode 128
bdsgrid 1
  min/max data 0 0  num bits 0  BDS_Ref 0  DecScale 3 BinScale 0

According to this, it looks like the latitudes begin at -35, but the
problem is in how the scanning mode is set.  A scan mode of 0 means
that
the first two bits are 0, meaning that data is read in the +i, -j
direction
(http://www.nco.ncep.noaa.gov/pmb/docs/on388/table8.html).  Basically,
its
reading data top to bottom rather than bottom to top.

The real problem is in the copygb command you ran to regrid to this
1/4
degree domain.  Please try running copygb as shown below.  That should
solve the problem:

   copygb -xg"255 0 81 53 -35000 15000 128 -21500 35000 250 250 64"
2012102000_nmm_d01.rain.grb 2012102000_nmm_d01.0.25_NEW.grb

FYI, an example of running copygb on a lat/lon grid can be found in
the MET
online tutorial:

http://www.dtcenter.org/met/users/support/online_tutorial/METv5.0/copygb/run2.php

After regridding in this way, I was able to run those forecast and
observation file through MET, and they're now on the same grid.

Hope that does the trick.

Thanks,
John Halley Gotway
met_help at ucar.edu

On Thu, Sep 18, 2014 at 2:59 AM, Elelwani Phaduli via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68775 >
>
> Hi Paul.
>
> Still experiencing a slight problem with TRMM and model data
preparations.
> I'm trying to run the MODE tool with the regridded data but I get
the
> following error.
>
> ERROR  : process_fcst_obs_files() -> The forecast and observation
grids do
> not match: Projection: Lat/Lon Nx: 81 Ny: 53 lat_ll: 35.000 lon_ll:
-15.000
> delta_lat: 0.250 delta_lon: 0.250 != Projection: Lat/Lon Nx: 81 Ny:
53
> lat_ll: -35.000 lon_ll: -15.000 delta_lat: 0.250 delta_lon: 0.250
>
> But when I view  my model data using wgrib -V the dimensions looks
right.
> Same applies to the dimensions of the TRMM data. I used ncdump to
view my
> TRMM netcdf file.
>
> I have loaded all the data(before and after regridding) into your
FTP
> server to check.
>
> Thank you in advance.
> E.P
>
>
>
> -----Original Message-----
> From: John Halley Gotway via RT [mailto:met_help at ucar.edu]
> Sent: Wednesday, August 27, 2014 6:16 PM
> To: Elelwani Phaduli
> Subject: Re: [rt.rap.ucar.edu #68775] Mode Tool
>
> Elewani,
>
> Yes, you can use TRMM data in MET.  However the tricky step might be
in
> getting it and your forecast data on a common grid.  Just like grid-
stat,
> MODE requires that the input datasets be on the same grid.
>
> Just go to the MET website:
>    http://www.dtcenter.org/met/users/downloads/observation_data.php
>
> And follow the links to the TRMM data.  I'd suggest using the binary
data
> which is a little quicker and easier to process.  Then run it
through the
> Rscript that's provided on that page to put it in a form that MET
can
> handle.  Here's an example of pulling a TRMM binary file,
reformatting it
> with that Rscript, and then plotting it using the plot_data_plane
tool:
>
> wget
>
>
ftp://disc2.nascom.nasa.gov/data/TRMM/Gridded/Derived_Products/3B42_V7/Daily/2014/3B42_daily.2014.02.15.7.bin
> wget
http://www.dtcenter.org/met/users/downloads/Rscripts/trmmbin2nc.R
> Rscript trmmbin2nc.R 3B42_daily.2014.02.15.7.bin
> 3B42_daily.2014.02.15.7.nc METv4.1/bin/plot_data_plane
> 3B42_daily.2014.02.15.7.nc 3B42_daily.2014.02.15.7.ps
'name="APCP_24";
> level="(*,*)";'
>
> The resulting image is attached.
>
> The TRMM data goes from -50 to 50 degrees latitude all the way
around the
> globe at 1/4 degree resolution.  Take a look at the Rscript for the
line:
>    # Output domain specification
>
> Those "out_" settings define what portion of the TRMM data you'd
like to
> use.  By default it's selecting out a region over the United States
(as
> shown in the picture).  But you could easily change those settings
to pull
> out data over South Africa.
>
> Hope that helps get you going.
>
> Thanks,
> John
>
>
>
> On Wed, Aug 27, 2014 at 5:40 AM, Elelwani Phaduli via RT <
> met_help at ucar.edu>
> wrote:
>
> >
> > Wed Aug 27 05:40:02 2014: Request 68775 was acted upon.
> > Transaction: Ticket created by Elelwani.Phaduli at weathersa.co.za
> >        Queue: met_help
> >      Subject: Mode Tool
> >        Owner: Nobody
> >   Requestors: Elelwani.Phaduli at weathersa.co.za
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=68775
> > >
> >
> >
> > Hi....
> >
> > I'm currently using MET software for verification of NWP forecast
at
> > the South African Weather Service. I have successfully used the
> > Poinstat and the Gridstat tool and the results are promising. Now
I
> > want to use the MODE tool for spatial verification of rainfall
> > forecasts. My questions  is it possible to use the TRMM netcdf
data  as
> observations with the MODE tool ?
> > Please give me some guidance on how to format the TRMM data to the
> > format that will be accepted by the MODE tool.
> >
> > Thank you in advance
> > E.P
> >
> >
> >
> >
>
>
>
>

------------------------------------------------


More information about the Met_help mailing list