Project

General

Profile

Tips about argument groups

Added by Guilherme Martins over 1 year ago

Dear Users.

When I run the command below. I'm using cdo 2.1.0.

cdo -s -O --no_history -delete,timestep=1 -mergetime chuva_diaria_??????????.nc merge.nc

I receive this message:

Using two operators with variable input without using sub groups [] is not allowed

I read the documentation about "[]"*, but it's not clear to me.

Could anyone give any tips?

*1.3.2 Argument Groups -> available at: https://code.mpimet.mpg.de/projects/cdo/embedded/index.html

Best regards,

Guilherme Martins.


Replies (5)

RE: Tips about argument groups - Added by Karin Meier-Fleischer over 1 year ago

I would guess

cdo -s -O --no_history -delete,timestep=1 -mergetime [ chuva_diaria_??????????.nc ] merge.nc

RE: Tips about argument groups - Added by Guilherme Martins over 1 year ago

Dear Karin,

Thank you for the information and help, it was very important

Karin:

I tried:

cdo -s -O --no_history -delete,timestep=1 -mergetime [ chuva_diaria_??????????.nc ] merge1.nc

The result was:

 ^ Using two operators with variable input without using sub groups [] is not allowed

I'm using cdo 2.1.0.

I don't know what I'm doing wrong.

RE: Tips about argument groups - Added by Karin Meier-Fleischer over 1 year ago

Oh, cdo version 2.1.0 and 2.2.0 gives errors but version 2.0.5 works as expected with the command from above. For version >=2.1.0 you have to put the operator (here mergetime) in the square brackets:

cdo -s -O --no_history -delete,timestep=1 [ -mergetime chuva_diaria_??????????.nc ] merge.nc

RE: Tips about argument groups - Added by Guilherme Martins over 1 year ago

Dear Karin,

Your suggestion worked.

Thanks a lot! :-)

RE: Tips about argument groups - Added by Oliver Heidmann over 1 year ago

Hi there,

sorry for the inconvenience.
When reworking our parser I implemented some rules that were too strict.
We fixed this with in 2.2.1.

Best regards
Oliver Heidmann

    (1-5/5)