This guide assumes a recent version of the QuaLiKiz-pythontools are installed, and in your
PATH. Check if your path includes the user-installed python packages (for example
Installation, setup and basic example
- The Pythontools were originally meant to be used in scripts, but a CLI is also available.
- Every command has a 'help' e.g.
qualikiz_tools input help.
Generally one makes a
parameters.json file from the example and adjusts as needed. The 'scan_dict' can be used to set up scans over QuaLiKiz input parameters. Then, one generates the binaries
qualikiz_tools input generate ., and run QuaLiKiz. Then, collect the results in a netCDF file using
qualikiz_tools output to_netcdf . and do the analysis in Python. The output is a normal xarray DataSet.
A full diagram of possible dataflows is here.
Setting up QuaLiKiz regression runs
First set up a run directory to keep your QuaLiKiz folder clean. From inside
mkdir runs cd runs
Now create all regression cases we run to test QuaLiKiz. Assuming you want to run on the node itself (e.g. do not use slurm/Sun Grid Engine):
qualikiz_tools create regression --binary_path ../QuaLiKiz --as_batch bash cd regression
../QuaLiKiz is the path to the binary you want to use. This will create a folder called
regression, with everything you need (folders, links) to run (but not the input binaries!). You can generate the binaries manually using the following command:
qualikiz_tools input generate .
Then manually launch QuaLiKiz using your favourite MPI command
Or to run a specific test
cd quicktest_parameters mpirun -n 2 ./QuaLiKiz cd ..
Or use the automatic launcher dat determines amount of cores and generates input binaries automatically
qualikiz_tools launcher launch bash .
or to run a specific test
qualikiz_tools launcher launch bash quicktest_parameters
Plotting regression results
Finally plot the temperature profiles
qualikiz_tools output to_netcdf quicktest_parameters qualikiz_tools plot quicktest_parameters #not working at the moment
And compare to the reference version
qualikiz_tools output compare_runs quicktest_parameters ../../reference/quicktest_parameters/HEAD-pgi-0/
Creating new regression files
Assuming you have a finished regression run (which you have if you've followed the guide up until here). From outside your regression folder (for example, your run dir)
qualikiz_tools output extract_regression regression/quicktest_parameters HEAD pgi
Remove the old regression files, and copy the new ones in
rm -r ../reference/quicktest_parameters/HEAD-pgi-0/* mv quicktest_parameters/* ../reference/quicktest_parameters/HEAD-pgi-0/
optional: create a
meta.json that describes where/what you ran. By convention a JSON format
git commit -a