Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'models build around LPJmL based on the copan:LPJmL modeling framework'
version: 0.1.4
version: 0.1.5
date-released: '2025-04-11'
abstract: x
authors:
Expand Down
10 changes: 6 additions & 4 deletions landmanager/components/management/crop_calendar/world.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,10 @@ def calc_harvest_date(

# Precompute max temperature once
max_temp = monthly_climate["max_temp"]
hdate_rf = hdate_ir = xr.full_like(self.world.grid.cell, 0, dtype=int)
hreason_rf = hreason_ir = xr.full_like(self.world.grid.cell, "", dtype="<U20") # noqa
hdate_rf = xr.full_like(self.world.grid.cell, 0, dtype=int)
hdate_ir = xr.full_like(self.world.grid.cell, 0, dtype=int)
hreason_rf = xr.full_like(self.world.grid.cell, "", dtype="<U20") # noqa
hreason_ir = xr.full_like(self.world.grid.cell, "", dtype="<U20") # noqa

hdate_rf.values = np.select(
[
Expand Down Expand Up @@ -623,7 +625,7 @@ def calc_harvest_date(
hdate_first,
np.where(
(smonth == 0) & (max_temp < self.temp_fall),
hdate_temp_opt,
hdate_first,
np.minimum(np.maximum(hdate_first, hdate_temp_base), hdate_last), # noqa
),
np.minimum(np.maximum(hdate_first, hdate_temp_opt), hdate_last), # noqa
Expand Down Expand Up @@ -678,7 +680,7 @@ def calc_harvest_date(
hdate_first,
np.where(
(smonth == 0) & (max_temp < self.temp_fall),
hdate_temp_opt,
hdate_first,
np.minimum(np.maximum(hdate_first, hdate_temp_base), hdate_last), # noqa
),
np.minimum(np.maximum(hdate_first, hdate_temp_opt), hdate_last), # noqa
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "landmanager"
version = "0.1.4"
version = "0.1.5"
description = "Models build around LPJmL based on the copan:LPJmL modeling framework"
readme = "README.md"
license = {file = "LICENSE.md"}
Expand Down