From db8cd4d0cb6af1a69be1c1ce6f8f76ebd24dc06b Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Mon, 25 Nov 2024 10:23:50 -0500 Subject: [PATCH 01/10] Refactored Test_ModelVerticalGrid.pf --- generic3g/tests/Test_ModelVerticalGrid.pf | 77 +++++++++++++---------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/generic3g/tests/Test_ModelVerticalGrid.pf b/generic3g/tests/Test_ModelVerticalGrid.pf index 619d59c1cf3..f9ff44a515b 100644 --- a/generic3g/tests/Test_ModelVerticalGrid.pf +++ b/generic3g/tests/Test_ModelVerticalGrid.pf @@ -39,40 +39,30 @@ module Test_ModelVerticalGrid contains - subroutine setup(var_name, vgrid, rc) + subroutine setup_(var_name, geom, vgrid, registry, rc) character(*), intent(in) :: var_name - type(ModelVerticalGrid), intent(out) :: vgrid - integer, intent(out) :: rc + type(ESMF_Geom), intent(in) :: geom + type(ModelVerticalGrid), intent(in) :: vgrid + type(StateRegistry), intent(inout) :: registry + integer, optional, intent(out) :: rc type(VerticalDimSpec) :: vertical_dim_spec - type(ESMF_Geom) :: geom - type(VirtualConnectionPt) :: v_pt type(VariableSpec) :: var_spec class(StateItemSpec), allocatable :: fld_spec + type(VirtualConnectionPt) :: v_pt type(StateItemExtension), pointer :: extension class(StateItemSpec), pointer :: spec integer :: status - select case (var_name) - case ("PLE") + select case(var_name) + case("PLE") vertical_dim_spec = VERTICAL_DIM_EDGE - case ("PL") + case("PL") vertical_dim_spec = VERTICAL_DIM_CENTER case default - _FAIL("var_name should be one of PLE/PL, not" // trim(var_name)) + _FAIL("unsupported var name " // var_name) end select - rc = 0 - ! Inside user "set_geom" phase. - geom = make_geom(_RC) - vgrid = ModelVerticalGrid(standard_name="air_pressure", units="hPa", num_levels=LM) - call vgrid%add_short_name(edge="PLE", center="PL") - - ! inside OuterMeta - r = StateRegistry("dyn") - call vgrid%set_registry(r) ! MAPL_SetVerticalGrid(...) - - v_pt = VirtualConnectionPt(state_intent="export", short_name=var_name) var_spec = VariableSpec(& short_name=var_name, & state_intent=ESMF_STATEINTENT_EXPORT, & @@ -80,17 +70,39 @@ contains units="hPa", & vertical_dim_spec=vertical_dim_spec, & default_value=3.) - allocate(fld_spec, source=make_itemSpec(var_spec, r, rc=status)) - _VERIFY(status) + allocate(fld_spec, source=make_itemSpec(var_spec, r, rc=status)); _VERIFY(status) call fld_spec%set_geometry(geom=geom, vertical_grid=vgrid, _RC) - call r%add_primary_spec(v_pt, fld_spec) - - extension => r%get_primary_extension(v_pt, _RC) + v_pt = VirtualConnectionPt(state_intent="export", short_name=var_name) + call registry%add_primary_spec(v_pt, fld_spec) + extension => registry%get_primary_extension(v_pt, _RC) spec => extension%get_spec() call spec%set_active() call spec%create(_RC) call spec%allocate(_RC) + + _RETURN(_SUCCESS) + end subroutine setup_ + + subroutine setup(geom, vgrid, rc) + type(ESMF_Geom), intent(out) :: geom + type(ModelVerticalGrid), intent(out) :: vgrid + integer, intent(out) :: rc + + integer :: status + + ! geom, registry etc. + geom = make_geom(_RC) + r = StateRegistry("dyn") + + vgrid = ModelVerticalGrid(standard_name="air_pressure", units="hPa", num_levels=LM) + call vgrid%add_short_name(edge="PLE", center="PL") + call vgrid%set_registry(r) ! MAPL_SetVerticalGrid(...) + + call setup_("PLE", geom, vgrid, r, _RC) + call setup_("PL", geom, vgrid, r, _RC) + + _RETURN(_SUCCESS) end subroutine setup function make_geom(rc) result(geom) @@ -129,9 +141,10 @@ contains type(MultiState) :: multi_state type(StateItemExtension), pointer :: extension type(ESMF_Field) :: ple + type(ESMF_Geom) :: geom integer :: rc, status - call setup("PLE", vgrid, _RC) + call setup(geom, vgrid, _RC) ple_pt = VirtualConnectionPt(state_intent="export", short_name="PLE") extension => r%get_primary_extension(ple_pt, _RC) @@ -144,6 +157,7 @@ contains allocate(localElementCount(rank)) call ESMF_FieldGet(ple, localElementCount=localElementCount, _RC) @assert_that(localElementCount, is(equal_to([IM,JM,LM+1]))) + _UNUSED_DUMMY(this) end subroutine test_created_fields_have_num_levels @@ -160,8 +174,7 @@ contains integer :: rc, status real(ESMF_KIND_R4), pointer :: a(:,:,:) - call setup("PLE", vgrid, _RC) - geom = make_geom(_RC) + call setup(geom, vgrid, _RC) call vgrid%get_coordinate_field( & vcoord, coupler, & @@ -175,6 +188,7 @@ contains call ESMF_FieldGet(vcoord, fArrayPtr=a, _RC) @assert_that(a, every_item(is(equal_to(3.)))) + _UNUSED_DUMMY(this) end subroutine test_get_coordinate_field_simple @@ -194,8 +208,7 @@ contains type(GriddedComponentDriver), pointer :: coupler integer :: i, rc - call setup("PLE", vgrid, _RC) - geom = make_geom(_RC) + call setup(geom, vgrid, _RC) call vgrid%get_coordinate_field( & vcoord, coupler, & @@ -220,6 +233,7 @@ contains end do @assert_that(shape(a), is(equal_to([IM, JM, LM+1]))) @assert_that(a, every_item(is(equal_to(300.)))) + _UNUSED_DUMMY(this) end subroutine test_get_coordinate_field_change_units_edge @@ -239,8 +253,7 @@ contains type(GriddedComponentDriver), pointer :: coupler integer :: i, rc - call setup("PL", vgrid, _RC) - geom = make_geom(_RC) + call setup(geom, vgrid, _RC) call vgrid%get_coordinate_field( & vcoord, coupler, & From 7a3ff63e946b728c2af42517192da883a7bd7b2e Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Mon, 25 Nov 2024 11:16:32 -0500 Subject: [PATCH 02/10] Updated ModelVerticalGrid::write_formatted --- generic3g/vertical/ModelVerticalGrid.F90 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/generic3g/vertical/ModelVerticalGrid.F90 b/generic3g/vertical/ModelVerticalGrid.F90 index 09b05dbe010..875e809c338 100644 --- a/generic3g/vertical/ModelVerticalGrid.F90 +++ b/generic3g/vertical/ModelVerticalGrid.F90 @@ -164,10 +164,18 @@ subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) integer, intent(out) :: iostat character(*), intent(inout) :: iomsg - write(unit, "(a, a, g0, a)", iostat=iostat, iomsg=iomsg) & - "ModelVerticalGrid(", & - "num levels: ", this%num_levels, & - ")" + write(unit, "(a)", iostat=iostat, iomsg=iomsg) "ModelVerticalGrid(" + if (allocated(this%standard_name)) then + write(unit, "(a, 3x, a, a)", iostat=iostat, iomsg=iomsg) new_line("a"), "standard name: ", this%standard_name + end if + write(unit, "(a, 3x, a, g0)", iostat=iostat, iomsg=iomsg) new_line("a"), "num_levels: ", this%num_levels + if (allocated(this%short_name_edge)) then + write(unit, "(a, 3x, a, a)", iostat=iostat, iomsg=iomsg) new_line("a"), "field (edge): ", this%short_name_edge + end if + if (allocated(this%short_name_center)) then + write(unit, "(a, 3x, a, a)", iostat=iostat, iomsg=iomsg) new_line("a"), "field (center): ", this%short_name_center + end if + write(unit, "(a)") ")" _UNUSED_DUMMY(iotype) _UNUSED_DUMMY(v_list) From ebe3e79ac942b63907b4ae51a404c14f9445f50b Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Mon, 25 Nov 2024 11:52:23 -0500 Subject: [PATCH 03/10] Introduced field_edge/center in config file for model vertical grid, so as not to hardwire them in ComponentSpecParser::parse_geometry_spec --- .../parse_geometry_spec.F90 | 90 ++++++++++++------- .../scenarios/vertical_regridding_2/A.yaml | 2 + .../scenarios/vertical_regridding_2/C.yaml | 2 + .../scenarios/vertical_regridding_3/DYN.yaml | 2 + 4 files changed, 63 insertions(+), 33 deletions(-) diff --git a/generic3g/ComponentSpecParser/parse_geometry_spec.F90 b/generic3g/ComponentSpecParser/parse_geometry_spec.F90 index 0e8bbc66d82..3730f8dc44d 100644 --- a/generic3g/ComponentSpecParser/parse_geometry_spec.F90 +++ b/generic3g/ComponentSpecParser/parse_geometry_spec.F90 @@ -32,10 +32,7 @@ module function parse_geometry_spec(mapl_cfg, registry, rc) result(geometry_spec type(ESMF_HConfig) :: vertical_grid_cfg type(GeomManager), pointer :: geom_mgr class(GeomSpec), allocatable :: geom_spec - integer :: num_levels - character(:), allocatable :: vertical_grid_class, standard_name, units class(VerticalGrid), allocatable :: vertical_grid - real, allocatable :: levels(:) has_geometry_section = ESMF_HConfigIsDefined(mapl_cfg,keyString=COMPONENT_GEOMETRY_SECTION, _RC) _RETURN_UNLESS(has_geometry_section) @@ -96,39 +93,66 @@ module function parse_geometry_spec(mapl_cfg, registry, rc) result(geometry_spec end if if (has_vertical_grid) then - vertical_grid_class = ESMF_HConfigAsString(vertical_grid_cfg, keyString='class', _RC) - select case(vertical_grid_class) - case('basic') - num_levels = ESMF_HConfigAsI4(vertical_grid_cfg, keyString='num_levels', _RC) - vertical_grid = BasicVerticalGrid(num_levels) - case('fixed_levels') - standard_name = ESMF_HConfigAsString(vertical_grid_cfg, keyString='standard_name', _RC) - units = ESMF_HConfigAsString(vertical_grid_cfg, keyString='units', _RC) - levels = ESMF_HConfigAsR4Seq(vertical_grid_cfg, keyString='levels' ,_RC) - vertical_grid = FixedLevelsVerticalGrid(standard_name, levels, units) - case('model') - standard_name = ESMF_HConfigAsString(vertical_grid_cfg, keyString='standard_name', _RC) - units = ESMF_HConfigAsString(vertical_grid_cfg, keyString='units', _RC) - num_levels = ESMF_HConfigAsI4(vertical_grid_cfg, keyString='num_levels', _RC) - vertical_grid = ModelVerticalGrid(standard_name=standard_name, units=units, num_levels=num_levels) - select type(vertical_grid) - type is(ModelVerticalGrid) - call vertical_grid%set_registry(registry) - if (standard_name == "air_pressure") then - call vertical_grid%add_short_name(edge="PLE", center="PL") - else if (standard_name == "height") then - call vertical_grid%add_short_name(edge="ZLE", center="ZL") - else - _FAIL("unsupported standard name ["//standard_name//"]") - end if - end select - case default - _FAIL('vertical grid class '//vertical_grid_class//' not supported') - end select - end if + call parse_vertical_grid_(vertical_grid_cfg, registry, vertical_grid, _RC) + end if geometry_spec = GeometrySpec(geom_spec=geom_spec, vertical_grid=vertical_grid) _RETURN(_SUCCESS) end function parse_geometry_spec + subroutine parse_vertical_grid_(vertical_grid_cfg, registry, vertical_grid, rc) + type(ESMF_HConfig), intent(in) :: vertical_grid_cfg + type(StateRegistry), target, intent(in) :: registry + class(VerticalGrid), allocatable, intent(out) :: vertical_grid + integer, optional, intent(out) :: rc + + integer :: num_levels + character(:), allocatable :: class, standard_name, units + real, allocatable :: levels(:) + integer :: status + + class = ESMF_HConfigAsString(vertical_grid_cfg, keyString="class", _RC) + select case(class) + case("basic") + num_levels = ESMF_HConfigAsI4(vertical_grid_cfg, keyString="num_levels", _RC) + vertical_grid = BasicVerticalGrid(num_levels) + case("fixed_levels") + standard_name = ESMF_HConfigAsString(vertical_grid_cfg, keyString="standard_name", _RC) + units = ESMF_HConfigAsString(vertical_grid_cfg, keyString="units", _RC) + levels = ESMF_HConfigAsR4Seq(vertical_grid_cfg, keyString="levels" ,_RC) + vertical_grid = FixedLevelsVerticalGrid(standard_name, levels, units) + case("model") + call parse_model_vertical_grid_(vertical_grid_cfg, registry, vertical_grid, _RC) + case default + _FAIL("vertical grid class "//class//" not supported") + end select + + _RETURN(_SUCCESS) + end subroutine parse_vertical_grid_ + + subroutine parse_model_vertical_grid_(vertical_grid_cfg, registry, vertical_grid, rc) + type(ESMF_HConfig), intent(in) :: vertical_grid_cfg + type(StateRegistry), target, intent(in) :: registry + class(VerticalGrid), allocatable, intent(out) :: vertical_grid + integer, optional, intent(out) :: rc + + integer :: num_levels + character(:), allocatable :: standard_name, units, field_edge, field_center + integer :: status + + standard_name = ESMF_HConfigAsString(vertical_grid_cfg, keyString="standard_name", _RC) + units = ESMF_HConfigAsString(vertical_grid_cfg, keyString="units", _RC) + num_levels = ESMF_HConfigAsI4(vertical_grid_cfg, keyString="num_levels", _RC) + vertical_grid = ModelVerticalGrid(standard_name=standard_name, units=units, num_levels=num_levels) + field_edge = ESMF_HConfigAsString(vertical_grid_cfg, keyString="field_edge", _RC) + field_center = ESMF_HConfigAsString(vertical_grid_cfg, keyString="field_center", _RC) + select type(vertical_grid) + type is(ModelVerticalGrid) + call vertical_grid%set_registry(registry) + call vertical_grid%add_short_name(edge=field_edge, center=field_center) + end select + + _RETURN(_SUCCESS) + end subroutine parse_model_vertical_grid_ + end submodule parse_geometry_spec_smod diff --git a/generic3g/tests/scenarios/vertical_regridding_2/A.yaml b/generic3g/tests/scenarios/vertical_regridding_2/A.yaml index fba35c9925b..1a9e377d8a9 100644 --- a/generic3g/tests/scenarios/vertical_regridding_2/A.yaml +++ b/generic3g/tests/scenarios/vertical_regridding_2/A.yaml @@ -10,6 +10,8 @@ mapl: vertical_grid: class: model standard_name: air_pressure + field_edge: PLE + field_center: PL units: hPa num_levels: 4 diff --git a/generic3g/tests/scenarios/vertical_regridding_2/C.yaml b/generic3g/tests/scenarios/vertical_regridding_2/C.yaml index 6c440767bfb..fab99d8a0a6 100644 --- a/generic3g/tests/scenarios/vertical_regridding_2/C.yaml +++ b/generic3g/tests/scenarios/vertical_regridding_2/C.yaml @@ -10,6 +10,8 @@ mapl: vertical_grid: class: model standard_name: height + field_edge: ZLE + field_center: ZL units: m num_levels: 4 diff --git a/generic3g/tests/scenarios/vertical_regridding_3/DYN.yaml b/generic3g/tests/scenarios/vertical_regridding_3/DYN.yaml index 71deec526e2..0c18b5d37f7 100644 --- a/generic3g/tests/scenarios/vertical_regridding_3/DYN.yaml +++ b/generic3g/tests/scenarios/vertical_regridding_3/DYN.yaml @@ -10,6 +10,8 @@ mapl: vertical_grid: class: model standard_name: air_pressure + field_edge: PLE + field_center: PL units: hPa num_levels: 4 From 63f1e440a28bb226c5fed8f2a78a8a59ea9dec98 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Mon, 25 Nov 2024 11:59:31 -0500 Subject: [PATCH 04/10] Minor formatting change --- generic3g/ComponentSpecParser/parse_geometry_spec.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic3g/ComponentSpecParser/parse_geometry_spec.F90 b/generic3g/ComponentSpecParser/parse_geometry_spec.F90 index 3730f8dc44d..0ee57239c65 100644 --- a/generic3g/ComponentSpecParser/parse_geometry_spec.F90 +++ b/generic3g/ComponentSpecParser/parse_geometry_spec.F90 @@ -94,7 +94,7 @@ module function parse_geometry_spec(mapl_cfg, registry, rc) result(geometry_spec if (has_vertical_grid) then call parse_vertical_grid_(vertical_grid_cfg, registry, vertical_grid, _RC) - end if + end if geometry_spec = GeometrySpec(geom_spec=geom_spec, vertical_grid=vertical_grid) _RETURN(_SUCCESS) From 94d76b590dabdb42f9daca83bce8f606477767ea Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Mon, 25 Nov 2024 14:27:46 -0500 Subject: [PATCH 05/10] Using VerticalGrid::can_connect_to to verify is two vertical grids can connect --- generic3g/specs/FieldSpec.F90 | 4 +- generic3g/vertical/BasicVerticalGrid.F90 | 27 ++++++++----- .../BasicVerticalGrid/can_connect_to.F90 | 27 ------------- generic3g/vertical/CMakeLists.txt | 12 ------ .../vertical/FixedLevelsVerticalGrid.F90 | 24 +++++++++--- .../can_connect_to.F90 | 30 --------------- generic3g/vertical/MirrorVerticalGrid.F90 | 6 +-- generic3g/vertical/ModelVerticalGrid.F90 | 37 +++++++++++++----- .../ModelVerticalGrid/can_connect_to.F90 | 38 ------------------- generic3g/vertical/VerticalGrid.F90 | 4 +- generic3g/vertical/t.F90 | 12 ------ 11 files changed, 70 insertions(+), 151 deletions(-) delete mode 100644 generic3g/vertical/BasicVerticalGrid/can_connect_to.F90 delete mode 100644 generic3g/vertical/FixedLevelsVerticalGrid/can_connect_to.F90 delete mode 100644 generic3g/vertical/ModelVerticalGrid/can_connect_to.F90 delete mode 100644 generic3g/vertical/t.F90 diff --git a/generic3g/specs/FieldSpec.F90 b/generic3g/specs/FieldSpec.F90 index 91efbacd0ab..ee02a3b1249 100644 --- a/generic3g/specs/FieldSpec.F90 +++ b/generic3g/specs/FieldSpec.F90 @@ -851,10 +851,10 @@ subroutine adapt_vertical_grid(this, spec, action, rc) select type (spec) type is (FieldSpec) + _ASSERT(spec%vertical_grid%can_connect_to(this%vertical_grid), "cannot connect vertical grids") ! TODO: DO WE NEED TO RESTRICT SPEC's VERTICAL GRID TO MODEL? ! NOTE: we cannot import ModelVerticalGrid (circular dependency) _ASSERT(spec%vertical_grid%get_units() == this%vertical_grid%get_units(), 'units must match') - ! Field (to be regridded) should have the same typekind as the underlying vertical grid ! TODO: Should we add a typekind class variable to VerticalGrid? _ASSERT(spec%typekind == this%typekind, 'typekind must match') call spec%vertical_grid%get_coordinate_field( & @@ -920,7 +920,7 @@ logical function same_vertical_grid(src_grid, dst_grid, rc) class default same_vertical_grid = .false. end select - class default + class default ! ModelVerticalGrid same_vertical_grid = .false. ! _FAIL("not implemented yet") end select diff --git a/generic3g/vertical/BasicVerticalGrid.F90 b/generic3g/vertical/BasicVerticalGrid.F90 index cd8546a46db..54d2da7bbcf 100644 --- a/generic3g/vertical/BasicVerticalGrid.F90 +++ b/generic3g/vertical/BasicVerticalGrid.F90 @@ -4,6 +4,7 @@ module mapl3g_BasicVerticalGrid use mapl_ErrorHandling use mapl3g_VerticalGrid + use mapl3g_MirrorVerticalGrid use mapl3g_GriddedComponentDriver use mapl3g_VerticalDimSpec use esmf, only: ESMF_TypeKind_Flag @@ -37,15 +38,6 @@ module mapl3g_BasicVerticalGrid module procedure new_BasicVerticalGrid end interface BasicVerticalGrid - interface - module function can_connect_to(this, src, rc) - logical :: can_connect_to - class(BasicVerticalGrid), intent(in) :: this - class(VerticalGrid), intent(in) :: src - integer, optional, intent(out) :: rc - end function - end interface - contains function new_BasicVerticalGrid(num_levels) result(vertical_grid) @@ -84,6 +76,23 @@ subroutine get_coordinate_field(this, field, coupler, standard_name, geom, typek _UNUSED_DUMMY(vertical_dim_spec) end subroutine get_coordinate_field + logical function can_connect_to(this, dst, rc) + class(BasicVerticalGrid), intent(in) :: this + class(VerticalGrid), intent(in) :: dst + integer, optional, intent(out) :: rc + + select type(dst) + type is (BasicVerticalGrid) + can_connect_to = (this%get_num_levels() == dst%get_num_levels()) + type is (MirrorVerticalGrid) + can_connect_to = .true. + class default + _FAIL("BasicVerticalGrid can only connect to BasicVerticalGrid, or MirrorVerticalGrid") + end select + + _RETURN(_SUCCESS) + end function can_connect_to + elemental logical function equal_to(a, b) type(BasicVerticalGrid), intent(in) :: a, b equal_to = a%num_levels == b%num_levels diff --git a/generic3g/vertical/BasicVerticalGrid/can_connect_to.F90 b/generic3g/vertical/BasicVerticalGrid/can_connect_to.F90 deleted file mode 100644 index 3cc14928c4f..00000000000 --- a/generic3g/vertical/BasicVerticalGrid/can_connect_to.F90 +++ /dev/null @@ -1,27 +0,0 @@ -#include "MAPL_ErrLog.h" -submodule (mapl3g_BasicVerticalGrid) can_connect_to_smod - use mapl3g_MirrorVerticalGrid - use mapl3g_ModelVerticalGrid - -contains - - logical module function can_connect_to(this, src, rc) - class(BasicVerticalGrid), intent(in) :: this - class(VerticalGrid), intent(in) :: src - integer, optional, intent(out) :: rc - - select type(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 diff --git a/generic3g/vertical/CMakeLists.txt b/generic3g/vertical/CMakeLists.txt index 6abd1984d9b..13ade63b315 100644 --- a/generic3g/vertical/CMakeLists.txt +++ b/generic3g/vertical/CMakeLists.txt @@ -9,15 +9,3 @@ target_sources(MAPL.generic3g PRIVATE VerticalLinearMap.F90 CSR_SparseMatrix.F90 ) - -esma_add_fortran_submodules( - TARGET MAPL.generic3g - SUBDIRECTORY BasicVerticalGrid - SOURCES can_connect_to.F90 -) - -esma_add_fortran_submodules( - TARGET MAPL.generic3g - SUBDIRECTORY ModelVerticalGrid - SOURCES can_connect_to.F90 -) diff --git a/generic3g/vertical/FixedLevelsVerticalGrid.F90 b/generic3g/vertical/FixedLevelsVerticalGrid.F90 index 0e347753ee5..30a6eeddec1 100644 --- a/generic3g/vertical/FixedLevelsVerticalGrid.F90 +++ b/generic3g/vertical/FixedLevelsVerticalGrid.F90 @@ -4,6 +4,7 @@ module mapl3g_FixedLevelsVerticalGrid use mapl_ErrorHandling use mapl3g_VerticalGrid + use mapl3g_MirrorVerticalGrid use mapl3g_VerticalStaggerLoc use mapl3g_FieldCreate use mapl3g_GriddedComponentDriver @@ -95,15 +96,26 @@ subroutine get_coordinate_field(this, field, coupler, standard_name, geom, typek _UNUSED_DUMMY(vertical_dim_spec) end subroutine get_coordinate_field - logical function can_connect_to(this, src, rc) + logical function can_connect_to(this, dst, rc) class(FixedLevelsVerticalGrid), intent(in) :: this - class(VerticalGrid), intent(in) :: src + class(VerticalGrid), intent(in) :: dst integer, optional, intent(out) :: rc - can_connect_to = .false. - _FAIL("not implemented") - _UNUSED_DUMMY(this) - _UNUSED_DUMMY(src) + if (this%same_id(dst)) then + can_connect_to = .true. + _RETURN(_SUCCESS) + end if + + select type(dst) + type is (FixedLevelsVerticalGrid) + can_connect_to = .true. + type is (MirrorVerticalGrid) + can_connect_to = .true. + class default + _FAIL("FixedLevelsVerticalGrid can only connect to a FixedLevelsVerticalGrid, or MirrorVerticalGrid") + end select + + _RETURN(_SUCCESS) end function can_connect_to subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) diff --git a/generic3g/vertical/FixedLevelsVerticalGrid/can_connect_to.F90 b/generic3g/vertical/FixedLevelsVerticalGrid/can_connect_to.F90 deleted file mode 100644 index 62b6bb6ea19..00000000000 --- a/generic3g/vertical/FixedLevelsVerticalGrid/can_connect_to.F90 +++ /dev/null @@ -1,30 +0,0 @@ -#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 diff --git a/generic3g/vertical/MirrorVerticalGrid.F90 b/generic3g/vertical/MirrorVerticalGrid.F90 index c1266aff89d..98f04424f81 100644 --- a/generic3g/vertical/MirrorVerticalGrid.F90 +++ b/generic3g/vertical/MirrorVerticalGrid.F90 @@ -69,16 +69,16 @@ subroutine get_coordinate_field(this, field, coupler, standard_name, geom, typek _UNUSED_DUMMY(vertical_dim_spec) end subroutine get_coordinate_field - logical function can_connect_to(this, src, rc) + logical function can_connect_to(this, dst, rc) class(MirrorVerticalGrid), intent(in) :: this - class(VerticalGrid), intent(in) :: src + class(VerticalGrid), intent(in) :: dst integer, optional, intent(out) :: rc can_connect_to = .false. _RETURN(_SUCCESS) _UNUSED_DUMMY(this) - _UNUSED_DUMMY(src) + _UNUSED_DUMMY(dst) end function can_connect_to subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) diff --git a/generic3g/vertical/ModelVerticalGrid.F90 b/generic3g/vertical/ModelVerticalGrid.F90 index 875e809c338..33dfe9caeb0 100644 --- a/generic3g/vertical/ModelVerticalGrid.F90 +++ b/generic3g/vertical/ModelVerticalGrid.F90 @@ -3,7 +3,10 @@ module mapl3g_ModelVerticalGrid use mapl_ErrorHandling + use mapl_KeywordEnforcer use mapl3g_VerticalGrid + use mapl3g_MirrorVerticalGrid + use mapl3g_FixedLevelsVerticalGrid use mapl3g_StateRegistry use mapl3g_VirtualConnectionPt use mapl3g_StateItemSpec @@ -14,7 +17,6 @@ module mapl3g_ModelVerticalGrid use mapl3g_ExtensionAction use mapl3g_GriddedComponentDriver use mapl3g_VerticalDimSpec - use mapl_KeywordEnforcer use esmf implicit none @@ -46,15 +48,6 @@ module mapl3g_ModelVerticalGrid procedure new_ModelVerticalGrid_basic end interface ModelVerticalGrid - interface - module function can_connect_to(this, src, rc) - logical :: can_connect_to - class(ModelVerticalGrid), intent(in) :: this - class(VerticalGrid), intent(in) :: src - integer, optional, intent(out) :: rc - end function - end interface - ! TODO: ! - Ensure that there really is a vertical dimension @@ -181,4 +174,28 @@ subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) _UNUSED_DUMMY(v_list) end subroutine write_formatted + logical function can_connect_to(this, dst, rc) + class(ModelVerticalGrid), intent(in) :: this + class(VerticalGrid), intent(in) :: dst + integer, optional, intent(out) :: rc + + integer :: status + + if (this%same_id(dst)) then + can_connect_to = .true. + _RETURN(_SUCCESS) + end if + + select type (dst) + type is (MirrorVerticalGrid) + can_connect_to = .true. + type is (FixedLevelsVerticalGrid) + can_connect_to = .true. + class default + _FAIL("ModelVerticalGrid can only connect to FixedLevelsVerticalGrid, or MirrorVerticalGrid") + end select + + _RETURN(_SUCCESS) + end function can_connect_to + end module mapl3g_ModelVerticalGrid diff --git a/generic3g/vertical/ModelVerticalGrid/can_connect_to.F90 b/generic3g/vertical/ModelVerticalGrid/can_connect_to.F90 deleted file mode 100644 index 638344963be..00000000000 --- a/generic3g/vertical/ModelVerticalGrid/can_connect_to.F90 +++ /dev/null @@ -1,38 +0,0 @@ -#include "MAPL_ErrLog.h" - -submodule (mapl3g_ModelVerticalGrid) can_connect_to_smod - - use mapl3g_BasicVerticalGrid - use mapl3g_MirrorVerticalGrid - -contains - - logical module function can_connect_to(this, src, rc) - use mapl3g_MirrorVerticalGrid, only: MirrorVerticalGrid - use mapl3g_BasicVerticalGrid, only: BasicVerticalGrid - class(ModelVerticalGrid), intent(in) :: this - class(VerticalGrid), intent(in) :: src - integer, optional, intent(out) :: rc - - integer :: status - - if (this%same_id(src)) then - can_connect_to = .true. - _RETURN(_SUCCESS) - end if - - select type (src) - type is (MirrorVerticalGrid) - can_connect_to = .true. - _RETURN(_SUCCESS) - type is (BasicVerticalGrid) - can_connect_to = (this%get_num_levels() == src%get_num_levels()) - _RETURN(_SUCCESS) - class default - _FAIL('unsupported subclass of VerticalGrid') - end select - - _RETURN(_SUCCESS) - end function can_connect_to - -end submodule can_connect_to_smod diff --git a/generic3g/vertical/VerticalGrid.F90 b/generic3g/vertical/VerticalGrid.F90 index 49d0506c88d..1fdf5c66076 100644 --- a/generic3g/vertical/VerticalGrid.F90 +++ b/generic3g/vertical/VerticalGrid.F90 @@ -52,10 +52,10 @@ subroutine I_get_coordinate_field(this, field, coupler, standard_name, geom, typ integer, optional, intent(out) :: rc end subroutine I_get_coordinate_field - logical function I_can_connect_to(this, src, rc) result(can_connect_to) + logical function I_can_connect_to(this, dst, rc) result(can_connect_to) import VerticalGrid class(VerticalGrid), intent(in) :: this - class(VerticalGrid), intent(in) :: src + class(VerticalGrid), intent(in) :: dst integer, optional, intent(out) :: rc end function I_can_connect_to diff --git a/generic3g/vertical/t.F90 b/generic3g/vertical/t.F90 deleted file mode 100644 index 38471ceb3ef..00000000000 --- a/generic3g/vertical/t.F90 +++ /dev/null @@ -1,12 +0,0 @@ -module A - implicit none - - generic s => s1 -contains - - subroutine s1(x) - real, intent(inout) :: x - - x = x + 1 - end subroutine s1 -end module A From a87817d4a61ef2448d4823a95943f18a796251cb Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 26 Nov 2024 11:06:27 -0500 Subject: [PATCH 06/10] Minor change - updated message --- generic3g/vertical/FixedLevelsVerticalGrid.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic3g/vertical/FixedLevelsVerticalGrid.F90 b/generic3g/vertical/FixedLevelsVerticalGrid.F90 index 30a6eeddec1..cd59462dae9 100644 --- a/generic3g/vertical/FixedLevelsVerticalGrid.F90 +++ b/generic3g/vertical/FixedLevelsVerticalGrid.F90 @@ -112,7 +112,7 @@ logical function can_connect_to(this, dst, rc) type is (MirrorVerticalGrid) can_connect_to = .true. class default - _FAIL("FixedLevelsVerticalGrid can only connect to a FixedLevelsVerticalGrid, or MirrorVerticalGrid") + _FAIL("FixedLevelsVerticalGrid can only connect to FixedLevelsVerticalGrid, or MirrorVerticalGrid") end select _RETURN(_SUCCESS) From 23da80a9b5fcf2b0097de6c7e77e525594a18171 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 26 Nov 2024 13:20:33 -0500 Subject: [PATCH 07/10] Added VerticalGrid::is_identical_to to check if the dst grid is identical to this --- generic3g/specs/FieldSpec.F90 | 45 +------------- generic3g/vertical/BasicVerticalGrid.F90 | 20 +++---- .../vertical/FixedLevelsVerticalGrid.F90 | 30 ++++++++++ generic3g/vertical/MirrorVerticalGrid.F90 | 13 +++++ generic3g/vertical/ModelVerticalGrid.F90 | 58 ++++++++++++++++++- generic3g/vertical/VerticalGrid.F90 | 8 +++ 6 files changed, 118 insertions(+), 56 deletions(-) diff --git a/generic3g/specs/FieldSpec.F90 b/generic3g/specs/FieldSpec.F90 index ee02a3b1249..87cb24d605b 100644 --- a/generic3g/specs/FieldSpec.F90 +++ b/generic3g/specs/FieldSpec.F90 @@ -872,7 +872,6 @@ subroutine adapt_vertical_grid(this, spec, action, rc) end subroutine adapt_vertical_grid logical function adapter_match_vertical_grid(this, spec, rc) result(match) - class(VerticalGridAdapter), intent(in) :: this class(StateItemSpec), intent(in) :: spec integer, optional, intent(out) :: rc @@ -882,52 +881,10 @@ logical function adapter_match_vertical_grid(this, spec, rc) result(match) match = .false. select type (spec) type is (FieldSpec) - match = same_vertical_grid(spec%vertical_grid, this%vertical_grid, _RC) + match = spec%vertical_grid%is_identical_to(this%vertical_grid) end select _RETURN(_SUCCESS) - - contains - - logical function same_vertical_grid(src_grid, dst_grid, rc) - class(VerticalGrid), intent(in) :: src_grid - class(VerticalGrid), allocatable, intent(in) :: dst_grid - integer, optional, intent(out) :: rc - - same_vertical_grid = .false. - if (.not. allocated(dst_grid)) then - same_vertical_grid = .true. - _RETURN(_SUCCESS) ! mirror grid - end if - - same_vertical_grid = src_grid%same_id(dst_grid) - if (same_vertical_grid) then - _RETURN(_SUCCESS) - end if - - select type(src_grid) - type is(BasicVerticalGrid) - select type(dst_grid) - type is(BasicVerticalGrid) - same_vertical_grid = (src_grid%get_num_levels() == dst_grid%get_num_levels()) - class default - _FAIL("not implemented yet") - end select - type is(FixedLevelsVerticalGrid) - select type(dst_grid) - type is(FixedLevelsVerticalGrid) - same_vertical_grid = (src_grid == dst_grid) - class default - same_vertical_grid = .false. - end select - class default ! ModelVerticalGrid - same_vertical_grid = .false. - ! _FAIL("not implemented yet") - end select - - _RETURN(_SUCCESS) - end function same_vertical_grid - end function adapter_match_vertical_grid function new_TypekindAdapter(typekind) result(typekind_adapter) diff --git a/generic3g/vertical/BasicVerticalGrid.F90 b/generic3g/vertical/BasicVerticalGrid.F90 index 54d2da7bbcf..a823ec623d2 100644 --- a/generic3g/vertical/BasicVerticalGrid.F90 +++ b/generic3g/vertical/BasicVerticalGrid.F90 @@ -23,6 +23,7 @@ module mapl3g_BasicVerticalGrid procedure :: get_num_levels procedure :: get_coordinate_field procedure :: can_connect_to + procedure :: is_identical_to procedure :: write_formatted end type BasicVerticalGrid @@ -81,18 +82,17 @@ logical function can_connect_to(this, dst, rc) class(VerticalGrid), intent(in) :: dst integer, optional, intent(out) :: rc - select type(dst) - type is (BasicVerticalGrid) - can_connect_to = (this%get_num_levels() == dst%get_num_levels()) - type is (MirrorVerticalGrid) - can_connect_to = .true. - class default - _FAIL("BasicVerticalGrid can only connect to BasicVerticalGrid, or MirrorVerticalGrid") - end select - - _RETURN(_SUCCESS) + _FAIL("BasicVerticalGrid::can_connect_to - NOT implemented yet") end function can_connect_to + logical function is_identical_to(this, that, rc) + class(BasicVerticalGrid), intent(in) :: this + class(VerticalGrid), allocatable, intent(in) :: that + integer, optional, intent(out) :: rc + + _FAIL("BasicVerticalGrid::is_identical_to - NOT implemented yet") + end function is_identical_to + elemental logical function equal_to(a, b) type(BasicVerticalGrid), intent(in) :: a, b equal_to = a%num_levels == b%num_levels diff --git a/generic3g/vertical/FixedLevelsVerticalGrid.F90 b/generic3g/vertical/FixedLevelsVerticalGrid.F90 index cd59462dae9..67e02577351 100644 --- a/generic3g/vertical/FixedLevelsVerticalGrid.F90 +++ b/generic3g/vertical/FixedLevelsVerticalGrid.F90 @@ -27,6 +27,7 @@ module mapl3g_FixedLevelsVerticalGrid procedure :: get_num_levels procedure :: get_coordinate_field procedure :: can_connect_to + procedure :: is_identical_to procedure :: write_formatted end type FixedLevelsVerticalGrid @@ -118,6 +119,35 @@ logical function can_connect_to(this, dst, rc) _RETURN(_SUCCESS) end function can_connect_to + logical function is_identical_to(this, that, rc) + class(FixedLevelsVerticalGrid), intent(in) :: this + class(VerticalGrid), allocatable, intent(in) :: that + integer, optional, intent(out) :: rc + + logical :: same_id + + is_identical_to = .false. + + ! Mirror grid + if (.not. allocated(that)) then + is_identical_to = .true. + _RETURN(_SUCCESS) ! mirror grid + end if + + ! Same id + is_identical_to = this%same_id(that) + if (is_identical_to) then + _RETURN(_SUCCESS) + end if + + select type(that) + type is(FixedLevelsVerticalGrid) + is_identical_to = (this == that) + end select + + _RETURN(_SUCCESS) + end function is_identical_to + subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) class(FixedLevelsVerticalGrid), intent(in) :: this integer, intent(in) :: unit diff --git a/generic3g/vertical/MirrorVerticalGrid.F90 b/generic3g/vertical/MirrorVerticalGrid.F90 index 98f04424f81..2c6048962a8 100644 --- a/generic3g/vertical/MirrorVerticalGrid.F90 +++ b/generic3g/vertical/MirrorVerticalGrid.F90 @@ -26,6 +26,7 @@ module mapl3g_MirrorVerticalGrid procedure :: get_num_levels procedure :: get_coordinate_field procedure :: can_connect_to + procedure :: is_identical_to procedure :: write_formatted end type MirrorVerticalGrid @@ -81,6 +82,18 @@ logical function can_connect_to(this, dst, rc) _UNUSED_DUMMY(dst) end function can_connect_to + logical function is_identical_to(this, that, rc) + class(MirrorVerticalGrid), intent(in) :: this + class(VerticalGrid), allocatable, intent(in) :: that + integer, optional, intent(out) :: rc + + is_identical_to = .false. + + _RETURN(_SUCCESS) + _UNUSED_DUMMY(this) + _UNUSED_DUMMY(that) + end function is_identical_to + subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg) class(MirrorVerticalGrid), intent(in) :: this integer, intent(in) :: unit diff --git a/generic3g/vertical/ModelVerticalGrid.F90 b/generic3g/vertical/ModelVerticalGrid.F90 index 33dfe9caeb0..d290b417384 100644 --- a/generic3g/vertical/ModelVerticalGrid.F90 +++ b/generic3g/vertical/ModelVerticalGrid.F90 @@ -35,6 +35,7 @@ module mapl3g_ModelVerticalGrid procedure :: get_num_levels procedure :: get_coordinate_field procedure :: can_connect_to + procedure :: is_identical_to procedure :: write_formatted ! subclass-specific methods @@ -48,6 +49,14 @@ module mapl3g_ModelVerticalGrid procedure new_ModelVerticalGrid_basic end interface ModelVerticalGrid + interface operator(==) + module procedure equal_ModelVerticalGrid + end interface operator(==) + + interface operator(/=) + module procedure not_equal_ModelVerticalGrid + end interface operator(/=) + ! TODO: ! - Ensure that there really is a vertical dimension @@ -179,8 +188,6 @@ logical function can_connect_to(this, dst, rc) class(VerticalGrid), intent(in) :: dst integer, optional, intent(out) :: rc - integer :: status - if (this%same_id(dst)) then can_connect_to = .true. _RETURN(_SUCCESS) @@ -198,4 +205,51 @@ logical function can_connect_to(this, dst, rc) _RETURN(_SUCCESS) end function can_connect_to + logical function is_identical_to(this, that, rc) + class(ModelVerticalGrid), intent(in) :: this + class(VerticalGrid), allocatable, intent(in) :: that + integer, optional, intent(out) :: rc + + is_identical_to = .false. + + ! Mirror grid + if (.not. allocated(that)) then + is_identical_to = .true. + _RETURN(_SUCCESS) ! mirror grid + end if + + ! Same id + is_identical_to = this%same_id(that) + if (is_identical_to) then + _RETURN(_SUCCESS) + end if + + select type(that) + type is(ModelVerticalGrid) + is_identical_to = (this == that) + end select + + _RETURN(_SUCCESS) + end function is_identical_to + + impure elemental logical function equal_ModelVerticalGrid(a, b) result(equal) + type(ModelVerticalGrid), intent(in) :: a, b + + equal = a%standard_name == b%standard_name + if (.not. equal) return + equal = (a%get_units() == b%get_units()) + if (.not. equal) return + equal = (a%num_levels == b%num_levels) + if (.not. equal) return + equal = (a%short_name_edge == b%short_name_edge) + if (.not. equal) return + equal = (a%short_name_center == b%short_name_center) + end function equal_ModelVerticalGrid + + impure elemental logical function not_equal_ModelVerticalGrid(a, b) result(not_equal) + type(ModelVerticalGrid), intent(in) :: a, b + + not_equal = .not. (a==b) + end function not_equal_ModelVerticalGrid + end module mapl3g_ModelVerticalGrid diff --git a/generic3g/vertical/VerticalGrid.F90 b/generic3g/vertical/VerticalGrid.F90 index 1fdf5c66076..307814540b6 100644 --- a/generic3g/vertical/VerticalGrid.F90 +++ b/generic3g/vertical/VerticalGrid.F90 @@ -15,6 +15,7 @@ module mapl3g_VerticalGrid procedure(I_get_num_levels), deferred :: get_num_levels procedure(I_get_coordinate_field), deferred :: get_coordinate_field procedure(I_can_connect_to), deferred :: can_connect_to + procedure(I_is_identical_to), deferred :: is_identical_to procedure(I_write_formatted), deferred :: write_formatted generic :: write(formatted) => write_formatted @@ -59,6 +60,13 @@ logical function I_can_connect_to(this, dst, rc) result(can_connect_to) integer, optional, intent(out) :: rc end function I_can_connect_to + logical function I_is_identical_to(this, that, rc) result(is_identical_to) + import VerticalGrid + class(VerticalGrid), intent(in) :: this + class(VerticalGrid), allocatable, intent(in) :: that + integer, optional, intent(out) :: rc + end function I_is_identical_to + subroutine I_write_formatted(this, unit, iotype, v_list, iostat, iomsg) import VerticalGrid class(VerticalGrid), intent(in) :: this From 9072369aa6022fd734b08833a25e09c6facf4929 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 26 Nov 2024 13:42:02 -0500 Subject: [PATCH 08/10] Added BasicVerticalGrid::is_identical_to --- generic3g/vertical/BasicVerticalGrid.F90 | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/generic3g/vertical/BasicVerticalGrid.F90 b/generic3g/vertical/BasicVerticalGrid.F90 index a823ec623d2..520e581fc53 100644 --- a/generic3g/vertical/BasicVerticalGrid.F90 +++ b/generic3g/vertical/BasicVerticalGrid.F90 @@ -90,7 +90,26 @@ logical function is_identical_to(this, that, rc) class(VerticalGrid), allocatable, intent(in) :: that integer, optional, intent(out) :: rc - _FAIL("BasicVerticalGrid::is_identical_to - NOT implemented yet") + is_identical_to = .false. + + ! Mirror grid + if (.not. allocated(that)) then + is_identical_to = .true. + _RETURN(_SUCCESS) ! mirror grid + end if + + ! Same id + is_identical_to = this%same_id(that) + if (is_identical_to) then + _RETURN(_SUCCESS) + end if + + select type(that) + type is(BasicVerticalGrid) + is_identical_to = (this == that) + end select + + _RETURN(_SUCCESS) end function is_identical_to elemental logical function equal_to(a, b) From a2e43dafbb438a5f0a5db6ea556afca21e614ae2 Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 26 Nov 2024 13:42:42 -0500 Subject: [PATCH 09/10] Minor change in FixedLevelsVerticalGrid --- generic3g/vertical/FixedLevelsVerticalGrid.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/generic3g/vertical/FixedLevelsVerticalGrid.F90 b/generic3g/vertical/FixedLevelsVerticalGrid.F90 index 67e02577351..f9ab06ad16b 100644 --- a/generic3g/vertical/FixedLevelsVerticalGrid.F90 +++ b/generic3g/vertical/FixedLevelsVerticalGrid.F90 @@ -124,8 +124,6 @@ logical function is_identical_to(this, that, rc) class(VerticalGrid), allocatable, intent(in) :: that integer, optional, intent(out) :: rc - logical :: same_id - is_identical_to = .false. ! Mirror grid From d7e9e1bc7e3714c076d0ea4b48d3964f0faaed1b Mon Sep 17 00:00:00 2001 From: Purnendu Chakraborty Date: Tue, 26 Nov 2024 13:43:19 -0500 Subject: [PATCH 10/10] FieldSpec - removed redundant modules --- generic3g/specs/FieldSpec.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/generic3g/specs/FieldSpec.F90 b/generic3g/specs/FieldSpec.F90 index 87cb24d605b..00124b3ccf1 100644 --- a/generic3g/specs/FieldSpec.F90 +++ b/generic3g/specs/FieldSpec.F90 @@ -27,8 +27,6 @@ module mapl3g_FieldSpec use mapl3g_InfoUtilities use mapl3g_ExtensionAction use mapl3g_VerticalGrid - use mapl3g_BasicVerticalGrid - use mapl3g_FixedLevelsVerticalGrid use mapl3g_VerticalRegridAction use mapl3g_VerticalDimSpec use mapl3g_AbstractActionSpec