Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tclune/reduce compiler warnings #2324

Merged
merged 15 commits into from
Sep 5, 2023
Merged
3 changes: 1 addition & 2 deletions Apps/Regrid_Util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,13 @@ Program Regrid_Util
use MAPL_FileMetadataUtilsMod
use gFTL_StringVector
use regrid_util_support_mod
use mpi

implicit NONE

type(DistributedProfiler), target :: t_prof
type (ProfileReporter) :: reporter

include "mpif.h"

call main()

CONTAINS
Expand Down
2 changes: 1 addition & 1 deletion Apps/time_ave_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ subroutine latlon_zmean ( q,qz,undef,grid,rc)
if (isum == 0) then
qz(j)=undef
else
qz(j)=qsum/float(isum)
qz(j)=qsum/real(isum)
end if
enddo

Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Trajectory sampler with Epoch time span
- Added utility to convert binary files used by MAPL\_ReadForcing to NetCDF
- Allow a negative "update\_offset" keyword in the sampling section of ExtData2G's input file by prepending the ISO time duration with a negative sign. I.E -PT12H for example
- Added three new macros
- `_HERE`: Returns the current file and line number
- `_RETURN_IF(cond)`: Returns if the condition is true
- `_RETURN_UNLESS(cond)`: Returns if the condition is false

### Changed

- Converted hinterp.F to free format (hinterp.F90)
- Modified tilegrid creation to use index flag ESMF_INDEX_DELOCAL instead of ESMF_INDEX_USER
- Renamed "geom" subdir and library to "field_utils"
- Updated CircleCI to use v11.2.0 bcs
- Backported changes in `pfio` from `release/MAPL-v3` to enable `pfio` unit tests
- Update `components.yaml`
- ESMA_cmake v3.32.0 (Support for Intel Fortran under Rosetta2)
- Cleanup Fortran
- Converted all uses of `mpif.h` to `use mpi`
- Converted all uses of `character*` to `character(len=)`

### Fixed

- Add call to initialize pFlogger layer for the unit tests.

### Removed

- Deleted MAPL_HeapMod.F90. This file was doing crazy nonstandard things and is not used anywhere else. A new cleaner implementation based upon containers could be readily created if the functionality is ever missed.

### Deprecated

## [2.40.3] - 2023-08-03
Expand Down
348 changes: 174 additions & 174 deletions MAPL_cfio/ESMF_CFIOEosMod.F90

Large diffs are not rendered by default.

530 changes: 265 additions & 265 deletions MAPL_cfio/ESMF_CFIOMod.F90

Large diffs are not rendered by default.

796 changes: 398 additions & 398 deletions MAPL_cfio/ESMF_CFIOSdfMod.F90

Large diffs are not rendered by default.

630 changes: 315 additions & 315 deletions MAPL_cfio/ESMF_CFIOUtilMod.F90

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions MAPL_cfio/netcdf_stub.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
! miscellaneous routines:
!
function nf_inq_libvers() result(status)
character*80 :: status
character(len=80) :: status
status=''
end function nf_inq_libvers

function nf_strerror() result(status)
character*80 :: status
character(len=80) :: status
status=''
end function nf_strerror

Expand Down
51 changes: 25 additions & 26 deletions Tests/ExtDataDriverGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module ExtData_DriverGridCompMod
use MAPL_ExtDataGridCompMod, only : ExtData1G_SetServices => SetServices
use MAPL_HistoryGridCompMod, only : Hist_SetServices => SetServices
use MAPL_Profiler, only : get_global_time_profiler, BaseProfiler
use mpi

implicit none
private
Expand Down Expand Up @@ -53,8 +54,6 @@ module ExtData_DriverGridCompMod
type :: MAPL_MetaComp_Wrapper
type(MAPL_MetaComp), pointer :: ptr => null()
end type MAPL_MetaComp_Wrapper

include "mpif.h"

contains

Expand Down Expand Up @@ -153,7 +152,7 @@ subroutine initialize_gc(gc, import_state, export_state, clock, rc)
t_p => get_global_time_profiler()

cap => get_CapGridComp_from_gc(gc)
maplobj => get_MetaComp_from_gc(gc)
maplobj => get_MetaComp_from_gc(gc)

call ESMF_GridCompGet(gc, vm = cap%vm, rc = status)
_VERIFY(status)
Expand Down Expand Up @@ -191,26 +190,26 @@ subroutine initialize_gc(gc, import_state, export_state, clock, rc)
call ESMF_ConfigGetAttribute(cap%config,cap%run_extdata,label="RUN_EXTDATA:",default=.true.)

! !RESOURCE_ITEM: string :: Name of ROOT's config file
call MAPL_GetResource(MAPLOBJ, ROOT_CF, "ROOT_CF:", default = "ROOT.rc", rc = status)
call MAPL_GetResource(MAPLOBJ, ROOT_CF, "ROOT_CF:", default = "ROOT.rc", rc = status)
_VERIFY(status)

! !RESOURCE_ITEM: string :: Name to assign to the ROOT component
call MAPL_GetResource(MAPLOBJ, ROOT_NAME, "ROOT_NAME:", default = "ROOT", rc = status)
call MAPL_GetResource(MAPLOBJ, ROOT_NAME, "ROOT_NAME:", default = "ROOT", rc = status)
_VERIFY(status)

! !RESOURCE_ITEM: string :: Name of HISTORY's config file
call MAPL_GetResource(MAPLOBJ, HIST_CF, "HIST_CF:", default = "HISTORY.rc", rc = status)
! !RESOURCE_ITEM: string :: Name of HISTORY's config file
call MAPL_GetResource(MAPLOBJ, HIST_CF, "HIST_CF:", default = "HISTORY.rc", rc = status)
_VERIFY(status)

! !RESOURCE_ITEM: string :: Name of ExtData's config file
call MAPL_GetResource(MAPLOBJ, EXTDATA_CF, "EXTDATA_CF:", default = 'ExtData.rc', rc = status)
_VERIFY(status)

! !RESOURCE_ITEM: string :: Control Timers
! !RESOURCE_ITEM: string :: Control Timers
call MAPL_GetResource(MAPLOBJ, enableTimers, "MAPL_ENABLE_TIMERS:", default = 'NO', rc = status)
_VERIFY(status)

! !RESOURCE_ITEM: string :: Control Memory Diagnostic Utility
! !RESOURCE_ITEM: string :: Control Memory Diagnostic Utility
call MAPL_GetResource(MAPLOBJ, enableMemUtils, "MAPL_ENABLE_MEMUTILS:", default='NO', rc = status)
_VERIFY(status)
call MAPL_GetResource(MAPLOBJ, MemUtilsMode, "MAPL_MEMUTILS_MODE:", default = MAPL_MemUtilsModeBase, rc = status)
Expand Down Expand Up @@ -309,15 +308,15 @@ subroutine initialize_gc(gc, import_state, export_state, clock, rc)

root_set_services => cap%root_set_services

cap%root_id = MAPL_AddChild(MAPLOBJ, name = root_name, SS = root_set_services, rc = status)
cap%root_id = MAPL_AddChild(MAPLOBJ, name = root_name, SS = root_set_services, rc = status)
_VERIFY(status)

if (cap%run_hist) then

call MAPL_Set(MAPLOBJ, CF=CAP%CF_HIST, RC=STATUS)
_VERIFY(STATUS)

cap%history_id = MAPL_AddChild( MAPLOBJ, name = 'HIST', SS = HIST_SetServices, rc = status)
cap%history_id = MAPL_AddChild( MAPLOBJ, name = 'HIST', SS = HIST_SetServices, rc = status)
_VERIFY(status)

end if
Expand All @@ -335,7 +334,7 @@ subroutine initialize_gc(gc, import_state, export_state, clock, rc)
else
cap%extdata_id = MAPL_AddChild (MAPLOBJ, name = 'EXTDATA', SS = ExtData1G_SetServices, _RC)
end if

end if

! Query MAPL for the the children's for GCS, IMPORTS, EXPORTS
Expand Down Expand Up @@ -405,7 +404,7 @@ subroutine initialize_gc(gc, import_state, export_state, clock, rc)
!------------------------

call ESMF_GridCompInitialize (cap%gcs(cap%extdata_id), importState = cap%imports(cap%extdata_id), &
exportState = cap%exports(cap%extdata_id), &
exportState = cap%exports(cap%extdata_id), &
clock = cap%clock, userRc = status)
_VERIFY(status)

Expand All @@ -420,10 +419,10 @@ subroutine initialize_gc(gc, import_state, export_state, clock, rc)
_RETURN(ESMF_SUCCESS)
end subroutine initialize_gc


subroutine run_gc(gc, import, export, clock, rc)
!ARGUMENTS:
type(ESMF_GridComp) :: GC ! Gridded component
type(ESMF_GridComp) :: GC ! Gridded component
type(ESMF_State) :: import ! Import state
type(ESMF_State) :: export ! Export state
type(ESMF_Clock) :: clock ! The clock
Expand Down Expand Up @@ -456,7 +455,7 @@ subroutine finalize_gc(gc, import_state, export_state, clock, rc)
_UNUSED_DUMMY(import_state)
_UNUSED_DUMMY(export_state)
_UNUSED_DUMMY(clock)

cap => get_CapGridComp_from_gc(gc)
MAPLOBJ => get_MetaComp_from_gc(gc)

Expand Down Expand Up @@ -520,9 +519,9 @@ end subroutine set_services
subroutine initialize(this, rc)
class(ExtData_DriverGridComp), intent(inout) :: this
integer, optional, intent(out) :: rc

integer :: status

call ESMF_GridCompInitialize(this%gc, userRc = status)
_VERIFY(status)
_RETURN(ESMF_SUCCESS)
Expand All @@ -546,9 +545,9 @@ end subroutine run
subroutine finalize(this, rc)
class(ExtData_DriverGridComp), intent(inout) :: this
integer, optional, intent(out) :: rc
integer :: status

integer :: status

call ESMF_GridCompFinalize(this%gc, rc = status)
_VERIFY(status)
_RETURN(ESMF_SUCCESS)
Expand Down Expand Up @@ -577,7 +576,7 @@ function get_CapGridComp_from_gc(gc) result(cap)
cap => cap_wrapper%ptr
end function get_CapGridComp_from_gc


function get_MetaComp_from_gc(gc) result(meta_comp)
type(ESMF_GridComp), intent(inout) :: gc
type(MAPL_MetaComp), pointer :: meta_comp
Expand All @@ -591,7 +590,7 @@ end function get_MetaComp_from_gc
subroutine run_MultipleTimes(gc, rc)
type (ESMF_Gridcomp) :: gc
integer, optional, intent(out) :: rc

integer :: n, status

type(ExtData_DriverGridComp), pointer :: cap
Expand Down Expand Up @@ -689,15 +688,15 @@ subroutine run_one_step(this, rc)
call MAPL_MemCommited ( mem_total, mem_commit, mem_percent, RC=STATUS )
if (this%AmIRoot) write(6,1000) AGCM_YY,AGCM_MM,AGCM_DD,AGCM_H,AGCM_M,AGCM_S,mem_percent
1000 format(1x,'TestDriver Date: ',i4.4,'/',i2.2,'/',i2.2,2x,'Time: ',i2.2,':',i2.2,':',i2.2,2x,f5.1,'%Memory Committed')


_RETURN(ESMF_SUCCESS)
end subroutine run_one_step


! !IROUTINE: MAPL_ClockInit -- Sets the clock

! !INTERFACE:
! !INTERFACE:

subroutine MAPL_ClockInit ( cf, Clock, nsteps, rc)

Expand Down Expand Up @@ -762,7 +761,7 @@ subroutine MAPL_ClockInit ( cf, Clock, nsteps, rc)
_VERIFY(STATUS)

call ESMF_ConfigGetAttribute(cf, heartbeat_dt, label='HEARTBEAT_DT:',rc=status)
_VERIFY(status)
_VERIFY(status)
call ESMF_TimeIntervalSet( TimeInterval, h=0, m=0, s=heartbeat_dt, rc=status )
_VERIFY(STATUS)
Clock = ESMF_ClockCreate (timeInterval, CurrTime, rc=status )
Expand Down
1 change: 1 addition & 0 deletions base/ApplicationSupport.F90
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ subroutine report_global_profiler(unusable,comm,rc)
end if
call MPI_Barrier(world_comm, ierror)

_RETURN(_SUCCESS)
end subroutine report_global_profiler

end module MAPL_ApplicationSupport
1 change: 0 additions & 1 deletion base/Base.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module MAPLBase_Mod
use MAPL_SunMod
use MAPL_LocStreamMod
use MAPL_InterpMod
use MAPL_HeapMod
use MAPL_SatVaporMod
use MAPL_MemUtilsMod
use MAPL_HashMod
Expand Down
Loading