<div dir="ltr"><div dir="ltr">Dear NCL Experts,<div class="gmail_quote"><div dir="ltr"><div dir="ltr"><div><br></div><div>I did a masking and I'm trying to do the average of 4D variable in the area I need but I get a so low values, it seems that my code is making the average in all the area (the masked and the non masked).</div><div>how could i resolve this issue please?<br></div><div><br></div><div>code:<br></div><div dir="ltr"> a7 = addfile("./<a href="http://dox07_med_0-52_s2014.nc" target="_blank">dox07_med_0-52_s2014.nc</a>","r")<br> wgt = (/0, 1.472102, 4.587478, 7.944124, 11.55863, 15.44871, 19.6333, 24.13265, 28.96836, 34.16353, 39.74284, 45.73265, 52.16112/)<br> dox_ave_a7 = dim_avg_wgt_n_Wrap(dox_a7, wgt, 0, 1 ) <br> y_a7 = dim_avg_n_Wrap(dox_ave_a7,(/1,2/))<br></div><div><br></div><div>variable</div><div>netcdf dox07_med_0-52_s2014 {<br>dimensions:<br> lon = 670 ;<br> lat = 253 ;<br> lev = 13 ;<br> time = UNLIMITED ; // (1 currently)<br> bnds = 2 ;<br>variables:<br> float lon(lon) ;<br> lon:standard_name = "longitude" ;<br> lon:long_name = "longitude" ;<br> lon:units = "degrees_east" ;<br> lon:axis = "X" ;<br> float lat(lat) ;<br> lat:standard_name = "latitude" ;<br> lat:long_name = "latitude" ;<br> lat:units = "degrees_north" ;<br> lat:axis = "Y" ;<br> float lev(lev) ;<br> lev:standard_name = "depth" ;<br> lev:long_name = "depth" ;<br> lev:units = "m" ;<br> lev:positive = "down" ;<br> lev:axis = "Z" ;<br> lev:_CoordinateZisPositive = "down" ;<br> lev:_CoordinateAxisType = "Height" ;<br> double time(time) ;<br> time:standard_name = "time" ;<br> time:long_name = "time" ;<br> time:bounds = "time_bnds" ;<br> time:units = "seconds since 1970-01-01 00:00:00" ;<br> time:calendar = "standard" ;<br> time:axis = "T" ;<br> double time_bnds(time, bnds) ;<br> float dox(time, lev, lat, lon) ;<br> dox:standard_name = "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water" ;<br> dox:long_name = "Mole concentration of Dissolved Molecular Oxygen in sea water" ;<br> dox:units = "millimol m-3" ;<br> dox:_FillValue = 1.e+20f ;<br> dox:missing_value = 1.e+20f ;<br> dox:_ChunkSizes = 1, 22, 84, 161 ;<br></div><div><br></div><div>Many thanks</div><div>Amal<br></div></div></div>
</div></div></div>