ncl_filedump and wgrib (ahmed lasheen)

From: Li, Yongzuo <yongzuo.li_at_nyahnyahspammersnyahnyah>
Date: Wed Oct 05 2011 - 14:52:14 MDT

Ahmed,

What program (WRF NMM ?) generates the grib data?
Are you using E-staggered grid?

Yongzuo
________________________________________
From: ncl-talk-bounces@ucar.edu [ncl-talk-bounces@ucar.edu] on behalf of ncl-talk-request@ucar.edu [ncl-talk-request@ucar.edu]
Sent: Wednesday, October 05, 2011 1:00 PM
To: ncl-talk@ucar.edu
Subject: ncl-talk Digest, Vol 95, Issue 7

Send ncl-talk mailing list submissions to
        ncl-talk@ucar.edu

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.ucar.edu/mailman/listinfo/ncl-talk
or, via email, send a message with subject or body 'help' to
        ncl-talk-request@ucar.edu

You can reach the person managing the list at
        ncl-talk-owner@ucar.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ncl-talk digest..."

Today's Topics:

   1. Re: Coverting date format was: Problems with Ut_string
      (Carl Schreck)
   2. Re: making JJA without using month_to_season function
      (louis Vonder)
   3. Re: making JJA without using month_to_season function
      (louis Vonder)
   4. Re: making JJA without using month_to_season function (Ping Huang)
   5. Re: ncl_filedump and wgrib (ahmed lasheen)
   6. From zulu to CET time (ugo merlini)
   7. Re: Coverting date format was: Problems with Ut_string
      (donna Cote)
   8. missing data (Xiaoyan Ma)
   9. Re: missing data (Adam Phillips)

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

Message: 1
Date: Tue, 4 Oct 2011 16:35:14 -0400
From: Carl Schreck <carl@cicsnc.org>
Subject: Re: Coverting date format was: Problems with
        Ut_string
To: ugo merlini <ugomerlini@hotmail.com>
Cc: ncl-talk@ucar.edu
Message-ID:
        <CANGuUDGiUg_21h5Or0-ZzjWK9ko9jr1JqBq1pEN5UZAVTk=9cw@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

I think you are still missing some pluses. Try this:
date2 = "date -d " + date1 + " +'%A, %d/%m/%Y ore %H'"
(also attached). Also note the single quotes around the format statement.

ut_string can do something very similar, but as of now it can't add the day
of the week. I'll put that on my todo list....

   Carl

On Mon, Oct 3, 2011 at 3:00 PM, ugo merlini <ugomerlini@hotmail.com> wrote:

> Hi
>
> I would like to convert the date format from the standard one to
>
> date -d "20111002 03 +2 hour" +"%A, %d/%m/%Y ore %H"
>
> I write a little script
>
> can someone help to go to the right way?
>
> is better to use internal NCL function instead of Unix shell command?
>
> Regards
>
> Ugo
>
>
>
> ------------------------------
> From: carl@cicsnc.org
> Date: Mon, 3 Oct 2011 09:08:30 -0400
> Subject: Re: Problems with Ut_string
> To: ugomerlini@hotmail.com
> CC: ncl-talk@ucar.edu
>
> I believe you are missing some quotes on line 304. Try this:
>
> date2 = systemfunc("date -d " + date + " +'%A %H'")
>
> Previously, the date in parentheses was calling the unix command date, not
> your variable date. Hope this helps!
>
> Carl
>
> On Sun, Oct 2, 2011 at 1:37 PM, ugo merlini <ugomerlini@hotmail.com>wrote:
>
> hi,
>
> I'm trying to make a custom date format so I extract gfs timestamp and put
> it in a format readable from linux shel comand (lines 300 and 301) and I
> obtain the right format YYYYMMDD HH (line 304) as bah command line want
>
> so i made (line 304)
>
> date2 = systemfunc("date -d '(date)' +'%A %H'")
>
> but the result is always Sunday 00
>
> Why?
>
> Regards
>
> Ugo
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> --
> Carl J. Schreck III, PhD
> Postdoctoral Research Associate
> Cooperative Institute for Climate and Satellites (CICS-NC)
> North Carolina State University and NOAA's National Climatic Data Center
> 151 Patton Avenue
> Asheville, NC 28801
> Tel: 828-257-3140
> carl@cicsnc.org
> http://monitor.cicsnc.org/mjo/
> http://www.atmos.albany.edu/student/carl/
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

--
Carl J. Schreck III, PhD
Postdoctoral Research Associate
Cooperative Institute for Climate and Satellites (CICS-NC)
North Carolina State University and NOAA's National Climatic Data Center
151 Patton Avenue
Asheville, NC 28801
Tel: 828-257-3140
carl@cicsnc.org
http://monitor.cicsnc.org/mjo/
http://www.atmos.albany.edu/student/carl/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111004/7ea713c0/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: time.ncl
Type: application/octet-stream
Size: 1418 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111004/7ea713c0/attachment.obj
------------------------------
Message: 2
Date: Wed, 5 Oct 2011 11:57:38 +0100 (BST)
From: louis Vonder <appopson@yahoo.fr>
Subject: Re: making JJA without using month_to_season
        function
To: ncl forum <ncl-talk@ucar.edu>
Message-ID:
        <1317812258.45868.YahooMailClassic@web26303.mail.ukl.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
How about using CDO?
As he has netcdf ?dataset?
You ca try something like
cdo selseas,JJA ? infile.nc ?outfile.nc
Regards
--- En date de?: Mar 4.10.11, Dennis Shea <shea@ucar.edu> a ?crit?:
De: Dennis Shea <shea@ucar.edu>
Objet: Re: [ncl-talk] making JJA without using month_to_season function
?: "Siraj ul Islam" <sirajkhan78@gmail.com>
Cc: ncl-talk@ucar.edu
Date: Mardi 4 octobre 2011, 21h48
???yrStrt = 2000
???yrLast = 2009
???nyrs???=? yrLast-yrStrt+1
; Method 1
???prect_jja???= new ( nyrs, "float", "No_FillValue")
???prect? = f->PRECT
On 10/4/11 1:38 PM, Siraj ul Islam wrote:
> Hi all,
>
> This may be a very easy question. I have a ten year monthly data file
> and for each year there are only 5 months (May, June, July, August and
> Sep.) data. In total my 10 year data has (10 x 5) 50 months. Now I want
> to analyze JJA season each year. As all the built in functions
> (*clmMonLLT*, month_to_season) in NCL need 12 months data file (time
> dimension must be a multiple of 12) and therefore I cannot use them for
> my data. Is there any other way to average out JJA each year or to
> calculate climatology for each m
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111005/5e43a6ba/attachment.html
------------------------------
Message: 3
Date: Wed, 5 Oct 2011 12:00:40 +0100 (BST)
From: louis Vonder <appopson@yahoo.fr>
Subject: Re: making JJA without using month_to_season
        function
To: ncl forum <ncl-talk@ucar.edu>
Message-ID:
        <1317812440.12121.YahooMailClassic@web26306.mail.ukl.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
How about using CDO?
As he has netcdf ?dataset?
You ca try something like
cdo selseas,JJA ? infile.nc ?outfile.nc
Regards
--- En date de?: Mar 4.10.11, Dennis Shea <shea@ucar.edu> a ?crit?:
De: Dennis Shea <shea@ucar.edu>
Objet: Re: [ncl-talk] making JJA without using month_to_season function
?: "Siraj ul Islam" <sirajkhan78@gmail.com>
Cc: ncl-talk@ucar.edu
Date: Mardi 4 octobre 2011, 21h48
???yrStrt = 2000
???yrLast%2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111005/43639650/attachment.html
------------------------------
Message: 4
Date: Wed, 5 Oct 2011 19:20:53 +0800
From: Ping Huang <ph0007@ustc.edu>
Subject: Re: making JJA without using month_to_season
        function
To: Siraj ul Islam <sirajkhan78@gmail.com>
Cc: NCL-talk <ncl-talk@ucar.edu>
Message-ID: <2B04F8D9-1EE0-459C-8800-5193FBF3BB8B@ustc.edu>
Content-Type: text/plain; charset="gb2312"
Hi, Siraj
I'm sorry the former code has an error. These codes should be following:
precip = inFile->PRECT
precip2 = onedtond(precip, (/10, 5, 96, 144/))
precip_JJA = dim_avg_n(precip2(:, 1:3, :, :), 1)
BTW, onedtond can transfer an nd data to another n dimensions data. It is very powerful.
? 2011-10-5???3:38? Siraj ul Islam ???
> Hi all,
>
> This may be a very easy question. I have a ten year monthly data file and for each year there are only 5 months (May, June, July, August and Sep.) data. In total my 10 year data has (10 x 5) 50 months. Now I want to analyze JJA season each year. As all the built in functions (clmMonLLT, month_to_season) in NCL need 12 months data file (time dimension must be a multiple of 12) and therefore I cannot use them for my data. Is there any other way to average out JJA each year or to calculate climatology for each month?
>
> here is the ncdump out put for my file.
>
>
> netcdf cam4_dsp_may_2000_2009 {
> dimensions:
>     lat = 96 ;
>     lon = 144 ;
>     time = UNLIMITED ; // (50 currently)
> variables:
>     double lat(lat) ;
>         lat:long_name = "latitude" ;
>         lat:units = "degrees_north" ;
>     double lon(lon) ;
>         lon:long_name = "longitude" ;
>         lon:units = "degrees_east" ;
>     double time(time) ;
>         time:long_name = "time" ;
>         time:units = "days since 2000-05-01 00:00:00" ;
>         time:calendar = "noleap" ;
>         time:bounds = "time_bnds" ;
>     float PRECT(time, lat, lon) ;
>         PRECT:units = "m/s" ;
>         PRECT:long_name = "Total (convective and large-scale) precipitation rate (liq + ice)" ;
>         PRECT:cell_methods = "time: mean" ;
>     float PS(time, lat, lon) ;
>         PS:units = "Pa" ;
>         PS:long_name = "Surface pressure" ;
>         PS:cell_methods = "time: mean" ;
>     float TREFHT(time, lat, lon) ;
>         TREFHT:units = "K" ;
>         TREFHT:long_name = "Reference height temperature" ;
>         TREFHT:cell_methods = "time: mean" ;
>     float U200(time, lat, lon) ;
>         U200:units = "m/s" ;
>         U200:long_name = "Zonal wind at 200 mbar pressure surface" ;
>         U200:cell_methods = "time: mean" ;
>     float U850(time, lat, lon) ;
>         U850:units = "m/s" ;
>         U850:long_name = "Zonal wind at 850 mbar pressure surface" ;
>         U850:cell_methods = "time: mean" ;
>     float V200(time, lat, lon) ;
>         V200:units = "m/s" ;
>         V200:long_name = "Meridional wind at 200 mbar pressure surface" ;
>         V200:cell_methods = "time: mean" ;
>     float V850(time, lat, lon) ;
>         V850:units = "m/s" ;
>         V850:long_name = "Meridional wind at 850 mbar pressure surface" ;
>         V850:cell_methods = "time: mean" ;
>     float Z500(time, lat, lon) ;
>         Z500:units = "m" ;
>         Z500:long_name = "Geopotential Z at 500 mbar pressure surface" ;
>         Z500:cell_methods = "time: mean" ;
>
> // global attributes:
>         :Conventions = "CF-1.0" ;
>         :source = "CAM" ;
>         :case = "fv1.9x2.5_2000_05" ;
>         :title =  ;
>         :logname = "siraj" ;
>         :host = "b158" ;
>         :Version = "$Name$" ;
>         :revision_Id = "$Id$" ;
>         :initial_file = "/home/siraj/ccsm4_working_copy/inputdata/2000/May/cam_initial_day01_00Z.nc" ;
>         :topography_file = "/home/siraj/ccsm4_working_copy/inputdata/atm/cam/topo/USGS-gtopo30_1.9x2.5_remap_c050602.nc" ;
>         :history = "Wed Sep 21 15:55:24 2011: ncrcat fv1.9x2.5_2000_05.cam2.h0.2000-05.nc fv1.9x2.5_2000_05.cam2.h0.2000-06.nc fv1.9x2.5_2000_05.cam2.h0.2000-07.nc fv1.9x2.5_2000_05.cam2.h0.2000-08.nc fv1.9x2.5_2000_05.cam2.h0.2000-09.nc fv1.9x2.5_2001_05.cam2.h0.2001-05.nc fv1.9x2.5_2001_05.cam2.h0.2001-06.nc fv1.9x2.5_2001_05.cam2.h0.2001-07.nc fv1.9x2.5_2001_05.cam2.h0.2001-08.nc fv1.9x2.5_2001_05.cam2.h0.2001-09.nc fv1.9x2.5_2002_05.cam2.h0.2002-05.nc fv1.9x2.5_2002_05.cam2.h0.2002-06.nc fv1.9x2.5_2002_05.cam2.h0.2002-07.nc fv1.9x2.5_2002_05.cam2.h0.2002-08.nc fv1.9x2.5_2002_05.cam2.h0.2002-09.nc fv1.9x2.5_2003_05.cam2.h0.2003-05.nc fv1.9x2.5_2003_05.cam2.h0.2003-06.nc fv1.9x2.5_2003_05.cam2.h0.2003-07.nc fv1.9x2.5_2003_05.cam2.h0.2003-08.nc fv1.9x2.5_2003_05.cam2.h0.2003-09.nc fv1.9x2.5_2004_05.cam2.h0.2004-05.nc fv1.9x2.5_2004_05.cam2.h0.2004-06.nc fv1.9x2.5_2004_05.cam2.h0.2004-07.nc fv1.9x2.5_2004_05.cam2.h0.2004-08.nc fv1.9x2.5_2004_05.cam2.h0.2004-09.nc fv1.9x2.5_
 2005_05.cam2.h0.2005-05.nc fv1.9x2.5_2005_05.cam2.h0.2005-06.nc fv1.9x2.5_2005_05.cam2.h0.2005-07.nc fv1.9x2.5_2005_05.cam2.h0.2005-08.nc fv1.9x2.5_2005_05.cam2.h0.2005-09.nc fv1.9x2.5_2006_05.cam2.h0.2006-05.nc fv1.9x2.5_2006_05.cam2.h0.2006-06.nc fv1.9x2.5_2006_05.cam2.h0.2006-07.nc fv1.9x2.5_2006_05.cam2.h0.2006-08.nc fv1.9x2.5_2006_05.cam2.h0.2006-09.nc fv1.9x2.5_2007_05.cam2.h0.2007-05.nc fv1.9x2.5_2007_05.cam2.h0.2007-06.nc fv1.9x2.5_2007_05.cam2.h0.2007-07.nc fv1.9x2.5_2007_05.cam2.h0.2007-08.nc fv1.9x2.5_2007_05.cam2.h0.2007-09.nc fv1.9x2.5_2008_05.cam2.h0.2008-05.nc fv1.9x2.5_2008_05.cam2.h0.2008-06.nc fv1.9x2.5_2008_05.cam2.h0.2008-07.nc fv1.9x2.5_2008_05.cam2.h0.2008-08.nc fv1.9x2.5_2008_05.cam2.h0.2008-09.nc fv1.9x2.5_2009_05.cam2.h0.2009-05.nc fv1.9x2.5_2009_05.cam2.h0.2009-06.nc fv1.9x2.5_2009_05.cam2.h0.2009-07.nc fv1.9x2.5_2009_05.cam2.h0.2009-08.nc fv1.9x2.5_2009_05.cam2.h0.2009-09.nc -v TREFHT,PS,PRECT,V200,U200,V850,U850,Z500 cam4_dsp_may_2000_2009.nc" ;
>         :nco_openmp_thread_number = 1 ;
> }
>
>
> --
> Siraj Ul Islam
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111005/6a95f511/attachment.html
------------------------------
Message: 5
Date: Wed, 5 Oct 2011 17:23:40 +0200
From: ahmed lasheen <ahmed4kernel@gmail.com>
Subject: Re: ncl_filedump and wgrib
To: David Brown <dbrown@ucar.edu>
Cc: NCL-talk <ncl-talk@ucar.edu>
Message-ID:
        <CANkG+wk3KZcX-xxkD-Q=X3WHt7ffNQpkQybJy4pgR9FfLLrgjg@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
thanks for your help
i will try to do this merge
regards
On Mon, Oct 3, 2011 at 11:28 PM, David Brown <dbrown@ucar.edu> wrote:
> Hi Ahmed,
> The point is that this is the way the file is written. NCL cannot
> extrapolate for the GRIB records that have fewer longitude elements. Neither
> can wgrib or any other tool I know of. You could combine the variables as
> NCL reads them into a single variable yourself. You would need to fill in
> the missing elements along the longitude dimension with _FillValues but it
> could be done. Look at the 2 forecast_time coordinate variables to figure
> out how to merge the variables into one.
>  -dave
>
> On Oct 3, 2011, at 1:54 AM, ahmed lasheen wrote:
>
> thanks for your help.
> Now , i understood why the NCL generate all these variables.
> But still an issue, that it seems that NCL make two copies of each
> variables, each variable
> with different longitude .so we have one variable with small number of
> longitudes and other with a big number of longitude, so from where NCL can
> get the values of the variable when it generate the variable with
> large longitude for whole domain as it is only define for a subset of the
> data in the grib file , does NCL makes extrapolation.?
>
> the file that i am using is a subset of the WRF NMM core output .
> i am trying to figure out why  WRF generate such variables with such change
> in longitudes.
> regards,
>
>  On Thu, Sep 29, 2011 at 6:28 PM, Gus Correa <gus@ldeo.columbia.edu>wrote:
>
>> Hi David, Ahmed
>>
>> I came across to this type of problem in the past, with the CFS model
>> output [grib1 files].
>> I used ncl_convert2nc [which seems to behave similar to ncl_filedump
>> used by Ahmed] to convert the data from grib1 to NetCDF,
>> and in some occasions there was more than one variable in the
>> output for a single variable in the input file [just as in Ahmed's case].
>>
>> There was yet another discussion about this problem started by
>> Allison Steiner in this list last July.
>> See this thread, it may be helpful:
>>
>> http://www.ncl.ucar.edu/Support/talk_archives/2011/1795.html
>>
>> However, in that case [and in mine] the problem was related to
>> time grid variation, because models [CFS, CSFR, etc] seem to
>> do something about the time grid (not the spatial grids)
>> that doesn't make Grib very happy.
>>
>> I am not savvy on grib format, but I suppose grib was
>> designed to acommodate data that might have grids
>> with varying spatial resolution, which might also have
>> variable time sampling interval, etc.
>> It was designed particularly for observational data,
>> where stations or other observation platforms may fail, new ones may
>> come to play, some may sample once a day, others every hour, etc,
>> hence producing sparse and irregular data.
>>
>> By contrast NetCDF, maybe other formats, have a more stable format,
>> often handling model data,
>> with grid sizes declared ahead of time [except for the time/record
>> dimension].
>> Maybe NCL adopts an approach similar to NetCDF, expecting grids to
>> be static, regular.
>> I suppose that following this logic,
>> NCL splits any Grib irregular grid in a
>> minimal set of regular grids, which is what puzzles Ahmed,
>> but was clearly explained by David in the case of the longitude grid.
>>
>> Someone correct me if I am wrong, but grib seems to store
>> the spatial grids for each time record, whereas
>> NetCDF stores a single set of spatial grids for all time records.
>>
>> In the past I was also distressed by NCL producing several variables for
>> a single grib variable on the input, whenever any of the grids change.
>> However, now I am convinced that NCL does the right thing, as David said.
>>
>> Now, here is where I don't agree with David.
>> If Ahmed data is observational, there may be no mistake
>> whatsoever during its production.
>> The irregular spatial grids may just reflect the irregularity
>> of the sampling process in the real world.
>>
>> My two cents,
>> Gus Correa
>>
>> David Brown wrote:
>> > Hi Ahmed,
>> >
>> > I examined your file and have found that the variables you list below
>> > differ not only in time but also in space: there are 2 different grids
>> > represented. They both have the same latitude elements, but in
>> > longitude, one grid has 277 elements from -16.686 to 75.22 while the
>> > other has 261 elements from -16.686 to 70. You see this with wgrib if
>> > you run it as wgrib -V and compare, for instance, record 167 and 168
>> > (both APCP in wgrib). Considering the randomness of the way the 2 grids
>> > are interspersed in the forecast time sequence, perhaps there was a
>> > mistake in the production of these files,  but NCL has no choice but to
>> > consider these as two different variables. As for the variables with the
>> > suffix _acc,  they do belong in some sense to the corresponding variable
>> > with the _acc3h suffix: they are the initial record at the beginning of
>> > the accumulation period. However, since no time has passed they do not
>> > fit the 3 hour accumulation designation. Their values are all either 0
>> > or the missing value so their absence from the time array dimension
>> > should be easy to work around.
>> >  -dave
>> >
>> > On Sep 28, 2011, at 4:15 PM, ahmed lasheen wrote:
>> >
>> >> thanks for your reply .
>> >> i read the NCL manual for how NCL  process the grib file.But i
>> >> still wondering for example if NCL finds that the grib file contains
>> >> several records with the  same variable name ,with  the same level
>> >> (ex: isobaric level) and same dimension , differ only in time , then
>> >> why it nesed to create different variables .the algorithm of the NCL
>> >> as i understand should not permit generation of such variables.
>> >> in my grib file i have 3 variables only and here is the dump of the
>> >> file using the ncl.
>> >> sometimes these variables are misleading and confusing.
>> >>       float A_PCP_GDS0_SFC_acc ( g0_lat_0, g0_lon_1 )
>> >>       float A_PCP_GDS0_SFC_acc3h ( forecast_time2, g0_lat_0, g0_lon_1)
>> >>       float A_PCP_GDS0_SFC_acc3h_1 ( forecast_time3, g0_lat_4, g0_lon_5
>> )
>> >>       float NCPCP_GDS0_SFC_acc ( g0_lat_0, g0_lon_1 )
>> >>       float NCPCP_GDS0_SFC_acc3h ( forecast_time2, g0_lat_0, g0_lon_1 )
>> >>       float NCPCP_GDS0_SFC_acc3h_1 ( forecast_time3, g0_lat_4,
>> g0_lon_1)
>> >>       float ACPCP_GDS0_SFC_acc ( g0_lat_0, g0_lon_1 )
>> >>       float ACPCP_GDS0_SFC_acc3h ( forecast_time2, g0_lat_0, g0_lon_1
>> >>       float ACPCP_GDS0_SFC_acc3h_1 ( forecast_time3, g0_lat_4, g0_lon_5
>> )
>> >>     i aslo have attached the dump of file using both wgrib and
>> ncl_fildump
>> >>
>> >> On Wed, Sep 28, 2011 at 11:18 PM, David Brown <dbrown@ucar.edu
>> >> <mailto:dbrown@ucar.edu>> wrote:
>> >>
>> >>     Hi Ahmed,
>> >>
>> >>     wgrib simply lists each record in a GRIB file in the order it
>> >>     finds them. NCL looks through the whole file and organizes the
>> >>     records into variables with time and level dimensions in addition
>> >>     to the horizontal lat/lon dimensions. But in order to add those
>> >>     dimensions, it needs to make sure  that the records are
>> >>     compatible. GRIB has many types of level records for instance
>> >>     (e.g. sigma levels,  hybrid levels, pressure levels). In order to
>> >>     create a valid level dimension, all the records used must have the
>> >>     same type of level, in addition to representing the same type of
>> >>     quantity. Further, the GRIB file can contain records with the same
>> >>     type of quantity but on different horizontal grids, with different
>> >>     extents or resolutions or projection type. These must be
>> >>     represented with different variables. The whole process that NCL
>> >>     uses to represent GRIB data is described in detail
>> >>     at
>> http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclFormatSupport.shtml#GRIB
>> .
>> >>     I hope this helps.
>> >>      -dave
>> >>
>> >>
>> >>     On Sep 28, 2011, at 1:31 PM, ahmed lasheen wrote:
>> >>
>> >>>     hello
>> >>>     when i make wgrib for grib1 file contains precipitation data , i
>> >>>     found three variables which are precipitation  of grid scale
>> >>>     , precipitation of convective scale and total
>> >>>     scale precipitation.But when i make ncl_filedump i see 9
>> >>>     variables which represent those variables plus others
>> >>>     related variables to them
>> >>>     but different on the average time and grid location.why this
>> >>>     occur ? and what this difference means between  wgrib and
>> >>>     ncl_filedump?.
>> >>>     thanks in advance
>> >>>
>> >>>     --
>> >>>     ===============
>> >>>     Ahmed Lasheen
>> >>>     Junior researcher at Cairo Numerical Weather Prediction Center
>> >>>     (CNWPC)
>> >>>     Egyptian Meteorological Authority(EMA)
>> >>>     Cairo,Egypt
>> >>>     ===============
>> >>>
>> >>>     _______________________________________________
>> >>>     ncl-talk mailing list
>> >>>     List instructions, subscriber options, unsubscribe:
>> >>>     http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> ===============
>> >> Ahmed Lasheen
>> >> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
>> >> Egyptian Meteorological Authority(EMA)
>> >> Cairo,Egypt
>> >> ===============
>> >>
>> >> <wgrib><ncl>_______________________________________________
>> >> ncl-talk mailing list
>> >> List instructions, subscriber options, unsubscribe:
>> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> >
>> >
>> > ------------------------------------------------------------------------
>> >
>> > _______________________________________________
>> > ncl-talk mailing list
>> > List instructions, subscriber options, unsubscribe:
>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
>
>
> --
> ===============
> Ahmed Lasheen
> Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
> Egyptian Meteorological Authority(EMA)
> Cairo,Egypt
> ===============
>
>  _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
--
===============
Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)
Cairo,Egypt
===============
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111005/a4a2a2a2/attachment.html
------------------------------
Message: 6
Date: Wed, 5 Oct 2011 16:09:56 +0000
From: ugo merlini <ugomerlini@hotmail.com>
Subject: From zulu to CET time
To: <ncl-talk@ucar.edu>
Message-ID: <DUB108-W2538A5561D764852D611F9CAF80@phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
exist a way to convert Zulu time to CET / CEST time?
I tried to call unix date function but the string has many quotes and NCL is going crazy
Ugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111005/3290e898/attachment.html
------------------------------
Message: 7
Date: Wed, 05 Oct 2011 11:15:53 -0500
From: donna Cote <d-cote@tamu.edu>
Subject: Re: Coverting date format was: Problems with
        Ut_string
To: ncl-talk@ucar.edu, ugomerlini@hotmail.com
Message-ID: <4E8C82B9.5020806@tamu.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
I should have reset the Subject line. Ugo, I'm sending an extra copy to
your email address. -Donna
On 10/4/11 3:27 PM, ncl-talk-request@ucar.edu wrote:
> Date: Tue, 04 Oct 2011 14:29:44 -0500
> From: donna Cote<d-cote@tamu.edu>
> Subject: Re: ncl-talk Digest, Vol 95, Issue 5
> To:ncl-talk@ucar.edu
> Message-ID:<4E8B5EA8.1010906@tamu.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Ugo, for adding 2 hours, I would find the NCL date functions more
> useful. You might look over this. It's what I use often:
> $ cat timetest.ncl
> date1String=systemfunc( "date +%Y%m%d%H" )
> print("given string as YYYYMMDDHH is "+date1String)
>
> yearInt = stringtointeger( str_get_cols( date1String,  0,  3) )
> monInt  = stringtointeger( str_get_cols( date1String,  4,  5) )
> dayInt  = stringtointeger( str_get_cols( date1String,  6,  7) )
> hrInt   = stringtointeger( str_get_cols( date1String,  8,  9) )
> timeUnits = "hours since 1800-01-01 00:00:00"
>
> date1Time = ut_inv_calendar( yearInt, monInt, dayInt, hrInt, 0, 0,
> timeUnits, 0 )
>
> ; since date1Time has the units "hours since ..." the 2 here adds 2 hours
> date2Time = date1Time + 2
> date2Time@units = timeUnits
> ;print(date2Time@units)
>
> date2Int = ut_calendar( date2Time, -3 )
> ;print(date2Int)
>
> date2String=sprinti ( "%0.8i", date2Int )
> ;print(date2String)
>
> ymd2String=str_get_cols ( date2String,  0, 7 )
> hr2String =str_get_cols ( date2String,  8, 9 )
>
> newDate2String=systemfunc( "date -d '"+ymd2String+" "+hr2String+"' '+%A,
> %d/%m/%Y %H'" )
> print("new string is "+newDate2String)
>
> ;date -d "20111004 05" +"%A, %d/%m/%Y"
>
> $ ncl timetest.ncl
>    Copyright (C) 1995-2011 - All Rights Reserved
>    University Corporation for Atmospheric Research
>    NCAR Command Language Version 6.0.0
>    The use of this software is governed by a License Agreement.
>    Seehttp://www.ncl.ucar.edu/  for more details.
> (0)   given string as YYYYMMDDHH is 2011100414
> (0)   new string is Tuesday, 04/10/2011 16
> $
>
>
> On 10/4/11 1:00 PM,ncl-talk-request@ucar.edu  wrote:
>> >  Date: Mon, 3 Oct 2011 19:00:46 +0000
>> >  From: ugo merlini<ugomerlini@hotmail.com>
>> >  Subject: Coverting date format was: Problems with Ut_string
>> >  To:<ncl-talk@ucar.edu>
>> >  Message-ID:<DUB108-W421534FE7D84406AC15C56CAFA0@phx.gbl>
>> >  Content-Type: text/plain; charset="iso-8859-1"
>> >
>> >
>> >  Hi
>> >
>> >  I would like to convert the date format from the standard one to
>> >
>> >     date -d "20111002 03 +2 hour" +"%A, %d/%m/%Y ore %H"
>> >
>> >  I write a little script
>> >
>> >  can someone help to go to the right way?
>> >
>> >  is better to use internal NCL function instead of Unix shell command?
>> >
>> >  Regards
>> >
>> >  Ugo
------------------------------
Message: 8
Date: Wed, 05 Oct 2011 12:27:55 -0400
From: Xiaoyan Ma <xiaoyan.ma@asrc.albany.edu>
Subject: missing data
To: ncl-talk@ucar.edu
Message-ID: <7420cf466126.4e8c4d4b@asrc.albany.edu>
Content-Type: text/plain; charset="us-ascii"
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20111005/72f55950/attachment.html
------------------------------
Message: 9
Date: Wed, 05 Oct 2011 11:02:29 -0600
From: Adam Phillips <asphilli@ucar.edu>
Subject: Re: missing data
To: ncl-talk@ucar.edu
Message-ID: <4E8C8DA5.8030304@ucar.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Xiaoyan,
There might be a few problems here. Are you getting any error messages?
I would guess that you are... If you are the next time you send a
question to ncl-talk please include any error messages that you are
getting...
Does your var array have latitude/longitude coordinate variables
assigned to it? From the snippet of code you sent I don't see them..
You are reading in your data from a binary file, but when you do that
there will not be any information associated associated with your data
array that describes it. So, you need to assign that information to your
var array:
var!0 = "lat"
var&lat = ispan(-90,90,4)  ; I am guessing that your latitudes run from
                            ; -90:90 by 4.. You may need to change this.
var&lat@units = "degrees_north"
var!1 = "lon"
var&lon = ispan(0,355,5)   ; I am guessing that your longitudes run from
                            ; 0:355 by 6.. You may need to change this.
var&lon@units = "degrees_east"
By default, NCL will color fill areas denoted by the _FillValue
attribute as white. So you need to make sure that var@_FillValue is set
appropriately:
var@_FillValue =      ; set _FillValue, where data is missing, to the
                       ; appropriate value
Finally, and this might be most important, if your var array is mostly
composed of missing data, you are going to want to tell NCL to Raster
Fill, instead of Area Fill.. Going to Raster Fill will show each
individual grid box, while Area Fill may or may not.. So, add this:
res@cnFillMode = "RasterFill"
to your resource list.
If that advice doesn't solve your issue, please respond back to
ncl-talk.. Adam
On 10/05/2011 10:27 AM, Xiaoyan Ma wrote:
> Hi
>
> I want to create a contour plot from the observational data, i.e. for a
> 46*72 grid there are only ~ 100 points with observations, other points
> with missing data (I set a value as 0.0001). when I use ncl as below, I
> want to let those points with missing data as WHITE, but others as
> color. I do so in 2 ways:
>
> 1) set missing data as mask
> 2) set missing data as FillValue
>
> I do see there are values  of non-0.0001 by using print, but  the
> contour looks all white from 1) or 2). anybody tell me what is wrong?
>
> thanks a lot.
>
> Xiaoyan
>
> --------------------------------------------------------------------------
>    var = fbindirread("1.dat",0, (/46,72/), "float")
>
>   print(var)
> ;  var = mask(var,var.le.0.001,False)                 ; create
> artificial areas of missing data
>
>    var@_FillValue       = 0.0001                   ; sets _FillValue to
> 0.0001
>
>    res                  = True                      ; plot mods desired
>    res@cnFillOn         = True                      ; turn on color
>    res@cnLinesOn        = False                ; no contour lines
>
>    plot= gsn_csm_contour_map_ce(wks,var,res)
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
--
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
------------------------------
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
End of ncl-talk Digest, Vol 95, Issue 7
***************************************
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 5 14:52:23 2011

This archive was generated by hypermail 2.1.8 : Mon Oct 10 2011 - 11:43:35 MDT