GAMIT
In this section:
Description
According to the page of GAMIT/Globk, GAMIT, GLOBK, and TRACK form a comprehensive suite of programs for analyzing GPS measurements, primarily to study crustal deformation.
Available Versions
gamit/10.61
gamit/10.70 (default)
Serial Job Submission
submit_gamit.sh
#!/bin/bash
#SBATCH -J gamit
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 7-00:00:00
#SBATCH --mem=16G
export INPUT="run.sh 2018 sites.defaults"
export OUTPUT="*.out *.log *.prt"
module load gamit/10.70
job-nanny ./run.sh
Execution Script (run.sh)
run.sh
#!/bin/bash
# Configure link to GAMIT
ln -s $GAMIT_PATH /home/$USER/gg
# Create directory for the year
mkdir -p 2018
cd 2018/
# Configure tables
mkdir -p tables
cp -r ../sites.defaults tables/.
# Configure processing
sh_setup -yr 2018
# Configure email (optional)
sed -i "s/set mailto = ''/set mailto = '${USER}@email.com'/" tables/process.defaults
# Update station information
cd tables/
sh_upd_stnfo -l sd
mv station.info.new station.info
cd ..
# Process GPS data (example)
sh_gamit -expt eura -gnss G -s 2018 095 097 -pres ELEV -orbit igsf \
-copt x k p -dopts c ao > sh_gamit_2018G.log
sh_gamit -expt eura -gnss R -s 2018 095 097 -jclock sp3 -pres ELEV \
-orbit codm -copt x k p -dopts c ao > sh_gamit_2018R.log
sh_gamit -expt eura -gnss E -s 2018 095 097 -pres ELEV -orbit codm \
-copt x k p -dopts c ao > sh_gamit_2018E.log
sh_gamit -expt eura -gnss C -s 2018 095 097 -pres ELEV -orbit codm \
-copt x k p -dopts c ao > sh_gamit_2018C.log
# Combined analysis
sh_glred -s 2018 095 2018 097 -expt eura -gnss G R E C -opt R H G T \
> sh_glred_GREC.log
sh_glred -s 2018 095 2018 097 -expt eura -netext G R E C -ncomb 3 \
-globk_cmd_prefix COMB -opt G > sh_glred_comb.log
Job Array for Multiple Periods
submit_gamit_array.sh
#!/bin/bash
#SBATCH -J gamit_array
#SBATCH --array=1-12
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 7-00:00:00
#SBATCH --mem=16G
YEARS=(2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021)
YEAR=${YEARS[$SLURM_ARRAY_TASK_ID-1]}
export INPUT="run_${YEAR}.sh sites.defaults"
export OUTPUT="${YEAR}_results/"
module load gamit/10.70
job-nanny ./run_${YEAR}.sh
Batch Processing
submit_gamit_batch.sh
#!/bin/bash
#SBATCH -J gamit_batch
#SBATCH -N 2
#SBATCH --ntasks-per-node=14
#SBATCH -t 14-00:00:00
#SBATCH --mem-per-cpu=4G
module load gamit/10.70
# Process multiple days in parallel
for DOY in {095..105}; do
cat > run_day${DOY}.sh << EOF
#!/bin/bash
sh_gamit -expt eura -gnss G -s 2018 ${DOY} ${DOY} -pres ELEV \
-orbit igsf -copt x k p -dopts c ao > sh_gamit_2018G_${DOY}.log
EOF
chmod +x run_day${DOY}.sh
./run_day${DOY}.sh &
done
wait
# Combine results
sh_glred -s 2018 095 2018 105 -expt eura -gnss G -opt R H G T \
> sh_glred_final.log
Results Analysis
# Check output files
ls *.prt *.log
# Extract coordinates
grep "STA" *.prt > coordinates.txt
# Check residuals
grep "RMS" *.log > rms_values.txt
References
Documentation: http://www-gpsg.mit.edu/~simon/gtgk/GAMIT_Ref.pdf
Mailing list: gamit@mit.edu
See also
RNXCMP - RINEX file compression
Running Simulations - How to submit jobs