Skip to content

Commit

Permalink
add manual for visualization tool 'schismview' from pylib. It can be …
Browse files Browse the repository at this point in the history
…used to view SCHISM outputs. This is a rather lightweight app, can be lanuched under linux/window environments. Note only scribed outputs are supported currently
  • Loading branch information
wzhengui committed Sep 13, 2023
1 parent 95d5e8c commit 6f3bae4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Binary file added docs/assets/schismview_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions docs/getting-started/visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,54 @@ The directory Utility/Vis_Matlab/ has matlab scripts that can visualize outputs
the new scribed outputs, while `SCHISM_SLAB.m` and `SCHISM_TRANSECT.m` are for the old outputs (schout*.nc).

## Visualization with pylib
pylib provides `schismview` to visualize outputs (scribed outputs, OLDIO not supported yet). `schismview` will collect all the available variables from your outputs. For each variable, you can do 1). contour plot, 2). animation, 3). extract time series, and 4) query, etc. This is a lightweight app, and please report bug to SCHISM maillist or wzhengui@gmail.com.

### **[Installation of pylib](./pre-processing-with-pylib/installation.md)**

By running the following code, you can locate the executable of `schismview` <br>
`python -c "from pylib import *; print(mylib.__file__[:-16]+'Scripts/schismview')"`

### **How to use `schismview`**
* To lauch `schismview`, you can run the executable either under your run directory, or pass the run directory as a argument to the executable, which will give you an `schismview` window below.
<figure markdown id='view_1'>
!['1'](../../assets/schismview_1.png){width=500}

* **variable**: All availalbe SCHISM output variables are collected, and you can choose the variable you want to view from the list window.

* **figure**: list of figures. You can have multiple figures for different variables. You can close it if you want. Later on, you can retrieve previous figures from the list. If you want to add a new figure, choose add.

* **layer**: For 3D variable, you can specify which layer you want to view. For 2D variable, this option is not needed.

* **grid** or **bnd**: If clicked, schism grid/boundary will plotted out along with the contour plot. If you only want to view the grid/boundary, choose `none` from the variable list.

* **ctr**: By default, `schismview` will use `tripcolor` to plot contours, which is element-based. If `ctr` is clicked, `schismview` will use `tricontourf` to plot, which can be faster for very large grid.

* **time**: There are three available time options (calendar time, SCHISM stack number, or Julian date). You can set the Start and End dates for viewing variables in the textbox. This may be needed for animation if you only want to view for a specific period of time.

* **limit**: It sets the lower and upper limits of contours. The values beyond are extended.

* **vector**: You can choose vector you want to view from the list. vector shown will be limitted to the current domain specified by `xlim` and `ylim`.

* **curve**: By `right double click`, you can add location points for extractng times for the active variable. `middle double click` will remove the points. Then, click `curve`, `schismview` will extract time series in background and the button will display `wait`. Once `wait` becomes `curve` again, clicking on it will show the time series. Note, extracting time series can be very slow for 3D variables depending on how the netcdf outputs are stored (chuncking the files can help, but it is a separate topic beyond `schismview`). It is better to specify short time range.

* **query**: You can query the value of variable. By clicking query (becomes sunken once chosen), you can use `middle single click` to query the value. By clicking query again, it will exit query mode.

* **xlim**/**ylim**: Sspecify the X/Y axis range.

* **animation**
* **`|<`**: go to start time
* **`<`**: go to previous time
* **`play`**: play animation for the current variable. The button will display `stop`, and click `stop` will stop the animation. Note `doulbe right click` will have the same effect of `play` buttion
* **`>`**: go to next time
* **`>|`**: go to end time
* **skip**: specify the animation interval

* **draw**: draw plot or refresh the plot.

* **option**: Advaned features
* **command window**: type commands to interact with the plot, which can be used to generate desired high-quality figures.
* **save animation**
* **show node/element number**

## Visualization with VisIt
The most comprehensive way to visualize SCHISM nc4 outputs is via VisIt.
Expand Down

0 comments on commit 6f3bae4

Please sign in to comment.