Skip to content

Commit

Permalink
Merge pull request #1953 from GEOS-ESM/feature/mathomp4/1952-refactor…
Browse files Browse the repository at this point in the history
…-verify-history

Fixes #1952. Remove _VERIFY from History GC
  • Loading branch information
mathomp4 committed Feb 13, 2023
2 parents 0b0d2ce + f6abb87 commit 4b0d4a3
Show file tree
Hide file tree
Showing 5 changed files with 612 additions and 1,142 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
The specific subroutines remain in MAPL_GenericMod to maintain the interface in one module, but
most of the functionality is in MAPL_ResourceMod now.
- Update "build like UFS" CI test
- Converted the History Gridded Component to use `_RC` and `_STAT` macros

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion gridcomps/Cap/MAPL_CapGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ subroutine print_throughput(rc)
LOOP_THROUGHPUT,INST_THROUGHPUT,RUN_THROUGHPUT,HRS_R,MIN_R,SEC_R,&
mem_committed_percent,mem_used_percent
1000 format(1x,'AGCM Date: ',i4.4,'/',i2.2,'/',i2.2,2x,'Time: ',i2.2,':',i2.2,':',i2.2, &
2x,'Throughput(days/day)[Avg Tot Run]: ',f12.1,1x,f12.1,1x,f12.1,2x,'TimeRemaining(Est) ',i3.3,':'i2.2,':',i2.2,2x, &
2x,'Throughput(days/day)[Avg Tot Run]: ',f12.1,1x,f12.1,1x,f12.1,2x,'TimeRemaining(Est) ',i3.3,':',i2.2,':',i2.2,2x, &
f5.1,'% : ',f5.1,'% Mem Comm:Used')

_RETURN(_SUCCESS)
Expand Down
45 changes: 15 additions & 30 deletions gridcomps/History/MAPL_HistoryCollection.F90
Original file line number Diff line number Diff line change
Expand Up @@ -156,44 +156,29 @@ subroutine AddGrid(this,output_grids,resolution,rc)
im_world=resolution(1)
jm_world=resolution(2)

cfg = MAPL_ConfigCreate(rc=status)
_VERIFY(status)
cfg = MAPL_ConfigCreate(_RC)
if (resolution(2)==resolution(1)*6) then
call MAPL_MakeDecomposition(nx,ny,reduceFactor=6,rc=status)
_VERIFY(status)
call MAPL_MakeDecomposition(nx,ny,reduceFactor=6,_RC)
else
call MAPL_MakeDecomposition(nx,ny,rc=status)
_VERIFY(status)
call MAPL_MakeDecomposition(nx,ny,_RC)
end if
call MAPL_ConfigSetAttribute(cfg,value=nx, label=trim(tlabel)//".NX:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value=ny, label=trim(tlabel)//".NY:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value=nx, label=trim(tlabel)//".NX:",_RC)
call MAPL_ConfigSetAttribute(cfg,value=ny, label=trim(tlabel)//".NY:",_RC)

if (resolution(2)==resolution(1)*6) then
call MAPL_ConfigSetAttribute(cfg,value="Cubed-Sphere", label=trim(tlabel)//".GRID_TYPE:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value=6, label=trim(tlabel)//".NF:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value=im_world,label=trim(tlabel)//".IM_WORLD:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value="Cubed-Sphere", label=trim(tlabel)//".GRID_TYPE:",_RC)
call MAPL_ConfigSetAttribute(cfg,value=6, label=trim(tlabel)//".NF:",_RC)
call MAPL_ConfigSetAttribute(cfg,value=im_world,label=trim(tlabel)//".IM_WORLD:",_RC)
else
call MAPL_ConfigSetAttribute(cfg,value="LatLon", label=trim(tlabel)//".GRID_TYPE:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value=im_world,label=trim(tlabel)//".IM_WORLD:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value=jm_world,label=trim(tlabel)//".JM_WORLD:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value='PC', label=trim(tlabel)//".POLE:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value='DC', label=trim(tlabel)//".DATELINE:",rc=status)
_VERIFY(status)
call MAPL_ConfigSetAttribute(cfg,value="LatLon", label=trim(tlabel)//".GRID_TYPE:",_RC)
call MAPL_ConfigSetAttribute(cfg,value=im_world,label=trim(tlabel)//".IM_WORLD:",_RC)
call MAPL_ConfigSetAttribute(cfg,value=jm_world,label=trim(tlabel)//".JM_WORLD:",_RC)
call MAPL_ConfigSetAttribute(cfg,value='PC', label=trim(tlabel)//".POLE:",_RC)
call MAPL_ConfigSetAttribute(cfg,value='DC', label=trim(tlabel)//".DATELINE:",_RC)
end if
output_grid = grid_manager%make_grid(cfg,prefix=trim(tlabel)//'.',rc=status)
_VERIFY(status)
output_grid = grid_manager%make_grid(cfg,prefix=trim(tlabel)//'.',_RC)

factory => grid_manager%get_factory(output_grid,rc=status)
_VERIFY(status)
factory => grid_manager%get_factory(output_grid,_RC)
this%output_grid_label = factory%generate_grid_name()
lgrid => output_grids%at(trim(this%output_grid_label))
if (.not.associated(lgrid)) call output_grids%insert(this%output_grid_label,output_grid)
Expand Down
Loading

0 comments on commit 4b0d4a3

Please sign in to comment.