From 67d8d4ac4670095379262251adae7c0d7089d353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CJinyun?= <“jinyuntang@gmail.com”> Date: Thu, 10 Oct 2024 17:11:36 -0700 Subject: [PATCH] bug fix for gcc14 compilers By removing some outdated use of common block, it ensures code compbiled by gcc14 can function properly. --- examples/blodgett/ENF_g | 2 +- f77src/ecosys_core/CMakeLists.txt | 2 +- f77src/ecosys_driver/main.f | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/blodgett/ENF_g b/examples/blodgett/ENF_g index 41cfc9f..1a167a8 100644 --- a/examples/blodgett/ENF_g +++ b/examples/blodgett/ENF_g @@ -5,7 +5,7 @@ 30040000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 31050000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 30060000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 -31170000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 +31070000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 31080000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 30090000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 31100000 0 0 1000 0.00083 1 1 1 0 0 0 0 0 diff --git a/f77src/ecosys_core/CMakeLists.txt b/f77src/ecosys_core/CMakeLists.txt index da8a468..0879fdd 100644 --- a/f77src/ecosys_core/CMakeLists.txt +++ b/f77src/ecosys_core/CMakeLists.txt @@ -53,7 +53,7 @@ configure_file(filec.h filec.h COPYONLY) configure_file(files.h files.h COPYONLY) configure_file(parameters.h parameters.h COPYONLY) set(ECOSYS_SOURCES - BLOCKDATA001.f +# BLOCKDATA001.f day.f endrun.f erosion.f diff --git a/f77src/ecosys_driver/main.f b/f77src/ecosys_driver/main.f index 3cf5c05..77c558c 100755 --- a/f77src/ecosys_driver/main.f +++ b/f77src/ecosys_driver/main.f @@ -7,6 +7,8 @@ PROGRAM main include "filec.h" include "files.h" include "blkc.h" + include "blk17.h" + DIMENSION NA(250),ND(250) CHARACTER*16 DATA(30),DATAC(30,250,250),DATAP(JP,JY,JX) 2,DATAM(JP,JY,JX),DATAX(JP),DATAY(JP),DATAZ(JP,JY,JX) @@ -14,6 +16,8 @@ PROGRAM main CHARACTER*3 CHOICE(102,20) CHARACTER*8 CDATE CHARACTER*80 BUF,PREFIX + + ICOR=(/1,-1,0,0,1,1,2,3,3,4,4,5/) CALL GETCWD(BUF) C C IDENTIFY OPERATING SYSTEM: DOS OR UNIX