Changeset 4288
 Timestamp:
 20131120T16:02:06+01:00 (9 years ago)
 Location:
 branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r4280 r4288 56 56 57 57 ! Potential namelist parameters below to be read in dyn_spg_ts_init 58 LOGICAL, PUBLIC, PARAMETER :: ln_bt_fw=. true. !: Forward integration of barotropic substepping58 LOGICAL, PUBLIC, PARAMETER :: ln_bt_fw=.TRUE. !: Forward integration of barotropic substepping 59 59 LOGICAL, PRIVATE, PARAMETER :: ln_bt_av=.TRUE. !: Time averaging of barotropic variables 60 60 LOGICAL, PRIVATE, PARAMETER :: ln_bt_nn_auto=.FALSE. !: Set number of iterations automatically … … 228 228 IF ( kt == nit000 .OR. lk_vvl ) THEN 229 229 IF ( ln_dynvor_een ) THEN 230 zht(:,:) = 0. 231 DO jk = 1, jpk 232 zht(:,:) = zht(:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk) 233 END DO 230 ! JC: Simplification needed below: define ht_0 even when volume is fixed 231 IF (lk_vvl) THEN 232 zht(:,:) = (ht_0(:,:) + sshn(:,:)) * tmask(:,:,1) 233 ELSE 234 zht(:,:) = 0. 235 DO jk = 1, jpkm1 236 zht(:,:) = zht(:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk) 237 END DO 238 ENDIF 239 234 240 DO jj = 1, jpjm1 235 241 DO ji = 1, jpim1 … … 1049 1055 INTEGER , INTENT(in) :: kt ! ocean timestep 1050 1056 ! 1051 INTEGER :: ji ,jj 1057 INTEGER :: ji ,jj, jk 1052 1058 REAL(wp) :: zxr2, zyr2, zcmax 1053 REAL(wp), POINTER, DIMENSION(:,:) :: zcu 1059 REAL(wp), POINTER, DIMENSION(:,:) :: zcu, zht 1054 1060 !! 1055 1061 ! NAMELIST/namsplit/ ln_bt_fw, ln_bt_av, ln_bt_nn_auto, & … … 1060 1066 ! ! Max courant number for ext. grav. waves 1061 1067 ! 1062 CALL wrk_alloc( jpi, jpj, zcu ) 1063 ! 1068 CALL wrk_alloc( jpi, jpj, zcu, zht ) 1069 ! 1070 ! JC: Simplification needed below: define ht_0 even when volume is fixed 1071 IF (lk_vvl) THEN 1072 zht(:,:) = ht_0(:,:) * tmask(:,:,1) 1073 ELSE 1074 zht(:,:) = 0. 1075 DO jk = 1, jpkm1 1076 zht(:,:) = zht(:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk) 1077 END DO 1078 ENDIF 1079 1064 1080 DO jj = 1, jpj 1065 DO ji =1, jpi 1081 DO ji =1, jpi 1066 1082 zxr2 = 1./(e1t(ji,jj)*e1t(ji,jj)) 1067 1083 zyr2 = 1./(e2t(ji,jj)*e2t(ji,jj)) 1068 zcu(ji,jj) = sqrt(grav* ht_0(ji,jj)*(zxr2 + zyr2) )1084 zcu(ji,jj) = sqrt(grav*zht(ji,jj)*(zxr2 + zyr2) ) 1069 1085 END DO 1070 1086 END DO … … 1120 1136 ENDIF 1121 1137 ! 1122 CALL wrk_dealloc( jpi, jpj, zcu )1138 CALL wrk_dealloc( jpi, jpj, zcu, zht ) 1123 1139 ! 1124 1140 END SUBROUTINE dyn_spg_ts_init 
branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
r4263 r4288 36 36 USE iom 37 37 USE sbcrnf, ONLY: h_rnf, nk_rnf, sbc_rnf_div ! River runoff 38 USE dynspg_oce, ONLY: un_b, vn_b, un_adv, vn_adv39 38 USE dynspg_ts, ONLY: ln_bt_fw 40 39 USE dynspg_oce, ONLY: lk_dynspg_ts … … 288 287 ENDIF 289 288 290 IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ln_bt_fw ) THEN !** Euler timestepping at first timestep : no filter 289 # if defined key_dynspg_ts 290 IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ln_bt_fw ) THEN !** Euler timestepping: no filter 291 # else 292 IF ( neuler == 0 .AND. kt == nit000 ) THEN !** Euler timestepping at first timestep : no filter 293 #endif 291 294 sshb(:,:) = sshn(:,:) ! before < now 292 295 sshn(:,:) = ssha(:,:) ! now < after (before already = now) 
branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/step.F90
r4278 r4288 99 99 ! Ocean dynamics : hdiv, rot, ssh, e3, wn 100 100 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 101 CALL zdf_bfr( kstp ) ! bottom friction (if quadratic) 101 102 CALL ssh_nxt ( kstp ) ! after ssh (includes call to div_cur) 102 103 IF( lk_dynspg_ts ) THEN … … 108 109 IF( ln_zps ) CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv, & ! zps: now hor. derivative 109 110 & rhd, gru , grv ) ! of t, s, rd at the last ocean level 110 CALL zdf_bfr( kstp ) ! bottom friction (if quadratic)111 111 112 112 ua(:,:,:) = 0.e0 ! set dynamics trends to zero … … 125 125 CALL dyn_hpg( kstp ) ! horizontal gradient of Hydrostatic pressure 126 126 CALL dyn_spg( kstp, indic ) ! surface pressure gradient 127 128 hdivb(:,:,:) = hdivn(:,:,:) ! Store now divergence and rot temporarly, revert to these below 129 rotb(:,:,:) = rotn(:,:,:) 130 ua_sv(:,:,:) = ua(:,:,:) ! Save trends (barotropic trend has been fully updated) 131 va_sv(:,:,:) = va(:,:,:) 132 127 133 CALL div_cur( kstp ) ! Horizontal divergence & Relative vorticity (2nd call in timesplit case) 128 129 ua_sv(:,:,:) = ua(:,:,:) ! save next velocities (not trends !)130 va_sv(:,:,:) = va(:,:,:)131 134 ENDIF 132 135 IF( lk_vvl ) CALL dom_vvl_sf_nxt( kstp ) ! after vertical scale factors … … 140 143 ! 141 144 ! VERTICAL PHYSICS 142 IF( .NOT. lk_dynspg_ts ) CALL zdf_bfr( kstp ) ! bottom friction143 144 145 ! ! Vertical eddy viscosity and diffusivity coefficients 145 146 IF( lk_zdfric ) CALL zdf_ric( kstp ) ! Richardson number dependent Kz … … 252 253 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 253 254 IF( lk_dynspg_ts ) THEN 254 ! revert to previously computed tendencies:255 ! revert to previously computed momentum tendencies 255 256 ! (not using ua, va as temporary arrays during tracers' update could avoid that) 256 257 ua(:,:,:) = ua_sv(:,:,:) 257 258 va(:,:,:) = va_sv(:,:,:) 259 ! Revert now divergence and rotational to previously computed ones 260 !(needed because of the time swap in div_cur, at the beginning of each time step) 261 hdivn(:,:,:) = hdivb(:,:,:) 262 rotn(:,:,:) = rotb(:,:,:) 263 258 264 CALL dyn_bfr( kstp ) ! bottom friction 259 265 CALL dyn_zdf( kstp ) ! vertical diffusion
Note: See TracChangeset
for help on using the changeset viewer.