From 272128a1963ceb2f0deef0cec944d1ca839dc5dc Mon Sep 17 00:00:00 2001 From: akrherz Date: Mon, 27 Nov 2023 10:56:02 -0600 Subject: [PATCH 01/10] mnt: reflect current status --- scripts/util/dump_ofe_results.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/util/dump_ofe_results.py b/scripts/util/dump_ofe_results.py index 82f4b8de..618e2bbb 100644 --- a/scripts/util/dump_ofe_results.py +++ b/scripts/util/dump_ofe_results.py @@ -16,7 +16,7 @@ def fpmagic(cursor, scenario, envfn, rows, huc12, fpath, mlrarsym): """Do the computations for the flowpath.""" df = read_env(envfn) - # Only want 2016 through 2021 + # Only want 2017 through 2022 df = df[ (df["date"] < datetime.datetime(2023, 1, 1)) & (df["date"] >= datetime.datetime(2017, 1, 1)) @@ -62,12 +62,13 @@ def main(argv): """ SELECT huc_12, max(mlrarsym) as mlrarsym from huc12 h JOIN mlra m on - (h.mlra_id = m.mlra_id) WHERE h.scenario = :scen and huc_12 in :h + (h.mlra_id = m.mlra_id) WHERE h.scenario = :scen and + huc_12 = Any(:h) GROUP by huc_12 """ ), conn, - params={"scen": scenario, "h": tuple(myhucs)}, + params={"scen": scenario, "h": myhucs}, index_col="huc_12", ) for root, _d, files in tqdm(os.walk(f"/i/{scenario}/ofe"), disable=True): @@ -87,7 +88,7 @@ def main(argv): fpath, huc12df.at[huc12, "mlrarsym"], ) - # Just 2016-2021 + # Just 2017-2022 ofedf = ofedf[ (ofedf["date"] < datetime.datetime(2023, 1, 1)) & (ofedf["date"] >= datetime.datetime(2017, 1, 1)) @@ -172,11 +173,11 @@ def main(argv): for huc12, frows in oferows.items(): df = pd.DataFrame(frows) - df.to_csv(f"oferesults_{huc12}_230710.csv", index=False) + df.to_csv(f"oferesults_{huc12}_231127.csv", index=False) for huc12, hrows in fprows.items(): df = pd.DataFrame(hrows) - df.to_csv(f"fpresults_{huc12}_230710.csv", index=False) + df.to_csv(f"fpresults_{huc12}_231127.csv", index=False) if __name__ == "__main__": From 8e1f4202ba6d25e1998e069c5e9949f42f72e0cc Mon Sep 17 00:00:00 2001 From: akrherz Date: Wed, 29 Nov 2023 12:31:03 -0600 Subject: [PATCH 02/10] add genlanduse and isuag to output --- scripts/util/dump_ofe_results.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/util/dump_ofe_results.py b/scripts/util/dump_ofe_results.py index 618e2bbb..6226ab29 100644 --- a/scripts/util/dump_ofe_results.py +++ b/scripts/util/dump_ofe_results.py @@ -71,6 +71,18 @@ def main(argv): params={"scen": scenario, "h": myhucs}, index_col="huc_12", ) + fieldsdf = pd.read_sql( + text( + """ + select huc12, fbndid, isag, g.label as genlanduse from + fields f, general_landuse g WHERE f.genlu = g.id and + f.scenario = :scen and huc12 = Any(:h) + """ + ), + conn, + params={"scen": scenario, "h": myhucs}, + ) + for root, _d, files in tqdm(os.walk(f"/i/{scenario}/ofe"), disable=True): for filename in files: ofefn = f"{root}/{filename}" @@ -130,6 +142,10 @@ def main(argv): if meta_ofe.empty: print(ofe, huc12, fpath) sys.exit() + field_meta = fieldsdf[ + (fieldsdf["fbndid"] == meta_ofe["fbndid"].values[0]) + & (fieldsdf["huc12"] == huc12) + ] length = meta_ofe["length"].values[0] accum_length += length thisdelivery = ( @@ -141,6 +157,8 @@ def main(argv): "mlrarsym": huc12df.at[huc12, "mlrarsym"], "fpath": fpath, "ofe": ofe, + "genlanduse": field_meta["genlanduse"].values[0], + "isag": field_meta["isag"].values[0], "fbndid": meta_ofe["fbndid"].values[0], "CropRotationString": meta_ofe["landuse"].values[0], "bulk_slope[1]": meta_ofe["bulk_slope"].values[0], From cc18cdae5bf7e015d3a56b1072e5a19c17ef7169 Mon Sep 17 00:00:00 2001 From: akrherz Date: Fri, 1 Dec 2023 10:15:11 -0600 Subject: [PATCH 03/10] feat: add 1 Nov anhydrous before corn closes #199 --- scripts/import/flowpath2prj.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/scripts/import/flowpath2prj.py b/scripts/import/flowpath2prj.py index a6d1b5ef..86be247e 100644 --- a/scripts/import/flowpath2prj.py +++ b/scripts/import/flowpath2prj.py @@ -149,6 +149,20 @@ def read_file(scenario, zone, prevcode, code, nextcode, cfactor, year): f"{data}" ) + # Anhydrous ammonia application when we are going into Corn + if nextcode == "C": + # HACK: look for a present 1 Nov operation and insert this before it + pos = data.find("11 1") + extra = "" + if pos > 0: + extra = data[pos:].replace("11 1", "11 8") + data = data[:pos] + data = ( + f"{data}" + f"11 1 {year} 1 Tillage OpCropDef.ANHYDROS {0.203200, 1}\n" + f"{extra}" + ) + # TODO: # Tillage code 5 - move TAND0002 before FCSTACDP and add another # TAND0002 in spring after soy, remove FCSTACDP and TAND0002 after corn, From de450f10c1aa4a7196504b0c7b64d477308ba3ab Mon Sep 17 00:00:00 2001 From: akrherz Date: Fri, 1 Dec 2023 10:41:50 -0600 Subject: [PATCH 04/10] fix: tillage codes 4,5 updates per docs --- scripts/import/blocks/C4.txt | 1 + scripts/import/blocks/C5.txt | 2 -- scripts/import/flowpath2prj.py | 27 ++++++++++----------------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/scripts/import/blocks/C4.txt b/scripts/import/blocks/C4.txt index 0aefbfb9..9327b630 100644 --- a/scripts/import/blocks/C4.txt +++ b/scripts/import/blocks/C4.txt @@ -1,3 +1,4 @@ +%(pdatem15)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} %(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} %(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} %(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} diff --git a/scripts/import/blocks/C5.txt b/scripts/import/blocks/C5.txt index bfd24082..a20d01fa 100644 --- a/scripts/import/blocks/C5.txt +++ b/scripts/import/blocks/C5.txt @@ -1,5 +1,3 @@ -%(pdatem15)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} %(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} %(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} %(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} diff --git a/scripts/import/flowpath2prj.py b/scripts/import/flowpath2prj.py index 86be247e..740edceb 100644 --- a/scripts/import/flowpath2prj.py +++ b/scripts/import/flowpath2prj.py @@ -149,6 +149,16 @@ def read_file(scenario, zone, prevcode, code, nextcode, cfactor, year): f"{data}" ) + # The fall tillage operation is governed by the next year crop + if cfactor == 5 and nextcode == "C": + # Replace 11 1 operation with plow + pos = data.find("11 1") + if pos > 0: + data = ( + f"{data[:pos]}" + "11 1 %(yr)s 1 Tillage OpCropDef.MOPL {0.203200, 1}\n" + ) + # Anhydrous ammonia application when we are going into Corn if nextcode == "C": # HACK: look for a present 1 Nov operation and insert this before it @@ -163,23 +173,6 @@ def read_file(scenario, zone, prevcode, code, nextcode, cfactor, year): f"{extra}" ) - # TODO: - # Tillage code 5 - move TAND0002 before FCSTACDP and add another - # TAND0002 in spring after soy, remove FCSTACDP and TAND0002 after corn, - # switch MOPL after soy to CHISSTSP - # Tillage code 6 - start with revised tillage code 5 as a guide then switch - # CHISSTSP after soy to MOPL. Then add in two TAND0002 and FCSTACDP after - # corn. This will be a little different than DEP documentation - # (an extra disking after plowing corn) but as we discussed, that is - # more similar to what farmers do. - - # Add spring operation after corn - if prevcode == "C" and cfactor == 4: - data = ( - "%(pdatem15)s %(yr)s 1 Tillage OpCropDef.TAND0002 " - "{0.101600, 2}\n" - f"{data}" - ) pdate = "" pdatem5 = "" pdatem10 = "" From 78dbaf11c781cade40e1fc5c3569aa21685af115 Mon Sep 17 00:00:00 2001 From: akrherz Date: Fri, 1 Dec 2023 11:09:05 -0600 Subject: [PATCH 05/10] debug: add rotation diagnostic --- scripts/import/flowpath2prj.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/import/flowpath2prj.py b/scripts/import/flowpath2prj.py index 740edceb..c8cf8058 100644 --- a/scripts/import/flowpath2prj.py +++ b/scripts/import/flowpath2prj.py @@ -537,5 +537,15 @@ def main(argv): workflow(pgconn, scenario) +def generate_combos(): + """Create rotation files for Eduardo inspection.""" + for cfactor in range(1, 7): + for rot in "CCC CBC CCB BCB BBC BCB BBB".split(): + res = read_file(0, "IA_NORTH", rot[0], rot[1], rot[2], cfactor, 2) + with open(f"ex_{rot}_{cfactor}.rot", "w", encoding="utf8") as fh: + fh.write(res) + + if __name__ == "__main__": main(sys.argv) + # generate_combos() From d6810c8b785481049e722d90800607252fb0b40e Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 5 Dec 2023 09:36:58 -0600 Subject: [PATCH 06/10] mnt: support 2024 --- environment.yml | 2 ++ scripts/cligen/add_new_year.py | 23 +++++++++-------- scripts/import/flowpath2prj.py | 38 +++++++++-------------------- scripts/import/flowpath_importer.py | 14 +++++------ 4 files changed, 30 insertions(+), 47 deletions(-) diff --git a/environment.yml b/environment.yml index 02c19301..9d7762c0 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,6 @@ dependencies: + # command line stuff + - click - coverage - pyshp - tqdm diff --git a/scripts/cligen/add_new_year.py b/scripts/cligen/add_new_year.py index 124d9a78..060c838f 100644 --- a/scripts/cligen/add_new_year.py +++ b/scripts/cligen/add_new_year.py @@ -8,8 +8,9 @@ import glob import os import subprocess -import sys +from datetime import date +import click from pyiem.util import logger from tqdm import tqdm @@ -24,17 +25,14 @@ def parse_filename(filename): def workflow(filename, newyear, analogyear): """Effort this file, please""" - # Figure out what this file's lon/lat values are - lon, lat = parse_filename(filename) - # LOG.debug("%s -> %.2f %.2f", filename, lon, lat) with open(filename, encoding="ascii") as fh: lines = fh.readlines() # Replace the header information denoting years simulated years_simulated = int((newyear - 2007) + 1) - lines[4] = ( - f" {lat:.2f} {lon:.2f} 289 {years_simulated}" - f" 2007 {years_simulated}\n" - ) + tokens = lines[4].strip().split() + tokens[3] = str(years_simulated) + tokens[5] = str(years_simulated) + lines[4] = f"{' '.join(tokens)}\n" data = "".join(lines) if data.find(f"1\t1\t{newyear}") > 0: LOG.info("%s already has %s data", filename, newyear) @@ -65,10 +63,11 @@ def compute_analog_year(year): return analogyear -def main(argv): +@click.command() +@click.option("--scenario", type=int, default=0) +@click.option("--year", type=int, default=date.today().year + 1) +def main(scenario, year): """Go Main Go""" - scenario = argv[1] - year = int(argv[2]) analogyear = compute_analog_year(year) LOG.info("Using analog year %s for new year %s", analogyear, year) os.chdir(f"/i/{scenario}/cli") @@ -80,4 +79,4 @@ def main(argv): if __name__ == "__main__": - main(sys.argv) + main() diff --git a/scripts/import/flowpath2prj.py b/scripts/import/flowpath2prj.py index c8cf8058..5cd33884 100644 --- a/scripts/import/flowpath2prj.py +++ b/scripts/import/flowpath2prj.py @@ -45,7 +45,7 @@ LOG = logger() MISSED_SOILS = {} -YEARS = 2023 - 2006 +YEARS = 2024 - 2006 # WEPP can not handle a zero slope, so we ensure that all slopes are >= 0.3% MIN_SLOPE = 0.003 @@ -224,27 +224,27 @@ def do_rotation(scenario, zone, rotfn, landuse, management): None """ # Dictionary of values used to fill out the file template below - data = {} + data = {"yearly": ""} data["name"] = f"{landuse}-{management}" # Special hack for forest if landuse[0] == "F" and landuse == len(landuse) * landuse[0]: data["initcond"] = FOREST[management[0]] - for i in range(1, 18): + for i in range(1, YEARS): # Reset roughness each year data[ - f"year{i}" - ] = f"1 2 {i} 1 Tillage OpCropDef.Old_6807 {{0.001, 2}}" + "yearly" + ] += f"1 2 {i} 1 Tillage OpCropDef.Old_6807 {{0.001, 2}}" else: data["initcond"] = INITIAL_COND.get(landuse[0], INITIAL_COND_DEFAULT) prevcode = "C" if landuse[0] not in INITIAL_COND else landuse[0] - f = partial(read_file, scenario, zone) + func = partial(read_file, scenario, zone) # 2007 - data["year1"] = f( + data["yearly"] += func( prevcode, landuse[0], landuse[1], int(management[0]), 1 ) - for i in range(1, 17): - nextcode = "" if i == 16 else landuse[i + 1] - data[f"year{i + 1}"] = f( + for i in range(1, YEARS): + nextcode = "" if i == (YEARS - 1) else landuse[i + 1] + data["yearly"] += func( landuse[i - 1], landuse[i], nextcode, int(management[i]), i + 1 ) @@ -264,23 +264,7 @@ def do_rotation(scenario, zone, rotfn, landuse, management): InitialConditions = {data['initcond']} Operations {{ -{data['year1']} -{data['year2']} -{data['year3']} -{data['year4']} -{data['year5']} -{data['year6']} -{data['year7']} -{data['year8']} -{data['year9']} -{data['year10']} -{data['year11']} -{data['year12']} -{data['year13']} -{data['year14']} -{data['year15']} -{data['year16']} -{data['year17']} +{data['yearly']} }} """ ) diff --git a/scripts/import/flowpath_importer.py b/scripts/import/flowpath_importer.py index ec57b0bb..aec82218 100644 --- a/scripts/import/flowpath_importer.py +++ b/scripts/import/flowpath_importer.py @@ -76,14 +76,12 @@ def create_flowpath_id(cursor, scenario, huc12, fpath) -> int: def fillout_codes(df): """ "Get the right full-string codes.""" - # Compute full rotation string - # 2022 is repeating -2 (2020) - # 2023 is repeating -2 (2021) - col = "CropRotatn" if "CropRotatn" in df.columns else "CropRotatn_CY_2022" - s = df[col] - df["landuse"] = s.str[1] + s.str[0] + s.str[1] + s + s.str[-2] - s = df["Management_CY_2022"] - df["management"] = s.str[1] + s.str[0] + s.str[1] + s + s.str[-2] + col = "CropRotatn_CY_2022" + s = df[col].str + # TODO, this isn't right! + df["landuse"] = s[1] + s[0] + s[1] + s + s[-2] + s[-1] + s = df["Management_CY_2022"].str + df["management"] = s[1] + s[0] + s[1] + s + s[-2] + s[-1] def get_data(filename): From 244d89e1fb535dc75c468f6a359b9126e394c6a1 Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 5 Dec 2023 09:38:30 -0600 Subject: [PATCH 07/10] mnt: convert tabs to spaces --- scripts/import/blocks/B1.txt | 6 +++--- scripts/import/blocks/B2.txt | 8 ++++---- scripts/import/blocks/B3.txt | 10 +++++----- scripts/import/blocks/B4.txt | 8 ++++---- scripts/import/blocks/B5.txt | 14 +++++++------- scripts/import/blocks/B6.txt | 10 +++++----- scripts/import/blocks/C1.txt | 6 +++--- scripts/import/blocks/C2.txt | 8 ++++---- scripts/import/blocks/C3.txt | 6 +++--- scripts/import/blocks/C4.txt | 14 +++++++------- scripts/import/blocks/C5.txt | 10 +++++----- scripts/import/blocks/C6.txt | 10 +++++----- scripts/import/blocks/L1.txt | 6 +++--- scripts/import/blocks/L2.txt | 8 ++++---- scripts/import/blocks/L3.txt | 10 +++++----- scripts/import/blocks/L4.txt | 8 ++++---- scripts/import/blocks/L5.txt | 10 +++++----- scripts/import/blocks/L6.txt | 12 ++++++------ scripts/import/blocks/P0.txt | 6 +++--- scripts/import/blocks/P1.txt | 6 +++--- scripts/import/blocks/P2.txt | 6 +++--- scripts/import/blocks/P3.txt | 6 +++--- scripts/import/blocks/P4.txt | 6 +++--- scripts/import/blocks/P5.txt | 6 +++--- scripts/import/blocks/P6.txt | 6 +++--- scripts/import/blocks/R1.txt | 18 +++++++++--------- scripts/import/blocks/R2.txt | 18 +++++++++--------- scripts/import/blocks/R3.txt | 18 +++++++++--------- scripts/import/blocks/R4.txt | 18 +++++++++--------- scripts/import/blocks/R5.txt | 18 +++++++++--------- scripts/import/blocks/R6.txt | 18 +++++++++--------- scripts/import/blocks/W1.txt | 6 +++--- scripts/import/blocks/W2.txt | 6 +++--- scripts/import/blocks/W3.txt | 6 +++--- scripts/import/blocks/W4.txt | 6 +++--- scripts/import/blocks/W5.txt | 6 +++--- scripts/import/blocks/W6.txt | 6 +++--- 37 files changed, 175 insertions(+), 175 deletions(-) diff --git a/scripts/import/blocks/B1.txt b/scripts/import/blocks/B1.txt index 4c92634c..7f57e034 100644 --- a/scripts/import/blocks/B1.txt +++ b/scripts/import/blocks/B1.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLNTFC {0.050000, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLNTFC {0.050000, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} diff --git a/scripts/import/blocks/B2.txt b/scripts/import/blocks/B2.txt index 6029f03e..4b7ba194 100644 --- a/scripts/import/blocks/B2.txt +++ b/scripts/import/blocks/B2.txt @@ -1,5 +1,5 @@ %(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/B3.txt b/scripts/import/blocks/B3.txt index 0ac5ba59..c4602387 100644 --- a/scripts/import/blocks/B3.txt +++ b/scripts/import/blocks/B3.txt @@ -1,5 +1,5 @@ -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/B4.txt b/scripts/import/blocks/B4.txt index 2e54a718..9d6ece26 100644 --- a/scripts/import/blocks/B4.txt +++ b/scripts/import/blocks/B4.txt @@ -1,6 +1,6 @@ %(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} %(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/B5.txt b/scripts/import/blocks/B5.txt index 6a76df31..b5100fb5 100644 --- a/scripts/import/blocks/B5.txt +++ b/scripts/import/blocks/B5.txt @@ -1,7 +1,7 @@ -%(pdatem15)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdatem15)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/B6.txt b/scripts/import/blocks/B6.txt index 4445aec2..6c7c2906 100644 --- a/scripts/import/blocks/B6.txt +++ b/scripts/import/blocks/B6.txt @@ -1,6 +1,6 @@ -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} 11 1 %(yr)s 1 Tillage OpCropDef.MOPL {0.203200, 1} diff --git a/scripts/import/blocks/C1.txt b/scripts/import/blocks/C1.txt index 7155e327..88fa0096 100644 --- a/scripts/import/blocks/C1.txt +++ b/scripts/import/blocks/C1.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLNTFC {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 15 %(yr)s 1 Harvest-Annual %(plant)s {} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLNTFC {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 15 %(yr)s 1 Harvest-Annual %(plant)s {} diff --git a/scripts/import/blocks/C2.txt b/scripts/import/blocks/C2.txt index 88c25384..a3444888 100644 --- a/scripts/import/blocks/C2.txt +++ b/scripts/import/blocks/C2.txt @@ -1,5 +1,5 @@ %(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 15 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 1} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 15 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 1} diff --git a/scripts/import/blocks/C3.txt b/scripts/import/blocks/C3.txt index 590b020f..756162d5 100644 --- a/scripts/import/blocks/C3.txt +++ b/scripts/import/blocks/C3.txt @@ -1,6 +1,6 @@ %(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} %(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 15 %(yr)s 1 Harvest-Annual %(plant)s {} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 15 %(yr)s 1 Harvest-Annual %(plant)s {} 11 1 %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} diff --git a/scripts/import/blocks/C4.txt b/scripts/import/blocks/C4.txt index 9327b630..5a4d697d 100644 --- a/scripts/import/blocks/C4.txt +++ b/scripts/import/blocks/C4.txt @@ -1,7 +1,7 @@ -%(pdatem15)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 15 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 1} +%(pdatem15)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 15 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 1} diff --git a/scripts/import/blocks/C5.txt b/scripts/import/blocks/C5.txt index a20d01fa..d34a55cd 100644 --- a/scripts/import/blocks/C5.txt +++ b/scripts/import/blocks/C5.txt @@ -1,5 +1,5 @@ -%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 15 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 15 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/C6.txt b/scripts/import/blocks/C6.txt index 31abe169..6528b665 100644 --- a/scripts/import/blocks/C6.txt +++ b/scripts/import/blocks/C6.txt @@ -1,6 +1,6 @@ -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 15 %(yr)s 1 Harvest-Annual %(plant)s {} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdatem5)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 15 %(yr)s 1 Harvest-Annual %(plant)s {} 11 1 %(yr)s 1 Tillage OpCropDef.MOPL {0.203200, 1} diff --git a/scripts/import/blocks/L1.txt b/scripts/import/blocks/L1.txt index 4c92634c..7f57e034 100644 --- a/scripts/import/blocks/L1.txt +++ b/scripts/import/blocks/L1.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLNTFC {0.050000, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLNTFC {0.050000, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} diff --git a/scripts/import/blocks/L2.txt b/scripts/import/blocks/L2.txt index 6029f03e..4b7ba194 100644 --- a/scripts/import/blocks/L2.txt +++ b/scripts/import/blocks/L2.txt @@ -1,5 +1,5 @@ %(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/L3.txt b/scripts/import/blocks/L3.txt index 0ac5ba59..c4602387 100644 --- a/scripts/import/blocks/L3.txt +++ b/scripts/import/blocks/L3.txt @@ -1,5 +1,5 @@ -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/L4.txt b/scripts/import/blocks/L4.txt index 3d7b0f90..01a6aa6a 100644 --- a/scripts/import/blocks/L4.txt +++ b/scripts/import/blocks/L4.txt @@ -1,7 +1,7 @@ %(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 2} %(pdatem5)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} %(pdate)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/L5.txt b/scripts/import/blocks/L5.txt index 41cdceb6..37306ac6 100644 --- a/scripts/import/blocks/L5.txt +++ b/scripts/import/blocks/L5.txt @@ -1,6 +1,6 @@ -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} -%(pdatem5)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} +%(pdatem5)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} 11 1 %(yr)s 1 Tillage OpCropDef.MOPL {0.203200, 1} diff --git a/scripts/import/blocks/L6.txt b/scripts/import/blocks/L6.txt index bd375593..8d26ee55 100644 --- a/scripts/import/blocks/L6.txt +++ b/scripts/import/blocks/L6.txt @@ -1,6 +1,6 @@ -%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} -%(pdatem5)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} -%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} -%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} -10 10 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} +%(pdatem10)s %(yr)s 1 Tillage OpCropDef.FCSTACDP {0.101600, 1} +%(pdatem5)s %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +%(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} +%(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} +10 10 %(yr)s 1 Harvest-Annual %(plant)s {} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 2} diff --git a/scripts/import/blocks/P0.txt b/scripts/import/blocks/P0.txt index 8e6228a1..9245e973 100644 --- a/scripts/import/blocks/P0.txt +++ b/scripts/import/blocks/P0.txt @@ -1,3 +1,3 @@ -6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} diff --git a/scripts/import/blocks/P1.txt b/scripts/import/blocks/P1.txt index 8e6228a1..9245e973 100644 --- a/scripts/import/blocks/P1.txt +++ b/scripts/import/blocks/P1.txt @@ -1,3 +1,3 @@ -6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} diff --git a/scripts/import/blocks/P2.txt b/scripts/import/blocks/P2.txt index 8e6228a1..9245e973 100644 --- a/scripts/import/blocks/P2.txt +++ b/scripts/import/blocks/P2.txt @@ -1,3 +1,3 @@ -6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} diff --git a/scripts/import/blocks/P3.txt b/scripts/import/blocks/P3.txt index 8e6228a1..9245e973 100644 --- a/scripts/import/blocks/P3.txt +++ b/scripts/import/blocks/P3.txt @@ -1,3 +1,3 @@ -6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} diff --git a/scripts/import/blocks/P4.txt b/scripts/import/blocks/P4.txt index 8e6228a1..9245e973 100644 --- a/scripts/import/blocks/P4.txt +++ b/scripts/import/blocks/P4.txt @@ -1,3 +1,3 @@ -6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} diff --git a/scripts/import/blocks/P5.txt b/scripts/import/blocks/P5.txt index 8e6228a1..9245e973 100644 --- a/scripts/import/blocks/P5.txt +++ b/scripts/import/blocks/P5.txt @@ -1,3 +1,3 @@ -6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} diff --git a/scripts/import/blocks/P6.txt b/scripts/import/blocks/P6.txt index 8e6228a1..9245e973 100644 --- a/scripts/import/blocks/P6.txt +++ b/scripts/import/blocks/P6.txt @@ -1,3 +1,3 @@ -6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} -9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +6 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +7 15 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} +9 1 %(yr)s 1 Cut-Perennial CropDef.ALFALFA {} diff --git a/scripts/import/blocks/R1.txt b/scripts/import/blocks/R1.txt index 5d340a3e..da2c5c88 100644 --- a/scripts/import/blocks/R1.txt +++ b/scripts/import/blocks/R1.txt @@ -1,9 +1,9 @@ -4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} -4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} -8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} -10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} +4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} +4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} +8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} +10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} diff --git a/scripts/import/blocks/R2.txt b/scripts/import/blocks/R2.txt index 5d340a3e..da2c5c88 100644 --- a/scripts/import/blocks/R2.txt +++ b/scripts/import/blocks/R2.txt @@ -1,9 +1,9 @@ -4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} -4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} -8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} -10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} +4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} +4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} +8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} +10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} diff --git a/scripts/import/blocks/R3.txt b/scripts/import/blocks/R3.txt index 5d340a3e..da2c5c88 100644 --- a/scripts/import/blocks/R3.txt +++ b/scripts/import/blocks/R3.txt @@ -1,9 +1,9 @@ -4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} -4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} -8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} -10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} +4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} +4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} +8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} +10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} diff --git a/scripts/import/blocks/R4.txt b/scripts/import/blocks/R4.txt index 5d340a3e..da2c5c88 100644 --- a/scripts/import/blocks/R4.txt +++ b/scripts/import/blocks/R4.txt @@ -1,9 +1,9 @@ -4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} -4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} -8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} -10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} +4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} +4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} +8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} +10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} diff --git a/scripts/import/blocks/R5.txt b/scripts/import/blocks/R5.txt index 5d340a3e..da2c5c88 100644 --- a/scripts/import/blocks/R5.txt +++ b/scripts/import/blocks/R5.txt @@ -1,9 +1,9 @@ -4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} -4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} -8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} -10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} +4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} +4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} +8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} +10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} diff --git a/scripts/import/blocks/R6.txt b/scripts/import/blocks/R6.txt index 5d340a3e..da2c5c88 100644 --- a/scripts/import/blocks/R6.txt +++ b/scripts/import/blocks/R6.txt @@ -1,9 +1,9 @@ -4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} -4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} -4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} -4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} -4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} -8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} -10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} +4 1 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.FIEL0001 {0.050000, 2} +4 3 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.ANHYDROS {0.050000, 2} +4 5 %(yr)s 1 Tillage OpCropDef.HASPTCT {0.050000, 2} +4 10 %(yr)s 1 Tillage OpCropDef.DRDDO {0.050000, 2} +4 10 %(yr)s 1 Plant-Annual CropDef.Bar_8319 {1.200000} +8 15 %(yr)s 1 Harvest-Annual CropDef.Bar_8319 {} +10 15 %(yr)s 1 Tillage OpCropDef.CHISCOST {0.050000, 2} diff --git a/scripts/import/blocks/W1.txt b/scripts/import/blocks/W1.txt index 22201e1b..854b1699 100644 --- a/scripts/import/blocks/W1.txt +++ b/scripts/import/blocks/W1.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} -%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} -10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file +%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} +%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} +10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file diff --git a/scripts/import/blocks/W2.txt b/scripts/import/blocks/W2.txt index 22201e1b..854b1699 100644 --- a/scripts/import/blocks/W2.txt +++ b/scripts/import/blocks/W2.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} -%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} -10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file +%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} +%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} +10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file diff --git a/scripts/import/blocks/W3.txt b/scripts/import/blocks/W3.txt index 22201e1b..854b1699 100644 --- a/scripts/import/blocks/W3.txt +++ b/scripts/import/blocks/W3.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} -%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} -10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file +%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} +%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} +10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file diff --git a/scripts/import/blocks/W4.txt b/scripts/import/blocks/W4.txt index 22201e1b..854b1699 100644 --- a/scripts/import/blocks/W4.txt +++ b/scripts/import/blocks/W4.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} -%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} -10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file +%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} +%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} +10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file diff --git a/scripts/import/blocks/W5.txt b/scripts/import/blocks/W5.txt index 22201e1b..854b1699 100644 --- a/scripts/import/blocks/W5.txt +++ b/scripts/import/blocks/W5.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} -%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} -10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file +%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} +%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} +10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file diff --git a/scripts/import/blocks/W6.txt b/scripts/import/blocks/W6.txt index 22201e1b..854b1699 100644 --- a/scripts/import/blocks/W6.txt +++ b/scripts/import/blocks/W6.txt @@ -1,3 +1,3 @@ -%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} -%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} -10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file +%(pdate)s %(yr)s 1 Tillage OpCropDef.DRNTFRFC {0.101600, 2} +%(pdate)s %(yr)s 1 Plant-Annual CropDef.spwheat1 {0.762000} +10 15 %(yr)s 1 Harvest-Annual CropDef.spwheat1 {} \ No newline at end of file From b54e01cdb63d2f6c64b80e85bc6e6909e4e7c9fa Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 5 Dec 2023 09:42:14 -0600 Subject: [PATCH 08/10] fix: tillage 3 switch fall tandem to chisel --- scripts/import/blocks/C3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/import/blocks/C3.txt b/scripts/import/blocks/C3.txt index 756162d5..21fe2d10 100644 --- a/scripts/import/blocks/C3.txt +++ b/scripts/import/blocks/C3.txt @@ -3,4 +3,4 @@ %(pdate)s %(yr)s 1 Tillage OpCropDef.PLDDO {0.050800, 2} %(pdate)s %(yr)s 1 Plant-Annual %(plant)s {0.762000} 10 15 %(yr)s 1 Harvest-Annual %(plant)s {} -11 1 %(yr)s 1 Tillage OpCropDef.TAND0002 {0.101600, 2} +11 1 %(yr)s 1 Tillage OpCropDef.CHISSTSP {0.203200, 1} From 26ad42c652b30923b5127b3c793d61eac97c0a6f Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 5 Dec 2023 09:50:11 -0600 Subject: [PATCH 09/10] mnt: simplify example rotation logic --- scripts/import/flowpath2prj.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/import/flowpath2prj.py b/scripts/import/flowpath2prj.py index 5cd33884..2e89b8c5 100644 --- a/scripts/import/flowpath2prj.py +++ b/scripts/import/flowpath2prj.py @@ -524,8 +524,8 @@ def main(argv): def generate_combos(): """Create rotation files for Eduardo inspection.""" for cfactor in range(1, 7): - for rot in "CCC CBC CCB BCB BBC BCB BBB".split(): - res = read_file(0, "IA_NORTH", rot[0], rot[1], rot[2], cfactor, 2) + for rot in "CC CB BC BB".split(): + res = read_file(0, "IA_NORTH", "M", rot[0], rot[1], cfactor, 1) with open(f"ex_{rot}_{cfactor}.rot", "w", encoding="utf8") as fh: fh.write(res) From b5df38137f801f8799361af2a5271f9b13bceb7d Mon Sep 17 00:00:00 2001 From: akrherz Date: Tue, 5 Dec 2023 10:05:19 -0600 Subject: [PATCH 10/10] fix: remove fall chisel for till2 going to beans --- scripts/import/flowpath2prj.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/import/flowpath2prj.py b/scripts/import/flowpath2prj.py index 2e89b8c5..1ffcc0d3 100644 --- a/scripts/import/flowpath2prj.py +++ b/scripts/import/flowpath2prj.py @@ -148,6 +148,11 @@ def read_file(scenario, zone, prevcode, code, nextcode, cfactor, year): f"4 15 {year} 1 Plant-Perennial CropDef.ALFALFA {{0.000000}}\n" f"{data}" ) + # Remove fall chisel after corn when going into soybeans for 2 + if cfactor == 2 and nextcode == "B": + pos = data.find("11 1") + if pos > 0: + data = data[:pos] # The fall tillage operation is governed by the next year crop if cfactor == 5 and nextcode == "C":