diff --git a/src/crop/almass.jl b/src/crop/almass.jl index 9c624066ffba5947cbd2ffe4e22597e8add15fbd..45de95a127d0f23d11379fcbd2a67756eb6fd0d6 100644 --- a/src/crop/almass.jl +++ b/src/crop/almass.jl @@ -59,6 +59,30 @@ struct CropCurveParams height::Dict{GrowthPhase,Vector{Length{Float64}}} end +function Base.show(io::IO, ::MIME"text/plain", curve::CropCurveParams) + println(io, "CropCurveParams") + println(io, " curveID = $(curve.curveID)") + println(io, " highnutrients = $(curve.highnutrients)") + for (dict, name) in [ + (curve.GDD, "GDD"), + (curve.LAItotal, "LAItotal"), + (curve.LAIgreen, "LAIgreen"), + # (curve.height, "height"), + ] + println(" $name:") + for (phase, arr) in dict + println(" $phase = $arr") + end + end + # Manually print height array for each phase so that we avoid the + # lengthy type information before printing the array. + println(" height:") + for (phase, arr) in curve.height + arrstr = "[" * join(split(string(arr), "[")[2:end], "[") + println(" $phase = $arrstr") + end +end + """ CropType