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/trunk/src/OCE/FLO – NEMO

source: NEMO/trunk/src/OCE/FLO/floats.F90 @ 12489

Last change on this file since 12489 was 12377, checked in by acc, 4 years ago

The big one. Merging all 2019 developments from the option 1 branch back onto the trunk.

This changeset reproduces 2019/dev_r11943_MERGE_2019 on the trunk using a 2-URL merge
onto a working copy of the trunk. I.e.:

svn merge --ignore-ancestry \

svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/trunk \
svn+ssh://acc@forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/NEMO/branches/2019/dev_r11943_MERGE_2019 ./

The --ignore-ancestry flag avoids problems that may otherwise arise from the fact that
the merge history been trunk and branch may have been applied in a different order but
care has been taken before this step to ensure that all applicable fixes and updates
are present in the merge branch.

The trunk state just before this step has been branched to releases/release-4.0-HEAD
and that branch has been immediately tagged as releases/release-4.0.2. Any fixes
or additions in response to tickets on 4.0, 4.0.1 or 4.0.2 should be done on
releases/release-4.0-HEAD. From now on future 'point' releases (e.g. 4.0.2) will
remain unchanged with periodic releases as needs demand. Note release-4.0-HEAD is a
transitional naming convention. Future full releases, say 4.2, will have a release-4.2
branch which fulfills this role and the first point release (e.g. 4.2.0) will be made
immediately following the release branch creation.

2020 developments can be started from any trunk revision later than this one.

  • 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, Kbb, Kmm )
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      INTEGER, INTENT( in  ) ::   Kbb, Kmm  ! ocean time level indices
52      !!----------------------------------------------------------------------
53      !
54      IF( ln_timing )   CALL timing_start('flo_stp')
55      !
56      IF( ln_flork4 ) THEN   ;   CALL flo_4rk( kt, Kbb, Kmm )  ! Trajectories using a 4th order Runge Kutta scheme
57      ELSE                   ;   CALL flo_blk( kt, Kbb, Kmm )  ! Trajectories using Blanke' algorithme
58      ENDIF
59      !
60      IF( lk_mpp )   CALL mppsync   ! synchronization of all the processor
61      !
62      CALL flo_wri( kt, Kmm ) ! trajectories ouput
63      !
64      CALL flo_rst( kt )      ! trajectories restart
65      !
66      wb(:,:,:) = ww(:,:,:)         ! Save the old vertical velocity field
67      !
68      IF( ln_timing )   CALL timing_stop('flo_stp')
69      !
70   END SUBROUTINE flo_stp
71
72
73   SUBROUTINE flo_init( Kmm )
74      !!----------------------------------------------------------------
75      !!                 ***  ROUTINE flo_init  ***
76      !!                   
77      !! ** Purpose :   Read the namelist of floats
78      !!----------------------------------------------------------------------
79      INTEGER, INTENT(in) :: Kmm       ! ocean time level index
80      !
81      INTEGER ::   jfl
82      INTEGER ::   ios                 ! Local integer output status for namelist read
83      !
84      NAMELIST/namflo/ ln_floats, jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii
85      !!---------------------------------------------------------------------
86      !
87      IF(lwp) WRITE(numout,*)
88      IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine '
89      IF(lwp) WRITE(numout,*) '~~~~~~~'
90
91      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901)
92901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist' )
93
94      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 )
95902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist' )
96      IF(lwm) WRITE ( numond, namflo )
97      !
98      IF(lwp) THEN                  ! control print
99         WRITE(numout,*)
100         WRITE(numout,*) '         Namelist floats :'
101         WRITE(numout,*) '            Activate floats or not                   ln_floats    = ', ln_floats
102         WRITE(numout,*) '               number of floats                      jpnfl        = ', jpnfl
103         WRITE(numout,*) '               number of new floats                  jpnflnewflo  = ', jpnnewflo
104         WRITE(numout,*) '               restart                               ln_rstflo    = ', ln_rstflo
105         WRITE(numout,*) '               frequency of float output file        nn_writefl   = ', nn_writefl
106         WRITE(numout,*) '               frequency of float restart file       nn_stockfl   = ', nn_stockfl
107         WRITE(numout,*) '               Argo type floats                      ln_argo      = ', ln_argo
108         WRITE(numout,*) '               Computation of T trajectories         ln_flork4    = ', ln_flork4
109         WRITE(numout,*) '               Use of ariane convention              ln_ariane    = ', ln_ariane
110         WRITE(numout,*) '               ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii
111
112      ENDIF
113      !
114      IF( ln_floats ) THEN
115         !                             ! allocate floats arrays
116         IF( flo_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' )
117         !
118         !                             ! allocate flodom arrays
119         IF( flo_dom_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' )
120         !
121         !                             ! allocate flowri arrays
122         IF( flo_wri_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' )
123         !
124         !                             ! allocate florst arrays
125         IF( flo_rst_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' )
126         !
127         jpnrstflo = jpnfl-jpnnewflo   ! memory allocation
128         !
129         DO jfl = 1, jpnfl             ! vertical axe for netcdf IOM ouput
130            nfloat(jfl) = jfl 
131         END DO
132         !
133         CALL flo_dom( Kmm )           ! compute/read initial position of floats
134         !
135         wb(:,:,:) = ww(:,:,:)         ! set wb for computation of floats trajectories at the first time step
136         !
137      ENDIF
138   END SUBROUTINE flo_init
139
140   !!======================================================================
141 END MODULE floats
Note: See TracBrowser for help on using the repository browser.