/[MITgcm]/MITgcm/pkg/atm_compon_interf/atm_store_surfflux.F
ViewVC logotype

Contents of /MITgcm/pkg/atm_compon_interf/atm_store_surfflux.F

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


Revision 1.1 - (show annotations) (download)
Wed Sep 11 20:17:27 2013 UTC (10 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64o, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint65p, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65
- regroup per field origin (model & pkgs) the coupling storage routines
   (which accumalate in time each coupling field)
- move bi,bj loops inside atm_store_my_data.F and store alos wind-stress;
  update accordingly + simplify aim_do_physics.F

1 C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/atm_store_atmslp.F,v 1.1 2004/05/21 19:59:38 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: ATM_STORE_SURFFLUX
8 C !INTERFACE:
9 SUBROUTINE ATM_STORE_SURFFLUX(
10 I bi, bj,
11 I myTime, myIter, myThid )
12
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | SUBROUTINE ATM_STORE_SURFFLUX
16 C | o Routine for saving surface flux fields (in FFIELDS.h)
17 C | for export to coupling layer.
18 C *==========================================================*
19 C | This version interfaces to the main model
20 C *==========================================================*
21 C \ev
22
23 C !USES:
24 IMPLICIT NONE
25
26 C == Global variables ==
27 #include "SIZE.h"
28
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "CPL_PARAMS.h"
32 C == Global variables (main model)
33 #include "FFIELDS.h"
34 C == Global variables for coupling interface ==
35 #include "ATMCPL.h"
36
37 C !INPUT/OUTPUT PARAMETERS:
38 C bi, bj :: Tile indices
39 C myTime :: Current time in simulation (s)
40 C myIter :: Current iteration number
41 C myThid :: My Thread Id. number
42 INTEGER bi, bj
43 _RL myTime
44 INTEGER myIter
45 INTEGER myThid
46
47 C !LOCAL VARIABLES:
48 C i, j :: Loop counters
49 INTEGER i,j
50 _RL cplTimeFraction
51 CEOP
52
53 cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)
54
55 C o Accumulate net surface heat flux (Qnet, +=upward, W/m2)
56 C that will be exported to the coupling layer.
57 HeatFluxTime(bi,bj) = HeatFluxTime(bi,bj) + cplTimeFraction
58 DO j=1,sNy
59 DO i=1,sNx
60 HeatFlux(i,j,bi,bj) = HeatFlux(i,j,bi,bj)
61 & + Qnet(i,j,bi,bj)*cplTimeFraction
62 ENDDO
63 ENDDO
64
65 C o Accumulate net surface shortwave heat flux (Qsw, +=upward, W/m2)
66 C that will be exported to the coupling layer.
67 qShortWaveTime(bi,bj) = qShortWaveTime(bi,bj) + cplTimeFraction
68 DO j=1,sNy
69 DO i=1,sNx
70 qShortWave(i,j,bi,bj) = qShortWave(i,j,bi,bj)
71 & + Qsw(i,j,bi,bj)*cplTimeFraction
72 ENDDO
73 ENDDO
74
75 C o Accumulate fresh water flux ( E-P, +=upward, kg/m^2/s)
76 C that will be exported to the coupling layer.
77 EvMPrTime(bi,bj) = EvMPrTime(bi,bj) + cplTimeFraction
78 DO j=1,sNy
79 DO i=1,sNx
80 EvMPrFlux(i,j,bi,bj) = EvMPrFlux(i,j,bi,bj)
81 & + EmPmR(i,j,bi,bj)*cplTimeFraction
82 ENDDO
83 ENDDO
84
85 IF ( useThSIce ) THEN
86 C o Accumulate SaltFlux from sea-ice (saltFlux, +=upward, g/m^2/s)
87 C that will be exported to the coupling layer.
88 saltFxTime(bi,bj) = saltFxTime(bi,bj) + cplTimeFraction
89 DO j=1,sNy
90 DO i=1,sNx
91 iceSaltFlx(i,j,bi,bj) = iceSaltFlx(i,j,bi,bj)
92 & + saltFlux(i,j,bi,bj)*cplTimeFraction
93 ENDDO
94 ENDDO
95 ENDIF
96
97 IF ( useAtm_Phys ) THEN
98 C o Accumulate surface wind-stress
99 C that will be exported to the coupling layer.
100 tauXTime(bi,bj) = tauXTime(bi,bj) + cplTimeFraction
101 tauYTime(bi,bj) = tauYTime(bi,bj) + cplTimeFraction
102 DO j=1,sNy
103 DO i=1,sNx
104 tauX(i,j,bi,bj) = tauX(i,j,bi,bj)
105 & + fu(i,j,bi,bj)*cplTimeFraction
106 tauY(i,j,bi,bj) = tauY(i,j,bi,bj)
107 & + fv(i,j,bi,bj)*cplTimeFraction
108 ENDDO
109 ENDDO
110 ENDIF
111
112 RETURN
113 END

  ViewVC Help
Powered by ViewVC 1.1.22