1285 integer :: i_padd, j_padd, ntiles
1286 integer :: ibry, itrc, ivar, ng
1295 IF (.not.
allocated(
bounds))
THEN
1300 allocate (
bounds(ng) % tile(-1:ntiles) )
1302 allocate (
bounds(ng) % LBi(-1:ntiles) )
1303 allocate (
bounds(ng) % UBi(-1:ntiles) )
1304 allocate (
bounds(ng) % LBj(-1:ntiles) )
1305 allocate (
bounds(ng) % UBj(-1:ntiles) )
1307 allocate (
bounds(ng) % Istr(-1:ntiles) )
1308 allocate (
bounds(ng) % Iend(-1:ntiles) )
1309 allocate (
bounds(ng) % Jstr(-1:ntiles) )
1310 allocate (
bounds(ng) % Jend(-1:ntiles) )
1312 allocate (
bounds(ng) % IstrR(-1:ntiles) )
1313 allocate (
bounds(ng) % IendR(-1:ntiles) )
1314 allocate (
bounds(ng) % IstrU(-1:ntiles) )
1315 allocate (
bounds(ng) % JstrR(-1:ntiles) )
1316 allocate (
bounds(ng) % JendR(-1:ntiles) )
1317 allocate (
bounds(ng) % JstrV(-1:ntiles) )
1319 allocate (
bounds(ng) % IstrB(-1:ntiles) )
1320 allocate (
bounds(ng) % IendB(-1:ntiles) )
1321 allocate (
bounds(ng) % IstrM(-1:ntiles) )
1322 allocate (
bounds(ng) % JstrB(-1:ntiles) )
1323 allocate (
bounds(ng) % JendB(-1:ntiles) )
1324 allocate (
bounds(ng) % JstrM(-1:ntiles) )
1326 allocate (
bounds(ng) % IstrP(-1:ntiles) )
1327 allocate (
bounds(ng) % IendP(-1:ntiles) )
1328 allocate (
bounds(ng) % IstrT(-1:ntiles) )
1329 allocate (
bounds(ng) % IendT(-1:ntiles) )
1330 allocate (
bounds(ng) % JstrP(-1:ntiles) )
1331 allocate (
bounds(ng) % JendP(-1:ntiles) )
1332 allocate (
bounds(ng) % JstrT(-1:ntiles) )
1333 allocate (
bounds(ng) % JendT(-1:ntiles) )
1335 allocate (
bounds(ng) % Istrm3(-1:ntiles) )
1336 allocate (
bounds(ng) % Istrm2(-1:ntiles) )
1337 allocate (
bounds(ng) % Istrm1(-1:ntiles) )
1338 allocate (
bounds(ng) % IstrUm2(-1:ntiles) )
1339 allocate (
bounds(ng) % IstrUm1(-1:ntiles) )
1340 allocate (
bounds(ng) % Iendp1(-1:ntiles) )
1341 allocate (
bounds(ng) % Iendp2(-1:ntiles) )
1342 allocate (
bounds(ng) % Iendp2i(-1:ntiles) )
1343 allocate (
bounds(ng) % Iendp3(-1:ntiles) )
1345 allocate (
bounds(ng) % Jstrm3(-1:ntiles) )
1346 allocate (
bounds(ng) % Jstrm2(-1:ntiles) )
1347 allocate (
bounds(ng) % Jstrm1(-1:ntiles) )
1348 allocate (
bounds(ng) % JstrVm2(-1:ntiles) )
1349 allocate (
bounds(ng) % JstrVm1(-1:ntiles) )
1350 allocate (
bounds(ng) % Jendp1(-1:ntiles) )
1351 allocate (
bounds(ng) % Jendp2(-1:ntiles) )
1352 allocate (
bounds(ng) % Jendp2i(-1:ntiles) )
1353 allocate (
bounds(ng) % Jendp3(-1:ntiles) )
1355 allocate (
bounds(ng) % Imin(4,0:1,0:ntiles) )
1356 allocate (
bounds(ng) % Imax(4,0:1,0:ntiles) )
1357 allocate (
bounds(ng) % Jmin(4,0:1,0:ntiles) )
1358 allocate (
bounds(ng) % Jmax(4,0:1,0:ntiles) )
1364 IF (.not.
allocated(xtr_bounds))
THEN
1365 allocate ( xtr_bounds(
ngrids) )
1369 allocate ( xtr_bounds(ng) % tile(-1:ntiles) )
1371 allocate ( xtr_bounds(ng) % LBi(-1:ntiles) )
1372 allocate ( xtr_bounds(ng) % UBi(-1:ntiles) )
1373 allocate ( xtr_bounds(ng) % LBj(-1:ntiles) )
1374 allocate ( xtr_bounds(ng) % UBj(-1:ntiles) )
1376 allocate ( xtr_bounds(ng) % Istr(-1:ntiles) )
1377 allocate ( xtr_bounds(ng) % Iend(-1:ntiles) )
1378 allocate ( xtr_bounds(ng) % Jstr(-1:ntiles) )
1379 allocate ( xtr_bounds(ng) % Jend(-1:ntiles) )
1381 allocate ( xtr_bounds(ng) % IstrR(-1:ntiles) )
1382 allocate ( xtr_bounds(ng) % IendR(-1:ntiles) )
1383 allocate ( xtr_bounds(ng) % IstrU(-1:ntiles) )
1384 allocate ( xtr_bounds(ng) % JstrR(-1:ntiles) )
1385 allocate ( xtr_bounds(ng) % JendR(-1:ntiles) )
1386 allocate ( xtr_bounds(ng) % JstrV(-1:ntiles) )
1388 allocate ( xtr_bounds(ng) % IstrB(-1:ntiles) )
1389 allocate ( xtr_bounds(ng) % IendB(-1:ntiles) )
1390 allocate ( xtr_bounds(ng) % IstrM(-1:ntiles) )
1391 allocate ( xtr_bounds(ng) % JstrB(-1:ntiles) )
1392 allocate ( xtr_bounds(ng) % JendB(-1:ntiles) )
1393 allocate ( xtr_bounds(ng) % JstrM(-1:ntiles) )
1395 allocate ( xtr_bounds(ng) % IstrP(-1:ntiles) )
1396 allocate ( xtr_bounds(ng) % IendP(-1:ntiles) )
1397 allocate ( xtr_bounds(ng) % IstrT(-1:ntiles) )
1398 allocate ( xtr_bounds(ng) % IendT(-1:ntiles) )
1399 allocate ( xtr_bounds(ng) % JstrP(-1:ntiles) )
1400 allocate ( xtr_bounds(ng) % JendP(-1:ntiles) )
1401 allocate ( xtr_bounds(ng) % JstrT(-1:ntiles) )
1402 allocate ( xtr_bounds(ng) % JendT(-1:ntiles) )
1404 allocate ( xtr_bounds(ng) % Istrm3(-1:ntiles) )
1405 allocate ( xtr_bounds(ng) % Istrm2(-1:ntiles) )
1406 allocate ( xtr_bounds(ng) % Istrm1(-1:ntiles) )
1407 allocate ( xtr_bounds(ng) % IstrUm2(-1:ntiles) )
1408 allocate ( xtr_bounds(ng) % IstrUm1(-1:ntiles) )
1409 allocate ( xtr_bounds(ng) % Iendp1(-1:ntiles) )
1410 allocate ( xtr_bounds(ng) % Iendp2(-1:ntiles) )
1411 allocate ( xtr_bounds(ng) % Iendp2i(-1:ntiles) )
1412 allocate ( xtr_bounds(ng) % Iendp3(-1:ntiles) )
1414 allocate ( xtr_bounds(ng) % Jstrm3(-1:ntiles) )
1415 allocate ( xtr_bounds(ng) % Jstrm2(-1:ntiles) )
1416 allocate ( xtr_bounds(ng) % Jstrm1(-1:ntiles) )
1417 allocate ( xtr_bounds(ng) % JstrVm2(-1:ntiles) )
1418 allocate ( xtr_bounds(ng) % JstrVm1(-1:ntiles) )
1419 allocate ( xtr_bounds(ng) % Jendp1(-1:ntiles) )
1420 allocate ( xtr_bounds(ng) % Jendp2(-1:ntiles) )
1421 allocate ( xtr_bounds(ng) % Jendp2i(-1:ntiles) )
1422 allocate ( xtr_bounds(ng) % Jendp3(-1:ntiles) )
1424 allocate ( xtr_bounds(ng) % Imin(4,0:1,0:ntiles) )
1425 allocate ( xtr_bounds(ng) % Imax(4,0:1,0:ntiles) )
1426 allocate ( xtr_bounds(ng) % Jmin(4,0:1,0:ntiles) )
1427 allocate ( xtr_bounds(ng) % Jmax(4,0:1,0:ntiles) )
1435 IF (.not.
allocated(
domain))
THEN
1440 allocate (
domain(ng) % Eastern_Edge(-1:ntiles) )
1441 allocate (
domain(ng) % Western_Edge(-1:ntiles) )
1442 allocate (
domain(ng) % Northern_Edge(-1:ntiles) )
1443 allocate (
domain(ng) % Southern_Edge(-1:ntiles) )
1445 allocate (
domain(ng) % NorthEast_Corner(-1:ntiles) )
1446 allocate (
domain(ng) % NorthWest_Corner(-1:ntiles) )
1447 allocate (
domain(ng) % SouthEast_Corner(-1:ntiles) )
1448 allocate (
domain(ng) % SouthWest_Corner(-1:ntiles) )
1450 allocate (
domain(ng) % NorthEast_Test(-1:ntiles) )
1451 allocate (
domain(ng) % NorthWest_Test(-1:ntiles) )
1452 allocate (
domain(ng) % SouthEast_Test(-1:ntiles) )
1453 allocate (
domain(ng) % SouthWest_Test(-1:ntiles) )
1455 allocate (
domain(ng) % Xmin_psi(0:ntiles) )
1456 allocate (
domain(ng) % Xmax_psi(0:ntiles) )
1457 allocate (
domain(ng) % Ymin_psi(0:ntiles) )
1458 allocate (
domain(ng) % Ymax_psi(0:ntiles) )
1460 allocate (
domain(ng) % Xmin_rho(0:ntiles) )
1461 allocate (
domain(ng) % Xmax_rho(0:ntiles) )
1462 allocate (
domain(ng) % Ymin_rho(0:ntiles) )
1463 allocate (
domain(ng) % Ymax_rho(0:ntiles) )
1465 allocate (
domain(ng) % Xmin_u(0:ntiles) )
1466 allocate (
domain(ng) % Xmax_u(0:ntiles) )
1467 allocate (
domain(ng) % Ymin_u(0:ntiles) )
1468 allocate (
domain(ng) % Ymax_u(0:ntiles) )
1470 allocate (
domain(ng) % Xmin_v(0:ntiles) )
1471 allocate (
domain(ng) % Xmax_v(0:ntiles) )
1472 allocate (
domain(ng) % Ymin_v(0:ntiles) )
1473 allocate (
domain(ng) % Ymax_v(0:ntiles) )
1479 IF (.not.
allocated(xtr_domain))
THEN
1480 allocate ( xtr_domain(
ngrids) )
1484 allocate ( xtr_domain(ng) % Eastern_Edge(-1:ntiles) )
1485 allocate ( xtr_domain(ng) % Western_Edge(-1:ntiles) )
1486 allocate ( xtr_domain(ng) % Northern_Edge(-1:ntiles) )
1487 allocate ( xtr_domain(ng) % Southern_Edge(-1:ntiles) )
1489 allocate ( xtr_domain(ng) % NorthEast_Corner(-1:ntiles) )
1490 allocate ( xtr_domain(ng) % NorthWest_Corner(-1:ntiles) )
1491 allocate ( xtr_domain(ng) % SouthEast_Corner(-1:ntiles) )
1492 allocate ( xtr_domain(ng) % SouthWest_Corner(-1:ntiles) )
1494 allocate ( xtr_domain(ng) % NorthEast_Test(-1:ntiles) )
1495 allocate ( xtr_domain(ng) % NorthWest_Test(-1:ntiles) )
1496 allocate ( xtr_domain(ng) % SouthEast_Test(-1:ntiles) )
1497 allocate ( xtr_domain(ng) % SouthWest_Test(-1:ntiles) )
1499 allocate ( xtr_domain(ng) % Xmin_psi(0:ntiles) )
1500 allocate ( xtr_domain(ng) % Xmax_psi(0:ntiles) )
1501 allocate ( xtr_domain(ng) % Ymin_psi(0:ntiles) )
1502 allocate ( xtr_domain(ng) % Ymax_psi(0:ntiles) )
1504 allocate ( xtr_domain(ng) % Xmin_rho(0:ntiles) )
1505 allocate ( xtr_domain(ng) % Xmax_rho(0:ntiles) )
1506 allocate ( xtr_domain(ng) % Ymin_rho(0:ntiles) )
1507 allocate ( xtr_domain(ng) % Ymax_rho(0:ntiles) )
1509 allocate ( xtr_domain(ng) % Xmin_u(0:ntiles) )
1510 allocate ( xtr_domain(ng) % Xmax_u(0:ntiles) )
1511 allocate ( xtr_domain(ng) % Ymin_u(0:ntiles) )
1512 allocate ( xtr_domain(ng) % Ymax_u(0:ntiles) )
1514 allocate ( xtr_domain(ng) % Xmin_v(0:ntiles) )
1515 allocate ( xtr_domain(ng) % Xmax_v(0:ntiles) )
1516 allocate ( xtr_domain(ng) % Ymin_v(0:ntiles) )
1517 allocate ( xtr_domain(ng) % Ymax_v(0:ntiles) )
1530 IF (.not.
allocated(xtr_iobounds))
THEN
1531 allocate ( xtr_iobounds(
ngrids) )
1541# ifdef DIAGNOSTICS_TS
1546# if defined TS_DIF2 || defined TS_DIF4
1548# if defined MIX_GEO_TS || defined MIX_ISO_TS
1555# ifdef DIAGNOSTICS_UV
1567# ifdef BOTTOM_STREAMING
1570# ifdef SURFACE_STREAMING
1576# if defined VEGETATION && defined VEG_DRAG
1582# if defined UV_VIS2 || defined UV_VIS4
1600# ifdef BOTTOM_STREAMING
1604# ifdef SURFACE_STREAMING
1615# if defined UV_VIS2 || defined UV_VIS4
1633 i_padd=(
lm(ng)+2)/2-(
lm(ng)+1)/2
1634 j_padd=(
mm(ng)+2)/2-(
mm(ng)+1)/2
1635 im(ng)=
lm(ng)+i_padd
1636 jm(ng)=
mm(ng)+j_padd
1662# ifdef ADJUST_STFLUX
1668#ifdef ADJUST_WSTRESS
1678# if defined GLS_MIXING || defined MY25_MIXING
1702# ifdef ADJUST_STFLUX
1708#ifdef ADJUST_WSTRESS
1718# if defined GLS_MIXING || defined MY25_MIXING
1726 IF (.not.
allocated(
lbc))
THEN
1731 lbc(ibry,ivar,ng)%acquire = .false.
1732 lbc(ibry,ivar,ng)%Chapman_explicit = .false.
1733 lbc(ibry,ivar,ng)%Chapman_implicit = .false.
1734 lbc(ibry,ivar,ng)%clamped = .false.
1735 lbc(ibry,ivar,ng)%closed = .false.
1736 lbc(ibry,ivar,ng)%Flather = .false.
1737 lbc(ibry,ivar,ng)%gradient = .false.
1738 lbc(ibry,ivar,ng)%mixed = .false.
1739 lbc(ibry,ivar,ng)%nested = .false.
1740 lbc(ibry,ivar,ng)%nudging = .false.
1741 lbc(ibry,ivar,ng)%periodic = .false.
1742 lbc(ibry,ivar,ng)%radiation = .false.
1743 lbc(ibry,ivar,ng)%reduced = .false.
1744 lbc(ibry,ivar,ng)%Shchepetkin = .false.
1749#if defined ADJOINT || defined TANGENT || defined TL_IOMS
1750 IF (.not.
allocated(
ad_lbc))
THEN
1755 ad_lbc(ibry,ivar,ng)%acquire = .false.
1756 ad_lbc(ibry,ivar,ng)%Chapman_implicit = .false.
1757 ad_lbc(ibry,ivar,ng)%Chapman_explicit = .false.
1758 ad_lbc(ibry,ivar,ng)%clamped = .false.
1759 ad_lbc(ibry,ivar,ng)%closed = .false.
1760 ad_lbc(ibry,ivar,ng)%Flather = .false.
1761 ad_lbc(ibry,ivar,ng)%gradient = .false.
1762 ad_lbc(ibry,ivar,ng)%mixed = .false.
1763 ad_lbc(ibry,ivar,ng)%nested = .false.
1764 ad_lbc(ibry,ivar,ng)%nudging = .false.
1765 ad_lbc(ibry,ivar,ng)%periodic = .false.
1766 ad_lbc(ibry,ivar,ng)%radiation = .false.
1767 ad_lbc(ibry,ivar,ng)%reduced = .false.
1768 ad_lbc(ibry,ivar,ng)%Shchepetkin = .false.
1774#if defined TANGENT || defined TL_IOMS
1775 IF (.not.
allocated(
tl_lbc))
THEN
1780 tl_lbc(ibry,ivar,ng)%acquire = .false.
1781 tl_lbc(ibry,ivar,ng)%Chapman_implicit = .false.
1782 tl_lbc(ibry,ivar,ng)%Chapman_explicit = .false.
1783 tl_lbc(ibry,ivar,ng)%clamped = .false.
1784 tl_lbc(ibry,ivar,ng)%closed = .false.
1785 tl_lbc(ibry,ivar,ng)%Flather = .false.
1786 tl_lbc(ibry,ivar,ng)%gradient = .false.
1787 tl_lbc(ibry,ivar,ng)%mixed = .false.
1788 tl_lbc(ibry,ivar,ng)%nested = .false.
1789 tl_lbc(ibry,ivar,ng)%nudging = .false.
1790 tl_lbc(ibry,ivar,ng)%periodic =.false.
1791 tl_lbc(ibry,ivar,ng)%radiation = .false.
1792 tl_lbc(ibry,ivar,ng)%reduced = .false.
1793 tl_lbc(ibry,ivar,ng)%Shchepetkin = .false.
1839# if defined ADJOINT || defined TANGENT || defined TL_IOMS
1875# if defined TANGENT || defined TL_IOMS