Skip to content

Adding statewide monitoring workflow under data.remote inst/ccmmf - #3913

Merged
mdietze merged 75 commits into
PecanProject:developfrom
sarahkanee:feature/ccmmf-statewide-monitoring-inst
Aug 12, 2026
Merged

Adding statewide monitoring workflow under data.remote inst/ccmmf#3913
mdietze merged 75 commits into
PecanProject:developfrom
sarahkanee:feature/ccmmf-statewide-monitoring-inst

Conversation

@sarahkanee

Copy link
Copy Markdown
Contributor

Includes hls, phenology, events, tillage, traits.
Single tree for dependent scripts (events + pool + tillage). Should break this up at some point

Description

Motivation and Context

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Includes hls, phenology, events, tillage, traits.
Single tree for dependent scripts (events + pool + tillage). Should break this up at some point
mdietze and others added 9 commits April 17, 2026 14:22
Includes orchestrator, crop/subclass and ADOY gap-fill, product build,
QC reporting, and SGE submission scripts. Excludes large runtime artifacts
(CDL fractions, trained parquet tables, logs).
Bring lab management code (extract packages, events/phenology/hls/traits,
stakeholder docs, Session 0 env template) onto the PR branch. Ship county
crop matrices as real files and resolve shared HLS libs via sibling paths
so clones work without /projectnb defaults.
Session 1 adds an operator runbook for cadwr-landuse (01-03) while pointing at Alexey's README/docs as canonical; pipeline and Session 0 use user wording and ASCII.
Session 1 adds a CLASS/SUBCLASS lookup check (ignore DWR ** sentinels), spells out management/*-with-YEAR publish dirs, and checks out the cadwr-landuse auto-discover branch until main has it.
These one-off modislc/skanee/neochatt path scripts are lab ops, not part of the portable monitoring stack shown in PR PecanProject#3913.
Sessions 0-4 and pipeline are the curriculum; package READMEs are detail docs linked from sessions, not a parallel TOC.
Lead README, Session 0/1, and pipeline with what the trainee does (add 2024, re-run 2023), portable paths first, and a clearer checklist.
**You are here to process a new LandIQ year.**

This training walkthrough adds **2024** and re-runs **2023** (the year pair).
You work on **your own Linux cloud / HPC** (not BU SCC).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is only meaningful to people who ARE working on the BU SCC. No one else will know what that is or consider that the "default"

@@ -0,0 +1,56 @@
# CCMMF monitoring pipeline - documentation

**You are here to process a new LandIQ year.**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's LandIQ? what's a LandIQ year? Why would I want to process one and what does that mean?

@@ -0,0 +1,34 @@
# CCMMF statewide monitoring (`inst/ccmmf`)

California LandIQ → phenology → management-event pipeline scripts for PEcAn.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I was looking in this folder for the first time, how would I know what this is? You need to start more broadly and explain yourself. Also, I don't think it's fair to assume that the ONLY thing you'll end up putting in the data.remote/insts/ccmmf folder will be phenology


**Documentation (start here):** [documentation/README.md](documentation/README.md)
**Environment setup:** [documentation/sessions/00-environment.md](documentation/sessions/00-environment.md)
**PR:** https://github.com/PecanProject/pecan/pull/3913

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why the documentation would reference a PR. Drop


| Path | Role |
|------|------|
| `documentation/` | Stakeholder sessions + `pipeline.md` + `ccmmf_env.example.sh` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expand every single "role". Even knowing how this workflow works, I find the descriptions overly terse and cryptic. Any time you read/write documentation or tutorials, you have to put yourself in the shoes of someone who has never heard of what you're doing and is looking at this project for the first time

export CCMMF_ROOT=/projectnb/dietzelab/ccmmf

export LANDIQ_GAPFILL_ROOT=$CCMMF_ROOT/management/landiq-gapfill
export CCMMF_LANDIQ_V4=$CCMMF_ROOT/LandIQ-harmonized-v4.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's safe to define variable names with version numbers in them, it will require a lot of code fixes (and potential bugs) when LandIQ jumps to V5.

A routine run updates only the years you pass and carries the rest over from the
existing product, so adding a year is cheap.

On a routine run, emission tables should **not** rebuild. If they do, confirm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are emission tables?

compute node. Run the whole thing as one batch job:

```bash
qsub -l buyin -l h_rt=8:00:00 -v 'GAPFILL_ARGS=2023,2024' $LANDIQ_GAPFILL_ROOT/sge/run_gapfill.sge

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't run for other people. You need to do more to explain concepts so users can understand what something is supposed to do. otherwise they won't know how to configure it for their own use case

@@ -0,0 +1,32 @@
#!/bin/bash -l
#
# SGE job: download CDL GeoTIFF(s) from NASS CropScape (avoids login-node timeout).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. unclear what SGE is
  2. these scripts look like they will only run on the BU SCC, not CARB's server or any else's

})

.fa <- sub("^--file=", "", grep("^--file=", commandArgs(trailingOnly = FALSE), value = TRUE)[1L])
source(file.path(dirname(normalizePath(.fa, mustWork = FALSE)), "_lib", "pkg_root.R"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as your code matures towards production quality, you should be using "source" less and relying on the package more. This will mean moving more things into the /R folder and also using system.file more than file.path

sarahkanee and others added 18 commits July 23, 2026 10:58
Sessions and package README now point at pipeline.md. Package README explains CCMMF broadly without a PR link and clarifies first-time setup from inst/ccmmf.
…sh docs.

Fold MSLSP into phenology/extract and NDTI into tillage/extract; move tillage
metrics into events; remove SGE/explore leftovers; rewrite pipeline and session
docs around the year-pair training path.
Removed first-time setup instructions from README.md and streamlined the content.
Added instructions for running the pipeline in the README.
Keep "package" only for real R/Python/PEcAn packages.
Removed duplicate instruction for running the pipeline.
Updated descriptions for various paths and removed first-time setup instructions.
Removed redundant line about following pipeline documentation.
Updated section heading from 'tree' to 'branch' for clarity.
Removed reference to LandIQ crop code lookup table from README.
Document TARGET/PRIOR year roles in the pipeline, share a general session map across Sessions 0-3, and cast Session 1 steps as an input/output flow.
Point harmonized output at cadwr 03-final, require Session 0, and harden first-time operator guidance so annual LandIQ updates are easier to run and QC.
…ntory workflow.

Clarify Session 0/1 guidance (including S3 harmonized crops path), slim the tree README and pipeline, and align gap-fill docs/scripts with how crop and ADOY fills actually run.
…gapfill/outputs.

Clones can use these lookups as-is; do not rebuild them on a routine year-pair run.
CropScape is gone, so Session 0 drops CropScapeR and Session 1 treats tile overlays and CDL extract as batch jobs.
Drop leftover QC, coverage CSVs, and the extra lookup parquet so clones match what crop and adoy actually read.
…repeat each other.

Also drop extra gap-fill README pointers and say why the existing lookup tables cover later years.
…cond Session 1.

One home per idea; year-pair commands stay in the session. Move CLI and env vars to an appendix.
@mdietze
mdietze enabled auto-merge August 11, 2026 23:46
auto-merge was automatically disabled August 12, 2026 03:01

Head branch was pushed to by a user without write access

@mdietze
mdietze added this pull request to the merge queue Aug 12, 2026
Merged via the queue into PecanProject:develop with commit f3744c8 Aug 12, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants