<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> </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. It is sample fortran code that can reverse the latitude indices, and writes back to binary (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> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto">do nvar=1,5 !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 </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"> 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"> read(1,rec=irec1)vgrads !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"> 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"> 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"> u(i,j,k)=vgrads(i,nj+1-j) !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"> 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"> 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"> 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"> 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">c now write to file w/latitude (j-index) 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> </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"> do i=1,ni</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"> do j=1,nj</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"> var(i,j) = u(i,j,k)</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"> enddo</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"> enddo</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"> write(17,rec=irec2)var</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"> 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> </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 .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"> </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 <charles.seman@noaa.gov><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> GrADS Users Forum <gradsusr@gradsusr.org> <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>> Dear grads users,<BR>><BR>> My nc file has latitudes as below<BR>><BR>> latitude = -90, -87.5, -85, -82.5, -80, -77.5, -75, -72.5, -70, -67.5, -65,<BR>> -62.5, -60, -57.5, -55, -52.5, -50, -47.5, -45, -42.5, -40, -37.5,<BR>> -35,<BR>> -32.5, -30, -27.5, -25, -22.5, -20, -17.5, -15, -12.5, -10, -7.5, -5,<BR>> -2.5, 0, 2.5, 5, 7.5, 10, 12.5, 15, 17.5, 20, 22.5, 25, 27.5, 30,<BR>> 32.5,<BR>> 35, 37.5, 40, 42.5, 45, 47.5, 50, 52.5, 55, 57.5, 60, 62.5, 65,<BR>> 67.5, 70,<BR>> 72.5, 75, 77.5, 80, 82.5, 85, 87.5, 90 ;<BR>><BR>> But, I need to have latitudes in reveres such as below...<BR>><BR>> latitude = 90, 87.5, 85, 82.5, 80, 77.5, 75, 72.5, 70, 67.5, 65, 62.5,
60,<BR>> 57.5, 55, 52.5, 50, 47.5, 45, 42.5, 40, 37.5, 35, 32.5, 30, 27.5, 25,<BR>> 22.5, 20, 17.5, 15, 12.5, 10, 7.5, 5, 2.5, 0, -2.5, -5, -7.5, -10,<BR>> -12.5,<BR>> -15, -17.5, -20, -22.5, -25, -27.5, -30, -32.5, -35, -37.5, -40,<BR>> -42.5,<BR>> -45, -47.5, -50, -52.5, -55, -57.5, -60, -62.5, -65, -67.5, -70,<BR>> -72.5,<BR>> -75, -77.5, -80, -82.5, -85, -87.5, -90 ;<BR>><BR>> Could you please anybody let me know how it is changed?<BR>><BR>> Thank you in advance..<BR>><BR>> Regards,<BR>><BR>> Kishore<BR>><BR>><BR>> _______________________________________________<BR>> gradsusr mailing list<BR>> <A href="mailto:gradsusr@gradsusr.org" ymailto="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</A><BR>> http://gradsusr.org/mailman/listinfo/gradsusr<BR>><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> Charles Seman <A href="mailto:Charles.Seman@noaa.gov" ymailto="mailto:Charles.Seman@noaa.gov">Charles.Seman@noaa.gov</A><BR> U.S. Department of Commerce / NOAA / OAR<BR> Geophysical Fluid Dynamics Laboratory voice: (609) 452-6547<BR> 201 Forrestal Road fax: (609) 987-5063<BR> Princeton, NJ 08540-6649
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>