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 – NEMO

Changeset 9513 for branches


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)

Location:
branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/CONFIG/SHARED/namelist_ref

    r9342 r9513  
    129129   rn_zisfmax       = 7000.       ! limiter in m     on the previous condition. (if change larger than this number, get back to value before we enforce the connection) 
    130130   ln_isfcheminey   = .false.     ! close cheminey 
     131   ln_isfsubgl      = .true.      ! remove subglacial lake created by the remapping process 
     132   rn_isfsubgllon   =    0.0      !  longitude of the seed to determine the open ocean 
     133   rn_isfsubgllat   =    0.0      !  latitude  of the seed to determine the open ocean 
    131134/ 
    132135!----------------------------------------------------------------------- 
  • 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 
  • branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/NEMO/OPA_SRC/DOM/domngb.F90

    r6486 r9513  
    2828CONTAINS 
    2929 
    30    SUBROUTINE dom_ngb( plon, plat, kii, kjj, cdgrid ) 
     30   SUBROUTINE dom_ngb( plon, plat, kii, kjj, cdgrid, lwet, kkk ) 
    3131      !!---------------------------------------------------------------------- 
    3232      !!                    ***  ROUTINE dom_ngb  *** 
    3333      !! 
    34       !! ** Purpose :   find the closest grid point from a given lon/lat position 
     34      !! ** Purpose :   find the closest wet grid point from a given lon/lat position 
    3535      !! 
    3636      !! ** Method  :   look for minimum distance in cylindrical projection  
     
    4040      REAL(wp)        , INTENT(in   ) ::   plon, plat   ! longitude,latitude of the point 
    4141      INTEGER         , INTENT(  out) ::   kii, kjj     ! i-,j-index of the closes grid point 
     42      INTEGER         , INTENT(in   ), OPTIONAL :: kkk  ! k-index of the mask level used 
     43      LOGICAL         , INTENT(in   ), OPTIONAL :: lwet ! logical to decide if we look for every where (false)  
     44                                                                !    or only over the wet point (true) 
    4245      CHARACTER(len=1), INTENT(in   ) ::   cdgrid       ! grid name 'T', 'U', 'V', 'W' 
    4346      ! 
     47      INTEGER :: ik         ! working level 
    4448      INTEGER , DIMENSION(2) ::   iloc 
    4549      REAL(wp)               ::   zlon, zmini 
    4650      REAL(wp), POINTER, DIMENSION(:,:) ::  zglam, zgphi, zmask, zdist 
     51      LOGICAL :: llwet      ! working logical 
    4752      !!-------------------------------------------------------------------- 
    4853      ! 
     
    5156      CALL wrk_alloc( jpi, jpj, zglam, zgphi, zmask, zdist ) 
    5257      ! 
     58      ! select lat/lon variable 
     59      SELECT CASE( cdgrid ) 
     60         CASE( 'U' )  ; zglam(:,:) = glamu(:,:) ; zgphi(:,:) = gphiu(:,:) 
     61         CASE( 'V' )  ; zglam(:,:) = glamv(:,:) ; zgphi(:,:) = gphiv(:,:) 
     62         CASE( 'F' )  ; zglam(:,:) = glamf(:,:) ; zgphi(:,:) = gphif(:,:) 
     63         CASE DEFAULT ; zglam(:,:) = glamt(:,:) ; zgphi(:,:) = gphit(:,:) 
     64      END SELECT 
     65      ! 
     66      ! select vertical level 
     67      ik   = 1 
     68      IF ( PRESENT(kkk) ) ik=kkk 
     69      ! 
     70      ! select mask variable 
    5371      zmask(:,:) = 0._wp 
    54       SELECT CASE( cdgrid ) 
    55       CASE( 'U' )  ; zglam(:,:) = glamu(:,:) ; zgphi(:,:) = gphiu(:,:) ; zmask(nldi:nlei,nldj:nlej) = umask(nldi:nlei,nldj:nlej,1) 
    56       CASE( 'V' )  ; zglam(:,:) = glamv(:,:) ; zgphi(:,:) = gphiv(:,:) ; zmask(nldi:nlei,nldj:nlej) = vmask(nldi:nlei,nldj:nlej,1) 
    57       CASE( 'F' )  ; zglam(:,:) = glamf(:,:) ; zgphi(:,:) = gphif(:,:) ; zmask(nldi:nlei,nldj:nlej) = fmask(nldi:nlei,nldj:nlej,1) 
    58       CASE DEFAULT ; zglam(:,:) = glamt(:,:) ; zgphi(:,:) = gphit(:,:) ; zmask(nldi:nlei,nldj:nlej) = tmask(nldi:nlei,nldj:nlej,1) 
    59       END SELECT 
    60  
    61       zlon       = MOD( plon       + 720., 360. )                                     ! plon between    0 and 360 
    62       zglam(:,:) = MOD( zglam(:,:) + 720., 360. )                                     ! glam between    0 and 360 
    63       IF( zlon > 270. )   zlon = zlon - 360.                                          ! zlon between  -90 and 270 
    64       IF( zlon <  90. )   WHERE( zglam(:,:) > 180. ) zglam(:,:) = zglam(:,:) - 360.   ! glam between -180 and 180 
    65  
    66       zglam(:,:) = zglam(:,:) - zlon 
     72      llwet = .TRUE. 
     73      IF ( PRESENT(lwet)) llwet=lwet  
     74      IF (llwet) THEN 
     75         SELECT CASE( cdgrid ) 
     76            CASE( 'U' )  ; zmask(nldi:nlei,nldj:nlej) = umask(nldi:nlei,nldj:nlej,ik) 
     77            CASE( 'V' )  ; zmask(nldi:nlei,nldj:nlej) = vmask(nldi:nlei,nldj:nlej,ik) 
     78            CASE( 'F' )  ; zmask(nldi:nlei,nldj:nlej) = fmask(nldi:nlei,nldj:nlej,ik) 
     79            CASE DEFAULT ; zmask(nldi:nlei,nldj:nlej) = tmask(nldi:nlei,nldj:nlej,ik) 
     80         END SELECT 
     81      ELSE 
     82         zmask(nldi:nlei,nldj:nlej)=1.e0 
     83      END IF 
     84      ! 
     85      ! compute distance 
     86      IF (jphgr_msh /= 2 .AND. jphgr_msh /= 3) THEN 
     87         zlon       = MOD( plon       + 720., 360. )                                     ! plon between    0 and 360 
     88         zglam(:,:) = MOD( zglam(:,:) + 720., 360. )                                     ! glam between    0 and 360 
     89         IF( zlon > 270. )   zlon = zlon - 360.                                          ! zlon between  -90 and 270 
     90         IF( zlon <  90. )   WHERE( zglam(:,:) > 180. ) zglam(:,:) = zglam(:,:) - 360.   ! glam between -180 and 180 
     91         zglam(:,:) = zglam(:,:) - zlon 
     92      ELSE 
     93         zglam(:,:) = zglam(:,:) - plon 
     94      END IF 
     95      ! 
    6796      zgphi(:,:) = zgphi(:,:) - plat 
    6897      zdist(:,:) = zglam(:,:) * zglam(:,:) + zgphi(:,:) * zgphi(:,:) 
    69        
     98      ! 
     99      ! find min 
    70100      IF( lk_mpp ) THEN   
    71101         CALL mpp_minloc( zdist(:,:), zmask, zmini, kii, kjj) 
  • branches/UKMO/dev_isf_remapping_UKESM_GO6package_r9314/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r9342 r9513  
    5050   PUBLIC   dom_zgr        ! called by dom_init.F90 
    5151 
     52   ! remove subglacial lake under the ice sheet. 
     53   LOGICAL , PUBLIC  :: ln_isfsubgl 
     54   REAL(wp), PUBLIC  :: rn_isfsubgllon, rn_isfsubgllat 
    5255   !                              !!* Namelist namzgr_sco * 
    5356   LOGICAL  ::   ln_s_sh94         ! use hybrid s-sig Song and Haidvogel 1994 stretching function fssig1 (ln_sco=T) 
     
    12931296      ! NAMELIST 
    12941297      INTEGER  ::   ios 
    1295       INTEGER  :: nn_kisfmax    = 999.  
    1296       REAL(wp) :: rn_isfdep_min = 10.0_wp ! ice shelf minimal thickness  
     1298      INTEGER  :: nn_kisfmax    = 999.                               
     1299      REAL(wp) :: rn_isfdep_min = 10.0_wp                           ! ice shelf minimal thickness  
    12971300      REAL(wp) :: rn_isfhw_deep = 1.e-3 , rn_isfhw_shallow = 1.0e-3 ! threshold to define grounding line in deep/shallow water 
    1298       REAL(wp) :: rn_isfshallow = 0.0_wp  ! threshold to define shallow ice shelf cavity 
    1299       REAL(wp) :: rn_zisfmax    = 6000.0_wp ! maximun meter of ice we are allowed to dig to assure connectivity 
    1300       LOGICAL  :: ln_isfcheminey= .FALSE. , ln_isfconnect= .FALSE. , ln_isfchannel= .FALSE. !  remove cheminey, assure connectivity 
     1301      REAL(wp) :: rn_isfshallow = 0.0_wp                            ! threshold to define shallow ice shelf cavity 
     1302      REAL(wp) :: rn_zisfmax    = 6000.0_wp                         ! maximun meter of ice we are allowed to dig to assure connectivity 
     1303      LOGICAL  :: ln_isfcheminey= .FALSE. , ln_isfconnect= .FALSE. , ln_isfchannel= .FALSE. !  remove cheminey, assure connectivity, remove channel in water column (on z space not level space) 
    13011304      !!--------------------------------------------------------------------- 
    13021305      NAMELIST/namzgr_isf/nn_kisfmax, rn_zisfmax, & 
    13031306              &           rn_isfdep_min, rn_isfhw_deep, rn_isfhw_shallow, rn_isfshallow, & 
    1304               &           ln_isfcheminey, ln_isfconnect, ln_isfchannel 
     1307              &           ln_isfcheminey, ln_isfconnect, ln_isfchannel, ln_isfsubgl, rn_isfsubgllon, rn_isfsubgllat 
    13051308      ! 
    13061309      IF( nn_timing == 1 )  CALL timing_start('zgr_isf') 
Note: See TracChangeset for help on using the changeset viewer.