<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Arlindo - thanks for the info!<div>Steve</div><div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>Dr. Stephen C. Piper</div><div>Carbon Dioxide Research Group</div><div>Scripps Institution of Oceanography</div><div>La Jolla, CA 92093-0244</div><div>tel: 858-534-4230 ext 15</div><div>fax: 858-534-8814</div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br><div><div>On Sep 26, 2008, at 5:22 PM, Arlindo da Silva wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On Fri, Sep 26, 2008 at 5:43 PM, Steve Piper <span dir="ltr"><<a href="mailto:scpiper@ucsd.edu">scpiper@ucsd.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi,<br> <br> I just started using Grads. Great program!<br> <br> I would like to write out in ascii, the annual average vertical<br> profile at<br> all 9 levels at a specified location (lat and lon) in<br> the grid for variable bioa.<br> </blockquote><div><br>Let's say your specific location is (45N,90W), then<br><br><b>ga-></b> set lon -90<br><b>ga-></b> set lat 45<br><br>Next let's select all vertical levels<br><br><b>ga-></b> set z 1 9<br> <br>To get ASCII output for the annual mean of variable bio:<br><br><b>ga-></b> set gxout print<br><b>ga-></b> d ave(bioa,t=1,t=12)<br><br>To have this saved to a file see this recipe:<br><br> <a href="http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file">http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file</a><br> <br> Good Luck,<br><br> Arlindo<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> I am reading a gridded data file that was written with Fortran<br> statement declaration<br> <br> real x(72,44,9,12,26) ! lon, lat, levels, months, variables<br> <br> My ctl file is:<br> <br> DSET /Users/piper/Grads-test/CSU.gurney.L1.mmean.le.3D<br> * fortran sequential file c(72,44,9,12,26)<br> * lon lat lev month tracer<br> * sequential means fortran binary with record length integers<br> in record<br> * otherwise would use stream or direct access<br> * SUN is big-endian (had to swap to make it so with zz.f)<br> * OPTIONS big_endian for SUN, mac powerpc?<br> OPTIONS sequential<br> * input file is from little_endian machine<br> OPTIONS little_endian<br> TITLE CSU Gurney 3D monthly output for T3L1<br> UNDEF 1.e36<br> XDEF 72 linear -180 5<br> YDEF 44 linear -86 4<br> ZDEF 9 levels 1000 925 850 700 500 400 300 200 100<br> * would like to use middle of every 365 calendar month - this is<br> close<br> TDEF 12 linear 16jan94 1mo<br> VARS 26<br> fos90 9 -1,20 fos90<br> * -1 = non-standard binary, 20 = var and time reordered<br> fos95 9 -1,20 fos95<br> bioa 9 -1,20 bioa<br> dum 9 -1,20 dum<br> bio1 9 -1,20 bio1<br> bio2 9 -1,20 bio2<br> bio3 9 -1,20 bio3<br> bio4 9 -1,20 bio4<br> bio5 9 -1,20 bio5<br> bio6 9 -1,20 bio6<br> bio7 9 -1,20 bio7<br> bio8 9 -1,20 bio8<br> bio9 9 -1,20 bio9<br> bio10 9 -1,20 bio10<br> bio11 9 -1,20 bio11<br> oce1 9 -1,20 oce1<br> oce2 9 -1,20 oce2<br> oce3 9 -1,20 oce3<br> oce4 9 -1,20 oce4<br> oce5 9 -1,20 oce5<br> oce6 9 -1,20 oce6<br> oce7 9 -1,20 oce7<br> oce8 9 -1,20 oce8<br> oce9 9 -1,20 oce9<br> oce10 9 -1,20 oce10<br> oce11 9 -1,20 oce11<br> ENDVARS<br> <br> <br> set lon -180 180 # default is 0 360 when I issue q dim<br> set lat -86 86 # this was the default<br> set lev 1000 100 # default was 1000<br> set t 1 12 # default was t 1<br> <br> q dim<br> <br> Default file number is: 1<br> X is varying Lon = -180 to 180 X = 1 to 73<br> Y is varying Lat = -86 to 86 Y = 1 to 44<br> Z is varying Lev = 1000 to 100 Z = 1 to 9<br> T is varying Time = 00Z16JAN1994 to 00Z16DEC1994 T = 1 to 12<br> E is fixed Ens = 1 E = 1<br> <br> Not sure how to produce annual average array newbioa(72,44,9) from<br> bioa(72,44,9,12)<br> <br> Tried this:<br> <br> define newbioa = ave(bioa,t=1,t=12)<br> <br> It gives 108 lines (=9 x 12) of output stating<br> Averaging. dim = 3, start = 1, end =12<br> <br> ga-> q dim<br> Default file number is: 1<br> X is varying Lon = -180 to 180 X = 1 to 73<br> Y is varying Lat = -86 to 86 Y = 1 to 44<br> Z is varying Lev = 1000 to 100 Z = 1 to 9<br> T is varying Time = 00Z16JAN1994 to 00Z16DEC1994 T = 1 to 12<br> E is fixed Ens = 1 E = 1<br> <br> d gr2stn(newbioa,60.75,89.38)<br> Operation error: Invalid dimension environment<br> Too many varying dimensions<br> <br> set t 1<br> <br> ga-> q dim<br> Default file number is: 1<br> X is varying Lon = -180 to 180 X = 1 to 73<br> Y is varying Lat = -86 to 86 Y = 1 to 44<br> Z is varying Lev = 1000 to 100 Z = 1 to 9<br> T is fixed Time = 00Z16JAN1994 T = 1<br> E is fixed Ens = 1 E = 1<br> <br> d gr2stn(newbioa,60.75,89.38)<br> Operation error: Invalid dimension environment<br> Looping dimension does not vary<br> <br> Not sure why the gr2stn statements do not work. Help?<br> Am I on the right track?<br> <br> Thanks!<br><font color="#888888"> <br> Steve<br> </font></blockquote></div><br><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br> </div></blockquote></div><br></div></body></html>