input - PIK-LPJmL/LPJmL GitHub Wiki

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.

The LandInG toolbox (https://github.com/PIK-LPJmL/LandInG) can be used to generate all basic inputs required to run LPJmL except for climate inputs.

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). The “YEARCELL” format is no longer supported by the current version.

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(lon,lat)*67420 grid cells
country code cow_full_2018.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 (currently 0...235)
land-use cft1700_2005_irrigation_systems_64bands.bin binary short[2 bytes] fraction[*1000] yes[43 bytes] crop functional types *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
(new) soil soil_new_67420.bin binary char[1 byte] 1-13 (except for 10) no 1*67420 grid cells default soil input data since LPJmL version 4, soil parameters can be found in par/soil.par

Class definitions in soil.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.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
long-wave net radiation lwnet_erainterim_1901-2011.clm binary short[2 bytes] W/m2 yes [43 bytes] 12 months*67420 grid cells*nyears if running with USE_RADIATION
short-wave downward radiation swdown_erainterim_1901-2011.clm binary short[2 bytes] W/m2 yes [43 bytes] 12 months*67420 grid cells*nyears if running with USE_RADIATION
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)

Other historical climate datasets

The Intersectoral Impact Model Intercomparison Project provides a number of historical re-analysis datasets which can also be used with LPJmL:

GSWP3: Daily data, spanning 1901-2010. Uses radiation instead of cloudiness.

PGFv2: Daily data, spanning 1901-2012. Uses radiation instead of cloudiness.

WATCH: Daily data, spanning 1901-2001. Uses radiation instead of cloudiness.

WATCH+WFDEI: Daily data, spanning 1901-2010. Uses radiation instead of cloudiness. Has a discontinuity at the transition from WATCH to WFDEI (1978-1979).

Available climate projections

The Intersectoral Impact Model Intercomparison Project also provides a number of bias-adjusted GCM projections from CMIP5.

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], int[4 bytes], int[4 bytes], int[4 bytes], int[4 bytes] year,km³,km²,m yes[35 bytes] 10 [one for each info] for each grid cell: operational year, max.capacity of reservoir, area of reservoir in cell, installed capacity (MW), height, main purpose, secondary purpose (there are 5 bands reserved for purpose although only the first two are currently used with the rest empty)

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.

⚠️ **GitHub.com Fallback** ⚠️