Skip to content

Commit

Permalink
Take ESMF_StateWrite() and ESMF_StateRead() out of public API.
Browse files Browse the repository at this point in the history
  • Loading branch information
oehmke committed Sep 26, 2024
1 parent e25151c commit 6c647d3
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 594 deletions.
2 changes: 0 additions & 2 deletions src/Superstructure/State/doc/State_refdoc.ctex
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@
\input{State_usage}
\input{ESMF_StateEx_fapi}
\input{../../StateReconcile/doc/ESMF_StateReconcileEx_fapi}
\input{ESMF_StateReadWriteEx_fapi}
#elif defined(CONSTITUENT)
\input{../Superstructure/State/doc/State_usage}
\input{../Superstructure/State/doc/ESMF_StateEx_fapi}
\input{../Superstructure/StateReconcile/doc/ESMF_StateReconcileEx_fapi}
\input{../Superstructure/State/doc/ESMF_StateReadWriteEx_fapi}
#endif

\subsection{Restrictions and Future Work}
Expand Down
198 changes: 0 additions & 198 deletions src/Superstructure/State/examples/ESMF_StateReadWriteEx.F90

This file was deleted.

22 changes: 5 additions & 17 deletions src/Superstructure/State/examples/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ run_uni: run_examples_uni
LOCDIR = src/Superstructure/State/examples

.NOTPARALLEL:
EXAMPLES_BUILD = $(ESMF_EXDIR)/ESMF_StateEx \
$(ESMF_EXDIR)/ESMF_StateReadWriteEx
EXAMPLES_BUILD = $(ESMF_EXDIR)/ESMF_StateEx

EXAMPLES_RUN = run_ESMF_StateEx \
run_ESMF_StateReadWriteEx

EXAMPLES_RUN_UNI = run_ESMF_StateEx_uni \
run_ESMF_StateReadWriteEx_uni
EXAMPLES_RUN = run_ESMF_StateEx

EXAMPLES_RUN_UNI = run_ESMF_StateEx_uni


include $(ESMF_DIR)/makefile

Expand All @@ -34,14 +33,3 @@ run_ESMF_StateEx:
run_ESMF_StateEx_uni:
$(MAKE) EXNAME=State NP=1 exfrun

#
# ESMF_StateReadWriteEx
#
run_ESMF_StateReadWriteEx:
cp -f $(ESMF_DIR)/src/Infrastructure/IO/tests/io_netcdf_testdata.nc $(ESMF_EXDIR)
$(MAKE) EXNAME=StateReadWrite NP=4 exfrun

run_ESMF_StateReadWriteEx_uni:
cp -f $(ESMF_DIR)/src/Infrastructure/IO/tests/io_netcdf_testdata.nc $(ESMF_EXDIR)
$(MAKE) EXNAME=StateReadWrite NP=1 exfrun

15 changes: 9 additions & 6 deletions src/Superstructure/State/src/ESMF_State.F90
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,21 @@ module ESMF_StateMod
public ESMF_StateRemove
public ESMF_StateReplace


public ESMF_StateWriteRestart
public ESMF_StateReadRestart

public ESMF_StateRead
public ESMF_StateWrite
public ESMF_StatePrint
public ESMF_StateSet

public ESMF_StateSerialize, ESMF_StateDeserialize

public ESMF_StateClassFindData

! These methods are broken and create Arrays in a bad configuration.
! We are taking them out so no one uses them. Eventually, new correct
! versions will be implemented.
! public ESMF_StateRead
! public ESMF_StateWrite
! public ESMF_StateWriteRestart
! public ESMF_StateReadRestart


!EOPI

Expand Down
19 changes: 11 additions & 8 deletions src/Superstructure/State/src/ESMF_StateAPI.cppF90
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,22 @@ module ESMF_StateAPIMod
public ESMF_StateIsReconcileNeeded

public ESMF_StateLog

public ESMF_StateWriteRestart
public ESMF_StateReadRestart

public ESMF_StateRead
public ESMF_StateWrite
public ESMF_StatePrint
public ESMF_StateSet

public ESMF_StateSerialize, ESMF_StateDeserialize

public ESMF_StateClassFindData

! These methods are broken and create Arrays in a bad configuration.
! We are taking them out so no one uses them. Eventually, new correct
! versions will be implemented.
! public ESMF_StateRead
! public ESMF_StateWrite
! public ESMF_StateWriteRestart
! public ESMF_StateReadRestart


!EOPI

!------------------------------------------------------------------------------
Expand Down Expand Up @@ -2334,7 +2337,7 @@ type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
!------------------------------------------------------------------------------
^undef ESMF_METHOD
^define ESMF_METHOD "ESMF_StateRead"
!BOP
!BOPI
! !IROUTINE: ESMF_StateRead -- Read data items from a file into a State
!
! !INTERFACE:
Expand Down Expand Up @@ -2375,7 +2378,7 @@ type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
! not present.
! \end{description}
!
!EOP
!EOPI
! TODO: use item flag ESMF_STATEITEM_ARRAY<BUNDLE>

integer :: localrc
Expand Down
12 changes: 8 additions & 4 deletions src/Superstructure/State/src/ESMF_StateWr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ module ESMF_StateWrMod
!------------------------------------------------------------------------------

! !PUBLIC MEMBER FUNCTIONS:
public :: ESMF_StateWrite
public :: ESMF_StateWriteRestart

! These methods are broken and create Arrays in a bad configuration.
! We are taking them out so no one uses them. Eventually, new correct
! versions will be implemented.
! public :: ESMF_StateWrite
! public :: ESMF_StateWriteRestart

!EOPI

Expand Down Expand Up @@ -123,7 +127,7 @@ module ESMF_StateWrMod
!------------------------------------------------------------------------------
#undef ESMF_METHOD
#define ESMF_METHOD "ESMF_StateWrite"
!BOP
!BOPI
! !IROUTINE: ESMF_StateWrite -- Write items from a State to file
!
! !INTERFACE:
Expand Down Expand Up @@ -162,7 +166,7 @@ subroutine ESMF_StateWrite(state, fileName, rc)
! not present.
! \end{description}
!
!EOP
!EOPI
! TODO: use item flag ESMF_STATEITEM_ARRAY<BUNDLE>

integer :: localrc
Expand Down
Loading

0 comments on commit 6c647d3

Please sign in to comment.