sdfopen /grove3/iesuw/ccm1/CCM1-21KEXP-SEAE2025.nc sdfopen /grove3/iesuw/ccm1/CCM1-CNTROLPI-SEAE2025.nc *these plots maintain aspect/ratio *want Altantic ocean in center of plot set lon -180 180 *define variable we will be plotting *in file, precip minus evap (pme) is 'p-e' and grads cannot read variable names with '-' in them *so we must define pme ourselves *set t to all times so that pme will be define for all time periods *if we set t=1, pme will just be calculated for DJF set t 1 5 *.1 and .2 tell what file the variable comes from *since we opened the 21K file first, that is file 1 (prectmm.1) *and the ctl file is file 2 (prectmm.2) *you can use mathematical expressions in grads, as below define pme21 = prectmm.1 - qflr.1/2.5105e9 * 86400000 define pmectl = prectmm.2 - qflr.2/2.5105e9 * 86400000 *enable output file enable print three_panel.prt *turn grads grid off set grid off *set map line attributes: color, style, thickness *we have increased map line thickness here (6) set map 1 1 6 *set time to first in file (in this case, DJF) set t 1 *draw strings on page to label plots *draw string xpos ypos string draw string 7.5 8.5 EXP draw string 7.5 5.5 CTL draw string 7.5 2 DELTA *set dimensions on page of first map *top center of page *set vpage xmin xmax ymin ymax set vpage 0 8.5 6.5 11 *turn grads label off (must do this before every plot is drawn) set grads off *set explicit contour levels set clevs -16 -8 -4 -2 -1 0 1 2 4 8 16 *set thickness of contour lines set cthick 1 *turn off x axis labeling set xlab % *draw variable we defined earlier d pme21 *draw title *putting in back slash makes text after the slash go onto a new line draw title 21KEXP-CNTROLPI P-E \ DJF *second plot *must reset vpage set vpage 0 8.5 3.25 7.75 set grads off set clevs -16 -8 -4 -2 -1 0 1 2 4 8 16 set cthick 1 set xlab % d pmectl print *third plot set vpage 0 8.5 0 4.5 set grads off set clevs -16 -8 -4 -2 -1 0 1 2 4 8 16 set cthick 1 *draw delta of two files d pme21-pmectl *print contour label at bottom *could also use 'draw string' for this, but *draw xlab gives nice big type and centers at bottom of plot draw xlab ci +/- 0 1 2 4 8 16 print disable print