<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19120"><LINK rel=stylesheet
href="BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}"></HEAD>
<BODY style="FONT-FAMILY: verdana; FONT-SIZE: 10pt">
<DIV><FONT size=2 face=Verdana>Hi, all </FONT></DIV>
<DIV> </DIV>
<DIV> I want to write a nc file with "sdfwrite" ,
but met some error.</DIV>
<DIV>The binary file(.grd) and .ctl file have been attached with the
mail.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Here below is my gs file </DIV>
<DIV> </DIV>
<DIV># ********initialize ******************</DIV>
<DIV>
<DIV>'reinit'</DIV>
<DIV>'set grads off'</DIV>
<DIV>#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>></DIV>
<DIV></DIV>
<DIV>'open /data1/CAM_zb/t2m/CTL_2mt_annual1900-1999.ctl'</DIV>
<DIV>'set t 1 100'</DIV>
<DIV>'set undef -999.'</DIV>
<DIV>'define t2m=tmp'</DIV>
<DIV>'set sdfwrite -flt CTL_2mt_annual1900-1999.nc'</DIV>
<DIV>'sdfwrite t2m'</DIV></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Verdana></FONT> </DIV>
<DIV>Here below is the error instruction </DIV>
<DIV> </DIV>
<DIV>
<DIV>ga-> sdfopen CTL_2mt_annual1900-1999.nc </DIV>
<DIV>Scanning self-describing file: CTL_2mt_annual1900-1999.nc</DIV>
<DIV>SDF file CTL_2mt_annual1900-1999.nc is open as file 1</DIV>
<DIV>LON set to 0 360 </DIV>
<DIV>LAT set to -87.8638 87.8638 </DIV>
<DIV>LEV set to 0 0 </DIV>
<DIV>Time values set: 1900:1:1:0 1900:1:1:0 </DIV>
<DIV>E set to 1 1</DIV>
<DIV>ga-> set t 1</DIV>
<DIV>Time values set: 1900:1:1:0 1900:1:1:0 </DIV>
<DIV>ga-> d t2m</DIV>
<DIV>Contouring: 220 to 300 interval 10 </DIV>
<DIV>ga-> set t 2</DIV>
<DIV>Time values set: 1901:2:1:0 1901:2:1:0 </DIV>
<DIV>ga-> d t2m</DIV>
<DIV>Data Request Error: Invalid grid coordinates</DIV>
<DIV> World coordinates convert to non-integer grid coordinates</DIV>
<DIV> Variable = t2m Dimension = 3 </DIV>
<DIV> Error ocurred at column 1</DIV>
<DIV>DISPLAY error: Invalid expression </DIV>
<DIV> Expression = t2m</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>I guess the irregular projection of the original data cause such problem.
Any one can tell me </DIV>
<DIV>how to write a correct nc file in this case?</DIV>
<DIV> </DIV>
<DIV>btw, the grads version is 2.0.a9 </DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Xiang</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV align=left><FONT color=#c0c0c0 size=2 face=Verdana>2011-08-23
</FONT></DIV><FONT size=2 face=Verdana>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>
<DIV><FONT color=#c0c0c0 size=2 face=Verdana><SPAN>xianglin</SPAN>
</FONT></DIV></FONT></BODY></HTML>