Single field stats
Added by Nikolay Yasinskiy over 6 years ago
Hello, is there an operator to calculate max or range of value within one field as in info operator and obtain it as a number?
Replies (7)
RE: Single field stats - Added by Uwe Schulzweida over 6 years ago
Max of each Field:
cdo output -fldmax infileRange of each Field:
cdo output -fldrange infile
RE: Single field stats - Added by Nikolay Yasinskiy over 6 years ago
Thank you, I thought about fldrange, but didn't understand the syntax.
And if I try to get this value for one field within an extent of another one, would the "-remap,infile1 infile2 out -> output fldrange,out" be the only and best way?
RE: Single field stats - Added by Uwe Schulzweida over 6 years ago
You can combine these commands to one line:
cdo output -fldrange -remap,... infile > out
RE: Single field stats - Added by Nikolay Yasinskiy over 6 years ago
Hm... And why
cdo -setname,var777 -mul -div -output -fldrange -select,name=var199 $infile1 -output -fldrange -select,name=var182 -remapnn,$infile1 $infile2 -select,name=var199 $infile1 $outfile
does not work?
We cannot parallelize outputs? It should be a field '-select,name=var199 $infile1' multiplied by a calculated constant '-div -output -fldrange -select,name=var199 $infile1 -output -fldrange -select,name=var182 -remapnn,$infile1 $infile2'
RE: Single field stats - Added by Uwe Schulzweida over 6 years ago
The CDO operator output can't be combined with other operators. It simple print the contents of a data stream to screen.
You have to remove this operator:
cdo -setname,var777 -mul -div -fldrange -select,name=var199 $infile1 -fldrange -select,name=var182 -remapnn,$infile1 $infile2 -select,name=var199 $infile1 $outfile
RE: Single field stats - Added by Nikolay Yasinskiy over 6 years ago
This does not work, because it says: cdo(2) mul (Abort): Grid size of the input parameters do not match!
Nor mulc operator helps.
RE: Single field stats - Added by Uwe Schulzweida over 6 years ago
Ok, the field size of the input streams for mul need to be the same. You can use enlarge for this task. I have also replaced select,name by selname:
cdo -setname,var777 -mul -enlarge,$infile1 -div -fldrange -selname,var199 $infile1 -fldrange -selname,var182 -remapnn,$infile1 $infile2 -selname,var199 $infile1 $outfile