53 # - BUG: temperatures < 0 were not allowed |
53 # - BUG: temperatures < 0 were not allowed |
54 # - temperature histogram resolution increased from 1degC to 0.5degC for no good reason |
54 # - temperature histogram resolution increased from 1degC to 0.5degC for no good reason |
55 # Mar 13, 2016: - added simple ASCII file format |
55 # Mar 13, 2016: - added simple ASCII file format |
56 # - BUG: Layout error when input had no lat/lon |
56 # - BUG: Layout error when input had no lat/lon |
57 # - added lon to simple ASCII format |
57 # - added lon to simple ASCII format |
|
58 # Mar 16, 2016: - adapted to gmt5 |
58 |
59 |
59 ($ANTS) = (`which ANTSlib` =~ m{^(.*)/[^/]*$}); |
60 ($ANTS) = (`which ANTSlib` =~ m{^(.*)/[^/]*$}); |
60 ($WCALC) = ($0 =~ m{^(.*)/[^/]*$}); |
61 ($WCALC) = ($0 =~ m{^(.*)/[^/]*$}); |
61 $WCALC = '.' if ($WCALC eq ''); |
62 $WCALC = '.' if ($WCALC eq ''); |
62 |
63 |
583 my($xmin) = $elapsed[0]/60; |
584 my($xmin) = $elapsed[0]/60; |
584 my($xmax) = $elapsed[$#elapsed]/60; |
585 my($xmax) = $elapsed[$#elapsed]/60; |
585 my($ymin) = -3; my($ymax) = 3; |
586 my($ymin) = -3; my($ymax) = 3; |
586 my($plotsize) = '13c'; |
587 my($plotsize) = '13c'; |
587 GMT_begin(sprintf($pfmt[0],$id),"-JX${plotsize}","-R$xmin/$xmax/$ymin/$ymax",'-X6 -Y4 -P'); |
588 GMT_begin(sprintf($pfmt[0],$id),"-JX${plotsize}","-R$xmin/$xmax/$ymin/$ymax",'-X6 -Y4 -P'); |
588 GMT_psxy('-W2,255/127/80'); |
589 GMT_psxy('-W1,coral'); |
589 for ($r=0; $r<@w; $r++) { |
590 for ($r=0; $r<@w; $r++) { |
590 printf(GMT "%f %f\n",$elapsed[$r]/60,$w_lp[2*$r]/@w_lp); |
591 printf(GMT "%f %f\n",$elapsed[$r]/60,$w_lp[2*$r]/@w_lp); |
591 GMT_psxy('-W2,46/139/87') if ($r == $atBtm); |
592 GMT_psxy('-W1,SeaGreen') if ($r == $atBtm); |
592 } |
593 } |
593 GMT_psbasemap('-Bg60a30f5:"Elapsed Time [min]":/g1a1f0.1:"Vertical Package Velocity [ms@+-1@+]":WeSn'); |
594 GMT_psbasemap('-Bg60a30f5:"Elapsed Time [min]":/g1a1f0.1:"Vertical Package Velocity [ms@+-1@+]":WeSn'); |
594 GMT_unitcoords(); |
595 GMT_unitcoords(); |
595 GMT_pstext('-G255/127/80'); print(GMT "0.98 0.98 14 0 0 TR dc\n"); |
596 GMT_pstext('-F+f14,Helvetica,coral+jTR'); print(GMT "0.98 0.98 dc\n"); |
596 GMT_pstext('-G46/139/87'); print(GMT "0.98 0.94 14 0 0 TR uc\n"); |
597 GMT_pstext('-F+f14,Helvetica,SeaGreen+jTR'); print(GMT "0.98 0.94 uc\n"); |
597 GMT_pstext('-Gblue'); |
598 GMT_pstext('-F+f14,Helvetica,blue+jTL -N'); |
598 if (defined($outfile)) { printf(GMT "0.02 0.02 14 0 0 BL $outfile\n",$id); } |
599 if (defined($outfile)) { printf(GMT "0.01 1.06 $outfile\n",$id); } |
599 else { printf(GMT "0.02 0.02 14 0 0 BL %03d\n",$id); } |
600 else { printf(GMT "0.01 1.06 %03d\n",$id); } |
600 GMT_end(); |
601 GMT_end(); |
601 |
602 |
602 my($xmin) = round($min_sspd-3,5); |
603 my($xmin) = round($min_sspd-3,5); |
603 my($xmax) = round($max_sspd+3,5); |
604 my($xmax) = round($max_sspd+3,5); |
604 my($ymin) = 0; my($ymax) = round($depth[$atBtm]+70,100); |
605 my($ymin) = 0; my($ymax) = round($depth[$atBtm]+70,100); |
605 my($plotsize) = '13c'; |
606 my($plotsize) = '13c'; |
606 GMT_begin(sprintf($pfmt[1],$id),"-JX${plotsize}/-${plotsize}","-R$xmin/$xmax/$ymin/$ymax",'-X6 -Y4 -P'); |
607 GMT_begin(sprintf($pfmt[1],$id),"-JX${plotsize}/-${plotsize}","-R$xmin/$xmax/$ymin/$ymax",'-X6 -Y4 -P'); |
607 GMT_psbasemap('-Bg10a10f1:"Speed of Sound [m/s]":/g1000a500f100:"Depth [m]":WeSn'); |
608 GMT_psbasemap('-Bg10a10f1:"Speed of Sound [m/s]":/g1000a500f100:"Depth [m]":WeSn'); |
608 GMT_psxy('-W8,255/127/80'); |
609 GMT_psxy('-W2,coral'); |
609 for ($r=0; $r<@w; $r++) { |
610 for ($r=0; $r<@w; $r++) { |
610 printf(GMT "%f %f\n",$sspd[$r],$depth[$r]); |
611 printf(GMT "%f %f\n",$sspd[$r],$depth[$r]); |
611 GMT_psxy('-W6,46/139/87') if ($r == $atBtm); |
612 GMT_psxy('-W1.5,SeaGreen') if ($r == $atBtm); |
612 } |
613 } |
613 GMT_unitcoords(); |
614 GMT_unitcoords(); |
614 GMT_pstext('-G255/127/80'); print(GMT "0.98 0.02 14 0 0 TR dc\n"); |
615 GMT_pstext('-F+f14,Helvetica,coral+jTR'); print(GMT "0.98 0.02 dc\n"); |
615 GMT_pstext('-G46/139/87'); print(GMT "0.98 0.06 14 0 0 TR uc\n"); |
616 GMT_pstext('-F+f14,Helvetica,SeaGreen+jTR'); print(GMT "0.98 0.06 uc\n"); |
616 GMT_pstext('-Gblue'); |
617 GMT_pstext('-F+f14,Helvetica,blue+jTL -N'); |
617 if (defined($outfile)) { printf(GMT "0.02 0.98 14 0 0 BL $outfile\n",$id); } |
618 if (defined($outfile)) { printf(GMT "0.01 -0.06 $outfile\n",$id); } |
618 else { printf(GMT "0.02 0.98 14 0 0 BL %03d\n",$id); } |
619 else { printf(GMT "0.01 -0.06 %03d\n",$id); } |
619 GMT_end(); |
620 GMT_end(); |
620 } |
621 } |
621 |
622 |
622 #---------------------------------------------------------------------- |
623 #---------------------------------------------------------------------- |
623 |
624 |