/[MITgcm]/MITgcm_contrib/ESMF/global_ocean.128x60x15/code/driver_init.F
ViewVC logotype

Contents of /MITgcm_contrib/ESMF/global_ocean.128x60x15/code/driver_init.F

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


Revision 1.3 - (show annotations) (download)
Thu May 12 03:00:39 2005 UTC (20 years, 2 months ago) by cnh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
oops!

1 C $Header: /u/gcmpack/MITgcm_contrib/ESMF/global_ocean.128x60x15/code/driver_init.F,v 1.2 2005/05/12 02:25:50 cnh Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: DRIVER_INIT
8 C !INTERFACE:
9 SUBROUTINE DRIVER_INIT(
10 I atm_HeatFlux, atm_TauX, atm_TauY,
11 I atm_Qlatent, atm_Qsensible, atm_Qlongwave,
12 I atm_Qshortwave,
13 I atm_uVelGround, atm_vVelGround,
14 I atm_FWFlux,
15 I atm_Hatm,
16 O ocn_SSTocn, ocn_Hocn,
17 O ocn_uVelocn, ocn_vVelocn,
18 O ocn_rVolTop
19 & )
20 C !DESCRIPTION: \bv
21 C *==================================================================
22 C | SUBROUTINE driver_init
23 C | o External driver control routine for MITgcm init phase.
24 C *==================================================================
25 C |
26 C | DRIVER routines are used to control the MITgcm code from an external
27 C | driver. This routine invokes the init phase of code execution
28 C |
29 C *==================================================================
30 C \ev
31 C !USES:
32 IMPLICIT NONE
33 C == Global variables ==
34 #include "SIZE.h"
35 #include "EEPARAMS.h"
36 #include "PARAMS.h"
37 #include "GRID.h"
38 #include "OCNCPL.h"
39 #include "DYNVARS.h"
40 C == Routine arguments ==
41 _RL atm_HeatFlux( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42 _RL atm_TauX( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
43 _RL atm_TauY( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
44 _RL atm_Qlatent( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
45 _RL atm_Qsensible( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46 _RL atm_Qlongwave( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
47 _RL atm_Qshortwave( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
48 _RL atm_uVelGround( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
49 _RL atm_vVelGround( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
50 _RL atm_FWFlux( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
51 _RL atm_Hatm( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
52 _RL ocn_SSTocn( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
53 _RL ocn_Hocn( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
54 _RL ocn_uVelocn( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
55 _RL ocn_vVelocn( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
56 _RL ocn_rVolTop( 1-OLx:sNx+OLx,1-OLy:sNy+OLy)
57 C == Local variables ==
58 INTEGER iLoop
59 INTEGER myThid
60 INTEGER myCurrentIter
61 _RL myCurrentTime
62 INTEGER I,J,K,bi,bj
63 CEOP
64
65 CALL COMP_OCN_PUSH_CONTEXT(1)
66
67 myThid = 1
68 CALL EEBOOT()
69 C Read the import fields
70 DO bj=myByLo(myThid),myByHi(myThid)
71 DO bi=myBxLo(myThid),myBxHi(myThid)
72 DO j=1-OLy,sNy+OLy
73 DO i=1-OLx,sNx+OLx
74 HeatFlux( i,j,bi,bj)=atm_HeatFlux( i,j)
75 TauX( i,j,bi,bj)=atm_tauX( i,j)
76 TauY( i,j,bi,bj)=atm_tauY( i,j)
77 Qlatent( i,j,bi,bj)=atm_qLatent( i,j)
78 Qsensible( i,j,bi,bj)=atm_qSensible( i,j)
79 Qlongwave( i,j,bi,bj)=atm_qLongwave( i,j)
80 Qshortwave( i,j,bi,bj)=atm_qShortwave(i,j)
81 uVelGround( i,j,bi,bj)=atm_uVelGround(i,j)
82 vVelGround( i,j,bi,bj)=atm_vVelGround(i,j)
83 FWFlux( i,j,bi,bj)=atm_FWFlux( i,j)
84 Hatm( i,j,bi,bj)=atm_Hatm( i,j)
85 ENDDO
86 ENDDO
87 ENDDO
88 ENDDO
89
90 CALL INITIALISE_FIXED( myThid )
91 CALL INITIALISE_VARIA( myThid )
92 myCurrentTime = startTime
93 myCurrentIter = nIter0
94 iLoop = 1
95 CALL FORWARD_STEP_SETUP( iLoop, myCurrentTime,
96 & myCurrentIter, myThid )
97
98 C Fill the export fields
99 DO bj=myByLo(myThid),myByHi(myThid)
100 DO bi=myBxLo(myThid),myBxHi(myThid)
101 DO j=1,sNy
102 DO i=1,sNx
103 ocn_SSTocn(i,j) = SSTocn2cpl(i,j,bi,bj)
104 ocn_Hocn( i,j) = R_low( i,j,bi,bj)
105 ocn_uVelocn(i,j) = uVel(i,j,bi,bj,1)
106 ocn_vVelocn(i,j) = vVel(i,j,bi,bj,1)
107 ocn_rVolTop( i,j) =
108 & _recip_hFacC(i,j,1,bi,bj)*recip_drF(1)*recip_rA(i,j,bi,bj)
109 ENDDO
110 ENDDO
111 ENDDO
112 ENDDO
113
114 WRITE( 6,*) 'MAXVAL SSTocn2cpl = ', MAXVAL(SSTocn2cpl(1:snx,1:sny,:,:))
115 WRITE( 6,*) 'MINVAL SSTocn2cpl = ', MINVAL(SSTocn2cpl(1:snx,1:sny,:,:))
116 WRITE( 6,*) 'MAXVAL ocn_SSTocn = ', MAXVAL(ocn_SSTocn(1:snx,1:sny))
117 WRITE( 6,*) 'MINVAL ocn_SSTocn = ', MINVAL(ocn_SSTocn(1:snx,1:sny))
118
119 ! CLOSE(errorMessageUnit)
120 ! CLOSE(standardMessageUnit)
121 CALL COMP_OCN_POP_CONTEXT(1)
122
123 RETURN
124 END

  ViewVC Help
Powered by ViewVC 1.1.22