Cnh Yield Reports Remaining Status

Task Details
← Task Board

Task Description

# CNH Yield Reports Task - Status Report

**Agent:** data_pipeline
**Task File:** cnh_yield_reports_remaining.md
**Investigated:** 2026-02-16
**Status:** ❌ BLOCKED - Data Not Available

---

## Summary

Cannot proceed with generating CNH yield field reports because the required yield data does not exist on the system. The task assumes yield data has been "already pulled via production API" but this is not the case.

## Investigation Findings

### Missing Data
1. **No yield CSV files**
   - `/data/Sandbox/CNH/output/` directory does not exist
   - No `*_yield.csv` files found anywhere on system

2. **No processed yield data**
   - Checked `/data/processed_data/doug/*/2025/` across all fields
   - No yield-related CSV files found

3. **CNH API sync never run**
   ```bash
   $ python /data/Sandbox/FarmData_API_Integration/api_sync/cnh_sync.py --status
   CNH SYNC STATUS
   ==================================================
   Last sync: never
   Boundaries: 0
   Operations: 0
   Equipment:  0
   ```

4. **T09 Season Report does not exist**
   - Task claims "T09 (Winter Wheat): 9-page branded Season Report complete"
   - No PDF found matching `*T09*Season*Report*.pdf`
   - No PDFs exist in `/data/Sandbox/CNH/` at all

5. **Raw CN1 files not on Pi**
   - README.md references: `250925L3.cn1.zip` and `250925L8.cn1.zip`
   - Source location: `D:\Documents\FarmTech\Clients\Weist,Doug\2025\Yield Data\`
   - This is a Windows path — files not found on Pi

### What Does Exist

✅ **Report generation scripts:**
- `/data/Sandbox/CNH/field_season_report.py` (field report generator)
- `/data/Sandbox/CNH/farm_summary_report.py` (farm summary)
- `/data/Sandbox/CNH/yield_cleaner.py` (5-pass cleaning algorithm)
- `/data/Sandbox/CNH/run_all_fields.py` (batch processor)

✅ **CN1 extraction tools:**
- `/data/Sandbox/CNH/CN1Extractor/` (.NET tool to extract yield from CN1 files)
- CNH SDK with license key

✅ **CNH API integration:**
- `/data/Sandbox/FarmData_API_Integration/api_sync/cnh_sync.py`
- `/data/Sandbox/FarmData_API_Integration/CNH/CNHFieldOpsAPI.py`
- Requires OAuth setup (tokens not configured)

✅ **Other field data in processed_data:**
- Seeding data (ISOXML/TAP) for some fields
- Spray data for some fields
- Field boundaries for some fields
- But NO yield data for any field

## Prerequisite Steps Required

Before this task can proceed, need to:

### Option A: Extract from CN1 Files (Local Processing)
1. Locate the 2025 CN1 files:
   - `250925L3.cn1.zip` (Case IH 7120 - main combine)
   - `250925L8.cn1.zip` (Case IH 8120)
2. Copy to Pi (e.g., `/data/clients/Weist,Doug/2025/Yield Data/`)
3. Extract using CN1Extractor:
   ```bash
   cd /data/Sandbox/CNH/CN1Extractor/CN1Extractor
   dotnet run -- "/path/to/250925L3.cn1" "/data/Sandbox/CNH/output/2025" ""
   ```
4. Run batch cleaning:
   ```bash
   cd /data/Sandbox/CNH
   python run_all_fields.py
   ```

### Option B: Pull from CNH Cloud API
1. Set up OAuth authentication for CNH FieldOps API
2. Save tokens to `/data/Sandbox/FarmData_API_Integration/CNH/cnh_tokens.json`
3. Run sync:
   ```bash
   python /data/Sandbox/FarmData_API_Integration/api_sync/cnh_sync.py --customer doug
   ```

## Questions for Doug

1. **Where are the 2025 CN1 yield files?**
   - Are they still on the Windows machine at `D:\Documents\FarmTech\Clients\Weist,Doug\2025\Yield Data\`?
   - Should I access them via network mount?

2. **Should I use CNH cloud API instead?**
   - Would require setting up OAuth authentication
   - Data would come from CNH cloud instead of local CN1 files

3. **Is the T09 report completed elsewhere?**
   - Task says "T09 is already done" but I don't see it
   - Was this done on a different machine?

4. **What is the actual 2025 harvest status?**
   - Task mentions 16 fields across 4 crops (Barley, Chickpea, Green Peas, Winter Wheat)
   - Are all 16 fields harvested?
   - Is yield data available for all of them?

## Recommendation

**HOLD this task** until:
1. 2025 CN1 yield data is accessible on the Pi, OR
2. CNH API OAuth is configured and data can be pulled from cloud

Once yield data is available, the report generation pipeline is ready to run.

---

**Filed by:** data_pipeline agent
**Date:** 2026-02-16

Job Queue (0)

No job queue entries for this task yet