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 5532 for branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC – NEMO

Ignore:
Timestamp:
2015-07-02T15:49:24+02:00 (9 years ago)
Author:
davestorkey
Message:

Update UKMO/dev_r5021_nn_etau_revision branch to rev 5518 of trunk
(=branching point for NEMO 3.6_stable).

Location:
branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90

    r5448 r5532  
    176176 
    177177     !open output file 
    178      IF( lwp ) THEN 
     178     IF( lwm ) THEN 
    179179        CALL ctl_opn( numdct_vol,  'volume_transport', 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout,  .FALSE. ) 
    180180        CALL ctl_opn( numdct_heat, 'heat_transport'  , 'NEW', 'FORMATTED', 'SEQUENTIAL', -1, numout,  .FALSE. ) 
     
    283283           DO jsec=1,nb_sec 
    284284 
    285               IF( lwp )CALL dia_dct_wri(kt,jsec,secs(jsec)) 
     285              IF( lwm )CALL dia_dct_wri(kt,jsec,secs(jsec)) 
    286286             
    287287              !nullify transports values after writing 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90

    r5446 r5532  
    166166         CASE ( 1 )                                  !  ORCA_R1 configurations 
    167167            !                                        ! ======================= 
    168             ! This dirty section will be suppressed by simplification process: all this will come back in input files 
    169             ! Currently these hard-wired indices relate to the original (pre-v3.6) configuration  
    170             ! which had a grid-size of 362x292. 
    171             ! This grid has been extended southwards for use with the under ice-shelf options (isf) introduced in v3.6.  
    172             ! The original domain can still be used optionally if the isf code is not activated.  
    173             ! An adjustment (isrow) is made to the hard-wired indices if the extended domain (362x332) is being used. 
    174             !  
    175             IF    ( jpjglo == 292 ) THEN  ;  isrow = 0  ! Using pre-v3.6 files or adjusted start row from isf-extended grid 
    176             ELSEIF( jpjglo == 332 ) THEN  ;  isrow = 40 ! Using full isf­extended domain.  
    177             ENDIF                                       ! Adjust j­indices to account for more southerly starting latitude 
     168            ! This dirty section will be suppressed by simplification process: 
     169            ! all this will come back in input files 
     170            ! Currently these hard-wired indices relate to configuration with 
     171            ! extend grid (jpjglo=332) 
     172            isrow = 332 - jpjglo 
     173            ! 
    178174            ii0 = 283           ;   ii1 = 283 
    179             ij0 = 201 + isrow   ;   ij1 = 201 + isrow 
     175            ij0 = 241 - isrow   ;   ij1 = 241 - isrow 
    180176            !                                        ! ======================= 
    181177         CASE DEFAULT                                !    ORCA R05 or R025 
     
    223219         CASE ( 1 )                                  !  ORCA_R1 configurations 
    224220            !                                        ! ======================= 
    225             !  This dirty section will be suppressed by simplification process: 
    226             !  all this will come back in input files 
    227             IF    ( jpjglo == 292 ) THEN  ;  isrow = 0   
    228             ELSEIF( jpjglo == 332 ) THEN  ;  isrow = 39 
    229             ENDIF                                       
     221            ! This dirty section will be suppressed by simplification process: 
     222            ! all this will come back in input files 
     223            ! Currently these hard-wired indices relate to configuration with 
     224            ! extend grid (jpjglo=332) 
     225            isrow = 332 - jpjglo 
    230226            ii0 = 282           ;   ii1 = 282 
    231             ij0 = 201 + isrow   ;   ij1 = 201 + isrow 
     227            ij0 = 240 - isrow   ;   ij1 = 240 - isrow 
    232228            !                                        ! ======================= 
    233229         CASE DEFAULT                                !    ORCA R05 or R025 
     
    275271         CASE ( 1 )                                  !  ORCA_R1 configurations 
    276272            !                                        ! ======================= 
    277             !  This dirty section will be suppressed by simplification process: 
    278             !  all this will come back in input files 
    279             IF    ( jpjglo == 292 ) THEN  ;  isrow = 0   
    280             ELSEIF( jpjglo == 332 ) THEN  ;  isrow = 39 
    281             ENDIF                                       
     273            ! This dirty section will be suppressed by simplification process: 
     274            ! all this will come back in input files 
     275            ! Currently these hard-wired indices relate to configuration with 
     276            ! extend grid (jpjglo=332) 
     277            isrow = 332 - jpjglo 
    282278            ii0 = 331           ;   ii1 = 331 
    283             ij0 = 176 + isrow   ;   ij1 = 176 + isrow 
     279            ij0 = 215 - isrow   ;   ij1 = 215 - isrow 
    284280            !                                        ! ======================= 
    285281         CASE DEFAULT                                !    ORCA R05 or R025 
     
    327323         CASE ( 1 )                                  !  ORCA_R1 configurations 
    328324            !                                        ! ======================= 
    329             !  This dirty section will be suppressed by simplification process: 
    330             !  all this will come back in input files 
    331             IF    ( jpjglo == 292 ) THEN  ;  isrow = 0   
    332             ELSEIF( jpjglo == 332 ) THEN  ;  isrow = 39 
    333             ENDIF                                       
     325            ! This dirty section will be suppressed by simplification process: 
     326            ! all this will come back in input files 
     327            ! Currently these hard-wired indices relate to configuration with 
     328            ! extend grid (jpjglo=332) 
     329            isrow = 332 - jpjglo 
    334330            ii0 = 297           ;   ii1 = 297 
    335             ij0 = 230 + isrow   ;   ij1 = 230 + isrow 
     331            ij0 = 269 - isrow   ;   ij1 = 269 - isrow 
    336332            !                                        ! ======================= 
    337333         CASE DEFAULT                                !    ORCA R05 or R025 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r5446 r5532  
    4747   USE iom 
    4848   USE ioipsl 
     49   USE dynspg_oce, ONLY: un_adv, vn_adv ! barotropic velocities      
     50 
    4951#if defined key_lim2 
    5052   USE limwri_2  
     
    126128      !! 
    127129      INTEGER                      ::   ji, jj, jk              ! dummy loop indices 
     130      INTEGER                      ::   jkbot                   ! 
    128131      REAL(wp)                     ::   zztmp, zztmpx, zztmpy   !  
    129132      !! 
     
    149152         CALL iom_put( "e3w" , fse3w_n(:,:,:) ) 
    150153      ENDIF 
     154 
     155      CALL iom_put( "ssh" , sshn )                 ! sea surface height 
     156      if( iom_use('ssh2') )   CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
    151157       
    152158      CALL iom_put( "toce", tsn(:,:,:,jp_tem) )    ! 3D temperature 
     
    155161         DO jj = 1, jpj 
    156162            DO ji = 1, jpi 
    157                z2d(ji,jj) = tsn(ji,jj,MAX(mbathy(ji,jj),1),jp_tem) 
     163               jkbot = mbkt(ji,jj) 
     164               z2d(ji,jj) = tsn(ji,jj,jkbot,jp_tem) 
    158165            END DO 
    159166         END DO 
     
    166173         DO jj = 1, jpj 
    167174            DO ji = 1, jpi 
    168                z2d(ji,jj) = tsn(ji,jj,MAX(mbathy(ji,jj),1),jp_sal) 
     175               jkbot = mbkt(ji,jj) 
     176               z2d(ji,jj) = tsn(ji,jj,jkbot,jp_sal) 
    169177            END DO 
    170178         END DO 
    171179         CALL iom_put( "sbs", z2d )                ! bottom salinity 
     180      ENDIF 
     181 
     182      IF ( iom_use("taubot") ) THEN                ! bottom stress 
     183         z2d(:,:) = 0._wp 
     184         DO jj = 2, jpjm1 
     185            DO ji = fs_2, fs_jpim1   ! vector opt. 
     186               zztmpx = (  bfrua(ji  ,jj) * un(ji  ,jj,mbku(ji  ,jj))  & 
     187                      &  + bfrua(ji-1,jj) * un(ji-1,jj,mbku(ji-1,jj))  )       
     188               zztmpy = (  bfrva(ji,  jj) * vn(ji,jj  ,mbkv(ji,jj  ))  & 
     189                      &  + bfrva(ji,jj-1) * vn(ji,jj-1,mbkv(ji,jj-1))  )  
     190               z2d(ji,jj) = rau0 * SQRT( zztmpx * zztmpx + zztmpy * zztmpy ) * tmask(ji,jj,1)  
     191               ! 
     192            ENDDO 
     193         ENDDO 
     194         CALL lbc_lnk( z2d, 'T', 1. ) 
     195         CALL iom_put( "taubot", z2d )            
    172196      ENDIF 
    173197          
     
    177201         DO jj = 1, jpj 
    178202            DO ji = 1, jpi 
    179                z2d(ji,jj) = un(ji,jj,MAX(mbathy(ji,jj),1)) 
     203               jkbot = mbku(ji,jj) 
     204               z2d(ji,jj) = un(ji,jj,jkbot) 
    180205            END DO 
    181206         END DO 
    182207         CALL iom_put( "sbu", z2d )                ! bottom i-current 
    183208      ENDIF 
     209#if defined key_dynspg_ts 
     210      CALL iom_put(  "ubar", un_adv(:,:)      )    ! barotropic i-current 
     211#else 
     212      CALL iom_put(  "ubar", un_b(:,:)        )    ! barotropic i-current 
     213#endif 
    184214       
    185215      CALL iom_put( "voce", vn(:,:,:)         )    ! 3D j-current 
     
    188218         DO jj = 1, jpj 
    189219            DO ji = 1, jpi 
    190                z2d(ji,jj) = vn(ji,jj,MAX(mbathy(ji,jj),1)) 
     220               jkbot = mbkv(ji,jj) 
     221               z2d(ji,jj) = vn(ji,jj,jkbot) 
    191222            END DO 
    192223         END DO 
    193224         CALL iom_put( "sbv", z2d )                ! bottom j-current 
     225      ENDIF 
     226#if defined key_dynspg_ts 
     227      CALL iom_put(  "vbar", vn_adv(:,:)      )    ! barotropic j-current 
     228#else 
     229      CALL iom_put(  "vbar", vn_b(:,:)        )    ! barotropic j-current 
     230#endif 
     231 
     232      CALL iom_put( "woce", wn )                   ! vertical velocity 
     233      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
     234         ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 
     235         z2d(:,:) = rau0 * e12t(:,:) 
     236         DO jk = 1, jpk 
     237            z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:) 
     238         END DO 
     239         CALL iom_put( "w_masstr" , z3d )   
     240         IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 
    194241      ENDIF 
    195242 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90

    r5239 r5532  
    7272      !!---------------------------------------------------------------------- 
    7373      INTEGER ::   jc            ! dummy loop indices 
     74      INTEGER :: isrow           ! local index 
    7475      !!---------------------------------------------------------------------- 
    7576       
     
    9192         CASE ( 1 )                                  ! ORCA_R1 configuration 
    9293            !                                        ! ======================= 
     94            ! This dirty section will be suppressed by simplification process: 
     95            ! all this will come back in input files 
     96            ! Currently these hard-wired indices relate to configuration with 
     97            ! extend grid (jpjglo=332) 
     98            isrow = 332 - jpjglo 
     99            ! 
    93100            ncsnr(1)   = 1    ; ncstt(1)   = 0           ! Caspian Sea 
    94             ncsi1(1)   = 332  ; ncsj1(1)   = 203 
    95             ncsi2(1)   = 344  ; ncsj2(1)   = 235 
     101            ncsi1(1)   = 332  ; ncsj1(1)   = 243 - isrow 
     102            ncsi2(1)   = 344  ; ncsj2(1)   = 275 - isrow 
    96103            ncsir(1,1) = 1    ; ncsjr(1,1) = 1 
    97104            !                                         
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90

    r5446 r5532  
    162162            !                                             ! ===================== 
    163163            ! This dirty section will be suppressed by simplification process: all this will come back in input files 
    164             ! Currently these hard-wired indices relate to the original (pre-v3.6) configuration  
     164            ! Currently these hard-wired indices relate to configuration with 
     165            ! extend grid (jpjglo=332) 
    165166            ! which had a grid-size of 362x292. 
    166             ! This grid has been extended southwards for use with the under ice-shelf options (isf) introduced in v3.6.  
    167             ! The original domain can still be used optionally if the isf code is not activated.  
    168             ! An adjustment (isrow) is made to the hard-wired indices if the extended domain (362x332) is being used. 
    169167            !  
    170             IF    ( jpjglo == 292 ) THEN  ;  isrow = 0  ! Using pre-v3.6 files or adjusted start row from isf-extended grid 
    171             ELSEIF( jpjglo == 332 ) THEN  ;  isrow = 40 ! Using full isf­extended domain.  
    172             ENDIF      
     168            isrow = 332 - jpjglo 
    173169            ! 
    174170            ii0 = 282           ;   ii1 = 283        ! Gibraltar Strait (e2u = 20 km) 
    175             ij0 = 201 + isrow   ;   ij1 = 201 + isrow   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  20.e3 
     171            ij0 = 201 + isrow   ;   ij1 = 241 - isrow   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  20.e3 
    176172            IF(lwp) WRITE(numout,*) 
    177173            IF(lwp) WRITE(numout,*) '             orca_r1: Gibraltar : e2u reduced to 20 km' 
    178174 
    179175            ii0 = 314           ;   ii1 = 315        ! Bhosporus Strait (e2u = 10 km) 
    180             ij0 = 208 + isrow   ;   ij1 = 208 + isrow   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  10.e3 
     176            ij0 = 208 + isrow   ;   ij1 = 248 - isrow   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  10.e3 
    181177            IF(lwp) WRITE(numout,*) 
    182178            IF(lwp) WRITE(numout,*) '             orca_r1: Bhosporus : e2u reduced to 10 km' 
    183179 
    184180            ii0 =  44           ;   ii1 =  44        ! Lombok Strait (e1v = 13 km) 
    185             ij0 = 124 + isrow   ;   ij1 = 125 + isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  13.e3 
     181            ij0 = 124 + isrow   ;   ij1 = 165 - isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  13.e3 
    186182            IF(lwp) WRITE(numout,*) 
    187183            IF(lwp) WRITE(numout,*) '             orca_r1: Lombok : e1v reduced to 10 km' 
    188184 
    189185            ii0 =  48           ;   ii1 =  48        ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on] 
    190             ij0 = 124 + isrow   ;   ij1 = 125 + isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  8.e3 
     186            ij0 = 124 + isrow   ;   ij1 = 165 - isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  8.e3 
    191187            IF(lwp) WRITE(numout,*) 
    192188            IF(lwp) WRITE(numout,*) '             orca_r1: Sumba : e1v reduced to 8 km' 
    193189 
    194190            ii0 =  53           ;   ii1 =  53        ! Ombai Strait (e1v = 13 km) 
    195             ij0 = 124 + isrow   ;   ij1 = 125 + isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 13.e3 
     191            ij0 = 124 + isrow   ;   ij1 = 165 - isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 13.e3 
    196192            IF(lwp) WRITE(numout,*) 
    197193            IF(lwp) WRITE(numout,*) '             orca_r1: Ombai : e1v reduced to 13 km' 
    198194 
    199195            ii0 =  56           ;   ii1 =  56        ! Timor Passage (e1v = 20 km) 
    200             ij0 = 124 + isrow   ;   ij1 = 125 + isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 20.e3 
     196            ij0 = 124 + isrow   ;   ij1 = 145 - isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 20.e3 
    201197            IF(lwp) WRITE(numout,*) 
    202198            IF(lwp) WRITE(numout,*) '             orca_r1: Timor Passage : e1v reduced to 20 km' 
    203199 
    204200            ii0 =  55           ;   ii1 =  55        ! West Halmahera Strait (e1v = 30 km) 
    205             ij0 = 141 + isrow   ;   ij1 = 142 + isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 30.e3 
     201            ij0 = 141 + isrow   ;   ij1 = 182 - isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 30.e3 
    206202            IF(lwp) WRITE(numout,*) 
    207203            IF(lwp) WRITE(numout,*) '             orca_r1: W Halmahera : e1v reduced to 30 km' 
    208204 
    209205            ii0 =  58           ;   ii1 =  58        ! East Halmahera Strait (e1v = 50 km) 
    210             ij0 = 141 + isrow   ;   ij1 = 142 + isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 50.e3 
     206            ij0 = 141 + isrow   ;   ij1 = 182 - isrow   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 50.e3 
    211207            IF(lwp) WRITE(numout,*) 
    212208            IF(lwp) WRITE(numout,*) '             orca_r1: E Halmahera : e1v reduced to 50 km' 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90

    r5446 r5532  
    402402      IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN   ! ORCA R1 configuration 
    403403         !                                                 ! Increased lateral friction near of some straits 
    404          ! This dirty section will be suppressed by simplification process: all this will come back in input files 
    405          ! Currently these hard-wired indices relate to the original (pre-v3.6) configuration  
    406          ! which had a grid-size of 362x292. 
    407          ! This grid has been extended southwards for use with the under ice-shelf options (isf) introduced in v3.6.  
    408          ! The original domain can still be used optionally if the isf code is not activated.  
    409          ! An adjustment (isrow) is made to the hard-wired indices if the extended domain (362x332) is being used. 
    410          !  
    411          IF    ( jpjglo == 292 ) THEN  ;  isrow = 0  ! Using pre-v3.6 files or adjusted start row from isf-extended grid 
    412          ELSEIF( jpjglo == 332 ) THEN  ;  isrow = 40 ! Using full isf­extended domain.  
    413          ENDIF      
    414  
     404         ! This dirty section will be suppressed by simplification process: 
     405         ! all this will come back in input files 
     406         ! Currently these hard-wired indices relate to configuration with 
     407         ! extend grid (jpjglo=332) 
     408         ! 
     409         isrow = 332 - jpjglo 
     410         ! 
    415411         IF(lwp) WRITE(numout,*) 
    416412         IF(lwp) WRITE(numout,*) '   orca_r1: increase friction near the following straits : ' 
    417413         IF(lwp) WRITE(numout,*) '      Gibraltar ' 
    418414         ii0 = 282           ;   ii1 = 283        ! Gibraltar Strait  
    419          ij0 = 201 + isrow   ;   ij1 = 201 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
     415         ij0 = 201 + isrow   ;   ij1 = 241 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
    420416 
    421417         IF(lwp) WRITE(numout,*) '      Bhosporus ' 
    422418         ii0 = 314           ;   ii1 = 315        ! Bhosporus Strait  
    423          ij0 = 208 + isrow   ;   ij1 = 208 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
     419         ij0 = 208 + isrow   ;   ij1 = 248 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
    424420 
    425421         IF(lwp) WRITE(numout,*) '      Makassar (Top) ' 
    426422         ii0 =  48           ;   ii1 =  48        ! Makassar Strait (Top)  
    427          ij0 = 149 + isrow   ;   ij1 = 150 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 3._wp   
     423         ij0 = 149 + isrow   ;   ij1 = 190 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 3._wp   
    428424 
    429425         IF(lwp) WRITE(numout,*) '      Lombok ' 
    430426         ii0 =  44           ;   ii1 =  44        ! Lombok Strait  
    431          ij0 = 124 + isrow   ;   ij1 = 125 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
     427         ij0 = 124 + isrow   ;   ij1 = 165 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
    432428 
    433429         IF(lwp) WRITE(numout,*) '      Ombai ' 
    434430         ii0 =  53           ;   ii1 =  53        ! Ombai Strait  
    435          ij0 = 124 + isrow   ;   ij1 = 125 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
     431         ij0 = 124 + isrow   ;   ij1 = 165 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
    436432 
    437433         IF(lwp) WRITE(numout,*) '      Timor Passage ' 
    438434         ii0 =  56           ;   ii1 =  56        ! Timor Passage  
    439          ij0 = 124 + isrow   ;   ij1 = 125 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
     435         ij0 = 124 + isrow   ;   ij1 = 165 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 2._wp   
    440436 
    441437         IF(lwp) WRITE(numout,*) '      West Halmahera ' 
    442438         ii0 =  58           ;   ii1 =  58        ! West Halmahera Strait  
    443          ij0 = 141 + isrow   ;   ij1 = 142 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 3._wp   
     439         ij0 = 141 + isrow   ;   ij1 = 182 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 3._wp   
    444440 
    445441         IF(lwp) WRITE(numout,*) '      East Halmahera ' 
    446442         ii0 =  55           ;   ii1 =  55        ! East Halmahera Strait  
    447          ij0 = 141 + isrow   ;   ij1 = 142 + isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 3._wp   
     443         ij0 = 141 + isrow   ;   ij1 = 182 - isrow   ;   fmask( mi0(ii0):mi1(ii1),mj0(ij0):mj1(ij1),1:jpk ) = 3._wp   
    448444         ! 
    449445      ENDIF 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r5446 r5532  
    11231123      IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN    ! ORCA R1 configuration 
    11241124         !                                             ! ===================== 
    1125          ! This dirty section will be suppressed by simplification process: all this will come back in input files 
    1126          ! Currently these hard-wired indices relate to the original (pre-v3.6) configuration  
     1125         ! This dirty section will be suppressed by simplification process: 
     1126         ! all this will come back in input files 
     1127         ! Currently these hard-wired indices relate to configuration with 
     1128         ! extend grid (jpjglo=332) 
    11271129         ! which had a grid-size of 362x292. 
    1128          ! This grid has been extended southwards for use with the under ice-shelf options (isf) introduced in v3.6.  
    1129          ! The original domain can still be used optionally if the isf code is not activated.  
    1130          ! An adjustment (isrow) is made to the hard-wired indices if the extended domain (362x332) is being used. 
    1131          !  
    1132          IF    ( jpjglo == 292 ) THEN  ;  isrow = 0  ! Using pre-v3.6 files or adjusted start row from isf-extended grid 
    1133          ELSEIF( jpjglo == 332 ) THEN  ;  isrow = 40 ! Using full isf­extended domain.  
    1134          ENDIF      
     1130         isrow = 332 - jpjglo 
    11351131         ! 
    11361132         ii0 = 282           ;   ii1 = 283        ! Gibraltar Strait (e2u was modified) 
    1137          ij0 = 201 + isrow   ;   ij1 = 201 + isrow 
     1133         ij0 = 241 - isrow   ;   ij1 = 241 - isrow 
    11381134         DO jk = 1, jpkm1 
    11391135            DO jj = mj0(ij0), mj1(ij1) 
     
    11561152         ! 
    11571153         ii0 = 314           ;   ii1 = 315        ! Bhosporus Strait (e2u was modified) 
    1158          ij0 = 208 + isrow   ;   ij1 = 208 + isrow 
     1154         ij0 = 248 - isrow   ;   ij1 = 248 - isrow 
    11591155         DO jk = 1, jpkm1 
    11601156            DO jj = mj0(ij0), mj1(ij1) 
     
    11771173         ! 
    11781174         ii0 =  44           ;   ii1 =  44        ! Lombok Strait (e1v was modified) 
    1179          ij0 = 124 + isrow   ;   ij1 = 125 + isrow 
     1175         ij0 = 164 - isrow   ;   ij1 = 165 - isrow 
    11801176         DO jk = 1, jpkm1 
    11811177            DO jj = mj0(ij0), mj1(ij1) 
     
    11931189         ! 
    11941190         ii0 =  48           ;   ii1 =  48        ! Sumba Strait (e1v was modified) [closed from bathy_11 on] 
    1195          ij0 = 124 + isrow   ;   ij1 = 125 + isrow 
     1191         ij0 = 164 - isrow   ;   ij1 = 165 - isrow 
    11961192         DO jk = 1, jpkm1 
    11971193            DO jj = mj0(ij0), mj1(ij1) 
     
    12091205         ! 
    12101206         ii0 =  53          ;   ii1 =  53        ! Ombai Strait (e1v was modified) 
    1211          ij0 = 124 + isrow  ;   ij1 = 125  + isrow   
     1207         ij0 = 164 - isrow  ;   ij1 = 165  - isrow   
    12121208         DO jk = 1, jpkm1 
    12131209            DO jj = mj0(ij0), mj1(ij1) 
     
    12241220         END DO 
    12251221         ! 
    1226          ii0 =  56             ;   ii1 =  56        ! Timor Passage (e1v was modified) 
    1227          ij0 = 124  + isrow    ;   ij1 = 125  + isrow   
     1222         ii0 =  56            ;   ii1 =  56        ! Timor Passage (e1v was modified) 
     1223         ij0 = 164 - isrow    ;   ij1 = 165  - isrow   
    12281224         DO jk = 1, jpkm1 
    12291225            DO jj = mj0(ij0), mj1(ij1) 
     
    12401236         END DO 
    12411237         ! 
    1242          ii0 =  55             ;   ii1 =  55        ! West Halmahera Strait (e1v was modified) 
    1243          ij0 = 141  + isrow    ;   ij1 = 142  + isrow   
     1238         ii0 =  55            ;   ii1 =  55        ! West Halmahera Strait (e1v was modified) 
     1239         ij0 = 181 - isrow    ;   ij1 = 182 - isrow   
    12441240         DO jk = 1, jpkm1 
    12451241            DO jj = mj0(ij0), mj1(ij1) 
     
    12561252         END DO 
    12571253         ! 
    1258          ii0 =  58             ;   ii1 =  58        ! East Halmahera Strait (e1v was modified) 
    1259          ij0 = 141  + isrow    ;   ij1 = 142  + isrow   
     1254         ii0 =  58            ;   ii1 =  58        ! East Halmahera Strait (e1v was modified) 
     1255         ij0 = 181 - isrow    ;   ij1 = 182 - isrow   
    12601256         DO jk = 1, jpkm1 
    12611257            DO jj = mj0(ij0), mj1(ij1) 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r5446 r5532  
    484484            CALL iom_close( inum ) 
    485485            mbathy(:,:) = INT( bathy(:,:) ) 
    486             ! 
    487             ! CL :  add Amazon deeper 
    488             IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN    ! ORCA R1 configuration  
    489                  ii0 = 230   ;   ii1 = 245                   ! Amazon area  
    490                  ij0 = 140   ;   ij1 = 155                   ! no ocean shallower than 30 meters 
    491                  DO ji = mi0(ii0), mi1(ii1) 
    492                     DO jj = mj0(ij0), mj1(ij1) 
    493                        IF( bathy(ji,jj) .LE. 30. .AND. bathy(ji,jj) .GT. 0.0 ) bathy(ji,jj) = 30._wp 
    494                     END DO 
    495                  END DO 
    496                  IF(lwp) WRITE(numout,*) 
    497                  IF(lwp) WRITE(numout,*) '             orca_r1: Amazon area not shallower than 30 meters for: ' 
    498                  IF(lwp) WRITE(numout,*) '                    Longitude index ',ii0, ii0 
    499                  IF(lwp) WRITE(numout,*) '                    Latitude index  ',ij0, ij0 
    500             ENDIF 
    501486            !                                                ! ===================== 
    502487            IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90

    r5446 r5532  
    237237      ! 
    238238      CALL wrk_dealloc( jpi  , jpj+2, zwu               ) 
    239       CALL wrk_dealloc( jpi+4, jpj  , zwv, kjstart = -1 ) 
     239      CALL wrk_dealloc( jpi+4, jpj  , zwv, kistart = -1 ) 
    240240      ! 
    241241      IF( nn_timing == 1 )  CALL timing_stop('div_cur') 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90

    r5239 r5532  
    266266               ! Add volume filter correction: compatibility with tracer advection scheme 
    267267               ! => time filter + conservation correction (only at the first level) 
    268                fse3t_b(:,:,1) = fse3t_b(:,:,1) - atfp * rdt * r1_rau0 * ( emp_b(:,:) - emp(:,:) ) * tmask(:,:,1) 
    269             ! 
     268               fse3t_b(:,:,1) = fse3t_b(:,:,1) - atfp * rdt * r1_rau0 * ( emp_b(:,:) - emp(:,:) & 
     269                              &                                          -rnf_b(:,:) + rnf(:,:) ) * tmask(:,:,1) 
    270270            ENDIF 
    271271            ! 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90

    r5239 r5532  
    2121   USE domvvl          ! Variable volume 
    2222   USE divcur          ! hor. divergence and curl      (div & cur routines) 
    23    USE iom             ! I/O library 
    2423   USE restart         ! only for lrst_oce 
    2524   USE in_out_manager  ! I/O manager 
     
    3130   USE bdy_par          
    3231   USE bdydyn2d        ! bdy_ssh routine 
    33    USE iom 
    3432#if defined key_agrif 
    3533   USE agrif_opa_update 
     
    137135      !                                           !           outputs            ! 
    138136      !                                           !------------------------------! 
    139       CALL iom_put( "ssh" , sshn )   ! sea surface height 
    140       if( iom_use('ssh2') )   CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height 
    141137      ! 
    142138      IF(ln_ctl)   CALL prt_ctl( tab2d_1=ssha, clinfo1=' ssha  - : ', mask1=tmask, ovlap=1 ) 
     
    228224#endif 
    229225      ! 
    230       !                                           !------------------------------! 
    231       !                                           !           outputs            ! 
    232       !                                           !------------------------------! 
    233       CALL iom_put( "woce", wn )   ! vertical velocity 
    234       IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
    235          CALL wrk_alloc( jpi, jpj, z2d )  
    236          CALL wrk_alloc( jpi, jpj, jpk, z3d )  
    237          ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 
    238          z2d(:,:) = rau0 * e12t(:,:) 
    239          DO jk = 1, jpk 
    240             z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:) 
    241          END DO 
    242          CALL iom_put( "w_masstr" , z3d )   
    243          IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 
    244          CALL wrk_dealloc( jpi, jpj, z2d  )  
    245          CALL wrk_dealloc( jpi, jpj, jpk, z3d )  
    246       ENDIF 
    247       ! 
    248226      IF( nn_timing == 1 )  CALL timing_stop('wzv') 
    249227 
     
    290268      ELSE                                         !** Leap-Frog time-stepping: Asselin filter + swap 
    291269         sshb(:,:) = sshn(:,:) + atfp * ( sshb(:,:) - 2 * sshn(:,:) + ssha(:,:) )     ! before <-- now filtered 
    292          IF( lk_vvl ) sshb(:,:) = sshb(:,:) - atfp * rdt / rau0 * ( emp_b(:,:) - emp(:,:) ) * ssmask(:,:) 
     270         IF( lk_vvl ) sshb(:,:) = sshb(:,:) - atfp * rdt / rau0 * ( emp_b(:,:) - emp(:,:) - rnf_b(:,:) + rnf(:,:) ) * ssmask(:,:) 
    293271         sshn(:,:) = ssha(:,:)                           ! now <-- after 
    294272      ENDIF 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90

    r5446 r5532  
    9090   INTEGER ::   nitrst                !: time step at which restart file should be written 
    9191   LOGICAL ::   lrst_oce              !: logical to control the oce restart write  
    92    INTEGER ::   numror, numrow        !: logical unit for cean restart (read and write) 
     92   INTEGER ::   numror = 0            !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90) 
     93   INTEGER ::   numrow                !: logical unit for ocean restart (write) 
    9394   INTEGER ::   nrst_lst              !: number of restart to output next 
    9495 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90

    r5446 r5532  
    663663 
    664664      ! --- evaporation minus precipitation --- ! 
     665      zsnw(:,:) = 0._wp 
    665666      CALL lim_thd_snwblow( pfrld, zsnw )          ! snow redistribution by wind 
    666667      emp_oce(:,:) = pfrld(:,:) * zevap(:,:) - ( tprecip(:,:) - sprecip(:,:) ) - sprecip(:,:) * ( 1._wp - zsnw ) 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r5446 r5532  
    613613 
    614614      ! --- evaporation minus precipitation --- ! 
     615      zsnw(:,:) = 0._wp 
    615616      CALL lim_thd_snwblow( pfrld, zsnw )  ! snow distribution over ice after wind blowing  
    616617      emp_oce(:,:) = pfrld(:,:) * zevap(:,:) - ( tprecip(:,:) - sprecip(:,:) ) - sprecip(:,:) * (1._wp - zsnw ) 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5446 r5532  
    780780      xcplmask(:,:,0) = 1. - SUM( xcplmask(:,:,1:nn_cplmodel), dim = 3 ) 
    781781      ! 
    782       ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'S_QsrOce' ) + cpl_freq( 'S_QsrMix' ) 
     782      ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'I_QsrOce' ) + cpl_freq( 'I_QsrMix' ) 
    783783      IF( ln_dm2dc .AND. ln_cpl .AND. ncpl_qsr_freq /= 86400 )   & 
    784784         &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' ) 
     
    13791379      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot 
    13801380      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zqns_ice, zqsr_ice, zdqns_ice 
    1381       REAL(wp), POINTER, DIMENSION(:,:  ) ::   zevap, zsnw, zqns_oce, zqprec_ice, zqemp_oce ! for LIM3 
     1381      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zevap, zsnw, zqns_oce, zqsr_oce, zqprec_ice, zqemp_oce ! for LIM3 
    13821382      !!---------------------------------------------------------------------- 
    13831383      ! 
     
    15241524 
    15251525      ! --- heat flux associated with emp --- ! 
     1526      zsnw(:,:) = 0._wp 
    15261527      CALL lim_thd_snwblow( p_frld, zsnw )  ! snow distribution over ice after wind blowing 
    15271528      zqemp_oce(:,:) = -      zevap(:,:)                   * p_frld(:,:)      *   zcptn(:,:)   &      ! evap 
     
    15561557 
    15571558      CALL wrk_dealloc( jpi,jpj, zevap, zsnw, zqns_oce, zqprec_ice, zqemp_oce )  
    1558  
    15591559#else 
    15601560 
     
    16241624         ENDDO 
    16251625      ENDIF 
     1626 
     1627#if defined key_lim3 
     1628      CALL wrk_alloc( jpi,jpj, zqsr_oce )  
     1629      ! --- solar flux over ocean --- ! 
     1630      !         note: p_frld cannot be = 0 since we limit the ice concentration to amax 
     1631      zqsr_oce = 0._wp 
     1632      WHERE( p_frld /= 0._wp )  zqsr_oce(:,:) = ( zqsr_tot(:,:) - SUM( a_i * zqsr_ice, dim=3 ) ) / p_frld(:,:) 
     1633 
     1634      IF( ln_mixcpl ) THEN   ;   qsr_oce(:,:) = qsr_oce(:,:) * xcplmask(:,:,0) +  zqsr_oce(:,:)* zmsk(:,:) 
     1635      ELSE                   ;   qsr_oce(:,:) = zqsr_oce(:,:)   ;   ENDIF 
     1636 
     1637      CALL wrk_dealloc( jpi,jpj, zqsr_oce )  
     1638#endif 
    16261639 
    16271640      IF( ln_mixcpl ) THEN 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90

    r5448 r5532  
    509509      CALL nemo2cice(ztmp,ss_tlty,'F', -1. ) 
    510510 
    511       CALL wrk_dealloc( jpi,jpj, ztmp ) 
     511      CALL wrk_dealloc( jpi,jpj, ztmp, zpice ) 
    512512      CALL wrk_dealloc( jpi,jpj,ncat, ztmpn ) 
    513513      ! 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90

    r5446 r5532  
    216216            zalb_ice(:,:,:) = ( 1. - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:) 
    217217                                 CALL sbc_cpl_ice_flx( p_frld=pfrld, palbi=zalb_ice, psst=sst_m, pist=t_su ) 
     218            ! clem: evap_ice is forced to 0 in coupled mode for now  
     219            !       but it needs to be changed (along with modif in limthd_dh) once heat flux from evap will be avail. from atm. models 
     220            evap_ice  (:,:,:) = 0._wp   ;   devap_ice (:,:,:) = 0._wp 
    218221            IF( nn_limflx == 2 ) CALL ice_lim_flx( t_su, zalb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_limflx ) 
    219             ! Latent heat flux is forced to 0 in coupled: it is included in qns (non-solar heat flux) 
    220             evap_ice  (:,:,:) = 0._wp 
    221             devap_ice (:,:,:) = 0._wp 
    222222         END SELECT 
    223223         CALL wrk_dealloc( jpi,jpj,jpl, zalb_os, zalb_cs, zalb_ice ) 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r5446 r5532  
    5353   USE timing           ! Timing 
    5454   USE sbcwave          ! Wave module 
     55   USE bdy_par          ! Require lk_bdy 
    5556 
    5657   IMPLICIT NONE 
     
    343344      !                                            ! ---------------------------------------- ! 
    344345      ! 
    345       IF( ln_apr_dyn ) CALL sbc_apr( kt )                ! atmospheric pressure provided at kt+0.5*nn_fsbc 
     346      IF ( .NOT. lk_bdy ) then 
     347         IF( ln_apr_dyn ) CALL sbc_apr( kt )                ! atmospheric pressure provided at kt+0.5*nn_fsbc 
     348      ENDIF 
    346349                                                         ! (caution called before sbc_ssm) 
    347350      ! 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r5446 r5532  
    209209      zfact = 0.5_wp 
    210210      ! 
    211       IF( ln_rnf_depth ) THEN      !==   runoff distributed over several levels   ==! 
     211      IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN      !==   runoff distributed over several levels   ==! 
    212212         IF( lk_vvl ) THEN             ! variable volume case 
    213213            DO jj = 1, jpj                   ! update the depth over which runoffs are distributed 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/STO/stopar.F90

    r5448 r5532  
    112112   INTEGER         :: nn_trc_ord = 1          ! order of autoregressive processes 
    113113 
    114    ! Public array with density correction 
    115    REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: drho_ran 
    116  
    117114   !!---------------------------------------------------------------------- 
    118115   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     
    263260      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    264261 
    265       IF ( lk_agrif ) CALL ctl_stop('EOS stochastic parametrization is not compatible with AGRIF') 
    266262      ! Read namsto namelist : stochastic parameterization 
    267263      REWIND( numnam_ref )              ! Namelist namdyn_adv in reference namelist : Momentum advection scheme 
     
    341337      ENDIF 
    342338      IF( ln_sto_eos ) THEN 
     339         IF ( lk_agrif ) CALL ctl_stop('EOS stochastic parametrization is not compatible with AGRIF') 
    343340         IF(lwp) WRITE(numout,*) '       - stochastic equation of state' 
    344341         ALLOCATE(jsto_eosi(nn_sto_eos)) 
     
    668665      ! ------------------------------------------ 
    669666      IF( ln_rststo ) CALL sto_rst_read 
    670  
    671       ! Allocate drho_ran 
    672       ALLOCATE(drho_ran(jpi,jpj,jpk)) 
    673667 
    674668   END SUBROUTINE sto_par_init 
     
    781775               CALL iom_rstput( kt, nitrst, numstow, clsto3d , sto3d(:,:,:,jsto) ) 
    782776            END DO 
    783             ! Save drho_ran in restart file 
    784             CALL iom_rstput( kt, nitrst, numstow, 'drho' , drho_ran(:,:,:) ) 
    785777            ! close the restart file 
    786778            CALL iom_close( numstow ) 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r5446 r5532  
    2727   USE dom_oce         ! ocean space and time domain variables  
    2828   USE sbc_oce         ! surface boundary condition: ocean 
     29   USE sbcrnf          ! river runoffs 
    2930   USE zdf_oce         ! ocean vertical mixing 
    3031   USE domvvl          ! variable volume 
     
    278279 
    279280      !!      
    280       LOGICAL  ::   ll_tra_hpg, ll_traqsr   ! local logical 
     281      LOGICAL  ::   ll_tra_hpg, ll_traqsr, ll_rnf   ! local logical 
    281282      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    282283      REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
     
    293294         ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg 
    294295         ll_traqsr  = ln_traqsr        ! active  tracers case  and  solar penetration 
     296         ll_rnf     = ln_rnf           ! active  tracers case  and  river runoffs 
    295297      ELSE                           
    296298         ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    297299         ll_traqsr  = .FALSE.          ! active  tracers case and NO solar penetration 
     300         ll_rnf     = .FALSE.          ! passive tracers or NO river runoffs 
    298301      ENDIF 
    299302      ! 
     
    319322                  ! 
    320323                  IF( jk == 1 ) THEN           ! first level  
    321                      ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) ) 
     324                     ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) + rnf(ji,jj) - rnf_b(ji,jj) ) 
    322325                     ztc_f  = ztc_f  - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) ) 
    323326                  ENDIF 
     327 
    324328                  IF( ll_traqsr .AND. jn == jp_tem .AND. jk <= nksr )   &     ! solar penetration (temperature only) 
    325329                     &     ztc_f  = ztc_f  - zfact1 * ( qsr_hc(ji,jj,jk) - qsr_hc_b(ji,jj,jk) )  
    326330 
    327                    ze3t_f = 1.e0 / ze3t_f 
    328                    ptb(ji,jj,jk,jn) = ztc_f * ze3t_f       ! ptb <-- ptn filtered 
    329                    ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta 
    330                    ! 
    331                    IF( ll_tra_hpg ) THEN        ! semi-implicit hpg (T & S only) 
    332                       ze3t_d           = 1.e0   / ( ze3t_n + rbcp * ze3t_d ) 
    333                       pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average 
    334                    ENDIF 
     331                  IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) )   &            ! river runoffs 
     332                     &     ztc_f  = ztc_f  - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) &  
     333                     &                              * fse3t_n(ji,jj,jk) / h_rnf(ji,jj) 
     334 
     335                  ze3t_f = 1.e0 / ze3t_f 
     336                  ptb(ji,jj,jk,jn) = ztc_f * ze3t_f       ! ptb <-- ptn filtered 
     337                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta 
     338                  ! 
     339                  IF( ll_tra_hpg ) THEN        ! semi-implicit hpg (T & S only) 
     340                     ze3t_d           = 1.e0   / ( ze3t_n + rbcp * ze3t_d ) 
     341                     pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average 
     342                  ENDIF 
    335343               END DO 
    336344            END DO 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/step.F90

    r5446 r5532  
    101101      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    102102      IF( lk_tide    )   CALL sbc_tide( kstp ) 
    103       IF( lk_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries 
    104  
     103      IF( lk_bdy     )  THEN 
     104         IF( ln_apr_dyn) CALL sbc_apr( kstp )   ! bdy_dta needs ssh_ib  
     105                         CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries 
     106      ENDIF 
    105107                         CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice) 
    106108                                                      ! clem: moved here for bdy ice purpose 
    107  
    108109      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    109110      ! Update stochastic parameters and random T/S fluctuations 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/step_oce.F90

    r5446 r5532  
    2727   USE sbc_oce          ! surface boundary condition: ocean 
    2828   USE sbctide          ! Tide initialisation 
     29   USE sbcapr           ! surface boundary condition: ssh_ib required by bdydta  
    2930 
    3031   USE traqsr           ! solar radiation penetration      (tra_qsr routine) 
  • branches/UKMO/dev_r5021_nn_etau_revision/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90

    r5448 r5532  
    121121 
    122122   LOGICAL ::   linit = .FALSE. 
     123   LOGICAL ::   ldebug = .FALSE. 
    123124   !!---------------------------------------------------------------------- 
    124125   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     
    486487       
    487488      IF( SUM( tree(ii)%ishape ) == 0 ) THEN                    ! create a new branch  
     489         IF(ldebug) PRINT *, 'create new branch ', ii,ishape, isrt, itype 
    488490         tree(ii)%itype = itype                                        ! define the type of this branch  
    489491         tree(ii)%ishape(:) = ishape(:)                                ! define the shape of this branch  
     
    515517         tree(ii)%current%next%in_use = .FALSE.                        ! this leaf is not yet used 
    516518         tree(ii)%current%next%indic = tree(ii)%current%indic + 1      ! number of this leaf 
     519         IF(ldebug) PRINT *, 'add a leaf ', ii, tree(ii)%current%indic 
    517520         tree(ii)%current%next%prev => tree(ii)%current                ! previous leaf of the new leaf is the current leaf 
    518521         tree(ii)%current%next%next => NULL()                          ! next leaf is not yet defined 
Note: See TracChangeset for help on using the changeset viewer.