[Met_help] [rt.rap.ucar.edu #92326] History for Projection information off when running MODE

John Halley Gotway via RT met_help at ucar.edu
Fri Sep 27 13:07:38 MDT 2019


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

Hi,

I'm trying to run MODE from MET-8.0 to compare the following files: 
core_cntl_20190514_0000_f00.nc and remap_GOES-16.20190514.000000.nc. 
Before running MODE, I used the command:

bin/regrid_data_plane \
netcdf_file_for_testing_projection.nc \
core_cntl_20190514_0000_f00.nc \
SAR-FV3_information.nc \
-field 'name  = "composite_n0q"; level = "(*,*)"; file_type = NETCDF_MET;' \
-v 4

to get the projection information, which is:

:Projection = "LatLon" ;
:lat_ll = "20.971000 degrees_north" ;
:lon_ll = "239.891000 degrees_east" ;
:delta_lat = "0.025039 degrees" ;
:delta_lon = "0.026816 degrees" ;
:Nlat = "1120 grid_points" ;
:Nlon = "1620 grid_points" ;

However, while MODE is running without an error, it is having a hard 
time identifying the projection information. The raw data is correct, 
but the lat/lon is not. Is there something special I need to do with 
MODE when my projection is "LatLon" and not a defined projection?

I have upload all the data mention here to the directory: 
incoming/irap/met_help/griffin_data/.

Thanks!
Sarah

-- 
----------------------------------------------------------------------------
Sarah M. Griffin
Associate Research Scientist
Cooperative Institute for Meteorological Satellite Studies / SSEC UW-Madison
1225 W Dayton St. Rm 243
Madison, WI 53706
sarah.griffin at ssec.wisc.edu
(608) 262-0986
----------------------------------------------------------------------------




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

Subject: Projection information off when running MODE
From: John Halley Gotway
Time: Wed Sep 25 15:44:12 2019

Hi Sarah,

Thanks for posting your sample data to the FTP site.  Here's the
example
regridding command you referenced:

bin/regrid_data_plane \
netcdf_file_for_testing_projection.nc \ *### MET parses the FROM_GRID
from
this file*
core_cntl_20190514_0000_f00.nc \    *### MET parses the TO_GRID from
this
file*
SAR-FV3_information.nc \
-field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
NETCDF_MET;'
\ *### MET reads this data from first file*
-v 4

MET needs to be able to correctly parse the FROM_GRID from the first
file
and TO_GRID from the second file.

Here's the immediate problem.  You are requesting data from the
netcdf_file_for_testing_projection.nc file with this string:
   -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
NETCDF_MET;'

You are telling MET to interpret this file as following the
*NETCDF_MET*
convention, but it does not!  Instead, it's CF-compliant:
   ncdump -h netcdf_file_for_testing_projection.nc | grep Conventions
   :Conventions = "CF-1.6" ;

I ran the following command to plot the data the way you have it set
up:

*/usr/local/met-8.0/bin/plot_data_plane
netcdf_file_for_testing_projection.nc
<http://netcdf_file_for_testing_projection.nc> \*

*netcdf_file_for_testing_projection.ps
<http://netcdf_file_for_testing_projection.ps> 'name="composite_n0q";
level="(*,*)"; file_type=NETCDF_MET;' -v 4*

This run without error BUT doesn't create an image that can be
displayed.
And when I try processing the same data through pcp_combine, I do get
an
actual error:

*/usr/local/met-8.0/bin/pcp_combine -add
netcdf_file_for_testing_projection.nc
<http://netcdf_file_for_testing_projection.nc> \*
*'name="composite_n0q"; level="(*,*)"; file_type=NETCDF_MET;' add.nc
<http://add.nc> -v 4*
ERROR  : DataPlane::set_constant(double) -> no data buffer allocated!

So while it's doing something, it clearly isn't correct.  Here's the
command you should be running instead (without the
file_type=NETCDF_MET
option).

*/usr/local/met-8.0/bin/regrid_data_plane
netcdf_file_for_testing_projection.nc
<http://netcdf_file_for_testing_projection.nc> \*
*core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
level="(*,*)";'*

DEBUG 1: Reading data file: netcdf_file_for_testing_projection.nc
WARNING:
WARNING: NcCfFile::open() -> could not determine the valid time, using
0.
WARNING:
DEBUG 2: Input grid: Projection: Lat/Lon Nx: 12200 Ny: 5400 lat_ll:
23.000
lon_ll: 126.000 delta_lat: 0.005 delta_lon: 0.005
DEBUG 2: Output grid: Projection: Lat/Lon Nx: 1620 Ny: 1120 lat_ll:
20.971
lon_ll: -239.891 delta_lat: 0.025 delta_lon: 0.027
DEBUG 2: Interpolation options: method = NEAREST, width = 1, shape =
SQUARE, vld_thresh = 0.5

BUT ON MY MACHINE, THIS TOOK OVER 8 MINUTES TO RUN!
And plotting the result:

*plot_data_plane regrid.nc <http://regrid.nc> regrid.ps
<http://regrid.ps>
'name="composite_n0q"; level="(*,*)";'*

Seems like 2 issues in my mind:
(1) Ideally, MET would error out telling you that using -file_type
NETCDF_MET does not work for this.
(2) Ideally, MET would do that regridding step faster.

Hope this helps clarify.

Thanks,
John

On Wed, Sep 25, 2019 at 1:56 PM Julie Prestopnik via RT
<met_help at ucar.edu>
wrote:

>
> Wed Sep 25 13:56:10 2019: Request 92326 was acted upon.
> Transaction: Given to johnhg (John Halley Gotway) by jpresto
>        Queue: met_help
>      Subject: Projection information off when running MODE
>        Owner: johnhg
>   Requestors: sarah.griffin at ssec.wisc.edu
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
>
>
> This transaction appears to have no content
>

------------------------------------------------
Subject: Projection information off when running MODE
From: Sarah Griffin
Time: Thu Sep 26 09:16:20 2019

Hi John,

Thank you for the quick response. Is the attached image, regrid.png,
the
image created from the command:

*/usr/local/met-8.0/bin/regrid_data_plane
netcdf_file_for_testing_projection.nc
<http://netcdf_file_for_testing_projection.nc> \*
*core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
level="(*,*)";'*


Because that unfortunately does not match the domain when I plot the
data in core_cntl.2019051400_f00.nc. I've attached the domain for
core_cntl.2019051400_f00.nc as well as uploaded it to
incoming/irap/met_help/griffin_data/.

Thanks!
Sarah

On 9/25/19 4:44 PM, John Halley Gotway via RT wrote:
> Hi Sarah,
>
> Thanks for posting your sample data to the FTP site.  Here's the
example
> regridding command you referenced:
>
> bin/regrid_data_plane \
> netcdf_file_for_testing_projection.nc \ *### MET parses the
FROM_GRID from
> this file*
> core_cntl_20190514_0000_f00.nc \    *### MET parses the TO_GRID from
this
> file*
> SAR-FV3_information.nc \
> -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
NETCDF_MET;'
> \ *### MET reads this data from first file*
> -v 4
>
> MET needs to be able to correctly parse the FROM_GRID from the first
file
> and TO_GRID from the second file.
>
> Here's the immediate problem.  You are requesting data from the
> netcdf_file_for_testing_projection.nc file with this string:
>     -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
> NETCDF_MET;'
>
> You are telling MET to interpret this file as following the
*NETCDF_MET*
> convention, but it does not!  Instead, it's CF-compliant:
>     ncdump -h netcdf_file_for_testing_projection.nc | grep
Conventions
>     :Conventions = "CF-1.6" ;
>
> I ran the following command to plot the data the way you have it set
up:
>
> */usr/local/met-8.0/bin/plot_data_plane
> netcdf_file_for_testing_projection.nc
> <http://netcdf_file_for_testing_projection.nc> \*
>
> *netcdf_file_for_testing_projection.ps
> <http://netcdf_file_for_testing_projection.ps>
'name="composite_n0q";
> level="(*,*)"; file_type=NETCDF_MET;' -v 4*
>
> This run without error BUT doesn't create an image that can be
displayed.
> And when I try processing the same data through pcp_combine, I do
get an
> actual error:
>
> */usr/local/met-8.0/bin/pcp_combine -add
> netcdf_file_for_testing_projection.nc
> <http://netcdf_file_for_testing_projection.nc> \*
> *'name="composite_n0q"; level="(*,*)"; file_type=NETCDF_MET;' add.nc
> <http://add.nc> -v 4*
> ERROR  : DataPlane::set_constant(double) -> no data buffer
allocated!
>
> So while it's doing something, it clearly isn't correct.  Here's the
> command you should be running instead (without the
file_type=NETCDF_MET
> option).
>
> */usr/local/met-8.0/bin/regrid_data_plane
> netcdf_file_for_testing_projection.nc
> <http://netcdf_file_for_testing_projection.nc> \*
> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
level="(*,*)";'*
>
> DEBUG 1: Reading data file: netcdf_file_for_testing_projection.nc
> WARNING:
> WARNING: NcCfFile::open() -> could not determine the valid time,
using 0.
> WARNING:
> DEBUG 2: Input grid: Projection: Lat/Lon Nx: 12200 Ny: 5400 lat_ll:
23.000
> lon_ll: 126.000 delta_lat: 0.005 delta_lon: 0.005
> DEBUG 2: Output grid: Projection: Lat/Lon Nx: 1620 Ny: 1120 lat_ll:
20.971
> lon_ll: -239.891 delta_lat: 0.025 delta_lon: 0.027
> DEBUG 2: Interpolation options: method = NEAREST, width = 1, shape =
> SQUARE, vld_thresh = 0.5
>
> BUT ON MY MACHINE, THIS TOOK OVER 8 MINUTES TO RUN!
> And plotting the result:
>
> *plot_data_plane regrid.nc <http://regrid.nc> regrid.ps
<http://regrid.ps>
> 'name="composite_n0q"; level="(*,*)";'*
>
> Seems like 2 issues in my mind:
> (1) Ideally, MET would error out telling you that using -file_type
> NETCDF_MET does not work for this.
> (2) Ideally, MET would do that regridding step faster.
>
> Hope this helps clarify.
>
> Thanks,
> John
>
> On Wed, Sep 25, 2019 at 1:56 PM Julie Prestopnik via RT
<met_help at ucar.edu>
> wrote:
>
>> Wed Sep 25 13:56:10 2019: Request 92326 was acted upon.
>> Transaction: Given to johnhg (John Halley Gotway) by jpresto
>>         Queue: met_help
>>       Subject: Projection information off when running MODE
>>         Owner: johnhg
>>    Requestors: sarah.griffin at ssec.wisc.edu
>>        Status: new
>>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
>>
>>
>> This transaction appears to have no content
>>


--
----------------------------------------------------------------------------
Sarah M. Griffin
Associate Research Scientist
Cooperative Institute for Meteorological Satellite Studies / SSEC UW-
Madison
1225 W Dayton St. Rm 243
Madison, WI 53706
sarah.griffin at ssec.wisc.edu
(608) 262-0986
----------------------------------------------------------------------------


------------------------------------------------
Subject: Projection information off when running MODE
From: John Halley Gotway
Time: Fri Sep 27 10:21:46 2019

Sarah,

Ah OK, I understand the problem better now.  Ultimately, the problem
is in
this file:
   core_cntl_20190514_0000_f00.nc

When you plot it, you get the image you sent to me. But when MET plots
it,
you get the odd projection I sent.  To illustrate better, I ran the
following plotting command and attached the resulting png image:

*/usr/local/met-8.0/bin/plot_data_plane core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc> core_cntl_20190514_0000_f00.ps
<http://core_cntl_20190514_0000_f00.ps>
'name="SBTA167_topofatmosphere";
level="(*,*)";'*
*convert -rotate 90 -background white core_cntl_20190514_0000_f00.ps
<http://core_cntl_20190514_0000_f00.ps>
core_cntl_20190514_0000_f00.png*

Looking at the data in that image, you can see the obvious
discrepancies
between the contours of the data and the map outlines.  For example,
the
gray and light blue contours of data in the upper midwest should be
right
over the Great Lakes but they're shifted to the south and west.

And here's the reason for the discrepancy...
(1) The plotting software that you used to create the image you sent
me
used the lat/lon values contained in the variables named Latitude and
Longitude to place pixels of data on the map.
(2) MET used the global attributes that you (or someone) added to this
NetCDF file to define the projection information:
                :MET_version = "V8.0" ;
               :Projection = "LatLon" ;
               :hemisphere = "N" ;
               :lat_ll = "20.971000 degrees_north" ;
               :lon_ll = "239.891000 degrees_east" ;
               :delta_lat = "0.025039 degrees" ;
               :delta_lon = "0.026816 degrees" ;
               :Nlat = "1120 grid_points" ;
               :Nlon = "1620 grid_points" ;

But that projection information clearly is not correct.  Any idea how
this
file was generated?  Once we correct the projection information in
these
files, the problem will be solved.

Thanks,
John

On Thu, Sep 26, 2019 at 9:16 AM Sarah Griffin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
>
> Hi John,
>
> Thank you for the quick response. Is the attached image, regrid.png,
the
> image created from the command:
>
> */usr/local/met-8.0/bin/regrid_data_plane
> netcdf_file_for_testing_projection.nc
> <http://netcdf_file_for_testing_projection.nc> \*
> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
> level="(*,*)";'*
>
>
> Because that unfortunately does not match the domain when I plot the
> data in core_cntl.2019051400_f00.nc. I've attached the domain for
> core_cntl.2019051400_f00.nc as well as uploaded it to
> incoming/irap/met_help/griffin_data/.
>
> Thanks!
> Sarah
>
> On 9/25/19 4:44 PM, John Halley Gotway via RT wrote:
> > Hi Sarah,
> >
> > Thanks for posting your sample data to the FTP site.  Here's the
example
> > regridding command you referenced:
> >
> > bin/regrid_data_plane \
> > netcdf_file_for_testing_projection.nc \ *### MET parses the
FROM_GRID
> from
> > this file*
> > core_cntl_20190514_0000_f00.nc \    *### MET parses the TO_GRID
from
> this
> > file*
> > SAR-FV3_information.nc \
> > -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
> NETCDF_MET;'
> > \ *### MET reads this data from first file*
> > -v 4
> >
> > MET needs to be able to correctly parse the FROM_GRID from the
first file
> > and TO_GRID from the second file.
> >
> > Here's the immediate problem.  You are requesting data from the
> > netcdf_file_for_testing_projection.nc file with this string:
> >     -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
> > NETCDF_MET;'
> >
> > You are telling MET to interpret this file as following the
*NETCDF_MET*
> > convention, but it does not!  Instead, it's CF-compliant:
> >     ncdump -h netcdf_file_for_testing_projection.nc | grep
Conventions
> >     :Conventions = "CF-1.6" ;
> >
> > I ran the following command to plot the data the way you have it
set up:
> >
> > */usr/local/met-8.0/bin/plot_data_plane
> > netcdf_file_for_testing_projection.nc
> > <http://netcdf_file_for_testing_projection.nc> \*
> >
> > *netcdf_file_for_testing_projection.ps
> > <http://netcdf_file_for_testing_projection.ps>
'name="composite_n0q";
> > level="(*,*)"; file_type=NETCDF_MET;' -v 4*
> >
> > This run without error BUT doesn't create an image that can be
displayed.
> > And when I try processing the same data through pcp_combine, I do
get an
> > actual error:
> >
> > */usr/local/met-8.0/bin/pcp_combine -add
> > netcdf_file_for_testing_projection.nc
> > <http://netcdf_file_for_testing_projection.nc> \*
> > *'name="composite_n0q"; level="(*,*)"; file_type=NETCDF_MET;'
add.nc
> > <http://add.nc> -v 4*
> > ERROR  : DataPlane::set_constant(double) -> no data buffer
allocated!
> >
> > So while it's doing something, it clearly isn't correct.  Here's
the
> > command you should be running instead (without the
file_type=NETCDF_MET
> > option).
> >
> > */usr/local/met-8.0/bin/regrid_data_plane
> > netcdf_file_for_testing_projection.nc
> > <http://netcdf_file_for_testing_projection.nc> \*
> > *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
> > regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
> level="(*,*)";'*
> >
> > DEBUG 1: Reading data file: netcdf_file_for_testing_projection.nc
> > WARNING:
> > WARNING: NcCfFile::open() -> could not determine the valid time,
using 0.
> > WARNING:
> > DEBUG 2: Input grid: Projection: Lat/Lon Nx: 12200 Ny: 5400
lat_ll:
> 23.000
> > lon_ll: 126.000 delta_lat: 0.005 delta_lon: 0.005
> > DEBUG 2: Output grid: Projection: Lat/Lon Nx: 1620 Ny: 1120
lat_ll:
> 20.971
> > lon_ll: -239.891 delta_lat: 0.025 delta_lon: 0.027
> > DEBUG 2: Interpolation options: method = NEAREST, width = 1, shape
=
> > SQUARE, vld_thresh = 0.5
> >
> > BUT ON MY MACHINE, THIS TOOK OVER 8 MINUTES TO RUN!
> > And plotting the result:
> >
> > *plot_data_plane regrid.nc <http://regrid.nc> regrid.ps <
> http://regrid.ps>
> > 'name="composite_n0q"; level="(*,*)";'*
> >
> > Seems like 2 issues in my mind:
> > (1) Ideally, MET would error out telling you that using -file_type
> > NETCDF_MET does not work for this.
> > (2) Ideally, MET would do that regridding step faster.
> >
> > Hope this helps clarify.
> >
> > Thanks,
> > John
> >
> > On Wed, Sep 25, 2019 at 1:56 PM Julie Prestopnik via RT <
> met_help at ucar.edu>
> > wrote:
> >
> >> Wed Sep 25 13:56:10 2019: Request 92326 was acted upon.
> >> Transaction: Given to johnhg (John Halley Gotway) by jpresto
> >>         Queue: met_help
> >>       Subject: Projection information off when running MODE
> >>         Owner: johnhg
> >>    Requestors: sarah.griffin at ssec.wisc.edu
> >>        Status: new
> >>   Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326
> >
> >>
> >>
> >> This transaction appears to have no content
> >>
>
>
> --
>
>
----------------------------------------------------------------------------
> Sarah M. Griffin
> Associate Research Scientist
> Cooperative Institute for Meteorological Satellite Studies / SSEC
> UW-Madison
> 1225 W Dayton St. Rm 243
> Madison, WI 53706
> sarah.griffin at ssec.wisc.edu
> (608) 262-0986
>
>
----------------------------------------------------------------------------
>
>
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #92326] Projection information off when running MODE
From: Sarah Griffin
Time: Fri Sep 27 10:50:59 2019

Hi John,

Ok, I'll start from the beginning. All of this data has been added to
the ftp site.

I'm starting with the file: core_mp2_20190524_0000_f12.grib2.
I then use wgrib2 to create the file model.nc. wgrib2 has been added
to
the ftp site as well.

I then run the command:
bin/regrid_data_plane \
netcdf_file_for_testing_projection.nc \
model.nc \
SAR-FV3_information.nc \
-field 'name="composite_n0q"; level="(*,*)";' \
-v 4

to get the projection information.

This projection information is what was added to
core_cntl.2019051400_f00.nc before it was run through MODE.

So, I won't use core_cntl.2019051400_f00.nc for remapping. However
there
doesn't appear to be a difference in the projection information when I
remap to a file that doesn't have any projection information.

- Sarah

On 9/27/19 11:21 AM, John Halley Gotway via RT wrote:
> Sarah,
>
> Ah OK, I understand the problem better now.  Ultimately, the problem
is in
> this file:
>     core_cntl_20190514_0000_f00.nc
>
> When you plot it, you get the image you sent to me. But when MET
plots it,
> you get the odd projection I sent.  To illustrate better, I ran the
> following plotting command and attached the resulting png image:
>
> */usr/local/met-8.0/bin/plot_data_plane
core_cntl_20190514_0000_f00.nc
> <http://core_cntl_20190514_0000_f00.nc>
core_cntl_20190514_0000_f00.ps
> <http://core_cntl_20190514_0000_f00.ps>
'name="SBTA167_topofatmosphere";
> level="(*,*)";'*
> *convert -rotate 90 -background white core_cntl_20190514_0000_f00.ps
> <http://core_cntl_20190514_0000_f00.ps>
core_cntl_20190514_0000_f00.png*
>
> Looking at the data in that image, you can see the obvious
discrepancies
> between the contours of the data and the map outlines.  For example,
the
> gray and light blue contours of data in the upper midwest should be
right
> over the Great Lakes but they're shifted to the south and west.
>
> And here's the reason for the discrepancy...
> (1) The plotting software that you used to create the image you sent
me
> used the lat/lon values contained in the variables named Latitude
and
> Longitude to place pixels of data on the map.
> (2) MET used the global attributes that you (or someone) added to
this
> NetCDF file to define the projection information:
>                  :MET_version = "V8.0" ;
>                 :Projection = "LatLon" ;
>                 :hemisphere = "N" ;
>                 :lat_ll = "20.971000 degrees_north" ;
>                 :lon_ll = "239.891000 degrees_east" ;
>                 :delta_lat = "0.025039 degrees" ;
>                 :delta_lon = "0.026816 degrees" ;
>                 :Nlat = "1120 grid_points" ;
>                 :Nlon = "1620 grid_points" ;
>
> But that projection information clearly is not correct.  Any idea
how this
> file was generated?  Once we correct the projection information in
these
> files, the problem will be solved.
>
> Thanks,
> John
>
> On Thu, Sep 26, 2019 at 9:16 AM Sarah Griffin via RT
<met_help at ucar.edu>
> wrote:
>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
>>
>> Hi John,
>>
>> Thank you for the quick response. Is the attached image,
regrid.png, the
>> image created from the command:
>>
>> */usr/local/met-8.0/bin/regrid_data_plane
>> netcdf_file_for_testing_projection.nc
>> <http://netcdf_file_for_testing_projection.nc> \*
>> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
>> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
>> level="(*,*)";'*
>>
>>
>> Because that unfortunately does not match the domain when I plot
the
>> data in core_cntl.2019051400_f00.nc. I've attached the domain for
>> core_cntl.2019051400_f00.nc as well as uploaded it to
>> incoming/irap/met_help/griffin_data/.
>>
>> Thanks!
>> Sarah
>>
>> On 9/25/19 4:44 PM, John Halley Gotway via RT wrote:
>>> Hi Sarah,
>>>
>>> Thanks for posting your sample data to the FTP site.  Here's the
example
>>> regridding command you referenced:
>>>
>>> bin/regrid_data_plane \
>>> netcdf_file_for_testing_projection.nc \ *### MET parses the
FROM_GRID
>> from
>>> this file*
>>> core_cntl_20190514_0000_f00.nc \    *### MET parses the TO_GRID
from
>> this
>>> file*
>>> SAR-FV3_information.nc \
>>> -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
>> NETCDF_MET;'
>>> \ *### MET reads this data from first file*
>>> -v 4
>>>
>>> MET needs to be able to correctly parse the FROM_GRID from the
first file
>>> and TO_GRID from the second file.
>>>
>>> Here's the immediate problem.  You are requesting data from the
>>> netcdf_file_for_testing_projection.nc file with this string:
>>>      -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
>>> NETCDF_MET;'
>>>
>>> You are telling MET to interpret this file as following the
*NETCDF_MET*
>>> convention, but it does not!  Instead, it's CF-compliant:
>>>      ncdump -h netcdf_file_for_testing_projection.nc | grep
Conventions
>>>      :Conventions = "CF-1.6" ;
>>>
>>> I ran the following command to plot the data the way you have it
set up:
>>>
>>> */usr/local/met-8.0/bin/plot_data_plane
>>> netcdf_file_for_testing_projection.nc
>>> <http://netcdf_file_for_testing_projection.nc> \*
>>>
>>> *netcdf_file_for_testing_projection.ps
>>> <http://netcdf_file_for_testing_projection.ps>
'name="composite_n0q";
>>> level="(*,*)"; file_type=NETCDF_MET;' -v 4*
>>>
>>> This run without error BUT doesn't create an image that can be
displayed.
>>> And when I try processing the same data through pcp_combine, I do
get an
>>> actual error:
>>>
>>> */usr/local/met-8.0/bin/pcp_combine -add
>>> netcdf_file_for_testing_projection.nc
>>> <http://netcdf_file_for_testing_projection.nc> \*
>>> *'name="composite_n0q"; level="(*,*)"; file_type=NETCDF_MET;'
add.nc
>>> <http://add.nc> -v 4*
>>> ERROR  : DataPlane::set_constant(double) -> no data buffer
allocated!
>>>
>>> So while it's doing something, it clearly isn't correct.  Here's
the
>>> command you should be running instead (without the
file_type=NETCDF_MET
>>> option).
>>>
>>> */usr/local/met-8.0/bin/regrid_data_plane
>>> netcdf_file_for_testing_projection.nc
>>> <http://netcdf_file_for_testing_projection.nc> \*
>>> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
>>> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
>> level="(*,*)";'*
>>> DEBUG 1: Reading data file: netcdf_file_for_testing_projection.nc
>>> WARNING:
>>> WARNING: NcCfFile::open() -> could not determine the valid time,
using 0.
>>> WARNING:
>>> DEBUG 2: Input grid: Projection: Lat/Lon Nx: 12200 Ny: 5400
lat_ll:
>> 23.000
>>> lon_ll: 126.000 delta_lat: 0.005 delta_lon: 0.005
>>> DEBUG 2: Output grid: Projection: Lat/Lon Nx: 1620 Ny: 1120
lat_ll:
>> 20.971
>>> lon_ll: -239.891 delta_lat: 0.025 delta_lon: 0.027
>>> DEBUG 2: Interpolation options: method = NEAREST, width = 1, shape
=
>>> SQUARE, vld_thresh = 0.5
>>>
>>> BUT ON MY MACHINE, THIS TOOK OVER 8 MINUTES TO RUN!
>>> And plotting the result:
>>>
>>> *plot_data_plane regrid.nc <http://regrid.nc> regrid.ps <
>> http://regrid.ps>
>>> 'name="composite_n0q"; level="(*,*)";'*
>>>
>>> Seems like 2 issues in my mind:
>>> (1) Ideally, MET would error out telling you that using -file_type
>>> NETCDF_MET does not work for this.
>>> (2) Ideally, MET would do that regridding step faster.
>>>
>>> Hope this helps clarify.
>>>
>>> Thanks,
>>> John
>>>
>>> On Wed, Sep 25, 2019 at 1:56 PM Julie Prestopnik via RT <
>> met_help at ucar.edu>
>>> wrote:
>>>
>>>> Wed Sep 25 13:56:10 2019: Request 92326 was acted upon.
>>>> Transaction: Given to johnhg (John Halley Gotway) by jpresto
>>>>          Queue: met_help
>>>>        Subject: Projection information off when running MODE
>>>>          Owner: johnhg
>>>>     Requestors: sarah.griffin at ssec.wisc.edu
>>>>         Status: new
>>>>    Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326
>>>>
>>>> This transaction appears to have no content
>>>>
>>
>> --
>>
>>
----------------------------------------------------------------------------
>> Sarah M. Griffin
>> Associate Research Scientist
>> Cooperative Institute for Meteorological Satellite Studies / SSEC
>> UW-Madison
>> 1225 W Dayton St. Rm 243
>> Madison, WI 53706
>> sarah.griffin at ssec.wisc.edu
>> (608) 262-0986
>>
>>
----------------------------------------------------------------------------
>>
>>
>>


--
----------------------------------------------------------------------------
Sarah M. Griffin
Associate Research Scientist
Cooperative Institute for Meteorological Satellite Studies / SSEC UW-
Madison
1225 W Dayton St. Rm 243
Madison, WI 53706
sarah.griffin at ssec.wisc.edu
(608) 262-0986
----------------------------------------------------------------------------



------------------------------------------------
Subject: Projection information off when running MODE
From: John Halley Gotway
Time: Fri Sep 27 11:21:08 2019

Sarah,

The good news is that MET reads the GRIB2 data just fine, including
the
projection information.  Here's plotting it with plot_data_plane:

*/usr/local/met-8.0/bin/plot_data_plane
core_mp2_20190524_0000_f12.grib2
core_mp2_20190524_0000_f12_grib2.ps
<http://core_mp2_20190524_0000_f12_grib2.ps> 'name="SBTA167";
level="L0";'
-v 4*

And running at verbosity level 4, it even prints the projection info
for
this 1620x1120 Lambert Conformal grid:
DEBUG 4: Lambert Conformal Grid Data:
DEBUG 4:    hemisphere: N


DEBUG 4:   scale_lat_1: 38.5
DEBUG 4:   scale_lat_2: 38.5
DEBUG 4:       lat_pin: 20.971
DEBUG 4:       lon_pin: 120.109
DEBUG 4:         x_pin: 0
DEBUG 4:         y_pin: 0
DEBUG 4:    lon_orient: 97.5
DEBUG 4:          d_km: 3
DEBUG 4:          r_km: 6371.2
DEBUG 4:            nx: 1620
DEBUG 4:            ny: 1120
DEBUG 4:     so2_angle: 0

I think that converting to NetCDF is just causing confusion.  Another
way
to see what this NetCDF attributes would need to be would be by
running
pcp_combine as a pass-through:

*/usr/local/met-8.0/bin/pcp_combine -add
core_mp2_20190524_0000_f12.grib2
'name="SBTA167"; level="L0";' core_mp2_20190524_0000_f12_SBTA167.nc*

And then run ncdump -h on the output:
               :MET_version = "V8.0" ;
               :Projection = "Lambert Conformal" ;
               :hemisphere = "N" ;
               :scale_lat_1 = "38.500000" ;
               :scale_lat_2 = "38.500000" ;
               :lat_pin = "20.971000" ;
               :lon_pin = "-120.109000" ;
               :x_pin = "0.000000" ;
               :y_pin = "0.000000" ;
               :lon_orient = "-97.500000" ;
               :d_km = "3.000000" ;
               :r_km = "6371.200000" ;
               :nx = "1620" ;
               :ny = "1120 grid_points" ;

You'd encoded the grid information as being a lat/lon grid, but this
data
is actually on a Lambert Conformal projection.  Please let me know if
you
have more questions or are stuck on figuring out the order of the
tools to
run.

Thanks,
John

On Fri, Sep 27, 2019 at 10:51 AM Sarah Griffin via RT
<met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
>
> Hi John,
>
> Ok, I'll start from the beginning. All of this data has been added
to
> the ftp site.
>
> I'm starting with the file: core_mp2_20190524_0000_f12.grib2.
> I then use wgrib2 to create the file model.nc. wgrib2 has been added
to
> the ftp site as well.
>
> I then run the command:
> bin/regrid_data_plane \
> netcdf_file_for_testing_projection.nc \
> model.nc \
> SAR-FV3_information.nc \
> -field 'name="composite_n0q"; level="(*,*)";' \
> -v 4
>
> to get the projection information.
>
> This projection information is what was added to
> core_cntl.2019051400_f00.nc before it was run through MODE.
>
> So, I won't use core_cntl.2019051400_f00.nc for remapping. However
there
> doesn't appear to be a difference in the projection information when
I
> remap to a file that doesn't have any projection information.
>
> - Sarah
>
> On 9/27/19 11:21 AM, John Halley Gotway via RT wrote:
> > Sarah,
> >
> > Ah OK, I understand the problem better now.  Ultimately, the
problem is
> in
> > this file:
> >     core_cntl_20190514_0000_f00.nc
> >
> > When you plot it, you get the image you sent to me. But when MET
plots
> it,
> > you get the odd projection I sent.  To illustrate better, I ran
the
> > following plotting command and attached the resulting png image:
> >
> > */usr/local/met-8.0/bin/plot_data_plane
core_cntl_20190514_0000_f00.nc
> > <http://core_cntl_20190514_0000_f00.nc>
core_cntl_20190514_0000_f00.ps
> > <http://core_cntl_20190514_0000_f00.ps>
'name="SBTA167_topofatmosphere";
> > level="(*,*)";'*
> > *convert -rotate 90 -background white
core_cntl_20190514_0000_f00.ps
> > <http://core_cntl_20190514_0000_f00.ps>
core_cntl_20190514_0000_f00.png*
> >
> > Looking at the data in that image, you can see the obvious
discrepancies
> > between the contours of the data and the map outlines.  For
example, the
> > gray and light blue contours of data in the upper midwest should
be right
> > over the Great Lakes but they're shifted to the south and west.
> >
> > And here's the reason for the discrepancy...
> > (1) The plotting software that you used to create the image you
sent me
> > used the lat/lon values contained in the variables named Latitude
and
> > Longitude to place pixels of data on the map.
> > (2) MET used the global attributes that you (or someone) added to
this
> > NetCDF file to define the projection information:
> >                  :MET_version = "V8.0" ;
> >                 :Projection = "LatLon" ;
> >                 :hemisphere = "N" ;
> >                 :lat_ll = "20.971000 degrees_north" ;
> >                 :lon_ll = "239.891000 degrees_east" ;
> >                 :delta_lat = "0.025039 degrees" ;
> >                 :delta_lon = "0.026816 degrees" ;
> >                 :Nlat = "1120 grid_points" ;
> >                 :Nlon = "1620 grid_points" ;
> >
> > But that projection information clearly is not correct.  Any idea
how
> this
> > file was generated?  Once we correct the projection information in
these
> > files, the problem will be solved.
> >
> > Thanks,
> > John
> >
> > On Thu, Sep 26, 2019 at 9:16 AM Sarah Griffin via RT
<met_help at ucar.edu>
> > wrote:
> >
> >> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
> >>
> >> Hi John,
> >>
> >> Thank you for the quick response. Is the attached image,
regrid.png, the
> >> image created from the command:
> >>
> >> */usr/local/met-8.0/bin/regrid_data_plane
> >> netcdf_file_for_testing_projection.nc
> >> <http://netcdf_file_for_testing_projection.nc> \*
> >> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
> >> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
> >> level="(*,*)";'*
> >>
> >>
> >> Because that unfortunately does not match the domain when I plot
the
> >> data in core_cntl.2019051400_f00.nc. I've attached the domain for
> >> core_cntl.2019051400_f00.nc as well as uploaded it to
> >> incoming/irap/met_help/griffin_data/.
> >>
> >> Thanks!
> >> Sarah
> >>
> >> On 9/25/19 4:44 PM, John Halley Gotway via RT wrote:
> >>> Hi Sarah,
> >>>
> >>> Thanks for posting your sample data to the FTP site.  Here's the
> example
> >>> regridding command you referenced:
> >>>
> >>> bin/regrid_data_plane \
> >>> netcdf_file_for_testing_projection.nc \ *### MET parses the
FROM_GRID
> >> from
> >>> this file*
> >>> core_cntl_20190514_0000_f00.nc \    *### MET parses the TO_GRID
from
> >> this
> >>> file*
> >>> SAR-FV3_information.nc \
> >>> -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
> >> NETCDF_MET;'
> >>> \ *### MET reads this data from first file*
> >>> -v 4
> >>>
> >>> MET needs to be able to correctly parse the FROM_GRID from the
first
> file
> >>> and TO_GRID from the second file.
> >>>
> >>> Here's the immediate problem.  You are requesting data from the
> >>> netcdf_file_for_testing_projection.nc file with this string:
> >>>      -field 'name  = "composite_n0q"; level = "(*,*)"; file_type
=
> >>> NETCDF_MET;'
> >>>
> >>> You are telling MET to interpret this file as following the
> *NETCDF_MET*
> >>> convention, but it does not!  Instead, it's CF-compliant:
> >>>      ncdump -h netcdf_file_for_testing_projection.nc | grep
> Conventions
> >>>      :Conventions = "CF-1.6" ;
> >>>
> >>> I ran the following command to plot the data the way you have it
set
> up:
> >>>
> >>> */usr/local/met-8.0/bin/plot_data_plane
> >>> netcdf_file_for_testing_projection.nc
> >>> <http://netcdf_file_for_testing_projection.nc> \*
> >>>
> >>> *netcdf_file_for_testing_projection.ps
> >>> <http://netcdf_file_for_testing_projection.ps>
'name="composite_n0q";
> >>> level="(*,*)"; file_type=NETCDF_MET;' -v 4*
> >>>
> >>> This run without error BUT doesn't create an image that can be
> displayed.
> >>> And when I try processing the same data through pcp_combine, I
do get
> an
> >>> actual error:
> >>>
> >>> */usr/local/met-8.0/bin/pcp_combine -add
> >>> netcdf_file_for_testing_projection.nc
> >>> <http://netcdf_file_for_testing_projection.nc> \*
> >>> *'name="composite_n0q"; level="(*,*)"; file_type=NETCDF_MET;'
add.nc
> >>> <http://add.nc> -v 4*
> >>> ERROR  : DataPlane::set_constant(double) -> no data buffer
allocated!
> >>>
> >>> So while it's doing something, it clearly isn't correct.  Here's
the
> >>> command you should be running instead (without the
file_type=NETCDF_MET
> >>> option).
> >>>
> >>> */usr/local/met-8.0/bin/regrid_data_plane
> >>> netcdf_file_for_testing_projection.nc
> >>> <http://netcdf_file_for_testing_projection.nc> \*
> >>> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc
> >
> >>> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
> >> level="(*,*)";'*
> >>> DEBUG 1: Reading data file:
netcdf_file_for_testing_projection.nc
> >>> WARNING:
> >>> WARNING: NcCfFile::open() -> could not determine the valid time,
using
> 0.
> >>> WARNING:
> >>> DEBUG 2: Input grid: Projection: Lat/Lon Nx: 12200 Ny: 5400
lat_ll:
> >> 23.000
> >>> lon_ll: 126.000 delta_lat: 0.005 delta_lon: 0.005
> >>> DEBUG 2: Output grid: Projection: Lat/Lon Nx: 1620 Ny: 1120
lat_ll:
> >> 20.971
> >>> lon_ll: -239.891 delta_lat: 0.025 delta_lon: 0.027
> >>> DEBUG 2: Interpolation options: method = NEAREST, width = 1,
shape =
> >>> SQUARE, vld_thresh = 0.5
> >>>
> >>> BUT ON MY MACHINE, THIS TOOK OVER 8 MINUTES TO RUN!
> >>> And plotting the result:
> >>>
> >>> *plot_data_plane regrid.nc <http://regrid.nc> regrid.ps <
> >> http://regrid.ps>
> >>> 'name="composite_n0q"; level="(*,*)";'*
> >>>
> >>> Seems like 2 issues in my mind:
> >>> (1) Ideally, MET would error out telling you that using
-file_type
> >>> NETCDF_MET does not work for this.
> >>> (2) Ideally, MET would do that regridding step faster.
> >>>
> >>> Hope this helps clarify.
> >>>
> >>> Thanks,
> >>> John
> >>>
> >>> On Wed, Sep 25, 2019 at 1:56 PM Julie Prestopnik via RT <
> >> met_help at ucar.edu>
> >>> wrote:
> >>>
> >>>> Wed Sep 25 13:56:10 2019: Request 92326 was acted upon.
> >>>> Transaction: Given to johnhg (John Halley Gotway) by jpresto
> >>>>          Queue: met_help
> >>>>        Subject: Projection information off when running MODE
> >>>>          Owner: johnhg
> >>>>     Requestors: sarah.griffin at ssec.wisc.edu
> >>>>         Status: new
> >>>>    Ticket <URL:
> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326
> >>>>
> >>>> This transaction appears to have no content
> >>>>
> >>
> >> --
> >>
> >>
>
----------------------------------------------------------------------------
> >> Sarah M. Griffin
> >> Associate Research Scientist
> >> Cooperative Institute for Meteorological Satellite Studies / SSEC
> >> UW-Madison
> >> 1225 W Dayton St. Rm 243
> >> Madison, WI 53706
> >> sarah.griffin at ssec.wisc.edu
> >> (608) 262-0986
> >>
> >>
>
----------------------------------------------------------------------------
> >>
> >>
> >>
>
>
> --
>
>
----------------------------------------------------------------------------
> Sarah M. Griffin
> Associate Research Scientist
> Cooperative Institute for Meteorological Satellite Studies / SSEC
> UW-Madison
> 1225 W Dayton St. Rm 243
> Madison, WI 53706
> sarah.griffin at ssec.wisc.edu
> (608) 262-0986
>
>
----------------------------------------------------------------------------
>
>
>
>

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #92326] Projection information off when running MODE
From: Sarah Griffin
Time: Fri Sep 27 12:13:28 2019

Thank you John! I did not know about plot_data_plane to get the
projection information. I'll add that to my list of ways to get the
projection information.

Have a great day!
Sarah

On 9/27/19 12:21 PM, John Halley Gotway via RT wrote:
> Sarah,
>
> The good news is that MET reads the GRIB2 data just fine, including
the
> projection information.  Here's plotting it with plot_data_plane:
>
> */usr/local/met-8.0/bin/plot_data_plane
core_mp2_20190524_0000_f12.grib2
> core_mp2_20190524_0000_f12_grib2.ps
> <http://core_mp2_20190524_0000_f12_grib2.ps> 'name="SBTA167";
level="L0";'
> -v 4*
>
> And running at verbosity level 4, it even prints the projection info
for
> this 1620x1120 Lambert Conformal grid:
> DEBUG 4: Lambert Conformal Grid Data:
> DEBUG 4:    hemisphere: N
>
>
> DEBUG 4:   scale_lat_1: 38.5
> DEBUG 4:   scale_lat_2: 38.5
> DEBUG 4:       lat_pin: 20.971
> DEBUG 4:       lon_pin: 120.109
> DEBUG 4:         x_pin: 0
> DEBUG 4:         y_pin: 0
> DEBUG 4:    lon_orient: 97.5
> DEBUG 4:          d_km: 3
> DEBUG 4:          r_km: 6371.2
> DEBUG 4:            nx: 1620
> DEBUG 4:            ny: 1120
> DEBUG 4:     so2_angle: 0
>
> I think that converting to NetCDF is just causing confusion.
Another way
> to see what this NetCDF attributes would need to be would be by
running
> pcp_combine as a pass-through:
>
> */usr/local/met-8.0/bin/pcp_combine -add
core_mp2_20190524_0000_f12.grib2
> 'name="SBTA167"; level="L0";' core_mp2_20190524_0000_f12_SBTA167.nc*
>
> And then run ncdump -h on the output:
>                 :MET_version = "V8.0" ;
>                 :Projection = "Lambert Conformal" ;
>                 :hemisphere = "N" ;
>                 :scale_lat_1 = "38.500000" ;
>                 :scale_lat_2 = "38.500000" ;
>                 :lat_pin = "20.971000" ;
>                 :lon_pin = "-120.109000" ;
>                 :x_pin = "0.000000" ;
>                 :y_pin = "0.000000" ;
>                 :lon_orient = "-97.500000" ;
>                 :d_km = "3.000000" ;
>                 :r_km = "6371.200000" ;
>                 :nx = "1620" ;
>                 :ny = "1120 grid_points" ;
>
> You'd encoded the grid information as being a lat/lon grid, but this
data
> is actually on a Lambert Conformal projection.  Please let me know
if you
> have more questions or are stuck on figuring out the order of the
tools to
> run.
>
> Thanks,
> John
>
> On Fri, Sep 27, 2019 at 10:51 AM Sarah Griffin via RT
<met_help at ucar.edu>
> wrote:
>
>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
>>
>> Hi John,
>>
>> Ok, I'll start from the beginning. All of this data has been added
to
>> the ftp site.
>>
>> I'm starting with the file: core_mp2_20190524_0000_f12.grib2.
>> I then use wgrib2 to create the file model.nc. wgrib2 has been
added to
>> the ftp site as well.
>>
>> I then run the command:
>> bin/regrid_data_plane \
>> netcdf_file_for_testing_projection.nc \
>> model.nc \
>> SAR-FV3_information.nc \
>> -field 'name="composite_n0q"; level="(*,*)";' \
>> -v 4
>>
>> to get the projection information.
>>
>> This projection information is what was added to
>> core_cntl.2019051400_f00.nc before it was run through MODE.
>>
>> So, I won't use core_cntl.2019051400_f00.nc for remapping. However
there
>> doesn't appear to be a difference in the projection information
when I
>> remap to a file that doesn't have any projection information.
>>
>> - Sarah
>>
>> On 9/27/19 11:21 AM, John Halley Gotway via RT wrote:
>>> Sarah,
>>>
>>> Ah OK, I understand the problem better now.  Ultimately, the
problem is
>> in
>>> this file:
>>>      core_cntl_20190514_0000_f00.nc
>>>
>>> When you plot it, you get the image you sent to me. But when MET
plots
>> it,
>>> you get the odd projection I sent.  To illustrate better, I ran
the
>>> following plotting command and attached the resulting png image:
>>>
>>> */usr/local/met-8.0/bin/plot_data_plane
core_cntl_20190514_0000_f00.nc
>>> <http://core_cntl_20190514_0000_f00.nc>
core_cntl_20190514_0000_f00.ps
>>> <http://core_cntl_20190514_0000_f00.ps>
'name="SBTA167_topofatmosphere";
>>> level="(*,*)";'*
>>> *convert -rotate 90 -background white
core_cntl_20190514_0000_f00.ps
>>> <http://core_cntl_20190514_0000_f00.ps>
core_cntl_20190514_0000_f00.png*
>>>
>>> Looking at the data in that image, you can see the obvious
discrepancies
>>> between the contours of the data and the map outlines.  For
example, the
>>> gray and light blue contours of data in the upper midwest should
be right
>>> over the Great Lakes but they're shifted to the south and west.
>>>
>>> And here's the reason for the discrepancy...
>>> (1) The plotting software that you used to create the image you
sent me
>>> used the lat/lon values contained in the variables named Latitude
and
>>> Longitude to place pixels of data on the map.
>>> (2) MET used the global attributes that you (or someone) added to
this
>>> NetCDF file to define the projection information:
>>>                   :MET_version = "V8.0" ;
>>>                  :Projection = "LatLon" ;
>>>                  :hemisphere = "N" ;
>>>                  :lat_ll = "20.971000 degrees_north" ;
>>>                  :lon_ll = "239.891000 degrees_east" ;
>>>                  :delta_lat = "0.025039 degrees" ;
>>>                  :delta_lon = "0.026816 degrees" ;
>>>                  :Nlat = "1120 grid_points" ;
>>>                  :Nlon = "1620 grid_points" ;
>>>
>>> But that projection information clearly is not correct.  Any idea
how
>> this
>>> file was generated?  Once we correct the projection information in
these
>>> files, the problem will be solved.
>>>
>>> Thanks,
>>> John
>>>
>>> On Thu, Sep 26, 2019 at 9:16 AM Sarah Griffin via RT
<met_help at ucar.edu>
>>> wrote:
>>>
>>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326 >
>>>>
>>>> Hi John,
>>>>
>>>> Thank you for the quick response. Is the attached image,
regrid.png, the
>>>> image created from the command:
>>>>
>>>> */usr/local/met-8.0/bin/regrid_data_plane
>>>> netcdf_file_for_testing_projection.nc
>>>> <http://netcdf_file_for_testing_projection.nc> \*
>>>> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc>
>>>> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
>>>> level="(*,*)";'*
>>>>
>>>>
>>>> Because that unfortunately does not match the domain when I plot
the
>>>> data in core_cntl.2019051400_f00.nc. I've attached the domain for
>>>> core_cntl.2019051400_f00.nc as well as uploaded it to
>>>> incoming/irap/met_help/griffin_data/.
>>>>
>>>> Thanks!
>>>> Sarah
>>>>
>>>> On 9/25/19 4:44 PM, John Halley Gotway via RT wrote:
>>>>> Hi Sarah,
>>>>>
>>>>> Thanks for posting your sample data to the FTP site.  Here's the
>> example
>>>>> regridding command you referenced:
>>>>>
>>>>> bin/regrid_data_plane \
>>>>> netcdf_file_for_testing_projection.nc \ *### MET parses the
FROM_GRID
>>>> from
>>>>> this file*
>>>>> core_cntl_20190514_0000_f00.nc \    *### MET parses the TO_GRID
from
>>>> this
>>>>> file*
>>>>> SAR-FV3_information.nc \
>>>>> -field 'name  = "composite_n0q"; level = "(*,*)"; file_type =
>>>> NETCDF_MET;'
>>>>> \ *### MET reads this data from first file*
>>>>> -v 4
>>>>>
>>>>> MET needs to be able to correctly parse the FROM_GRID from the
first
>> file
>>>>> and TO_GRID from the second file.
>>>>>
>>>>> Here's the immediate problem.  You are requesting data from the
>>>>> netcdf_file_for_testing_projection.nc file with this string:
>>>>>       -field 'name  = "composite_n0q"; level = "(*,*)";
file_type =
>>>>> NETCDF_MET;'
>>>>>
>>>>> You are telling MET to interpret this file as following the
>> *NETCDF_MET*
>>>>> convention, but it does not!  Instead, it's CF-compliant:
>>>>>       ncdump -h netcdf_file_for_testing_projection.nc | grep
>> Conventions
>>>>>       :Conventions = "CF-1.6" ;
>>>>>
>>>>> I ran the following command to plot the data the way you have it
set
>> up:
>>>>> */usr/local/met-8.0/bin/plot_data_plane
>>>>> netcdf_file_for_testing_projection.nc
>>>>> <http://netcdf_file_for_testing_projection.nc> \*
>>>>>
>>>>> *netcdf_file_for_testing_projection.ps
>>>>> <http://netcdf_file_for_testing_projection.ps>
'name="composite_n0q";
>>>>> level="(*,*)"; file_type=NETCDF_MET;' -v 4*
>>>>>
>>>>> This run without error BUT doesn't create an image that can be
>> displayed.
>>>>> And when I try processing the same data through pcp_combine, I
do get
>> an
>>>>> actual error:
>>>>>
>>>>> */usr/local/met-8.0/bin/pcp_combine -add
>>>>> netcdf_file_for_testing_projection.nc
>>>>> <http://netcdf_file_for_testing_projection.nc> \*
>>>>> *'name="composite_n0q"; level="(*,*)"; file_type=NETCDF_MET;'
add.nc
>>>>> <http://add.nc> -v 4*
>>>>> ERROR  : DataPlane::set_constant(double) -> no data buffer
allocated!
>>>>>
>>>>> So while it's doing something, it clearly isn't correct.  Here's
the
>>>>> command you should be running instead (without the
file_type=NETCDF_MET
>>>>> option).
>>>>>
>>>>> */usr/local/met-8.0/bin/regrid_data_plane
>>>>> netcdf_file_for_testing_projection.nc
>>>>> <http://netcdf_file_for_testing_projection.nc> \*
>>>>> *core_cntl_20190514_0000_f00.nc
<http://core_cntl_20190514_0000_f00.nc
>>>>> regrid.nc <http://regrid.nc> -field 'name="composite_n0q";
>>>> level="(*,*)";'*
>>>>> DEBUG 1: Reading data file:
netcdf_file_for_testing_projection.nc
>>>>> WARNING:
>>>>> WARNING: NcCfFile::open() -> could not determine the valid time,
using
>> 0.
>>>>> WARNING:
>>>>> DEBUG 2: Input grid: Projection: Lat/Lon Nx: 12200 Ny: 5400
lat_ll:
>>>> 23.000
>>>>> lon_ll: 126.000 delta_lat: 0.005 delta_lon: 0.005
>>>>> DEBUG 2: Output grid: Projection: Lat/Lon Nx: 1620 Ny: 1120
lat_ll:
>>>> 20.971
>>>>> lon_ll: -239.891 delta_lat: 0.025 delta_lon: 0.027
>>>>> DEBUG 2: Interpolation options: method = NEAREST, width = 1,
shape =
>>>>> SQUARE, vld_thresh = 0.5
>>>>>
>>>>> BUT ON MY MACHINE, THIS TOOK OVER 8 MINUTES TO RUN!
>>>>> And plotting the result:
>>>>>
>>>>> *plot_data_plane regrid.nc <http://regrid.nc> regrid.ps <
>>>> http://regrid.ps>
>>>>> 'name="composite_n0q"; level="(*,*)";'*
>>>>>
>>>>> Seems like 2 issues in my mind:
>>>>> (1) Ideally, MET would error out telling you that using
-file_type
>>>>> NETCDF_MET does not work for this.
>>>>> (2) Ideally, MET would do that regridding step faster.
>>>>>
>>>>> Hope this helps clarify.
>>>>>
>>>>> Thanks,
>>>>> John
>>>>>
>>>>> On Wed, Sep 25, 2019 at 1:56 PM Julie Prestopnik via RT <
>>>> met_help at ucar.edu>
>>>>> wrote:
>>>>>
>>>>>> Wed Sep 25 13:56:10 2019: Request 92326 was acted upon.
>>>>>> Transaction: Given to johnhg (John Halley Gotway) by jpresto
>>>>>>           Queue: met_help
>>>>>>         Subject: Projection information off when running MODE
>>>>>>           Owner: johnhg
>>>>>>      Requestors: sarah.griffin at ssec.wisc.edu
>>>>>>          Status: new
>>>>>>     Ticket <URL:
>> https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=92326
>>>>>> This transaction appears to have no content
>>>>>>
>>>> --
>>>>
>>>>
>>
----------------------------------------------------------------------------
>>>> Sarah M. Griffin
>>>> Associate Research Scientist
>>>> Cooperative Institute for Meteorological Satellite Studies / SSEC
>>>> UW-Madison
>>>> 1225 W Dayton St. Rm 243
>>>> Madison, WI 53706
>>>> sarah.griffin at ssec.wisc.edu
>>>> (608) 262-0986
>>>>
>>>>
>>
----------------------------------------------------------------------------
>>>>
>>>>
>>
>> --
>>
>>
----------------------------------------------------------------------------
>> Sarah M. Griffin
>> Associate Research Scientist
>> Cooperative Institute for Meteorological Satellite Studies / SSEC
>> UW-Madison
>> 1225 W Dayton St. Rm 243
>> Madison, WI 53706
>> sarah.griffin at ssec.wisc.edu
>> (608) 262-0986
>>
>>
----------------------------------------------------------------------------
>>
>>
>>
>>


--
----------------------------------------------------------------------------
Sarah M. Griffin
Associate Research Scientist
Cooperative Institute for Meteorological Satellite Studies / SSEC UW-
Madison
1225 W Dayton St. Rm 243
Madison, WI 53706
sarah.griffin at ssec.wisc.edu
(608) 262-0986
----------------------------------------------------------------------------



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


More information about the Met_help mailing list