Project

General

Profile

long pipe line fldsum mul, enlarge expr + cat

Added by Estanislao Gavilan 8 months ago

Dear Community,

I am stuck with this command. I want to compute the freshwater content:
1) I use cat to collect the salinity with dimensions x,y,z, and t.
2) I enlarge it to add an extra dimension to the thickness of the water column.
3) I add the expression to compute the freshwater content.
4) I multiply the enlarged grid with the new variables fwc.
5) I want to use fldsum to sum the fwc over the z-axis.

I am having some arguments errors with enlarge and mul, and the use of fldsum for a specific dimension. I tried to use connotation marks, but it did not help. Thanks in advance for all your help.

cdo -z zip_6 (-fldsum -selzaxis) -mul (-selname,fwc) -expr,'so_f=((so<=34.8)) ? so : (so/0.0); fwc = (34.8-so_f)/34.8 ' -enlarge (-selname,so) -cat 'so_input_20??.nc' thkcello_input.nc output.nc

Kind regards,

Estanislao

PS: The bracket means I am unsure if it is necessary or I do not know how to use it.


Replies (3)

RE: long pipe line fldsum mul, enlarge expr + cat - Added by Karin Meier-Fleischer 7 months ago

Hi Estanislao,

sorry for answering so late. Have you solved your problem?

I would try to split this long command for testing into single steps to see if every calculation does what you want, and at the end you can bring the steps together into one command (if this is possible).

RE: long pipe line fldsum mul, enlarge expr + cat - Added by Uwe Schulzweida 7 months ago

Yes, sorry for the late reply, most of us have been on vacation the last few weeks.
The combination of the operators mul and cat unfortunately does not work. Oliver has fixed the problem in the CDO parser. CDO 2.3.0 will be released in 2 weeks.

RE: long pipe line fldsum mul, enlarge expr + cat - Added by Estanislao Gavilan 7 months ago

Hi,

thanks for your help. I thought I was doing something wrong because it was the first time combining so many operators. I will wait for the next version. Meanwhile, I will do as Karin suggested to check that I get what I want.

    (1-3/3)