Calculates daily traj for 1yr at a time

Topics about the HYSPLIT trajectory model.
Post Reply
dodive
Posts: 6
Joined: March 17th, 2015, 10:39 pm
Registered HYSPLIT User: Yes
Location: Seoul, Korea
Contact:

Calculates daily traj for 1yr at a time

Post by dodive »

Hello everyone.

I'm trying to calculate daily forward-trajectory for 10years. So I'm using HYSPLIT(Linux) daily option.

(3hour interval, 72hour tracing, traj initiate from 5location*3altitude, using WRF-ARW meteorological data)

Is there any way to calculate 1yr at a time..?

I tried use autotraj script (/script/autotraj.sh) but it doesn't work well


any help would be greatly appreciated.

regards,

Doyoon Kim
Air Pollution Modeling & Climate Change laboratory
Konkuk Univ., Seoul, South Korea.
ariel.stein
Posts: 660
Joined: November 7th, 2012, 3:14 pm
Registered HYSPLIT User: Yes

Re: Calculates daily traj for 1yr at a time

Post by ariel.stein »

The following script will calculate backtrajectories by year:

#!/bin/sh
DAT='/pub/archives/reanalysis'
EXE='../exec'

rm CONTROL*
rm MESSAGE*

# for yr in 49 ; do
for yr in 01 02 03 04 05 06 07 08 09 10 11 12; do

mkdir $yr

cd $yr
rm tdump*
ln -s ../ASCDATA.CFG .

for mt in 01 02 03 04 05 06 07 08 09 10 11 12 ; do
for dy in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do
for hr in 00 06 12 18; do



if [ \( $mt -eq 04 \) -o \( $mt -eq 06 \) -o \
\( $mt -eq 09 \) -o \( $mt -eq 11 \) ];then
if [ $dy -gt 30 ];then
continue
continue
continue

fi
elif [ $mt -eq 02 ];then
if [ $dy -gt 28 ];then
continue
continue
continue
fi
fi

echo "${yr} ${mt} ${dy} ${hr}" > CONTROL
echo "1" >> CONTROL
#echo "37.23 -3.53 100.0" >> CONTROL
#echo "38.48 -6.92 100.0" >> CONTROL
echo "-53.86 -69.576 500.0" >> CONTROL
echo "-240" >> CONTROL
echo "0" >> CONTROL
echo "10000.0" >> CONTROL


let cent=2000

let yr=10#${yr}
yrr=`printf "%d\n" "${yr}"`
let fyr=$yrr+$cent

echo 2 >> CONTROL
echo ${DAT}/ >> CONTROL
echo RP${fyr}${mt}.gbl >> CONTROL

echo RP${fyr}${mt}.gbl 'first'


let mtt=10#${mt}
mn=`printf "%d\n" "${mtt}"`
let mu=-1
let mb=$mn+$mu
let yrb=$fyr+$mu

mbef=`printf %02d ${mb}`

echo $fyr $yr $yrb $mt $mb $mbef

if [ "${mb}" -eq "0" ]; then
echo ${DAT}/ >> CONTROL
echo RP${yrb}12.gbl >> CONTROL
echo RP${yrb}12.gbl

else
echo ${DAT}/ >> CONTROL


echo RP${fyr}${mbef}.gbl >> CONTROL
echo RP${fyr}${mbef}.gbl
fi

echo "./" >> CONTROL
echo tdump.${fyr}${mt}${dy}${hr} >> CONTROL

${EXE}/hyts_std

done
done
done

rm INFILE

ls tdump.* | while read fname; do echo $fname >> INFILE; done
if [ ! -s INFILE ]; then
echo "ERROR - INFILE not created"
exit
fi

${EXE}/trajfreq -iINFILE -g1.0 -s0:2000

echo "'TITLE&','Trajectory Frequency Plot&'" >LABELS.CFG
echo "'MAPID&',' Values &'" >>LABELS.CFG
echo "'UNITS&',' %&'" >>LABELS.CFG
echo "'VOLUM&',' &'" >>LABELS.CFG

${EXE}/concplot -itfreq.bin -ofreq_${fyr} -z75 -v0.01+0.1+1+10 -j../graphics/arlmap

convert freq_${fyr}.ps freq_${fyr}.gif
convert freq_${fyr}.ps freq_${fyr}.pdf
cp freq_${fyr}.gif ../.

cd ../
done
dodive
Posts: 6
Joined: March 17th, 2015, 10:39 pm
Registered HYSPLIT User: Yes
Location: Seoul, Korea
Contact:

Re: Calculates daily traj for 1yr at a time

Post by dodive »

Thank you stein! ^^

I always appreciate your support
Post Reply

Return to “Trajectory Model”