FILE_1="NGoG_U10_2.txt" # The text file containing the data lon1a=-8 # study area lon1b=3 titl="U10 (anomalies)" # for -B+t later height=15 # defines the vertical size of my plot (I'm in cm) # # Parameters for .cpt file lim1=-1.5 lim2=1.5 inc=0.25 colr="-Bxafg -By+lm/s" # for automatic annotation of the colorbar with unit "K(elvin)" at the top barcolor="-DJBM+e+w-$(echo "scale=3; 0.95*${height};" | bc)c/0.3c" # Place the colorbar on the right of the plot with the anchor at middle height ... and add some nice style (will be discrete) # # Canvas size w1=$(echo "scale=3; (${lon1b} - ${lon1a})/4;" |bc) # plot width of study area #gap=$(echo "scale=3; ${w1} + (${lon2a} - ${lon1b})/10;" |bc) # Consistent space between the two projection1="-JX${w1}cd/${height}cT" # Cartesian projection with "d" for geo and "T" for absolute time #projection2="-JX${w2}cd/${height}cT" day1=2019 # day2=2021 region1="-R${lon1a}/${lon1b}/${day1}/${day2}" region2="-R${lon2a}/${lon2b}/${day1}/${day2}" line=/Users/dgicape/Documents/Oceanography/PhD_code_sealevel/Ocean_work/sertom_script/GMT_hov #cp ${root_dir}/gmt.conf ./ # copy my custom conf into gmt begin u10_hov png awk '{print $1, $2, $3}' ${FILE_1} |gmt blockmean -I0.001 ${region1} > lat_u101.grd gmt surface ${region1} lat_u101.grd -I0.001 -Glat_u101.grd #gmt surface ${FILE_1} -Glat_u10.grd -I0.025 #gmt makecpt -T-1.5/1.5/0.0625 -Cvik gmt grd2cpt lat_u101.grd -Cvik gmt grdimage ${region1} ${projection1} lat_u101.grd -C -Bxa1f0.5g0.5 -Bsya1Yf1Yg1Y -BWSen --MAP_GRID_PEN_PRIMARY=thinner,grey --MAP_GRID_PEN_SECONDARY=thin,black #gmt grdcontour lat_u101.grd -C0.25 -Wthinner,204/217/233 gmt plot ${line}/twopoints_eq2.dat -W0.6,GRAY23,-. gmt colorbar ${barcolor}+o1.75c/0c -C ${colr} -Np gmt end show rm *.grd