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 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90

    • Property svn:eol-style deleted
    r1694 r2528  
    44   !! Ocean floats :   domain 
    55   !!====================================================================== 
     6   !! History :  OPA  ! 1998-07 (Y.Drillet, CLIPPER)  Original code 
     7   !!---------------------------------------------------------------------- 
    68#if   defined key_floats   ||   defined key_esopa 
    79   !!---------------------------------------------------------------------- 
     
    1214   !!   dstnce         : compute distance between face mesh and floats  
    1315   !!---------------------------------------------------------------------- 
    14    !! * Modules used 
    1516   USE oce             ! ocean dynamics and tracers 
    1617   USE dom_oce         ! ocean space and time domain 
     
    2021 
    2122   IMPLICIT NONE 
    22  
    23    !! * Accessibility 
    24    PRIVATE  dstnce 
    25    PUBLIC flo_dom     ! routine called by floats.F90 
     23   PRIVATE 
     24 
     25   PUBLIC   flo_dom    ! routine called by floats.F90 
    2626 
    2727   !! * Substitutions 
    2828#  include "domzgr_substitute.h90" 
    2929   !!---------------------------------------------------------------------- 
    30    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     30   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    3131   !! $Id$  
    32    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    33    !!---------------------------------------------------------------------- 
    34  
     32   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     33   !!---------------------------------------------------------------------- 
    3534CONTAINS 
    3635 
     
    4241      !! 
    4342      !!  ** Method  :   We put the floats  in the domain with the latitude, 
    44       !!       the longitude (degree) and the depth (m). 
    45       !! 
     43      !!               the longitude (degree) and the depth (m). 
    4644      !!----------------------------------------------------------------------       
    47       !! * Local declarations 
    48       LOGICAL  :: llinmesh 
    49       INTEGER  :: ji, jj, jk               ! DO loop index on 3 directions 
    50       INTEGER  :: jfl, jfl1                ! number of floats    
    51       INTEGER  :: inum                     ! logical unit for file read 
    52       INTEGER, DIMENSION ( jpnfl    )  ::   & 
    53          iimfl, ijmfl, ikmfl,    &          ! index mesh of floats 
    54          idomfl,  ivtest, ihtest 
    55       REAL(wp) :: zdxab, zdyad 
    56       REAL(wp), DIMENSION ( jpnnewflo+1 )  :: zgifl, zgjfl,  zgkfl 
     45      LOGICAL  ::   llinmesh 
     46      INTEGER  ::   ji, jj, jk   ! DO loop index on 3 directions 
     47      INTEGER  ::   jfl, jfl1    ! number of floats    
     48      INTEGER  ::   inum         ! logical unit for file read 
     49      INTEGER, DIMENSION(jpnfl) ::   iimfl, ijmfl, ikmfl       ! index mesh of floats 
     50      INTEGER, DIMENSION(jpnfl) ::   idomfl,  ivtest, ihtest   !   -             - 
     51      REAL(wp) ::   zdxab, zdyad 
     52      REAL(wp), DIMENSION(jpnnewflo+1)  :: zgifl, zgjfl,  zgkfl 
    5753      !!--------------------------------------------------------------------- 
    5854       
     
    10298               ivtest(jfl) = 0 
    10399               ikmfl(jfl) = 0 
    104 # if   defined key_mpp_mpi   ||   defined key_mpp_shmem 
     100# if   defined key_mpp_mpi 
    105101               DO ji = MAX(nldi,2), nlei 
    106102                  DO jj = MAX(nldj,2), nlej   ! NO vector opt. 
     
    139135             
    140136            ! A zero in the sum of the arrays "ihtest" and "ivtest"              
    141 # if   defined key_mpp_mpi   ||   defined key_mpp_shmem 
     137# if   defined key_mpp_mpi 
    142138            CALL mpp_sum(ihtest,jpnfl) 
    143139            CALL mpp_sum(ivtest,jpnfl) 
     
    233229            ivtest(jfl) = 0 
    234230            ikmfl(jfl) = 0 
    235 # if   defined key_mpp_mpi   ||   defined key_mpp_shmem 
     231# if   defined key_mpp_mpi 
    236232            DO ji = MAX(nldi,2), nlei 
    237233               DO jj = MAX(nldj,2), nlej   ! NO vector opt. 
     
    357353      !! 
    358354      !! ** Method  :  
    359       !! 
    360       !! History : 
    361       !!   8.0  !  98-07 (Y.Drillet)  Original code 
    362355      !!---------------------------------------------------------------------- 
    363       !! * Arguments 
    364356      REAL(wp) ::   & 
    365357         pax, pay, pbx, pby,    &     ! ??? 
     
    368360         ptx, pty                     ! ??? 
    369361      LOGICAL ::  ldinmesh            ! ??? 
    370  
    371       !! * local declarations 
    372       REAL(wp) ::   & 
    373          zabt, zbct, zcdt, zdat, zabpt, zbcpt, zcdpt, zdapt,  & 
    374          psax,psay,psbx,psby,psx,psy 
    375       REAL(wp) ::  fsline                ! Statement function 
    376  
    377       !! * Substitutions 
    378       fsline(psax, psay, psbx, psby, psx, psy) = psy  * ( psbx - psax )   & 
    379                                                - psx  * ( psby - psay )   & 
    380                                                + psax *   psby - psay * psbx 
     362      !! 
     363      REAL(wp) ::   zabt, zbct, zcdt, zdat, zabpt, zbcpt, zcdpt, zdapt 
     364      !!--------------------------------------------------------------------- 
     365      !! Statement function 
     366      REAL(wp) ::   fsline 
     367      REAL(wp) ::   psax, psay, psbx, psby, psx, psy 
     368      fsline( psax, psay, psbx, psby, psx, psy ) = psy  * ( psbx - psax )   & 
     369         &                                       - psx  * ( psby - psay )   & 
     370         &                                       + psax *   psby - psay * psbx 
    381371      !!--------------------------------------------------------------------- 
    382372       
     
    411401         ldinmesh=.FALSE. 
    412402      ENDIF 
    413  
     403      ! 
    414404   END SUBROUTINE findmesh 
    415405 
     
    422412      !!                points 
    423413      !! ** Method  :  
    424       !!          
    425414      !!---------------------------------------------------------------------- 
    426       !! * Arguments 
    427415      REAL(wp), INTENT(in) ::   pla1, phi1, pla2, phi2   ! ??? 
    428  
    429       !! * Local variables 
     416      !! 
    430417      REAL(wp) ::   dly1, dly2, dlx1, dlx2, dlx, dls, dld, dpi 
    431418      REAL(wp) ::   dstnce 
    432419      !!--------------------------------------------------------------------- 
    433        
     420      ! 
    434421      dpi  = 2.* ASIN(1.) 
    435422      dls  = dpi / 180. 
     
    438425      dlx1 = pla1 * dls 
    439426      dlx2 = pla2 * dls 
    440  
     427      ! 
    441428      dlx = SIN(dly1) * SIN(dly2) + COS(dly1) * COS(dly2) * COS(dlx2-dlx1) 
    442   
     429      ! 
    443430      IF( ABS(dlx) > 1.0 ) dlx = 1.0 
    444  
     431      ! 
    445432      dld = ATAN(DSQRT( ( 1-dlx )/( 1+dlx ) )) * 222.24 / dls 
    446433      dstnce = dld * 1000. 
    447  
     434      ! 
    448435   END FUNCTION dstnce 
    449436 
Note: See TracChangeset for help on using the changeset viewer.