! This automatically generated Fortran wrapper file allows codes
! written in Fortran to be called directly from C and translates all
! C-style arguments into expected Fortran-style arguments (with
! assumed size, local type declarations, etc.).


MODULE C_MATRIX_OPERATIONS
USE ISO_FORTRAN_ENV , ONLY : RT => REAL32
  IMPLICIT NONE


CONTAINS


  
  SUBROUTINE C_GEMM(OP_A, OP_B, OUT_ROWS, OUT_COLS, INNER_DIM, AB_MULT, A_DIM_1, A_DIM_2, A, A_ROWS, B_DIM_1, B_DIM_2, B, B_ROWS, C&
&_MULT, C_DIM_1, C_DIM_2, C, C_ROWS) BIND(C)
    USE MATRIX_OPERATIONS, ONLY: GEMM
    IMPLICIT NONE
    CHARACTER, INTENT(IN) :: OP_A
    CHARACTER, INTENT(IN) :: OP_B
    INTEGER, INTENT(IN) :: OUT_ROWS
    INTEGER, INTENT(IN) :: OUT_COLS
    INTEGER, INTENT(IN) :: INNER_DIM
    REAL(KIND=RT), INTENT(IN) :: AB_MULT
    INTEGER, INTENT(IN) :: A_DIM_1
    INTEGER, INTENT(IN) :: A_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(A_DIM_1,A_DIM_2) :: A
    INTEGER, INTENT(IN) :: A_ROWS
    INTEGER, INTENT(IN) :: B_DIM_1
    INTEGER, INTENT(IN) :: B_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(B_DIM_1,B_DIM_2) :: B
    INTEGER, INTENT(IN) :: B_ROWS
    REAL(KIND=RT), INTENT(IN) :: C_MULT
    INTEGER, INTENT(IN) :: C_DIM_1
    INTEGER, INTENT(IN) :: C_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(C_DIM_1,C_DIM_2) :: C
    INTEGER, INTENT(IN) :: C_ROWS
  
    CALL GEMM(OP_A, OP_B, OUT_ROWS, OUT_COLS, INNER_DIM, AB_MULT, A, A_ROWS, B, B_ROWS, C_MULT, C, C_ROWS)
  END SUBROUTINE C_GEMM
  

  
  SUBROUTINE C_ORTHONORMALIZE(A_DIM_1, A_DIM_2, A) BIND(C)
    USE MATRIX_OPERATIONS, ONLY: ORTHONORMALIZE
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: A_DIM_1
    INTEGER, INTENT(IN) :: A_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(A_DIM_1,A_DIM_2) :: A
  
    CALL ORTHONORMALIZE(A)
  END SUBROUTINE C_ORTHONORMALIZE
  

  
  SUBROUTINE C_RANDOM_UNIT_VECTORS(COLUMN_VECTORS_DIM_1, COLUMN_VECTORS_DIM_2, COLUMN_VECTORS) BIND(C)
    USE MATRIX_OPERATIONS, ONLY: RANDOM_UNIT_VECTORS
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: COLUMN_VECTORS_DIM_1
    INTEGER, INTENT(IN) :: COLUMN_VECTORS_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(COLUMN_VECTORS_DIM_1,COLUMN_VECTORS_DIM_2) :: COLUMN_VECTORS
  
    CALL RANDOM_UNIT_VECTORS(COLUMN_VECTORS)
  END SUBROUTINE C_RANDOM_UNIT_VECTORS
  
END MODULE C_MATRIX_OPERATIONS


MODULE C_APOS
USE ISO_FORTRAN_ENV , ONLY : RT => REAL32
USE MATRIX_OPERATIONS , ONLY : GEMM , ORTHONORMALIZE , RANDOM_UNIT_VECTORS
  IMPLICIT NONE


  INTERFACE
    FUNCTION OMP_GET_MAX_THREADS()
      INTEGER :: OMP_GET_MAX_THREADS
    END FUNCTION OMP_GET_MAX_THREADS
  END INTERFACE

CONTAINS


  
  SUBROUTINE C_NEW_MODEL_CONFIG(MDI, MDO, MDS_PRESENT, MDS, MNS_PRESENT, MNS, MNE_PRESENT, MNE, MDE_PRESENT, MDE, ADI, ADO_PRESENT,&
& ADO, ADS_PRESENT, ADS, ANS_PRESENT, ANS, ANE_PRESENT, ANE, ADE_PRESENT, ADE, NUM_THREADS_PRESENT, NUM_THREADS, CONFIG) BIND(C)
    USE APOS, ONLY: NEW_MODEL_CONFIG
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: MDI
    INTEGER, INTENT(IN) :: MDO
    LOGICAL, INTENT(IN) :: MDS_PRESENT
    INTEGER, INTENT(IN) :: MDS
    LOGICAL, INTENT(IN) :: MNS_PRESENT
    INTEGER, INTENT(IN) :: MNS
    LOGICAL, INTENT(IN) :: MNE_PRESENT
    INTEGER, INTENT(IN) :: MNE
    LOGICAL, INTENT(IN) :: MDE_PRESENT
    INTEGER, INTENT(IN) :: MDE
    INTEGER, INTENT(IN) :: ADI
    LOGICAL, INTENT(IN) :: ADO_PRESENT
    INTEGER, INTENT(IN) :: ADO
    LOGICAL, INTENT(IN) :: ADS_PRESENT
    INTEGER, INTENT(IN) :: ADS
    LOGICAL, INTENT(IN) :: ANS_PRESENT
    INTEGER, INTENT(IN) :: ANS
    LOGICAL, INTENT(IN) :: ANE_PRESENT
    INTEGER, INTENT(IN) :: ANE
    LOGICAL, INTENT(IN) :: ADE_PRESENT
    INTEGER, INTENT(IN) :: ADE
    LOGICAL, INTENT(IN) :: NUM_THREADS_PRESENT
    INTEGER, INTENT(IN) :: NUM_THREADS
    TYPE(MODEL_CONFIG), INTENT(OUT) :: CONFIG
  
    IF (MDS_PRESENT) THEN
      IF (MNS_PRESENT) THEN
        IF (MNE_PRESENT) THEN
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO&
&)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        END IF
      ELSE
        IF (MNE_PRESENT) THEN
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        END IF
      END IF
    ELSE
      IF (MNS_PRESENT) THEN
        IF (MNE_PRESENT) THEN
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNS=MNS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        END IF
      ELSE
        IF (MNE_PRESENT) THEN
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MNE=MNE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (MDE_PRESENT) THEN
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, MDE=MDE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADO_PRESENT) THEN
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (ADS_PRESENT) THEN
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (ANS_PRESENT) THEN
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANS=ANS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (ANE_PRESENT) THEN
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANE=ANE, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ANE=ANE)
                      END IF
                    END IF
                  ELSE
                    IF (ADE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, ADE=ADE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(MDI=MDI, MDO=MDO, ADI=ADI, CONFIG=CONFIG)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        END IF
      END IF
    END IF
  END SUBROUTINE C_NEW_MODEL_CONFIG
  

  
  SUBROUTINE C_INIT_MODEL(CONFIG, MODEL_DIM_1, MODEL, SEED_PRESENT, SEED) BIND(C)
    USE APOS, ONLY: INIT_MODEL
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    TYPE(MODEL_CONFIG), INTENT(IN) :: CONFIG
    INTEGER, INTENT(IN) :: MODEL_DIM_1
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(MODEL_DIM_1) :: MODEL
    LOGICAL, INTENT(IN) :: SEED_PRESENT
    INTEGER, INTENT(IN) :: SEED
  
    IF (SEED_PRESENT) THEN
      CALL INIT_MODEL(CONFIG=CONFIG, MODEL=MODEL, SEED=SEED)
    ELSE
      CALL INIT_MODEL(CONFIG=CONFIG, MODEL=MODEL)
    END IF
  END SUBROUTINE C_INIT_MODEL
  

  
  SUBROUTINE C_CHECK_SHAPE(CONFIG, MODEL_DIM_1, MODEL, Y_DIM_1, Y_DIM_2, Y, X_DIM_1, X_DIM_2, X, XI_DIM_1, XI_DIM_2, XI, AX_DIM_1, &
&AX_DIM_2, AX, AXI_DIM_1, AXI_DIM_2, AXI, SIZES_DIM_1, SIZES, INFO) BIND(C)
    USE APOS, ONLY: CHECK_SHAPE
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    TYPE(MODEL_CONFIG), INTENT(IN) :: CONFIG
    INTEGER, INTENT(IN) :: MODEL_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(MODEL_DIM_1) :: MODEL
    INTEGER, INTENT(IN) :: Y_DIM_1
    INTEGER, INTENT(IN) :: Y_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(Y_DIM_1,Y_DIM_2) :: Y
    INTEGER, INTENT(IN) :: X_DIM_1
    INTEGER, INTENT(IN) :: X_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(X_DIM_1,X_DIM_2) :: X
    INTEGER, INTENT(IN) :: XI_DIM_1
    INTEGER, INTENT(IN) :: XI_DIM_2
    INTEGER, INTENT(IN), DIMENSION(XI_DIM_1,XI_DIM_2) :: XI
    INTEGER, INTENT(IN) :: AX_DIM_1
    INTEGER, INTENT(IN) :: AX_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(AX_DIM_1,AX_DIM_2) :: AX
    INTEGER, INTENT(IN) :: AXI_DIM_1
    INTEGER, INTENT(IN) :: AXI_DIM_2
    INTEGER, INTENT(IN), DIMENSION(AXI_DIM_1,AXI_DIM_2) :: AXI
    INTEGER, INTENT(IN) :: SIZES_DIM_1
    INTEGER, INTENT(IN), DIMENSION(SIZES_DIM_1) :: SIZES
    INTEGER, INTENT(OUT) :: INFO
  
    CALL CHECK_SHAPE(CONFIG, MODEL, Y, X, XI, AX, AXI, SIZES, INFO)
  END SUBROUTINE C_CHECK_SHAPE
  

  
  SUBROUTINE C_EMBED(CONFIG, MODEL_DIM_1, MODEL, X_DIM_1, X_DIM_2, X, XI_DIM_1, XI_DIM_2, XI, AX_DIM_1, AX_DIM_2, AX, AXI_DIM_1, AX&
&I_DIM_2, AXI, XXI_DIM_1, XXI_DIM_2, XXI, AXXI_DIM_1, AXXI_DIM_2, AXXI) BIND(C)
    USE APOS, ONLY: EMBED
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    TYPE(MODEL_CONFIG), INTENT(IN) :: CONFIG
    INTEGER, INTENT(IN) :: MODEL_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(MODEL_DIM_1) :: MODEL
    INTEGER, INTENT(IN) :: X_DIM_1
    INTEGER, INTENT(IN) :: X_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(X_DIM_1,X_DIM_2) :: X
    INTEGER, INTENT(IN) :: XI_DIM_1
    INTEGER, INTENT(IN) :: XI_DIM_2
    INTEGER, INTENT(IN), DIMENSION(XI_DIM_1,XI_DIM_2) :: XI
    INTEGER, INTENT(IN) :: AX_DIM_1
    INTEGER, INTENT(IN) :: AX_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(AX_DIM_1,AX_DIM_2) :: AX
    INTEGER, INTENT(IN) :: AXI_DIM_1
    INTEGER, INTENT(IN) :: AXI_DIM_2
    INTEGER, INTENT(IN), DIMENSION(AXI_DIM_1,AXI_DIM_2) :: AXI
    INTEGER, INTENT(IN) :: XXI_DIM_1
    INTEGER, INTENT(IN) :: XXI_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(XXI_DIM_1,XXI_DIM_2) :: XXI
    INTEGER, INTENT(IN) :: AXXI_DIM_1
    INTEGER, INTENT(IN) :: AXXI_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(AXXI_DIM_1,AXXI_DIM_2) :: AXXI
  
    CALL EMBED(CONFIG, MODEL, X, XI, AX, AXI, XXI, AXXI)
  END SUBROUTINE C_EMBED
  

  
  SUBROUTINE C_COMPUTE_BATCHES(NUM_BATCHES, X_DIM_1, X_DIM_2, X, AX_DIM_1, AX_DIM_2, AX, SIZES_DIM_1, SIZES, BATCHA_DIM_1, BATCHA_D&
&IM_2, BATCHA, BATCHM_DIM_1, BATCHM_DIM_2, BATCHM, INFO) BIND(C)
    USE APOS, ONLY: COMPUTE_BATCHES
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: NUM_BATCHES
    INTEGER, INTENT(IN) :: X_DIM_1
    INTEGER, INTENT(IN) :: X_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(X_DIM_1,X_DIM_2) :: X
    INTEGER, INTENT(IN) :: AX_DIM_1
    INTEGER, INTENT(IN) :: AX_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(AX_DIM_1,AX_DIM_2) :: AX
    INTEGER, INTENT(IN) :: SIZES_DIM_1
    INTEGER, INTENT(IN), DIMENSION(SIZES_DIM_1) :: SIZES
    INTEGER, INTENT(IN) :: BATCHA_DIM_1
    INTEGER, INTENT(IN) :: BATCHA_DIM_2
    INTEGER, INTENT(OUT), DIMENSION(BATCHA_DIM_1,BATCHA_DIM_2) :: BATCHA
    INTEGER, INTENT(IN) :: BATCHM_DIM_1
    INTEGER, INTENT(IN) :: BATCHM_DIM_2
    INTEGER, INTENT(OUT), DIMENSION(BATCHM_DIM_1,BATCHM_DIM_2) :: BATCHM
    INTEGER, INTENT(INOUT) :: INFO
  
    CALL COMPUTE_BATCHES(NUM_BATCHES, X, AX, SIZES, BATCHA, BATCHM, INFO)
  END SUBROUTINE C_COMPUTE_BATCHES
  

  
  SUBROUTINE C_EVALUATE(CONFIG, MODEL_DIM_1, MODEL, Y_DIM_1, Y_DIM_2, Y, X_DIM_1, X_DIM_2, X, AX_DIM_1, AX_DIM_2, AX, SIZES_DIM_1, &
&SIZES, M_STATES_DIM_1, M_STATES_DIM_2, M_STATES_DIM_3, M_STATES, A_STATES_DIM_1, A_STATES_DIM_2, A_STATES_DIM_3, A_STATES, AY_DIM_&
&1, AY_DIM_2, AY, INFO, SHIFT_PRESENT, SHIFT, THREADS_PRESENT, THREADS) BIND(C)
    USE APOS, ONLY: EVALUATE
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    TYPE(MODEL_CONFIG), INTENT(IN) :: CONFIG
    INTEGER, INTENT(IN) :: MODEL_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(MODEL_DIM_1) :: MODEL
    INTEGER, INTENT(IN) :: Y_DIM_1
    INTEGER, INTENT(IN) :: Y_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(Y_DIM_1,Y_DIM_2) :: Y
    INTEGER, INTENT(IN) :: X_DIM_1
    INTEGER, INTENT(IN) :: X_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(X_DIM_1,X_DIM_2) :: X
    INTEGER, INTENT(IN) :: AX_DIM_1
    INTEGER, INTENT(IN) :: AX_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(AX_DIM_1,AX_DIM_2) :: AX
    INTEGER, INTENT(IN) :: SIZES_DIM_1
    INTEGER, INTENT(IN), DIMENSION(SIZES_DIM_1) :: SIZES
    INTEGER, INTENT(IN) :: M_STATES_DIM_1
    INTEGER, INTENT(IN) :: M_STATES_DIM_2
    INTEGER, INTENT(IN) :: M_STATES_DIM_3
    REAL(KIND=RT), INTENT(OUT), DIMENSION(M_STATES_DIM_1,M_STATES_DIM_2,M_STATES_DIM_3) :: M_STATES
    INTEGER, INTENT(IN) :: A_STATES_DIM_1
    INTEGER, INTENT(IN) :: A_STATES_DIM_2
    INTEGER, INTENT(IN) :: A_STATES_DIM_3
    REAL(KIND=RT), INTENT(OUT), DIMENSION(A_STATES_DIM_1,A_STATES_DIM_2,A_STATES_DIM_3) :: A_STATES
    INTEGER, INTENT(IN) :: AY_DIM_1
    INTEGER, INTENT(IN) :: AY_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(AY_DIM_1,AY_DIM_2) :: AY
    INTEGER, INTENT(INOUT) :: INFO
    LOGICAL, INTENT(IN) :: SHIFT_PRESENT
    LOGICAL, INTENT(IN) :: SHIFT
    LOGICAL, INTENT(IN) :: THREADS_PRESENT
    INTEGER, INTENT(IN) :: THREADS
  
    IF (SHIFT_PRESENT) THEN
      IF (THREADS_PRESENT) THEN
        CALL EVALUATE(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, AX=AX, SIZES=SIZES, M_STATES=M_STATES, A_STATES=A_STATES, AY=AY, INFO=I&
&NFO, SHIFT=SHIFT, THREADS=THREADS)
      ELSE
        CALL EVALUATE(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, AX=AX, SIZES=SIZES, M_STATES=M_STATES, A_STATES=A_STATES, AY=AY, INFO=I&
&NFO, SHIFT=SHIFT)
      END IF
    ELSE
      IF (THREADS_PRESENT) THEN
        CALL EVALUATE(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, AX=AX, SIZES=SIZES, M_STATES=M_STATES, A_STATES=A_STATES, AY=AY, INFO=I&
&NFO, THREADS=THREADS)
      ELSE
        CALL EVALUATE(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, AX=AX, SIZES=SIZES, M_STATES=M_STATES, A_STATES=A_STATES, AY=AY, INFO=I&
&NFO)
      END IF
    END IF
  END SUBROUTINE C_EVALUATE
  

  
  SUBROUTINE C_BASIS_GRADIENT(CONFIG, MODEL_DIM_1, MODEL, Y_DIM_1, Y_DIM_2, Y, X_DIM_1, X_DIM_2, X, AX_DIM_1, AX_DIM_2, AX, SIZES_D&
&IM_1, SIZES, M_STATES_DIM_1, M_STATES_DIM_2, M_STATES_DIM_3, M_STATES, A_STATES_DIM_1, A_STATES_DIM_2, A_STATES_DIM_3, A_STATES, A&
&Y_DIM_1, AY_DIM_2, AY, GRAD_DIM_1, GRAD, SKIP_EMBEDDINGS_PRESENT, SKIP_EMBEDDINGS) BIND(C)
    USE APOS, ONLY: BASIS_GRADIENT
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    TYPE(MODEL_CONFIG), INTENT(IN) :: CONFIG
    INTEGER, INTENT(IN) :: MODEL_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(MODEL_DIM_1) :: MODEL
    INTEGER, INTENT(IN) :: Y_DIM_1
    INTEGER, INTENT(IN) :: Y_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(Y_DIM_1,Y_DIM_2) :: Y
    INTEGER, INTENT(IN) :: X_DIM_1
    INTEGER, INTENT(IN) :: X_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(X_DIM_1,X_DIM_2) :: X
    INTEGER, INTENT(IN) :: AX_DIM_1
    INTEGER, INTENT(IN) :: AX_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(AX_DIM_1,AX_DIM_2) :: AX
    INTEGER, INTENT(IN) :: SIZES_DIM_1
    INTEGER, INTENT(IN), DIMENSION(SIZES_DIM_1) :: SIZES
    INTEGER, INTENT(IN) :: M_STATES_DIM_1
    INTEGER, INTENT(IN) :: M_STATES_DIM_2
    INTEGER, INTENT(IN) :: M_STATES_DIM_3
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(M_STATES_DIM_1,M_STATES_DIM_2,M_STATES_DIM_3) :: M_STATES
    INTEGER, INTENT(IN) :: A_STATES_DIM_1
    INTEGER, INTENT(IN) :: A_STATES_DIM_2
    INTEGER, INTENT(IN) :: A_STATES_DIM_3
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(A_STATES_DIM_1,A_STATES_DIM_2,A_STATES_DIM_3) :: A_STATES
    INTEGER, INTENT(IN) :: AY_DIM_1
    INTEGER, INTENT(IN) :: AY_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(AY_DIM_1,AY_DIM_2) :: AY
    INTEGER, INTENT(IN) :: GRAD_DIM_1
    REAL(KIND=RT), INTENT(OUT), DIMENSION(GRAD_DIM_1) :: GRAD
    LOGICAL, INTENT(IN) :: SKIP_EMBEDDINGS_PRESENT
    LOGICAL, INTENT(IN) :: SKIP_EMBEDDINGS
  
    IF (SKIP_EMBEDDINGS_PRESENT) THEN
      CALL BASIS_GRADIENT(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, AX=AX, SIZES=SIZES, M_STATES=M_STATES, A_STATES=A_STATES, AY=AY, GR&
&AD=GRAD, SKIP_EMBEDDINGS=SKIP_EMBEDDINGS)
    ELSE
      CALL BASIS_GRADIENT(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, AX=AX, SIZES=SIZES, M_STATES=M_STATES, A_STATES=A_STATES, AY=AY, GR&
&AD=GRAD)
    END IF
  END SUBROUTINE C_BASIS_GRADIENT
  

  
  SUBROUTINE C_EMBEDDING_GRADIENT(MDE, MNE, INT_INPUTS_DIM_1, INT_INPUTS_DIM_2, INT_INPUTS, GRAD_DIM_1, GRAD_DIM_2, GRAD, EMBEDDING&
&_GRAD_DIM_1, EMBEDDING_GRAD_DIM_2, EMBEDDING_GRAD) BIND(C)
    USE APOS, ONLY: EMBEDDING_GRADIENT
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: MDE
    INTEGER, INTENT(IN) :: MNE
    INTEGER, INTENT(IN) :: INT_INPUTS_DIM_1
    INTEGER, INTENT(IN) :: INT_INPUTS_DIM_2
    INTEGER, INTENT(IN), DIMENSION(INT_INPUTS_DIM_1,INT_INPUTS_DIM_2) :: INT_INPUTS
    INTEGER, INTENT(IN) :: GRAD_DIM_1
    INTEGER, INTENT(IN) :: GRAD_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(GRAD_DIM_1,GRAD_DIM_2) :: GRAD
    INTEGER, INTENT(IN) :: EMBEDDING_GRAD_DIM_1
    INTEGER, INTENT(IN) :: EMBEDDING_GRAD_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(EMBEDDING_GRAD_DIM_1,EMBEDDING_GRAD_DIM_2) :: EMBEDDING_GRAD
  
    CALL EMBEDDING_GRADIENT(MDE, MNE, INT_INPUTS, GRAD, EMBEDDING_GRAD)
  END SUBROUTINE C_EMBEDDING_GRADIENT
  

  
  SUBROUTINE C_SQUARED_ERROR_GRADIENT(TARGETS_DIM_1, TARGETS_DIM_2, TARGETS, OUTPUTS_DIM_1, OUTPUTS_DIM_2, OUTPUTS) BIND(C)
    USE APOS, ONLY: SQUARED_ERROR_GRADIENT
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: TARGETS_DIM_1
    INTEGER, INTENT(IN) :: TARGETS_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(TARGETS_DIM_1,TARGETS_DIM_2) :: TARGETS
    INTEGER, INTENT(IN) :: OUTPUTS_DIM_1
    INTEGER, INTENT(IN) :: OUTPUTS_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(OUTPUTS_DIM_1,OUTPUTS_DIM_2) :: OUTPUTS
  
    CALL SQUARED_ERROR_GRADIENT(TARGETS, OUTPUTS)
  END SUBROUTINE C_SQUARED_ERROR_GRADIENT
  

  
  SUBROUTINE C_TRUE_VALUE_GRADIENT(TARGETS_DIM_1, TARGETS_DIM_2, TARGETS, OUTPUTS_DIM_1, OUTPUTS_DIM_2, OUTPUTS) BIND(C)
    USE APOS, ONLY: TRUE_VALUE_GRADIENT
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: TARGETS_DIM_1
    INTEGER, INTENT(IN) :: TARGETS_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(TARGETS_DIM_1,TARGETS_DIM_2) :: TARGETS
    INTEGER, INTENT(IN) :: OUTPUTS_DIM_1
    INTEGER, INTENT(IN) :: OUTPUTS_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(OUTPUTS_DIM_1,OUTPUTS_DIM_2) :: OUTPUTS
  
    CALL TRUE_VALUE_GRADIENT(TARGETS, OUTPUTS)
  END SUBROUTINE C_TRUE_VALUE_GRADIENT
  

  
  SUBROUTINE C_MINIMIZE_MSE(CONFIG, MODEL_DIM_1, MODEL, Y_DIM_1, Y_DIM_2, Y, X_DIM_1, X_DIM_2, X, XI_DIM_1, XI_DIM_2, XI, AX_DIM_1,&
& AX_DIM_2, AX, AXI_DIM_1, AXI_DIM_2, AXI, SIZES_DIM_1, SIZES, STEPS, SUM_SQUARED_ERROR, RECORD_PRESENT, RECORD_DIM_1, RECORD_DIM_2&
&, RECORD, INFO) BIND(C)
    USE APOS, ONLY: MINIMIZE_MSE
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    TYPE(MODEL_CONFIG), INTENT(IN) :: CONFIG
    INTEGER, INTENT(IN) :: MODEL_DIM_1
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(MODEL_DIM_1) :: MODEL
    INTEGER, INTENT(IN) :: Y_DIM_1
    INTEGER, INTENT(IN) :: Y_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(Y_DIM_1,Y_DIM_2) :: Y
    INTEGER, INTENT(IN) :: X_DIM_1
    INTEGER, INTENT(IN) :: X_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(X_DIM_1,X_DIM_2) :: X
    INTEGER, INTENT(IN) :: XI_DIM_1
    INTEGER, INTENT(IN) :: XI_DIM_2
    INTEGER, INTENT(IN), DIMENSION(XI_DIM_1,XI_DIM_2) :: XI
    INTEGER, INTENT(IN) :: AX_DIM_1
    INTEGER, INTENT(IN) :: AX_DIM_2
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(AX_DIM_1,AX_DIM_2) :: AX
    INTEGER, INTENT(IN) :: AXI_DIM_1
    INTEGER, INTENT(IN) :: AXI_DIM_2
    INTEGER, INTENT(IN), DIMENSION(AXI_DIM_1,AXI_DIM_2) :: AXI
    INTEGER, INTENT(IN) :: SIZES_DIM_1
    INTEGER, INTENT(IN), DIMENSION(SIZES_DIM_1) :: SIZES
    INTEGER, INTENT(IN) :: STEPS
    REAL(KIND=RT), INTENT(OUT) :: SUM_SQUARED_ERROR
    LOGICAL, INTENT(IN) :: RECORD_PRESENT
    INTEGER, INTENT(IN) :: RECORD_DIM_1
    INTEGER, INTENT(IN) :: RECORD_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(RECORD_DIM_1,RECORD_DIM_2) :: RECORD
    INTEGER, INTENT(OUT) :: INFO
  
    IF (RECORD_PRESENT) THEN
      CALL MINIMIZE_MSE(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, XI=XI, AX=AX, AXI=AXI, SIZES=SIZES, STEPS=STEPS, SUM_SQUARED_ERROR=SU&
&M_SQUARED_ERROR, INFO=INFO, RECORD=RECORD)
    ELSE
      CALL MINIMIZE_MSE(CONFIG=CONFIG, MODEL=MODEL, Y=Y, X=X, XI=XI, AX=AX, AXI=AXI, SIZES=SIZES, STEPS=STEPS, SUM_SQUARED_ERROR=SU&
&M_SQUARED_ERROR, INFO=INFO)
    END IF
  END SUBROUTINE C_MINIMIZE_MSE
  
END MODULE C_APOS

