# Changes¶

## PCRaster 4.3.0¶

The most relevant updates for users:

• PCRaster is available on conda-forge and can be installed using conda. Supported platforms are Linux, macOS and Windows. Supported Python versions are 3.6 and 3.7.
• We no longer provide support for Python 2.
• We fixed a bug occurring when pickling PCRaster maps. Note that PCRaster maps pickled with previous versions cannot be opened with this version.
• We fixed an incorrect return value while using a nonspatial condition in ifthen.
• We fixed several minor inconsistencies in the multicore module.
• We added the Python functions cellvalue_by_coordinates, cellvalue_by_index, cellvalue_by_indices and version_tuple.
• We added a plot function to create basic plots of PCRaster maps in case the matplotlib module is installed.
• On Windows, mapattr and legend show the menu again.
• We fixed the incorrect rendering of directional rasters in Aguila.
• PCRaster Modflow now supports the GHB package.
• PCRaster Modflow BCF package received an optional flag to directly pass hcond and vcond values to Modflow.
• Command line applications now show version numbers instead of a build date.
• The exit value of applications only showing the usage information changed from 1 (EXIT_FAILURE) to 0 (EXIT_SUCCESS).

Aguila was refactored to simplify the build process. The functionality remains the same. In case you experience any differences to previous Aguila versions consider it as a defect and please report it at our issues page.

We further improved the code quality and the build system to ensure an ongoing creation of PCRaster packages, amongst others:

• Simplified building against multiple Python 3 versions (3.6, 3.7, 3.8)
• Replacing Boost.Python with Pybind11
• Replacing Qwt with QtCharts
• Modernising C++ code. C11 and C++17 are now the default standards when compiling PCRaster.
• Various improvements to support gcc-9, clang-7, Visual Studio 2017 and Python 3.8
• Reducing amount of dependencies
• You can now set a path to specify the install directory of the Python files. You can enable this with -DPCRASTER_PYTHON_INSTALL_DIR=<path>, default is python.
• We added configure options to include or exclude certain parts of the PCRaster software. You can, for example, disable building Aguila with -DPCRASTER_BUILD_AGUILA=OFF.
• Specifically for Linux:
• RPATH settings fixed for Python modules
• Shared libraries now receive version numbers and sonames
• The build type ‘Release’ now sets flags -march=native -mtune=native by default. You can disable this with -DPCRASTER_WITH_FLAGS_NATIVE=OFF.
• Interprocedural optimisation can be used in case supported by the compiler. You can enable this with -DPCRASTER_WITH_FLAGS_IPO=ON.

PCRaster 4.3 is known to build with gcc (versions 7 to 10), clang (version 6 to 9) or msvc (2015 and 2017). We recommend to no longer use gcc version 5 or 6 for building PCRaster.

For a more detailed list of solved issues see our 4.3 milestone.

## PCRaster 4.2.1¶

This is a bug fix release for 4.2. We fixed a memory leak in pcr2numpy and improved the error reporting at module import (#233, #232).

## PCRaster 4.2.0¶

The most relevant updates for users:

• Python 3 is now the default version on Windows
• The multicore module was added to PCRaster Python
• On Windows, files larger than 2GB can be processed now
• Handling of non-spatials and pcr2numpy was fixed in the PCRaster Python module
• PCRaster Modflow now uses Modflow 2005
• The documentation pages of PCRaster projects were unified into a single manual

We also took measures to improve the code quality and the build system to ensure an ongoing creation of PCRaster packages, amongst others:

• Porting from Qt4 to Qt5
• Updating various dependencies (external libraries)
• Reducing amount of dependencies
• Building against dependencies installed by a package manager
• Removing obsolete scripts and configuration files
• Modernising CMake scripts
• Modernising C and C++ code towards C11 and C++11
• Various fixes raised by compiler warnings
• Various improvements to support Visual Studio 2015
• Various improvements to support clang and macOS

## PCRaster 4.1.0¶

• On Windows, shared libraries are now installed in a seperate directory called lib, just like on the other platforms. The path to this directory does not have to be listed in the \$PATH environment variable. This has the advantage that the shared libraries shipped with PCRaster will never conflict with shared libraries shipped with other software, and visa versa.

### Aguila¶

It is now possible again to select a specific column from a timeseries file, like it used to (Ticket #635)

### PCRaster Python package¶

• PCRaster data types can now be serialized by the pickle module (Ticket #593). See also the pickle Python module. More about this in a future release.

### GDAL¶

• The submitted patches for the GDAL PCRaster driver support the dynamic creation of PCRaster maps (Ticket #664) and contain some updates (Ticket #679). We expect the functionality to be integrated in one of the next official GDAL releases.

## PCRaster 4.0.2¶

This release improves the reliability of PCRaster applications relating to large data sets, includes functional enhancements for the Modflow extension, and fixes several bugs.

### PCRaster model engine¶

• An erroneous check was replaced to allow for processing maps with more than 2^31 - 1 cells on 64bit systems (Ticket #648)

### col2map¶

• We fixed the incorrect allocation of cells when using maps with more than 2^31 - 1 cells (Ticket #661)
• We fixed the incorrect printout of cells with more than one record (Ticket #660)

### Modflow extension¶

• Added functions to obtain cell-by-cell values for storage, constant heads, and front/right/lower flow face (Ticket #643)
• Fixed incorrect reporting of the Python getRiverLeakage (Ticket #663)
• Fixed activation of well package for time steps > 1 (Ticket #658)
• Fixed setting of rewetting thresholds for top layer type laycon 1 (Ticket #657)
• Fixed uѕage of reserved unit numbers for Modflow input files (Ticket #662)
• Maps now can be reported at time steps where Modflow fails to converge (Ticket #669)
• Minor performance improvements reducing the memory and I/O load

### Aguila¶

• We fixed the incorrect colour assignment of 2D directional data types (Ticket #670)
• We fixed the incorrect colour assignment of 3D directional and scalar data types (Ticket #641)

## PCRaster 4.0.1¶

This is a bug fix release for 4.0.

### Global options chezy and manning for dynwavestate, dynwaveflux, dynamicwave (pcrcalc, PCRaster Python package)¶

We discovered a documentation error for the operations dynwavestate, dynwaveflux and dynamicwave. The manual stated that the Chezy algorithm was the default algorithm to calculate the dynamic flow equation. In fact, it was calculated by the Manning algorithm by default.

If you did not use any global option, your results were calculated by the Manning equation. From now on, without specifying global options, results will be calculated by the Manning equation as well.

If you used either chezy or manning as global option, the corresponding algorithms were used. This behaviour remains unchanged.

To obtain values calculated with the Chezy algorithm, you now need to specify explicitly either --chezy on the command line, #! --chezy in PCRcalc scripts, or setglobaloption("chezy") in Python scripts.

### dynamicwave (pcrcalc, PCRaster Python package)¶

We discovered and fixed a bug in the dynamicwave operation while using the Manning algorithm (Ticket #609). As the Manning algorithm was used as default (see the remarks above) it is expected that your model results will change.

### Aguila¶

• Fixed ‘#624 cannot open .tss files in PCRASTER 4 aguila version’ (Ticket #624)

### PCRaster Python package¶

• Fixed a wrong number of arguments in the base class for dynamic models (Ticket #603)

### resample¶

• Fixed a regression that caused the generation of MV in all cells while using the crop option (Ticket #485)

### Documentation¶

• The manual pages include updates for the mapattr application and the lookupstate and lookuppotential operations (Ticket #613, Ticket #601)

### Developer information¶

• Ported machine_status.py to newer apt_pkg, updated list of required applications for compiling PCRaster (Ticket #610)

## PCRaster 4.0.0¶

### General¶

• Changed the license of all PCRaster source code to the GPLv3 open source license. Moved all sourcecode to the PCRaster Open Source Tools site at SourceForge.
• The installation process of PCRaster has been simplified. On all platforms we distribute a zip file which can be unzipped at a preferred location. After setting two environment variables, PCRaster is ready to be used. The goal is to make it possible to install multiple versions of PCRaster at the same time. This has the advantage that older models can still be run with older installed versions of PCRaster. And it allows us to keep improving PCRaster, even if we break backwards compatibility (we prefer not to, but sometimes there is a good reason).
• Removed support for reading HDF4 formatted rasters. Maintaining support for this format proved to be too much of a hassle.

### pcrcalc¶

• Removed support for encrypting models.
• Removed support for license specific functionality (like missing value compression). All features that used to require a commercial license are available for everybody now.

### resample¶

• Fixed the spurious creation of adjacent raster cells while using resample as cookie cutter (Ticket #463)

### PCRaster Python package¶

• Updated the code to allow the garbage collector to reclaim memory used by some of the framework class instanceѕ, after the last reference goes out of scope.
• Updated the code to prevent that the memory used by the PCRaster Python extension increases during a model run.
• PCRaster Python package now depends on Python 2.7.
• PCRaster Python package uses lower case names for package names. Update all PCRaster related imports and change them to lower case. See also the Style Guide for Python Code.
• Removed pcraster.numpy sub-package. Numpy functionality is merged in the pcraster main package and available without an explicit import of the numpy sub-package. Remove any import of pcraster.numpy and rename any calls of pcraster.numpy.pcr2numpy and pcraster.numpy.numpy2pcr to pcraster.pcr2numpy and pcraster.numpy2pcr.
• Removed pcr2numarray and numarray2pcr which were already deprecated. Use pcr2numpy and numpy2pcr.
• Reimplemented numpy2pcr. It is faster now.
• Added a setclone overload taking nrRows, nrCols, cellSize, west, north. No need to pass the name of an existing raster anymore.

### MODFLOW extension¶

• Fixed a crash.
• Renamed extension from PCRasterModflow to pcraster_modflow.