[netcdf-hdf] time unit & projection troubles when using CDO

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

Hi,
I am not sure if this is the right mailing list, but I am having some
problems with my netcdf data when using CDO operators. Basically I losing my
projections and my time field information.
To just go over the type of data I have, here is a summary of my data.
It is climate change data for precipitation.

Summarizing this data using ncdump -h looks like this:



haileye@devel:~/data2/climate/RCM/NARCCAP/test$ ncdump -h
narccap_crcm-20c3m-pr-ncep.nc
narccap_crcm-20c3m-pr-ncep {
dimensions:
        xc = 140 ;
        yc = 115 ;
        time = UNLIMITED ; // (8760 currently)
        bnds = 2 ;
variables:
        double yc(yc) ;
                yc:units = "m" ;
                yc:long_name = "y-coordinate of polar_stereographic
projection" ;
                yc:standard_name = "projection_y_coordinate" ;
                yc:axis = "Y" ;
                yc:coordinate_defines = "point" ;
                yc:actual_range = 0.f, 5700000.f ;
        double xc(xc) ;
                xc:units = "m" ;
                xc:long_name = "x-coordinate of polar_stereographic
projection" ;
                xc:standard_name = "projection_x_coordinate" ;
                xc:axis = "X" ;
                xc:coordinate_defines = "point" ;
                xc:actual_range = 0.f, 6950000.f ;
        double time(time) ;
                time:long_name = "time" ;
                time:calendar = "365_day" ;
                time:standard_name = "time" ;
                time:axis = "T" ;
                time:units = "days since 2038-01-01 00:00:0.0" ;
                time:delta_t = "0000-00-00 03:00:00" ;
                time:coordinate_defines = "point" ;
                time:actual_range = 0.125f, 1095.f ;
                time:bounds = "time_bnds" ;
        double lon(yc, xc) ;
                lon:units = "degrees_east" ;
                lon:long_name = "longitude" ;
                lon:standard_name = "longitude" ;
                lon:axis = "X" ;
                lon:actual_range = 199.8962f, 326.4349f ;
        double lat(yc, xc) ;
                lat:units = "degrees_north" ;
                lat:long_name = "latitude" ;
                lat:standard_name = "latitude" ;
                lat:axis = "Y" ;
                lat:actual_range = 20.60496f, 73.2522f ;
        char polar_stereographic ;
                polar_stereographic:straight_vertical_longitude_from_pole =
263.f ;
                polar_stereographic:standard_parallel = 60.f ;
                polar_stereographic:false_easting = 3450000.f ;
                polar_stereographic:false_northing = 7450000.f ;
                polar_stereographic:latitude_of_projection_origin = 90.f ;
                polar_stereographic:grid_mapping_name =
"polar_stereographic" ;
                polar_stereographic:resolution_at_standard_parallel =
50000.f ;
        float pr(time, yc, xc) ;
                pr:units = "kg m-2 s-1" ;
                pr:type = "average" ;
                pr:long_name = "Precipitation" ;
                pr:standard_name = "precipitation_flux" ;
                pr:cell_methods = "time:mean(interval: 3 hours)" ;
                pr:missing_value = 1.e+20f ;
                pr:_FillValue = 1.e+20f ;
                pr:actual_range = 0.f, 0.003255121f ;
                pr:add_offset = 0.f ;
                pr:scale_factor = 1.f ;
                pr:coordinates = "lon lat" ;
                pr:grid_mapping = "polar_stereographic" ;
                pr:level_desc = "Surface" ;
                pr:grid_desc = "polar_stereographic" ;
        double time_bnds(time, bnds) ;

// global attributes:
                :Conventions = "CF-1.0" ;
                :institution = "Ouranos (Ouranos, Montreal, PQ, Canada)" ;
                :source =
"CRCM(2006):atmosphere:CRCMv4.2.0(50km,29levels):sea
ice:AMIPII:land:CLASSv2.7" ;
                :project_id = "NARCCAP" ;
                :realization = "1" ;
                :experiment_id = "2038-2070 climate simulation using CGCM3
member #4 (mc_abv experiment)" ;
                :experiment_id2 = "Ouranos operational simulation afs" ;
                :contact1 = "Sebastien Biner" ;
                :contact2 = "biner.sebastien@xxxxxxxxxx" ;
                :contact3 = "550 Sherbrooke Ouest, 19e etage, Montreal, PQ,
H3A 1B9, Canada" ;
                :contact4 = "tel : (514)282.6464 poste 263" ;
                :history = "Tue Feb  3 18:17:22 2009: ncrename -a
conventions,Conventions table2/pr_CRCM_2038010103.nc\n",
                        "Mon Dec 15 16:31:26 2008: ncatted -a
experiment_id,global,m,c,2038-2070 climate simulation using CGCM3 member #4
(mc_abv experiment) 4_NETCDF_FINAUX/pr_CRCM_2038010103.nc\n",
                        "created 24/04/2004 by Ton Nom (netCDF3.6.1
udunits1.12.4)" ;
                :table_id = "Table 2" ;


Then, in order to get a yearly average of that data, I use the cdo function
yearavg, but I add in -r so that the time stays relative, so it looks like
this:
cdo -r yearavg narccap_crcm-20c3m-pr-ncep.nc year_avg_test_no_r.nc
And then when I look at that data using ncdump this is what comes up:

haileye@devel:~/data2/climate/RCM/NARCCAP/test$ ncdump -h
year_avg_test_no_r.nc
netcdf year_avg_test_no_r {
dimensions:
        x = 134 ;
        y = 104 ;
        time = UNLIMITED ; // (26 currently)
variables:
        double lon(y, x) ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:standard_name = "grid_longitude" ;
        double lat(y, x) ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:standard_name = "grid_latitude" ;
        double time(time) ;
                time:units = "hours since 1979-12-31 21:00" ;
        float pr(time, y, x) ;
                pr:long_name = "Precipitation" ;
                pr:standard_name = "precipitation_flux" ;
                pr:units = "kg m-2 s-1" ;
                pr:coordinates = "lon lat" ;
                pr:cell_methods = "time: mean (interval: 3 hours)" ;
                pr:original_name = "RT" ;
                pr:original_units = "mm day-1" ;

// global attributes:
                :CDI = "Climate Data Interface version 1.1.1" ;
                :Conventions = "CF-1.0" ;
                :history = "Thu May 21 11:23:53 2009: cdo -r yearavg
narccap_crcm-20c3m-pr-ncep.nc year_avg_test_no_r.nc\n",
                        "Thu May 21 10:22:55 2009: cdo -r yearavg
20c3m/pr/narccap_crcm/ncep/narccap_crcm-20c3m-pr-ncep.ncyearavg_test/20c3m/pr/narccap_crcm/ncep/
narccap_crcm-20c3m-pr-ncep.nc\n",
                        "Tue May  5 15:19:40 2009: ncrcat
pr_RCM3_1979010103.nc pr_RCM3_1981010103.nc pr_RCM3_1986010103.nc
pr_RCM3_1991010103.nc pr_RCM3_1996010103.nc pr_RCM3_2001010103.nc
narccap_crcm-20c3m-pr-ncep.nc" ;
                :institution = "CCIL, UC Santa Cruz (Climate Change and
Impacts Laboratory, University of California, Santa Cruz, CA, USA)" ;
                :title = "UC Santa Cruz RegCM3 model output prepared for
NARCCAP present-day climate using NCEP/DOE Reanalysis" ;
                :experiment_id = "present-day climate using NCEP/DOE
Reanalysis" ;
                :realization = "1" ;
                :table_id = "Table 2" ;
                :project_id = "NARCCAP" ;
                :nco_openmp_thread_number = 1 ;
                :CDO = "Climate Data Operators version 1.1.1 (
http://www.mpimet.mpg.de/cdo)" ;

So as you can see I've lost lots of information about my file, including the
stereographic projection and information regarding the time dimension.
Does anyone know how to retain this information? Also, if this is the wrong
mailing list, could somebody direct me to the right one that pertains to
questions abuot cdo?

Thanks in advance,
Hailey
  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-hdf archives: