[MITgcm-support] Adjoint BOTTOMDRAG_CONTROL, adbottomdragfld : can't get non-zero sensitivity

Chris Wilson cwi at pol.ac.uk
Thu Jul 7 12:13:41 EDT 2011


Hi,

I'm trying to find the sensitivity of free-surface height at a point to particular control variables.  
For many control variables, e.g. velocity, wind stress, eta, this works fine and plausible non-zero sensitivities are found in both the binary and netCDF output (adstate*.nc).

However, when I try to switch on bottom drag as a control variable (ALLOW_BOTTOMDRAG_CONTROL), it seems that I need to add some extra code to get the model to write the that sensitivity to the netCDF file:

i.e. in pkg/autodiff/autodiff_ini_model_io.F, I need to add something like

#ifdef ALLOW_BOTTOMDRAG_CONTROL
      CALL MNC_CW_ADD_VNAME('adbottomdragfld', 'Cen_xy_Hn__-__t',
     .3,4, myThid)
      CALL MNC_CW_ADD_VATTR_TEXT('adbottomdragfld',
     &     'units','[cost]/[N/m^2]', myThid)
      CALL MNC_CW_ADD_VATTR_TEXT('adbottomdragfld','long_name',
     &     'adjoint bottom_drag', myThid)
      CALL MNC_CW_ADD_VATTR_TEXT('adbottomdragfld',
     &     'coordinates','XC YC RC iter', myThid)
#endif


and in pkg/autodiff/addummy_in_stepping.F, I need to add something like

#ifdef ALLOW_BOTTOMDRAG_CONTROL
          CALL MNC_CW_RL_W('D','adstate',0,0,'adbottomdragfld',
     .adbottomdragfld, myThid)      
#endif

-----
This is perhaps an aside from the real issue, that whatever I try I cannot get a non-zero adjoint sensitivity w.r.t. bottom drag, in either the netCDF or binary output.  I include the netCDF aside because I'm reluctant to remove the changes and, if I'm not wrong, they make me question whether other code tweaks might be needed for bottom drag sensitivity to work correctly.

->> Could anyone please recommend a recipe for 

a) switching on this adjoint sensitivity successfully

or 

b) choosing the correct runtime/buildtime flags to make sure the sensitivity is non-zero?


Thanks,

Chris W



More information about the MITgcm-support mailing list