[MITgcm-support] differentiating code_oad with ecco and cal enabled + OpenAd

Suneet Dwivedi suneetdwivedi at gmail.com
Wed Aug 7 16:20:15 EDT 2013


Dear All,

Using the openad, I am able to build the adjoint of the example code given
in /verification/OpenAD/code_oad. But when I try to include the packages
ecco and cal in my model setup, I get the errors like this while compiling
'externalDummies_cb2m_oad.f'

------------------------------------------------------------------------------------
Cannot disable Fortran error message 6535
externalDummies_cb2m_oad.f(344): error #6535: This variable or component
must be of a derived or structure type   [ARRAY]
         array_p = array%v
-------------------^
---------------------------------------------------------------------------
Similar errors are found for many other variables like, CG2D_B, CG2D_X etc
in the same file.

On investigating it further, I found that the openad is not able to convert
the 'real*8' variables like 'ARRAY', SUMPHI, CG2D_B, CG2D_X etc. into
'type(active)' while differentiating. Instead it converts them into
REAL(w2f__8) and this seems to be the main cause of error.

When I hardcode the variables 'ARRAY', SUMPHI, CG2D_B, CG2D_X into
type(active), the externalDummies_cb2m_oad.f compiles fine.

When ecco package is not enabled, no such errors are seen. The problem
occurs only when 'ecco' is enabled alongwith 'cal'.

Please help me resolve this problem. Kindly let me know what changes should
I make in the code to convert 'real*8' variables into 'type(active)' as a
result of differentiation using openad.

Looking forward for your kind reply,

Thanks,

Suneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20130807/59c50587/attachment.htm>


More information about the MITgcm-support mailing list