[MITgcm-support] Adding new diagnostics to the code
Martin Losch
Martin.Losch at awi.de
Mon Oct 11 01:53:51 EDT 2021
Hi Zhanghaohao,
it’s fairly straightforward to add your own diagnostics to the code. Within the package of question (in your case pkg/thsice), there’s a file called thsice_diagnostics_init.F, where the diagnostic is defined. There are many examples, so you use a comparable diagnostic as a template (some heat flux variable). Make sure that the “diagCode” is set properly, and that the name you give it has exactly 8 characters (or fill with spaces), eg. ‘SIetop '
In thsice_calc_thickn.F you then call diagnostics_fill with “etop” as an argument. There are some flags to be set, see diagnostics_fill.F for details or find a comparable example, but I think it should be:
IF ( useDiagnostics ) CALL DIAGNOSTICS_FILL( etop, ‘SIetop ', 1,1,2,bi,bj, myThid )
Martin
> On 2. Sep 2021, at 04:12, zhanghaohao0608 <zhanghaohao0608 at 126.com> wrote:
>
> Hi all,
> I would like to get more variables during my experiments, such as the energy needed for bottom melting or top melting during sea ice melting. I would also like to know the value of the ocean-ice heat flux. But these variables are not available in available_diagnostics.log, so I would like to add a new diagnostic to available_diagnostics.log.
> For example, I want to output some additional variables in the diagnostics menu ,such as the local variable 'etop' (energy melted at the top) in the code 'tsice_calc_thickn.F'. What should I do?
> I'm eager to get your help. Thank you!
> Thanks
> Zhanghaohao
>
>
> zhanghaohao0608
> zhanghaohao0608 at 126.com
> 签名由 网易邮箱大师 定制
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1665 bytes
Desc: not available
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20211011/c699d61e/attachment.p7s>
More information about the MITgcm-support
mailing list