[MITgcm-devel] cost-funct reset in tutorial_global_oce_biogeo
Jean-Michel Campin
jmc at ocean.mit.edu
Wed Aug 22 16:48:43 EDT 2012
Hi,
I took a look at the AD test tutorial_global_oce_biogeo
where the (reference, not perturbed) cost function is reset
to zero in the output_adm.txt (last time I updated
tutorial_global_oce_biogeo/results/output_adm.txt I had to
edit this file to restore manually the right cost-function value).
My impression is that in the dic S/R that are called from
packages_init_variables.F, and in particular in dic_surfforcing_init.F,
there are few non-linear computations (e.g, initial pH calculation)
which depend on initial ptracer values, so that
TAF decide to add a call to S/R PACKAGES_INIT_VARIABLES (which
calls PTRACERS_INIT_VARIA) in adinitialise_varia, before going
through the ad* calls.
This does not look "wrong": e.g., in many experiments (12/15), I can
find a call to ini_fields in adinitialise_varia, which can be view
as playing similar role for the main code initial computations
as PTRACERS_INIT_VARIA is doing for dic initial computations.
The little issue is that S/R COST_INIT_VARIA is called from
packages_init_variables.F and resets the cost-function that
mitgcmuv_ad reports in STDOUT.
Why did this problem started last March with my modifs in pkg/ptracers:
http://mitgcm.org/pipermail/mitgcm-devel/2012-March/005301.html
is not completely clear (would need some help here)
but it's consistent with a ptracers initialisation dependency.
I see 3 options:
1) do nothing and wait for the problem to fix itself (still annoying
to edit the output_adm.txt - will give up on this next time).
2) move the call to PTRACERS_INIT_VARIA out of packages_init_variables.F
directly into initialise_varia.F (just before the call to
packages_init_variables). This fix the issue, and
adinitialise_varia no longer calls packages_init_variables.
3) move the call to COST_INIT_VARIA out of packages_init_variables.F
directly into initialise_varia.F (just after the call to
packages_init_variables). This fix the issue in a different way
since, in this case, TAF does not put a call to COST_INIT_VARIA in
adinitialise_varia.
I am going to try solution (3), since (1) has already being tried for
some time now, and (2) is potentially only a temporary fix, since other
pkg initial computations might trigger the same recomputation sequence
as does ptracers for dic.
Cheers,
Jean-Michel
More information about the MITgcm-devel
mailing list