On Fri, Apr 22, 2011 at 2:36 PM, Jackie Yip <span dir="ltr"><<a href="mailto:zheng.yip@mcgill.ca">zheng.yip@mcgill.ca</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi everyone, <div><br></div><div>I'm using the re() function of GrADs 2.0.a9.oga.1 to regrid my data. As my data is in netcdf format and it has 365 day calendar. I created a descriptor file (.ctl) to xdfopen it. The regridding seem to work fine and I fwrited it out as a grads binary (.dat) file. To view this regridded data, I created another descriptor file. When I tried to view this regridded data on grads, it has a diagonal strip of missing data. This problem disappeared once I have increased my xdef value by 1. Although now the regridded data looks right, I've found that the data shifts down off the map grid with time (e.g. at timestep 2, the data is about 2 gridcells unaligned to the map grid.). </div>
<div><br></div><div>Is this a problem related to the ydef in the descriptor file? </div><div><br></div></blockquote><div><br></div><div>A couple of things to watch for.</div><div><br></div><div>1) make sure grads is not doing any longitudinal wrapping; to be sure do a "q file" and "set x 1 $xsize" and $xsize is the size of the x-dimension.</div>
<div><br></div><div>2) if you fwrite your data (as a plain binary stream) make sure your ctl does not specify the file as "sequential" (or vice versa)</div><div><br></div><div>Another possibility is to use lats4d.sh to regrid your file. Let "newgrid.ctl" be a ctl for a file on the new grid resolution (use "options template" so the data file does not have to exist). Then from the shell command line issue something like this:</div>
<div><br></div><div>% lats4d.sh -i input.ctl -o output -de newgrid.ctl -func 're(@,1)' -v</div><div><br></div><div>By default this will create a netcdf file (<a href="http://output.nc">output.nc</a>) on the new grid, use -format for specifying a different format; "lats4d.sh -h" gives a man page.</div>
<div><br></div><div> Good Luck,</div><div><br></div><div> Arlindo</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> Arlindo</div><div><br></div><div><br></div><div><br></div><div>
<br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div></div><font color="#888888"><div>Jackie</div>
</font><br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="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></blockquote></div><br><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>