Skip to content

Commit 7e7c2ef

Browse files
committed
Update to 2009Rev510
2 parents 9a46fda + 0978bb2 commit 7e7c2ef

File tree

230 files changed

+9802
-10608
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+9802
-10608
lines changed

VERSIONS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
VERSION_MAJOR 2009
2-
VERSION_MINOR 486
2+
VERSION_MINOR 510
33
VERSION_PATCH

src/CMakeLists.txt

+23-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,32 @@ set(swatexe swat)
55
file(GLOB F77SRCS *.f)
66

77
### Set Fortran line format for source file
8+
## Special sources that have fixed length of 79
9+
set(LEN79_SRCS "bmp_det_pond" "bmpinit" "ovr_sed" "percmain" "readbsn" "rthsed")
810
foreach(F77FILE ${F77SRCS})
911
get_filename_component(CORENAME ${F77FILE} NAME_WE)
12+
list(FIND LEN79_SRCS ${CORENAME} _FOUND_LEN79)
1013
if(${CMAKE_Fortran_COMPILER} MATCHES "ifort.*")
1114
# ifort, reference https://software.intel.com/en-us/node/678225
12-
if(MSVC) # ifort integrated in Microsoft Visual Studio
13-
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS /4L72)
15+
if(MSVC) # ifort integrated in Microsoft Visual Studio
16+
if(${_FOUND_LEN79} GREATER -1)
17+
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS /4L79)
18+
else()
19+
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS /4L72)
20+
endif()
1421
else()
15-
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS -72)
22+
if(${_FOUND_LEN79} GREATER -1)
23+
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS -79)
24+
else()
25+
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS -72)
26+
endif()
1627
endif()
1728
else() # gfortran tested only
18-
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS -ffixed-line-length-72)
29+
if(${_FOUND_LEN79} GREATER -1)
30+
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS -ffixed-line-length-79)
31+
else()
32+
set_source_files_properties(${F77FILE} PROPERTIES COMPILE_FLAGS -ffixed-line-length-72)
33+
endif()
1934
endif()
2035
endforeach()
2136

@@ -42,6 +57,10 @@ if((NOT MSVC) AND (${First_Line_Of_Main_File} MATCHES " include 'modparm.f'
4257
endif()
4358
# Set compile flag according to Fortran line format. These should be consistent with settings above.
4459
set(Format_Flag "-ffixed-line-length-72")
60+
list(FIND LEN79_SRCS ${CORENAME} _FOUND_LEN79)
61+
if(${_FOUND_LEN79} GREATER -1)
62+
set(Format_Flag "-ffixed-line-length-79")
63+
endif()
4564
add_custom_command(OUTPUT ${CORENAME}.o
4665
COMMAND ${CMAKE_Fortran_COMPILER} ${Compile_Flags_List} ${Format_Flag} -c
4766
${SRCFILE} DEPENDS main.o)

src/addh.f

+4-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ subroutine addh
7171

7272
!! add hydrograph points (hourly time step)
7373
if (ievent > 2) then
74-
do kk = 1, 24
74+
! do kk = 1, 24
75+
do kk = 1, nstep ! modified for urban modeling by J.Jeong 4/15/2008
7576
if (hhvaroute(2,inum1,kk) + hhvaroute(2,inum2,kk) > 0.1) then
7677
hhvaroute(1,ihout,kk) = (hhvaroute(1,inum1,kk) * &
7778
& hhvaroute(2,inum1,kk) + hhvaroute(1,inum2,kk) * &
@@ -80,7 +81,8 @@ subroutine addh
8081
end if
8182
end do
8283
do ii = 2, mvaro
83-
do kk = 1, 24
84+
! do kk = 1, 24
85+
do kk = 1, nstep ! modified for urban modeling by J.Jeong 4/15/2008
8486
hhvaroute(ii,ihout,kk) = hhvaroute(ii,inum1,kk) + &
8587
& hhvaroute(ii,inum2,kk)
8688
end do

0 commit comments

Comments
 (0)