<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">Kishore,</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN>&nbsp;</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">Below may also be helpful.&nbsp; It&nbsp;is sample fortran code that can reverse&nbsp;the latitude indices, and writes back to binary&nbsp;(assuming .nc is first dumped to binary):</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">.</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN><SPAN style="RIGHT: auto">irec1=1</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">irec2=1</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN>&nbsp;</div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">do nvar=1,5&nbsp;&nbsp; !Variables in binary file, with u-wind</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">if(nvar.eq.1) then&nbsp;&nbsp;&nbsp;&nbsp;</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN><SPAN style="RIGHT: auto"></SPAN><SPAN style="RIGHT: auto">&nbsp; do k=1,nk</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp; read(1,rec=irec1)vgrads&nbsp; !read data in .nc file</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp; do i=1,ni</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do j=1,nj</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; u(i,j,k)=vgrads(i,nj+1-j)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !reverse j-index</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enddo</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; irec1=irec1 + 1</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp; enddo</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN>&nbsp;</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">c now write to file w/latitude (j-index)&nbsp;reversed:</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN>&nbsp;</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">do k=1,nk</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;do i=1,ni</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp; do j=1,nj</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp; var(i,j) = u(i,j,k)</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp;&nbsp;&nbsp;enddo</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp; enddo</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp; write(17,rec=irec2)var</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">&nbsp;&nbsp; irec2=irec2 + 1</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">enddo</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">.</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">.</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">etc.</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN>&nbsp;</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">The new binary <VAR id=yui-ie-cursor></VAR>output, with latitude starting at +90, can be viewed with a&nbsp;.ctl file using options yrev.</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">&nbsp;</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">Lee<BR style="RIGHT: auto"></div>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr readonly="true" contenteditable="false"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Charles Seman - NOAA Federal &lt;charles.seman@noaa.gov&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> GrADS Users Forum &lt;gradsusr@gradsusr.org&gt; <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Tuesday, March 26, 2013 1:09 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [gradsusr] how to reveres latitudes in nc file<BR></FONT></DIV><BR>Kishore,<BR><BR>Have you tried the "yrev" option? <BR>http://grads.iges.org/grads/gadoc/descriptorfile.html#OPTIONS<BR><BR>You would make a GrADS data descriptor file to open the .nc file, and <BR>include in the
 data descriptor file the line:<BR>options yrev<BR><BR>Hope this helps,<BR>Chuck<BR><BR>On 03/26/2013 01:40 AM, Kishore Babu wrote:<BR>&gt; Dear grads users,<BR>&gt;<BR>&gt; My nc file has latitudes as below<BR>&gt;<BR>&gt; latitude = -90, -87.5, -85, -82.5, -80, -77.5, -75, -72.5, -70, -67.5, -65,<BR>&gt;&nbsp; &nbsp; &nbsp; -62.5, -60, -57.5, -55, -52.5, -50, -47.5, -45, -42.5, -40, -37.5,<BR>&gt; -35,<BR>&gt;&nbsp; &nbsp; &nbsp; -32.5, -30, -27.5, -25, -22.5, -20, -17.5, -15, -12.5, -10, -7.5, -5,<BR>&gt;&nbsp; &nbsp; &nbsp; -2.5, 0, 2.5, 5, 7.5, 10, 12.5, 15, 17.5, 20, 22.5, 25, 27.5, 30,<BR>&gt; 32.5,<BR>&gt;&nbsp; &nbsp; &nbsp; 35, 37.5, 40, 42.5, 45, 47.5, 50, 52.5, 55, 57.5, 60, 62.5, 65,<BR>&gt; 67.5, 70,<BR>&gt;&nbsp; &nbsp; &nbsp; 72.5, 75, 77.5, 80, 82.5, 85, 87.5, 90 ;<BR>&gt;<BR>&gt; But, I need to have latitudes in reveres such as below...<BR>&gt;<BR>&gt; latitude = 90, 87.5, 85, 82.5, 80, 77.5, 75, 72.5, 70, 67.5, 65, 62.5,
 60,<BR>&gt;&nbsp; &nbsp; &nbsp; 57.5, 55, 52.5, 50, 47.5, 45, 42.5, 40, 37.5, 35, 32.5, 30, 27.5, 25,<BR>&gt;&nbsp; &nbsp; &nbsp; 22.5, 20, 17.5, 15, 12.5, 10, 7.5, 5, 2.5, 0, -2.5, -5, -7.5, -10,<BR>&gt; -12.5,<BR>&gt;&nbsp; &nbsp; &nbsp; -15, -17.5, -20, -22.5, -25, -27.5, -30, -32.5, -35, -37.5, -40,<BR>&gt; -42.5,<BR>&gt;&nbsp; &nbsp; &nbsp; -45, -47.5, -50, -52.5, -55, -57.5, -60, -62.5, -65, -67.5, -70,<BR>&gt; -72.5,<BR>&gt;&nbsp; &nbsp; &nbsp; -75, -77.5, -80, -82.5, -85, -87.5, -90 ;<BR>&gt;<BR>&gt; Could you please anybody let me know how it is changed?<BR>&gt;<BR>&gt; Thank you in advance..<BR>&gt;<BR>&gt; Regards,<BR>&gt;<BR>&gt; Kishore<BR>&gt;<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; gradsusr mailing list<BR>&gt; <A href="mailto:gradsusr@gradsusr.org" ymailto="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</A><BR>&gt; http://gradsusr.org/mailman/listinfo/gradsusr<BR>&gt;<BR><BR>-- <BR><BR>Please note
 that <A href="mailto:Charles.Seman@noaa.gov" ymailto="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</A> should be considered my NOAA<BR>email address, not <A href="mailto:cjs@gfdl.noaa.gov" ymailto="mailto:cjs@gfdl.noaa.gov">cjs@gfdl.noaa.gov</A>.<BR><BR>********************************************************************<BR>&nbsp; Charles Seman&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <A href="mailto:Charles.Seman@noaa.gov" ymailto="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</A><BR>&nbsp; U.S. Department of Commerce / NOAA / OAR<BR>&nbsp; Geophysical Fluid Dynamics Laboratory&nbsp; &nbsp; &nbsp; &nbsp; voice: (609) 452-6547<BR>&nbsp; 201 Forrestal Road&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fax: (609) 987-5063<BR>&nbsp; Princeton, NJ&nbsp; 08540-6649&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 http://www.gfdl.noaa.gov/~cjs/<BR>********************************************************************<BR><BR>"The contents of this message are mine personally and do not reflect any<BR>official or unofficial position of the United States Federal Government,<BR>the United States Department of Commerce, or NOAA."<BR>_______________________________________________<BR>gradsusr mailing list<BR><A href="mailto:gradsusr@gradsusr.org" ymailto="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></DIV></DIV></div></body></html>