# README - E3SM Genesis Shared Dataset

This directory contains a subset of E3SM initial-condition files and historical model output prepared for the Genesis project.

The current dataset is based on an E3SM S2D initialization at:

```text
2018-05-01 00:00 UTC
```

The shared files include atmosphere, land, ocean, sea-ice, river-routing, and coupler components.

For the Genesis machine-learning workflow, the two main data groups have distinct roles:

```text
initial_condition/
    -> correction target
    -> input to the drift prediction model

model_output/
    -> historical E3SM prediction
    -> source used to construct drift labels
```

## Directory Structure

```text
genesis_share/
|-- initial_condition/
|   |-- atm/
|   |-- cpl/
|   |-- ice/
|   |-- lnd/
|   |-- ocn/
|   `-- rof/
`-- model_output/
    |-- atm/
    |-- ice/
    |-- lnd/
    |-- ocn/
    `-- rof/
```

# 1. Initial Conditions

The `initial_condition/` directory contains the E3SM model states used to initialize the coupled prediction.

In the Genesis machine-learning workflow, these initial-condition files serve two primary purposes:

1. **Correction target** - the initialized state is the state that the Genesis correction framework aims to adjust.
2. **Input to the drift prediction model** - the same initialized state is used as input to the machine-learning model to predict subsequent initialization drift.

Conceptually:

```text
Initial Condition
      |
      +------------------------------+
      |                              |
      v                              v
Correction Target          Input to Drift Prediction Model
                                      |
                                      v
                               Predicted Drift
                                      |
                                      v
                           Corrected Initial Condition
```

The initialization time for the files in this dataset is:

```text
2018-05-01 00:00 UTC
```

## 1.1 Atmosphere - EAM

Directory:

```text
initial_condition/atm/
```

Atmospheric initial conditions are provided for 10 ensemble members:

```text
v3.LR.amip_0101.HICCUP.atm_era5.EN00.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN01.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN02.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN03.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN04.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN05.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN06.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN07.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN08.eam.i.2018-05-01-00000.nc
v3.LR.amip_0101.HICCUP.atm_era5.EN09.eam.i.2018-05-01-00000.nc
```

These files provide atmospheric initial conditions for ensemble members EN00 through EN09.

The atmospheric initial conditions are based on ERA5-derived EAM initial states.

## 1.2 Coupler

Directory and file:

```text
initial_condition/cpl/
20251024_s2d_spinup.cpl.r.2018-05-01-00000.nc
```

This file provides the coupler restart state for the 2018-05-01 initialization.

## 1.3 Land - ELM

Directory and file:

```text
initial_condition/lnd/
20251024_s2d_spinup.elm.r.2018-05-01-00000.nc
```

This file provides the ELM land-model restart state.

## 1.4 Ocean - MPAS-Ocean

Directory and file:

```text
initial_condition/ocn/
20251024_s2d_spinup.mpaso.rst.2018-05-01_00000.nc
```

This file provides the MPAS-Ocean restart state.

## 1.5 Sea Ice - MPAS-Seaice

Directory and file:

```text
initial_condition/ice/
20251024_s2d_spinup.mpassi.rst.2018-05-01_00000.nc
```

This file provides the MPAS-Seaice restart state.

## 1.6 River Routing - MOSART

Directory and file:

```text
initial_condition/rof/
20251024_s2d_spinup.mosart.r.2018-05-01-00000.nc
```

This file provides the MOSART river-routing restart state.

The non-atmospheric components currently use a common coupled spin-up state for this initialization date, while the atmospheric component includes 10 ensemble members.

# 2. Model Output

The `model_output/` directory contains historical E3SM predictions generated after initialization.

In the Genesis machine-learning workflow, these files serve two primary purposes:

1. **Historical model prediction output** - they provide the E3SM prediction trajectory following initialization.
2. **Source for constructing drift labels** - the historical model predictions are compared with the appropriate reference data to diagnose initialization drift and construct drift labels for machine-learning training and evaluation.

Conceptually:

```text
Initial Condition
      |
      v
Historical E3SM Prediction
      |
      + Reference Data
      |
      v
Diagnosed Initialization Drift
      |
      v
Drift Labels
      |
      v
Train and Evaluate Drift Prediction Model
```

The current model output is from the BruteForce/Reanalysis initialization experiment starting at:

```text
2018-05-01 00:00 UTC
```

The files currently provided are for ensemble member EN00 and contain monthly output for May 2018.

## 2.1 Atmosphere - EAM

Directory and file:

```text
model_output/atm/
WCYCL20TR_ne30pg2_r05_IcoswISC30E3r5_BruteForce_2018050100.EN00.eam.h0.2018-05.nc
```

This file contains monthly atmospheric history output from EAM.

## 2.2 Land - ELM

Directory and file:

```text
model_output/lnd/
WCYCL20TR_ne30pg2_r05_IcoswISC30E3r5_BruteForce_2018050100.EN00.elm.h0.2018-05.nc
```

This file contains monthly land-model history output from ELM.

## 2.3 Ocean - MPAS-Ocean

Directory and file:

```text
model_output/ocn/
WCYCL20TR_ne30pg2_r05_IcoswISC30E3r5_BruteForce_2018050100.EN00.mpaso.hist.am.timeSeriesStatsMonthly.2018-05-01.nc
```

This file contains monthly MPAS-Ocean time-series statistics.

## 2.4 Sea Ice - MPAS-Seaice

Directory and file:

```text
model_output/ice/
WCYCL20TR_ne30pg2_r05_IcoswISC30E3r5_BruteForce_2018050100.EN00.mpassi.hist.am.timeSeriesStatsMonthly.2018-05-01.nc
```

This file contains monthly MPAS-Seaice time-series statistics.

## 2.5 River Routing - MOSART

Directory and file:

```text
model_output/rof/
WCYCL20TR_ne30pg2_r05_IcoswISC30E3r5_BruteForce_2018050100.EN00.mosart.h0.2018-05.nc
```

This file contains monthly MOSART river-routing output.

# 3. Data Roles in the Genesis Workflow

The relationship between the shared initial-condition files and model output can be summarized as:

```text
                    +---------------------------+
                    |     Initial Condition     |
                    +---------------------------+
                         |                 |
                         |                 |
                         v                 v
                 Correction Target    Drift Model Input
                                           |
                                           v
                                    Predicted Drift


Initial Condition
      |
      v
Historical E3SM Prediction
      |
      + Reference Data
      |
      v
Observed/Diagnosed Drift
      |
      v
Drift Labels
```

In summary:

```text
initial_condition/
    - state to be corrected
    - input features for drift prediction

model_output/
    - historical E3SM prediction
    - source data for diagnosing drift
    - source data for constructing drift labels
```

# 4. Experiment Naming

The model-output case name is:

```text
WCYCL20TR_ne30pg2_r05_IcoswISC30E3r5_BruteForce_2018050100
```

Important parts of the naming convention include:

```text
2018050100    Initialization at 2018-05-01 00 UTC
EN00          Ensemble member 00
BruteForce    Reanalysis/BruteForce initialization experiment
```

The simulation uses the coupled E3SM atmosphere-land-ocean-sea-ice-river system.

# 5. Current Dataset Coverage

The current shared dataset includes:

```text
Initial conditions:
    Atmosphere      EN00 through EN09
    Coupler         common restart state
    Land            common restart state
    Ocean           common restart state
    Sea ice         common restart state
    River routing   common restart state

Model output:
    Atmosphere      EN00
    Land            EN00
    Ocean           EN00
    Sea ice         EN00
    River routing   EN00
```

The provided model-output files currently contain monthly output for May 2018.

# 6. NetCDF Files

All files are in NetCDF format.

File metadata and variable information can be inspected using:

```bash
ncdump -h FILE.nc
```

or NCO:

```bash
ncks -m FILE.nc
```

For example, to inspect an atmospheric initial-condition file:

```bash
ncdump -h \
initial_condition/atm/v3.LR.amip_0101.HICCUP.atm_era5.EN00.eam.i.2018-05-01-00000.nc
```

To inspect the atmospheric model output:

```bash
ncdump -h \
model_output/atm/WCYCL20TR_ne30pg2_r05_IcoswISC30E3r5_BruteForce_2018050100.EN00.eam.h0.2018-05.nc
```

# 7. Intended Use

These files are shared primarily for development and testing associated with the Genesis project.

Potential uses include:

* inspecting E3SM coupled initial states;
* preparing machine-learning inputs from E3SM initial conditions;
* developing initialization-correction methods;
* predicting initialization drift from the initialized model state;
* analyzing historical E3SM prediction trajectories;
* diagnosing initialization adjustment and drift;
* constructing drift labels using model predictions and reference data;
* training and evaluating drift-aware machine-learning models;
* comparing initialized simulations with reference datasets;
* testing workflows before scaling to the larger E3SM S2D hindcast archive.

Users should preserve the original shared files and create separate copies or derived datasets for processing whenever possible.

