[Met_help] [rt.rap.ucar.edu #88665] History for Lambert Conformal information needed for netcdf input file?
John Halley Gotway via RT
met_help at ucar.edu
Thu Jan 31 09:09:50 MST 2019
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Dear reader,
I am a new user of MET, and I have some difficulties to put the wrfout files in a good format. I have a problem when using UPP, so I am trying to write my own python script to make them look like NetCDF output file from pcp_combine.
I understood that the global attributes should include the grid/projection information. What are the mandatory attribute for Lambert Conformal? 'Projection', 'hemisphere', 'scale_lat_1', 'scale_lat_2', 'lat_pin', 'lon_pin', 'x_pin', 'y_pin', 'lon_orient', 'd_km', 'r_km', 'n_x' and 'n_y' ?
If they are, could you explain the meanings of 'lat_pin', 'lon_pin', 'x_pin', 'y_pin'?
Best regards,
Camille
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: Lambert Conformal information needed for netcdf input file?
From: John Halley Gotway
Time: Mon Jan 28 10:03:03 2019
Hello Camille,
I see you're running WRF but are not using UPP to post-process your
wrfout
files. While we do recommend using UPP since it creates GRIB output
files
which MET handles well, you do have another option. You could run the
wrf_interp utility which is available here:
http://www2.mmm.ucar.edu/wrf/users/download/get_sources_pproc_util.html
It reads the NetCDF wrfout files, interpolates the native model levels
to
pressure levels, and writes the output to NetCDF. And MET know how to
read
the output of wrf_interp. The only drawback is that MET only process
variables from the mass points... not the staggered vector points.
Basically that means that MET doesn't read wind data from wrf_interp
output.
That should provide an easier way of getting your wrfout data into
MET.
Of course, UPP is also a good option and you can write upp-
help at ucar.edu if
you're running into problems with it:
https://dtcenter.org/upp/users/support/upphelp.php
Thanks,
John Halley Gotway
On Mon, Jan 28, 2019 at 2:56 AM Camille le Coz via RT
<met_help at ucar.edu>
wrote:
>
> Mon Jan 28 02:55:50 2019: Request 88665 was acted upon.
> Transaction: Ticket created by C.M.L.LeCoz-1 at tudelft.nl
> Queue: met_help
> Subject: Lambert Conformal information needed for netcdf input
file?
> Owner: Nobody
> Requestors: C.M.L.LeCoz-1 at tudelft.nl
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88665 >
>
>
> Dear reader,
>
>
> I am a new user of MET, and I have some difficulties to put the
wrfout
> files in a good format. I have a problem when using UPP, so I am
trying to
> write my own python script to make them look like NetCDF output file
from
> pcp_combine.
>
> I understood that the global attributes should include the
grid/projection
> information. What are the mandatory attribute for Lambert Conformal?
> 'Projection', 'hemisphere', 'scale_lat_1', 'scale_lat_2', 'lat_pin',
> 'lon_pin', 'x_pin', 'y_pin', 'lon_orient', 'd_km', 'r_km', 'n_x' and
'n_y' ?
>
> If they are, could you explain the meanings of 'lat_pin', 'lon_pin',
> 'x_pin', 'y_pin'?
>
>
> Best regards,
>
> Camille
>
>
------------------------------------------------
Subject: Lambert Conformal information needed for netcdf input file?
From: Camille le Coz
Time: Tue Jan 29 08:00:12 2019
Dear John,
Thank you for your answer. I am trying to use wrf_interp, but I found
very little information about how to use it. Do you know where I could
find such information?
My wrfout files only contain 2d fields, so there are no fields to
interpolate. Would wrf_interp still work in this case? (My next step
would be to use pcp_combine).
About the pcp_combine output, what is the meaning of the global
attributes 'lat_pin', 'lon_pin', 'x_pin', 'y_pin' for the Lambert
Conformal projection?
Best regards,
Camille
________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Monday, January 28, 2019 6:03:04 PM
To: Camille le Coz
Subject: Re: [rt.rap.ucar.edu #88665] Lambert Conformal information
needed for netcdf input file?
Hello Camille,
I see you're running WRF but are not using UPP to post-process your
wrfout
files. While we do recommend using UPP since it creates GRIB output
files
which MET handles well, you do have another option. You could run the
wrf_interp utility which is available here:
http://www2.mmm.ucar.edu/wrf/users/download/get_sources_pproc_util.html
It reads the NetCDF wrfout files, interpolates the native model levels
to
pressure levels, and writes the output to NetCDF. And MET know how to
read
the output of wrf_interp. The only drawback is that MET only process
variables from the mass points... not the staggered vector points.
Basically that means that MET doesn't read wind data from wrf_interp
output.
That should provide an easier way of getting your wrfout data into
MET.
Of course, UPP is also a good option and you can write upp-
help at ucar.edu if
you're running into problems with it:
https://dtcenter.org/upp/users/support/upphelp.php
Thanks,
John Halley Gotway
On Mon, Jan 28, 2019 at 2:56 AM Camille le Coz via RT
<met_help at ucar.edu>
wrote:
>
> Mon Jan 28 02:55:50 2019: Request 88665 was acted upon.
> Transaction: Ticket created by C.M.L.LeCoz-1 at tudelft.nl
> Queue: met_help
> Subject: Lambert Conformal information needed for netcdf input
file?
> Owner: Nobody
> Requestors: C.M.L.LeCoz-1 at tudelft.nl
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88665 >
>
>
> Dear reader,
>
>
> I am a new user of MET, and I have some difficulties to put the
wrfout
> files in a good format. I have a problem when using UPP, so I am
trying to
> write my own python script to make them look like NetCDF output file
from
> pcp_combine.
>
> I understood that the global attributes should include the
grid/projection
> information. What are the mandatory attribute for Lambert Conformal?
> 'Projection', 'hemisphere', 'scale_lat_1', 'scale_lat_2', 'lat_pin',
> 'lon_pin', 'x_pin', 'y_pin', 'lon_orient', 'd_km', 'r_km', 'n_x' and
'n_y' ?
>
> If they are, could you explain the meanings of 'lat_pin', 'lon_pin',
> 'x_pin', 'y_pin'?
>
>
> Best regards,
>
> Camille
>
>
------------------------------------------------
Subject: Lambert Conformal information needed for netcdf input file?
From: John Halley Gotway
Time: Tue Jan 29 09:41:57 2019
Camille,
No, I haven't actually run wrf_interp myself in the past. Whatever
info is
available would likely live on the WRF website. The support for UPP
should
be pretty good since you can write upp-help at ucar.edu with questions.
It sounds like you only need to read surface fields into MET. If
you're
not using UPP and you're not using wrf_interp, there are a couple more
options to try:
- You could *tell* MET to interpret it as the output of wrf_interp by
setting "*file_type = NETCDF_PINT;*" The wrf_interp utility used to
be
called p_interp... and that's where the "PINT" comes from. Perhaps
that'd
work.
- Assuming you compile met-8.0 with the "*--enable-python*" option,
you
could write a script to read gridded data from your NetCDFfile and
pass it
to MET via memory. Examples of doing so can be found here in the
Python
Scripts section:
https://dtcenter.org/met/users/downloads/analysis_scripts.php
In particular, look at the example with this description:
* Plot the PSFC variable from a post-processed WRF output file on a
Lambert Conformal projection:*
You could just post one of your sample files to our anonymous ftp site
and
let me know when it's there. I'll go grab it and see if either of
these
options works well.
https://dtcenter.org/met/users/support/met_help.php#ftp
As for the Lambert Conformal projection, those settings define a
reference
lat/lon location. lat_pin and lon_pin define that reference location
on
the earth. x_pin and y_pin define the location on the grid where that
lat/lon lives. We usually specify the lower-left lat/lon value and
set
x_pin = y_pin = 0.0 since (0, 0) is the lower-left corner of the grid.
Or
perhaps you've specified the center lat/lon value... then x_pin = Nx/2
and
y_pin = Ny/2... that's what's done in that Python script I referenced
above.
Hope that helps.
Thanks,
John
------------------------------------------------
Subject: Lambert Conformal information needed for netcdf input file?
From: Camille le Coz
Time: Wed Jan 30 07:00:50 2019
Hi John,
I uploaded a sample file to the ftp server.
Thank you,
Camille
________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Tuesday, January 29, 2019 5:41:57 PM
To: Camille le Coz
Subject: Re: [rt.rap.ucar.edu #88665] Lambert Conformal information
needed for netcdf input file?
Camille,
No, I haven't actually run wrf_interp myself in the past. Whatever
info is
available would likely live on the WRF website. The support for UPP
should
be pretty good since you can write upp-help at ucar.edu with questions.
It sounds like you only need to read surface fields into MET. If
you're
not using UPP and you're not using wrf_interp, there are a couple more
options to try:
- You could *tell* MET to interpret it as the output of wrf_interp by
setting "*file_type = NETCDF_PINT;*" The wrf_interp utility used to
be
called p_interp... and that's where the "PINT" comes from. Perhaps
that'd
work.
- Assuming you compile met-8.0 with the "*--enable-python*" option,
you
could write a script to read gridded data from your NetCDFfile and
pass it
to MET via memory. Examples of doing so can be found here in the
Python
Scripts section:
https://dtcenter.org/met/users/downloads/analysis_scripts.php
In particular, look at the example with this description:
* Plot the PSFC variable from a post-processed WRF output file on a
Lambert Conformal projection:*
You could just post one of your sample files to our anonymous ftp site
and
let me know when it's there. I'll go grab it and see if either of
these
options works well.
https://dtcenter.org/met/users/support/met_help.php#ftp
As for the Lambert Conformal projection, those settings define a
reference
lat/lon location. lat_pin and lon_pin define that reference location
on
the earth. x_pin and y_pin define the location on the grid where that
lat/lon lives. We usually specify the lower-left lat/lon value and
set
x_pin = y_pin = 0.0 since (0, 0) is the lower-left corner of the grid.
Or
perhaps you've specified the center lat/lon value... then x_pin = Nx/2
and
y_pin = Ny/2... that's what's done in that Python script I referenced
above.
Hope that helps.
Thanks,
John
------------------------------------------------
Subject: Lambert Conformal information needed for netcdf input file?
From: John Halley Gotway
Time: Wed Jan 30 09:26:43 2019
Camille,
Thanks for sending your sample data. It looks like simply telling MET
to
interpret the data as being the output of the p_interp/wrf_interp
utility
did the trick. I ran the following plot_data_plane command to see if
MET
can read the RAINC variable from the file and plot it:
*/usr/local/met-8.0/bin/plot_data_plane \*
*wrfout_d01_2018-05-01_01_00_00 rainc.ps <http://rainc.ps> \*
* 'name="RAINC"; level="(0,*,*)"; file_type=NETCDF_PINT;'*
And I attached a PNG version of the resulting plot.
So in the MET config file, when you specify the field(s) to be
processed,
also include the file_type option. For example, if you're running
Grid-Stat, passing this file in as the forecast, you'd use the
following in
the Grid-Stat config file:
*fcst = {*
* file_type = NETCDF_PINT;*
* field = [ { name = "RAINC"; level = [ "(0,*,*)" ]; },*
* { name = "RAINNC"; level = [ "(0,*,*)" ]; } ];}*
Make sense?
Thanks,
John
On Wed, Jan 30, 2019 at 7:01 AM Camille le Coz via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88665 >
>
> Hi John,
>
>
> I uploaded a sample file to the ftp server.
>
>
> Thank you,
>
> Camille
>
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Tuesday, January 29, 2019 5:41:57 PM
> To: Camille le Coz
> Subject: Re: [rt.rap.ucar.edu #88665] Lambert Conformal information
> needed for netcdf input file?
>
> Camille,
>
> No, I haven't actually run wrf_interp myself in the past. Whatever
info is
> available would likely live on the WRF website. The support for UPP
should
> be pretty good since you can write upp-help at ucar.edu with questions.
>
> It sounds like you only need to read surface fields into MET. If
you're
> not using UPP and you're not using wrf_interp, there are a couple
more
> options to try:
>
> - You could *tell* MET to interpret it as the output of wrf_interp
by
> setting "*file_type = NETCDF_PINT;*" The wrf_interp utility used to
be
> called p_interp... and that's where the "PINT" comes from. Perhaps
that'd
> work.
>
> - Assuming you compile met-8.0 with the "*--enable-python*" option,
you
> could write a script to read gridded data from your NetCDFfile and
pass it
> to MET via memory. Examples of doing so can be found here in the
Python
> Scripts section:
> https://dtcenter.org/met/users/downloads/analysis_scripts.php
>
> In particular, look at the example with this description:
> * Plot the PSFC variable from a post-processed WRF output file on
a
> Lambert Conformal projection:*
>
> You could just post one of your sample files to our anonymous ftp
site and
> let me know when it's there. I'll go grab it and see if either of
these
> options works well.
> https://dtcenter.org/met/users/support/met_help.php#ftp
>
> As for the Lambert Conformal projection, those settings define a
reference
> lat/lon location. lat_pin and lon_pin define that reference
location on
> the earth. x_pin and y_pin define the location on the grid where
that
> lat/lon lives. We usually specify the lower-left lat/lon value and
set
> x_pin = y_pin = 0.0 since (0, 0) is the lower-left corner of the
grid. Or
> perhaps you've specified the center lat/lon value... then x_pin =
Nx/2 and
> y_pin = Ny/2... that's what's done in that Python script I
referenced
> above.
>
> Hope that helps.
>
> Thanks,
> John
>
>
>
------------------------------------------------
Subject: Lambert Conformal information needed for netcdf input file?
From: Camille le Coz
Time: Thu Jan 31 03:12:13 2019
Hi John,
Thank you for your help. Both option are working for me.
I didn't compile with "--enable-python". But using the script you
mentioned, I was able to write my own to convert the wrfout file into
a readable format (for pcp_combine), and to add the total
precipitation in it
Thank you,
Camille
________________________________
From: John Halley Gotway via RT <met_help at ucar.edu>
Sent: Wednesday, January 30, 2019 5:26:44 PM
To: Camille le Coz
Subject: Re: [rt.rap.ucar.edu #88665] Lambert Conformal information
needed for netcdf input file?
Camille,
Thanks for sending your sample data. It looks like simply telling MET
to
interpret the data as being the output of the p_interp/wrf_interp
utility
did the trick. I ran the following plot_data_plane command to see if
MET
can read the RAINC variable from the file and plot it:
*/usr/local/met-8.0/bin/plot_data_plane \*
*wrfout_d01_2018-05-01_01_00_00 rainc.ps <http://rainc.ps> \*
* 'name="RAINC"; level="(0,*,*)"; file_type=NETCDF_PINT;'*
And I attached a PNG version of the resulting plot.
So in the MET config file, when you specify the field(s) to be
processed,
also include the file_type option. For example, if you're running
Grid-Stat, passing this file in as the forecast, you'd use the
following in
the Grid-Stat config file:
*fcst = {*
* file_type = NETCDF_PINT;*
* field = [ { name = "RAINC"; level = [ "(0,*,*)" ]; },*
* { name = "RAINNC"; level = [ "(0,*,*)" ]; } ];}*
Make sense?
Thanks,
John
On Wed, Jan 30, 2019 at 7:01 AM Camille le Coz via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88665 >
>
> Hi John,
>
>
> I uploaded a sample file to the ftp server.
>
>
> Thank you,
>
> Camille
>
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Tuesday, January 29, 2019 5:41:57 PM
> To: Camille le Coz
> Subject: Re: [rt.rap.ucar.edu #88665] Lambert Conformal information
> needed for netcdf input file?
>
> Camille,
>
> No, I haven't actually run wrf_interp myself in the past. Whatever
info is
> available would likely live on the WRF website. The support for UPP
should
> be pretty good since you can write upp-help at ucar.edu with questions.
>
> It sounds like you only need to read surface fields into MET. If
you're
> not using UPP and you're not using wrf_interp, there are a couple
more
> options to try:
>
> - You could *tell* MET to interpret it as the output of wrf_interp
by
> setting "*file_type = NETCDF_PINT;*" The wrf_interp utility used to
be
> called p_interp... and that's where the "PINT" comes from. Perhaps
that'd
> work.
>
> - Assuming you compile met-8.0 with the "*--enable-python*" option,
you
> could write a script to read gridded data from your NetCDFfile and
pass it
> to MET via memory. Examples of doing so can be found here in the
Python
> Scripts section:
> https://dtcenter.org/met/users/downloads/analysis_scripts.php
>
> In particular, look at the example with this description:
> * Plot the PSFC variable from a post-processed WRF output file on
a
> Lambert Conformal projection:*
>
> You could just post one of your sample files to our anonymous ftp
site and
> let me know when it's there. I'll go grab it and see if either of
these
> options works well.
> https://dtcenter.org/met/users/support/met_help.php#ftp
>
> As for the Lambert Conformal projection, those settings define a
reference
> lat/lon location. lat_pin and lon_pin define that reference
location on
> the earth. x_pin and y_pin define the location on the grid where
that
> lat/lon lives. We usually specify the lower-left lat/lon value and
set
> x_pin = y_pin = 0.0 since (0, 0) is the lower-left corner of the
grid. Or
> perhaps you've specified the center lat/lon value... then x_pin =
Nx/2 and
> y_pin = Ny/2... that's what's done in that Python script I
referenced
> above.
>
> Hope that helps.
>
> Thanks,
> John
>
>
>
------------------------------------------------
Subject: Lambert Conformal information needed for netcdf input file?
From: John Halley Gotway
Time: Thu Jan 31 09:09:40 2019
Camille,
Great, glad to hear it. I'll go ahead and resolve this ticket. Just
let
us know what other issues or questions arise in your use of MET.
John
On Thu, Jan 31, 2019 at 3:12 AM Camille le Coz via RT
<met_help at ucar.edu>
wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88665 >
>
> Hi John,
>
>
> Thank you for your help. Both option are working for me.
>
> I didn't compile with "--enable-python". But using the script you
> mentioned, I was able to write my own to convert the wrfout file
into a
> readable format (for pcp_combine), and to add the total
precipitation in it
>
> Thank you,
> Camille
> ________________________________
> From: John Halley Gotway via RT <met_help at ucar.edu>
> Sent: Wednesday, January 30, 2019 5:26:44 PM
> To: Camille le Coz
> Subject: Re: [rt.rap.ucar.edu #88665] Lambert Conformal information
> needed for netcdf input file?
>
> Camille,
>
> Thanks for sending your sample data. It looks like simply telling
MET to
> interpret the data as being the output of the p_interp/wrf_interp
utility
> did the trick. I ran the following plot_data_plane command to see
if MET
> can read the RAINC variable from the file and plot it:
>
> */usr/local/met-8.0/bin/plot_data_plane \*
> *wrfout_d01_2018-05-01_01_00_00 rainc.ps <http://rainc.ps> \*
> * 'name="RAINC"; level="(0,*,*)"; file_type=NETCDF_PINT;'*
>
> And I attached a PNG version of the resulting plot.
>
> So in the MET config file, when you specify the field(s) to be
processed,
> also include the file_type option. For example, if you're running
> Grid-Stat, passing this file in as the forecast, you'd use the
following in
> the Grid-Stat config file:
>
>
> *fcst = {*
>
> * file_type = NETCDF_PINT;*
>
> * field = [ { name = "RAINC"; level = [ "(0,*,*)" ]; },*
>
>
> * { name = "RAINNC"; level = [ "(0,*,*)" ]; } ];}*
>
> Make sense?
>
> Thanks,
> John
>
> On Wed, Jan 30, 2019 at 7:01 AM Camille le Coz via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=88665 >
> >
> > Hi John,
> >
> >
> > I uploaded a sample file to the ftp server.
> >
> >
> > Thank you,
> >
> > Camille
> >
> > ________________________________
> > From: John Halley Gotway via RT <met_help at ucar.edu>
> > Sent: Tuesday, January 29, 2019 5:41:57 PM
> > To: Camille le Coz
> > Subject: Re: [rt.rap.ucar.edu #88665] Lambert Conformal
information
> > needed for netcdf input file?
> >
> > Camille,
> >
> > No, I haven't actually run wrf_interp myself in the past.
Whatever info
> is
> > available would likely live on the WRF website. The support for
UPP
> should
> > be pretty good since you can write upp-help at ucar.edu with
questions.
> >
> > It sounds like you only need to read surface fields into MET. If
you're
> > not using UPP and you're not using wrf_interp, there are a couple
more
> > options to try:
> >
> > - You could *tell* MET to interpret it as the output of wrf_interp
by
> > setting "*file_type = NETCDF_PINT;*" The wrf_interp utility used
to be
> > called p_interp... and that's where the "PINT" comes from.
Perhaps
> that'd
> > work.
> >
> > - Assuming you compile met-8.0 with the "*--enable-python*"
option, you
> > could write a script to read gridded data from your NetCDFfile and
pass
> it
> > to MET via memory. Examples of doing so can be found here in the
Python
> > Scripts section:
> > https://dtcenter.org/met/users/downloads/analysis_scripts.php
> >
> > In particular, look at the example with this description:
> > * Plot the PSFC variable from a post-processed WRF output file
on a
> > Lambert Conformal projection:*
> >
> > You could just post one of your sample files to our anonymous ftp
site
> and
> > let me know when it's there. I'll go grab it and see if either of
these
> > options works well.
> > https://dtcenter.org/met/users/support/met_help.php#ftp
> >
> > As for the Lambert Conformal projection, those settings define a
> reference
> > lat/lon location. lat_pin and lon_pin define that reference
location on
> > the earth. x_pin and y_pin define the location on the grid where
that
> > lat/lon lives. We usually specify the lower-left lat/lon value
and set
> > x_pin = y_pin = 0.0 since (0, 0) is the lower-left corner of the
grid.
> Or
> > perhaps you've specified the center lat/lon value... then x_pin =
Nx/2
> and
> > y_pin = Ny/2... that's what's done in that Python script I
referenced
> > above.
> >
> > Hope that helps.
> >
> > Thanks,
> > John
> >
> >
> >
>
>
>
------------------------------------------------
More information about the Met_help
mailing list