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

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

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


Revision 1.13 - (hide annotations) (download)
Fri May 23 18:37:31 2003 UTC (21 years, 1 month ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint50f_post, checkpoint50g_post, checkpoint50h_post, checkpoint50i_post
Changes since 1.12: +85 -504 lines
o exf totally restructured
  - replaced all exf_set_ routines by one generic exf_set_gen.F
    and made sure it's still differentiable
  - split exf_getffields.F into new exf_bulkformulae.F
  - exf_inscal_/exf_outscal_ suffixes consistent with field names
  - updated adjoint/makefile and relevant verif. accordingly

1 heimbach 1.13 c $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getffields.F,v 1.2.6.11 2003/05/23 16:18:57 heimbach Exp $
2 heimbach 1.1
3     #include "EXF_CPPOPTIONS.h"
4    
5 heimbach 1.13 subroutine exf_getffields( mycurrenttime, mycurrentiter, mythid )
6 heimbach 1.1
7     c ==================================================================
8 heimbach 1.13 c SUBROUTINE exf_getffields
9 heimbach 1.1 c ==================================================================
10     c
11 dimitri 1.8 c o Read-in atmospheric state and/or surface fluxes from files.
12     c
13 heimbach 1.13 c heimbach@mit.edu, 23-May-2003 totally re-structured
14 dimitri 1.7 c
15 heimbach 1.1 c ==================================================================
16 heimbach 1.13 c SUBROUTINE exf_getffields
17 heimbach 1.1 c ==================================================================
18    
19     implicit none
20    
21     c == global variables ==
22    
23     #include "EEPARAMS.h"
24     #include "SIZE.h"
25     #include "PARAMS.h"
26     #include "DYNVARS.h"
27     #include "GRID.h"
28    
29 dimitri 1.9 #include "exf_param.h"
30 heimbach 1.1 #include "exf_fields.h"
31     #include "exf_constants.h"
32    
33     c == routine arguments ==
34    
35     integer mythid
36     integer mycurrentiter
37     _RL mycurrenttime
38    
39     c == local variables ==
40    
41     c == end of interface ==
42    
43 dimitri 1.8 c-- read forcing fields from files and temporal interpolation
44    
45     #ifdef ALLOW_ATM_WIND
46    
47     c Zonal wind.
48 heimbach 1.13 cgen call exf_set_uwind( mycurrenttime, mycurrentiter, mythid )
49     call exf_set_gen(
50     & uwindfile, uwindstartdate, uwindperiod,
51     & exf_inscal_uwind,
52     & uwind, uwind0, uwind1, uwindmask,
53     & mycurrenttime, mycurrentiter, mythid )
54 dimitri 1.8
55     c Meridional wind.
56 heimbach 1.13 cgen call exf_set_vwind( mycurrenttime, mycurrentiter, mythid )
57     call exf_set_gen(
58     & vwindfile, vwindstartdate, vwindperiod,
59     & exf_inscal_vwind,
60     & vwind, vwind0, vwind1, vwindmask,
61     & mycurrenttime, mycurrentiter, mythid )
62 dimitri 1.8
63     #ifdef ALLOW_UWIND_CONTROL
64     call ctrl_getuwind ( mycurrenttime, mycurrentiter, mythid )
65     #endif
66    
67     #ifdef ALLOW_VWIND_CONTROL
68     call ctrl_getvwind ( mycurrenttime, mycurrentiter, mythid )
69     #endif
70    
71     #else /* ifndef ALLOW_ATM_WIND */
72    
73     c Zonal wind stress.
74 heimbach 1.13 call exf_set_gen(
75     & ustressfile, ustressstartdate, ustressperiod,
76     & exf_inscal_ustress,
77     & ustress, ustress0, ustress1, ustressmask,
78     & mycurrenttime, mycurrentiter, mythid )
79 dimitri 1.8
80     c Meridional wind stress.
81 heimbach 1.13 call exf_set_gen(
82     & vstressfile, vstressstartdate, vstressperiod,
83     & exf_inscal_vstress,
84     & vstress, vstress0, vstress1, vstressmask,
85     & mycurrenttime, mycurrentiter, mythid )
86 dimitri 1.8
87     #endif /* ifndef ALLOW_ATM_WIND */
88    
89 heimbach 1.1 #ifdef ALLOW_ATM_TEMP
90 dimitri 1.8
91 heimbach 1.1 c Atmospheric temperature.
92 heimbach 1.13 cgen call exf_set_atemp ( mycurrenttime, mycurrentiter, mythid )
93     call exf_set_gen(
94     & atempfile, atempstartdate, atempperiod,
95     & exf_inscal_atemp,
96     & atemp, atemp0, atemp1, atempmask,
97     & mycurrenttime, mycurrentiter, mythid )
98 heimbach 1.1
99     c Atmospheric humidity.
100 heimbach 1.13 cgen call exf_set_aqh ( mycurrenttime, mycurrentiter, mythid )
101     call exf_set_gen(
102     & aqhfile, aqhstartdate, aqhperiod,
103     & exf_inscal_aqh,
104     & aqh, aqh0, aqh1, aqhmask,
105     & mycurrenttime, mycurrentiter, mythid )
106 heimbach 1.1
107     c Net long wave radiative flux.
108 heimbach 1.13 cgen call exf_set_lwflux ( mycurrenttime, mycurrentiter, mythid )
109     call exf_set_gen(
110     & lwfluxfile, lwfluxstartdate, lwfluxperiod,
111     & exf_inscal_lwflux,
112     & lwflux, lwflux0, lwflux1, lwfluxmask,
113     & mycurrenttime, mycurrentiter, mythid )
114 heimbach 1.1
115     c Precipitation.
116 heimbach 1.13 cgen call exf_set_precip ( mycurrenttime, mycurrentiter, mythid )
117     call exf_set_gen(
118     & precipfile, precipstartdate, precipperiod,
119     & exf_inscal_precip,
120     & precip, precip0, precip1, precipmask,
121     & mycurrenttime, mycurrentiter, mythid )
122 heimbach 1.1
123 heimbach 1.3 #ifdef ALLOW_ATEMP_CONTROL
124 dimitri 1.8 call ctrl_getatemp ( mycurrenttime, mycurrentiter, mythid )
125 heimbach 1.3 #endif
126    
127     #ifdef ALLOW_AQH_CONTROL
128 dimitri 1.8 call ctrl_getaqh ( mycurrenttime, mycurrentiter, mythid )
129 heimbach 1.3 #endif
130 heimbach 1.1
131 dimitri 1.8 #else /* ifndef ALLOW_ATM_TEMP */
132 heimbach 1.1
133     c Atmospheric heat flux.
134 heimbach 1.13 call exf_set_gen (
135     & hfluxfile, hfluxstartdate, hfluxperiod, exf_inscal_hflux,
136     & hflux, hflux0, hflux1, hfluxmask,
137     & mycurrenttime, mycurrentiter, mythid )
138 heimbach 1.1
139     c Salt flux.
140 heimbach 1.13 call exf_set_gen (
141     & sfluxfile, sfluxstartdate, sfluxperiod, exf_inscal_sflux,
142     & sflux, sflux0, sflux1, sfluxmask,
143     & mycurrenttime, mycurrentiter, mythid )
144 dimitri 1.8
145     #endif /* ifndef ALLOW_ATM_TEMP */
146 heimbach 1.1
147 dimitri 1.8 #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
148 heimbach 1.1 c Net short wave radiative flux.
149 heimbach 1.13 cgen call exf_set_swflux ( mycurrenttime, mycurrentiter, mythid )
150     call exf_set_gen (
151     & swfluxfile, swfluxstartdate, swfluxperiod, exf_inscal_swflux,
152     & swflux, swflux0, swflux1, swfluxmask,
153     & mycurrenttime, mycurrentiter, mythid )
154 heimbach 1.3 #endif
155    
156 dimitri 1.8 #ifdef EXF_READ_EVAP
157     c Evaporation
158 heimbach 1.13 cgen call exf_set_evap ( mycurrenttime, mycurrentiter, mythid )
159     call exf_set_gen (
160     & evapfile, evapstartdate, evapperiod, exf_inscal_evap,
161     & evap, evap0, evap1, evapmask,
162     & mycurrenttime, mycurrentiter, mythid )
163 heimbach 1.3 #endif
164 heimbach 1.1
165 dimitri 1.8 #ifdef ALLOW_DOWNWARD_RADIATION
166 heimbach 1.1
167 dimitri 1.8 c Downward shortwave radiation.
168 heimbach 1.13 cgen call exf_set_swdown ( mycurrenttime, mycurrentiter, mythid )
169     call exf_set_gen (
170     & swdownfile, swdownstartdate, swdownperiod, exf_inscal_swdown,
171     & swdown, swdown0, swdown1, swdownmask,
172     & mycurrenttime, mycurrentiter, mythid )
173 heimbach 1.1
174 dimitri 1.8 c Downward longwave radiation.
175 heimbach 1.13 cgen call exf_set_lwdown ( mycurrenttime, mycurrentiter, mythid )
176     call exf_set_gen (
177     & lwdownfile, lwdownstartdate, lwdownperiod, exf_inscal_lwdown,
178     & lwdown, lwdown0, lwdown1, lwdownmask,
179     & mycurrenttime, mycurrentiter, mythid )
180 heimbach 1.1
181 heimbach 1.3 #endif
182 heimbach 1.1
183 heimbach 1.12 #ifdef ATMOSPHERIC_LOADING
184     c Atmos. pressure forcing
185 heimbach 1.13 cgen call exf_set_apressure ( mycurrenttime, mycurrentiter, mythid )
186     call exf_set_gen (
187     & apressurefile, apressurestartdate, apressureperiod,
188     & exf_inscal_apressure,
189     & apressure, apressure0, apressure1, apressuremask,
190     & mycurrenttime, mycurrentiter, mythid )
191 heimbach 1.3 #endif
192    
193 heimbach 1.1
194     end

  ViewVC Help
Powered by ViewVC 1.1.22