/[MITgcm]/MITgcm/model/src/external_fields_load.F
ViewVC logotype

Diff of /MITgcm/model/src/external_fields_load.F

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

revision 1.7 by adcroft, Tue May 29 14:01:37 2001 UTC revision 1.8 by cnh, Wed Sep 26 18:09:14 2001 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
5    
6  CStartOfInterface  CBOP
7    C     !ROUTINE: EXTERNAL_FIELDS_LOAD
8    C     !INTERFACE:
9        SUBROUTINE EXTERNAL_FIELDS_LOAD( myTime, myIter, myThid )        SUBROUTINE EXTERNAL_FIELDS_LOAD( myTime, myIter, myThid )
10  C     /==========================================================\  C     !DESCRIPTION: \bv
11  C     | SUBROUTINE EXTERNAL_FIELDS_LOAD                          |  C     *==========================================================*
12  C     | o Control reading of fields from external source.        |  C     | SUBROUTINE EXTERNAL_FIELDS_LOAD                          
13  C     |==========================================================|  C     | o Control reading of fields from external source.        
14  C     | External source field loading routine.                   |  C     *==========================================================*
15  C     | This routine is called every time we want to             |  C     | External source field loading routine.                    
16  C     | load a a set of external fields. The routine decides     |  C     | This routine is called every time we want to              
17  C     | which fields to load and then reads them in.             |  C     | load a a set of external fields. The routine decides      
18  C     | This routine needs to be customised for particular       |  C     | which fields to load and then reads them in.              
19  C     | experiments.                                             |  C     | This routine needs to be customised for particular        
20  C     | Notes                                                    |  C     | experiments.                                              
21  C     | =====                                                    |  C     | Notes                                                    
22  C     | Two-dimensional and three-dimensional I/O are handled in |  C     | =====                                                    
23  C     | the following way under MITgcmUV. A master thread        |  C     | Two-dimensional and three-dimensional I/O are handled in  
24  C     | performs I/O using system calls. This threads reads data |  C     | the following way under MITgcmUV. A master thread        
25  C     | into a temporary buffer. At present the buffer is loaded |  C     | performs I/O using system calls. This threads reads data  
26  C     | with the entire model domain. This is probably OK for now|  C     | into a temporary buffer. At present the buffer is loaded  
27  C     | Each thread then copies data from the buffer to the      |  C     | with the entire model domain. This is probably OK for now
28  C     | region of the proper array it is responsible for.        |  C     | Each thread then copies data from the buffer to the      
29  C     | =====                                                    |  C     | region of the proper array it is responsible for.        
30  C     | Conversion of flux fields are described in FFIELDS.h     |  C     | =====                                                    
31  C     \==========================================================/  C     | Conversion of flux fields are described in FFIELDS.h      
32    C     *==========================================================*
33    C     \ev
34    
35    C     !USES:
36        IMPLICIT NONE        IMPLICIT NONE
   
37  C     === Global variables ===  C     === Global variables ===
38  #include "SIZE.h"  #include "SIZE.h"
39  #include "EEPARAMS.h"  #include "EEPARAMS.h"
# Line 36  C     === Global variables === Line 41  C     === Global variables ===
41  #include "FFIELDS.h"  #include "FFIELDS.h"
42  #include "GRID.h"  #include "GRID.h"
43  #include "DYNVARS.h"  #include "DYNVARS.h"
44          LOGICAL DIFFERENT_MULTIPLE
45          EXTERNAL DIFFERENT_MULTIPLE
46    
47    C     !INPUT/OUTPUT PARAMETERS:
48  C     === Routine arguments ===  C     === Routine arguments ===
49  C     myThid - Thread no. that called this routine.  C     myThid - Thread no. that called this routine.
50  C     myTime - Simulation time  C     myTime - Simulation time
# Line 44  C     myIter - Simulation timestep numbe Line 52  C     myIter - Simulation timestep numbe
52        INTEGER myThid        INTEGER myThid
53        _RL     myTime        _RL     myTime
54        INTEGER myIter        INTEGER myIter
 CEndOfInterface  
55    
 C     === Functions ===  
       LOGICAL DIFFERENT_MULTIPLE  
       EXTERNAL DIFFERENT_MULTIPLE  
56    
57    C     !LOCAL VARIABLES:
58  C     === Local arrays ===  C     === Local arrays ===
59    C     taux[01]  :: Temp. for zonal wind stress
60    C     tauy[01]  :: Temp. for merid. wind stress
61    C     qnet[01]  :: Temp. for heat flux
62    C     empmr[01] :: Temp. for fresh water flux
63    C     sst[01]   :: Temp. for theta climatalogy
64    C     sss[01]   :: Temp. for theta climatalogy
65    C     qsw[01]   :: Temp. for short wave component of heat flux
66    C     [01]      :: End points for interpolation
67    C     Above use static heap storage to allow exchange.
68    C     aWght, bWght :: Interpolation weights
69        COMMON /TDFIELDS/        COMMON /TDFIELDS/
70       &                 taux0, tauy0, Qnet0, EmPmR0, SST0, SSS0, Qsw0,       &                 taux0, tauy0, Qnet0, EmPmR0, SST0, SSS0, Qsw0,
71       &                 taux1, tauy1, Qnet1, EmPmR1, SST1, SSS1, Qsw1       &                 taux1, tauy1, Qnet1, EmPmR1, SST1, SSS1, Qsw1
# Line 68  C     === Local arrays === Line 83  C     === Local arrays ===
83        _RS  SST1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS  SST1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
84        _RS  SSS1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS  SSS1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
85        _RS  Qsw1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS  Qsw1     (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
   
 C     === Local variables ===  
86        INTEGER bi,bj,i,j,intime0,intime1        INTEGER bi,bj,i,j,intime0,intime1
   
87        _RL aWght,bWght,rdt        _RL aWght,bWght,rdt
88        INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm        INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm
89    CEOP
90    
91        IF ( periodicExternalForcing ) THEN        IF ( periodicExternalForcing ) THEN
92    
# Line 225  C endif for periodicForcing Line 238  C endif for periodicForcing
238        RETURN        RETURN
239        END        END
240    
241    CBOP
242    C     !ROUTINE: LEF_ZERO
243    C     !INTERFACE:
244        SUBROUTINE LEF_ZERO( arr ,myThid )        SUBROUTINE LEF_ZERO( arr ,myThid )
245    C     !DESCRIPTION: \bv
246  C     This routine simply sets the argument array to zero  C     This routine simply sets the argument array to zero
247  C     Used only by EXTERNAL_FIELDS_LOAD  C     Used only by EXTERNAL_FIELDS_LOAD
248    C     \ev
249    C     !USES:
250        IMPLICIT NONE        IMPLICIT NONE
251  C     === Global variables ===  C     === Global variables ===
252  #include "SIZE.h"  #include "SIZE.h"
253  #include "EEPARAMS.h"  #include "EEPARAMS.h"
254    C     !INPUT/OUTPUT PARAMETERS:
255  C     === Arguments ===  C     === Arguments ===
256        _RS  arr (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS  arr (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
257        INTEGER myThid        INTEGER myThid
258    C     !LOCAL VARIABLES:
259  C     === Local variables ===  C     === Local variables ===
260        INTEGER i,j,bi,bj        INTEGER i,j,bi,bj
261    CEOP
262    
263        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
264         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22