Commit 9ce0ec12 authored by Oldrich Rakovec's avatar Oldrich Rakovec
Browse files

merge release into master

parents 0ce48782 4eb9c003
# Created by .ignore support plugin (hsz.mobi)
# Exclusions
*.g90
*.o
*.mod
*.a
*.so
*.nc
test_basin/
test_basin_2/
*prog_for_check
*terminal
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
......@@ -16,7 +29,6 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
......
[submodule "deps/mrm"]
path = deps/mrm
url = https://git.ufz.de/mhm/mrm.git
#-D CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT:STRING=ON
set(CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT ON CACHE STRING "build the module INDEPENDENT of the module system, so the build in the build tree works even after a module purge")
##-D CMAKE_WITH_MPI:STRING=ON
set(CMAKE_WITH_MPI OFF CACHE STRING "build the module with MPI, so it can be executed using mpirun")
#set(CMAKE_MRM2MHM OFF CACHE STRING "If set to ON the model runs with mRM")
#set(CMAKE_pgiFortran ON CACHE STRING "Code exchange for pgi compiler dependent issues")
#set(CMAKE_MPR_STANDALONE ON CACHE STRING "If set to ON, only MPR is compiled")
#set(CMAKE_ABSOFT ON CACHE STRING "Documentation to be added. If you you are developer, you might edit this string in CMakeLists.txt")
# set set specific path where to search for the netCDF directory
set(CMAKE_NETCDF_DIR "/path/to/netcdfdir/" CACHE STRING "set set specific place where to search for the netCDF directory")
# This cmake file is not meant to be edited for a special setup.
# For special setups use cache line files or command line options, as described a few
# lines ahead concerning module INDEPENDENT builds
cmake_minimum_required(VERSION 3.5)
project(mhm Fortran)
# The variable "CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT" can be set before executing cmake via a cache command:
# $cmake -DCMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT:STRING=ON ..
# or cache file:
# $cmake -C ../CMakeCacheFiles/eve ..
# or after executing CMake editing the CMakeCache.txt, preferably with a corresponding cmake editor i.e ccmake
set(CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT OFF CACHE STRING "build the module INDEPENDENT of the module system, so the build in the build tree works even after a module purge")
message(STATUS "build INDEPENDENT of module system ${CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT}")
# set specific place where to search for the netCDF directory
set(CMAKE_NETCDF_DIR " " CACHE STRING "set set specific place where to search for the netCDF directory")
message(STATUS "search in additional directory ${CMAKE_NETCDF_DIR} for netCDF")
# The variable "CMAKE_WITH_MPI" can be set before executing cmake via a cache command:
# $cmake -DCMAKE_WITH_MPI:STRING=ON ..
# or in a cache file:
# $cmake -C ../CMakeCacheFiles/example
# or after executing CMake editing the CMakeCache.txt, preferably with a corresponding cmake editor i.e. ccmake
set(CMAKE_WITH_MPI OFF CACHE STRING "build the module with MPI, so it can be executed using mpirun")
# same with OpenMP
set(CMAKE_WITH_OpenMP OFF CACHE STRING "build the module with OpenMP parallelization")
# same with lapack
set(CMAKE_WITH_LAPACK OFF CACHE STRING "build the module with lapack library")
# additional cmake-modules created for the purpose of finding netCDF or other libraries ly in the source_directory in
# a folder named cmake-modules. This command tells cmake to search there for Find<module>.cmake files
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
set (NETCDF_F90 "YES")
# the FindNetCDFF.cmake file can be found after we added the cmake-modules folder to the CMAKE_MODULE_PATH
# the build fails, if it is not present
find_package(NetCDFF REQUIRED)
# from that module we gain the following variables:
# NETCDF_INCLUDES : the include directory
# NETCDF_LINK_LIBRARIES : the absolute path to and with the libraries
# NETCDF_CFLAGS_OTHER : additional compilation flags
# NETCDF_LDFLAGS_OTHER : additional linking flags
# if cmake provides a findLIBRARY module, this gets invoked via find_package(LIBRARY)
if (CMAKE_WITH_MPI)
# find if there is an MPI setup on the system and if so, set corresponding variables
find_package(MPI)
if (NOT ${MPI_Fortran_FOUND})
message(FATAL_ERROR "MPI required but not found")
else()
message(STATUS "found MPI_Fortran_COMPILER ${MPI_Fortran_COMPILER}")
endif()
endif()
if (CMAKE_WITH_OpenMP)
# find if there is an OpenMP setup on the system and if so, set corresponding variables
find_package(OpenMP)
if (NOT ${OpenMP_Fortran_FOUND})
message(FATAL_ERROR "OpenMP required but not found")
endif()
endif()
if (CMAKE_WITH_LAPACK)
# find if there is an LAPACK library on the system and if so, set corresponding variables
find_package(LAPACK)
if (NOT ${LAPACK_FOUND})
message(FATAL_ERROR "lapack required but not found")
endif()
endif()
include_directories(${NETCDF_INCLUDES} ${MPI_Fortran_INCLUDE_PATH} ${OpenMP_Fortran_LIBRARY})
# ifort and gfortran need the flag -cpp to interpret definitions like -DMRM2MHM
# the nag compiler is not able to interpret the flag -cpp but can interpret these definitions anyway
# so we check whether the compiler is able to use the flag -cpp
# for that we need the module CheckFortranCompilerFlag
include(CheckFortranCompilerFlag)
CHECK_Fortran_COMPILER_FLAG("-cpp" CPP_FLAG)
# if the flag exists, we add it to the compilation flags
if (CPP_FLAG)
set(ADDITIONAL_GCC_FLAGS "-cpp")
endif()
# this function adds definitions but also creates a corresponding CMAKE variable with CACHE STRING
# i.e.:
# The variable "${defCMakeName}" can be set before executing cmake via a cache command cmake -D...
# or in a cache file:
# $cmake -C ../CMakeCacheFiles/example
# or after executing CMake editing the CMakeCache.txt, preferably with a corresponding cmake editor i.e. ccmake
# cmake ..
function(cpp_definitions defName defCMakeName value cacheString)
set(${defCMakeName} "${value}" CACHE STRING "${cacheString}")
if (${defCMakeName})
add_definitions("${defName}")
endif()
endfunction()
# Add definitions. These should later be set via the cache line file and only
# have a default value here. These part only concerns user build definitions like MRM2MHM
#add_definitions(-DMRM2MHM=.true.)
cpp_definitions("-DMRM2MHM" "CMAKE_MRM2MHM" "ON" "If set to ON the model runs with mRM")
cpp_definitions("-DpgiFortran" "CMAKE_pgiFortran" "OFF" "Code exchange for pgi compiler dependent issues")
cpp_definitions("-DMPR_STANDALONE" "CMAKE_MPR_STANDALONE" "OFF" "If set to ON, only MPR is compiled")
cpp_definitions("-DABSOFT" "CMAKE_ABSOFT" "OFF" "Documentation to be added. If you you are developer, you might edit this string in CMakeLists.txt")
# Compile.
#
# This is not recommended but wished by some members of our working group. With this command
# all files in src with the ending f90 or h are written into sources, and therefore linked
# together to the executable, if relevant or not
file(GLOB_RECURSE sources
src/*.f90 deps/mrm/src/mRM/*.f90 deps/mrm/src/common/*.f90 deps/mrm/src/common_mHM_mRM/*.f90
src/*.F90 deps/mrm/src/mRM/*.F90 deps/mrm/src/common/*.F90 deps/mrm/src/common_mHM_mRM/*.F90)
# this command is able to create dependencies, compile and add the sources in the right order
add_executable(mhm ${sources})
# the libraries are added to the executable by the linker, using the full path and using the
# rpath option, except the libraries are located in ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES}.
target_link_libraries(mhm ${NETCDF_LINK_LIBRARIES} ${MPI_Fortran_LIBRARIES} ${OpenMP_Fortran_LIBRARIES} ${LAPACK_LIBRARIES})
set_property(TARGET mhm PROPERTY COMPILE_FLAGS "${CMAKE_Fortran_FLAGS} ${ADDITIONAL_GCC_FLAGS} ${NETCDF_CFLAGS_OTHER} ${MPI_Fortran_COMPILE_FLAGS} ${OpenMP_Fortran_FLAGS}")
set_property(TARGET mhm PROPERTY LINK_FLAGS "${NETCDF_LDFLAGS_OTHER} ${MPI_Fortran_LINK_FLAGS} ${OpenMP_Fortran_FLAGS} ${LAPACK_LINKER_FLAGS}")
# set compiling flags for debug and realese version
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-form -ffixed-line-length-132")
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -pedantic-errors -Wall -W -O -g -Wno-maybe-uninitialized")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O3")
cpp_definitions("-DGFORTRAN" "CMAKE_GFORTRAN" "ON" "Code exchange for gfortran compiler dependent issues")
endif()
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -nofixed -assume byterecl -fp-model source -m64 -assume realloc-lhs ") # precise -> source: suppress warning, computation identical
set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -warn all -g -debug -traceback -fp-stack-check -O0 -debug -check all")
set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O3 -qoverride-limits")
endif()
message(STATUS "the following debug flags will be used: ${CMAKE_Fortran_FLAGS_DEBUG}")
# Usually that works fine, except, one is on a module system and tries to execute the executable
# in the end without having the modules loaded. A workaround is provided using the variable
# CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT
# if this variable is set to ON (do not set the variable inside of this cmake file), then the
# paths are added to the INSTALL_RPATH, and via the second command also to the build.
# It is a bit of a mess and workaround though.
if (CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT)
set_target_properties(mhm PROPERTIES INSTALL_RPATH "${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES}")
set_target_properties(mhm PROPERTIES BUILD_WITH_INSTALL_RPATH ON)
endif()
#set_target_properties(mhm PROPERTIES SKIP_BUILD_RPATH OFF)
#set_target_properties(mhm PROPERTIES INSTALL_RPATH_USE_LINKPATH ON)
# possibility to create symlinks to the build or to the source directory, so a copy of mhm does not have to be done. On the other
# hand, only for the test basins the executable would not be copied or linked to a predictable location. So it may be a good
# idea to not copy it with the cmake setup
#add_custom_target(link_namelists ALL "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/mhm.nml" "${CMAKE_CURRENT_BINARY_DIR}/mhm.nml")
How to read this instruction:
=============================
The section 'Dependencies' lists the general requirements
for the installation. The
section 'System-dependent installation instructions' gives some instructions on
how to install these dependencies on Windows, some Linux-distributions and
soon MacOS.
The section 'Specific setups' can be skipped in most cases. If you are using
a module system or MacOS there are some additional hints for the installation
process. It might be helpful to first read the section 'Installation'. The
section 'Specific setups' then helps to adjust the commands for a build on
the specific system.
The section 'Installation' then is a step-by-step guide to install mHM in the
command line.
Dependencies:
=============
For Windows, some Linux distributions and soon also MacOS
specific installation instructions for the following list
can be found below.
- a fortran compiler
- make (a tool to compile a program)
- cmake (version >= 3.5) (a tool to create a system-dependent makefile)
- fitting netcdf-fortran libraries (libraries for the use of the data format netcdf on which mhm depends)
- (optional, but makes things much easier) git
Git is a version-control system. If you want to contribute to a project, it is highly recommended to
use Git. You can use Git to download (clone) the project to your local pc and have a look at the history or
synchronize it without copying the whole repository again. You can also download the project folder without
Git, but this would not allow you to pull updates from and push changes to our repository.
System-dependent installation instructions:
===========================================
### Windows:
[Cygwin](https://cygwin.com/) is an environment with a terminal that allows to compile and
run programs of Unix-like systems. You can find further instructions to install cygwin on the webpage, as well as
instructions on how to install further dependencies after the installation.
After the installation of cygwin and its dependencies mHM will be installed
using cygwin. All commands and the execution of mHM only run in that environment.
Install cygwin by executing the cygwin setup and choose the following dependencies:
- [ ] gcc-fortran (the fortran compiler)
- [ ] make
- [ ] cmake (version >= 3.5)
- [ ] libnetcdf-fortran-devel
- [ ] Git *(optional, Git is also available outside of cygwin, [see the Git website](https://git-scm.com/downloads))*
While installing cygwin you will have to choose a mirror. A mirror is a server
on the internet where the files for the installation come from. Choose any server
located near your city and when in doubt, choose the first one in the list.
In the next step you can find all available packages provided by cygwin, set
the view to "full". In the search panel you can filter the packages
by the dependencies listed above (e.g. make). When you choose a
version, the newest one is usually a good choice if not marked as experimental.
*Note for UFZ members:* Install cygwin locally (on your own computer), do not choose a location on the
network for the installation.
Some cygwin versions create a new home directory for you. You may check e.g. here:
C:\cygwin64\home\$username
### Ubuntu, Mint and other apt-get based systems with matching repositories:
sudo apt-get install git # (optional)
sudo apt-get install gfortran netcdf-bin libnetcdf-dev libnetcdff-dev cmake
### Archlinux:
sudo pacman -S git # (optional)
sudo pacman -S gcc-libs netcdf-fortran cmake
### Module systems:
If you are on a module system, load the modules gcc or intel depending on your
favorite compiler. Then, load the modules netcdf-fortran and cmake.
These modules will have system specific names, environments, etc.
You may use `module spider` to find the right packages and the
right dependencies, potentially use corresponding wiki pages.
#### On eve (the cluster at the UFZ):
From the source directory use a script provided in `moduleLoadScripts`,
for example for the GNU 7.3 compiler:
source moduleLoadScripts/eve.gfortran73
### MacOS:
*(to be added)*
Specific setups:
================
The following hints can replace the step `cmake ..` in the installation instruction.
You can skip this part and continue with "Installation", if you do not have a module system
setup (like on clusters) or if you have not installed all packages with a package manager,
such as cygwin or apt-get.
### Module systems:
If you are okay with loading the needed modules as described in the section 'Module systems' above before executing the program you can skip this step and continue with 'Installation'.
The executable can be built in such a way that it does not require any modules to be loaded. The
module system, though, adds system paths in the backround the user should not care about too much, so
the setup is a workaround. (This would be the case with any other building tool aswell.)
It should be stable, anyway.
In case you want to have a module-independent build, instead of just executing `cmake ..`, either run
cmake -DCMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT:STRING=ON ..
or
cmake -C ../CMakeCacheFiles/eve ..
or change the variable `CMAKE_BUILD_MODULE_SYSTEM_INDEPENDENT` with `ccmake` to `ON` after running `cmake ..`.
### Non-standard locations for the netcdf-library (e.g. standard setup Macs in CHS):
Find the location of the `nf-config` file, for example by using:
find / -iname "*nf-config*" 2>/dev/null
This searches the root directory `/` for a file with a name containing the string "nf-config" (case-insensitive). It writes error messages like "permission denied" into
the void.
Then, instead of running `cmake ..` if not using the standard compiler,
set the fortran compiler variable to the desired compiler, e.g.
export FC=gfortran
then either run
cmake -DCMAKE_NETCDF_DIR:STRING=/path/to/nf-config/of/used/compiler
or copy the file `specificSetup` to some other place:
cp ../CMakeCacheFiles/specificSetup .
However, in case you want to keep it, you should choose a place
outside the build repository. Edit the file as follows:
add the path to your `nf-config` file, and after editing, run:
cmake -C specificSetup ..
or change the variable `CMAKE_NETCDF_DIR` to the path to the `nf-config` file with `ccmake` after running `cmake ..`.
Installation
============
1. Change to a directory where you want to store the source code.
2. Clone the corresponding mHM repository into a folder, either using Git (if installed):
git clone --recurse-submodules https://git.ufz.de/mhm/mhm.git mhm/
for cloning it into a folder `mhm`, or download and unpack it
using the download link on <https://git.ufz.de/mhm/mhm>
(the cloud symbol with the arrow on it).
3. Create and change to a build directory where you want to store the build, e.g. inside the Git source directory
cd mhm
mkdir build
Change into the build directory:
cd build
4. Generate a system-dependent makefile
Execute `cmake` with the path to the Git source directory as parameter. (If you followed the instructions above, the path is `..` )
cmake ..
If everything worked well a Makefile was created with the corresponding paths.
*Note: have a look at "Specific setups" above in case you are using module systems,
or when the netcdf libraries are not located where the package manager usually installs libraries,
or when they are not saved in environment variables (i.e., classical MacOS setups at CHS).*
5. Make the build:
Execute make:
make
If this also worked fine, an executable was created, which has to be moved or copied to the Git source directory.
6. Execute the file:
cd ..
cp build/mhm .
On Windows the executable is called `mhm.exe` instead of `mhm`. In that case
instead of `cp build/mhm .` execute
cp build/mhm.exe .
Now you might execute mHM:
./mhm
*Note concerning the development of the cmake setup: one could automatically
link the executable with the `cmake` code inside the Git source directory
which is not done for two reasons:*
- *The executable depends on your local system, so it should never be commited and pushed to other users.
Nothing should be built inside the source directory automatically.*
- *The directory where mHM is executed usually is not the source directory but the directory where you want to run
your tests. In case of the test setup it is the same, usually it is not.*
Building Realease or Debug versions:
====================================
If you want to set up specific versions of the build, you can
create different folders for that. In case a release and a debug version need to be set up, it makes sense to create two folders named `debug` and `release`.
mkdir release
mkdir debug
inside the `release` folder one would execute
cmake -DCMAKE_BUILD_TYPE=Release ..
and inside the `debug` folder
cmake -DCMAKE_BUILD_TYPE=Debug ..
Executing
make
in the corresponding folder would then always result in a release build or respectively in a debug build.
Troubleshooting:
================
**cmake** is far from being my main task, so it will probably take a while until I can track a problem.
Nonetheless, I would be happy having bug reports. Feel free to write an email to <mailto:maren.kaluza@ufz.de> if there are any bugs, remarks or questions.
### MacOS, homebrew
On brew/homebrew setup MacOS systems a working nf-config is not yet available at this time. Execute:
nf-config --all
and if it says something like "is not implemented yet" the issue is not solved yet. But it is on my tracklist.
### cygwin
If libraries are not found, the problem can be:
- you accidentally tried to use commands within the cmd shell and not within the cygwin shell
- your cygwin setup might be broken. Try deinstalling, following the instructions <https://cygwin.com/faq/faq.html#faq.setup.uninstall-service>, and reinstalling again. During
reinstallation only install the required dependencies.
......@@ -9,7 +9,7 @@ cells as a primary hydrologic unit.
------------------
Copyright(c) 2005-2018,
Copyright(c) 2005-2019,
Helmholtz-Zentrum fuer Umweltforschung GmbH - UFZ.
All rights reserved.
......
......@@ -94,14 +94,14 @@ SHELL = /bin/bash
#
# . is current directory, .. is parent directory
SRCPATH := ./src/lib ./src/common ./src/mRM ./src/common_mHM_mRM ./src/MPR ./src/mHM # where are the source files
SRCPATH := ./src/lib ./src/MPR ./src/mHM ./deps/mrm/src/common ./deps/mrm/src/mRM ./deps/mrm/src/common_mHM_mRM # 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
CHECKPATH := . # path for $(CHECKPATH)/test* and $(CHECKPATH)/check* directories if target is check
DOXCONFIG := ./doc/doxygen-1.8.8.config # the doxygen config file
#
PROGNAME := mhm # Name of executable
PROGNAME := mhm # mhm # Name of executable
LIBNAME := #libminpack.a # Name of library
#
# Options
......@@ -109,7 +109,7 @@ 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 := gnu
# Releases: debug, release
release := release
# Netcdf versions (Network Common Data Form): netcdf3, netcdf4, [anything else]
......@@ -123,7 +123,7 @@ proj :=
# IMSL (IMSL Numerical Libraries): vendor, imsl, [anything else]
imsl :=
# OpenMP parallelization: true, [anything else]
openmp := false
openmp :=
# MPI parallelization - experimental: true, [anything else]
mpi :=
# Linking: static, shared, dynamic (last two are equal)
......@@ -184,8 +184,8 @@ static := dynamic
# Special compilation flags
EXTRA_FCFLAGS :=
EXTRA_F90FLAGS := #-C=undefined
EXTRA_DEFINES := -DMRM2MHM #-DMPR_STANDALONE
EXTRA_INCLUDES :=
EXTRA_DEFINES := -DMRM2MHM
EXTRA_LDFLAGS += #-Wl,--stack,12485760
EXTRA_LIBS :=
EXTRA_CFLAGS += #-Wl,--stack,12485760
......@@ -389,6 +389,7 @@ 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)
......@@ -464,7 +465,7 @@ ifneq (,$(findstring $(imsl),vendor imsl))
ifeq (,$(findstring $(iOS),Darwin))
iLIBS += -z muldefs
ifneq ($(istatic),static)
iLIBS += -i_dynamic
iLIBS += -shared-intel
endif
endif
......@@ -486,7 +487,11 @@ ifeq ($(openmp),true)
ifneq (,$(findstring $(icompiler),$(gnucompilers)))
iopenmp += -fopenmp
else
iopenmp += -openmp
ifneq (,$(findstring $(icompiler),$(intelcompilers)))
iopenmp += -qopenmp
else
iopenmp += -openmp
endif
endif
DEFINES += -DOPENMP
endif
......@@ -500,7 +505,7 @@ ifneq ($(openmp),true)
ifneq (,$(findstring $(icompiler),$(gnucompilers)))
LDFLAGS += -fopenmp
else
LDFLAGS += -openmp
LDFLAGS += -qopenmp
endif
endif
endif
......@@ -566,7 +571,11 @@ ifneq (,$(findstring $(netcdf),netcdf3 netcdf4))
$(error Error: NETCDF path '$(NCDIR)' not found.)
endif
NCINC ?= $(strip $(NCDIR))/include
NCLIB ?= $(strip $(NCDIR))/lib
ifeq (,$(findstring $(icompiler),gnu73 gnu64))
NCLIB ?= $(strip $(NCDIR))/lib
else
NCLIB ?= $(strip $(NCDIR))/lib64
endif
INCLUDES += -I$(NCINC)
ifneq ($(ABSOFT),)
......@@ -799,7 +808,6 @@ 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))
......
# The mesoscale Hydrological Model -- mHM
- The current release is **[mHM v5.9][1]**.
- The current release is **[mHM v5.10][1]**.
- The latest mHM release notes can be found in the file [RELEASES][3] or [online][4].
- General information can be found on the [mHM website](http://www.ufz.de/mhm/).
- All the details of the code can be found in the [user manual][5].
- The mHM comes with a [LICENSE][6] agreement, this includes also the GNU Lesser General Public License.
- There is a list of [publications using mHM][7].
**Please note:** The [GitLab repository](https://git.ufz.de/mhm/mhm) grants read access to the code of the release versions only.
**Please note:** The [GitLab repository](https://git.ufz.de/mhm/mhm) grants read access to the code.
If you like to contribute to the code, please contact [mhm-admin@ufz.de](mailto:mhm-admin@ufz.de).
## Cite as
......@@ -19,13 +19,21 @@ Please refer to the main model by citing Samaniego et al. (2010) and Kumar et al
The model code can be cited as:
- **mHM:** Luis Samaniego et al. (2017), mesoscale Hydrologic Model, doi:10.5281/zenodo.1069202, https://doi.org/10.5281/zenodo.1069202
- **mHM:** Luis Samaniego et al. (2019), mesoscale Hydrologic Model, doi:10.5281/zenodo.1069202, https://doi.org/10.5281/zenodo.1069202
## Install
Please see the file [DEPENDENCIES][8] for external software required to run mHM.
See also the [users manual][5] for detailed instructions to setup mHM.
As from June 2019, new option to compile mHM with cmake is provided, see more details under [cmake manual][9].
## Receive mHM
The git repository of mHM uses submodules. To include these in the clone command, please use:
```
git clone --recurse-submodules https://git.ufz.de/mhm/mhm <local-path>
```
## Quick start
......@@ -34,11 +42,12 @@ See also the [users manual][5] for detailed instructions to setup mHM.
3. Explore the results in the [output directory](test_basin/), e.g. by using the NetCDF viewer `ncview`.
[1]: https://git.ufz.de/mhm/mhm/tags/v5.9
[2]: https://git.ufz.de/mhm/mhm/repository/v5.9/archive.zip
[1]: https://git.ufz.de/mhm/mhm/tags/5.10
[2]: https://git.ufz.de/mhm/mhm/repository/5.10/archive.zip
[3]: doc/RELEASES.md
[4]: https://git.ufz.de/mhm/mhm/tags/
[5]: doc/mhm_manual_v5.9.pdf
[5]: doc/mhm_manual_v5.10.pdf
[6]: LICENSE
[7]: doc/mhm_papers.md
[8]: doc/DEPENDENCIES.md
[9]: INSTALL.md
This diff is collapsed.
......@@ -68,6 +68,7 @@ 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
case_mrm 01 :: check mRM stand alone version
# -------------------------------------------------------------------------------------------
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755