V3FIT
v3post_rfun.f
1  MODULE v3post_rfun
2 !**********************************************************************
3 !** **
4 !** MAIN PROGRAM: BUILD RESPONSE FUNCTION TABLES **
5 !** **
6 !** **
7 !** SUBPROGRAM DESCRIPTION: **
8 !** Response table variables **
9 !** **
10 !** CALLING ARGUMENTS: **
11 !** **
12 !** REFERENCES: **
13 !** (1) **
14 !** **
15 !** RECORD OF MODIFICATION: **
16 !** 12/08/02..........first created **
17 !** **
18 !**********************************************************************
19  USE stel_kinds
20 !----------------------------------------------------------------------
21 !-- idrfun : identification of external coil responses --
22 !-- eqtype : plasma equilibrium identification --
23 !-- myid : user's identification --
24 !-- ideqfile ; identification of plasma equilibrium file --
25 !-- eq_file : equilibrium data file name --
26 !-- n_field_c : # of coil --
27 !-- n_field_cg : # of coil groups --
28 !-- nflx_loop : # of thin flux loops --
29 !-- nprobe : # of magnetic probes --
30 !-- n_diagn_c : # of diagnostic sensors --
31 !----------------------------------------------------------------------
32  CHARACTER(len=40) :: idrfun
33  CHARACTER(len=20) :: eqtype
34  CHARACTER(len=20) :: myid=' '
35  CHARACTER(len=50) :: ideqfile
36  CHARACTER(len=70) :: eq_file
37  LOGICAL :: freeb = .true.
38  LOGICAL :: lsurf = .false.
39  INTEGER(iprec) :: n_field_c
40 ! INTEGER(iprec) :: n_field_cg
41  INTEGER(iprec) :: nflx_loop
42  INTEGER(iprec) :: nprobe
43 ! INTEGER(iprec) :: n_diagn_c
44 
45 ! JDH Put some variables here 06.28.2003
46  INTEGER(iprec) :: n_diagn_c
47  INTEGER(iprec) :: n_field_periods
48 
49 
50 !----------------------------------------------------------------------
51 !-- response functions due to external coils --
52 !-- rdiag_coilg : diagnostic coils due to coil groups --
53 !----------------------------------------------------------------------
54  REAL(rprec), ALLOCATABLE, DIMENSION(:,:) :: rdiag_coilg
55 !----------------------------------------------------------------------
56 !-- response functions due to plasma --
57 !-- name_coils_dot : name of the 'coils.' file --
58 !-- lstell_sym : logical - True for stellarator symmetry --
59 !-- rmin : minimum R in m for plasma grid --
60 !-- rmax : maximum R in m for plasma grid --
61 !-- zmin : minimum Z in m for plasma grid --
62 !-- zmax : maximum Z in m for plasma grid --
63 !-- ir : number of grid points in R plasma grid --
64 !-- jz : number of grid points in Z plasma grid --
65 !-- kp : number of phi planes in plasma grid --
66 !-- kp_store : number of phi planes stored in prf grid --
67 !-- n_field_periods : number of field periods --
68 !-- pl_response : cylindrical components of plasma response --
69 !-- rgrid : R on cylindrical grid in m --
70 !-- zgrid : Z on cylindrical grid in m --
71 !-- pgrid : Phi on cylindrical grid in radian --
72 !-- delz,delz,delp : (R,P,Z) grid sizes --
73 !-- sgrid : radial equilibrium grid --
74 !-- ugrid : poloidal angular equilibrium grid --
75 !-- vgrid : toroidal angular equilibrium grid --
76 !-- dels,delu,delv : (s,u,v) grid sizes --
77 !-- ju : number of grid points in u equilibrium grid--
78 !-- kv : number of grid points in v equilibrium grid--
79 !-- rsuv : R at (s,u,v) --
80 !-- psuv : Phi at (s,u,v) --
81 !-- zsuv : Z at (s,u,v) --
82 !-- gsuv : SQRT(g) at (s,u,v) --
83 !-- currusuv : J^u at (s,u,v) --
84 !-- currvsuv : J^v at (s,u,v) --
85 !-- bsubu : B_u at (s,u,v) --
86 !-- bsubv : B_v at (s,u,v) --
87 !-- rusuv : dR/du at (s,u,v) --
88 !-- rvsuv : dR/dv at (s,u,v) --
89 !-- zusuv : dZ/du at (s,u,v) --
90 !-- zusuv : dZ/dv at (s,u,v) --
91 !----------------------------------------------------------------------
92  CHARACTER(len=80) :: name_coils_dot
93  CHARACTER(len=120) :: name_diagnostic_dot
94  LOGICAL :: lstell_sym
95  REAL(rprec) :: rmin, rmax, zmin, zmax
96  INTEGER(iprec) :: ir, jz, kp, kp_store
97 ! INTEGER(iprec) :: n_field_periods
98 !
99 ! REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:,:) :: pl_response
100 ! REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:,:) :: pl_respsuv
101  REAL(rprec), ALLOCATABLE, DIMENSION(:) :: rgrid
102  REAL(rprec), ALLOCATABLE, DIMENSION(:) :: zgrid
103 ! REAL(rprec), ALLOCATABLE, DIMENSION(:) :: pgrid
104  REAL(rprec) :: delr, delz, delp
105  REAL(rprec), ALLOCATABLE, DIMENSION(:) :: sgrid
106  REAL(rprec), ALLOCATABLE, DIMENSION(:) :: ugrid
107  REAL(rprec), ALLOCATABLE, DIMENSION(:) :: vgrid
108  REAL(rprec) :: dels, delu, delv
109  INTEGER(iprec) :: ju, kv
110  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: rsuv
111 ! REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: psuv
112  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: zsuv
113  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: gsuv
114  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: currusuv
115  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: currvsuv
116  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: bsubu
117  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: bsubv
118  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: rusuv
119  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: zusuv
120  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: rvsuv
121  REAL(rprec), ALLOCATABLE, DIMENSION(:,:,:) :: zvsuv
122 !----------------------------------------------------------------------
123 !-- signals : signals --
124 !-- cal : calculated values --
125 !-- cext : calculated external values --
126 !----------------------------------------------------------------------
127  TYPE signals
128  REAL(rprec) :: cal
129  REAL(rprec) :: cext
130  END TYPE signals
131 !----------------------------------------------------------------------
132  TYPE(signals), ALLOCATABLE :: signal_diag(:)
133  CHARACTER(len=30), ALLOCATABLE, DIMENSION(:) :: shortnames
134 
135  END MODULE v3post_rfun
v3post_rfun::signals
Definition: v3post_rfun.f:127