GRIDMAN
grid managment library
Functions/Subroutines
carre.f File Reference

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...
 

Detailed Description

Reading the 2D magnetic field aligned grid in CARRE (SONNET) format.

Definition in file carre.f.

Function/Subroutine Documentation

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

Parameters
[in]fnameString containing the name of input file
[out]stitleString containing the file title
[out]nxNumber of poloidal (X) cells
[out]nyNumber of radial (Y) cells
[out]nncutNumber of cuts
[out]nnisoNumber of isolated surfaces
nxcutPoloidal (X) indices of the cuts, NXCUT(2,NNCUT)
nycutRadial (Y) indices of the cuts, NYCUT(2,NNCUT)
nxisoPoloidal (X) indices of isolated surfaces, NXISO(2,NNISO)
nyisoRadial (Y) indices of isolated surfaces, NYISO(2,NNISO)
brMain radius (R) coordinates of the cell nodes, BR(NX,NY,4)
bzVertical (Z) coordinates of the cell nodes, BZ(NX,NY,4)
[out]ierrError code

Definition at line 54 of file carre.f.

References gridman::gridman_dp, and gridman::gridman_sp.

Referenced by gridman_carre_read30_grid().

Here is the caller graph for this function:

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

Parameters
[in]fnameString containing the name of input file
[out]nxNumber of poloidal (X) cells
[out]nyNumber of poloidal (Y) cells
[out]nncutNumber of cuts
[out]nnisoNumber of isolated surfaces
nxcutPoloidal (X) indices of cuts, NXCUT(NNCUT)
nycutRadial (Y) indices of cuts, NXCUT(NNCUT)
nxisoPoloidal (X) indices of isolated surfaces, NXISO(NNISO)
nyisoRadial (Y) indices of isolated surfaces, NYISO(NNISO)
rbtR*Btor (Major radius x Toroidal field strength)
brMain radius (R) coordinates of the cell nodes, BR(0:NX+1,0:NY+1,4)
bzVertical (Z) coordinates of the cell nodes, BZ(0:NX+1,0:NY+1,4)
bcCoordinates of cells centers, BC(0:NX+1,0:NY+1,2)

BC(:,:,1) is R coordinate, BC(:,:,2) is Z coordinate,

Parameters
pitPitch - ration of poloidal and total field strength, PIT(0:NX+1,0:NY+1)

Pitch is defined at the position of cell center BC

Parameters
[out]ierrError code

Definition at line 282 of file carre.f.

References gridman::gridman_dp, and gridman::gridman_sp.

Referenced by gridman_carre_readsonnet_grid().

Here is the caller graph for this function: