ETS  \$Id: Doxyfile 2162 2020-02-26 14:16:09Z g2dpc $
 All Classes Files Functions Variables Pages
fc2k_parabolic_prof.f90
Go to the documentation of this file.
1 ! + + + + + + + + + + + + + + + + + + + + + + + + + + + +
2 ! + + + + + + + + + + + + + + + + + + + + + + + + + + + +
3 
4  SUBROUTINE fc2k_parabolic_prof (COREPROF_IN, EQUILIBRIUM_IN, &
5  coreprof_out, equilibrium_out, &
6  output_flag, diagnostic_info)
7 
8 !-------------------------------------------------------!
9 ! This routine puts parabolic !
10 ! profiles of psi, q and jparallel !
11 ! !
12 ! information received in: COREPROF_IN !
13 ! !
14 ! information saved in: COREPROF !
15 ! !
16 ! !
17 !-------------------------------------------------------!
18 ! Source: --- !
19 ! Developers: D.Kalupin !
20 ! Kontacts: Denis.Kalupin@efda.org !
21 ! !
22 ! Comments: created for V&V between ETS, JETTO !
23 ! and ASTRA !
24 ! !
25 !-------------------------------------------------------!
26 
27 
28  USE euitm_schemas
29  USE copy_structures
31 
32  IMPLICIT NONE
33 
34  CHARACTER(LEN=1024) :: out_info
35  INTEGER, INTENT(OUT) :: output_flag
36  CHARACTER(LEN=:), POINTER, INTENT(OUT) :: diagnostic_info
37 
38 ! +++ CPO derived types:
39  TYPE (type_coreprof), POINTER :: coreprof_in(:) !input/output CPO with plasma profiles
40  TYPE (type_coreprof), POINTER :: coreprof_out(:) !input/output CPO with plasma profiles
41  TYPE (type_equilibrium), POINTER :: equilibrium_in(:) !input CPO with geometry quantities from previous time
42  TYPE (type_equilibrium), POINTER :: equilibrium_out(:) !input CPO with geometry quantities from previous time
43 
44  nullify( diagnostic_info )
45 
46  IF (.NOT. ASSOCIATED (equilibrium_in(1)%profiles_1d%rho_tor) ) THEN
47  ALLOCATE (coreprof_out(1))
48  ALLOCATE (equilibrium_out(1))
49  out_info = 'ERROR in FC2K_PARABOLIC_PROF, EQUILIBRIUM_IN(1)%profiles_1d%rho_tor not associated'
50  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
51  diagnostic_info = out_info
52  write(*,*)diagnostic_info
53  output_flag = -1
54  RETURN
55  END IF
56 
57  IF (.NOT. ASSOCIATED (equilibrium_in(1)%profiles_1d%volume) ) THEN
58  ALLOCATE (coreprof_out(1))
59  ALLOCATE (equilibrium_out(1))
60  out_info = 'ERROR in FC2K_PARABOLIC_PROF, EQUILIBRIUM_IN(1)%profiles_1d%volume not associated'
61  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
62  diagnostic_info = out_info
63  write(*,*)diagnostic_info
64  output_flag = -2
65  RETURN
66  END IF
67 
68  IF (.NOT. ASSOCIATED (equilibrium_in(1)%profiles_1d%psi) ) THEN
69  ALLOCATE (coreprof_out(1))
70  ALLOCATE (equilibrium_out(1))
71  out_info = 'ERROR in FC2K_PARABOLIC_PROF, EQUILIBRIUM_IN(1)%profiles_1d%psi not associated'
72  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
73  diagnostic_info = out_info
74  output_flag = -3
75  RETURN
76  END IF
77 
78  IF (.NOT. ASSOCIATED (equilibrium_in(1)%profiles_1d%f_dia) ) THEN
79  ALLOCATE (coreprof_out(1))
80  ALLOCATE (equilibrium_out(1))
81  out_info = 'ERROR in FC2K_PARABOLIC_PROF, EQUILIBRIUM_IN(1)%profiles_1d%f_dia not associated'
82  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
83  diagnostic_info = out_info
84  write(*,*)diagnostic_info
85  output_flag = -4
86  RETURN
87  END IF
88 
89  IF (.NOT. ASSOCIATED (equilibrium_in(1)%profiles_1d%gm2) ) THEN
90  ALLOCATE (coreprof_out(1))
91  ALLOCATE (equilibrium_out(1))
92  out_info = 'ERROR in FC2K_PARABOLIC_PROF, EQUILIBRIUM_IN(1)%profiles_1d%gm2 not associated'
93  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
94  diagnostic_info = out_info
95  write(*,*)diagnostic_info
96  output_flag = -5
97  RETURN
98  END IF
99 
100  IF (.NOT. ASSOCIATED (coreprof_in(1)%rho_tor) ) THEN
101  ALLOCATE (coreprof_out(1))
102  ALLOCATE (equilibrium_out(1))
103  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%rho_tor not associated'
104  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
105  diagnostic_info = out_info
106  write(*,*)diagnostic_info
107  output_flag = -6
108  RETURN
109  END IF
110 
111  IF (.NOT. ASSOCIATED (coreprof_in(1)%psi%value) ) THEN
112  ALLOCATE (coreprof_out(1))
113  ALLOCATE (equilibrium_out(1))
114  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%psi%value not associated'
115  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
116  diagnostic_info = out_info
117  write(*,*)diagnostic_info
118  output_flag = -7
119  RETURN
120  END IF
121 
122  IF (.NOT. ASSOCIATED (coreprof_in(1)%profiles1d%q%value) ) THEN
123  ALLOCATE (coreprof_out(1))
124  ALLOCATE (equilibrium_out(1))
125  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%profiles1d%q%value not associated'
126  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
127  diagnostic_info = out_info
128  write(*,*)diagnostic_info
129  output_flag = -8
130  RETURN
131  END IF
132 
133  IF (.NOT. ASSOCIATED (coreprof_in(1)%profiles1d%jtot%value) ) THEN
134  ALLOCATE (coreprof_out(1))
135  ALLOCATE (equilibrium_out(1))
136  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%profiles1d%jtot%value not associated'
137  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
138  diagnostic_info = out_info
139  write(*,*)diagnostic_info
140  output_flag = -9
141  RETURN
142  END IF
143 
144  IF (.NOT. ASSOCIATED (coreprof_in(1)%ne%value) ) THEN
145  ALLOCATE (coreprof_out(1))
146  ALLOCATE (equilibrium_out(1))
147  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%ne%value not associated'
148  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
149  diagnostic_info = out_info
150  write(*,*)diagnostic_info
151  output_flag = -10
152  RETURN
153  END IF
154 
155  IF (.NOT. ASSOCIATED (coreprof_in(1)%ni%value) ) THEN
156  ALLOCATE (coreprof_out(1))
157  ALLOCATE (equilibrium_out(1))
158  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%ni%value not associated'
159  output_flag = -11
160  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
161  diagnostic_info = out_info
162  write(*,*)diagnostic_info
163  RETURN
164  END IF
165 
166  IF (.NOT. ASSOCIATED (coreprof_in(1)%te%value) ) THEN
167  ALLOCATE (coreprof_out(1))
168  ALLOCATE (equilibrium_out(1))
169  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%te%value not associated'
170  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
171  diagnostic_info = out_info
172  write(*,*)diagnostic_info
173  output_flag = -12
174  RETURN
175  END IF
176 
177  IF (.NOT. ASSOCIATED (coreprof_in(1)%ti%value) ) THEN
178  ALLOCATE (coreprof_out(1))
179  ALLOCATE (equilibrium_out(1))
180  out_info = 'ERROR in FC2K_PARABOLIC_PROF, COREPROF_IN(1)%ti%value not associated'
181  ALLOCATE( CHARACTER(len=len(trim(adjustl(out_info)))) :: diagnostic_info )
182  diagnostic_info = out_info
183  write(*,*)diagnostic_info
184  output_flag = -13
185  RETURN
186  END IF
187 
188 
189  CALL parabolic_prof(coreprof_in, equilibrium_in, &
190  coreprof_out, equilibrium_out)
191 
192 
193  RETURN
194 
195  END SUBROUTINE fc2k_parabolic_prof
196 
197 ! + + + + + + + + + + + + + + + + + + + + + + + + + + + +
198 ! + + + + + + + + + + + + + + + + + + + + + + + + + + + +
199 
subroutine fc2k_parabolic_prof(COREPROF_IN, EQUILIBRIUM_IN, COREPROF_OUT, EQUILIBRIUM_OUT, OUTPUT_FLAG, DIAGNOSTIC_INFO)
subroutine parabolic_prof(COREPROF_IN, EQUILIBRIUM_IN, COREPROF_OUT, EQUILIBRIUM_OUT)