Skip to content

Commit

Permalink
2 space indent; source code headers
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanaEscobar committed Nov 19, 2024
1 parent 0c953e8 commit 02a7121
Show file tree
Hide file tree
Showing 16 changed files with 2,972 additions and 2,772 deletions.
516 changes: 260 additions & 256 deletions pkg/profiles/active_file_control_profiles.F

Large diffs are not rendered by default.

54 changes: 24 additions & 30 deletions pkg/profiles/active_file_profiles.F
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
C
C ==================================================================

C !ROUTINE: active_read_profile
C !INTERFACE:
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: ACTIVE_READ_PROFILE

C !INTERFACE:
SUBROUTINE ACTIVE_READ_PROFILE(
I active_num_file,
I nactive_var,
Expand All @@ -32,29 +35,27 @@ SUBROUTINE ACTIVE_READ_PROFILE(
I dummy
& )

C ==================================================================
C SUBROUTINE active_read_profile
C ==================================================================
C o Read an active 1D record from an profile data file.
C ==================================================================
C !DESCRIPTION:
C Read an active 1D record from an profile data file.

C !USES:
IMPLICIT NONE
C == global variables ==
C == Global variables ===
#include "EEPARAMS.h"
#include "SIZE.h"
#ifdef ALLOW_PROFILES
# include "PROFILES_SIZE.h"
# include "profiles.h"
#endif

C == routine arguments ==
C !INPUT/OUTPUT PARAMETERS:
C active_var_file: filename
C nactive_var: integer size of active_var
C active_var: array
C active_varname: name fo the quantity to save
C active_varname: name for the quantity to save
C irec: record number
C myOptimIter: number of optimization iteration (default: 0)
C myThid: thread number for this instance
C myThid: my thread ID number
C lAdInit: initialisation of corresponding adjoint
C variable and write to active file
INTEGER nactive_var,active_num_file
Expand All @@ -64,6 +65,7 @@ SUBROUTINE ACTIVE_READ_PROFILE(
INTEGER bi,bj,myThid
LOGICAL lAdInit
_RL dummy
CEOP

#ifdef ALLOW_PROFILES

Expand All @@ -78,12 +80,11 @@ SUBROUTINE ACTIVE_READ_PROFILE(
RETURN
END

C ==================================================================
C ==================================================================
C ==================================================================
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: ACTIVE_WRITE_PROFILE

C !ROUTINE: active_write_profile
C !INTERFACE:
C !INTERFACE:
SUBROUTINE ACTIVE_WRITE_PROFILE(
I active_num_file,
I nactive_var,
Expand All @@ -97,38 +98,34 @@ SUBROUTINE ACTIVE_WRITE_PROFILE(
I dummy
& )

C !DESCRIPTION: \bv
C ==================================================================
C SUBROUTINE active_write_profile
C ==================================================================
C o Write an active 1D record from file.
C ==================================================================
C !DESCRIPTION:
C Write an active 1D record from file.

C !USES:
IMPLICIT NONE

C == global variables ==
C == Global variables ===
#include "EEPARAMS.h"
#include "SIZE.h"
#ifdef ALLOW_PROFILES
# include "PROFILES_SIZE.h"
# include "profiles.h"
#endif

C == routine arguments ==
C !INPUT/OUTPUT PARAMETERS:
C active_var_file: filename
C nactive_var: integer size of active_var
C active_var: array
C active_varname: name fo the quantity to save
C active_varname: name for the quantity to save
C irec: record number
C myOptimIter: number of optimization iteration (default: 0)
C myThid: thread number for this instance
C myThid: my thread ID number
INTEGER nactive_var,active_num_file, active_varnum
_RL active_var(nactive_var)
INTEGER irec
INTEGER myOptimIter
INTEGER bi,bj,myThid
_RL dummy
CEOP

#ifdef ALLOW_PROFILES

Expand All @@ -142,6 +139,3 @@ SUBROUTINE ACTIVE_WRITE_PROFILE(

RETURN
END

C ==================================================================

52 changes: 24 additions & 28 deletions pkg/profiles/active_file_profiles_ad.F
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
C
C ==================================================================

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

C !INTERFACE:
SUBROUTINE ADACTIVE_READ_PROFILE(
I active_num_file,
I nadactive_var,
Expand All @@ -28,29 +33,26 @@ SUBROUTINE ADACTIVE_READ_PROFILE(
I myThid
& )

C !DESCRIPTION: \bv
C ==================================================================
C SUBROUTINE adactive_read_profile
C ==================================================================
C o Adjoint of active_read_profile.
C ==================================================================
IMPLICIT NONE
C !DESCRIPTION:
C Adjoint of active_read_profile.

C == global variables ==
C !USES:
IMPLICIT NONE
C == Global variables ===
#include "EEPARAMS.h"
#include "SIZE.h"
#ifdef ALLOW_PROFILES
# include "PROFILES_SIZE.h"
# include "profiles.h"
#endif

C == routine arguments ==
C !INPUT/OUTPUT PARAMETERS:
C active_var_file: filename
C nadactive_var: integer size of adactive_var
C adactive_var: array
C irec: record number
C myIter: number of optimization iteration (default: 0)
C myThid: thread number for this instance
C myThid: my thread ID number
C doglobalread: flag for global or local read/write
C (default: .false.)
C lAdInit: initialisation of corresponding adjoint
Expand All @@ -61,6 +63,7 @@ SUBROUTINE ADACTIVE_READ_PROFILE(
INTEGER myIter
INTEGER bi,bj,myThid
LOGICAL lAdInit
CEOP

#ifdef ALLOW_PROFILES

Expand All @@ -75,10 +78,11 @@ SUBROUTINE ADACTIVE_READ_PROFILE(
RETURN
END

C ==================================================================
C ==================================================================
C ==================================================================
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: ADACTIVE_WRITE_PROFILE

C !INTERFACE:
SUBROUTINE ADACTIVE_WRITE_PROFILE(
I active_num_file,
I nadactive_var,
Expand All @@ -92,30 +96,26 @@ SUBROUTINE ADACTIVE_WRITE_PROFILE(
I dummy
& )

C !DESCRIPTION: \bv
C ==================================================================
C SUBROUTINE adactive_write_profile
C ==================================================================
C o Adjoint of active_write_profile.
C ==================================================================
C !DESCRIPTION:
C Adjoint of active_write_profile.

C !USES:
IMPLICIT NONE

C == global variables ==
C == Global variables ===
#include "EEPARAMS.h"
#include "SIZE.h"
#ifdef ALLOW_PROFILES
# include "PROFILES_SIZE.h"
# include "profiles.h"
#endif

C == routine arguments ==
C !INPUT/OUTPUT PARAMETERS:
C active_var_file: filename
C nadactive_var: integer size of adactive_var
C adactive_var: array
C irec: record number
C myIter: number of optimization iteration (default: 0)
C myThid: thread number for this instance
C myThid: my thread ID number
C doglobalread: flag for global or local read/write
C (default: .false.)
C lAdInit: initialisation of corresponding adjoint
Expand All @@ -126,9 +126,7 @@ SUBROUTINE ADACTIVE_WRITE_PROFILE(
INTEGER myIter
INTEGER bi,bj,myThid
_RL dummy


C == end of interface ==
CEOP

#ifdef ALLOW_PROFILES

Expand All @@ -142,5 +140,3 @@ SUBROUTINE ADACTIVE_WRITE_PROFILE(

RETURN
END

C ==================================================================
31 changes: 15 additions & 16 deletions pkg/profiles/active_file_profiles_g.F
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@

C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: G_ACTIVE_READ_PROFILE
C !INTERFACE:
C !ROUTINE: G_ACTIVE_READ_PROFILE

C !INTERFACE:
SUBROUTINE G_ACTIVE_READ_PROFILE(
I active_num_file,
I nactive_var,
O active_var,
I g_active_var,
O g_active_var,
I active_varnum,
I irec,
I lAdInit,
I myOptimIter,
I bi,
I bj,
I myThid,
I dummy
O dummy
& )

C !DESCRIPTION:
C
C Read active 1D records from file for tangent linear simulation

C !USES:
IMPLICIT NONE

C == Global variables ===
#include "EEPARAMS.h"
#include "SIZE.h"
#ifdef ALLOW_PROFILES
Expand All @@ -54,7 +54,7 @@ SUBROUTINE G_ACTIVE_READ_PROFILE(
C active_var: array
C irec: record number
C myOptimIter: number of optimization iteration (default: 0)
C myThid: thread number for this instance
C myThid: my thread ID number
C lAdInit: initialisation of corresponding adjoint
C variable and write to active file
INTEGER active_num_file
Expand All @@ -68,9 +68,9 @@ SUBROUTINE G_ACTIVE_READ_PROFILE(
_RL active_var(nactive_var)
_RL g_active_var(nactive_var)
_RL dummy
CEOP

#ifdef ALLOW_PROFILES
CEOP

CALL ACTIVE_READ_PROFILE_RL( fidforward(active_num_file,bi,bj),
& active_num_file,
Expand All @@ -91,8 +91,9 @@ SUBROUTINE G_ACTIVE_READ_PROFILE(

C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: G_ACTIVE_WRITE_PROFILE
C !INTERFACE:
C !ROUTINE: G_ACTIVE_WRITE_PROFILE

C !INTERFACE:
SUBROUTINE G_ACTIVE_WRITE_PROFILE(
I active_num_file,
I nactive_var,
Expand All @@ -108,13 +109,12 @@ SUBROUTINE G_ACTIVE_WRITE_PROFILE(
I g_dummy
& )

C !DESCRIPTION: \bv
C
C !DESCRIPTION:
C Write active 1D records to file for tangent linear simulation

C !USES:
IMPLICIT NONE

C == Global variables ===
#include "EEPARAMS.h"
#include "SIZE.h"
#ifdef ALLOW_PROFILES
Expand All @@ -128,7 +128,7 @@ SUBROUTINE G_ACTIVE_WRITE_PROFILE(
C active_var: array
C irec: record number
C myOptimIter: number of optimization iteration (default: 0)
C myThid: thread number for this instance
C myThid: my thread ID number
INTEGER nactive_var,active_num_file
_RL active_var(nactive_var)
_RL g_active_var(nactive_var)
Expand All @@ -138,9 +138,9 @@ SUBROUTINE G_ACTIVE_WRITE_PROFILE(
_RL dummy
_RL g_dummy
C !OUTPUT PARAMETERS:
CEOP

#ifdef ALLOW_PROFILES
CEOP

CALL ACTIVE_WRITE_PROFILE_RL( fidforward(active_num_file,bi,bj),
& active_num_file,
Expand All @@ -158,4 +158,3 @@ SUBROUTINE G_ACTIVE_WRITE_PROFILE(

RETURN
END
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
Loading

0 comments on commit 02a7121

Please sign in to comment.