#!/bin/csh set IO = `basename $0` # #------------------------------------------------------- Fortran Code --------- cat >! ${IO}.f << FINEF90 parameter (ixm=70,jxm=70,nyear=2) real t(ixm,jxm,24),ta(ixm,jxm,nyear),td(ixm,jxm) real xlat(ixm,jxm),xlon(ixm,jxm) call vec_cos(ta,0.0,1,ixm*jxm*nyear) im=8 do iyear=2000,2001 ; iy=iyear-1999 do id=11,20 call museomm52d('t2m',iyear,im,id,0,3,t,xlat,xlon,ixm,jxm,ix,jx) do i=1,ix ; do j=1,jx ; do ih=1,24 ta(i,j,iy)=ta(i,j,iy)+t(i,j,ih) enddo ; enddo ; enddo enddo enddo xnorm=1./(24*10) do i=1,ix ; do j=1,jx td(i,j)=xnorm*(ta(i,j,2)-ta(i,j,1)) enddo ; enddo call mvsetflags('Plot Italy',3.0) call mvsetflags('Dominio',3.0) call mvsetflags('Label Bar',1.0) call mvsetflags('Numero Colori Plot2d',-1.0) call mvsetflags('Colori Plot2d', 0.1) call mvsetflags('Colori Plot2d', 0.0) call mvsetflags('Colori Plot2d',-1.5) call mvsetflags('Colore Titoli',12.0) call mm5colorzoom (td,ixm,jxm,21,53,13,44,' ') call geopol call mvsetflags('Colore Titoli',12.0) call displayexample('$IO','Temperature diff. 2001-2000','Aug 11-20') call mvsetflags('Numero Colori Plot2d',-12.0) call mvsetflags('Colori Plot2d',-9999.0) call mvsetflags('Colori Plot2d',-1.50) call mvsetflags('Colori Plot2d',-1.25) call mvsetflags('Colori Plot2d',-1.00) call mvsetflags('Colori Plot2d',-0.50) call mvsetflags('Colori Plot2d',-0.40) call mvsetflags('Colori Plot2d',-0.30) call mvsetflags('Colori Plot2d',-0.20) call mvsetflags('Colori Plot2d',-0.10) call mvsetflags('Colori Plot2d', 0.00) call mvsetflags('Colori Plot2d', 1.00) call mm5colorzoom (td,ixm,jxm,21,53,13,44,' ') call geopol call mvsetflags('Colore Titoli',12.0) call displayexample('$IO','Temperature diff. 2001-2000','Aug 11-20') end subroutine geopol call mvsetflags('Colore Titoli',0.0) call mvsetflags('coordinate grafiche',2.0) call mvsetflags('Size delle scritte',13.0) call scrivisulplot('L''Aquila',42.35583,13.39556) call scrivisulplot('Chieti',42.35111,14.16833) call mvsetflags('Size delle scritte',11.0) call scrivisulplot('Sulmona',42.04667,13.92833) call scrivisulplot('Avezzano',42.03139,13.42556) call mvsetflags('Size delle scritte',7.0) call scrivisulplot('Bussi',42.21028,13.82639) call scrivisulplot('Capestrano',42.26639,13.76889) call scrivisulplot('Popoli',42.17056,13.83278) call scrivisulplot('Pizzoli',42.43500,13.30333) call scrivisulplot('Lucoli',42.29055,13.33861) call scrivisulplot('Fontecchio',42.22889,13.60528) call scrivisulplot('Ovindoli',42.13556,13.51556) call scrivisulplot('Campotosto',42.55806,13.36833) call scrivisulplot('Castelli',42.48861,13.71167) call scrivisulplot('Scanno',41.90278,13.88083) call scrivisulplot('Ofena',42.32583,13.75833) call scrivisulplot('Raiano',42.10194,13.81333) return end FINEF90 set LOGF = "true" set LOGF = "false" goto chkplatf retchkplatf: if ( -f $IO.exe ) /bin/rm $IO.exe f90 $OPTION -o $IO.exe $IO.f $JETNET $MVLIB $NCARLIB $X11LIB >&! fortran.log if ( ! -x $IO.exe ) then echo " ${IO}: cannot find $IO.exe " echo " This is the log for compilation:" echo "******************************************************************" cat fortran.log echo "******************************************************************" goto CANCELLA else if ( $LOGF == "true" ) then cat fortran.log echo " Running $IO.exe" endif ./$IO.exe CANCELLA: if ( $LOGF == "true" ) echo " Removing all tmp files." foreach FILE ( $IO.exe gmeta core $IO.log fortran.log \ gifmerge.log ${IO}common.f CONDRV.SCR tbl.tmp ) if ( -f $FILE) /bin/rm $FILE end if ( $LOGF == "true" ) echo " Done." exit chkplatf: set CHKSEL = "${?IO}" if ( $CHKSEL == 0 ) set IO = `basename $0` set CHKSEL = "${?SELCOMP}" if ( $CHKSEL == 0 ) set SELCOMP = "nocomp" set X11LIB = " -lX11 -lm " if ( $SELCOMP == "nocomp" ) then else if ( $SELCOMP == "pgf90" ) then if ( ! -X ${SELCOMP} ) then echo " ${IO}: ${SELCOMP} non available on this system. Exiting..." exit endif alias f90 pgf90 ; set COMP = "pgf90" set OPTION = '-silent -Mextend -byteswapio' set IPLATF = 5 goto retchkplatf else if ( $SELCOMP == "ifort" ) then if ( ! -X ${SELCOMP} ) then echo " ${IO}: ${SELCOMP} non available on this system. Exiting..." exit endif alias f90 ifort ; set COMP = "ifort" set OPTION = '-O2 -extend-source -convert big_endian' set IPLATF = 5 goto retchkplatf else if ( $SELCOMP == "gfortran" ) then if ( ! -X ${SELCOMP} ) then echo " ${IO}: ${SELCOMP} non available on this system. Exiting..." exit endif alias f90 gfortran ; set COMP = "gfortran" set OPTION = '-ffixed-line-length-132 -fconvert=big-endian -w -Wno-tabs -O2' set IPLATF = 5 goto retchkplatf else echo " ${IO}: compiler ${SELCOMP} not available on this machine, exiting..." exit endif set COMP = "f90" if ( `uname -a | grep alpha | wc -l` > 0 ) then set OPTION = ' -convert big_endian -extend_source' set IPLATF = 1 else if ( `uname -a | grep SunOS | wc -l` > 0 ) then set OPTION = ' -silent -e' # -silent is unknown for f90 set OPTION = ' -e' set IPLATF = 2 else if ( `uname -a | grep IRIX64 | wc -l` > 0 ) then # set OPTION = ' -n32 -pfa -mpio -mp -Ofast ' set OPTION = ' -n32 -Ofast -extend_source' set IPLATF = 3 else if ( `uname -a | grep AIX | wc -l` > 0 ) then set OPTION = ' -q64 ' set AROPT = ' -X 64 ' set IPLATF = 4 echo " Preprocessing source files for IBM AIX Platform." ./ibmsources set FILES = `ls *.f` foreach FILE ( $FILES ) ./ibmsources.exe $FILE end /bin/rm ./ibmsources.exe alias f90 xlf set COMP = "xlf" else if ( `uname -a | grep Linux | wc -l` > 0 ) then if ( -X gfortran ) then alias f90 gfortran ; set COMP = "gfortran" set OPTION = \ ' -ffixed-line-length-132 -fconvert=big-endian -w -Wno-tabs -O2' # set NOLTIME = 'true' else if ( -X ifort ) then alias f90 ifort ; set COMP = "ifort" set OPTION = ' -O2 -extend-source -convert big_endian' else if ( -X pgf90 ) then alias f90 pgf90 ; set COMP = "pgf90" set OPTION = ' -silent -Mextend -byteswapio ' endif set IPLATF = 5 else echo " Unknown HW/SW Platform. Exiting ..." exit endif # Alla ricerca delle ncarlib set NCARLIB = ' ' foreach JDIR ( /usr/lib /usr/local/lib /usr/local/ncarg /usr/local/ncarg/lib \ $HOME/../verdecch/ncarg/lib/ $HOME/ncarg $HOME/ncarg/lib \ ./ncarg ./ncarg/lib ) if ( -f $JDIR/libncarg.a ) then set NCARLIB = " -L$JDIR -lncarg -lncarg_gks -lncarg_c " setenv NCARG_ROOT $JDIR endif end # Alla ricerca delle mvlib set MVLIB = " " if ( -f /usr/local/lib/libmv.a ) set MVLIB = " -L/usr/local/lib -lmvgraf -lncaruti -lmv" if ( -f ./libmv.a ) set MVLIB = " -L. -lmvgraf -lncaruti -lmv" if ( -f /usr/local/ncarg/lib/libmv.a ) set MVLIB = " -L/usr/local/ncarg/lib -lmvgraf -lncaruti -lmv" if ( -f $HOME/../verdecch//mvlib/lib/$IPLATF/libmv.a ) set MVLIB = " -L$HOME/../verdecch//mvlib/lib/$IPLATF/ -lmvgraf -lncaruti -lmv" if ( -f $HOME/mvlib/lib/$IPLATF/libmv.a ) set MVLIB = " -L$HOME/mvlib/lib/$IPLATF/ -lmvgraf -lncaruti -lmv" if ( -f ./libchym.a ) set MVLIB = " -L. -lchym " set JETNET = ' ' foreach JDIR ( $HOME/../verdecch/mvlib/lib/$IPLATF /usr/local/lib \ /usr/lib $HOME/mvlib/lib/$IPLATF ) if ( -f $JDIR/libjetnet20.a ) set JETNET = " -L$JDIR -ljetnet20" if ( -f $JDIR/jetnet20.a ) set JETNET = " $JDIR/jetnet20.a" end goto retchkplatf