Coder Social home page Coder Social logo

philippkraft / cmf Goto Github PK

View Code? Open in Web Editor NEW
56.0 8.0 18.0 32.38 MB

Catchment Modelling Framework, a hydrologic modelling toolbox

Home Page: https://philippkraft.github.io/cmf

License: GNU General Public License v3.0

Batchfile 0.04% Python 7.73% C++ 79.45% Shell 0.04% SWIG 12.64% CMake 0.09%
hydrology hydrological-model water-quality

cmf's People

Contributors

bees4ever avatar cpwnd avatar florianjehn avatar kbstn avatar philippkraft avatar thouska avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmf's Issues

Remove StateVariableOwner as a parent class

Using the StateVariableOwner as a public parent class of a bunch of things fits to a Java like inheritance concept but not to a Python extension. A template method of the Integrator to scan for statevariables should do.

Bracket access to solute storage

The current access to solute (here X) storages of water storages (here WS) is super ugly:

WS.Solute(X).state

This issue proposes a nicer access like:

WS[X].state

Additionally we can move the conc method from water storage to a property of the solute storage

WS[X].conc

Rename misleading connection names

Some of the connection names in cmf are misleading. This issue is the place to collect these connections. If you find some connection name not really fitting (or if you dislike a proposal below), please write it here as a comment.

Starting with cmf 1.4, new names should be available as alternative (aka from future import), for cmf 2.0, the new names will be mandatory. For cmf 2.0 a tool to translate old scripts to the new names should be available.

Needing a tutorial on time scale

Many hydrological models work with a fixed daily timestep, but processes like interception and surface runoff occur for a much shorter timestep. Every now and then CMF shows a "weird" behaviour, which is not weird at all, but just an artifact due to a too large timestep. We need a tutorial to help users select the "right" timestep in their solvers. And this means not too long.

Organize cmf.draw

The cmf.draw package was never really documented and is an old grown mess. Some refactoring and organizing is needed.

Handle different compiler flags for C and C++ files

Using C flags for C++ can create warnings, this is already handled in setup.py:51-63. However, when gcc compiles C files from the CVODE solver, no there are warnings about using C++ flags on C code, eg. -std=C++11. On macOS with CLang, this produces errors and cmf is not compiled.

Error API Manning equation

Hello,

seems like there is an error in the description of the Manning's equation (https://philippkraft.github.io/cmf/classcmf_1_1river_1_1_manning.html). I think the equation should look like this:

q_manning = (1/n_manning) * (A/P)(2/3) * (delta_z)(1/2)*A

Maybe split the calculation of the total flow (m3/sec) into the two calculation steps flow_velocity (m/s) and flow_rate (m³/sec):

flow_velocity = (1/n_manning) * (A/P)(2/3) * (delta_z)(1/2)
flow_rate = flow_velocity * A

Cheers,
Sebastian

check_manning.zip

Import issue and runtime error with fit_retention_curve.py

from cmf import fit_retention_curve
raises the follwoing error:
AttributeError: Unknown C global variable 'VERSION'

The scipy.optimize.fmin function tries unallowed values for the mf.VanGenuchtenMualem function and returns an RuntimeError.

Work arround excepet error and return high error for unallowed values.
def get_error_vgm(params,pF,theta):
try:
vgm=cmf.VanGenuchtenMualem(1.0, *params)
model_wetness=vgm.Wetness_pF(pF)
err = np.sum((theta - params[0] * model_wetness )**2)
except RuntimeError:
err = 999999999
return err

Make cmf.timeseries pickable

Python does not know how to pickle cmf.timeseries.

  • implement __getstate__ and __setstate__ for timeseries returning the buffer or a dict of the characteristics.
  • make begin and step writable

kinematic surface runoff

Hello,

one question related to cmf.KinematicSurfaceRunoff. The description in the API says that "w is the width of the shared boundary between the surface water storage and the target node". For example, two storages are defined in the tutorial "surface runoff" (one cell and one outlet) which don't have a spatial extent, just only a location. So how is the parameter w calculated?

Cheers,
Sebastian

layer.soil.K(0.5) not working

Most functions of retention curve except array-like parameters but raise an ValueError when called with a scalar.

Message:

ValueError: object of too small depth for desired array

Not compiling on MacOS

Dear Philipp,
thank you for this nice work. I tried to get CMF running on my machine but miserably failed to do so. Neither from source nor from pip, neither with Py3.6 nor with Py2.7 I can get gcc to compile. I actually guess it to be a compiler setting issue, but I do not see, where these are specified...
Could you point me to allow for optional compiler settings directing to a specific compiler (like gcc-8)?
Thank you.
Conrad

Never ending runs on Skylla (sometimes on PC as well)

When running models on Skylla the problem occurs, that some runs never seem to finish. This causes the jobs to be killed after their assigned runtime is over, without ever finishing.
This has been happening when using Spotpy for calibration with the algorithms rope, MC and LHS.
Seems to be related to the beta value in kinematic waves. The smaller the value, the more runs never end. Values of beta > 0.5 do not seem to show this behaviour.

Related to:
thouska/spotpy#59

Remove inline

Remove all inline statements - possibly harmful for linking

Drop Python 2 support

Supporting Python 2 has two problems:

  1. that all cmf code must be written in Python 2 (partly simplified by __future__ imports) and cannot be ported directly to Python 3.
  2. On Windows, the C++ Code must be compiled with VS2007, which does not support C++11 and later features, and we need to use Boost instead.

Add solvers tolerant to infinite values

The nice error reporting for not finite results in connections can render recoverable errors to be unrecoverable. By allowing some retries in a solver, calculations can become more robust

Proposed solution

Change cmf.integrator.call(...) to the following:

    def __init__(self, project, err_tol=1e-9, max_errors=10):
        super().__init__(project, err_tol)
        self.errors = []
        self.max_errors = max_errors

    def __call__(self, t, reset=False):
        import sys
        until = self.t + t if t < self.t else t
        while self.t < until:
            try:
                self.integrate_until(until, reset=reset)
            except RuntimeError as e:
                if len(self.errors) < self.max_errors:
                    self.errors.append((self.t, e))
                    self.reset()
                    sys.stderr.write(str(e) + '\n')
                else:
                    raise

        return self.t

Additional (simple) way to compute Evapotransporation

Oudin et al (2005, Which potential evapotranspiration input for a lumped
rainfall–runoff model?) developed an simple PET calculation method. This seems to be working very good for lumped conceptual models and also needs little forcing data (Mean Temperature and Radiation).
Might be worth including.

cmf.describe has unicode problems in Python 2.7

Error in cmf.describe

cmf/describe.py in _describe_project(project, write)
     91
     92 def _describe_project(project, write):
---> 93     write(0, '{}'.format(project))
     94     write()
     95

cmf\describe.py in write(indent_level, text)
     52         Helper function to write output to the out stream with identation
     53         """
---> 54         out.write('    ' * indent_level + text + '\n')
     55
     56     def iterable(obj):

TypeError: unicode argument expected, got 'str'

error with the state variable after any(?) flux connection

having a (1D) model setup including:

A = valueA
B = valueB
cmf.external_control_connection(source, traget, A * source.volume^2 + B * source.volume)

I run it by

for t in solver.run(start, end, cmf.day):

but it doesn't seem to work.

could you please provide an excample how to use cmf.external_control_connection

cmf.waterbalance_connection does not work proberly

Hello,
waterbalance_connection is ignoring other defined outflux from left node.
(trying the online tutorial as in the linked code, the flux_s3_s5 does not match with its definition - due to ignoration by waterbalance_connection). I also tried to change the order of the flux definitions - didn't fix the issue yet.
I expected waterbalance_connection to do this: flux_s3_s4 = flux_s1_s3 + flux_s2_s3 - flux_s3_s5 (see tutorial).

waterbalance_tut_RN.zip

some things are strange with the tutorial for the waterbalance_connection, too:
I: in the online tutorial the initial volumes for s1 and s2 are missing
II:

flux_s1_to_s3 = [] flux_s2_to_s3 = [] #insert ','
flux_s3_to_s4 = [] flux_s3_to_s5 = [] #insert ','
plt.ylabel("Flux [m³/day]") plt.xlabel("Time [days]") #insert ','

Rewrite geometry support

Follow up to #7.

With using the __geo_interface__, the cells_from_polygons function will get a complete rewrite with API change. The callables are hard to explain and ugly to use.

  • But how to gain that flexibility else?
  • Or is documentation enough?

balance field runoff

Hello,

I am working on the calculation of surface runoff for one cell with a given flow width and slope. I like to balance the runoff for each hourly time step. I am not sure about the right way to dothis, because the method "flux_to" is just a snapshot for the time of the function call. If the runoff event occurs in a time frame of less than a hour, one would miss the peak. Running the model with seconds as time step is no option. Another solution would be to use a virtual storage which collects all the water from the surface water storage and then to calculate the balance from the volume change. But I am not sure if I have implemented this correctly, because I couldn't create any runoff in my example.

Please find attached a test file.

Would be great to get help!
Sebastian

cmf_balance_surfacerunoff.zip

Multiprocessing - 'TypeError("can't pickle SwigPyObject objects",)'"

Hello,

I am trying to run several cmf1D cells in parallel with the Python in-build package multiprocessing. When I am using a simple example everything works quite well (see attached file). But when I am trying to run a complex setup (not attached; the setup contains several sub-classes and input files and I like to clarify if this is a known issue before I upload the entire setup) an error is raised:

_"MaybeEncodingError: Error sending result: '<LandscapeModel.SubCatchment.SubCatchment object at 0x00000000052D4FD0>'. Reason: 'TypeError("can't pickle SwigPyObject objects",)'"

Any experience with this error? Seems to be related to the swig-wrapper.

Cheers,
Sebastian

cmf_parallel.zip

cell.set_uptakestress works not as expected

cell.set_Uptakestress does not set the uptake stress of the cell, instead it does a one time setting of all ET connection to use the uptakestress function. Not clear.

To solve this:

  • Make cell layer owner of the uptake stress
  • Remove ownership of uptake stress from stressedET
  • Add cell layer pointer to stressedET
  • Use cell layer pointer to retrieve uptakestress from cell
  • Create a use_for_cell function to children of RootUptakeStessFunction

error using CMF

Hello,

after successfully installation of cmf on windows an error occurs when import cmf which says "Module not found error : No module named cmf_core" (see attached screenshot). Any ideas how to solve this?

cmf-version: 1.4.1
Python:3.7.1
win64

Best regards,
Sebastian

image

More crossection types can be implemented on demand

Hello,

would be great to have a "TrapezialReachType" for simulating stream flow in addition to existing types as listed in the tutorial:

"If you create a reach for the project, you must give the crossectional geometry of the river. The different basic geometries are:
TriangularReach - T, a river with a triangular crosssection
SWATReachType - S, a river with a trapezoidal crossection, with a flat flood plain, as in the model SWAT
RectangularReach - R, a rectangular crosssection
PipeReach - P, a circular pipe
More crossection types can be implemented on demand.
"

Please find attached some examples of stream types which I am trying to simulate. The wet surface of the stream is a sensitive parameter I am interested in. The existing channel geometries are not sufficient to represent all of them and result in unrealistic estimates of the wet surface.

Cheers,
Sebastian

channel3
channel1
channel2

Shuttleworth-Wallace: Inconsistent behavior in wet to dry leaves transition

The potential transpiration rate PTR is reduced by the actual interception rate AIR- this is copied from BROOK90. However, AIR is derived from PIR with an own mechanism. This leads to a raise of ground evaporation GER if PIR>AIR>PTR. GER has the roughly same value for AIR=PIR>PTR and PIR>PTR>=AIR.

CMF 1.0.4 install error on Skylla

New CMF Version throws error on install on skylla.

[sf1962@skylla1 ~]$ pip install cmf --upgrade --user
Collecting cmf
Using cached cmf-1.0.4.tar.gz
Building wheels for collected packages: cmf
Running setup.py bdist_wheel for cmf ... error
Complete output from command /cm/shared/apps/python/3.5.0/bin/python3 -u -c "i mport setuptools, tokenize;file='/tmp/pip-build-1huce24n/cmf/setup.py';f=get attr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.clo se();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/tmpl3rfuglopip-w heel- --python-tag cp35:
/cm/shared/apps/python/3.5.0/lib/python3.5/distutils/dist.py:261: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/cmf
copying cmf/maps.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/fit_retention_curve.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/init.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/describe.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/jacobian.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/extend_project.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/geos_shapereader.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/soil.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/stopwatch.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/cell_factory.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/cmf_core.py -> build/lib.linux-x86_64-3.5/cmf
creating build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/hillplot.py -> build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/init.py -> build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/draw_misc.py -> build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/shapemap.py -> build/lib.linux-x86_64-3.5/cmf/draw
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'cmf._cmf_core' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/cmf
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/reach
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/atmosphere
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/geometry
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math/integrators
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math/integrators/sundial s_cvode
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math/integrators/sundial s_cvode/src
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/water
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope/vegetation
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope/Soil
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope/connections
gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall - Wstrict-prototypes -fPIC -Icmf/cmf_core_src/math/integrators/sundials_cvode/incl ude -I/home/sf1962/.local/lib/python3.5/site-packages/numpy/core/include -I/cm/s hared/apps/python/3.5.0/include/python3.5m -c cmf/cmf_core_src/cmf.cpp -o build/ temp.linux-x86_64-3.5/cmf/cmf_core_src/cmf.o -Wno-comment -Wno-reorder -Wno-unus ed -Wno-sign-compare -ggdb -std=c++11 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/Obj C but not for C++ [enabled by default]
gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall - Wstrict-prototypes -fPIC -Icmf/cmf_core_src/math/integrators/sundials_cvode/incl ude -I/home/sf1962/.local/lib/python3.5/site-packages/numpy/core/include -I/cm/s hared/apps/python/3.5.0/include/python3.5m -c cmf/cmf_core_src/project.cpp -o bu ild/temp.linux-x86_64-3.5/cmf/cmf_core_src/project.o -Wno-comment -Wno-reorder - Wno-unused -Wno-sign-compare -ggdb -std=c++11 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/Obj C but not for C++ [enabled by default]
In file included from cmf/cmf_core_src/atmosphere/meteorology.h:26:0,
from cmf/cmf_core_src/project.h:24,
from cmf/cmf_core_src/project.cpp:19:
cmf/cmf_core_src/atmosphere/../water/WaterStorage.h:22:35: fatal error: ../mat h/statevariable.h: No such file or directory
#include "../math/statevariable.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1


Failed building wheel for cmf
Running setup.py clean for cmf
Failed to build cmf
Installing collected packages: cmf
Found existing installation: cmf 1.0.3
Uninstalling cmf-1.0.3:
Successfully uninstalled cmf-1.0.3
Running setup.py install for cmf ... error
Complete output from command /cm/shared/apps/python/3.5.0/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-1huce24n/cmf/setup.py';f=g etattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.c lose();exec(compile(code, file, 'exec'))" install --record /tmp/pip-g1dnkoy7 -record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
/cm/shared/apps/python/3.5.0/lib/python3.5/distutils/dist.py:261: UserWarnin g: Unknown distribution option: 'python_requires'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/cmf
copying cmf/maps.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/fit_retention_curve.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/init.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/describe.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/jacobian.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/extend_project.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/geos_shapereader.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/soil.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/stopwatch.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/cell_factory.py -> build/lib.linux-x86_64-3.5/cmf
copying cmf/cmf_core.py -> build/lib.linux-x86_64-3.5/cmf
creating build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/hillplot.py -> build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/init.py -> build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/draw_misc.py -> build/lib.linux-x86_64-3.5/cmf/draw
copying cmf/draw/shapemap.py -> build/lib.linux-x86_64-3.5/cmf/draw
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
building 'cmf._cmf_core' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/cmf
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/reach
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/atmosphere
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/geometry
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math/integrators
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math/integrators/sundi als_cvode
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/math/integrators/sundi als_cvode/src
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/water
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope/vegetation
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope/Soil
creating build/temp.linux-x86_64-3.5/cmf/cmf_core_src/upslope/connections
gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Icmf/cmf_core_src/math/integrators/sundials_cvode/in clude -I/home/sf1962/.local/lib/python3.5/site-packages/numpy/core/include -I/cm /shared/apps/python/3.5.0/include/python3.5m -c cmf/cmf_core_src/cmf.cpp -o buil d/temp.linux-x86_64-3.5/cmf/cmf_core_src/cmf.o -Wno-comment -Wno-reorder -Wno-un used -Wno-sign-compare -ggdb -std=c++11 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/O bjC but not for C++ [enabled by default]
gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Icmf/cmf_core_src/math/integrators/sundials_cvode/in clude -I/home/sf1962/.local/lib/python3.5/site-packages/numpy/core/include -I/cm /shared/apps/python/3.5.0/include/python3.5m -c cmf/cmf_core_src/project.cpp -o build/temp.linux-x86_64-3.5/cmf/cmf_core_src/project.o -Wno-comment -Wno-reorder -Wno-unused -Wno-sign-compare -ggdb -std=c++11 -fopenmp
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/O bjC but not for C++ [enabled by default]
In file included from cmf/cmf_core_src/atmosphere/meteorology.h:26:0,
from cmf/cmf_core_src/project.h:24,
from cmf/cmf_core_src/project.cpp:19:
cmf/cmf_core_src/atmosphere/../water/WaterStorage.h:22:35: fatal error: ../m ath/statevariable.h: No such file or directory
#include "../math/statevariable.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------

Rolling back uninstall of cmf
Command "/cm/shared/apps/python/3.5.0/bin/python3 -u -c "import setuptools, toke nize;file='/tmp/pip-build-1huce24n/cmf/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code , file, 'exec'))" install --record /tmp/pip-g1dnkoy7-record/install-record.t xt --single-version-externally-managed --compile --user --prefix=" failed with e rror code 1 in /tmp/pip-build-1huce24n/cmf/

Update let it flow

Let it flow contains deprecated ways to use cmf.

  1. Uses cmf.kinematic_wave instead of cmf.LinearStorage
  2. Takes position argument for storage, although it is not needed

Semidistributed Tutorial

Write a tutorial that reflects a model consisting of several subcatchments with different rainfall stations and three landuse types

GIR of ShuttleworthWallace description

using GIR in a simple model (attached file) with and without canopy cover results in
grafik
and
grafik
and
grafik
this makes me think GIR is potential evaporation of an openwater like storage (cell.surfacewater) in [mm/day] is this right?
But I can't find any formula in your API Documentaion or tutorials how it is calculated.

Could you please provide a more detailed description?

GIR_test_modell.zip

surface water flux

Hello,

I am interested in balancing surface water runoff for a single cell. For this, I have prepared a brief example consisting of only one cell with a surface water storage and other storage which collects the water from the sw-storage. The input parameters are Manning's roughness coefficient, the flowwidth and slope between storages. When comparing different parameter setups the impact of Manning's coefficient seems to be reasonable. But I wonder why the topographic slope has almost no impact on runoff generation. The slope needs to be greater than zero to have runoff, but then no further impact can be found.

As I understood CMF makes use of the St. Vernant equation, i.e. the root of the topographic gradient is divided by the Manning's roughness coefficient in the underlying equation. So, the impact of the slope might be very low on the resulting runoff. But is this feasible?

Cheers,
Sebastian

cmf_balance_surfacerunoff.zip

Install Error - Doxyfile

I'm trying to install CMF on a unix machine, but when I try to install it I get the following error:

  Using cached cmf-1.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-tnahe9m6/cmf/setup.py", line 211, in <module>
        updateversion()
      File "/tmp/pip-build-tnahe9m6/cmf/setup.py", line 82, in updateversion
        doxycode = open('Doxyfile').readlines()
    FileNotFoundError: [Errno 2] No such file or directory: 'Doxyfile'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-tnahe9m6/cmf/ 

I tried on different machines but I get the same error on both of them.

Install not possible on hpc cluster

Installing on skylla throws error message:

pip install cmf --user --upgrade
Collecting cmf
  Downloading cmf-1.1.1.tar.gz (2.4MB)
    100% |████████████████████████████████| 2.4MB 225kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-6f6z0jeg/cmf/setup.py", line 211, in <module>
        updateversion()
      File "/tmp/pip-build-6f6z0jeg/cmf/setup.py", line 82, in updateversion
        doxycode = open('Doxyfile').readlines()
    FileNotFoundError: [Errno 2] No such file or directory: 'Doxyfile'

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6f6z0jeg/cmf/

pip install cmf fails for linux / mac os

Current pypi version 1.3 fails to build on linux / mac os due casing problem of cmf_core_src/atmosphere/meteorology.h. Recreate package from linux. Workaround: Clone this repository and build from scratch with python setup.py install

Move doc to GitHub

The docs are still on the server in the Uni using trac and are written in Wiki-Creole.

Steps needed for wiki

  • (w1) export trac sqlite db table wiki into one file per line for newset version, or use git for versioning
  • (w2) translate creole to markdown or rst
  • (w3) upload to philippkraft/cmf.wiki

Steps needed for API doc

  • (a1) move doxygen html output to cmf/doc
  • (a2) create project github.io page in settings using doc directory

runtime when simulating trace

Hello,

I am using a really basic setup of CMF to simulate stream flow in a small number of river segments. The simulation of solely water fluxes is quit fast regarding performance. But when adding a tracer the simulation time increased by a factor of >200. I cannot figure out the reason for the large difference in performance when using CMF with and without a tracer (keeping in ind that the tracer flux is only conservative transport).

Would be great discuss this!

Cheers,
Sebastian

cmf_runtime_daily

Explain the structure of a cmf model better

Until now, all tutorials follow a ceratain structure - however it is not well explained why this structure is important. And this can lead to confusion about storages not reacting to the dynamics (#32).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.