Coder Social home page Coder Social logo

aquaticecodynamics / libaed2 Goto Github PK

View Code? Open in Web Editor NEW
14.0 13.0 16.0 838 KB

Code for the AED2 water quality / ecology library

Home Page: http://aquatic.science.uwa.edu.au/research/models/AED/

License: GNU General Public License v3.0

Makefile 0.83% Fortran 98.59% C 0.59%
aem water quality aquatic ecology lakes estuaries phytoplankton nutrients sediment

libaed2's People

Contributors

brendan-busch avatar casper-boon avatar danparaska avatar matthipsey avatar rqthomas avatar

Stargazers

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

Watchers

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

libaed2's Issues

Param filetype for reading nameless phyto_data

Since 0d76de1 GLM v3.1 doesn't recognize my phytoplankton namelist file (neither NML nor CSV) when starting a simulation. I did test this on Windows 10 Home and macOS Catalina. I always get

         aed2_phytoplankton initialization
 Unknown file type "aed2/aed2_phyto_pars.csv"
STOP Error reading namelist phyto_data

Thanks!

Benthic Initialisation variable check

Initialising "AED2" external module:
init_var_aed2_models : nwq = 15 nwqben = 1
spatial AED2 var initialisation from file:
../External/AED2/resuspension_map.csv
set_env_aed2_models : linking to host environment vars
Successful.

Log successfully initialised variables to screen and report unused columns.

Gas exchange parameterization

It seems that all the provided parameterizations for k600 are rather valid for oceans, open lakes or estuaries. I was wondering why no formula for more sheltered lakes was included (for example Cole & Caraco, 1998). In my experience, gas exchange is underestimated in lakes if there is no lower limit for gas exchange in no-wind conditions and Cole & Caraco, 1998 seems to perform well in such cases.

segmentation faults with multiple aed modules

I've posted this on the AEMON forum as well, but thought I'd put it up here too:
When I try to run aed modules beyond tracer and noncohesive, I'm getting seg faults, although if I take those modules out, I can (sometimes) run a few more modules. This issue is occurring on multiple systems:
I have GLM 3.0.1 running on a Unix cluster, and Ubuntu in Windows subsystem for Linux, and 3.0.0 on a Mac. The two Unix versions are just running the package installed from apt-get, which provides glm built with gcc 7.4.0, and libaed version 1.3.1 built with gfortran 8.3.0. The mac is running the downloaded package from the AED website, and provides glm built with gcc 4.2.1 and libaed2 version 1.3.0 built with gfortran 8.3.0.
I have also re-built GLM from source using AED_tools on Ubuntu, which bumped it to 3.0.2, but didn’t affect the issue.

Here's some more detail about what runs and what doesn't (I've been primarily testing with Kinneret, but I'm getting the same issues with my lake as well):

Runs
Tracer and noncohesive
Oxygen alone (sometimes have to try a few times if it failed previously)
Oxygen, carbon, silica
Oxygen, carbon, silica, nitrogen (Mac and cluster ONLY, and sometimes have to try a few times, never runs on Ubuntu in WSL)
Fails
Tracer, noncohesive, and oxygen
Tracer and oxygen
Noncohesive and oxygen
Oxygen, carbon, silica, nitrogen (always fails on Ubuntu in WSL, sometimes on Mac and Unix cluster)
Adding phosphorus to O, C, S, and N breaks, but not with a seg fault, (it needs noncohesive)
Flipping tracer or noncohesive to after o2 fails, but not with a seg fault (they need to be first)

My fortran is far too weak to start figuring out where the modules are stomping on each other, but hopefully the above lists of combinations help narrow it down. There was a suggestion on AEMON to compile with Intel, so I'll work on giving that a shot.

Segmentation fault with simCH4ebb=true

Hi,

If simCH4ebb is true (or undefined) in the config file, I get a segfault in my Simstrat-AED2 model. I found out that it is related to the following warning during compilation of AED2:

src/aed2_carbon.F90:715:0:

   _DIAG_VAR_S_(data%id_atm_ch4_ebb) = ebb_flux * (1-data%ch4_bub_disf1) * secs_per_day

Warning: 'ebb_flux' may be used uninitialized in this function [-Wmaybe-uninitialized]

Organic matter transfer

Hi everyone,

I have concerns about the transfer of organic matter within the lake I want to model. I added in my inflow non-zero values of OGM_doc, OGM_don and OGM_dop but when I plot the evolution of nitrates, phosphates or chlorophyll the chronicles are identical, with or without inflow. The only parameter that changes (and this is logical) is the three components of the DOM. However in the equations of NO3 or PO4 the DOM appears so I don't understand why the transformation is not done.

Thanks for your help,

Alexis

PHS_atm_dip_flux diagnostic variable

In my aed2.nml file I have
simDryDeposition = .TRUE.
atm_pip_dd = 0.004
simWetDeposition = .TRUE.
atm_frp_conc = 1.8
but in the resulting .nc file the value of PHS_atm_dip_flux is all zeros. If I change the 0.004 and 1.8 to 0.0 and 0.0 the results change, suggesting that atmospheric deposition is being accounted for, but the diagnostic variable is not being reported.
I also find that OGM_sed_dop is all zeros, though OGM_sed_pop is not. Is it possible there is a bug in the calculation of these?

Settling configurations in mobility

Currently running GLM 3.0.0 with AED2 1.3.0 and tested this on a Mac and a Windows machine. It seems that the settling configuration in the aed2_mobility subroutines is not functioning as intended. Changing the settling configuration won't affect the model outcome, as it seems that GLM is always using the DEFAULT CASE with vvel = data%w_pom and vvel_cpom = data%w_cpom (instead of for instance Stoke's Law).

My guess is that the keywords from aed2.h aren't read in properly, as AED2 doesn't recognize the settling/migration keyword.

Bug in carbon module

There is a bug in the carbon module on line 278:
data%id_depth= aed2_locate_global('layer_ht')

It should be 'depth' instead of 'layer_ht'!

The current version assigns the layer height to the depth array (instead of depth).

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.