#!/bin/bash read -p " ingresa mes : " f case $f in enero) d=0 ;; febrero) d=1 ;; marzo) d=2 ;; abril) d=3 ;; mayo) d=4 ;; junio) d=5 ;; julio) d=6 ;; agosto) d=7 ;; septiembre) d=8 ;; octubre) d=9 ;; noviembre) d=10 ;; diciembre) d=11 ;; *) echo " ERROR! " echo " ingresa mes con minuscula, por ejemplo septiembre " exit ;; esac more prc.txt |awk '{if( NF == 5) print $0}' | sed s'/\-9.96921e+36/NaN/g' > datos.txt more datos.txt |grep "time\[$d\]" |sed 's/\=/ /g' |awk '{if( $4 > -57 && $4 < -13 && $6 \ > 279 && $6 < 315) print $6-360,$4,$8}' > grilla.xyz gmtset PLOT_DEGREE_FORMAT=dddF # definiendo argumentos region="-81/-45/-58/-13" salida="grafo" proyeccion="M13" topografia="/vox/201001/linux/topografia/topo_6.2.img" marco="a9f9/a8f8NWse" illaz="190" bordecos="0.01p/0/0/0" limfron="-N1/0.5p/0" psfile="${salida}.ps" paleta="/vox/201001/linux/certamen/GMT_ocean.cpt" # ajustes iniciales img2grd ${topografia} -G${salida}.grd -R${region} -m2.0 -T1 -N1 -V psbasemap -B${marco} -J${proyeccion} -R${region} -X3 -Y5 -P -V -K > ${psfile} grdgradient ${salida}.grd -G${salida}.int -A${illaz} -Nt -M # interpolacion surface ${grilla}.xyz -G${grilla}.grd -R${region} -I1m -T0.2 -C1 -V makecpt -C/vox/201001/linux/certamen/GMT_meanprecip.cpt -T0/10/1 -I > ${grilla}.cpt grdsample ${salida}.int -Gtopo.int -R${region} -I1m -V -F grdsample ${grilla}.grd -Gmes2.grd -R${region} -I1m -V -F grdimage mes2.grd -C${grilla}.cpt -B${marco} -J${proyeccion} -Itopo.int -R${region}\ -V -O -K >> ${psfile} grdcontour mes2.grd -B${marco} -J${proyeccion} -C50 -A1+k0/0/0+g255/255/255 -R${region} \ -W0.5p/0/0/0 -Gd5c -O -K >> ${psfile} # ajustes finales pscoast -B${marco} -J${proyeccion} -R${region} -P -V -Df -S0 -W${bordecos}\ ${limfron} -O -K >> ${psfile} echo 49.7W 49.7S 1 2 | psxy -R${region} -J${proyeccion} -O -K -Sr -G255\ -W0.5 >> ${psfile} echo 50.5W 50S | mapproject -R279/315/-58/-13 -JM13 > co pos=` awk '{printf "%sc/%sc\n", $1, $2}' co ` max="a10f1/a10f1:mm:" psscale -D$pos/4/0.3 -C${grilla}.cpt ${verbose} -B${max} -I -O >> ${psfile} rm *.grd *.int *.xyz co mes.cptExplicación
gonzalo 2011-09-16