1

Is there a way to obtain a netcdf file of the Koeppen-Geiger Climatic Zones?

2
  • Does it have to be NetCDF, or could some other open format work, that you could easily convert to NetCDF yourself?
    – gerrit
    Commented Oct 6, 2023 at 9:39
  • thanks. the final file needs to be netcdf. how I get there is not of importance..
    – aaaaa
    Commented Oct 6, 2023 at 13:26

1 Answer 1

0

The Köppen-Geiger climate classification at a high 1‑km resolution for historical and future climate conditions (1901–2099) presented in Beck et al. (2018) can be downloaded in GTIFF format from the following URL: https://www.gloh2o.org/koppen/

Choosing your favourite framework, you can now easily convert this into netCDF format. Using e.g. the {terra} package (wrapping GDAL) in R, it's as easy as that:

library(terra)
#> terra 1.7.71

# read as SpatRaster object
r <- rast("koppen_geiger_0p00833333.tif")
r
#> class       : SpatRaster 
#> dimensions  : 21600, 43200, 1  (nrow, ncol, nlyr)
#> resolution  : 0.008333333, 0.008333333  (x, y)
#> extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
#> coord. ref. : lon/lat WGS 84 (EPSG:4326) 
#> source      : koppen_geiger_0p00833333.tif 
#> color table : 1 
#> name        : koppen_geiger_0p00833333

# dump to disk in netCDF format
writeRaster(r, "koppen_geiger_0p00833333.nc", wopt = list(datatype="INT1U"))

Or you can use GDAL directly if you like:

gdal_translate -of netCDF koppen_geiger_0p00833333.tif koppen_geiger_0p00833333.nc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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