Difference between revisions of "UCVM Plotting on Discovery"

From SCECpedia
Jump to navigationJump to search
 
(11 intermediate revisions by 2 users not shown)
Line 20: Line 20:
 
*[[Export_XWindows_to_Client]]
 
*[[Export_XWindows_to_Client]]
  
== Create Plot using Discovery ==
+
== Setting up Plotting Environment for the first time ==
Assuiming plotting has been setup for your account, you can Setup the plotting environment,
 
*%conda env list
 
*%conda activate ucvmPlotting
 
*%2test
 
  
then..
+
make sure UCVM_INSTALL_PATH is set and has a working UCVM installation
  
*%plot_depth_profile.py -s 33.8628,-118.2525 -b 0 -e 10000 -d vs,vp,density -v 100 -c cvmh -o depth.png
+
<pre>
 +
%ucvm_query -H
 +
</pre>
  
Then, you can view the plots with
+
create a conda environment
  
%view_png.py -f depth.png
+
<pre>
 +
%conda create -n ucvmPlotting python=2.7.15 scipy pip numpy matplotlib basemap basemap-data-hires
 +
</pre>
  
...
+
setup conda environment with ucvm_plotting, just need to do this once
  
 +
<pre>
 +
%conda activate ucvmPlotting
 +
%cd $UCVM_INSTALL_PATH/conf
 +
%source ucvm_env.sh
 +
%cd $UCVM_INSTALL_PATH
 +
%git clone https://github.com/SCECcode/ucvm_plotting.git
 +
%cd ucvm_plotting
 +
%./unpack-dist
 +
%./ucvm_plotting/run_depth.sh
 
%conda deactivate
 
%conda deactivate
 
== Setting up Plotting Environment for the first time ==
 
conda environment
 
 
<pre>
 
(base) mei@discovery1:/project/scec_608/mei$ conda env list
 
# conda environments:
 
#
 
forGeomodelgrids        /home1/mei/.conda/envs/forGeomodelgrids
 
py3ucvm                  /home1/mei/.conda/envs/py3ucvm
 
ucvmPlotting            /home1/mei/.conda/envs/ucvmPlotting
 
withPython2              /home1/mei/.conda/envs/withPython2
 
base                  *  /spack/apps/linux-centos7-x86_64/gcc-8.3.0/anaconda3-2019.10-bpb6unkhyvkirwkg44uqchcy5jyhzhvt
 
 
(base) mei@discovery1:/project/scec_608/mei$ conda activate ucvmPlotting
 
 
(ucvmPlotting) mei@discovery1:/project/scec_608/mei$ conda deactivate
 
 
(base) mei@discovery1:/project/scec_608/mei$
 
 
 
</pre>
 
</pre>
  
setting up ucvmPlotting with conda environment
+
you should see the new ucvmPlotting
  
 
<pre>
 
<pre>
Get a copy of ucvmPlotting.yml
 
 
%cp /project/scec_608/Mei/ucvmPlotting.yml .
 
 
 
%conda env list
 
%conda env list
 +
</pre>
  
if you see ucvmPlotting,
+
NEXT:
do this,
 
  %conda activate ucvmPlotting
 
  skip to  NEXT
 
else,
 
  %conda env create -f ucvmPlotting.yml
 
  this will take a while..
 
  
  %conda env list
+
to run ucvmPlotting tests on worker node
  
  should see ucvmPlotting as one of the environment
+
<pre>
 +
%salloc --ntasks=1 --time=02:00:00
 +
%conda activate ucvmPlotting
 +
%cd $UCVM_INSTALL_PATH/ucvm_plotting
 +
%cd examples
 +
%./run-tests
 +
%conda deactivate
 +
%exit
 +
</pre>
  
  %conda activate ucvmPlotting
+
== Create Plot using Discovery ==
 +
Assuiming plotting has been setup for your account, you can startup the plotting environment,
 +
*%conda env list
 +
*%conda activate ucvmPlotting
  
  %2project
+
generate plot in either head or worker node
  %git clone https://github.com/SCECcode/ucvm_plotting.git
 
  %cd ucvm_plotting
 
  %./unpack-dist
 
  
NEXT:
+
<pre>
 +
%conda activate ucvmPlotting
 +
%plot_horizontal_slice.py -b 33.35,-118 -u 34.35,-117 -e 1000 -d vs -c cvmh -a s -s 0.01 -o horizontal.png
 +
%conda deactivate
 +
</pre>
  
check if ucvm_plotting is there,
+
to view any of the png files with view_png.py, you have
 +
to be on the head node and in uvcmPlotting conda environment
  
%2project
+
at head node,
%cd ucvm_plotting/ucvm_plotting
 
%./run_depth.sh
 
  
to run manually,
+
<pre>
%plot_horizontal_slice.py -b 33.35,-118 -u 34.35,-117 -e 1000 -d vs -c cvmh -a s -s 0.01 -o horizontal.png
+
%conda activate ucvmPlotting
 
%view_png.py -f horizontal.png
 
%view_png.py -f horizontal.png
 
+
%conda deactivate
 
</pre>
 
</pre>
  

Latest revision as of 01:55, 4 December 2021

Create Plot using Website - 1D Vertical Profile

Create 1D vertical profile for location in LA Basin (CSU Dominquez Hills):

  • 33.8628
  • -118.2525
  • 0-10k
  • 100m

Create Plot using Website:

Configure Xwindows on Discovery

Setting up Plotting Environment for the first time

make sure UCVM_INSTALL_PATH is set and has a working UCVM installation

%ucvm_query -H

create a conda environment

%conda create -n ucvmPlotting python=2.7.15 scipy pip numpy matplotlib basemap basemap-data-hires

setup conda environment with ucvm_plotting, just need to do this once

%conda activate ucvmPlotting
%cd $UCVM_INSTALL_PATH/conf
%source ucvm_env.sh
%cd $UCVM_INSTALL_PATH
%git clone https://github.com/SCECcode/ucvm_plotting.git
%cd ucvm_plotting
%./unpack-dist
%./ucvm_plotting/run_depth.sh
%conda deactivate

you should see the new ucvmPlotting

%conda env list

NEXT:

to run ucvmPlotting tests on worker node

%salloc --ntasks=1 --time=02:00:00
%conda activate ucvmPlotting
%cd $UCVM_INSTALL_PATH/ucvm_plotting
%cd examples
%./run-tests
%conda deactivate
%exit

Create Plot using Discovery

Assuiming plotting has been setup for your account, you can startup the plotting environment,

  • %conda env list
  • %conda activate ucvmPlotting

generate plot in either head or worker node

%conda activate ucvmPlotting
%plot_horizontal_slice.py -b 33.35,-118 -u 34.35,-117 -e 1000 -d vs -c cvmh -a s -s 0.01 -o horizontal.png
%conda deactivate

to view any of the png files with view_png.py, you have to be on the head node and in uvcmPlotting conda environment

at head node,

%conda activate ucvmPlotting
%view_png.py -f horizontal.png
%conda deactivate

Related Entries