/[MITgcm]/MITgcm/pkg/aim_compon_interf/atm_export_fld.F
ViewVC logotype

Contents of /MITgcm/pkg/aim_compon_interf/atm_export_fld.F

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


Revision 1.1 - (show annotations) (download)
Sun Jul 2 22:47:19 2006 UTC (17 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58u_post, checkpoint60, checkpoint61, checkpoint62, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58w_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58o_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58m_post
simplify the "export" step using the generic S/R: ATM_EXPORT_FLD

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/atm_export_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_EXPORT_FLD
8 C !INTERFACE:
9 SUBROUTINE ATM_EXPORT_FLD(
10 I atmFldName,
11 U atmFld, countTime,
12 I myThid )
13
14 C !DESCRIPTION: \bv
15 C *==========================================================*
16 C | SUBROUTINE ATM_EXPORT_FLD
17 C | o Routine for exporting 1 atmos. field to coupling layer:
18 C | - compute the time-average (if needed)
19 C | - send the field to the coupler
20 C | - reset time and field to zero
21 C *==========================================================*
22 C | This version talks to the MIT Coupler. It uses the MIT
23 C | Coupler "checkpoint1" library calls.
24 C *==========================================================*
25 C \ev
26
27 C !USES:
28 IMPLICIT NONE
29 C == Global variables ==
30 #include "SIZE.h"
31 #include "EEPARAMS.h"
32
33 C !INPUT/OUTPUT PARAMETERS:
34 C === Routine arguments ===
35 C atmFldName :: atmos. Field identificator name
36 C atmFld :: array containing the atmospheric Field to export
37 C countTime :: fractional integrated time
38 C myThid :: my Thread Id number
39 CHARACTER*(*) atmFldName
40 _RL atmFld (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
41 _RL countTime(nSx,nSy)
42 INTEGER myThid
43 CEOP
44
45 C == Local variables ==
46 C recipAvT :: Temp. for holding reciprocal of averaging period.
47 C i,j,bi,bj :: Loop counters
48 _RL recipAvT
49 INTEGER i,j,bi,bj
50
51 C Convert time integrated heatflux to mean value ready for export.
52 DO bj=myByLo(myThid),myByHi(myThid)
53 DO bi=myBxLo(myThid),myBxHi(myThid)
54 IF ( ABS(countTime(bi,bj) -1. _d 0).GT. 1. _d -12
55 & .AND. countTime(bi,bj) .NE. 0. ) THEN
56 recipAvT = 1. _d 0/countTime(bi,bj)
57 DO j=1,sNy
58 DO i=1,sNx
59 atmFld(i,j,bi,bj) = atmFld(i,j,bi,bj)*recipAvT
60 ENDDO
61 ENDDO
62 WRITE(errorMessageUnit,'(3A,2I4,1PE15.8)')
63 & 'ATM_EXPORT_FLD: ',atmFldName,' : 1-CountTime=',
64 & bi,bj,1.-countTime(bi,bj)
65 ENDIF
66 ENDDO
67 ENDDO
68
69 C Send atmos. field to coupling layer.
70 CALL COMPSEND_R8TILES( atmFldName,
71 I sNx, OLx, sNy, OLy, 1, nSx, nSy, atmFld )
72
73 C Reset atmos. field & integrated time before accumulating again.
74 DO bj=myByLo(myThid),myByHi(myThid)
75 DO bi=myBxLo(myThid),myBxHi(myThid)
76 countTime(bi,bj) = 0.
77 DO j=1,sNy
78 DO i=1,sNx
79 atmFld(i,j,bi,bj) = 0.
80 ENDDO
81 ENDDO
82 ENDDO
83 ENDDO
84
85 RETURN
86 END

  ViewVC Help
Powered by ViewVC 1.1.22