Changeset 585 for palm/trunk
- Timestamp:
- Oct 14, 2010 11:15:06 AM (14 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r566 r585 276 276 277 277 vNam = getfilevarnames(f_att) 278 vType = getfilevartypes(f_att,vNam) 279 280 if ((all(vType .eq. "double"))) then ;distinction if data is double or float 281 check_vType = True 282 else 283 check_vType = False 284 end if 285 278 286 print(" ") 279 287 print("Variables in input file:") … … 1346 1354 if (xyc .EQ. 1) then 1347 1355 no_layer = (ze-zs)+1 1348 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float) 1356 if (check_vType) then 1357 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),double) 1358 else 1359 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float) 1360 end if 1349 1361 end if 1350 1362 if (xzc .EQ. 1) then 1351 1363 no_layer = (ye-ys)+1 1352 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float) 1364 if (check_vType) then 1365 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),double) 1366 else 1367 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float) 1368 end if 1353 1369 end if 1354 1370 if (yzc .EQ. 1) then 1355 1371 no_layer = (xe-xs)+1 1356 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float) 1357 end if 1358 1359 MinVal = new(dim,float) 1360 MaxVal = new(dim,float) 1372 if (check_vType) then 1373 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),double) 1374 else 1375 data = new((/dim,nt,(ze-zs)+1,(ye-ys)+1,(xe-xs)+1/),float) 1376 end if 1377 end if 1378 1379 if (check_vType) then 1380 MinVal = new(dim,double) 1381 MaxVal = new(dim,double) 1382 else 1383 MinVal = new(dim,float) 1384 MaxVal = new(dim,float) 1385 end if 1361 1386 unit = new(dim,string) 1362 1387 -
palm/trunk/SCRIPTS/NCL/profiles.ncl
r566 r585 403 403 ListSetType(f,"cat") 404 404 405 vNam = getfilevarnames(f_att) 405 vNam = getfilevarnames(f_att) 406 vType = getfilevartypes(f_att,vNam) 407 408 if ((all(vType .eq. "double"))) then ;distinction if data is double or float 409 check_vType = True 410 else 411 check_vType = False 412 end if 406 413 407 414 if (nof .EQ. 0)then … … 1339 1346 end do 1340 1347 1341 if (log_z .EQ. 1) then 1342 data = new((/dim,np,dimz-1/),float) 1348 if (log_z .EQ. 1) then 1349 if (check_vType) then 1350 data = new((/dim,np,dimz-1/),double) 1351 data_0 = new((/np,dimz-1/),double) 1352 else 1353 data = new((/dim,np,dimz-1/),float) 1354 data_0 = new((/np,dimz-1/),float) 1355 end if 1343 1356 data@_FillValue=9.96921e+36 1344 data_0 = new((/np,dimz-1/),float)1345 1357 data_0 = 0.1 1346 1358 t = new((/np,dimz-1/),float) … … 1371 1383 end if 1372 1384 else 1373 data = new((/dim,np,dimz/),float) 1374 data@_FillValue=9.96921e+36 1375 data_0 = new((/np,dimz/),float) 1385 if (check_vType) then 1386 data = new((/dim,np,dimz/),double) 1387 data_0 = new((/np,dimz/),double) 1388 else 1389 data = new((/dim,np,dimz/),float) 1390 data_0 = new((/np,dimz/),float) 1391 end if 1392 data@_FillValue=9.96921e+36 1376 1393 data_0 = 0.0 1377 1394 t = new((/np,dimz/),float) … … 1418 1435 if (over .EQ. 1) then 1419 1436 plot_u = gsn_csm_xy(wks,t,data_0(:,:),res) 1420 miniu = 1.E271421 maxiu =-1.E271422 1437 plot_v = gsn_csm_xy(wks,t,data_0(:,:),res) 1423 miniv = 1.E271424 maxiv =-1.E271425 1438 plot_w = gsn_csm_xy(wks,t,data_0(:,:),res) 1426 miniw = 1.E27 1427 maxiw =-1.E27 1428 plot_pt = gsn_csm_xy(wks,t,data_0(:,:),res) 1429 minipt = 1.E27 1430 maxipt =-1.E27 1439 plot_pt = gsn_csm_xy(wks,t,data_0(:,:),res) 1431 1440 plot_vpt = gsn_csm_xy(wks,t,data_0(:,:),res) 1432 minivpt = 1.E271433 maxivpt =-1.E271434 1441 plot_lpt = gsn_csm_xy(wks,t,data_0(:,:),res) 1435 minilpt = 1.E271436 maxilpt =-1.E271437 1442 plot_q = gsn_csm_xy(wks,t,data_0(:,:),res) 1438 miniq = 1.E271439 maxiq =-1.E271440 1443 plot_qv = gsn_csm_xy(wks,t,data_0(:,:),res) 1441 miniqv = 1.E271442 maxiqv =-1.E271443 1444 plot_ql = gsn_csm_xy(wks,t,data_0(:,:),res) 1444 miniql = 1.E271445 maxiql =-1.E271446 1445 plot_rho = gsn_csm_xy(wks,t,data_0(:,:),res) 1447 1446 plot_s = gsn_csm_xy(wks,t,data_0(:,:),res) 1448 1447 plot_sa = gsn_csm_xy(wks,t,data_0(:,:),res) 1449 1448 plot_e = gsn_csm_xy(wks,t,data_0(:,:),res) 1450 minie = 1.E271451 maxie =-1.E271452 1449 plot_es = gsn_csm_xy(wks,t,data_0(:,:),res) 1453 minie = 1.E271454 maxie =-1.E271455 1450 plot_km = gsn_csm_xy(wks,t,data_0(:,:),res) 1456 minie = 1.E271457 maxie =-1.E271458 1451 plot_kh = gsn_csm_xy(wks,t,data_0(:,:),res) 1459 minie = 1.E271460 maxie =-1.E271461 1452 plot_l = gsn_csm_xy(wks,t,data_0(:,:),res) 1462 1453 plot_wpup = gsn_csm_xy(wks,t,data_0(:,:),res) 1463 miniwpup = 1.E271464 maxiwpup =-1.E271465 1454 plot_wsus = gsn_csm_xy(wks,t,data_0(:,:),res) 1466 miniwsus = 1.E271467 maxiwsus =-1.E271468 1455 plot_wu = gsn_csm_xy(wks,t,data_0(:,:),res) 1469 miniwu = 1.E271470 maxiwu =-1.E271471 1456 plot_wpvp = gsn_csm_xy(wks,t,data_0(:,:),res) 1472 miniwpvp = 1.E271473 maxiwpvp =-1.E271474 1457 plot_wsvs = gsn_csm_xy(wks,t,data_0(:,:),res) 1475 miniwsvs = 1.E271476 maxiwsvs =-1.E271477 1458 plot_wv = gsn_csm_xy(wks,t,data_0(:,:),res) 1478 miniwv = 1.E271479 maxiwv =-1.E271480 1459 plot_wpptp = gsn_csm_xy(wks,t,data_0(:,:),res) 1481 miniwpptp = 1.E271482 maxiwpptp =-1.E271483 1460 plot_wspts = gsn_csm_xy(wks,t,data_0(:,:),res) 1484 miniwspts = 1.E271485 maxiwspts =-1.E271486 1461 plot_wpt = gsn_csm_xy(wks,t,data_0(:,:),res) 1487 miniwpt = 1.E271488 maxiwpt =-1.E271489 1462 plot_wsptsBC = gsn_csm_xy(wks,t,data_0(:,:),res) 1490 miniwsptsBC = 1.E271491 maxiwsptsBC =-1.E271492 1463 plot_wptBC = gsn_csm_xy(wks,t,data_0(:,:),res) 1493 miniwptBC = 1.E271494 maxiwptBC =-1.E271495 1464 plot_wpvptp = gsn_csm_xy(wks,t,data_0(:,:),res) 1496 miniwpvptp = 1.E271497 maxiwpvptp =-1.E271498 1465 plot_wsvpts = gsn_csm_xy(wks,t,data_0(:,:),res) 1499 miniwsvpts = 1.E271500 maxiewsvpts=-1.E271501 1466 plot_wvpt = gsn_csm_xy(wks,t,data_0(:,:),res) 1502 miniwvpt = 1.E271503 maxiwvpt =-1.E271504 1467 plot_wpqp = gsn_csm_xy(wks,t,data_0(:,:),res) 1505 miniwpqp = 1.E271506 maxiwpqp =-1.E271507 1468 plot_wsqs = gsn_csm_xy(wks,t,data_0(:,:),res) 1508 miniwsqs = 1.E271509 maxiwsqs =-1.E271510 1469 plot_wq = gsn_csm_xy(wks,t,data_0(:,:),res) 1511 miniwq = 1.E271512 maxiwq =-1.E271513 1470 plot_wpqvp = gsn_csm_xy(wks,t,data_0(:,:),res) 1514 miniwpqvp = 1.E271515 maxiwpqvp =-1.E271516 1471 plot_wsqvs = gsn_csm_xy(wks,t,data_0(:,:),res) 1517 miniwsqvs = 1.E271518 maxiwsqvs =-1.E271519 1472 plot_wqv = gsn_csm_xy(wks,t,data_0(:,:),res) 1520 miniwqv = 1.E271521 maxiwqv =-1.E271522 1473 plot_wpsp = gsn_csm_xy(wks,t,data_0(:,:),res) 1523 miniwpsp = 1.E271524 maxiwpsp =-1.E271525 1474 plot_wsss = gsn_csm_xy(wks,t,data_0(:,:),res) 1526 miniwsss = 1.E271527 maxiwsss =-1.E271528 1475 plot_ws = gsn_csm_xy(wks,t,data_0(:,:),res) 1529 miniws = 1.E271530 maxiws =-1.E271531 1476 plot_wpsap = gsn_csm_xy(wks,t,data_0(:,:),res) 1532 miniwpsap = 1.E271533 maxiwpsap =-1.E271534 1477 plot_wssas = gsn_csm_xy(wks,t,data_0(:,:),res) 1535 miniwssas = 1.E271536 maxiwssas =-1.E271537 1478 plot_wsa = gsn_csm_xy(wks,t,data_0(:,:),res) 1538 miniwsa = 1.E271539 maxiwsa =-1.E271540 1479 plot_wses = gsn_csm_xy(wks,t,data_0(:,:),res) 1541 1480 plot_us2 = gsn_csm_xy(wks,t,data_0(:,:),res) 1542 minius2 = 1.E271543 maxius2 =-1.E271544 1481 plot_vs2 = gsn_csm_xy(wks,t,data_0(:,:),res) 1545 minivs2 = 1.E271546 maxivs2 =-1.E271547 1482 plot_ws2 = gsn_csm_xy(wks,t,data_0(:,:),res) 1548 miniws2 = 1.E271549 maxiws2 =-1.E271550 1483 plot_pts2 = gsn_csm_xy(wks,t,data_0(:,:),res) 1551 1484 plot_ws3 = gsn_csm_xy(wks,t,data_0(:,:),res) … … 1554 1487 plot_wspts2 = gsn_csm_xy(wks,t,data_0(:,:),res) 1555 1488 plot_wsususodz = gsn_csm_xy(wks,t,data_0(:,:),res) 1556 miniwsususodz = 1.E271557 maxiwsususodz =-1.E271558 1489 plot_wspsodz = gsn_csm_xy(wks,t,data_0(:,:),res) 1559 miniwspsodz = 1.E271560 maxiwspsodz =-1.E271561 1490 plot_wpeodz = gsn_csm_xy(wks,t,data_0(:,:),res) 1562 miniwpeodz = 1.E27 1563 maxiwpeodz =-1.E27 1491 1492 if (check_vType) then 1493 miniu = 100000.d 1494 maxiu = -100000.d 1495 miniv = 100000.d 1496 maxiv = -100000.d 1497 miniw = 100000.d 1498 maxiw = -100000.d 1499 minipt = 100000.d 1500 maxipt = -100000.d 1501 minivpt = 100000.d 1502 maxivpt = -100000.d 1503 minilpt = 100000.d 1504 maxilpt = -100000.d 1505 miniq = 100000.d 1506 maxiq = -100000.d 1507 miniqv = 100000.d 1508 maxiqv = -100000.d 1509 miniql = 100000.d 1510 maxiql = -100000.d 1511 minie = 100000.d 1512 maxie = -100000.d 1513 minies = 100000.d 1514 maxies = -100000.d 1515 minikm = 100000.d 1516 maxikm = -100000.d 1517 minikh = 100000.d 1518 maxikh = -100000.d 1519 miniwpup = 100000.d 1520 maxiwpup = -100000.d 1521 miniwsus = 100000.d 1522 maxiwsus = -100000.d 1523 miniwu = 100000.d 1524 maxiwu = -100000.d 1525 miniwpvp = 100000.d 1526 maxiwpvp = -100000.d 1527 miniwsvs = 100000.d 1528 maxiwsvs = -100000.d 1529 miniwv = 100000.d 1530 maxiwv = -100000.d 1531 miniwpptp = 100000.d 1532 maxiwpptp = -100000.d 1533 miniwspts = 100000.d 1534 maxiwspts = -100000.d 1535 miniwpt = 100000.d 1536 maxiwpt = -100000.d 1537 miniwsptsBC = 100000.d 1538 maxiwsptsBC = -100000.d 1539 miniwptBC = 100000.d 1540 maxiwptBC = -100000.d 1541 miniwpvptp = 100000.d 1542 maxiwpvptp = -100000.d 1543 miniwsvpts = 100000.d 1544 maxiwsvpts = -100000.d 1545 miniwvpt = 100000.d 1546 maxiwvpt = -100000.d 1547 miniwpqp = 100000.d 1548 maxiwpqp = -100000.d 1549 miniwsqs = 100000.d 1550 maxiwsqs = -100000.d 1551 miniwq = 100000.d 1552 maxiwq = -100000.d 1553 miniwpqvp = 100000.d 1554 maxiwpqvp = -100000.d 1555 miniwsqvs = 100000.d 1556 maxiwsqvs = -100000.d 1557 miniwqv = 100000.d 1558 maxiwqv = -100000.d 1559 miniwpsp = 100000.d 1560 maxiwpsp = -100000.d 1561 miniwsss = 100000.d 1562 maxiwsss = -100000.d 1563 miniws = 100000.d 1564 maxiws = -100000.d 1565 miniwpsap = 100000.d 1566 maxiwpsap = -100000.d 1567 miniwssas = 100000.d 1568 maxiwssas = -100000.d 1569 miniwsa = 100000.d 1570 maxiwsa = -100000.d 1571 minius2 = 100000.d 1572 maxius2 = -100000.d 1573 minivs2 = 100000.d 1574 maxivs2 = -100000.d 1575 miniws2 = 100000.d 1576 maxiws2 = -100000.d 1577 miniwsususodz = 100000.d 1578 maxiwsususodz = -100000.d 1579 miniwspsodz = 100000.d 1580 maxiwspsodz = -100000.d 1581 miniwpeodz = 100000.d 1582 maxiwpeodz = -100000.d 1583 else 1584 miniu = 100000. 1585 maxiu = -100000. 1586 miniv = 100000. 1587 maxiv = -100000. 1588 miniw = 100000. 1589 maxiw = -100000. 1590 minipt = 100000. 1591 maxipt = -100000. 1592 minivpt = 100000. 1593 maxivpt = -100000. 1594 minilpt = 100000. 1595 maxilpt = -100000. 1596 miniq = 100000. 1597 maxiq = -100000. 1598 miniqv = 100000. 1599 maxiqv = -100000. 1600 miniql = 100000. 1601 maxiql = -100000. 1602 minie = 100000. 1603 maxie = -100000. 1604 minies = 100000. 1605 maxies = -100000. 1606 minikm = 100000. 1607 maxikm = -100000. 1608 minikh = 100000. 1609 maxikh = -100000. 1610 miniwpup = 100000. 1611 maxiwpup = -100000. 1612 miniwsus = 100000. 1613 maxiwsus = -100000. 1614 miniwu = 100000. 1615 maxiwu = -100000. 1616 miniwpvp = 100000. 1617 maxiwpvp = -100000. 1618 miniwsvs = 100000. 1619 maxiwsvs = -100000. 1620 miniwv = 100000. 1621 maxiwv = -100000. 1622 miniwpptp = 100000. 1623 maxiwpptp = -100000. 1624 miniwspts = 100000. 1625 maxiwspts = -100000. 1626 miniwpt = 100000. 1627 maxiwpt = -100000. 1628 miniwsptsBC = 100000. 1629 maxiwsptsBC = -100000. 1630 miniwptBC = 100000. 1631 maxiwptBC = -100000. 1632 miniwpvptp = 100000. 1633 maxiwpvptp = -100000. 1634 miniwsvpts = 100000. 1635 maxiwsvpts = -100000. 1636 miniwvpt = 100000. 1637 maxiwvpt = -100000. 1638 miniwpqp = 100000. 1639 maxiwpqp = -100000. 1640 miniwsqs = 100000. 1641 maxiwsqs = -100000. 1642 miniwq = 100000. 1643 maxiwq = -100000. 1644 miniwpqvp = 100000. 1645 maxiwpqvp = -100000. 1646 miniwsqvs = 100000. 1647 maxiwsqvs = -100000. 1648 miniwqv = 100000. 1649 maxiwqv = -100000. 1650 miniwpsp = 100000. 1651 maxiwpsp = -100000. 1652 miniwsss = 100000. 1653 maxiwsss = -100000. 1654 miniws = 100000. 1655 maxiws = -100000. 1656 miniwpsap = 100000. 1657 maxiwpsap = -100000. 1658 miniwssas = 100000. 1659 maxiwssas = -100000. 1660 miniwsa = 100000. 1661 maxiwsa = -100000. 1662 minius2 = 100000. 1663 maxius2 = -100000. 1664 minivs2 = 100000. 1665 maxivs2 = -100000. 1666 miniws2 = 100000. 1667 maxiws2 = -100000. 1668 miniwsususodz = 100000. 1669 maxiwsususodz = -100000. 1670 miniwspsodz = 100000. 1671 maxiwspsodz = -100000. 1672 miniwpeodz = 100000. 1673 maxiwpeodz = -100000. 1674 end if 1675 1564 1676 end if 1565 1677 … … 1864 1976 end if 1865 1977 1866 if (max_z_int .g t. dimz-1)1978 if (max_z_int .ge. dimz-1) 1867 1979 max_z_int = dimz-1 1868 1980 if (log_z .EQ. 1) then -
palm/trunk/SCRIPTS/NCL/spectra.ncl
r566 r585 203 203 204 204 vNam = getfilevarnames(f_att) 205 vType = getfilevartypes(f_att,vNam) 206 207 if ((all(vType .eq. "double"))) then ;distinction if data is double or float 208 check_vType = True 209 else 210 check_vType = False 211 end if 212 205 213 print(" ") 206 214 print("Variables in input file:") … … 530 538 end do 531 539 540 if (check_vType) then 541 min_y=new(dimz,double) 542 max_y=new(dimz,double) 543 else 544 min_y=new(dimz,float) 545 max_y=new(dimz,float) 546 end if 532 547 min_x=new(dimz,double) 533 548 max_x=new(dimz,double) 534 min_y=new(dimz,float) 535 max_y=new(dimz,float) 549 536 550 plot_h = new(dimz,graphic) 537 551 -
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r566 r585 170 170 ListSetType(f,"cat") 171 171 172 vNam=getfilevarnames(f_att) 173 vNam_static=vNam 172 vNam =getfilevarnames(f_att) 173 vType = getfilevartypes(f_att,vNam) 174 vNam_static = vNam 175 176 if ((all(vType .eq. "double"))) then ;distinction if data is double or float 177 check_vType = True 178 else 179 check_vType = False 180 end if 174 181 175 182 print(" ") … … 356 363 357 364 n=0 358 minE=1.E27 359 maxE=-1.E27 360 minus=1.E27 361 maxus=-1.E27 362 minu=1.E27 363 maxu=-1.E27 364 minz=1.E27 365 maxz=-1.E27 366 minw=1.E27 367 maxw=-1.E27 368 minp=1.E27 369 maxp=-1.E27 370 mins=1.E27 371 maxs=-1.E27 372 373 data = new((/dim,(end_time_step-start_time_step)+1/),float) 374 unit = new(dim,string) 375 data_0 = new((end_time_step-start_time_step)+1,float) 365 if (check_vType) then 366 minE = 100000.d 367 maxE = -100000.d 368 minus = 100000.d 369 maxus = -100000.d 370 minu = 100000.d 371 maxu = -100000.d 372 minz = 100000.d 373 maxz = -100000.d 374 minw = 100000.d 375 maxw = -100000.d 376 minp = 100000.d 377 maxp = -100000.d 378 mins = 100000.d 379 maxs = -100000.d 380 else 381 minE = 100000. 382 maxE = -100000. 383 minus = 100000. 384 maxus = -100000. 385 minu = 100000. 386 maxu = -100000. 387 minz = 100000. 388 maxz = -100000. 389 minw = 100000. 390 maxw = -100000. 391 minp = 100000. 392 maxp = -100000. 393 mins = 100000. 394 maxs = -100000. 395 end if 396 397 if (check_vType) then 398 data = new((/dim,(end_time_step-start_time_step)+1/),double) 399 data_0 = new((end_time_step-start_time_step)+1,double) 400 mini = new(dim,double) 401 maxi = new(dim,double) 402 else 403 data = new((/dim,(end_time_step-start_time_step)+1/),float) 404 data_0 = new((end_time_step-start_time_step)+1,float) 405 mini = new(dim,float) 406 maxi = new(dim,float) 407 end if 408 unit = new(dim,string) 376 409 data_0 = 0.0 377 mini = new(dim,float) 378 maxi = new(dim,float) 410 379 411 380 412 if (over .EQ. 1) then
Note: See TracChangeset
for help on using the changeset viewer.