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

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

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

revision 1.2 by heimbach, Fri May 23 18:37:31 2003 UTC revision 1.5 by dimitri, Fri Aug 15 01:42:44 2003 UTC
# Line 2  Line 2 
2    
3        subroutine exf_set_gen(        subroutine exf_set_gen(
4       &     genfile, genstartdate, genperiod, exf_inscal_gen,       &     genfile, genstartdate, genperiod, exf_inscal_gen,
5       &     genfld, gen0, gen1, genmask,       &     genfld, gen0, gen1, genmask,
6    #ifdef USE_EXF_INTERPOLATION
7         &     gen_lon0, gen_lon_inc, gen_lat0, gen_lat_inc,
8         &     gen_nlon, gen_nlat, gen_xout, gen_yout,
9    #endif
10       &     mycurrenttime, mycurrentiter, mythid )       &     mycurrenttime, mycurrentiter, mythid )
11    
12  c     ==================================================================  c     ==================================================================
# Line 13  c     o set external forcing gen Line 17  c     o set external forcing gen
17  c  c
18  c     started: Ralf.Giering@FastOpt.de 25-Mai-2000  c     started: Ralf.Giering@FastOpt.de 25-Mai-2000
19  c     changed: heimbach@mit.edu 10-Jan-2002  c     changed: heimbach@mit.edu 10-Jan-2002
20  c              mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002  c              20-Dec-2002: mods for pkg/seaice, menemenlis@jpl.nasa.gov
21  c              heimbach@mit.edu: totally re-organized exf_set_...  c              heimbach@mit.edu: totally re-organized exf_set_...
22  c              replaced all routines by one generic routine  c              replaced all routines by one generic routine
23    c              5-Aug-2003: added USE_EXF_INTERPOLATION for arbitrary
24    c                          input grid capability
25    
26  c     ==================================================================  c     ==================================================================
27  c     SUBROUTINE exf_set_gen  c     SUBROUTINE exf_set_gen
# Line 45  c     == routine arguments == Line 51  c     == routine arguments ==
51        _RL     mycurrenttime        _RL     mycurrenttime
52        integer mycurrentiter        integer mycurrentiter
53        integer mythid        integer mythid
54    #ifdef USE_EXF_INTERPOLATION
55    c     gen_lon_0 ,gen_lat_0 :: longitude and latitude of SouthWest
56    c                             corner of global input grid
57    c     gen_nlon, gen_nlat   :: input x-grid and y-grid size
58    c     gen_lon_inc          :: scalar x-grid increment
59    c     gen_lat_inc          :: vector y-grid increments
60    c     gen_xout, gen_yout   :: coordinates for output grid
61          _RL gen_lon0, gen_lon_inc
62          _RL gen_lat0, gen_lat_inc(MAX_LAT_INC)
63          INTEGER gen_nlon, gen_nlat
64          _RS gen_xout  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
65          _RS gen_yout  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
66    #endif
67    
68  c     == local variables ==  c     == local variables ==
69    
# Line 53  c     == local variables == Line 72  c     == local variables ==
72        _RL     fac        _RL     fac
73    
74        integer bi, bj        integer bi, bj
75        integer i, j        integer i, j, interp_method
76    
77  c     == end of interface ==  c     == end of interface ==
78    
# Line 68  c     get record numbers and interpolati Line 87  c     get record numbers and interpolati
87       &        )       &        )
88    
89           if ( first ) then           if ( first ) then
90    #ifdef USE_EXF_INTERPOLATION
91                interp_method = 2
92                call exf_interp( genfile, exf_iprec
93         &           , gen1, count0, gen_xout, gen_yout
94         &           , gen_lon0,gen_lon_inc
95         &           , gen_lat0,gen_lat_inc
96         &           , gen_nlon,gen_nlat,interp_method,mythid
97         &           )
98    #else
99              call mdsreadfield( genfile, exf_iprec, exf_yftype, 1              call mdsreadfield( genfile, exf_iprec, exf_yftype, 1
100       &           , gen1, count0, mythid       &           , gen1, count0, mythid
101       &           )       &           )
102    #endif
103    
104              if (exf_yftype .eq. 'RL') then              if (exf_yftype .eq. 'RL') then
105                 call exf_filter_rl( gen1, genmask, mythid )                 call exf_filter_rl( gen1, genmask, mythid )
# Line 82  c     get record numbers and interpolati Line 111  c     get record numbers and interpolati
111           if (( first ) .or. ( changed )) then           if (( first ) .or. ( changed )) then
112              call exf_SwapFFields( gen0, gen1, mythid )              call exf_SwapFFields( gen0, gen1, mythid )
113                            
114    #ifdef USE_EXF_INTERPOLATION
115                call exf_interp( genfile, exf_iprec
116         &           , gen1, count1, gen_xout, gen_yout
117         &           , gen_lon0,gen_lon_inc
118         &           , gen_lat0,gen_lat_inc
119         &           , gen_nlon,gen_nlat,interp_method,mythid
120         &           )
121    #else
122              call mdsreadfield( genfile, exf_iprec, exf_yftype, 1              call mdsreadfield( genfile, exf_iprec, exf_yftype, 1
123       &           , gen1, count1, mythid       &           , gen1, count1, mythid
124       &           )       &           )
125    #endif
126    
127              if (exf_yftype .eq. 'RL') then              if (exf_yftype .eq. 'RL') then
128                 call exf_filter_rl( gen1, genmask, mythid )                 call exf_filter_rl( gen1, genmask, mythid )

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22