# GLAMBIE Model Submission Requirements

This repository targets a GLAMBIE model-run contribution based on the model data submission guide.

## Planned Contributions

We plan to submit two model contributions:
1. Fixed-geometry run
2. Spinup-geometry run

Both contributions should follow the same data and metadata requirements below.

## Participation and Scope

- Contribute a unique glacier mass-change dataset for at least one GTN-G region (regions 1-19).
- Submissions are regional aggregates built from individual glacier model runs.
- Model methods should be documented in peer-reviewed literature and submitted by the developer group.

## Standardization Requirements

- Forcing: ECMWF ERA5 reanalysis.
- Temporal coverage: January 1975 to March 2026.
- Temporal resolution: monthly.
- Spatial coverage: one, multiple, or all GTN-G first-order regions (1-19).
- Unit domain: submit glacier change variables in mwe.

## CSV File Format

- Submit data as ASCII CSV.
- If multiple regions are included, submit all regions in a single CSV file.
- Use the template column structure and order from model_submission_template.csv.

## Required Columns and Conventions

- region_id: GTN-G region identifier.
- start_date: DD/MM/YYYY.
- end_date: DD/MM/YYYY.
- Time continuity: each end_date should ideally equal the next row start_date (no temporal gaps).
- glacier_change_observed: required, must not be NaN.
- glacier_change_uncertainty: optional (leave blank if unavailable).
- glacier_change_observed_above_water_level: sea-level relevant mass change.
- glacier_change_observed_above_water_level_uncertainty: optional.
- glacier_change_observed_below_water_level: not sea-level relevant mass change.
- glacier_change_observed_below_water_level_uncertainty: optional.
- glacier_frontal_ablation: positive value convention; leave blank if unavailable.
- glacier_frontal_ablation_uncertainty: optional.
- unit: mwe for model runs.
- glacier_area_reference_start: regional area (km2) assumed at start_date.
- glacier_area_reference_end: regional area (km2) assumed at end_date.
- observational_coverage_percentage: likely 100 for full regional model coverage.
- remarks: optional comments.

## Consistency Checks Before Submission

- No NaN values in glacier_change_observed.
- Date formatting is DD/MM/YYYY for all rows.
- Monthly rows are temporally contiguous where possible.
- unit is mwe in all rows.
- glacier_change_observed approximately equals above_water_level plus below_water_level (within tolerance).

## Methods Document Requirement

- Include an accompanying methods PDF describing model implementation.
- Reference corresponding peer-reviewed method publication(s).
- Describe calibration data choices, forcing, uncertainty approach, geometry setup, and limitations.

## Submission Timing

- Model submission window noted in guide: June 2026 to 1 August 2026.

## Current Implementation Status (2026-06-17)

- Added new helper module: glambie_helper.py (kept inspiration/ files unchanged).
- Implemented entity task fixed_geometry_specific_mb_ts:
	- Computes monthly glacier-specific MB from OGGM model_flowlines using MultipleFlowlineMassBalance.
	- Uses fixed geometry.
	- Current default period is January 1975 to December 2025.
	- Stores per-glacier netcdf file with:
		- specific_mb_mwe
		- reference_area_m2
		- rgi_area_km2
		- task_success (1 for success)
- Implemented fallback behavior for failed glaciers:
	- Always writes a glacier netcdf.
	- Uses NaN specific_mb_mwe and includes rgi_area_km2 and task_success=0.
- Implemented regional global task compile_fixed_geometry_specific_mb_region:
	- Reads all glacier files (RGI*.nc) from output directory.
	- Computes area-weighted regional monthly specific MB.
	- Computes monthly completion_rate_pct from covered area / total expected area.
	- Writes regional netcdf region_specific_mb{filesuffix}.nc.

## Resume Checklist

- Add/run driver script for fixed-geometry workflow over target GTN-G region(s).
- Confirm final temporal requirement for submission output:
	- Code currently defaults to 1975-01 to 2025-12.
	- Guide text indicates extension to 2026-03 may be requested for correction workflows.
- Convert regional MB series to GLAMBIE CSV format based on model_submission_template.csv.
- Add optional uncertainty estimation and confidence-level metadata choice (68% or 95%).
- Add above/below water-level partition and frontal ablation fields (or leave blank where unavailable).
