Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
# ----- Load modules --------------------------module load netcdf/4.2.1-pgf90module list# ----- Set libraries and includes ------------set libs = "-L ${DYN_TOOLS}/lib"set libs = "${libs} -lcdfio"set libs = "${libs} -lcdfplus"set libs = "${libs} -lipo"set libs = "${libs} -lgm2em"set ncdf_incs = `nc-config --fflags`set ncdf_libs = `nc-config --flibs`# ----- Compile --------------------- ----------cd ${DYN_TOOLS}/inversion/diag/foreach tool ( calc_qgpv check_boundcon difference hydrostatic qvec_analysis )\rm -f ${tool}.o\rm -f ${tool}echo "pgf90 -c ${tool}.f ${ncdf_incs}"pgf90 -c ${tool}.f ${ncdf_incs}echo "pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}"pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}if ( ! -f ${tool} ) thenecho "ERROR: compilation of <tool> failed... exit"exit 1endifendcd ${DYN_TOOLS}/inversion/post/foreach tool ( add2p rotate_lalo )\rm -f ${tool}.o\rm -f ${tool}echo "pgf90 -c ${tool}.f ${ncdf_incs}"pgf90 -c ${tool}.f ${ncdf_incs}echo "pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}"pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}if ( ! -f ${tool} ) thenecho "ERROR: compilation of <tool> failed... exit"exit 1endifendcd ${DYN_TOOLS}/inversion/prep/foreach tool ( coastline cutnetcdf def_anomaly p2z ref_profile rotate_grid z2s )\rm -f ${tool}.o\rm -f ${tool}echo "pgf90 -c ${tool}.f ${ncdf_incs}"pgf90 -c ${tool}.f ${ncdf_incs}echo "pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}"pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}if ( ! -f ${tool} ) thenecho "ERROR: compilation of <tool> failed... exit"exit 1endifendcd ${DYN_TOOLS}/inversion/pvin/foreach tool ( inv_cart prep_iteration pv_to_qgpv z2s )\rm -f ${tool}.o\rm -f ${tool}echo "pgf90 -c ${tool}.f ${ncdf_incs}"pgf90 -c ${tool}.f ${ncdf_incs}echo "pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}"pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}if ( ! -f ${tool} ) thenecho "ERROR: compilation of <tool> failed... exit"exit 1endifendcd ${DYN_TOOLS}/inversion/spec/foreach tool ( modify_anomaly )\rm -f ${tool}.o\rm -f ${tool}echo "pgf90 -c ${tool}.f ${ncdf_incs}"pgf90 -c ${tool}.f ${ncdf_incs}echo "pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}"pgf90 -o ${tool} ${tool}.o ${libs} ${ncdf_libs}if ( ! -f ${tool} ) thenecho "ERROR: compilation of <tool> failed... exit"exit 1endifend# ----- Set <bin> --------------------------------ln -svf ${DYN_TOOLS}/inversion/inversion.sh ${DYN_TOOLS}/bin/inversionchmod og+rx ${DYN_TOOLS}/bin/inversionexit 0