Project

General

Profile

about vertmean

Added by Jen Sun about 8 years ago

Hello

I am trying to use this command, "cdo vertmean", to calculate vertical integration weighted by pressure level depth.
but something frustrated is that I always get this response :
"cdo vertmean (Warning): Layer bounds not available, using constant vertical weights for variable th!"

I know what happened because my ncfile is without any bnds in vertical lev, so I write a bnds and append on this nc file, and the ncudmp is as followed :

netcdf test {
dimensions:
    x = 1 ;
    y = 1 ;
    lev = 45 ;
    Time = UNLIMITED ; // (1 currently)
    bnds = 2 ;
variables:
    double lev(lev) ;
        lev:long_name = "generic" ;
        lev:units = "level" ;
        lev:axis = "Z" ;
    double Time(Time) ;
        Time:standard_name = "time" ;
        Time:long_name = "Time" ;
        Time:units = "minutes since 1900-1-1 00:00:00" ;
        Time:calendar = "standard" ;
        Time:axis = "T" ;
    float th(Time, lev, y, x) ;
        th:standard_name = "potential_temperature" ;
        th:long_name = "potential temperature" ;
        th:units = "K" ;
        th:_FillValue = 9.96921e+36f ;
        th:missing_value = 9.96921e+36f ;
    float lev_bnds(lev, bnds) ;

// global attributes:
        :CDI = "Climate Data Interface version 1.7.1 (http://mpimet.mpg.de/cdi)" ;
        :Conventions = "CF-1.4" ;
        :history = "Wed Mar 23 12:35:02 2016: ncks -A -v lev_bnds test_mat.nc test.nc\n",
            "Wed Mar 23 12:35:02 2016: ncks -A -v lev F_info/A21/plev.nc test.nc\n",
            "Wed Mar 23 12:35:02 2016: cdo selindexbox,50,50,1,1 -seltimestep,240 F_MODEL/A21/th3d.nc test.nc" ;
        :institution = "Colorado State University" ;
        :model_tag = "CSU VVM" ;
        :references = "http://kiwi.atmos.colostate.edu/pubs/joon-hee-tech_report.pdf" ;
        :contact = "jung@atmos.colostate.edu" ;
        :VVM_casename = "GATE_PHASE_III                                                                  " ;
        :CDO = "Climate Data Operators version 1.7.1 (http://mpimet.mpg.de/cdo)" ;
        :NCO = "4.3.7" ;
}

the result is the same.
what do I lose ?

thanks a lot


Replies (3)

RE: about vertmean - Added by Uwe Schulzweida about 8 years ago

The following attribute is missing:

lev:bounds = "lev_bnds" ;

You can add it with the NCO tool ncatted:
ncatted -a bounds,lev,c,c,"lev_bnds" file.nc

RE: about vertmean - Added by Jen Sun about 8 years ago

got it ! thanks a lot

RE: about vertmean - Added by Josué Bock over 6 years ago

Hello,

When creating a level bounds variable, which values do you set for the level bounds? Just +/- 0.5 for each level?

If so, is it the correct way to weight the level thicknesses? I mean: two sets of hybrid coefficients are generally provided, either for the layer centre, or for the layer boundaries. But a centered value is not the average of the boundaries values, but stem from a separate calculation (according to https://rda.ucar.edu/datasets/ds627.0/docs/Eta_coordinate/, the average results in a systematic pressure overestimation).
So I wonder if the creation of a level bounds variable as the level number +/- 0.5 would lead to the same bias?

Thanks

    (1-3/3)