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 @ 16

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

CT : UPDATE001 : First major NEMO update

  • 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( lk_mpp )   CALL mppsync   ! synchronization of all the processor
70
71
72      ! Writing and restart     
73     
74      ! trajectories file
75      IF( kt == nit000 .OR. MOD( kt, nwritefl ) == 0 )   CALL flo_wri( kt )
76      ! restart file
77      IF( kt == nitend .OR. MOD( kt, nstockfl ) == 0 )   CALL flo_wri( kt )
78
79      ! Save the old vertical velocity field
80      wb(:,:,:) = wn(:,:,:)
81
82   END SUBROUTINE flo_stp
83
84
85   SUBROUTINE flo_init
86      !!----------------------------------------------------------------
87      !!                 ***  ROUTINE flo_init  ***
88      !!                   
89      !! ** Purpose :   Read the namelist of floats
90      !!     
91      !! History :
92      !!   8.0  !         (CLIPPER)   original Code
93      !!   8.5  !  02-06  (A. Bozec)  F90, Free form and module
94      !!----------------------------------------------------------------------
95      !! * Modules used
96      USE ioipsl
97
98      !! * Local declarations
99      NAMELIST/namflo/ ln_rstflo, nwritefl, nstockfl 
100      !!---------------------------------------------------------------------
101      ! Namelist namflo : floats
102     
103      ! default values
104      ln_rstflo  = .FALSE.
105      nwritefl  = 150
106      nstockfl  = 450
107     
108      ! lecture of namflo
109      REWIND( numnam )
110      READ  ( numnam, namflo )
111
112      IF(lwp) THEN
113         WRITE(numout,*) ' '
114         WRITE(numout,*) '         Namelist floats :'
115         WRITE(numout,*) '            restart                          ln_rstflo = ', ln_rstflo
116         WRITE(numout,*) '            frequency of float output file   nwritefl  = ', nwritefl
117         WRITE(numout,*) '            frequency of float restart file  nstockfl  = ', nstockfl
118         WRITE(numout,*) ' '
119      ENDIF
120
121   END SUBROUTINE flo_init
122
123#  else
124   !!----------------------------------------------------------------------
125   !!   Default option :                                       Empty module
126   !!----------------------------------------------------------------------
127CONTAINS
128   SUBROUTINE flo_stp( kt )          ! Empty routine
129      WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt
130   END SUBROUTINE flo_stp
131#endif
132
133   !!======================================================================
134 END MODULE floats
Note: See TracBrowser for help on using the repository browser.