/[MITgcm]/MITgcm/pkg/bulk_force/bulkf_ave.F
ViewVC logotype

Contents of /MITgcm/pkg/bulk_force/bulkf_ave.F

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


Revision 1.2 - (show annotations) (download)
Wed Dec 4 14:53:39 2002 UTC (21 years, 6 months ago) by cheisey
Branch: MAIN
CVS Tags: checkpoint47b_post
Changes since 1.1: +1 -3 lines
Fixing bug in which diagnostic quantities are
not properly computed when using multiple tiles
on a single processor (Time cumulation array needs
to be dimensioned over Nr, but only k=1 is actually
used.  This makes routine compatible with routines
in pkg/timeave).

1 #include "CPP_OPTIONS.h"
2
3 C !ROUTINE: BULKF_AVE
4 C !INTERFACE:
5 SUBROUTINE BULKF_AVE(bi,bj,mythid, fswnet,
6 & flh, fsh, flwup, evap, savssq)
7 C *==========================================================*
8 C | S/R BULKF_AVE
9 C | o save values for timeaveraging
10 C | for sea/ice surface and atmosphere
11 C *==========================================================*
12
13 C !USES:
14 IMPLICIT NONE
15 C == Global variables ==
16 #include "SIZE.h"
17 #include "DYNVARS.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #include "GRID.h"
21 #ifdef ALLOW_BULK_FORCE
22 #include "FFIELDS.h"
23 #include "BULKF.h"
24 #include "BULKF_DIAG.h"
25 #endif
26 c == routine arguments ==
27
28 integer mythid
29 integer bi,bj
30 integer i,j,k
31
32 _RL evap(1-olx:snx+olx,1-oly:sny+oly)
33 _RL savssq(1-olx:snx+olx,1-oly:sny+oly)
34 _RL fsh(1-olx:snx+olx,1-oly:sny+oly)
35 _RL flh(1-olx:snx+olx,1-oly:sny+oly)
36 _RL flwup(1-olx:snx+olx,1-oly:sny+oly)
37 _RL fswnet(1-olx:snx+olx,1-oly:sny+oly)
38
39
40 #ifdef ALLOW_BULK_FORCE
41 #ifdef ALLOW_TIMEAVE
42
43
44 C-- Time-average
45 do j = 1,sny
46 do i = 1,snx
47 BULK_Qnet_AVE(i,j,bi,bj)=BULK_Qnet_AVE(i,j,bi,bj)
48 & +Qnet(i,j,bi,bj)*deltaTclock
49 c & +lambdaThetaClimRelax*
50 c & (theta(i,j,1,bi,bj)-SST(i,j,bi,bj))/
51 c & (recip_Cp*recip_rhoNil*recip_dRf(1))*deltaTclock
52 BULK_EmPmR_AVE(i,j,bi,bj)=BULK_EmPmR_AVE(i,j,bi,bj)
53 & +EmPmR(i,j,bi,bj)*deltaTclock
54 BULK_fu_AVE(i,j,bi,bj)=BULK_fu_AVE(i,j,bi,bj)
55 & +fu(i,j,bi,bj)*deltaTclock
56 BULK_fv_AVE(i,j,bi,bj)=BULK_fv_AVE(i,j,bi,bj)
57 & +fv(i,j,bi,bj)*deltaTclock
58 BULK_latent_AVE(i,j,bi,bj)=BULK_latent_AVE(i,j,bi,bj)
59 & +flh(i,j)*deltaTclock
60 BULK_sensible_AVE(i,j,bi,bj)=BULK_sensible_AVE(i,j,bi,bj)
61 & +fsh(i,j)*deltaTclock
62 BULK_evap_AVE(i,j,bi,bj)=BULK_evap_AVE(i,j,bi,bj)
63 & +evap(i,j)*deltaTclock
64 BULK_flw_AVE(i,j,bi,bj)=BULK_flw_AVE(i,j,bi,bj)
65 & +flwup(i,j)*deltaTclock
66 BULK_solar_AVE(i,j,bi,bj)=BULK_solar_AVE(i,j,bi,bj)
67 & +fswnet(i,j)*deltaTclock
68 BULK_ssq_AVE(i,j,bi,bj)=BULK_ssq_AVE(i,j,bi,bj)
69 & +savssq(i,j)*deltaTclock
70 enddo
71 enddo
72 BULKF_timeave(1,bi,bj)=BULKF_timeave(1,bi,bj)+deltaTclock
73
74
75 #endif /*ALLOW_TIMEAVE*/
76 #endif /*ALLOW_BULK_FORCE*/
77 return
78 end
79

  ViewVC Help
Powered by ViewVC 1.1.22