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/2011/dev_r2802_MERCATOR9_floats/NEMOGCM/NEMO/OPA_SRC/FLO – NEMO

source: branches/2011/dev_r2802_MERCATOR9_floats/NEMOGCM/NEMO/OPA_SRC/FLO/floats.F90 @ 2843

Last change on this file since 2843 was 2843, checked in by cbricaud, 13 years ago

comestic changes for flodom.F90, add call to flo_rst in floats.F90, minor correction in flo_rst

  • Property svn:keywords set to Id
File size: 6.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 oce             ! ocean variables
17   USE flo_oce         ! floats variables
18   USE lib_mpp         ! distributed memory computing
19   USE flodom          ! initialisation Module
20   USE flowri          ! float output                     (flo_wri routine)
21   USE florst          ! float restart                    (flo_rst routine)
22   USE flo4rk          ! Trajectories, Runge Kutta scheme (flo_4rk routine)
23   USE floblk          ! Trajectories, Blanke scheme      (flo_blk routine)
24   USE in_out_manager  ! I/O manager
25
26   IMPLICIT NONE
27   PRIVATE 
28
29   PUBLIC   flo_stp    ! routine called by step.F90
30   PUBLIC   flo_init   ! routine called by opa.F90
31
32   !!----------------------------------------------------------------------
33   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
34   !! $Id$
35   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
36   !!----------------------------------------------------------------------
37CONTAINS
38
39   SUBROUTINE flo_stp( kt )
40      !!----------------------------------------------------------------------
41      !!                   ***  ROUTINE flo_stp  ***
42      !!                   
43      !! ** Purpose :   Compute the geographical position (lat., long., depth)
44      !!      of each float at each time step with one of the algorithm.
45      !!
46      !! ** Method  :   The position of a float is computed with Bruno Blanke
47      !!        algorithm by default and with a 4th order Runge-Kutta scheme
48      !!        if ln_flork4 =T
49      !!----------------------------------------------------------------------
50      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
51      !!----------------------------------------------------------------------
52      !
53      IF( ln_flork4 ) THEN   ;   CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme
54      ELSE                   ;   CALL flo_blk( kt )        ! Trajectories using Blanke' algorithme
55      ENDIF
56      !
57      IF( lk_mpp )   CALL mppsync   ! synchronization of all the processor
58      !
59      CALL flo_wri( kt )      ! trajectories ouput
60      !
61      CALL flo_rst( kt )      ! trajectories restart
62      !
63      wb(:,:,:) = wn(:,:,:)         ! Save the old vertical velocity field
64      !
65   END SUBROUTINE flo_stp
66
67
68   SUBROUTINE flo_init
69      !!----------------------------------------------------------------
70      !!                 ***  ROUTINE flo_init  ***
71      !!                   
72      !! ** Purpose :   Read the namelist of floats
73      !!----------------------------------------------------------------------
74      INTEGER :: jfl
75      !
76      NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii
77      !!---------------------------------------------------------------------
78      !
79      IF(lwp) WRITE(numout,*)
80      IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine '
81      IF(lwp) WRITE(numout,*) '~~~~~~~'
82
83      REWIND( numnam )              ! Namelist namflo : floats
84      READ  ( numnam, namflo )
85      !
86      IF(lwp) THEN                  ! control print
87         WRITE(numout,*)
88         WRITE(numout,*) '         Namelist floats :'
89         WRITE(numout,*) '            number of floats                      jpnfl        = ', jpnfl
90         WRITE(numout,*) '            number of new floats                  jpnflnewflo  = ', jpnnewflo
91         WRITE(numout,*) '            restart                               ln_rstflo    = ', ln_rstflo
92         WRITE(numout,*) '            frequency of float output file        nn_writefl   = ', nn_writefl
93         WRITE(numout,*) '            frequency of float restart file       nn_stockfl   = ', nn_stockfl
94         WRITE(numout,*) '            Argo type floats                      ln_argo      = ', ln_argo
95         WRITE(numout,*) '            Computation of T trajectories         ln_flork4    = ', ln_flork4
96         WRITE(numout,*) '            Use of ariane convention              ln_ariane    = ', ln_ariane
97         WRITE(numout,*) '            ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii
98
99      ENDIF
100      !
101      !                             ! allocate floats arrays
102      IF( flo_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' )
103      !
104      !                             ! allocate flowri arrays
105      IF( flo_wri_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' )
106      !
107      !memory allocation
108      jpnrstflo = jpnfl-jpnnewflo
109
110      !vertical axe for netcdf IOM ouput
111      DO jfl=1,jpnfl ; nfloat(jfl)=jfl ; ENDDO
112
113      !
114      CALL flo_dom                  ! compute/read initial position of floats
115
116      wb(:,:,:) = wn(:,:,:)         ! set wb for computation of floats trajectories at the first time step
117      !
118   END SUBROUTINE flo_init
119
120#  else
121   !!----------------------------------------------------------------------
122   !!   Default option :                                       Empty module
123   !!----------------------------------------------------------------------
124CONTAINS
125   SUBROUTINE flo_stp( kt )          ! Empty routine
126      WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt
127   END SUBROUTINE flo_stp
128   SUBROUTINE flo_init          ! Empty routine
129   END SUBROUTINE flo_init
130#endif
131
132   !!======================================================================
133 END MODULE floats
Note: See TracBrowser for help on using the repository browser.