/[MITgcm]/MITgcm_contrib/jscott/pkg_atm2d/month_end_diags.F
ViewVC logotype

Contents of /MITgcm_contrib/jscott/pkg_atm2d/month_end_diags.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Aug 11 18:55:50 2006 UTC (19 years, 4 months ago) by jscott
Branch: MAIN
new 2d atm package

1 #include "ctrparam.h"
2 #include "ATM2D_OPTIONS.h"
3
4 C !INTERFACE:
5 SUBROUTINE MONTH_END_DIAGS( monid, myTime, myIter, myThid )
6 C *==========================================================*
7 C | |
8 c | |
9 C *==========================================================*
10 IMPLICIT NONE
11
12 C === Global Atmosphere Variables ===
13 #include "ATMSIZE.h"
14 #include "SIZE.h"
15 #include "EEPARAMS.h"
16 #include "ATM2D_VARS.h"
17
18 C !INPUT/OUTPUT PARAMETERS:
19 C === Routine arguments ===
20 C monid - current month of the year
21 C myTime - current simulation time (ocean model time)
22 C myIter - iteration number (ocean model)
23 C myThid - Thread no. that called this routine.
24 INTEGER monid
25 _RL myTime
26 INTEGER myIter
27 INTEGER myThid
28
29 C LOCAL VARIABLES:
30 CHARACTER*(MAX_LEN_MBUF) suff
31 INTEGER ndmonth(12)
32 DATA ndmonth/31,28,31,30,31,30,31,31,30,31,30,31/
33 INTEGER i,j
34 _RS norm_factor
35
36
37 DO j=1,sNy
38 DO i=1,sNx
39
40 qnet_atm_ta(i,j,monid)= qnet_atm_ta(i,j,monid) +
41 & qnet_atm(i,j)
42 evap_atm_ta(i,j,monid)= evap_atm_ta(i,j,monid) +
43 & evap_atm(i,j)
44 precip_atm_ta(i,j,monid)= precip_atm_ta(i,j,monid) +
45 & precip_atm(i,j)
46 runoff_atm_ta(i,j,monid)= runoff_atm_ta(i,j,monid) +
47 & runoff_atm(i,j)
48 sum_qrel_ta(i,j,monid)= sum_qrel_ta(i,j,monid) +
49 & sum_qrel(i,j)
50 sum_frel_ta(i,j,monid)= sum_frel_ta(i,j,monid) +
51 & sum_frel(i,j)
52
53 norm_factor = ndmonth(monid)*86400.0
54 qnet_atm(i,j)=qnet_atm(i,j)/ norm_factor
55 evap_atm(i,j)=evap_atm(i,j)/ norm_factor
56 precip_atm(i,j)= precip_atm(i,j)/ norm_factor
57 runoff_atm(i,j)= runoff_atm(i,j)/ norm_factor
58 sum_qrel(i,j)= sum_qrel(i,j)/ norm_factor
59 sum_frel(i,j)= sum_frel(i,j)/ norm_factor
60
61 ENDDO
62 ENDDO
63
64 WRITE(suff,'(I2.2)') monid
65 CALL WRITE_FLD_XY_RL('mQnetAtmtave.', suff, qnet_atm,
66 & myIter, myThid)
67 CALL WRITE_FLD_XY_RL('mEvapAtmtave.', suff, evap_atm,
68 & myIter, myThid)
69 CALL WRITE_FLD_XY_RL('mPrecipAtmtave.', suff, precip_atm,
70 & myIter, myThid)
71 CALL WRITE_FLD_XY_RL('mRunoffAtmtave.', suff, runoff_atm,
72 & myIter, myThid)
73 CALL WRITE_FLD_XY_RL('mQrelfluxtave.', suff, sum_qrel,
74 & myIter, myThid)
75 CALL WRITE_FLD_XY_RL('mFrelfluxtave.', suff, sum_frel,
76 & myIter, myThid)
77
78 DO j=1,sNy
79 DO i=1,sNx
80
81 qnet_atm(i,j)= 0. _d 0
82 evap_atm(i,j)= 0. _d 0
83 precip_atm(i,j)= 0. _d 0
84 runoff_atm(i,j)= 0. _d 0
85 sum_qrel(i,j)= 0. _d 0
86 sum_frel(i,j)= 0. _d 0
87
88 ENDDO
89 ENDDO
90
91 RETURN
92 END
93

  ViewVC Help
Powered by ViewVC 1.1.22