<div class="gmail_quote">On Thu, Apr 3, 2008 at 3:26 PM, Semyon Grodsky <<a href="mailto:senya@atmos.umd.edu">senya@atmos.umd.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Folks,<br>
I am a beginner with lats4d.<br>
<br>
I would like to output a defined variable (that is a result of<br>
calculations) into a netcdf. Is it possible with lats4d?<br></blockquote><div><br></div><div><br></div><div>Yes, you should be able to do it. Here is an example:</div><div><br></div><div>% gradsnc -l</div><div>ga-> open model.ctl</div>
<div>ga-> set x 1 72</div><div>ga-> speed = sqrt(ua*ua+va*va)</div><div>ga-> lats4d -o myfile -func speed -time 0z1jan1987 -vars ps</div><div>ga-> quit</div><div><br></div><div>and it will create a netcdf file named "<a href="http://myfile.nc">myfile.nc</a>" with a variable called "ps" but actually containing the defined variable "speed". There are other tricks you can play to have the variable name come right, but I'll stop here since I don't know what you are trying to do exactly.</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>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>