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 5901 for branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/BDY – NEMO

Ignore:
Timestamp:
2015-11-20T09:39:06+01:00 (8 years ago)
Author:
jamesharle
Message:

merging branch with head of the trunk

Location:
branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/BDY
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90

    r5620 r5901  
    88   !!            3.3  !  2010-09  (D. Storkey) add ice boundary conditions 
    99   !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge 
    10    !!            3.6  !  2012-01  (C. Rousset) add ice boundary conditions for lim3 
     10   !!            3.6  !  2014-01  (C. Rousset) add ice boundary conditions for lim3 
    1111   !!---------------------------------------------------------------------- 
    1212#if defined key_bdy  
     
    2222 
    2323   TYPE, PUBLIC ::   OBC_INDEX    !: Indices and weights which define the open boundary 
    24       INTEGER,          DIMENSION(jpbgrd) ::  nblen 
    25       INTEGER,          DIMENSION(jpbgrd) ::  nblenrim 
    26       INTEGER, POINTER, DIMENSION(:,:)   ::  nbi 
    27       INTEGER, POINTER, DIMENSION(:,:)   ::  nbj 
    28       INTEGER, POINTER, DIMENSION(:,:)   ::  nbr 
    29       INTEGER, POINTER, DIMENSION(:,:)   ::  nbmap 
    30       REAL(wp)   , POINTER, DIMENSION(:,:)   ::  nbw 
    31       REAL(wp)   , POINTER, DIMENSION(:,:)   ::  nbd 
    32       REAL(wp)   , POINTER, DIMENSION(:,:)   ::  nbdout 
    33       REAL(wp)   , POINTER, DIMENSION(:,:)   ::  flagu 
    34       REAL(wp)   , POINTER, DIMENSION(:,:)   ::  flagv 
     24      INTEGER ,          DIMENSION(jpbgrd) ::  nblen 
     25      INTEGER ,          DIMENSION(jpbgrd) ::  nblenrim 
     26      INTEGER , POINTER, DIMENSION(:,:)    ::  nbi 
     27      INTEGER , POINTER, DIMENSION(:,:)    ::  nbj 
     28      INTEGER , POINTER, DIMENSION(:,:)    ::  nbr 
     29      INTEGER , POINTER, DIMENSION(:,:)    ::  nbmap 
     30      REAL(wp), POINTER, DIMENSION(:,:)    ::  nbw 
     31      REAL(wp), POINTER, DIMENSION(:,:)    ::  nbd 
     32      REAL(wp), POINTER, DIMENSION(:,:)    ::  nbdout 
     33      REAL(wp), POINTER, DIMENSION(:,:)    ::  flagu 
     34      REAL(wp), POINTER, DIMENSION(:,:)    ::  flagv 
    3535   END TYPE OBC_INDEX 
    3636 
     
    4141 
    4242   TYPE, PUBLIC ::   OBC_DATA     !: Storage for external data 
    43       INTEGER,       DIMENSION(2)     ::  nread 
    44       LOGICAL                         ::  ll_ssh 
    45       LOGICAL                         ::  ll_u2d 
    46       LOGICAL                         ::  ll_v2d 
    47       LOGICAL                         ::  ll_u3d 
    48       LOGICAL                         ::  ll_v3d 
    49       LOGICAL                         ::  ll_tem 
    50       LOGICAL                         ::  ll_sal 
    51       LOGICAL                         ::  ll_fvl 
    52       REAL(wp), POINTER, DIMENSION(:)     ::  ssh 
    53       REAL(wp), POINTER, DIMENSION(:)     ::  u2d 
    54       REAL(wp), POINTER, DIMENSION(:)     ::  v2d 
    55       REAL(wp), POINTER, DIMENSION(:,:)   ::  u3d 
    56       REAL(wp), POINTER, DIMENSION(:,:)   ::  v3d 
    57       REAL(wp), POINTER, DIMENSION(:,:)   ::  tem 
    58       REAL(wp), POINTER, DIMENSION(:,:)   ::  sal 
     43      INTEGER          , DIMENSION(2)   ::  nread 
     44      LOGICAL                           ::  ll_ssh 
     45      LOGICAL                           ::  ll_u2d 
     46      LOGICAL                           ::  ll_v2d 
     47      LOGICAL                           ::  ll_u3d 
     48      LOGICAL                           ::  ll_v3d 
     49      LOGICAL                           ::  ll_tem 
     50      LOGICAL                           ::  ll_sal 
     51      LOGICAL                           ::  ll_fvl 
     52      REAL(wp), POINTER, DIMENSION(:)   ::  ssh 
     53      REAL(wp), POINTER, DIMENSION(:)   ::  u2d 
     54      REAL(wp), POINTER, DIMENSION(:)   ::  v2d 
     55      REAL(wp), POINTER, DIMENSION(:,:) ::  u3d 
     56      REAL(wp), POINTER, DIMENSION(:,:) ::  v3d 
     57      REAL(wp), POINTER, DIMENSION(:,:) ::  tem 
     58      REAL(wp), POINTER, DIMENSION(:,:) ::  sal 
    5959#if defined key_lim2 
    60       LOGICAL                         ::  ll_frld 
    61       LOGICAL                         ::  ll_hicif 
    62       LOGICAL                         ::  ll_hsnif 
    63       REAL(wp), POINTER, DIMENSION(:)     ::  frld 
    64       REAL(wp), POINTER, DIMENSION(:)     ::  hicif 
    65       REAL(wp), POINTER, DIMENSION(:)     ::  hsnif 
     60      LOGICAL                           ::   ll_frld 
     61      LOGICAL                           ::   ll_hicif 
     62      LOGICAL                           ::   ll_hsnif 
     63      REAL(wp), POINTER, DIMENSION(:)   ::   frld 
     64      REAL(wp), POINTER, DIMENSION(:)   ::   hicif 
     65      REAL(wp), POINTER, DIMENSION(:)   ::   hsnif 
    6666#elif defined key_lim3 
    67       LOGICAL                         ::  ll_a_i 
    68       LOGICAL                         ::  ll_ht_i 
    69       LOGICAL                         ::  ll_ht_s 
    70       REAL, POINTER, DIMENSION(:,:)   ::  a_i   !: now ice leads fraction climatology 
    71       REAL, POINTER, DIMENSION(:,:)   ::  ht_i  !: Now ice  thickness climatology 
    72       REAL, POINTER, DIMENSION(:,:)   ::  ht_s  !: now snow thickness 
     67      LOGICAL                           ::   ll_a_i 
     68      LOGICAL                           ::   ll_ht_i 
     69      LOGICAL                           ::   ll_ht_s 
     70      REAL(wp), POINTER, DIMENSION(:,:) ::   a_i    !: now ice leads fraction climatology 
     71      REAL(wp), POINTER, DIMENSION(:,:) ::   ht_i   !: Now ice  thickness climatology 
     72      REAL(wp), POINTER, DIMENSION(:,:) ::   ht_s   !: now snow thickness 
    7373#endif 
    7474   END TYPE OBC_DATA 
     
    8686   ! 
    8787   INTEGER                    ::   nb_bdy                   !: number of open boundary sets 
    88    INTEGER                    ::   nb_jpk_bdy               ! Number of levels in the bdy data (set < 0 if consistent with planned run) 
     88   INTEGER,                   ::   nb_jpk_bdy               !: number of levels in the bdy data (set < 0 if consistent with planned run) 
    8989   INTEGER, DIMENSION(jp_bdy) ::   nn_rimwidth              !: boundary rim width for Flow Relaxation Scheme 
    9090   INTEGER                    ::   nn_volctl                !: = 0 the total volume will have the variability of the surface Flux E-P  
     
    101101   INTEGER, DIMENSION(jp_bdy)           ::   nn_tra_dta     !: = 0 use the initial state as bdy dta ;  
    102102                                                            !: = 1 read it in a NetCDF file 
    103    LOGICAL, DIMENSION(jp_bdy) ::   ln_tra_dmp               !: =T Tracer damping 
    104    LOGICAL, DIMENSION(jp_bdy) ::   ln_dyn3d_dmp             !: =T Baroclinic velocity damping 
    105    REAL(wp),    DIMENSION(jp_bdy) ::   rn_time_dmp              !: Damping time scale in days 
    106    REAL(wp),    DIMENSION(jp_bdy) ::   rn_time_dmp_out          !: Damping time scale in days at radiation outflow points 
     103   LOGICAL , DIMENSION(jp_bdy) ::   ln_tra_dmp              !: =T Tracer damping 
     104   LOGICAL , DIMENSION(jp_bdy) ::   ln_dyn3d_dmp            !: =T Baroclinic velocity damping 
     105   REAL(wp), DIMENSION(jp_bdy) ::   rn_time_dmp             !: Damping time scale in days 
     106   REAL(wp), DIMENSION(jp_bdy) ::   rn_time_dmp_out         !: Damping time scale in days at radiation outflow points 
    107107 
    108108   CHARACTER(len=20), DIMENSION(jp_bdy) ::   cn_ice_lim       ! Choice of boundary condition for sea ice variables  
    109    INTEGER, DIMENSION(jp_bdy)           ::   nn_ice_lim_dta   !: = 0 use the initial state as bdy dta ;  
     109   INTEGER , DIMENSION(jp_bdy)          ::   nn_ice_lim_dta   !: = 0 use the initial state as bdy dta ;  
    110110                                                              !: = 1 read it in a NetCDF file 
    111    REAL(wp),    DIMENSION(jp_bdy) ::   rn_ice_tem             !: choice of the temperature of incoming sea ice 
    112    REAL(wp),    DIMENSION(jp_bdy) ::   rn_ice_sal             !: choice of the salinity    of incoming sea ice 
    113    REAL(wp),    DIMENSION(jp_bdy) ::   rn_ice_age             !: choice of the age         of incoming sea ice 
     111   REAL(wp), DIMENSION(jp_bdy) ::   rn_ice_tem              !: choice of the temperature of incoming sea ice 
     112   REAL(wp), DIMENSION(jp_bdy) ::   rn_ice_sal              !: choice of the salinity    of incoming sea ice 
     113   REAL(wp), DIMENSION(jp_bdy) ::   rn_ice_age              !: choice of the age         of incoming sea ice 
    114114   ! 
    115115    
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim.F90

    r5620 r5901  
    5959      !! 
    6060      !!---------------------------------------------------------------------- 
    61       INTEGER, INTENT( in ) :: kt     ! Main time step counter 
    62       INTEGER               :: ib_bdy ! Loop index 
    63  
     61      INTEGER, INTENT( in ) ::   kt   ! Main time step counter 
     62      ! 
     63      INTEGER ::   ib_bdy   ! Loop index 
     64      !!---------------------------------------------------------------------- 
     65      ! 
    6466#if defined key_lim3 
    6567      CALL lim_var_glo2eqv 
    6668#endif 
    67  
     69      ! 
    6870      DO ib_bdy=1, nb_bdy 
    69  
     71         ! 
    7072         SELECT CASE( cn_ice_lim(ib_bdy) ) 
    7173         CASE('none') 
     
    7678            CALL ctl_stop( 'bdy_ice_lim : unrecognised option for open boundaries for ice fields' ) 
    7779         END SELECT 
    78  
     80         ! 
    7981      END DO 
    80  
     82      ! 
    8183#if defined key_lim3 
    8284      CALL lim_var_zapsmall 
    8385      CALL lim_var_agg(1) 
    8486#endif 
    85  
     87      ! 
    8688   END SUBROUTINE bdy_ice_lim 
     89 
    8790 
    8891   SUBROUTINE bdy_ice_frs( idx, dta, kt, ib_bdy ) 
     
    9699      !!             dimensional baroclinic ocean model with realistic topography. Tellus, 365-382. 
    97100      !!------------------------------------------------------------------------------ 
    98       TYPE(OBC_INDEX), INTENT(in) ::   idx  ! OBC indices 
    99       TYPE(OBC_DATA),  INTENT(in) ::   dta  ! OBC external data 
    100       INTEGER,         INTENT(in) ::   kt   ! main time-step counter 
     101      TYPE(OBC_INDEX), INTENT(in) ::   idx     ! OBC indices 
     102      TYPE(OBC_DATA),  INTENT(in) ::   dta     ! OBC external data 
     103      INTEGER,         INTENT(in) ::   kt      ! main time-step counter 
    101104      INTEGER,         INTENT(in) ::   ib_bdy  ! BDY set index 
    102  
     105      ! 
    103106      INTEGER  ::   jpbound            ! 0 = incoming ice 
    104                                        ! 1 = outgoing ice 
     107      !                                ! 1 = outgoing ice 
    105108      INTEGER  ::   jb, jk, jgrd, jl   ! dummy loop indices 
    106109      INTEGER  ::   ji, jj, ii, ij     ! local scalar 
    107110      REAL(wp) ::   zwgt, zwgt1        ! local scalar 
    108111      REAL(wp) ::   ztmelts, zdh 
    109  
    110       !!------------------------------------------------------------------------------ 
    111       ! 
    112       IF( nn_timing == 1 ) CALL timing_start('bdy_ice_frs') 
     112#if  defined key_lim2 && ! defined key_lim2_vp && defined key_agrif 
     113     USE ice_2, vt_s => hsnm 
     114     USE ice_2, vt_i => hicm 
     115#endif 
     116      !!------------------------------------------------------------------------------ 
     117      ! 
     118      IF( nn_timing == 1 )   CALL timing_start('bdy_ice_frs') 
    113119      ! 
    114120      jgrd = 1      ! Everything is at T-points here 
     
    177183            ! condition on ice thickness depends on the ice velocity 
    178184            ! if velocity is outward (strictly), then ice thickness, volume... must be equal to adjacent values 
    179             jpbound = 0; ii = ji; ij = jj; 
    180  
     185            jpbound = 0   ;   ii = ji   ;   ij = jj 
     186            ! 
    181187            IF( u_ice(ji+1,jj  ) < 0. .AND. umask(ji-1,jj  ,1) == 0. ) jpbound = 1; ii = ji+1; ij = jj 
    182188            IF( u_ice(ji-1,jj  ) > 0. .AND. umask(ji+1,jj  ,1) == 0. ) jpbound = 1; ii = ji-1; ij = jj 
    183189            IF( v_ice(ji  ,jj+1) < 0. .AND. vmask(ji  ,jj-1,1) == 0. ) jpbound = 1; ii = ji  ; ij = jj+1 
    184190            IF( v_ice(ji  ,jj-1) > 0. .AND. vmask(ji  ,jj+1,1) == 0. ) jpbound = 1; ii = ji  ; ij = jj-1 
    185  
     191            ! 
    186192            IF( nn_ice_lim_dta(ib_bdy) == 0 ) jpbound = 0; ii = ji; ij = jj   ! case ice boundaries = initial conditions 
    187                                                                               !      do not make state variables dependent on velocity 
    188                 
    189  
     193            !                                                                 !      do not make state variables dependent on velocity 
     194            ! 
    190195            rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ii,ij) - 0.01 ) ) ! 0 if no ice 
    191  
     196            ! 
    192197            ! concentration and thickness 
    193198            a_i (ji,jj,jl) = a_i (ii,ij,jl) * rswitch 
    194199            ht_i(ji,jj,jl) = ht_i(ii,ij,jl) * rswitch 
    195200            ht_s(ji,jj,jl) = ht_s(ii,ij,jl) * rswitch 
    196  
     201            ! 
    197202            ! Ice and snow volumes 
    198203            v_i(ji,jj,jl) = ht_i(ji,jj,jl) * a_i(ji,jj,jl) 
    199204            v_s(ji,jj,jl) = ht_s(ji,jj,jl) * a_i(ji,jj,jl) 
    200  
     205            ! 
    201206            SELECT CASE( jpbound ) 
    202  
    203             CASE( 0 ) ! velocity is inward 
    204  
     207            ! 
     208            CASE( 0 )   ! velocity is inward 
     209               ! 
    205210               ! Ice salinity, age, temperature 
    206211               sm_i(ji,jj,jl)   = rswitch * rn_ice_sal(ib_bdy)  + ( 1.0 - rswitch ) * rn_simin 
     
    214219                  s_i(ji,jj,jk,jl) = rswitch * rn_ice_sal(ib_bdy) + ( 1.0 - rswitch ) * rn_simin 
    215220               END DO 
    216                 
    217             CASE( 1 ) ! velocity is outward 
    218   
     221               ! 
     222            CASE( 1 )   ! velocity is outward 
     223               ! 
    219224               ! Ice salinity, age, temperature 
    220225               sm_i(ji,jj,jl)   = rswitch * sm_i(ii,ij,jl)  + ( 1.0 - rswitch ) * rn_simin 
     
    228233                  s_i(ji,jj,jk,jl) = rswitch * s_i(ii,ij,jk,jl) + ( 1.0 - rswitch ) * rn_simin 
    229234               END DO 
    230  
     235               ! 
    231236            END SELECT 
    232  
    233             ! if salinity is constant, then overwrite rn_ice_sal 
    234             IF( nn_icesal == 1 ) THEN 
    235                sm_i(ji,jj,jl)   = rn_icesal 
     237            ! 
     238            IF( nn_icesal == 1 ) THEN     ! constant salinity : overwrite rn_ice_sal 
     239               sm_i(ji,jj  ,jl) = rn_icesal 
    236240               s_i (ji,jj,:,jl) = rn_icesal 
    237241            ENDIF 
    238  
     242            ! 
    239243            ! contents 
    240244            smv_i(ji,jj,jl)  = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) 
     
    255259               e_i(ji,jj,jk,jl) = e_i(ji,jj,jk,jl) * a_i(ji,jj,jl) * ht_i(ji,jj,jl) * r1_nlay_i 
    256260            END DO 
    257  
     261            ! 
    258262         END DO 
    259   
     263         ! 
    260264         CALL lbc_bdy_lnk(  a_i(:,:,jl), 'T', 1., ib_bdy ) 
    261265         CALL lbc_bdy_lnk( ht_i(:,:,jl), 'T', 1., ib_bdy ) 
     
    263267         CALL lbc_bdy_lnk(  v_i(:,:,jl), 'T', 1., ib_bdy ) 
    264268         CALL lbc_bdy_lnk(  v_s(:,:,jl), 'T', 1., ib_bdy ) 
    265   
     269         ! 
    266270         CALL lbc_bdy_lnk( smv_i(:,:,jl), 'T', 1., ib_bdy ) 
    267271         CALL lbc_bdy_lnk(  sm_i(:,:,jl), 'T', 1., ib_bdy ) 
     
    276280            CALL lbc_bdy_lnk(e_i(:,:,jk,jl), 'T', 1., ib_bdy ) 
    277281         END DO 
    278  
     282         ! 
    279283      END DO !jl 
    280      
     284      ! 
    281285#endif 
    282286      !       
    283       IF( nn_timing == 1 ) CALL timing_stop('bdy_ice_frs') 
     287      IF( nn_timing == 1 )   CALL timing_stop('bdy_ice_frs') 
    284288      ! 
    285289   END SUBROUTINE bdy_ice_frs 
     
    296300      !! 2013-06 : C. Rousset 
    297301      !!------------------------------------------------------------------------------ 
    298       !! 
    299302      CHARACTER(len=1), INTENT(in)  ::   cd_type   ! nature of velocity grid-points 
     303      ! 
    300304      INTEGER  ::   jb, jgrd           ! dummy loop indices 
    301305      INTEGER  ::   ji, jj             ! local scalar 
    302306      INTEGER  ::   ib_bdy             ! Loop index 
    303307      REAL(wp) ::   zmsk1, zmsk2, zflag 
    304      !!------------------------------------------------------------------------------ 
     308      !!------------------------------------------------------------------------------ 
    305309      ! 
    306310      IF( nn_timing == 1 ) CALL timing_start('bdy_ice_lim_dyn') 
     
    309313         ! 
    310314         SELECT CASE( cn_ice_lim(ib_bdy) ) 
    311  
     315         ! 
    312316         CASE('none') 
    313  
    314317            CYCLE 
    315              
     318            ! 
    316319         CASE('frs') 
    317              
     320            ! 
    318321            IF( nn_ice_lim_dta(ib_bdy) == 0 ) CYCLE            ! case ice boundaries = initial conditions  
    319                                                                !      do not change ice velocity (it is only computed by rheology) 
    320   
     322            !                                                  !      do not change ice velocity (it is only computed by rheology) 
    321323            SELECT CASE ( cd_type ) 
    322                 
    323             CASE ( 'U' ) 
    324                 
     324            !      
     325            CASE ( 'U' )   
    325326               jgrd = 2      ! u velocity 
    326327               DO jb = 1, idx_bdy(ib_bdy)%nblen(jgrd) 
     
    328329                  jj    = idx_bdy(ib_bdy)%nbj(jb,jgrd) 
    329330                  zflag = idx_bdy(ib_bdy)%flagu(jb,jgrd) 
    330                    
     331                  ! 
    331332                  IF ( ABS( zflag ) == 1. ) THEN  ! eastern and western boundaries 
    332333                     ! one of the two zmsk is always 0 (because of zflag) 
    333334                     zmsk1 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji+1,jj) ) ) ! 0 if no ice 
    334335                     zmsk2 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji-1,jj) ) ) ! 0 if no ice 
    335                       
     336                      
    336337                     ! u_ice = u_ice of the adjacent grid point except if this grid point is ice-free (then u_ice = u_oce) 
    337338                     u_ice (ji,jj) = u_ice(ji+1,jj) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & 
     
    345346                  rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj) - 0.01_wp ) ) ! 0 if no ice 
    346347                  u_ice(ji,jj) = rswitch * u_ice(ji,jj) 
    347                    
    348                ENDDO 
    349                 
     348                  ! 
     349               END DO 
    350350               CALL lbc_bdy_lnk( u_ice(:,:), 'U', -1., ib_bdy ) 
    351                 
     351               ! 
    352352            CASE ( 'V' ) 
    353                 
    354353               jgrd = 3      ! v velocity 
    355354               DO jb = 1, idx_bdy(ib_bdy)%nblen(jgrd) 
     
    357356                  jj    = idx_bdy(ib_bdy)%nbj(jb,jgrd) 
    358357                  zflag = idx_bdy(ib_bdy)%flagv(jb,jgrd) 
    359                    
     358                  ! 
    360359                  IF ( ABS( zflag ) == 1. ) THEN  ! northern and southern boundaries 
    361360                     ! one of the two zmsk is always 0 (because of zflag) 
    362361                     zmsk1 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji,jj+1) ) ) ! 0 if no ice 
    363362                     zmsk2 = 1._wp - MAX( 0.0_wp, SIGN ( 1.0_wp , - vt_i(ji,jj-1) ) ) ! 0 if no ice 
    364                       
     363                      
    365364                     ! u_ice = u_ice of the adjacent grid point except if this grid point is ice-free (then u_ice = u_oce) 
    366365                     v_ice (ji,jj) = v_ice(ji,jj+1) * 0.5_wp * ABS( zflag + 1._wp ) * zmsk1 + & 
     
    374373                  rswitch = MAX( 0.0_wp , SIGN ( 1.0_wp , at_i(ji,jj) - 0.01 ) ) ! 0 if no ice 
    375374                  v_ice(ji,jj) = rswitch * v_ice(ji,jj) 
    376                    
    377                ENDDO 
    378                 
     375                  ! 
     376               END DO 
    379377               CALL lbc_bdy_lnk( v_ice(:,:), 'V', -1., ib_bdy ) 
    380                    
     378               ! 
    381379            END SELECT 
    382              
     380            ! 
    383381         CASE DEFAULT 
    384382            CALL ctl_stop( 'bdy_ice_lim_dyn : unrecognised option for open boundaries for ice fields' ) 
    385383         END SELECT 
    386           
    387       ENDDO 
    388  
     384         ! 
     385      END DO 
     386      ! 
    389387      IF( nn_timing == 1 ) CALL timing_stop('bdy_ice_lim_dyn') 
    390        
     388      ! 
    391389    END SUBROUTINE bdy_ice_lim_dyn 
    392390 
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90

    r5626 r5901  
    7676      INTEGER  ::   ib_bdy, ii, ij, ik, igrd, ib, ir, iseg ! dummy loop indices 
    7777      INTEGER  ::   icount, icountr, ibr_max, ilen1, ibm1  ! local integers 
    78       INTEGER  ::   iw, ie, is, in, inum, id_dummy         !   -       - 
     78      INTEGER  ::   iwe, ies, iso, ino, inum, id_dummy     !   -       - 
    7979      INTEGER  ::   igrd_start, igrd_end, jpbdta           !   -       - 
    8080      INTEGER  ::   jpbdtau, jpbdtas                       !   -       - 
     
    801801!      is = mjg(1) + 1            ! if monotasking and no zoom, is=2 
    802802!      in = mjg(1) + nlcj-1 - 1   ! if monotasking and no zoom, in=jpjm1       
    803       iw = mig(1) - jpizoom + 2         ! if monotasking and no zoom, iw=2 
    804       ie = mig(1) + nlci - jpizoom - 1  ! if monotasking and no zoom, ie=jpim1 
    805       is = mjg(1) - jpjzoom + 2         ! if monotasking and no zoom, is=2 
    806       in = mjg(1) + nlcj - jpjzoom - 1  ! if monotasking and no zoom, in=jpjm1 
     803      iwe = mig(1) - jpizoom + 2         ! if monotasking and no zoom, iw=2 
     804      ies = mig(1) + nlci - jpizoom - 1  ! if monotasking and no zoom, ie=jpim1 
     805      iso = mjg(1) - jpjzoom + 2         ! if monotasking and no zoom, is=2 
     806      ino = mjg(1) + nlcj - jpjzoom - 1  ! if monotasking and no zoom, in=jpjm1 
    807807 
    808808      ALLOCATE( nbondi_bdy(nb_bdy)) 
     
    877877               ENDIF 
    878878               ! check if point is in local domain 
    879                IF(  nbidta(ib,igrd,ib_bdy) >= iw .AND. nbidta(ib,igrd,ib_bdy) <= ie .AND.   & 
    880                   & nbjdta(ib,igrd,ib_bdy) >= is .AND. nbjdta(ib,igrd,ib_bdy) <= in       ) THEN 
     879               IF(  nbidta(ib,igrd,ib_bdy) >= iwe .AND. nbidta(ib,igrd,ib_bdy) <= ies .AND.   & 
     880                  & nbjdta(ib,igrd,ib_bdy) >= iso .AND. nbjdta(ib,igrd,ib_bdy) <= ino      ) THEN 
    881881                  ! 
    882882                  icount = icount  + 1 
     
    914914         com_south_b = 0 
    915915         com_north_b = 0 
     916 
    916917         DO igrd = 1, jpbgrd 
    917918            icount  = 0 
     
    920921               DO ib = 1, nblendta(igrd,ib_bdy) 
    921922                  ! check if point is in local domain and equals ir 
    922                   IF(  nbidta(ib,igrd,ib_bdy) >= iw .AND. nbidta(ib,igrd,ib_bdy) <= ie .AND.   & 
    923                      & nbjdta(ib,igrd,ib_bdy) >= is .AND. nbjdta(ib,igrd,ib_bdy) <= in .AND.   & 
     923                  IF(  nbidta(ib,igrd,ib_bdy) >= iwe .AND. nbidta(ib,igrd,ib_bdy) <= ies .AND.   & 
     924                     & nbjdta(ib,igrd,ib_bdy) >= iso .AND. nbjdta(ib,igrd,ib_bdy) <= ino .AND.   & 
    924925                     & nbrdta(ib,igrd,ib_bdy) == ir  ) THEN 
    925926                     ! 
     
    16181619            ELSE 
    16191620               ! This is a corner 
    1620                WRITE(numout,*) 'Found a South-West corner at (i,j): ', jpiwob(ib), jpjwdt(ib) 
     1621               IF(lwp) WRITE(numout,*) 'Found a South-West corner at (i,j): ', jpiwob(ib), jpjwdt(ib) 
    16211622               CALL bdy_ctl_corn(npckgw(ib), icornw(ib,1)) 
    16221623               itest=itest+1 
     
    16321633            ELSE 
    16331634               ! This is a corner 
    1634                WRITE(numout,*) 'Found a North-West corner at (i,j): ', jpiwob(ib), jpjwft(ib) 
     1635               IF(lwp) WRITE(numout,*) 'Found a North-West corner at (i,j): ', jpiwob(ib), jpjwft(ib) 
    16351636               CALL bdy_ctl_corn(npckgw(ib), icornw(ib,2)) 
    16361637               itest=itest+1 
     
    16621663            ELSE 
    16631664               ! This is a corner 
    1664                WRITE(numout,*) 'Found a South-East corner at (i,j): ', jpieob(ib)+1, jpjedt(ib) 
     1665               IF(lwp) WRITE(numout,*) 'Found a South-East corner at (i,j): ', jpieob(ib)+1, jpjedt(ib) 
    16651666               CALL bdy_ctl_corn(npckge(ib), icorne(ib,1)) 
    16661667               itest=itest+1 
     
    16761677            ELSE 
    16771678               ! This is a corner 
    1678                WRITE(numout,*) 'Found a North-East corner at (i,j): ', jpieob(ib)+1, jpjeft(ib) 
     1679               IF(lwp) WRITE(numout,*) 'Found a North-East corner at (i,j): ', jpieob(ib)+1, jpjeft(ib) 
    16791680               CALL bdy_ctl_corn(npckge(ib), icorne(ib,2)) 
    16801681               itest=itest+1 
  • branches/2014/dev_r4621_NOC4_BDY_VERT_INTERP/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90

    r5038 r5901  
    1515   !!   'key_dynspg_flt'                              filtered free surface 
    1616   !!---------------------------------------------------------------------- 
    17    USE timing          ! Timing 
    1817   USE oce             ! ocean dynamics and tracers  
    19    USE sbcisf          ! ice shelf 
     18   USE bdy_oce         ! ocean open boundary conditions 
     19   USE sbc_oce         ! ocean surface boundary conditions 
    2020   USE dom_oce         ! ocean space and time domain  
    2121   USE phycst          ! physical constants 
    22    USE bdy_oce         ! ocean open boundary conditions 
     22   USE sbcisf          ! ice shelf 
     23   ! 
     24   USE in_out_manager  ! I/O manager 
    2325   USE lib_mpp         ! for mppsum 
    24    USE in_out_manager  ! I/O manager 
    25    USE sbc_oce         ! ocean surface boundary conditions 
     26   USE timing          ! Timing 
     27   USE lib_fortran     ! Fortran routines library 
    2628 
    2729   IMPLICIT NONE 
     
    3335#  include "domzgr_substitute.h90" 
    3436   !!---------------------------------------------------------------------- 
    35    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     37   !! NEMO/OPA 3.6 , NEMO Consortium (2014) 
    3638   !! $Id$  
    3739   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     
    7880      TYPE(OBC_INDEX), POINTER :: idx 
    7981      !!----------------------------------------------------------------------------- 
    80  
    81       IF( nn_timing == 1 ) CALL timing_start('bdy_vol') 
    82  
     82      ! 
     83      IF( nn_timing == 1 )   CALL timing_start('bdy_vol') 
     84      ! 
    8385      IF( ln_vol ) THEN 
    84  
     86      ! 
    8587      IF( kt == nit000 ) THEN  
    8688         IF(lwp) WRITE(numout,*) 
     
    9193      ! Calculate the cumulate surface Flux z_cflxemp (m3/s) over all the domain 
    9294      ! ----------------------------------------------------------------------- 
    93       z_cflxemp = SUM ( ( emp(:,:)-rnf(:,:)+rdivisf*fwfisf(:,:) ) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) ) / rau0 
     95!!gm replace these lines : 
     96      z_cflxemp = SUM ( ( emp(:,:)-rnf(:,:)+fwfisf(:,:) ) * bdytmask(:,:) * e1e2t(:,:) ) / rau0 
    9497      IF( lk_mpp )   CALL mpp_sum( z_cflxemp )     ! sum over the global domain 
     98!!gm   by : 
     99!!gm      z_cflxemp = glob_sum(  ( emp(:,:)-rnf(:,:)+fwfisf(:,:) ) * bdytmask(:,:) * e1e2t(:,:)  ) / rau0 
     100!!gm 
    95101 
    96102      ! Transport through the unstructured open boundary 
    97103      ! ------------------------------------------------ 
    98       zubtpecor = 0.e0 
     104      zubtpecor = 0._wp 
    99105      DO ib_bdy = 1, nb_bdy 
    100106         idx => idx_bdy(ib_bdy) 
    101  
     107         ! 
    102108         jgrd = 2                               ! cumulate u component contribution first  
    103109         DO jb = 1, idx%nblenrim(jgrd) 
     
    116122            END DO 
    117123         END DO 
    118  
     124         ! 
    119125      END DO 
    120126      IF( lk_mpp )   CALL mpp_sum( zubtpecor )   ! sum over the global domain 
     
    123129      ! ------------------------------ 
    124130      IF( nn_volctl==1 ) THEN   ;   zubtpecor = ( zubtpecor - z_cflxemp) / bdysurftot  
    125       ELSE                   ;   zubtpecor =   zubtpecor             / bdysurftot 
     131      ELSE                      ;   zubtpecor =   zubtpecor             / bdysurftot 
    126132      END IF 
    127133 
    128134      ! Correction of the total velocity on the unstructured boundary to respect the mass flux conservation 
    129135      ! ------------------------------------------------------------- 
    130       ztranst = 0.e0 
     136      ztranst = 0._wp 
    131137      DO ib_bdy = 1, nb_bdy 
    132138         idx => idx_bdy(ib_bdy) 
    133  
     139         ! 
    134140         jgrd = 2                               ! correct u component 
    135141         DO jb = 1, idx%nblenrim(jgrd) 
     
    150156            END DO 
    151157         END DO 
    152  
     158         ! 
    153159      END DO 
    154160      IF( lk_mpp )   CALL mpp_sum( ztranst )   ! sum over the global domain 
     
    169175      ! 
    170176      END IF ! ln_vol 
    171  
     177      ! 
    172178   END SUBROUTINE bdy_vol 
    173179 
Note: See TracChangeset for help on using the changeset viewer.