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

Annotation of /MITgcm/pkg/exf/exf_set_atemp.F

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


Revision 1.3 - (hide annotations) (download)
Tue Nov 12 20:34:41 2002 UTC (21 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47j_post, checkpoint48d_pre, branch-exfmods-tag, checkpoint47e_post, checkpoint47i_post, checkpoint47f_post, checkpoint47c_post, checkpoint47d_post, checkpoint47a_post, checkpoint48e_post, checkpoint48d_post, checkpoint48c_post, checkpoint47d_pre, checkpoint47, checkpoint48, checkpoint47b_post, checkpoint47h_post, checkpoint47g_post, checkpoint48b_post, checkpoint48c_pre, checkpoint48a_post
Branch point for: branch-exfmods-curt
Changes since 1.2: +5 -2 lines
Merging from release1_p8:
o exf:
  updated external forcing package
  - bug fixes carried over from ecco-branch
    (missing OBCS_OPTIONS.h in two routines)
  - enable easy to use "no forcing".
  - added exf I/O for atmospheric loading
  - added exf I/O for runoff data
  - transfered scaling between exf <-> MITgcm to exf namelist
  - removing old exfa stuff

1 heimbach 1.1 #include "EXF_CPPOPTIONS.h"
2    
3 heimbach 1.2 subroutine exf_set_atemp( mycurrenttime, mycurrentiter, mythid )
4 heimbach 1.1
5     c ==================================================================
6     c SUBROUTINE exf_set_atemp
7     c ==================================================================
8     c
9     c o set external forcing atemp
10     c
11     c started: Ralf.Giering@FastOpt.de 25-Mai-2000
12 heimbach 1.2 c changed: heimbach@mit.edu 10-Jan-2002
13 heimbach 1.1
14     c ==================================================================
15     c SUBROUTINE exf_set_atemp
16     c ==================================================================
17    
18     implicit none
19    
20     c == global variables ==
21    
22     #include "EEPARAMS.h"
23     #include "SIZE.h"
24     #include "GRID.h"
25    
26     #include "exf_param.h"
27     #include "exf_constants.h"
28 heimbach 1.2 #include "exf_fields.h"
29 heimbach 1.1
30     c == routine arguments ==
31    
32     _RL mycurrenttime
33     integer mycurrentiter
34     integer mythid
35    
36 heimbach 1.2 #ifdef ALLOW_ATM_TEMP
37 heimbach 1.1 c == local variables ==
38    
39     logical first, changed
40     integer count0, count1
41     _RL fac
42    
43     integer bi, bj
44     integer i, j
45    
46     c == end of interface ==
47    
48     c get record numbers and interpolation factor for atemp
49     call exf_GetFFieldRec(
50     I atempstartdate, atempperiod
51     O , fac, first, changed
52     O , count0, count1
53     I , mycurrenttime, mycurrentiter, mythid
54     & )
55    
56     if ( first ) then
57 heimbach 1.3 if ( atempfile .NE. ' ' )
58     & call mdsreadfield( atempfile, exf_iprec, exf_yftype, 1
59 heimbach 1.1 & , atemp1, count0, mythid
60     & )
61     if (exf_yftype .eq. 'RL') then
62     call exf_filter_rl( atemp1, atempmask, mythid )
63     else
64     call exf_filter_rs( atemp1, atempmask, mythid )
65     end if
66     endif
67    
68     if (( first ) .or. ( changed )) then
69     call exf_SwapFFields( atemp0, atemp1, mythid )
70    
71 heimbach 1.3 if ( atempfile .NE. ' ' )
72     & call mdsreadfield( atempfile, exf_iprec, exf_yftype, 1
73 heimbach 1.1 & , atemp1, count1, mythid
74     & )
75     if (exf_yftype .eq. 'RL') then
76     call exf_filter_rl( atemp1, atempmask, mythid )
77     else
78     call exf_filter_rs( atemp1, atempmask, mythid )
79     end if
80     endif
81    
82     c Loop over tiles.
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    
88     c Interpolate linearly onto the current time.
89    
90     atemp(i,j,bi,bj) = fac *atemp0(i,j,bi,bj)+
91     & (exf_one - fac) *atemp1(i,j,bi,bj)
92    
93     enddo
94     enddo
95     enddo
96     enddo
97    
98 heimbach 1.2 #endif
99    
100 heimbach 1.1 end
101    
102    
103    
104 heimbach 1.2 subroutine exf_init_atemp( mythid )
105 heimbach 1.1
106     c ==================================================================
107     c SUBROUTINE exf_init_atemp
108     c ==================================================================
109     c
110     c o
111     c
112     c started: Ralf.Giering@FastOpt.de 25-Mai-2000
113 heimbach 1.2 c changed: heimbach@mit.edu 10-Jan-2002
114 heimbach 1.1 c
115     c ==================================================================
116     c SUBROUTINE exf_init_atemp
117     c ==================================================================
118    
119     implicit none
120    
121     c == global variables ==
122    
123     #include "EEPARAMS.h"
124     #include "SIZE.h"
125    
126     #include "exf_param.h"
127 heimbach 1.2 #include "exf_fields.h"
128 heimbach 1.1
129     c == routine arguments ==
130    
131     integer mythid
132    
133 heimbach 1.2 #ifdef ALLOW_ATM_TEMP
134 heimbach 1.1 c == local variables ==
135    
136     integer bi, bj
137     integer i, j
138    
139     c == end of interface ==
140    
141     do bj = mybylo(mythid), mybyhi(mythid)
142     do bi = mybxlo(mythid), mybxhi(mythid)
143     do j = 1, sny
144     do i = 1, snx
145 heimbach 1.3 atemp(i,j,bi,bj) = 0. _d 0
146 heimbach 1.1 atemp0(i,j,bi,bj) = 0. _d 0
147     atemp1(i,j,bi,bj) = 0. _d 0
148     enddo
149     enddo
150     enddo
151     enddo
152 heimbach 1.2
153     #endif
154 heimbach 1.1
155     end

  ViewVC Help
Powered by ViewVC 1.1.22