Physics Optimization tools
Users who only need to check out the latest code or certain tags can clone the repository without having a GitHub account:
git clone git@github.com:NOAA-EMC/WW3-Optimization.git
or with GitHub account
git clone git@github.com:NOAA-EMC/WW3-Optimization.git
cd WW3-Optimization
% git checkout develop (or tags)
git submodule update --init --recursive
cd WW3-Optimization/tools
./makenlopt.sh
cd WW3-Optimization/tests/test<test_name>
modify input_vars.sh and add the start day (STARTDATE), number of forecast days (forecast_day) and other required parameters:
STARTDATE="<YYYY-MM-DD>"
spinup_day=<NO1>
forecast_day=<NO2>
The observations have global coverage. Beside the model skill in the entire domain (global coverage), the regional skill can be evaluated witihin a pre-defined box in input_vars.sh:
lat_min
lat_max
lon_min
lon_max
execute
./prep_spinup.sh
to fill templates for WW3 fix files, forcing and observations (satellite and point source data) retrieval. This script is for model spinup for the duration of spinup_day
before STARTDATE
and continues for forecast_day
. The filled WW3 input templates are then added to input_spinup
.
cd WW3-Optimization/tests
execute
./bin/spinup_matrix_prep
to prepare spinup jobcard and submit it:
sbatch spinup
Once the spinup simulation is done, the restart* files at (STARTDATE) are written in WW3-Optimization/tests/test<test_name>/work_spinup
.
In order to optimize n physics parameters, the NLOPT_LN_BOBYQA optimization method requires the model skill for the default and 2 perturbations around each parameter (Total of 2n+1). These initial simulations can be done concurrently.
cd WW3-Optimization/tests
execute
./bin/initial_matrix_prep
The initial matrix can be divided into sub-matrixes using
./bin/divider initial 9
which divides initial matrix into submatrixes, each with 3 tests.
cd WW3-Optimization/tests
execute
./bin/opt_matrix_prep
to prepare opt_matrix jobcard and submit:
sbatch opt_matrix
WW3-Optimization/tests/opt_table_Err_unnorm
is populated after each round of data exchange between WW3 and NLOPT, where each row starts with global and regional scores followed by n input variables.
The optimization continues until one of the following criteria is met:
1- Max number of iterations
2- Absolute change in the parameters value
3- Relative change in the parameters value
4- Absolute change in the function value
5- Relative change in the function value
6- Function value Less than a prescribed minimum
Developers:
Ali Abdolali (EMC/NCEP/NOAA ali.abdolali@noaa.gov)
Matthew Masarik (EMC/NCEP/NOAA matthew.masarik@noaa.gov)