/[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.18 - (show annotations) (download)
Wed Apr 28 04:54:54 2010 UTC (14 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62g, checkpoint62f, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint63g, checkpoint63, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63a, checkpoint63b, checkpoint63c
Changes since 1.17: +5 -1 lines
Add appropriate init. of state from clim fields for offline case.

1 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getclim.F,v 1.17 2010/04/26 15:14:13 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.h"
50 # include "ctrl_dummy.h"
51 #endif
52
53 c == routine arguments ==
54
55 c mythid - thread number for this instance of the routine.
56
57 integer mythid
58 integer myiter
59 _RL mytime
60
61 c == local variables ==
62
63 integer interp_method
64 integer bi, bj, i, j
65
66 c == end of interface ==
67
68 interp_method=2
69
70 #ifdef ALLOW_CLIMSST_RELAXATION
71 c Get values of climatological sst fields.
72 call exf_set_gen (
73 & climsstfile, climsststartdate, climsstperiod,
74 & exf_inscal_climsst,
75 & climsst_exfremo_intercept, climsst_exfremo_slope,
76 & climsst, climsst0, climsst1, climsstmask,
77 #ifdef USE_EXF_INTERPOLATION
78 & climsst_lon0, climsst_lon_inc, climsst_lat0, climsst_lat_inc,
79 & climsst_nlon, climsst_nlat, xC, yC, interp_method,
80 #endif
81 & mytime, myiter, mythid )
82 c
83 do bj = mybylo(mythid),mybyhi(mythid)
84 do bi = mybxlo(mythid),mybxhi(mythid)
85 do j = 1,sny
86 do i = 1,snx
87 if (climsst(i,j,bi,bj) .lt. climtempfreeze) then
88 climsst(i,j,bi,bj) = climtempfreeze
89 endif
90 enddo
91 enddo
92 enddo
93 enddo
94 c
95 c-- Update the tile edges.
96 _EXCH_XY_RL(climsst, mythid)
97 #endif
98
99 #ifdef ALLOW_CLIMSSS_RELAXATION
100 c Get values of climatological sss fields.
101 call exf_set_gen (
102 & climsssfile, climsssstartdate, climsssperiod,
103 & exf_inscal_climsss,
104 & climsss_exfremo_intercept, climsss_exfremo_slope,
105 & climsss, climsss0, climsss1, climsssmask,
106 #ifdef USE_EXF_INTERPOLATION
107 & climsss_lon0, climsss_lon_inc, climsss_lat0, climsss_lat_inc,
108 & climsss_nlon, climsss_nlat, xC, yC, interp_method,
109 #endif
110 & mytime, myiter, mythid )
111 c
112 c-- Update the tile edges.
113 _EXCH_XY_RL(climsss, mythid)
114 #endif
115
116 #ifdef ALLOW_SST_CONTROL
117 call ctrl_get_gen (
118 & xx_sst_file, xx_sststartdate, xx_sstperiod,
119 & maskc, climsst, xx_sst0, xx_sst1, xx_sst_dummy,
120 & mytime, myiter, mythid )
121 #endif
122
123 #ifdef ALLOW_CLIMSTRESS_RELAXATION
124 c Get values of climatological ustr fields.
125 call exf_set_uv (
126 & climustrfile, climustrstartdate, climustrperiod,
127 & exf_inscal_climustr, climustr, climustr0, climustr1,
128 & climustrmask,
129 & climustr_lon0, climustr_lon_inc,
130 & climustr_lat0, climustr_lat_inc,
131 & climustr_nlon, climustr_nlat,
132 & climustr_exfremo_intercept, climustr_exfremo_slope,
133 & climvstrfile, climvstrstartdate, climvstrperiod,
134 & exf_inscal_climvstr, climvstr, climvstr0, climvstr1,
135 & climvstrmask,
136 & climvstr_lon0, climvstr_lon_inc,
137 & climvstr_lat0, climvstr_lat_inc,
138 & climvstr_nlon, climvstr_nlat,
139 & climvstr_exfremo_intercept, climvstr_exfremo_slope,
140 & mytime, myiter, mythid )
141 c
142 CALL EXCH_UV_XY_RL( climustr, climvstr, .TRUE., myThid )
143 c
144 #endif /* CLIMSTRESS_RELAXATION */
145
146 #ifdef ALLOW_BULK_OFFLINE
147 DO bj=myByLo(myThid),myByHi(myThid)
148 DO bi=myBxLo(myThid),myBxHi(myThid)
149 DO j=1-oLy,sNy+oLy
150 DO i=1-oLx,sNx+oLx
151 # ifdef ALLOW_CLIMSST_RELAXATION
152 if ( climsstfile .NE. ' ' .AND.
153 & climsstperiod .NE. 0. )
154 & theta(i,j,1,bi,bj) = climsst(i,j,bi,bj)
155 # endif
156 # ifdef ALLOW_CLIMSSS_RELAXATION
157 if ( climsssfile .NE. ' ' .AND.
158 & climsssperiod .NE. 0. )
159 & salt(i,j,1,bi,bj) = climsss(i,j,bi,bj)
160 # endif
161 # ifdef ALLOW_CLIMSTRESS_RELAXATION
162 if ( climustrfile .NE. ' ' .AND.
163 & climustrperiod .NE. 0. )
164 & uvel(i,j,1,bi,bj) = climustr(i,j,bi,bj)
165 if ( climvstrfile .NE. ' ' .AND.
166 & climvstrperiod .NE. 0. )
167 & vvel(i,j,1,bi,bj) = climvstr(i,j,bi,bj)
168 # endif
169 if ( myiter .EQ. niter0 ) then
170 if ( maskC(i,j,1,bi,bj) .NE. 0. .AND.
171 & theta(i,j,1,bi,bj) .EQ. 0. ) then
172 print *, 'ph-warn-exf-clim ', i, j, theta(i,j,1,bi,bj)
173 cph STOP 'in exf_getclim'
174 endif
175 endif
176 ENDDO
177 ENDDO
178 ENDDO
179 ENDDO
180 #endif /* ALLOW_BULK_OFFLINE */
181
182 end

  ViewVC Help
Powered by ViewVC 1.1.22