Closed MaryamZamanialaei closed 1 year ago
In addition, these are the Variables and PATH I have created in bashrc:
export PATH=echo $PATH | tr ":" "\n" | grep -v "conda" | tr "\n" ":"
export PATH="$HOME/dotnet:$PATH"
export ELMFIRE_SCRATCH_BASE=$ELMFIRE_BASE_DIR/elmfire/scratch/
export ELMFIRE_BASE_DIR=$ELMFIRE_BASE_DIR/elmfire
export ELMFIRE_INSTALL_DIR=$ELMFIRE_BASE_DIR/build/linux/bin
export CLOUDFIRE_SERVER=172.92.17.198
export PATH=$PATH:$ELMFIRE_INSTALL_DIR:$ELMFIRE_BASE_DIR/cloudfire
Hi Maryam,
This commit removes the warning about attempting to remove a non-existent directory.
is $ELMFIRE_BASE_DIR
set? What is the output of echo $ELMFIRE_BASE_DIR
?
Best,
Chris
Hi Chris,
Thanks for the commit. The output of echo $ELMFIRE_BASE_DIR is "/home/maryamz/elmfire" that seems to be set.
Best, Maryam
OK great, can you try this:
cd $ELMFIRE_BASE_DIR/validation/01-single-fire
git pull
./01-ca_county.sh >& log.txt
And then post log.txt
here. Thanks!
Thanks! The repository worked for validation once I cloned it in my VS Code workspace. Before, I tried to download and run the code. The output of log.txt:
./log.txt: line 1: mkdir:: command not found ./log.txt: line 2: Processing: command not found ./log.txt: line 3: FIRENAME:: command not found ./log.txt: line 4: IGNITION_TIME:: command not found ./log.txt: line 5: INITIALIZATION_TIME:: command not found ./log.txt: line 6: IGNITION_LON:: command not found ./log.txt: line 7: IGNITION_LAT:: command not found ./log.txt: line 8: CENTER_LON:: command not found ./log.txt: line 9: CENTER_LAT:: command not found ./log.txt: line 10: WEST_BUFFER_KM:: command not found ./log.txt: line 11: SOUTH_BUFFER_KM:: command not found ./log.txt: line 12: EAST_BUFFER_KM:: command not found ./log.txt: line 13: NORTH_BUFFER_KM:: command not found ./log.txt: line 14: NUM_ENSEMBLE_MEMBERS:: command not found ./log.txt: line 15: SCP_INPUT_DECK:: command not found ./log.txt: line 16: INITIALIZATION_TYPE:: command not found ./log.txt: line 17: ACTIVE_FIRE_TIMESTAMP:: command not found ./log.txt: line 18: ALREADY_BURNED_TIMESTAMP:: command not found ./log.txt: line 19: ADD_TO_ACTIVE_FIRES:: command not found ./log.txt: line 20: RUN_HOURS:: command not found ./log.txt: line 21: IGNITION_RADIUS:: command not found ./log.txt: line 22: FUEL_SOURCE:: command not found ./log.txt: line 23: FUEL_VERSION:: command not found ./log.txt: line 24: RETURN_AFTER_QUEUE:: command not found ./log.txt: line 25: RUN_TEMPLATE:: command not found ./log.txt: line 26: Done: command not found ./log.txt: line 27: Message:: command not found ./log.txt: line 29: JOB_NAME:: command not found ./log.txt: line 30: LOGFILE:: command not found ./log.txt: line 31: ./01-crs.sh:: No such file or directory ./log.txt: line 32: ./01-crs.sh:: No such file or directory
Hi Maryam-
Apologies, I don't understand the above error messages. It looks like something is trying to run the log.txt file as an executable? I'm not super familiar with VS Code and have never attempted to run ELMFIRE via VS Code.
When I run ./01-ca-county.sh
this is the output on my end:
Processing data request at 2023-06-29 01:48:17 UTC
FIRENAME: ca-county
IGNITION_TIME: 20180701 06:22 UTC
INITIALIZATION_TIME: 2018-07-01 06:22 UTC
IGNITION_LON: null
IGNITION_LAT: null
CENTER_LON: null
CENTER_LAT: null
WEST_BUFFER_KM: 30
SOUTH_BUFFER_KM: 30
EAST_BUFFER_KM: 30
NORTH_BUFFER_KM: 30
NUM_ENSEMBLE_MEMBERS: 100
SCP_INPUT_DECK: none
INITIALIZATION_TYPE: active_fire_polygon
ACTIVE_FIRE_TIMESTAMP: 20180701_062200
ALREADY_BURNED_TIMESTAMP: null
ADD_TO_ACTIVE_FIRES: no
RUN_HOURS: 48
IGNITION_RADIUS: null
FUEL_SOURCE: landfire
FUEL_VERSION: 1.4.0
RETURN_AFTER_QUEUE: no
RUN_TEMPLATE: hindcast
Done checking arguments. STATUS: 0
Message: Valid inputs received
Also, I think @ma-th has successfully run this case, perhaps you can compare notes?
Hi Chris,
Thank you for sharing the output. I have addressed the error, and the outcome of executing ./01-ca-county.sh
now closely resembles the one you provided. There were some complications with VS Code that is resolved now.
Best, Maryam
Excellent, glad to hear it! I'll close this issue but do open another one if you hit any other snags.
I'm trying to set up the latest version of elmfire with Visual Studio Code, but I'm encountering an error during validation (01-single-fire/01-ca_county.sh). I have attempted debugging and made configurations, as well as installed and launched dotnet and Node.js, but I keep receiving the same error message each time.
I have provided the "01-ca_county.sh" and "template.sh" files for you to review. It seems that the script is attempting to remove the "ca-county_20180701_062200" before creating it (I even tried creating the "ca-county" folder manually).
Error: Specify job launch JSON strong mv: cannot stat '$ELMFIRE_BASE_DIR/elmfire/runs/hindcasts/runs/ca-county/ca-county_20180701_062200': No such file or directory
These are the "01-ca_county.sh" and "template.sh" files respectively:
!/bin/bash
Specify inputs below:
YEAR=2018 FIRENAME=ca-county ACTIVE_FIRE_TIMESTAMP_NUM=1 ALREADY_BURNED_TIMESTAMP_NUM=null WEST_BUFFER=30 SOUTH_BUFFER=30 EAST_BUFFER=30 NORTH_BUFFER=30 NUM_ENSEMBLE_MEMBERS=100 RUN_HOURS=48 FUEL_SOURCE=landfire FUEL_VERSION=1.4.0 RUN_TEMPLATE=hindcast
export USE_SLURM=no export CALC_FITNESS=yes
No need to modify from here down:
cp -f ../template.sh ./run.sh rm -f -r ./$FIRENAME*
./run.sh $YEAR $FIRENAME $ACTIVE_FIRE_TIMESTAMP_NUM \ $ALREADY_BURNED_TIMESTAMP_NUM \ $WEST_BUFFER $SOUTH_BUFFER $EAST_BUFFER $NORTH_BUFFER \ $NUM_ENSEMBLE_MEMBERS $RUN_HOURS $FUEL_SOURCE $FUEL_VERSION \ $RUN_TEMPLATE
rm -f ./run.sh
exit 0
!/bin/bash
YEAR=$1 FIRENAME=$2 ACTIVE_FIRE_TIMESTAMP_NUM=$3 ALREADY_BURNED_TIMESTAMP_NUM=$4 WEST_BUFFER=$5 SOUTH_BUFFER=$6 EAST_BUFFER=$7 NORTH_BUFFER=$8 NUM_ENSEMBLE_MEMBERS=$9 RUN_HOURS=${10} FUEL_SOURCE=${11} FUEL_VERSION=${12} RUN_TEMPLATE=${13}
export USE_SLURM=${USE_SLURM:-'no'}
CWD=$(pwd)
if [ -z "$FIRENAME" ]; then echo "Error: specify fire name" exit 1 fi
AVAILABLE_POLYGONS_CLI=$ELMFIRE_BASE_DIR/cloudfire/available_polygons.py
ACTIVE_FIRE_TIMESTAMP=
$AVAILABLE_POLYGONS_CLI --list 'timestamps' \ --active=False --year=$YEAR --firename="$FIRENAME" | \ head -n $ACTIVE_FIRE_TIMESTAMP_NUM
if [ -z "$ALREADY_BURNED_TIMESTAMP_NUM" ] || [ "$ALREADY_BURNED_TIMESTAMP_NUM" = "null" ]; then ALREADY_BURNED_TIMESTAMP=null else ALREADY_BURNED_TIMESTAMP=
$AVAILABLE_POLYGONS_CLI --list 'timestamps' \ --active=False --year=$YEAR --firename="$FIRENAME" | \ head -n $ALREADY_BURNED_TIMESTAMP_NUM
fiYYYYMMDD=
echo $ACTIVE_FIRE_TIMESTAMP | cut -d_ -f1
HHMMSS=echo $ACTIVE_FIRE_TIMESTAMP | cut -d_ -f2
HH=${HHMMSS:0:2} MM=${HHMMSS:2:2} IGNITION_TIME="$YYYYMMDD $HH:$MM UTC"ARGS='{ "fireName": "'$FIRENAME'", "initializationType": "'active_fire_polygon'", "activeFireTimestamp": "'$ACTIVE_FIRE_TIMESTAMP'", "alreadyBurnedTimestamp": "'$ALREADY_BURNED_TIMESTAMP'", "ignitionTime": "'$IGNITION_TIME'", "westBuffer": '$WEST_BUFFER', "southBuffer": '$SOUTH_BUFFER', "eastBuffer": '$EAST_BUFFER', "northBuffer": '$NORTH_BUFFER', "numEnsembleMembers": '$NUM_ENSEMBLE_MEMBERS', "addToActiveFires": "'no'", "runHours": '$RUN_HOURS', "fuelSource": "'$FUEL_SOURCE'", "fuelVersion": "'$FUEL_VERSION'", "scpInputDeck": "'none'", "returnAfterQueue": "'no'", "runTemplate": "'$RUN_TEMPLATE'" }'
cd $ELMFIRE_BASEDIR/runs/hindcasts rm -f -r ./runs/$FIRENAME/${FIRENAME}$ACTIVE_FIRE_TIMESTAMP
./01-crs.sh "$ARGS"
mv $(pwd)/runs/$FIRENAME/${FIRENAME}_$ACTIVE_FIRE_TIMESTAMP $CWD/
exit 0