- Timestamp:
- Apr 20, 2020 12:11:24 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/user_module.f90
r4497 r4504 21 21 ! ----------------- 22 22 ! 23 ! 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! hint for setting rmask arrays added 28 ! 29 ! 4497 2020-04-15 10:20:51Z raasch 27 30 ! file re-formatted to follow the PALM coding standard 28 !29 31 ! 30 32 ! 4495 2020-04-13 20:11:20Z raasch … … 464 466 ! 465 467 !-- Example for defining a statistic region: 468 !-- ATTENTION: rmask = 0 is required at the ghost boundaries to guarantee correct statistic 469 !-- evaluations (otherwise ghost points would be counted twice). This setting has 470 !-- already been cared for in routine init_3d_model. Please don't set the ghost points 471 !-- /= 0. i.e. run the following loop only over nxl,nxr and nys,nyn. 466 472 ! IF ( statistic_regions >= 1 ) THEN 467 473 ! region = 1 -
palm/trunk/SOURCE/virtual_measurement_mod.f90
r4498 r4504 21 21 ! ----------------- 22 22 ! 23 ! 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 27 ! file re-formatted to follow the PALM coding standard 28 !29 28 ! 30 29 ! 4481 2020-03-31 18:55:54Z maronga … … 456 455 'If virtual measurements are taken, the number ' // & 457 456 'of surrounding grid points must not be larger ' // & 458 'than the number of ghost points - 1, which is: ', & 459 nbgp - 1 457 'than the number of ghost points - 1, which is: ', nbgp - 1 460 458 CALL message( 'vm_check_parameters', 'PA0705', 1, 2, 0, 6, 0 ) 461 459 ENDIF … … 1360 1358 ! 1361 1359 !-- Determine the number of output timesteps. 1362 ntimesteps = CEILING( & 1363 ( end_time - MAX( vm_time_start, time_since_reference_point ) & 1364 ) / dt_virtual_measurement ) 1360 ntimesteps = CEILING( ( end_time - MAX( vm_time_start, time_since_reference_point ) & 1361 ) / dt_virtual_measurement ) 1365 1362 ! 1366 1363 !-- Create directory where output files will be stored. … … 1384 1381 dum_lon, dum_lat ) 1385 1382 1386 return_value = dom_def_att( vmea(l)%nc_filename, & 1387 attribute_name = 'site', & 1383 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'site', & 1388 1384 value = TRIM( vmea(l)%site ) ) 1389 return_value = dom_def_att( vmea(l)%nc_filename, & 1390 attribute_name = 'title', & 1385 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'title', & 1391 1386 value = 'Virtual measurement output') 1392 return_value = dom_def_att( vmea(l)%nc_filename, & 1393 attribute_name = 'source', & 1387 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'source', & 1394 1388 value = 'PALM-4U') 1395 return_value = dom_def_att( vmea(l)%nc_filename, & 1396 attribute_name = 'institution', & 1389 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'institution', & 1397 1390 value = input_file_atts%institution ) 1398 return_value = dom_def_att( vmea(l)%nc_filename, & 1399 attribute_name = 'acronym', & 1391 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'acronym', & 1400 1392 value = input_file_atts%acronym ) 1401 return_value = dom_def_att( vmea(l)%nc_filename, & 1402 attribute_name = 'author', & 1393 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'author', & 1403 1394 value = input_file_atts%author ) 1404 return_value = dom_def_att( vmea(l)%nc_filename, & 1405 attribute_name = 'contact_person', & 1395 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'contact_person', & 1406 1396 value = input_file_atts%contact_person ) 1407 return_value = dom_def_att( vmea(l)%nc_filename, & 1408 attribute_name = 'iop', & 1397 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'iop', & 1409 1398 value = input_file_atts%campaign ) 1410 return_value = dom_def_att( vmea(l)%nc_filename, & 1411 attribute_name = 'campaign', & 1399 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'campaign', & 1412 1400 value = 'PALM-4U' ) 1413 return_value = dom_def_att( vmea(l)%nc_filename, & 1414 attribute_name = 'origin_time ', & 1401 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'origin_time ', & 1415 1402 value = origin_date_time) 1416 return_value = dom_def_att( vmea(l)%nc_filename, & 1417 attribute_name = 'location', & 1403 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'location', & 1418 1404 value = input_file_atts%location ) 1419 return_value = dom_def_att( vmea(l)%nc_filename, & 1420 attribute_name = 'origin_x', & 1405 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'origin_x', & 1421 1406 value = vmea(l)%origin_x_obs ) 1422 return_value = dom_def_att( vmea(l)%nc_filename, & 1423 attribute_name = 'origin_y', & 1407 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'origin_y', & 1424 1408 value = vmea(l)%origin_y_obs ) 1425 return_value = dom_def_att( vmea(l)%nc_filename, & 1426 attribute_name = 'origin_lon', & 1409 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'origin_lon', & 1427 1410 value = dum_lon ) 1428 return_value = dom_def_att( vmea(l)%nc_filename, & 1429 attribute_name = 'origin_lat', & 1411 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'origin_lat', & 1430 1412 value = dum_lat ) 1431 return_value = dom_def_att( vmea(l)%nc_filename, & 1432 attribute_name = 'origin_z', & 1433 value = 0.0 ) 1434 return_value = dom_def_att( vmea(l)%nc_filename, & 1435 attribute_name = 'rotation_angle', & 1413 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'origin_z', value = 0.0 ) 1414 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'rotation_angle', & 1436 1415 value = input_file_atts%rotation_angle ) 1437 return_value = dom_def_att( vmea(l)%nc_filename, & 1438 attribute_name = 'featureType', & 1416 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'featureType', & 1439 1417 value = TRIM( vmea(l)%feature_type_out ) ) 1440 return_value = dom_def_att( vmea(l)%nc_filename, & 1441 attribute_name = 'data_content', & 1418 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'data_content', & 1442 1419 value = TRIM( vmea(l)%data_content ) ) 1443 return_value = dom_def_att( vmea(l)%nc_filename, & 1444 attribute_name = 'creation_time', & 1420 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'creation_time', & 1445 1421 value = input_file_atts%creation_time ) 1446 return_value = dom_def_att( vmea(l)%nc_filename, & 1447 attribute_name = 'version', & 1448 value = 1 ) !input_file_atts%version ) 1449 return_value = dom_def_att( vmea(l)%nc_filename, & 1450 attribute_name = 'creation_time', & 1422 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'version', value = 1 ) !input_file_atts%version 1423 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'creation_time', & 1451 1424 value = TRIM( vmea(l)%site ) ) 1452 return_value = dom_def_att( vmea(l)%nc_filename, & 1453 attribute_name = 'Conventions', & 1425 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'Conventions', & 1454 1426 value = input_file_atts%conventions ) 1455 return_value = dom_def_att( vmea(l)%nc_filename, & 1456 attribute_name = 'dependencies', & 1427 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'dependencies', & 1457 1428 value = input_file_atts%dependencies ) 1458 return_value = dom_def_att( vmea(l)%nc_filename, & 1459 attribute_name = 'history', & 1429 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'history', & 1460 1430 value = input_file_atts%history ) 1461 return_value = dom_def_att( vmea(l)%nc_filename, & 1462 attribute_name = 'references', & 1431 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'references', & 1463 1432 value = input_file_atts%references ) 1464 return_value = dom_def_att( vmea(l)%nc_filename, & 1465 attribute_name = 'comment', & 1433 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'comment', & 1466 1434 value = input_file_atts%comment ) 1467 return_value = dom_def_att( vmea(l)%nc_filename, & 1468 attribute_name = 'keywords', & 1435 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'keywords', & 1469 1436 value = input_file_atts%keywords ) 1470 return_value = dom_def_att( vmea(l)%nc_filename, & 1471 attribute_name = 'licence', & 1437 return_value = dom_def_att( vmea(l)%nc_filename, attribute_name = 'licence', & 1472 1438 value = '[UC]2 Open Licence; see [UC]2 ' // & 1473 1439 'data policy available at ' // & … … 1584 1550 !-- of attributes. 1585 1551 !-- Units 1586 return_value = dom_def_att( vmea(l)%nc_filename, & 1587 variable_name = 'time', & 1588 attribute_name = char_unit, & 1589 value = 'seconds since ' // origin_date_time ) 1590 return_value = dom_def_att( vmea(l)%nc_filename, & 1591 variable_name = 'z', & 1592 attribute_name = char_unit, & 1593 value = 'm' ) 1594 return_value = dom_def_att( vmea(l)%nc_filename, & 1595 variable_name = 'station_h', & 1596 attribute_name = char_unit, & 1597 value = 'm' ) 1598 return_value = dom_def_att( vmea(l)%nc_filename, & 1599 variable_name = 'x', & 1600 attribute_name = char_unit, & 1601 value = 'm' ) 1602 return_value = dom_def_att( vmea(l)%nc_filename, & 1603 variable_name = 'y', & 1604 attribute_name = char_unit, & 1605 value = 'm' ) 1606 return_value = dom_def_att( vmea(l)%nc_filename, & 1607 variable_name = 'E_UTM', & 1608 attribute_name = char_unit, & 1609 value = 'm' ) 1610 return_value = dom_def_att( vmea(l)%nc_filename, & 1611 variable_name = 'N_UTM', & 1612 attribute_name = char_unit, & 1613 value = 'm' ) 1614 return_value = dom_def_att( vmea(l)%nc_filename, & 1615 variable_name = 'lat', & 1616 attribute_name = char_unit, & 1617 value = 'degrees_north' ) 1618 return_value = dom_def_att( vmea(l)%nc_filename, & 1619 variable_name = 'lon', & 1620 attribute_name = char_unit, & 1621 value = 'degrees_east' ) 1552 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time', & 1553 attribute_name = char_unit, value = 'seconds since ' // & 1554 origin_date_time ) 1555 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z', & 1556 attribute_name = char_unit, value = 'm' ) 1557 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_h', & 1558 attribute_name = char_unit, value = 'm' ) 1559 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'x', & 1560 attribute_name = char_unit, value = 'm' ) 1561 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'y', & 1562 attribute_name = char_unit, value = 'm' ) 1563 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'E_UTM', & 1564 attribute_name = char_unit, value = 'm' ) 1565 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'N_UTM', & 1566 attribute_name = char_unit, value = 'm' ) 1567 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lat', & 1568 attribute_name = char_unit, value = 'degrees_north' ) 1569 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lon', & 1570 attribute_name = char_unit, value = 'degrees_east' ) 1622 1571 ! 1623 1572 !-- Long name 1624 return_value = dom_def_att( vmea(l)%nc_filename, & 1625 variable_name = 'station_name', & 1626 attribute_name = char_long, & 1627 value = 'station name') 1628 return_value = dom_def_att( vmea(l)%nc_filename, & 1629 variable_name = 'time', & 1630 attribute_name = char_long, & 1631 value = 'time') 1632 return_value = dom_def_att( vmea(l)%nc_filename, & 1633 variable_name = 'z', & 1634 attribute_name = char_long, & 1635 value = 'height above origin' ) 1636 return_value = dom_def_att( vmea(l)%nc_filename, & 1637 variable_name = 'station_h', & 1638 attribute_name = char_long, & 1639 value = 'surface altitude' ) 1640 return_value = dom_def_att( vmea(l)%nc_filename, & 1641 variable_name = 'x', & 1573 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_name', & 1574 attribute_name = char_long, value = 'station name') 1575 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time', & 1576 attribute_name = char_long, value = 'time') 1577 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z', & 1578 attribute_name = char_long, value = 'height above origin' ) 1579 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_h', & 1580 attribute_name = char_long, value = 'surface altitude' ) 1581 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'x', & 1642 1582 attribute_name = char_long, & 1643 1583 value = 'distance to origin in x-direction') 1644 return_value = dom_def_att( vmea(l)%nc_filename, & 1645 variable_name = 'y', & 1584 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'y', & 1646 1585 attribute_name = char_long, & 1647 1586 value = 'distance to origin in y-direction') 1648 return_value = dom_def_att( vmea(l)%nc_filename, & 1649 variable_name = 'E_UTM', & 1650 attribute_name = char_long, & 1651 value = 'easting' ) 1652 return_value = dom_def_att( vmea(l)%nc_filename, & 1653 variable_name = 'N_UTM', & 1654 attribute_name = char_long, & 1655 value = 'northing' ) 1656 return_value = dom_def_att( vmea(l)%nc_filename, & 1657 variable_name = 'lat', & 1658 attribute_name = char_long, & 1659 value = 'latitude' ) 1660 return_value = dom_def_att( vmea(l)%nc_filename, & 1661 variable_name = 'lon', & 1662 attribute_name = char_long, & 1663 value = 'longitude' ) 1587 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'E_UTM', & 1588 attribute_name = char_long, value = 'easting' ) 1589 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'N_UTM', & 1590 attribute_name = char_long, value = 'northing' ) 1591 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lat', & 1592 attribute_name = char_long, value = 'latitude' ) 1593 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lon', & 1594 attribute_name = char_long, value = 'longitude' ) 1664 1595 ! 1665 1596 !-- Standard name 1666 return_value = dom_def_att( vmea(l)%nc_filename, & 1667 variable_name = 'station_name', & 1668 attribute_name = char_standard, & 1669 value = 'platform_name') 1670 return_value = dom_def_att( vmea(l)%nc_filename, & 1671 variable_name = 'time', & 1672 attribute_name = char_standard, & 1673 value = 'time') 1674 return_value = dom_def_att( vmea(l)%nc_filename, & 1675 variable_name = 'z', & 1597 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_name', & 1598 attribute_name = char_standard, value = 'platform_name') 1599 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time', & 1600 attribute_name = char_standard, value = 'time') 1601 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z', & 1676 1602 attribute_name = char_standard, & 1677 1603 value = 'height_above_mean_sea_level' ) 1678 return_value = dom_def_att( vmea(l)%nc_filename, & 1679 variable_name = 'station_h', & 1680 attribute_name = char_standard, & 1681 value = 'surface_altitude' ) 1682 return_value = dom_def_att( vmea(l)%nc_filename, & 1683 variable_name = 'E_UTM', & 1604 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_h', & 1605 attribute_name = char_standard, value = 'surface_altitude' ) 1606 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'E_UTM', & 1684 1607 attribute_name = char_standard, & 1685 1608 value = 'projection_x_coordinate' ) 1686 return_value = dom_def_att( vmea(l)%nc_filename, & 1687 variable_name = 'N_UTM', & 1609 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'N_UTM', & 1688 1610 attribute_name = char_standard, & 1689 1611 value = 'projection_y_coordinate' ) 1690 return_value = dom_def_att( vmea(l)%nc_filename, & 1691 variable_name = 'lat', & 1692 attribute_name = char_standard, & 1693 value = 'latitude' ) 1694 return_value = dom_def_att( vmea(l)%nc_filename, & 1695 variable_name = 'lon', & 1696 attribute_name = char_standard, & 1697 value = 'longitude' ) 1612 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lat', & 1613 attribute_name = char_standard, value = 'latitude' ) 1614 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lon', & 1615 attribute_name = char_standard, value = 'longitude' ) 1698 1616 ! 1699 1617 !-- Axis 1700 return_value = dom_def_att( vmea(l)%nc_filename, & 1701 variable_name = 'time', & 1702 attribute_name = 'axis', & 1703 value = 'T') 1704 return_value = dom_def_att( vmea(l)%nc_filename, & 1705 variable_name = 'z', & 1706 attribute_name = 'axis', & 1707 value = 'Z' ) 1708 return_value = dom_def_att( vmea(l)%nc_filename, & 1709 variable_name = 'x', & 1710 attribute_name = 'axis', & 1711 value = 'X' ) 1712 return_value = dom_def_att( vmea(l)%nc_filename, & 1713 variable_name = 'y', & 1714 attribute_name = 'axis', & 1715 value = 'Y' ) 1618 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time', & 1619 attribute_name = 'axis', value = 'T') 1620 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z', & 1621 attribute_name = 'axis', value = 'Z' ) 1622 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'x', & 1623 attribute_name = 'axis', value = 'X' ) 1624 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'y', & 1625 attribute_name = 'axis', value = 'Y' ) 1716 1626 ! 1717 1627 !-- Set further individual attributes for the coordinate variables. 1718 1628 !-- For station name 1719 return_value = dom_def_att( vmea(l)%nc_filename, & 1720 variable_name = 'station_name', & 1721 attribute_name = 'cf_role', & 1722 value = 'timeseries_id' ) 1629 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_name', & 1630 attribute_name = 'cf_role', value = 'timeseries_id' ) 1723 1631 ! 1724 1632 !-- For time 1725 return_value = dom_def_att( vmea(l)%nc_filename, & 1726 variable_name = 'time', & 1727 attribute_name = 'calendar', & 1728 value = 'proleptic_gregorian' ) 1729 return_value = dom_def_att( vmea(l)%nc_filename, & 1730 variable_name = 'time', & 1731 attribute_name = 'bounds', & 1732 value = 'time_bounds' ) 1633 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time', & 1634 attribute_name = 'calendar', value = 'proleptic_gregorian' ) 1635 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time', & 1636 attribute_name = 'bounds', value = 'time_bounds' ) 1733 1637 ! 1734 1638 !-- For vertical reference system 1735 return_value = dom_def_att( vmea(l)%nc_filename, & 1736 variable_name = 'vrs', & 1737 attribute_name = char_long, & 1738 value = 'vertical reference system' ) 1739 return_value = dom_def_att( vmea(l)%nc_filename, & 1740 variable_name = 'vrs', & 1741 attribute_name = 'system_name', & 1742 value = 'DHHN2016' ) 1639 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'vrs', & 1640 attribute_name = char_long, value = 'vertical reference system' ) 1641 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'vrs', & 1642 attribute_name = 'system_name', value = 'DHHN2016' ) 1743 1643 ! 1744 1644 !-- For z 1745 return_value = dom_def_att( vmea(l)%nc_filename, & 1746 variable_name = 'z', & 1747 attribute_name = 'positive', & 1748 value = 'up' ) 1645 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z', & 1646 attribute_name = 'positive', value = 'up' ) 1749 1647 ! 1750 1648 !-- For coordinate reference system 1751 return_value = dom_def_att( vmea(l)%nc_filename, & 1752 variable_name = 'crs', & 1753 attribute_name = 'epsg_code', & 1754 value = coord_ref_sys%epsg_code ) 1755 return_value = dom_def_att( vmea(l)%nc_filename, & 1756 variable_name = 'crs', & 1649 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1650 attribute_name = 'epsg_code', value = coord_ref_sys%epsg_code ) 1651 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1757 1652 attribute_name = 'false_easting', & 1758 1653 value = coord_ref_sys%false_easting ) 1759 return_value = dom_def_att( vmea(l)%nc_filename, & 1760 variable_name = 'crs', & 1654 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1761 1655 attribute_name = 'false_northing', & 1762 1656 value = coord_ref_sys%false_northing ) 1763 return_value = dom_def_att( vmea(l)%nc_filename, & 1764 variable_name = 'crs', & 1657 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1765 1658 attribute_name = 'grid_mapping_name', & 1766 1659 value = coord_ref_sys%grid_mapping_name ) 1767 return_value = dom_def_att( vmea(l)%nc_filename, & 1768 variable_name = 'crs', & 1660 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1769 1661 attribute_name = 'inverse_flattening', & 1770 1662 value = coord_ref_sys%inverse_flattening ) 1771 return_value = dom_def_att( vmea(l)%nc_filename, & 1772 variable_name = 'crs', & 1663 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1773 1664 attribute_name = 'latitude_of_projection_origin',& 1774 1665 value = coord_ref_sys%latitude_of_projection_origin ) 1775 return_value = dom_def_att( vmea(l)%nc_filename, & 1776 variable_name = 'crs', & 1777 attribute_name = char_long, & 1778 value = coord_ref_sys%long_name ) 1779 return_value = dom_def_att( vmea(l)%nc_filename, & 1780 variable_name = 'crs', & 1666 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1667 attribute_name = char_long, value = coord_ref_sys%long_name ) 1668 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1781 1669 attribute_name = 'longitude_of_central_meridian', & 1782 1670 value = coord_ref_sys%longitude_of_central_meridian ) 1783 return_value = dom_def_att( vmea(l)%nc_filename, & 1784 variable_name = 'crs', & 1671 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1785 1672 attribute_name = 'longitude_of_prime_meridian', & 1786 1673 value = coord_ref_sys%longitude_of_prime_meridian ) 1787 return_value = dom_def_att( vmea(l)%nc_filename, & 1788 variable_name = 'crs', & 1674 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1789 1675 attribute_name = 'scale_factor_at_central_meridian', & 1790 1676 value = coord_ref_sys%scale_factor_at_central_meridian ) 1791 return_value = dom_def_att( vmea(l)%nc_filename, & 1792 variable_name = 'crs', & 1677 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1793 1678 attribute_name = 'semi_major_axis', & 1794 1679 value = coord_ref_sys%semi_major_axis ) 1795 return_value = dom_def_att( vmea(l)%nc_filename, & 1796 variable_name = 'crs', & 1797 attribute_name = char_unit, & 1798 value = coord_ref_sys%units ) 1680 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'crs', & 1681 attribute_name = char_unit, value = coord_ref_sys%units ) 1799 1682 ! 1800 1683 !-- In case of sampled soil quantities, define further dimensions and coordinates. … … 1807 1690 ENDDO 1808 1691 1809 return_value = dom_def_dim( vmea(l)%nc_filename, & 1810 dimension_name = 'station_soil', & 1692 return_value = dom_def_dim( vmea(l)%nc_filename, dimension_name = 'station_soil', & 1811 1693 output_type = 'int32', & 1812 bounds = (/1_iwp,vmea(l)%ns_soil_tot/), & 1813 values_int32 = ndim ) 1694 bounds = (/1_iwp,vmea(l)%ns_soil_tot/), values_int32 = ndim ) 1814 1695 DEALLOCATE( ndim ) 1815 1696 ! … … 1820 1701 ENDDO 1821 1702 1822 return_value = dom_def_dim( vmea(l)%nc_filename, & 1823 dimension_name = 'ntime_soil', & 1824 output_type = 'int32', & 1825 bounds = (/1_iwp,ntimesteps/), & 1703 return_value = dom_def_dim( vmea(l)%nc_filename, dimension_name = 'ntime_soil', & 1704 output_type = 'int32', bounds = (/1_iwp,ntimesteps/), & 1826 1705 values_int32 = ndim ) 1827 1706 DEALLOCATE( ndim ) … … 1829 1708 !-- time for soil 1830 1709 variable_name = 'time_soil' 1831 return_value = dom_def_var( vmea(l)%nc_filename, & 1832 variable_name = variable_name, & 1833 dimension_names = (/'station_soil', & 1834 'ntime_soil '/), & 1710 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1711 dimension_names = (/'station_soil', 'ntime_soil '/), & 1835 1712 output_type = 'real32' ) 1836 1713 ! 1837 1714 !-- station_name for soil 1838 1715 variable_name = 'station_name_soil' 1839 return_value = dom_def_var( vmea(l)%nc_filename, & 1840 variable_name = variable_name, & 1841 dimension_names = (/ 'max_name_len', & 1842 'station_soil' /), & 1716 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1717 dimension_names = (/ 'max_name_len', 'station_soil' /), & 1843 1718 output_type = 'char' ) 1844 1719 ! 1845 1720 !-- z 1846 1721 variable_name = 'z_soil' 1847 return_value = dom_def_var( vmea(l)%nc_filename, & 1848 variable_name = variable_name, & 1849 dimension_names = (/'station_soil'/), & 1850 output_type = 'real32' ) 1722 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1723 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1851 1724 ! 1852 1725 !-- station_h for soil 1853 1726 variable_name = 'station_h_soil' 1854 return_value = dom_def_var( vmea(l)%nc_filename, & 1855 variable_name = variable_name, & 1856 dimension_names = (/'station_soil'/), & 1857 output_type = 'real32' ) 1727 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1728 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1858 1729 ! 1859 1730 !-- x soil 1860 1731 variable_name = 'x_soil' 1861 return_value = dom_def_var( vmea(l)%nc_filename, & 1862 variable_name = variable_name, & 1863 dimension_names = (/'station_soil'/), & 1864 output_type = 'real32' ) 1732 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1733 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1865 1734 ! 1866 1735 !- y soil 1867 1736 variable_name = 'y_soil' 1868 return_value = dom_def_var( vmea(l)%nc_filename, & 1869 variable_name = variable_name, & 1870 dimension_names = (/'station_soil'/), & 1871 output_type = 'real32' ) 1737 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1738 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1872 1739 ! 1873 1740 !-- E-UTM soil 1874 1741 variable_name = 'E_UTM_soil' 1875 return_value = dom_def_var( vmea(l)%nc_filename, & 1876 variable_name = variable_name, & 1877 dimension_names = (/'station_soil'/), & 1878 output_type = 'real32' ) 1742 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1743 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1879 1744 ! 1880 1745 !-- N-UTM soil 1881 1746 variable_name = 'N_UTM_soil' 1882 return_value = dom_def_var( vmea(l)%nc_filename, & 1883 variable_name = variable_name, & 1884 dimension_names = (/'station_soil'/), & 1885 output_type = 'real32' ) 1747 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1748 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1886 1749 ! 1887 1750 !-- latitude soil 1888 1751 variable_name = 'lat_soil' 1889 return_value = dom_def_var( vmea(l)%nc_filename, & 1890 variable_name = variable_name, & 1891 dimension_names = (/'station_soil'/), & 1892 output_type = 'real32' ) 1752 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1753 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1893 1754 ! 1894 1755 !-- longitude soil 1895 1756 variable_name = 'lon_soil' 1896 return_value = dom_def_var( vmea(l)%nc_filename, & 1897 variable_name = variable_name, & 1898 dimension_names = (/'station_soil'/), & 1899 output_type = 'real32' ) 1757 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1758 dimension_names = (/'station_soil'/), output_type = 'real32' ) 1900 1759 ! 1901 1760 !-- Set attributes for the coordinate variables. Note, not all coordinates have the same 1902 1761 !-- number of attributes. 1903 1762 !-- Units 1904 return_value = dom_def_att( vmea(l)%nc_filename, & 1905 variable_name = 'time_soil', & 1906 attribute_name = char_unit, & 1907 value = 'seconds since ' // origin_date_time ) 1908 return_value = dom_def_att( vmea(l)%nc_filename, & 1909 variable_name = 'z_soil', & 1910 attribute_name = char_unit, & 1911 value = 'm' ) 1912 return_value = dom_def_att( vmea(l)%nc_filename, & 1913 variable_name = 'station_h_soil', & 1914 attribute_name = char_unit, & 1915 value = 'm' ) 1916 return_value = dom_def_att( vmea(l)%nc_filename, & 1917 variable_name = 'x_soil', & 1918 attribute_name = char_unit, & 1919 value = 'm' ) 1920 return_value = dom_def_att( vmea(l)%nc_filename, & 1921 variable_name = 'y_soil', & 1922 attribute_name = char_unit, & 1923 value = 'm' ) 1924 return_value = dom_def_att( vmea(l)%nc_filename, & 1925 variable_name = 'E_UTM_soil', & 1926 attribute_name = char_unit, & 1927 value = 'm' ) 1928 return_value = dom_def_att( vmea(l)%nc_filename, & 1929 variable_name = 'N_UTM_soil', & 1930 attribute_name = char_unit, & 1931 value = 'm' ) 1932 return_value = dom_def_att( vmea(l)%nc_filename, & 1933 variable_name = 'lat_soil', & 1934 attribute_name = char_unit, & 1935 value = 'degrees_north' ) 1936 return_value = dom_def_att( vmea(l)%nc_filename, & 1937 variable_name = 'lon_soil', & 1938 attribute_name = char_unit, & 1939 value = 'degrees_east' ) 1763 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time_soil', & 1764 attribute_name = char_unit, value = 'seconds since ' // & 1765 origin_date_time ) 1766 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z_soil', & 1767 attribute_name = char_unit, value = 'm' ) 1768 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_h_soil', & 1769 attribute_name = char_unit, value = 'm' ) 1770 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'x_soil', & 1771 attribute_name = char_unit, value = 'm' ) 1772 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'y_soil', & 1773 attribute_name = char_unit, value = 'm' ) 1774 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'E_UTM_soil', & 1775 attribute_name = char_unit, value = 'm' ) 1776 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'N_UTM_soil', & 1777 attribute_name = char_unit, value = 'm' ) 1778 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lat_soil', & 1779 attribute_name = char_unit, value = 'degrees_north' ) 1780 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lon_soil', & 1781 attribute_name = char_unit, value = 'degrees_east' ) 1940 1782 ! 1941 1783 !-- Long name 1942 return_value = dom_def_att( vmea(l)%nc_filename, & 1943 variable_name = 'station_name_soil', & 1944 attribute_name = char_long, & 1945 value = 'station name') 1946 return_value = dom_def_att( vmea(l)%nc_filename, & 1947 variable_name = 'time_soil', & 1948 attribute_name = char_long, & 1949 value = 'time') 1950 return_value = dom_def_att( vmea(l)%nc_filename, & 1951 variable_name = 'z_soil', & 1952 attribute_name = char_long, & 1953 value = 'height above origin' ) 1954 return_value = dom_def_att( vmea(l)%nc_filename, & 1955 variable_name = 'station_h_soil', & 1956 attribute_name = char_long, & 1957 value = 'surface altitude' ) 1958 return_value = dom_def_att( vmea(l)%nc_filename, & 1959 variable_name = 'x_soil', & 1784 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_name_soil', & 1785 attribute_name = char_long, value = 'station name') 1786 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time_soil', & 1787 attribute_name = char_long, value = 'time') 1788 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z_soil', & 1789 attribute_name = char_long, value = 'height above origin' ) 1790 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_h_soil', & 1791 attribute_name = char_long, value = 'surface altitude' ) 1792 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'x_soil', & 1960 1793 attribute_name = char_long, & 1961 1794 value = 'distance to origin in x-direction' ) 1962 return_value = dom_def_att( vmea(l)%nc_filename, & 1963 variable_name = 'y_soil', & 1795 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'y_soil', & 1964 1796 attribute_name = char_long, & 1965 1797 value = 'distance to origin in y-direction' ) 1966 return_value = dom_def_att( vmea(l)%nc_filename, & 1967 variable_name = 'E_UTM_soil', & 1968 attribute_name = char_long, & 1969 value = 'easting' ) 1970 return_value = dom_def_att( vmea(l)%nc_filename, & 1971 variable_name = 'N_UTM_soil', & 1972 attribute_name = char_long, & 1973 value = 'northing' ) 1974 return_value = dom_def_att( vmea(l)%nc_filename, & 1975 variable_name = 'lat_soil', & 1976 attribute_name = char_long, & 1977 value = 'latitude' ) 1978 return_value = dom_def_att( vmea(l)%nc_filename, & 1979 variable_name = 'lon_soil', & 1980 attribute_name = char_long, & 1981 value = 'longitude' ) 1798 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'E_UTM_soil', & 1799 attribute_name = char_long, value = 'easting' ) 1800 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'N_UTM_soil', & 1801 attribute_name = char_long, value = 'northing' ) 1802 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lat_soil', & 1803 attribute_name = char_long, value = 'latitude' ) 1804 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lon_soil', & 1805 attribute_name = char_long, value = 'longitude' ) 1982 1806 ! 1983 1807 !-- Standard name 1984 return_value = dom_def_att( vmea(l)%nc_filename, & 1985 variable_name = 'station_name_soil', & 1986 attribute_name = char_standard, & 1987 value = 'platform_name') 1988 return_value = dom_def_att( vmea(l)%nc_filename, & 1989 variable_name = 'time_soil', & 1990 attribute_name = char_standard, & 1991 value = 'time') 1992 return_value = dom_def_att( vmea(l)%nc_filename, & 1993 variable_name = 'z_soil', & 1808 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_name_soil', & 1809 attribute_name = char_standard, value = 'platform_name') 1810 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time_soil', & 1811 attribute_name = char_standard, value = 'time') 1812 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z_soil', & 1994 1813 attribute_name = char_standard, & 1995 1814 value = 'height_above_mean_sea_level' ) 1996 return_value = dom_def_att( vmea(l)%nc_filename, & 1997 variable_name = 'station_h_soil', & 1998 attribute_name = char_standard, & 1999 value = 'surface_altitude' ) 2000 return_value = dom_def_att( vmea(l)%nc_filename, & 2001 variable_name = 'E_UTM_soil', & 1815 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_h_soil', & 1816 attribute_name = char_standard, value = 'surface_altitude' ) 1817 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'E_UTM_soil', & 2002 1818 attribute_name = char_standard, & 2003 1819 value = 'projection_x_coordinate' ) 2004 return_value = dom_def_att( vmea(l)%nc_filename, & 2005 variable_name = 'N_UTM_soil', & 1820 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'N_UTM_soil', & 2006 1821 attribute_name = char_standard, & 2007 1822 value = 'projection_y_coordinate' ) 2008 return_value = dom_def_att( vmea(l)%nc_filename, & 2009 variable_name = 'lat_soil', & 2010 attribute_name = char_standard, & 2011 value = 'latitude' ) 2012 return_value = dom_def_att( vmea(l)%nc_filename, & 2013 variable_name = 'lon_soil', & 2014 attribute_name = char_standard, & 2015 value = 'longitude' ) 1823 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lat_soil', & 1824 attribute_name = char_standard, value = 'latitude' ) 1825 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'lon_soil', & 1826 attribute_name = char_standard, value = 'longitude' ) 2016 1827 ! 2017 1828 !-- Axis 2018 return_value = dom_def_att( vmea(l)%nc_filename, & 2019 variable_name = 'time_soil', & 2020 attribute_name = 'axis', & 2021 value = 'T') 2022 return_value = dom_def_att( vmea(l)%nc_filename, & 2023 variable_name = 'z_soil', & 2024 attribute_name = 'axis', & 2025 value = 'Z' ) 2026 return_value = dom_def_att( vmea(l)%nc_filename, & 2027 variable_name = 'x_soil', & 2028 attribute_name = 'axis', & 2029 value = 'X' ) 2030 return_value = dom_def_att( vmea(l)%nc_filename, & 2031 variable_name = 'y_soil', & 2032 attribute_name = 'axis', & 2033 value = 'Y' ) 1829 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time_soil', & 1830 attribute_name = 'axis', value = 'T') 1831 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z_soil', & 1832 attribute_name = 'axis', value = 'Z' ) 1833 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'x_soil', & 1834 attribute_name = 'axis', value = 'X' ) 1835 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'y_soil', & 1836 attribute_name = 'axis', value = 'Y' ) 2034 1837 ! 2035 1838 !-- Set further individual attributes for the coordinate variables. 2036 1839 !-- For station name soil 2037 return_value = dom_def_att( vmea(l)%nc_filename, & 2038 variable_name = 'station_name_soil', & 2039 attribute_name = 'cf_role', & 2040 value = 'timeseries_id' ) 1840 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'station_name_soil', & 1841 attribute_name = 'cf_role', value = 'timeseries_id' ) 2041 1842 ! 2042 1843 !-- For time soil 2043 return_value = dom_def_att( vmea(l)%nc_filename, & 2044 variable_name = 'time_soil', & 2045 attribute_name = 'calendar', & 2046 value = 'proleptic_gregorian' ) 2047 return_value = dom_def_att( vmea(l)%nc_filename, & 2048 variable_name = 'time_soil', & 2049 attribute_name = 'bounds', & 2050 value = 'time_bounds' ) 1844 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time_soil', & 1845 attribute_name = 'calendar', value = 'proleptic_gregorian' ) 1846 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'time_soil', & 1847 attribute_name = 'bounds', value = 'time_bounds' ) 2051 1848 ! 2052 1849 !-- For z soil 2053 return_value = dom_def_att( vmea(l)%nc_filename, & 2054 variable_name = 'z_soil', & 2055 attribute_name = 'positive', & 2056 value = 'up' ) 1850 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = 'z_soil', & 1851 attribute_name = 'positive', value = 'up' ) 2057 1852 ENDIF 2058 1853 ! … … 2066 1861 ANY( TRIM( vmea(l)%var_atts(n)%name) == soil_vars ) ) THEN 2067 1862 2068 return_value = dom_def_var( vmea(l)%nc_filename, & 2069 variable_name = variable_name, & 2070 dimension_names = (/'station_soil', & 2071 'ntime_soil '/), & 1863 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1864 dimension_names = (/'station_soil', 'ntime_soil '/), & 2072 1865 output_type = 'real32' ) 2073 1866 ELSE 2074 1867 2075 return_value = dom_def_var( vmea(l)%nc_filename, & 2076 variable_name = variable_name, & 2077 dimension_names = (/'station', & 2078 'ntime '/), & 1868 return_value = dom_def_var( vmea(l)%nc_filename, variable_name = variable_name, & 1869 dimension_names = (/'station', 'ntime '/), & 2079 1870 output_type = 'real32' ) 2080 1871 ENDIF … … 2085 1876 2086 1877 IF ( vmea(l)%var_atts(n)%long_name /= 'none' ) THEN 2087 return_value = dom_def_att( vmea(l)%nc_filename, & 2088 variable_name = variable_name, & 1878 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = variable_name, & 2089 1879 attribute_name = char_long, & 2090 1880 value = TRIM( vmea(l)%var_atts(n)%long_name ) ) 2091 1881 ENDIF 2092 1882 IF ( vmea(l)%var_atts(n)%standard_name /= 'none' ) THEN 2093 return_value = dom_def_att( vmea(l)%nc_filename, & 2094 variable_name = variable_name, & 1883 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = variable_name, & 2095 1884 attribute_name = char_standard, & 2096 1885 value = TRIM( vmea(l)%var_atts(n)%standard_name ) ) 2097 1886 ENDIF 2098 1887 IF ( vmea(l)%var_atts(n)%units /= 'none' ) THEN 2099 return_value = dom_def_att( vmea(l)%nc_filename, & 2100 variable_name = variable_name, & 1888 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = variable_name, & 2101 1889 attribute_name = char_unit, & 2102 1890 value = TRIM( vmea(l)%var_atts(n)%units ) ) 2103 1891 ENDIF 2104 1892 2105 return_value = dom_def_att( vmea(l)%nc_filename, & 2106 variable_name = variable_name, & 1893 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = variable_name, & 2107 1894 attribute_name = 'grid_mapping', & 2108 1895 value = TRIM( vmea(l)%var_atts(n)%grid_mapping ) ) 2109 1896 2110 return_value = dom_def_att( vmea(l)%nc_filename, & 2111 variable_name = variable_name, & 1897 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = variable_name, & 2112 1898 attribute_name = 'coordinates', & 2113 1899 value = TRIM( vmea(l)%var_atts(n)%coordinates ) ) 2114 1900 2115 return_value = dom_def_att( vmea(l)%nc_filename, & 2116 variable_name = variable_name, & 1901 return_value = dom_def_att( vmea(l)%nc_filename, variable_name = variable_name, & 2117 1902 attribute_name = char_fill, & 2118 1903 value = REAL( vmea(l)%var_atts(n)%fill_value, KIND=4 ) ) … … 2172 1957 output_values_1d_pointer => output_values_1d_target 2173 1958 2174 return_value = & 2175 dom_write_var( vmea(l)%nc_filename, & 2176 'E_UTM', & 2177 values_realwp_1d = output_values_1d_pointer, & 2178 bounds_start = (/vmea(l)%start_coord_a/), & 2179 bounds_end = (/vmea(l)%end_coord_a /) ) 1959 return_value = dom_write_var( vmea(l)%nc_filename, 'E_UTM', & 1960 values_realwp_1d = output_values_1d_pointer, & 1961 bounds_start = (/vmea(l)%start_coord_a/), & 1962 bounds_end = (/vmea(l)%end_coord_a /) ) 2180 1963 ! 2181 1964 !-- Output of Northing coordinate. Before output, recalculate NUTM. … … 2187 1970 2188 1971 output_values_1d_pointer => output_values_1d_target 2189 return_value = & 2190 dom_write_var( vmea(l)%nc_filename, & 2191 'N_UTM', & 2192 values_realwp_1d = output_values_1d_pointer, & 2193 bounds_start = (/vmea(l)%start_coord_a/), & 2194 bounds_end = (/vmea(l)%end_coord_a /) ) 1972 return_value = dom_write_var( vmea(l)%nc_filename, 'N_UTM', & 1973 values_realwp_1d = output_values_1d_pointer, & 1974 bounds_start = (/vmea(l)%start_coord_a/), & 1975 bounds_end = (/vmea(l)%end_coord_a /) ) 2195 1976 ! 2196 1977 !-- Output of relative height coordinate. … … 2203 1984 output_values_1d_target = vmea(l)%zar(1:vmea(l)%ns) + oro_rel(:) 2204 1985 output_values_1d_pointer => output_values_1d_target 2205 return_value = & 2206 dom_write_var( vmea(l)%nc_filename, & 2207 'z', & 2208 values_realwp_1d = output_values_1d_pointer, & 2209 bounds_start = (/vmea(l)%start_coord_a/), & 2210 bounds_end = (/vmea(l)%end_coord_a /) ) 1986 return_value = dom_write_var( vmea(l)%nc_filename, 'z', & 1987 values_realwp_1d = output_values_1d_pointer, & 1988 bounds_start = (/vmea(l)%start_coord_a/), & 1989 bounds_end = (/vmea(l)%end_coord_a /) ) 2211 1990 ! 2212 1991 !-- Write surface altitude for the station. Note, since z is already a relative observation … … 2214 1993 output_values_1d_target = oro_rel(:) 2215 1994 output_values_1d_pointer => output_values_1d_target 2216 return_value = & 2217 dom_write_var( vmea(l)%nc_filename, & 2218 'station_h', & 2219 values_realwp_1d = output_values_1d_pointer, & 2220 bounds_start = (/vmea(l)%start_coord_a/), & 2221 bounds_end = (/vmea(l)%end_coord_a /) ) 1995 return_value = dom_write_var( vmea(l)%nc_filename, 'station_h', & 1996 values_realwp_1d = output_values_1d_pointer, & 1997 bounds_start = (/vmea(l)%start_coord_a/), & 1998 bounds_end = (/vmea(l)%end_coord_a /) ) 2222 1999 2223 2000 DEALLOCATE( oro_rel ) … … 2239 2016 output_values_2d_char_pointer => output_values_2d_char_target 2240 2017 2241 return_value = & 2242 dom_write_var( vmea(l)%nc_filename, & 2243 'station_name', & 2244 values_char_2d = output_values_2d_char_pointer, & 2245 bounds_start = (/ 1, vmea(l)%start_coord_a /), & 2246 bounds_end = (/ maximum_name_length, vmea(l)%end_coord_a /) ) 2018 return_value = dom_write_var( vmea(l)%nc_filename, 'station_name', & 2019 values_char_2d = output_values_2d_char_pointer, & 2020 bounds_start = (/ 1, vmea(l)%start_coord_a /), & 2021 bounds_end = (/ maximum_name_length, & 2022 vmea(l)%end_coord_a /) ) 2247 2023 2248 2024 DEALLOCATE( station_name ) … … 2260 2036 * SIN( init_model%rotation_angle * pi / 180.0_wp ) 2261 2037 output_values_1d_pointer => output_values_1d_target 2262 return_value = & 2263 dom_write_var( vmea(l)%nc_filename, & 2264 'E_UTM_soil', & 2265 values_realwp_1d = output_values_1d_pointer, & 2266 bounds_start = (/vmea(l)%start_coord_s/), & 2267 bounds_end = (/vmea(l)%end_coord_s /) ) 2038 return_value = dom_write_var( vmea(l)%nc_filename, 'E_UTM_soil', & 2039 values_realwp_1d = output_values_1d_pointer, & 2040 bounds_start = (/vmea(l)%start_coord_s/), & 2041 bounds_end = (/vmea(l)%end_coord_s /) ) 2268 2042 ! 2269 2043 !-- Output of Northing coordinate. Before output, recalculate NUTM. … … 2275 2049 2276 2050 output_values_1d_pointer => output_values_1d_target 2277 return_value = & 2278 dom_write_var( vmea(l)%nc_filename, & 2279 'N_UTM_soil', & 2280 values_realwp_1d = output_values_1d_pointer, & 2281 bounds_start = (/vmea(l)%start_coord_s/), & 2282 bounds_end = (/vmea(l)%end_coord_s /) ) 2051 return_value = dom_write_var( vmea(l)%nc_filename, 'N_UTM_soil', & 2052 values_realwp_1d = output_values_1d_pointer, & 2053 bounds_start = (/vmea(l)%start_coord_s/), & 2054 bounds_end = (/vmea(l)%end_coord_s /) ) 2283 2055 ! 2284 2056 !-- Output of relative height coordinate. … … 2291 2063 output_values_1d_target = vmea(l)%depth(1:vmea(l)%ns_soil) + oro_rel(:) 2292 2064 output_values_1d_pointer => output_values_1d_target 2293 return_value = & 2294 dom_write_var( vmea(l)%nc_filename, & 2295 'z_soil', & 2296 values_realwp_1d = output_values_1d_pointer, & 2297 bounds_start = (/vmea(l)%start_coord_s/), & 2298 bounds_end = (/vmea(l)%end_coord_s /) ) 2065 return_value = dom_write_var( vmea(l)%nc_filename, 'z_soil', & 2066 values_realwp_1d = output_values_1d_pointer, & 2067 bounds_start = (/vmea(l)%start_coord_s/), & 2068 bounds_end = (/vmea(l)%end_coord_s /) ) 2299 2069 ! 2300 2070 !-- Write surface altitude for the station. Note, since z is already a relative observation … … 2302 2072 output_values_1d_target = oro_rel(:) 2303 2073 output_values_1d_pointer => output_values_1d_target 2304 return_value = & 2305 dom_write_var( vmea(l)%nc_filename, & 2306 'station_h_soil', & 2307 values_realwp_1d = output_values_1d_pointer, & 2308 bounds_start = (/vmea(l)%start_coord_s/), & 2309 bounds_end = (/vmea(l)%end_coord_s /) ) 2074 return_value = dom_write_var( vmea(l)%nc_filename, 'station_h_soil', & 2075 values_realwp_1d = output_values_1d_pointer, & 2076 bounds_start = (/vmea(l)%start_coord_s/), & 2077 bounds_end = (/vmea(l)%end_coord_s /) ) 2310 2078 2311 2079 DEALLOCATE( oro_rel ) … … 2326 2094 output_values_2d_char_pointer => output_values_2d_char_target 2327 2095 2328 return_value = & 2329 dom_write_var( vmea(l)%nc_filename, & 2330 'station_name_soil', & 2331 values_char_2d = output_values_2d_char_pointer, & 2332 bounds_start = (/ 1, vmea(l)%start_coord_s /), & 2333 bounds_end = (/ maximum_name_length, vmea(l)%end_coord_s /) ) 2096 return_value = dom_write_var( vmea(l)%nc_filename, 'station_name_soil', & 2097 values_char_2d = output_values_2d_char_pointer, & 2098 bounds_start = (/ 1, vmea(l)%start_coord_s /), & 2099 bounds_end = (/ maximum_name_length, & 2100 vmea(l)%end_coord_s /) ) 2334 2101 2335 2102 DEALLOCATE( station_name ) … … 2363 2130 output_values_2d_pointer => output_values_2d_target 2364 2131 2365 return_value = dom_write_var( vmea(l)%nc_filename, & 2366 variable_name, & 2367 values_realwp_2d = output_values_2d_pointer, & 2132 return_value = dom_write_var( vmea(l)%nc_filename, variable_name, & 2133 values_realwp_2d = output_values_2d_pointer, & 2368 2134 bounds_start = (/vmea(l)%start_coord_s, t_ind/), & 2369 2135 bounds_end = (/vmea(l)%end_coord_s, t_ind /) ) … … 2372 2138 output_values_2d_target(t_ind,:) = vmea(l)%measured_vars_soil(:,n) 2373 2139 output_values_2d_pointer => output_values_2d_target 2374 return_value = & 2375 dom_write_var( vmea(l)%nc_filename, & 2376 variable_name, & 2377 values_realwp_2d = output_values_2d_pointer, & 2378 bounds_start = (/vmea(l)%start_coord_s, t_ind/), & 2379 bounds_end = (/vmea(l)%end_coord_s, t_ind /) ) 2140 return_value = dom_write_var( vmea(l)%nc_filename, variable_name, & 2141 values_realwp_2d = output_values_2d_pointer, & 2142 bounds_start = (/vmea(l)%start_coord_s, t_ind/), & 2143 bounds_end = (/vmea(l)%end_coord_s, t_ind /) ) 2380 2144 DEALLOCATE( output_values_2d_target ) 2381 2145 ELSE … … 2387 2151 output_values_2d_pointer => output_values_2d_target 2388 2152 2389 return_value = dom_write_var( vmea(l)%nc_filename, & 2390 variable_name, & 2153 return_value = dom_write_var( vmea(l)%nc_filename, variable_name, & 2391 2154 values_realwp_2d = output_values_2d_pointer, & 2392 2155 bounds_start = (/vmea(l)%start_coord_a, t_ind/), & … … 2397 2160 output_values_2d_target(t_ind,:) = vmea(l)%measured_vars(:,n) 2398 2161 output_values_2d_pointer => output_values_2d_target 2399 return_value = & 2400 dom_write_var( vmea(l)%nc_filename, & 2401 variable_name, & 2402 values_realwp_2d = output_values_2d_pointer, & 2403 bounds_start = (/ vmea(l)%start_coord_a, t_ind /), & 2404 bounds_end = (/ vmea(l)%end_coord_a, t_ind /) ) 2162 return_value = dom_write_var( vmea(l)%nc_filename, variable_name, & 2163 values_realwp_2d = output_values_2d_pointer, & 2164 bounds_start = (/ vmea(l)%start_coord_a, t_ind /), & 2165 bounds_end = (/ vmea(l)%end_coord_a, t_ind /) ) 2405 2166 2406 2167 DEALLOCATE( output_values_2d_target ) … … 2563 2324 j = vmea(l)%j(m) 2564 2325 i = vmea(l)%i(m) 2565 vmea(l)%measured_vars(m,n) = SQRT( & 2566 ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) )**2 + & 2567 ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) )**2 & 2326 vmea(l)%measured_vars(m,n) = SQRT( ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) )**2 & 2327 + ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) )**2 & 2568 2328 ) 2569 2329 ENDDO … … 2576 2336 2577 2337 vmea(l)%measured_vars(m,n) = 180.0_wp + 180.0_wp / pi * ATAN2( & 2578 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ),&2579 0.5_wp * ( u(k,j,i) + u(k,j,i+1) )&2580 2338 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ), & 2339 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) & 2340 ) 2581 2341 ENDDO 2582 2342
Note: See TracChangeset
for help on using the changeset viewer.