Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Sebastian Ostberg edited this page Jul 21, 2023 · 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.

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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
coordinatesgrid.binbinaryshort[2 bytes]degree[deg*100]yes[43 bytes]2(lon,lat)*67420 grid cells
country codecow_full_2018.binbinaryshort[2 bytes]country IDyes[43 bytes]2(countrycode, regioncode)*67420 grid cellscountry IDs can be found in include/managepar.h (currently 0...235)
land-usecft1700_2005_irrigation_systems_64bands.binbinaryshort[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
(new) soilsoil_new_67420.binbinarychar[1 byte]1-13 (except for 10)no1*67420 grid cellsdefault 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
air temperaturetmp.clmbinaryshort[2 bytes]deg C[*10]yes[38 bytes]12 months*67420 grid cells*nyears
precipitationpre.clmbinaryshort[2 bytes]mm/monthyes[38 bytes]12 months*67420 grid cells*nyears
cloudinesscld.clmbinaryshort[2 bytes]percentyes[38 bytes]12 months*67420 grid cells*nyears
wet dayswet.clmbinaryshort[2 bytes]number of wet daysyes[38 bytes]12 months*67420 grid cells*nyearsimportant for weather generator
long-wave net radiationlwnet_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
short-wave downward radiationswdown_erainterim_1901-2011.clmbinaryshort[2 bytes]W/m2yes [43 bytes]12 months*67420 grid cells*nyearsif running with USE_RADIATION
CO2co2_1901-2007.datasciichar[1 byte]ppmvnonyearsglobal 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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
open freshwater bodieslakes.binbinarychar[1 byte]percentno1[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 surfacedrainage.binbinarylong[4 bytes]cell id, kmyes[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 lengthdrainagestn.binbinarylong[4 bytes]cell id, kmyes[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 areaneighb_irrigation.binbinarylong[4 bytes]cell IDyes[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, lifestockwateruse_1900_2000.binbinaryinteger[4 bytes]m^3/day or l/day[/1000]yes[43 bytes]1[data type]*67420[grid cells]*nyears196.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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
elevationelevation.binbinaryshort[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 worldwidereservoir_info_grand5.bin (for use with STN network) and reservoirs_grand_DDM.bin (for use with DDM network)binaryint[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²,myes[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

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bandscomments
wind speedmwindspeed_1901-2002.clmbinaryinteger [2 bytes]m/h3812wind speed independent of wind direction (adding u and v vector)
diurnal temperature rangedt2007.clmbinaryinteger [2 bytes]deg C[*10]3812to calculate Tmax and Tmin in case they are not directly available, required for fire danger index calculation
number of lightning flashesmlightning.clmbinaryinteger [2 bytes]#/Mio ha3812number of cloud-to-ground flashes
potential number of human-caused fire ignitionshuman_ignition.clmbinaryinteger [2 bytes]#/Mio ha381
population densitypopdens_1901_2003.clmbinaryshort[2 bytes]inhabitants / km2yes[38 bytes]1see /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.

contentexamplary namefile formatdata type[size]data unit[scaled]header[size]number of bands
Sowing dates combined from cell- and country-specific calendarsdate_combined.clmbinaryshort[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 areasdate_maxarea.clmbinaryshort[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.

Clone this wiki locally