Difference between revisions of "UCVM Plotting on Discovery"

From SCECpedia
Jump to navigationJump to search
Line 21: Line 21:
  
 
== Setting up Plotting Environment for the first time ==
 
== Setting up Plotting Environment for the first time ==
 +
 +
make sure UCVM_INSTALL_PATH is set and has a working UCVM installation
 +
 +
<pre>
 +
%ucvm_query -H
 +
</pre>
  
 
create a conda environment
 
create a conda environment
Line 28: Line 34:
 
</pre>
 
</pre>
  
build an UCVM installation
+
build ucvmPlotting with conda environment
  
 +
<pre>
 +
%conda activate withPython2
 +
%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
 +
</pre>
  
setting up ucvmPlotting with conda environment
+
you should see the new ucvmPlotting
  
 
<pre>
 
<pre>
Get a copy of ucvmPlotting.yml
+
%Conda env list
 +
</pre>
  
%cp /project/scec_608/Mei/ucvmPlotting.yml .
+
NEXT:
  
%conda env list
+
to run ucvmPlotting tests on worker node
  
if you see ucvmPlotting,
+
<pre>
do this,
+
%salloc --ntasks=1 --time=02:00:00
  %conda activate ucvmPlotting
+
%conda activate ucvmPlotting
  skip to  NEXT
+
%cd $UCVM_INSTALL_PATH/ucvm_plotting
else,
+
%cd examples
  %conda env create -f ucvmPlotting.yml
+
%./run-tests
  this will take a while..
+
%conda deactivate
 +
%exit
 +
</pre>
  
  %conda env list
+
to view any of the png files with view_png.py, you have
 +
to be on the head node and in uvcmPlotting conda environment
  
  should see ucvmPlotting as one of the environment
+
at head node,
  
  %conda activate ucvmPlotting
+
<pre>
 +
%conda activate ucvmPlotting
 +
%view_png.py -f  someplot.png
 +
%conda deactivate
 +
</pre>
  
  %2project
 
  %git clone https://github.com/SCECcode/ucvm_plotting.git
 
  %cd ucvm_plotting
 
  %./unpack-dist
 
% conda install pandas
 
  
NEXT:
 
  
check if ucvm_plotting is there,
 
  
 
%2project
 
%2project

Revision as of 01:41, 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

build ucvmPlotting with conda environment

%conda activate withPython2
%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

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  someplot.png
%conda deactivate



%2project %cd ucvm_plotting/ucvm_plotting %./run_depth.sh

to run manually, %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 %view_png.py -f horizontal.png

Create Plot using Discovery

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

  • %conda env list
  • %conda activate ucvmPlotting
  • %2test

then..

  • %plot_depth_profile.py -s 33.8628,-118.2525 -b 0 -e 10000 -d vs,vp,density -v 100 -c cvmh -o depth.png

Then, you can view the plots with

%view_png.py -f depth.png

...

%conda deactivate


Related Entries