/[MITgcm]/MITgcm/pkg/flt/flt_main.F
ViewVC logotype

Diff of /MITgcm/pkg/flt/flt_main.F

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

revision 1.2 by jmc, Wed Dec 3 01:35:42 2008 UTC revision 1.3 by jmc, Sun Jan 4 00:58:23 2009 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "FLT_OPTIONS.h"  #include "FLT_OPTIONS.h"
5    
6  c     ==================================================================  C     ==================================================================
7  c  C
8  c     Float Package for the MIT Model  C     Float Package for the MIT Model
9  c  C
10  c     Main Routines:  C     Main Routines:
11  c  C
12  c     o flt_main      - Integrates the floats forward and stores  C     o flt_main      - Integrates the floats forward and stores
13  c                       positions and vertical profiles at specific  C                       positions and vertical profiles at specific
14  c                       time intervals.  C                       time intervals.
15  c     o flt_init      - Initialise the floats  C     o flt_init      - Initialise the floats
16  c     o flt_restart   - Writes restart data to file.  C     o flt_restart   - Writes restart data to file (=> renamed: flt_write_pickup)
17  c  C
18  c     Second Level Subroutines:  C     Second Level Subroutines:
19  c  C
20  c     o flt_runga2    - Second order Runga-Kutta inetgration (default)  C     o flt_runga2    - Second order Runga-Kutta inetgration (default)
21  c     o flt_exchg     - Does a new distribution of floats over tiles  C     o flt_exchg     - Does a new distribution of floats over tiles
22  c                       after every integration step.  C                       after every integration step.
23  c     o flt_up        - moves float to the surface (if flag is set)  C     o flt_up        - moves float to the surface (if flag is set)
24  c                       and stores profiles to file  C                       and stores profiles to file
25  c     o flt_down      - moves float to its target depth (if flag is set)  C     o flt_down      - moves float to its target depth (if flag is set)
26  c     o flt_traj      - stores positions and data to file  C     o flt_traj      - stores positions and data to file
27  c     o flt_bilinear  - contains blinear interpolation scheme  C     o flt_bilinear  - contains blinear interpolation scheme
28  c     o flt_functions - contains some functions  C     o flt_functions - contains some functions
29  c     o flt_mdsreadvector - modified mdsreadvector to read files  C     o flt_mdsreadvector - modified mdsreadvector to read files
30  c  C
31  c     ToDo:  C     ToDo:
32  c  C
33  c     o avoid exchanges when arrays empty  C     o avoid exchanges when arrays empty
34  c     o 3D advection of floats  C     o 3D advection of floats
35  c  C
36  c     ==================================================================  C     ==================================================================
37  c  C
38  c     Documentation:  C     Documentation:
39  c  C
40  c     To be made....  C     To be made....
41  c  C
42  c  C
43  c     started: Arne Biastoch abiastoch@ucsd.edu 10-Jan-2000  C     started: Arne Biastoch abiastoch@ucsd.edu 10-Jan-2000
44  c              (adopted from version written by Detlef Stammer  C              (adopted from version written by Detlef Stammer
45  c               for the old model code)  C               for the old model code)
46  c  C
47  c     changed: Arne Biastoch abiastoch@ucsd.edu 21-JUN-2001  C     changed: Arne Biastoch abiastoch@ucsd.edu 21-JUN-2001
48  c  C
49  c     ==================================================================  C     ==================================================================
50    
51    
52        SUBROUTINE FLT_MAIN (        SUBROUTINE FLT_MAIN (
53       I                      myIter,       I                      myTime, myIter, myThid )
      I                      myTime,  
      I                      myThid  
      &                     )  
54    
55  C     ==================================================================  C     ==================================================================
56  C     SUBROUTINE FLT_MAIN  C     SUBROUTINE FLT_MAIN
# Line 83  C     ================================== Line 80  C     ==================================
80    
81  C     == routine arguments ==  C     == routine arguments ==
82    
83  C     mythid - thread number for this instance of the routine.  C     myThid - thread number for this instance of the routine.
84    
       INTEGER myIter, myThid  
85        _RL myTime        _RL myTime
86          INTEGER myIter, myThid
87    
88  C     integration of the float trajectories  C     integration of the float trajectories
89    
90  c         write(0,*) ' bf call flt_runga2', myIter  c         WRITE(0,*) ' bf call flt_runga2', myIter
91           CALL TIMER_START('FLOATS RUNGA2      [FLT  LOOP]',myThid)           CALL TIMER_START('FLOATS RUNGA2      [FLT  LOOP]',myThid)
92           call flt_runga2( myIter, myTime, myThid )           CALL FLT_RUNGA2( myTime, myIter, myThid )
93           CALL TIMER_STOP ('FLOATS RUNGA2      [FLT  LOOP]',myThid)           CALL TIMER_STOP ('FLOATS RUNGA2      [FLT  LOOP]',myThid)
94  c         write(0,*) ' af call flt_runga2', myIter  c         WRITE(0,*) ' af call flt_runga2', myIter
95    
96  C     check if exchanges between tiles are necessary  C     check if exchanges between tiles are necessary
97    
98           if (Nx .ne. sNx .or. Ny .ne. sNy) then           IF (Nx .NE. sNx .OR. Ny .NE. sNy) THEN
99              CALL TIMER_START('FLOATS EXCHG       [FLT  LOOP]',myThid)              CALL TIMER_START('FLOATS EXCHG       [FLT  LOOP]',myThid)
100              call flt_exchg( myIter, myTime, myThid )              CALL FLT_EXCHG( myTime, myIter, myThid )
101              CALL TIMER_STOP ('FLOATS EXCHG       [FLT  LOOP]',myThid)              CALL TIMER_STOP ('FLOATS EXCHG       [FLT  LOOP]',myThid)
102           endif           ENDIF
103    
104  C     store profiles every flt_int_prof time steps:  C     store profiles every flt_int_prof time steps:
105  C     and move floats up and down  C     and move floats up and down
106    
107           if (mod(myTime,flt_int_prof).eq.0.) then           IF ( MOD(myTime,flt_int_prof).EQ.0. ) THEN
108              CALL TIMER_START('FLOATS UP          [FLT  LOOP]',myThid)              CALL TIMER_START('FLOATS UP          [FLT  LOOP]',myThid)
109              call flt_up( myIter, myTime, myThid )              CALL FLT_UP( myTime, myIter, myThid )
110              CALL TIMER_STOP ('FLOATS UP          [FLT  LOOP]',myThid)              CALL TIMER_STOP ('FLOATS UP          [FLT  LOOP]',myThid)
111           endif           ENDIF
112    
113  c         write(0,*) ' bf call flt_down', myIter  c         WRITE(0,*) ' bf call flt_down', myIter
114              CALL TIMER_START('FLOATS DOWN        [FLT  LOOP]',myThid)              CALL TIMER_START('FLOATS DOWN        [FLT  LOOP]',myThid)
115              call flt_down( myIter, myTime, myThid )              CALL FLT_DOWN( myTime, myIter, myThid )
116              CALL TIMER_STOP ('FLOATS DOWN        [FLT  LOOP]',myThid)              CALL TIMER_STOP ('FLOATS DOWN        [FLT  LOOP]',myThid)
117  c         write(0,*) ' af call flt_down', myIter  c         WRITE(0,*) ' af call flt_down', myIter
118    
119  C     store particles every flt_int_traj timesteps:  C     store particles every flt_int_traj timesteps:
120    
121           if (mod(myTime,flt_int_traj).eq.0.) then           IF ( MOD(myTime,flt_int_traj).EQ.0. ) THEN
122  c         write(0,*) ' bf call flt_traj', myIter  c         WRITE(0,*) ' bf call flt_traj', myIter
123              CALL TIMER_START('FLOATS TRAJ        [FLT  LOOP]',myThid)              CALL TIMER_START('FLOATS TRAJ        [FLT  LOOP]',myThid)
124              call flt_traj( myIter, myTime, myThid )              CALL FLT_TRAJ( myTime, myIter, myThid )
125              CALL TIMER_STOP ('FLOATS TRAJ        [FLT  LOOP]',myThid)              CALL TIMER_STOP ('FLOATS TRAJ        [FLT  LOOP]',myThid)
126  c         write(0,*) ' af call flt_traj', myIter  c         WRITE(0,*) ' af call flt_traj', myIter
127           endif           ENDIF
128    
129        RETURN        RETURN
130        END        END

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

  ViewVC Help
Powered by ViewVC 1.1.22