[MITgcm-support] user-defined diagnostic filled with zeros
Martin Losch
Martin.Losch at awi.de
Fri Aug 7 03:06:14 EDT 2015
Hi Alex,
Erick is right, that you have to be very careful about the 8 characters, also in the data.diagnostics file
Your code look OK to me. The diagCode should not affect the numbers that are written to the file, just the association with coordinates etc, so even if that’s wrong, it would be the reason for your problem. Check the “STDOUT” so see, if the diagnostic is filled. If there are messages about the diagnostics to be written just containing zeros or so, this means that there is a problem with the way you call diagnostics_fill (but I don’t see anything suspicion), the other issue I can think of is this: are you sure that the field omegaC is actually non-zero when you call diagnostics_fill? I would try to put the call into the routine, where omegaC is computed (i.e. calcite_saturation.F)
Martin
> On 06 Aug 2015, at 17:55, Edwards, Erick (LCDR) <eledward at nps.edu> wrote:
>
> 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
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list