-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2839 from GEOS-ESM/MAPL-v3/smods/generic3g/v3_2
Complete the creation of submodules for GriddedComponentDriver.F90
- Loading branch information
Showing
7 changed files
with
116 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "MAPL_Generic.h" | ||
|
||
submodule (mapl3g_GriddedComponentDriver) add_export_coupler_smod | ||
implicit none | ||
|
||
contains | ||
|
||
module subroutine add_export_coupler(this, driver) | ||
class(GriddedComponentDriver), intent(inout) :: this | ||
type(GriddedComponentDriver), intent(in) :: driver | ||
call this%export_couplers%push_back(driver) | ||
end subroutine add_export_coupler | ||
|
||
end submodule add_export_coupler_smod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "MAPL_Generic.h" | ||
|
||
submodule (mapl3g_GriddedComponentDriver) add_import_coupler_smod | ||
implicit none | ||
|
||
contains | ||
|
||
module subroutine add_import_coupler(this, driver) | ||
class(GriddedComponentDriver), intent(inout) :: this | ||
type(GriddedComponentDriver), intent(in) :: driver | ||
call this%import_couplers%push_back(driver) | ||
end subroutine add_import_coupler | ||
|
||
|
||
end submodule add_import_coupler_smod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "MAPL_Generic.h" | ||
|
||
submodule (mapl3g_GriddedComponentDriver) get_gridcomp_smod | ||
implicit none | ||
|
||
contains | ||
|
||
module function get_gridcomp(this) result(gridcomp) | ||
use esmf, only: ESMF_GridComp | ||
type(ESMF_GridComp) :: gridcomp | ||
class(GriddedComponentDriver), intent(in) :: this | ||
gridcomp = this%gridcomp | ||
end function get_gridcomp | ||
|
||
end submodule get_gridcomp_smod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "MAPL_Generic.h" | ||
|
||
submodule (mapl3g_GriddedComponentDriver) get_name_smod | ||
implicit none | ||
|
||
contains | ||
|
||
module function get_name(this, rc) result(name) | ||
character(:), allocatable :: name | ||
class(GriddedComponentDriver), intent(in) :: this | ||
integer, optional, intent(out) :: rc | ||
|
||
integer :: status | ||
character(len=ESMF_MAXSTR) :: buffer | ||
|
||
call ESMF_GridCompGet(this%gridcomp, name=buffer, _RC) | ||
name = trim(buffer) | ||
|
||
_RETURN(ESMF_SUCCESS) | ||
end function get_name | ||
|
||
end submodule get_name_smod |
20 changes: 20 additions & 0 deletions
20
generic3g/GriddedComponentDriver/new_GriddedComponentDriver.F90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "MAPL_Generic.h" | ||
|
||
submodule (mapl3g_GriddedComponentDriver) new_GriddedComponentDriver_smod | ||
implicit none | ||
|
||
contains | ||
|
||
module function new_GriddedComponentDriver(gridcomp, clock, states) result(child) | ||
type(GriddedComponentDriver) :: child | ||
type(ESMF_GridComp), intent(in) :: gridcomp | ||
type(ESMF_Clock), intent(in) :: clock | ||
type(MultiState), intent(in) :: states | ||
|
||
child%gridcomp = gridcomp | ||
child%clock = clock | ||
child%states = states | ||
|
||
end function new_GriddedComponentDriver | ||
|
||
end submodule new_GriddedComponentDriver_smod |