#!/bin/csh # # Rename permanent file names to temporary names. # cp diffdiff.grd temp1.grd cp lgm4m1-ctrl3_h_0deg_5y.grd temp2.grd cp surftyp_2x2.grd pres.grd # # Set up contour/shading levels and their colors. # echo '-500 55 55 55 -400 55 55 55' >! fig1.cpt echo '-400 50 153 204 -300 50 153 204' >> fig1.cpt echo '-300 255 255 0 -200 255 255 0' >> fig1.cpt echo '-200 255 0 0 -100 255 0 0' >> fig1.cpt echo '-100 112 219 147 0 112 219 147' >> fig1.cpt echo '0 0 0 255 100 0 0 255' >> fig1.cpt echo 'B 255 255 255' >> fig1.cpt echo 'F 255 255 255' >> fig1.cpt # echo '-800 55 55 55 -600 55 55 55' >! fig2.cpt echo '-600 50 153 204 -500 50 153 204' >> fig2.cpt echo '-500 255 255 0 -400 255 255 0' >> fig2.cpt echo '-400 255 0 0 -300 255 0 0' >> fig2.cpt echo '-300 112 219 147 -200 112 219 147' >> fig2.cpt echo '-200 0 0 255 -100 0 0 255' >> fig2.cpt echo '-100 142 35 107 0 142 35 107' >> fig2.cpt echo '0 180 180 180 500 180 180 180' >> fig2.cpt echo 'B 255 255 255' >> fig2.cpt echo 'F 255 255 255' >> fig2.cpt # # Adjust various parameters using program "gmtset". # gmtset ANOT_FONT_SIZE 7 LABEL_FONT_SIZE 17 # # Set values for x, y, size, angle, fontno, justify, and text for # title strings. # echo '0.60 8.25 16 0 0 6 a' >! temp1a.title echo '3.25 8.25 16 0 0 6 DIFF. OF DIFF. - FREEZING HEIGHT (M)' >! temp1b.title # # Plot the aforedefined strings using the "pstext" program. # Be sure to use "-K" for the first command that dumps text to # the PostScript file, "-O -K" for all such commands in the middle, # and only "-O" for the final PostScript creating command. # pstext temp1a.title -R0/6.5/0/9 -Jx1 -P -K >! plot.ps pstext temp1b.title -R -Jx -O -K >> plot.ps echo '0.60 4.25 16 0 0 6 b' >! temp2a.title echo '3.25 4.25 16 0 0 6 LGMM1-CTRL - 5 YR - FREEZING HEIGHT (M)' >! temp2b.title pstext temp2a.title -R -Jx -O -K >> plot.ps pstext temp2b.title -R -Jx -O -K >> plot.ps # # Transform NetCDF file to xyz triplet ASCII file. # grd2xyz temp1.grd > temp1.xyz # # Produce a contour plot via triangulation. # -I - color the triangles using the palette table above # -C - the name of the color palette file created above # -R - the lat/lon limits of the geographical region of interest. # -J - the projection desired # pscontour temp1.xyz -R-180/180/-90/90 -JQ0/5.5 -I -X0.5 -Y5.25 \ -Cfig1.cpt -O -K >> plot.ps # # Draw surrounding box and lat/lon labels. # -B - setting tickmarks (can be really complicated) # psbasemap -R-180/180/-90/90 -JQ0/5.5 -B60/30neSW -O -K >> plot.ps # # Contour dashed continental outline from 2x2 digitization. If # a separate file is not used the built-in continental outlines # can be used via the "pscoast" program. # -C - specification of contour interval, in this case a constant # interval on either side of 0.0 # -W - type of contours desired, i.e. section 4.12 on page 13 of # manual # grdcontour pres.grd -JQ0/5.5 -C0.8 -W3to -O -K >> plot.ps # # Draw a scale next to or beneath the graph. # psscale -Cfig1.cpt -D2.75/-0.35/3.2/0.16h -O -K >> plot.ps # # Remove temporary files. # rm temp1.grd rm temp1.xyz rm fig1.cpt # grd2xyz temp2.grd > temp2.xyz pscontour temp2.xyz -R-180/180/-90/90 -JQ0/5.5 -I -X0.0 -Y-4.00 \ -Cfig2.cpt -O -K >> plot.ps # Draw surrounding box and lat/lon labels. psbasemap -R-180/180/-90/90 -JQ0/5.5 -B60/30neSW -O -K >> plot.ps # Contour dashed continental outline from 2x2 digitization. grdcontour pres.grd -JQ0/5.5 -C0.8 -W3to -O -K >> plot.ps psscale -Cfig2.cpt -D2.75/-0.35/3.2/0.16h -O >> plot.ps rm temp2.grd rm temp2.xyz rm fig2.cpt # rm pres.grd # # Rename generic plot.ps to whatever.ps. # mv plot.ps freeze-2.ps