SWAT+ crash when enabling pesticides (forrtl severe 151 in PESTICIDE_INIT) — support request

16 views
Skip to first unread message

Noémie Morier

unread,
Apr 14, 2026, 2:53:41 PM (9 days ago) Apr 14
to SWAT+ Editor

Hello Support Team,

I’m requesting help because my SWAT+ project crashes consistently as soon as I enable at least one pesticide (I use the pesticide module as a PFAS proxy). The model runs normally when the number of pesticides in constituents.cs is 0, but crashes immediately when !pesticides > 0.

1. Primary Issue Location

Component: SWAT+ Executable (Fortran crash during initialization) + SWAT+ Editor interaction (writing/reading inputs)
Area of impact: Model input / initialization and model functionality (pesticide module)

2. Software Versions

SWAT+ Editor Version: 3.2.1
Platform: win32 (Windows)
Python Mode: Compiled
Python Version: 3.13.12
SWAT+ Revision (Executable): 61.0.2 (I also tested 61.0.1 and rev60; the crash still happens as soon as a pesticide is declared)

3. Project Characteristics

Watershed details:

  • Location: Chablais region, Switzerland
  • DEM: 50 m
  • Discretization: standard SWAT+ HRU approach. I prepared a PFAS “hotspot HRU” subset (678 HRUs), but the crash occurs even without any PFAS application schedule and LUM and even with a single “native” pesticide.
    Modeling aim:
  • Hydrology + sediments (calibrated/checked first)
  • Water quality: PFOS/PFBA simulated via the pesticide module (PFAS proxy), with diffuse inputs on HRUs
4. Description of Issue

The problem: As soon as constituents.cs contains !pesticides > 0, SWAT+ crashes at startup with:

forrtl: severe (151): allocatable array is already allocated
Routine: PESTICIDE_INIT (line 43, pesticide_init.f90)

Call stack excerpt:

  • PESTICIDE_INIT line 43 (pesticide_init.f90)
  • PROC_HRU line 39 (proc_hru.f90)
  • MAIN line 48 (main.f90)

simulation.out stops right after reading the weather inputs (pet/precip/temp/solar/rh/wind/wgn/wx).

Steps to reproduce:

  1. Run the project with !pesticides = 0 → model runs normally.
  2. In SWAT+ Editor, add at least one pesticide so that constituents.cs becomes !pesticides = 1 (or 2).
  3. Write input files and run SWAT+.
  4. SWAT+ crashes consistently during pesticide initialization (PESTICIDE_INIT).

Troubleshooting already attempted:

  • Same crash with PFOS/PFBA or with an existing “native” pesticide.
  • Same crash even with no management schedule / no chemical applications (i.e., just enabling pesticides).
  • Verified management.sch has valid dates and no null operations; crash still happens before any application is executed.
  • Updated file.cio init line to include pest_hru.ini and pest_water.ini and created zero initializations (pest0, pestw0); crash persists.
  • Something interseting is that in Constituents, soil plant can only choose Water initializations (pestw0) as pesticide properties
I really appreciate your help.

Best regards,

Noémie

Nancy B. Sammons

unread,
Apr 14, 2026, 3:06:30 PM (9 days ago) Apr 14
to Noémie Morier, SWAT+ Editor

Noemie:  Thank you for your email and your txtinout.  I will take a look and get back to you as soon as possible.

Nancy

 

 

From: swatplu...@googlegroups.com <swatplu...@googlegroups.com> On Behalf Of Noémie Morier
Sent: Monday, April 13, 2026 11:15 AM
To: SWAT+ Editor <swatplu...@googlegroups.com>
Subject: [SWAT+ Editor User Group] SWAT+ crash when enabling pesticides (forrtl severe 151 in PESTICIDE_INIT) — support request

 

You don't often get email from noemie...@gmail.com. Learn why this is important

--
You received this message because you are subscribed to the Google Groups "SWAT+ Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swatplus-edit...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/swatplus-editor/beb61825-8b76-4d75-8b16-a64226004f36n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages