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

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

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


Revision 1.6 - (show annotations) (download)
Thu Mar 6 00:47:33 2003 UTC (21 years, 2 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint50e_post, checkpoint50c_post, checkpoint50c_pre, checkpoint50h_post, checkpoint50d_pre, checkpoint50b_pre, checkpoint51e_post, checkpoint51b_post, checkpoint51c_post, checkpoint49, checkpoint50i_post, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint51b_pre, checkpoint50g_post, checkpoint50b_post, checkpoint50f_post, checkpoint50f_pre, checkpoint51d_post, checkpoint50a_post, checkpoint51a_post, checkpoint50e_pre
Changes since 1.5: +2 -2 lines
merged from ecco-branch:
o exf:
  - Enable initialisation of forcing fields to constant
    (runtime) values.
  - in exf_getffields.F
    Reduce i-/j-loop to interior domain, discarding overlaps.
    That also fixes wrong TAF-key computations for key_1, key_2
    with bulf formulae.
  - exf_init.F modify #ifdef for exf_init_evap
  - exf_getffieldrec.F, ctrl_getrec.F
    The following INT-usages are not safe:
      fldsecs  = int(fldsecs/fldperiod)*fldperiod
      fldcount = int(fldsecs/fldperiod) + 1
    and were modified.

1 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_set_climsss.F,v 1.1.6.5 2003/03/04 00:17:40 heimbach Exp $
2
3 #include "EXF_CPPOPTIONS.h"
4
5
6 subroutine exf_set_climsss(
7 O mycurrenttime
8 I , mycurrentiter
9 I , mythid
10 & )
11
12 c ==================================================================
13 c SUBROUTINE exf_set_climsss
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_climsss
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_CLIMSSS_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
58
59 c == end of interface ==
60
61 if ( climsssfile .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 climsss
73 call exf_GetFFieldRec(
74 I climsssstartdate, climsssperiod
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( climsssfile, exf_clim_iprec
83 & , exf_clim_yftype, 1
84 & , climsss1, count0, mythid
85 & )
86 if (exf_clim_yftype .eq. 'RL') then
87 call exf_filter_rl( climsss1, climsssmask, mythid )
88 else
89 call exf_filter_rs( climsss1, climsssmask, mythid )
90 end if
91 endif
92
93 if (( first ) .or. ( changed )) then
94 call exf_SwapFFields( climsss0, climsss1, mythid )
95 call mdsreadfield( climsssfile, exf_clim_iprec
96 & , exf_clim_yftype, 1
97 & , climsss1, count1, mythid
98 & )
99 if (exf_clim_yftype .eq. 'RL') then
100 call exf_filter_rl( climsss1, climsssmask, mythid )
101 else
102 call exf_filter_rs( climsss1, climsssmask, mythid )
103 end if
104 endif
105
106 c Loop over tiles.
107 do bj = mybylo(mythid),mybyhi(mythid)
108 do bi = mybxlo(mythid),mybxhi(mythid)
109 do j = 1,sny
110 do i = 1,snx
111
112 c Interpolate linearly onto the current time.
113 climsss(i,j,bi,bj) = exf_inscal_sss * (
114 & fac * climsss0(i,j,bi,bj) +
115 & (exf_one - fac) * climsss1(i,j,bi,bj) )
116
117 enddo
118 enddo
119 enddo
120 enddo
121
122 endif
123
124 #endif /* ALLOW_CLIMSSS_RELAXATION */
125
126 end
127
128
129 subroutine exf_init_climsss(
130 I mythid
131 & )
132
133 c ==================================================================
134 c SUBROUTINE exf_init_climsss
135 c ==================================================================
136 c
137 c o
138 c
139 c started: Ralf.Giering@FastOpt.de 25-Mai-2000
140 c
141 c ==================================================================
142 c SUBROUTINE exf_init_climsss
143 c ==================================================================
144
145 implicit none
146
147 c == global variables ==
148
149 #include "EEPARAMS.h"
150 #include "SIZE.h"
151
152 #include "exf_fields.h"
153 #include "exf_param.h"
154 #include "exf_clim_param.h"
155 #include "exf_clim_fields.h"
156
157 c == routine arguments ==
158
159 integer mythid
160
161 #ifdef ALLOW_CLIMSSS_RELAXATION
162
163 c == local variables ==
164
165 integer bi, bj
166 integer i, j
167
168 c == end of interface ==
169
170 do bj = mybylo(mythid), mybyhi(mythid)
171 do bi = mybxlo(mythid), mybxhi(mythid)
172 do j = 1, sny
173 do i = 1, snx
174 climsss (i,j,bi,bj) = climsssconst
175 climsss0(i,j,bi,bj) = 0. _d 0
176 climsss1(i,j,bi,bj) = 0. _d 0
177 enddo
178 enddo
179 enddo
180 enddo
181
182 #endif /* ALLOW_CLIMSSSS_RELAXATION */
183
184 end

  ViewVC Help
Powered by ViewVC 1.1.22