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 13216 for NEMO/trunk/src/OCE – NEMO

Changeset 13216 for NEMO/trunk/src/OCE


Ignore:
Timestamp:
2020-07-02T11:25:49+02:00 (4 years ago)
Author:
rblod
Message:

Merge dev_r12973_AGRIF_CMEMS

Location:
NEMO/trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk

    • Property svn:externals
      •  

        old new  
        22^/utils/build/makenemo@HEAD   makenemo 
        33^/utils/build/mk@HEAD         mk 
        4 ^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
         4^/utils/tools/@HEAD           tools 
         5^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
  • NEMO/trunk/src/OCE/DOM/dom_oce.F90

    r12933 r13216  
    215215#if defined key_agrif 
    216216   LOGICAL, PUBLIC, PARAMETER ::   lk_agrif = .TRUE.    !: agrif flag 
     217   LOGICAL, PUBLIC            ::   lk_south, lk_north, lk_west, lk_east !: Child grid boundaries (interpolation or not) 
    217218#else 
    218219   LOGICAL, PUBLIC, PARAMETER ::   lk_agrif = .FALSE.   !: agrif flag 
  • NEMO/trunk/src/OCE/DOM/domain.F90

    r12489 r13216  
    187187      ENDIF 
    188188      ! 
     189 
    189190      IF( lk_c1d         )   CALL cor_c1d       ! 1D configuration: Coriolis set at T-point 
    190191      ! 
     192 
     193#if defined key_agrif 
     194      IF( .NOT. Agrif_Root() ) CALL Agrif_Init_Domain( Kbb, Kmm, Kaa ) 
     195#endif 
    191196      IF( ln_meshmask    )   CALL dom_wri       ! Create a domain file 
    192197      IF( .NOT.ln_rstart )   CALL dom_ctl       ! Domain control 
     
    307312902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namrun in configuration namelist' ) 
    308313      IF(lwm) WRITE ( numond, namrun ) 
     314 
     315#if defined key_agrif 
     316      IF( .NOT. Agrif_Root() ) THEN 
     317            nn_it000 = (Agrif_Parent(nn_it000)-1)*Agrif_IRhot() + 1 
     318            nn_itend =  Agrif_Parent(nn_itend)   *Agrif_IRhot() 
     319      ENDIF 
     320#endif 
    309321      ! 
    310322      IF(lwp) THEN                  ! control print 
     
    403415      IF(lwm) WRITE( numond, namdom ) 
    404416      ! 
     417#if defined key_agrif 
     418      IF( .NOT. Agrif_Root() ) THEN 
     419            rn_Dt = Agrif_Parent(rn_Dt) / Agrif_Rhot() 
     420      ENDIF 
     421#endif 
     422      ! 
    405423      IF(lwp) THEN 
    406424         WRITE(numout,*) 
  • NEMO/trunk/src/OCE/DOM/istate.F90

    r13100 r13216  
    3434   USE lib_mpp         ! MPP library 
    3535   USE restart         ! restart 
     36#if defined key_agrif 
     37   USE agrif_oce_interp 
     38   USE agrif_oce 
     39#endif    
    3640 
    3741   IMPLICIT NONE 
     
    6973!!gm  Why not include in the first call of dta_tsd ?   
    7074!!gm  probably associated with the use of internal damping... 
    71                      CALL dta_tsd_init        ! Initialisation of T & S input data 
     75       CALL dta_tsd_init        ! Initialisation of T & S input data 
    7276!!gm to be moved in usrdef of C1D case 
    7377!      IF( lk_c1d )   CALL dta_uvd_init        ! Initialization of U & V input data 
     
    8387#endif 
    8488 
     89#if defined key_agrif 
     90      IF ( (.NOT.Agrif_root()).AND.ln_init_chfrpar ) THEN 
     91         numror = 0                           ! define numror = 0 -> no restart file to read 
     92         ln_1st_euler = .true.                ! Set time-step indicator at nit000 (euler forward) 
     93         CALL day_init  
     94         CALL agrif_istate( Kbb, Kmm, Kaa )   ! Interp from parent 
     95         ! 
     96         ts  (:,:,:,:,Kmm) = ts (:,:,:,:,Kbb)  
     97         ssh (:,:,Kmm)     = ssh(:,:,Kbb) 
     98         uu   (:,:,:,Kmm)   = uu  (:,:,:,Kbb) 
     99         vv   (:,:,:,Kmm)   = vv  (:,:,:,Kbb) 
     100      ELSE 
     101#endif 
    85102      IF( ln_rstart ) THEN                    ! Restart from a file 
    86103         !                                    ! ------------------- 
     
    99116            ! 
    100117            ssh(:,:,Kbb)   = 0._wp               ! set the ocean at rest 
     118            uu  (:,:,:,Kbb) = 0._wp 
     119            vv  (:,:,:,Kbb) = 0._wp   
     120            ! 
    101121            IF( ll_wd ) THEN 
    102122               ssh(:,:,Kbb) =  -ssh_ref  ! Added in 30 here for bathy that adds 30 as Iterative test CEOD  
     
    110130               END_2D 
    111131            ENDIF  
    112             uu  (:,:,:,Kbb) = 0._wp 
    113             vv  (:,:,:,Kbb) = 0._wp   
    114             ! 
     132             ! 
    115133         ELSE                                 ! user defined initial T and S 
    116134            CALL usr_def_istate( gdept(:,:,:,Kbb), tmask, ts(:,:,:,:,Kbb), uu(:,:,:,Kbb), vv(:,:,:,Kbb), ssh(:,:,Kbb)  )          
     
    147165         !  
    148166      ENDIF  
     167#if defined key_agrif 
     168      ENDIF 
     169#endif 
    149170      !  
    150171      ! Initialize "now" and "before" barotropic velocities: 
  • NEMO/trunk/src/OCE/DYN/dynspg_ts.F90

    r12489 r13216  
    513513         END_2D 
    514514         ! 
     515         ! Duplicate sea level across open boundaries (this is only cosmetic if linssh=T) 
     516         IF( ln_bdy )   CALL bdy_ssh( ssha_e ) 
     517#if defined key_agrif 
     518         IF( .NOT.Agrif_Root() )   CALL agrif_ssh_ts( jn ) 
     519#endif 
     520 
    515521         CALL lbc_lnk_multi( 'dynspg_ts', ssha_e, 'T', 1._wp,  zhU, 'U', -1._wp,  zhV, 'V', -1._wp ) 
    516522         ! 
     
    525531         END IF 
    526532         ! 
    527          ! Duplicate sea level across open boundaries (this is only cosmetic if linssh=T) 
    528          IF( ln_bdy )   CALL bdy_ssh( ssha_e ) 
    529 #if defined key_agrif 
    530          IF( .NOT.Agrif_Root() )   CALL agrif_ssh_ts( jn ) 
    531 #endif 
    532533         !   
    533534         ! Sea Surface Height at u-,v-points (vvl case only) 
     
    643644         ENDIF 
    644645        
    645          IF( .NOT.ln_linssh ) THEN   !* Update ocean depth (variable volume case only) 
     646         IF( .NOT.ln_linssh ) THEN !* Update ocean depth (variable volume case only) 
    646647            hu_e (2:jpim1,2:jpjm1) = hu_0(2:jpim1,2:jpjm1) + zsshu_a(2:jpim1,2:jpjm1) 
    647648            hur_e(2:jpim1,2:jpjm1) = ssumask(2:jpim1,2:jpjm1) / ( hu_e(2:jpim1,2:jpjm1) + 1._wp - ssumask(2:jpim1,2:jpjm1) ) 
    648649            hv_e (2:jpim1,2:jpjm1) = hv_0(2:jpim1,2:jpjm1) + zsshv_a(2:jpim1,2:jpjm1) 
    649650            hvr_e(2:jpim1,2:jpjm1) = ssvmask(2:jpim1,2:jpjm1) / ( hv_e(2:jpim1,2:jpjm1) + 1._wp - ssvmask(2:jpim1,2:jpjm1) ) 
     651         ENDIF 
     652         !                                                 ! open boundaries 
     653         IF( ln_bdy )   CALL bdy_dyn2d( jn, ua_e, va_e, un_e, vn_e, hur_e, hvr_e, ssha_e ) 
     654#if defined key_agrif                                                            
     655         IF( .NOT.Agrif_Root() )  CALL agrif_dyn_ts( jn )  ! Agrif 
     656#endif 
     657         ! 
     658         IF( .NOT.ln_linssh ) THEN   !* Update ocean depth (variable volume case only) 
    650659            CALL lbc_lnk_multi( 'dynspg_ts', ua_e , 'U', -1._wp, va_e , 'V', -1._wp  & 
    651660                 &                         , hu_e , 'U',  1._wp, hv_e , 'V',  1._wp  & 
     
    655664         ENDIF 
    656665         ! 
    657          ! 
    658          !                                                 ! open boundaries 
    659          IF( ln_bdy )   CALL bdy_dyn2d( jn, ua_e, va_e, un_e, vn_e, hur_e, hvr_e, ssha_e ) 
    660 #if defined key_agrif                                                            
    661          IF( .NOT.Agrif_Root() )  CALL agrif_dyn_ts( jn )  ! Agrif 
    662 #endif 
    663666         !                                             !* Swap 
    664667         !                                             !  ---- 
  • NEMO/trunk/src/OCE/DYN/sshwzv.F90

    r12965 r13216  
    204204         ! Mask vertical velocity at first/last columns/row  
    205205         ! inside computational domain (cosmetic)  
    206          ! --- West --- ! 
    207          DO ji = mi0(2), mi1(2) 
    208             DO jj = 1, jpj 
    209                pww(ji,jj,:) = 0._wp  
     206         ! --- West --- !          
     207         IF( lk_west) THEN 
     208            DO ji = mi0(2), mi1(2) 
     209               DO jj = 1, jpj 
     210                  pww(ji,jj,:) = 0._wp  
     211               ENDDO 
    210212            ENDDO 
    211          ENDDO 
     213         ENDIF 
    212214         ! 
    213215         ! --- East --- ! 
    214          DO ji = mi0(jpiglo-1), mi1(jpiglo-1) 
    215             DO jj = 1, jpj 
    216                pww(ji,jj,:) = 0._wp 
     216         IF( lk_east) THEN 
     217            DO ji = mi0(jpiglo-1), mi1(jpiglo-1) 
     218               DO jj = 1, jpj 
     219                  pww(ji,jj,:) = 0._wp 
     220               ENDDO 
    217221            ENDDO 
    218          ENDDO 
     222         ENDIF 
    219223         ! 
    220224         ! --- South --- ! 
    221          DO jj = mj0(2), mj1(2) 
    222             DO ji = 1, jpi 
    223                pww(ji,jj,:) = 0._wp 
     225         IF( lk_south) THEN 
     226            DO jj = mj0(2), mj1(2) 
     227               DO ji = 1, jpi 
     228                  pww(ji,jj,:) = 0._wp 
     229               ENDDO 
    224230            ENDDO 
    225          ENDDO 
     231         ENDIF 
    226232         ! 
    227233         ! --- North --- ! 
    228          DO jj = mj0(jpjglo-1), mj1(jpjglo-1) 
    229             DO ji = 1, jpi 
    230                pww(ji,jj,:) = 0._wp 
     234         IF( lk_north) THEN 
     235            DO jj = mj0(jpjglo-1), mj1(jpjglo-1) 
     236               DO ji = 1, jpi 
     237                  pww(ji,jj,:) = 0._wp 
     238               ENDDO 
    231239            ENDDO 
    232          ENDDO 
     240         ENDIF 
     241         ! 
    233242      ENDIF  
    234243#endif  
  • NEMO/trunk/src/OCE/FLO/floblk.F90

    r12649 r13216  
    4141      INTEGER, INTENT( in  ) ::   Kbb, Kmm ! ocean time level indices 
    4242      !! 
     43#ifndef key_agrif 
     44 
     45!RB super quick fix to compile with agrif 
     46 
    4347      INTEGER :: jfl              ! dummy loop arguments 
    4448      INTEGER :: ind, ifin, iloop 
     
    364368         GO TO 222 
    365369      ENDIF 
     370#endif 
    366371      ! 
    367372      ! 
  • NEMO/trunk/src/OCE/LBC/lib_mpp.F90

    r13062 r13216  
    137137 
    138138   ! Communications summary report 
    139    CHARACTER(len=128), DIMENSION(:), ALLOCATABLE ::   crname_lbc                   !: names of lbc_lnk calling routines 
    140    CHARACTER(len=128), DIMENSION(:), ALLOCATABLE ::   crname_glb                   !: names of global comm calling routines 
    141    CHARACTER(len=128), DIMENSION(:), ALLOCATABLE ::   crname_dlg                   !: names of delayed global comm calling routines 
     139   CHARACTER(len=lca), DIMENSION(:), ALLOCATABLE ::   crname_lbc                   !: names of lbc_lnk calling routines 
     140   CHARACTER(len=lca), DIMENSION(:), ALLOCATABLE ::   crname_glb                   !: names of global comm calling routines 
     141   CHARACTER(len=lca), DIMENSION(:), ALLOCATABLE ::   crname_dlg                   !: names of delayed global comm calling routines 
    142142   INTEGER, PUBLIC                               ::   ncom_stp = 0                 !: copy of time step # istp 
    143143   INTEGER, PUBLIC                               ::   ncom_fsbc = 1                !: copy of sbc time step # nn_fsbc 
  • NEMO/trunk/src/OCE/LBC/mppini.F90

    r12377 r13216  
    102102            &           'the domain is lay out for distributed memory computing!' ) 
    103103         ! 
     104#if defined key_agrif 
     105    IF (.NOT.agrif_root()) THEN 
     106      call agrif_nemo_init() 
     107    ENDIF 
     108#endif 
    104109   END SUBROUTINE mpp_init 
    105110 
     
    333338#if defined key_agrif 
    334339      IF( .NOT. Agrif_Root() ) THEN       ! AGRIF children: specific setting (cf. agrif_user.F90) 
    335          IF( jpiglo /= nbcellsx + 2 + 2*nbghostcells )   & 
    336             CALL ctl_stop( 'STOP', 'mpp_init: Agrif children requires jpiglo == nbcellsx + 2 + 2*nbghostcells' ) 
    337          IF( jpjglo /= nbcellsy + 2 + 2*nbghostcells )   & 
    338             CALL ctl_stop( 'STOP', 'mpp_init: Agrif children requires jpjglo == nbcellsy + 2 + 2*nbghostcells' ) 
    339          IF( ln_use_jattr )   CALL ctl_stop( 'STOP', 'mpp_init:Agrif children requires ln_use_jattr = .false. ' ) 
     340         CALL agrif_nemo_init() 
    340341      ENDIF 
    341342#endif 
  • NEMO/trunk/src/OCE/OBS/diaobs.F90

    r12489 r13216  
    9494   TYPE(obs_prof), PUBLIC, POINTER, DIMENSION(:) ::   profdataqc   !: Profile data after quality control 
    9595 
    96    CHARACTER(len=6), PUBLIC, DIMENSION(:), ALLOCATABLE ::   cobstypesprof, cobstypessurf   !: Profile & surface obs types 
     96   CHARACTER(len=lca), PUBLIC, DIMENSION(:), ALLOCATABLE ::   cobstypesprof, cobstypessurf   !: Profile & surface obs types 
    9797 
    9898   !!---------------------------------------------------------------------- 
  • NEMO/trunk/src/OCE/SBC/sbcmod.F90

    r12994 r13216  
    121121#endif 
    122122      ! 
     123      ! 
    123124      IF(lwp) THEN                  !* Control print 
    124125         WRITE(numout,*) '   Namelist namsbc (partly overwritten with CPP key setting)' 
  • NEMO/trunk/src/OCE/STO/stopar.F90

    r12933 r13216  
    5656   INTEGER,          DIMENSION(:),       ALLOCATABLE :: sto3d_ord  ! order of autoregressive process 
    5757 
    58    CHARACTER(len=1), DIMENSION(:),       ALLOCATABLE :: sto2d_typ  ! nature of grid point (T, U, V, W, F, I) 
    59    CHARACTER(len=1), DIMENSION(:),       ALLOCATABLE :: sto3d_typ  ! nature of grid point (T, U, V, W, F, I) 
     58   CHARACTER(len=lca), DIMENSION(:),       ALLOCATABLE :: sto2d_typ  ! nature of grid point (T, U, V, W, F, I) 
     59   CHARACTER(len=lca), DIMENSION(:),       ALLOCATABLE :: sto3d_typ  ! nature of grid point (T, U, V, W, F, I) 
    6060   REAL(wp),         DIMENSION(:),       ALLOCATABLE :: sto2d_sgn  ! control of the sign accross the north fold 
    6161   REAL(wp),         DIMENSION(:),       ALLOCATABLE :: sto3d_sgn  ! control of the sign accross the north fold 
  • NEMO/trunk/src/OCE/USR/usrdef_hgr.F90

    r12489 r13216  
    9595#if defined key_agrif 
    9696      ! ! Upper left longitude and latitude from parent: 
     97      ! Laurent: Should be modify in case of an east-west cyclic parent grid 
    9798      IF (.NOT.Agrif_root()) THEN 
    9899         zlam0 = zlam1 + Agrif_irhox() * REAL(Agrif_Parent(jpjglo)-2 , wp) * ze1deg * zcos_alpha  & 
  • NEMO/trunk/src/OCE/USR/usrdef_nam.F90

    r12377 r13216  
    7474#if defined key_agrif 
    7575      IF( .NOT. Agrif_Root() ) THEN 
    76          kpi  = nbcellsx + 2 + 2*nbghostcells 
    77          kpj  = nbcellsy + 2 + 2*nbghostcells 
     76         kpi  = nbcellsx + 2 + 2*nbghostcells_x 
     77         kpj  = nbcellsy + 2 + 2*nbghostcells_y_s 
    7878      ENDIF 
    7979#endif 
  • NEMO/trunk/src/OCE/nemogcm.F90

    r13011 r13216  
    143143#if defined key_agrif 
    144144      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
    145       CALL Agrif_Declare_Var_dom   ! AGRIF: set the meshes for DOM 
    146       CALL Agrif_Declare_Var       !  "      "   "   "      "  DYN/TRA  
     145      CALL Agrif_Declare_Var       !  "      "   "   "      "  DYN/TRA 
    147146# if defined key_top 
    148147      CALL Agrif_Declare_Var_top   !  "      "   "   "      "  TOP 
    149 # endif 
    150 # if defined key_si3 
    151       CALL Agrif_Declare_Var_ice   !  "      "   "   "      "  Sea ice 
    152148# endif 
    153149#endif 
     
    400396      ! Initialise time level indices 
    401397      Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa 
    402  
     398#if defined key_agrif 
     399      Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs   ! agrif_oce module copies of time level indices 
     400#endif  
    403401      !                             !-------------------------------! 
    404402      !                             !  NEMO general initialization  ! 
     
    415413      IF( lk_c1d       )   CALL     c1d_init        ! 1D column configuration 
    416414                           CALL     wad_init        ! Wetting and drying options 
     415 
     416#if defined key_agrif 
     417     CALL Agrif_Declare_Var_ini   !  "      "   "   "      "  DOM 
     418#endif 
    417419                           CALL     dom_init( Nbb, Nnn, Naa, "OPA") ! Domain 
     420 
     421 
     422 
    418423      IF( ln_crs       )   CALL     crs_init(      Nnn )       ! coarsened grid: domain initialization  
    419424      IF( sn_cfctl%l_prtctl )   & 
     
    436441      ENDIF 
    437442      ! 
    438        
     443 
    439444                           CALL  istate_init( Nbb, Nnn, Naa )    ! ocean initial state (Dynamics and tracers) 
    440445 
  • NEMO/trunk/src/OCE/par_kind.F90

    r10068 r13216  
    3131    
    3232   !                                                                !!** Integer ** 
    33    INTEGER, PUBLIC, PARAMETER ::   lc = 256                          !: Lenght of Character strings 
     33   INTEGER, PUBLIC, PARAMETER ::   lc  = 256                          !: Lenght of Character strings 
     34   INTEGER, PUBLIC, PARAMETER ::   lca = 400                          !: Lenght of Character arrays 
    3435 
    3536   !!---------------------------------------------------------------------- 
  • NEMO/trunk/src/OCE/par_oce.F90

    r12377 r13216  
    4747   ! global domain size for AGRIF     !!! * total AGRIF computational domain * 
    4848   INTEGER, PUBLIC            ::   nbug_in_agrif_conv_do_not_remove_or_modify = 1 - 1 
    49    INTEGER, PUBLIC, PARAMETER ::   nbghostcells = 3                             !: number of ghost cells 
    50    INTEGER, PUBLIC            ::   nbcellsx   ! = jpiglo - 2 - 2*nbghostcells   !: number of cells in i-direction 
    51    INTEGER, PUBLIC            ::   nbcellsy   ! = jpjglo - 2 - 2*nbghostcells   !: number of cells in j-direction 
     49   INTEGER, PUBLIC, PARAMETER ::   nbghostcells = 3 !: number of ghost cells: default value 
     50   INTEGER, PUBLIC            ::   nbghostcells_x   !: number of ghost cells in i-direction 
     51   INTEGER, PUBLIC            ::   nbghostcells_y_s   !: number of ghost cells in j-direction at south 
     52   INTEGER, PUBLIC            ::   nbghostcells_y_n   !: number of ghost cells in j-direction at north                       !: number of ghost cells 
     53   INTEGER, PUBLIC            ::   nbcellsx   ! = jpiglo - 2 - 2*nbghostcells_x   !: number of cells in i-direction 
     54   INTEGER, PUBLIC            ::   nbcellsy   ! = jpjglo - 2 - 2*nbghostcells-y   !: number of cells in j-direction 
    5255 
    5356   ! local domain size                !!! * local computational domain * 
  • NEMO/trunk/src/OCE/stpctl.F90

    r13136 r13216  
    119119      !                                   !==            test of local extrema           ==! 
    120120      !                                   !==  done by all processes at every time step  ==! 
    121       ! 
    122       ! define zmax default value. needed for land processors 
    123       IF( ll_colruns ) THEN    ! default value: must not be kept when calling mpp_max -> must be as small as possible 
    124          zmax(:) = -HUGE(1._wp) 
    125       ELSE                     ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 
    126          zmax(:) =  0._wp 
    127          zmax(3) = -1._wp      ! avoid salinity minimum at 0. 
    128       ENDIF 
    129       ! 
    130121      llmsk(:,:,1) = ssmask(:,:) == 1._wp 
    131       IF( COUNT( llmsk(:,:,1) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
    132          IF( ll_wd ) THEN 
    133             zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) )   ! ssh max 
     122      IF( ll_wd ) THEN 
     123         zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) )   ! ssh max 
     124      ELSE 
     125         zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm)           ), mask = llmsk(:,:,1) )   ! ssh max 
     126      ENDIF 
     127      llmsk(:,:,:) = umask(:,:,:) == 1._wp 
     128      zmax(2) = MAXVAL(  ABS( uu(:,:,:,Kmm) ), mask = llmsk )                     ! velocity max (zonal only) 
     129      llmsk(:,:,:) = tmask(:,:,:) == 1._wp 
     130      zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     ! minus salinity max 
     131      zmax(4) = MAXVAL(  ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     !       salinity max 
     132      IF( ll_colruns .OR. jpnij == 1 ) THEN     ! following variables are used only in the netcdf file 
     133         zmax(5) = MAXVAL( -ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  ! minus temperature max 
     134         zmax(6) = MAXVAL(  ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  !       temperature max 
     135         IF( ln_zad_Aimp ) THEN 
     136            zmax(7) = MAXVAL(   Cu_adv(:,:,:)   , mask = llmsk )                  ! partitioning coeff. max 
     137            llmsk(:,:,:) = wmask(:,:,:) == 1._wp 
     138            zmax(8) = MAXVAL(  ABS( wi(:,:,:) ) , mask = llmsk )                  ! implicit vertical vel. max 
    134139         ELSE 
    135             zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm)           ), mask = llmsk(:,:,1) )   ! ssh max 
    136          ENDIF 
    137       ENDIF 
    138       zmax(2) = MAXVAL( ABS( uu(:,:,:,Kmm) ) )                                       ! velocity max (zonal only) 
    139       llmsk(:,:,:) = tmask(:,:,:) == 1._wp 
    140       IF( COUNT( llmsk(:,:,:) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
    141          zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     ! minus salinity max 
    142          zmax(4) = MAXVAL(  ts(:,:,:,jp_sal,Kmm), mask = llmsk )                     !       salinity max 
    143          IF( ll_colruns .OR. jpnij == 1 ) THEN     ! following variables are used only in the netcdf file 
    144             zmax(5) = MAXVAL( -ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  ! minus temperature max 
    145             zmax(6) = MAXVAL(  ts(:,:,:,jp_tem,Kmm), mask = llmsk )                  !       temperature max 
    146             IF( ln_zad_Aimp ) THEN 
    147                zmax(7) = MAXVAL(   Cu_adv(:,:,:)   , mask = llmsk )                  ! partitioning coeff. max 
    148                llmsk(:,:,:) = wmask(:,:,:) == 1._wp 
    149                IF( COUNT( llmsk(:,:,:) ) > 0 ) THEN   ! avoid huge values sent back for land processors... 
    150                   zmax(8) = MAXVAL(ABS( wi(:,:,:) ), mask = llmsk )                  ! implicit vertical vel. max 
    151                ENDIF 
    152             ENDIF 
    153          ENDIF 
     140            zmax(7:8) = 0._wp 
     141         ENDIF 
     142      ELSE 
     143         zmax(5:8) = 0._wp 
    154144      ENDIF 
    155145      zmax(9) = REAL( nstop, wp )                                              ! stop indicator 
Note: See TracChangeset for help on using the changeset viewer.