/[MITgcm]/MITgcm/pkg/exf/exf_clim_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/exf/exf_clim_readparms.F

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


Revision 1.7 - (show annotations) (download)
Wed Jul 7 19:59:41 2004 UTC (19 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint54b_post, checkpoint54d_post, checkpoint54e_post, checkpoint55b_post, checkpoint55, checkpoint55a_post, checkpoint54f_post, checkpoint54c_post
Changes since 1.6: +24 -16 lines
Invoke cal only if files are specified in data.exf, data.exf_clim

1 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_clim_readparms.F,v 1.6 2004/04/19 22:30:46 mlosch Exp $
2
3 #include "EXF_OPTIONS.h"
4
5
6 subroutine exf_clim_readparms(
7 I mythid
8 & )
9
10 c ==================================================================
11 c SUBROUTINE exf_clim_readparms
12 c ==================================================================
13 c
14 c o This routine initialises the climatologic forcing
15 c
16 c started: Ralf.Giering@FastOpt.de 25-Mai-20000
17 c
18 c ==================================================================
19 c SUBROUTINE exf_clim_readparms
20 c ==================================================================
21
22 implicit none
23
24 c == global variables ==
25
26 #include "EEPARAMS.h"
27 #include "SIZE.h"
28 #include "cal.h"
29 #include "exf.h"
30 #include "exf_param.h"
31 #include "exf_clim_param.h"
32
33 c == routine arguments ==
34
35 integer mythid
36
37 c == local variables ==
38
39 integer i
40 integer date_array(4), difftime(4)
41
42 c == end of interface ==
43
44 c Surface flux data.
45 namelist /exf_clim_nml/
46 & climtempfreeze,
47 & climtempstartdate1, climtempstartdate2, climtempperiod,
48 & climsaltstartdate1, climsaltstartdate2, climsaltperiod,
49 & climsststartdate1, climsststartdate2, climsstperiod,
50 & climsssstartdate1, climsssstartdate2, climsssperiod,
51 & climtempfile, climsaltfile, climsstfile,
52 & climsssfile, climsstconst, climsssconst,
53 & exf_clim_iprec, exf_clim_yftype
54 #ifdef USE_EXF_INTERPOLATION
55 & ,climsst_lon0, climsst_lon_inc,
56 & climsst_lat0, climsst_lat_inc,
57 & climsst_nlon, climsst_nlat,
58 & climsss_lon0, climsss_lon_inc,
59 & climsss_lat0, climsss_lat_inc,
60 & climsss_nlon, climsss_nlat
61 #endif
62
63 _BEGIN_MASTER(mythid)
64
65 c Set default values.
66
67 c Calendar data.
68 climtempstartdate1 = 0
69 climtempstartdate2 = 0
70 climtempperiod = 0
71
72 climsaltstartdate1 = 0
73 climsaltstartdate2 = 0
74 climsaltperiod = 0
75
76 climsststartdate1 = 0
77 climsststartdate2 = 0
78 climsstperiod = 0
79
80 climsssstartdate1 = 0
81 climsssstartdate2 = 0
82 climsssperiod = 0
83
84 c Data files.
85 climtempfile = ' '
86 climsaltfile = ' '
87 climsstfile = ' '
88 climsssfile = ' '
89
90 c Start dates.
91 climtempstartdate = 0
92 climsaltstartdate = 0
93 climsststartdate = 0
94 climsssstartdate = 0
95
96 c Initialise constant values for relax. to constant SST, SSS
97 climsstconst = 0. _d 0
98 climsssconst = 0. _d 0
99
100 c Initialise freezing temperature of sea water
101 climtempfreeze = -1.9 _d 0
102
103 c Initialise file type and field precision
104 exf_clim_iprec = 32
105 exf_clim_yftype = 'RL'
106
107 c Check for the availability of the right calendar version.
108 if ( calendarversion .ne. usescalendarversion ) then
109 print*,' exf_Init: You are not using the appropriate'
110 print*,' version of the calendar package.'
111 print*
112 print*,' Please use Calendar version: ',
113 & usescalendarversion
114 stop ' stopped in exf_Init.'
115 endif
116
117 c Next, read the forcing data file.
118 call nml_filter( 'data.exf_clim', scrunit1, myThid )
119 if (scrunit1 .eq. 0) then
120 stop 'exf_clim_readparms: reading namelist failed'
121 end if
122 read( scrunit1, nml = exf_clim_nml )
123 close( scrunit1 )
124
125 c Complete the start date specifications for the forcing
126 c fields to get a complete calendar date array.
127
128 c check for consistency
129
130 if (.NOT. (exf_clim_iprec .EQ. 32
131 & .OR. exf_clim_iprec .EQ. 64)) then
132 stop 'stopped in exf_clim_readparms: value of iprec not allowed'
133 else if
134 & (.NOT. (exf_clim_yftype .EQ. 'RS'
135 & .OR. exf_clim_yftype .EQ. 'RL'))
136 & then
137 stop 'stopped in exf_clim_readparms: value of yftype not allowed'
138 end if
139
140 #ifdef ALLOW_CLIMTEMP_RELAXATION
141 if ( climtempfile .NE. ' ' ) then
142 call cal_FullDate( climtempstartdate1, climtempstartdate2,
143 & date_array, mythid )
144 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
145 call cal_ToSeconds (difftime, climtempstartdate ,mythid)
146 climtempstartdate=modelstart+climtempstartdate
147 endif
148 #endif
149
150 #ifdef ALLOW_CLIMSALT_RELAXATION
151 if ( climsaltfile .NE. ' ' ) then
152 call cal_FullDate( climsaltstartdate1, climsaltstartdate2,
153 & date_array, mythid )
154 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
155 call cal_ToSeconds (difftime, climsaltstartdate ,mythid)
156 climsaltstartdate=modelstart+climsaltstartdate
157 endif
158 #endif
159
160 #ifdef ALLOW_CLIMSST_RELAXATION
161 if ( climsstfile .NE. ' ' ) then
162 call cal_FullDate( climsststartdate1, climsststartdate2,
163 & date_array, mythid )
164 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
165 call cal_ToSeconds (difftime, climsststartdate ,mythid)
166 climsststartdate=modelstart+climsststartdate
167 endif
168 #endif
169
170 #ifdef ALLOW_CLIMSSS_RELAXATION
171 if ( climsssfile .NE. ' ' ) then
172 call cal_FullDate( climsssstartdate1, climsssstartdate2,
173 & date_array, mythid )
174 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
175 call cal_ToSeconds (difftime, climsssstartdate ,mythid)
176 climsssstartdate=modelstart+climsssstartdate
177 endif
178 #endif
179
180 _END_MASTER( mythid )
181
182 _BARRIER
183
184 end

  ViewVC Help
Powered by ViewVC 1.1.22