[ncl-talk] issue on doing the average in mask area

Amal Inge amalingenieur89 at gmail.com
Wed Feb 6 20:37:07 MST 2019


Dear NCL Experts,

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).
how could i resolve this issue please?

code:
 a7 = addfile("./dox07_med_0-52_s2014.nc","r")
 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/)
  dox_ave_a7 = dim_avg_wgt_n_Wrap(dox_a7, wgt, 0, 1 )
  y_a7 = dim_avg_n_Wrap(dox_ave_a7,(/1,2/))

variable
netcdf dox07_med_0-52_s2014 {
dimensions:
    lon = 670 ;
    lat = 253 ;
    lev = 13 ;
    time = UNLIMITED ; // (1 currently)
    bnds = 2 ;
variables:
    float lon(lon) ;
        lon:standard_name = "longitude" ;
        lon:long_name = "longitude" ;
        lon:units = "degrees_east" ;
        lon:axis = "X" ;
    float lat(lat) ;
        lat:standard_name = "latitude" ;
        lat:long_name = "latitude" ;
        lat:units = "degrees_north" ;
        lat:axis = "Y" ;
    float lev(lev) ;
        lev:standard_name = "depth" ;
        lev:long_name = "depth" ;
        lev:units = "m" ;
        lev:positive = "down" ;
        lev:axis = "Z" ;
        lev:_CoordinateZisPositive = "down" ;
        lev:_CoordinateAxisType = "Height" ;
    double time(time) ;
        time:standard_name = "time" ;
        time:long_name = "time" ;
        time:bounds = "time_bnds" ;
        time:units = "seconds since 1970-01-01 00:00:00" ;
        time:calendar = "standard" ;
        time:axis = "T" ;
    double time_bnds(time, bnds) ;
    float dox(time, lev, lat, lon) ;
        dox:standard_name =
"mole_concentration_of_dissolved_molecular_oxygen_in_sea_water" ;
        dox:long_name = "Mole concentration of Dissolved Molecular Oxygen
in sea water" ;
        dox:units = "millimol m-3" ;
        dox:_FillValue = 1.e+20f ;
        dox:missing_value = 1.e+20f ;
        dox:_ChunkSizes = 1, 22, 84, 161  ;

Many thanks
Amal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190207/00744212/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dox.png
Type: image/png
Size: 1365 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190207/00744212/attachment.png>


More information about the ncl-talk mailing list