masks="Sibe USA NAtl Arct ter interH oce circA otrop weak subs conv glob etoa"
masks="Sibe USA"
masks="circAa etow etows"
masks="etows"
masks="circA"

for mask in $masks ; do


case $mask in

oce|ter|otrop|weak|subs|conv|circA|NAtl|Arct|Sibe|USA)
ferret -batch tmp.ps <<eod
use tas.nc
use mask$mask.nc
shade/nolabel/lev=(-Inf)(0) tas[d=1]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=blue_darkred mask$mask ; go land thick
quit
eod
;;

glob)
ferret -batch tmp.ps <<eod
use tas.nc
shade/lev=(0.)(200.)(Inf)/nolabel/pal=blue_red_centered tas ; go land thick
quit
eod
;;

etoa)
ferret -batch tmp.ps <<eod
use tas.nc
use maskotrop.nc
use masketo.nc
shade/nolabel/lev=(-Inf)(0) tas[d=1]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=red_blue_centered maskotrop[d=2]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=blue_darkred eto[d=3] ; go land thick
quit
eod
;;

etow)
ferret -batch tmp.ps <<eod
use tas.nc
use maskweak.nc
use masketo.nc
shade/nolabel/lev=(-Inf)(0) tas[d=1]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=red_blue_centered maskweak[d=2]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=blue_darkred eto[d=3] ; go land thick
quit
eod
;;

etows)
ferret -batch tmp.ps <<eod
use tas.nc
use maskweak.nc
use masksubs.nc
shade/nolabel/lev=(-Inf)(0) tas[d=1]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=red_blue_centered maskweak[d=2]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=blue_darkred masksubs[d=3] ; go land thick
quit
eod
;;

circAa)
ferret -batch tmp.ps <<eod
use tas.nc
use maskotrop.nc
use maskcircA.nc
shade/nolabel/lev=(-Inf)(0) tas[d=1]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=red_blue_centered maskotrop[d=2]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=blue_darkred maskcircA[d=3] ; go land thick
quit
eod
;;

interH)
ferret -batch tmp.ps <<eod
use maskNH.nc
use maskSH.nc
shade/lev=(-Inf)(0.5)(Inf)/nolabel/pal=red_blue_centered maskSH[d=2]
shade/o/lev=(-Inf)(0.5)(Inf)/nolabel/pal=blue_darkred maskNH[d=1] ; go land thick
quit
eod

esac

ps2epsi tmp.ps ; epstopdf tmp.epsi
\mv -f tmp.pdf mask$mask.pdf ; convert -density 144 -rotate 90  mask$mask.pdf mask$mask.png
done

