MOM6
mom_cap_methods::state_getfldptr Interface Reference

Detailed Description

Get field pointer.

Definition at line 36 of file mom_cap_methods.F90.

Private functions

subroutine state_getfldptr_1d (State, fldname, fldptr, rc)
 Get field pointer 1D. More...
 
subroutine state_getfldptr_2d (State, fldname, fldptr, rc)
 Get field pointer 2D. More...
 

Functions and subroutines

◆ state_getfldptr_1d()

subroutine mom_cap_methods::state_getfldptr::state_getfldptr_1d ( type(esmf_state), intent(in)  State,
character(len=*), intent(in)  fldname,
real(esmf_kind_r8), dimension(:), intent(in), pointer  fldptr,
integer, intent(out), optional  rc 
)
private

Get field pointer 1D.

Parameters
[in]stateESMF state
[in]fldnameField name
[in]fldptrPointer to the 1D field
[out]rcReturn code

Definition at line 619 of file mom_cap_methods.F90.

619  type(ESMF_State) , intent(in) :: State !< ESMF state
620  character(len=*) , intent(in) :: fldname !< Field name
621  real(ESMF_KIND_R8), pointer , intent(in) :: fldptr(:)!< Pointer to the 1D field
622  integer, optional , intent(out) :: rc !< Return code
623 
624  ! local variables
625  type(ESMF_Field) :: lfield
626  integer :: lrc
627  character(len=*),parameter :: subname='(MOM_cap:State_GetFldPtr)'
628 
629  call esmf_stateget(state, itemname=trim(fldname), field=lfield, rc=lrc)
630  if (esmf_logfounderror(rctocheck=rc, msg=esmf_logerr_passthru, &
631  line=__line__, &
632  file=__file__)) &
633  return ! bail out
634  call esmf_fieldget(lfield, farrayptr=fldptr, rc=lrc)
635  if (esmf_logfounderror(rctocheck=rc, msg=esmf_logerr_passthru, &
636  line=__line__, &
637  file=__file__)) &
638  return ! bail out
639 
640  if (present(rc)) rc = lrc
641 

◆ state_getfldptr_2d()

subroutine mom_cap_methods::state_getfldptr::state_getfldptr_2d ( type(esmf_state), intent(in)  State,
character(len=*), intent(in)  fldname,
real(esmf_kind_r8), dimension(:,:), intent(in), pointer  fldptr,
integer, intent(out), optional  rc 
)
private

Get field pointer 2D.

Parameters
[in]stateESMF state
[in]fldnameField name
[in]fldptrPointer to the 2D field
[out]rcReturn code

Definition at line 646 of file mom_cap_methods.F90.

646  type(ESMF_State) , intent(in) :: State !< ESMF state
647  character(len=*) , intent(in) :: fldname !< Field name
648  real(ESMF_KIND_R8), pointer , intent(in) :: fldptr(:,:)!< Pointer to the 2D field
649  integer, optional , intent(out) :: rc !< Return code
650 
651  ! local variables
652  type(ESMF_Field) :: lfield
653  integer :: lrc
654  character(len=*),parameter :: subname='(MOM_cap:State_GetFldPtr)'
655 
656  call esmf_stateget(state, itemname=trim(fldname), field=lfield, rc=lrc)
657  if (esmf_logfounderror(rctocheck=rc, msg=esmf_logerr_passthru, &
658  line=__line__, &
659  file=__file__)) &
660  return ! bail out
661  call esmf_fieldget(lfield, farrayptr=fldptr, rc=lrc)
662  if (esmf_logfounderror(rctocheck=rc, msg=esmf_logerr_passthru, &
663  line=__line__, &
664  file=__file__)) &
665  return ! bail out
666 
667  if (present(rc)) rc = lrc
668 

The documentation for this interface was generated from the following file: