# CPC NMME Regional Forecast Viewer (`how_to.md`)

```
Author :   Dr. Li Xu
Contacts:  li.xu@noaa.gov
```

## Overview

The `index.html` file provides a responsive, web-based viewer for regional NMME (National Multi-Model Ensemble) forecast products generated under `/cpc/home/li.xu/lxu/Py/ID/nmme3/country/Fig_Dir`.

The design strictly matches the operational styling and accessibility guidelines of `cpc.ncep.noaa.gov`:
- Light blue banner (`#0072bc`) with white text and center-aligned agency titles:
  - Left icon: `https://www.noaa.gov/themes/custom/noaa_guswds/images/noaa_digital_logo.svg` linking to `noaa.gov`.
  - Center: Three-line centered titles (National Weather Service, Climate Prediction Center, International Desk) linking to `weather.gov` and `cpc.ncep.noaa.gov`.
  - Right icon: `https://www.cpc.ncep.noaa.gov/nwscwi/nwsright.jpg` (with local fallback) linking to `weather.gov`.
- Light blue-gray background (`#e6eef8`), and white content area.
- Dense, flat government-site presentation with system sans-serif typography (`16px`).
- Responsive two-column grid (`display: grid`) pairing 2m Temperature on the left and Precipitation Rate on the right.
- `<table>` reserved strictly for tabular dataset metadata.
- Federal footer with organizational chain, author metadata, dynamic last-modified timestamp, and mandatory federal disclaimer links.

---

## Directory Structure & Image Naming

Images are loaded using relative paths based on the user's dropdown selections:

```
Fig_Dir/
├── index.html                   # Forecast viewer application
├── how_to.md                    # Operational documentation
├── monthly/                     # Monthly forecasts (Leads 1–5)
│   ├── CM4/
│   ├── CP/
│   ├── El_Salvador/
│   ├── Guatemala/
│   ├── Honduras/
│   ├── Nicaragua/
│   ├── Peru/
│   ├── PNG/
│   ├── Solomon_Islands/
│   └── Vanuatu/
└── seasonal/                    # Seasonal 3-month mean forecasts (Leads 1–5)
    ├── CM4/
    ...
    └── Vanuatu/
```

### Image File Naming Convention

* **Monthly**:
  - `monthly/<Country>/NMME_<Metric>_Temp2m_<Country>_mon<Lead>.png`
  - `monthly/<Country>/NMME_<Metric>_Prate_<Country>_mon<Lead>.png`
* **Seasonal**:
  - `seasonal/<Country>/NMME_<Metric>_Temp2m_<Country>_seas<Lead>.png`
  - `seasonal/<Country>/NMME_<Metric>_Prate_<Country>_seas<Lead>.png`

Where:
- `<Country>`: `Peru`, `Guatemala`, `Honduras`, `El_Salvador`, `Nicaragua`, `PNG`, `Solomon_Islands`, `Vanuatu`, `CM4`, `CP`
- `<Metric>`: `anom` (Anomaly), `Prob` (Tercile Probability)
- `<Lead>`: `1`, `2`, `3`, `4`, `5`

---

## Viewing the Page

### 1. In a Local Desktop Browser
Open `index.html` directly in any standard browser:
```bash
firefox index.html &
# or
google-chrome index.html &
```

### 2. Over SSH / Web Server
If viewing from an external desktop over an HTTP server:
```bash
python3 -m http.server 8080
```
Then navigate to `http://<server-ip>:8080/index.html`.
