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 NEMO/branches/2019/dev_r11470_HPC_12_mpi3/src/OCE/FLO – NEMO

source: NEMO/branches/2019/dev_r11470_HPC_12_mpi3/src/OCE/FLO/floats.F90 @ 11799

Last change on this file since 11799 was 11799, checked in by mocavero, 4 years ago

Update the branch to v4.0.1 of the trunk

  • Property svn:keywords set to Id
File size: 6.8 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   !!
10   !!----------------------------------------------------------------------
11   !!   flo_stp   : float trajectories computation
12   !!   flo_init  : initialization of float trajectories computation
13   !!----------------------------------------------------------------------
14   USE oce             ! ocean variables
15   USE flo_oce         ! floats variables
16   USE lib_mpp         ! distributed memory computing
17   USE flodom          ! initialisation Module
18   USE flowri          ! float output                     (flo_wri routine)
19   USE florst          ! float restart                    (flo_rst routine)
20   USE flo4rk          ! Trajectories, Runge Kutta scheme (flo_4rk routine)
21   USE floblk          ! Trajectories, Blanke scheme      (flo_blk routine)
22   !
23   USE in_out_manager  ! I/O manager
24   USE timing          ! preformance summary
25
26   IMPLICIT NONE
27   PRIVATE 
28
29   PUBLIC   flo_stp    ! routine called by step.F90
30   PUBLIC   flo_init   ! routine called by nemogcm.F90
31
32   !!----------------------------------------------------------------------
33   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
34   !! $Id$
35   !! Software governed by the CeCILL license (see ./LICENSE)
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_timing )   CALL timing_start('flo_stp')
54      !
55      IF( ln_flork4 ) THEN   ;   CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme
56      ELSE                   ;   CALL flo_blk( kt )        ! Trajectories using Blanke' algorithme
57      ENDIF
58      !
59      IF( lk_mpp )   CALL mppsync   ! synchronization of all the processor
60      !
61      CALL flo_wri( kt )      ! trajectories ouput
62      !
63      CALL flo_rst( kt )      ! trajectories restart
64      !
65      wb(:,:,:) = wn(:,:,:)         ! Save the old vertical velocity field
66      !
67      IF( ln_timing )   CALL timing_stop('flo_stp')
68      !
69   END SUBROUTINE flo_stp
70
71
72   SUBROUTINE flo_init
73      !!----------------------------------------------------------------
74      !!                 ***  ROUTINE flo_init  ***
75      !!                   
76      !! ** Purpose :   Read the namelist of floats
77      !!----------------------------------------------------------------------
78      INTEGER ::   jfl
79      INTEGER ::   ios                 ! Local integer output status for namelist read
80      !
81      NAMELIST/namflo/ ln_floats, jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii
82      !!---------------------------------------------------------------------
83      !
84      IF(lwp) WRITE(numout,*)
85      IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine '
86      IF(lwp) WRITE(numout,*) '~~~~~~~'
87
88      REWIND( numnam_ref )              ! Namelist namflo in reference namelist : Floats
89      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901)
90901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist' )
91
92      REWIND( numnam_cfg )              ! Namelist namflo in configuration namelist : Floats
93      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 )
94902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist' )
95      IF(lwm) WRITE ( numond, namflo )
96      !
97      IF(lwp) THEN                  ! control print
98         WRITE(numout,*)
99         WRITE(numout,*) '         Namelist floats :'
100         WRITE(numout,*) '            Activate floats or not                   ln_floats    = ', ln_floats
101         WRITE(numout,*) '               number of floats                      jpnfl        = ', jpnfl
102         WRITE(numout,*) '               number of new floats                  jpnflnewflo  = ', jpnnewflo
103         WRITE(numout,*) '               restart                               ln_rstflo    = ', ln_rstflo
104         WRITE(numout,*) '               frequency of float output file        nn_writefl   = ', nn_writefl
105         WRITE(numout,*) '               frequency of float restart file       nn_stockfl   = ', nn_stockfl
106         WRITE(numout,*) '               Argo type floats                      ln_argo      = ', ln_argo
107         WRITE(numout,*) '               Computation of T trajectories         ln_flork4    = ', ln_flork4
108         WRITE(numout,*) '               Use of ariane convention              ln_ariane    = ', ln_ariane
109         WRITE(numout,*) '               ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii
110
111      ENDIF
112      !
113      IF( ln_floats ) THEN
114         !                             ! allocate floats arrays
115         IF( flo_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' )
116         !
117         !                             ! allocate flodom arrays
118         IF( flo_dom_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' )
119         !
120         !                             ! allocate flowri arrays
121         IF( flo_wri_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' )
122         !
123         !                             ! allocate florst arrays
124         IF( flo_rst_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' )
125         !
126         jpnrstflo = jpnfl-jpnnewflo   ! memory allocation
127         !
128         DO jfl = 1, jpnfl             ! vertical axe for netcdf IOM ouput
129            nfloat(jfl) = jfl 
130         END DO
131         !
132         CALL flo_dom                  ! compute/read initial position of floats
133         !
134         wb(:,:,:) = wn(:,:,:)         ! set wb for computation of floats trajectories at the first time step
135         !
136      ENDIF
137      !
138   END SUBROUTINE flo_init
139
140   !!======================================================================
141 END MODULE floats
Note: See TracBrowser for help on using the repository browser.