<div dir="ltr"><div>What is 'dox_a7'</div><div>What masking did you do?</div><div><br></div><div><div><br></div><div> 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/)</div><div><br></div><div> dox_a7 = a7->dox ; ????? <br></div><div> printVarSummary(dox_a7) ; (time, lev, lat, lon) ; (0,1,2,3)<br></div><div> printMinMax(dox_a7,0)</div><div><br></div><div> dox_ave_a7 = dim_avg_wgt_n_Wrap(dox_a7, wgt, 0, 1 ) ; wgt by level => (time,lat,lon) ==> (0,1,2)<br> y_a7 = dim_avg_n_Wrap(dox_ave_a7,(/1,2/)) ; scalar <br></div><div><br></div><div>Add, printVarSummary(...) and printMinMax(..., 0)<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 7, 2019 at 5:33 AM Amal Inge <<a href="mailto:amalingenieur89@gmail.com">amalingenieur89@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>