bdylib.F90 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. MODULE bdylib
  2. !!======================================================================
  3. !! *** MODULE bdylib ***
  4. !! Unstructured Open Boundary Cond. : Library module of generic boundary algorithms.
  5. !!======================================================================
  6. !! History : 3.6 ! 2013 (D. Storkey) new module
  7. !!----------------------------------------------------------------------
  8. #if defined key_bdy
  9. !!----------------------------------------------------------------------
  10. !! 'key_bdy' : Unstructured Open Boundary Condition
  11. !!----------------------------------------------------------------------
  12. !! bdy_orlanski_2d
  13. !! bdy_orlanski_3d
  14. !!----------------------------------------------------------------------
  15. USE timing ! Timing
  16. USE oce ! ocean dynamics and tracers
  17. USE dom_oce ! ocean space and time domain
  18. USE bdy_oce ! ocean open boundary conditions
  19. USE phycst ! physical constants
  20. USE lbclnk ! ocean lateral boundary conditions (or mpp link)
  21. USE in_out_manager !
  22. IMPLICIT NONE
  23. PRIVATE
  24. PUBLIC bdy_orlanski_2d ! routine called where?
  25. PUBLIC bdy_orlanski_3d ! routine called where?
  26. !!----------------------------------------------------------------------
  27. !! NEMO/OPA 3.3 , NEMO Consortium (2010)
  28. !! $Id: bdylib.F90 2355 2015-05-20 07:11:50Z ufla $
  29. !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
  30. !!----------------------------------------------------------------------
  31. CONTAINS
  32. SUBROUTINE bdy_orlanski_2d( idx, igrd, phib, phia, phi_ext, ll_npo )
  33. !!----------------------------------------------------------------------
  34. !! *** SUBROUTINE bdy_orlanski_2d ***
  35. !!
  36. !! - Apply Orlanski radiation condition adaptively to 2D fields:
  37. !! - radiation plus weak nudging at outflow points
  38. !! - no radiation and strong nudging at inflow points
  39. !!
  40. !!
  41. !! References: Marchesiello, McWilliams and Shchepetkin, Ocean Modelling vol. 3 (2001)
  42. !!----------------------------------------------------------------------
  43. TYPE(OBC_INDEX), INTENT(in) :: idx ! BDY indices
  44. INTEGER, INTENT(in) :: igrd ! grid index
  45. REAL(wp), DIMENSION(:,:), INTENT(in) :: phib ! model before 2D field
  46. REAL(wp), DIMENSION(:,:), INTENT(inout) :: phia ! model after 2D field (to be updated)
  47. REAL(wp), DIMENSION(:), INTENT(in) :: phi_ext ! external forcing data
  48. LOGICAL, INTENT(in) :: ll_npo ! switch for NPO version
  49. INTEGER :: jb ! dummy loop indices
  50. INTEGER :: ii, ij, iibm1, iibm2, ijbm1, ijbm2 ! 2D addresses
  51. INTEGER :: iijm1, iijp1, ijjm1, ijjp1 ! 2D addresses
  52. INTEGER :: iibm1jp1, iibm1jm1, ijbm1jp1, ijbm1jm1 ! 2D addresses
  53. INTEGER :: ii_offset, ij_offset ! offsets for mask indices
  54. INTEGER :: flagu, flagv ! short cuts
  55. REAL(wp) :: zmask_x, zmask_y1, zmask_y2
  56. REAL(wp) :: zex1, zex2, zey, zey1, zey2
  57. REAL(wp) :: zdt, zdx, zdy, znor2, zrx, zry ! intermediate calculations
  58. REAL(wp) :: zout, zwgt, zdy_centred
  59. REAL(wp) :: zdy_1, zdy_2, zsign_ups
  60. REAL(wp), PARAMETER :: zepsilon = 1.e-30 ! local small value
  61. REAL(wp), POINTER, DIMENSION(:,:) :: pmask ! land/sea mask for field
  62. REAL(wp), POINTER, DIMENSION(:,:) :: pmask_xdif ! land/sea mask for x-derivatives
  63. REAL(wp), POINTER, DIMENSION(:,:) :: pmask_ydif ! land/sea mask for y-derivatives
  64. REAL(wp), POINTER, DIMENSION(:,:) :: pe_xdif ! scale factors for x-derivatives
  65. REAL(wp), POINTER, DIMENSION(:,:) :: pe_ydif ! scale factors for y-derivatives
  66. !!----------------------------------------------------------------------
  67. IF( nn_timing == 1 ) CALL timing_start('bdy_orlanski_2d')
  68. ! ----------------------------------!
  69. ! Orlanski boundary conditions :!
  70. ! ----------------------------------!
  71. SELECT CASE(igrd)
  72. CASE(1)
  73. pmask => tmask(:,:,1)
  74. pmask_xdif => umask(:,:,1)
  75. pmask_ydif => vmask(:,:,1)
  76. pe_xdif => e1u(:,:)
  77. pe_ydif => e2v(:,:)
  78. ii_offset = 0
  79. ij_offset = 0
  80. CASE(2)
  81. pmask => umask(:,:,1)
  82. pmask_xdif => tmask(:,:,1)
  83. pmask_ydif => fmask(:,:,1)
  84. pe_xdif => e1t(:,:)
  85. pe_ydif => e2f(:,:)
  86. ii_offset = 1
  87. ij_offset = 0
  88. CASE(3)
  89. pmask => vmask(:,:,1)
  90. pmask_xdif => fmask(:,:,1)
  91. pmask_ydif => tmask(:,:,1)
  92. pe_xdif => e1f(:,:)
  93. pe_ydif => e2t(:,:)
  94. ii_offset = 0
  95. ij_offset = 1
  96. CASE DEFAULT ; CALL ctl_stop( 'unrecognised value for igrd in bdy_orlanksi_2d' )
  97. END SELECT
  98. !
  99. DO jb = 1, idx%nblenrim(igrd)
  100. ii = idx%nbi(jb,igrd)
  101. ij = idx%nbj(jb,igrd)
  102. flagu = int( idx%flagu(jb,igrd) )
  103. flagv = int( idx%flagv(jb,igrd) )
  104. !
  105. ! Calculate positions of b-1 and b-2 points for this rim point
  106. ! also (b-1,j-1) and (b-1,j+1) points
  107. iibm1 = ii + flagu ; iibm2 = ii + 2*flagu
  108. ijbm1 = ij + flagv ; ijbm2 = ij + 2*flagv
  109. !
  110. iijm1 = ii - abs(flagv) ; iijp1 = ii + abs(flagv)
  111. ijjm1 = ij - abs(flagu) ; ijjp1 = ij + abs(flagu)
  112. !
  113. iibm1jm1 = ii + flagu - abs(flagv) ; iibm1jp1 = ii + flagu + abs(flagv)
  114. ijbm1jm1 = ij + flagv - abs(flagu) ; ijbm1jp1 = ij + flagv + abs(flagu)
  115. !
  116. ! Calculate scale factors for calculation of spatial derivatives.
  117. zex1 = ( abs(iibm1-iibm2) * pe_xdif(iibm1+ii_offset,ijbm1 ) &
  118. & + abs(ijbm1-ijbm2) * pe_ydif(iibm1 ,ijbm1+ij_offset) )
  119. zex2 = ( abs(iibm1-iibm2) * pe_xdif(iibm2+ii_offset,ijbm2 ) &
  120. & + abs(ijbm1-ijbm2) * pe_ydif(iibm2 ,ijbm2+ij_offset) )
  121. zey1 = ( (iibm1-iibm1jm1) * pe_xdif(iibm1jm1+ii_offset,ijbm1jm1 ) &
  122. & + (ijbm1-ijbm1jm1) * pe_ydif(iibm1jm1 ,ijbm1jm1+ij_offset) )
  123. zey2 = ( (iibm1jp1-iibm1) * pe_xdif(iibm1+ii_offset,ijbm1) &
  124. & + (ijbm1jp1-ijbm1) * pe_ydif(iibm1 ,ijbm1+ij_offset) )
  125. ! make sure scale factors are nonzero
  126. if( zey1 .lt. rsmall ) zey1 = zey2
  127. if( zey2 .lt. rsmall ) zey2 = zey1
  128. zex1 = max(zex1,rsmall); zex2 = max(zex2,rsmall)
  129. zey1 = max(zey1,rsmall); zey2 = max(zey2,rsmall);
  130. !
  131. ! Calculate masks for calculation of spatial derivatives.
  132. zmask_x = ( abs(iibm1-iibm2) * pmask_xdif(iibm2+ii_offset,ijbm2 ) &
  133. & + abs(ijbm1-ijbm2) * pmask_ydif(iibm2 ,ijbm2+ij_offset) )
  134. zmask_y1 = ( (iibm1-iibm1jm1) * pmask_xdif(iibm1jm1+ii_offset,ijbm1jm1 ) &
  135. & + (ijbm1-ijbm1jm1) * pmask_ydif(iibm1jm1 ,ijbm1jm1+ij_offset) )
  136. zmask_y2 = ( (iibm1jp1-iibm1) * pmask_xdif(iibm1+ii_offset,ijbm1) &
  137. & + (ijbm1jp1-ijbm1) * pmask_ydif(iibm1 ,ijbm1+ij_offset) )
  138. ! Calculation of terms required for both versions of the scheme.
  139. ! Mask derivatives to ensure correct land boundary conditions for each variable.
  140. ! Centred derivative is calculated as average of "left" and "right" derivatives for
  141. ! this reason.
  142. ! Note no rdt factor in expression for zdt because it cancels in the expressions for
  143. ! zrx and zry.
  144. zdt = phia(iibm1,ijbm1) - phib(iibm1,ijbm1)
  145. zdx = ( ( phia(iibm1,ijbm1) - phia(iibm2,ijbm2) ) / zex2 ) * zmask_x
  146. zdy_1 = ( ( phib(iibm1 ,ijbm1 ) - phib(iibm1jm1,ijbm1jm1) ) / zey1 ) * zmask_y1
  147. zdy_2 = ( ( phib(iibm1jp1,ijbm1jp1) - phib(iibm1 ,ijbm1) ) / zey2 ) * zmask_y2
  148. zdy_centred = 0.5 * ( zdy_1 + zdy_2 )
  149. !!$ zdy_centred = phib(iibm1jp1,ijbm1jp1) - phib(iibm1jm1,ijbm1jm1)
  150. ! upstream differencing for tangential derivatives
  151. zsign_ups = sign( 1., zdt * zdy_centred )
  152. zsign_ups = 0.5*( zsign_ups + abs(zsign_ups) )
  153. zdy = zsign_ups * zdy_1 + (1. - zsign_ups) * zdy_2
  154. znor2 = zdx * zdx + zdy * zdy
  155. znor2 = max(znor2,zepsilon)
  156. !
  157. zrx = zdt * zdx / ( zex1 * znor2 )
  158. !!$ zrx = min(zrx,2.0_wp)
  159. zout = sign( 1., zrx )
  160. zout = 0.5*( zout + abs(zout) )
  161. zwgt = 2.*rdt*( (1.-zout) * idx%nbd(jb,igrd) + zout * idx%nbdout(jb,igrd) )
  162. ! only apply radiation on outflow points
  163. if( ll_npo ) then !! NPO version !!
  164. phia(ii,ij) = (1.-zout) * ( phib(ii,ij) + zwgt * ( phi_ext(jb) - phib(ii,ij) ) ) &
  165. & + zout * ( phib(ii,ij) + zrx*phia(iibm1,ijbm1) &
  166. & + zwgt * ( phi_ext(jb) - phib(ii,ij) ) ) / ( 1. + zrx )
  167. else !! full oblique radiation !!
  168. zsign_ups = sign( 1., zdt * zdy )
  169. zsign_ups = 0.5*( zsign_ups + abs(zsign_ups) )
  170. zey = zsign_ups * zey1 + (1.-zsign_ups) * zey2
  171. zry = zdt * zdy / ( zey * znor2 )
  172. phia(ii,ij) = (1.-zout) * ( phib(ii,ij) + zwgt * ( phi_ext(jb) - phib(ii,ij) ) ) &
  173. & + zout * ( phib(ii,ij) + zrx*phia(iibm1,ijbm1) &
  174. & - zsign_ups * zry * ( phib(ii ,ij ) - phib(iijm1,ijjm1 ) ) &
  175. & - (1.-zsign_ups) * zry * ( phib(iijp1,ijjp1) - phib(ii ,ij ) ) &
  176. & + zwgt * ( phi_ext(jb) - phib(ii,ij) ) ) / ( 1. + zrx )
  177. end if
  178. phia(ii,ij) = phia(ii,ij) * pmask(ii,ij)
  179. END DO
  180. !
  181. IF( nn_timing == 1 ) CALL timing_stop('bdy_orlanski_2d')
  182. END SUBROUTINE bdy_orlanski_2d
  183. SUBROUTINE bdy_orlanski_3d( idx, igrd, phib, phia, phi_ext, ll_npo )
  184. !!----------------------------------------------------------------------
  185. !! *** SUBROUTINE bdy_orlanski_3d ***
  186. !!
  187. !! - Apply Orlanski radiation condition adaptively to 3D fields:
  188. !! - radiation plus weak nudging at outflow points
  189. !! - no radiation and strong nudging at inflow points
  190. !!
  191. !!
  192. !! References: Marchesiello, McWilliams and Shchepetkin, Ocean Modelling vol. 3 (2001)
  193. !!----------------------------------------------------------------------
  194. TYPE(OBC_INDEX), INTENT(in) :: idx ! BDY indices
  195. INTEGER, INTENT(in) :: igrd ! grid index
  196. REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phib ! model before 3D field
  197. REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: phia ! model after 3D field (to be updated)
  198. REAL(wp), DIMENSION(:,:), INTENT(in) :: phi_ext ! external forcing data
  199. LOGICAL, INTENT(in) :: ll_npo ! switch for NPO version
  200. INTEGER :: jb, jk ! dummy loop indices
  201. INTEGER :: ii, ij, iibm1, iibm2, ijbm1, ijbm2 ! 2D addresses
  202. INTEGER :: iijm1, iijp1, ijjm1, ijjp1 ! 2D addresses
  203. INTEGER :: iibm1jp1, iibm1jm1, ijbm1jp1, ijbm1jm1 ! 2D addresses
  204. INTEGER :: ii_offset, ij_offset ! offsets for mask indices
  205. INTEGER :: flagu, flagv ! short cuts
  206. REAL(wp) :: zmask_x, zmask_y1, zmask_y2
  207. REAL(wp) :: zex1, zex2, zey, zey1, zey2
  208. REAL(wp) :: zdt, zdx, zdy, znor2, zrx, zry ! intermediate calculations
  209. REAL(wp) :: zout, zwgt, zdy_centred
  210. REAL(wp) :: zdy_1, zdy_2, zsign_ups
  211. REAL(wp), PARAMETER :: zepsilon = 1.e-30 ! local small value
  212. REAL(wp), POINTER, DIMENSION(:,:,:) :: pmask ! land/sea mask for field
  213. REAL(wp), POINTER, DIMENSION(:,:,:) :: pmask_xdif ! land/sea mask for x-derivatives
  214. REAL(wp), POINTER, DIMENSION(:,:,:) :: pmask_ydif ! land/sea mask for y-derivatives
  215. REAL(wp), POINTER, DIMENSION(:,:) :: pe_xdif ! scale factors for x-derivatives
  216. REAL(wp), POINTER, DIMENSION(:,:) :: pe_ydif ! scale factors for y-derivatives
  217. !!----------------------------------------------------------------------
  218. IF( nn_timing == 1 ) CALL timing_start('bdy_orlanski_3d')
  219. ! ----------------------------------!
  220. ! Orlanski boundary conditions :!
  221. ! ----------------------------------!
  222. SELECT CASE(igrd)
  223. CASE(1)
  224. pmask => tmask(:,:,:)
  225. pmask_xdif => umask(:,:,:)
  226. pmask_ydif => vmask(:,:,:)
  227. pe_xdif => e1u(:,:)
  228. pe_ydif => e2v(:,:)
  229. ii_offset = 0
  230. ij_offset = 0
  231. CASE(2)
  232. pmask => umask(:,:,:)
  233. pmask_xdif => tmask(:,:,:)
  234. pmask_ydif => fmask(:,:,:)
  235. pe_xdif => e1t(:,:)
  236. pe_ydif => e2f(:,:)
  237. ii_offset = 1
  238. ij_offset = 0
  239. CASE(3)
  240. pmask => vmask(:,:,:)
  241. pmask_xdif => fmask(:,:,:)
  242. pmask_ydif => tmask(:,:,:)
  243. pe_xdif => e1f(:,:)
  244. pe_ydif => e2t(:,:)
  245. ii_offset = 0
  246. ij_offset = 1
  247. CASE DEFAULT ; CALL ctl_stop( 'unrecognised value for igrd in bdy_orlanksi_2d' )
  248. END SELECT
  249. DO jk = 1, jpk
  250. !
  251. DO jb = 1, idx%nblenrim(igrd)
  252. ii = idx%nbi(jb,igrd)
  253. ij = idx%nbj(jb,igrd)
  254. flagu = int( idx%flagu(jb,igrd) )
  255. flagv = int( idx%flagv(jb,igrd) )
  256. !
  257. ! calculate positions of b-1 and b-2 points for this rim point
  258. ! also (b-1,j-1) and (b-1,j+1) points
  259. iibm1 = ii + flagu ; iibm2 = ii + 2*flagu
  260. ijbm1 = ij + flagv ; ijbm2 = ij + 2*flagv
  261. !
  262. iijm1 = ii - abs(flagv) ; iijp1 = ii + abs(flagv)
  263. ijjm1 = ij - abs(flagu) ; ijjp1 = ij + abs(flagu)
  264. !
  265. iibm1jm1 = ii + flagu - abs(flagv) ; iibm1jp1 = ii + flagu + abs(flagv)
  266. ijbm1jm1 = ij + flagv - abs(flagu) ; ijbm1jp1 = ij + flagv + abs(flagu)
  267. !
  268. ! Calculate scale factors for calculation of spatial derivatives.
  269. zex1 = ( abs(iibm1-iibm2) * pe_xdif(iibm1+ii_offset,ijbm1 ) &
  270. & + abs(ijbm1-ijbm2) * pe_ydif(iibm1 ,ijbm1+ij_offset) )
  271. zex2 = ( abs(iibm1-iibm2) * pe_xdif(iibm2+ii_offset,ijbm2 ) &
  272. & + abs(ijbm1-ijbm2) * pe_ydif(iibm2 ,ijbm2+ij_offset) )
  273. zey1 = ( (iibm1-iibm1jm1) * pe_xdif(iibm1jm1+ii_offset,ijbm1jm1 ) &
  274. & + (ijbm1-ijbm1jm1) * pe_ydif(iibm1jm1 ,ijbm1jm1+ij_offset) )
  275. zey2 = ( (iibm1jp1-iibm1) * pe_xdif(iibm1+ii_offset,ijbm1) &
  276. & + (ijbm1jp1-ijbm1) * pe_ydif(iibm1 ,ijbm1+ij_offset) )
  277. ! make sure scale factors are nonzero
  278. if( zey1 .lt. rsmall ) zey1 = zey2
  279. if( zey2 .lt. rsmall ) zey2 = zey1
  280. zex1 = max(zex1,rsmall); zex2 = max(zex2,rsmall);
  281. zey1 = max(zey1,rsmall); zey2 = max(zey2,rsmall);
  282. !
  283. ! Calculate masks for calculation of spatial derivatives.
  284. zmask_x = ( abs(iibm1-iibm2) * pmask_xdif(iibm2+ii_offset,ijbm2 ,jk) &
  285. & + abs(ijbm1-ijbm2) * pmask_ydif(iibm2 ,ijbm2+ij_offset,jk) )
  286. zmask_y1 = ( (iibm1-iibm1jm1) * pmask_xdif(iibm1jm1+ii_offset,ijbm1jm1 ,jk) &
  287. & + (ijbm1-ijbm1jm1) * pmask_ydif(iibm1jm1 ,ijbm1jm1+ij_offset,jk) )
  288. zmask_y2 = ( (iibm1jp1-iibm1) * pmask_xdif(iibm1+ii_offset,ijbm1 ,jk) &
  289. & + (ijbm1jp1-ijbm1) * pmask_ydif(iibm1 ,ijbm1+ij_offset,jk) )
  290. !
  291. ! Calculate normal (zrx) and tangential (zry) components of radiation velocities.
  292. ! Mask derivatives to ensure correct land boundary conditions for each variable.
  293. ! Centred derivative is calculated as average of "left" and "right" derivatives for
  294. ! this reason.
  295. zdt = phia(iibm1,ijbm1,jk) - phib(iibm1,ijbm1,jk)
  296. zdx = ( ( phia(iibm1,ijbm1,jk) - phia(iibm2,ijbm2,jk) ) / zex2 ) * zmask_x
  297. zdy_1 = ( ( phib(iibm1 ,ijbm1 ,jk) - phib(iibm1jm1,ijbm1jm1,jk) ) / zey1 ) * zmask_y1
  298. zdy_2 = ( ( phib(iibm1jp1,ijbm1jp1,jk) - phib(iibm1 ,ijbm1 ,jk) ) / zey2 ) * zmask_y2
  299. zdy_centred = 0.5 * ( zdy_1 + zdy_2 )
  300. !!$ zdy_centred = phib(iibm1jp1,ijbm1jp1,jk) - phib(iibm1jm1,ijbm1jm1,jk)
  301. ! upstream differencing for tangential derivatives
  302. zsign_ups = sign( 1., zdt * zdy_centred )
  303. zsign_ups = 0.5*( zsign_ups + abs(zsign_ups) )
  304. zdy = zsign_ups * zdy_1 + (1. - zsign_ups) * zdy_2
  305. znor2 = zdx * zdx + zdy * zdy
  306. znor2 = max(znor2,zepsilon)
  307. !
  308. ! update boundary value:
  309. zrx = zdt * zdx / ( zex1 * znor2 )
  310. !!$ zrx = min(zrx,2.0_wp)
  311. zout = sign( 1., zrx )
  312. zout = 0.5*( zout + abs(zout) )
  313. zwgt = 2.*rdt*( (1.-zout) * idx%nbd(jb,igrd) + zout * idx%nbdout(jb,igrd) )
  314. ! only apply radiation on outflow points
  315. if( ll_npo ) then !! NPO version !!
  316. phia(ii,ij,jk) = (1.-zout) * ( phib(ii,ij,jk) + zwgt * ( phi_ext(jb,jk) - phib(ii,ij,jk) ) ) &
  317. & + zout * ( phib(ii,ij,jk) + zrx*phia(iibm1,ijbm1,jk) &
  318. & + zwgt * ( phi_ext(jb,jk) - phib(ii,ij,jk) ) ) / ( 1. + zrx )
  319. else !! full oblique radiation !!
  320. zsign_ups = sign( 1., zdt * zdy )
  321. zsign_ups = 0.5*( zsign_ups + abs(zsign_ups) )
  322. zey = zsign_ups * zey1 + (1.-zsign_ups) * zey2
  323. zry = zdt * zdy / ( zey * znor2 )
  324. phia(ii,ij,jk) = (1.-zout) * ( phib(ii,ij,jk) + zwgt * ( phi_ext(jb,jk) - phib(ii,ij,jk) ) ) &
  325. & + zout * ( phib(ii,ij,jk) + zrx*phia(iibm1,ijbm1,jk) &
  326. & - zsign_ups * zry * ( phib(ii ,ij ,jk) - phib(iijm1,ijjm1,jk) ) &
  327. & - (1.-zsign_ups) * zry * ( phib(iijp1,ijjp1,jk) - phib(ii ,ij ,jk) ) &
  328. & + zwgt * ( phi_ext(jb,jk) - phib(ii,ij,jk) ) ) / ( 1. + zrx )
  329. end if
  330. phia(ii,ij,jk) = phia(ii,ij,jk) * pmask(ii,ij,jk)
  331. END DO
  332. !
  333. END DO
  334. IF( nn_timing == 1 ) CALL timing_stop('bdy_orlanski_3d')
  335. END SUBROUTINE bdy_orlanski_3d
  336. #else
  337. !!----------------------------------------------------------------------
  338. !! Dummy module NO Unstruct Open Boundary Conditions
  339. !!----------------------------------------------------------------------
  340. CONTAINS
  341. SUBROUTINE bdy_orlanski_2d( idx, igrd, phib, phia, phi_ext ) ! Empty routine
  342. WRITE(*,*) 'bdy_orlanski_2d: You should not have seen this print! error?', kt
  343. END SUBROUTINE bdy_orlanski_2d
  344. SUBROUTINE bdy_orlanski_3d( idx, igrd, phib, phia, phi_ext ) ! Empty routine
  345. WRITE(*,*) 'bdy_orlanski_3d: You should not have seen this print! error?', kt
  346. END SUBROUTINE bdy_orlanski_3d
  347. #endif
  348. !!======================================================================
  349. END MODULE bdylib