[MITgcm-devel] SEAICE_FFIELDS.h not good.

Dimitris Menemenlis menemenlis at sbcglobal.net
Sat Aug 5 07:07:14 EDT 2006


Hi Patrick.  The way pkg/seaice behaves is intimately related to EXF_OPTIONS.h. 
  Right now this is done using following lines in SEAICE_OPTIONS.h

#ifdef SEAICE_EXTERNAL_FORCING
#include "EXF_OPTIONS.h"
#endif /* SEAICE_EXTERNAL_FORCING */

There is also a check in seaice_check.F to make sure that

#ifdef SEAICE_EXTERNAL_FORCING
#ifndef ALLOW_EXF
          WRITE(msgBuf,'(A)')
      &        'need to define ALLOW_EXF'
          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
      &        SQUEEZE_RIGHT , myThid )
          STOP 'ABNORMAL END: S/R SEAICE_CHECK'
#else /* ALLOW_EXF */

Is this OK?  Is there a cleaner/preferred way to let pkg/seaice know about 
EXF_OPTIONS.h?

Dimitris


> SEAICE_FFIELDS.h
> now includes a header not related to its package:
> 
> #ifdef SEAICE_EXTERNAL_FORCING
> 
> C--   Define forcing fields outside pkg/seaice.
> #include "exf_fields.h"
> 
> #else /* SEAICE_EXTERNAL_FORCING undefined */
>  
> That's not good, because 
> SEAICE_FFIELDS.h only knows about settings in SEAICE_OPTIONS.h
> (included within the seaice_...F routine),
> but not about settings in EXF_OPTIONS.h
> So exf_fields.h doesn't get properly evaluated.



More information about the MITgcm-devel mailing list