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 12068 for NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM – NEMO

Ignore:
Timestamp:
2019-12-05T13:18:21+01:00 (4 years ago)
Author:
davestorkey
Message:

2019/UKMO_MERGE_2019 : Merging in changes from ENHANCE-02_ISF_nemo.

Location:
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM
Files:
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/dom_oce.F90

    r11480 r12068  
    3333   LOGICAL , PUBLIC ::   ln_linssh      !: =T  linear free surface ==>> model level are fixed in time 
    3434   LOGICAL , PUBLIC ::   ln_meshmask    !: =T  create a mesh-mask file (mesh_mask.nc) 
    35    REAL(wp), PUBLIC ::   rn_isfhmin     !: threshold to discriminate grounded ice to floating ice 
    3635   REAL(wp), PUBLIC ::   rn_rdt         !: time step for the dynamics and tracer 
    3736   REAL(wp), PUBLIC ::   rn_atfp        !: asselin time filter parameter 
    3837   INTEGER , PUBLIC ::   nn_euler       !: =0 start with forward time step or not (=1) 
    39    LOGICAL , PUBLIC ::   ln_iscpl       !: coupling with ice sheet 
    4038   LOGICAL , PUBLIC ::   ln_crs         !: Apply grid coarsening to dynamical model output or online passive tracers 
    4139 
     
    166164   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::   e3t_1d  , e3w_1d   !: reference vertical scale factors at T- and W-pts (m) 
    167165 
     166   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   risfdep, bathy 
    168167 
    169168   !!---------------------------------------------------------------------- 
     
    178177   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmask_h            !: internal domain T-point mask (Figure 8.5 NEMO book) 
    179178 
    180    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   misfdep                 !: top first ocean level             (ISF) 
    181    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mikt, miku, mikv, mikf  !: top first wet T-, U-, V-, F-level (ISF) 
    182    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   risfdep                 !: Iceshelf draft                    (ISF) 
     179   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mikt, miku, mikv, mikf  !: top first wet T-, U-, V-, F-level           (ISF) 
    183180 
    184181   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ssmask, ssumask, ssvmask             !: surface mask at T-,U-, V- and F-pts 
     
    276273         &                      STAT=ierr(6)  ) 
    277274         ! 
    278          ! 
    279       ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(7) ) 
     275      ALLOCATE( risfdep(jpi,jpj) , bathy(jpi,jpj) , STAT=ierr(7)  )  
     276         ! 
     277      ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(8) ) 
    280278         ! 
    281279      ALLOCATE( tmask_i(jpi,jpj) , tmask_h(jpi,jpj) ,                        &  
     
    283281         &      mbkt   (jpi,jpj) , mbku   (jpi,jpj) , mbkv   (jpi,jpj) , STAT=ierr(9) ) 
    284282         ! 
    285       ALLOCATE( misfdep(jpi,jpj) , mikt(jpi,jpj) , miku(jpi,jpj) ,     & 
    286          &      risfdep(jpi,jpj) , mikv(jpi,jpj) , mikf(jpi,jpj) , STAT=ierr(10) ) 
     283      ALLOCATE( mikt(jpi,jpj), miku(jpi,jpj), mikv(jpi,jpj), mikf(jpi,jpj), STAT=ierr(10) ) 
    287284         ! 
    288285      ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) ,     &  
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domain.F90

    r11822 r12068  
    142142                                       ! Read in masks to define closed seas and lakes  
    143143      ! 
    144       DO jj = 1, jpj                   ! depth of the iceshelves 
    145          DO ji = 1, jpi 
    146             ik = mikt(ji,jj) 
    147             risfdep(ji,jj) = gdepw_0(ji,jj,ik) 
    148          END DO 
    149       END DO 
    150       ! 
    151144      ht_0(:,:) = 0._wp  ! Reference ocean thickness 
    152145      hu_0(:,:) = 0._wp 
     
    194187      IF( lk_c1d         )   CALL cor_c1d       ! 1D configuration: Coriolis set at T-point 
    195188      ! 
    196       IF( ln_meshmask .AND. .NOT.ln_iscpl )                        CALL dom_wri     ! Create a domain file 
    197       IF( ln_meshmask .AND.      ln_iscpl .AND. .NOT.ln_rstart )   CALL dom_wri     ! Create a domain file 
    198       IF(                                       .NOT.ln_rstart )   CALL dom_ctl     ! Domain control 
    199       ! 
    200       IF( ln_write_cfg )   CALL cfg_write         ! create the configuration file 
     189      IF( ln_meshmask    )   CALL dom_wri       ! Create a domain file 
     190      IF( .NOT.ln_rstart )   CALL dom_ctl       ! Domain control 
     191      ! 
     192      IF( ln_write_cfg   )   CALL cfg_write     ! create the configuration file 
    201193      ! 
    202194      IF(lwp) THEN 
     
    294286         &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  , nn_istate ,     & 
    295287         &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     & 
    296          &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios 
    297       NAMELIST/namdom/ ln_linssh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
     288         &             ln_cfmeta, ln_xios_read, nn_wxios 
     289      NAMELIST/namdom/ ln_linssh, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
    298290#if defined key_netcdf4 
    299291      NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip 
     
    345337         WRITE(numout,*) '      overwrite an existing file      ln_clobber      = ', ln_clobber 
    346338         WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz      = ', nn_chunksz 
    347          WRITE(numout,*) '      IS coupling at the restart step ln_iscpl        = ', ln_iscpl 
    348339         IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
    349340            WRITE(numout,*) '      READ restart for a single file using XIOS ln_xios_read =', ln_xios_read 
     
    419410         WRITE(numout,*) '      linear free surface (=T)                ln_linssh   = ', ln_linssh 
    420411         WRITE(numout,*) '      create mesh/mask file                   ln_meshmask = ', ln_meshmask 
    421          WRITE(numout,*) '      treshold to open the isf cavity         rn_isfhmin  = ', rn_isfhmin, ' [m]' 
    422412         WRITE(numout,*) '      ocean time step                         rn_rdt      = ', rn_rdt 
    423413         WRITE(numout,*) '      asselin time filter parameter           rn_atfp     = ', rn_atfp 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domvvl.F90

    r11822 r12068  
    3737 
    3838   PUBLIC  dom_vvl_init       ! called by domain.F90 
     39   PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
    3940   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    4041   PUBLIC  dom_vvl_sf_update  ! called by step.F90 
     
    118119      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 
    119120      ! 
     121      IF(lwp) WRITE(numout,*) 
     122      IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
     123      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
     124      ! 
     125      CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
     126      ! 
     127      !                    ! Allocate module arrays 
     128      IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
     129      ! 
     130      !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
     131      CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 
     132      e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
     133      ! 
     134      CALL dom_vvl_zgr(Kbb, Kmm, Kaa) ! interpolation scale factor, depth and water column 
     135      ! 
     136   END SUBROUTINE dom_vvl_init 
     137   ! 
     138   SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 
     139      !!---------------------------------------------------------------------- 
     140      !!                ***  ROUTINE dom_vvl_init  *** 
     141      !!                    
     142      !! ** Purpose :  Interpolation of all scale factors,  
     143      !!               depths and water column heights 
     144      !! 
     145      !! ** Method  :  - interpolate scale factors 
     146      !! 
     147      !! ** Action  : - e3t_(n/b) and tilde_e3t_(n/b) 
     148      !!              - Regrid: e3(u/v)_n 
     149      !!                        e3(u/v)_b        
     150      !!                        e3w_n            
     151      !!                        e3(u/v)w_b       
     152      !!                        e3(u/v)w_n       
     153      !!                        gdept_n, gdepw_n and gde3w_n 
     154      !!              - h(t/u/v)_0 
     155      !!              - frq_rst_e3t and frq_rst_hdv 
     156      !! 
     157      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
     158      !!---------------------------------------------------------------------- 
     159      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 
     160      !!---------------------------------------------------------------------- 
    120161      INTEGER ::   ji, jj, jk 
    121162      INTEGER ::   ii0, ii1, ij0, ij1 
    122163      REAL(wp)::   zcoef 
    123164      !!---------------------------------------------------------------------- 
    124       ! 
    125       IF(lwp) WRITE(numout,*) 
    126       IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
    127       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    128       ! 
    129       CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
    130       ! 
    131       !                    ! Allocate module arrays 
    132       IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
    133       ! 
    134       !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
    135       CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 
    136       e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
    137165      ! 
    138166      !                    !== Set of all other vertical scale factors  ==!  (now and before) 
     
    266294      ENDIF 
    267295      ! 
    268    END SUBROUTINE dom_vvl_init 
     296   END SUBROUTINE dom_vvl_zgr 
    269297 
    270298 
     
    811839            id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. ) 
    812840            id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 
     841            ! 
    813842            !                             ! --------- ! 
    814843            !                             ! all cases ! 
    815844            !                             ! --------- ! 
     845            ! 
    816846            IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
    817847               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
     
    10291059      ! 
    10301060      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 
    1031       IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 
    10321061      ! 
    10331062      IF(lwp) THEN                   ! Print the choice 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domwri.F90

    r11822 r12068  
    1616   !!   dom_stiff      : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 
    1717   !!---------------------------------------------------------------------- 
     18   USE isf             ! ice shelf 
    1819   USE dom_oce         ! ocean space and time domain 
    1920   USE phycst ,   ONLY :   rsmall 
     
    155156       
    156157      ! note that mbkt is set to 1 over land ==> use surface tmask 
    157       zprt(:,:) = ssmask(:,:) * REAL( mbkt(:,:) , wp ) 
     158      zprt(:,:) = REAL( mbkt(:,:) , wp ) 
    158159      CALL iom_rstput( 0, 0, inum, 'mbathy', zprt, ktype = jp_i4 )     !    ! nb of ocean T-points 
    159       zprt(:,:) = ssmask(:,:) * REAL( mikt(:,:) , wp ) 
     160      zprt(:,:) = REAL( mikt(:,:) , wp ) 
    160161      CALL iom_rstput( 0, 0, inum, 'misf', zprt, ktype = jp_i4 )       !    ! nb of ocean T-points 
    161       zprt(:,:) = ssmask(:,:) * REAL( risfdep(:,:) , wp ) 
    162       CALL iom_rstput( 0, 0, inum, 'isfdraft', zprt, ktype = jp_r8 )   !    ! nb of ocean T-points 
    163162      !                                                         ! vertical mesh 
    164163      CALL iom_rstput( 0, 0, inum, 'e3t_1d', e3t_1d, ktype = jp_r8  )    !    ! scale factors 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domzgr.F90

    r10425 r12068  
    7171      INTEGER, DIMENSION(:,:), INTENT(out) ::   k_top, k_bot   ! ocean first and last level indices 
    7272      ! 
    73       INTEGER  ::   jk                  ! dummy loop index 
     73      INTEGER  ::   ji,jj,jk            ! dummy loop index 
     74      INTEGER  ::   ikt, ikb            ! top/bot index 
    7475      INTEGER  ::   ioptio, ibat, ios   ! local integer 
    7576      REAL(wp) ::   zrefdep             ! depth of the reference level (~10m) 
     
    138139      !                                ! top/bottom ocean level indices for t-, u- and v-points (f-point also for top) 
    139140      CALL zgr_top_bot( k_top, k_bot )      ! with a minimum value set to 1 
    140        
    141  
     141      ! 
     142      !                                ! ice shelf draft and bathymetry 
     143      DO jj = 1,jpj 
     144         DO ji = 1,jpi 
     145            ikt = mikt(ji,jj) 
     146            ikb = mbkt(ji,jj) 
     147            bathy  (ji,jj) = gdepw_0(ji,jj,ikb+1) 
     148            risfdep(ji,jj) = gdepw_0(ji,jj,ikt  ) 
     149         END DO 
     150      END DO 
     151      ! 
    142152      !                                ! deepest/shallowest W level Above/Below ~10m 
    143153!!gm BUG in s-coordinate this does not work! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/istate.F90

    r11480 r12068  
    2828   USE dtauvd         ! data: U & V current             (dta_uvd routine) 
    2929   USE domvvl          ! varying vertical mesh 
    30    USE iscplrst        ! ice sheet coupling 
    3130   USE wet_dry         ! wetting and drying (needed for wad_istate) 
    3231   USE usrdef_istate   ! User defined initial state 
     
    8887         !                                    ! ------------------- 
    8988         CALL rst_read( Kbb, Kmm )            ! Read the restart file 
    90          IF (ln_iscpl)       CALL iscpl_stp( Kbb, Kmm )   ! extrapolate restart to wet and dry 
    9189         CALL day_init                        ! model calendar (using both namelist and restart infos) 
    9290         ! 
Note: See TracChangeset for help on using the changeset viewer.