[MITgcm-support] user-defined diagnostic filled with zeros

Edwards, Erick (LCDR) eledward at nps.edu
Thu Aug 6 11:55:11 EDT 2015


Alexandre,

I had a similar problem in the past.

I found that if the diagName string doesn't have exactly eight characters (including spaces), the model will not fill the diagnostic correctly.  Ensure that 'OMEGAC  ' has eight characters.  It looks like perhaps it does (below), but on the off-chance that this advice would help....

Erick







-----Original Message-----
From: Alexandre Pohl [mailto:alexandre.pohl at lsce.ipsl.fr] 
Sent: Wednesday, August 05, 2015 10:59 AM
To: mitgcm-support at mitgcm.org
Subject: [MITgcm-support] user-defined diagnostic filled with zeros

Dear all,

I am using a coupled configuration of the MITgcm with the pkg/DIC and pkg/diagnostics enabled. I would like to add a new diagnostic to the permanent set of diagnostics of the model: 'omegaC' (computed in 'dic/calcite_saturation.F').

I followed the instructions from the guidebook (http://mitgcm.org/public/r2_manual/latest/online_documents/node269.html):

1] First, I define the new diagnostic in 'dic_diagnostics_init.F' :

      diagName  = 'OMEGAC  '
      diagTitle = 'Calcite Omega   '
      diagUnits = 'dimensionless   '
      diagCode  = 'SMRP    MR      '
      CALL DIAGNOSTICS_ADDTOLIST( diagNum,
     I       diagName, diagCode, diagUnits, diagTitle, 0, myThid )

2] Then, I call the 'DIAGNOSTICS_FILL' routine in 'dic_biotic_forcing.F'.

        CALL DIAGNOSTICS_FILL(SURC   ,'DICTFLX ',0,1 ,2,bi,bj,myThid)    <==== one of pkg/DIC default diagnostics
        CALL DIAGNOSTICS_FILL(omegaC ,'OMEGAC  ',0,Nr,1,bi,bj,myThid)    <==== my new diag
#ifdef ALLOW_O2
        CALL DIAGNOSTICS_FILL(SURO   ,'DICOFLX ',0,1 ,2,bi,bj,myThid)    <==== another pkg/DIC default diagnostic

Compilation succeeds, the model runs and diagnostics are successfully written in the model output mdsio files. The problem is that the newly added diagnostic, OMEGAC, is filled with zeros. I guess that it has something to do with either 'diagCode' from step 1 (which I set to  'SMRP    MR      ' like for DICBIOA, which seemed to be correct after Table 7.1: http://mitgcm.org/public/r2_manual/latest/online_documents/node268.html), or with the bibjFlg from step 2 (which I set to 1 because omegaC is not modified in 'dic_biotic_forcing.F', following instructions given at the top of the same page).

Could anyone tell me what I am doing wrong? 

Thanks!
Alexandre


_______________________________________________
MITgcm-support mailing list
MITgcm-support at mitgcm.org
http://mitgcm.org/mailman/listinfo/mitgcm-support



More information about the MITgcm-support mailing list