
! written by plasma_cwrite.py
! input: plasma_state_spec.dat   version 2.055
! *** do not edit *** (use code generator instead)


  subroutine ccps_getset_k3_dummy
     return
  end subroutine ccps_getset_k3_dummy

subroutine psget_kccw_bphi(iobj, data, ierr)
    !! B_phi orientation: +1 means CCW viewed from above, -1 means
    !! clockwise (CW) viewed from above.
    use plasma_state_mod, only : plasma_state_container, plasma_state, &
                                & load_ps_container, rspec
    implicit NONE
    integer, intent(in) :: iobj(*)  ! object handle
     ! list of dimensions (if any)
    INTEGER, intent(out)  :: data ! to read to/write from
    integer, intent(out) :: ierr ! error code (0=OK)
    ! local
    type (plasma_state_container) :: ptr
    type (plasma_state), pointer  :: ss

    ierr = 0
    call ccps_argcheck('psget_kccw_bphi', iobj, ierr)
    if(ierr.ne.0) return
    ! proceed...
    call load_ps_container(iobj,ptr)
    ss => ptr % ps_ptr
    ! set
    data = ss % kccw_Bphi
end subroutine psget_kccw_bphi


subroutine psset_kccw_bphi(iobj, data, ierr)
    !! B_phi orientation: +1 means CCW viewed from above, -1 means
    !! clockwise (CW) viewed from above.
    use plasma_state_mod, only : plasma_state_container, plasma_state, &
                                & load_ps_container, rspec
    implicit NONE
    integer, intent(in) :: iobj(*)  ! object handle
     ! list of dimensions (if any)
    INTEGER, intent(in)  :: data ! to read to/write from
    integer, intent(out) :: ierr ! error code (0=OK)
    ! local
    type (plasma_state_container) :: ptr
    type (plasma_state), pointer  :: ss

    ierr = 0
    call ccps_argcheck('psset_kccw_bphi', iobj, ierr)
    if(ierr.ne.0) return
    ! proceed...
    call load_ps_container(iobj,ptr)
    ss => ptr % ps_ptr
    ! set
    ss % kccw_Bphi = data
end subroutine psset_kccw_bphi

