⚲
Project
General
Profile
Sign in
Register
Home
Projects
Imprint + Privacy Policy
Help
Search
:
CDO
All Projects
CDO
Overview
Activity
News
Wiki
Forums
Files
Documentation
Download (406 Bytes)
RE: Area weighted average
ยป fldmeanVSsum.sh
Ralf Mueller
, 2020-04-30 13:05
#!/usr/bin/env bash
set
-x
input
=
"
$1
"
applyMask
=
"-mul -gtc,-10
${
input
}
"
# good for data without missing values
cdo
-diffv
[
-fldmean
${
input
}
-div
-fldsum
-mul
[
${
input
}
-gridarea
${
input
}
]
[
-fldsum
-gridarea
${
input
}
]
]
# valid for fields that contain missing values
cdo
-diffv
-fldmean
${
input
}
-div
-fldsum
-mul
${
input
}
${
applyMask
}
-gridarea
${
input
}
-fldsum
${
applyMask
}
-gridarea
${
input
}
(1-1/1)
Loading...