--- MITgcm/pkg/seaice/seaice_jacvec.F 2013/04/04 07:02:51 1.5 +++ MITgcm/pkg/seaice/seaice_jacvec.F 2017/05/23 16:24:46 1.8 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/seaice/seaice_jacvec.F,v 1.5 2013/04/04 07:02:51 mlosch Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/seaice/seaice_jacvec.F,v 1.8 2017/05/23 16:24:46 mlosch Exp $ C $Name: $ #include "SEAICE_OPTIONS.h" @@ -69,11 +69,23 @@ _RL epsilon, reps CEOP C Instructions for using TAF or TAMC to generate exact Jacobian times -C vector operations: +C vector operations (if SEAICE_ALLOW_MOM_ADVECTION is defined, the +C file list also needs to include seaice_mom_advection.f, +C mom_calc_hfacz.f, mom_calc_ke.f, mom_calc_relvort3.f, +C mom_vi_u_coriolis.f, mom_vi_u_coriolis_c4.f, mom_vi_u_grad_ke.f, +C mom_vi_v_coriolis.f, mom_vi_v_coriolis_c4.f, mom_vi_v_grad_ke.f +C plus flow information for diagnostics_fill.f: +CCCCCCCADJ SUBROUTINE DIAGNOSTICS_FILL INPUT = 1,2,3,4,5,6,7,8 +CCCCCCCADJ SUBROUTINE DIAGNOSTICS_FILL OUTPUT = +C ) C C 1. make small_f -C 2. cat seaice_calc_residual.f seaice_oceandrag_coeffs.f seaice_calc_strainrates.f seaice_calc_viscosities.f seaice_calc_rhs.f seaice_calc_lhs.f > taf_input.f -C 3. staf -v1 -forward -toplevel seaice_calc_residual -input uIceLoc,viceLoc -output uIceRes,vIceRes taf_input.f +C 2. cat seaice_calc_residual.f seaice_oceandrag_coeffs.f \ +C seaice_bottomdrag_coeffs.f seaice_calc_stressdiv.f \ +C seaice_calc_strainrates.f seaice_calc_viscosities.f \ +C seaice_calc_rhs.f seaice_calc_lhs.f > taf_input.f +C 3. staf -v1 -forward -toplevel seaice_calc_residual \ +C -input uIceLoc,viceLoc -output uIceRes,vIceRes taf_input.f C 4. insert content of taf_input_ftl.f at the end of this file C 5. add the following code and comment out the finite difference code C @@ -81,14 +93,21 @@ C starting with version 2.0): C C 1. make small_f -C 2. staf -forward -toplevel seaice_calc_residual -input uIceLoc,viceLoc -output uIceRes,vIceRes seaice_calc_residual.f seaice_oceandrag_coeffs.f seaice_calc_strainrates.f seaice_calc_viscosities.f seaice_calc_rhs.f seaice_calc_lhs.f -C 3. copy files seaice_*_tl.f to the corresponding seaice_*.f files, +C 2. files="seaice_calc_residual.f seaice_oceandrag_coeffs.f \ +C seaice_bottomdrag_coeffs.f seaice_calc_stressdiv.f \ +C seaice_calc_strainrates.f seaice_calc_viscosities.f \ +C seaice_calc_rhs.f seaice_calc_lhs.f" +C 3. staf -forward -toplevel seaice_calc_residual \ +C -input uIceLoc,viceLoc -output uIceRes,vIceRes $files +C 4. copy files seaice_*_tl.f to the corresponding seaice_*.f files, C e.g. with this bash script: -C for file in `ls seaice_*_tl.f`; do -C nfile=`echo $file | awk -F_ '{printf "%s_%s_%s.f", $1,$2,$3}'`; -C \cp -f $file $nfile +C for file in $files; do +C nfile=`echo $file | awk -F. '{printf "%s_tl.f", $1}'`; +C \cp -f $nfile $file C done -C 4. add the following code, change "call g_seaice_calc_residual" to "call seaice_calc_residual_tl", and comment out the finite difference code +C 5. add the following code, change "call g_seaice_calc_residual" +C to "call seaice_calc_residual_tl", and comment out the finite +C difference code CML _RL g_duIce(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) CML _RL g_dvIce(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) CML _RL g_uIceRes(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)