1 |
C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/atm_store_heatflux.F,v 1.2 2004/04/18 15:38:45 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
CStartOfInterface |
7 |
SUBROUTINE ATM_STORE_HEATFLUX( bi,bj, |
8 |
I myTime, |
9 |
I myIter, |
10 |
I myThid ) |
11 |
C /==========================================================\ |
12 |
C | SUBROUTINE ATM_STORE_HEATFLUX | |
13 |
C | o Routine for saving atmos. lower boundary heat flux for | |
14 |
C | export to coupling layer. | |
15 |
C |==========================================================| |
16 |
C | This version interfaces to the MITgcm AIMPHYS package. | |
17 |
C \==========================================================/ |
18 |
IMPLICIT NONE |
19 |
|
20 |
C == Global variables == |
21 |
#include "SIZE.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
#include "CPL_PARAMS.h" |
25 |
C == Global variables (main model) |
26 |
#include "FFIELDS.h" |
27 |
C == Global variables for coupling interface == |
28 |
#include "ATMCPL.h" |
29 |
|
30 |
|
31 |
C == Routine arguments == |
32 |
C bi,bj - Tile index |
33 |
C myThid - Thread number for this instance of the routine |
34 |
C myIter - Current timestep number |
35 |
C myTime - Current model time |
36 |
INTEGER bi, bj |
37 |
_RL myTime |
38 |
INTEGER myIter |
39 |
INTEGER myThid |
40 |
CEndOfInterface |
41 |
|
42 |
#ifdef COMPONENT_MODULE |
43 |
C == Local variables == |
44 |
C i,j - Loop counters |
45 |
INTEGER i,j |
46 |
_RL cplTimeFraction |
47 |
|
48 |
C o Accumulate heat flux that will be exported to the coupling layer. |
49 |
C Heat flux at lower boundary is sum of the upward long-wave radiation |
50 |
C (variable SLR in COMMON/FLUXES/, com_physvar.h), downward short-wave |
51 |
C radiation (variable SSR in COMMON/FLUXES/, com_physvar.h), downward |
52 |
C sensible heat flux (variable SHF in COMMON/FLUXES/, com_physvar.h) |
53 |
C and latent heat flux due to evaporation (variable EVAP in |
54 |
C COMMON/FLUXES/, com_physvar.h). Index 2 of SHF and EVAP give fluxes |
55 |
C over sea. SLR is the flux that is radiated by the ocean/land. SSR |
56 |
C is the incoming short-wave radiation that is absorbed by the ocean/land. |
57 |
C Variable ALHC is the latent heat of evaporation/condensation (see |
58 |
C COMMON/PHYCON/, com_phycon.h). |
59 |
C HeatFlux is defined with positive into the atmosphere, units are W/m^2 |
60 |
C (* deltaTtracer). |
61 |
|
62 |
cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
63 |
HeatFluxTime(bi,bj) = HeatFluxTime(bi,bj) + cplTimeFraction |
64 |
DO j=1,sNy |
65 |
DO i=1,sNx |
66 |
HeatFlux(i,j,bi,bj) = HeatFlux(i,j,bi,bj) |
67 |
& + Qnet(i,j,bi,bj)*cplTimeFraction |
68 |
ENDDO |
69 |
ENDDO |
70 |
|
71 |
#endif /* COMPONENT_MODULE */ |
72 |
|
73 |
RETURN |
74 |
END |