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

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

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


Revision 1.22 - (show annotations) (download)
Tue Jul 31 16:08:16 2012 UTC (11 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65d, checkpoint64, checkpoint65, checkpoint63r, checkpoint63s, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.21: +2 -1 lines
Attempt at adding CTRL_SIZE.h

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getclim.F,v 1.21 2012/03/22 03:55:09 heimbach Exp $
2 C $Name: $
3
4 #include "EXF_OPTIONS.h"
5
6
7 subroutine exf_getclim(
8 I mytime,
9 I myiter,
10 I mythid
11 & )
12
13 c ==================================================================
14 c SUBROUTINE exf_getclim
15 c ==================================================================
16 c
17 c o Get the climatogy fields for the current time step. The switches
18 c for the inclusion of the individual forcing components have to
19 c be set in EXF_OPTIONS.h .
20 c
21 c A note on surface fluxes:
22 c
23 c The MITgcm-UV vertical coordinate z is positive upward.
24 c This implies that a positive flux is out of the ocean
25 c model. However, the wind stress forcing is not treated
26 c this way. A positive zonal wind stress accelerates the
27 c model ocean towards the east.
28 c
29 c started: Ralf.Giering@FastOpt.de 25-Mai-2000
30 c
31 c ==================================================================
32 c SUBROUTINE exf_getclim
33 c ==================================================================
34
35 implicit none
36
37 c == global variables ==
38 #include "EEPARAMS.h"
39 #include "SIZE.h"
40 #include "GRID.h"
41 #ifdef ALLOW_BULK_OFFLINE
42 # include "PARAMS.h"
43 # include "DYNVARS.h"
44 #endif
45 #include "EXF_PARAM.h"
46 #include "EXF_CONSTANTS.h"
47 #include "EXF_FIELDS.h"
48 #ifdef ALLOW_AUTODIFF
49 # include "CTRL_SIZE.h"
50 # include "ctrl.h"
51 # include "ctrl_dummy.h"
52 #endif
53
54 c == routine arguments ==
55
56 c mythid - thread number for this instance of the routine.
57
58 _RL mytime
59 integer myiter
60 integer mythid
61
62 c == local variables ==
63
64 integer bi, bj, i, j
65
66 c == end of interface ==
67
68 #ifdef ALLOW_CLIMSST_RELAXATION
69 c Get values of climatological sst fields.
70 call exf_set_gen (
71 & climsstfile, climsststartdate, climsstperiod,
72 & exf_inscal_climsst,
73 & climsst_exfremo_intercept, climsst_exfremo_slope,
74 & climsst, climsst0, climsst1, climsstmask,
75 #ifdef USE_EXF_INTERPOLATION
76 & climsst_lon0, climsst_lon_inc, climsst_lat0, climsst_lat_inc,
77 & climsst_nlon, climsst_nlat, xC, yC, climsst_interpMethod,
78 #endif
79 & mytime, myiter, mythid )
80
81 do bj = mybylo(mythid),mybyhi(mythid)
82 do bi = mybxlo(mythid),mybxhi(mythid)
83 do j = 1,sny
84 do i = 1,snx
85 if (climsst(i,j,bi,bj) .lt. climtempfreeze) then
86 climsst(i,j,bi,bj) = climtempfreeze
87 endif
88 enddo
89 enddo
90 enddo
91 enddo
92
93 c-- Update the tile edges.
94 _EXCH_XY_RL(climsst, mythid)
95 #endif
96
97 #ifdef ALLOW_SST_CONTROL
98 call ctrl_get_gen (
99 & xx_sst_file, xx_sststartdate, xx_sstperiod,
100 & maskc, climsst, xx_sst0, xx_sst1, xx_sst_dummy,
101 & xx_sst_remo_intercept, xx_sst_remo_slope,
102 & mytime, myiter, mythid )
103 #endif
104
105 #ifdef ALLOW_CLIMSSS_RELAXATION
106 c Get values of climatological sss fields.
107 call exf_set_gen (
108 & climsssfile, climsssstartdate, climsssperiod,
109 & exf_inscal_climsss,
110 & climsss_exfremo_intercept, climsss_exfremo_slope,
111 & climsss, climsss0, climsss1, climsssmask,
112 #ifdef USE_EXF_INTERPOLATION
113 & climsss_lon0, climsss_lon_inc, climsss_lat0, climsss_lat_inc,
114 & climsss_nlon, climsss_nlat, xC, yC, climsss_interpMethod,
115 #endif
116 & mytime, myiter, mythid )
117
118 c-- Update the tile edges.
119 _EXCH_XY_RL(climsss, mythid)
120 #endif
121
122 #ifdef ALLOW_SSS_CONTROL
123 call ctrl_get_gen (
124 & xx_sss_file, xx_sssstartdate, xx_sssperiod,
125 & maskc, climsss, xx_sss0, xx_sss1, xx_sss_dummy,
126 & xx_sss_remo_intercept, xx_sss_remo_slope,
127 & mytime, myiter, mythid )
128 #endif
129
130 #ifdef ALLOW_CLIMSTRESS_RELAXATION
131 c Get values of climatological ustr fields.
132 call exf_set_uv (
133 I climustrfile, climustrstartdate, climustrperiod,
134 I exf_inscal_climustr,
135 I climustr_exfremo_intercept, climustr_exfremo_slope,
136 U climustr, climustr0, climustr1, climustrmask,
137 I climvstrfile, climvstrstartdate, climvstrperiod,
138 I exf_inscal_climvstr,
139 I climvstr_exfremo_intercept, climvstr_exfremo_slope,
140 U climvstr, climvstr0, climvstr1, climvstrmask,
141 #ifdef USE_EXF_INTERPOLATION
142 I climustr_lon0, climustr_lon_inc,
143 I climustr_lat0, climustr_lat_inc,
144 I climustr_nlon, climustr_nlat, climustr_interpMethod,
145 I climvstr_lon0, climvstr_lon_inc,
146 I climvstr_lat0, climvstr_lat_inc,
147 I climvstr_nlon, climvstr_nlat, climvstr_interpMethod,
148 I uvInterp_climstr,
149 #endif
150 I mytime, myiter, mythid )
151
152 CALL EXCH_UV_XY_RL( climustr, climvstr, .TRUE., myThid )
153 #endif /* CLIMSTRESS_RELAXATION */
154
155 #ifdef ALLOW_BULK_OFFLINE
156 DO bj=myByLo(myThid),myByHi(myThid)
157 DO bi=myBxLo(myThid),myBxHi(myThid)
158 DO j=1-oLy,sNy+oLy
159 DO i=1-oLx,sNx+oLx
160 # ifdef ALLOW_CLIMSST_RELAXATION
161 if ( climsstfile .NE. ' ' .AND.
162 & climsstperiod .NE. 0. )
163 & theta(i,j,1,bi,bj) = climsst(i,j,bi,bj)
164 # endif
165 # ifdef ALLOW_CLIMSSS_RELAXATION
166 if ( climsssfile .NE. ' ' .AND.
167 & climsssperiod .NE. 0. )
168 & salt(i,j,1,bi,bj) = climsss(i,j,bi,bj)
169 # endif
170 # ifdef ALLOW_CLIMSTRESS_RELAXATION
171 if ( climustrfile .NE. ' ' .AND.
172 & climustrperiod .NE. 0. )
173 & uvel(i,j,1,bi,bj) = climustr(i,j,bi,bj)
174 if ( climvstrfile .NE. ' ' .AND.
175 & climvstrperiod .NE. 0. )
176 & vvel(i,j,1,bi,bj) = climvstr(i,j,bi,bj)
177 # endif
178 if ( myiter .EQ. niter0 ) then
179 if ( maskC(i,j,1,bi,bj) .NE. 0. .AND.
180 & theta(i,j,1,bi,bj) .EQ. 0. ) then
181 print *, 'ph-warn-exf-clim ', i, j, theta(i,j,1,bi,bj)
182 cph STOP 'in exf_getclim'
183 endif
184 endif
185 ENDDO
186 ENDDO
187 ENDDO
188 ENDDO
189 #endif /* ALLOW_BULK_OFFLINE */
190
191 RETURN
192 END

  ViewVC Help
Powered by ViewVC 1.1.22