With the changes in the dev branch, it's not possible anymore to provide PISM with a constant threshold for thickness calving.
To Reproduce
Running PISM with the command line argument pismr -i ../input/pism_equi_input.nc ... -calving eigen_calving,thickness_calving -thickness_calving_threshold 75.0 ... fails with the following error message, instead of taking the provided threshold:
* Initializing the 'calving at a threshold thickness' mechanism...
- Option calving.thickness_calving.file is not set. Trying the input file '../input/pism_equi_input.nc'...
Reading thickness calving threshold from file '../input/pism_equi_input.nc'...
PISM ERROR: can't find threshold used by the 'calving at threshold' calving method (thickness_calving_threshold) in ../input/pism_equi_input.nc.
Fix
The condition in L73 doesn't work as expected, because opt.filename defaults to the input file if no calving.thickness_calving.file is provided. The proposed fix checks instead, if the variable exists in the file.
With the changes in the dev branch, it's not possible anymore to provide PISM with a constant threshold for thickness calving.
To Reproduce Running PISM with the command line argument
pismr -i ../input/pism_equi_input.nc ... -calving eigen_calving,thickness_calving -thickness_calving_threshold 75.0 ...
fails with the following error message, instead of taking the provided threshold:Fix The condition in L73 doesn't work as expected, because
opt.filename
defaults to the input file if nocalving.thickness_calving.file
is provided. The proposed fix checks instead, if the variable exists in the file.Checklist
CHANGES.rst