[ncl-talk] Symbol ">"
Atenágoras Silva
athenagoras at gmail.com
Thu Jun 23 20:39:08 MDT 2016
You are welcome.
Best regards,
Atenágoras.
2016-06-23 22:42 GMT-03:00 Guilherme Martins <jgmsantos at gmail.com>:
> Dear Kevin and Atenagoras,
>
> 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.
>
> Guilherme.
>
> Em qui, 23 de jun de 2016 às 14:44, HAVENER, KEVIN F GS-12 USAF ACC 14
> WS/WXED <kevin.havener at us.af.mil> escreveu:
>
>> 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.
>>
>> 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.
>>
>> Kevin Havener,
>>
>>
>> -----Original Message-----
>> From: Guilherme Martins [mailto:jgmsantos at gmail.com]
>> Sent: Thursday, June 23, 2016 1:44 PM
>> To: HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <kevin.havener at us.af.mil>;
>> NCL <ncl-talk at ucar.edu>
>> Subject: Re: [ncl-talk] Symbol ">"
>>
>> Hi Kevin,
>>
>> I tried that:
>>
>> dir="/home/gui/guilherme/novo_dolman_ppt_sst/cdo/"
>>
>> system("paste " +dir+"tmp.djf.txt " +dir+"tmp.jja.txt "
>> +dir+"tmp.anual.txt > " +dir+"slope.evap.prec.txt") system("rm -f
>> teste.*.txt")
>>
>> But, nothing.
>>
>> My files and script are in attachment. My files are created in the same
>> directory of my script.
>>
>> Thanks,
>>
>> Guilherme.
>>
>> Em qui, 23 de jun de 2016 às 11:12, HAVENER, KEVIN F GS-12 USAF ACC 14
>> WS/WXED <kevin.havener at us.af.mil <mailto:kevin.havener at us.af.mil> >
>> escreveu:
>>
>>
>> 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:
>>
>> system("paste /path/to/tmp.djf.txt /path/to/tmp.jja.txt
>> /path/to/tmp.anual.txt > /output/path/slope.evap.prec.txt")
>>
>> 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.
>>
>> Kevin Havener
>>
>> -----Original Message-----
>> From: Guilherme Martins [mailto:jgmsantos at gmail.com <mailto:
>> jgmsantos at gmail.com> ]
>> Sent: Thursday, June 23, 2016 8:46 AM
>> To: HAVENER, KEVIN F GS-12 USAF ACC 14 WS/WXED <
>> kevin.havener at us.af.mil <mailto:kevin.havener at us.af.mil> >; NCL <
>> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu> >
>> Subject: Re: [ncl-talk] Symbol ">"
>>
>> Hi Kevin,
>>
>> 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 ">".
>>
>> Thanks,
>>
>> Guilherme.
>>
>> Em qui, 23 de jun de 2016 às 09:39, HAVENER, KEVIN F GS-12 USAF
>> ACC 14 WS/WXED <kevin.havener at us.af.mil <mailto:kevin.havener at us.af.mil>
>> <mailto:kevin.havener at us.af.mil <mailto:kevin.havener at us.af.mil> > >
>> escreveu:
>>
>>
>> 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.
>>
>> Kevin Havener
>>
>> -----Original Message-----
>> From: ncl-talk-bounces at ucar.edu <mailto:
>> ncl-talk-bounces at ucar.edu> <mailto:ncl-talk-bounces at ucar.edu <mailto:
>> ncl-talk-bounces at ucar.edu> > [mailto:ncl-talk-bounces at ucar.edu <mailto:
>> ncl-talk-bounces at ucar.edu> <mailto:ncl-talk-bounces at ucar.edu <mailto:
>> ncl-talk-bounces at ucar.edu> > ] On Behalf Of Guilherme Martins
>> Sent: Thursday, June 23, 2016 7:55 AM
>> To: NCL <ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>> <mailto:ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu> > >
>> Subject: [ncl-talk] Symbol ">"
>>
>> Hi users,
>>
>> I'm trying to use the symbol ">" to create a file
>> together the system function in my NCL script, according to the line below:
>>
>> system("paste tmp.djf.txt tmp.jja.txt tmp.anual.txt >
>> slope.evap.prec.txt")
>>
>> But I receive:
>>
>> paste: tmp.jja.txt: Arquivo ou diretório não encontrado
>> paste: tmp.djf.txt: Arquivo ou diretório não encontrado
>> paste: tmp.djf.txt: Arquivo ou diretório não encontrado
>>
>> I tried to concatenate with "+" symbol, but nothing.
>>
>> Any help is very appreciated.
>>
>> Thanks,
>>
>> Guilherme.
>> --
>>
>>
>> ------------------------------------------------------------------------------------------
>> Dr. Guilherme Martins
>> Instituto Nacional de Pesquisas Espaciais (INPE)
>>
>> Centro de Previsão de Tempo e Estudos Climáticos (CPTEC)
>> Grupo de Desenvolvimento em Assimilação de Dados (GDAD)
>>
>> Telefone (INPE/CP): +55 12 3186-8551 || Celular (TIM): +55
>> 12 98152-8580
>> E-mail: guilherme.martins at inpe.br <mailto:
>> guilherme.martins at inpe.br> <mailto:guilherme.martins at inpe.br <mailto:
>> guilherme.martins at inpe.br> > <mailto:guilherme.martins at inpe.br <mailto:
>> guilherme.martins at inpe.br> <mailto:guilherme.martins at inpe.br <mailto:
>> guilherme.martins at inpe.br> > > || jgmsantos at gmail.com <mailto:
>> jgmsantos at gmail.com> <mailto:jgmsantos at gmail.com <mailto:
>> jgmsantos at gmail.com> > <mailto:jgmsantos at gmail.com <mailto:
>> jgmsantos at gmail.com> <mailto:jgmsantos at gmail.com <mailto:
>> jgmsantos at gmail.com> > >
>> Skype: guilherme.martins.
>> Homepage: https://sites.google.com/site/jgmsantos
>> Currículo Lattes: http://lattes.cnpq.br/5997657584785803
>>
>> ------------------------------------------------------------------------------------------
>>
>>
>> --
>>
>>
>> ------------------------------------------------------------------------------------------
>> Dr. Guilherme Martins
>> Instituto Nacional de Pesquisas Espaciais (INPE)
>>
>> Centro de Previsão de Tempo e Estudos Climáticos (CPTEC) Grupo de
>> Desenvolvimento em Assimilação de Dados (GDAD)
>>
>> Telefone (INPE/CP): +55 12 3186-8551 || Celular (TIM): +55 12
>> 98152-8580
>> E-mail: guilherme.martins at inpe.br <mailto:
>> guilherme.martins at inpe.br> <mailto:guilherme.martins at inpe.br <mailto:
>> guilherme.martins at inpe.br> > || jgmsantos at gmail.com <mailto:
>> jgmsantos at gmail.com> <mailto:jgmsantos at gmail.com <mailto:
>> jgmsantos at gmail.com> >
>> Skype: guilherme.martins.
>> Homepage: https://sites.google.com/site/jgmsantos
>> Currículo Lattes: http://lattes.cnpq.br/5997657584785803
>>
>> ------------------------------------------------------------------------------------------
>>
>>
>> --
>>
>>
>> ------------------------------------------------------------------------------------------
>> Dr. Guilherme Martins
>> Instituto Nacional de Pesquisas Espaciais (INPE)
>>
>> Centro de Previsão de Tempo e Estudos Climáticos (CPTEC) Grupo de
>> Desenvolvimento em Assimilação de Dados (GDAD)
>>
>> Telefone (INPE/CP): +55 12 3186-8551 || Celular (TIM): +55 12 98152-8580
>> E-mail: guilherme.martins at inpe.br <mailto:guilherme.martins at inpe.br> ||
>> jgmsantos at gmail.com <mailto:jgmsantos at gmail.com>
>> Skype: guilherme.martins.
>> Homepage: https://sites.google.com/site/jgmsantos
>> Currículo Lattes: http://lattes.cnpq.br/5997657584785803
>>
>> ------------------------------------------------------------------------------------------
>>
> --
>
> ------------------------------------------------------------------------------------------
> Dr. Guilherme Martins
> Instituto Nacional de Pesquisas Espaciais (INPE)
> Centro de Previsão de Tempo e Estudos Climáticos (CPTEC)
> Grupo de Desenvolvimento em Assimilação de Dados (GDAD)
> Telefone (INPE/CP): +55 12 3186-8551 || Celular (TIM): +55 12 98152-8580
> E-mail: guilherme.martins at inpe.br || jgmsantos at gmail.com
> Skype: guilherme.martins.
> Homepage: https://sites.google.com/site/jgmsantos
> Currículo Lattes: http://lattes.cnpq.br/5997657584785803
>
> ------------------------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160623/a2954c0b/attachment.html
More information about the ncl-talk
mailing list