[MITgcm-devel] changes in kpp_calc_diff

Jean-Michel Campin jmc at ocean.mit.edu
Tue Sep 18 17:32:43 EDT 2007


Hi Dimitris and Patrick,

I have 2 remarks, one for each:

the comment which describes the changes made in kpp_calc_diff_s & _t.F
on April 23, 2007:
> o bug fixes for vertical diffusivity computations when both KPP and
>     3D diffusivity arrays are used.
does not tell that those S/R are no longer updating the vertical
diffusivity array (passed as argument) but are (re-) setting those
arrays.
Also, there are (few) comments in the S/R kpp_calc_diff_s & _t.F
and  calc_3d_diffusivity.F calc_diffusivity.F ptracers_calc_diff.F
which were "accurate" before, but no longer now.
(e.g.: C--   Add physical pacakge contributions:
 should move after CALL KPP_CALC_DIFF_T/S)
Could you update the comments in those S/R (including
changing the 6th character continuation line, from "U" for "Update"
to "O" for "Output", in front of the arguments KappaR* in those
S/R & S/R calls) ?
And at the same time, it could be a good idea to fix calc_diffusivity.F
and ptracers_calc_diff.F (wrong order call sequence of GMREDI_CALC_DIFF
& KPP_CALC_DIFF_S, since now the order matter).

And for Patrick, a suggestion:
If ALLOW_3D_DIFFKR was defined (and can check that it's the case,
with a stop if not) when ALLOW_AUTODIFF_TAMC & ALLOW_DIFFKR_CONTROL
are used, we could replace those (ugly) lines:
> #if (defined ALLOW_3D_DIFFKR || \
>      (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL)))
by just:
> #ifdef ALLOW_3D_DIFFKR
so that even this (famous) sequence (in calc_3d_diffusivity.F):
> #if (defined ALLOW_PTRACERS && ! (defined ALLOW_3D_DIFFKR || \
>     (defined (ALLOW_AUTODIFF_TAMC) && defined (ALLOW_DIFFKR_CONTROL))))
would be "understandable"
>From what I see in the code, ALLOW_3D_DIFFKR always goes with the 2 others
so it should be OK.

Thanks,
Jean-Michel



More information about the MITgcm-devel mailing list