The OceanVal app

Validate a simulation from a browser window, with no Python.

The OceanVal app lets you validate a simulation without writing any Python. Run oceanval in a terminal and a page opens in your web browser that takes you from a folder of model output to a validation report: you choose what to do, point it at your simulation, choose the observations to validate against, check the units, and watch the run.

Start it

oceanval only runs from a conda environment that has OceanVal installed (see Installing), as it needs the R packages, cdo and nco that conda provides. In a terminal, activate that environment, then run oceanval in the directory to work in:

bash
conda activate foo
oceanval

Replace foo with the name of your own environment. If the command is not found, the environment is not active, or OceanVal is not installed in it. OceanVal and python -m oceanval do the same. Matchups, scripts and reports are written in that directory unless you choose another, so make a new directory for each simulation.

Demo

A 35-second tour, from choosing what to do to the report. The simulation is a small synthetic one and the matchup output is staged so that it finishes in seconds; the report at the end is OceanVal’s published example report.

On a remote machine

If oceanval cannot open a browser for you, it prints a link to open. VS Code forwards its port for you. Over plain SSH, for example from a Windows terminal, it prints the command that forwards the port, such as ssh -L 8765:127.0.0.1:8765 you@server: run it in a new terminal on your own computer (PowerShell on Windows 10 or later has ssh), leave it open, and open the link in your browser. When it prints that command, oceanval uses port 8765 if it is free, so the command is the same every time; choose another port with --port. When it opens the browser itself, as in VS Code, it uses any free port. The printed login is a guess: use the one you normally connect with. The run carries on if you close the page, and you can come back to it with the same link.

Running the output from Python

The window does nothing you could not do in Python. It writes the matchup script first, to matchup.py unless you choose another name, and then runs it. The script holds your own data, every recipe (those you did not tick are commented out), the conversions, the oceanval.matchup() call and, for a matchup and validate run, the oceanval.validate() call, so you can read it, edit it and run it again later with python matchup.py.

More