Fwd: how to handle varying variable name in list of grib files

From: samir pokhrel <samir_at_nyahnyahspammersnyahnyah>
Date: Sun Jul 21 2013 - 23:54:38 MDT

---------- Forwarded message ----------
From: samir pokhrel <pokhrelsamir@gmail.com>
Date: Mon, Jul 22, 2013 at 11:22 AM
Subject: Re: how to handle varying variable name in list of grib
files
To: David Brown <dbrown@ucar.edu>
Cc: ncl-talk@ucar.edu, "Sabeerali C. T." <sabeer@tropmet.res.in>, Rajib
Chattopadhyay <rajib@tropmet.res.in>, "M.Mahakur" <mmahakur@tropmet.res.in>,
"Mukho.Parthasarthy" <mpartha@tropmet.res.in>

Thats Great David,

 Its working fine. Thanks a lot for your such a efficient solution.
Regarding my second query do you have any idea to assign time with
irregular intervals?

Thanks again

Samir

On Fri, Jul 19, 2013 at 11:46 PM, David Brown <dbrown@ucar.edu> wrote:

> Hi Samir,
> There is a setfileoption that allows you to strip off the time period
> suffixes and treat these variables as the same. It is a True/False logical
> type option called TimePeriodSuffix.
>
> setfileoption("grb","TimePeriodSuffix",False)
>
> will cause all these variable names to be shortened to "PRATE_4_SFC_ave",
> allowing them to be concatenated into a single variable using addfiles. The
> forecast_time dimension should then contain the varying intervals starting
> from the initial time for each element. Of course it will be up to you to
> decide how to deal with the varying length of the averaging period.
> -dave
>
>
> On Jul 19, 2013, at 5:57 AM, samir pokhrel <samir@tropmet.res.in> wrote:
>
> Dear NCL users,
>
> I have a series of daily forecast (in grib2 format) from GFS T574 of
> varying hours
>
> the first day forcast has 3 hour intervals (6 files)
> the 2nd to 5th day forecast has 6 hour intervals (4 files each day for 4
> days = total 16 files)
> the 6th day forecast has 12 hour intervals (i.e 2 files)
> and the 7th (last) day forecast has 24 hour interval (i.e 1 file)
>
> so total I have 25 forecast file of one day
>
> I am reading all this file together using addfiles and also adding the
> extra time dimension using setfileoption
>
> it is working fine with all other variable (viz. wind, temp etc), however
> in case of precipitaion the variable name varies in each file so I am not
> able to retrieve it
>
> Now I am having following two queries on these data
>
> First Query
>
> 1) How to handle same variable with different name in different files so I
> can club them all together for further analysis
>
> File Name Variable Name
> gfs.t00z.pgrbf03.grb PRATE_4_SFC_ave3h
> gfs.t00z.pgrbf06.grb PRATE_4_SFC_ave6h
> gfs.t00z.pgrbf09.grb PRATE_4_SFC_ave9h
> gfs.t00z.pgrbf12.grb PRATE_4_SFC_ave12h
> gfs.t00z.pgrbf18.grb PRATE_4_SFC_ave18h
> gfs.t00z.pgrbf24.grb PRATE_4_SFC_ave24h
> gfs.t00z.pgrbf30.grb PRATE_4_SFC_ave6h
> gfs.t00z.pgrbf36.grb PRATE_4_SFC_ave12h
> gfs.t00z.pgrbf42.grb PRATE_4_SFC_ave18h
> gfs.t00z.pgrbf48.grb PRATE_4_SFC_ave24h
> gfs.t00z.pgrbf54.grb PRATE_4_SFC_ave6h
> gfs.t00z.pgrbf60.grb PRATE_4_SFC_ave12h
> gfs.t00z.pgrbf66.grb PRATE_4_SFC_ave18h
> gfs.t00z.pgrbf72.grb PRATE_4_SFC_ave24h
> gfs.t00z.pgrbf78.grb PRATE_4_SFC_ave6h
> gfs.t00z.pgrbf84.grb PRATE_4_SFC_ave12h
> gfs.t00z.pgrbf90.grb PRATE_4_SFC_ave18h
> gfs.t00z.pgrbf96.grb PRATE_4_SFC_ave24h
> gfs.t00z.pgrbf102.grb PRATE_4_SFC_ave6h
> gfs.t00z.pgrbf108.grb PRATE_4_SFC_ave12h
> gfs.t00z.pgrbf114.grb PRATE_4_SFC_ave18h
> gfs.t00z.pgrbf120.grb PRATE_4_SFC_ave24h
> gfs.t00z.pgrbf132.grb PRATE_4_SFC_ave12h
> gfs.t00z.pgrbf144.grb PRATE_4_SFC_ave24h
> gfs.t00z.pgrbf168.grb PRATE_4_SFC_ave24h
>
>
> Second Query
>
> 2) How to put time value of irregular interval in the clubbed variable of
> all 25 files together
>
> Hope I am clear enough to make you all understand the issues.
>
> Thanks you all in advance.
>
> Regards
>
> Samir Pokhrel
> Climate and Global Modelling Division
> Indian Institute of Tropical Meteorology
> NCL Post, Pashan
> Pune-411008
> INDIA _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>

-- 
Samir Pokhrel
Climate and Global Modelling Division
Indian Institute of Tropical Meteorology
NCL Post, Pashan
Pune-411008
INDIA
-- 
Samir Pokhrel
Climate and Global Modelling Division
Indian Institute of Tropical Meteorology
NCL Post, Pashan
Pune-411008
INDIA

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Jul 21 23:54:48 2013

This archive was generated by hypermail 2.1.8 : Thu Jul 25 2013 - 21:02:42 MDT