1 |
c $Header$ |
c $Header$ |
2 |
|
|
3 |
#include "EXF_CPPOPTIONS.h" |
#include "EXF_OPTIONS.h" |
4 |
|
|
5 |
|
|
6 |
subroutine exf_clim_readparms( |
subroutine exf_clim_readparms( |
25 |
|
|
26 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
27 |
#include "SIZE.h" |
#include "SIZE.h" |
28 |
|
#include "PARAMS.h" |
29 |
#include "cal.h" |
#include "cal.h" |
30 |
#include "exf.h" |
#include "exf.h" |
31 |
#include "exf_param.h" |
#include "exf_param.h" |
38 |
c == local variables == |
c == local variables == |
39 |
|
|
40 |
integer i |
integer i |
41 |
|
integer date_array(4), difftime(4) |
42 |
|
|
43 |
c == end of interface == |
c == end of interface == |
44 |
|
|
45 |
c Surface flux data. |
c Surface flux data. |
46 |
namelist /exf_clim_nml/ |
namelist /exf_clim_nml/ |
47 |
|
& climtempfreeze, |
48 |
& climtempstartdate1, climtempstartdate2, climtempperiod, |
& climtempstartdate1, climtempstartdate2, climtempperiod, |
49 |
& climsaltstartdate1, climsaltstartdate2, climsaltperiod, |
& climsaltstartdate1, climsaltstartdate2, climsaltperiod, |
50 |
& climsststartdate1, climsststartdate2, climsstperiod, |
& climsststartdate1, climsststartdate2, climsstperiod, |
88 |
climsstfile = ' ' |
climsstfile = ' ' |
89 |
climsssfile = ' ' |
climsssfile = ' ' |
90 |
|
|
91 |
c Initialise the date arrays. |
c Start dates. |
92 |
do i = 1,4 |
climtempstartdate = 0. |
93 |
climtempstartdate(i) = 0 |
climsaltstartdate = 0. |
94 |
climsaltstartdate(i) = 0 |
climsststartdate = 0. |
95 |
climsststartdate(i) = 0 |
climsssstartdate = 0. |
|
climsssstartdate(i) = 0 |
|
|
enddo |
|
96 |
|
|
97 |
c Initialise constant values for relax. to constant SST, SSS |
c Initialise constant values for relax. to constant SST, SSS |
98 |
climsstconst = 0. _d 0 |
climsstconst = 0. _d 0 |
99 |
climsssconst = 0. _d 0 |
climsssconst = 0. _d 0 |
100 |
|
|
101 |
|
c Initialise freezing temperature of sea water |
102 |
|
climtempfreeze = -1.9 _d 0 |
103 |
|
|
104 |
c Initialise file type and field precision |
c Initialise file type and field precision |
105 |
exf_clim_iprec = 32 |
exf_clim_iprec = 32 |
106 |
exf_clim_yftype = 'RL' |
exf_clim_yftype = 'RL' |
107 |
|
|
108 |
|
#ifdef USE_EXF_INTERPOLATION |
109 |
|
climsst_lon0 = thetaMin + delX(1) / 2 |
110 |
|
climsss_lon0 = thetaMin + delX(1) / 2 |
111 |
|
climsst_lat0 = phimin + delY(1) / 2 |
112 |
|
climsss_lat0 = phimin + delY(1) / 2 |
113 |
|
climsst_nlon = Nx |
114 |
|
climsst_nlat = Ny |
115 |
|
climsss_nlon = Nx |
116 |
|
climsss_nlat = Ny |
117 |
|
climsst_lon_inc = delX(1) |
118 |
|
climsss_lon_inc = delX(1) |
119 |
|
DO i=1,MAX_LAT_INC |
120 |
|
IF (i.LT.Ny) THEN |
121 |
|
climsst_lat_inc(i) = (delY(i) + delY(i)) / 2. |
122 |
|
climsss_lat_inc(i) = (delY(i) + delY(i)) / 2. |
123 |
|
ELSE |
124 |
|
climsst_lat_inc(i) = 0. |
125 |
|
climsss_lat_inc(i) = 0. |
126 |
|
ENDIF |
127 |
|
ENDDO |
128 |
|
#endif /* USE_EXF_INTERPOLATION */ |
129 |
|
|
130 |
c Check for the availability of the right calendar version. |
c Check for the availability of the right calendar version. |
131 |
if ( calendarversion .ne. usescalendarversion ) then |
if ( calendarversion .ne. usescalendarversion ) then |
132 |
print*,' exf_Init: You are not using the appropriate' |
print*,' exf_Init: You are not using the appropriate' |
160 |
stop 'stopped in exf_clim_readparms: value of yftype not allowed' |
stop 'stopped in exf_clim_readparms: value of yftype not allowed' |
161 |
end if |
end if |
162 |
|
|
163 |
|
#ifdef USE_EXF_INTERPOLATION |
164 |
|
if ( climsst_nlat .GT. MAX_LAT_INC ) |
165 |
|
& stop 'stopped in exf_clim_readparms: climsst_nlat > MAX_LAT_INC' |
166 |
|
if ( climsss_nlat .GT. MAX_LAT_INC ) |
167 |
|
& stop 'stopped in exf_clim_readparms: climsss_nlat > MAX_LAT_INC' |
168 |
|
#endif |
169 |
|
|
170 |
|
|
171 |
#ifdef ALLOW_CLIMTEMP_RELAXATION |
#ifdef ALLOW_CLIMTEMP_RELAXATION |
172 |
call cal_FullDate( climtempstartdate1, climtempstartdate2, |
if ( climtempfile .NE. ' ' .AND. climtempperiod .NE. 0. ) then |
173 |
& climtempstartdate, mythid ) |
call cal_FullDate( climtempstartdate1, climtempstartdate2, |
174 |
|
& date_array, mythid ) |
175 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
176 |
|
call cal_ToSeconds (difftime, climtempstartdate ,mythid) |
177 |
|
climtempstartdate=modelstart+climtempstartdate |
178 |
|
endif |
179 |
#endif |
#endif |
180 |
|
|
181 |
#ifdef ALLOW_CLIMSALT_RELAXATION |
#ifdef ALLOW_CLIMSALT_RELAXATION |
182 |
|
if ( climsaltfile .NE. ' ' .AND. climsaltperiod .NE. 0. ) then |
183 |
call cal_FullDate( climsaltstartdate1, climsaltstartdate2, |
call cal_FullDate( climsaltstartdate1, climsaltstartdate2, |
184 |
& climsaltstartdate, mythid ) |
& date_array, mythid ) |
185 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
186 |
|
call cal_ToSeconds (difftime, climsaltstartdate ,mythid) |
187 |
|
climsaltstartdate=modelstart+climsaltstartdate |
188 |
|
endif |
189 |
#endif |
#endif |
190 |
|
|
191 |
#ifdef ALLOW_CLIMSST_RELAXATION |
#ifdef ALLOW_CLIMSST_RELAXATION |
192 |
call cal_FullDate( climsststartdate1, climsststartdate2, |
if ( climsstfile .NE. ' ' .AND. climsstperiod .NE. 0. ) then |
193 |
& climsststartdate, mythid ) |
call cal_FullDate( climsststartdate1, climsststartdate2, |
194 |
|
& date_array, mythid ) |
195 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
196 |
|
call cal_ToSeconds (difftime, climsststartdate ,mythid) |
197 |
|
climsststartdate=modelstart+climsststartdate |
198 |
|
endif |
199 |
#endif |
#endif |
200 |
|
|
201 |
#ifdef ALLOW_CLIMSSS_RELAXATION |
#ifdef ALLOW_CLIMSSS_RELAXATION |
202 |
call cal_FullDate( climsssstartdate1, climsssstartdate2, |
if ( climsssfile .NE. ' ' .AND. climsssperiod .NE. 0. ) then |
203 |
& climsssstartdate, mythid ) |
call cal_FullDate( climsssstartdate1, climsssstartdate2, |
204 |
|
& date_array, mythid ) |
205 |
|
call cal_TimePassed(modelstartdate,date_array,difftime,mythid) |
206 |
|
call cal_ToSeconds (difftime, climsssstartdate ,mythid) |
207 |
|
climsssstartdate=modelstart+climsssstartdate |
208 |
|
endif |
209 |
#endif |
#endif |
210 |
|
|
211 |
_END_MASTER( mythid ) |
_END_MASTER( mythid ) |