forrtl: error (73): floating divide by zero

63 views
Skip to first unread message

Athira K

unread,
Jan 25, 2026, 10:51:10 PM (12 days ago) Jan 25
to SWAT+
Dear SWAT+ Development Team and Forum Members,
I am facing a runtime crash in SWAT+ (rev. 61.0.2) with the following error:  
Image PC Routine Line Source rev61.0.2_64rel.e 00007FF7C575567E CURNO 59 curno.f90 rev61.0.2_64rel.e 00007FF7C572D9D5 CN2_INIT 30 cn2_init.f90 rev61.0.2_64rel.e 00007FF7C572DA18 CN2_INIT_ALL 13 cn2_init_all.f90 rev61.0.2_64rel.e 00007FF7C59D5937 PROC_HRU 30 proc_hru.f90 rev61.0.2_64rel.e 00007FF7C593DA53 MAIN 48 main.f90 rev61.0.2_64rel.e 00007FF7C5AAD6FB Unknown Unknown Unknown rev61.0.2_64rel.e 00007FF7C5AB5C60 Unknown Unknown Unknown KERNEL32.DLL 00007FFCACA2E8D7 Unknown Unknown Unknown ntdll.dll 00007FFCAE2CC53C Unknown Unknown Unknown

The model crashes at the start of the simulation during curve number (CN) initialization.

What I have checked / fixed so far:

• All soil layers have valid non-zero values (bulk density, AWC, Ksat, depth).
• No soil layer has bd = 0 or awc = 0.
• Water pixels were previously mapped as soil, but I replaced them with valid “pseudo-soil” parameters to avoid zero values.
• HRUs are successfully created and the HRU summary shows valid landuse, soil, and slope distributions.

HRU Landuse classes generated:

AGRL, BARR, URBN, PAST, WETW, FRST, ORCD

cntable.lum issue:

The cntable.lum file (written by SWAT+ editor v3.1.0) contains landuse names such as:
rc_, sg_, pastg_, wood_, urban, farm, open_p, etc.

However, none of the HRU landuse codes (AGRL, BARR, URBN, PAST, WETW, FRST, ORCD) exist verbatim in cntable.lum.
This appears to cause the CN lookup to fail, resulting in CN = 0 and a divide-by-zero error in CURNO.

My question:
  1. Add corresponding CN rows for AGRL, BARR, URBN, PAST, WETW, FRST, ORCD in cntable.lum,
    or

  2. Reclassify the landuse raster to match existing cntable.lum names (rc_, pastg_, wood_*, etc.) and rebuild HRUs?

I would appreciate confirmation of the correct and recommended workflow for handling this landuse–CN linkage in SWAT+.

Thank you for your time and guidance.

Best regards,
Athira

Nancy B. Sammons

unread,
Jan 27, 2026, 8:05:53 AM (11 days ago) Jan 27
to Athira K, SWAT+

Athira: 

Thank you for searching for the problem!  Please send me you current txtinout folder so I can try and see what is happening.   

Nancy

 

 

From: swat...@googlegroups.com <swat...@googlegroups.com> On Behalf Of Athira K
Sent: Friday, January 23, 2026 6:13 AM
To: SWAT+ <swat...@googlegroups.com>
Subject: [SWAT+ User Group] forrtl: error (73): floating divide by zero

 

--
You received this message because you are subscribed to the Google Groups "SWAT+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swatplus+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/swatplus/5e828f23-8971-4913-b497-5b49262ca30en%40googlegroups.com.

Athira K

unread,
Jan 30, 2026, 1:12:27 PM (8 days ago) Jan 30
to SWAT+
Dear Nancy,

Thank you very much for your response and for offering to look into the issue. 

Please find my current txtinout folder attached herewith for your review.

While checking the setup, I noticed an additional issue related to land use classification. My original land use raster contains 8 classes (AGRL, FRST, URBN, ORCD, PAST, WETW, WATR, and BARR – barren land). However, in the generated landuse.lum file, only four land use classes are appearing. I applied a 5% area threshold, so I assume ORCD may have been excluded due to its small area. However, BARR (barren land) accounts for ~16% of the watershed, yet it is still not appearing in the landuse.lum file.  I am unsure whether this behavior is expected or if it could be related to the runtime error.

https://drive.google.com/drive/folders/1NhKktKuDk0W8DTnqeKI3ZYIAuuZcdOwW?usp=drive_link

Thank you very much for your guidance. I look forward to your advice.

Best regards,
Athira

Nancy B. Sammons

unread,
Feb 2, 2026, 8:05:21 AM (5 days ago) Feb 2
to Athira K, SWAT+

Athira: 

The problem in the soil file (soils.sol) as listed below.  I am curious of the source used for these parameters if you will share.

 

The hydrologic soil group (HYD_GRP) column are soil textures and should be moved to the TEXTURE column.  The classification for the hydrologic soil group should be labelled A,B,C or D.  The model references the curve number table for calculations from these groups.     

 

I was able to get a successful simulation after making the changes above in this file.

 

Let me know if you have any questions or further troubles.

Deswita Jasmine

unread,
Feb 5, 2026, 10:49:51 AM (2 days ago) Feb 5
to SWAT+
Dear SWAT+ Development Team and Forum Members,

I am currently having a problem during running SWAT regarding forrtl: error (73): floating divide by zero. Thus, I would like to ask for your help and guidance.
forrtl: error (73): floating divide by zero Image PC Routine Line Source rev61.0.2_64rel.e 00007FF6F3829A70 CLI_INITWGN 285 cli_initwgn.f90 rev61.0.2_64rel.e 00007FF6F383AD6C CLI_WGNREAD 99 cli_wgnread.f90 rev61.0.2_64rel.e 00007FF6F3AE54B5 PROC_DATE_TIME 43 proc_date_time.f90 rev61.0.2_64rel.e 00007FF6F3A4D6B2 MAIN 27 main.f90 rev61.0.2_64rel.e 00007FF6F3BBD6FB Unknown Unknown Unknown rev61.0.2_64rel.e 00007FF6F3BC5C60 Unknown Unknown Unknown KERNEL32.DLL 00007FFB52B2E8D7 Unknown Unknown Unknown ntdll.dll 00007FFB52E2C40C Unknown Unknown Unknown As far as my understanding, this error occurs due to the existence of 0 number in WGN observed data that I input. Moreover, there are also 0 number in my climate especially precipitation due to no rain in certain days. Nevertheless, I already tried to change all the zero into 1 or 0.5 and there are no progress, the error keep exist. Therefore, I would like to ask for your help regarding this problem. Thank you for your time and guidance. Any suggestions or advice would be highly appreciated. Best regards, Deswita

Nancy B. Sammons

unread,
Feb 5, 2026, 11:12:39 AM (2 days ago) Feb 5
to Deswita Jasmine, SWAT+

Deswita:  I may need your complete txtinout folder, but we can start by sending  your ‘weather-sta.wgn’ file to see if I can find anything that could be causing a problem.

Thank you,

Nancy

 

 

From: swat...@googlegroups.com <swat...@googlegroups.com> On Behalf Of Deswita Jasmine


Sent: Tuesday, February 3, 2026 10:33 PM
To: SWAT+ <swat...@googlegroups.com>

Subject: [SWAT+ User Group] forrtl: error (73): floating divide by zero

 

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

--

You received this message because you are subscribed to the Google Groups "SWAT+" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swatplus+u...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages