Back to home page

MITgcm

 
 

    


File indexing completed on 2021-11-06 05:18:00 UTC

view on githubraw file Latest commit 016b84c4 on 2021-11-02 20:24:44 UTC
89474f9a5c Mart*0001 #include "GGL90_OPTIONS.h"
                0002 
                0003 CBOP
1b34d15cdf Jean*0004 C     !ROUTINE: GGL90_OUTPUT
89474f9a5c Mart*0005 C     !INTERFACE:
1b34d15cdf Jean*0006       SUBROUTINE GGL90_OUTPUT( myTime, myIter, myThid )
19bd6d29d3 Jean*0007 
89474f9a5c Mart*0008 C     !DESCRIPTION: \bv
                0009 C     *==========================================================*
1b34d15cdf Jean*0010 C     | SUBROUTINE GGL90_OUTPUT
                0011 C     | o Do GGL90 diagnostic output.
89474f9a5c Mart*0012 C     *==========================================================
                0013 C     | The following CPP flag (MULTIPLE_RECORD_GGL90_STATE_FILES) is
                0014 C     | #define/#undefed here since it is specific to this routine
                0015 C     | and very user-preference specific.
                0016 C     |
                0017 C     | If #undefed (default) the state files are written as in all versions
                0018 C     | prior to checkpoint32, where a file is created per variable, per time
                0019 C     | and per tile. This *has* to be the default because most users use this
                0020 C     | mode and all utilities and scripts (diagnostic) assume this form.
                0021 C     | It is also robust, as explained below.
                0022 C     |
                0023 C     | If #defined, subsequent snap-shots are written as records in the
                0024 C     | same file (no iteration number in filenames).
                0025 C     | Advantages: - fewer files
                0026 C     |       - for small problems, is easy to copy the output around
                0027 C     | Disadvantages:
                0028 C     |       - breaks a lot of diagnostic scripts
                0029 C     |       - for large or long problems this creates huge files
                0030 C     |       - is an unexpected, unsolicited change in behaviour which came
                0031 C     |         as a surprise (in c32) and inconvenience to several users
                0032 C     |       - can not accomodate changing the frequency of output
                0033 C     |         after a pickup (this is trivial in previous method
                0034 C     |         but needs new code and parameters in this new method)
                0035 C     *==========================================================*
                0036 C     \ev
                0037 
                0038 C     !USES:
                0039       IMPLICIT NONE
                0040 C     === Global variables ===
                0041 #include "SIZE.h"
                0042 #include "EEPARAMS.h"
                0043 #include "PARAMS.h"
                0044 #include "GGL90.h"
                0045 
                0046 C     !INPUT/OUTPUT PARAMETERS:
                0047 C     == Routine arguments ==
1b34d15cdf Jean*0048 C     myTime :: my time in simulation ( s )
                0049 C     myIter :: my Iteration number
                0050 C     myThid :: my Thread Id number
                0051       _RL     myTime
89474f9a5c Mart*0052       INTEGER myIter
                0053       INTEGER myThid
                0054 
                0055 #ifdef ALLOW_GGL90
                0056 
19bd6d29d3 Jean*0057 C     !FUNCTIONS:
                0058       LOGICAL  DIFFERENT_MULTIPLE
                0059       EXTERNAL DIFFERENT_MULTIPLE
                0060 
89474f9a5c Mart*0061 C     !LOCAL VARIABLES:
                0062 C     == Local variables ==
df5a9764ba Jean*0063       CHARACTER*(10) suff
89474f9a5c Mart*0064 CEOP
                0065 
                0066 C----------------------------------------------------------------
                0067 C     Dump snapshot of GGL90 variables.
                0068 C----------------------------------------------------------------
                0069 
                0070       IF (
1b34d15cdf Jean*0071      &     DIFFERENT_MULTIPLE(GGL90dumpFreq,myTime,deltaTClock)
89474f9a5c Mart*0072      &     ) THEN
                0073 
1b34d15cdf Jean*0074        IF (GGL90writeState) THEN
                0075 C       Write each snap-shot as a new file
df5a9764ba Jean*0076         IF ( rwSuffixType.EQ.0 ) THEN
                0077           WRITE(suff,'(I10.10)') myIter
                0078         ELSE
                0079           CALL RW_GET_SUFFIX( suff, myTime, myIter, myThid )
                0080         ENDIF
19bd6d29d3 Jean*0081         IF ( myIter.NE.nIter0 ) THEN
f6b150f7f1 Gael*0082          CALL WRITE_FLD_XYZ_RL( 'GGL90viscArU.', suff,
                0083      &                           GGL90viscArU, myIter, myThid )
                0084          CALL WRITE_FLD_XYZ_RL( 'GGL90viscArV.', suff,
                0085      &                           GGL90viscArV, myIter, myThid )
19bd6d29d3 Jean*0086          CALL WRITE_FLD_XYZ_RL( 'GGL90diffKr.', suff,
                0087      &                           GGL90diffKr, myIter, myThid )
                0088         ENDIF
                0089         CALL WRITE_FLD_XYZ_RL(  'GGL90TKE.',    suff,
                0090      &                           GGL90TKE,    myIter, myThid )
1b34d15cdf Jean*0091        ENDIF
89474f9a5c Mart*0092 
                0093       ENDIF
                0094 
19bd6d29d3 Jean*0095 #endif /* ALLOW_GGL90 */
1b34d15cdf Jean*0096 
89474f9a5c Mart*0097       RETURN
                0098       END