dpest.utils.parg_derinc#

dpest.utils.parg_derinc.parg_derinc(pst_path, updates)[source]#

Updates DERINC values for one or more parameter groups in a PEST control (.pst) file.

The DERINC value controls the initial derivative increment used by PEST for parameters belonging to a given parameter group. This function modifies the * parameter groups section of an existing .pst file in place.

This is useful when some groups contain parameters with very narrow bounds and the default derivative increment written by dpest.pst() is too large, causing pestchek.exe to return errors such as:

  • Initial derivative increment for parameter ... greater than parameter range divided by 3.2

Required Arguments:#

  • pst_path (str):

    Path to the .pst PEST control file to modify.

  • updates (dict):

    Dictionary mapping parameter group names to new DERINC values.

    Example:

    {
        "PART_SEED": 1.0e-03,
        "SEED_COMP": 1.0e-03
    }
    

Returns:#

  • None

The function updates the * parameter groups section in place.

Examples:#

  1. Update DERINC for two parameter groups:

    from dpest.utils import parg_derinc
    
    parg_derinc(
        pst_path = "A-1_input/PEST_CONTROL.pst",
        updates = {
            "PART_SEED": 1.0e-03,
            "SEED_COMP": 1.0e-03
        }
    )
    
  2. Update DERINC for a single parameter group:

    from dpest.utils import parg_derinc
    
    parg_derinc(
        pst_path = "PEST_CONTROL.pst",
        updates = {
            "PHOTO": 5.0e-03
        }
    )