Changeset 12068 for NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM
- Timestamp:
- 2019-12-05T13:18:21+01:00 (4 years ago)
- 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 33 33 LOGICAL , PUBLIC :: ln_linssh !: =T linear free surface ==>> model level are fixed in time 34 34 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 ice36 35 REAL(wp), PUBLIC :: rn_rdt !: time step for the dynamics and tracer 37 36 REAL(wp), PUBLIC :: rn_atfp !: asselin time filter parameter 38 37 INTEGER , PUBLIC :: nn_euler !: =0 start with forward time step or not (=1) 39 LOGICAL , PUBLIC :: ln_iscpl !: coupling with ice sheet40 38 LOGICAL , PUBLIC :: ln_crs !: Apply grid coarsening to dynamical model output or online passive tracers 41 39 … … 166 164 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: e3t_1d , e3w_1d !: reference vertical scale factors at T- and W-pts (m) 167 165 166 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: risfdep, bathy 168 167 169 168 !!---------------------------------------------------------------------- … … 178 177 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tmask_h !: internal domain T-point mask (Figure 8.5 NEMO book) 179 178 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) 183 180 184 181 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssmask, ssumask, ssvmask !: surface mask at T-,U-, V- and F-pts … … 276 273 & STAT=ierr(6) ) 277 274 ! 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) ) 280 278 ! 281 279 ALLOCATE( tmask_i(jpi,jpj) , tmask_h(jpi,jpj) , & … … 283 281 & mbkt (jpi,jpj) , mbku (jpi,jpj) , mbkv (jpi,jpj) , STAT=ierr(9) ) 284 282 ! 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) ) 287 284 ! 288 285 ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) , & -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domain.F90
r11822 r12068 142 142 ! Read in masks to define closed seas and lakes 143 143 ! 144 DO jj = 1, jpj ! depth of the iceshelves145 DO ji = 1, jpi146 ik = mikt(ji,jj)147 risfdep(ji,jj) = gdepw_0(ji,jj,ik)148 END DO149 END DO150 !151 144 ht_0(:,:) = 0._wp ! Reference ocean thickness 152 145 hu_0(:,:) = 0._wp … … 194 187 IF( lk_c1d ) CALL cor_c1d ! 1D configuration: Coriolis set at T-point 195 188 ! 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 201 193 ! 202 194 IF(lwp) THEN … … 294 286 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 295 287 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, nn_euler , & 296 & ln_cfmeta, ln_ iscpl, ln_xios_read, nn_wxios297 NAMELIST/namdom/ ln_linssh, rn_ isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask288 & ln_cfmeta, ln_xios_read, nn_wxios 289 NAMELIST/namdom/ ln_linssh, rn_rdt, rn_atfp, ln_crs, ln_meshmask 298 290 #if defined key_netcdf4 299 291 NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip … … 345 337 WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber 346 338 WRITE(numout,*) ' NetCDF chunksize (bytes) nn_chunksz = ', nn_chunksz 347 WRITE(numout,*) ' IS coupling at the restart step ln_iscpl = ', ln_iscpl348 339 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 349 340 WRITE(numout,*) ' READ restart for a single file using XIOS ln_xios_read =', ln_xios_read … … 419 410 WRITE(numout,*) ' linear free surface (=T) ln_linssh = ', ln_linssh 420 411 WRITE(numout,*) ' create mesh/mask file ln_meshmask = ', ln_meshmask 421 WRITE(numout,*) ' treshold to open the isf cavity rn_isfhmin = ', rn_isfhmin, ' [m]'422 412 WRITE(numout,*) ' ocean time step rn_rdt = ', rn_rdt 423 413 WRITE(numout,*) ' asselin time filter parameter rn_atfp = ', rn_atfp -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domvvl.F90
r11822 r12068 37 37 38 38 PUBLIC dom_vvl_init ! called by domain.F90 39 PUBLIC dom_vvl_zgr ! called by isfcpl.F90 39 40 PUBLIC dom_vvl_sf_nxt ! called by step.F90 40 41 PUBLIC dom_vvl_sf_update ! called by step.F90 … … 118 119 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 119 120 ! 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 !!---------------------------------------------------------------------- 120 161 INTEGER :: ji, jj, jk 121 162 INTEGER :: ii0, ii1, ij0, ij1 122 163 REAL(wp):: zcoef 123 164 !!---------------------------------------------------------------------- 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 arrays132 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_lf135 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 all137 165 ! 138 166 ! !== Set of all other vertical scale factors ==! (now and before) … … 266 294 ENDIF 267 295 ! 268 END SUBROUTINE dom_vvl_ init296 END SUBROUTINE dom_vvl_zgr 269 297 270 298 … … 811 839 id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. ) 812 840 id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 841 ! 813 842 ! ! --------- ! 814 843 ! ! all cases ! 815 844 ! ! --------- ! 845 ! 816 846 IF( MIN( id1, id2 ) > 0 ) THEN ! all required arrays exist 817 847 CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) … … 1029 1059 ! 1030 1060 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' )1032 1061 ! 1033 1062 IF(lwp) THEN ! Print the choice -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domwri.F90
r11822 r12068 16 16 !! dom_stiff : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 17 17 !!---------------------------------------------------------------------- 18 USE isf ! ice shelf 18 19 USE dom_oce ! ocean space and time domain 19 20 USE phycst , ONLY : rsmall … … 155 156 156 157 ! note that mbkt is set to 1 over land ==> use surface tmask 157 zprt(:,:) = ssmask(:,:) *REAL( mbkt(:,:) , wp )158 zprt(:,:) = REAL( mbkt(:,:) , wp ) 158 159 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 ) 160 161 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-points163 162 ! ! vertical mesh 164 163 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 71 71 INTEGER, DIMENSION(:,:), INTENT(out) :: k_top, k_bot ! ocean first and last level indices 72 72 ! 73 INTEGER :: jk ! dummy loop index 73 INTEGER :: ji,jj,jk ! dummy loop index 74 INTEGER :: ikt, ikb ! top/bot index 74 75 INTEGER :: ioptio, ibat, ios ! local integer 75 76 REAL(wp) :: zrefdep ! depth of the reference level (~10m) … … 138 139 ! ! top/bottom ocean level indices for t-, u- and v-points (f-point also for top) 139 140 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 ! 142 152 ! ! deepest/shallowest W level Above/Below ~10m 143 153 !!gm BUG in s-coordinate this does not work! -
NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/istate.F90
r11480 r12068 28 28 USE dtauvd ! data: U & V current (dta_uvd routine) 29 29 USE domvvl ! varying vertical mesh 30 USE iscplrst ! ice sheet coupling31 30 USE wet_dry ! wetting and drying (needed for wad_istate) 32 31 USE usrdef_istate ! User defined initial state … … 88 87 ! ! ------------------- 89 88 CALL rst_read( Kbb, Kmm ) ! Read the restart file 90 IF (ln_iscpl) CALL iscpl_stp( Kbb, Kmm ) ! extrapolate restart to wet and dry91 89 CALL day_init ! model calendar (using both namelist and restart infos) 92 90 !
Note: See TracChangeset
for help on using the changeset viewer.