I have done a unformed work about adjoint sensitivity of regional ocean state to initial errors. I set CPP h files like this:
/* OPTIONS associated with tangent linear, representer and adjoint models:*/
/**for ADM_FWD*/
#undef FORWARD_RHS /* use if processing forward right-hand-side terms **/
#undef FORWARD_WRITE /* use if writing out forward solution, basic state **/
#define FORWARD_MIXING /* use if processing forward vertical mixing coefficient **/
#define FORWARD_READ /* use if reading in forward solution, basic state **/
/**for ADM_BACK*/
#define ADM_DRIVER /* use if generic adjoint model driver **/
#define ADJOINT
#define TANGENT
Before starting ADM, a reference state in file ocean_fwd.nc as a result of forward NLM run is necessary. The INPUT of ADM is set to the perturbations at the Ending time between the reference state and NLM results with initial errors. Despite of the successful ADM runs, the results make a confused to me for a long time. The sensitivity or the gradient of cost function to initial errors is strange. They don't gather together and seems messy very much. Besides, the sensitivity of salinity is slway biggest among the ocean state variables. I don't know why this happened.
The attachment shows the output form ocan_adj.nc at NLM start time. Look forward to your kind reply/advice.
Happy modelling!