File indexing completed on 2023-08-04 05:10:48 UTC
view on githubraw file Latest commit 45315406 on 2023-08-03 16:50:12 UTC
e1a538cff8 Dimi*0001 #include "SEAICE_OPTIONS.h"
0002
0003
0004
0005
0006
0007
0008 SUBROUTINE SEAICE_MONITOR(
9baf699ab7 Jean*0009 I myTime, myIter, myThid )
e1a538cff8 Dimi*0010
0011
0012
0013
0014
0015 IMPLICIT NONE
0016 #include "SIZE.h"
0017 #include "EEPARAMS.h"
9baf699ab7 Jean*0018 #include "PARAMS.h"
e1a538cff8 Dimi*0019 #include "GRID.h"
ccaa3c61f4 Patr*0020 #include "SEAICE_SIZE.h"
d1c48a721f Jean*0021 #include "SEAICE_PARAMS.h"
0022 #include "SEAICE.h"
ccaa3c61f4 Patr*0023 #include "SEAICE_TRACER.h"
e1a538cff8 Dimi*0024 #ifdef ALLOW_MONITOR
0025 # include "MONITOR.h"
0026 #endif
0027
0028
0029 INTEGER myIter
0030 _RL myTime
0031 INTEGER myThid
0032
0033
0034 #ifdef ALLOW_MONITOR
49aab2cab9 Jean*0035
9baf699ab7 Jean*0036 LOGICAL DIFFERENT_MULTIPLE
0037 EXTERNAL DIFFERENT_MULTIPLE
49aab2cab9 Jean*0038 LOGICAL MASTER_CPU_IO
0039 EXTERNAL MASTER_CPU_IO
9baf699ab7 Jean*0040
0041
0042 CHARACTER*(MAX_LEN_MBUF) msgBuf
e54fe3e1f9 Gael*0043 #ifdef ALLOW_SITRACER
edfdf5fa1d Jean*0044 INTEGER iTracer
ccaa3c61f4 Patr*0045 CHARACTER*(MAX_LEN_MBUF) suff
edfdf5fa1d Jean*0046 #endif
bc1e1e4129 Jean*0047 #ifdef ALLOW_MNC
0048 INTEGER i
0049 #endif /* ALLOW_MNC */
4a4f1c1bc6 Jean*0050 _RL dummyRL(6)
e1a538cff8 Dimi*0051
d1c48a721f Jean*0052 IF ( DIFFERENT_MULTIPLE(SEAICE_monFreq,myTime,deltaTClock)
9baf699ab7 Jean*0053 & ) THEN
0054
49aab2cab9 Jean*0055 IF ( MASTER_CPU_IO(myThid) ) THEN
d1c48a721f Jean*0056
88f72205aa Jean*0057
d1c48a721f Jean*0058
0059 IF (SEAICE_mon_stdio) THEN
0060 mon_write_stdout = .TRUE.
0061 ELSE
0062 mon_write_stdout = .FALSE.
0063 ENDIF
0064 mon_write_mnc = .FALSE.
0065 #ifdef ALLOW_MNC
0066 IF (useMNC .AND. SEAICE_mon_mnc) THEN
0067 DO i = 1,MAX_LEN_MBUF
0068 mon_fname(i:i) = ' '
0069 ENDDO
0070 mon_fname(1:14) = 'monitor_seaice'
0071 CALL MNC_CW_APPEND_VNAME(
0072 & 'T', '-_-_--__-__t', 0,0, myThid)
0073 CALL MNC_CW_SET_UDIM(mon_fname, -1, myThid)
3393e77079 Mart*0074 CALL MNC_CW_RL_W_S(
0075 & 'D',mon_fname,1,1,'T', myTime, myThid)
d1c48a721f Jean*0076 CALL MNC_CW_SET_UDIM(mon_fname, 0, myThid)
0077 mon_write_mnc = .TRUE.
0078 ENDIF
0079 #endif /* ALLOW_MNC */
0080
0081 IF ( mon_write_stdout ) THEN
0082 WRITE(msgBuf,'(2A)') '// ===========================',
0083 & '============================'
0084 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0085 WRITE(msgBuf,'(A)') '// Begin MONITOR SEAICE statistics'
0086 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0087 WRITE(msgBuf,'(2A)') '// ===========================',
0088 & '============================'
0089 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0090 ENDIF
0091
49aab2cab9 Jean*0092
9baf699ab7 Jean*0093 ENDIF
0094
e1a538cff8 Dimi*0095 CALL MON_SET_PREF('seaice',myThid)
9baf699ab7 Jean*0096 CALL MON_OUT_I ('_tsnumber', myIter,mon_string_none,myThid)
0097 CALL MON_OUT_RL('_time_sec', myTime,mon_string_none,myThid)
0098
0099
74ed16084a Mart*0100 #ifdef SEAICE_CGRID
4a4f1c1bc6 Jean*0101 CALL MON_WRITESTATS_RL( 1, UICE, '_uice',
0102 & maskInW, maskInW, rAw, drF, dummyRL, myThid )
0103 CALL MON_WRITESTATS_RL( 1, VICE, '_vice',
0104 & maskInS, maskInS, rAs, drF, dummyRL, myThid )
45315406aa Mart*0105 #endif
0106 #ifdef SEAICE_BGRID_DYNAMICS
0107 CALL MON_WRITESTATS_RL( 1, UICE, '_uice',
0108 & UVM, UVM, rAz, drF, dummyRL, myThid )
4a4f1c1bc6 Jean*0109 CALL MON_WRITESTATS_RL( 1, VICE, '_vice',
0110 & UVM, UVM, rAz, drF, dummyRL, myThid )
74ed16084a Mart*0111 #endif
1e41019a0c Jean*0112 IF ( .NOT.useThSIce ) THEN
0113 CALL MON_WRITESTATS_RL( 1, AREA, '_area',
4a4f1c1bc6 Jean*0114 & maskInC, maskInC, rA , drF, dummyRL, myThid )
1e41019a0c Jean*0115 CALL MON_WRITESTATS_RL( 1, HEFF, '_heff',
4a4f1c1bc6 Jean*0116 & maskInC, maskInC, rA , drF, dummyRL, myThid )
1e41019a0c Jean*0117 CALL MON_WRITESTATS_RL( 1, HSNOW,'_hsnow',
4a4f1c1bc6 Jean*0118 & maskInC, maskInC, rA , drF, dummyRL, myThid )
a98c4b8072 Ian *0119 #ifdef SEAICE_VARIABLE_SALINITY
1e41019a0c Jean*0120 CALL MON_WRITESTATS_RL( 1, HSALT,'_hsalt',
4a4f1c1bc6 Jean*0121 & maskInC, maskInC, rA , drF, dummyRL, myThid )
a98c4b8072 Ian *0122 #endif /* SEAICE_VARIABLE_SALINITY */
1e41019a0c Jean*0123 ENDIF
e54fe3e1f9 Gael*0124 #ifdef ALLOW_SITRACER
be02c52974 Gael*0125 DO iTracer = 1, SItrNumInUse
e54fe3e1f9 Gael*0126 WRITE(suff,'(A9,I2.2)') '_sitracer', iTracer
edfdf5fa1d Jean*0127 CALL MON_WRITESTATS_RL(
e54fe3e1f9 Gael*0128 & 1,SItracer(1-OLx,1-OLy,1,1,iTracer),suff,
ccaa3c61f4 Patr*0129 & maskInC, maskInC, rA , drF, dummyRL, myThid )
0130 ENDDO
e54fe3e1f9 Gael*0131 #endif /* ALLOW_SITRACER */
9baf699ab7 Jean*0132
49aab2cab9 Jean*0133 IF ( MASTER_CPU_IO(myThid) ) THEN
d1c48a721f Jean*0134
88f72205aa Jean*0135
d1c48a721f Jean*0136
0137 IF ( mon_write_stdout ) THEN
0138 WRITE(msgBuf,'(2A)') '// ===========================',
0139 & '============================'
0140 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0141 WRITE(msgBuf,'(A)') '// End MONITOR SEAICE statistics'
0142 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0143 WRITE(msgBuf,'(2A)') '// ===========================',
0144 & '============================'
0145 CALL PRINT_MESSAGE(msgBuf, mon_ioUnit, SQUEEZE_RIGHT, 1)
0146 ENDIF
0147
0148 mon_write_stdout = .FALSE.
0149 mon_write_mnc = .FALSE.
0150
49aab2cab9 Jean*0151
9baf699ab7 Jean*0152 ENDIF
0153
d1c48a721f Jean*0154
9baf699ab7 Jean*0155 ENDIF
0156
e1a538cff8 Dimi*0157 #endif /* ALLOW_MONITOR */
0158
0159 RETURN
0160 END