Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
cd <workdir>

# Copy over the connectivity file for the CSne30 mesh
# (this is an adjacency list that describes the unstructured grid, generated using athe GenerateConnectivityFile tool from TempestRemap):
cp /global/homes/p/paullric/outCSne30_connect.txt .

# Create list of input files
ls -1 $INPUTDIR/*20??*.nc > input.txt

# Create list of output files
sed -e 's/.*cam.h2[.]//' -e 's/[.]nc$/.cyclones.txt/' input.txt > output.txt

# Run DetectCyclonesUnstructuredDetectNodes to detect TC on the unstructured E3SM grid. 
# This is the most time consuming operation.
~/Tempest/tempestextremes/bin/DetectCyclonesUnstructuredDetectNodes --verbosity 0 \
  --timestride 1 --in_connect outCSne30_connect.txt \
  --closedcontourcmd "PSL,300.0,4.0,0;_AVG(T200,T500),-0.6,4,1.0" \
  --mergedist 6.0 --searchbymin PSL --outputcmd "PSL,min,0;_VECMAG(UBOT,VBOT),max,2" \
  --in_data_list input.txt --out_file_list output.txt

# The output consists of one text file for every input netCDF file with detected cyclones.
# Concatenate all output files to make a master detection list
cat *.cyclones.txt > cyclones.txt

# Run StitchNodes on the master detection list to identify actual TC tracks:
~/Tempest/tempestextremes/bin/StitchNodes --format "i,lon,lat,slp,wind" --range 6.0 \
  --minlength 6 --maxgap 1 --in cyclones.txt --out cyclones_stitch.txt \
  --threshold "wind,>=,17.5,6;lat,<=,40.0,6;lat,>=,-40.0,6"

# Generate histogram of detections:
~/Tempest/tempestextremes/bin/HistogramNodes --in cyclones_stitch.txt \
  --iloncol 2 --ilatcol 3 --out cyclones_stitch_hist.nc

# Visualize it, for example with ncview
module load ncview
ncview cyclones_stitch_hist.nc &

...