REM GMT EXAMPLE xxxx REM 2021-03-14 leiyang@fio.org.cn REM Purpose: Using blockmean, grdmath to calculate the STD abd trend REM gmt gmtset FORMAT_GEO_MAP = dddF MAP_FRAME_WIDTH=2p gmt gmtset FONT_ANNOT_PRIMARY 7p,Helvetica,black FONT_LABEL 7p,Helvetica,black
set ps=jason_wet_global_new.ps set R=105/130/15/45 set J=M5c
REM Calculate mean value and plot mean wet path delay gmt makecpt -Cvik -T50/350/5> t.cpt REM use Jason-2 data of cycle 1-294 (6years), downloaded from RADS. rem gawk "!/NaN/ && NR>13 && $3>100 {print $3,$2,(-$4)*1000}" D:\rads\wet\radsdata_ok\j2*c*.asc > model.dd gmt blockmean model.dd -R%R% -I20m >tmp_.dd gmt surface tmp_.dd -R%R% -I20m -Ggridded2_j2_s.nc -T0.25 REM gridded2_j2_s.nc is the averaged file and will be used in next step. gmt grdimage gridded2_j2_s.nc -R%R% -J%J% -K -Ct.cpt -Y13c> %ps% gmt pscoast -R -J -Dl -A10000/0/1 -Bag --FONT_TITLE=10p -Gwhite -W0.1p --MAP_ANNOT_OBLIQUE=45 -O -K >> %ps% gmt psscale -DjBC+o0c/-1.4c+w1.5i/0.08i -R -J -Ct.cpt -Bxaf -By+lmm -I -O --FONT_ANNOT_PRIMARY=7p -K>> %ps% echo10742 a)mean of WPD| gmt pstext -F+f8p,1,black+jLB -R -J -O -N -Gwhite -K >> %ps%
rem Calculate STD and PLOT gmt makecpt -Cvik -T50/150/1> t.cpt gmt blockmean model.dd -As -E -R -I20m -Ggridded2_j2_std.nc gmt grd2xyz gridded2_j2_std.nc | gawk "!/NaN/ {print $1,$2,$3}" | gmt surface -R -I20m -Ggridded2_j2_std2.nc -T0.25 REM gridded2_j2_std2.nc is the STD file and will be used in next step. gmt grdimage gridded2_j2_std2.nc -R -J -K -Ct.cpt -O -X7c >> %ps% gmt pscoast -R -J -Dl -A10000/0/1 -Bag --FONT_TITLE=10p -Gwhite -W0.1p --MAP_ANNOT_OBLIQUE=45 -O -K >> %ps% gmt psscale -DjBC+o0c/-1.4c+w1.5i/0.08i -R -J -Ct.cpt -Bxaf -By+lmm -I -O --FONT_ANNOT_PRIMARY=7p -K>> %ps% echo10742 b)STD of WPD| gmt pstext -F+f8p,1,black+jLB -R -J -O -N -K -Gwhite >> %ps%
rem Calculate trend and PLOT gmt makecpt -Cvik -T-30/30/1> t.cpt gmt grdsample gridded2_j2_s.nc -I60m -Ggridded2_j2_s_re.nc