Commit f5ba4a8d authored by Robert Schweppe's avatar Robert Schweppe

Merge branch 'develop' into 'master'

releasing version 0.2

See merge request !24
parents 7a912492 363b17e4
------------------
Copyright(c) 2018,
Helmholtz-Zentrum fuer Umweltforschung GmbH - UFZ.
All rights reserved.
The code is a property of:
Helmholtz-Zentrum fuer Umweltforschung GmbH - UFZ
Registered Office: Leipzig
Registration Office: Amtsgericht Leipzig
Trade Register: Nr. B 4703
Chairman of the Supervisory Board: MinDirig Wilfried Kraus
Scientific Director: Prof. Dr. Dr. h.c. Georg Teutsch
Administrative Director: Dr. Heike Grassmann
------------------
##Redistribution
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions, the following disclaimer
and the modification conditions.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, the following disclaimer and the
modification conditions in the documentation and/or other materials
provided with the distribution.
* Neither the name of Helmholtz-Zentrum fuer Umweltforschung GmbH -
UFZ, nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior
written permission.
* Redistributions of source code are allowed for research purposes
ONLY. For commercial applications you need to consult the
authorities of the UFZ.
##Modification
If software is modified to produce derivative works, such modified
software should be clearly marked, so as not to confuse it with the
version available from UFZ. The following sources are to be
acknowledged:
TODO: add citation
##Disclaimer of Warranty
THERE IS NO WARRANTY FOR THIS SOFTWARE, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
HELMHOLTZ-ZENTRUM FUER UMWELTFORSCHUNG GMBH - UFZ AND CONTRIBUTORS
PROVIDE THIS SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS
WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
##Limitation of Liability
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL THE HELMHOLTZ-ZENTRUM FUER UMWELTFORSCHUNG GMBH - UFZ AND
CONTRIBUTORS OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE
SOFTWARE AS PERMITTED BY GNU GENERAL PUBLIC LICENSE, BE LIABLE FOR
DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA, OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY THE USER OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##Redistribution of Example Data
The example data provided with the UFZ CHS MPR preprocessor
are strictly for use in non-commercial research and non-commercial
education projects only. They are not to be redistributed or used
without the consideration of the licenses they were originally provided
under. The following list acknowledges the providers of the example
data for MPR and links to the licenses the data was provided under.
-- TODO: list sources of test data
This diff is collapsed.
......@@ -94,7 +94,7 @@ SHELL = /bin/bash
#
# . is current directory, .. is parent directory
SRCPATH := src/ # where are the source files; use test_??? to run a test directory
SRCPATH := src/ deps/lib/src # where are the source files; use test_??? to run a test directory
PROGPATH := . # where shall be the executable
CONFIGPATH := make.config # where are the $(system).$(compiler) files
MAKEDPATH := $(CONFIGPATH) # where is the make.d.sh script
......
# Multiscale parameter regionalization - MPR
- The current release is **[MPR 0.2](https://git.ufz.de/chs/MPR/tags/0.2)**.
- General information can be found on the [MPR website](http://www.ufz.de/index.php?en=40126).
**Please note:** The [GitLab repository](https://git.ufz.de/chs/MPR) 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 us in your scientific work
TODO: add citation, once it is published
The code can be cited as:
- **MPR:**
## Installation
Please see the file [DEPENDENCIES](docs/src/dependencies.md) for external software required to run MPR.
All Python libraries needed to run the pre-processor script ([f90nml](https://github.com/marshallward/f90nml))
and the documentation builder ([FORD](https://github.com/Fortran-FOSS-Programmers/ford/wiki/Dependencies))
are also available on the UFZ Eve Linux-Cluster when loading the module from
`/global/apps/chspython/virtualenvs/python-3.6.2/`.
## Compilation
The code is based on the Fortran90 standard and also uses many features from
the Fortran 2003 and 2008 standards. MPR is routinely tested with the following
compilers: gfortran versions 6.0, 7.3 and 8.1, nag 6.2 (>build 6214). We
hope to support ifortran version 18.0 from Intel soon (pending bug report).
On the UFZ Eve Linux Cluster, currently only the gfortran compiler 7.3 works.
## Documentation
In the near future, the documentation will be hosted on a gitlab server of the UFZ (gitlab pages),
once the infrastructure is set up. Until then the documentation needs to be
built locally by running the tool [FORD](https://github.com/Fortran-FOSS-Programmers/ford):
`ford ./docs/MPR.md` and then view `./doc/index.html` in your browser.
## License
The UFZ CHS MPR preprocessor is free software. You can
redistribute it and/or modify it under the terms of the GNU General
Public License as published by the free Software Foundation either
version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You received a copy of the [GNU Lesser General Public License](LICENSE) along
with the UFZ CHS MPR preprocessor. The
complete GNU license text can also be found at
<http://www.gnu.org/licenses/>.
## Quick start
1. Compile MPR with the `make` command, which uses settings from [Makefile](Makefile).
2. Run MPR with our test configuration `./mpr`, which uses settings from [mhm.nml](./predefined_nmls/mpr_default.nml).
3. Explore the results in the [output file](./default_output.nc), e.g. by using the NetCDF viewer `ncview`.
@Bugs
With gFortran compiler:
- (version 8.0), an error is issued ("Fortran runtime error: Bad repeat count in item * of list input"), if
to_file keyword is not last in respective data_array block.
- (version 6.0-8.0), the file mpr_global_paramaters.nml raises an end-of-file-error.
Strangely, it works when adding another line with a backslash at the end of the file.
# Created by .ignore support plugin (hsz.mobi)
### Fortran template
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
### Windows template
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### SublimeText template
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# SFTP configuration file
sftp-config.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Vim template
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
### Xcode template
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## User settings
xcuserdata/
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
### Linux template
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = git@git.ufz.de:chs/lightweight_fortran_lib.git
branch = master
commit = 570476ffee69c6a6f4a7a46226eb32a5640cb86e
parent = dd200c958a2877ea8b8c4af76ad5fca2ba6152db
method = merge
cmdver = 0.4.0
This file is part of the UFZ lightweight Fortran library.
The routine is released under the GNU Lesser General Public License. The following applies:
The UFZ Fortran library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The UFZ Fortran library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the UFZ Fortran library (cf. gpl.txt and lgpl.txt).
If not, see <http://www.gnu.org/licenses/>.
This is the lightweight FORTRAN library of the
Department Computational Hydrosystems
Helmholtz Centre for Environmental Research - UFZ
Permoserstr. 15
04318 Leipzig, Germany
One can produce a browseable html of the library in the directory html by calling: make SRCPATH=. html
The library is maintained with a versioning system at:
https://git.ufz.de/chs/fortran
For running on Windows under Cygwin:
The link files on the SVN server are *nix style. One has to redo them on Windows.
In cygwin, in the directory FORTRAN_chs_lib do:
for i in $(find . -mindepth 2 -maxdepth 2 -name mo_\* -print) ; do if [[ $(head -1 $i | cut -f 1 -d ' ') == link ]] ; then cd $(dirname $i) ; ln -sf ../$(basename $i) ; cd .. ; fi ; done
for i in $(find . -mindepth 3 -maxdepth 3 -name mo_\* -print) ; do if [[ $(head -1 $i | cut -f 1 -d ' ') == link ]] ; then cd $(dirname $i) ; ln -sf ../../$(basename $i) ; cd ../.. ; fi ; done
cd test/test_mo_kernel ; ln -sf ../../nr_chs/golden.f90 ; cd ../..
Please do not commit these files because it will break the Library everywhere else except on Cygwin.
Created 11.11.2011 by Juliane Mai and Matthias Cuntz
Contact Matthias Cuntz - mc (at) macu.de
License
-------
This file is part of the UFZ lightweight Fortran library.
The routine is released under the GNU Lesser General Public License. The following applies:
The UFZ Fortran library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The UFZ Fortran library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the UFZ Fortran library (cf. gpl.txt and lgpl.txt).
If not, see <http://www.gnu.org/licenses/>.
This diff is collapsed.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.