<font face="tahoma, arial, helvetica, sans-serif"><span style="font-size: 12px;">Dear NCL users,</span></font><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;">I have a weird issue on computing a simple avarage of a variable.</div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;">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</div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div><div style=""><div style=""><font face="tahoma, arial, helvetica, sans-serif"><span style="font-size: 12px;"><i> printVarSummary(rho_9s_mask)</i></span></font></div><div style=""><font face="tahoma, arial, helvetica, sans-serif"><span style="font-size: 12px;"><i> printMinMax(rho_9s_mask,False) </i></span></font></div><div style=""><font face="tahoma, arial, helvetica, sans-serif"><span style="font-size: 12px;"><i><br></i></span></font></div><div style=""><font face="tahoma, arial, helvetica, sans-serif"><span style="font-size: 12px;"><i>;; Create cross sections</i></span></font></div><div style=""><span style="font-size: 12px; font-family: tahoma, arial, helvetica, sans-serif;"><i> rho_9s_mask_ave = dim_avg_n_Wrap(rho_9s_mask,2)</i></span></div><div style=""><span style="font-size: 12px; font-family: tahoma, arial, helvetica, sans-serif;"><i> copy_VarCoords_1(rho_9s_mask,rho_9s_mask_ave)</i></span></div><div style=""><span style="font-size: 12px; font-family: tahoma, arial, helvetica, sans-serif;"><i> </i></span></div><div style=""><font face="tahoma, arial, helvetica, sans-serif"><span style="font-size: 12px;"><i> printVarSummary(rho_9s_mask_ave)</i></span></font></div><div style=""><font face="tahoma, arial, helvetica, sans-serif"><span style="font-size: 12px;"><i> printMinMax(rho_9s_mask_ave,False) </i></span></font></div></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;">and here is what I obtain</div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><span style="font-family:monospace"><span style="background-color: rgb(255, 255, 255);">Variable: rho_9s_mask
</span><br>Type: float
<br>Total Size: 14493600 bytes
<br>            3623400 values
<br>Number of Dimensions: 3
<br>Dimensions and sizes:   [time | 165] x [lev | 61] x [lon | 360]
<br>Coordinates:  <br>            time: [181.25..60081.25]
<br>            lev: [   1..6525]
<br>            lon: [ 0..358.9818]
<br>Number Of Attributes: 1
<br>  _FillValue :  1e+20
<br>(0)     min=1020.5   max=1027.72
<br>
<br>Variable: rho_9s_mask_ave
<br>Type: float
<br>Total Size: 40260 bytes
<br>            10065 values
<br>Number of Dimensions: 2
<br>Dimensions and sizes:   [time | 165] x [lev | 61]
<br>Coordinates:  <br>            time: [181.25..60081.25]
<br>            lev: [   1..6525]
<br>Number Of Attributes: 2
<br>  _FillValue :  1e+20
<br>  average_op_ncl :      dim_avg_n over dimension(s): lon
<br>(0)     min=nan   max=nan<br>
<br></span></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;">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. </div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;">Do you have any guess of what's wrong or any suggestion to help me?</div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;">Thanks a lot, </div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;">Giorgio</div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div><div style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 12px;"><br></div>