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 branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/FLO – NEMO

source: branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/FLO/floats.F90 @ 2287

Last change on this file since 2287 was 2287, checked in by smasson, 14 years ago

update licence of all NEMO files...

  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1MODULE floats
2   !!======================================================================
3   !!                       ***  MODULE  floats  ***
4   !! Ocean floats : floats
5   !!======================================================================
6   !! History :  OPA  !          (CLIPPER)   original Code
7   !!   NEMO     1.0  ! 2002-06  (A. Bozec)  F90, Free form and module
8   !!----------------------------------------------------------------------
9#if   defined key_floats   ||   defined key_esopa
10   !!----------------------------------------------------------------------
11   !!   'key_floats'                                     float trajectories
12   !!----------------------------------------------------------------------
13   !!   flo_stp   : float trajectories computation
14   !!   flo_init  : initialization of float trajectories computation
15   !!----------------------------------------------------------------------
16   USE flo_oce         ! floats variables
17   USE lib_mpp         ! distributed memory computing
18   USE flodom          ! initialisation Module
19   USE flowri          ! float output                     (flo_wri routine)
20   USE flo4rk          ! Trajectories, Runge Kutta scheme (flo_4rk routine)
21   USE floblk          ! Trajectories, Blanke scheme      (flo_blk routine)
22
23   IMPLICIT NONE
24   PRIVATE 
25
26   PUBLIC   flo_stp    ! routine called by step.F90
27   PUBLIC   flo_init   ! routine called by opa.F90
28
29   !!----------------------------------------------------------------------
30   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
31   !! $Id$
32   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
33   !!----------------------------------------------------------------------
34
35CONTAINS
36
37   SUBROUTINE flo_stp( kt )
38      !!----------------------------------------------------------------------
39      !!                   ***  ROUTINE flo_stp  ***
40      !!                   
41      !! ** Purpose :   Compute the geographical position (lat., long., depth)
42      !!      of each float at each time step with one of the algorithm.
43      !!
44      !! ** Method  :   The position of a float is computed with Bruno Blanke
45      !!        algorithm by default and with a 4th order Runge-Kutta scheme
46      !!        if ln_flork4 =T
47      !!----------------------------------------------------------------------
48      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
49      !!----------------------------------------------------------------------
50      !
51      IF( kt == nit000 ) THEN
52         IF(lwp) WRITE(numout,*)
53         IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine '
54         IF(lwp) WRITE(numout,*) '~~~~~~~'
55
56         CALL flo_dom            ! compute/read initial position of floats
57
58         wb(:,:,:) = wn(:,:,:)   ! set wb for computation of floats trajectories at the first time step
59      ENDIF
60      !
61      IF( ln_flork4 ) THEN   ;   CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme
62      ELSE                   ;   CALL flo_blk( kt )        ! Trajectories using Blanke' algorithme
63      ENDIF
64      !
65      IF( lk_mpp )   CALL mppsync   ! synchronization of all the processor
66      !
67      IF( kt == nit000 .OR. MOD( kt, nn_writefl ) == 0 )   CALL flo_wri( kt )      ! trajectories file
68      IF( kt == nitend .OR. MOD( kt, nn_stockfl ) == 0 )   CALL flo_wri( kt )      ! restart file
69      !
70      wb(:,:,:) = wn(:,:,:)         ! Save the old vertical velocity field
71      !
72   END SUBROUTINE flo_stp
73
74
75   SUBROUTINE flo_init
76      !!----------------------------------------------------------------
77      !!                 ***  ROUTINE flo_init  ***
78      !!                   
79      !! ** Purpose :   Read the namelist of floats
80      !!----------------------------------------------------------------------
81      USE ioipsl
82      !!
83      NAMELIST/namflo/ ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4 
84      !!---------------------------------------------------------------------
85      !
86      REWIND( numnam )              ! Namelist namflo : floats
87      READ  ( numnam, namflo )
88      !
89      IF(lwp) THEN                  ! control print
90         WRITE(numout,*)
91         WRITE(numout,*) '         Namelist floats :'
92         WRITE(numout,*) '            restart                          ln_rstflo = ', ln_rstflo
93         WRITE(numout,*) '            frequency of float output file   nn_writefl  = ', nn_writefl
94         WRITE(numout,*) '            frequency of float restart file  nn_stockfl  = ', nn_stockfl
95         WRITE(numout,*) '            Argo type floats                 ln_argo   = ', ln_argo
96         WRITE(numout,*) '            Computation of T trajectories    ln_flork4 = ', ln_flork4
97      ENDIF
98      !
99   END SUBROUTINE flo_init
100
101#  else
102   !!----------------------------------------------------------------------
103   !!   Default option :                                       Empty module
104   !!----------------------------------------------------------------------
105CONTAINS
106   SUBROUTINE flo_stp( kt )          ! Empty routine
107      WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt
108   END SUBROUTINE flo_stp
109   SUBROUTINE flo_init          ! Empty routine
110   END SUBROUTINE flo_init
111#endif
112
113   !!======================================================================
114 END MODULE floats
Note: See TracBrowser for help on using the repository browser.