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

Diff of /MITgcm/pkg/exf/exf_init.F

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

revision 1.4 by dimitri, Sat Dec 28 10:11:11 2002 UTC revision 1.13 by dimitri, Wed Feb 7 17:38:11 2007 UTC
# Line 1  Line 1 
1  c $Header$  c $Header$
2    
3  #include "EXF_CPPOPTIONS.h"  #include "EXF_OPTIONS.h"
4    
5    
6        subroutine exf_init(        subroutine exf_init( mythid )
      I                     mythid  
      &                   )  
7    
8  c     ==================================================================  c     ==================================================================
9  c     SUBROUTINE exf_init  c     SUBROUTINE exf_init
# Line 14  c Line 12  c
12  c     o This routine initialises the forcing  c     o This routine initialises the forcing
13  c  c
14  c     started: Ralf.Giering@FastOpt.de 25-Mai-20000  c     started: Ralf.Giering@FastOpt.de 25-Mai-20000
15  c     included evaporation; menemenlis@jpl.nasa.gov 20-Dec-2002  c     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
16  c  c
17  c     ==================================================================  c     ==================================================================
18  c     SUBROUTINE exf_init  c     SUBROUTINE exf_init
# Line 26  c     == global variables == Line 24  c     == global variables ==
24    
25  #include "EEPARAMS.h"  #include "EEPARAMS.h"
26  #include "SIZE.h"  #include "SIZE.h"
27    #include "GRID.h"
28  #include "cal.h"  #include "cal.h"
29  #include "exf.h"  #include "exf.h"
30    #include "exf_param.h"
31    #include "exf_fields.h"
32    
33  c     == routine arguments ==  c     == routine arguments ==
34    
# Line 35  c     == routine arguments == Line 36  c     == routine arguments ==
36    
37  c     == local variables ==  c     == local variables ==
38    
39  c     == end of interface ==        integer interp_method
40    
41        call exf_init_hflux  ( mythid )  c     == end of interface ==
       call exf_init_sflux  ( mythid )  
42    
43        call exf_init_ustress( mythid )        if ( useCubedSphereExchange
44        call exf_init_vstress( mythid )       &     .and. ustressperiod .eq. 0
45         &     .and. ustressfile .NE. ' ' ) then
46             stop 'CubedSphereExchange and ustressperiod=0 not supported'
47          endif
48          interp_method=12
49          call exf_init_gen (
50         &     ustressfile, exf_inscal_ustress, ustressmask,
51         &     ustressconst, ustress, ustress0, ustress1,
52    #ifdef USE_EXF_INTERPOLATION
53         &     ustress_lon0, ustress_lon_inc,
54         &     ustress_lat0, ustress_lat_inc,
55         &     ustress_nlon, ustress_nlat, xC, yC, interp_method,
56    #endif
57         &     mythid )
58    
59          if ( useCubedSphereExchange
60         &     .and. vstressperiod .eq. 0
61         &     .and. vstressfile .NE. ' ' ) then
62             stop 'CubedSphereExchange and vstressperiod=0 not supported'
63          endif
64          interp_method=22
65          call exf_init_gen (
66         &     vstressfile, exf_inscal_vstress, vstressmask,
67         &     vstressconst, vstress, vstress0, vstress1,
68    #ifdef USE_EXF_INTERPOLATION
69         &     vstress_lon0, vstress_lon_inc,
70         &     vstress_lat0, vstress_lat_inc,
71         &     vstress_nlon, vstress_nlat, xC, yC, interp_method,
72    #endif
73         &     mythid )
74    
75  #ifdef EXF_READ_EVAP  #ifdef ALLOW_ATM_WIND
       call exf_init_evap   ( mythid )  
 #endif EXF_READ_EVAP  
   
 #ifdef ALLOW_RUNOFF  
       call exf_init_runoff ( mythid )  
 #endif /* ALLOW_RUNOFF */  
76    
77  #ifdef ALLOW_BULKFORMULAE        if ( useCubedSphereExchange
78  c     Use bulk formulae estimates of the surface fluxes.       &     .and. uwindperiod .eq. 0
79         &     .and. uwindfile .NE. ' ' ) then
80             stop 'CubedSphereExchange and uwindperiod=0 not supported'
81          endif
82          interp_method=12
83          call exf_init_gen (
84         &     uwindfile, exf_inscal_uwind, uwindmask,
85         &     uwindconst, uwind, uwind0, uwind1,
86    #ifdef USE_EXF_INTERPOLATION
87         &     uwind_lon0, uwind_lon_inc,
88         &     uwind_lat0, uwind_lat_inc,
89         &     uwind_nlon, uwind_nlat, xC, yC, interp_method,
90    #endif
91         &     mythid )
92    
93          if ( useCubedSphereExchange
94         &     .and. vwindperiod .eq. 0
95         &     .and. vwindfile .NE. ' ' ) then
96             stop 'CubedSphereExchange and vwindperiod=0 not supported'
97          endif
98          interp_method=22
99          call exf_init_gen (
100         &     vwindfile, exf_inscal_vwind, vwindmask,
101         &     vwindconst, vwind, vwind0, vwind1,
102    #ifdef USE_EXF_INTERPOLATION
103         &     vwind_lon0, vwind_lon_inc,
104         &     vwind_lat0, vwind_lat_inc,
105         &     vwind_nlon, vwind_nlat, xC, yC, interp_method,
106    #endif
107         &     mythid )
108    
109  #ifdef ALLOW_ATM_TEMP  #endif /* ALLOW_ATM_WIND */
110    
111  c     Use the atmospheric temperature and specific humidity for flux        interp_method=1
 c     estimates.  
       call exf_init_atemp ( mythid )  
       call exf_init_aqh   ( mythid )  
       call exf_init_lwflux( mythid )  
       call exf_init_swflux( mythid )  
       call exf_init_precip( mythid )  
   
 #else /* ALLOW_ATM_TEMP undefined */    
   
 #ifdef ALLOW_KPP  
       call exf_init_swflux( mythid )  
 #endif /* ALLOW_KPP */  
112    
113  #endif /* ALLOW_ATM_TEMP */        call exf_init_gen (
114         &     wspeedfile, exf_inscal_wspeed, wspeedmask,
115         &     wspeedconst, wspeed, wspeed0, wspeed1,
116    #ifdef USE_EXF_INTERPOLATION
117         &     wspeed_lon0, wspeed_lon_inc,
118         &     wspeed_lat0, wspeed_lat_inc,
119         &     wspeed_nlon, wspeed_nlat, xC, yC, interp_method,
120    #endif
121         &     mythid )
122    
123          call exf_init_gen (
124         &     hfluxfile, exf_inscal_hflux, hfluxmask,
125         &     hfluxconst, hflux, hflux0, hflux1,
126    #ifdef USE_EXF_INTERPOLATION
127         &     hflux_lon0, hflux_lon_inc,
128         &     hflux_lat0, hflux_lat_inc,
129         &     hflux_nlon, hflux_nlat, xC, yC, interp_method,
130    #endif
131         &     mythid )
132    
133          call exf_init_gen (
134         &     sfluxfile, exf_inscal_sflux, sfluxmask,
135         &     sfluxconst, sflux, sflux0, sflux1,
136    #ifdef USE_EXF_INTERPOLATION
137         &     sflux_lon0, sflux_lon_inc,
138         &     sflux_lat0, sflux_lat_inc,
139         &     sflux_nlon, sflux_nlat, xC, yC, interp_method,
140    #endif
141         &     mythid )
142    
143  #ifdef ALLOW_ATM_WIND  #ifdef ALLOW_ATM_TEMP
         
 c     Use atmospheric wind fields  
       call exf_init_uwind( mythid )  
       call exf_init_vwind( mythid )  
   
 #endif /* ALLOW_ATM_WIND */  
144    
145  #else /* ALLOW_BULKFORMULAE undefined */        call exf_init_gen (
146         &     atempfile, exf_inscal_atemp, atempmask,
147         &     atempconst, atemp, atemp0, atemp1,
148    #ifdef USE_EXF_INTERPOLATION
149         &     atemp_lon0, atemp_lon_inc,
150         &     atemp_lat0, atemp_lat_inc,
151         &     atemp_nlon, atemp_nlat, xC, yC, interp_method,
152    #endif
153         &     mythid )
154    
155          call exf_init_gen (
156         &     aqhfile, exf_inscal_aqh, aqhmask,
157         &     aqhconst, aqh, aqh0, aqh1,
158    #ifdef USE_EXF_INTERPOLATION
159         &     aqh_lon0, aqh_lon_inc,
160         &     aqh_lat0, aqh_lat_inc,
161         &     aqh_nlon, aqh_nlat, xC, yC, interp_method,
162    #endif
163         &     mythid )
164    
165          call exf_init_gen (
166         &     lwfluxfile, exf_inscal_lwflux, lwfluxmask,
167         &     lwfluxconst, lwflux, lwflux0, lwflux1,
168    #ifdef USE_EXF_INTERPOLATION
169         &     lwflux_lon0, lwflux_lon_inc,
170         &     lwflux_lat0, lwflux_lat_inc,
171         &     lwflux_nlon, lwflux_nlat, xC, yC, interp_method,
172    #endif
173         &     mythid )
174    
175          call exf_init_gen (
176         &     precipfile, exf_inscal_precip, precipmask,
177         &     precipconst, precip, precip0, precip1,
178    #ifdef USE_EXF_INTERPOLATION
179         &     precip_lon0, precip_lon_inc,
180         &     precip_lat0, precip_lat_inc,
181         &     precip_nlon, precip_nlat, xC, yC, interp_method,
182    #endif
183         &     mythid )
184    
185          call exf_init_gen (
186         &     snowprecipfile, exf_inscal_snowprecip, snowprecipmask,
187         &     snowprecipconst, snowprecip, snowprecip0, snowprecip1,
188    #ifdef USE_EXF_INTERPOLATION
189         &     snowprecip_lon0, snowprecip_lon_inc,
190         &     snowprecip_lat0, snowprecip_lat_inc,
191         &     snowprecip_nlon, snowprecip_nlat, xC, yC, interp_method,
192    #endif
193         &     mythid )
194    
195  #ifdef ALLOW_KPP  #endif /* ALLOW_ATM_TEMP */
       call exf_init_swflux( mythid )  
 #endif /* ALLOW_KPP */  
196    
197  #endif /* ALLOW_BULKFORMULAE */  #if defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING)
198          call exf_init_gen (
199         &     swfluxfile, exf_inscal_swflux, swfluxmask,
200         &     swfluxconst, swflux, swflux0, swflux1,
201    #ifdef USE_EXF_INTERPOLATION
202         &     swflux_lon0, swflux_lon_inc,
203         &     swflux_lat0, swflux_lat_inc,
204         &     swflux_nlon, swflux_nlat, xC, yC, interp_method,
205    #endif
206         &     mythid )
207    #endif /* defined(ALLOW_ATM_TEMP) || defined(SHORTWAVE_HEATING) */
208    
209    #if defined(ALLOW_ATM_TEMP) || defined(EXF_READ_EVAP)
210          call exf_init_gen (
211         &     evapfile, exf_inscal_evap, evapmask,
212         &     evapconst, evap, evap0, evap1,
213    #ifdef USE_EXF_INTERPOLATION
214         &     evap_lon0, evap_lon_inc,
215         &     evap_lat0, evap_lat_inc,
216         &     evap_nlon, evap_nlat, xC, yC, interp_method,
217    #endif
218         &     mythid )
219    #endif /* defined(ALLOW_ATM_TEMP) || defined(EXF_READ_EVAP) */
220    
221    #ifdef ALLOW_DOWNWARD_RADIATION
222    
223          call exf_init_gen (
224         &     swdownfile, exf_inscal_swdown, swdownmask,
225         &     swdownconst, swdown, swdown0, swdown1,
226    #ifdef USE_EXF_INTERPOLATION
227         &     swdown_lon0, swdown_lon_inc,
228         &     swdown_lat0, swdown_lat_inc,
229         &     swdown_nlon, swdown_nlat, xC, yC, interp_method,
230    #endif
231         &     mythid )
232    
233          call exf_init_gen (
234         &     lwdownfile, exf_inscal_lwdown, lwdownmask,
235         &     lwdownconst, lwdown, lwdown0, lwdown1,
236    #ifdef USE_EXF_INTERPOLATION
237         &     lwdown_lon0, lwdown_lon_inc,
238         &     lwdown_lat0, lwdown_lat_inc,
239         &     lwdown_nlon, lwdown_nlat, xC, yC, interp_method,
240    #endif
241         &     mythid )
242    
243    #endif /* ALLOW_DOWNWARD_RADIATION */
244    
245    #ifdef ATMOSPHERIC_LOADING
246          call exf_init_gen (
247         &     apressurefile, exf_inscal_apressure, apressuremask,
248         &     apressureconst, apressure, apressure0, apressure1,
249    #ifdef USE_EXF_INTERPOLATION
250         &     apressure_lon0, apressure_lon_inc,
251         &     apressure_lat0, apressure_lat_inc,
252         &     apressure_nlon, apressure_nlat, xC, yC, interp_method,
253    #endif
254         &     mythid )
255    #endif /* ATMOSPHERIC_LOADING */
256    
257    #if (defined (ALLOW_RUNOFF) || defined (ALLOW_SEAICE))
258          call exf_init_gen (
259         &     runofffile, exf_inscal_runoff, runoffmask,
260         &     runoffconst, runoff, runoff0, runoff1,
261    #ifdef USE_EXF_INTERPOLATION
262         &     runoff_lon0, runoff_lon_inc,
263         &     runoff_lat0, runoff_lat_inc,
264         &     runoff_nlon, runoff_nlat, xC, yC, interp_method,
265    #endif
266         &     mythid )
267    #endif /* defined (ALLOW_RUNOFF) || defined (ALLOW_SEAICE) */
268    
269  c     Check for climatological contributions  c     Initialize climatological fields
270        call exf_clim_init( mythid )        call exf_clim_init     ( mythid )
271    
272        end        end

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22