Skip to content

Commit

Permalink
branch: trunk, ./src/* ./make.config:
Browse files Browse the repository at this point in the history
- merged branch mpr_extract
- remaining failing test_cases (NAG will provide patch):
  - NAG fails with open-mp false during read-in of namelist
- still TODO: check write optimization restart file
- still TODO: add documentation
  (will be done with pre-proc script format_doxygen_docs_in_f90.py)
  • Loading branch information
gitporst committed Jun 15, 2018
1 parent 7218339 commit b71c501
Show file tree
Hide file tree
Showing 211 changed files with 63,083 additions and 89,558 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ SHELL = /bin/bash
#

# . is current directory, .. is parent directory
SRCPATH := ./src/lib ./src/common ./src/mHM ./src/mRM # where are the source files
SRCPATH := ./src/lib ./src/common ./src/mRM ./src/common_mHM_mRM ./src/MPR ./src/mHM # where are the source files
PROGPATH := . # where shall be the executable
CONFIGPATH := make.config # where are the $(system).$(compiler) files
MAKEDPATH := $(CONFIGPATH) # where is the make.d.sh script
Expand All @@ -109,9 +109,9 @@ LIBNAME := #libminpack.a # Name of library
system := eve
# Compiler: intelX, gnuX, nagX, sunX, where X stands for version number, e.g. intel13;
# look at $(MAKEDPATH)/$(system).alias for shortcuts or type 'make info'
compiler := intel
compiler := nag
# Releases: debug, release
release := release
release := debug
# Netcdf versions (Network Common Data Form): netcdf3, netcdf4, [anything else]
netcdf := netcdf4
# LAPACK (Linear Algebra Pack): true, [anything else]
Expand All @@ -123,7 +123,7 @@ proj :=
# IMSL (IMSL Numerical Libraries): vendor, imsl, [anything else]
imsl :=
# OpenMP parallelization: true, [anything else]
openmp := true
openmp := false
# MPI parallelization - experimental: true, [anything else]
mpi :=
# Linking: static, shared, dynamic (last two are equal)
Expand Down Expand Up @@ -184,7 +184,7 @@ static := dynamic
# Special compilation flags
EXTRA_FCFLAGS :=
EXTRA_F90FLAGS := #-C=undefined
EXTRA_DEFINES := -DMRM2MHM
EXTRA_DEFINES := -DMRM2MHM #-DMPR_STANDALONE
EXTRA_INCLUDES :=
EXTRA_LDFLAGS += #-Wl,--stack,12485760
EXTRA_LIBS :=
Expand Down Expand Up @@ -389,7 +389,6 @@ RANLIB := ranlib

# Set path where all the .mod, .o, etc. files will be written, set before include $(MAKEINC)
OBJPATH := $(addsuffix /.$(strip $(icompiler)).$(strip $(release)), $(SRCPATH))

# Mac OS X is special, there is (almost) no static linking.
# Mac OS X does not work with -rpath. Set DYLD_LIBRARY_PATH if needed.
iOS := $(shell uname -s)
Expand Down Expand Up @@ -800,6 +799,7 @@ ifneq ($(LDPATH),)
empty:=
space:= $(empty) $(empty)
export LD_LIBRARY_PATH=$(subst $(space),$(empty),$(LDPATH))
export DYLD_FALLBACK_LIBRARY_PATH=$(subst $(space),$(empty),$(LDPATH))
endif

INCLUDES += $(addprefix -I,$(OBJPATH))
Expand Down
182 changes: 14 additions & 168 deletions check/README
Original file line number Diff line number Diff line change
Expand Up @@ -53,175 +53,21 @@ the Makefile setting for
----------------------------------------
TEST CASES
----------------------------------------

case 0 :: DEFAULT mhm.nml and mhm_outputs.nml and mhm_parameter.nml

case 1 :: RESTART READING AND WRITING, MPR deactivated, PET: Hargreaves-Samani
nBasins = 2 (default: 1)
nGaugesTotal = 2 (default: 1)
processCase(5) = 1 (default: 0)
flag: read_restart = .TRUE. (default: .FALSE.)
flag: perform_mpr = .FALSE. (default: .TRUE. )
-----
mhm_outputs.nml:
timeStep_model_outputs = 0 (default: -1)

case 2 :: ROUTING DEACTIVATED, PET: Priestley Taylor, CHUNK READ IN: monthly, output written monthly,
Jarvis SM-dependent ET reduction
nBasins = 2 (default: 1)
nGaugesTotal = 2 (default: 1)
processCase(3) = 2 (default: 1)
processCase(5) = 2 (default: 0)
processCase(8) = 0 (default: 1)
timestep_model_inputs = -2 (default: 1)
-----
mhm_outputs.nml:
timeStep_model_outputs = -2 (default: -1)

case 3 :: OPTIMIZATION ACTIVATED, PET: Penman-Monteith
nBasins = 2 (default: 1)
nGaugesTotal = 2 (default: 1)
processCase(5) = 3 (default: 0)
optimize = .TRUE. (default: .FALSE.)
opti_method = 1 (default: 3)
nIterations = 6 (default: 400)
-----
mhm_outputs.nml:
timeStep_model_outputs = 0 (default: -1)

case 4 :: MULTISCALE
nBasins = 6 (default: nBasins = 2)
resolution_Hydrology(1) = 24000 (default: resolution_Hydrology(1) = 24000 )
resolution_Hydrology(2) = 12000 (default: resolution_Hydrology(1) = 24000 )
resolution_Hydrology(3) = 24000 (default: )
resolution_Hydrology(4) = 24000 (default: )
resolution_Hydrology(5) = 12000 (default: )
resolution_Hydrology(6) = 24000 (default: )
resolution_Routing(1) = 24000 (default: resolution_Routing(1) = 24000)
resolution_Routing(2) = 12000 (default: resolution_Routing(2) = 24000)
resolution_Routing(3) = 24000 (default: )
resolution_Routing(4) = 24000 (default: )
resolution_Routing(5) = 12000 (default: )
resolution_Routing(6) = 24000 (default: )
L0Basin(1) = 1 (default: )
L0Basin(2) = 1 (default: )
L0Basin(3) = 2 (default: )
L0Basin(4) = 3 (default: )
L0Basin(5) = 4 (default: )
L0Basin(6) = 5 (default: )
nGaugesTotal = 6 (default: nGaugesTotal = 2)
NoGauges_basin(3) = 1 (default: )
Gauge_id(3,1) = 45 (default: )
Gauge_filename(3,1) = "45.txt" (default: )
NoGauges_basin(4) = 1 (default: )
Gauge_id(4,1) = 398 (default: )
Gauge_filename(4,1) = "00398.txt" (default: )
NoGauges_basin(5) = 1 (default: )
Gauge_id(5,1) = 398 (default: )
Gauge_filename(5,1) = "00398.txt" (default: )
NoGauges_basin(6) = 1 (default: )
Gauge_id(6,1) = 45 (default: )
Gauge_filename(6,1) = "45.txt" (default: )
+ adjust basin wise directory paths according to the multiscale setup:
dir_Out(1) = "output_b1/b1_" (default: "output_b1/")
dir_RestartOut(1) = "output_b1/b1_" (default: "output_b1/")
dir_LatLon(2) = "../../test_basin/input/latlon/latlon_2.nc" (default: latlon_1.nc )
dir_Out(2) = "output_b1/b2_" (default: "output_b1/")
dir_RestartOut(2) = "output_b1/b2_" (default: "output_b1/")
dir_LatLon(3) = "../../test_basin_2/input/latlon/latlon.nc" (default: )
dir_Out(3) = "output_b1/b3_" (default: )
dir_RestartOut(3) = "output_b1/b3_" (default: )
dir_LatLon(4) = "../../test_basin/input/latlon/latlon_1.nc" (default: )
dir_Out(4) = "output_b1/b4_" (default: )
dir_RestartOut(4) = "output_b1/b4_" (default: )
dir_LatLon(5) = "../../test_basin/input/latlon/latlon_2.nc" (default: )
dir_Out(5) = "output_b1/b5_" (default: )
dir_RestartOut(5) = "output_b1/b5_" (default: )
dir_LatLon(6) = "../../test_basin_2/input/latlon/latlon.nc" (default: )
dir_Out(6) = "output_b1/b6_" (default: )
dir_RestartOut(6) = "output_b1/b6_" (default: )
-----
mhm_outputs.nml:
timeStep_model_outputs = 0 (default: -1)

case 5 :: INFLOW GAUGE, LAI FROM GRIDDED DATA, output written every 14 days
nBasins = 3 (default: 1)
nGaugesTotal = 6 (default: 1)
NoGauges_basin(1) = 2 (default: 1)
NoGauges_basin(2) = 2 (default: 1)
NoGauges_basin(3) = 2 (default: 0)
timeStep_LAI_input = -2 (default: 0)
Gauge_id(1,2) = 333 (default: n.a.)
gauge_filename(1,2) = "00333.txt" (default: n.a.)
Gauge_id(2,2) = 333 (default: n.a.)
gauge_filename(2,2) = "00333.txt" (default: n.a.)
nInflowGaugesTotal = 2 (default: nInflowGaugesTotal = 0)
NoInflowGauges_basin(1) = 1 (default: NoInflowGauges_basin(1) = 0)
InflowGauge_id(1,1) = 333 (default: InflowGauge_id(1,1) = 398)
InflowGauge_filename(1,1) = "00333.txt" (default: InflowGauge_filename(1,1) = "00398.txt")
NoInflowGauges_basin(2) = 1 (default: NoInflowGauges_basin(2) = 0)
InflowGauge_id(2,1) = 333 (default: InflowGauge_id(2,1) = 398)
InflowGauge_filename(2,1) = "00333.txt" (default: InflowGauge_filename(2,1) = "00398.txt")
InflowGauge_Headwater(2,1) = .TRUE. (default: )
dir_Out(1) = "output_b1/b1_" (default: "output_b1/")
dir_RestartOut(1) = "output_b1/b1_" (default: "output_b1/")
dir_Out(2) = "output_b1/b2_" (default: "output_b1/")
dir_RestartOut(2) = "output_b1/b2_" (default: "output_b1/")
dir_Out(3) = "output_b1/b3_" (default: "output_b1/")
dir_RestartOut(3) = "output_b1/b3_" (default: "output_b1/")
-----
mhm_outputs.nml:
timeStep_model_outputs = 336 (= 14*24 hours) (default: -1)


case 6 :: COMBINED SOIL MOISTURE - STREAMFLOW OPTIMIZATION ACTIVATED
nBasins = 2 (default: 1)
nGaugesTotal = 2 (default: 1)
optimize = .TRUE. (default: .FALSE.)
opti_method = 1 (default: 3)
opti_function = 28 (default: 3)
nIterations = 6 (default: 400)
-----
mhm_outputs.nml:
timeStep_model_outputs = 0 (default: -1)

case 7 :: Q + TWS BASIN AVERAGE OPTIMIZATION ACTIVATED
nBasins = 2 (default: 1)
nGaugesTotal = 2 (default: 1)
optimize = .TRUE. (default: .FALSE.)
opti_method = 1 (default: 3)
opti_function = 15 (default: 3)
nIterations = 6 (default: 400)
-----
mhm_outputs.nml:
timeStep_model_outputs = 0 (default: -1)

case 8 :: NEUTRON OPTIMIZATION ACTIVATED
nBasins = 1 (default: 1)
nGaugesTotal = 1 (default: 1)
optimize = .TRUE. (default: .FALSE.)
opti_method = 1 (default: 3)
opti_function = 17 (default: 3)
nIterations = 6 (default: 400)
-----
mhm_outputs.nml:
timeStep_model_outputs = 0 (default: -1)

case 9 :: ADAPTIVE TIMESTEPPING IN ROUTING, RESTART WRITING, PET: Hargreaves-Samani
nBasins = 2 (default: 1)
nGaugesTotal = 2 (default: 1)
processCase(5) = 1 (default: 0)
processCase(8) = 2 (default: 0)
-----
mhm_outputs.nml:
timeStep_model_outputs = 0 (default: -1)

check in mhm.nml or simulation.ini for comprehensive list of changed options in namelists
please update both files when changes occur!!!
if unsure about format of simulation.ini, contact [email protected]

case 00 :: DEFAULT mhm.nml and mhm_outputs.nml and mhm_parameter.nml
case 01 :: RESTART READING AND WRITING, MPR deactivated, PET: Hargreaves-Samani
case 02 :: ROUTING DEACTIVATED, PET: Priestley Taylor, CHUNK READ IN: monthly, output written monthly,
case 03 :: OPTIMIZATION ACTIVATED, PET: Penman-Monteith
case 04 :: MULTISCALE
case 05 :: INFLOW GAUGE, LAI FROM GRIDDED DATA, output written every 14 days
case 06 :: COMBINED SOIL MOISTURE - STREAMFLOW OPTIMIZATION ACTIVATED
case 07 :: Q + TWS BASIN AVERAGE OPTIMIZATION ACTIVATED
case 08 :: NEUTRON OPTIMIZATION ACTIVATED
case 09 :: ADAPTIVE TIMESTEPPING IN ROUTING, RESTART WRITING, PET: Hargreaves-Samani
case 10 :: SOIL MOISTURE ET: Jarvis SM-dependent ET reduction &soil texture dependent root fraction
processCase(3) = 3 (default: 1)
processCase(5) = -1 (default: 0)
-----
mhm_outputs.nml:
timeStep_model_outputs = -2 (default: -1)


# -------------------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit b71c501

Please sign in to comment.