GithubHelp home page GithubHelp logo

clima / land Goto Github PK

View Code? Open in Web Editor NEW
94.0 11.0 20.0 48.33 MB

Everything within the Land model (Soil Plant Atmosphere Module, Land Hydrology, etc)

Home Page: https://clima.github.io/Land/

License: Apache License 2.0

Julia 79.40% Jupyter Notebook 20.60%
soil-plant-atmosphere fluorescence canopy sif julia land-surface-model

land's People

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  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  avatar  avatar  avatar

land's Issues

Wavelength range covered in SW radiation

Need to figure out what to do <400nm and >2500nm; probably need to extend RT calculations to match what the atmospheric RT does (>2500nm probably not super important but <400nm might be).

Integration over wavelength

Given the way the wavelengths and wavelength band/bin widths are defined,

# Wave length lists
"Standard wave length `[nm]`"
sWL::Array{FT,1} = [collect(FT(400.0):FT(10.0):FT( 650.1));
collect(FT(655.0):FT( 5.0):FT( 770.1));
collect(FT(780.0):FT(25.0):FT(2400.1))]
"Differential wavelength"
dWL::Array{FT,1} = diff(sWL)

and the fast∫ definition, it seems to be set up for left Riemann sum. If you define the included bands this way (both bounds inclusive),

"index of wlPAR in WL"
iPAR::Array{Int,1} = findall( (WL .>= minwlPAR) .& (WL .<= maxwlPAR) )

extra energy is included in the integral, since the 700.0 nm band has its left edge at 700.0 but right edge at 705.0.

SIF at leaf units

We still need to change the drivers of SIF at the leaf level (discussions with Christiaan!). SIF is driven by absorbed photons, currently energy fluxes are used to drive fluxes, which give too much weight to short-wave. Needs the rescaled SIF spectrum at the chloroplast level

Change to new clima parameter handling

If this repo is still being maintained, then we should apply the new clima parameter handling. An example of how to do this is in this PR.

A success metric for closing this issue involves:

  • Having a centralized module for where clima parameters from dependency packages can be accessed (see, e.g., CloudMicrophysics.jl's Parameters module, which forwards methods for handling thermodynamic variables).
  • Removing Land.jl's dependence on CLIMAParameters (i.e., using CLIMAParameters / import CLIMAParameters does not live in Land/src/).
  • All parameters that were previously obtained from CLIMAParameters methods are obtained from the CLIMAParameters toml file

CanopyLayers test missing functions

Oh, I forgot to mention the CanopyLayers test. It seems to be incomplete having no associated use packages statement and then no knowing where to find structures/functions such as big_leaf_partition. I noted that it was missing from the list of packages in the
runtests.jl top-level file, which I think includes all the other packages. I seem to be missing something here!

Cheers - Kevin

CanopyLayers module is empty

As of now the package for CanopyLayers.jl is empty in main Land.jl, as compared to v0.1. It would be nice if an updated example.jl is pushed to main. Or what would be the recommended way to start working with CanopyLayers?

Two land packages need adjustment: RootHydraulics error

I ran the test suite for each of the Land packages and discovered that the field SH was
removed from RootHydraulics on 20th October 2022. This gave rise to 5 errors (I.e. a
missing field SH) in the test set for PlantHydraulics and 2 for SoilPlantAirContinuum.

Other than this error type, the test set for all of the packages ran without error.

This looks easy to fix, but I will leave it to the experts since I'm relatively new to CliMA.
6th April 2023

Soil reflectance

Soil reflectance needs to be added still (just a structure first, can figure out how to populate it later and whether or not to use soil water content as a driver as well)

CliMA Land Global Simulation Versions

Each global simulation will be labeled with a unique tag using the format aN_gmX_wdY or bN_gmX_wdY

Label Description
a CliMA Land v0.1
b CliMA Land v0.2
N Simulation number in each version
gm GriddingMachine.jl
X GriddingMachine.jl dataset combination version
wd Weather driver
Y Weather driver version

Units of `tau_osm` and `tau_noc` are incrrect

The Units of tau_osm at canopylayer.jl#L163 is incorrectly listed as [μmol⁻¹].
The units of tau_osm should be [mol² m⁻² s⁻² μmol⁻¹] based on the following calculation:

d(g_sw)/dt = [mol m⁻² s⁻¹]/s = [mol m⁻² s⁻²]
(dA/dE – d\Theta/dE) = [μmol  m⁻² s⁻¹] / [mol m⁻² s⁻¹] = [μmol mol⁻¹]
tau_osm = [mol² m⁻² s⁻² μmol⁻¹]

Model structure

Hi, it's great to see some more biophysical models in julia.

I've been putting this package together over the last year: https://github.com/rafaqz/Photosynthesis.jl as a rewrite of the MAESPA photosynthesis model. It may be useful to you at this stage, if not for direct use for structural ideas. Notably the parameters are a composable hierarchy instead of a single flat struct, and you can swap out any components for your own custom formulations, or use them in another package.

Writing the package I was keen to explore how we could use shared libraries for biophysical formulations instead of rewriting formulations every time as has been common in the past. There are a lot of Farquhar models implemented slightly differently in various Fortran libraries, but Julia can facilitate doing things differently.

Anyway, carry on! hopefully this added something useful to mix.

error when following the instructions

I followed the steps to run CliMA land model as instructed on mac M2, but when I used the command " include("clima-land.jl");" to run the simulation. I encountered the following error. I spend the entire yesterday trying to resolve the issue so your help is very much appreciated
"
julia> include("clima-land.jl");
[ Info: Precompiling GriddingMachine [f20cf718-bf4d-4727-bc8f-485b1f283ac6]
ERROR: LoadError: cfunction: closures are not supported on this platform
Stacktrace:
[1] var"@cplprogress"(source::LineNumberNode, module::Module, progressfunc::Any)
@ ArchGDAL ~/.julia/packages/ArchGDAL/CUiBS/src/utils.jl:36
[2] #macroexpand#61
@ ./expr.jl:115 [inlined]
[3] macroexpand
@ ./expr.jl:113 [inlined]
[4] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any, define::Bool) (repeats 2 times)
@ Base.Docs ./docs/Docs.jl:537
[5] var"@doc"(::LineNumberNode, ::Module, ::String, ::Vararg{Any})
@ Core ./boot.jl:519
[6] include(mod::Module, _path::String)
@ Base ./Base.jl:419
[7] include(x::String)
@ ArchGDAL ~/.julia/packages/ArchGDAL/CUiBS/src/ArchGDAL.jl:1
[8] top-level scope
@ ~/.julia/packages/ArchGDAL/CUiBS/src/ArchGDAL.jl:16
[9] include
@ ./Base.jl:419 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1554
[11] top-level scope
@ stdin:1
in expression starting at /Users/myname/.julia/packages/ArchGDAL/CUiBS/src/dataset.jl:1
in expression starting at /Users/myname/.julia/packages/ArchGDAL/CUiBS/src/dataset.jl:1
in expression starting at /Users/myname/.julia/packages/ArchGDAL/CUiBS/src/ArchGDAL.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile ArchGDAL [c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3] to /Users/myname/.julia/compiled/v1.8/ArchGDAL/jl_jZwuAH.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:1707
[3] compilecache
@ ./loading.jl:1651 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base ./loading.jl:1200
[6] macro expansion
@ ./loading.jl:1180 [inlined]
[7] macro expansion
@ ./lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
[9] include
@ ./Base.jl:419 [inlined]
[10] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
@ Base ./loading.jl:1554
[11] top-level scope
@ stdin:1
in expression starting at /Users/myname/.julia/packages/GriddingMachine/kIQA9/src/GriddingMachine.jl:1
in expression starting at stdin:1
ERROR: LoadError: Failed to precompile GriddingMachine [f20cf718-bf4d-4727-bc8f-485b1f283ac6] to /Users/myname/.julia/compiled/v1.8/GriddingMachine/jl_chDAjh.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:1707
[3] compilecache
@ ./loading.jl:1651 [inlined]
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1337
[5] _require_prelocked(uuidkey::Base.PkgId)
@ Base ./loading.jl:1200
[6] macro expansion
@ ./loading.jl:1180 [inlined]
[7] macro expansion
@ ./lock.jl:223 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1144
[9] include(fname::String)
@ Base.MainInclude ./client.jl:476
[10] top-level scope
@ REPL[1]:1
in expression starting at /Users/myname/Test-CliMA-Land/clima-land.jl:5
"

Running CliMA Land on Google Colab

I am new to CliMA Land and want to run this on Google Colab using the GPUs, I have been able to set up Julia environment in Colab but I am clueless, on how to make this work on Colab. I want to do something like HRLDAS and generate high-resolution datasets of land surface fields which are equivalent to reanalysis data.

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.