-
Notifications
You must be signed in to change notification settings - Fork 19
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 #3019 from GEOS-ESM/feature/bmauer/fixes-#2986
Feature/bmauer/fixes #2986
- Loading branch information
Showing
4 changed files
with
109 additions
and
8 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
30 changes: 30 additions & 0 deletions
30
generic3g/vertical/FixedLevelsVerticalGrid/can_connect_to.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,30 @@ | ||
#include "MAPL_ErrLog.h" | ||
submodule (mapl3g_FixedLevelsVerticalGrid) can_connect_to_smod | ||
use mapl3g_MirrorVerticalGrid | ||
use mapl3g_ModelVerticalGrid | ||
use mapl3g_BasicVerticalGrid | ||
|
||
contains | ||
|
||
logical module function can_connect_to(this, src, rc) | ||
class(FixedLevelsVerticalGrid), intent(in) :: this | ||
class(VerticalGrid), intent(in) :: src | ||
integer, optional, intent(out) :: rc | ||
|
||
select type(src) | ||
type is (FixedLevelsVeritcalGrid) | ||
can_connect_to = this == src | ||
type is (BasicVerticalGrid) | ||
can_connect_to = (this%get_num_levels() == src%get_num_levels()) | ||
type is (MirrorVerticalGrid) | ||
can_connect_to = .true. | ||
type is (ModelVerticalGrid) | ||
can_connect_to = (this%get_num_levels() == src%get_num_levels()) | ||
class default | ||
_FAIL('BasicVerticalGrid can only connect to src BasicVerticalGrid, MirrorVerticalGrid, or ModelVerticalGrid instances.') | ||
end select | ||
|
||
_RETURN(_SUCCESS) | ||
end function can_connect_to | ||
|
||
end submodule |