Changeset 697 for trunk/libIGCM/libIGCM_sys
- Timestamp:
- 07/18/12 17:58:53 (12 years ago)
- Location:
- trunk/libIGCM/libIGCM_sys
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/libIGCM_sys/libIGCM_sys_cesium.ksh
r676 r697 1488 1488 } 1489 1489 1490 function IGCM_sys_rebuild_station { 1491 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1492 typeset i list_opt file_in file_out prefix_invert list_invert 1493 if ( $DEBUG_sys ) ; then 1494 echo "IGCM_sys_rebuild_station :" $@ 1495 fi 1496 list_opt=$@ 1497 1498 # Invert Axis : t,x -> x,t 1499 # t,pres,x -> x,t,pres 1500 # So that we can concatenate along x 1501 i=0 1502 for file_in in ${list_opt} ; do 1503 (( i = i + 1)) 1504 [ ${i} = 1 ] && file_out=${file_in} && continue 1505 prefix_invert=$( basename ${file_in} .nc ) 1506 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1507 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1508 done 1509 1510 # Concatenate 1511 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1512 1513 # Re-ivert file 1514 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1515 1516 # Station re-ordering is too expansive to be run within libICGM 1517 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1518 # This re-ordering must be done "in memory" by the cmorization process 1519 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1520 # BEGIN reordering 1521 1522 # Only LMDZ text output contains the exact ordering of the station. 1523 # We isolate this in the code below: 1524 # 0 38 -157.5000000000000 70.98591549295774 1525 # 0 54 27.49999999999999 67.18309859154928 1526 # 0 56 -62.50000000000001 82.39436619718309 1527 # 0 79 12.49999999999999 78.59154929577466 1528 # 0 116 -165.0000000000000 76.05633802816901 1529 # 0 117 130.0000000000000 70.98591549295774 1530 # 0 118 110.0000000000000 87.46478873239437 1531 # 1 40 4.999999999999995 51.97183098591550 1532 # typeset iStation iProc list_opt file_in file_out prefix_invert 1533 # typeset -Z4 j4 1534 # typeset -Z3 j3 1535 1536 # unset list_opt 1537 # set +A list_opt $@ 1538 1539 # Filename after rebuild 1540 # file_out=${list_opt[0]} 1541 # Prefix of output files 1542 # prefix_invert=$( basename ${file_out} .nc ) 1543 # Number of procs 1544 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1545 1546 # iProc=0 1547 # while [ ${iProc} -lt ${num_proc} ] ; do 1548 # Array containing Station as a number 1549 # unset proc_stn 1550 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1551 # Number of stations produced by processor proc 1552 # stationLast=${#proc_stn[*]} 1553 # Proc number on 4 digits 1554 # j4=${iProc} 1555 # Init 1556 # iStation=0 1557 # while [ ${iStation} -lt ${stationLast} ] ; do 1558 # Station number on 3 digits 1559 # j3=${proc_stn[${iStation}]} 1560 # Extract station 1561 # Invert Axis : t,x -> x,t 1562 # t,pres,x -> x,t,pres 1563 # So that we can concatenate along x 1564 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1565 # (( iStation = iStation + 1 )) 1566 # done 1567 # (( iProc = iProc + 1 )) 1568 # done 1569 1570 # Concatenate all station along x 1571 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1572 1573 # Re-invert file 1574 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1575 1576 # END reordering 1577 1578 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1579 } 1490 1580 1491 1581 ############################################################ -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_curie.ksh
r689 r697 1663 1663 } 1664 1664 1665 function IGCM_sys_rebuild_station { 1666 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1667 typeset i list_opt file_in file_out prefix_invert list_invert 1668 if ( $DEBUG_sys ) ; then 1669 echo "IGCM_sys_rebuild_station :" $@ 1670 fi 1671 list_opt=$@ 1672 1673 # Invert Axis : t,x -> x,t 1674 # t,pres,x -> x,t,pres 1675 # So that we can concatenate along x 1676 i=0 1677 for file_in in ${list_opt} ; do 1678 (( i = i + 1)) 1679 [ ${i} = 1 ] && file_out=${file_in} && continue 1680 prefix_invert=$( basename ${file_in} .nc ) 1681 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1682 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1683 done 1684 1685 # Concatenate 1686 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1687 1688 # Re-ivert file 1689 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1690 1691 # Station re-ordering is too expansive to be run within libICGM 1692 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1693 # This re-ordering must be done "in memory" by the cmorization process 1694 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1695 # BEGIN reordering 1696 1697 # Only LMDZ text output contains the exact ordering of the station. 1698 # We isolate this in the code below: 1699 # 0 38 -157.5000000000000 70.98591549295774 1700 # 0 54 27.49999999999999 67.18309859154928 1701 # 0 56 -62.50000000000001 82.39436619718309 1702 # 0 79 12.49999999999999 78.59154929577466 1703 # 0 116 -165.0000000000000 76.05633802816901 1704 # 0 117 130.0000000000000 70.98591549295774 1705 # 0 118 110.0000000000000 87.46478873239437 1706 # 1 40 4.999999999999995 51.97183098591550 1707 # typeset iStation iProc list_opt file_in file_out prefix_invert 1708 # typeset -Z4 j4 1709 # typeset -Z3 j3 1710 1711 # unset list_opt 1712 # set +A list_opt $@ 1713 1714 # Filename after rebuild 1715 # file_out=${list_opt[0]} 1716 # Prefix of output files 1717 # prefix_invert=$( basename ${file_out} .nc ) 1718 # Number of procs 1719 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1720 1721 # iProc=0 1722 # while [ ${iProc} -lt ${num_proc} ] ; do 1723 # Array containing Station as a number 1724 # unset proc_stn 1725 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1726 # Number of stations produced by processor proc 1727 # stationLast=${#proc_stn[*]} 1728 # Proc number on 4 digits 1729 # j4=${iProc} 1730 # Init 1731 # iStation=0 1732 # while [ ${iStation} -lt ${stationLast} ] ; do 1733 # Station number on 3 digits 1734 # j3=${proc_stn[${iStation}]} 1735 # Extract station 1736 # Invert Axis : t,x -> x,t 1737 # t,pres,x -> x,t,pres 1738 # So that we can concatenate along x 1739 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1740 # (( iStation = iStation + 1 )) 1741 # done 1742 # (( iProc = iProc + 1 )) 1743 # done 1744 1745 # Concatenate all station along x 1746 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1747 1748 # Re-invert file 1749 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1750 1751 # END reordering 1752 1753 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1754 } 1755 1665 1756 ############################################################ 1666 1757 # Activate Running Environnment Variables -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh
r669 r697 1303 1303 1304 1304 IGCM_debug_PopStack "IGCM_sys_rebuild" 1305 } 1306 1307 function IGCM_sys_rebuild_station { 1308 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1309 typeset i list_opt file_in file_out prefix_invert list_invert 1310 if ( $DEBUG_sys ) ; then 1311 echo "IGCM_sys_rebuild_station :" $@ 1312 fi 1313 list_opt=$@ 1314 1315 # Invert Axis : t,x -> x,t 1316 # t,pres,x -> x,t,pres 1317 # So that we can concatenate along x 1318 i=0 1319 for file_in in ${list_opt} ; do 1320 (( i = i + 1)) 1321 [ ${i} = 1 ] && file_out=${file_in} && continue 1322 prefix_invert=$( basename ${file_in} .nc ) 1323 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1324 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1325 done 1326 1327 # Concatenate 1328 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1329 1330 # Re-ivert file 1331 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1332 1333 # Station re-ordering is too expansive to be run within libICGM 1334 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1335 # This re-ordering must be done "in memory" by the cmorization process 1336 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1337 # BEGIN reordering 1338 1339 # Only LMDZ text output contains the exact ordering of the station. 1340 # We isolate this in the code below: 1341 # 0 38 -157.5000000000000 70.98591549295774 1342 # 0 54 27.49999999999999 67.18309859154928 1343 # 0 56 -62.50000000000001 82.39436619718309 1344 # 0 79 12.49999999999999 78.59154929577466 1345 # 0 116 -165.0000000000000 76.05633802816901 1346 # 0 117 130.0000000000000 70.98591549295774 1347 # 0 118 110.0000000000000 87.46478873239437 1348 # 1 40 4.999999999999995 51.97183098591550 1349 # typeset iStation iProc list_opt file_in file_out prefix_invert 1350 # typeset -Z4 j4 1351 # typeset -Z3 j3 1352 1353 # unset list_opt 1354 # set +A list_opt $@ 1355 1356 # Filename after rebuild 1357 # file_out=${list_opt[0]} 1358 # Prefix of output files 1359 # prefix_invert=$( basename ${file_out} .nc ) 1360 # Number of procs 1361 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1362 1363 # iProc=0 1364 # while [ ${iProc} -lt ${num_proc} ] ; do 1365 # Array containing Station as a number 1366 # unset proc_stn 1367 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1368 # Number of stations produced by processor proc 1369 # stationLast=${#proc_stn[*]} 1370 # Proc number on 4 digits 1371 # j4=${iProc} 1372 # Init 1373 # iStation=0 1374 # while [ ${iStation} -lt ${stationLast} ] ; do 1375 # Station number on 3 digits 1376 # j3=${proc_stn[${iStation}]} 1377 # Extract station 1378 # Invert Axis : t,x -> x,t 1379 # t,pres,x -> x,t,pres 1380 # So that we can concatenate along x 1381 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1382 # (( iStation = iStation + 1 )) 1383 # done 1384 # (( iProc = iProc + 1 )) 1385 # done 1386 1387 # Concatenate all station along x 1388 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1389 1390 # Re-invert file 1391 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1392 1393 # END reordering 1394 1395 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1305 1396 } 1306 1397 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_mercurex9.ksh
r696 r697 1405 1405 1406 1406 IGCM_debug_PopStack "IGCM_sys_rebuild" 1407 } 1408 1409 function IGCM_sys_rebuild_station { 1410 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1411 typeset i list_opt file_in file_out prefix_invert list_invert 1412 if ( $DEBUG_sys ) ; then 1413 echo "IGCM_sys_rebuild_station :" $@ 1414 fi 1415 list_opt=$@ 1416 1417 # Invert Axis : t,x -> x,t 1418 # t,pres,x -> x,t,pres 1419 # So that we can concatenate along x 1420 i=0 1421 for file_in in ${list_opt} ; do 1422 (( i = i + 1)) 1423 [ ${i} = 1 ] && file_out=${file_in} && continue 1424 prefix_invert=$( basename ${file_in} .nc ) 1425 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1426 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1427 done 1428 1429 # Concatenate 1430 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1431 1432 # Re-ivert file 1433 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1434 1435 # Station re-ordering is too expansive to be run within libICGM 1436 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1437 # This re-ordering must be done "in memory" by the cmorization process 1438 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1439 # BEGIN reordering 1440 1441 # Only LMDZ text output contains the exact ordering of the station. 1442 # We isolate this in the code below: 1443 # 0 38 -157.5000000000000 70.98591549295774 1444 # 0 54 27.49999999999999 67.18309859154928 1445 # 0 56 -62.50000000000001 82.39436619718309 1446 # 0 79 12.49999999999999 78.59154929577466 1447 # 0 116 -165.0000000000000 76.05633802816901 1448 # 0 117 130.0000000000000 70.98591549295774 1449 # 0 118 110.0000000000000 87.46478873239437 1450 # 1 40 4.999999999999995 51.97183098591550 1451 # typeset iStation iProc list_opt file_in file_out prefix_invert 1452 # typeset -Z4 j4 1453 # typeset -Z3 j3 1454 1455 # unset list_opt 1456 # set +A list_opt $@ 1457 1458 # Filename after rebuild 1459 # file_out=${list_opt[0]} 1460 # Prefix of output files 1461 # prefix_invert=$( basename ${file_out} .nc ) 1462 # Number of procs 1463 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1464 1465 # iProc=0 1466 # while [ ${iProc} -lt ${num_proc} ] ; do 1467 # Array containing Station as a number 1468 # unset proc_stn 1469 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1470 # Number of stations produced by processor proc 1471 # stationLast=${#proc_stn[*]} 1472 # Proc number on 4 digits 1473 # j4=${iProc} 1474 # Init 1475 # iStation=0 1476 # while [ ${iStation} -lt ${stationLast} ] ; do 1477 # Station number on 3 digits 1478 # j3=${proc_stn[${iStation}]} 1479 # Extract station 1480 # Invert Axis : t,x -> x,t 1481 # t,pres,x -> x,t,pres 1482 # So that we can concatenate along x 1483 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1484 # (( iStation = iStation + 1 )) 1485 # done 1486 # (( iProc = iProc + 1 )) 1487 # done 1488 1489 # Concatenate all station along x 1490 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1491 1492 # Re-invert file 1493 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1494 1495 # END reordering 1496 1497 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1407 1498 } 1408 1499 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh
r669 r697 1324 1324 1325 1325 IGCM_debug_PopStack "IGCM_sys_rebuild" 1326 } 1327 1328 function IGCM_sys_rebuild_station { 1329 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1330 typeset i list_opt file_in file_out prefix_invert list_invert 1331 if ( $DEBUG_sys ) ; then 1332 echo "IGCM_sys_rebuild_station :" $@ 1333 fi 1334 list_opt=$@ 1335 1336 # Invert Axis : t,x -> x,t 1337 # t,pres,x -> x,t,pres 1338 # So that we can concatenate along x 1339 i=0 1340 for file_in in ${list_opt} ; do 1341 (( i = i + 1)) 1342 [ ${i} = 1 ] && file_out=${file_in} && continue 1343 prefix_invert=$( basename ${file_in} .nc ) 1344 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1345 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1346 done 1347 1348 # Concatenate 1349 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1350 1351 # Re-ivert file 1352 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1353 1354 # Station re-ordering is too expansive to be run within libICGM 1355 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1356 # This re-ordering must be done "in memory" by the cmorization process 1357 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1358 # BEGIN reordering 1359 1360 # Only LMDZ text output contains the exact ordering of the station. 1361 # We isolate this in the code below: 1362 # 0 38 -157.5000000000000 70.98591549295774 1363 # 0 54 27.49999999999999 67.18309859154928 1364 # 0 56 -62.50000000000001 82.39436619718309 1365 # 0 79 12.49999999999999 78.59154929577466 1366 # 0 116 -165.0000000000000 76.05633802816901 1367 # 0 117 130.0000000000000 70.98591549295774 1368 # 0 118 110.0000000000000 87.46478873239437 1369 # 1 40 4.999999999999995 51.97183098591550 1370 # typeset iStation iProc list_opt file_in file_out prefix_invert 1371 # typeset -Z4 j4 1372 # typeset -Z3 j3 1373 1374 # unset list_opt 1375 # set +A list_opt $@ 1376 1377 # Filename after rebuild 1378 # file_out=${list_opt[0]} 1379 # Prefix of output files 1380 # prefix_invert=$( basename ${file_out} .nc ) 1381 # Number of procs 1382 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1383 1384 # iProc=0 1385 # while [ ${iProc} -lt ${num_proc} ] ; do 1386 # Array containing Station as a number 1387 # unset proc_stn 1388 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1389 # Number of stations produced by processor proc 1390 # stationLast=${#proc_stn[*]} 1391 # Proc number on 4 digits 1392 # j4=${iProc} 1393 # Init 1394 # iStation=0 1395 # while [ ${iStation} -lt ${stationLast} ] ; do 1396 # Station number on 3 digits 1397 # j3=${proc_stn[${iStation}]} 1398 # Extract station 1399 # Invert Axis : t,x -> x,t 1400 # t,pres,x -> x,t,pres 1401 # So that we can concatenate along x 1402 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1403 # (( iStation = iStation + 1 )) 1404 # done 1405 # (( iProc = iProc + 1 )) 1406 # done 1407 1408 # Concatenate all station along x 1409 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1410 1411 # Re-invert file 1412 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1413 1414 # END reordering 1415 1416 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1326 1417 } 1327 1418 -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh
r696 r697 1693 1693 } 1694 1694 1695 function IGCM_sys_rebuild_station { 1696 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1697 typeset i list_opt file_in file_out prefix_invert list_invert 1698 if ( $DEBUG_sys ) ; then 1699 echo "IGCM_sys_rebuild_station :" $@ 1700 fi 1701 list_opt=$@ 1702 1703 # Invert Axis : t,x -> x,t 1704 # t,pres,x -> x,t,pres 1705 # So that we can concatenate along x 1706 i=0 1707 for file_in in ${list_opt} ; do 1708 (( i = i + 1)) 1709 [ ${i} = 1 ] && file_out=${file_in} && continue 1710 prefix_invert=$( basename ${file_in} .nc ) 1711 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1712 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1713 done 1714 1715 # Concatenate 1716 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1717 1718 # Re-ivert file 1719 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1720 1721 # Station re-ordering is too expansive to be run within libICGM 1722 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1723 # This re-ordering must be done "in memory" by the cmorization process 1724 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1725 # BEGIN reordering 1726 1727 # Only LMDZ text output contains the exact ordering of the station. 1728 # We isolate this in the code below: 1729 # 0 38 -157.5000000000000 70.98591549295774 1730 # 0 54 27.49999999999999 67.18309859154928 1731 # 0 56 -62.50000000000001 82.39436619718309 1732 # 0 79 12.49999999999999 78.59154929577466 1733 # 0 116 -165.0000000000000 76.05633802816901 1734 # 0 117 130.0000000000000 70.98591549295774 1735 # 0 118 110.0000000000000 87.46478873239437 1736 # 1 40 4.999999999999995 51.97183098591550 1737 # typeset iStation iProc list_opt file_in file_out prefix_invert 1738 # typeset -Z4 j4 1739 # typeset -Z3 j3 1740 1741 # unset list_opt 1742 # set +A list_opt $@ 1743 1744 # Filename after rebuild 1745 # file_out=${list_opt[0]} 1746 # Prefix of output files 1747 # prefix_invert=$( basename ${file_out} .nc ) 1748 # Number of procs 1749 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1750 1751 # iProc=0 1752 # while [ ${iProc} -lt ${num_proc} ] ; do 1753 # Array containing Station as a number 1754 # unset proc_stn 1755 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1756 # Number of stations produced by processor proc 1757 # stationLast=${#proc_stn[*]} 1758 # Proc number on 4 digits 1759 # j4=${iProc} 1760 # Init 1761 # iStation=0 1762 # while [ ${iStation} -lt ${stationLast} ] ; do 1763 # Station number on 3 digits 1764 # j3=${proc_stn[${iStation}]} 1765 # Extract station 1766 # Invert Axis : t,x -> x,t 1767 # t,pres,x -> x,t,pres 1768 # So that we can concatenate along x 1769 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1770 # (( iStation = iStation + 1 )) 1771 # done 1772 # (( iProc = iProc + 1 )) 1773 # done 1774 1775 # Concatenate all station along x 1776 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1777 1778 # Re-invert file 1779 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1780 1781 # END reordering 1782 1783 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1784 } 1785 1695 1786 ############################################################ 1696 1787 # Activate Running Environnment Variables -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_ulam.ksh
r675 r697 1041 1041 IGCM_debug_PopStack "IGCM_sys_rebuild" 1042 1042 } 1043 1044 function IGCM_sys_rebuild_station { 1045 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1046 typeset i list_opt file_in file_out prefix_invert list_invert 1047 if ( $DEBUG_sys ) ; then 1048 echo "IGCM_sys_rebuild_station :" $@ 1049 fi 1050 list_opt=$@ 1051 1052 # Invert Axis : t,x -> x,t 1053 # t,pres,x -> x,t,pres 1054 # So that we can concatenate along x 1055 i=0 1056 for file_in in ${list_opt} ; do 1057 (( i = i + 1)) 1058 [ ${i} = 1 ] && file_out=${file_in} && continue 1059 prefix_invert=$( basename ${file_in} .nc ) 1060 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1061 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1062 done 1063 1064 # Concatenate 1065 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1066 1067 # Re-ivert file 1068 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1069 1070 # Station re-ordering is too expansive to be run within libICGM 1071 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1072 # This re-ordering must be done "in memory" by the cmorization process 1073 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1074 # BEGIN reordering 1075 1076 # Only LMDZ text output contains the exact ordering of the station. 1077 # We isolate this in the code below: 1078 # 0 38 -157.5000000000000 70.98591549295774 1079 # 0 54 27.49999999999999 67.18309859154928 1080 # 0 56 -62.50000000000001 82.39436619718309 1081 # 0 79 12.49999999999999 78.59154929577466 1082 # 0 116 -165.0000000000000 76.05633802816901 1083 # 0 117 130.0000000000000 70.98591549295774 1084 # 0 118 110.0000000000000 87.46478873239437 1085 # 1 40 4.999999999999995 51.97183098591550 1086 # typeset iStation iProc list_opt file_in file_out prefix_invert 1087 # typeset -Z4 j4 1088 # typeset -Z3 j3 1089 1090 # unset list_opt 1091 # set +A list_opt $@ 1092 1093 # Filename after rebuild 1094 # file_out=${list_opt[0]} 1095 # Prefix of output files 1096 # prefix_invert=$( basename ${file_out} .nc ) 1097 # Number of procs 1098 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1099 1100 # iProc=0 1101 # while [ ${iProc} -lt ${num_proc} ] ; do 1102 # Array containing Station as a number 1103 # unset proc_stn 1104 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1105 # Number of stations produced by processor proc 1106 # stationLast=${#proc_stn[*]} 1107 # Proc number on 4 digits 1108 # j4=${iProc} 1109 # Init 1110 # iStation=0 1111 # while [ ${iStation} -lt ${stationLast} ] ; do 1112 # Station number on 3 digits 1113 # j3=${proc_stn[${iStation}]} 1114 # Extract station 1115 # Invert Axis : t,x -> x,t 1116 # t,pres,x -> x,t,pres 1117 # So that we can concatenate along x 1118 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1119 # (( iStation = iStation + 1 )) 1120 # done 1121 # (( iProc = iProc + 1 )) 1122 # done 1123 1124 # Concatenate all station along x 1125 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1126 1127 # Re-invert file 1128 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1129 1130 # END reordering 1131 1132 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1133 } 1134 1043 1135 ############################################################## 1044 1136 # NCO OPERATOR -
trunk/libIGCM/libIGCM_sys/libIGCM_sys_vargas.ksh
r689 r697 1340 1340 1341 1341 IGCM_debug_PopStack "IGCM_sys_rebuild" 1342 } 1343 1344 function IGCM_sys_rebuild_station { 1345 IGCM_debug_PushStack "IGCM_sys_rebuild_station" -- $@ 1346 typeset i list_opt file_in file_out prefix_invert list_invert 1347 if ( $DEBUG_sys ) ; then 1348 echo "IGCM_sys_rebuild_station :" $@ 1349 fi 1350 list_opt=$@ 1351 1352 # Invert Axis : t,x -> x,t 1353 # t,pres,x -> x,t,pres 1354 # So that we can concatenate along x 1355 i=0 1356 for file_in in ${list_opt} ; do 1357 (( i = i + 1)) 1358 [ ${i} = 1 ] && file_out=${file_in} && continue 1359 prefix_invert=$( basename ${file_in} .nc ) 1360 IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs ${file_in} ${prefix_invert}_xt.nc 1361 list_invert[${#list_invert[*]}]=${prefix_invert}_xt.nc 1362 done 1363 1364 # Concatenate 1365 IGCM_sys_ncrcat ${list_invert[*]} histstn_xt.nc 1366 1367 # Re-ivert file 1368 IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x histstn_xt.nc ${file_out} 1369 1370 # Station re-ordering is too expansive to be run within libICGM 1371 # This is due to (ncpdq - nrcat - ncpdq) I/O sequence. 1372 # This re-ordering must be done "in memory" by the cmorization process 1373 # Anyway this is the best sequence using (ncpdq - nrcat - ncpdq) 1374 # BEGIN reordering 1375 1376 # Only LMDZ text output contains the exact ordering of the station. 1377 # We isolate this in the code below: 1378 # 0 38 -157.5000000000000 70.98591549295774 1379 # 0 54 27.49999999999999 67.18309859154928 1380 # 0 56 -62.50000000000001 82.39436619718309 1381 # 0 79 12.49999999999999 78.59154929577466 1382 # 0 116 -165.0000000000000 76.05633802816901 1383 # 0 117 130.0000000000000 70.98591549295774 1384 # 0 118 110.0000000000000 87.46478873239437 1385 # 1 40 4.999999999999995 51.97183098591550 1386 # typeset iStation iProc list_opt file_in file_out prefix_invert 1387 # typeset -Z4 j4 1388 # typeset -Z3 j3 1389 1390 # unset list_opt 1391 # set +A list_opt $@ 1392 1393 # Filename after rebuild 1394 # file_out=${list_opt[0]} 1395 # Prefix of output files 1396 # prefix_invert=$( basename ${file_out} .nc ) 1397 # Number of procs 1398 # num_proc=$( grep -i mpi_size ${PREFIX}_${Exe_Output} | wc -l ) 1399 1400 # iProc=0 1401 # while [ ${iProc} -lt ${num_proc} ] ; do 1402 # Array containing Station as a number 1403 # unset proc_stn 1404 # set +A proc_stn $( grep "iophy_mpi rank ip lon lat $iProc" ${PREFIX}_${Exe_Output} | sed -e "s/iophy_mpi rank ip lon lat //g" | awk ' {print $2}' ) 1405 # Number of stations produced by processor proc 1406 # stationLast=${#proc_stn[*]} 1407 # Proc number on 4 digits 1408 # j4=${iProc} 1409 # Init 1410 # iStation=0 1411 # while [ ${iStation} -lt ${stationLast} ] ; do 1412 # Station number on 3 digits 1413 # j3=${proc_stn[${iStation}]} 1414 # Extract station 1415 # Invert Axis : t,x -> x,t 1416 # t,pres,x -> x,t,pres 1417 # So that we can concatenate along x 1418 # IGCM_sys_ncpdq -a x,time_counter -a x,time_counter,presnivs -d x,$iStation,$iStation ${prefix_invert}_${j4}.nc ${prefix_invert}_stn_${j3}.nc 1419 # (( iStation = iStation + 1 )) 1420 # done 1421 # (( iProc = iProc + 1 )) 1422 # done 1423 1424 # Concatenate all station along x 1425 # IGCM_sys_ncrcat ${prefix_invert}_stn_???.nc ${prefix_invert}_xt.nc 1426 1427 # Re-invert file 1428 # IGCM_sys_ncpdq -a time_counter,x -a time_counter,presnivs,x ${prefix_invert}_xt.nc ${file_out} 1429 1430 # END reordering 1431 1432 IGCM_debug_PopStack "IGCM_sys_rebuild_station" 1342 1433 } 1343 1434
Note: See TracChangeset
for help on using the changeset viewer.