[Met_help] [rt.rap.ucar.edu #50681] History for Need help for Grid_stat and Point Stat tool for GTS/GFS data

John Halley Gotway via RT met_help at ucar.edu
Wed Oct 26 09:41:03 MDT 2011


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

Dear Sir/Madam
> I'm trying to verify GTS/GFS (obs) data with WRF out put (fcst)  through
> point_stat and grid_stat as well. Initially I was trying to verify with
> point_stat as observation data is point/station data for the parameters viz.
> TMP, RR (rainfall), DT (Dew Point Temp), winds U/V component etc
> I've transferred data files as well as script file in
> incoming/irap/met_help/singh_data.as

conv.sh

gts2nc_tmp.R

suflnd_20110601_00z_india_Air_TEMP.xy

suflnd_20110601_00z_india_All_data.xy

wrfprs_d01_2011-06-01_000_fcst01.grib1


here file name includes date hour and
variable. suflnd_20110601_00z_india_All_data.xy file contains all variable.
Conv.sh script I've written for regriding the point/station data into same
grid as of WRF models fcst data with GMT surface command and again converted
into ascii to convert it to nc through (gts2nc_tmp.R) R-Statistics. Can you
help me for creating a single R-script for converting multi-variable into
NETCDF?
Grid_stat is necessary for me , it would be better if can help me out for
Point stat as well.

Thanks in advance

Harvir


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

Subject: Re: [rt.rap.ucar.edu #50681] Need help for Grid_stat and Point Stat tool for GTS/GFS data
From: John Halley Gotway
Time: Wed Oct 12 12:07:00 2011

Harvir,

I am having a difficult time understanding exactly what question you
are asking.  I see that you've posted data to our anonymous ftp site.
I retrieved those scripts and attempted to run the "conv.sh"
script.  However, it fails on lines 4 and 5 at the calls to "surface"
and "grd2xyz" which I presume to be executables that are not defined
on my system.

I do see the following question in your email:
   Can you help me for creating a single R-script for converting
multi-variable into NETCDF?

Our role here at MET-Help is to answer questions related to the use of
MET.  Getting your data into a format that MET can handle is an issue
that comes up a lot.  And we're happy to provide
suggestions or offer advice.  But generally, we will not do that data
reformatting for you.  Providing code for pre-processing the TRMM data
was an exception since we saw it as beneficial for a large
number of users.

If I haven't answered your questions here, please feel free to write
again, and state them as specifically and clearly as possible.

Thanks,
John



On 10/12/2011 05:02 AM, Harvir Singh via RT wrote:
>
> Wed Oct 12 05:02:13 2011: Request 50681 was acted upon.
> Transaction: Ticket created by harvirduphy at gmail.com
>        Queue: met_help
>      Subject: Need help for Grid_stat and Point Stat tool for
GTS/GFS data
>        Owner: Nobody
>   Requestors: harvirduphy at gmail.com
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681 >
>
>
> Dear Sir/Madam
>> I'm trying to verify GTS/GFS (obs) data with WRF out put (fcst)
through
>> point_stat and grid_stat as well. Initially I was trying to verify
with
>> point_stat as observation data is point/station data for the
parameters viz.
>> TMP, RR (rainfall), DT (Dew Point Temp), winds U/V component etc
>> I've transferred data files as well as script file in
>> incoming/irap/met_help/singh_data.as
>
> conv.sh
>
> gts2nc_tmp.R
>
> suflnd_20110601_00z_india_Air_TEMP.xy
>
> suflnd_20110601_00z_india_All_data.xy
>
> wrfprs_d01_2011-06-01_000_fcst01.grib1
>
>
> here file name includes date hour and
> variable. suflnd_20110601_00z_india_All_data.xy file contains all
variable.
> Conv.sh script I've written for regriding the point/station data
into same
> grid as of WRF models fcst data with GMT surface command and again
converted
> into ascii to convert it to nc through (gts2nc_tmp.R) R-Statistics.
Can you
> help me for creating a single R-script for converting multi-variable
into
> NETCDF?
> Grid_stat is necessary for me , it would be better if can help me
out for
> Point stat as well.
>
> Thanks in advance
>
> Harvir

------------------------------------------------
Subject: Need help for Grid_stat and Point Stat tool for GTS/GFS data
From: Harvir Singh
Time: Thu Oct 13 01:12:33 2011

Dear John,

I would like to thank you thank you for your prompt reply. Of-course
yes I
know your roll in MET help. Actually I wanted  to ask you about
Rscript as
you have send me earlier for TRMM rainfall for 24 hours accumulation
and
I've tried it to modify for GTS/GFS data. Prior to running Rscript
(gts2nc_tmp.R) I've regridded data into same grid as of WRF models
fcst data
with GMT's (Generic Mapping Tools) surface command (it fails on lines
4 and
5 at the calls to "surface" and "grd2xyz" in your's system) and
converted into grd2xyz (ascii) format again converted it to nc through
(gts2nc_tmp.R) R-Statistics. However, you can give me some Idea
whether its
possible regridding through R-Statistics as its new for me.  Still I'm
having the R-script execution problem and showing:
Error in dim(data) <- dim : attempt to set an attribute on NULL
Calls: array
Execution halted

I know its not a very big problem but I'm just missing something in
gts2nc_tmp.R. After successfull execution  of Rscript I want to use
grid_stat for at least rainfall, TMP, Dew Point TMP, wind components
etc...
I have also transferred GridStatConfig_tmp file in the same directory.

I'm having another problem as follows:

 I've tried it for Point_stat also after using ascii2nc. I'm getting
some
problem there also .
thanx


On 12 October 2011 23:37, John Halley Gotway via RT
<met_help at ucar.edu>wrote:

> Harvir,
>
> I am having a difficult time understanding exactly what question you
are
> asking.  I see that you've posted data to our anonymous ftp site.  I
> retrieved those scripts and attempted to run the "conv.sh"
> script.  However, it fails on lines 4 and 5 at the calls to
"surface" and
> "grd2xyz" which I presume to be executables that are not defined on
my
> system.
>
> I do see the following question in your email:
>    Can you help me for creating a single R-script for converting
> multi-variable into NETCDF?
>
> Our role here at MET-Help is to answer questions related to the use
of MET.
>  Getting your data into a format that MET can handle is an issue
that comes
> up a lot.  And we're happy to provide
> suggestions or offer advice.  But generally, we will not do that
data
> reformatting for you.  Providing code for pre-processing the TRMM
data was
> an exception since we saw it as beneficial for a large
> number of users.
>
> If I haven't answered your questions here, please feel free to write
again,
> and state them as specifically and clearly as possible.
>
> Thanks,
> John
>
>
>
> On 10/12/2011 05:02 AM, Harvir Singh via RT wrote:
> >
> > Wed Oct 12 05:02:13 2011: Request 50681 was acted upon.
> > Transaction: Ticket created by harvirduphy at gmail.com
> >        Queue: met_help
> >      Subject: Need help for Grid_stat and Point Stat tool for
GTS/GFS
> data
> >        Owner: Nobody
> >   Requestors: harvirduphy at gmail.com
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681 >
> >
> >
> > Dear Sir/Madam
> >> I'm trying to verify GTS/GFS (obs) data with WRF out put (fcst)
through
> >> point_stat and grid_stat as well. Initially I was trying to
verify with
> >> point_stat as observation data is point/station data for the
parameters
> viz.
> >> TMP, RR (rainfall), DT (Dew Point Temp), winds U/V component etc
> >> I've transferred data files as well as script file in
> >> incoming/irap/met_help/singh_data.as
> >
> > conv.sh
> >
> > gts2nc_tmp.R
> >
> > suflnd_20110601_00z_india_Air_TEMP.xy
> >
> > suflnd_20110601_00z_india_All_data.xy
> >
> > wrfprs_d01_2011-06-01_000_fcst01.grib1
> >
> >
> > here file name includes date hour and
> > variable. suflnd_20110601_00z_india_All_data.xy file contains all
> variable.
> > Conv.sh script I've written for regriding the point/station data
into
> same
> > grid as of WRF models fcst data with GMT surface command and again
> converted
> > into ascii to convert it to nc through (gts2nc_tmp.R) R-
Statistics. Can
> you
> > help me for creating a single R-script for converting multi-
variable into
> > NETCDF?
> > Grid_stat is necessary for me , it would be better if can help me
out for
> > Point stat as well.
> >
> > Thanks in advance
> >
> > Harvir
>
>


--
*     Regards*
**************************************************************
**
*    HARVIR SINGH <http://www.harvir007.webs.com>*
*

***************************************************************

------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #50681] Need help for Grid_stat and Point Stat tool for GTS/GFS data
From: John Halley Gotway
Time: Thu Oct 13 16:44:16 2011

Harvir,

It sounds like you'd like to use R to regrid your data.
Unfortunately, I don't have any advice to offer.  If you were using
GRIB data, you could use the copygb utility to regrid the data.  But
I've
never regridded data using R.  It may be possible, but I just don't
have never done it.

Regarding the error you're getting from the NetCDF file, I see in your
"conv.sh" script the following call to R:
   Rscript gts2nc_tmp.R header.txt
suflnd_20110601_00z_india_Air_TEMP.nc

You have already sent me the Rscript file "gts2nc_tmp.R".  If you
would like to run that script and try to figure out the source of the
error, please send me the input file "header.txt".

I'd be happy to run the script and see if there are any obvious
problems.

Regarding problems with Point-Stat, you're going to have to be much
more specific for me to be able to help.  You'll need to send me the
input file(s), any config files you're using, the command line
you're using, and a description of the problem.  I can try to
reproduce it here and debug the issue.

John


On 10/13/2011 01:12 AM, Harvir Singh via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681 >
>
> Dear John,
>
> I would like to thank you thank you for your prompt reply. Of-course
yes I
> know your roll in MET help. Actually I wanted  to ask you about
Rscript as
> you have send me earlier for TRMM rainfall for 24 hours accumulation
and
> I've tried it to modify for GTS/GFS data. Prior to running Rscript
> (gts2nc_tmp.R) I've regridded data into same grid as of WRF models
fcst data
> with GMT's (Generic Mapping Tools) surface command (it fails on
lines 4 and
> 5 at the calls to "surface" and "grd2xyz" in your's system) and
> converted into grd2xyz (ascii) format again converted it to nc
through
> (gts2nc_tmp.R) R-Statistics. However, you can give me some Idea
whether its
> possible regridding through R-Statistics as its new for me.  Still
I'm
> having the R-script execution problem and showing:
> Error in dim(data) <- dim : attempt to set an attribute on NULL
> Calls: array
> Execution halted
>
> I know its not a very big problem but I'm just missing something in
> gts2nc_tmp.R. After successfull execution  of Rscript I want to use
> grid_stat for at least rainfall, TMP, Dew Point TMP, wind components
etc...
> I have also transferred GridStatConfig_tmp file in the same
directory.
>
> I'm having another problem as follows:
>
>  I've tried it for Point_stat also after using ascii2nc. I'm getting
some
> problem there also .
> thanx
>
>
> On 12 October 2011 23:37, John Halley Gotway via RT
<met_help at ucar.edu>wrote:
>
>> Harvir,
>>
>> I am having a difficult time understanding exactly what question
you are
>> asking.  I see that you've posted data to our anonymous ftp site.
I
>> retrieved those scripts and attempted to run the "conv.sh"
>> script.  However, it fails on lines 4 and 5 at the calls to
"surface" and
>> "grd2xyz" which I presume to be executables that are not defined on
my
>> system.
>>
>> I do see the following question in your email:
>>    Can you help me for creating a single R-script for converting
>> multi-variable into NETCDF?
>>
>> Our role here at MET-Help is to answer questions related to the use
of MET.
>>  Getting your data into a format that MET can handle is an issue
that comes
>> up a lot.  And we're happy to provide
>> suggestions or offer advice.  But generally, we will not do that
data
>> reformatting for you.  Providing code for pre-processing the TRMM
data was
>> an exception since we saw it as beneficial for a large
>> number of users.
>>
>> If I haven't answered your questions here, please feel free to
write again,
>> and state them as specifically and clearly as possible.
>>
>> Thanks,
>> John
>>
>>
>>
>> On 10/12/2011 05:02 AM, Harvir Singh via RT wrote:
>>>
>>> Wed Oct 12 05:02:13 2011: Request 50681 was acted upon.
>>> Transaction: Ticket created by harvirduphy at gmail.com
>>>        Queue: met_help
>>>      Subject: Need help for Grid_stat and Point Stat tool for
GTS/GFS
>> data
>>>        Owner: Nobody
>>>   Requestors: harvirduphy at gmail.com
>>>       Status: new
>>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681 >
>>>
>>>
>>> Dear Sir/Madam
>>>> I'm trying to verify GTS/GFS (obs) data with WRF out put (fcst)
through
>>>> point_stat and grid_stat as well. Initially I was trying to
verify with
>>>> point_stat as observation data is point/station data for the
parameters
>> viz.
>>>> TMP, RR (rainfall), DT (Dew Point Temp), winds U/V component etc
>>>> I've transferred data files as well as script file in
>>>> incoming/irap/met_help/singh_data.as
>>>
>>> conv.sh
>>>
>>> gts2nc_tmp.R
>>>
>>> suflnd_20110601_00z_india_Air_TEMP.xy
>>>
>>> suflnd_20110601_00z_india_All_data.xy
>>>
>>> wrfprs_d01_2011-06-01_000_fcst01.grib1
>>>
>>>
>>> here file name includes date hour and
>>> variable. suflnd_20110601_00z_india_All_data.xy file contains all
>> variable.
>>> Conv.sh script I've written for regriding the point/station data
into
>> same
>>> grid as of WRF models fcst data with GMT surface command and again
>> converted
>>> into ascii to convert it to nc through (gts2nc_tmp.R) R-
Statistics. Can
>> you
>>> help me for creating a single R-script for converting multi-
variable into
>>> NETCDF?
>>> Grid_stat is necessary for me , it would be better if can help me
out for
>>> Point stat as well.
>>>
>>> Thanks in advance
>>>
>>> Harvir
>>
>>
>
>

------------------------------------------------
Subject: Need help for Grid_stat and Point Stat tool for GTS/GFS data
From: Harvir Singh
Time: Fri Oct 14 03:39:43 2011

Dear John,

Actually I wanted to know, if possible, R could be used to regrid the
data.
If not, then its ok. If I were having the data in GRIB format  then I
could
have done it a long back. Unfortunately the data I've is in ASCII
format.

For the conversion of the data to NETCDF through the script conv.sh
I've
transferred the header.txt  in same directory.

Regarding the Point_stat I've transferred the input data along with
the
script point_stat.sh which is having all the command lines.

For point_stat you can consider observation file
suflnd_20110601_00z_india_Air_TEMP.xy as input data for surface
temperature
and wrfprs_d01_2011-06-01_000_fcst01.grib1 as fcst data from wrf
output here
variable will be TMP, g.c.=11

The input data file suflnd_20110601_00z_india_Air_TEMP.xy is having
only
three columns viz. Latitute, Longitude and Air_TEMP.

I'm assuming its a surface data so, for ascii2nc conversion here  the
10
columns are as follows:

1. Massage Type : ADPSFC
2. Station ID        : GFS
3. Date n Time     : 20110601_000000
4. Latitude
5. Longitude
6. Elevation          :-9999.0 (as data not available)
7. Grib Code (g.c.):  11
8. Accum Interval  : 24
9.  Hight               : -9999.0 (as data not available)
10.Variable           : Air_Temp

These 10 columns could be reproduce by the script gts_conv.pl. Just
check it
I may have written some wrong command.
Then the script point_stat.sh could be used for ASCII2NC conversion
and to
execute Point_stat.

I've to repeat all the steps for rest of the variables , which are
common in
obs and fcst data files. Here one observation data file  having all
the
variables. ie. suflnd_20110601_00z_india_All_data.xy. However, U and V
component of winds are not there, It could be included later on.

Thank you

On 14 October 2011 04:14, John Halley Gotway via RT
<met_help at ucar.edu>wrote:

> Harvir,
>
> It sounds like you'd like to use R to regrid your data.
Unfortunately, I
> don't have any advice to offer.  If you were using GRIB data, you
could use
> the copygb utility to regrid the data.  But I've
> never regridded data using R.  It may be possible, but I just don't
have
> never done it.
>
> Regarding the error you're getting from the NetCDF file, I see in
your
> "conv.sh" script the following call to R:
>   Rscript gts2nc_tmp.R header.txt
suflnd_20110601_00z_india_Air_TEMP.nc
>
> You have already sent me the Rscript file "gts2nc_tmp.R".  If you
would
> like to run that script and try to figure out the source of the
error,
> please send me the input file "header.txt".
>
> I'd be happy to run the script and see if there are any obvious
problems.
>
> Regarding problems with Point-Stat, you're going to have to be much
more
> specific for me to be able to help.  You'll need to send me the
input
> file(s), any config files you're using, the command line
> you're using, and a description of the problem.  I can try to
reproduce it
> here and debug the issue.
>
> John
>
>
> On 10/13/2011 01:12 AM, Harvir Singh via RT wrote:
> >
> > <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681 >
> >
> > Dear John,
> >
> > I would like to thank you thank you for your prompt reply. Of-
course yes
> I
> > know your roll in MET help. Actually I wanted  to ask you about
Rscript
> as
> > you have send me earlier for TRMM rainfall for 24 hours
accumulation and
> > I've tried it to modify for GTS/GFS data. Prior to running Rscript
> > (gts2nc_tmp.R) I've regridded data into same grid as of WRF models
fcst
> data
> > with GMT's (Generic Mapping Tools) surface command (it fails on
lines 4
> and
> > 5 at the calls to "surface" and "grd2xyz" in your's system) and
> > converted into grd2xyz (ascii) format again converted it to nc
through
> > (gts2nc_tmp.R) R-Statistics. However, you can give me some Idea
whether
> its
> > possible regridding through R-Statistics as its new for me.  Still
I'm
> > having the R-script execution problem and showing:
> > Error in dim(data) <- dim : attempt to set an attribute on NULL
> > Calls: array
> > Execution halted
> >
> > I know its not a very big problem but I'm just missing something
in
> > gts2nc_tmp.R. After successfull execution  of Rscript I want to
use
> > grid_stat for at least rainfall, TMP, Dew Point TMP, wind
components
> etc...
> > I have also transferred GridStatConfig_tmp file in the same
directory.
> >
> > I'm having another problem as follows:
> >
> >  I've tried it for Point_stat also after using ascii2nc. I'm
getting some
> > problem there also .
> > thanx
> >
> >
> > On 12 October 2011 23:37, John Halley Gotway via RT
<met_help at ucar.edu
> >wrote:
> >
> >> Harvir,
> >>
> >> I am having a difficult time understanding exactly what question
you are
> >> asking.  I see that you've posted data to our anonymous ftp site.
I
> >> retrieved those scripts and attempted to run the "conv.sh"
> >> script.  However, it fails on lines 4 and 5 at the calls to
"surface"
> and
> >> "grd2xyz" which I presume to be executables that are not defined
on my
> >> system.
> >>
> >> I do see the following question in your email:
> >>    Can you help me for creating a single R-script for converting
> >> multi-variable into NETCDF?
> >>
> >> Our role here at MET-Help is to answer questions related to the
use of
> MET.
> >>  Getting your data into a format that MET can handle is an issue
that
> comes
> >> up a lot.  And we're happy to provide
> >> suggestions or offer advice.  But generally, we will not do that
data
> >> reformatting for you.  Providing code for pre-processing the TRMM
data
> was
> >> an exception since we saw it as beneficial for a large
> >> number of users.
> >>
> >> If I haven't answered your questions here, please feel free to
write
> again,
> >> and state them as specifically and clearly as possible.
> >>
> >> Thanks,
> >> John
> >>
> >>
> >>
> >> On 10/12/2011 05:02 AM, Harvir Singh via RT wrote:
> >>>
> >>> Wed Oct 12 05:02:13 2011: Request 50681 was acted upon.
> >>> Transaction: Ticket created by harvirduphy at gmail.com
> >>>        Queue: met_help
> >>>      Subject: Need help for Grid_stat and Point Stat tool for
GTS/GFS
> >> data
> >>>        Owner: Nobody
> >>>   Requestors: harvirduphy at gmail.com
> >>>       Status: new
> >>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681>
> >>>
> >>>
> >>> Dear Sir/Madam
> >>>> I'm trying to verify GTS/GFS (obs) data with WRF out put (fcst)
>  through
> >>>> point_stat and grid_stat as well. Initially I was trying to
verify
> with
> >>>> point_stat as observation data is point/station data for the
> parameters
> >> viz.
> >>>> TMP, RR (rainfall), DT (Dew Point Temp), winds U/V component
etc
> >>>> I've transferred data files as well as script file in
> >>>> incoming/irap/met_help/singh_data.as
> >>>
> >>> conv.sh
> >>>
> >>> gts2nc_tmp.R
> >>>
> >>> suflnd_20110601_00z_india_Air_TEMP.xy
> >>>
> >>> suflnd_20110601_00z_india_All_data.xy
> >>>
> >>> wrfprs_d01_2011-06-01_000_fcst01.grib1
> >>>
> >>>
> >>> here file name includes date hour and
> >>> variable. suflnd_20110601_00z_india_All_data.xy file contains
all
> >> variable.
> >>> Conv.sh script I've written for regriding the point/station data
into
> >> same
> >>> grid as of WRF models fcst data with GMT surface command and
again
> >> converted
> >>> into ascii to convert it to nc through (gts2nc_tmp.R) R-
Statistics. Can
> >> you
> >>> help me for creating a single R-script for converting multi-
variable
> into
> >>> NETCDF?
> >>> Grid_stat is necessary for me , it would be better if can help
me out
> for
> >>> Point stat as well.
> >>>
> >>> Thanks in advance
> >>>
> >>> Harvir
> >>
> >>
> >
> >
>
>


--
*     Regards*
**************************************************************
**
*    HARVIR SINGH <http://www.harvir007.webs.com>*
*   **

***************************************************************

------------------------------------------------
Subject: Need help for Grid_stat and Point Stat tool for GTS/GFS data
From: John Halley Gotway
Time: Tue Oct 18 12:09:54 2011

Harvir,

Sorry for the delay in getting back to you.  I've had some issues come
up I needed to work on right away.

Regarding the issues you're having, here's how I debugged it...

(1) First, I ran you point_stat.sh script and saw the following output
from Point-Stat:
   Rejected: valid time     = 1003
That tells me that Point-Stat is not using your observations because
they don't fall in the observation time window.

(2) To rule that issue out, I passed the following arguments to Point-
Stat to open up the matching time window very wide:
   -obs_valid_beg 19000101 -obs_valid_end 21000101
Then, I reran Point-Stat again, but still got 0 matches.  But here's
what the output says this time:
   Rejected: off the grid   = 1003
So now, it's not using observations because they don't fall on your
forecast grid.

(3) The next step was to run the "plot_point_obs" tool to see where
MET thinks those observations are on the earth.  The output of
plot_point_obs is attached.  And as you can see, none of them fall on
your forecast domain.  The red dots are all to the west of your
domain.

(4) So I looked at the input to ascii2nc and noticed that column 4
looks funny.  That column is supposed to contain the latitude of the
observations, but instead contains a counter from 1 to 1003.

(5) So I took a step back and looked at your perl script: gts_conv.pl

Looking at the usage statement for ASCII2NC, here's what the 10-column
format should be:

        The only currently supported ASCII format is "met_point" in
which each row of observation data consists of 10 columns:
                Message_Type Station_ID Valid_Time(YYYYMMDD_HHMMSS)
                Lat(Deg North) Lon(Deg East) Elevation(msl)
                Grib_Code Level Height(msl or agl) Observation_Value

However, it looks like your perl script isn't writing that format out
exactly.
  printf "ADPSFC GFS  20110816_000000  %8.4f  %8.4f -9999.0 11  24
-9999.0 %8.4f\n",

I believe station ID was not being written as you expected and your
lat/lon's were reversed.  I made some changed to you script.  And was
able to get Point-Stat to work as expected.

I've attached an updated version of the gts_conv.pl script and another
plot_point_obs output file showing the location of the resulting
observations.

Let me know if you continue to experience problems.

Thanks,
John




On 10/14/2011 03:39 AM, Harvir Singh via RT wrote:
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681 >
>
> Dear John,
>
> Actually I wanted to know, if possible, R could be used to regrid
the data.
> If not, then its ok. If I were having the data in GRIB format  then
I could
> have done it a long back. Unfortunately the data I've is in ASCII
format.
>
> For the conversion of the data to NETCDF through the script conv.sh
I've
> transferred the header.txt  in same directory.
>
> Regarding the Point_stat I've transferred the input data along with
the
> script point_stat.sh which is having all the command lines.
>
> For point_stat you can consider observation file
> suflnd_20110601_00z_india_Air_TEMP.xy as input data for surface
temperature
> and wrfprs_d01_2011-06-01_000_fcst01.grib1 as fcst data from wrf
output here
> variable will be TMP, g.c.=11
>
> The input data file suflnd_20110601_00z_india_Air_TEMP.xy is having
only
> three columns viz. Latitute, Longitude and Air_TEMP.
>
> I'm assuming its a surface data so, for ascii2nc conversion here
the 10
> columns are as follows:
>
> 1. Massage Type : ADPSFC
> 2. Station ID        : GFS
> 3. Date n Time     : 20110601_000000
> 4. Latitude
> 5. Longitude
> 6. Elevation          :-9999.0 (as data not available)
> 7. Grib Code (g.c.):  11
> 8. Accum Interval  : 24
> 9.  Hight               : -9999.0 (as data not available)
> 10.Variable           : Air_Temp
>
> These 10 columns could be reproduce by the script gts_conv.pl. Just
check it
> I may have written some wrong command.
> Then the script point_stat.sh could be used for ASCII2NC conversion
and to
> execute Point_stat.
>
> I've to repeat all the steps for rest of the variables , which are
common in
> obs and fcst data files. Here one observation data file  having all
the
> variables. ie. suflnd_20110601_00z_india_All_data.xy. However, U and
V
> component of winds are not there, It could be included later on.
>
> Thank you
>
> On 14 October 2011 04:14, John Halley Gotway via RT
<met_help at ucar.edu>wrote:
>
>> Harvir,
>>
>> It sounds like you'd like to use R to regrid your data.
Unfortunately, I
>> don't have any advice to offer.  If you were using GRIB data, you
could use
>> the copygb utility to regrid the data.  But I've
>> never regridded data using R.  It may be possible, but I just don't
have
>> never done it.
>>
>> Regarding the error you're getting from the NetCDF file, I see in
your
>> "conv.sh" script the following call to R:
>>   Rscript gts2nc_tmp.R header.txt
suflnd_20110601_00z_india_Air_TEMP.nc
>>
>> You have already sent me the Rscript file "gts2nc_tmp.R".  If you
would
>> like to run that script and try to figure out the source of the
error,
>> please send me the input file "header.txt".
>>
>> I'd be happy to run the script and see if there are any obvious
problems.
>>
>> Regarding problems with Point-Stat, you're going to have to be much
more
>> specific for me to be able to help.  You'll need to send me the
input
>> file(s), any config files you're using, the command line
>> you're using, and a description of the problem.  I can try to
reproduce it
>> here and debug the issue.
>>
>> John
>>
>>
>> On 10/13/2011 01:12 AM, Harvir Singh via RT wrote:
>>>
>>> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681 >
>>>
>>> Dear John,
>>>
>>> I would like to thank you thank you for your prompt reply. Of-
course yes
>> I
>>> know your roll in MET help. Actually I wanted  to ask you about
Rscript
>> as
>>> you have send me earlier for TRMM rainfall for 24 hours
accumulation and
>>> I've tried it to modify for GTS/GFS data. Prior to running Rscript
>>> (gts2nc_tmp.R) I've regridded data into same grid as of WRF models
fcst
>> data
>>> with GMT's (Generic Mapping Tools) surface command (it fails on
lines 4
>> and
>>> 5 at the calls to "surface" and "grd2xyz" in your's system) and
>>> converted into grd2xyz (ascii) format again converted it to nc
through
>>> (gts2nc_tmp.R) R-Statistics. However, you can give me some Idea
whether
>> its
>>> possible regridding through R-Statistics as its new for me.  Still
I'm
>>> having the R-script execution problem and showing:
>>> Error in dim(data) <- dim : attempt to set an attribute on NULL
>>> Calls: array
>>> Execution halted
>>>
>>> I know its not a very big problem but I'm just missing something
in
>>> gts2nc_tmp.R. After successfull execution  of Rscript I want to
use
>>> grid_stat for at least rainfall, TMP, Dew Point TMP, wind
components
>> etc...
>>> I have also transferred GridStatConfig_tmp file in the same
directory.
>>>
>>> I'm having another problem as follows:
>>>
>>>  I've tried it for Point_stat also after using ascii2nc. I'm
getting some
>>> problem there also .
>>> thanx
>>>
>>>
>>> On 12 October 2011 23:37, John Halley Gotway via RT
<met_help at ucar.edu
>>> wrote:
>>>
>>>> Harvir,
>>>>
>>>> I am having a difficult time understanding exactly what question
you are
>>>> asking.  I see that you've posted data to our anonymous ftp site.
I
>>>> retrieved those scripts and attempted to run the "conv.sh"
>>>> script.  However, it fails on lines 4 and 5 at the calls to
"surface"
>> and
>>>> "grd2xyz" which I presume to be executables that are not defined
on my
>>>> system.
>>>>
>>>> I do see the following question in your email:
>>>>    Can you help me for creating a single R-script for converting
>>>> multi-variable into NETCDF?
>>>>
>>>> Our role here at MET-Help is to answer questions related to the
use of
>> MET.
>>>>  Getting your data into a format that MET can handle is an issue
that
>> comes
>>>> up a lot.  And we're happy to provide
>>>> suggestions or offer advice.  But generally, we will not do that
data
>>>> reformatting for you.  Providing code for pre-processing the TRMM
data
>> was
>>>> an exception since we saw it as beneficial for a large
>>>> number of users.
>>>>
>>>> If I haven't answered your questions here, please feel free to
write
>> again,
>>>> and state them as specifically and clearly as possible.
>>>>
>>>> Thanks,
>>>> John
>>>>
>>>>
>>>>
>>>> On 10/12/2011 05:02 AM, Harvir Singh via RT wrote:
>>>>>
>>>>> Wed Oct 12 05:02:13 2011: Request 50681 was acted upon.
>>>>> Transaction: Ticket created by harvirduphy at gmail.com
>>>>>        Queue: met_help
>>>>>      Subject: Need help for Grid_stat and Point Stat tool for
GTS/GFS
>>>> data
>>>>>        Owner: Nobody
>>>>>   Requestors: harvirduphy at gmail.com
>>>>>       Status: new
>>>>>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=50681>
>>>>>
>>>>>
>>>>> Dear Sir/Madam
>>>>>> I'm trying to verify GTS/GFS (obs) data with WRF out put (fcst)
>>  through
>>>>>> point_stat and grid_stat as well. Initially I was trying to
verify
>> with
>>>>>> point_stat as observation data is point/station data for the
>> parameters
>>>> viz.
>>>>>> TMP, RR (rainfall), DT (Dew Point Temp), winds U/V component
etc
>>>>>> I've transferred data files as well as script file in
>>>>>> incoming/irap/met_help/singh_data.as
>>>>>
>>>>> conv.sh
>>>>>
>>>>> gts2nc_tmp.R
>>>>>
>>>>> suflnd_20110601_00z_india_Air_TEMP.xy
>>>>>
>>>>> suflnd_20110601_00z_india_All_data.xy
>>>>>
>>>>> wrfprs_d01_2011-06-01_000_fcst01.grib1
>>>>>
>>>>>
>>>>> here file name includes date hour and
>>>>> variable. suflnd_20110601_00z_india_All_data.xy file contains
all
>>>> variable.
>>>>> Conv.sh script I've written for regriding the point/station data
into
>>>> same
>>>>> grid as of WRF models fcst data with GMT surface command and
again
>>>> converted
>>>>> into ascii to convert it to nc through (gts2nc_tmp.R) R-
Statistics. Can
>>>> you
>>>>> help me for creating a single R-script for converting multi-
variable
>> into
>>>>> NETCDF?
>>>>> Grid_stat is necessary for me , it would be better if can help
me out
>> for
>>>>> Point stat as well.
>>>>>
>>>>> Thanks in advance
>>>>>
>>>>> Harvir
>>>>
>>>>
>>>
>>>
>>
>>
>
>

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


More information about the Met_help mailing list