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.
Changeset 11573 for NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/FLO/floats.F90 – NEMO

Ignore:
Timestamp:
2019-09-19T11:18:03+02:00 (5 years ago)
Author:
jchanut
Message:

#2222, merged with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/OCE/FLO/floats.F90

    r10068 r11573  
    77   !!   NEMO     1.0  ! 2002-06  (A. Bozec)  F90, Free form and module 
    88   !!---------------------------------------------------------------------- 
    9 #if   defined   key_floats 
    10    !!---------------------------------------------------------------------- 
    11    !!   'key_floats'                                     float trajectories 
     9   !! 
    1210   !!---------------------------------------------------------------------- 
    1311   !!   flo_stp   : float trajectories computation 
     
    3028 
    3129   PUBLIC   flo_stp    ! routine called by step.F90 
    32    PUBLIC   flo_init   ! routine called by opa.F90 
     30   PUBLIC   flo_init   ! routine called by nemogcm.F90 
    3331 
    3432   !!---------------------------------------------------------------------- 
     
    8179      INTEGER ::   ios                 ! Local integer output status for namelist read 
    8280      ! 
    83       NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii 
     81      NAMELIST/namflo/ ln_floats, jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii 
    8482      !!--------------------------------------------------------------------- 
    8583      ! 
     
    9088      REWIND( numnam_ref )              ! Namelist namflo in reference namelist : Floats 
    9189      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901) 
    92 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist', lwp ) 
     90901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist' ) 
    9391 
    9492      REWIND( numnam_cfg )              ! Namelist namflo in configuration namelist : Floats 
    9593      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 ) 
    96 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist', lwp ) 
     94902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist' ) 
    9795      IF(lwm) WRITE ( numond, namflo ) 
    9896      ! 
     
    10098         WRITE(numout,*) 
    10199         WRITE(numout,*) '         Namelist 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 
     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 
    111110 
    112111      ENDIF 
    113112      ! 
    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 
     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 
    135137      ! 
    136138   END SUBROUTINE flo_init 
    137139 
    138 #  else 
    139    !!---------------------------------------------------------------------- 
    140    !!   Default option :                                       Empty module 
    141    !!---------------------------------------------------------------------- 
    142 CONTAINS 
    143    SUBROUTINE flo_stp( kt )          ! Empty routine 
    144       IMPLICIT NONE 
    145       INTEGER, INTENT( in ) :: kt 
    146       WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt 
    147    END SUBROUTINE flo_stp 
    148    SUBROUTINE flo_init          ! Empty routine 
    149       IMPLICIT NONE 
    150    END SUBROUTINE flo_init 
    151 #endif 
    152  
    153140   !!====================================================================== 
    154141 END MODULE floats 
Note: See TracChangeset for help on using the changeset viewer.