#!/bin/bash # # $Header: /u/gcmpack/MITgcm/tools/adjoint_options/adjoint_state_final,v 1.17 2013/08/09 18:28:36 jmc Exp $ # $Name: $ # This file is a template for SVD-type calculations # where a vector-valued cost function (-dependent) is used, # representing the final state (e.g. theta, salt or SST, SSS) # Also, the ARPACK library is included via LIBS=-larpack # heimbach@mit.edu # TAMC=/data43/ralf/tamc/tamc # TAF=~fastopt/bin/taf # STAF=staf TAF=staf TAMC=tamc LIBS="${LIBS} -larpack" AD_TAMC_FLAGS="-reverse -admark ad -i4 -r4 -l tamc_ad.log $AD_TAMC_FLAGS" FTL_TAMC_FLAGS="-forward -ftlmark g_ -i4 -r4 -l tamc_ftl.log $FTL_TAMC_FLAGS" SVD_TAMC_FLAGS="-reverse -forward -pure -i4 -r4 -l tamc_svd.log $SVD_TAMC_FLAGS" AD_TAF_FLAGS="-reverse -i4 -r4 -intrinsic system,flush -l taf_ad.log $AD_TAF_FLAGS" FTL_TAF_FLAGS="-forward -i4 -r4 -intrinsic system,flush -l taf_ftl.log $FTL_TAF_FLAGS" SVD_TAF_FLAGS="-reverse -forward -pure -i4 -r4 -intrinsic system,flush -l taf_svd.log $SVD_TAF_FLAGS" #- in case we need to show some MPI code to TAF: #if test "x$MPI" != x ; then # AD_TAF_FLAGS="$AD_TAF_FLAGS"' -mpi -include $(LOCAL_MPI_HEADERS) -I./mpi_headers/' # FLT_TAF_FLAGS="$FLT_TAF_FLAGS"' -mpi -include $(LOCAL_MPI_HEADERS) -I./mpi_headers/' # SVD_TAF_FLAGS="$SVD_TAF_FLAGS"' -mpi -include $(LOCAL_MPI_HEADERS) -I./mpi_headers/' #fi DIFF_FLAGS="-toplevel 'the_main_loop' \ -input 'xx_theta_dummy \ xx_salt_dummy \ xx_tr1_dummy \ xx_hflux_dummy \ xx_sflux_dummy \ xx_tauu_dummy \ xx_tauv_dummy \ xx_atemp_dummy \ xx_aqh_dummy \ xx_precip_dummy \ xx_swflux_dummy \ xx_swdown_dummy \ xx_lwflux_dummy \ xx_lwdown_dummy \ xx_evap_dummy \ xx_snowprecip_dummy \ xx_apressure_dummy \ xx_runoff_dummy \ xx_uwind_dummy \ xx_vwind_dummy \ xx_obcsn_dummy \ xx_obcss_dummy \ xx_obcsw_dummy \ xx_obcse_dummy \ xx_sst_dummy \ xx_sss_dummy \ xx_depth_dummy \ xx_diffkr_dummy \ xx_kapgm_dummy \ xx_kapredi_dummy \ xx_bottomdrag_dummy \ xx_efluxy_dummy \ xx_efluxp_dummy \ xx_edtaux_dummy \ xx_edtauy_dummy \ xx_uvel_dummy \ xx_vvel_dummy \ xx_etan_dummy \ xx_gen2d_dummy \ xx_gen3d_dummy \ xx_genarr2d_dummy \ xx_genarr3d_dummy \ xx_gentim2d_dummy \ xx_siarea_dummy \ xx_siheff_dummy \ xx_sihsnow_dummy \ xx_shifwflx_dummy \ xx_relaxsst_dummy \ xx_relaxsss_dummy \ xx_atemp_mean_dummy \ xx_aqh_mean_dummy \ xx_precip_mean_dummy \ xx_swdown_mean_dummy \ xx_uwind_mean_dummy \ xx_vwind_mean_dummy' \ -output 'objf_state_final'" AD_TAMC_FLAGS="$AD_TAMC_FLAGS $DIFF_FLAGS" AD_TAF_FLAGS="$AD_TAF_FLAGS $DIFF_FLAGS" FTL_TAMC_FLAGS="$FTL_TAMC_FLAGS $DIFF_FLAGS" FTL_TAF_FLAGS="$FTL_TAF_FLAGS $DIFF_FLAGS" SVD_TAMC_FLAGS="$SVD_TAMC_FLAGS $DIFF_FLAGS" SVD_TAF_FLAGS="$SVD_TAF_FLAGS $DIFF_FLAGS"