I want to analyze climate projection data for the different RCPs for a region in north western India, which has an arid climate. I chose MPI-ESM data downscaled with CORDEX. An example filename looks like this:


However, while all other variables like temperature, windspeed, relative humidity are on the right, scale, the precipitation is completely off. The unit in the precipitation nc files is specified as kg m-2 s-1, which would equal a precipitation height of mm s-1.

Since I have monthly data, multiplying the precipitation value with 86400 should get me to days, multiplying that with 30.42 should get me to months. If I now select a random year and do a cell-wise summation, I should get the total annual precipitation.

The results are off by an order of magnitude. Here's a histogram of the cells showing total annual precipitation in mm for the EAS44 domain:

per-cell precipitation histogram of total annual precipitation in mm

I read the data into a rasterbrick in R, which gave me the warning,

Warning messages:
1: In .getCRSfromGridMap4(atts) : cannot process these parts of the CRS:
grid_north_pole_latitude=77.6100006103516; grid_north_pole_longitude=-64.7799987792969
2: In .getCRSfromGridMap4(atts) : cannot create a valid CRS
grid_north_pole_latitude=77.6100006103516; grid_north_pole_longitude=-64.7799987792969

... since it is on a curvilinear grid. I then subsetted the first twelve elements and calculated the values. I somewhere read about scale factors and offsets in nc files, however, in my case I couldn't find a hint on something like that.

EDIT: the header of the nc file:

$ ncdump pr_EAS-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_CLMcom-CCLM5-0-2_v1_mon_208101-209012.nc
netcdf pr_EAS-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_CLMcom-CCLM5-0-2_v1_mon_208101-209012 {
    bnds = 2 ;
    rlon = 203 ;
    rlat = 167 ;
    time = UNLIMITED ; // (120 currently)
    char rotated_pole ;
        rotated_pole:grid_mapping_name = "rotated_latitude_longitude" ;
        rotated_pole:grid_north_pole_latitude = 77.61f ;
        rotated_pole:grid_north_pole_longitude = -64.78f ;
    double rlon(rlon) ;
        rlon:axis = "X" ;
        rlon:standard_name = "grid_longitude" ;
        rlon:long_name = "longitude in rotated pole grid" ;
        rlon:units = "degrees" ;
    double lon(rlat, rlon) ;
        lon:standard_name = "longitude" ;
        lon:long_name = "longitude" ;
        lon:units = "degrees_east" ;
    double rlat(rlat) ;
        rlat:axis = "Y" ;
        rlat:standard_name = "grid_latitude" ;
        rlat:long_name = "latitude in rotated grid" ;
        rlat:units = "degrees" ;
    double lat(rlat, rlon) ;
        lat:standard_name = "latitude" ;
        lat:long_name = "latitude" ;
        lat:units = "degrees_north" ;
    double time(time) ;
        time:units = "days since 1949-12-01 00:00:00" ;
        time:standard_name = "time" ;
        time:long_name = "time" ;
        time:calendar = "proleptic_gregorian" ;
        time:bounds = "time_bnds" ;
    double time_bnds(time, bnds) ;
        time_bnds:long_name = "time bounds" ;
    float pr(time, rlat, rlon) ;
        pr:standard_name = "precipitation_flux" ;
        pr:long_name = "Precipitation" ;
        pr:units = "kg m-2 s-1" ;
        pr:cell_methods = "time: mean" ;
        pr:coordinates = "lon lat" ;
        pr:grid_mapping = "rotated_pole" ;
        pr:missing_value = 1.e+20f ;
        pr:_FillValue = 1.e+20f ;

// global attributes:
        :Conventions = "CF-1.4" ;
        :conventionsURL = "http://www.cfconventions.org" ;
        :creation_date = "2017-09-07T11:34:35" ;
        :contact = "http://coastmod.hzg.de" ;
        :experiment_id = "rcp45" ;
        :driving_model_id = "MPI-M-MPI-ESM-LR" ;
        :driving_model_ensemble_member = "r1i1p1" ;
        :driving_experiment_name = "rcp45" ;
        :frequency = "mon" ;
        :institute_id = "CLMcom" ;
        :rcm_version_id = "v1" ;
        :model_id = "CLMcom-CCLM5-0-2" ;
        :project_id = "CORDEX" ;
        :CORDEX_domain = "EAS-44" ;
        :product = "output" ;
        :experiment = "rcp45" ;
        :driving_experiment = "MPI-M-MPI-ESM-LR, rcp45, r1i1p1" ;
        :Institution = "Helmholtz-Zentrum Geesthacht" ;
        :references = "http://cordex.clm-community.eu" ;
        :institution_run_id = "r15m4r4" ;
        :institution_data_path = "/hpss/arch/gg0302/g260068/CORDEX-EA/r15m4r4" ;
        :source = "Climate Limited-area Modelling Community (CLM-Community)" ;
        :title = "CLMcom-CCLM5-0-2 model output prepared for CORDEX rcp45" ;
        :comment = "Please use the following reference for this climate data: Climate projection performed by Helmholtz-Zentrum Geesthacht in the Climate Limited-area Modelling Community (CLM-Community)" ;

This is the R code I used for generating the data in the plot:


raster_brick <- brick('original_data/pr_EAS-44_MPI-M-MPI-ESM-LR_rcp45_r1i1p1_CLMcom-CCLM5-0-2_v1_mon_205101-206012.nc')*86400*30.42
# map the first twelve raster into a list of rasters and merge them into a new rasterbrick
first_year_rasters <- 1:12 %>% map(~ raster_brick[[.]]) %>% brick
# cell-wise sum
sum_raster <- sum(first_year_rasters)

EDIT: Here are two screenshots of ncview of monthly data for 2053

enter image description here

enter image description here

The unit clearly is stated as kg per square meter and second. The datapoint for July 2053 is at about 0.00375 kg m-2 -s1, that equals a monthly precipitation of 0.00375*86400*30.42 = 9.9 meters ...

Here's a screenshot from the 2006-2100 monthly precipitation values from RCP4.5, CMIP5, MPI-ESM-MR model. I used the cdo operator -yearsum on it, so these should correspond to the annual precipitation in kg m-2 s-1. Multiplied with 86400*30.42 I still arrive at the order of magnitude of several meters.

enter image description here

  • $\begingroup$ Given that you have a 10 year file, are you sure you're not accidentally summing over the whole 10 years rather than just 12 months? It also might be worth showing us the ncdump header for the pr variable. $\endgroup$ – Deditos Feb 6 '18 at 10:13
  • 1
    $\begingroup$ I am not familiar with these R-packages. Therefore, I cannot give a comment to the data processes. But, if you look into the file with ncview (or something else), is the precipitation also in the wrong order of magnitude? $\endgroup$ – daniel.neumann Feb 6 '18 at 14:12
  • $\begingroup$ Can't help with the R code either. Does it work for other CORDEX models? It's also worth checking whether you are out by a factor of 10 or ~30, as the latter might indicate that the netCDF files weren't produced correctly, e.g., daily rates summed but not divided by N days. $\endgroup$ – Deditos Feb 6 '18 at 17:27
  • 1
    $\begingroup$ Looking at the global attributes I realized that I might know the producer of the data. I'll try to contact him. $\endgroup$ – daniel.neumann Feb 7 '18 at 17:05
  • $\begingroup$ The values have to be divided by 24. It is a known issue. For details please have a look here: wiki.coast.hzg.de/display/MD . The URL coastmod.hzg.de (see global attributes of the netCDF file) should point to the first URL. The redirect is (apparently) not working in the moment due to a server error. $\endgroup$ – daniel.neumann Feb 9 '18 at 9:42


The precipitation values (and possibly some other variables; see below) need to be divided by 24.


The global attributes of the netCDF file in the question provide an URL to a description page: coastmod.hzg.de

From that URL a user should be redirected to wiki.coast.hzg.de/display/MD (access at 9th Feb 2018). Unfortunately, the redirect does not work in the moment due to an internal server error (status: February 2018).

On wiki.coast.hzg.de/display/MD a comment is provided for the CORDEX-EastAsia data set -- reading:

pr (precipitation rate)

Due to a post processing error all precipitation rates have to be divided by a factor of 24 to get the right dimension kg m-2 s-1.

The following parameters may also be affected: evspsbl,mrro,mrros, prc, prhmax, prsn, snm


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.