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 13819 for NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/ASM – NEMO

Ignore:
Timestamp:
2020-11-18T19:02:11+01:00 (4 years ago)
Author:
hadcv
Message:

#2365: Final fixes and changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/ASM/asminc.F90

    r13518 r13819  
    2626   USE par_oce         ! Ocean space and time domain variables 
    2727   USE dom_oce         ! Ocean space and time domain 
     28   USE domain, ONLY : dom_tile 
    2829   USE domvvl          ! domain: variable volume level 
    2930   USE ldfdyn          ! lateral diffusion: eddy viscosity coefficients 
     
    518519      ! 
    519520      INTEGER  :: ji, jj, jk 
    520       INTEGER  :: it 
     521      INTEGER  :: it, itile 
    521522      REAL(wp) :: zincwgt  ! IAU weight for current time step 
    522       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) :: fzptnz ! 3d freezing point values 
     523      REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: fzptnz ! 3d freezing point values 
    523524      !!---------------------------------------------------------------------- 
    524525      ! 
    525526      ! freezing point calculation taken from oc_fz_pt (but calculated for all depths)  
    526527      ! used to prevent the applied increments taking the temperature below the local freezing point  
    527       ! TODO: NOT TESTED- logical is forced to False 
    528528      IF( ln_temnofreeze ) THEN 
    529529         DO jk = 1, jpkm1 
     
    550550            ! 
    551551            ! Update the tracer tendencies 
    552             ! TODO: NOT TESTED- logical is forced to False 
    553552            DO jk = 1, jpkm1 
    554553               IF (ln_temnofreeze) THEN 
    555554                  ! Do not apply negative increments if the temperature will fall below freezing 
    556                   WHERE(t_bkginc(ST_2D(0),jk) > 0.0_wp .OR. & 
    557                      &   pts(ST_2D(0),jk,jp_tem,Kmm) + pts(ST_2D(0),jk,jp_tem,Krhs) + t_bkginc(ST_2D(0),jk) * wgtiau(it) > fzptnz(:,:,jk) ) 
    558                      pts(ST_2D(0),jk,jp_tem,Krhs) = pts(ST_2D(0),jk,jp_tem,Krhs) + t_bkginc(ST_2D(0),jk) * zincwgt 
     555                  WHERE(t_bkginc(A2D(0),jk) > 0.0_wp .OR. & 
     556                     &   pts(A2D(0),jk,jp_tem,Kmm) + pts(A2D(0),jk,jp_tem,Krhs) + t_bkginc(A2D(0),jk) * wgtiau(it) > fzptnz(:,:,jk) ) 
     557                     pts(A2D(0),jk,jp_tem,Krhs) = pts(A2D(0),jk,jp_tem,Krhs) + t_bkginc(A2D(0),jk) * zincwgt 
    559558                  END WHERE 
    560559               ELSE 
     
    566565                  ! Do not apply negative increments if the salinity will fall below a specified 
    567566                  ! minimum value salfixmin 
    568                   WHERE(s_bkginc(ST_2D(0),jk) > 0.0_wp .OR. & 
    569                      &   pts(ST_2D(0),jk,jp_sal,Kmm) + pts(ST_2D(0),jk,jp_sal,Krhs) + s_bkginc(ST_2D(0),jk) * wgtiau(it) > salfixmin ) 
    570                      pts(ST_2D(0),jk,jp_sal,Krhs) = pts(ST_2D(0),jk,jp_sal,Krhs) + s_bkginc(ST_2D(0),jk) * zincwgt 
     567                  WHERE(s_bkginc(A2D(0),jk) > 0.0_wp .OR. & 
     568                     &   pts(A2D(0),jk,jp_sal,Kmm) + pts(A2D(0),jk,jp_sal,Krhs) + s_bkginc(A2D(0),jk) * wgtiau(it) > salfixmin ) 
     569                     pts(A2D(0),jk,jp_sal,Krhs) = pts(A2D(0),jk,jp_sal,Krhs) + s_bkginc(A2D(0),jk) * zincwgt 
    571570                  END WHERE 
    572571               ELSE 
     
    594593            ! 
    595594            ! Initialize the now fields with the background + increment 
    596             ! TODO: NOT TESTED- logical is forced to False 
    597595            IF (ln_temnofreeze) THEN 
    598596               ! Do not apply negative increments if the temperature will fall below freezing 
    599                WHERE( t_bkginc(ST_2D(0),:) > 0.0_wp .OR. pts(ST_2D(0),:,jp_tem,Kmm) + t_bkginc(ST_2D(0),:) > fzptnz(:,:,:) ) 
    600                   pts(ST_2D(0),:,jp_tem,Kmm) = t_bkg(ST_2D(0),:) + t_bkginc(ST_2D(0),:) 
     597               WHERE( t_bkginc(A2D(0),:) > 0.0_wp .OR. pts(A2D(0),:,jp_tem,Kmm) + t_bkginc(A2D(0),:) > fzptnz(:,:,:) ) 
     598                  pts(A2D(0),:,jp_tem,Kmm) = t_bkg(A2D(0),:) + t_bkginc(A2D(0),:) 
    601599               END WHERE 
    602600            ELSE 
     
    608606               ! Do not apply negative increments if the salinity will fall below a specified 
    609607               ! minimum value salfixmin 
    610                WHERE( s_bkginc(ST_2D(0),:) > 0.0_wp .OR. pts(ST_2D(0),:,jp_sal,Kmm) + s_bkginc(ST_2D(0),:) > salfixmin ) 
    611                   pts(ST_2D(0),:,jp_sal,Kmm) = s_bkg(ST_2D(0),:) + s_bkginc(ST_2D(0),:) 
     608               WHERE( s_bkginc(A2D(0),:) > 0.0_wp .OR. pts(A2D(0),:,jp_sal,Kmm) + s_bkginc(A2D(0),:) > salfixmin ) 
     609                  pts(A2D(0),:,jp_sal,Kmm) = s_bkg(A2D(0),:) + s_bkginc(A2D(0),:) 
    612610               END WHERE 
    613611            ELSE 
     
    626624!!gm 
    627625 
    628             ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed from zps_hde*) 
     626            ! TEMP: [tiling] This change not necessary after extra haloes development (lbc_lnk removed from zps_hde*) 
    629627            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain 
     628               itile = ntile 
     629               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )            ! Use full domain 
     630 
    630631               IF( ln_zps .AND. .NOT. lk_c1d .AND. .NOT. ln_isfcav)           & 
    631632                  &  CALL zps_hde    ( kt, Kmm, jpts, pts(:,:,:,:,Kbb), gtsu, gtsv,        &  ! Partial steps: before horizontal gradient 
     
    634635                  &  CALL zps_hde_isf( nit000, Kmm, jpts, pts(:,:,:,:,Kbb), gtsu, gtsv, gtui, gtvi,    &  ! Partial steps for top cell (ISF) 
    635636                  &                                  rhd, gru , grv , grui, grvi          )  ! of t, s, rd at the last ocean level 
     637 
     638               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )            ! Revert to tile domain 
    636639            ENDIF 
    637640 
     
    646649         !   
    647650      ENDIF 
    648       ! TODO: NOT TESTED- logical is forced to False 
    649651      ! Perhaps the following call should be in step 
    650652      IF ( ln_seaiceinc  )   CALL seaice_asm_inc ( kt )   ! apply sea ice concentration increment 
     
    859861      REAL(wp) ::   zincwgt   ! IAU weight for current time step 
    860862#if defined key_si3 
    861       REAL(wp), DIMENSION(ST_2D(nn_hls)) ::   zofrld, zohicif, zseaicendg, zhicifinc 
     863      REAL(wp), DIMENSION(A2D(nn_hls)) ::   zofrld, zohicif, zseaicendg, zhicifinc 
    862864      REAL(wp) ::   zhicifmin = 0.5_wp      ! ice minimum depth in metres 
    863865#endif 
     
    897899            ! 
    898900            ! Nudge sea ice depth to bring it up to a required minimum depth 
    899             WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(ST_2D(0)) < zhicifmin ) 
    900                zhicifinc(:,:) = (zhicifmin - hm_i(ST_2D(0))) * zincwgt 
     901            WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(A2D(0)) < zhicifmin ) 
     902               zhicifinc(:,:) = (zhicifmin - hm_i(A2D(0))) * zincwgt 
    901903            ELSEWHERE 
    902904               zhicifinc(:,:) = 0.0_wp 
     
    957959            ! 
    958960            ! Nudge sea ice depth to bring it up to a required minimum depth 
    959             WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(ST_2D(0)) < zhicifmin ) 
    960                zhicifinc(:,:) = zhicifmin - hm_i(ST_2D(0)) 
     961            WHERE( zseaicendg(:,:) > 0.0_wp .AND. hm_i(A2D(0)) < zhicifmin ) 
     962               zhicifinc(:,:) = zhicifmin - hm_i(A2D(0)) 
    961963            ELSEWHERE 
    962964               zhicifinc(:,:) = 0.0_wp 
Note: See TracChangeset for help on using the changeset viewer.