Skip to content

Commit

Permalink
Fix bug in Baes.show for Tile
Browse files Browse the repository at this point in the history
  • Loading branch information
bgroenks96 committed Oct 2, 2023
1 parent 9a70fe5 commit 51ec598
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/01_heat_freeW_samoylov.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ grid = CryoGrid.Presets.DefaultGrid_5cm;
initT = initializer(:T, tempprofile)
tile = CryoGrid.Presets.SoilHeatTile(
:H,
TemperatureGradient(forcings.Tair),
TemperatureGradient(forcings.Tair, NFactor(nf=0.6)),
GeothermalHeatFlux(0.053u"W/m^2"),
soilprofile,
initT;
Expand Down
4 changes: 2 additions & 2 deletions examples/03_heat_sfcc_samoylov.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
using CryoGrid

# First we set up the model:
forcings = loadforcings(CryoGrid.Presets.Forcings.Samoylov_ERA_obs_fitted_1979_2014_spinup_extended_2044);
forcings = loadforcings(CryoGrid.Presets.Forcings.Samoylov_ERA5_fitted_daily_1979_2020);
grid = CryoGrid.Presets.DefaultGrid_5cm
soilprofile, tempprofile = CryoGrid.Presets.SamoylovDefault
initT = initializer(:T, tempprofile)
sfcc = PainterKarra(swrc=VanGenuchten=0.1, n=2.0))
upperbc = TemperatureGradient(forcings.Tair)
upperbc = TemperatureGradient(forcings.Tair, NFactor(nf=0.6))
lowerbc = GeothermalHeatFlux(0.053u"W/m^2")
tile = CryoGrid.Presets.SoilHeatTile(upperbc, lowerbc, soilprofile, initT; grid=grid, freezecurve=sfcc)
tspan = (DateTime(2010,10,30),DateTime(2011,10,30))
Expand Down
2 changes: 1 addition & 1 deletion src/Tiles/tile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Flatten.flattenable(::Type{<:Tile}, ::Type{Val{:strat}}) = true
Flatten.flattenable(::Type{<:Tile}, ::Type{Val{:inits}}) = true
Flatten.flattenable(::Type{<:Tile}, ::Type{Val{:events}}) = true
Flatten.flattenable(::Type{<:Tile}, ::Type{Val{name}}) where name = false
Base.show(io::IO, ::MIME"text/plain", tile::Tile{TStrat,TGrid,TStates,TInits,TEvents,iip}) where {TStrat,TGrid,TStates,TInits,TEvents,iip} = print(io, "Tile (iip=$iip) with layers $(map(layername, layers(tile.strat))), $TGrid, $TStrat")
Base.show(io::IO, ::MIME"text/plain", tile::Tile{TStrat,TGrid,TStates,TInits,TEvents,iip}) where {TStrat,TGrid,TStates,TInits,TEvents,iip} = print(io, "Tile (iip=$iip) with layers $(keys(tile.strat)), $TGrid, $TStrat")

"""
Tile(
Expand Down

0 comments on commit 51ec598

Please sign in to comment.