|
|
|
## About
|
|
|
|
|
|
|
|
This tool was developed for CES/CP to perform sensitivity tests for multiple parameters on small simulations of NEMO 4.0. It uses [Autosubmit](https://earth.bsc.es/gitlab/es/autosubmit) and a biased random key genetic algorithm (BRKGA) to produce a set of parameters that best fit a corresponding set of observed data.
|
|
|
|
|
|
|
|
This Wiki demonstrates how to use it using the PISCES1D configuration as an example.
|
|
|
|
|
|
|
|
## Preliminary Setup
|
|
|
|
|
|
|
|
Before starting to use this tool, one should first have NEMO 4.0 installed to be deployed in MN4 and be able to execute the PISCES1D configuration. The following links provide how to do this:
|
|
|
|
|
|
|
|
[Install NEMO 4.0](https://earth.bsc.es/gitlab/ces/performance-analysis/wikis/Install-NEMO4)
|
|
|
|
|
|
|
|
[Configure Pisces1D](https://earth.bsc.es/gitlab/mgalitap/pisces_offline/wikis/pisces-offline)
|
|
|
|
|
|
|
|
## Setting up the workflow (nohup recommended for large experime)and configuration
|
|
|
|
|
|
|
|
The fastest way to set up the workflow is to copy it from an existing experiment, a1yt:
|
|
|
|
|
|
|
|
```
|
|
|
|
autosubmit expid -y a1yt -H marenostrum4 -d Description
|
|
|
|
```
|
|
|
|
|
|
|
|
Otherwise, create a new experiment
|
|
|
|
```
|
|
|
|
autosubmit expid -H marenostrum4 -d Description
|
|
|
|
```
|
|
|
|
and replace the conf files there with the ones [here](https://earth.bsc.es/gitlab/mfalls/genetic_algorithm_pisces1d/tree/master/conf).
|
|
|
|
|
|
|
|
Next, copy the [workflow](https://earth.bsc.es/gitlab/mfalls/genetic_algorithm_pisces1d/tree/master/workflow) onto your local machine.
|
|
|
|
|
|
|
|
Finally, edit the following configuration files:
|
|
|
|
* platforms.conf: Under marenostrum4, change USER to your HPC username (bsc32xxx).
|
|
|
|
|
|
|
|
* expdef.conf:
|
|
|
|
1. Edit MEMBERS. This corresponds to the number of generations that you want the genetic algorithm to run for. This should always be of the form `fc[0000-xxxx]` (fc + 4 digits).
|
|
|
|
2. Edit NUMCHUNKS. This corresponds to the number of sets of parameters of each generation. Minimum 2, maximum 10,000.
|
|
|
|
3. Ensure that PROJECT_TYPE = local
|
|
|
|
4. Under local, change PROJECT_PATH to the directory where you downloaded the workflow scripts.
|
|
|
|
|
|
|
|
## Inputs
|
|
|
|
|
|
|
|
Here is the full list of input files that you need:
|
|
|
|
* nemo executable, .xml files and namelists, found in EXP00
|
|
|
|
* The file of observed data that you're comparing to, in netCDF format
|
|
|
|
* The NEMO netcdf input files. Since the zoom capability doesn't seem to work, the workflow crops the netcdfs according to inputted coordinates. Thus, full global files will work okay here.
|
|
|
|
* A file called variables.csv, which contains the information on the parameters that you want to investigate. Any numerical parameter that is found in namelist_pisces_ref can be added here.
|
|
|
|
|
|
|
|
Once you have these, edit the variables and paths at the start of each script on the workflow:
|
|
|
|
|
|
|
|
1. LAT and LON: change this to the coordinates that you want to investigate. The workflow will wise NCO's ncks command to crop the inputs to 3x3 files, centered on the nearest gridpoint.
|
|
|
|
2. SCRHOME: Your scratch home directory.
|
|
|
|
3. MODEL: The path which will be created during the experiment
|
|
|
|
4. NEMO: The EXP00 directory that contains the executable, .xml files and namelists.
|
|
|
|
5. OBS: Path and file name of the observed data
|
|
|
|
6. VARIABLES: Path and file name of variables.csv
|
|
|
|
7. MODELFILE: Name of the netcdf output that you want to compare the observed data to.
|
|
|
|
|
|
|
|
## Running the experiment
|
|
|
|
|
|
|
|
On the autosubmit terminal, run:
|
|
|
|
`autosubmit refresh xxxx`
|
|
|
|
`autosubmit create xxxx` (-np flag recommended for large experiments)
|
|
|
|
`nohup autosubmit run xxxx &>log &`
|
|
|
|
|
|
|
|
## Postprocessing
|
|
|
|
|
|
|
|
|
|
|
|
|