Skip to content

Commit

Permalink
rename nc close sr
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanaEscobar committed Nov 19, 2024
1 parent d85595b commit 2c458bf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion model/src/the_model_main.F
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ SUBROUTINE THE_MODEL_MAIN(myThid)
IF ( useProfiles ) THEN
C Close all open NetCDF files
_BEGIN_MASTER( myThid )
CALL PROFILES_CLOSE_NCFILES( myThid )
CALL PROFILES_NC_CLOSE( myThid )
_END_MASTER( myThid )
ENDIF
#endif
Expand Down
10 changes: 5 additions & 5 deletions pkg/profiles/profiles.flow
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ CADJ SUBROUTINE active_write_profile DEPEND = 1,2, 4,5,6,7,8,9
C----------------------------------------
C NetCDF related functions and routines
C----------------------------------------
CADJ FUNCTION NF_OPEN INPUT = 1,2,3
CADJ FUNCTION NF_CLOSE INPUT = 1
CADJ FUNCTION NF_SYNC INPUT = 1
CADJ SUBROUTINE PROFILES_NF_ERROR INPUT = 1,2,3,4,5
CADJ SUBROUTINE PROFILES_CLOSE_NCFILES INPUT = 1
CADJ FUNCTION NF_OPEN INPUT = 1,2,3
CADJ FUNCTION NF_CLOSE INPUT = 1
CADJ FUNCTION NF_SYNC INPUT = 1
CADJ SUBROUTINE PROFILES_NF_ERROR INPUT = 1,2,3,4,5
CADJ SUBROUTINE PROFILES_NC_CLOSE INPUT = 1
15 changes: 8 additions & 7 deletions pkg/profiles/profiles_nc_utils.F
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ SUBROUTINE PROFILES_NF_ERROR( message, STATUS, bi, bj, myThid )

C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: PROFILES_CLOSE_NCFILES
C !ROUTINE: PROFILES_NC_CLOSE

C !INTERFACE:
SUBROUTINE PROFILES_CLOSE_NCFILES( myThid )
SUBROUTINE PROFILES_NC_CLOSE( myThid )

C !DESCRIPTION:
C Close NetCDF files
Expand Down Expand Up @@ -107,7 +107,7 @@ SUBROUTINE PROFILES_CLOSE_NCFILES( myThid )
IL = ILNBLNK( profilesfiles(numFile) )
IF (IL.NE.0) THEN
WRITE(msgBuf,'(A,A,5(1X,I8))')
& 'S/R PROFILES_CLOSE_NCFILES:',
& 'S/R PROFILES_NC_CLOSE:',
& ' Closing '//profilesfiles(numFile)(1:IL), numFile,
& fiddata(numFile,bi,bj),fidforward(numFile,bi,bj),
& fidadjoint(numFile,bi,bj),fidtangent(numFile,bi,bj)
Expand All @@ -116,33 +116,34 @@ SUBROUTINE PROFILES_CLOSE_NCFILES( myThid )
C Data file
STATUS = NF_CLOSE( fiddata(numFile,bi,bj) )
WRITE(msgBuf,'(A,I3,I8)')
& 'CLOSE_NCFILES: NF_CLOSE data unit',
& 'NC_CLOSE: NF_CLOSE data unit',
& numFile, fiddata(numFile,bi,bj)
CALL PROFILES_NF_ERROR( msgBuf, STATUS, bi, bj, myThid )

C Forward equivalent (.equi) file
STATUS = NF_CLOSE( fidforward(numFile,bi,bj) )
WRITE(msgBuf,'(A,I3,I8)')
& 'CLOSE_NCFILES: NF_CLOSE fwd unit',
& 'NC_CLOSE: NF_CLOSE fwd unit',
& numFile, fidforward(numFile,bi,bj)
CALL PROFILES_NF_ERROR( msgBuf, STATUS, bi, bj, myThid )
#ifdef ALLOW_ADJOINT_RUN
C Adjoint equivalent (.equi) file
STATUS = NF_CLOSE( fidadjoint(numFile,bi,bj) )
WRITE(msgBuf,'(A,I3,I8)')
& 'CLOSE_NCFILES: NF_CLOSE adj unit',
& 'NC_CLOSE: NF_CLOSE adj unit',
& numFile, fidadjoint(numFile,bi,bj)
CALL PROFILES_NF_ERROR( msgBuf, STATUS, bi, bj, myThid )
#endif
#ifdef ALLOW_TANGENTLINEAR_RUN
C Tangent linear equivalent (.equi) file
STATUS = NF_CLOSE( fidtangent(numFile,bi,bj) )
WRITE(msgBuf,'(A,I3,I8)')
& 'CLOSE_NCFILES: NF_CLOSE tlm unit',
& 'NC_CLOSE: NF_CLOSE tlm unit',
& numFile, fidtangent(numFile,bi,bj)
CALL PROFILES_NF_ERROR( msgBuf, STATUS, bi, bj, myThid )
#endif
ENDIF

ENDDO
ENDDO
ENDDO
Expand Down

0 comments on commit 2c458bf

Please sign in to comment.