<div dir="ltr">Dear Guido, <div><br></div><div>Thanks a lot for all informations. Your information helped me a lot.</div><div><br></div><div>About the break line, I'm getting error. I can't understand the reason.</div><div><br></div><div>Please could you take a look in my files (attachment)?</div><div><br></div><div>Guilherme.</div><br><div class="gmail_quote"><div dir="ltr">Em dom, 29 de mai de 2016 às 15:25, Guido Cioni <<a href="mailto:guidocioni@gmail.com">guidocioni@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hey Guilherme,<div><br></div><div>(1) The character “\” should work. I’ve used it several time to split in multiple lines the definition of a long array, e.g.</div><div><br></div><div><font face="Menlo">qr(0,:)=(/avg(ps_3j_w->qr), avg(ps_3j_wm20->qr), avg(ps_3j_wm30->qr), <b>\</b></font></div><div><font face="Menlo"> avg(ps_3j_wm40->qr), avg(ps_3j_wm50->qr), avg(ps_3j_wm60->qr) /)</font></div><div><br></div><div>Are you trying to do something similar? If you get an error maybe it’s because of the keyboard that has a different ASCII code for that character? I don’t know, just guessing…</div><div>Doing that</div></div><div style="word-wrap:break-word"><div><font face="Menlo"><br></font></div><div><font face="Menlo">res@tiMainString = "Anomalia de altura geopotencial \</font></div></div><div style="word-wrap:break-word"><div><font face="Menlo"> em 500hPa - Fevereiro/1979”</font></div><div><br></div><div>should produce the same result in the title of the plot.</div><div><br></div><div>(2) Normally, no. But it depends on how you define it. If you have a variable with metadata and you just do an assignment to the same variable name, you won’t lose metadata. As an example </div><div><br></div><div><font face="Menlo" style="font-size:11px">wm2_to_mmh=rho_w*lv*1/(3600*1000)</font></div><div><font face="Menlo" style="font-size:11px"><br></font></div><div><div><font face="Menlo" style="font-size:11px">lhflx(0,:)=(/avg(ts_3j_w->lhflx) ,avg(ts_3j_wm20->lhflx) ,avg(ts_3j_wm30->lhflx), \</font></div><div><font face="Menlo" style="font-size:11px"> avg(ts_3j_wm40->lhflx) ,avg(ts_3j_wm50->lhflx) ,avg(ts_3j_wm60->lhflx)/)<span style="white-space:pre-wrap">        </span></font></div><div><font face="Menlo" style="font-size:11px">lhflx@longname="Mean Latent Heat Flux"</font></div><div><font face="Menlo" style="font-size:11px">lhflx@units="mm/h”</font></div><div><font face="Menlo" style="font-size:11px"><br></font></div><div><b><font face="Menlo" style="font-size:11px">lhflx=lhflx/(-wm2_to_mmh) </font></b></div><div><font face="Menlo" style="font-size:11px"><br></font></div><div><font face="Menlo" style="font-size:11px">printVarSummary(lhflx)</font></div><div><br></div><div>will produce </div><div><br></div><div><div><font face="Menlo" style="font-size:11px">Variable: lhflx</font></div><div><font face="Menlo" style="font-size:11px">Type: double</font></div><div><font face="Menlo" style="font-size:11px">Total Size: 96 bytes</font></div><div><font face="Menlo" style="font-size:11px"> 12 values</font></div><div><font face="Menlo" style="font-size:11px">Number of Dimensions: 2</font></div><div><font face="Menlo" style="font-size:11px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[2] x [6]</font></div><div><font face="Menlo" style="font-size:11px">Coordinates:</font></div><div><font face="Menlo" style="font-size:11px">Number Of Attributes: 3</font></div><div><font face="Menlo" style="font-size:11px"> units :<span style="white-space:pre-wrap">        </span>mm/h</font></div><div><font face="Menlo" style="font-size:11px"> longname :<span style="white-space:pre-wrap">        </span>Mean Latent Heat Flux</font></div><div><font face="Menlo" style="font-size:11px"> _FillValue :<span style="white-space:pre-wrap">        </span>9.969209968386869e+36</font></div></div><div><br></div><div>If you move the line <font face="Menlo">lhflx=lhflx/(-wm2_to_mmh)</font> before the assignment of metadata (longname, units) you will get the same printout. <b>However</b>, if you define the algebraic operation at the same time as the assignment you will lose metadata. That is, </div><div><br></div><div><div><font face="Menlo" style="font-size:11px">lhflx(0,:)=(/avg(ts_3j_w->lhflx) ,avg(ts_3j_wm20->lhflx) ,avg(ts_3j_wm30->lhflx), \</font></div><div><font face="Menlo" style="font-size:11px"> avg(ts_3j_wm40->lhflx) ,avg(ts_3j_wm50->lhflx) ,avg(ts_3j_wm60->lhflx) /)<span style="white-space:pre-wrap">        </span></font></div><div><font face="Menlo" style="font-size:11px">lhflx@longname="Mean Latent Heat Flux"</font></div><div><font face="Menlo" style="font-size:11px">lhflx@units="mm/h”</font></div></div><div><font face="Menlo" style="font-size:11px"><br></font></div><div><div><font face="Menlo" style="font-size:11px"><b>lhflx2</b>=lhflx/(-wm2_to_mmh) </font></div><div style="font-weight:bold"><font face="Menlo" style="font-size:11px"><br></font></div></div><div><font face="Menlo" style="font-size:11px">printVarSummary(lhflx2)</font></div><div><b><br></b></div><div>would produce </div><div><b><br></b></div><div><div><font face="Menlo" style="font-size:11px">Variable: lhflx2</font></div><div><font face="Menlo" style="font-size:11px">Type: double</font></div><div><font face="Menlo" style="font-size:11px">Total Size: 96 bytes</font></div><div><font face="Menlo" style="font-size:11px"> 12 values</font></div><div><font face="Menlo" style="font-size:11px">Number of Dimensions: 2</font></div><div><font face="Menlo" style="font-size:11px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[2] x [6]</font></div><div><font face="Menlo" style="font-size:11px">Coordinates:</font></div><div><font face="Menlo" style="font-size:11px">Number Of Attributes: 1</font></div><div><font face="Menlo" style="font-size:11px"> _FillValue :<span style="white-space:pre-wrap">        </span>9.969209968386869e+36</font></div><div style="font-weight:bold"><br></div><div>As you can see, type is the same (so the attribute _FillValue is preserved) but there are no longname and units metadata anymore.</div><div><br></div><div>Hope this helps.</div><div>Cheers </div></div><div><br></div><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div><br>Guido Cioni</div><div><a href="http://guidocioni.altervista.org" target="_blank">http://guidocioni.altervista.org</a> </div><div><br></div></div><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div>
</div>
<br><div><blockquote type="cite"></blockquote></div></div></div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div>Il giorno 29 mag 2016, alle ore 19:50, Guilherme Martins <<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>> ha scritto:</div><br></blockquote></div></div></div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div><div dir="ltr"><div>Hi users,</div><div><br></div><div>How do I break a line in the NCL? I do not want the effect caused by the </div><div>"~C~" but want to break the line within the script. I have a limit to write in that line.</div><div><br></div><div>For example, that line is very long in my script and I want to break the line:</div><div><br></div><div>res@tiMainString = "Anomalia de altura geopotencial em 500hPa - Fevereiro/1979"<br></div><div><br></div><div>I tryed to use the "\", but does not work.</div><div><br></div><div>Another issue I would like to understand why when we multiply any variable by a constant, this variable loses its metadata? I searched but I did not found anything.</div><div><br></div><div>Thank you.</div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div><font size="2"><div>------------------------------------------------------------------------------------------</div><div>Dr. Guilherme Martins</div><div>Instituto Nacional de Pesquisas Espaciais (INPE)<br></div></font></div><div><font size="2">Centro de Previsão de Tempo e Estudos Climáticos (CPTEC)<br></font>Grupo de Desenvolvimento em Assimilação de Dados (GDAD)<font size="2"><br></font></div><div>Telefone (INPE/CP): +55 12 3186-8551 || Celular (TIM): +55 12 98152-8580<br>E-mail: <a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> || <a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a><br>Skype: guilherme.martins.<br>Homepage: <a href="https://sites.google.com/site/jgmsantos" target="_blank">https://sites.google.com/site/jgmsantos</a><br>Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803" target="_blank">http://lattes.cnpq.br/5997657584785803</a><span><br></span>------------------------------------------------------------------------------------------</div></div></div></div></blockquote></div></div></div><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div>
_______________________________________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div></blockquote></div><br></div></div></blockquote></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div><font size="2"><div>------------------------------------------------------------------------------------------</div><div>Dr. Guilherme Martins</div><div>Instituto Nacional de Pesquisas Espaciais (INPE)<br></div></font></div><div><font size="2">Centro de Previsão de Tempo e Estudos Climáticos (CPTEC)<br></font>Grupo de Desenvolvimento em Assimilação de Dados (GDAD)<font size="2"><br></font></div><div>Telefone (INPE/CP): +55 12 3186-8551 || Celular (TIM): +55 12 98152-8580<br>E-mail: <a href="mailto:guilherme.martins@inpe.br">guilherme.martins@inpe.br</a> || <a href="mailto:jgmsantos@gmail.com">jgmsantos@gmail.com</a><br>Skype: guilherme.martins.<br>Homepage: <a href="https://sites.google.com/site/jgmsantos">https://sites.google.com/site/jgmsantos</a><br>Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803">http://lattes.cnpq.br/5997657584785803</a><span><br></span>------------------------------------------------------------------------------------------</div></div></div>