Removal of Content Advisory - April 2024

Advisory to Numerical Weather Prediction (NWP) containers users: As of the beginning of April 2024, all support assets for Numerical Weather Prediction (NWP) containers will be removed from the DTC website. Users should download all reference materials of interest prior to April 2024.

NWP Containers Online Tutorial | Hurricane Sandy Case (27 Oct 2012) > Visualize verification results

Visualize Verification Results

The METviewer software provides a database and display system for visualizing the statistical output generated by MET. After starting the METviewer service, a new database is created into which the MET output is loaded. Plots of the verification statistics are created by interacting with a web-based graphical interface.

Select the appropriate container instructions for your system below:

In order to visualize the MET output using the METviewer database and display system you first need to launch the METviewer container.

cd ${PROJ_DIR}/container-dtc-nwp/components/metviewer
docker-compose up -d

Note: you may need to wait 1-2 minutes prior to running the next command, as some processes starting up in the background may be slow.

The MET statistical output then needs to be loaded into the MySQL database for querying and plotting by METviewer

docker exec -it metviewer /scripts/common/metv_load_all.ksh mv_sandy

The METviewer GUI can then be accessed with the following URL copied and pasted into your web browser:

http://localhost:8080/metviewer/metviewer1.jsp

Note, if you are running on AWS, run the following commands to reconfigure METviewer with your current IP address and restart the web service:

   docker exec -it metviewer /bin/bash
/scripts/common/reset_metv_url.ksh
exit

The METviewer GUI can then be accessed with the following URL copied and pasted into your web browser (where IPV4_public_IP is your IPV4Public IP from the AWS “Active Instances” web page):

http://IPV4_public_IP:8080/metviewer/metviewer1.jsp

Click the "Load XML" button in the top-right corner.

The METviewer GUI can be run interactively to create verification plots on the fly. However, to get you going, two sample plots are provided. Do the following in the METviewer GUI:

Note, if you are running on AWS, you will need to pull the example XML files from the Git repository and have them available on your local machine. To do this, simply right-click on the link provided and save the file to the desired location.
  • Click "OK" to load the XML to the GUI and populate all the required options.
  • Click the "Generate Plot" button on the top of the page to create the image.

Next, follow the same steps to create a plot of 10-meter wind components with this XML file:

Feel free to make changes in the METviewer GUI and use the "Generate Plot" button to make new plots.

Note: Use of METviewer with Singularity is only supported on AWS!

In order to visualize the MET output using the METviewer database and display system, you first need to build Singularity sandbox from the docker container using 'fix-perms' options. The execution of this step creates a metv4singularity directory.

cd ${PROJ_DIR}/container-dtc-nwp/components/metviewer/METviewer
singularity build --sandbox --fix-perms --force metv4singularity docker://dtcenter/nwp-container-metviewer-for-singularity:${PROJ_VERSION}

Next, start the Singularity instance as 'writable' and call it 'metv':

singularity instance start --writable metv4singularity metv

Then, initialize and start MariaDB and Tomcat:

singularity exec --writable instance://metv bash init_singularity.sh
Note: When the script is done running, you may need to press some key (e.g., Enter) to get back to the prompt. At this point the image is ready!

Then, navigate to the scripts area and run a shell in the Singularity container:

cd ${PROJ_DIR}/container-dtc-nwp/components/scripts/common
singularity shell instance://metv

Now it is time to load the MET output into a METviewer database. As a note, the metv_load_singularity.ksh script requires two command-line arguments: 1) name of the METviewer database (e.g., mv_sandy), and 2) the ${CASE_DIR}

./metv_load_singularity.ksh mv_sandy ${CASE_DIR}
Note, if you need to stop the instance:

singularity instance stop metv

 

The METviewer GUI can then be accessed with the following URL copied and pasted into your web browser (where IPV4_public_IP is your IPV4Public IP from the AWS “Active Instances” web page):

http://IPV4_public_IP:8080/metviewer/metviewer1.jsp

Click the "Load XML" button in the top-right corner.

The METviewer GUI can be run interactively to create verification plots on the fly. However, to get you going, two sample plots are provided. Do the following in the METviewer GUI:

Note, if you are running on AWS, you will need to pull the example XML files from the Git repository and have them available on your local machine. To do this, simply right-click on the link provided and save the file to the desired location.
  • Click "OK" to load the XML to the GUI and populate all the required options.
  • Click the "Generate Plot" button on the top of the page to create the image.

Next, follow the same steps to create a plot of 10-meter wind components with this XML file:

Feel free to make changes in the METviewer GUI and use the "Generate Plot" button to make new plots.

You can also create plots via the METviewer batch plotting capability (i.e., not the METviewer GUI). A script to run the two supplied METviewer XMLs provides an example on how to create plots. Note you must be in your metviewer singularity shell to run it, as shown below:

singularity shell instance://metv
cd ${PROJ_DIR}/container-dtc-nwp/components/scripts/sandy_20121027/metviewer ./metv_plot_singularity.ksh ${CASE_DIR}

The output goes to: ${CASE_DIR}/metviewer/plots, and you can use display to view the images.