[MITgcm-devel] diagnosing adrhoInSitu and adtotPhiHyd

Martin Losch Martin.Losch at awi.de
Thu Nov 28 08:45:55 EST 2024


Hi there,

I found that adrhoInSitu (actually rhoinsitu_ad) and adtotPhiHyd are saved in addummy_in_dynamics.F (called from dynamics_ad).

Is there any confidence that this is at the right place? From looking at do_oceanic_phys_ad (which is called after dynamics_ad), I have the impression that rhoinsitu_ad is still modified, e.g. by dwnslp_calc_flow_ad, salt_plume_calc_depth_ad, grad_sigma_ad, and the routine body itself, and only reset to zero in find_rho_2d_ad after the “if (fluidiswater) then” statement.

To my simple mind, the place where rhoinsitu_ad should be stored is just before “if (fluidiswater) then”, which, of course is within bi/bj loops (so not clear how to do this cleanly).

Any thoughts?

Martin


More information about the MITgcm-devel mailing list