[MITgcm-support] (no subject)

Martin Losch Martin.Losch at awi.de
Wed Sep 30 04:16:58 EDT 2009


Hi Jeff,

add a diagnostic requires only two code modification: one in  
diagnostics_main_init.F, where you add a CALL DIAGNOSTICS_ADDTOLIST  
(argument list) and a CALL DIAGNOSTICS_FILL where you actually compute  
your diagnostics. You don't need to modify diagnostics_init_early.F at  
all (I dont' even know what it does and I have added may diagnostics  
to them model). For topographic form stress, code for  
diagnostics_main_init.F  could look like this:

       diagName  = 'FORMSTRX'
       diagTitle = 'zonal component of topographic form stress'
       diagUnits = 'N/m^2           '
       diagCode  = 'UU      L1      '
       diagMate  = diagNum + 2
       CALL DIAGNOSTICS_ADDTOLIST( diagNum,
      I   diagName, diagCode, diagUnits, diagTitle, diagMate, myThid )

       diagName  = 'FORMSTRY'
       diagTitle = 'meridional component of topographic form stress'
       diagUnits = 'N/m^2           '
       diagCode  = 'VV      L1      '
       diagMate  = diagNum
       CALL DIAGNOSTICS_ADDTOLIST( diagNum,
      I   diagName, diagCode, diagUnits, diagTitle, diagMate, myThid )

(are the units correct), and that's all you need to do to define the  
diagnostics (I am never sure about the diagCode(9), L means model  
lever -1/2, so it should probably be U = model level +1/2, but then I  
don't understand why oceTAUX/Y has an U). Then you need to compute  
(depth*dp/dx) etc and use diagnostics_fill to store them.

Martin

On Sep 29, 2009, at 6:56 PM, Blundell J.R. wrote:

> I'm trying to add some diagnostics (components of topographic form  
> stress)
> to MITgcm, and I'm a bit confused. The obvious thing to do would  
> seem to
> be to modify diagnostics_init_early.F to define the appropriate  
> cdiag, tdiag,
> etc, (which puts them into the common block "DIAGNOSTICS.h"), and then
> to activate them in diagnostics_main_init.F by appropriate use of
> CALL DIAGNOSTICS_ADDTOLIST (argument list) .
> However, those things needed for argument list, and defined in
> "DIAGNOSTICS.h" aren't visible within diagnostics_main_init.F
> because the common block isn't included. I guess I can fix this by
> including the common block in my personal version of
> diagnostics_main_init.F as well as modifying the ADDTOLIST calls,
> but it would seem easier to just #include "DIAGNOSTICS.h" in the
> standard distribution version. Or am I missing something here?
>
>                                              Jeff Blundell
>
> ======================================================================
> |                    e-mail:  jeff at noc.soton.ac.uk                   |
> |   Jeff Blundell,  Room 256/09  |  Ocean Modelling & Forecasting,   |
> |    phone: +44 [0]23 8059 6201  |  National Oceanography Centre,    |
> |     fax : +44 [0]23 8059 6204  |  Southampton, Empress Dock,       |
> |                                |  SOUTHAMPTON SO14 3ZH, UK.        |
> |               WWW:  http://www.noc.soton.ac.uk/omf/                |
> ======================================================================
>
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list