MODgvec_VMEC_Readin Module

Module VMEC readin


Uses

  • module~~modgvec_vmec_readin~~UsesGraph module~modgvec_vmec_readin MODgvec_VMEC_Readin module~modgvec_globals MODgvec_Globals module~modgvec_vmec_readin->module~modgvec_globals iso_fortran_env iso_fortran_env module~modgvec_globals->iso_fortran_env

Used by

  • module~~modgvec_vmec_readin~~UsedByGraph module~modgvec_vmec_readin MODgvec_VMEC_Readin proc~finalizevmec FinalizeVMEC proc~finalizevmec->module~modgvec_vmec_readin proc~initmhd3d t_functional_mhd3d%InitMHD3D proc~initmhd3d->module~modgvec_vmec_readin proc~initsolution InitSolution proc~initsolution->module~modgvec_vmec_readin proc~initvmec InitVMEC proc~initvmec->module~modgvec_vmec_readin proc~vmec1d_visu VMEC1D_visu proc~vmec1d_visu->module~modgvec_vmec_readin proc~vmec3d_visu VMEC3D_visu proc~vmec3d_visu->module~modgvec_vmec_readin proc~vmec_evalsplmode VMEC_EvalSplMode proc~vmec_evalsplmode->module~modgvec_vmec_readin

Variables

Type Visibility Attributes Name Initial
real(kind=wp), public, parameter :: mu0 = 2.0_wp*twoPi*1.0E-7_wp

mu_0 (Permeability)

real(kind=wp), public, parameter :: version = 3.75_wp

version number

integer, public :: nFluxVMEC
integer, public :: mn_mode
integer, public :: mn_mode_nyq
integer, public :: nfp
logical, public :: lasym = .FALSE.
logical, public :: lrfp = .FALSE.
integer, public :: mPol
integer, public :: nTor
integer, public :: signgs = -1
real(kind=wp), public :: b0
real(kind=wp), public :: aMinor
real(kind=wp), public :: rMajor
real(kind=wp), public :: volume

vector parameters

real(kind=wp), public, ALLOCATABLE :: xm(:)
real(kind=wp), public, ALLOCATABLE :: xn(:)
real(kind=wp), public, ALLOCATABLE :: xm_nyq(:)
real(kind=wp), public, ALLOCATABLE :: xn_nyq(:)
real(kind=wp), public, ALLOCATABLE :: iotaf(:)
real(kind=wp), public, ALLOCATABLE :: presf(:)
real(kind=wp), public, ALLOCATABLE :: phi(:)
real(kind=wp), public, ALLOCATABLE :: chi(:)
real(kind=wp), public, ALLOCATABLE :: rmnc(:,:)
real(kind=wp), public, ALLOCATABLE :: rmns(:,:)
real(kind=wp), public, ALLOCATABLE :: zmns(:,:)
real(kind=wp), public, ALLOCATABLE :: zmnc(:,:)
character(len=4), public :: lambda_grid
real(kind=wp), public, ALLOCATABLE :: lmns(:,:)
real(kind=wp), public, ALLOCATABLE :: lmnc(:,:)
real(kind=wp), public, ALLOCATABLE :: gmnc(:,:)
real(kind=wp), public, ALLOCATABLE :: bmnc(:,:)
real(kind=wp), public, ALLOCATABLE :: gmns(:,:)
real(kind=wp), public, ALLOCATABLE :: bmns(:,:)

Interfaces

public interface FinalizeReadVMEC


Subroutines

public subroutine ReadVMEC(fileName, file_Format)

READ VMEC "wout" datafile, needs netcdf library!

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fileName
integer, intent(in) :: file_Format

public subroutine ReadNEMEC(fileName, itype, ok)

READ VMEC "wout" datafile generated by NEMEC, routine provided by Erika Strumberger, IPP Garching can be either ascii or binary ! !test output !! WRITE(UNIT_StdOut,"(6x,'hsve',10x'hiota',9x,'hmass',9x,'hpres',9x,'hphip', & !! 9x,'hbuco',9x,'hbvco',10x,'fphi',11x,'hvp',9x,'hoverr', & !! 8x,'hspecw')") ! DO j=1,nsin ! WRITE(UNIT_StdOut,"(13(2x,e12.4))") hsve(j),hiota(j),hmass(j),hpres(j),hphip(j), & ! hbuco(j),hbvco(j),fphi(j),hvp(j),hoverr(j),hspecw(j) ! END DO ! WRITE(UNIT_StdOut,"(6x,'fsve',10x,'fjcuru',8x,'fjcurv')") ! DO j=1,nsin ! WRITE(UNIT_StdOut,"(3(2x,e12.4))") fsve(j),fjcuru(j),fjcurv(j) ! END DO

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fileName
integer, intent(in) :: itype

=0: binary, =1: ascii

integer, intent(out) :: ok

public subroutine HalfToFull(nFlux, y_half, y_full)

Fit disrete data along flux surfaces as spline and then interpolate to full data

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nFlux

number of flux surfaces

real(kind=wp), intent(in) :: y_half(2:nFlux)

value number 2 at axis+1/2 grid point,last at 1-1/2dx

real(kind=wp), intent(out) :: y_full(1:nFlux)

values at full grid (first on axis)

public subroutine alloc_all()

allocate all arrays

Arguments

None

public subroutine FinalizeReadVMEC()

Arguments

None