[Met_help] [rt.rap.ucar.edu #87771] History for Regrid from rectilinear to curvilinear

John Halley Gotway via RT met_help at ucar.edu
Tue Jul 9 12:07:16 MDT 2019


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

Dear Sir/Madam,

I am Lintao, running MET on Cheyenne. I use the following code to regrid
rectilinear data set to curvilinear data set.

regrid_data_plane \
/glade/scratch/lintao/paper/data/capa/2004-09-01_08:00:00.nc \
/glade/scratch/lintao/paper/data/ca4km/2004-09-01_08:00:00.nc \
/glade/scratch/lintao/paper/data/nov_12/toDel/PCP_2004-09-01_08:00:00.nc \
-field 'name="pr"; level="(0,0,*,*)"; file_type=NETCDF_NCCF;' \
-method BUDGET -width 2 -name test_pcp

However, ncdump shows the output file is still rectilinear. And ncview
cannot display the image.

Can MET regrids rectilinear data to curvilinear data? If possible, can you
help me to figure out why I still got the rectilinear output please?

Please feel free to go to my work directory, and have a look.

Thank you very much.

Best regards,
Lintao


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

Subject: Regrid from rectilinear to curvilinear
From: John Halley Gotway
Time: Mon Nov 12 15:47:38 2018

Lintao,

Thanks for pointing me to your sample data on Cheyenne.  I reran your
command and see the behavior you describe.

Here's 2 important log messages from the output:

*DEBUG 2: Input grid: Projection: Lat/Lon Nx: 800 Ny: 352 lat_ll:
31.062
lon_ll: 149.938 delta_lat: 0.125 delta_lon: 0.125*

*DEBUG 2: Output grid: Projection: Lat/Lon Nx: 639 Ny: 699 lat_ll:
46.094
lon_ll: 133.338 delta_lat: 0.034 delta_lon: 0.049*


It thinks that both the input data and the desired output domain are
on a
Lat/Lon grid.


So the real question is, why does MET think that this file is Lat/Lon?

*/glade/scratch/lintao/paper/data/ca4km/2004-09-01_08:00:00.nc
<http://00.nc>*


MET is interpreting that file as being CF-Compliant since it has this
global attribute:

  *:Conventions = "CF-1.4" ;*


However the grid spec is definitely not actually CF-complaint.  I'm
surprised the MET is actually running without error.  I would have
expected
it to error out.


One option would be changing your arguments to regrid_data_plane to
define
the desired output grid using a grid specification string.


Here's a selection from this README file:

/glade/p/ral/jntp/MET/MET_releases/8.0/met-8.0/data/config/README


//   - The "to_grid" entry may be set to NONE, FCST, OBS, a named
grid, the
path

//     to a gridded data file defining the grid, or an explicit grid
specification

//     string.

//      - to_grid = NONE;   To disable regridding.

//      - to_grid = FCST;   To regrid observations to the forecast
grid.

//      - to_grid = OBS;    To regrid forecasts to the observation
grid.

//      - to_grid = "G218"; To regrid both to a named grid.

//      - to_grid = "path"; To regrid both to a grid defined by a
file.

//      - to_grid = "spec"; To define a grid specified as follows:

//         - lambert Nx Ny lat_ll lon_ll lon_orient D_km R_km
standard_parallel_1

//           [standard_parallel_2] N|S

//         - stereo Nx Ny lat_ll lon_ll lon_orient D_km R_km lat_scale
N|S

//         - latlon Nx Ny lat_ll lon_ll delta_lat delta_lon

//         - mercator Nx Ny lat_ll lon_ll lat_ur lon_ur


Hope that helps.


Thanks,
John





On Mon, Nov 12, 2018 at 11:37 AM Lintao Li via RT <met_help at ucar.edu>
wrote:

>
> Mon Nov 12 11:37:15 2018: Request 87771 was acted upon.
> Transaction: Ticket created by lintaoli168 at gmail.com
>        Queue: met_help
>      Subject: Regrid from rectilinear to curvilinear
>        Owner: Nobody
>   Requestors: lintaoli168 at gmail.com
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=87771 >
>
>
> Dear Sir/Madam,
>
> I am Lintao, running MET on Cheyenne. I use the following code to
regrid
> rectilinear data set to curvilinear data set.
>
> regrid_data_plane \
> /glade/scratch/lintao/paper/data/capa/2004-09-01_08:00:00.nc \
> /glade/scratch/lintao/paper/data/ca4km/2004-09-01_08:00:00.nc \
> /glade/scratch/lintao/paper/data/nov_12/toDel/PCP_2004-09-
01_08:00:00.nc \
> -field 'name="pr"; level="(0,0,*,*)"; file_type=NETCDF_NCCF;' \
> -method BUDGET -width 2 -name test_pcp
>
> However, ncdump shows the output file is still rectilinear. And
ncview
> cannot display the image.
>
> Can MET regrids rectilinear data to curvilinear data? If possible,
can you
> help me to figure out why I still got the rectilinear output please?
>
> Please feel free to go to my work directory, and have a look.
>
> Thank you very much.
>
> Best regards,
> Lintao
>
>

------------------------------------------------
Subject: Regrid from rectilinear to curvilinear
From: Lintao Li
Time: Mon Nov 12 17:07:52 2018

Hi John,
Thanks a lot for your great help. I appreciated very very much.

Best regards,
Lintao


On Mon, Nov 12, 2018 at 3:47 PM John Halley Gotway via RT
<met_help at ucar.edu>
wrote:

> Lintao,
>
> Thanks for pointing me to your sample data on Cheyenne.  I reran
your
> command and see the behavior you describe.
>
> Here's 2 important log messages from the output:
>
> *DEBUG 2: Input grid: Projection: Lat/Lon Nx: 800 Ny: 352 lat_ll:
31.062
> lon_ll: 149.938 delta_lat: 0.125 delta_lon: 0.125*
>
> *DEBUG 2: Output grid: Projection: Lat/Lon Nx: 639 Ny: 699 lat_ll:
46.094
> lon_ll: 133.338 delta_lat: 0.034 delta_lon: 0.049*
>
>
> It thinks that both the input data and the desired output domain are
on a
> Lat/Lon grid.
>
>
> So the real question is, why does MET think that this file is
Lat/Lon?
>
> */glade/scratch/lintao/paper/data/ca4km/2004-09-01_08:00:00.nc
> <http://00.nc>*
>
>
> MET is interpreting that file as being CF-Compliant since it has
this
> global attribute:
>
>   *:Conventions = "CF-1.4" ;*
>
>
> However the grid spec is definitely not actually CF-complaint.  I'm
> surprised the MET is actually running without error.  I would have
expected
> it to error out.
>
>
> One option would be changing your arguments to regrid_data_plane to
define
> the desired output grid using a grid specification string.
>
>
> Here's a selection from this README file:
>
> /glade/p/ral/jntp/MET/MET_releases/8.0/met-8.0/data/config/README
>
>
> //   - The "to_grid" entry may be set to NONE, FCST, OBS, a named
grid, the
> path
>
> //     to a gridded data file defining the grid, or an explicit grid
> specification
>
> //     string.
>
> //      - to_grid = NONE;   To disable regridding.
>
> //      - to_grid = FCST;   To regrid observations to the forecast
grid.
>
> //      - to_grid = OBS;    To regrid forecasts to the observation
grid.
>
> //      - to_grid = "G218"; To regrid both to a named grid.
>
> //      - to_grid = "path"; To regrid both to a grid defined by a
file.
>
> //      - to_grid = "spec"; To define a grid specified as follows:
>
> //         - lambert Nx Ny lat_ll lon_ll lon_orient D_km R_km
> standard_parallel_1
>
> //           [standard_parallel_2] N|S
>
> //         - stereo Nx Ny lat_ll lon_ll lon_orient D_km R_km
lat_scale N|S
>
> //         - latlon Nx Ny lat_ll lon_ll delta_lat delta_lon
>
> //         - mercator Nx Ny lat_ll lon_ll lat_ur lon_ur
>
>
> Hope that helps.
>
>
> Thanks,
> John
>
>
>
>
>
> On Mon, Nov 12, 2018 at 11:37 AM Lintao Li via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > Mon Nov 12 11:37:15 2018: Request 87771 was acted upon.
> > Transaction: Ticket created by lintaoli168 at gmail.com
> >        Queue: met_help
> >      Subject: Regrid from rectilinear to curvilinear
> >        Owner: Nobody
> >   Requestors: lintaoli168 at gmail.com
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=87771 >
> >
> >
> > Dear Sir/Madam,
> >
> > I am Lintao, running MET on Cheyenne. I use the following code to
regrid
> > rectilinear data set to curvilinear data set.
> >
> > regrid_data_plane \
> > /glade/scratch/lintao/paper/data/capa/2004-09-01_08:00:00.nc \
> > /glade/scratch/lintao/paper/data/ca4km/2004-09-01_08:00:00.nc \
> > /glade/scratch/lintao/paper/data/nov_12/toDel/PCP_2004-09-
01_08:00:00.nc
> \
> > -field 'name="pr"; level="(0,0,*,*)"; file_type=NETCDF_NCCF;' \
> > -method BUDGET -width 2 -name test_pcp
> >
> > However, ncdump shows the output file is still rectilinear. And
ncview
> > cannot display the image.
> >
> > Can MET regrids rectilinear data to curvilinear data? If possible,
can
> you
> > help me to figure out why I still got the rectilinear output
please?
> >
> > Please feel free to go to my work directory, and have a look.
> >
> > Thank you very much.
> >
> > Best regards,
> > Lintao
> >
> >
>
>

------------------------------------------------
Subject: Regrid from rectilinear to curvilinear
From: Lintao Li
Time: Tue Nov 13 11:15:10 2018

Hi John,
As you suggested, I used the following code to do the regrid:
for file in 2004-09-01_0*; do
    regrid_data_plane \
    /glade/scratch/lintao/paper/data/capa/$file \
    'lambert 639 699 46.0938 -133.33751 -117.0 4.0 6371.2 55.0 65.0 N'
\
    /glade/scratch/lintao/paper/data/regrid/rgrd_$file \
    -field 'name="pr"; level="(0,0,*,*)"; file_type=NETCDF_NCCF;' \
    -method BUDGET -width 2 -name rgrd_precip
done

*It ran successfully. However, when I plot the source file and the
regridded file, I found quite noticeable distortion. Please see the
attached files.*
*I plot figure using the following codes:*
plot_data_plane \
/glade/scratch/lintao/paper/data/capa/2004-09-01_08:00:00.nc \
/glade/scratch/lintao/paper/data/nov_12/capa.ps \
'name="pr"; level="(0,0,*,*)"; file_type=NETCDF_NCCF;' \
-plot_range 0.0001 0.0015

plot_data_plane \
/glade/scratch/lintao/paper/data/regrid/rgrd_2004-09-01_08:00:00.nc \
/glade/scratch/lintao/paper/data/nov_12/rgrd.ps \
'name="test_pcp"; level="(*,*)"; file_type=NETCDF_NCCF;' \
-plot_range 0.0001 0.0015

The lat, lon values are almost the same, may be around 0.01
difference.
However, the difference of the location of precipitation is too large.
How
can I fix it please?
Thank you.

Best regards,
Lintao


On Tue, Nov 13, 2018 at 9:21 AM John Halley Gotway via RT
<met_help at ucar.edu>
wrote:

> According to our records, your request has been resolved. If you
have any
> further questions or concerns, please respond to this message.
>

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


More information about the Met_help mailing list