make_field Function

public function make_field(geom, name, value, rc) result(field)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Geom), intent(in) :: geom
character(len=*), intent(in) :: name
real(kind=ESMF_KIND_R4), intent(in) :: value
integer, intent(out), optional :: rc

Return Value type(ESMF_Field)


Calls

proc~~make_field~~CallsGraph proc~make_field make_field esmf_fieldemptycomplete esmf_fieldemptycomplete proc~make_field->esmf_fieldemptycomplete esmf_fieldemptycreate esmf_fieldemptycreate proc~make_field->esmf_fieldemptycreate esmf_fieldemptyset esmf_fieldemptyset proc~make_field->esmf_fieldemptyset esmf_fieldget esmf_fieldget proc~make_field->esmf_fieldget

Called by

proc~~make_field~~CalledByGraph proc~make_field make_field proc~test_basic test_basic proc~test_basic->proc~make_field

Source Code

   function make_field(geom, name, value, rc) result(field)
      type(ESMF_Field) :: field
      type(ESMF_Geom), intent(in) :: geom
      character(*), intent(in) :: name
      real(kind=ESMF_KIND_R4), intent(in) :: value
      integer, optional, intent(out) :: rc

      real(kind=ESMF_KIND_R4), pointer :: x(:,:)
      integer :: status

      field = ESMF_FieldEmptyCreate(name=name, _RC2)
      call ESMF_FieldEmptySet(field, geom, _RC2)
      call ESMF_FieldEmptyComplete(field, typekind=ESMF_TypeKind_R4, _RC2)
      call ESMF_FieldGet(field, farrayptr=x, _RC2)
      x = value

   end function make_field