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 5385 for trunk/NEMOGCM/NEMO/OPA_SRC – NEMO

Ignore:
Timestamp:
2015-06-09T15:50:42+02:00 (9 years ago)
Author:
cetlod
Message:

merge 2015/dev_r5204_CNRS_PISCES_dcy branch into the trunk, see ticket #1532

Location:
trunk/NEMOGCM/NEMO/OPA_SRC
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90

    r4990 r5385  
    5151      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    5252      !! 
    53       INTEGER :: inum             ! temporary logical unit 
    54       INTEGER :: ji, jj, jk, jt   ! dummy loop indices 
    55       INTEGER :: ii0, ii1, ij0, ij1 
    56       REAL(wp) ::   zarea, zvol, zwei 
    57       REAL(wp) ::  ztemi(4), ztemo(4), zsali(4), zsalo(4), zflxi(4), zflxo(4) 
    58       REAL(wp) ::  zt, zs, zu   
    59       REAL(wp) ::  zsm0, zfwfnew 
     53      INTEGER  :: inum             ! temporary logical unit 
     54      INTEGER  :: ji, jj, jk, jt   ! dummy loop indices 
     55      INTEGER  :: ii0, ii1, ij0, ij1 
     56      INTEGER  :: isrow         ! index for ORCA1 starting row 
     57      REAL(wp) :: zarea, zvol, zwei 
     58      REAL(wp) :: ztemi(4), ztemo(4), zsali(4), zsalo(4), zflxi(4), zflxo(4) 
     59      REAL(wp) :: zt, zs, zu   
     60      REAL(wp) :: zsm0, zfwfnew 
    6061      IF( cp_cfg == "orca" .AND. jp_cfg == 1 .OR. jp_cfg == 2 .OR. jp_cfg == 4 ) THEN 
    6162      !!---------------------------------------------------------------------- 
     
    165166         CASE ( 1 )                                  !  ORCA_R1 configurations 
    166167            !                                        ! ======================= 
    167             ii0 = 283   ;   ii1 = 283 
    168             ij0 = 200   ;   ij1 = 200 
     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 
     178            ii0 = 283           ;   ii1 = 283 
     179            ij0 = 201 + isrow   ;   ij1 = 201 + isrow 
    169180            !                                        ! ======================= 
    170181         CASE DEFAULT                                !    ORCA R05 or R025 
     
    212223         CASE ( 1 )                                  !  ORCA_R1 configurations 
    213224            !                                        ! ======================= 
    214             ii0 = 282   ;   ii1 = 282 
    215             ij0 = 200   ;   ij1 = 200 
     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                                       
     230            ii0 = 282           ;   ii1 = 282 
     231            ij0 = 201 + isrow   ;   ij1 = 201 + isrow 
    216232            !                                        ! ======================= 
    217233         CASE DEFAULT                                !    ORCA R05 or R025 
     
    259275         CASE ( 1 )                                  !  ORCA_R1 configurations 
    260276            !                                        ! ======================= 
    261             ii0 = 331   ;   ii1 = 331 
    262             ij0 = 176   ;   ij1 = 176 
     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                                       
     282            ii0 = 331           ;   ii1 = 331 
     283            ij0 = 176 + isrow   ;   ij1 = 176 + isrow 
    263284            !                                        ! ======================= 
    264285         CASE DEFAULT                                !    ORCA R05 or R025 
     
    306327         CASE ( 1 )                                  !  ORCA_R1 configurations 
    307328            !                                        ! ======================= 
    308             ii0 = 297   ;   ii1 = 297  
    309             ij0 = 230   ;   ij1 = 230 
     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                                       
     334            ii0 = 297           ;   ii1 = 297 
     335            ij0 = 230 + isrow   ;   ij1 = 230 + isrow 
    310336            !                                        ! ======================= 
    311337         CASE DEFAULT                                !    ORCA R05 or R025 
  • trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90

    r5123 r5385  
    105105      REAL(wp) ::   zlam1, zcos_alpha, zim1 , zjm1 , ze1, ze1deg 
    106106      REAL(wp) ::   zphi1, zsin_alpha, zim05, zjm05 
     107      INTEGER  ::   isrow                ! index for ORCA1 starting row 
     108 
    107109      !!---------------------------------------------------------------------- 
    108110      ! 
     
    159161         IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN    ! ORCA R1 configuration 
    160162            !                                             ! ===================== 
    161  
    162             ii0 = 281   ;   ii1 = 282        ! Gibraltar Strait (e2u = 20 km) 
    163             ij0 = 200   ;   ij1 = 200   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  20.e3 
     163            ! 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  
     165            ! 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. 
     169            !  
     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      
     173            ! 
     174            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 
    164176            IF(lwp) WRITE(numout,*) 
    165177            IF(lwp) WRITE(numout,*) '             orca_r1: Gibraltar : e2u reduced to 20 km' 
    166178 
    167             ii0 = 314   ;   ii1 = 315        ! Bhosporus Strait (e2u = 10 km) 
    168             ij0 = 208   ;   ij1 = 208   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  10.e3 
     179            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 
    169181            IF(lwp) WRITE(numout,*) 
    170182            IF(lwp) WRITE(numout,*) '             orca_r1: Bhosporus : e2u reduced to 10 km' 
    171183 
    172             ii0 =  44   ;   ii1 =  44        ! Lombok Strait (e1v = 13 km) 
    173             ij0 = 124   ;   ij1 = 125   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  13.e3 
     184            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 
    174186            IF(lwp) WRITE(numout,*) 
    175187            IF(lwp) WRITE(numout,*) '             orca_r1: Lombok : e1v reduced to 10 km' 
    176188 
    177             ii0 =  48   ;   ii1 =  48        ! Sumba Strait (e1v = 8 km) [closed from bathy_11 on] 
    178             ij0 = 124   ;   ij1 = 125   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  8.e3 
     189            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 
    179191            IF(lwp) WRITE(numout,*) 
    180192            IF(lwp) WRITE(numout,*) '             orca_r1: Sumba : e1v reduced to 8 km' 
    181193 
    182             ii0 =  53   ;   ii1 =  53        ! Ombai Strait (e1v = 13 km) 
    183             ij0 = 124   ;   ij1 = 125   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 13.e3 
     194            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 
    184196            IF(lwp) WRITE(numout,*) 
    185197            IF(lwp) WRITE(numout,*) '             orca_r1: Ombai : e1v reduced to 13 km' 
    186198 
    187             ii0 =  56   ;   ii1 =  56        ! Timor Passage (e1v = 20 km) 
    188             ij0 = 124   ;   ij1 = 125   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 20.e3 
     199            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 
    189201            IF(lwp) WRITE(numout,*) 
    190202            IF(lwp) WRITE(numout,*) '             orca_r1: Timor Passage : e1v reduced to 20 km' 
    191203 
    192             ii0 =  55   ;   ii1 =  55        ! West Halmahera Strait (e1v = 30 km) 
    193             ij0 = 141   ;   ij1 = 142   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 30.e3 
     204            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 
    194206            IF(lwp) WRITE(numout,*) 
    195207            IF(lwp) WRITE(numout,*) '             orca_r1: W Halmahera : e1v reduced to 30 km' 
    196208 
    197             ii0 =  58   ;   ii1 =  58        ! East Halmahera Strait (e1v = 50 km) 
    198             ij0 = 141   ;   ij1 = 142   ;   e1v( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 50.e3 
     209            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 
    199211            IF(lwp) WRITE(numout,*) 
    200212            IF(lwp) WRITE(numout,*) '             orca_r1: E Halmahera : e1v reduced to 50 km' 
    201  
    202             ! 
    203  
    204             ! 
    205             ! 
    206213            ! 
    207214            ! 
  • trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90

    r5120 r5385  
    134134      INTEGER  ::   ijf, ijl, ij0, ij1       !   -       - 
    135135      INTEGER  ::   ios 
     136      INTEGER  ::   isrow                    ! index for ORCA1 starting row 
    136137      INTEGER , POINTER, DIMENSION(:,:) ::  imsk 
    137138      REAL(wp), POINTER, DIMENSION(:,:) ::  zwf 
     
    401402      IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN   ! ORCA R1 configuration 
    402403         !                                                 ! 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 
    403415         IF(lwp) WRITE(numout,*) 
    404416         IF(lwp) WRITE(numout,*) '   orca_r1: increase friction near the following straits : ' 
    405417         IF(lwp) WRITE(numout,*) '      Gibraltar ' 
    406          ii0 = 283   ;   ii1 = 284        ! Gibraltar Strait  
    407          ij0 = 200   ;   ij1 = 200   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 2._wp   
     418         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   
    408420 
    409421         IF(lwp) WRITE(numout,*) '      Bhosporus ' 
    410          ii0 = 314   ;   ii1 = 315        ! Bhosporus Strait  
    411          ij0 = 208   ;   ij1 = 208   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 2._wp   
     422         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   
    412424 
    413425         IF(lwp) WRITE(numout,*) '      Makassar (Top) ' 
    414          ii0 =  48   ;   ii1 =  48        ! Makassar Strait (Top)  
    415          ij0 = 149   ;   ij1 = 150   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 3._wp   
     426         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   
    416428 
    417429         IF(lwp) WRITE(numout,*) '      Lombok ' 
    418          ii0 =  44   ;   ii1 =  44        ! Lombok Strait  
    419          ij0 = 124   ;   ij1 = 125   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 2._wp   
     430         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   
    420432 
    421433         IF(lwp) WRITE(numout,*) '      Ombai ' 
    422          ii0 =  53   ;   ii1 =  53        ! Ombai Strait  
    423          ij0 = 124   ;   ij1 = 125   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 2._wp   
     434         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   
    424436 
    425437         IF(lwp) WRITE(numout,*) '      Timor Passage ' 
    426          ii0 =  56   ;   ii1 =  56        ! Timor Passage  
    427          ij0 = 124   ;   ij1 = 125   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 2._wp   
     438         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   
    428440 
    429441         IF(lwp) WRITE(numout,*) '      West Halmahera ' 
    430          ii0 =  58   ;   ii1 =  58        ! West Halmahera Strait  
    431          ij0 = 141   ;   ij1 = 142   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 3._wp   
     442         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   
    432444 
    433445         IF(lwp) WRITE(numout,*) '      East Halmahera ' 
    434          ii0 =  55   ;   ii1 =  55        ! East Halmahera Strait  
    435          ij0 = 141   ;   ij1 = 142   ;   fmask( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1), 1:jpk ) = 3._wp   
     446         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   
    436448         ! 
    437449      ENDIF 
  • trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r5120 r5385  
    10391039      INTEGER ::   ji, jj, jk                                          ! dummy loop indices 
    10401040      INTEGER ::   ij0, ij1, ii0, ii1                                  ! dummy loop indices 
     1041      INTEGER ::   isrow                                               ! index for ORCA1 starting row 
    10411042      !! acc 
    10421043      !! Hmm with the time splitting these "fixes" seem to do more harm than good. Temporarily disabled for 
     
    11221123      IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN    ! ORCA R1 configuration 
    11231124         !                                             ! ===================== 
    1124          ! 
    1125          ii0 = 281   ;   ii1 = 282        ! Gibraltar Strait (e2u was modified) 
    1126          ij0 = 200   ;   ij1 = 200 
     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  
     1127         ! 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      
     1135         ! 
     1136         ii0 = 282           ;   ii1 = 283        ! Gibraltar Strait (e2u was modified) 
     1137         ij0 = 201 + isrow   ;   ij1 = 201 + isrow 
    11271138         DO jk = 1, jpkm1 
    11281139            DO jj = mj0(ij0), mj1(ij1) 
     
    11441155         END DO 
    11451156         ! 
    1146          ii0 = 314   ;   ii1 = 315        ! Bhosporus Strait (e2u was modified) 
    1147          ij0 = 208   ;   ij1 = 208 
     1157         ii0 = 314           ;   ii1 = 315        ! Bhosporus Strait (e2u was modified) 
     1158         ij0 = 208 + isrow   ;   ij1 = 208 + isrow 
    11481159         DO jk = 1, jpkm1 
    11491160            DO jj = mj0(ij0), mj1(ij1) 
     
    11651176         END DO 
    11661177         ! 
    1167          ii0 =  44   ;   ii1 =  44        ! Lombok Strait (e1v was modified) 
    1168          ij0 = 124   ;   ij1 = 125 
     1178         ii0 =  44           ;   ii1 =  44        ! Lombok Strait (e1v was modified) 
     1179         ij0 = 124 + isrow   ;   ij1 = 125 + isrow 
    11691180         DO jk = 1, jpkm1 
    11701181            DO jj = mj0(ij0), mj1(ij1) 
     
    11811192         END DO 
    11821193         ! 
    1183          ii0 =  48   ;   ii1 =  48        ! Sumba Strait (e1v was modified) [closed from bathy_11 on] 
    1184          ij0 = 124   ;   ij1 = 125 
     1194         ii0 =  48           ;   ii1 =  48        ! Sumba Strait (e1v was modified) [closed from bathy_11 on] 
     1195         ij0 = 124 + isrow   ;   ij1 = 125 + isrow 
    11851196         DO jk = 1, jpkm1 
    11861197            DO jj = mj0(ij0), mj1(ij1) 
     
    11971208         END DO 
    11981209         ! 
    1199          ii0 =  53   ;   ii1 =  53        ! Ombai Strait (e1v was modified) 
    1200          ij0 = 124   ;   ij1 = 125 
     1210         ii0 =  53          ;   ii1 =  53        ! Ombai Strait (e1v was modified) 
     1211         ij0 = 124 + isrow  ;   ij1 = 125  + isrow   
    12011212         DO jk = 1, jpkm1 
    12021213            DO jj = mj0(ij0), mj1(ij1) 
     
    12131224         END DO 
    12141225         ! 
    1215          ii0 =  56   ;   ii1 =  56        ! Timor Passage (e1v was modified) 
    1216          ij0 = 124   ;   ij1 = 125 
     1226         ii0 =  56             ;   ii1 =  56        ! Timor Passage (e1v was modified) 
     1227         ij0 = 124  + isrow    ;   ij1 = 125  + isrow   
    12171228         DO jk = 1, jpkm1 
    12181229            DO jj = mj0(ij0), mj1(ij1) 
     
    12291240         END DO 
    12301241         ! 
    1231          ii0 =  55   ;   ii1 =  55        ! West Halmahera Strait (e1v was modified) 
    1232          ij0 = 141   ;   ij1 = 142 
     1242         ii0 =  55             ;   ii1 =  55        ! West Halmahera Strait (e1v was modified) 
     1243         ij0 = 141  + isrow    ;   ij1 = 142  + isrow   
    12331244         DO jk = 1, jpkm1 
    12341245            DO jj = mj0(ij0), mj1(ij1) 
     
    12451256         END DO 
    12461257         ! 
    1247          ii0 =  58   ;   ii1 =  58        ! East Halmahera Strait (e1v was modified) 
    1248          ij0 = 141   ;   ij1 = 142 
     1258         ii0 =  58             ;   ii1 =  58        ! East Halmahera Strait (e1v was modified) 
     1259         ij0 = 141  + isrow    ;   ij1 = 142  + isrow   
    12491260         DO jk = 1, jpkm1 
    12501261            DO jj = mj0(ij0), mj1(ij1) 
  • trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r5332 r5385  
    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 
    486501            !                                                ! ===================== 
    487502            IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration 
  • trunk/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r5363 r5385  
    126126         CALL set_grid( "V", glamv, gphiv ) 
    127127         CALL set_grid( "W", glamt, gphit ) 
     128         CALL set_grid_znl( gphit ) 
    128129      ENDIF 
    129130 
     
    135136         CALL set_grid( "V", glamv_crs, gphiv_crs )  
    136137         CALL set_grid( "W", glamt_crs, gphit_crs )  
     138         CALL set_grid_znl( gphit_crs ) 
    137139          ! 
    138140         CALL dom_grid_glo   ! Return to parent grid domain 
     
    13841386 
    13851387 
     1388   SUBROUTINE set_grid_znl( plat ) 
     1389      !!---------------------------------------------------------------------- 
     1390      !!                     ***  ROUTINE set_grid_znl  *** 
     1391      !! 
     1392      !! ** Purpose :   define grids for zonal mean 
     1393      !! 
     1394      !!---------------------------------------------------------------------- 
     1395      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   plat 
     1396      ! 
     1397      REAL(wp), DIMENSION(:), ALLOCATABLE  ::   zlon 
     1398      INTEGER  :: ni,nj, ix, iy 
     1399 
     1400       
     1401      ni=nlei-nldi+1 ; nj=nlej-nldj+1            ! define zonal mean domain (jpj*jpk) 
     1402      ALLOCATE( zlon(ni*nj) )       ;       zlon(:) = 0. 
     1403 
     1404      CALL iom_set_domain_attr("gznl", ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-1, jbegin=njmpp+nldj-1, ni=ni, nj=nj) 
     1405      CALL iom_set_domain_attr("gznl", data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 
     1406      CALL iom_set_domain_attr("gznl", lonvalue = zlon,   & 
     1407         &                             latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /)))   
     1408      ! 
     1409      CALL dom_ngb( 180., 90., ix, iy, 'T' ) !  i-line that passes near the North Pole : Reference latitude (used in plots) 
     1410      CALL iom_set_domain_attr ('ptr', zoom_ibegin=ix, zoom_nj=jpjglo) 
     1411      CALL iom_update_file_name('ptr') 
     1412      ! 
     1413   END SUBROUTINE set_grid_znl 
     1414 
    13861415   SUBROUTINE set_scalar 
    13871416      !!---------------------------------------------------------------------- 
     
    14681497      CALL set_mooring( zlonpira, zlatpira ) 
    14691498 
    1470       ! diaptr : zonal mean  
    1471       CALL dom_ngb( 180., 90., ix, iy, 'T' ) !  i-line that passes near the North Pole : Reference latitude (used in plots) 
    1472       CALL iom_set_domain_attr ('ptr', zoom_ibegin=ix, zoom_nj=jpjglo) 
    1473       CALL iom_update_file_name('ptr') 
    1474       ! 
    14751499       
    14761500   END SUBROUTINE set_xmlatt 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90

    r5123 r5385  
    5858   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qns_ice        !: non solar heat flux over ice                  [W/m2] 
    5959   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qsr_ice        !: solar heat flux over ice                      [W/m2] 
    60    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qsr_ice_mean   !: daily mean solar heat flux over ice           [W/m2] 
    6160   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qla_ice        !: latent flux over ice                          [W/m2] 
    6261   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dqla_ice       !: latent sensibility over ice                 [W/m2/K] 
     
    152151#endif 
    153152         ! 
    154 #if defined key_lim2 
    155       IF( ltrcdm2dc_ice )   ALLOCATE( qsr_ice_mean (jpi,jpj,jpl), STAT=ierr(3) ) 
    156 #endif 
    157          ! 
    158153#if defined key_cice || defined key_lim2 
    159154      IF( lk_cpl )   ALLOCATE( ht_i(jpi,jpj,jpl) , ht_s(jpi,jpj,jpl) , STAT=ierr(5) ) 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90

    r5120 r5385  
    8181   !!              Ocean Surface Boundary Condition fields 
    8282   !!---------------------------------------------------------------------- 
     83   INTEGER , PUBLIC ::  ncpl_qsr_freq            !: qsr coupling frequency per days from atmosphere 
     84   ! 
    8385   LOGICAL , PUBLIC ::   lhftau = .FALSE.        !: HF tau used in TKE: mean(stress module) - module(mean stress) 
    84    LOGICAL , PUBLIC ::   ltrcdm2dc               !: In case of Diurnal Cycle short wave, compute a Daily Mean short waves flux 
    8586   !!                                   !!   now    ! before   !! 
    8687   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   utau   , utau_b   !: sea surface i-stress (ocean referential)     [N/m2] 
     
    9091   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wndm              !: wind speed module at T-point (=|U10m-Uoce|)  [m/s] 
    9192   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qsr               !: sea heat flux:     solar                     [W/m2] 
    92    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qsr_mean          !: daily mean sea heat flux: solar              [W/m2] 
    9393   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qns    , qns_b    !: sea heat flux: non solar                     [W/m2] 
    9494   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qsr_tot           !: total     solar heat flux (over sea and ice) [W/m2] 
     
    162162#endif 
    163163         ! 
    164       IF( ltrcdm2dc ) ALLOCATE( qsr_mean(jpi,jpj) , STAT=ierr(5) ) 
    165          ! 
    166164      sbc_oce_alloc = MAXVAL( ierr ) 
    167165      IF( lk_mpp            )   CALL mpp_sum ( sbc_oce_alloc ) 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r5065 r5385  
    2222   !!   blk_oce_core    : computes momentum, heat and freshwater fluxes over ocean 
    2323   !!   blk_ice_core    : computes momentum, heat and freshwater fluxes over ice 
    24    !!   blk_bio_meanqsr : compute daily mean short wave radiation over the ocean 
    25    !!   blk_ice_meanqsr : compute daily mean short wave radiation over the ice 
    2624   !!   turb_core_2z    : Computes turbulent transfert coefficients 
    2725   !!   cd_neutral_10m  : Estimate of the neutral drag coefficient at 10m 
     
    5250   PUBLIC   sbc_blk_core         ! routine called in sbcmod module 
    5351   PUBLIC   blk_ice_core         ! routine called in sbc_ice_lim module 
    54    PUBLIC   blk_ice_meanqsr      ! routine called in sbc_ice_lim module 
    5552   PUBLIC   turb_core_2z         ! routine calles in sbcblk_mfs module 
    5653 
     
    195192      !                                            ! compute the surface ocean fluxes using CORE bulk formulea 
    196193      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( kt, sf, sst_m, ssu_m, ssv_m ) 
    197  
    198       ! If diurnal cycle is activated, compute a daily mean short waves flux for biogeochemistery 
    199       IF( ltrcdm2dc )   CALL blk_bio_meanqsr 
    200194 
    201195#if defined key_cice 
     
    302296      ELSE                  ;   qsr(:,:) = zztmp *          sf(jp_qsr)%fnow(:,:,1)   * tmask(:,:,1) 
    303297      ENDIF 
     298 
    304299      zqlw(:,:) = (  sf(jp_qlw)%fnow(:,:,1) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:)  ) * tmask(:,:,1)   ! Long  Wave 
    305300      ! ----------------------------------------------------------------------------- ! 
     
    611606      ! 
    612607   END SUBROUTINE blk_ice_core 
    613  
    614  
    615    SUBROUTINE blk_bio_meanqsr 
    616       !!--------------------------------------------------------------------- 
    617       !!                     ***  ROUTINE blk_bio_meanqsr 
    618       !!                      
    619       !! ** Purpose :   provide daily qsr_mean for PISCES when 
    620       !!                analytic diurnal cycle is applied in physic 
    621       !!                 
    622       !! ** Method  :   add part where there is no ice 
    623       !!  
    624       !!--------------------------------------------------------------------- 
    625       IF( nn_timing == 1 )  CALL timing_start('blk_bio_meanqsr') 
    626       ! 
    627       qsr_mean(:,:) = (1. - albo ) *  sf(jp_qsr)%fnow(:,:,1) 
    628       ! 
    629       IF( nn_timing == 1 )  CALL timing_stop('blk_bio_meanqsr') 
    630       ! 
    631    END SUBROUTINE blk_bio_meanqsr 
    632   
    633   
    634    SUBROUTINE blk_ice_meanqsr( palb, p_qsr_mean, pdim ) 
    635       !!--------------------------------------------------------------------- 
    636       !! 
    637       !! ** Purpose :   provide the daily qsr_mean over sea_ice for PISCES when 
    638       !!                analytic diurnal cycle is applied in physic 
    639       !! 
    640       !! ** Method  :   compute qsr 
    641       !!  
    642       !!--------------------------------------------------------------------- 
    643       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   palb       ! ice albedo (clear sky) (alb_ice_cs)               [%] 
    644       REAL(wp), DIMENSION(:,:,:), INTENT(  out) ::   p_qsr_mean !     solar heat flux over ice (T-point)         [W/m2] 
    645       INTEGER                   , INTENT(in   ) ::   pdim       ! number of ice categories 
    646       ! 
    647       INTEGER  ::   ijpl          ! number of ice categories (size of 3rd dim of input arrays) 
    648       INTEGER  ::   ji, jj, jl    ! dummy loop indices 
    649       REAL(wp) ::   zztmp         ! temporary variable 
    650       !!--------------------------------------------------------------------- 
    651       IF( nn_timing == 1 )  CALL timing_start('blk_ice_meanqsr') 
    652       ! 
    653       ijpl  = pdim                            ! number of ice categories 
    654       zztmp = 1. / ( 1. - albo ) 
    655       !                                     ! ========================== ! 
    656       DO jl = 1, ijpl                       !  Loop over ice categories  ! 
    657          !                                  ! ========================== ! 
    658          DO jj = 1 , jpj 
    659             DO ji = 1, jpi 
    660                   p_qsr_mean(ji,jj,jl) = zztmp * ( 1. - palb(ji,jj,jl) ) * qsr_mean(ji,jj) 
    661             END DO 
    662          END DO 
    663       END DO 
    664       ! 
    665       IF( nn_timing == 1 )  CALL timing_stop('blk_ice_meanqsr') 
    666       ! 
    667    END SUBROUTINE blk_ice_meanqsr   
    668  
    669608 
    670609   SUBROUTINE turb_core_2z( zt, zu, sst, T_zt, q_sat, q_zt, dU,    & 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90

    r4990 r5385  
    194194               &                      tprecip    , sprecip    ,                         & 
    195195               &                      fr1_i0     , fr2_i0     , cp_ice_msh , jpl  ) 
    196             IF( ltrcdm2dc_ice )   CALL blk_ice_meanqsr( zalb_ice, qsr_ice_mean, jpl ) 
    197196 
    198197         CASE( jp_cpl )            ! Coupled formulation : atmosphere-ice stress only (fluxes provided after ice dynamics) 
     
    232231            CALL sbc_cpl_ice_flx( frld,                                              & 
    233232            !                                optional arguments, used only in 'mixed oce-ice' case 
    234             &                                             palbi = zalb_ice, psst = sst_m, pist = zsist ) 
     233            &                                             palbi=zalb_ice, psst=sst_m, pist=zsist ) 
    235234            sprecip(:,:) = - emp_ice(:,:)   ! Ugly patch, WARNING, in coupled mode, sublimation included in snow (parsub = 0.) 
    236235         ENDIF 
    237236                           CALL lim_thd_2      ( kt )      ! Ice thermodynamics  
    238237                           CALL lim_sbc_flx_2  ( kt )      ! update surface ocean mass, heat & salt fluxes  
    239 #if defined key_top 
    240         IF( ltrcdm2dc_ice )CALL lim_bio_meanqsr_2 
    241 #endif 
    242238 
    243239         IF(  .NOT. lk_mpp )THEN 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r5123 r5385  
    2424   USE phycst           ! physical constants 
    2525   USE sbc_oce          ! Surface boundary condition: ocean fields 
     26   USE trc_oce          ! shared ocean-passive tracers variables 
    2627   USE sbc_ice          ! Surface boundary condition: ice fields 
    2728   USE sbcdcy           ! surface boundary condition: diurnal cycle 
     
    151152      END SELECT 
    152153      ! 
    153 #if defined key_top && ! defined key_offline 
    154       ltrcdm2dc = (ln_dm2dc .AND. ln_blk_core .AND. nn_ice==2) 
    155       IF( ltrcdm2dc )THEN 
    156          IF(lwp)THEN 
    157             WRITE(numout,*)"analytical diurnal cycle, core bulk formulation and LIM2 use: " 
    158             WRITE(numout,*)"Diurnal cycle on physics but not in passive tracers" 
    159          ENDIF 
    160       ENDIF 
    161 #else  
    162       ltrcdm2dc =  .FALSE. 
    163 #endif 
    164  
    165       ! 
    166154      !                              ! allocate sbc arrays 
    167155      IF( sbc_oce_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_oce arrays' ) 
     
    238226         & asked coupling with drag coefficient (ln_cdgw =T) or Stokes drift (ln_sdw=T) ') 
    239227      ENDIF  
    240        
    241228      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
    242229      icpt = 0 
     
    273260      IF( ln_ssr           )   CALL sbc_ssr_init               ! Sea-Surface Restoring initialisation 
    274261      ! 
     262      IF( ln_rnf           )   CALL sbc_rnf_init               ! Runof initialisation 
     263      ! 
    275264      IF( nn_ice == 3      )   CALL sbc_lim_init               ! LIM3 initialisation 
    276265 
     
    278267      ! 
    279268      IF( nsbc   == jp_cpl )   CALL sbc_cpl_init (nn_ice)      ! OASIS initialisation. must be done before first time step 
    280  
     269       
    281270   END SUBROUTINE sbc_init 
    282271 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90

    r4990 r5385  
    3737   !                                                     !!* namsbc_rnf namelist * 
    3838   CHARACTER(len=100), PUBLIC ::   cn_dir          !: Root directory for location of ssr files 
    39    LOGICAL           , PUBLIC ::   ln_rnf_depth    !: depth       river runoffs attribute specified in a file 
     39   LOGICAL           , PUBLIC ::   ln_rnf_depth      !: depth       river runoffs attribute specified in a file 
     40   LOGICAL                    ::   ln_rnf_depth_ini  !: depth       river runoffs  computed at the initialisation 
     41   REAL(wp)                   ::   rn_rnf_max        !: maximum value of the runoff climatologie ( ln_rnf_depth_ini = .true ) 
     42   REAL(wp)                   ::   rn_dep_max        !: depth over which runoffs is spread ( ln_rnf_depth_ini = .true ) 
     43   INTEGER                    ::   nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0) 
    4044   LOGICAL           , PUBLIC ::   ln_rnf_tem      !: temperature river runoffs attribute specified in a file 
    4145   LOGICAL           , PUBLIC ::   ln_rnf_sal      !: salinity    river runoffs attribute specified in a file 
     
    104108      ! 
    105109      CALL wrk_alloc( jpi,jpj, ztfrz) 
    106  
    107       ! 
    108       IF( kt == nit000 )   CALL sbc_rnf_init                           ! Read namelist and allocate structures 
    109110 
    110111      !                                            ! ---------------------------------------- ! 
     
    255256      !!---------------------------------------------------------------------- 
    256257      CHARACTER(len=32) ::   rn_dep_file   ! runoff file name 
    257       INTEGER           ::   ji, jj, jk    ! dummy loop indices 
     258      INTEGER           ::   ji, jj, jk, jm    ! dummy loop indices 
    258259      INTEGER           ::   ierror, inum  ! temporary integer 
    259260      INTEGER           ::   ios           ! Local integer output status for namelist read 
     261      INTEGER           ::   nbrec         ! temporary integer 
     262      REAL(wp)          ::   zacoef   
     263      REAL(wp), DIMENSION(12)                 :: zrec             ! times records 
     264      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zrnfcl     
     265      REAL(wp), DIMENSION(:,:  ), ALLOCATABLE :: zrnf 
    260266      ! 
    261267      NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, ln_rnf_depth, ln_rnf_tem, ln_rnf_sal,   & 
    262268         &                 sn_rnf, sn_cnf    , sn_s_rnf    , sn_t_rnf  , sn_dep_rnf,   & 
    263          &                 ln_rnf_mouth      , rn_hrnf     , rn_avt_rnf, rn_rfact 
     269         &                 ln_rnf_mouth      , rn_hrnf     , rn_avt_rnf, rn_rfact,     & 
     270         &                 ln_rnf_depth_ini  , rn_dep_max  , rn_rnf_max, nn_rnf_depth_file 
    264271      !!---------------------------------------------------------------------- 
    265272      ! 
     
    299306         IF(lwp) WRITE(numout,*) 
    300307         IF(lwp) WRITE(numout,*) '          runoffs directly provided in the precipitations' 
    301          IF( ln_rnf_depth .OR. ln_rnf_tem .OR. ln_rnf_sal ) THEN 
     308         IF( ln_rnf_depth .OR. ln_rnf_tem .OR. ln_rnf_sal .OR. ln_rnf_depth_ini ) THEN 
    302309           CALL ctl_warn( 'runoffs already included in precipitations, so runoff (T,S, depth) attributes will not be used' ) 
    303            ln_rnf_depth = .FALSE.   ;   ln_rnf_tem = .FALSE.   ;   ln_rnf_sal = .FALSE. 
     310           ln_rnf_depth = .FALSE.   ;   ln_rnf_tem = .FALSE.   ;   ln_rnf_sal = .FALSE.  ;   ln_rnf_depth_ini = .FALSE. 
    304311         ENDIF 
    305312         ! 
     
    375382               END DO 
    376383            END DO 
     384            ! 
     385         ELSE IF( ln_rnf_depth_ini ) THEN           ! runoffs applied at the surface 
     386            ! 
     387            IF(lwp) WRITE(numout,*) 
     388            IF(lwp) WRITE(numout,*) '    depth of runoff computed once from max value of runoff' 
     389            IF(lwp) WRITE(numout,*) '    max value of the runoff climatologie (over global domain) rn_rnf_max = ', rn_rnf_max 
     390            IF(lwp) WRITE(numout,*) '    depth over which runoffs is spread                        rn_dep_max = ', rn_dep_max 
     391            IF(lwp) WRITE(numout,*) '     create (=1) a runoff depth file or not (=0)      nn_rnf_depth_file  = ', nn_rnf_depth_file 
     392 
     393            CALL iom_open( TRIM( sn_rnf%clname ), inum )    !  open runoff file 
     394            CALL iom_gettime( inum, zrec, kntime=nbrec) 
     395            ALLOCATE( zrnfcl(jpi,jpj,nbrec) )     ;      ALLOCATE( zrnf(jpi,jpj) ) 
     396            DO jm = 1, nbrec 
     397               CALL iom_get( inum, jpdom_data, TRIM( sn_rnf%clvar ), zrnfcl(:,:,jm), jm ) 
     398            END DO 
     399            CALL iom_close( inum ) 
     400            zrnf(:,:) = MAXVAL( zrnfcl(:,:,:), DIM=3 )   !  maximum value in time 
     401            DEALLOCATE( zrnfcl ) 
     402            ! 
     403            h_rnf(:,:) = 1. 
     404            ! 
     405            zacoef = rn_dep_max / rn_rnf_max            ! coef of linear relation between runoff and its depth (150m for max of runoff) 
     406            ! 
     407            WHERE( zrnf(:,:) > 0._wp )  h_rnf(:,:) = zacoef * zrnf(:,:)   ! compute depth for all runoffs 
     408            ! 
     409            DO jj = 1, jpj                     ! take in account min depth of ocean rn_hmin 
     410               DO ji = 1, jpi 
     411                  IF( zrnf(ji,jj) > 0._wp ) THEN 
     412                     jk = mbkt(ji,jj) 
     413                     h_rnf(ji,jj) = MIN( h_rnf(ji,jj), gdept_0(ji,jj,jk ) ) 
     414                  ENDIF 
     415               END DO 
     416            END DO 
     417            ! 
     418            nk_rnf(:,:) = 0                       ! number of levels on which runoffs are distributed 
     419            DO jj = 1, jpj 
     420               DO ji = 1, jpi 
     421                   IF( zrnf(ji,jj) > 0._wp ) THEN 
     422                     jk = 2 
     423                     DO WHILE ( jk /= mbkt(ji,jj) .AND. gdept_0(ji,jj,jk) < h_rnf(ji,jj) ) ;  jk = jk + 1 ;  END DO 
     424                     nk_rnf(ji,jj) = jk 
     425                   ELSE 
     426                     nk_rnf(ji,jj) = 1 
     427                   ENDIF 
     428                END DO 
     429            END DO 
     430            ! 
     431            DEALLOCATE( zrnf ) 
     432            ! 
     433            DO jj = 1, jpj                                ! set the associated depth 
     434               DO ji = 1, jpi 
     435                  h_rnf(ji,jj) = 0._wp 
     436                  DO jk = 1, nk_rnf(ji,jj) 
     437                     h_rnf(ji,jj) = h_rnf(ji,jj) + fse3t(ji,jj,jk) 
     438                  END DO 
     439               END DO 
     440            END DO 
     441            ! 
     442            IF( nn_rnf_depth_file == 1 ) THEN      !  save  output nb levels for runoff 
     443               IF(lwp) WRITE(numout,*) '              create runoff depht file' 
     444               CALL iom_open  ( TRIM( sn_dep_rnf%clname ), inum, ldwrt = .TRUE., kiolib = jprstlib ) 
     445               CALL iom_rstput( 0, 0, inum, 'rodepth', h_rnf ) 
     446               CALL iom_close ( inum ) 
     447            ENDIF 
    377448         ELSE                                       ! runoffs applied at the surface 
    378449            nk_rnf(:,:) = 1 
  • trunk/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r4990 r5385  
    143143      ELSE                                            ! Leap-Frog + Asselin filter time stepping 
    144144         ! 
    145          IF( lk_vvl )  THEN   ;   CALL tra_nxt_vvl( kt, nit000, 'TRA', tsb, tsn, tsa, jpts )  ! variable volume level (vvl)      
    146          ELSE                 ;   CALL tra_nxt_fix( kt, nit000, 'TRA', tsb, tsn, tsa, jpts )  ! fixed    volume level  
     145         IF( lk_vvl )  THEN   ;   CALL tra_nxt_vvl( kt, nit000, rdttra, 'TRA', tsb, tsn, tsa,   & 
     146           &                                                              sbc_tsc, sbc_tsc_b, jpts )  ! variable volume level (vvl)  
     147         ELSE                 ;   CALL tra_nxt_fix( kt, nit000,         'TRA', tsb, tsn, tsa, jpts )  ! fixed    volume level  
    147148         ENDIF 
    148149      ENDIF  
     
    241242 
    242243 
    243    SUBROUTINE tra_nxt_vvl( kt, kit000, cdtype, ptb, ptn, pta, kjpt ) 
     244   SUBROUTINE tra_nxt_vvl( kt, kit000, p2dt, cdtype, ptb, ptn, pta, psbc_tc, psbc_tc_b, kjpt ) 
    244245      !!---------------------------------------------------------------------- 
    245246      !!                   ***  ROUTINE tra_nxt_vvl  *** 
     
    265266      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
    266267      !!---------------------------------------------------------------------- 
    267       INTEGER         , INTENT(in   )                               ::   kt       ! ocean time-step index 
    268       INTEGER         , INTENT(in   )                               ::   kit000   ! first time step index 
    269       CHARACTER(len=3), INTENT(in   )                               ::   cdtype   ! =TRA or TRC (tracer indicator) 
    270       INTEGER         , INTENT(in   )                               ::   kjpt     ! number of tracers 
    271       REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::   ptb      ! before tracer fields 
    272       REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::   ptn      ! now tracer fields 
    273       REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::   pta      ! tracer trend 
     268      INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index 
     269      INTEGER         , INTENT(in   )                               ::  kit000   ! first time step index 
     270      REAL(wp)        , INTENT(in   ), DIMENSION(jpk)               ::  p2dt     ! time-step 
     271      CHARACTER(len=3), INTENT(in   )                               ::  cdtype   ! =TRA or TRC (tracer indicator) 
     272      INTEGER         , INTENT(in   )                               ::  kjpt     ! number of tracers 
     273      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::  ptb      ! before tracer fields 
     274      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::  ptn      ! now tracer fields 
     275      REAL(wp)        , INTENT(inout), DIMENSION(jpi,jpj,jpk,kjpt)  ::  pta      ! tracer trend 
     276      REAL(wp)        , INTENT(in   ), DIMENSION(jpi,jpj,kjpt)      ::  psbc_tc   ! surface tracer content 
     277      REAL(wp)        , INTENT(in   ), DIMENSION(jpi,jpj,kjpt)      ::  psbc_tc_b ! before surface tracer content 
     278 
    274279      !!      
    275       LOGICAL  ::   ll_tra, ll_tra_hpg, ll_traqsr   ! local logical 
     280      LOGICAL  ::   ll_tra_hpg, ll_traqsr   ! local logical 
    276281      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    277282      REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
     
    286291      ! 
    287292      IF( cdtype == 'TRA' )  THEN    
    288          ll_tra     = .TRUE.           ! active tracers case   
    289293         ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg 
    290294         ll_traqsr  = ln_traqsr        ! active  tracers case  and  solar penetration 
    291295      ELSE                           
    292          ll_tra     = .FALSE.          ! passive tracers case 
    293296         ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    294297         ll_traqsr  = .FALSE.          ! active  tracers case and NO solar penetration 
     
    297300      DO jn = 1, kjpt       
    298301         DO jk = 1, jpkm1 
    299             zfact1 = atfp * rdttra(jk) 
     302            zfact1 = atfp * p2dt(jk) 
    300303            zfact2 = zfact1 / rau0 
    301304            DO jj = 1, jpj 
     
    315318                  ztc_f  = ztc_n  + atfp * ztc_d 
    316319                  ! 
    317                   IF( ll_tra .AND. jk == 1 ) THEN           ! first level only for T & S 
    318                       ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) ) 
    319                       ztc_f  = ztc_f  - zfact1 * ( sbc_tsc(ji,jj,jn) - sbc_tsc_b(ji,jj,jn) ) 
     320                  IF( jk == 1 ) THEN           ! first level  
     321                     ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj) - emp(ji,jj) ) 
     322                     ztc_f  = ztc_f  - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) ) 
    320323                  ENDIF 
    321324                  IF( ll_traqsr .AND. jn == jp_tem .AND. jk <= nksr )   &     ! solar penetration (temperature only) 
  • trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r4990 r5385  
    8888         &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    8989      END SELECT 
     90      ! DRAKKAR SSS control { 
     91      ! JMM avoid negative salinities near river outlet ! Ugly fix 
     92      ! JMM : restore negative salinities to small salinities: 
     93      WHERE ( tsa(:,:,:,jp_sal) < 0._wp )   tsa(:,:,:,jp_sal) = 0.1_wp 
    9094 
    9195      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
  • trunk/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90

    r4623 r5385  
    3232   !!   'key_top'                                                 bio-model           
    3333   !!---------------------------------------------------------------------- 
     34   LOGICAL, PUBLIC, PARAMETER ::   lk_top     = .TRUE.   !: TOP model 
    3435   LOGICAL, PUBLIC, PARAMETER ::   lk_qsr_bio = .TRUE.   !: bio-model light absorption flag 
    3536#else 
     
    3738   !! Default option                          No bio-model light absorption       
    3839   !!---------------------------------------------------------------------- 
     40   LOGICAL, PUBLIC, PARAMETER ::   lk_top     = .FALSE.   !: TOP model 
    3941   LOGICAL, PUBLIC, PARAMETER ::   lk_qsr_bio = .FALSE.   !: bio-model light absorption flag 
    4042#endif 
Note: See TracChangeset for help on using the changeset viewer.