[MITgcm-devel] names and diagnostics

Jean-Michel Campin jmc at ocean.mit.edu
Sun Jan 2 21:25:12 EST 2005


Hi,

I started to add the diagnostics in gmredi & thsice, and realize
that there are already routines and header files that have names
with "diags" or "diagnostics" in it. 
In some cases, this could be confusing, I think.

I decided to rename GMREDI_DIAGS.h to GMREDI_TAVE.h, since
it contains only time-ave arrays and nothing related to pkg/diagnostics. 

But for the S/R, it's not so clear to me if it's worth to rename 
some of them, and how to call the new S/R that are related to
pkg/diagnostics (1 to declare the diagnostics names, title ...
and an other to fill-in the diagnostic array).
If we can agree on a general way to name those S/R (before 
too many pkgs have their own), it would be less confusing with
all the others (old) S/R *diag*.F
for example, in ptracers, we have:
 ptracers_diagnostics_init.F and ptracers_fill_diagnostics.F
 would it be better to have ptracers_init_diagnostics.F instead ?
 (by the way, who choose this name ?)
 and to have all the others pkgs build on the same rule:
 ${pkg}_init_diagnostics.F and ${pkg}_fill_diagnostics.F (if needed)

The other thing is related to the diagnostics of state variables 
and when it's done in the time stepping.
I would rather call diagnostics_fill not at the end of the
time-step but:
- at the beginning if synchronous time-step is used.
- if staggered time-step, at the beginning for some variables
  and after updating uVel,vVel (but always before thermodynamics) 
  for the other state variables.

With synchronous time-step, would be 
a) simpler to connect with physical tendency (since they are generally
 computed explicitly, from state at n): now, even a linear term cannot be 
 exactly estimated from the time average output.
b) simpler to estimate "prime" (or "eddy" part) of any non-linear
 term. e.g., mean(advect_flx(u,T)) - advect_flx(mean(u),mean(T)). 
 because the 1rst part can be diagnose directly when it's computed
 (explicitly) from u^n,T^n, but the time average we have for mean(u)
 and mean(T) are shifted by 1 time-step.
c) easier to check that 
  final_state - initial_state = average_tendency * (t_f - t_i)
  (still the problem of AB, but can be sorted out with G in pickup files)

With staggered time-step, it's more complicated. But even if
all the fill diagnostics were done earlier, just before thermodynamics,
it would be definitively better for the tracers (but still not
perfect for momentum quantities).

Any comment ?

Jean-Michel



More information about the MITgcm-devel mailing list