GRIDMAN
grid managment library
|
Reading the 2D magnetic field aligned grid in CARRE (SONNET) format. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gridman_carre_read30_array (FNAME, STITLE, NX, NY, NNCUT, NXCUT, NYCUT, NNISO, NXISO, NYISO, BR, BZ, IERR) |
Read B2 (CARRE, SONNET) grid from fort.30, return separate arrays. More... | |
subroutine | gridman_carre_readsonnet_array (FNAME, NX, NY, NNCUT, NXCUT, NYCUT, NNISO, NXISO, NYISO, RBT, BR, BZ, PIT, BC, IERR) |
Read carre grid in SONNET format, return separate arrays. More... | |
Reading the 2D magnetic field aligned grid in CARRE (SONNET) format.
Definition in file carre.f.
subroutine gridman_carre_read30_array | ( | character(*), intent(in) | FNAME, |
character(*), intent(out) | STITLE, | ||
integer(gridman_sp), intent(out) | NX, | ||
integer(gridman_sp), intent(out) | NY, | ||
integer(gridman_sp), intent(out) | NNCUT, | ||
integer(gridman_sp), dimension(:,:), allocatable | NXCUT, | ||
integer(gridman_sp), dimension(:,:), allocatable | NYCUT, | ||
integer(gridman_sp), intent(out) | NNISO, | ||
integer(gridman_sp), dimension(:,:), allocatable | NXISO, | ||
integer(gridman_sp), dimension(:,:), allocatable | NYISO, | ||
real(gridman_dp), dimension(:,:,:), allocatable | BR, | ||
real(gridman_dp), dimension(:,:,:), allocatable | BZ, | ||
integer, intent(out) | IERR | ||
) |
Read B2 (CARRE, SONNET) grid from fort.30, return separate arrays.
FORT.30 contains B2 grid in the format understood by EIRENE. The file is generated by B2.
3rd index in BR, BZ is the index of the corner
X 3------2 | | | | | | | 4------1 ------------ Y
To convert the grid into GRIDMAN_GRID object NXCUT, NYCUT, NXISO, NYISO, as well as BR, BZ broduced by GRIDMAN_CARRE_READ30 has to be sent to GRIDMAN_CARRE2GRID_FORT30
WARNING: arrays NNCUT, NXCUT, NYCUT, NNISO, NXISO, NYISO, BR, BZ, BC, PIT must NOT be allocated - they are allocated inside the subroutine. Arrays which already exist will be re-allocated.
GRIDMAN_CARRE_READ30_ARRAY and GRIDMAN_CARRE_READ30_GRID are combined in the interface GRIDMAN_CARRE_READ30
[in] | fname | String containing the name of input file |
[out] | stitle | String containing the file title |
[out] | nx | Number of poloidal (X) cells |
[out] | ny | Number of radial (Y) cells |
[out] | nncut | Number of cuts |
[out] | nniso | Number of isolated surfaces |
nxcut | Poloidal (X) indices of the cuts, NXCUT(2,NNCUT) | |
nycut | Radial (Y) indices of the cuts, NYCUT(2,NNCUT) | |
nxiso | Poloidal (X) indices of isolated surfaces, NXISO(2,NNISO) | |
nyiso | Radial (Y) indices of isolated surfaces, NYISO(2,NNISO) | |
br | Main radius (R) coordinates of the cell nodes, BR(NX,NY,4) | |
bz | Vertical (Z) coordinates of the cell nodes, BZ(NX,NY,4) | |
[out] | ierr | Error code |
Definition at line 54 of file carre.f.
References gridman::gridman_dp, and gridman::gridman_sp.
Referenced by gridman_carre_read30_grid().
subroutine gridman_carre_readsonnet_array | ( | character(*), intent(in) | FNAME, |
integer(gridman_sp), intent(out) | NX, | ||
integer(gridman_sp), intent(out) | NY, | ||
integer(gridman_sp), intent(out) | NNCUT, | ||
integer(gridman_sp), dimension(:), allocatable | NXCUT, | ||
integer(gridman_sp), dimension(:), allocatable | NYCUT, | ||
integer(gridman_sp), intent(out) | NNISO, | ||
integer(gridman_sp), dimension(:), allocatable | NXISO, | ||
integer(gridman_sp), dimension(:), allocatable | NYISO, | ||
real(gridman_dp) | RBT, | ||
real(gridman_dp), dimension(:,:,:), allocatable | BR, | ||
real(gridman_dp), dimension(:,:,:), allocatable | BZ, | ||
real(gridman_dp), dimension(:,:), allocatable | PIT, | ||
real(gridman_dp), dimension(:,:,:), allocatable | BC, | ||
integer, intent(out) | IERR | ||
) |
Read carre grid in SONNET format, return separate arrays.
3rd index in BR, BZ is the index of the corner
X 3------2 | | | | | | | 4------1 ------------ Y
To convert the grid into GRIDMAN_GRID object NXCUT, NYCUT, NXISO, NYISO, as well as BR, BZ broduced by GRIDMAN_CARRE_READSONNET has to be sent to GRIDMAN_CARRE2GRID
GRIDMAN_CARRE_READSONNET_ARRAY and GRIDMAN_CARRE_READSONNET_GRID are combined in the interface GRIDMAN_CARRE_READSONNET
[in] | fname | String containing the name of input file |
[out] | nx | Number of poloidal (X) cells |
[out] | ny | Number of poloidal (Y) cells |
[out] | nncut | Number of cuts |
[out] | nniso | Number of isolated surfaces |
nxcut | Poloidal (X) indices of cuts, NXCUT(NNCUT) | |
nycut | Radial (Y) indices of cuts, NXCUT(NNCUT) | |
nxiso | Poloidal (X) indices of isolated surfaces, NXISO(NNISO) | |
nyiso | Radial (Y) indices of isolated surfaces, NYISO(NNISO) | |
rbt | R*Btor (Major radius x Toroidal field strength) | |
br | Main radius (R) coordinates of the cell nodes, BR(0:NX+1,0:NY+1,4) | |
bz | Vertical (Z) coordinates of the cell nodes, BZ(0:NX+1,0:NY+1,4) | |
bc | Coordinates of cells centers, BC(0:NX+1,0:NY+1,2) |
BC(:,:,1) is R coordinate, BC(:,:,2) is Z coordinate,
pit | Pitch - ration of poloidal and total field strength, PIT(0:NX+1,0:NY+1) |
Pitch is defined at the position of cell center BC
[out] | ierr | Error code |
Definition at line 282 of file carre.f.
References gridman::gridman_dp, and gridman::gridman_sp.
Referenced by gridman_carre_readsonnet_grid().