rem ============================ rem Discharge + duration curve rem ============================ set fig=fig_gmt_tsd_Q.eps rem --------------------------------------- rem Sort in large order gawk -f awk_sort.awk inp_QKF2008.txt > inp_sort.txt rem --------------------------------------- gmtset PLOT_DATE_FORMAT o gmtset TIME_FORMAT_PRIMARY Abbreviated gmtset INPUT_DATE_FORMAT yyyy/mm/dd gmtset ANNOT_FONT_SIZE_PRIMARY 14 gmtset LABEL_FONT_SIZE 14 gmtset HEADER_FONT_SIZE 16 gmtset HEADER_OFFSET -0.2c gmtset TICK_LENGTH 0c rem Make batch file for lrgrnd drawing echo 20 $ 10 $ tl $ 0.5 $ 0.3 > inp_legend_tsd_Q.txt echo 10 $ 0.5 $ 6 >> inp_legend_tsd_Q.txt echo Discharge $ 3/0/0/255 $ --- $ --- $ --- >> inp_legend_tsd_Q.txt echo Duration curve $ 5/255/0/0 $ c0.2 $ 255/255/255 $ 5/255/0/0 >> inp_legend_tsd_Q.txt gawk -f \WANtaroHP_plot\gmt_basic\awk_klegend.awk inp_legend_tsd_Q.txt > legend2.bat rem --------------------------------------- rem Discharge: blue, Duration: red rem --------------------------------------- psbasemap -R2008-1-1T/2008-12-31T/0/1000 -JX20/10 -U"%fig%" -Bpa1Og1O:"Date (2008)":/a100g100:"Discharge (m@+3@+/s)":WSen:."Discharge at Kamifukushima gauging station in Tonegawa river (2008)": -K > %fig% gawk "BEGIN{FS=\",\"}2<=NR{print $1,$2}" inp_QKF2008.txt | psxy -R -J -H -W3,blue -O -K >> %fig% gawk "BEGIN{FS=\",\"}{print $1,$2}" inp_sort.txt | psxy -R1/365/0/1000 -J -W5,red -O -K >> %fig% rem --------------------------------------- rem Red circle for specified points rem --------------------------------------- gawk "BEGIN{FS=\",\"}{if(NR==1) print $1,$2}" inp_sort.txt | psxy -R -J -Sc0.2 -Gwhite -W5,red -N -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==35) print $1,$2}" inp_sort.txt | psxy -R -J -Sc0.2 -Gwhite -W5,red -N -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==95) print $1,$2}" inp_sort.txt | psxy -R -J -Sc0.2 -Gwhite -W5,red -N -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==185)print $1,$2}" inp_sort.txt | psxy -R -J -Sc0.2 -Gwhite -W5,red -N -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==275)print $1,$2}" inp_sort.txt | psxy -R -J -Sc0.2 -Gwhite -W5,red -N -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==355)print $1,$2}" inp_sort.txt | psxy -R -J -Sc0.2 -Gwhite -W5,red -N -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==365)print $1,$2}" inp_sort.txt | psxy -R -J -Sc0.2 -Gwhite -W5,red -N -O -K >> %fig% rem --------------------------------------- rem Base color of duration table rem --------------------------------------- psbasemap -R0/10/0/8 -JX5/4 -B::/::wsen -Glightyellow -X14.5 -Y5.5 -O -K >> %fig% rem --------------------------------------- rem Draw table rem --------------------------------------- echo 0.5 7.5 12 0 0 ML C.A. | pstext -R -J -Gred -P -O -K >> %fig% echo 0.5 6.5 12 0 0 ML Max. | pstext -R -J -Gred -P -O -K >> %fig% echo 0.5 5.5 12 0 0 ML 35 day | pstext -R -J -Gred -P -O -K >> %fig% echo 0.5 4.5 12 0 0 ML 95 day | pstext -R -J -Gred -P -O -K >> %fig% echo 0.5 3.5 12 0 0 ML 185 day | pstext -R -J -Gred -P -O -K >> %fig% echo 0.5 2.5 12 0 0 ML 275 day | pstext -R -J -Gred -P -O -K >> %fig% echo 0.5 1.5 12 0 0 ML 355 day | pstext -R -J -Gred -P -O -K >> %fig% echo 0.5 0.5 12 0 0 ML Min | pstext -R -J -Gred -P -O -K >> %fig% echo 9.5 7.5 12 0 0 MR 3661km@+2@+ | pstext -R -J -Gred -P -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==1) printf \"9.5 6.5 12 0 0 MR %%gm@+3@+/s\",$2}" inp_sort.txt | pstext -R -J -Gred -P -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==35) printf \"9.5 5.5 12 0 0 MR %%gm@+3@+/s\",$2}" inp_sort.txt | pstext -R -J -Gred -P -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==95) printf \"9.5 4.5 12 0 0 MR %%gm@+3@+/s\",$2}" inp_sort.txt | pstext -R -J -Gred -P -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==185)printf \"9.5 3.5 12 0 0 MR %%gm@+3@+/s\",$2}" inp_sort.txt | pstext -R -J -Gred -P -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==275)printf \"9.5 2.5 12 0 0 MR %%gm@+3@+/s\",$2}" inp_sort.txt | pstext -R -J -Gred -P -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==355)printf \"9.5 1.5 12 0 0 MR %%gm@+3@+/s\",$2}" inp_sort.txt | pstext -R -J -Gred -P -O -K >> %fig% gawk "BEGIN{FS=\",\"}{if(NR==365)printf \"9.5 0.5 12 0 0 MR %%gm@+3@+/s\",$2}" inp_sort.txt | pstext -R -J -Gred -P -O -K >> %fig% rem --------------------------------------- rem Dummy plot to origin rem --------------------------------------- echo 0 0 | psxy -R1/365/0/1000 -JX20/10 -Sp -X-14.5 -Y-5.5 -O -K >> %fig% call legend2.bat set fig= del _* del .gmt*