Skip to content
Christoph Müller edited this page Oct 10, 2018 · 8 revisions

Input

We don't provide any input data, as these may be subject to license restrictions. So you will have to generate your own input data sets. Here's some information on which are needed and how these look like.

All input data needs to be stored in the same order as the input grid.

Data can be converted to .clm from plain binary input files (BIP) with the binary cru2clm (after make all in /bin) that has been provided with the LPJ distribution (source:trunk/src/utils/cru2clm.c). In case you want to look at *.clm input files:
- use freadheader(…) to read the climate input file header
- data is either stored as “YEARCELL” (band interleaved by pixel) or “CELLYEAR” (a mixture between BIP/BSQ, check in the code of cru2clm.c if you really need to know the format)

Landuse

Each grid cell and year has 64 entries: 16 for rain-fed crops, 16 for irrigated crops with surface irrigation, 16 for sprinkler irrigation, and 16 for drip irrigation.
CFT order is as follows:
1: temperate cereals, 2: rice, 3: maize, 4: tropical cereals, 5: pulses,
6: temperate roots, 7: tropical roots, 8: oil crops sunflower, 9: oil crops soybean,
10: oil crops groundnut, 11: oil crops rapeseed, 12: sugar cane,
13: other crops, 14: pasture/managed grass (C3/C4 mix left to LPJmL to determine)
15: bio-energy grass, 16: bio-energy tree

content examplary name file format data type[size] data unit[scaled] header[size] number of bands comments
coordinates grid.bin binary short[2 bytes] degree[deg*100] yes[43 bytes] 2(lat,lon)*67420 grid cells
country code cow_mg_2006.bin binary short[2 bytes] country ID yes[43 bytes] 2(countrycode, regioncode)*67420 grid cells country IDs can be found in include/managepar.h
land-use cft1700_2005_irrigation_systems_64bands.bin binary short[2 bytes] fraction[*1000] yes[43 bytes] [[Crop functional types ncft]]*4*67420 grid cells*nyears

Please see compilation of land use datasets for more information.

There is a new compilation of country codes for the data set with 67420 grid cells including the land area per grid cells (i.e.excluding water surfaces) described in page grid cell mapping.

Soil

content examplary name file format data type[size] data unit[scaled] header[size] number of bands comments
soil soil.bin binary char[1 byte] 0-9 no 1*67420 grid cells soil parameters can be found in par/soil.par
(new) soil soil_new_67420.bin binary char[1 byte] 1-13 (except for 10) no 1*67420 grid cells new soil input data for latest LPJmL version including new hydrology and permafrost (which currently can be found in ISI-MIP branch), soil parameters can be found in par/soil_new.par

Be aware: The classification in soil.bin differs from the one in soil_new.par!
Entries in soil.bin include 0 (-> skip this grid cell) and the soil classes 1 to 14.
Class definitions in soil_new.par range from 1 to 13.
That means that site specific adjustments of soil characteristics have to look for the class in soil.bin (say this is 4) and change the values in soil_new.par for class x-1 (in the example 3).

Climate

content examplary name file format data type[size] data unit[scaled] header[size] number of bands comments
air temperature tmp.clm binary short[2 bytes] deg C[*10] yes[38 bytes] 12 months*67420 grid cells*nyears
precipitation pre.clm binary short[2 bytes] mm/month yes[38 bytes] 12 months*67420 grid cells*nyears
cloudiness cld.clm binary short[2 bytes] percent yes[38 bytes] 12 months*67420 grid cells*nyears
wet days wet.clm binary short[2 bytes] number of wet days yes[38 bytes] 12 months*67420 grid cells*nyears important for weather generator
CO2 co2_1901-2007.dat ascii char[1 byte] ppmv no nyears global annual mean CO2 concentration

Sorting of the climate data
The sorting of the monthly climate data and of the landuse data does not correspond to a standard file format but is a mixture of BSQ (band sequential) and BIP (band interleaved by pixel). You start with 12 monthly values (or with 32 landuse fractions) of the first year and first grid cell. After that, the first twelve monthly values of the second cell follow and so on. Once you are done with all grid cells, you continue with the first grid cell’s monthly data of the second year. This format is called „cellyear“ in the LPJ vocabulary and is the only format that is supported from LPJ-version 3.2 and above (“YEARCELL” = BIP has been used in previous LPJ-versions).

Source of climate data
Climate Research Unit at the University of East Anglia (CRU)
Global Precipitation Climatology Centre operated by Deutscher Wetterdienst (DWD) under the auspices of the World Meteorological Organization (WMO) (GPCC)

How are the temperature variables related to each other?

CRU FAQ page (http://www.cru.uea.ac.uk/~timm/grid/index-faq.html)

On a daily time-scale:
(1) DTR = Tmax - Tmin
(2) Tmean = Tmin + (DTR/2)

Available historical climate datasets
CRU TS 3.10: Monthly data, spanning 1901-2009. Because of known errors in the precipitation, use with “gpcc_cru09” precipitation and wet-day frequency. ->Currently default in input.conf (Feb. 2015)
CRU TS 3.21: Monthly data, spanning 1901-2012. Also has known precipitation errors in some regions (northern Africa, Middle East). Therefore, combine with “gpcc_v6” precipitation and wet-day frequency.
GSWP3: Daily data, spanning 1901-2010. Uses radiation instead of cloudiness. Preceded by 120 years of spin-up data (1781-1900).
PGFv2: Daily data, spanning 1901-2012. Uses radiation instead of cloudiness. Preceded by 120 years of spin-up data (1781-1900).
WATCH: Daily data, spanning 1901-2001. Uses radiation instead of cloudiness. Preceded by 120 years of spin-up data (1781-1900).
WATCH+WFDEI: Daily data, spanning 1901-2010. Uses radiation instead of cloudiness. Preceded by 120 years of spin-up data (1781-1900). Has a discontinuity at the transition from WATCH to WFDEI (1978-1979).

Available climate projections
Bias-corrected monthly CMIP3 data: Monthly data for 64 SRES/GCM combinations, spanning 1900-2099.
Bias-corrected monthly CMIP5 data: Monthly data for 141 RCP/GCM combinations, spanning 1900-2099.

River-routing

content examplary name file format data type[size] data unit[scaled] header[size] number of bands comments
open freshwater bodies lakes.bin binary char[1 byte] percent no 1[data type]*67420[grid cells] share of area occupied by open freshwater water bodies for each grid cell[but including the Aral Sea
drainage direction on land surface drainage.bin binary long[4 bytes] cell id, km yes[36 bytes] 2[next cell,dist]*4[data type]*67420[grid cells] 1st value: next cell water is routed through, 2nd value: distance between midpoints of the two cells, –1: inland sink or outflow to the ocean, –9: river basins consisting of only 1 cell
STN next drainage cell / river segment length drainagestn.bin binary long[4 bytes] cell id, km yes[43 bytes] 2[next cell,dist]*4[data type]*67420[grid cells] 1st value: next cell water is routed through [C index, starting at 0], 2nd value: distance between midpoints of the two cells, –1: inland sink or outflow to the ocean
neighbor cell with largest upstream area neighb_irrigation.bin binary long[4 bytes] cell ID yes[42 bytes] 4[data type]*67420[grid cells] in case of limited irrigation/river routing: neighbor cell from which additional water could be taken
water consumption for industry, households, lifestock wateruse_1900_2000.bin binary integer[4 bytes] m^3/day or l/day[/1000] yes[43 bytes] 1[data type]*67420[grid cells]*nyears 196.47 km3/yr consumption in 2000, in principle based on Flörke et al. 2013, although they conclude with 161 km3 without livestock,livestock accounts for ca. 27 Km3 (Döll et al 2012)

Reservoirs

content examplary name file format data type[size] data unit[scaled] header[size] number of bands comments
elevation elevation.bin binary short[2 bytes] m[above sea level] yes[40 bytes] 1*2[data type]*67420[grid cells] mean elevation of grid cell
5 grand infos about reservoirs worldwide reservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network) binary int[4 bytes], float[4 bytes], float[4 bytes], int[4 bytes], int[4 bytes], int[4 bytes] year,km³,km²,m yes[35 bytes] 6 [one for each info] for each grid cell: operational year, max.capacity of reservoir, area of reservoir in cell, installed capacity (MW), height, purpose

Spitfire

content examplary name file format data type[size] data unit[scaled] header[size] number of bands comments
wind speed mwindspeed_1901-2002.clm binary integer [2 bytes] m/h 38 12 wind speed independent of wind direction (adding u and v vector)
diurnal temperature range dt2007.clm binary integer [2 bytes] deg C[*10] 38 12 to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashes mlightning.clm binary integer [2 bytes] #/Mio ha 38 12 number of cloud-to-ground flashes
potential number of human-caused fire ignitions human_ignition.clm binary integer [2 bytes] #/Mio ha 38 1
population density popdens_1901_2003.clm binary short[2 bytes] inhabitants / km2 yes[38 bytes] 1 see /data/biosx/LPJ/input_new/README_popdens.txt

Sowing dates

Instead of calculating sowing dates automatically following certain Sowing_dates rules, one can also prescribe sowing dates from the global crop calendar MIRCA2000. This calendar is available in 30-min resolution and aggregated for individual countries. Also several growing periods exists for some crops.

content examplary name file format data type[size] data unit[scaled] header[size] number of bands
Sowing dates combined from cell- and country-specific calendar sdate_combined.clm binary short[2 bytes] day of year[1-365] yes[38 bytes] see /data/biosx/LPJ/input_new/README_prescribed sowing dates
Sowing dates for growing period with maximum crop area sdate_maxarea.clm binary short[2 bytes] day of year[1-365] yes[38 bytes] see /data/biosx/LPJ/input_new/README_prescribed sowing dates

New Input files

If you need to read new input files, you need to change the code and conf files in several places. For a general overview, see [[adding new input files|here]].

HAPPI Input Data Conversion

Clone this wiki locally