Skip to content

Commit

Permalink
Merge branch 'release/MAPL-v3' into feature/bmauer/fixes-#2986
Browse files Browse the repository at this point in the history
  • Loading branch information
bena-nasa authored Sep 9, 2024
2 parents 8cf4dc7 + de6c002 commit f6599cc
Show file tree
Hide file tree
Showing 43 changed files with 650 additions and 731 deletions.
19 changes: 0 additions & 19 deletions .github/stale.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/cron-stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Based on examples from the stale action site:
# https://github.com/actions/stale

name: 'Close stale issues and PR'
on:
schedule:
- cron: '30 1 * * *'

permissions:
contents: read
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 60
stale-issue-message: >
This issue has been automatically marked as stale because it
has not had activity in the last 60 days. If there are no
updates within 7 days, it will be closed. You can add the
":hourglass: Long Term" label to prevent the stale action
from closing this issue.
days-before-issue-close: 7
close-issue-message: >
This issue was closed because it has been stalled for 7 days with no activity.
You can reopen this issue if you are still working on it.
stale-issue-label: ':snowflake: Stale'
exempt-issue-labels: ':hourglass: Long Term,:exclamation: High Priority'

days-before-pr-stale: 60
stale-pr-message: >
This PR has been automatically marked as stale because it
has not had activity in the last 60 days. If there are no
updates within 7 days, it will be closed. You can add the
":hourglass: Long Term" label to prevent the stale action
from closing this issue.
days-before-pr-close: 30
close-pr-message: >
This PR was closed because it has been stalled for 30 days with no activity.
You can reopen this PR if you are still working on it.
stale-pr-label: ':snowflake: Stale'
exempt-pr-labels: ':hourglass: Long Term,:exclamation: High Priority'

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Start implementing changes for vertical regridding in ExtData
- Add ability to connect export of the MAPL hierachy to ExtData via CAP.rc file
- Added new driver, CapDriver.x, to excerise the MAPL_Cap with the configuratable component also used by ExtDataDriver.x
- Added Fortran interface to UDUNITS2
Expand Down
2 changes: 1 addition & 1 deletion generic3g/FieldDictionary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function to_item(item_node, rc) result(item)
integer, optional, intent(out) :: rc

integer :: status
type(ESMF_HConfig) :: aliases_node, alias_node
type(ESMF_HConfig) :: aliases_node
character(:), allocatable :: long_name, units, temp_string
type(StringVector) :: aliases
type(ESMF_HConfigIter) :: hconfigIter,hconfigIterBegin,hconfigIterEnd
Expand Down
3 changes: 2 additions & 1 deletion generic3g/InnerMetaComponent.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ subroutine attach_inner_meta(self_gc, outer_gc, rc)
type(InnerMetaComponent), pointer :: inner_meta
integer :: status

_SET_NAMED_PRIVATE_STATE(self_gc, InnerMetaComponent, INNER_META_PRIVATE_STATE, inner_meta)
_SET_NAMED_PRIVATE_STATE(self_gc, InnerMetaComponent, INNER_META_PRIVATE_STATE)
_GET_NAMED_PRIVATE_STATE(self_gc, InnerMetaComponent, INNER_META_PRIVATE_STATE, inner_meta)
inner_meta = InnerMetaComponent(self_gc, outer_gc)

_RETURN(_SUCCESS)
Expand Down
2 changes: 0 additions & 2 deletions generic3g/MultiState.F90
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ subroutine write_multistate(this, unit, iotype, v_list, iostat, iomsg)
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg

integer :: status

#ifndef __GFORTRAN__
write(unit,*, iostat=iostat, iomsg=iomsg) 'IMPORT:', this%importState
write(unit,*, iostat=iostat, iomsg=iomsg) 'EXPORT:', this%exportState
Expand Down
2 changes: 1 addition & 1 deletion generic3g/OuterMetaComponent.F90
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module mapl3g_OuterMetaComponent
use gFTL2_StringVector
use mapl_keywordEnforcer, only: KE => KeywordEnforcer
use esmf
use pflogger, only: logging, Logger
use pflogger, only: Logger

implicit none
private
Expand Down
3 changes: 1 addition & 2 deletions generic3g/OuterMetaComponent/attach_outer_meta.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ module subroutine attach_outer_meta(gridcomp, rc)
integer, optional, intent(out) :: rc

integer :: status
type(OuterMetaComponent), pointer :: outer_meta

_SET_NAMED_PRIVATE_STATE(gridcomp, OuterMetaComponent, OUTER_META_PRIVATE_STATE, outer_meta)
_SET_NAMED_PRIVATE_STATE(gridcomp, OuterMetaComponent, OUTER_META_PRIVATE_STATE)

_RETURN(_SUCCESS)
end subroutine attach_outer_meta
Expand Down
1 change: 1 addition & 0 deletions generic3g/OuterMetaComponent/init_meta.F90
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "MAPL_Generic.h"

submodule (mapl3g_OuterMetaComponent) init_meta_smod
use pFlogger, only: logging
implicit none

contains
Expand Down
10 changes: 2 additions & 8 deletions generic3g/OuterMetaComponent/initialize_advertise.F90
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,11 @@ subroutine self_advertise(this, unusable, rc)
type(VariableSpecVectorIterator) :: iter
type(VariableSpec), pointer :: var_spec

!# if (this%component_spec%var_specs%size() > 0) then
!# _ASSERT(allocated(this%geom),'Component must define a geom to advertise variables.')
!# end if
associate (e => this%component_spec%var_specs%end())
iter = this%component_spec%var_specs%begin()
do while (iter /= e)
var_spec => iter%of()
call advertise_variable (var_spec, this%registry, this%geom, this%vertical_grid, _RC)
call advertise_variable (var_spec, this%registry, _RC)
call iter%next()
end do
end associate
Expand All @@ -81,11 +78,9 @@ subroutine self_advertise(this, unusable, rc)
end subroutine self_advertise


subroutine advertise_variable(var_spec, registry, geom, vertical_grid, unusable, rc)
subroutine advertise_variable(var_spec, registry, unusable, rc)
type(VariableSpec), intent(in) :: var_spec
type(StateRegistry), target, intent(inout) :: registry
type(ESMF_Geom), optional, intent(in) :: geom
class(VerticalGrid), optional, intent(in) :: vertical_grid
class(KE), optional, intent(in) :: unusable
integer, optional, intent(out) :: rc

Expand All @@ -99,7 +94,6 @@ subroutine advertise_variable(var_spec, registry, geom, vertical_grid, unusable,
allocate(item_spec, source=make_ItemSpec(var_spec, registry, rc=status))
_VERIFY(status)
call item_spec%create(_RC)
!# call item_spec%initialize(geom, vertical_grid, _RC)

virtual_pt = var_spec%make_virtualPt()
call registry%add_primary_spec(virtual_pt, item_spec)
Expand Down
6 changes: 3 additions & 3 deletions generic3g/OuterMetaComponent/initialize_modify_advertised.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module recursive subroutine initialize_modify_advertised(this, importState, expo

integer :: status
character(*), parameter :: PHASE_NAME = 'GENERIC::INIT_MODIFY_ADVERTISED'
type(MultiState) :: outer_states, user_states

call apply_to_children(this, set_child_geom, _RC)
call this%run_custom(ESMF_METHOD_INITIALIZE, PHASE_NAME, _RC)
Expand All @@ -27,15 +26,16 @@ module recursive subroutine initialize_modify_advertised(this, importState, expo

_RETURN(_SUCCESS)
_UNUSED_DUMMY(unusable)
_UNUSED_DUMMY(importState)
_UNUSED_DUMMY(exportState)
_UNUSED_DUMMY(clock)
contains

subroutine set_child_geom(this, child_meta, rc)
class(OuterMetaComponent), target, intent(inout) :: this
type(OuterMetaComponent), target, intent(inout) :: child_meta
integer, optional, intent(out) :: rc

integer :: status

associate(kind => child_meta%component_spec%geometry_spec%kind)
_RETURN_IF(kind /= GEOMETRY_FROM_PARENT)

Expand Down
1 change: 1 addition & 0 deletions generic3g/OuterMetaComponent/run_child_by_name.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module recursive subroutine run_child_by_name(this, child_name, unusable, phase_
call child%run(phase_idx=phase_idx, _RC)

_RETURN(_SUCCESS)
_UNUSED_DUMMY(unusable)
end subroutine run_child_by_name

end submodule run_child_by_name_smod
1 change: 1 addition & 0 deletions generic3g/OuterMetaComponent/run_children.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module recursive subroutine run_children_(this, unusable, phase_name, rc)
end associate

_RETURN(_SUCCESS)
_UNUSED_DUMMY(unusable)
end subroutine run_children_

end submodule run_children_smod
1 change: 1 addition & 0 deletions generic3g/OuterMetaComponent/run_clock_advance.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module recursive subroutine run_clock_advance(this, unusable, rc)
end if

_RETURN(ESMF_SUCCESS)
_UNUSED_DUMMY(unusable)
end subroutine run_clock_advance

end submodule run_clock_advance_smod
4 changes: 2 additions & 2 deletions generic3g/OuterMetaComponent/run_user.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ module recursive subroutine run_user(this, phase_name, unusable, rc)
class(KE), optional, intent(in) :: unusable
integer, optional, intent(out) :: rc

integer :: status, userRC
integer :: phase_idx
integer :: status
type(StringVector), pointer :: run_phases
logical :: found
integer :: phase
Expand Down Expand Up @@ -45,6 +44,7 @@ module recursive subroutine run_user(this, phase_name, unusable, rc)
end do

_RETURN(ESMF_SUCCESS)
_UNUSED_DUMMY(unusable)
end subroutine run_user

end submodule run_user_smod
2 changes: 2 additions & 0 deletions generic3g/OuterMetaComponent/write_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module recursive subroutine write_restart(this, importState, exportState, clock,
end if

_RETURN(ESMF_SUCCESS)
_UNUSED_DUMMY(exportState)
_UNUSED_DUMMY(importState)
end subroutine write_restart

end submodule write_restart_smod
6 changes: 3 additions & 3 deletions generic3g/RestartHandler.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ module mapl3g_RestartHandler
use mapl_ErrorHandling, only: MAPL_Verify, MAPL_Return, MAPL_Assert
use mapl3g_geomio, only: bundle_to_metadata, GeomPFIO, make_geom_pfio, get_mapl_geom
use mapl3g_SharedIO, only: esmf_to_pfio_type
use MAPL_FieldPointerUtilities, only: FieldGetCPtr, FieldGetLocalElementCount
use pFIO, only: PFIO_READ, FileMetaData, NetCDF4_FileFormatter
use pFIO, only: i_Clients, o_Clients, ArrayReference
use pFIO, only: i_Clients, o_Clients
use pFlogger, only: logging, logger

implicit none
Expand Down Expand Up @@ -119,7 +118,8 @@ type(ESMF_FieldBundle) function get_bundle_from_state_(state, rc) result(bundle)
type(ESMF_FieldStatus_Flag) :: field_status
integer :: item_count, idx, status

bundle = ESMF_FieldBundleCreate(_RC) ! bundle to pack fields in
! bundle to pack fields in
bundle = ESMF_FieldBundleCreate(_RC)
call ESMF_StateGet(state, itemCount=item_count, _RC)
allocate(item_name(item_count), _STAT)
allocate(item_type(item_count), _STAT)
Expand Down
1 change: 1 addition & 0 deletions generic3g/UserSetServices.F90
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ subroutine write_formatted_proc(this, unit, iotype, v_list, iostat, iomsg)
write(unit,*,iostat=iostat, iomsg=iomsg) "userRoutine: <procedure>"
_UNUSED_DUMMY(iotype)
_UNUSED_DUMMY(v_list)
_UNUSED_DUMMY(this)
end subroutine write_formatted_proc

!----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion generic3g/actions/ConvertUnitsAction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ subroutine run(this, importState, exportState, clock, rc)
end if

_FAIL('unsupported typekind')

_UNUSED_DUMMY(clock)
end subroutine run

end module mapl3g_ConvertUnitsAction
6 changes: 4 additions & 2 deletions generic3g/actions/CopyAction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ subroutine initialize(this, importState, exportState, clock, rc)
type(ESMF_Clock) :: clock
integer, optional, intent(out) :: rc

integer :: status

! No-op

_RETURN(_SUCCESS)
_UNUSED_DUMMY(this)
_UNUSED_DUMMY(importState)
_UNUSED_DUMMY(exportState)
_UNUSED_DUMMY(clock)
end subroutine initialize

subroutine run(this, importState, exportState, clock, rc)
Expand Down
10 changes: 9 additions & 1 deletion generic3g/actions/NullAction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ subroutine initialize(this, importState, exportState, clock, rc)
type(ESMF_Clock) :: clock
integer, optional, intent(out) :: rc
_FAIL('This procedure should not be called.')
_UNUSED_DUMMY(this)
_UNUSED_DUMMY(importState)
_UNUSED_DUMMY(exportState)
_UNUSED_DUMMY(clock)
end subroutine initialize

subroutine run(this, importState, exportState, clock, rc)
Expand All @@ -46,6 +50,10 @@ subroutine run(this, importState, exportState, clock, rc)
type(ESMF_Clock) :: clock
integer, optional, intent(out) :: rc
_FAIL('This procedure should not be called.')
end subroutine run
_UNUSED_DUMMY(this)
_UNUSED_DUMMY(importState)
_UNUSED_DUMMY(exportState)
_UNUSED_DUMMY(clock)
end subroutine run

end module mapl3g_NullAction
Loading

0 comments on commit f6599cc

Please sign in to comment.