ESMFL_Regrid Interface

public interface ESMFL_Regrid

Module Procedures

private subroutine BundleRegrid(srcBUN, dstBUN, rc)

The subroutine BundleRegrid regrids a source bundle (srcBUN) into a destination bundle (dstBUN) using hinterp. A bundle is thought of as being comprised of n 2D slices (nslices) distributed among the n PEs (ns_per_pe). The limits among each ns_per_pe region are given by n1 and n2 which are functions of mype (the local PE):

                                                     slice_pe
           1 --- n1(pe=0)  -                     -->    0
           2 ---            |                    -->    0
              .             |_  ns_per_pe(pe=0)         .
              .             |                           0
              .             |                           0
             --- n2(pe=0)  -                            0
             --- n1(pe=1)                               1
              .                                         .
              .                                         .
              .                                         .
             --- n2(pe=1)                               1
             --- n1(pe=2)                               2
              .                                         .
              .                                         .
              .                                         .
          ns ---                                  slice_pe(ns)
              .                                         .
              .                                         .
              .                                         .
     nslices --- n2(pe=n)                        -->   npe

Each slice is gathered, regridded (hinterp), and scattered on a PE determined by a slice-to-PE map (slice_pe) to “load balance” the work of the serial hinterp function.

History

  • 24Apr2006 Cruz Initial code.

Arguments

Type IntentOptional Attributes Name
type(ESMF_FieldBundle), intent(inout) :: srcBUN

source bundle

type(ESMF_FieldBundle), intent(inout) :: dstBUN

destination bundle

integer, intent(out), optional :: rc

return code

private subroutine StateRegrid(srcSTA, dstSTA, rc)

The subroutine StateRegrid regrids a state.

History

  • 19Apr2006 Cruz Initial code.

Arguments

Type IntentOptional Attributes Name
type(ESMF_State), intent(inout) :: srcSTA
type(ESMF_State), intent(inout) :: dstSTA
integer, intent(out), optional :: rc

return code

private subroutine FieldRegrid1(srcFLD, Sgrid2D, dstFLD, Dgrid2D, vm, rh, fname, rc)

The subroutine FieldRegrid1 regrids 3D fields using ESMF_FieldRegrid.

History

  • 17Oct2005 Cruz Initial code.

Arguments

Type IntentOptional Attributes Name
type(ESMF_Field), intent(in) :: srcFLD
type(ESMF_Grid), intent(in) :: Sgrid2D
type(ESMF_Field), intent(inout) :: dstFLD
type(ESMF_Grid), intent(in) :: Dgrid2D
type(ESMF_VM), intent(inout) :: vm
type(ESMF_RouteHandle), intent(inout) :: rh
character(len=*), intent(in) :: fname
integer, intent(out), optional :: rc

private subroutine BundleRegrid1(srcBUN, Sgrid2D, dstBUN, Dgrid2D, vm, rh, rc)

The subroutine BundleRegrid1 regrids members of a bundle using ESMF_FieldRegrid.

History

  • 17Apr2006 Cruz Initial code.

Arguments

Type IntentOptional Attributes Name
type(ESMF_FieldBundle), intent(inout) :: srcBUN
type(ESMF_Grid), intent(in) :: Sgrid2D
type(ESMF_FieldBundle), intent(inout) :: dstBUN
type(ESMF_Grid), intent(in) :: Dgrid2D
type(ESMF_VM), intent(inout) :: vm
type(ESMF_RouteHandle), intent(inout) :: rh
integer, intent(out), optional :: rc