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 7351 for branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/BDY/bdylib.F90 – NEMO

Ignore:
Timestamp:
2016-11-28T17:04:10+01:00 (7 years ago)
Author:
emanuelaclementi
Message:

ticket #1805 step 3: /2016/dev_INGV_UKMO_2016 aligned to the trunk at revision 7161

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/BDY/bdylib.F90

    r5215 r7351  
    44   !! Unstructured Open Boundary Cond. :  Library module of generic boundary algorithms. 
    55   !!====================================================================== 
    6    !! History :  3.6  !  2013     (D. Storkey) new module 
     6   !! History :  3.6  !  2013     (D. Storkey) original code 
    77   !!---------------------------------------------------------------------- 
    88#if defined key_bdy  
     
    1313   !!   bdy_orlanski_3d 
    1414   !!---------------------------------------------------------------------- 
    15    USE timing          ! Timing 
    16    USE oce             ! ocean dynamics and tracers  
    17    USE dom_oce         ! ocean space and time domain 
    18    USE bdy_oce         ! ocean open boundary conditions 
    19    USE phycst          ! physical constants 
    20    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    21    USE in_out_manager  ! 
     15   USE oce            ! ocean dynamics and tracers  
     16   USE dom_oce        ! ocean space and time domain 
     17   USE bdy_oce        ! ocean open boundary conditions 
     18   USE phycst         ! physical constants 
     19   ! 
     20   USE in_out_manager ! 
     21   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
     22   USE timing         ! Timing 
    2223 
    2324   IMPLICIT NONE 
     
    4546      !! References:  Marchesiello, McWilliams and Shchepetkin, Ocean Modelling vol. 3 (2001)     
    4647      !!---------------------------------------------------------------------- 
    47       TYPE(OBC_INDEX),            INTENT(in)    ::   idx      ! BDY indices 
    48       INTEGER,                    INTENT(in)    ::   igrd     ! grid index 
    49       REAL(wp), DIMENSION(:,:),   INTENT(in)    ::   phib     ! model before 2D field 
    50       REAL(wp), DIMENSION(:,:),   INTENT(inout) ::   phia     ! model after 2D field (to be updated) 
    51       REAL(wp), DIMENSION(:),     INTENT(in)    ::   phi_ext  ! external forcing data 
    52       LOGICAL,                    INTENT(in)    ::   ll_npo   ! switch for NPO version 
    53  
     48      TYPE(OBC_INDEX),          INTENT(in   ) ::   idx      ! BDY indices 
     49      INTEGER ,                 INTENT(in   ) ::   igrd     ! grid index 
     50      REAL(wp), DIMENSION(:,:), INTENT(in   ) ::   phib     ! model before 2D field 
     51      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   phia     ! model after 2D field (to be updated) 
     52      REAL(wp), DIMENSION(:)  , INTENT(in   ) ::   phi_ext  ! external forcing data 
     53      LOGICAL ,                 INTENT(in   ) ::   ll_npo   ! switch for NPO version 
     54      ! 
    5455      INTEGER  ::   jb                                     ! dummy loop indices 
    5556      INTEGER  ::   ii, ij, iibm1, iibm2, ijbm1, ijbm2     ! 2D addresses 
     
    7071      REAL(wp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
    7172      !!---------------------------------------------------------------------- 
    72  
    73       IF( nn_timing == 1 ) CALL timing_start('bdy_orlanski_2d') 
    74  
     73      ! 
     74      IF( nn_timing == 1 )   CALL timing_start('bdy_orlanski_2d') 
     75      ! 
    7576      ! ----------------------------------! 
    7677      ! Orlanski boundary conditions     :! 
     
    7980      SELECT CASE(igrd) 
    8081         CASE(1) 
    81             pmask => tmask(:,:,1) 
     82            pmask      => tmask(:,:,1) 
    8283            pmask_xdif => umask(:,:,1) 
    8384            pmask_ydif => vmask(:,:,1) 
    84             pe_xdif => e1u(:,:) 
    85             pe_ydif => e2v(:,:) 
     85            pe_xdif    => e1u(:,:) 
     86            pe_ydif    => e2v(:,:) 
    8687            ii_offset = 0 
    8788            ij_offset = 0 
    8889         CASE(2) 
    89             pmask => umask(:,:,1) 
     90            pmask      => umask(:,:,1) 
    9091            pmask_xdif => tmask(:,:,1) 
    9192            pmask_ydif => fmask(:,:,1) 
    92             pe_xdif => e1t(:,:) 
    93             pe_ydif => e2f(:,:) 
     93            pe_xdif    => e1t(:,:) 
     94            pe_ydif    => e2f(:,:) 
    9495            ii_offset = 1 
    9596            ij_offset = 0 
    9697         CASE(3) 
    97             pmask => vmask(:,:,1) 
     98            pmask      => vmask(:,:,1) 
    9899            pmask_xdif => fmask(:,:,1) 
    99100            pmask_ydif => tmask(:,:,1) 
    100             pe_xdif => e1f(:,:) 
    101             pe_ydif => e2t(:,:) 
     101            pe_xdif    => e1f(:,:) 
     102            pe_ydif    => e2t(:,:) 
    102103            ii_offset = 0 
    103104            ij_offset = 1 
     
    188189      END DO 
    189190      ! 
    190       IF( nn_timing == 1 ) CALL timing_stop('bdy_orlanski_2d') 
    191  
     191      IF( nn_timing == 1 )   CALL timing_stop('bdy_orlanski_2d') 
     192      ! 
    192193   END SUBROUTINE bdy_orlanski_2d 
    193194 
     
    204205      !! References:  Marchesiello, McWilliams and Shchepetkin, Ocean Modelling vol. 3 (2001)     
    205206      !!---------------------------------------------------------------------- 
    206       TYPE(OBC_INDEX),            INTENT(in)    ::   idx      ! BDY indices 
    207       INTEGER,                    INTENT(in)    ::   igrd     ! grid index 
    208       REAL(wp), DIMENSION(:,:,:), INTENT(in)    ::   phib     ! model before 3D field 
    209       REAL(wp), DIMENSION(:,:,:), INTENT(inout)  ::   phia     ! model after 3D field (to be updated) 
    210       REAL(wp), DIMENSION(:,:),   INTENT(in)    ::   phi_ext  ! external forcing data 
    211       LOGICAL,                    INTENT(in)    ::   ll_npo   ! switch for NPO version 
    212  
     207      TYPE(OBC_INDEX),            INTENT(in   ) ::   idx      ! BDY indices 
     208      INTEGER ,                   INTENT(in   ) ::   igrd     ! grid index 
     209      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   phib     ! model before 3D field 
     210      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   phia     ! model after 3D field (to be updated) 
     211      REAL(wp), DIMENSION(:,:)  , INTENT(in   ) ::   phi_ext  ! external forcing data 
     212      LOGICAL ,                   INTENT(in   ) ::   ll_npo   ! switch for NPO version 
     213      ! 
    213214      INTEGER  ::   jb, jk                                 ! dummy loop indices 
    214215      INTEGER  ::   ii, ij, iibm1, iibm2, ijbm1, ijbm2     ! 2D addresses 
     
    229230      REAL(wp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
    230231      !!---------------------------------------------------------------------- 
    231  
    232       IF( nn_timing == 1 ) CALL timing_start('bdy_orlanski_3d') 
    233  
     232      ! 
     233      IF( nn_timing == 1 )   CALL timing_start('bdy_orlanski_3d') 
     234      ! 
    234235      ! ----------------------------------! 
    235236      ! Orlanski boundary conditions     :! 
    236237      ! ----------------------------------!  
    237       
     238      ! 
    238239      SELECT CASE(igrd) 
    239240         CASE(1) 
    240             pmask => tmask(:,:,:) 
     241            pmask      => tmask(:,:,:) 
    241242            pmask_xdif => umask(:,:,:) 
    242243            pmask_ydif => vmask(:,:,:) 
    243             pe_xdif => e1u(:,:) 
    244             pe_ydif => e2v(:,:) 
     244            pe_xdif    => e1u(:,:) 
     245            pe_ydif    => e2v(:,:) 
    245246            ii_offset = 0 
    246247            ij_offset = 0 
    247248         CASE(2) 
    248             pmask => umask(:,:,:) 
     249            pmask      => umask(:,:,:) 
    249250            pmask_xdif => tmask(:,:,:) 
    250251            pmask_ydif => fmask(:,:,:) 
    251             pe_xdif => e1t(:,:) 
    252             pe_ydif => e2f(:,:) 
     252            pe_xdif    => e1t(:,:) 
     253            pe_ydif    => e2f(:,:) 
    253254            ii_offset = 1 
    254255            ij_offset = 0 
    255256         CASE(3) 
    256             pmask => vmask(:,:,:) 
     257            pmask      => vmask(:,:,:) 
    257258            pmask_xdif => fmask(:,:,:) 
    258259            pmask_ydif => tmask(:,:,:) 
    259             pe_xdif => e1f(:,:) 
    260             pe_ydif => e2t(:,:) 
     260            pe_xdif    => e1f(:,:) 
     261            pe_ydif    => e2t(:,:) 
    261262            ii_offset = 0 
    262263            ij_offset = 1 
     
    349350         ! 
    350351      END DO 
    351  
    352       IF( nn_timing == 1 ) CALL timing_stop('bdy_orlanski_3d') 
    353  
     352      ! 
     353      IF( nn_timing == 1 )   CALL timing_stop('bdy_orlanski_3d') 
     354      ! 
    354355   END SUBROUTINE bdy_orlanski_3d 
    355356 
Note: See TracChangeset for help on using the changeset viewer.