- Timestamp:
- 2021-12-01T09:55:00+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/releases/r4.0/r4.0-HEAD/tests/VORTEX/MY_SRC/domvvl.F90
r11536 r15562 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 ! !== Set of all other vertical scale factors ==! (now and before) 134 CALL dom_vvl_zgr 135 ! 136 IF(lwxios) THEN 137 ! define variables in restart file when writing with XIOS 138 CALL iom_set_rstw_var_active('e3t_b') 139 CALL iom_set_rstw_var_active('e3t_n') 140 ! ! ----------------------- ! 141 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases ! 142 ! ! ----------------------- ! 143 CALL iom_set_rstw_var_active('tilde_e3t_b') 144 CALL iom_set_rstw_var_active('tilde_e3t_n') 145 END IF 146 ! ! -------------! 147 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 148 ! ! ------------ ! 149 CALL iom_set_rstw_var_active('hdiv_lf') 150 ENDIF 151 ! 152 ENDIF 153 ! 154 END SUBROUTINE dom_vvl_init 155 156 SUBROUTINE dom_vvl_zgr 157 !!---------------------------------------------------------------------- 158 !! *** ROUTINE dom_vvl_zgr *** 159 !! 160 !! ** Purpose : Interpolation of all scale factors, 161 !! depths and water column heights 162 !! 163 !! ** Method : - interpolate scale factors 164 !! 165 !! ** Action : - e3t_(n/b) and tilde_e3t_(n/b) 166 !! - Regrid: e3(u/v)_n 167 !! e3(u/v)_b 168 !! e3w_n 169 !! e3(u/v)w_b 170 !! e3(u/v)w_n 171 !! gdept_n, gdepw_n and gde3w_n 172 !! - h(t/u/v)_0 173 !! - frq_rst_e3t and frq_rst_hdv 174 !! 175 !! Reference : Leclair, M., and G. Madec, 2011, Ocean Modelling. 176 !!---------------------------------------------------------------------- 117 177 INTEGER :: ji, jj, jk 118 178 INTEGER :: ii0, ii1, ij0, ij1 119 179 REAL(wp):: zcoef 120 180 !!---------------------------------------------------------------------- 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 181 ! !== Set of all other vertical scale factors ==! (now and before) 136 182 ! ! Horizontal interpolation of e3t … … 160 206 gdepw_b(:,:,1) = 0.0_wp 161 207 DO jk = 2, jpk ! vertical sum 162 DO jj = 1, jpj163 DO ji = 1, jpi208 DO jj = 1, jpj 209 DO ji = 1, jpi 164 210 ! zcoef = tmask - wmask ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt 165 211 ! ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf) … … 245 291 ENDIF 246 292 ! 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 293 END SUBROUTINE dom_vvl_zgr 267 294 268 295 SUBROUTINE dom_vvl_sf_nxt( kt, kcall )
Note: See TracChangeset
for help on using the changeset viewer.