Processing seasonal forecast

This page provides documentation on how to process the seasonal forecast every month. This begins with running scripts that modify metadata so that the forecast can be provided in a C3S-like format to the Climate Futures project. After this, some standard plots and indices are produced, and the website. is updated.

Metadata processing

In order to perform the metadata processing, you will need to load the shared conda environment on NIRD.

source /projects/NS9039K/shared/python3env/etc/p3env.sh

Then you need a copy of the GitHub repository with the processing scripts. If you don’t already have this, then take a clone of it.

git clone git@github.com:BjerknesCPU/C3S-NorCPM-CF.git

Now run h0.atm and h2.atm to process monthly and six-hourly data respectively. You need to modify the INPUT_GLOB and OUTPUT_DIR variables in the Input section of both files, then run.

python h0.atm
python h2.atm

These should produce files in your selected output directory which have modified metadata. These should be placed somewhere that can be accessed by Alex Lenkoski, the current location is:

/projects/NS9039K/www/seasonal_forecast/climate_futures/forecast/

Please follow the existing directory structure to make Alex’s processing easier. Email Alex (lenkoski@nr.no) and Ole (owul@norceresearch.no) to let them know that the forecast is complete.

Generating standard plots

Now the delivery to the Climate Futures team is complete, we will generate some plots and place them on the NS9039K website.

In order to produce ENSO and IOD index plots, we need up-to-date ERA5 data, so update this first:

cd /projects/NS9039K/data/external/reanalysis/ECMWF/ERA5/scripts
python download_era5_recent.py

This should download ERA5 data for 202101-Present and run a conversion to NetCDF using CDO. Check this downloaded correctly and converted to NetCDF:

ls /projects/NS9039K/data/external/reanalysis/ECMWF/ERA5/original/monthly_single_level/monthly_averaged_reanalysis/sst/

Then modify the two index plot scripts. You need to modify two input arguments at the top (marked clearly within the scripts). The scripts should output the ENSO and IOD plots to the correct location.

cd C3S-NorCPM-CF
vi enso_plot.py
python enso_plot.py
vi iod_plot.py
python iod_plot.py

Run the mean anomaly and quantile plotting scripts. Make sure to update the input and output locations and dates. Run twice, once for ‘global’ and once for ‘europe’:

python mean_anomaly_plots.py
python quantile_plots.py

This produces output plots in your specified directory.

/projects/NS9039K/www/seasonal_forecast/plots/

Quantile and mean anomaly plots are generated by comparing the forecast to pre-calculated mean and quantile values, these values exist in files in:

/projects/NS9039K/www/seasonal_forecast/thresholds/

In the normal seasonal forecast production, these do not have to be modified, but if there are changes to the data request (e.g. modification of the grid or addition of variables) then these will have to be regenerated using the scripts in the C3S-NorCPM-CF repository:

calculate_mean_thresholds.py
calculate_quantile_thresholds.py

Updating the website

You need to update the index file to display the new plots on the website.

vi /projects/NS9039K/www/seasonal_forecast/index.html

In this file, you must:

  1. Add the current date to the issueListQuantile

  2. Input the current date as the issueStringQuantile

  3. Add the current date to the issueListAnomaly

  4. Input the current date as the issueStringAnomaly

  5. Add the current date as the top option in the issueSelectQuantile form

<form>
<b> Issue Date </b>
<select id="issueSelectQuantile" onchange="updateIssueQuantile()" autocomplete="off">
<option selected> 2022-10 </option> <!-- Replace with most recent date -->
<option> 2022-09 </option> <!-- Add extra line for second most recent date -->
<option> 2022-08 </option>
<option> 2022-07 </option>
<option> 2022-06 </option>
<option> 2022-05 </option>
</select>
</form>
  1. Add the current date as the top option in the issueSelectAnomaly form

<form>
<b> Issue Date </b>
<select id="issueSelectAnomaly" onchange="updateIssueAnomaly()" autocomplete="off">
<option selected> 2022-10 </option> !-- Replace with most recent date -->
<option> 2022-09 </option> !-- Add extra line for second most recent date -->
<option> 2022-08 </option>
<option> 2022-07 </option>
</select>
</form>
  1. Add the date to issueSelectIOD and issueSelect ENSO as above.

Now the forecast production and processing is complete! Have a look at the forecasts here.