[ncl-talk] some issue with netCDF writing

Beáta Szabó-Takács szabo.b at czechglobe.cz
Thu Aug 31 05:24:05 MDT 2017


Dear NCL Users,
I have also a problem with netCDF writing. I calculated the Hargreaves reference evapotranspiration in each year from 1981 to 2000 and wrote out the results into a netCDF file. I attached my script. The created netCDF file is correct according to ncdump -h:
ncdump -h evtH_31.nc
netcdf evtH_31 {
dimensions:
        time = 364 ;
        rlat = 412 ;
        rlon = 424 ;
        vertices = 4 ;
        bnds = 2 ;
variables:
        float evtH(time, rlat, rlon) ;
                evtH:_FillValue = 1.e+20f ;
                evtH:long_name = "reference evapotranspiration: Hargreaves " ;
                evtH:units = "mm/day" ;
                evtH:url = "http://www.fao.org/docrep/X0490E/x0490e07.htm" ;
                evtH:info = "FAO 56; EQN 52; refevt_hargreaves_fao56" ;
        float lat(rlat, rlon) ;
                lat:standard_name = "latitude" ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:_CoordinateAxisType = "Lat" ;
                lat:bounds = "lat_bnds" ;
        double rlat(rlat) ;
                rlat:standard_name = "grid_latitude" ;
                rlat:long_name = "latitude in rotated pole grid" ;
                rlat:units = "degrees" ;
                rlat:axis = "Y" ;
        double rlon(rlon) ;
                rlon:standard_name = "grid_longitude" ;
                rlon:long_name = "longitude in rotated pole grid" ;
                rlon:units = "degrees" ;
                rlon:axis = "X" ;
        float lat_bnds(rlat, rlon, vertices) ;
        float lon(rlat, rlon) ;
                lon:standard_name = "longitude" ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:_CoordinateAxisType = "Lon" ;
                lon:bounds = "lon_bnds" ;
        float lon_bnds(rlat, rlon, vertices) ;
        int rotated_latitude_longitude ;
                rotated_latitude_longitude:grid_mapping_name = "rotated_latitude_longitude" ;
                rotated_latitude_longitude:grid_north_pole_latitude = 39.25 ;
                rotated_latitude_longitude:grid_north_pole_longitude = -162. ;
                rotated_latitude_longitude:north_pole_grid_longitude = 0. ;
        double time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:bounds = "time_bnds" ;
                time:units = "days since 1949-12-1 00:00:00" ;
                time:calendar = "proleptic_gregorian" ;
                time:axis = "T" ;
        double time_bnds(time, bnds) ;
}
But when I use this netCDF file in Panoply I get the following error:
There was an error preparing the data: Could not find pole attributes.
Moreover, when I merged the created evtH.nc files in CDO with mergetime operator and calculated the yearly sum the longitude and latitude dimeansiones disappeared.
ncdump -h PET_ys.nc
netcdf PET_ys {
dimensions:
        rlon = 424 ;
        rlat = 412 ;
        time = UNLIMITED ; // (20 currently)
        bnds = 2 ;
variables:
        double rlon(rlon) ;
                rlon:standard_name = "longitude" ;
                rlon:long_name = "longitude" ;
                rlon:units = "degrees_east" ;
                rlon:axis = "X" ;
        double rlat(rlat) ;
                rlat:standard_name = "latitude" ;
                rlat:long_name = "latitude" ;
                rlat:units = "degrees_north" ;
                rlat:axis = "Y" ;
        double time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:bounds = "time_bnds" ;
                time:units = "days since 1949-12-1 00:00:00" ;
                time:calendar = "proleptic_gregorian" ;
                time:axis = "T" ;
        double time_bnds(time, bnds) ;
        float evtH(time, rlat, rlon) ;
                evtH:long_name = "reference evapotranspiration: Hargreaves " ;
                evtH:units = "mm/day" ;
                evtH:_FillValue = 1.e+20f ;
                evtH:missing_value = 1.e+20f ;
                evtH:url = "http://www.fao.org/docrep/X0490E/x0490e07.htm" ;
                evtH:info = "FAO 56; EQN 52; refevt_hargreaves_fao56" ;

// global attributes:
                :CDI = "Climate Data Interface version 1.8.2 (http://mpimet.mpg.de/cdi)" ;
                :Conventions = "CF-1.6" ;
                :history = "Wed Aug 30 08:00:03 2017: cdo yearsum PET_80-00.nc PET_ys.nc\n",
                        "Wed Aug 30 07:56:15 2017: cdo mergetime evtH_11.nc evtH_12.nc evtH_13.nc evtH_14.nc evtH_15.nc evtH_16.nc evtH_17.nc evtH_18.nc evtH_19.nc evtH_20.nc evtH_21.nc evtH_22.nc evtH_23.nc evtH_24.nc evtH_25.nc evtH_26.nc evtH_27.nc evtH_28.nc evtH_29.nc evtH_30.nc PET_80-00.nc" ;
                :frequency = "year" ;
                :CDO = "Climate Data Operators version 1.8.2 (http://mpimet.mpg.de/cdo)" ;
}

I do not understand why.
Can someone write me what I did wrong?
Thank you for your help in advance!
Best regards,
Beáta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170831/85c9e8ad/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex_regrid_PET.ncl
Type: application/octet-stream
Size: 5401 bytes
Desc: ex_regrid_PET.ncl
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170831/85c9e8ad/attachment.obj>


More information about the ncl-talk mailing list