New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
floats.F90 in trunk/NEMO/OPA_SRC/FLO – NEMO

source: trunk/NEMO/OPA_SRC/FLO/floats.F90 @ 3

Last change on this file since 3 was 3, checked in by opalod, 20 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.1 KB
Line 
1MODULE floats
2   !!======================================================================
3   !!                       ***  MODULE  floats  ***
4   !! Ocean floats : floats
5   !!======================================================================
6#if   defined key_floats   ||   defined key_esopa
7   !!----------------------------------------------------------------------
8   !!   'key_floats'                                     float trajectories
9   !!----------------------------------------------------------------------
10   !!   flo_stp   : float trajectories computation
11   !!   flo_init  : initialization of float trajectories computation
12   !!----------------------------------------------------------------------
13   !! * Modules used
14   USE flo_oce         ! floats variables
15   USE lib_mpp         ! distributed memory computing
16   USE flodom          ! initialisation Module
17   USE flowri          ! float output                     (flo_wri routine)
18   USE flo4rk          ! Trajectories, Runge Kutta scheme (flo_4rk routine)
19   USE floblk          ! Trajectories, Blanke scheme      (flo_blk routine)
20
21   IMPLICIT NONE
22   PRIVATE 
23
24   !! * Routine accessibility
25   PUBLIC flo_stp    ! routine called by step.F90
26   !!----------------------------------------------------------------------
27   !!   OPA 9.0 , LODYC-IPSL  (2003)
28   !!----------------------------------------------------------------------
29
30CONTAINS
31
32   SUBROUTINE flo_stp( kt )
33      !!----------------------------------------------------------------------
34      !!                   ***  ROUTINE flo_stp  ***
35      !!                   
36      !! ** Purpose :   Compute the geographical position (lat., long., depth)
37      !!      of each float at each time step with one of the algorithm.
38      !!
39      !! ** Method  :   The position of a float is computed with Bruno Blanke
40      !!        algorithm by default and with a 4th order Runge-Kutta scheme
41      !!        if ln_flork4 =T
42      !!     
43      !! History :
44      !!   8.5  !  02-06  (A. Bozec, G. Madec )  F90: Free form and module
45      !!----------------------------------------------------------------------
46      !! * arguments
47      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
48      !!----------------------------------------------------------------------
49
50      IF( kt == nit000 ) THEN
51         IF(lwp) WRITE(numout,*)
52         IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine '
53         IF(lwp) WRITE(numout,*) '~~~~~~~'
54
55         CALL flo_init           ! read the namelist of floats             
56
57         CALL flo_dom            ! compute/read initial position of floats
58
59         ! Initialisation of wb for computation of floats trajectories at the first time step
60         wb(:,:,:) = wn(:,:,:)
61      ENDIF
62
63      IF( ln_flork4 ) THEN
64         CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme
65      ELSE
66         CALL flo_blk( kt )        ! Trajectories using Blanke' algorithme
67      ENDIF
68
69# if defined key_mpp
70      CALL mppsync
71# endif
72
73      ! Writing and restart     
74     
75      ! trajectories file
76      IF( kt == nit000 .OR. MOD( kt, nwritefl ) == 0 )   CALL flo_wri( kt )
77      ! restart file
78      IF( kt == nitend .OR. MOD( kt, nstockfl ) == 0 )   CALL flo_wri( kt )
79
80      ! Save the old vertical velocity field
81      wb(:,:,:) = wn(:,:,:)
82
83   END SUBROUTINE flo_stp
84
85
86   SUBROUTINE flo_init
87      !!----------------------------------------------------------------
88      !!                 ***  ROUTINE flo_init  ***
89      !!                   
90      !! ** Purpose :   Read the namelist of floats
91      !!     
92      !! History :
93      !!   8.0  !         (CLIPPER)   original Code
94      !!   8.5  !  02-06  (A. Bozec)  F90, Free form and module
95      !!----------------------------------------------------------------------
96      !! * Modules used
97      USE ioipsl
98
99      !! * Local declarations
100      NAMELIST/namflo/ ln_rstarfl, nwritefl, nstockfl 
101      !!---------------------------------------------------------------------
102      ! Namelist namflo : floats
103     
104      ! default values
105      ln_rstarfl  = .FALSE.
106      nwritefl  = 150
107      nstockfl  = 450
108     
109      ! lecture of namflo
110      REWIND( numnam )
111      READ  ( numnam, namflo )
112
113      IF(lwp) THEN
114         WRITE(numout,*) ' '
115         WRITE(numout,*) '         Namelist floats :'
116         WRITE(numout,*) '            restart                          ln_rstarfl = ', ln_rstarfl
117         WRITE(numout,*) '            frequency of float output file   nwritefl   = ', nwritefl
118         WRITE(numout,*) '            frequency of float restart file  nstockfl   = ', nstockfl
119         WRITE(numout,*) ' '
120      ENDIF
121
122   END SUBROUTINE flo_init
123
124#  else
125   !!----------------------------------------------------------------------
126   !!   Default option :                                       Empty module
127   !!----------------------------------------------------------------------
128CONTAINS
129   SUBROUTINE flo_stp( kt )          ! Empty routine
130      WRITE(*,*) kt
131   END SUBROUTINE flo_stp
132#endif
133
134   !!======================================================================
135 END MODULE floats
Note: See TracBrowser for help on using the repository browser.