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

Last change on this file since 10068 was 10068, checked in by nicolasmartin, 6 years ago

First part of modifications to have a common default header : fix typos and SVN keywords properties

  • Property svn:keywords set to Id
File size: 7.3 KB
RevLine 
[3]1MODULE floats
2   !!======================================================================
3   !!                       ***  MODULE  floats  ***
4   !! Ocean floats : floats
5   !!======================================================================
[1601]6   !! History :  OPA  !          (CLIPPER)   original Code
7   !!   NEMO     1.0  ! 2002-06  (A. Bozec)  F90, Free form and module
8   !!----------------------------------------------------------------------
[9124]9#if   defined   key_floats
[3]10   !!----------------------------------------------------------------------
11   !!   'key_floats'                                     float trajectories
12   !!----------------------------------------------------------------------
13   !!   flo_stp   : float trajectories computation
14   !!   flo_init  : initialization of float trajectories computation
15   !!----------------------------------------------------------------------
[2528]16   USE oce             ! ocean variables
[3]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)
[3294]21   USE florst          ! float restart                    (flo_rst routine)
[3]22   USE flo4rk          ! Trajectories, Runge Kutta scheme (flo_4rk routine)
23   USE floblk          ! Trajectories, Blanke scheme      (flo_blk routine)
[9124]24   !
[2528]25   USE in_out_manager  ! I/O manager
[3294]26   USE timing          ! preformance summary
[3]27
28   IMPLICIT NONE
29   PRIVATE 
30
[1601]31   PUBLIC   flo_stp    ! routine called by step.F90
[2528]32   PUBLIC   flo_init   ! routine called by opa.F90
[1601]33
[3]34   !!----------------------------------------------------------------------
[9598]35   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
[1152]36   !! $Id$
[10068]37   !! Software governed by the CeCILL license (see ./LICENSE)
[3]38   !!----------------------------------------------------------------------
39CONTAINS
40
41   SUBROUTINE flo_stp( kt )
42      !!----------------------------------------------------------------------
43      !!                   ***  ROUTINE flo_stp  ***
44      !!                   
45      !! ** Purpose :   Compute the geographical position (lat., long., depth)
46      !!      of each float at each time step with one of the algorithm.
47      !!
48      !! ** Method  :   The position of a float is computed with Bruno Blanke
49      !!        algorithm by default and with a 4th order Runge-Kutta scheme
50      !!        if ln_flork4 =T
51      !!----------------------------------------------------------------------
52      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
53      !!----------------------------------------------------------------------
[1601]54      !
[9124]55      IF( ln_timing )   CALL timing_start('flo_stp')
[3294]56      !
[1601]57      IF( ln_flork4 ) THEN   ;   CALL flo_4rk( kt )        ! Trajectories using a 4th order Runge Kutta scheme
58      ELSE                   ;   CALL flo_blk( kt )        ! Trajectories using Blanke' algorithme
[3]59      ENDIF
[1601]60      !
[16]61      IF( lk_mpp )   CALL mppsync   ! synchronization of all the processor
[1601]62      !
[3294]63      CALL flo_wri( kt )      ! trajectories ouput
[1601]64      !
[3294]65      CALL flo_rst( kt )      ! trajectories restart
66      !
[1601]67      wb(:,:,:) = wn(:,:,:)         ! Save the old vertical velocity field
68      !
[9124]69      IF( ln_timing )   CALL timing_stop('flo_stp')
[3294]70      !
[3]71   END SUBROUTINE flo_stp
72
73
74   SUBROUTINE flo_init
75      !!----------------------------------------------------------------
76      !!                 ***  ROUTINE flo_init  ***
77      !!                   
78      !! ** Purpose :   Read the namelist of floats
79      !!----------------------------------------------------------------------
[9124]80      INTEGER ::   jfl
81      INTEGER ::   ios                 ! Local integer output status for namelist read
[3294]82      !
83      NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii
[3]84      !!---------------------------------------------------------------------
[1601]85      !
[2715]86      IF(lwp) WRITE(numout,*)
87      IF(lwp) WRITE(numout,*) 'flo_stp : call floats routine '
88      IF(lwp) WRITE(numout,*) '~~~~~~~'
89
[4147]90      REWIND( numnam_ref )              ! Namelist namflo in reference namelist : Floats
91      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901)
[9168]92901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist', lwp )
[4147]93
94      REWIND( numnam_cfg )              ! Namelist namflo in configuration namelist : Floats
95      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 )
[9168]96902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist', lwp )
[4624]97      IF(lwm) WRITE ( numond, namflo )
[1601]98      !
99      IF(lwp) THEN                  ! control print
100         WRITE(numout,*)
[3]101         WRITE(numout,*) '         Namelist floats :'
[3294]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
[3]112      ENDIF
[1601]113      !
[2715]114      !                             ! allocate floats arrays
115      IF( flo_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' )
116      !
[3294]117      !                             ! allocate flodom arrays
118      IF( flo_dom_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' )
119      !
[2715]120      !                             ! allocate flowri arrays
121      IF( flo_wri_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' )
122      !
[3294]123      !                             ! allocate florst arrays
124      IF( flo_rst_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' )
125      !
[9124]126      jpnrstflo = jpnfl-jpnnewflo   ! memory allocation
[3294]127      !
[9124]128      DO jfl = 1, jpnfl             ! vertical axe for netcdf IOM ouput
129         nfloat(jfl) = jfl 
130      END DO
131      !
[2715]132      CALL flo_dom                  ! compute/read initial position of floats
[9124]133      !
[2715]134      wb(:,:,:) = wn(:,:,:)         ! set wb for computation of floats trajectories at the first time step
135      !
[3]136   END SUBROUTINE flo_init
137
138#  else
139   !!----------------------------------------------------------------------
140   !!   Default option :                                       Empty module
141   !!----------------------------------------------------------------------
142CONTAINS
143   SUBROUTINE flo_stp( kt )          ! Empty routine
[9927]144      IMPLICIT NONE
145      INTEGER, INTENT( in ) :: kt
[16]146      WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt
[3]147   END SUBROUTINE flo_stp
[2528]148   SUBROUTINE flo_init          ! Empty routine
[9927]149      IMPLICIT NONE
[2528]150   END SUBROUTINE flo_init
[3]151#endif
152
153   !!======================================================================
154 END MODULE floats
Note: See TracBrowser for help on using the repository browser.