[gradsusr] gradsusr Digest, Vol 5, Issue 31

Charles Seman Charles.Seman at noaa.gov
Tue Jul 13 20:10:10 EDT 2010


Mubashar,

Maybe http://grads.iges.org/grads/gadoc/gradcomdmodify.html
could be of some help?

Chuck

Mubashar Dogar wrote:
> Hi GrADS users,
>  
> I have monly data file and want to extract seasonal means to check 
> the trend in my data say surface temperature. Is there any script that 
> or function in GrADS that can be used to compute seasonal means or 
> monthly means of the data? 
>  
> Regards,
>  
> Mubashar 
>
> On Tue, Jul 13, 2010 at 3:11 PM, <gradsusr-request at gradsusr.org 
> <mailto:gradsusr-request at gradsusr.org>> wrote:
>
>     Send gradsusr mailing list submissions to
>            gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>
>     To subscribe or unsubscribe via the World Wide Web, visit
>            http://gradsusr.org/mailman/listinfo/gradsusr
>     or, via email, send a message with subject or body 'help' to
>            gradsusr-request at gradsusr.org
>     <mailto:gradsusr-request at gradsusr.org>
>
>     You can reach the person managing the list at
>            gradsusr-owner at gradsusr.org
>     <mailto:gradsusr-owner at gradsusr.org>
>
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of gradsusr digest..."
>
>
>     Today's Topics:
>
>       1.  Can I use 'set fwrite' to output station data? (Edward)
>       2. arbitrary section calculation with 'gr2stn' and   'collect' in
>          grads 2.0.a7. oga.3 (Edward)
>       3. Re: Performance hit with data descriptor files? (Jennifer Adams)
>
>
>     ----------------------------------------------------------------------
>
>     Message: 1
>     Date: Tue, 13 Jul 2010 10:32:38 +0200
>     From: Edward <xhweiq at gmail.com <mailto:xhweiq at gmail.com>>
>     Subject: [gradsusr]  Can I use 'set fwrite' to output station data?
>     To: gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>     Message-ID:
>          
>      <AANLkTilH15Lio6jwKpKSXCb3wV-dZwQF7RE2N0i74rdL at mail.gmail.com
>     <mailto:AANLkTilH15Lio6jwKpKSXCb3wV-dZwQF7RE2N0i74rdL at mail.gmail.com>>
>     Content-Type: text/plain; charset="iso-8859-1"
>
>     hi, Gradsusr,
>
>     I have a problem when I want to output the station data, which is
>     produced
>     by gr2stn(salt, lon,lat) from grid data.
>
>     For example,
>
>     'open model.ctl';     ;* 1X1 grid data
>     'set z 1 13';
>     'set gxout fwrite';'set fwrite aa.dat';
>     'd gr2stn(salt, 336,25)';
>     'disable fwrite';
>
>     What I expect is a data file (aa.dat) which contains one series
>     generated by
>     gr2stn(salt,336,25) from zlevs 1-13. However, it doesn't work.
>
>     I tried to get hints from userguide, but no results about that
>      "set gxout
>     fwrite" doens't work for station data.
>
>     Anybody has ideas? thanks.
>
>
>     Edward
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     http://gradsusr.org/pipermail/gradsusr/attachments/20100713/9d966eea/attachment-0001.html
>
>     ------------------------------
>
>     Message: 2
>     Date: Tue, 13 Jul 2010 11:55:36 +0200
>     From: Edward <xhweiq at gmail.com <mailto:xhweiq at gmail.com>>
>     Subject: [gradsusr] arbitrary section calculation with 'gr2stn' and
>            'collect' in grads 2.0.a7. oga.3
>     To: gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>     Message-ID:
>          
>      <AANLkTimMAH-gu_duFqgz83ISCuKHAzTlEhmzlljPQ3vB at mail.gmail.com
>     <mailto:AANLkTimMAH-gu_duFqgz83ISCuKHAzTlEhmzlljPQ3vB at mail.gmail.com>>
>     Content-Type: text/plain; charset="iso-8859-1"
>
>     hi, Gradsusr,
>
>     There are two questions in this email.
>
>     The first,
>
>     Following the instructions about plotting variable along arbitary
>     section
>     using gr2stn and collect, I found a bug(?) in grads new versions.
>     The same
>     scripts I used before and worked well with the old version (grads
>     1.9),
>     gave wrong figure under grads2.0.a3 and a7. ( didn't test for the
>     lastest
>     version since I only have windows and Sun machine).
>
>     It's no problem to directly display gr2stn results, but it's wrong to
>     display 'collect 1 gr2stn(temp, lon,lat)' which is the collection
>     of many
>     single points. It seems the error is on the undefine value, which
>     is set to
>     zero and used to perform the interpolation with normal values.
>
>
>     Second,
>
>     The results of 'collect 1 gr2stn(temp, lon,lat)' (for a arbitrary
>     section)
>     only has X and Z dimensions in Grads, which means the figure is for
>     Lon-Depth. How can I do if I want to get LAT-Depth figure?
>
>
>     Thanks
>
>
>     Edward
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     http://gradsusr.org/pipermail/gradsusr/attachments/20100713/c2b51e63/attachment-0001.html
>
>     ------------------------------
>
>     Message: 3
>     Date: Tue, 13 Jul 2010 08:11:54 -0400
>     From: Jennifer Adams <jma at cola.iges.org <mailto:jma at cola.iges.org>>
>     Subject: Re: [gradsusr] Performance hit with data descriptor files?
>     To: GrADS Users Forum <gradsusr at gradsusr.org
>     <mailto:gradsusr at gradsusr.org>>
>     Message-ID: <D152575A-8990-44C3-B8A1-ED9F50529AE0 at cola.iges.org
>     <mailto:D152575A-8990-44C3-B8A1-ED9F50529AE0 at cola.iges.org>>
>     Content-Type: text/plain; charset="us-ascii"
>
>     Pete,
>     The short answer is that you should upgrade to 2.0.a8. A whole lot of
>     critical changes were implemented in the newer versions (of GrADS and
>     the netCDF library) to improve performance when handling compressed
>     netcdf files. Please read the doc page on compression
>     (http://iges.org/grads/gadoc/compression.html
>     ) for a full explanation of the factors at play. When the cache
>     settings are appropriate (which they are almost certainly not in your
>     build), you will find that the I/O for compressed netcdf can be a
>     whole lot faster than classic netcdf and flat binary data sets.
>     --Jennifer
>
>
>     On Jul 12, 2010, at 9:26 PM, Colarco, Peter R. (GSFC-6133) wrote:
>
>     > Hi-
>     >
>     > Apologies, here is the requested information.
>     >
>     > Thanks,
>     > Pete
>     >
>     >
>     > OS:
>     > % uname -a
>     > Linux redacted.gsfc.nasa.gov <http://redacted.gsfc.nasa.gov/>
>     2.6.32-gentoo-r7 #2 SMP Thu Jul 8
>     > 11:39:03 EDT 2010 x86_64 Intel(R) Xeon(R) CPU X5460 @ 3.16GHz
>     > GenuineIntel GNU/Linux
>     >
>     > File Information:
>     > % ncdump -hs /path/to/file/Y2003/M01/MYD04_L2_ocn.aero_tc8_051.qawt.
>     > 20030101.nc4
>     > netcdf MYD04_L2_ocn.aero_tc8_051.qawt.20030101 {
>     > dimensions:
>     >         time = UNLIMITED ; // (8 currently)
>     >         levels = 7 ;
>     >         longitude = 1152 ;
>     >         latitude = 721 ;
>     > variables:
>     >         double time(time) ;
>     >                 time:units = "hours since 2003-1-1 1" ;
>     >                 time:_Storage = "chunked" ;
>     >                 time:_ChunkSizes = 1 ;
>     >         double levels(levels) ;
>     >                 levels:units = "hPa" ;
>     >                 levels:description = "Pressure level" ;
>     >                 levels:type = "plev" ;
>     >                 levels:long_name = "Level" ;
>     >                 levels:positive = "down" ;
>     >                 levels:_Storage = "contiguous" ;
>     >         double longitude(longitude) ;
>     >                 longitude:units = "degrees_east" ;
>     >                 longitude:long_name = "Longitude" ;
>     >                 longitude:_Storage = "contiguous" ;
>     >         double latitude(latitude) ;
>     >                 latitude:units = "degrees_north" ;
>     >                 latitude:long_name = "Latitude" ;
>     >                 latitude:_Storage = "contiguous" ;
>     >         float aodtau(time, levels, latitude, longitude) ;
>     >                 aodtau:comments = "Unknown1 variable comment" ;
>     >                 aodtau:long_name = "aodtau" ;
>     >                 aodtau:units = "" ;
>     >                 aodtau:grid_name = "grid01" ;
>     >                 aodtau:grid_type = "linear" ;
>     >                 aodtau:time_statistic = "instantaneous" ;
>     >                 aodtau:missing_value = 1.e+15f ;
>     >                 aodtau:_Storage = "chunked" ;
>     >                 aodtau:_ChunkSizes = 1, 1, 721, 1152 ;
>     >                 aodtau:_DeflateLevel = 2 ;
>     >
>     > // global attributes:
>     >                 :Conventions = "COARDS" ;
>     >                 :calendar = "standard" ;
>     >                 :comments = "File" ;
>     >                 :model = "geos/das" ;
>     >                 :center = "gsfc" ;
>     >                 :_Format = "netCDF-4" ;
>     > }
>     >
>     >
>     >
>     > ga-> q config
>     > Config: v2.0.a7.oga.3 little-endian readline printim grib2 netcdf
>     > hdf4-sds hdf5 opendap-grids,stn athena geotiff
>     > Grid Analysis and Display System (GrADS) Version 2.0.a7.oga.3
>     > Copyright (c) 1988-2009 by Brian Doty and the
>     > Institute for Global Environment and Society (IGES)
>     > This program is distributed WITHOUT ANY WARRANTY
>     > See file COPYRIGHT for more information.
>     >
>     > Built Thu Oct 29 17:57:08 EDT 2009 for x86_64-unknown-linux-gnu
>     >
>     > This version of GrADS has been configured with the following
>     options:
>     >   o Built on a LITTLE ENDIAN machine
>     >   o Command line editing ENABLED
>     >       http://tiswww.case.edu/php/chet/readline/rltop.html
>     >   o printim command for image output ENABLED
>     >       http://www.zlib.net <http://www.zlib.net/>
>     >       http://www.libpng.org/pub/png/libpng.html
>     >       http://www.libgd.org/Main_Page
>     >   o GRIB2 interface ENABLED
>     >       http://www.ijg.org <http://www.ijg.org/>
>     >       http://www.ece.uvic.ca/~mdadams/jasper
>     <http://www.ece.uvic.ca/%7Emdadams/jasper>
>     >       http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2
>     >       g2clib-1.0.5
>     >   o NetCDF interface ENABLED
>     >       http://www.opendap.org <http://www.opendap.org/>
>     >       libnc-dap 4.0.1-beta3-snapshot2009021712 of Mar  3 2009
>     > 14:13:33 $
>     >   o HDF interface ENABLED
>     >       http://hdfgroup.org <http://hdfgroup.org/>
>     >       HDF 4.2r3
>     >       HDF5 1.8.2
>     >   o Athena Widget GUI ENABLED
>     >   o OPeNDAP gridded data interface ENABLED
>     >       http://www.opendap.org <http://www.opendap.org/>
>     >       libdap 3.7.10
>     >   o OPeNDAP station data interface ENABLED
>     >       http://iges.org/grads/gadoc/supplibs.html
>     >       libgadap 2.0.oga.1
>     >   o GeoTIFF and KML output ENABLED
>     >       http://www.libtiff.org <http://www.libtiff.org/>
>     >       http://geotiff.osgeo.org <http://geotiff.osgeo.org/>
>     >
>     > For additional information please consult http://iges.org/grads
>     >
>     > On Jul 12, 2010, at 4:51 PM, Jennifer Adams wrote:
>     >
>     >> Could you please send the output from ncdump -hs (the s is for
>     >> compression info, since you have netcdf-4 files). Also send the
>     >> output from 'q config' and the specs of the OS you are running on.
>     >> These things are important for solving every problem.
>     >>
>     >> --Jennifer
>     >>
>     >>
>     >> On Jul 12, 2010, at 4:42 PM, Colarco, Peter R. (GSFC-6133) wrote:
>     >>
>     >>> Hi-
>     >>>
>     >>> I am running opengrads 2.0.a7.oga.3/x86_64.
>     >>>
>     >>> I have a very simple data descriptor file (below) to template a
>     >>> set of large-ish files (gridded 1152 x 721 x 7 points).  When I
>     >>> simply "sdfopen" the first file and plot the first variable/first
>     >>> time/first level, I get my result essentially immediately.  When I
>     >>> instead "xdfopen" the data descriptor file and try to plot the
>     >>> same, it takes some time (~10 sec) to plot.  When I repeat the
>     >>> same sort of thing but operate on several times the difference in
>     >>> performance between the two methods is of course very noticeable.
>     >>>
>     >>> The issue seems to be in the "options template" line below; taking
>     >>> that out and explicitly putting the first file in I can "xdfopen"
>     >>> the data descriptor file and plot the first variable essentially
>     >>> instantly.  Additional metadata in the data descriptor file (e.g.,
>     >>> from make_ctl.sh) does not help or matter as far as I can tell.
>     >>>
>     >>> Can anyone suggest a solution to this problem?  Am I doing
>     >>> something weird or wrong here?
>     >>>
>     >>> Data Descriptor File:
>     >>>
>     >>> dset /path/to/my/data/Y2003/M01/MYD04_L2_ocn.aero_tc8_051.qawt.
>     >>> %y4%m2%d2.nc4
>     >>> options template
>     >>> tdef time 248 linear 0z01jan2003 3hr
>     >>>
>     >>> Thank you,
>     >>> Pete Colarco
>     >>>
>     >>>
>     >>>
>     >>>
>     --------------------------------------------------------------------
>     >>> Peter Colarco
>     >>> NASA GSFC
>     >>> Code 613.3
>     >>> NASA Goddard Space Flight Center
>     >>> Greenbelt, MD 20771
>     >>> 301.614.6382 (ph)
>     >>> 301.614.5903 (fax)
>     >>>
>     >>> peter.r.colarco at nasa.gov <mailto:peter.r.colarco at nasa.gov>
>     >>> http://hyperion.gsfc.nasa.gov/People/Colarco
>     >>>
>     --------------------------------------------------------------------
>     >>>
>     >>>
>     >>>
>     >>>
>     >>> _______________________________________________
>     >>> gradsusr mailing list
>     >>> gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>     >>> http://gradsusr.org/mailman/listinfo/gradsusr
>     >>
>     >> --
>     >> Jennifer M. Adams
>     >> IGES/COLA
>     >> 4041 Powder Mill Road, Suite 302
>     >> Calverton, MD 20705
>     >> jma at cola.iges.org <mailto:jma at cola.iges.org>
>     >>
>     >>
>     >>
>     >> <ATT00001..txt>
>     >
>     > --------------------------------------------------------------------
>     > Peter Colarco
>     > NASA GSFC
>     > Code 613.3
>     > NASA Goddard Space Flight Center
>     > Greenbelt, MD 20771
>     > 301.614.6382 (ph)
>     > 301.614.5903 (fax)
>     >
>     > peter.r.colarco at nasa.gov <mailto:peter.r.colarco at nasa.gov>
>     > http://hyperion.gsfc.nasa.gov/People/Colarco
>     > --------------------------------------------------------------------
>     >
>     >
>     >
>     >
>     > _______________________________________________
>     > gradsusr mailing list
>     > gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>     > http://gradsusr.org/mailman/listinfo/gradsusr
>
>     --
>     Jennifer M. Adams
>     IGES/COLA
>     4041 Powder Mill Road, Suite 302
>     Calverton, MD 20705
>     jma at cola.iges.org <mailto:jma at cola.iges.org>
>
>
>
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     http://gradsusr.org/pipermail/gradsusr/attachments/20100713/dc3e2b21/attachment.html
>
>     ------------------------------
>
>     _______________________________________________
>     gradsusr mailing list
>     gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
>     http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>     End of gradsusr Digest, Vol 5, Issue 31
>     ***************************************
>
>
>
>
> -- 
> Muhammad Mubashar Ahmad Dogar
> Scientific Officer (Climatology Section),
> Global Change Impact Studies Centre (GCISC),
> NCP complex, Quaid-e-Azam University Campus,
> Shahdra road, Islamabad, Pakistan.
> Tel:  +92519230226
> Mob:+923315144169
> email: mubashardogar at yahoo.com <mailto:mubashardogar at yahoo.com>
>           mubashar.ahmad at gcisc.org.pk <mailto:mubashar.ahmad at gcisc.org.pk>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>   

-- 

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not reflect any
official or unofficial position of the United States Federal Government,
the United States Department of Commerce, or NOAA."




More information about the gradsusr mailing list