[MITgcm-support] sea ice diagnostics

Martin Losch Martin.Losch at awi.de
Wed Sep 14 14:53:41 EDT 2016


Hi Gregory,

as I said before: the programmer has to specify the grid. For the sea ice variables, this is done in seaice_diagnostics_init.F, e.g.

      diagName  = 'SIsigI  '
      diagTitle = 'SEAICE normalized principle stress, component one'
      diagUnits = 'no units        '
      diagCode  = 'SM      M1      '
      CALL DIAGNOSTICS_ADDTOLIST( diagNum,
     I     diagName, diagCode, diagUnits, diagTitle, 0, myThid )

says in diagCode, that SIsigI is a scalar (S) at mass points (C), at the vertical middle of the cell (M), has one level (1). I programmed that, and I probably copied that code from some other variable that is similar in grid location (SIheff?). I realise that SIsigI is not really a scalar, and that it is not at the “middle” of the cell, but since it is only 2D, there is no U or L. (see Dimitris email and documentation for more details). Vector components, eg. SIuice, SIvice have a “mate”, also documented in the online-manual.

Once this is defined the diagnostics_fill call is independent. The code inside diagnostics_fill doesn’t really do anything with diagCode.

How do I know which model variable is at which point of the C-grid? You’ll have to know the discretization. Since stressDivergenceX is used to drive u-momentum, it had better be at a U-point, right? and if you follow the discretization in the code, you’ll see that it is, indeed, discretized appropriately.

Martin

> On 14 Sep 2016, at 20:25, Georgy Manucharayan <gmanuch at caltech.edu> wrote:
> 
> The diagnostics log file does contain codes for the grids on which variables are defined, however I don't understand how it is choosing the grid for the new variables that were manually added.  E.g., I want to output sigma11, 22 which I believe should be defined on a different grid from sigma12; how do I reflect this in my code? Do I need to modify any of the DIAGNOSTICS_FILL parameters to reflect the grid of a variable?
> 
> 
> At the moment I added this code  in seaice_diagnostics_state.F that outputs sigma11/12/22 :
> 
>  _RL sigma11 (1-oLx:sNx+oLx,1-oLy:sNy+oLy)
>  _RL sigma12 (1-oLx:sNx+oLx,1-oLy:sNy+oLy)
>  _RL sigma22 (1-oLx:sNx+oLx,1-oLy:sNy+oLy)
> 
>        DO j=0,sNy
>         DO i=0,sNx
>          eplus = e11(I,J,bi,bj) + e22(I,J,bi,bj)
>          eminus= e11(I,J,bi,bj) - e22(I,J,bi,bj)
>          sigma11(I,J) = zeta(I,J,bi,bj)*eplus + eta(I,J,bi,bj)*eminus
>     &         - 0.5 _d 0 * PRESS(I,J,bi,bj)
>          sigma22(I,J) = zeta(I,J,bi,bj)*eplus - eta(I,J,bi,bj)*eminus
>     &         - 0.5 _d 0 * PRESS(I,J,bi,bj)
>         ENDDO
>        ENDDO
> 
>        DO j=1,sNy+1
>         DO i=1,sNx+1
>          sigma12(I,J) = 2. _d 0 * e12(I,J,bi,bj) * etaZ(I,J,bi,bj)
>         ENDDO
>        ENDDO
> 
>           CALL DIAGNOSTICS_FILL(sigma11,'SIsigma11',0,1,2,bi,bj,myThid)
>           CALL DIAGNOSTICS_FILL(sigma22,'SIsigma22',0,1,2,bi,bj,myThid)
>           CALL DIAGNOSTICS_FILL(sigma12,'SIsigma12',0,1,2,bi,bj,myThid)
> 
> Do I need to change a definition for sigma12 to_RL sigma12 (2-oLx:sNx+oLx,2-oLy:sNy+oLy)  using one indexes higher by 1?
> 
> In general, is there a way to determine the grid of an arbitrary variable in the code, e.g. stressDivergenceX and stressDivergenceY?
> 
> Thanks,
> Georgy




More information about the MITgcm-support mailing list