Changeset 14834 for NEMO/trunk/src/OCE/DOM/domqco.F90
- Timestamp:
- 2021-05-11T11:24:44+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/DOM/domqco.F90
r14820 r14834 123 123 CALL dom_qco_r3c( ssh(:,:,Kmm), r3t(:,:,Kmm), r3u(:,:,Kmm), r3v(:,:,Kmm), r3f(:,:) ) 124 124 #endif 125 ! dom_qco_r3c defines over [nn_hls, nn_hls-1, nn_hls, nn_hls-1] 126 IF( nn_hls == 2 ) CALL lbc_lnk( 'dom_qco_zgr', r3u(:,:,Kbb), 'U', 1._wp, r3v(:,:,Kbb), 'V', 1._wp, & 127 & r3u(:,:,Kmm), 'U', 1._wp, r3v(:,:,Kmm), 'V', 1._wp ) 125 128 ! 126 129 END SUBROUTINE dom_qco_zgr … … 146 149 ! 147 150 ! 148 pr3t(:,:) = pssh(:,:) * r1_ht_0(:,:) !== ratio at t-point ==! 151 DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 152 pr3t(ji,jj) = pssh(ji,jj) * r1_ht_0(ji,jj) !== ratio at t-point ==! 153 END_2D 149 154 ! 150 155 ! … … 154 159 #if ! defined key_qcoTest_FluxForm 155 160 ! ! no 'key_qcoTest_FluxForm' : surface weighted ssh average 156 DO_2D( 0, 0, 0, 0)157 158 159 160 161 161 DO_2D_OVR( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 162 pr3u(ji,jj) = 0.5_wp * ( e1e2t(ji ,jj) * pssh(ji ,jj) & 163 & + e1e2t(ji+1,jj) * pssh(ji+1,jj) ) * r1_hu_0(ji,jj) * r1_e1e2u(ji,jj) 164 pr3v(ji,jj) = 0.5_wp * ( e1e2t(ji,jj ) * pssh(ji,jj ) & 165 & + e1e2t(ji,jj+1) * pssh(ji,jj+1) ) * r1_hv_0(ji,jj) * r1_e1e2v(ji,jj) 166 END_2D 162 167 !!st ELSE !- Flux Form (simple averaging) 163 168 #else 164 DO_2D( 0, 0, 0, 0)165 166 167 169 DO_2D_OVR( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 170 pr3u(ji,jj) = 0.5_wp * ( pssh(ji,jj) + pssh(ji+1,jj ) ) * r1_hu_0(ji,jj) 171 pr3v(ji,jj) = 0.5_wp * ( pssh(ji,jj) + pssh(ji ,jj+1) ) * r1_hv_0(ji,jj) 172 END_2D 168 173 !!st ENDIF 169 174 #endif 170 175 ! 171 176 IF( .NOT.PRESENT( pr3f ) ) THEN !- lbc on ratio at u-, v-points only 172 CALL lbc_lnk( 'dom_qco_r3c', pr3u, 'U', 1._wp, pr3v, 'V', 1._wp )177 IF (nn_hls==1) CALL lbc_lnk( 'dom_qco_r3c', pr3u, 'U', 1._wp, pr3v, 'V', 1._wp ) 173 178 ! 174 179 ! … … 179 184 ! ! no 'key_qcoTest_FluxForm' : surface weighted ssh average 180 185 181 DO_2D( 0, 0, 0, 0) ! start from 1 since lbc_lnk('F') doesn't update the 1st row/line182 183 184 185 186 187 188 189 190 191 186 DO_2D_OVR( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) ! start from 1 since lbc_lnk('F') doesn't update the 1st row/line 187 ! round brackets added to fix the order of floating point operations 188 ! needed to ensure halo 1 - halo 2 compatibility 189 pr3f(ji,jj) = 0.25_wp * ( ( e1e2t(ji ,jj ) * pssh(ji ,jj ) & 190 & + e1e2t(ji+1,jj ) * pssh(ji+1,jj ) & 191 & ) & ! bracket for halo 1 - halo 2 compatibility 192 & + ( e1e2t(ji ,jj+1) * pssh(ji ,jj+1) & 193 & + e1e2t(ji+1,jj+1) * pssh(ji+1,jj+1) & 194 & ) & ! bracket for halo 1 - halo 2 compatibility 195 & ) * r1_hf_0(ji,jj) * r1_e1e2f(ji,jj) 196 END_2D 192 197 !!st ELSE !- Flux Form (simple averaging) 193 198 #else 194 DO_2D( 0, 0, 0, 0 ) ! start from 1 since lbc_lnk('F') doesn't update the 1st row/line195 196 197 198 & + ( pssh(ji,jj+1) + pssh(ji+1,jj+1) &199 200 201 199 DO_2D_OVR( nn_hls, nn_hls-1, nn_hls, nn_hls-1 ) 200 ! round brackets added to fix the order of floating point operations 201 ! needed to ensure halo 1 - halo 2 compatibility 202 pr3f(ji,jj) = 0.25_wp * ( ( pssh(ji,jj ) + pssh(ji+1,jj ) ) & 203 & + ( pssh(ji,jj+1) + pssh(ji+1,jj+1) & 204 & ) & ! bracket for halo 1 - halo 2 compatibility 205 & ) * r1_hf_0(ji,jj) 206 END_2D 202 207 !!st ENDIF 203 208 #endif 204 209 ! ! lbc on ratio at u-,v-,f-points 205 CALL lbc_lnk( 'dom_qco_r3c', pr3u, 'U', 1._wp, pr3v, 'V', 1._wp, pr3f, 'F', 1._wp )210 IF (nn_hls==1) CALL lbc_lnk( 'dom_qco_r3c', pr3u, 'U', 1._wp, pr3v, 'V', 1._wp, pr3f, 'F', 1._wp ) 206 211 ! 207 212 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.