[ncl-talk] Problem on averaging variable
Giorgio Graffino
g.graffino at tim.it
Tue Jun 9 15:41:21 MDT 2020
Dear NCL users,I have a weird issue on computing a simple avarage of a variable.
I'm analysing a large subset of CMIP models to obtain density plots. However, there is a particular model I can't analyse: when I compute the average, all values in the variable becomes missing values. Here is the relevant snippet
printVarSummary(rho_9s_mask) printMinMax(rho_9s_mask,False)
;; Create cross sections rho_9s_mask_ave = dim_avg_n_Wrap(rho_9s_mask,2) copy_VarCoords_1(rho_9s_mask,rho_9s_mask_ave) printVarSummary(rho_9s_mask_ave) printMinMax(rho_9s_mask_ave,False)
and here is what I obtain
Variable: rho_9s_mask
Type: float
Total Size: 14493600 bytes
3623400 values
Number of Dimensions: 3
Dimensions and sizes: [time | 165] x [lev | 61] x [lon | 360]
Coordinates:
time: [181.25..60081.25]
lev: [ 1..6525]
lon: [ 0..358.9818]
Number Of Attributes: 1
_FillValue : 1e+20
(0) min=1020.5 max=1027.72
Variable: rho_9s_mask_ave
Type: float
Total Size: 40260 bytes
10065 values
Number of Dimensions: 2
Dimensions and sizes: [time | 165] x [lev | 61]
Coordinates:
time: [181.25..60081.25]
lev: [ 1..6525]
Number Of Attributes: 2
_FillValue : 1e+20
average_op_ncl : dim_avg_n over dimension(s): lon
(0) min=nan max=nan
This works for all models but one. I tried to use a different function for the average, but nothing changes. I also tried to compute the average on other dimensions: the problem occurs again when averaging on the lev coordinate, but it doesn't when averaging on the time coordinate. It seems that there is a problem in the coordinate, but everything looks alright in the variable before the averaging.
Do you have any guess of what's wrong or any suggestion to help me?
Thanks a lot, Giorgio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200609/00d82b95/attachment.html>
More information about the ncl-talk
mailing list