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 4724 for branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90 – NEMO

Ignore:
Timestamp:
2014-07-18T17:32:27+02:00 (10 years ago)
Author:
mathiot
Message:

ISF branch: add comments, fix mpp and restar issues, add test to stop if incompatible options and fix mask issue in sbcice and sbcblk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r4666 r4724  
    299299      ENDIF 
    300300 
    301 ! need to be like this to compute the pressure gradient with ISF 
     301! need to be like this to compute the pressure gradient with ISF. If not, level beneath the ISF are not aligned (sum(e3t) /= depth) 
    302302! define e3t_0 and e3w_0 as the differences between gdept and gdepw respectively 
    303303      DO jk = 1, jpkm1 
     
    10231023      END WHERE 
    10241024     
    1025  
     1025! basic check for the compatibility of bathy and icedep. I think it should be offline because it is not perfect and cannot solved all the situation 
    10261026      icompt = 0  
     1027! run the bathy check 10 times to be sure all the modif in the bathy or iceshelf draft are compatible together 
    10271028      DO jl = 1, 10  
    10281029        IF( lk_mpp ) THEN 
     
    10581059            bathy(:,:)   = 0._wp 
    10591060         END WHERE 
    1060  
     1061! Case where bathy and icedep compatible but not the level variable mbathy/micedep because of partial cell condition 
    10611062         DO jj = 1, jpj 
    10621063            DO ji = 1, jpi 
     
    10751076         DO jj = 2, jpjm1 
    10761077            DO ji = 2, jpim1 
     1078               ! T point 
    10771079               IF( zmicedep(ji,jj) == zmbathy(ji,jj) .AND. zmbathy(ji,jj) .GT. 1) THEN 
    10781080                  mbathy(ji,jj) = zmbathy(ji,jj) + 1  
    10791081                  bathy(ji,jj)=gdepw_1d(mbathy(ji,jj)) + MIN( e3zps_min, e3t_1d(mbathy(ji,jj))*e3zps_rat ) 
    10801082               ENDIF 
     1083               ! V point 
    10811084               IF( zmicedep(ji,jj+1) == zmbathy(ji,jj) .AND. zmbathy(ji,jj) .GT. 1) THEN 
    10821085                  mbathy(ji,jj) = zmbathy(ji,jj) + 1  
    10831086                  bathy(ji,jj)=gdepw_1d(mbathy(ji,jj)) + MIN( e3zps_min, e3t_1d(mbathy(ji,jj))*e3zps_rat ) 
    10841087               ENDIF 
     1088               ! V point -1 
    10851089               IF( zmicedep(ji,jj-1) == zmbathy(ji,jj) .AND. zmbathy(ji,jj) .GT. 1) THEN 
    10861090                  mbathy(ji,jj) = zmbathy(ji,jj) + 1  
    10871091                  bathy(ji,jj)=gdepw_1d(mbathy(ji,jj)) + MIN( e3zps_min, e3t_1d(mbathy(ji,jj))*e3zps_rat ) 
    10881092               ENDIF 
     1093               ! U point 
    10891094               IF( zmicedep(ji+1,jj) == zmbathy(ji,jj) .AND. zmbathy(ji,jj) .GT. 1) THEN 
    10901095                  mbathy(ji,jj) = zmbathy(ji,jj) + 1  
    10911096                  bathy(ji,jj)=gdepw_1d(mbathy(ji,jj)) + MIN( e3zps_min, e3t_1d(mbathy(ji,jj))*e3zps_rat ) 
    10921097               ENDIF 
     1098               ! U point -1 
    10931099               IF( zmicedep(ji-1,jj) == zmbathy(ji,jj) .AND. zmbathy(ji,jj) .GT. 1) THEN 
    10941100                  mbathy(ji,jj) = zmbathy(ji,jj) + 1  
     
    12171223            mbathy(:,:) = INT( zbathy(:,:) ) 
    12181224        ENDIF  
    1219         ! remove pool of water stuck between ice shelf and bathymetry 
     1225        ! remove 1 cell pool of water stuck between ice shelf and bathymetry (need a 3D flood filling tools to do this properly) 
    12201226        DO jk = 1, jpk 
    12211227        WHERE (micedep==0) micedep=jpk 
     
    13441350                e3w_0  (ji,jj,ik+1) = gdept_1d(ik+1) - gdept_0(ji,jj,ik) 
    13451351 
    1346                 IF( ik + 1 == mbathy(ji,jj) ) THEN               ! ice shelf point only  
     1352                IF( ik + 1 == mbathy(ji,jj) ) THEN               ! ice shelf point only (2 cell water column)  
    13471353                   e3w_0  (ji,jj,ik+1) = gdept_0(ji,jj,ik+1) - gdept_0(ji,jj,ik)  
    13481354                ENDIF  
     
    13981404         DO jj = 1, jpjm1  
    13991405            DO ji = 1, fs_jpim1   ! vector opt.  
    1400 ! (ISF)** NEEDS CHANGING TO SECOND OPTION FOR ICE SHELF BUT WILL CHANGE RESULTS WITHOUT ICE (DIFFER AT THE 1e-13 LEVEL)  
    14011406               e3uw_0(ji,jj,jk) = MIN( gdept_0(ji,jj,jk), gdept_0(ji+1,jj  ,jk) ) - MAX( gdept_0(ji,jj,jk-1), gdept_0(ji+1,jj  ,jk-1) ) 
    14021407               e3vw_0(ji,jj,jk) = MIN( gdept_0(ji,jj,jk), gdept_0(ji  ,jj+1,jk) ) - MAX( gdept_0(ji,jj,jk-1), gdept_0(ji  ,jj+1,jk-1) ) 
Note: See TracChangeset for help on using the changeset viewer.