Subversion Repositories lagranto.ocean

Rev

Blame | Last modification | View Log | Download | RSS feed

# ----- Load modules --------------------------

#module load netcdf/4.3.2
#module list 

set tool = tracal

# ----- Set libraries and includes ------------

set libs   = "${LAGRANTO}/lib/iotra.a"
set libs   = "${libs} -L ${LAGRANTO}/lib"
set libs   = "${libs} -lcdfioplus_ocean_cf"

set ncdf_incs  = `nc-config --fflags`
set ncdf_libs  = `nc-config --flibs`

# ---- Modules ---------------------------------

\rm -f precmod.o precision.mod
echo ${FORTRAN} -c precmod.f90
${FORTRAN} -c precmod.f90

\rm -f stringmod.o strings.mod
echo ${FORTRAN} -c stringmod.f90
${FORTRAN} -c stringmod.f90

\rm -f evalmod.o evaluate.mod
echo ${FORTRAN} -c evalmod.f90
${FORTRAN} -c evalmod.f90

set mods = " evalmod.o precmod.o stringmod.o " 

# ----- Compile --------------------- ----------

\rm -f ${tool}.o
\rm -f ${tool}

echo "${FORTRAN} -c ${tool}.f ${ncdf_incs}"  
      ${FORTRAN} -c ${tool}.f ${ncdf_incs}   
echo "${FORTRAN} -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}"        
      ${FORTRAN} -o ${tool} ${tool}.o ${mods} ${libs} ${ncdf_libs}

if ( ! -f ${tool} ) then
  echo "ERROR: compilation of <tool> failed... exit"
  exit 1
endif

exit 0