Changeset 15451 for NEMO/releases/r4.0/r4.0-HEAD/src/OCE
- Timestamp:
- 2021-10-27T16:46:28+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/releases/r4.0/r4.0-HEAD/src/OCE/DOM/domvvl.F90
r11536 r15451 12 12 !!---------------------------------------------------------------------- 13 13 !! dom_vvl_init : define initial vertical scale factors, depths and column thickness 14 !! dom_vvl_zgr : most part of dom_vvl_init 14 15 !! dom_vvl_sf_nxt : Compute next vertical scale factors 15 16 !! dom_vvl_sf_swp : Swap vertical scale factors and update the vertical grid … … 36 37 37 38 PUBLIC dom_vvl_init ! called by domain.F90 39 PUBLIC dom_vvl_zgr ! called by iceistate.F90 38 40 PUBLIC dom_vvl_sf_nxt ! called by step.F90 39 41 PUBLIC dom_vvl_sf_swp ! called by step.F90 … … 115 117 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 116 118 !!---------------------------------------------------------------------- 119 ! 120 IF(lwp) WRITE(numout,*) 121 IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 122 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 123 ! 124 CALL dom_vvl_ctl ! choose vertical coordinate (z_star, z_tilde or layer) 125 ! 126 ! ! Allocate module arrays 127 IF( dom_vvl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 128 ! 129 ! ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 130 CALL dom_vvl_rst( nit000, 'READ' ) 131 e3t_a(:,:,jpk) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all 132 ! 133 CALL dom_vvl_zgr 134 ! 135 IF(lwxios) THEN 136 ! define variables in restart file when writing with XIOS 137 CALL iom_set_rstw_var_active('e3t_b') 138 CALL iom_set_rstw_var_active('e3t_n') 139 ! ! ----------------------- ! 140 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases ! 141 ! ! ----------------------- ! 142 CALL iom_set_rstw_var_active('tilde_e3t_b') 143 CALL iom_set_rstw_var_active('tilde_e3t_n') 144 END IF 145 ! ! -------------! 146 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 147 ! ! ------------ ! 148 CALL iom_set_rstw_var_active('hdiv_lf') 149 ENDIF 150 ! 151 ENDIF 152 ! 153 END SUBROUTINE dom_vvl_init 154 155 SUBROUTINE dom_vvl_zgr 156 !!---------------------------------------------------------------------- 157 !! *** ROUTINE dom_vvl_zgr *** 158 !! 159 !! ** Purpose : Interpolation of all scale factors, 160 !! depths and water column heights 161 !! 162 !! ** Method : - interpolate scale factors 163 !! 164 !! ** Action : - e3t_(n/b) and tilde_e3t_(n/b) 165 !! - Regrid: e3(u/v)_n 166 !! e3(u/v)_b 167 !! e3w_n 168 !! e3(u/v)w_b 169 !! e3(u/v)w_n 170 !! gdept_n, gdepw_n and gde3w_n 171 !! - h(t/u/v)_0 172 !! - frq_rst_e3t and frq_rst_hdv 173 !! 174 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 175 !!---------------------------------------------------------------------- 117 176 INTEGER :: ji, jj, jk 118 177 INTEGER :: ii0, ii1, ij0, ij1 119 178 REAL(wp):: zcoef 120 179 !!---------------------------------------------------------------------- 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 arrays129 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_lf132 CALL dom_vvl_rst( nit000, 'READ' )133 e3t_a(:,:,jpk) = e3t_0(:,:,jpk) ! last level always inside the sea floor set one for all134 !135 180 ! !== Set of all other vertical scale factors ==! (now and before) 136 181 ! ! Horizontal interpolation of e3t … … 160 205 gdepw_b(:,:,1) = 0.0_wp 161 206 DO jk = 2, jpk ! vertical sum 162 DO jj = 1, jpj163 DO ji = 1, jpi207 DO jj = 1, jpj 208 DO ji = 1, jpi 164 209 ! zcoef = tmask - wmask ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 165 210 ! ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf) … … 245 290 ENDIF 246 291 ! 247 IF(lwxios) THEN 248 ! define variables in restart file when writing with XIOS 249 CALL iom_set_rstw_var_active('e3t_b') 250 CALL iom_set_rstw_var_active('e3t_n') 251 ! ! ----------------------- ! 252 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases ! 253 ! ! ----------------------- ! 254 CALL iom_set_rstw_var_active('tilde_e3t_b') 255 CALL iom_set_rstw_var_active('tilde_e3t_n') 256 END IF 257 ! ! -------------! 258 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 259 ! ! ------------ ! 260 CALL iom_set_rstw_var_active('hdiv_lf') 261 ENDIF 262 ! 263 ENDIF 264 ! 265 END SUBROUTINE dom_vvl_init 266 267 292 END SUBROUTINE dom_vvl_zgr 293 268 294 SUBROUTINE dom_vvl_sf_nxt( kt, kcall ) 269 295 !!----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.