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

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

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


Revision 1.4 - (show annotations) (download)
Sat Dec 28 10:11:11 2002 UTC (21 years, 6 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint47j_post, checkpoint48d_pre, checkpoint47f_post, checkpoint48d_post, checkpoint48a_post, checkpoint48e_post, checkpoint47i_post, checkpoint47h_post, checkpoint48c_post, checkpoint48, checkpoint47g_post, checkpoint48b_post, checkpoint48c_pre
Changes since 1.3: +4 -3 lines
checkpoint47f_post
Merging from release1_p10:
o modifications for using pkg/exf with pkg/seaice
  - pkg/seaice CPP options SEAICE_EXTERNAL_FORCING
    and SEAICE_EXTERNAL_FLUXES
  - pkg/exf CPP options EXF_READ_EVAP and
    EXF_NO_BULK_COMPUTATIONS
  - usage examples are Experiments 8 and 9 in
    verification/lab_sea/README
  - verification/lab_sea default experiment now uses
    pkg/gmredi, pkg/kpp, pkg/seaice, and pkg/exf

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

  ViewVC Help
Powered by ViewVC 1.1.22