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

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

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


Revision 1.7 - (show annotations) (download)
Thu Oct 9 04:19:19 2003 UTC (20 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51l_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, hrcube5, checkpoint52j_post, checkpoint51o_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint52d_pre, checkpoint52j_pre, branch-netcdf, checkpoint51r_post, checkpoint52b_pre, checkpoint51i_post, checkpoint51l_pre, 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, tg2-branch, checkpoint51n_branch
Changes since 1.6: +2 -2 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 c $Header: /u/u3/gcmpack/MITgcm/pkg/exf/exf_set_climtemp.F,v 1.6.2.1 2003/10/02 18:30:07 adcroft Exp $
2
3 #include "EXF_OPTIONS.h"
4
5
6 subroutine exf_set_climtemp(
7 O mycurrenttime
8 I , mycurrentiter
9 I , mythid
10 & )
11
12 c ==================================================================
13 c SUBROUTINE exf_set_climtemp
14 c ==================================================================
15 c
16 c o Get the current climatological sea surface salinity field.
17 c
18 c started: Christian Eckert eckert@mit.edu 27-Aug-1999
19 c changed: Christian Eckert eckert@mit.edu 11-Jan-2000
20 c - Restructured the code in order to create a package
21 c for the MITgcmUV.
22 c Christian Eckert eckert@mit.edu 12-Feb-2000
23 c - Changed Routine names (package prefix: exf_)
24 c changed: heimbach@mit.edu 08-Feb-2002
25 c mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
26 c
27 c ==================================================================
28 c SUBROUTINE exf_set_climtemp
29 c ==================================================================
30
31 implicit none
32
33 #include "EEPARAMS.h"
34 #include "SIZE.h"
35 #include "GRID.h"
36
37 #include "exf_param.h"
38 #include "exf_constants.h"
39 #include "exf_clim_param.h"
40 #include "exf_clim_fields.h"
41
42 c == routine arguments ==
43
44 _RL mycurrenttime
45 integer mycurrentiter
46 integer mythid
47
48 #ifdef ALLOW_CLIMTEMP_RELAXATION
49
50 c == local variables ==
51
52 logical first, changed
53 integer count0, count1
54 _RL fac
55
56 integer bi, bj
57 integer i, j, k
58
59 c == end of interface ==
60
61 if ( climtempfile .NE. ' ' ) then
62
63 #ifdef ALLOW_CLIM_CYCLIC
64 c record numbers are assumed 1 to 12 corresponding to
65 c Jan. through Dec.
66 call cal_GetMonthsRec(
67 O fac, first, changed,
68 O count0, count1,
69 I mycurrenttime, mycurrentiter, mythid
70 & )
71 #else
72 c get record numbers and interpolation factor for climtemp
73 call exf_GetFFieldRec(
74 I climtempstartdate, climtempperiod
75 O , fac, first, changed
76 O , count0, count1
77 I , mycurrenttime, mycurrentiter, mythid
78 & )
79 #endif
80
81 if ( first ) then
82 call mdsreadfield( climtempfile, exf_clim_iprec
83 & , exf_clim_yftype, nr
84 & , climtemp1, count0, mythid
85 & )
86 if (exf_clim_yftype .eq. 'RL') then
87 call exf_filter_rl( climtemp1, climtempmask, mythid )
88 else
89 call exf_filter_rs( climtemp1, climtempmask, mythid )
90 end if
91 endif
92
93 if (( first ) .or. ( changed )) then
94 call exf_SwapFFields_3d( climtemp0, climtemp1, mythid )
95
96 call mdsreadfield( climtempfile, exf_clim_iprec
97 & , exf_clim_yftype, nr
98 & , climtemp1, count1, mythid
99 & )
100 if (exf_clim_yftype .eq. 'RL') then
101 call exf_filter_rl( climtemp1, climtempmask, mythid )
102 else
103 call exf_filter_rs( climtemp1, climtempmask, mythid )
104 end if
105 endif
106
107 c Loop over tiles.
108 do bj = mybylo(mythid),mybyhi(mythid)
109 do bi = mybxlo(mythid),mybxhi(mythid)
110 do k = 1,nr
111 do j = 1,sny
112 do i = 1,snx
113
114 c Set to freezing temperature if less
115 if (climtemp0(i,j,k,bi,bj) .lt. climtempfreeze)
116 & climtemp0(i,j,k,bi,bj) = climtempfreeze
117 if (climtemp1(i,j,k,bi,bj) .lt. climtempfreeze)
118 & climtemp1(i,j,k,bi,bj) = climtempfreeze
119
120 c Interpolate linearly onto the current time.
121 climtemp(i,j,k,bi,bj) =
122 & fac * climtemp0(i,j,k,bi,bj) +
123 & (exf_one - fac) * climtemp1(i,j,k,bi,bj)
124
125 enddo
126 enddo
127 enddo
128 enddo
129 enddo
130
131 endif
132
133 #endif /* ALLOW_CLIMTEMP_RELAXATION */
134
135 end
136
137
138 subroutine exf_init_climtemp(
139 I mythid
140 & )
141
142 c ==================================================================
143 c SUBROUTINE exf_init_climtemp
144 c ==================================================================
145 c
146 c o
147 c
148 c started: Ralf.Giering@FastOpt.de 25-Mai-2000
149 c
150 c ==================================================================
151 c SUBROUTINE exf_init_climtemp
152 c ==================================================================
153
154 implicit none
155
156 c == global variables ==
157
158 #include "EEPARAMS.h"
159 #include "SIZE.h"
160
161 #include "exf_fields.h"
162 #include "exf_param.h"
163 #include "exf_clim_fields.h"
164
165 c == routine arguments ==
166
167 integer mythid
168
169 #ifdef ALLOW_CLIMTEMP_RELAXATION
170
171 c == local variables ==
172
173 integer bi, bj
174 integer i, j, k
175
176 c == end of interface ==
177
178 do bj = mybylo(mythid), mybyhi(mythid)
179 do bi = mybxlo(mythid), mybxhi(mythid)
180 do k=1,nr
181 do j = 1, sny
182 do i = 1, snx
183 climtemp (i,j,k,bi,bj) = 0. _d 0
184 climtemp0(i,j,k,bi,bj) = 0. _d 0
185 climtemp1(i,j,k,bi,bj) = 0. _d 0
186 enddo
187 enddo
188 enddo
189 enddo
190 enddo
191
192 #endif /* ALLOW_CLIMTEMP_RELAXATION */
193
194 end

  ViewVC Help
Powered by ViewVC 1.1.22