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