-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CMake build system and Pkgconf pc file #17
base: main
Are you sure you want to change the base?
Conversation
* Variable remineralisation rate (reminr) that increases as phytoplankton biomass increases and decreases with depth (emulating variable sinking rate of detritus) * Fixed a bug in the calculation of the minimum Fe quota of phytoplankton that reduced their dFe limitation * Added new diagnostics, particularly for terms contributing to the calculation of nutrient limitations
…My changes are: * new light diagnostics and chlorophyll light limitation diagnostic * made zooplankton epsilon (prey capture coefficient) variable from zooepsmin to zooepsmax * slowed dFe uptake by phytoplankton to min of 20% under darkness and nitrogen limitation * made remineralisation of detritus quadratic rather than linear to allow more detrital aggregation in gyres
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harshula Here are some comments plus a couple of questions.
CMakeLists.txt
Outdated
find_package(MPI REQUIRED COMPONENTS Fortran) | ||
find_package(PkgConfig REQUIRED) | ||
pkg_check_modules(NETCDF REQUIRED IMPORTED_TARGET "netcdf-fortran") | ||
pkg_check_modules(FMS REQUIRED IMPORTED_TARGET "FMS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FMS provides CMake exports, which seem to be correctly generated and installed in the ACCESS-NRI FMS fork. That means you can replace this with the following:
pkg_check_modules(FMS REQUIRED IMPORTED_TARGET "FMS") | |
find_package(FMS COMPONENTS R8 REQUIRED) |
This will define a FMS::fms_r8
target that should be used instead of PkgConfig::FMS
.
Doing it this way will ensure that the double precision enabled FMS is used and throw a meaningful error early on if someone made a mistake in specifying the dependencies in spack. It will also properly propagate the target dependencies to other packages like OM3 and should allow CMake to correctly handle the situation where FMS is both a direct dependency of OM3 and an indirect dependency via GFDL-generic-tracers
.
CMakeLists.txt
Outdated
PkgConfig::MOCSY | ||
PkgConfig::NETCDF) | ||
|
||
install(TARGETS gtracers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to also exports the targets here.
1a1c175
to
9806067
Compare
* Missed the retuning of dFe back to a minimum concentration at every timestep. This happens under "Additional operations on dissolved iron" Also took the opportunity to: * Add N and C conservation of mass checks * remove some unnecessary print statements * reduce dFe scavenging rates * Apply limitations to dFe uptake at night and when N is limiting * increase zooplankton quadratic mortality but halve their linear mortality * also reduced phytoplankton linear and quadratic mortality
* Adjustment of zooepsmin and zooepsmax values from 0.025 - 0.5 to 0.01 - 0.1
b2bb8df
to
ac2765e
Compare
* Explicit ALK source and sink terms within nested tilmestep * Using GOLDtridiag with vertical_movement for consistency with MOM6 * Variable epsilon of zooplankton with phy biomass and temp dependencies
…wer bounds on the DIC concentration that feeds into the omip2_co2calc subroutine. Setting upper and lower limits of the DIC that is fed into the subroutine does not preclude DIC concentrations from going higher or lower than those limits, but only ensures that the air-sea fluxes are reasonable.
…n the interior, and also added a max to Alk in the CO2 flux calculations
41acfb1
to
4a79dc7
Compare
* Dissolution of CaCO3 based on detrital remin and saturation states of aragonite and calcite (Kwon et al., 2024) * Precipation of CaCO3 based on HCO3- to H+ ratio (Lehmann et al., in prep) * Sinking rate of material affected by ballasting, specifically CaCO3/Det ratio (Bach et al., 2016) These feedbacks can be turned on and off using the "caco3_dynamics" logical
Removed adic as a tracer because CaCO3 dynamics mean that it is not appropriate
Also altered some of the parameters.
4a79dc7
to
271db1e
Compare
Update The Spack interaction with upstream netcdf-fortran (autotools), ACCESS-NRI's FMS (CMake) and ACCESS-NRI's GFDL-generic-tracers (CMake) is complicated if we don't use pkgconf and use CMake's native Spack's I had a chat with @micaeljtoliveira about this on Friday. He suggested trying to export the |
…CaCO3 via saturation states (cal and ara) and detrius remin
…ing when vertical_movement==.true. Also: * Added "zooexcr" as an input parameter * Added "fbury" as a diagnostic, rathern than outputting det_sed_bury, detfe_sed_bury and caco3_sed_bury * Fixed a minor bug in the "fbury" array, which involved the wrong units
…de small edits to: * remove background dissolution of CaCO3 in absence of detritus
…ns that any NO3 and Alkalinity that is lost through burial is added back to the ocean budget via a surface flux in exactly the same location.
…estion, rather than at the same exact lon,lat location.
…rs option (line 3269 in generic_WOMBATlite.F90)
No description provided.