SUBROUTINE SACMAC1

!**** *SACMAC1*  - Save ODB files in configuration NCONF=1.

!     Purpose.
!     --------
!           Save ODB files in configuration NCONF=1

!**   Interface.
!     ----------
!        *CALL* *SACMAC1 (from CNT1)

!        Explicit arguments :
!        --------------------
!        None

!        Implicit arguments :
!        --------------------
!        None

!     Method.
!     -------
!        See documentation

!     Externals.   WRITEOBA  - Write out ODB
!     ----------

!     Reference.
!     ----------
!        ECMWF Research Department documentation of the IFS

!     Author.
!     -------
!        Jean-Noel Thepaut  *ECMWF*

!     Modifications.
!     --------------
!        Original : 92-11-26
!        M.Hamrud : 95-09-25 New CMA format
!        M.Hamrud      01-Oct-2003 CY28 Cleaning
!     ------------------------------------------------------------------

USE PARKIND1  ,ONLY : JPIM     ,JPRB
USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK

USE YOMCT0   , ONLY : LOBS
USE YOMLUN   , ONLY : NULOUT

IMPLICIT NONE

REAL(KIND=JPRB) :: ZF
REAL(KIND=JPRB) :: ZHOOK_HANDLE

#include "evcost.intfb.h"
#include "writeoba.intfb.h"

!     ------------------------------------------------------------------

!*     1.  EVALUATE COST-FUNCTION
!          ----------------------

IF (LHOOK) CALL DR_HOOK('SACMAC1',0,ZHOOK_HANDLE)
CALL EVCOST(ZF)

!     ------------------------------------------------------------------

!*     2.  SAVE ODB.
!          ---------

IF (LOBS) THEN
  WRITE(NULOUT,'('' ** WRITE-OUT OBS.  '')')
  CALL WRITEOBA
ENDIF

!     ------------------------------------------------------------------

IF (LHOOK) CALL DR_HOOK('SACMAC1',1,ZHOOK_HANDLE)
END SUBROUTINE SACMAC1
