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 11822 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/FLO/floats.F90 – NEMO

Ignore:
Timestamp:
2019-10-29T11:41:36+01:00 (4 years ago)
Author:
acc
Message:

Branch 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. Sette tested updates to branch to align with trunk changes between 10721 and 11740. Sette tests are passing but results differ from branch before these changes (except for GYRE_PISCES and VORTEX) and branch results already differed from trunk because of algorithmic fixes. Will need more checks to confirm correctness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/FLO/floats.F90

    r10970 r11822  
    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   !!---------------------------------------------------------------------- 
     
    8482      INTEGER ::   ios                 ! Local integer output status for namelist read 
    8583      ! 
    86       NAMELIST/namflo/ jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii 
     84      NAMELIST/namflo/ ln_floats, jpnfl, jpnnewflo, ln_rstflo, nn_writefl, nn_stockfl, ln_argo, ln_flork4, ln_ariane, ln_flo_ascii 
    8785      !!--------------------------------------------------------------------- 
    8886      ! 
     
    9391      REWIND( numnam_ref )              ! Namelist namflo in reference namelist : Floats 
    9492      READ  ( numnam_ref, namflo, IOSTAT = ios, ERR = 901) 
    95 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist', lwp ) 
     93901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namflo in reference namelist' ) 
    9694 
    9795      REWIND( numnam_cfg )              ! Namelist namflo in configuration namelist : Floats 
    9896      READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 ) 
    99 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist', lwp ) 
     97902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namflo in configuration namelist' ) 
    10098      IF(lwm) WRITE ( numond, namflo ) 
    10199      ! 
     
    103101         WRITE(numout,*) 
    104102         WRITE(numout,*) '         Namelist floats :' 
    105          WRITE(numout,*) '            number of floats                      jpnfl        = ', jpnfl 
    106          WRITE(numout,*) '            number of new floats                  jpnflnewflo  = ', jpnnewflo 
    107          WRITE(numout,*) '            restart                               ln_rstflo    = ', ln_rstflo 
    108          WRITE(numout,*) '            frequency of float output file        nn_writefl   = ', nn_writefl 
    109          WRITE(numout,*) '            frequency of float restart file       nn_stockfl   = ', nn_stockfl 
    110          WRITE(numout,*) '            Argo type floats                      ln_argo      = ', ln_argo 
    111          WRITE(numout,*) '            Computation of T trajectories         ln_flork4    = ', ln_flork4 
    112          WRITE(numout,*) '            Use of ariane convention              ln_ariane    = ', ln_ariane 
    113          WRITE(numout,*) '            ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii 
     103         WRITE(numout,*) '            Activate floats or not                   ln_floats    = ', ln_floats 
     104         WRITE(numout,*) '               number of floats                      jpnfl        = ', jpnfl 
     105         WRITE(numout,*) '               number of new floats                  jpnflnewflo  = ', jpnnewflo 
     106         WRITE(numout,*) '               restart                               ln_rstflo    = ', ln_rstflo 
     107         WRITE(numout,*) '               frequency of float output file        nn_writefl   = ', nn_writefl 
     108         WRITE(numout,*) '               frequency of float restart file       nn_stockfl   = ', nn_stockfl 
     109         WRITE(numout,*) '               Argo type floats                      ln_argo      = ', ln_argo 
     110         WRITE(numout,*) '               Computation of T trajectories         ln_flork4    = ', ln_flork4 
     111         WRITE(numout,*) '               Use of ariane convention              ln_ariane    = ', ln_ariane 
     112         WRITE(numout,*) '               ascii output (T) or netcdf output (F) ln_flo_ascii = ', ln_flo_ascii 
    114113 
    115114      ENDIF 
    116115      ! 
    117       !                             ! allocate floats arrays 
    118       IF( flo_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' ) 
    119       ! 
    120       !                             ! allocate flodom arrays 
    121       IF( flo_dom_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' ) 
    122       ! 
    123       !                             ! allocate flowri arrays 
    124       IF( flo_wri_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' ) 
    125       ! 
    126       !                             ! allocate florst arrays 
    127       IF( flo_rst_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) 
    128       ! 
    129       jpnrstflo = jpnfl-jpnnewflo   ! memory allocation  
    130       ! 
    131       DO jfl = 1, jpnfl             ! vertical axe for netcdf IOM ouput 
    132          nfloat(jfl) = jfl  
    133       END DO 
    134       ! 
    135       CALL flo_dom( Kmm )           ! compute/read initial position of floats 
    136       ! 
    137       wb(:,:,:) = ww(:,:,:)         ! set wb for computation of floats trajectories at the first time step 
    138       ! 
     116      IF( ln_floats ) THEN 
     117         !                             ! allocate floats arrays 
     118         IF( flo_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_init : unable to allocate arrays' ) 
     119         ! 
     120         !                             ! allocate flodom arrays 
     121         IF( flo_dom_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_dom : unable to allocate arrays' ) 
     122         ! 
     123         !                             ! allocate flowri arrays 
     124         IF( flo_wri_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_wri : unable to allocate arrays' ) 
     125         ! 
     126         !                             ! allocate florst arrays 
     127         IF( flo_rst_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'flo_rst : unable to allocate arrays' ) 
     128         ! 
     129         jpnrstflo = jpnfl-jpnnewflo   ! memory allocation  
     130         ! 
     131         DO jfl = 1, jpnfl             ! vertical axe for netcdf IOM ouput 
     132            nfloat(jfl) = jfl  
     133         END DO 
     134         ! 
     135         CALL flo_dom( Kmm )           ! compute/read initial position of floats 
     136         ! 
     137         wb(:,:,:) = ww(:,:,:)         ! set wb for computation of floats trajectories at the first time step 
     138         ! 
     139      ENDIF 
    139140   END SUBROUTINE flo_init 
    140  
    141 #  else 
    142    !!---------------------------------------------------------------------- 
    143    !!   Default option :                                       Empty module 
    144    !!---------------------------------------------------------------------- 
    145 CONTAINS 
    146    SUBROUTINE flo_stp( kt, Kbb, Kmm )  ! Empty routine 
    147       IMPLICIT NONE 
    148       INTEGER, INTENT( in ) :: kt 
    149       INTEGER, INTENT( in ) :: Kbb, Kmm 
    150       WRITE(*,*) 'flo_stp: You should not have seen this print! error?', kt 
    151    END SUBROUTINE flo_stp 
    152    SUBROUTINE flo_init( Kmm )          ! Empty routine 
    153       IMPLICIT NONE 
    154       INTEGER, INTENT( in ) :: Kmm 
    155    END SUBROUTINE flo_init 
    156 #endif 
    157141 
    158142   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.