forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sum_yr_end_diags.F
75 lines (61 loc) · 2.08 KB
/
sum_yr_end_diags.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
C $Header: /u/gcmpack/MITgcm/pkg/atm2d/sum_yr_end_diags.F,v 1.3 2007/10/08 23:48:28 jmc Exp $
C $Name: $
#include "ctrparam.h"
#include "ATM2D_OPTIONS.h"
C !INTERFACE:
SUBROUTINE SUM_YR_END_DIAGS( myTime, myIter, myThid )
C *==========================================================*
C | Tabulate year-end annual mean diagnostics |
c | Called at top of coupled period, after seaice growth/melt|
C *==========================================================*
IMPLICIT NONE
C === Global Atmosphere Variables ===
#include "ATMSIZE.h"
#include "SIZE.h"
#include "GRID.h"
#include "EEPARAMS.h"
#include "THSICE_VARS.h"
#include "ATM2D_VARS.h"
C !INPUT/OUTPUT PARAMETERS:
C === Routine arguments ===
C myTime - current simulation time (ocean model time)
C myIter - iteration number (ocean model)
C myThid - Thread no. that called this routine.
_RL myTime
INTEGER myIter
INTEGER myThid
C LOCAL VARIABLES:
INTEGER i,j
_RL iceArea
iceArea = 0. _d 0
DO j=1,int(sNy/2)
DO i=1,sNx
IF (iceMask(i,j,1,1).GT. 0. _d 0)
& iceArea = iceArea + rA(i,j,1,1)*iceMask(i,j,1,1)
ENDDO
ENDDO
SHice_min=min(SHice_min,iceArea)
SHice_max=max(SHice_max,iceArea)
iceArea = 0. _d 0
DO j=int(sNy/2),sNy
DO i=1,sNx
IF (iceMask(i,j,1,1).GT. 0. _d 0)
& iceArea = iceArea + rA(i,j,1,1)*iceMask(i,j,1,1)
ENDDO
ENDDO
NHice_min=min(NHice_min,iceArea)
NHice_max=max(NHice_max,iceArea)
DO j=1,sNy
DO i=1,sNx
IF (maskC(i,j,1,1,1) .EQ. 1.) THEN
sst_tave= sst_tave + rA(i,j,1,1)*sstFromOcn(i,j)
sss_tave= sss_tave + rA(i,j,1,1)*sssFromOcn(i,j)
HF2ocn_tave = HF2ocn_tave + rA(i,j,1,1)*pass_qnet(i,j)
FW2ocn_tave = FW2ocn_tave + rA(i,j,1,1)*
& (pass_precip(i,j) + pass_evap(i,j) + pass_runoff(i,j))
CO2flx_tave = CO2flx_tave + rA(i,j,1,1)*oFluxCO2(i,j)
ENDIF
ENDDO
ENDDO
RETURN
END