/[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.5 - (show annotations) (download)
Mon Oct 20 06:25:16 2003 UTC (20 years, 7 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint51l_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52j_post, checkpoint51o_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint52d_pre, checkpoint52j_pre, branch-netcdf, checkpoint51r_post, checkpoint52b_pre, checkpoint52m_post, hrcube5, checkpoint51o_post, checkpoint51q_post, checkpoint52l_post, checkpoint52k_post, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint52f_post, checkpoint52c_post, ecco_c52_e35, checkpoint52a_pre, checkpoint51m_post, checkpoint51t_post, checkpoint52i_post, checkpoint51p_post, checkpoint51n_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post
Branch point for: netcdf-sm0, branch-nonh, checkpoint51n_branch
Changes since 1.4: +23 -12 lines
changes to pkg/cal and pkg/exf that allow and speed-up long integrations

1 c $Header: /usr/local/gcmpack/MITgcm/pkg/exf/exf_clim_readparms.F,v 1.4 2003/10/09 04:19:19 edhill 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 & climtempstartdate1, climtempstartdate2, climtempperiod,
47 & climsaltstartdate1, climsaltstartdate2, climsaltperiod,
48 & climsststartdate1, climsststartdate2, climsstperiod,
49 & climsssstartdate1, climsssstartdate2, climsssperiod,
50 & climtempfile, climsaltfile, climsstfile,
51 & climsssfile, climsstconst, climsssconst,
52 & exf_clim_iprec, exf_clim_yftype
53 #ifdef USE_EXF_INTERPOLATION
54 & ,climsst_lon0, climsst_lon_inc,
55 & climsst_lat0, climsst_lat_inc,
56 & climsst_nlon, climsst_nlat,
57 & climsss_lon0, climsss_lon_inc,
58 & climsss_lat0, climsss_lat_inc,
59 & climsss_nlon, climsss_nlat
60 #endif
61
62 _BEGIN_MASTER(mythid)
63
64 c Set default values.
65
66 c Calendar data.
67 climtempstartdate1 = 0
68 climtempstartdate2 = 0
69 climtempperiod = 0
70
71 climsaltstartdate1 = 0
72 climsaltstartdate2 = 0
73 climsaltperiod = 0
74
75 climsststartdate1 = 0
76 climsststartdate2 = 0
77 climsstperiod = 0
78
79 climsssstartdate1 = 0
80 climsssstartdate2 = 0
81 climsssperiod = 0
82
83 c Data files.
84 climtempfile = ' '
85 climsaltfile = ' '
86 climsstfile = ' '
87 climsssfile = ' '
88
89 c Start dates.
90 climtempstartdate = 0
91 climsaltstartdate = 0
92 climsststartdate = 0
93 climsssstartdate = 0
94
95 c Initialise constant values for relax. to constant SST, SSS
96 climsstconst = 0. _d 0
97 climsssconst = 0. _d 0
98
99 c Initialise file type and field precision
100 exf_clim_iprec = 32
101 exf_clim_yftype = 'RL'
102
103 c Check for the availability of the right calendar version.
104 if ( calendarversion .ne. usescalendarversion ) then
105 print*,' exf_Init: You are not using the appropriate'
106 print*,' version of the calendar package.'
107 print*
108 print*,' Please use Calendar version: ',
109 & usescalendarversion
110 stop ' stopped in exf_Init.'
111 endif
112
113 c Next, read the forcing data file.
114 call nml_filter( 'data.exf_clim', scrunit1, myThid )
115 if (scrunit1 .eq. 0) then
116 stop 'exf_clim_readparms: reading namelist failed'
117 end if
118 read( scrunit1, nml = exf_clim_nml )
119 close( scrunit1 )
120
121 c Complete the start date specifications for the forcing
122 c fields to get a complete calendar date array.
123
124 c check for consistency
125
126 if (.NOT. (exf_clim_iprec .EQ. 32
127 & .OR. exf_clim_iprec .EQ. 64)) then
128 stop 'stopped in exf_clim_readparms: value of iprec not allowed'
129 else if
130 & (.NOT. (exf_clim_yftype .EQ. 'RS'
131 & .OR. exf_clim_yftype .EQ. 'RL'))
132 & then
133 stop 'stopped in exf_clim_readparms: value of yftype not allowed'
134 end if
135
136 #ifdef ALLOW_CLIMTEMP_RELAXATION
137 call cal_FullDate( climtempstartdate1, climtempstartdate2,
138 & date_array, mythid )
139 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
140 call cal_ToSeconds (difftime, climtempstartdate ,mythid)
141 climtempstartdate=modelstart+climtempstartdate
142 #endif
143
144 #ifdef ALLOW_CLIMSALT_RELAXATION
145 call cal_FullDate( climsaltstartdate1, climsaltstartdate2,
146 & date_array, mythid )
147 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
148 call cal_ToSeconds (difftime, climsaltstartdate ,mythid)
149 climsaltstartdate=modelstart+climsaltstartdate
150 #endif
151
152 #ifdef ALLOW_CLIMSST_RELAXATION
153 call cal_FullDate( climsststartdate1, climsststartdate2,
154 & date_array, mythid )
155 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
156 call cal_ToSeconds (difftime, climsststartdate ,mythid)
157 climsststartdate=modelstart+climsststartdate
158 #endif
159
160 #ifdef ALLOW_CLIMSSS_RELAXATION
161 call cal_FullDate( climsssstartdate1, climsssstartdate2,
162 & date_array, mythid )
163 call cal_TimePassed(modelstartdate,date_array,difftime,mythid)
164 call cal_ToSeconds (difftime, climsssstartdate ,mythid)
165 climsssstartdate=modelstart+climsssstartdate
166 #endif
167
168 _END_MASTER( mythid )
169
170 _BARRIER
171
172 end

  ViewVC Help
Powered by ViewVC 1.1.22