Skip to content

Commit

Permalink
🎨 Support 2025
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Nov 18, 2024
1 parent b869509 commit b169915
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/import/flowpath2prj.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

LOG = logger()
MISSED_SOILS = {}
YEARS = 2024 - 2006
YEARS = 2025 - 2006
# WEPP can not handle a zero slope, so we ensure that all slopes are >= 0.3%
MIN_SLOPE = 0.003

Expand Down
6 changes: 3 additions & 3 deletions scripts/import/flowpath_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
print(" * VERIFY that the GeoJSON is the 5070 grid value")
print(" * This will generate a `myhucs.txt` file with found HUCs")

YEARS = 2024 - 2007 + 1
YEARS = 2025 - 2007 + 1
SOILFY = 2023
SOILCOL = f"SOL_FY_{SOILFY}"
PREFIX = "fp"
Expand Down Expand Up @@ -80,11 +80,11 @@ def create_flowpath_id(cursor, scenario, huc12, fpath) -> int:
def fillout_codes(df):
""" "Get the right full-string codes."""
s = df["CropRotatn_CY_2022"].str
df["landuse"] = s[1] + s[0] + s[1] + s[:] + s[-2] + s[-1]
df["landuse"] = s[1] + s[0] + s[1] + s[:] + s[-2] + s[-1] + s[-2]
if df["landuse"].str.len().min() != YEARS:
raise ValueError(f"landuse is not {YEARS} chars")
s = df["Management_CY_2022"].str
df["management"] = s[1] + s[0] + s[1] + s[:] + s[-2] + s[-1]
df["management"] = s[1] + s[0] + s[1] + s[:] + s[-2] + s[-1] + s[-2]
if df["management"].str.len().min() != YEARS:
raise ValueError(f"management is not {YEARS} chars")

Expand Down

0 comments on commit b169915

Please sign in to comment.