<div dir="ltr"><div><div>You are welcome.<br><br></div>Best regards,<br></div>Atenágoras.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-23 22:42 GMT-03:00 Guilherme Martins <span dir="ltr"><<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Kevin and Atenagoras,<div><br></div><div>Thanks a lot for you help. I found the error, my problem was the position I put the system (paste command). It should be outside of my loop.</div><div><br></div><div>Guilherme.</div></div><div><div class="h5"><br><div class="gmail_quote"><div dir="ltr">Em qui, 23 de jun de 2016 às 14:44, HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I invoked your both versions of your commands from the ncl command line with your test data within (no path specified) and from a different directory (path specified). Both worked as expected. As far as I can tell, you are building your system command string correctly. I built it, stored it in a variable named cmd_string, then did a print(cmd_string) to verify I built it correctly. Then I executed system(cmd_string) and it worked fine.<br>
<br>
I didn't check the rest of your script, maybe you need to do a system("ls") to make sure the files were created as you intended before invoking system("paste"). It seems that if the files are there, the paste command works. I tested this with ncl-6.3.0.<br>
<br>
Kevin Havener,<br>
<br>
<br>
-----Original Message-----<br>
From: Guilherme Martins [mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>]<br>
Sent: Thursday, June 23, 2016 1:44 PM<br>
To: HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a>>; NCL <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
Subject: Re: [ncl-talk] Symbol ">"<br>
<br>
Hi Kevin,<br>
<br>
I tried that:<br>
<br>
dir="/home/gui/guilherme/novo_dolman_ppt_sst/cdo/"<br>
<br>
system("paste " +dir+"tmp.djf.txt " +dir+"tmp.jja.txt " +dir+"tmp.anual.txt > " +dir+"slope.evap.prec.txt") system("rm -f teste.*.txt")<br>
<br>
But, nothing.<br>
<br>
My files and script are in attachment. My files are created in the same directory of my script.<br>
<br>
Thanks,<br>
<br>
Guilherme.<br>
<br>
Em qui, 23 de jun de 2016 às 11:12, HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a> <mailto:<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a>> > escreveu:<br>
<br>
<br>
Are you specifying the path to the files? If you can do the paste command from within the directory where the files are, then it is likely the ncl working directory is different than the one where the files exist. Try to explicitly set the path:<br>
<br>
system("paste /path/to/tmp.djf.txt /path/to/tmp.jja.txt /path/to/tmp.anual.txt > /output/path/slope.evap.prec.txt")<br>
<br>
would work. If that is not it, you got me! I don't think the angle bracket is the problem though, all ncl is doing is passing that command to your shell, and you've proven that it works as written. It is quite possible your shell is being executed from a different directory than where the files are. Giving an absolute path should solve any file location issues, but a relative path might work as well.<br>
<br>
Kevin Havener<br>
<br>
-----Original Message-----<br>
From: Guilherme Martins [mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>> ]<br>
Sent: Thursday, June 23, 2016 8:46 AM<br>
To: HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a> <mailto:<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a>> >; NCL <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <mailto:<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> ><br>
Subject: Re: [ncl-talk] Symbol ">"<br>
<br>
Hi Kevin,<br>
<br>
The command line works outside of NCL and the file exist in my directory. The problem is inside of NCL in the system function. I don't know if I have to use some special symbol to use the ">".<br>
<br>
Thanks,<br>
<br>
Guilherme.<br>
<br>
Em qui, 23 de jun de 2016 às 09:39, HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a> <mailto:<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a>> <mailto:<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a> <mailto:<a href="mailto:kevin.havener@us.af.mil" target="_blank">kevin.havener@us.af.mil</a>> > > escreveu:<br>
<br>
<br>
Does the command work from the command line (outside of ncl)? Do the files exist, and are they in the expected directories? The error message indicates the files do not exist or aren't in the directories ncl is looking in. I'd say this is not an ncl problem at all unless both answers are yes.<br>
<br>
Kevin Havener<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a> <mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>> <mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a> <mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>> > [mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a> <mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>> <mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a> <mailto:<a href="mailto:ncl-talk-bounces@ucar.edu" target="_blank">ncl-talk-bounces@ucar.edu</a>> > ] On Behalf Of Guilherme Martins<br>
Sent: Thursday, June 23, 2016 7:55 AM<br>
To: NCL <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <mailto:<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> <mailto:<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <mailto:<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> > ><br>
Subject: [ncl-talk] Symbol ">"<br>
<br>
Hi users,<br>
<br>
I'm trying to use the symbol ">" to create a file together the system function in my NCL script, according to the line below:<br>
<br>
system("paste tmp.djf.txt tmp.jja.txt tmp.anual.txt > slope.evap.prec.txt")<br>
<br>
But I receive:<br>
<br>
paste: tmp.jja.txt: Arquivo ou diretório não encontrado<br>
paste: tmp.djf.txt: Arquivo ou diretório não encontrado<br>
paste: tmp.djf.txt: Arquivo ou diretório não encontrado<br>
<br>
I tried to concatenate with "+" symbol, but nothing.<br>
<br>
Any help is very appreciated.<br>
<br>
Thanks,<br>
<br>
Guilherme.<br>
--<br>
<br>
------------------------------------------------------------------------------------------<br>
Dr. Guilherme Martins<br>
Instituto Nacional de Pesquisas Espaciais (INPE)<br>
<br>
Centro de Previsão de Tempo e Estudos Climáticos (CPTEC) Grupo de Desenvolvimento em Assimilação de Dados (GDAD)<br>
<br>
Telefone (INPE/CP): <a href="tel:%2B55%2012%203186-8551" value="+551231868551" target="_blank">+55 12 3186-8551</a> || Celular (TIM): <a href="tel:%2B55%2012%2098152-8580" value="+5512981528580" target="_blank">+55 12 98152-8580</a><br>
E-mail: <a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a>> <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a>> > <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a>> <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> <mailto:<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> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>> > <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a> <mailto:<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" rel="noreferrer" target="_blank">https://sites.google.com/site/jgmsantos</a><br>
Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803" rel="noreferrer" target="_blank">http://lattes.cnpq.br/5997657584785803</a><br>
------------------------------------------------------------------------------------------<br>
<br>
<br>
--<br>
<br>
------------------------------------------------------------------------------------------<br>
Dr. Guilherme Martins<br>
Instituto Nacional de Pesquisas Espaciais (INPE)<br>
<br>
Centro de Previsão de Tempo e Estudos Climáticos (CPTEC) Grupo de Desenvolvimento em Assimilação de Dados (GDAD)<br>
<br>
Telefone (INPE/CP): <a href="tel:%2B55%2012%203186-8551" value="+551231868551" target="_blank">+55 12 3186-8551</a> || Celular (TIM): <a href="tel:%2B55%2012%2098152-8580" value="+5512981528580" target="_blank">+55 12 98152-8580</a><br>
E-mail: <a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a>> <mailto:<a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> <mailto:<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> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a>> <mailto:<a href="mailto:jgmsantos@gmail.com" target="_blank">jgmsantos@gmail.com</a> <mailto:<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" rel="noreferrer" target="_blank">https://sites.google.com/site/jgmsantos</a><br>
Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803" rel="noreferrer" target="_blank">http://lattes.cnpq.br/5997657584785803</a><br>
------------------------------------------------------------------------------------------<br>
<br>
<br>
--<br>
<br>
------------------------------------------------------------------------------------------<br>
Dr. Guilherme Martins<br>
Instituto Nacional de Pesquisas Espaciais (INPE)<br>
<br>
Centro de Previsão de Tempo e Estudos Climáticos (CPTEC) Grupo de Desenvolvimento em Assimilação de Dados (GDAD)<br>
<br>
Telefone (INPE/CP): <a href="tel:%2B55%2012%203186-8551" value="+551231868551" target="_blank">+55 12 3186-8551</a> || Celular (TIM): <a href="tel:%2B55%2012%2098152-8580" value="+5512981528580" target="_blank">+55 12 98152-8580</a><br>
E-mail: <a href="mailto:guilherme.martins@inpe.br" target="_blank">guilherme.martins@inpe.br</a> <mailto:<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> <mailto:<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" rel="noreferrer" target="_blank">https://sites.google.com/site/jgmsantos</a><br>
Currículo Lattes: <a href="http://lattes.cnpq.br/5997657584785803" rel="noreferrer" target="_blank">http://lattes.cnpq.br/5997657584785803</a><br>
------------------------------------------------------------------------------------------<br>
</blockquote></div><div dir="ltr">-- <br></div></div></div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div class="h5"><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></div><div><div><div class="h5">Telefone (INPE/CP): <a href="tel:%2B55%2012%203186-8551" value="+551231868551" target="_blank">+55 12 3186-8551</a> || Celular (TIM): <a href="tel:%2B55%2012%2098152-8580" value="+5512981528580" target="_blank">+55 12 98152-8580</a><br></div></div>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><span class=""><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>------------------------------------------------------------------------------------------</span></div></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>