Running the seasonal forecast¶
This page provides documentation on how to run the NorCPM seasonal forecast. In general there are four steps to this process:
Update the observational data.
Run forward the analysis to present day, using new observational data.
Run the prediction/forecast.
Clear up, and post-processing (see next page).
The forecast should always be provided on the evening of the 14th of the month, as our collaborators need it on the 15th.
The Met Office provides monthly updates to EN4.2.2. observational temperature and salinity profiles, and these updates happen on the 9th-17th of each month. If this update can be included into the assimilation then this is good, as it gives us an additional month of temperature and salinity data to assimilate. You can check when the last update was on the Met Office site (see bottom of page, or look at file links). I would recommend running the analysis on the 12th/13th of the month. It takes ~3 hours to run. I would then recommend running the prediction on the 12/13th, this takes ~2 hours. The post processing takes another ~2 hours. Therefore, if there are no issues the whole workflow takes around 1 working day, but doing this on the 12/13th allows for potential issues (e.g. machine instability) to be addressed. It is important to keep an eye out for Betzy downtime announcements in the week preceding the 15th to ensure there is no significant disruption.
Update the data for assimilation¶
The first step in running the seasonal forecast is to update the observational data that is assimilated into the analysis.
Update the temperature and salinity profile data.
cd /cluster/shared/noresm/norcpm/Obs/TEM/EN422/
./Update_profile.sh
Now the SST, temperature and salinity profiles are updated.
When it comes to running the analysis, it is important to note that some of the temperature and salinity profiles are initially uploaded by the Met Office as ‘preliminary’, and then are replaced later by ‘final’ files. We always want to run the analysis with the best possible data, which means that each month, we will re-run the part of the analysis that used ‘preliminary’ data last month. This means that it is important to keep track of what the latest observational files are each month.
A log file of each SST, temperature and salinity retrieval has automatically be generated by the download scripts. This includes a file listing, so that the most recently downloaded final and preliminary files can be seen.
For example the file listing might include the files:
EN.4.2.2.f.profiles.g10.202207.nc
EN.4.2.2.p.profiles.g10.202208.nc
This means that we have preliminary profiles for 2022/08 and final profiles for 2022/07. Next month when we run the analysis, we will run it from 2022/07.
Run the analysis¶
Move into the analysis directory. The settings file for this seasonal forecast is then in settings/default_settings_VCF.sh
cd /cluster/projects/nn9039k/people/tbi045/NorCPM/analysis/
ls settings/default_settings_VCF.sh
Check which date should be the start date for the analysis run this month. This is the date of which the last ‘final’ EN.4.2.2. file was for last month’s run.
Check if the correct restart files for your start date exist in your run directory (usually these will be automatically deleted).
ls /cluster/work/users/tbi045/noresm/norcpm-cf-system1_assim_19811115/norcpm-cf-system1_assim_19811115_mem01/run/
If they do not exist, then you need to copy them over by providing the start date as an argument in the form YYYY-MM-DD.
cd script_pot/
./mv_rst_from_archive_to_run.sh YYYY-MM-DD
To run the analysis, make sure that you load the correct environments, and make sure you provide a start date argument to sbatch in the form YYYY-MM-DD
source /cluster/projects/nn9039k/people/tbi045/NorCPM/analysis/load_envs.sh
sbatch submit_reanalysis_VCF.sh YYYY-MM-DD
Check that the analysis ran to the expected month (it will crash when there is no more data to assimilate for a month).
Run the prediction¶
Now that the analysis is updated, we can run the prediction.
Move into prediction directory.
cd /cluster/projects/nn9039k/people/tbi045/NorCPM/prediction/use_cases/
Create a new use_case file. The date in the filename should be changed to the date of last data assimilated. The date inside the file needs to be changed in two places
cp norcpm-cf-system1_hindcast1_20221015.in norcpm-cf-system1_hindcast1_<date>.in
vi norcpm-cf-system1_hindcast1_<date>.in
Obtain restart files using your new use_case file
cd /cluster/projects/nn9039k/people/tbi045/NorCPM/prediction/
./obtain_restarts.sh use_cases/norcpm-cf-system1_hindcast1_<date>.in
Create a template, create an ensemble, and submit the prediction.
./create_template.sh use_cases/norcpm-cf-system1_hindcast1_<date>.in
./create_ensemble.sh use_cases/norcpm-cf-system1_hindcast1_<date>.in
./submit_ensemble.sh use_cases/norcpm-cf-system1_hindcast1_<date>.in
Check that the prediction ran to the expected month, and was archived correctly e.g. check files have been moved to archive.
ls /cluster/work/users/${USER}/archive/norcpm-cf-system1_hindcast1_20221115/norcpm-cf-system1_hindcast1_20221115_mem01/atm/hist/
Clearing up¶
Run mergediag.sh (modify the directory name in the file).
cd /cluster/projects/nn9039k/people/tbi045/NorCPM/tools
vi mergediag.sh
sbatch mergediag.sh
This produces a merged directory in the archive (takes some time) e.g.
/cluster/work/users/${USER}/archive/norcpm-cf-system1_hindcast1_20220915/norcpm-cf-system1_hindcast1_20220915_mem01-60
Copy forecast files to NIRD, using scp or rsync from above directory. e.g.
cd /cluster/work/users/${USER}/archive/norcpm-cf-system1_hindcast1_20220915/
scp -r norcpm-cf-system1_hindcast1_20220915_mem01-60/ $USER@login1-trd.nird.sigma2.no:/projects/NS9039K/shared/ClimateFutures/new/
Delete restart files that will not be needed anymore. You need to determine which restart files you will need next month. The analysis next month should start from the last ‘final’ assimilation files that were used, so in this example, if temperature and salinity profiles were noted down as:
EN.4.2.2.f.profiles.g10.202207.nc
EN.4.2.2.p.profiles.g10.202208.nc
Then the analysis will continue from 202207, so keep these restart files, with care, remove any others e.g.
cd /cluster/work/users/${USER}/archive/norcpm-cf-system1_assim_19811115/
rm -rf norcpm-cf-system1_assim_19811115_mem??/rest/2022-04-15-00000/
Compress files.
cd /cluster/projects/nn9039k/people/tbi045/NorCPM/tools
sbatch fanf_noresm2netcdf4.pbs
Move analysis files to NIRD, on NIRD:
cd /projects/NS9039K/shared/tbi045/scripts/
./Transfer_reana.sh
Check the files on NIRD, and this concludes generation of the forecast. For steps on processing the output, please see the separate documentation page.