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 9513 for branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90 – NEMO

Ignore:
Timestamp:
2018-04-27T14:30:02+02:00 (6 years ago)
Author:
mathiot
Message:

Add option to detect and remove subglacial lake (do not affect closed sea option)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90

    r8280 r9513  
    2525   USE oce             ! ocean dynamics and tracers 
    2626   USE dom_oce         ! ocean space and time domain 
     27   USE domngb          ! find nearest wet point 
     28   USE domutl          ! fill closed 3d pool below isf 
     29   USE domzgr, ONLY : ln_isfsubgl, rn_isfsubgllon, rn_isfsubgllat ! import ln_isfsubgl to mask close sea below isf 
     30   ! 
    2731   USE in_out_manager  ! I/O manager 
    2832   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     
    133137      INTEGER  ::   iif, iil, ii0, ii1, ii   ! local integers 
    134138      INTEGER  ::   ijf, ijl, ij0, ij1       !   -       - 
     139      INTEGER  ::   jiseed, jjseed           !   -       - 
    135140      INTEGER  ::   ios 
    136141      INTEGER  ::   isrow                    ! index for ORCA1 starting row 
     
    187192      END DO   
    188193       
    189       ! (ISF) define barotropic mask and mask the ice shelf point 
    190       ssmask(:,:)=tmask(:,:,1) ! at this stage ice shelf is not masked 
    191        
    192194      DO jk = 1, jpk 
    193195         DO jj = 1, jpj 
     
    199201         END DO   
    200202      END DO   
    201  
     203      ! 
     204      IF ( ln_isfsubgl ) THEN 
     205         ! check closed wet pool 
     206         CALL dom_ngb(rn_isfsubgllon, rn_isfsubgllat, jiseed, jjseed, 'T', lwet=.TRUE.) 
     207         CALL fill_pool( jiseed, jjseed, 1, tmask, -1._wp ) 
     208         ! at this point itab3d (:,1:ijmax,:) can have 3 different values : 
     209         !              0 where there where already 0 
     210         !              -1 where the ocean points are connected 
     211         !              1 where ocean points in tmask are not connected 
     212         IF (lwp) THEN 
     213            WRITE(numout,*) 
     214            WRITE(numout,*)'dommsk : removal of subglacial lakes ' 
     215            WRITE(numout,*)'~~~~~~~' 
     216            WRITE(numout,*)'Number of disconected points : ', COUNT(  (tmask(:,:,:) == 1) ) 
     217            WRITE(numout,*)'lon/lat seed to detect main ocean is: ', rn_isfsubgllon, rn_isfsubgllat 
     218            WRITE(numout,*)'i/j     seed to detect main ocean is: ', jiseed, jjseed 
     219         END IF 
     220         DO jk = 1, jpk 
     221            WHERE (tmask(:,:,jk) > 0 .AND. misfdep(:,:) > 1) tmask(:,:,jk) = 0 ! remove only subglacial lake (ie similar to close sea only below an ice shelf  
     222            WHERE (tmask(:,:,jk) < 0) tmask(:,:,jk) = 1 ! restore mask value 
     223         END DO 
     224      END IF 
     225 
     226      ! (ISF) define barotropic mask and mask the ice shelf point 
     227      DO jj = 1, jpj 
     228         DO ji = 1, jpi   ! vector loop 
     229            ssmask(ji,jj)  = MIN(1._wp,SUM(tmask(ji,jj,:))) 
     230         END DO 
     231      END DO 
    202232!!gm  ???? 
    203233#if defined key_zdfkpp 
Note: See TracChangeset for help on using the changeset viewer.