Open rburghol opened 2 years ago
Needed met for Non VA P segments
cbp get_config vadeq_2021 land MET
nldas1221
cbp check_met nldas1221 P
Found 66 land-segments
Missing land segment-landuse combos:
N11001.wdm N24031.wdm N24033.wdm N51059.wdm N51510.wdm N51610.wdm N51600.wdm N51153.wdm N24017.wdm N51179.wdm N24037.wdm N51099.wdm N51193.wdm N51133.wdm N51061.wdm N51107.wdm N51683.wdm N51685.wdm N51013.wdm N24013.wdm N24021.wdm H24021.wdm N51069.wdm N51171.wdm N42001.wdm N24043.wdm N42055.wdm H51015.wdm N51015.wdm N51820.wdm H51165.wdm N51165.wdm N54031.wdm N51187.wdm N51043.wdm N51840.wdm N51660.wdm N42041.wdm N54003.wdm N54037.wdm N51139.wdm L51015.wdm N51790.wdm N42099.wdm N54065.wdm N42057.wdm H54031.wdm N54027.wdm N24001.wdm N42009.wdm H51139.wdm L54071.wdm N51091.wdm N54071.wdm H54023.wdm L54023.wdm N54023.wdm N54057.wdm H54071.wdm L54031.wdm N42111.wdm N24023.wdm H24023.wdm N54077.wdm N54093.wdm H54057.wdm
fgrep N11001.wdm /files.dir
/opt/model/p53/p532c-sova/input/scenario/climate/met/nldas1221/met_N11001.wdm
# generate phase 6 meteorology WDMs
cd /opt/model/p6/vadeq/
# do that subwatershed
segs=`cbp get_landsegs P`
for i in $segs; do
#only need to create a WDM for each land seg
# this script reads the file /etc/hspf.config to get directories.
wdm_pm_one $i 1984010100 2020123123 nldas2 harp2021 nldas1221 p20211221
done
segs=`cbp get_landsegs P`
for i in $segs; do
echo "sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto river"
sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto river
done
segs=`cbp get_landsegs P`
for i in $segs; do
echo "sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto land "
sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto land
done
Headwater in Occoquan, PL2_4970_5250:
cbp basingen.csh vadeq_2021 4970
cbp check_land vadeq_2021 PL2_4970_5250
/opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 PL2_4970_5250 auto river
Test:
job
is a short script that just pauses for 60 seconds
for i in $segs; do
deps=`cbp mm_river_deps $scenario $i`
echo "Segment $i Found deps= $deps"
job_name=`cbp mm_job_name $scenario $i`
echo "sbatch --job-name=$job_name $deps /opt/model/meta_model/run_model hsp2_cbp6 $scenario $i auto river"
sbatch --job-name=$job_name $deps /opt/model/meta_model/run_model hsp2_cbp6 $scenario $i auto river
done
Ran for RU2_5940_6200, oth vadeq_2022
and subsheds
(new test of met methods)
basin=RU2_5940_6200
scenario=subsheds
# run land
segs=`cbp get_landsegs $basin`
location="p6_vadeq" # crucial to avoid collisions if running multiple installs
read -r scope land_scenario < <(cbp get_config $scenario river "LAND SCENARIO")
for i in $segs; do
job_name="${location}_${scenario}_${i}"
echo "sbatch --job-name=\"$job_name\" /opt/model/meta_model/run_model $model $land_scenario $i auto land "
sbatch --job-name="$job_name" /opt/model/meta_model/run_model $model $land_scenario $i auto land
done
# run river
# can now immediately be submitted after submitting land
# since the dependency ordering works with land and river
segs=`cbp get_riversegs $basin`
for i in $segs; do
deps=`cbp mm_river_deps $scenario $i`
echo "Segment $i Found deps= $deps"
job_name=`cbp mm_job_name $scenario $i`
echo "sbatch --job-name=$job_name $deps /opt/model/meta_model/run_model $model $scenario $i auto river"
sbatch --job-name=$job_name $deps /opt/model/meta_model/run_model $model $scenario $i auto river
done
Roanoke Tests
model=hspf_cbp5
scenario=p532sova_2021
basin=OR2_7900_7740
scenario=p532sova_2021
# run land
segs=`cbp get_landsegs $basin`
location="p532" # crucial to avoid collisions if running multiple installs
read -r scope land_scenario < <(cbp get_config $scenario river "LAND SCENARIO")
for i in $segs; do
job_name=`cbp mm_job_name $scenario $i`
echo "sbatch --job-name=\"$job_name\" /opt/model/meta_model/run_model $model $land_scenario $i auto land "
sbatch --job-name="$job_name" /opt/model/meta_model/run_model $model $land_scenario $i auto land
done
# run river
# can now immediately be submitted after submitting land
# since the dependency ordering works with land and river
segs=`cbp get_riversegs $basin`
for i in $segs; do
deps=`cbp mm_river_deps $scenario $i`
echo "Segment $i Found deps= $deps"
job_name=`cbp mm_job_name $scenario $i`
echo "sbatch --job-name=$job_name $deps /opt/model/meta_model/run_model $model $scenario $i auto river"
sbatch --job-name=$job_name $deps /opt/model/meta_model/run_model $model $scenario $i auto river
done
Land tests with hsp2 for baseflow simulation checks
. hspf_config
land_scenario=hsp2_2022
model=hsp2_cbp6
i=N51165
i=N51660 # try another
met_scenario=`cbp get_config $land_scenario river "PRECIP ATMOS DEPOSITION"`
job_name="${i}_wdm"
echo "sbatch --job-name="$job_name" /opt/model/meta_model/run_model raster_met $met_scenario $i auto wdm "
sbatch --job-name="$job_name" /opt/model/meta_model/run_model raster_met $met_scenario $i auto wdm
. hspf_config # note: we need to do this after running the wdm workflow for some reason
/opt/model/meta_model/run_model $model $land_scenario $i auto land
This is very rough draft prototype examples. Todo:
Cancelling jobs:
View slurm Jobs with Full Names
slurmq
, which is an alias for:squeue --format="%.18i %.9P %.36j %.8u %.8T %.10M %.9l %.6D %R"
Basic Config Needed
All examples expect that the model is already configured, with basin and scenario
River slurm Dependency
mm_river_deps
to automatically account for the model directory, scenario, and segment. View codeRiver Upstream & Land Simulation Dependencies
Trigger the job with:
Show the Dependencies
slurmq
, which just does the following:squeue --format="%.18i %.9P %.36j %.8u %.8T %.10M %.9l %.6D %R"
Meteorology Creation and Land Run with
slurm
dependenciessegs=
cbp get_landsegs P
for i in $segs; do echo "sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto land prep" sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto land prep donesqueue squeue: error: NodeNames=deq2 Sockets=0 is invalid, reset to 1 JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 361 debug run_mode rob PD 0:00 1 (Resources) 362 debug run_mode rob PD 0:00 1 (Priority) 363 debug run_mode rob PD 0:00 1 (Priority) 364 debug run_mode rob PD 0:00 1 (Priority) 365 debug run_mode rob PD 0:00 1 (Priority) 366 debug run_mode rob PD 0:00 1 (Priority) 367 debug run_mode rob PD 0:00 1 (Priority) 368 debug run_mode rob PD 0:00 1 (Priority) 369 debug run_mode rob PD 0:00 1 (Priority) 370 debug run_mode rob PD 0:00 1 (Priority) 371 debug run_mode rob PD 0:00 1 (Priority) 354 debug run_mode rob R 0:00 1 deq2 355 debug run_mode rob R 0:00 1 deq2 356 debug run_mode rob R 0:00 1 deq2 357 debug run_mode rob R 0:00 1 deq2 358 debug run_mode rob R 0:00 1 deq2 359 debug run_mode rob R 0:00 1 deq2 360 debug run_mode rob R 0:00 1 deq2 235 debug vadeq_20 rob R 3:45:05 1 deq2
squeue squeue: error: NodeNames=deq2 Sockets=0 is invalid, reset to 1 JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 235 debug vadeq_20 rob R 3:43:23 1 deq2
segs=
cbp get_landsegs P
for i in $segs; do echo "sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto land " sbatch /opt/model/meta_model/run_model hspf_cbp6 vadeq_2021 $i auto land donetail -f slurm-377.out
running stf for segment N51610 land scenario vadeq_2021 '/opt/model/p6/vadeq/config/blank_wdm/land.wdm' -> 'stfN51610.wdm' count = 1 running sho for segment N51610 land scenario vadeq_2021 '/opt/model/p6/vadeq/config/blank_wdm/land.wdm' -> 'shoN51610.wdm' count = 1 No model plugins found in /opt/model/meta_model/models/hspf_cbp6/land/link/ No model plugins found in /opt/model/meta_model/models/hspf_cbp6/land/analyze/
!/bin/bash
set -e date
for((i=0; i<5; i++)); do sbatch -W --wrap='echo "hello from $SLURM_ARRAY_TASK_ID"; sleep 10' & done; wait
date echo "I am finished"