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

Ignore:
Timestamp:
2019-12-11T09:53:24+01:00 (4 years ago)
Author:
cetlod
Message:

dev_merge_option2 : merge in ENHANCE-02_ISF_nemo branch

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

Legend:

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

    r10068 r12166  
    3232   LOGICAL , PUBLIC ::   ln_linssh      !: =T  linear free surface ==>> model level are fixed in time 
    3333   LOGICAL , PUBLIC ::   ln_meshmask    !: =T  create a mesh-mask file (mesh_mask.nc) 
    34    REAL(wp), PUBLIC ::   rn_isfhmin     !: threshold to discriminate grounded ice to floating ice 
    3534   REAL(wp), PUBLIC ::   rn_rdt         !: time step for the dynamics and tracer 
    3635   REAL(wp), PUBLIC ::   rn_atfp        !: asselin time filter parameter 
    3736   INTEGER , PUBLIC ::   nn_euler       !: =0 start with forward time step or not (=1) 
    38    LOGICAL , PUBLIC ::   ln_iscpl       !: coupling with ice sheet 
    3937   LOGICAL , PUBLIC ::   ln_crs         !: Apply grid coarsening to dynamical model output or online passive tracers 
    4038 
     
    158156   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::   e3t_1d  , e3w_1d   !: reference vertical scale factors at T- and W-pts (m) 
    159157 
     158   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   risfdep, bathy 
    160159 
    161160   !!---------------------------------------------------------------------- 
     
    170169   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmask_h            !: internal domain T-point mask (Figure 8.5 NEMO book) 
    171170 
    172    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   misfdep                 !: top first ocean level             (ISF) 
    173    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mikt, miku, mikv, mikf  !: top first wet T-, U-, V-, F-level (ISF) 
    174    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   risfdep                 !: Iceshelf draft                    (ISF) 
     171   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mikt, miku, mikv, mikf  !: top first wet T-, U-, V-, F-level           (ISF) 
    175172 
    176173   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ssmask, ssumask, ssvmask             !: surface mask at T-,U-, V- and F-pts 
     
    274271         &                      hu_a(jpi,jpj) , hv_a(jpi,jpj) , r1_hu_a(jpi,jpj) , r1_hv_a(jpi,jpj) , STAT=ierr(6)  ) 
    275272         ! 
    276          ! 
    277       ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(7) ) 
     273      ALLOCATE( risfdep(jpi,jpj) , bathy(jpi,jpj) , STAT=ierr(7)  )  
     274         ! 
     275      ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(8) ) 
    278276         ! 
    279277      ALLOCATE( tmask_i(jpi,jpj) , tmask_h(jpi,jpj) ,                        &  
     
    281279         &      mbkt   (jpi,jpj) , mbku   (jpi,jpj) , mbkv   (jpi,jpj) , STAT=ierr(9) ) 
    282280         ! 
    283       ALLOCATE( misfdep(jpi,jpj) , mikt(jpi,jpj) , miku(jpi,jpj) ,     & 
    284          &      risfdep(jpi,jpj) , mikv(jpi,jpj) , mikf(jpi,jpj) , STAT=ierr(10) ) 
     281      ALLOCATE( mikt(jpi,jpj), miku(jpi,jpj), mikv(jpi,jpj), mikf(jpi,jpj), STAT=ierr(10) ) 
    285282         ! 
    286283      ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) ,     &  
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/domain.F90

    r11536 r12166  
    140140                                       ! Read in masks to define closed seas and lakes  
    141141      ! 
    142       DO jj = 1, jpj                   ! depth of the iceshelves 
    143          DO ji = 1, jpi 
    144             ik = mikt(ji,jj) 
    145             risfdep(ji,jj) = gdepw_0(ji,jj,ik) 
    146          END DO 
    147       END DO 
    148       ! 
    149142      ht_0(:,:) = 0._wp  ! Reference ocean thickness 
    150143      hu_0(:,:) = 0._wp 
     
    192185      IF( lk_c1d         )   CALL cor_c1d       ! 1D configuration: Coriolis set at T-point 
    193186      ! 
    194       IF( ln_meshmask .AND. .NOT.ln_iscpl )                        CALL dom_wri     ! Create a domain file 
    195       IF( ln_meshmask .AND.      ln_iscpl .AND. .NOT.ln_rstart )   CALL dom_wri     ! Create a domain file 
    196       IF(                                       .NOT.ln_rstart )   CALL dom_ctl     ! Domain control 
    197       ! 
    198       IF( ln_write_cfg )   CALL cfg_write         ! create the configuration file 
     187      IF( ln_meshmask    )   CALL dom_wri       ! Create a domain file 
     188      IF( .NOT.ln_rstart )   CALL dom_ctl       ! Domain control 
     189      ! 
     190      IF( ln_write_cfg   )   CALL cfg_write     ! create the configuration file 
    199191      ! 
    200192      IF(lwp) THEN 
     
    292284         &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  , nn_istate ,     & 
    293285         &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     & 
    294          &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios 
    295       NAMELIST/namdom/ ln_linssh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
     286         &             ln_cfmeta, ln_xios_read, nn_wxios 
     287      NAMELIST/namdom/ ln_linssh, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
    296288#if defined key_netcdf4 
    297289      NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip 
     
    343335         WRITE(numout,*) '      overwrite an existing file      ln_clobber      = ', ln_clobber 
    344336         WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz      = ', nn_chunksz 
    345          WRITE(numout,*) '      IS coupling at the restart step ln_iscpl        = ', ln_iscpl 
    346337         IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
    347338            WRITE(numout,*) '      READ restart for a single file using XIOS ln_xios_read =', ln_xios_read 
     
    417408         WRITE(numout,*) '      linear free surface (=T)                ln_linssh   = ', ln_linssh 
    418409         WRITE(numout,*) '      create mesh/mask file                   ln_meshmask = ', ln_meshmask 
    419          WRITE(numout,*) '      treshold to open the isf cavity         rn_isfhmin  = ', rn_isfhmin, ' [m]' 
    420410         WRITE(numout,*) '      ocean time step                         rn_rdt      = ', rn_rdt 
    421411         WRITE(numout,*) '      asselin time filter parameter           rn_atfp     = ', rn_atfp 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/domvvl.F90

    r11536 r12166  
    3636 
    3737   PUBLIC  dom_vvl_init       ! called by domain.F90 
     38   PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
    3839   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    3940   PUBLIC  dom_vvl_sf_swp     ! called by step.F90 
     
    115116      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
    116117      !!---------------------------------------------------------------------- 
     118      ! 
     119      IF(lwp) WRITE(numout,*) 
     120      IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
     121      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
     122      ! 
     123      CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
     124      ! 
     125      !                    ! Allocate module arrays 
     126      IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
     127      ! 
     128      !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
     129      CALL dom_vvl_rst( nit000, 'READ' ) 
     130      e3t_a(:,:,jpk) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
     131      ! 
     132      CALL dom_vvl_zgr() ! interpolation scale factor, depth and water column 
     133      ! 
     134   END SUBROUTINE dom_vvl_init 
     135   ! 
     136   SUBROUTINE dom_vvl_zgr() 
     137      !!---------------------------------------------------------------------- 
     138      !!                ***  ROUTINE dom_vvl_init  *** 
     139      !!                    
     140      !! ** Purpose :  Interpolation of all scale factors,  
     141      !!               depths and water column heights 
     142      !! 
     143      !! ** Method  :  - interpolate scale factors 
     144      !! 
     145      !! ** Action  : - e3t_(n/b) and tilde_e3t_(n/b) 
     146      !!              - Regrid: e3(u/v)_n 
     147      !!                        e3(u/v)_b        
     148      !!                        e3w_n            
     149      !!                        e3(u/v)w_b       
     150      !!                        e3(u/v)w_n       
     151      !!                        gdept_n, gdepw_n and gde3w_n 
     152      !!              - h(t/u/v)_0 
     153      !!              - frq_rst_e3t and frq_rst_hdv 
     154      !! 
     155      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
     156      !!---------------------------------------------------------------------- 
    117157      INTEGER ::   ji, jj, jk 
    118158      INTEGER ::   ii0, ii1, ij0, ij1 
    119159      REAL(wp)::   zcoef 
    120160      !!---------------------------------------------------------------------- 
    121       ! 
    122       IF(lwp) WRITE(numout,*) 
    123       IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
    124       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    125       ! 
    126       CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
    127       ! 
    128       !                    ! Allocate module arrays 
    129       IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
    130       ! 
    131       !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
    132       CALL dom_vvl_rst( nit000, 'READ' ) 
    133       e3t_a(:,:,jpk) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
    134161      ! 
    135162      !                    !== Set of all other vertical scale factors  ==!  (now and before) 
     
    263290      ENDIF 
    264291      ! 
    265    END SUBROUTINE dom_vvl_init 
    266  
     292   END SUBROUTINE dom_vvl_zgr 
    267293 
    268294   SUBROUTINE dom_vvl_sf_nxt( kt, kcall )  
     
    813839            id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. ) 
    814840            id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 
     841            ! 
    815842            !                             ! --------- ! 
    816843            !                             ! all cases ! 
    817844            !                             ! --------- ! 
     845            ! 
    818846            IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
    819847               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios ) 
     
    10331061      ! 
    10341062      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 
    1035       IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 
    10361063      ! 
    10371064      IF(lwp) THEN                   ! Print the choice 
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/domwri.F90

    r11532 r12166  
    1616   !!   dom_stiff      : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 
    1717   !!---------------------------------------------------------------------- 
     18   ! 
    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/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/domzgr.F90

    r10425 r12166  
    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/dev_r12072_MERGE_OPTION2_2019/src/OCE/DOM/istate.F90

    r10499 r12166  
    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 
     
    8685         !                                    ! ------------------- 
    8786         CALL rst_read                        ! Read the restart file 
    88          IF (ln_iscpl)       CALL iscpl_stp   ! extrapolate restart to wet and dry 
    8987         CALL day_init                        ! model calendar (using both namelist and restart infos) 
    9088         ! 
Note: See TracChangeset for help on using the changeset viewer.