! 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
  

  
  SUBROUTINE C_ORTHOGONALIZE(A_DIM_1, A_DIM_2, A, LENGTHS_DIM_1, LENGTHS, RANK_PRESENT, RANK, ORDER_PRESENT, ORDER_DIM_1, ORDER) BI&
&ND(C)
    USE MATRIX_OPERATIONS, ONLY: ORTHOGONALIZE
    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
    INTEGER, INTENT(IN) :: LENGTHS_DIM_1
    REAL(KIND=RT), INTENT(OUT), DIMENSION(LENGTHS_DIM_1) :: LENGTHS
    LOGICAL, INTENT(IN) :: RANK_PRESENT
    INTEGER, INTENT(OUT) :: RANK
    LOGICAL, INTENT(IN) :: ORDER_PRESENT
    INTEGER, INTENT(IN) :: ORDER_DIM_1
    INTEGER, INTENT(OUT), DIMENSION(ORDER_DIM_1) :: ORDER
  
    IF (RANK_PRESENT) THEN
      IF (ORDER_PRESENT) THEN
        CALL ORTHOGONALIZE(A=A, LENGTHS=LENGTHS, RANK=RANK, ORDER=ORDER)
      ELSE
        CALL ORTHOGONALIZE(A=A, LENGTHS=LENGTHS, RANK=RANK)
      END IF
    ELSE
      IF (ORDER_PRESENT) THEN
        CALL ORTHOGONALIZE(A=A, LENGTHS=LENGTHS, ORDER=ORDER)
      ELSE
        CALL ORTHOGONALIZE(A=A, LENGTHS=LENGTHS)
      END IF
    END IF
  END SUBROUTINE C_ORTHOGONALIZE
  

  
  SUBROUTINE C_SVD(A_DIM_1, A_DIM_2, A, S_DIM_1, S, VT_DIM_1, VT_DIM_2, VT, RANK_PRESENT, RANK, STEPS_PRESENT, STEPS, BIAS_PRESENT,&
& BIAS) BIND(C)
    USE MATRIX_OPERATIONS, ONLY: SVD
    IMPLICIT NONE
    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) :: S_DIM_1
    REAL(KIND=RT), INTENT(OUT), DIMENSION(S_DIM_1) :: S
    INTEGER, INTENT(IN) :: VT_DIM_1
    INTEGER, INTENT(IN) :: VT_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(VT_DIM_1,VT_DIM_2) :: VT
    LOGICAL, INTENT(IN) :: RANK_PRESENT
    INTEGER, INTENT(OUT) :: RANK
    LOGICAL, INTENT(IN) :: STEPS_PRESENT
    INTEGER, INTENT(IN) :: STEPS
    LOGICAL, INTENT(IN) :: BIAS_PRESENT
    REAL(KIND=RT), INTENT(IN) :: BIAS
  
    IF (RANK_PRESENT) THEN
      IF (STEPS_PRESENT) THEN
        IF (BIAS_PRESENT) THEN
          CALL SVD(A=A, S=S, VT=VT, RANK=RANK, STEPS=STEPS, BIAS=BIAS)
        ELSE
          CALL SVD(A=A, S=S, VT=VT, RANK=RANK, STEPS=STEPS)
        END IF
      ELSE
        IF (BIAS_PRESENT) THEN
          CALL SVD(A=A, S=S, VT=VT, RANK=RANK, BIAS=BIAS)
        ELSE
          CALL SVD(A=A, S=S, VT=VT, RANK=RANK)
        END IF
      END IF
    ELSE
      IF (STEPS_PRESENT) THEN
        IF (BIAS_PRESENT) THEN
          CALL SVD(A=A, S=S, VT=VT, STEPS=STEPS, BIAS=BIAS)
        ELSE
          CALL SVD(A=A, S=S, VT=VT, STEPS=STEPS)
        END IF
      ELSE
        IF (BIAS_PRESENT) THEN
          CALL SVD(A=A, S=S, VT=VT, BIAS=BIAS)
        ELSE
          CALL SVD(A=A, S=S, VT=VT)
        END IF
      END IF
    END IF
  END SUBROUTINE C_SVD
  

  
  SUBROUTINE C_RADIALIZE(X_DIM_1, X_DIM_2, X, SHIFT_DIM_1, SHIFT, VECS_DIM_1, VECS_DIM_2, VECS, INVERT_RESULT_PRESENT, INVERT_RESUL&
&T, STEPS_PRESENT, STEPS) BIND(C)
    USE MATRIX_OPERATIONS, ONLY: RADIALIZE
    IMPLICIT NONE
    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) :: SHIFT_DIM_1
    REAL(KIND=RT), INTENT(OUT), DIMENSION(SHIFT_DIM_1) :: SHIFT
    INTEGER, INTENT(IN) :: VECS_DIM_1
    INTEGER, INTENT(IN) :: VECS_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(VECS_DIM_1,VECS_DIM_2) :: VECS
    LOGICAL, INTENT(IN) :: INVERT_RESULT_PRESENT
    LOGICAL, INTENT(IN) :: INVERT_RESULT
    LOGICAL, INTENT(IN) :: STEPS_PRESENT
    INTEGER, INTENT(IN) :: STEPS
  
    IF (INVERT_RESULT_PRESENT) THEN
      IF (STEPS_PRESENT) THEN
        CALL RADIALIZE(X=X, SHIFT=SHIFT, VECS=VECS, INVERT_RESULT=INVERT_RESULT, STEPS=STEPS)
      ELSE
        CALL RADIALIZE(X=X, SHIFT=SHIFT, VECS=VECS, INVERT_RESULT=INVERT_RESULT)
      END IF
    ELSE
      IF (STEPS_PRESENT) THEN
        CALL RADIALIZE(X=X, SHIFT=SHIFT, VECS=VECS, STEPS=STEPS)
      ELSE
        CALL RADIALIZE(X=X, SHIFT=SHIFT, VECS=VECS)
      END IF
    END IF
  END SUBROUTINE C_RADIALIZE
  
END MODULE C_MATRIX_OPERATIONS


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


CONTAINS


  
  SUBROUTINE C_SWAP_INT(V1, V2) BIND(C)
    USE SORT_AND_SELECT, ONLY: SWAP_INT
    IMPLICIT NONE
    INTEGER, INTENT(INOUT) :: V1
    INTEGER, INTENT(INOUT) :: V2
  
    CALL SWAP_INT(V1, V2)
  END SUBROUTINE C_SWAP_INT
  

  
  SUBROUTINE C_ARGSELECT(VALUES_DIM_1, VALUES, K, INDICES_DIM_1, INDICES, DIVISOR_PRESENT, DIVISOR, MAX_SIZE_PRESENT, MAX_SIZE, REC&
&URSING_PRESENT, RECURSING) BIND(C)
    USE SORT_AND_SELECT, ONLY: ARGSELECT
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: VALUES_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(VALUES_DIM_1) :: VALUES
    INTEGER, INTENT(IN) :: K
    INTEGER, INTENT(IN) :: INDICES_DIM_1
    INTEGER, INTENT(INOUT), DIMENSION(INDICES_DIM_1) :: INDICES
    LOGICAL, INTENT(IN) :: DIVISOR_PRESENT
    INTEGER, INTENT(IN) :: DIVISOR
    LOGICAL, INTENT(IN) :: MAX_SIZE_PRESENT
    INTEGER, INTENT(IN) :: MAX_SIZE
    LOGICAL, INTENT(IN) :: RECURSING_PRESENT
    LOGICAL, INTENT(IN) :: RECURSING
  
    IF (DIVISOR_PRESENT) THEN
      IF (MAX_SIZE_PRESENT) THEN
        IF (RECURSING_PRESENT) THEN
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES, DIVISOR=DIVISOR, MAX_SIZE=MAX_SIZE, RECURSING=RECURSING)
        ELSE
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES, DIVISOR=DIVISOR, MAX_SIZE=MAX_SIZE)
        END IF
      ELSE
        IF (RECURSING_PRESENT) THEN
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES, DIVISOR=DIVISOR, RECURSING=RECURSING)
        ELSE
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES, DIVISOR=DIVISOR)
        END IF
      END IF
    ELSE
      IF (MAX_SIZE_PRESENT) THEN
        IF (RECURSING_PRESENT) THEN
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES, MAX_SIZE=MAX_SIZE, RECURSING=RECURSING)
        ELSE
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES, MAX_SIZE=MAX_SIZE)
        END IF
      ELSE
        IF (RECURSING_PRESENT) THEN
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES, RECURSING=RECURSING)
        ELSE
          CALL ARGSELECT(VALUES=VALUES, K=K, INDICES=INDICES)
        END IF
      END IF
    END IF
  END SUBROUTINE C_ARGSELECT
  

  
  SUBROUTINE C_ARGSORT(VALUES_DIM_1, VALUES, INDICES_DIM_1, INDICES, MIN_SIZE_PRESENT, MIN_SIZE, INIT_INDS_PRESENT, INIT_INDS) BIND&
&(C)
    USE SORT_AND_SELECT, ONLY: ARGSORT
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: VALUES_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(VALUES_DIM_1) :: VALUES
    INTEGER, INTENT(IN) :: INDICES_DIM_1
    INTEGER, INTENT(INOUT), DIMENSION(INDICES_DIM_1) :: INDICES
    LOGICAL, INTENT(IN) :: MIN_SIZE_PRESENT
    INTEGER, INTENT(IN) :: MIN_SIZE
    LOGICAL, INTENT(IN) :: INIT_INDS_PRESENT
    LOGICAL, INTENT(IN) :: INIT_INDS
  
    IF (MIN_SIZE_PRESENT) THEN
      IF (INIT_INDS_PRESENT) THEN
        CALL ARGSORT(VALUES=VALUES, INDICES=INDICES, MIN_SIZE=MIN_SIZE, INIT_INDS=INIT_INDS)
      ELSE
        CALL ARGSORT(VALUES=VALUES, INDICES=INDICES, MIN_SIZE=MIN_SIZE)
      END IF
    ELSE
      IF (INIT_INDS_PRESENT) THEN
        CALL ARGSORT(VALUES=VALUES, INDICES=INDICES, INIT_INDS=INIT_INDS)
      ELSE
        CALL ARGSORT(VALUES=VALUES, INDICES=INDICES)
      END IF
    END IF
  END SUBROUTINE C_ARGSORT
  

  
  SUBROUTINE C_INSERTION_ARGSORT(VALUES_DIM_1, VALUES, INDICES_DIM_1, INDICES) BIND(C)
    USE SORT_AND_SELECT, ONLY: INSERTION_ARGSORT
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: VALUES_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(VALUES_DIM_1) :: VALUES
    INTEGER, INTENT(IN) :: INDICES_DIM_1
    INTEGER, INTENT(INOUT), DIMENSION(INDICES_DIM_1) :: INDICES
  
    CALL INSERTION_ARGSORT(VALUES, INDICES)
  END SUBROUTINE C_INSERTION_ARGSORT
  

  
  SUBROUTINE C_ARGPARTITION(VALUES_DIM_1, VALUES, INDICES_DIM_1, INDICES, LEFT) BIND(C)
    USE SORT_AND_SELECT, ONLY: ARGPARTITION
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: VALUES_DIM_1
    REAL(KIND=RT), INTENT(IN), DIMENSION(VALUES_DIM_1) :: VALUES
    INTEGER, INTENT(IN) :: INDICES_DIM_1
    INTEGER, INTENT(INOUT), DIMENSION(INDICES_DIM_1) :: INDICES
    INTEGER :: LEFT
  
    LEFT = ARGPARTITION(VALUES, INDICES)
  END SUBROUTINE C_ARGPARTITION
  
END MODULE C_SORT_AND_SELECT


MODULE C_APOS
USE ISO_FORTRAN_ENV , ONLY : RT => REAL32 , INT64 , INT8
USE MATRIX_OPERATIONS , ONLY : GEMM , RANDOM_UNIT_VECTORS , ORTHOGONALIZE , RADIALIZE
USE SORT_AND_SELECT , ONLY : ARGSORT , ARGSELECT
  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(ADN, ADO_PRESENT, ADO, ADS_PRESENT, ADS, ANS_PRESENT, ANS, ANE_PRESENT, ANE, ADE_PRESENT, ADE, MDN,&
& MDO, MDS_PRESENT, MDS, MNS_PRESENT, MNS, MNE_PRESENT, MNE, MDE_PRESENT, MDE, NUM_THREADS_PRESENT, NUM_THREADS, CONFIG) BIND(C)
    USE APOS, ONLY: NEW_MODEL_CONFIG
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: ADN
    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
    INTEGER, INTENT(IN) :: MDN
    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
    LOGICAL, INTENT(IN) :: NUM_THREADS_PRESENT
    INTEGER, INTENT(IN) :: NUM_THREADS
    TYPE(MODEL_CONFIG), INTENT(OUT) :: CONFIG
  
    IF (ADO_PRESENT) THEN
      IF (ADS_PRESENT) THEN
        IF (ANS_PRESENT) THEN
          IF (ANE_PRESENT) THEN
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE&
&)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (ANE_PRESENT) THEN
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        END IF
      ELSE
        IF (ANS_PRESENT) THEN
          IF (ANE_PRESENT) THEN
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANS=ANS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (ANE_PRESENT) THEN
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADO=ADO)
                      END IF
                    END IF
                  END IF
                END IF
              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 (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS&
&)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANS=ANS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (ANE_PRESENT) THEN
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADS=ADS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        END IF
      ELSE
        IF (ANS_PRESENT) THEN
          IF (ANE_PRESENT) THEN
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS&
&)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANS=ANS)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          END IF
        ELSE
          IF (ANE_PRESENT) THEN
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE&
&)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ANE=ANE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            END IF
          ELSE
            IF (ADE_PRESENT) THEN
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE&
&)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, ADE=ADE)
                      END IF
                    END IF
                  END IF
                END IF
              END IF
            ELSE
              IF (MDS_PRESENT) THEN
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THR&
&EADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDS=MDS)
                      END IF
                    END IF
                  END IF
                END IF
              ELSE
                IF (MNS_PRESENT) THEN
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_&
&THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNS=MNS)
                      END IF
                    END IF
                  END IF
                ELSE
                  IF (MNE_PRESENT) THEN
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNE=MNE, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNE=MNE, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNE=MNE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MNE=MNE)
                      END IF
                    END IF
                  ELSE
                    IF (MDE_PRESENT) THEN
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDE=MDE, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, MDE=MDE)
                      END IF
                    ELSE
                      IF (NUM_THREADS_PRESENT) THEN
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, CONFIG=CONFIG, NUM_THREADS=NUM_THREADS)
                      ELSE
                        CALL NEW_MODEL_CONFIG(ADN=ADN, MDN=MDN, MDO=MDO, 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_NEW_FIT_CONFIG(NM, NA, CONFIG) BIND(C)
    USE APOS, ONLY: NEW_FIT_CONFIG
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: NM
    INTEGER, INTENT(IN) :: NA
    TYPE(MODEL_CONFIG), INTENT(INOUT) :: CONFIG
  
    CALL NEW_FIT_CONFIG(NM, NA, CONFIG)
  END SUBROUTINE C_NEW_FIT_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, AX_DIM_1, AX_DIM_2, AX, AXI_DIM_1, AXI_DIM_2, AXI, SIZES_DIM_1, SIZES, X_DIM&
&_1, X_DIM_2, X, XI_DIM_1, XI_DIM_2, XI, Y_DIM_1, Y_DIM_2, Y, 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) :: 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(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) :: Y_DIM_1
    INTEGER, INTENT(IN) :: Y_DIM_2
    REAL(KIND=RT), INTENT(IN), DIMENSION(Y_DIM_1,Y_DIM_2) :: Y
    INTEGER, INTENT(OUT) :: INFO
  
    CALL CHECK_SHAPE(CONFIG, MODEL, AX, AXI, SIZES, X, XI, Y, INFO)
  END SUBROUTINE C_CHECK_SHAPE
  

  
  SUBROUTINE C_COMPUTE_BATCHES(NUM_BATCHES, NM, NA, SIZES_DIM_1, SIZES, BATCHA_STARTS_DIM_1, BATCHA_STARTS, BATCHA_ENDS_DIM_1, BATC&
&HA_ENDS, BATCHM_STARTS_DIM_1, BATCHM_STARTS, BATCHM_ENDS_DIM_1, BATCHM_ENDS, INFO) BIND(C)
    USE APOS, ONLY: COMPUTE_BATCHES
    IMPLICIT NONE
    INTEGER, INTENT(IN) :: NUM_BATCHES
    INTEGER, INTENT(IN) :: NM
    INTEGER, INTENT(IN) :: NA
    INTEGER, INTENT(IN) :: SIZES_DIM_1
    INTEGER, INTENT(IN), DIMENSION(SIZES_DIM_1) :: SIZES
    INTEGER, INTENT(IN) :: BATCHA_STARTS_DIM_1
    INTEGER, INTENT(OUT), DIMENSION(BATCHA_STARTS_DIM_1) :: BATCHA_STARTS
    INTEGER, INTENT(IN) :: BATCHA_ENDS_DIM_1
    INTEGER, INTENT(OUT), DIMENSION(BATCHA_ENDS_DIM_1) :: BATCHA_ENDS
    INTEGER, INTENT(IN) :: BATCHM_STARTS_DIM_1
    INTEGER, INTENT(OUT), DIMENSION(BATCHM_STARTS_DIM_1) :: BATCHM_STARTS
    INTEGER, INTENT(IN) :: BATCHM_ENDS_DIM_1
    INTEGER, INTENT(OUT), DIMENSION(BATCHM_ENDS_DIM_1) :: BATCHM_ENDS
    INTEGER, INTENT(INOUT) :: INFO
  
    CALL COMPUTE_BATCHES(NUM_BATCHES, NM, NA, SIZES, BATCHA_STARTS, BATCHA_ENDS, BATCHM_STARTS, BATCHM_ENDS, INFO)
  END SUBROUTINE C_COMPUTE_BATCHES
  

  
  SUBROUTINE C_EMBED(CONFIG, MODEL_DIM_1, MODEL, AXI_DIM_1, AXI_DIM_2, AXI, XI_DIM_1, XI_DIM_2, XI, AX_DIM_1, AX_DIM_2, AX, X_DIM_1&
&, X_DIM_2, X) 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) :: AXI_DIM_1
    INTEGER, INTENT(IN) :: AXI_DIM_2
    INTEGER, INTENT(IN), DIMENSION(AXI_DIM_1,AXI_DIM_2) :: AXI
    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(OUT), DIMENSION(AX_DIM_1,AX_DIM_2) :: AX
    INTEGER, INTENT(IN) :: X_DIM_1
    INTEGER, INTENT(IN) :: X_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(X_DIM_1,X_DIM_2) :: X
  
    CALL EMBED(CONFIG, MODEL, AXI, XI, AX, X)
  END SUBROUTINE C_EMBED
  

  
  SUBROUTINE C_EVALUATE(CONFIG, MODEL_DIM_1, MODEL, AX_DIM_1, AX_DIM_2, AX, AY_DIM_1, AY_DIM_2, AY, SIZES_DIM_1, SIZES, X_DIM_1, X_&
&DIM_2, X, Y_DIM_1, Y_DIM_2, Y, A_STATES_DIM_1, A_STATES_DIM_2, A_STATES_DIM_3, A_STATES, M_STATES_DIM_1, M_STATES_DIM_2, M_STATES_&
&DIM_3, M_STATES, INFO) 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) :: 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) :: AY_DIM_1
    INTEGER, INTENT(IN) :: AY_DIM_2
    REAL(KIND=RT), INTENT(OUT), DIMENSION(AY_DIM_1,AY_DIM_2) :: AY
    INTEGER, INTENT(IN) :: SIZES_DIM_1
    INTEGER, INTENT(IN), DIMENSION(SIZES_DIM_1) :: SIZES
    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) :: 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) :: 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) :: 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(INOUT) :: INFO
  
    CALL EVALUATE(CONFIG, MODEL, AX, AY, SIZES, X, Y, A_STATES, M_STATES, INFO)
  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) 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
  
    CALL BASIS_GRADIENT(CONFIG, MODEL, Y, X, AX, SIZES, M_STATES, A_STATES, AY, GRAD)
  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_MINIMIZE_MSE(CONFIG, MODEL_DIM_1, MODEL, RWORK_DIM_1, RWORK, IWORK_DIM_1, IWORK, AX_DIM_1, AX_DIM_2, AX, AXI_DIM_1, &
&AXI_DIM_2, AXI, SIZES_DIM_1, SIZES, X_DIM_1, X_DIM_2, X, XI_DIM_1, XI_DIM_2, XI, Y_DIM_1, Y_DIM_2, Y, STEPS, RECORD_PRESENT, RECOR&
&D_DIM_1, RECORD_DIM_2, RECORD, SUM_SQUARED_ERROR, INFO) BIND(C)
    USE APOS, ONLY: MINIMIZE_MSE
    USE APOS, ONLY: MODEL_CONFIG
    IMPLICIT NONE
    TYPE(MODEL_CONFIG), INTENT(INOUT) :: CONFIG
    INTEGER, INTENT(IN) :: MODEL_DIM_1
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(MODEL_DIM_1) :: MODEL
    INTEGER, INTENT(IN) :: RWORK_DIM_1
    REAL(KIND=RT), INTENT(INOUT), DIMENSION(RWORK_DIM_1) :: RWORK
    INTEGER, INTENT(IN) :: IWORK_DIM_1
    INTEGER, INTENT(INOUT), DIMENSION(IWORK_DIM_1) :: IWORK
    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) :: 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) :: 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) :: STEPS
    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
    REAL(KIND=RT), INTENT(OUT) :: SUM_SQUARED_ERROR
    INTEGER, INTENT(OUT) :: INFO
  
    IF (RECORD_PRESENT) THEN
      CALL MINIMIZE_MSE(CONFIG=CONFIG, MODEL=MODEL, RWORK=RWORK, IWORK=IWORK, AX=AX, AXI=AXI, SIZES=SIZES, X=X, XI=XI, Y=Y, STEPS=S&
&TEPS, SUM_SQUARED_ERROR=SUM_SQUARED_ERROR, INFO=INFO, RECORD=RECORD)
    ELSE
      CALL MINIMIZE_MSE(CONFIG=CONFIG, MODEL=MODEL, RWORK=RWORK, IWORK=IWORK, AX=AX, AXI=AXI, SIZES=SIZES, X=X, XI=XI, Y=Y, STEPS=S&
&TEPS, SUM_SQUARED_ERROR=SUM_SQUARED_ERROR, INFO=INFO)
    END IF
  END SUBROUTINE C_MINIMIZE_MSE
  
END MODULE C_APOS

