From 011808bda788fb588f232dc696394a04bb4aee1e Mon Sep 17 00:00:00 2001 From: Steve Drake Date: Fri, 19 Jul 2024 09:26:18 -0700 Subject: [PATCH 1/4] Consistent name for Makefile.local --- INSTALL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 775c1f6..3115705 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -3,7 +3,7 @@ 1. Clone the online GitHub repository either from the main git repo source (https://github.com/NOAA-OWP/snow17.git) or your fork of it -- e.g., `git clone https://github.com/NOAA-OWP/snow17.git` 2. Change directory to the build directory: `cd snow17/build/` 3. Copy `Makefile` to `Makefile.local` (`cp Makefile Makefile.local`) and edit the local version to update the compiler and paths if necessary to match the resources on your system. -4. Run `make -f MakefileLocal` to compile the program and generate the executable, which will be found in `snow17/bin/` +4. Run `make -f Makefile.local` to compile the program and generate the executable, which will be found in `snow17/bin/` 5. There is a test case in the `snow17/test_cases/` directory. To run it, first cd to the directory (`cd ../test_cases/`) and unpack the example: `tar -xzvf ex1.tgz`. 6. `cd ex1/run/` to get to the run directory and then execute the shell script (`./runSnow17.csh`) or type `../../../bin/snow17.exe namelist.bmi.HHWM8` into your command line 7. Check the example in the output folder (`cd ../output/`) @@ -12,8 +12,8 @@ TL;DR: ``` git clone https://github.com/NOAA-OWP/snow17.git cd snow17/build/ -cp Makefile MakefileLocal # edit to match your compiler and system resources -make -f MakefileLocal +cp Makefile Makefile.local # edit to match your compiler and system resources +make -f Makefile.local cd ../test_cases/ tar -xzvf ex1.tgz cd ex1/run/ From 38624ce7862f415f6acc02c291d7383e374f0fc9 Mon Sep 17 00:00:00 2001 From: Steve Drake Date: Fri, 19 Jul 2024 09:30:53 -0700 Subject: [PATCH 2/4] Changed intent() to compile on Apple M3 Max CPU --- src/share/forcingType.f90 | 2 +- src/share/modelVarType.f90 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/share/forcingType.f90 b/src/share/forcingType.f90 index 23792df..a336678 100644 --- a/src/share/forcingType.f90 +++ b/src/share/forcingType.f90 @@ -28,7 +28,7 @@ subroutine initForcing(this, namelist) use defNamelist implicit none - class(forcing_type), intent(out) :: this + class(forcing_type), intent(inout) :: this type(namelist_type), intent(in) :: namelist ! -- variable allocations (time dim not needed since forcings are one-rec scalars) diff --git a/src/share/modelVarType.f90 b/src/share/modelVarType.f90 index 4dff325..c38ec08 100644 --- a/src/share/modelVarType.f90 +++ b/src/share/modelVarType.f90 @@ -33,7 +33,7 @@ subroutine initModelVar(this, namelist) implicit none ! define variables - class(modelvar_type), intent(out) :: this + class(modelvar_type), intent(inout) :: this type(namelist_type), intent(in) :: namelist ! -- variable allocations (time dim not needed since forcings are one-rec scalars) From 4cde7a963b45744b4060ced533e37a54312ee43c Mon Sep 17 00:00:00 2001 From: Steve Drake Date: Fri, 19 Jul 2024 09:34:09 -0700 Subject: [PATCH 3/4] Declare LIQW as REAL to compile on Intel compiler --- src/snow19/updt19.f | 1 + 1 file changed, 1 insertion(+) diff --git a/src/snow19/updt19.f b/src/snow19/updt19.f index b804c22..b6a1ac4 100644 --- a/src/snow19/updt19.f +++ b/src/snow19/updt19.f @@ -13,6 +13,7 @@ SUBROUTINE UPDT19(OWE,OSC,TWE,COVER,IUPWE,IUPSC, CVK MODIFIED 4/00 BY V. KOREN: TWO NEW STATES ADDED C....................................... + REAL LIQW DIMENSION ADC(11) C C COMMON BLOCKS From cd876a272cab3564af77ce54afe993e9d40560a3 Mon Sep 17 00:00:00 2001 From: Steve Drake Date: Fri, 19 Jul 2024 09:37:56 -0700 Subject: [PATCH 4/4] Initialize ios variable to avoid runtime error on Intel Fortran --- src/share/ioModule.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/share/ioModule.f90 b/src/share/ioModule.f90 index 65e3469..ddadaee 100644 --- a/src/share/ioModule.f90 +++ b/src/share/ioModule.f90 @@ -172,6 +172,7 @@ SUBROUTINE init_forcing_files(namelist, runinfo, parameters) ! --- code ------------------------------------------------------------------ print*, 'Initializing forcing files' + ios = 0 found_start = 0 do nh=1, runinfo%n_hrus