Changeset 10216
- Timestamp:
- 2018-10-23T18:48:32+02:00 (6 years ago)
- Location:
- branches/UKMO/dev_r10171_test_crs_AMM7/NEMOGCM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r10171_test_crs_AMM7/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
r10115 r10216 66 66 ! passive tracer coarsened online simulations 67 67 !----------------------------------------------------------------------- 68 nn_factx = 3 ! Reduction factor of x-direction 69 nn_facty = 3 ! Reduction factor of y-direction 70 nn_msh_crs = 1 ! create (=1) a mesh file or not (=0) 71 nn_crs_kz = 0 ! 0, MEAN of volume boxes 72 ! 1, MAX of boxes 73 ! 2, MIN of boxes 74 ! 3, 10**(MEAN(LOG()) of volume boxes 75 ! 4, MEDIANE of boxes 76 ln_crs_wn = .true. ! wn coarsened (T) or computed using horizontal divergence ( F ) 77 ln_crs_top = .true. ! coarsening online for the BCG model ( T) or only for outpout of physics ( F ) 68 78 / 69 79 !----------------------------------------------------------------------- -
branches/UKMO/dev_r10171_test_crs_AMM7/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm
r4990 r10216 1 bld::tool::fppkeys key_dynspg_flt key_ldfslp key_zdftke key_top key_pisces_reduced key_iomput key_mpp_mpi 1 bld::tool::fppkeys key_dynspg_flt key_ldfslp key_zdftke key_top key_pisces_reduced key_iomput key_mpp_mpi key_crs -
branches/UKMO/dev_r10171_test_crs_AMM7/NEMOGCM/NEMO/OPA_SRC/CRS/crsdom.F90
r10207 r10216 73 73 ijje = mje_crs(jj) 74 74 75 IF( ijis .le. 0 )WRITE(narea+1000-1,*)"BUG ijis ";CALL FLUSH(narea+1000-1) 76 IF( ijie .gt. jpi )WRITE(narea+1000-1,*)"BUG ijie ";CALL FLUSH(narea+1000-1) 77 IF( ijjs .le. 0 )WRITE(narea+1000-1,*)"BUG ijjs ";CALL FLUSH(narea+1000-1) 78 IF( ijje .gt. jpj )WRITE(narea+1000-1,*)"BUG ijje ";CALL FLUSH(narea+1000-1) 79 80 !IF( jj==nlej_crs .OR. ji==nlei_crs )THEN 81 !WRITE(narea+1000-1,*)"MASK A",ji,jj 82 !WRITE(narea+1000-1,*)"MASK A",ji+nimpp_crs-1,jj+njmpp_crs-1 83 !WRITE(narea+1000-1,*)"MASK B",ijis,ijie,ijjs,ijje 84 !WRITE(narea+1000-1,*)"MASK B",ijis+nimpp-1,ijie+nimpp-1,ijjs+njmpp-1,ijje+njmpp-1 85 !WRITE(narea+1000-1,*)"MASK C",SUM( tmask(ijis:ijie,ijjs:ijje,jk) ) 86 !ENDIF 87 75 88 zmask = 0.0 76 89 zmask = SUM( tmask(ijis:ijie,ijjs:ijje,jk) ) … … 95 108 CALL crs_lbc_lnk( umask_crs, 'U', 1.0 ) 96 109 CALL crs_lbc_lnk( fmask_crs, 'F', 1.0 ) 110 97 111 ! 98 112 END SUBROUTINE crs_dom_msk … … 216 230 217 231 !!---------------------------------------------------------------- 232 p_e1_crs(:,:)=0._wp 233 p_e2_crs(:,:)=0._wp 234 218 235 ! Initialize 219 236 … … 1118 1135 SELECT CASE ( jperio ) 1119 1136 1120 CASE ( 0, 1 ) 1121 jpiglo_crs = INT( (jpiglo - 2) / nn_factx ) + 2 1122 jpjglo_crs = INT( (jpjglo - 2) / nn_facty ) + 2 1123 1124 CASE ( 3, 4 ) ! 1137 CASE ( 0, 1 ) ! limited area 1138 1139 !--!--!--!--!--!--!--!--!--! 1140 ! ! ! ! 1141 ! ! ! ! 1142 ! ! ! ! 1143 !--!--!--!--!--!--!--!--!--! 1144 !IBI36 1 2 3 4 5 1145 !IBI12 ! 1 ! 2 ! 3 ! 1146 1147 1148 jpiglo_crs = INT( (jpiglo - 4) / nn_factx ) + 4 1149 jpjglo_crs = INT( (jpjglo - 4) / nn_facty ) + 4 1150 1151 CASE ( 3, 4 ) ! global 1125 1152 jpiglo_crs = INT( (jpiglo - 2) / nn_factx ) + 2 1126 1153 jpjglo_crs = INT( (jpjglo - MOD(jpjglo, nn_facty)) / nn_facty ) + 2 … … 1183 1210 ! check 1184 1211 !========================================================================== 1185 !CALL FLUSH(narea+1000-1)1186 1212 !WRITE(narea+1000-1,*)"nfipproc(ji,jj),narea :",nfipproc(iproci,iprocj),narea 1187 1213 !WRITE(narea+1000-1,*)"proc i,j ",iproci,iprocj … … 1233 1259 1234 1260 DO ji=1,jpiglo_crs 1235 ijis=nn_factx* (ji-1)+11236 ijie=nn_factx* (ji-1)+31261 ijis=nn_factx*ji-6 1262 ijie=nn_factx*ji-4 1237 1263 mis2_crs(ji)=ijis 1238 1264 mie2_crs(ji)=ijie 1265 !WRITE(narea+1000-1,*)"glo crs",ji,ijis,ijie,ijis-nimpp+1,ijie-nimpp+1 1239 1266 ENDDO 1240 1267 … … 1271 1298 1272 1299 !---------------------------------------------------------------------------------------------- 1273 ! I-3 compute nldi_crs and compute mis2_crs and mie2_crs for the first cell of the local domain 1300 ! I-3 compute nldi_crs 1301 ! special case when the domain on the left is land: 1302 ! compute mis2_crs and mie2_crs for the first cell of the local domain 1274 1303 !--------------------------------------------------------------------------------------------- 1275 1304 nldi_crs = 2 1276 IF( nowe == -1 .AND. ( (jperio==3 .OR. jperio==4 ) .OR. ( (jperio==0 .OR. jperio==1 ) .AND. iproci .NE. 1 )) )THEN1305 IF( nowe == -1 .AND. ( jperio==3 .OR. jperio==4 .OR. jperio==0 .OR. jperio==1 ) )THEN 1277 1306 1278 1307 mie2_crs(ijis-1) = mis2_crs(ijis)-1 … … 1281 1310 CASE(1) 1282 1311 nldi_crs=2 1283 mie2_crs(ijis-1) = -11284 mis2_crs(ijis-1) = -11312 mie2_crs(ijis-1) = 1 1313 mis2_crs(ijis-1) = 1 1285 1314 CASE(2) 1286 1315 nldi_crs=2 … … 1289 1318 nldi_crs=2 1290 1319 mis2_crs(ijis-1) = mie2_crs(ijis-1) -1 1291 CASE DEFAULT1292 WRITE(narea+8000-1,*)"WRONG VALUE FOR iistart ",ii_start1293 1320 END SELECT 1294 1321 … … 1300 1327 nimpp_crs = ijis-1 1301 1328 IF( nimpp==1 )nimpp_crs=1 1329 1330 !WRITE(narea+1000-1,*)" nimpp_crs ",nimpp_crs 1302 1331 1303 1332 !------------------------------------------------------------------------------- … … 1317 1346 ! I-6 compute nlei_crs and nlci_crs 1318 1347 !------------------------------------------------------------------------------- 1319 nlei_crs=ijie-nimpp_crs+1 1320 !nlci_crs=nlei_crs ! cbr ???? +jpreci 1321 !IF( iproci == jpni ) THEN ; nlci_crs=nlei_crs ! cbr ???? +jpreci 1322 !ELSE ; nlci_crs=nlei_crs+1 1323 !ENDIF 1324 !cbr???? IF( iproci == jpni )nlei_crs=nlci_crs 1348 nlei_crs = ijie-nimpp_crs+1 1349 nlci_crs = nlei_crs+1 1325 1350 1326 1351 !------------------------------------------------------------------------------- … … 1340 1365 !--------------------------------------------------------------------------------------- 1341 1366 DO ji = 1, nlei_crs 1342 IF( mig_crs(ji) .GT. jpiglo_crs )WRITE(narea+1000-1,*)"BUG1 " ; CALL FLUSH(narea+1000-1)1343 1367 mis_crs(ji) = mis2_crs(mig_crs(ji)) - nimpp + 1 1344 1368 mie_crs(ji) = mie2_crs(mig_crs(ji)) - nimpp + 1 1345 !IF( iproci == jpni .AND. ji == nlei_crs )THEN1346 ! mie_crs(ji) = nlei1347 ! mie2_crs(mig_crs(ji)) = mig(nlei)1348 !ENDIF1349 1369 nfactx(ji) = mie_crs(ji)-mis_crs(ji)+1 1350 ENDDO 1351 1352 !--------- 1353 !cbr 1370 ENDDO 1371 1372 !----------------------------------------------------------------------------- 1373 !adapt western indices for E-W BC ( jperio 3/4 ) or ghost cells ( jperio 0/1) 1374 !----------------------------------------------------------------------------- 1354 1375 IF( iproci == 1 ) THEN 1355 nldi_crs=1 1356 mis_crs(1) = 1 1357 mie_crs(1) = 1 1358 mis2_crs(1) = 1 1359 mie2_crs(1) = 1 1376 1377 SELECT CASE ( jperio ) 1378 1379 CASE ( 3, 4 ) 1380 1381 nldi_crs=1 1382 mis_crs(1) = 1 1383 mie_crs(1) = 1 1384 mis2_crs(1) = 1 1385 mie2_crs(1) = 1 1386 1387 CASE ( 0, 1 ) 1388 nldi_crs=1 1389 !the first cell is a ghsot cell; so set indices to 1 just to have an positive indice 1390 mis_crs(1) = 1 1391 mie_crs(1) = 1 1392 mis2_crs(1) = 1 1393 mie2_crs(1) = 1 1394 nfactx(1) = 1 1395 1396 !the second coarsened cell correspond to the first (ghost) and second cell of HR grid 1397 mis_crs(2) = 1 1398 mie_crs(2) = 2 1399 mis2_crs(2) = 1 1400 mie2_crs(2) = 2 1401 nfactx(2) = 2 1402 1403 CASE DEFAULT 1404 WRITE(numout,*) 'crs_init. Only jperio = 0, 1, 3, 4 supported; narea: ',narea 1405 END SELECT 1406 1360 1407 ENDIF 1361 1408 1362 IF( iproci == jpni ) THEN 1363 nlei_crs=jpiglo_crs-nimpp_crs+1 1364 nlci_crs=nlei_crs 1365 mis_crs(nlei_crs) = 1 1366 mie_crs(nlei_crs) = 1 1367 mis2_crs(nlei_crs) = 1 1368 mie2_crs(nlei_crs) = 1 1369 nfactx(nlei_crs)=0 1370 ELSE 1371 nlci_crs=nlei_crs+1 1372 ENDIF 1409 !---------------------------------------------------------------------------- 1410 !adapt eastern indices for E-W BC ( jperio 3/4 ) or ghost cells ( jperio 0/1) 1411 !---------------------------------------------------------------------------- 1412 SELECT CASE ( jperio ) 1413 1414 CASE ( 3, 4 ) 1415 1416 IF( iproci == jpni ) THEN 1417 nlei_crs = jpiglo_crs-nimpp_crs+1 1418 nlci_crs = nlei_crs 1419 mis_crs(nlei_crs) = 1 1420 mie_crs(nlei_crs) = 1 1421 mis2_crs(nlei_crs) = 1 1422 mie2_crs(nlei_crs) = 1 1423 nfactx(nlei_crs) = 0 1424 ENDIF 1425 1426 CASE ( 0, 1 ) 1427 IF( iproci == jpni ) THEN 1428 1429 ! | | | | 1430 ! __|_____!_____!_____|_____!_____!_____|_____!_____!_____| 1431 !HR grid loc nlei 1432 !HR grid glo jpiglo 1433 !HRCRS grid loc nlei_crs-1 nlei 1434 !HRCRS grid glo jpiglo-1 jpiglo 1435 1436 1437 !last cell ( = ghost cell) 1438 nlei_crs = jpiglo_crs-nimpp_crs+1 1439 nlci_crs = nlei_crs 1440 1441 mis2_crs(nlei_crs) = jpiglo 1442 mie2_crs(nlei_crs) = jpiglo 1443 mis_crs (nlei_crs) = jpiglo - nimpp + 1 1444 mie_crs (nlei_crs) = jpiglo - nimpp + 1 1445 nfactx (nlei_crs) = 1 1446 1447 mis2_crs(nlei_crs-1) = jpiglo - 1 1448 mie2_crs(nlei_crs-1) = jpiglo 1449 mis_crs (nlei_crs-1) = jpiglo - 1 - nimpp + 1 1450 mie_crs (nlei_crs-1) = jpiglo - nimpp + 1 1451 nfactx (nlei_crs-1) = 2 1452 1453 ENDIF 1454 CASE DEFAULT 1455 WRITE(numout,*) 'crs_init. Only jperio = 0, 1, 3, 4 supported; narea: ',narea 1456 END SELECT 1457 1373 1458 1374 1459 !WRITE(narea+1000-1,*)"loc crs jpi nldi,nlei,nlci ",jpi_crs, nldi_crs ,nlei_crs ,nlci_crs … … 1408 1493 1409 1494 DO jj=1,jpjglo_crs 1410 ijjs=nn_facty* (jj-1)+11411 ijje=nn_facty* (jj-1)+31495 ijjs=nn_facty*jj-6 1496 ijje=nn_facty*jj-4 1412 1497 mjs2_crs(jj)=ijjs 1413 1498 mje2_crs(jj)=ijje 1499 !WRITE(narea+1000-1,*)"glo crs",jj,ijjs,ijje,ijjs-njmpp+1,ijje-njmpp+1 1414 1500 ENDDO 1415 1501 … … 1421 1507 mjs2_crs(jj)=ijjs 1422 1508 mje2_crs(jj)=ijje 1509 !WRITE(narea+1000-1,*)"glo crs",jj,ijjs,ijje,ijjs-njmpp+1,ijje-njmpp+1 1423 1510 ENDDO 1424 1511 … … 1444 1531 1445 1532 !---------------------------------------------------------------------------------------------- 1446 ! J-3 compute nldj_crs and compute mjs2_crs and mje2_crs for the first cell of the local domain 1533 ! J-3 compute nldj_crs 1534 ! global: special case when the domain on the north is land: 1535 ! compute mjs2_crs and mje2_crs for the first cell of the local domain 1536 ! local : special case for southern domain 1447 1537 !--------------------------------------------------------------------------------------------- 1448 1538 nldj_crs = 2 … … 1480 1570 njmpp_crs = ijjs-1 1481 1571 IF( njmpp==1 )njmpp_crs=1 1572 !WRITE(narea+1000-1,*)" njmpp_crs ",njmpp_crs 1482 1573 1483 1574 !------------------------------------------------------------------------------- … … 1499 1590 nlcj_crs=nlej_crs+jprecj 1500 1591 1592 !north-fold BC for global 1501 1593 IF( iprocj == jpnj )THEN 1502 1594 IF( jperio==3 .OR. jperio==4 )THEN 1503 1595 nlej_crs=nlej_crs+1 1504 1596 nlcj_crs=nlej_crs 1505 ELSE1506 nlej_crs= nlej_crs+11507 nlcj_crs= nlcj_crs+11508 1597 ENDIF 1509 1598 ENDIF 1510 1599 1511 !WRITE(narea+1000-1,*)"loc crs jpj nldj,nlej,nlcj ",jpj_crs, nldj_crs ,nlej_crs ,nlcj_crs1512 !CALL FLUSH(narea+1000-1)1513 !WRITE(narea+1000-1,*)"glo crs jpj nldj,nlej ",jpj_crs, nldj_crs+njmpp_crs-1,nlej_crs+njmpp_crs-11514 !CALL FLUSH(narea+1000-1)1515 1600 !------------------------------------------------------------------------------- 1516 1601 ! J-7 local to global and global to local indices for CRS grid … … 1530 1615 mjs_crs(jj) = mjs2_crs(mjg_crs(jj)) - njmpp + 1 1531 1616 mje_crs(jj) = mje2_crs(mjg_crs(jj)) - njmpp + 1 1617 nfacty(jj) = mje_crs(jj)-mjs_crs(jj)+1 1618 !WRITE(narea+1000-1,*)"test J",jj,mjg_crs(jj),mjs_crs(jj),mje_crs(jj),mjs_crs(jj)+njmpp-1,mje_crs(jj)+njmpp-1,nfacty(jj) 1619 ENDDO 1620 1621 !----------------------------------------------------------------------------- 1622 !adpat indices for southern side of the domain (ghost cells for jperio 0/1 ) 1623 !----------------------------------------------------------------------------- 1624 IF( iprocj == 1 ) THEN 1625 1626 SELECT CASE ( jperio ) 1627 1628 CASE ( 3, 4 ) 1629 ! do nothing 1630 CASE ( 0, 1 ) 1631 nldj_crs = 1 1632 !the first cell is a ghsot cell; so set indices to 1 just to have an positive indice 1633 mjs_crs(1) = 1 1634 mje_crs(1) = 1 1635 mjs2_crs(1) = 1 1636 mje2_crs(1) = 1 1637 nfacty(1) = 1 1638 1639 !the second coarsened cell correspond to the first (ghost) and second cell of HR grid 1640 mjs_crs(2) = 1 1641 mje_crs(2) = 2 1642 mjs2_crs(2) = 1 1643 mje2_crs(2) = 2 1644 nfacty(2) = 2 1645 1646 CASE DEFAULT 1647 WRITE(numout,*) 'crs_init. Only jperio = 0, 1, 3, 4 supported; narea: ',narea 1648 END SELECT 1649 1650 ENDIF 1651 1652 !----------------------------------------------- 1653 !adapt northen indices for ghost cells ( jperio 0/1) 1654 !----------------------------------------------- 1655 SELECT CASE ( jperio ) 1656 1657 CASE ( 3, 4 ) 1532 1658 IF( iprocj == jpnj .AND. jj == nlej_crs )THEN 1533 1659 mjs_crs(jj) = nlej … … 1536 1662 mje2_crs(mjg_crs(jj)) = mjg(nlej) 1537 1663 ENDIF 1538 nfacty(jj) = mje_crs(jj)-mjs_crs(jj)+1 1539 !WRITE(narea+1000-1,*)"test J",jj,mjg_crs(jj),mjs_crs(jj),mje_crs(jj),mjs_crs(jj)+njmpp-1,mje_crs(jj)+njmpp-1,nfacty(jj) 1540 ENDDO 1664 1665 CASE ( 0, 1 ) 1666 IF( iprocj == jpnj ) THEN 1667 !north side of the domain 1668 1669 !last cell ( = ghost cell) 1670 nlej_crs = jpjglo_crs-njmpp_crs+1 1671 nlcj_crs = nlej_crs 1672 1673 mjs2_crs(nlej_crs) = jpjglo 1674 mje2_crs(nlej_crs) = jpjglo 1675 mjs_crs (nlej_crs) = jpjglo - njmpp + 1 1676 mje_crs (nlej_crs) = jpjglo - njmpp + 1 1677 nfacty (nlej_crs) = 1 1678 1679 mjs2_crs(nlej_crs-1) = jpjglo - 1 1680 mje2_crs(nlej_crs-1) = jpjglo 1681 mjs_crs (nlej_crs-1) = jpjglo - 1 - njmpp + 1 1682 mje_crs (nlej_crs-1) = jpjglo - njmpp + 1 1683 nfacty (nlej_crs-1) = 2 1684 1685 ENDIF 1686 CASE DEFAULT 1687 WRITE(numout,*) 'crs_init. Only jperio = 0, 1, 3, 4 supported; narea: ',narea 1688 END SELECT 1541 1689 1542 1690 !WRITE(narea+1000-1,*)"loc crs jpj nldj,nlej,nlcj ",jpj_crs, nldj_crs ,nlej_crs,nlcj_crs ; CALL FLUSH(narea+1000-1) … … 1747 1895 1748 1896 !!---------------------------------------------------------------- 1897 1749 1898 mikt_crs(:,:)=1 1750 1899
Note: See TracChangeset
for help on using the changeset viewer.