- author: Sebastian Ostberg (ostberg@pik-potsdam.de)
- Changelog
LandInG_setupenvironment, defined in new filelanding_setup.Rearthradiusandsingle.eps(single precision floating point epsilon) set inLandInG_setupLandInG_versionset inVERSION- R_env_PIK.sh, a bash script that sets up the software environment on the PIK 2024 high-performance cluster
- Use utility functions from
lpjmlkitpackage to work with LPJmL file format. - Deprecated/orphaned R packages
raster,rgdalandudunits2replaced byterraandunits. - Functions from R packages called explicitly
package::function()for better transparency and easier future updates.
- Support bash scripts specific to the PIK 2015 high-performance cluster
lpjml_format_helper_functions.R(replaced bylanding_setup.R&lpjmlkit)
- Fixed
download_and_resample_etopo.shto work with newer versions of GMT and with new PIK high-performance cluster
- PIK-specific bash script
r_modules.sh
- Variables set in
fertilizer_setup.Rare saved inLandInG_setupenvironment - All scripts that depend on
fertilizer_setup.RuseLandInG_setup - Replaced
raster::modalwithcollapse::fmodebecauseterra::modaldoes not provide equivalent functionality - Script
helper/raster_helpers.Rrenamed tohelper/terra_helpers.R - Messages regarding unsuccessful file downloads in
download_fertilizer_pattern.Rredirected from stdout to stderr - Aggregation function for admin patterns changed from
modal_ties_lowesttomodal_ties_firstingapfill_fertilizer_pattern.R - Name of variable in GADM administrative units mask set in
fertilizer_setup.Rinstead of hardcoding
- SLURM submission scripts
cft_input_timeseries_SLURM.sh,combine_fertilizer_pattern_trend_national_SLURM.sh,gapfill_fertilizer_pattern_SLURM.sandgapfill_fertilizer_trend_SLURM.shupdated to PIK 2024 high-performance cluster - Short sleep periods added in
download_fertilizer_pattern.Rto avoid triggering rate limit on Zenodo server doParallelcluster setup fixed incombine_fertilizer_pattern_trend_national.R,gapfill_fertilizer_pattern.Randgapfill_fertilizer_trend.R- Aggregation factor and aggregation function corrected in
gapfill_pattern.R,load_hyde_area.R,match_admin_to_data.Randprocess_manure.R - Correctly determine whether to flip data in
process_manure.R - Use correct variable
cft_nutinstead ofnutincft_input_timeseries.R
- PIK-specific bash script
r_modules.sh
- Option to generate country code input without region band, as used in newer LPJmL versions
- Helper function
download_gadm()to automatically download GADM data from the official server. GADM version specified asgadm_data_versioningadm_setup.R. - SLURM submission scripts
1_map_admin_to_grid_proparation_SLURM.shand3_map_admin_to_grid_collection_SLURM.sh - Consistency checks between step 1, 2 and 3 regarding intermediate shapefiles:
files in
split_directoryandintersect_directoryand shapes loaded intocell_list_RDatashould match.
- Variables set in
gadm_setup.Rare saved inLandInG_setupenvironment - All scripts that depend on
gadm_setup.RuseLandInG_setup - Merged functionality of step 1-3 with step 4-6, making use of faster shape intersection in previous step 5; file names updated
- Split shape intersection into smaller chunks to reduce memory requirement for high-resolution grids in step 2
- Updated SLURM settings in
2_map_admin_to_grid_intersection_SLURM.sh - Instead of simply aborting script run if output files exist in
3_map_admin_to_grid_collection.Rexisting files are checked whether they match current script run - Some performance updates in helper functions
gadm_helper.R. - Function
load_gadm()expanded to support additional GADM versions, callsdownload_gadm()if data are not found ingadm_dir. gadm_data_versionincluded in filenames of generated files.README.mdexpanded with warning about use of "s2" in "sf" package.- Load
lpjgrid_shapeon every task only in case of MPI parallelization in2_map_admin_to_grid_intersection.R, otherwise load only once.
- Multple bugs related to using spherical geometry with package
sf - Handle different GADM versions using different naming for country name column
- Coverage check in
2_map_admin_to_grid_intersection.R - Default setting for "s2" usage in "sf" set to
FALSEand correctly exported to worker tasks2_map_admin_to_grid_intersection.R
- PIK-specific bash script
r_with_spatial_libs.sh - Previous steps 4-6 scripts because functionality is merged with steps 1-3
- Settings in
gadm_setup.Rno longer required due to merging of steps
- Require
lwgeompackage only if functionality not included insfpackage inlakes_rivers_polygonbased.R - Update SLURM submission scripts
lakes_rivers_fraction_SLURM.shandlakes_rivers_polygonbased_SLURM.shto PIK 2024 high-performance cluster - Expand
README.mdwith note that only version 1 of GLWD is supported - Set default to
sf_use_s2(FALSE)forsfpackage inlakes_rivers_polygonbased.Rand export to worker tasks
- Use correct lat/lon in aggregation factor in
lakes_rivers_fraction.R
- PIK-specific bash script
r_modules.sh
- new helper functions in
helper/add_version_string.R,helper/load_ha_fraction.R,helper/terra_helpers.Randhelper/update_country_data.R - script to process GAEZ version 4
multi_cropping_suitability_GAEZ_v4.R, new corresponding variables inlanduse_setup.R GAEZ/README.mdexpanded with information on GAEZ version 4- SLURM submission script
split_global_harvested_areas_into_rainfed_irrigated_SLURM.shto account for additional software requirements of the corresponding R script
- Variables set in
landuse_setup.Rare saved inLandInG_setupenvironment. - All scripts that depend on
landuse_setup.RuseLandInG_setup. - Some variable names shortened to improve code formatting (e.g.
mon_*instead ofmonfreda_*). - Replaced
raster::modalwithcollapse::fmodebecauseterra::modaldoes not provide equivalent functionality. - Script
read_AQUASTAT.Rrenamed toread_AQUASTAT_legacy.Rbecause it does not work for current AQUASTAT downloads. - Script
helper/raster_helpers.Rrenamed tohelper/terra_helpers.R. - When reloading data prepared by a different script LandInG version is checked for compatibility and attempts are made to make data from version 1.0.0 compatible.
- Updated MIRCA2000 download link
MIRCA2000/README.md - Updated HYDE website link in
HYDE/README.md - SLURM submission scripts
aggregate_cft_timeseries_SLURM.sh,cft_input_timeseries_SLURM.sh,harvested_area_timeseries_SLURM.shandharvested_fraction_SLURM.shupdated to PIK 2024 high-performance cluster - SLURM submission scripts
HYDE/step2_hyde_convert_SLURM.shandHYDE/step3_hyde_interpol_merge_SLURM.shupdated to PIK 2024 high-performance cluster
- Explicit treatment of time dimension in data using
mon_refyear(code previously accounted for time dimension in some places while simply assuming a single year in others). Note: Interpolation between multiple patterns still not implemented. - Use correct source pattern (for crops aggregated across multiple sources) in
gap-filling of Monfreda patterns (
harvested_fraction.R) - Aggregation factor and aggregation function corrected in
create_hyde_timeseries_max.R,get_crop_monfreda.R,harvested_area_timeseries.R,harvested_fraction.R,load_hyde_area.Randsplit_global_harvested_areas_into_rainfed_irrigated.R HYDE/step2_hyde_convert.shfixed for newer CDO versions which fail for ASCII grids with header lines and to correctly detectVARfor both "lu" and "pop" files from HYDE
- PIK-specific bash script
r_modules.sh
- Resolution of reservoir polygons and country maps reduced in diagnostic plots to reduce file size of PDF.
- Datatype in header of generated reservoir input file corrected
- Sequence of
st_make_validandst_simplifyswapped to avoid problems inst_simplifycaused by invalid geometry
- PIK-specific bash script
r_modules.sh
river_routing_setup.R, which contains all settings previously located inriver_routing.Randneighbour_irrigation.R, usesLandInG_setupenvironment
- Some refactoring moving duplicated data processing code into
river_routing_setup.R. - SLURM job ID added to log file names of parallel tasks to prevent several jobs running in parallel from overwriting the files of other jobs
- SLURM submission script
neighbour_irrigation_SLURM.shandcreate_river_routing_input.shupdated to PIK 2024 high-performance cluster doParallelcluster setup inneighbour_irrigation.R
- PIK-specific bash script
r_modules.sh
- Error in gapfilling of missing soil data if search window crossed the dateline
- Error in detection whether target resolution is an integer multiple of source resolution
- Incorrect data type used for soil pH file if soil type and soil pH use different header version
- SLURM submission script
aggregate_soils_SLURM.shupdated to PIK 2024 high-performance cluster doParallelcluster setup inaggregate_soils.R- Download link for HWSD data in
README.md
- PIK-specific bash script
r_modules.sh
Initial release