FV3 Bundle
FitCoeff_SetValue.inc
Go to the documentation of this file.
1  ! Local parameters
2  CHARACTER(*), PARAMETER :: ROUTINE_NAME = 'FitCoeff_SetValue'
3  ! Local variables
4  CHARACTER(ML) :: msg
5  INTEGER :: i
6 
7  ! Allocate structure if necessary
8  IF ( .NOT. FitCoeff_Associated(self) ) THEN
9  CALL FitCoeff_Create( self, SHAPE(C) )
10  IF ( .NOT. FitCoeff_Associated(self) ) THEN
11  msg = 'Allocation of FitCoeff structure failed'
12  CALL Display_Message( ROUTINE_NAME, msg, FAILURE ); RETURN
13  END IF
14  END IF
15 
16 
17  ! Check dimensions are consistent
18  DO i = 1, SIZE(self%Dimensions)
19  IF ( self%Dimensions(i) /= SIZE(C,DIM=i) ) THEN
20  WRITE( msg,'("Different dimension ",i0," size between ",&
21  &"structure (",i0,") and array (",i0,")")' ) &
22  i, self%Dimensions(i) /= SIZE(C,DIM=i)
23  CALL Display_Message( ROUTINE_NAME, msg, FAILURE )
24  CALL FitCoeff_Destroy( self )
25  RETURN
26  END IF
27  END DO
28 
29 
30  ! Assign the coefficient data
31  self%C = C
32 
33 
34  ! Optional arguments
35  ! ...Version
36  IF ( PRESENT(Version) ) self%Version = Version
l_size ! loop over number of fields ke do je do i
l_size ! loop over number of fields ke do je do ie to je n if(.NOT. d_comm%R_do_buf(list)) cycle from_pe