<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=GB2312" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        LINE-HEIGHT: 1.5; FONT-FAMILY: Î¢ÈíÑźÚ; COLOR: #000080; FONT-SIZE: 10.5pt
}
</STYLE>

<META name=GENERATOR content="MSHTML 9.00.8112.16446"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>you should use an exist grid file to output interpolated matrix.</DIV>
<DIV>following is an simple guide...</DIV>
<DIV>file.1 file.2 are your files</DIV>
<DIV>file.3 is an exist grid file with resolution of 0.333*0.333, which you can 
create yourself.</DIV>
<DIV>____________________________</DIV>
<DIV>open file.1</DIV>
<DIV>set x&nbsp;1 428</DIV>
<DIV>set y 1 322</DIV>
<DIV>set t 1 1198</DIV>
<DIV>define newvar=re2(oldvar,...)</DIV>
<DIV>open file.3</DIV>
<DIV>set x 1 360</DIV>
<DIV>set y 1 180</DIV>
<DIV>set t 1 1198</DIV>
<DIV>set gxout fwrite</DIV>
<DIV>set fwrite ...*.bin</DIV>
<DIV>d newvar</DIV>
<DIV>disable fwrite</DIV>
<DIV>&nbsp;</DIV>
<DIV>then </DIV>
<DIV>again for file.2</DIV>
<DIV>&nbsp;</DIV>
<DIV>finally,</DIV>
<DIV>you will have two gridded files with the same resolution and 
coordinates.</DIV>
<DIV>&nbsp;</DIV>
<HR style="WIDTH: 210px; HEIGHT: 1px" align=left color=#b5c4df SIZE=1>

<DIV><SPAN>zjuyanlibin</SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV 
style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<DIV 
style="PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; PADDING-RIGHT: 8px; BACKGROUND: #efefef; COLOR: #000000; FONT-SIZE: 12px; PADDING-TOP: 8px">
<DIV><B>From:</B>&nbsp;<A href="mailto:rjmera@coas.oregonstate.edu">Roberto 
Mera</A></DIV>
<DIV><B>Date:</B>&nbsp;2012-06-21&nbsp;15:13</DIV>
<DIV><B>To:</B>&nbsp;<A href="mailto:gradsusr@gradsusr.org">GrADS Users 
Forum</A></DIV>
<DIV><B>Subject:</B>&nbsp;[gradsusr] regrid problem</DIV></DIV></DIV>
<DIV>
<DIV>Hi.&nbsp;I'm&nbsp;trying&nbsp;to&nbsp;regrid&nbsp;two&nbsp;files&nbsp;to&nbsp;a&nbsp;common&nbsp;grid.&nbsp;The&nbsp;two&nbsp;files&nbsp;have&nbsp;</DIV>
<DIV>different&nbsp;resolutions&nbsp;and&nbsp;projections.&nbsp;Here&nbsp;is&nbsp;the&nbsp;detail&nbsp;for&nbsp;the&nbsp;files:</DIV>
<DIV>&nbsp;</DIV>
<DIV>file&nbsp;1&nbsp;(model)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;Type&nbsp;=&nbsp;Gridded</DIV>
<DIV>&nbsp;&nbsp;&nbsp;Xsize&nbsp;=&nbsp;428&nbsp;&nbsp;Ysize&nbsp;=&nbsp;322&nbsp;&nbsp;Zsize&nbsp;=&nbsp;1&nbsp;&nbsp;Tsize&nbsp;=&nbsp;1198&nbsp;&nbsp;Esize&nbsp;=&nbsp;1</DIV>
<DIV>&nbsp;&nbsp;&nbsp;Number&nbsp;of&nbsp;Variables&nbsp;=&nbsp;1</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;px1&nbsp;&nbsp;1&nbsp;&nbsp;t,z,y,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pmax1</DIV>
<DIV>X&nbsp;is&nbsp;varying&nbsp;&nbsp;&nbsp;Lon&nbsp;=&nbsp;-140.885&nbsp;to&nbsp;-94.7226&nbsp;&nbsp;&nbsp;X&nbsp;=&nbsp;-1081.74&nbsp;to&nbsp;-943.241</DIV>
<DIV>Y&nbsp;is&nbsp;varying&nbsp;&nbsp;&nbsp;Lat&nbsp;=&nbsp;22.4263&nbsp;to&nbsp;57.129&nbsp;&nbsp;&nbsp;Y&nbsp;=&nbsp;-15.7149&nbsp;to&nbsp;88.4036</DIV>
<DIV>Z&nbsp;is&nbsp;fixed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lev&nbsp;=&nbsp;1&nbsp;&nbsp;Z&nbsp;=&nbsp;2</DIV>
<DIV>T&nbsp;is&nbsp;fixed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Time&nbsp;=&nbsp;00Z01JAN1961&nbsp;&nbsp;T&nbsp;=&nbsp;-215</DIV>
<DIV>E&nbsp;is&nbsp;fixed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ens&nbsp;=&nbsp;1&nbsp;&nbsp;E&nbsp;=&nbsp;1</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>I&nbsp;would&nbsp;like&nbsp;to&nbsp;regrid&nbsp;to&nbsp;25&nbsp;km&nbsp;or&nbsp;1/3&nbsp;degree&nbsp;so&nbsp;I&nbsp;can&nbsp;calculate&nbsp;</DIV>
<DIV>anomalies&nbsp;between&nbsp;the&nbsp;two.</DIV>
<DIV>&nbsp;</DIV>
<DIV>thanks</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert</DIV>
<DIV>_______________________________________________</DIV>
<DIV>gradsusr&nbsp;mailing&nbsp;list</DIV>
<DIV>gradsusr@gradsusr.org</DIV>
<DIV>http://gradsusr.org/mailman/listinfo/gradsusr</DIV></DIV></BODY></HTML>