1 |
C $Header: /u/gcmpack/MITgcm/pkg/atm2d/atm2d_init_fixed.F,v 1.2 2007/10/08 23:48:28 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ctrparam.h" |
5 |
#ifdef OCEAN_3D |
6 |
# include "ATM2D_OPTIONS.h" |
7 |
#endif |
8 |
C |
9 |
#ifndef OCEAN_3D |
10 |
SUBROUTINE ATM2D_INIT_FIXED(nCouplePer, myThid) |
11 |
#else |
12 |
SUBROUTINE ATM2D_INIT_FIXED(myThid) |
13 |
#endif |
14 |
C |==========================================================| |
15 |
C | Initialization steps prior to any pickup info loaded. | |
16 |
C \==========================================================/ |
17 |
IMPLICIT NONE |
18 |
|
19 |
#include "ATMSIZE.h" |
20 |
#include "DRIVER.h" |
21 |
#ifdef OCEAN_3D |
22 |
# include "SIZE.h" |
23 |
# include "EEPARAMS.h" |
24 |
# include "PARAMS.h" |
25 |
#endif |
26 |
|
27 |
C !INPUT/OUTPUT PARAMETERS: |
28 |
C == Routine arguments == |
29 |
C nCouplePer - total number of coupled periods for this run |
30 |
C myThid - thread number for this instance of the routine. |
31 |
#ifndef OCEAN_3D |
32 |
INTEGER nCouplePer !not a subroutine parm for OCEAN_3D |
33 |
#endif |
34 |
INTEGER myThid |
35 |
|
36 |
NAMELIST /COUPLE_PARM/ |
37 |
& dtcouple, dtatm, dtocn, startYear, endYear, taveDump |
38 |
|
39 |
C === Local variables === |
40 |
#ifdef OCEAN_3D |
41 |
INTEGER nCouplePer !not a subroutine parm for OCEAN_3D |
42 |
#endif |
43 |
|
44 |
CALL CHECK_SETTINGS |
45 |
|
46 |
C set default values for these parms in couple.nml |
47 |
dtatm = 1 |
48 |
dtocn = 8 |
49 |
dtcouple = 8 |
50 |
startYear = 1 |
51 |
endYear = 100 |
52 |
taveDump=100 |
53 |
|
54 |
C Next lines done in stand-alone ML model, so don't use any |
55 |
C MITGCM helper routines; hopefully no unit conflict... |
56 |
OPEN(514,file='couple.nml',status='old') |
57 |
READ(514,COUPLE_PARM) |
58 |
CLOSE(514) |
59 |
|
60 |
#ifdef OCEAN_3D |
61 |
CALL ATM2D_READPARMS(myThid) |
62 |
#endif |
63 |
|
64 |
ncall_atm=dtcouple/dtatm |
65 |
ncall_ocean=dtcouple/dtocn |
66 |
nCouplePer = (endYear-startYear+1)*24*365/dtcouple |
67 |
|
68 |
PRINT *,'Model run years:',startYear,' to ', endYear |
69 |
PRINT *,'dcouple=',dtcouple |
70 |
PRINT *,'dtatm=',dtatm |
71 |
PRINT *,'dtocn=',dtocn |
72 |
PRINT *,'Total number of coupled periods:',nCouplePer |
73 |
|
74 |
#ifdef OCEAN_3D |
75 |
nTimeSteps = nCouplePer !overwrite whatever MITGCM gets from data |
76 |
#endif |
77 |
|
78 |
#ifdef CPL_OCEANCO2 |
79 |
ocupt=0.0 |
80 |
temuptann=0.0 |
81 |
#endif |
82 |
|
83 |
#ifdef IPCC_EMI |
84 |
OPEN (961,file='ipccemi.dat', |
85 |
& status='old') |
86 |
READ (961,*)nemis |
87 |
PRINT *,'IPCC EMI=',nemis |
88 |
CLOSE (961) |
89 |
#endif |
90 |
|
91 |
#ifdef OCEAN_3D |
92 |
# ifdef ATM2D_MPI_ON |
93 |
|
94 |
CALL INITIALISE |
95 |
|
96 |
C Perform registration with other components |
97 |
CALL ACCEPT_COMPONENT_REGISTRATIONS |
98 |
|
99 |
C Coordinate the transfer configuration information |
100 |
C between components |
101 |
CALL RECEIVE_COMPONENT_CONFIGS |
102 |
CALL SENDOUT_COMPONENT_CONFIGS |
103 |
# endif |
104 |
|
105 |
CALL INIT_ATM2D(dtatm, dtocn, dtcouple, myThid) |
106 |
#endif |
107 |
|
108 |
RETURN |
109 |
END |