<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16464">
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; FONT-SIZE: 10.5pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-STYLE: normal; FONT-FAMILY: Verdana; COLOR: windowtext; FONT-WEIGHT: normal; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT size=2 face=Verdana>Hi Dennis,</FONT></DIV>
<DIV> </DIV>
<DIV>Thank you for your reply!</DIV>
<DIV> </DIV>
<DIV>When I delete "(::5,::10)", the numbers of lat and lon are right but
still have wrong names like this and cann't read by Panoply :</DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><IMG src="cid:__0@Foxmail.net" width=773 height=442></DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV><FONT color=#000080></FONT> </DIV>
<DIV>I never changed the names for lat and lon. I really don't know what had
happened to this.</DIV>
<DIV> </DIV>
<DIV>Thank you in advance for your time if you can take a look at this.</DIV>
<DIV> </DIV>
<DIV>Lifen </DIV>
<DIV><FONT color=#000080 size=2 face=Verdana></FONT> </DIV>
<DIV><FONT color=#000080 size=2 face=Verdana></FONT> </DIV>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana>2013-02-13 </FONT></DIV><FONT
color=#000080 size=2 face=Verdana>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN>Jiang, Lifen</SPAN>
</FONT></DIV>
<HR color=#b5c4df SIZE=1>
<DIV><FONT size=2 face=Verdana><STRONG>发件人:</STRONG> Dennis Shea </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>发送时间:</STRONG> 2013-02-12 22:03:33
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>收件人:</STRONG> Jiang, Lifen </FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>抄送:</STRONG> ncl-talk@ucar.edu
</FONT></DIV>
<DIV><FONT size=2 face=Verdana><STRONG>主题:</STRONG> Re: [ncl-talk] Data
processing problem </FONT></DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV><FONT size=2 face=Verdana>
<DIV>The data on the *file* may be 1676 x 4320</DIV>
<DIV></DIV>
<DIV>BUT you sub-sampled the data (decimated)</DIV>
<DIV></DIV>
<DIV>t = short2flt(in->med_c0(::5,::10))</DIV>
<DIV></DIV>
<DIV>decimates the lat dimension to 1/5 the original size (1676/5)</DIV>
<DIV>and</DIV>
<DIV>decimates the lon dimension to 1/10 the original size (4320/10)</DIV>
<DIV>-----</DIV>
<DIV></DIV>
<DIV>If you want to retain the original dimensions</DIV>
<DIV></DIV>
<DIV>t = short2flt(in->med_c0) ; read all the data</DIV>
<DIV></DIV>
<DIV>Good Luck</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>On 2/12/13 8:51 PM, Jiang, Lifen wrote:</DIV>
<DIV>> Hello,</DIV>
<DIV>> I have a data set with two dimensions: lat=1676 and lon=4320; Variable type is short; Missing data are -32768 but many values of -9999 and -9998 should also be treated as missing values.</DIV>
<DIV>> I want to divide all values by 10 but the returned result has two dimensions: nc10=336 and nc11=432 instead of lat=1676 and lon=4320. And I can’t plot it at all.</DIV>
<DIV>> I greatly appreciate if anyone can help check what’s wrong with my scripts as bellow.</DIV>
<DIV>> Regards,</DIV>
<DIV>> Lifen</DIV>
<DIV>> **************************************************************************</DIV>
<DIV>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</DIV>
<DIV>></DIV>
<DIV>> in = addfile("med_c0.nc", "r")</DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>> t = short2flt(in->med_c0(::5,::10)) ; convert to float</DIV>
<DIV>> t@_FillValue = -32768</DIV>
<DIV>> t@missing_value = t@_FillValue</DIV>
<DIV>> t = where(t .lt. -9997, t@_FillValue, t)</DIV>
<DIV>></DIV>
<DIV>> y = t/10</DIV>
<DIV>> printVarSummary(y)</DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>> system("/bin/rm -f med_c0_kgm-2.nc")</DIV>
<DIV>> fout = addfile("med_c0_kgm-2.nc", "c") ; new netCDF file</DIV>
<DIV>> fout@title = "kg/m2"</DIV>
<DIV>> fout->y = y</DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>> _______________________________________________</DIV>
<DIV>> ncl-talk mailing list</DIV>
<DIV>> List instructions, subscriber options, unsubscribe:</DIV>
<DIV>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk</DIV>
<DIV>></DIV></FONT></DIV></BODY></HTML>