Changeset 2874 for palm/trunk/SOURCE/netcdf_data_input_mod.f90
- Timestamp:
- Mar 13, 2018 10:55:42 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r2794 r2874 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix: wrong placement of netcdf cpp-macros fixed 28 ! 29 ! 2794 2018-02-07 14:09:43Z knoop 27 30 ! Check if 3D building input is consistent to numeric grid. 28 31 ! … … 1635 1638 DO ii = 0, io_blocks-1 1636 1639 IF ( ii == io_group ) THEN 1637 #if defined ( __netcdf )1638 1640 ! 1639 1641 !-- Input via palm-input data standard 1640 1642 IF ( input_pids_static ) THEN 1643 #if defined ( __netcdf ) 1641 1644 ! 1642 1645 !-- Open file in read-only mode … … 1774 1777 !-- Close topography input file 1775 1778 CALL close_input_file( id_topo ) 1779 #else 1780 CONTINUE 1776 1781 #endif 1777 1782 ! … … 3455 3460 SUBROUTINE get_attribute_int32( id, attribute_name, value, global, & 3456 3461 variable_name ) 3457 #if defined( __netcdf )3458 3462 3459 3463 USE pegrid … … 3469 3473 3470 3474 LOGICAL, INTENT(IN) :: global !< flag indicating global attribute 3475 #if defined( __netcdf ) 3471 3476 3472 3477 ! … … 3494 3499 SUBROUTINE get_attribute_int8( id, attribute_name, value, global, & 3495 3500 variable_name ) 3496 #if defined( __netcdf )3497 3501 3498 3502 USE pegrid … … 3508 3512 3509 3513 LOGICAL, INTENT(IN) :: global !< flag indicating global attribute 3514 #if defined( __netcdf ) 3510 3515 3511 3516 ! … … 3533 3538 SUBROUTINE get_attribute_real( id, attribute_name, value, global, & 3534 3539 variable_name ) 3535 #if defined( __netcdf )3536 3540 3537 3541 USE pegrid … … 3548 3552 3549 3553 REAL(wp), INTENT(INOUT) :: value !< read value 3554 #if defined( __netcdf ) 3550 3555 3551 3556 … … 3576 3581 SUBROUTINE get_attribute_string( id, attribute_name, value, global, & 3577 3582 variable_name ) 3578 #if defined( __netcdf )3579 3583 3580 3584 USE pegrid … … 3590 3594 3591 3595 LOGICAL, INTENT(IN) :: global !< flag indicating global attribute 3596 #if defined( __netcdf ) 3592 3597 3593 3598 ! … … 3649 3654 !------------------------------------------------------------------------------! 3650 3655 SUBROUTINE get_variable_1d_int( id, variable_name, var ) 3651 #if defined( __netcdf )3652 3656 3653 3657 USE pegrid … … 3661 3665 3662 3666 INTEGER(iwp), DIMENSION(:), INTENT(INOUT) :: var !< variable to be read 3667 #if defined( __netcdf ) 3663 3668 3664 3669 ! … … 3680 3685 !------------------------------------------------------------------------------! 3681 3686 SUBROUTINE get_variable_1d_real( id, variable_name, var ) 3682 #if defined( __netcdf )3683 3687 3684 3688 USE pegrid … … 3692 3696 3693 3697 REAL(wp), DIMENSION(:), INTENT(INOUT) :: var !< variable to be read 3698 #if defined( __netcdf ) 3694 3699 3695 3700 ! … … 3712 3717 !------------------------------------------------------------------------------! 3713 3718 SUBROUTINE get_variable_2d_real( id, variable_name, i, var ) 3714 #if defined( __netcdf )3715 3719 3716 3720 USE indices … … 3726 3730 3727 3731 REAL(wp), DIMENSION(nys:nyn), INTENT(INOUT) :: var !< variable to be read 3732 #if defined( __netcdf ) 3728 3733 ! 3729 3734 !-- Inquire variable id … … 3746 3751 !------------------------------------------------------------------------------! 3747 3752 SUBROUTINE get_variable_2d_int32( id, variable_name, i, var ) 3748 #if defined( __netcdf )3749 3753 3750 3754 USE indices … … 3759 3763 INTEGER(iwp) :: id_var !< variable id 3760 3764 INTEGER(iwp), DIMENSION(nys:nyn), INTENT(INOUT) :: var !< variable to be read 3765 #if defined( __netcdf ) 3761 3766 ! 3762 3767 !-- Inquire variable id … … 3779 3784 !------------------------------------------------------------------------------! 3780 3785 SUBROUTINE get_variable_2d_int8( id, variable_name, i, var ) 3781 #if defined( __netcdf )3782 3786 3783 3787 USE indices … … 3792 3796 INTEGER(iwp) :: id_var !< variable id 3793 3797 INTEGER(KIND=1), DIMENSION(nys:nyn), INTENT(INOUT) :: var !< variable to be read 3798 #if defined( __netcdf ) 3794 3799 ! 3795 3800 !-- Inquire variable id … … 3811 3816 !------------------------------------------------------------------------------! 3812 3817 SUBROUTINE get_variable_3d_int8( id, variable_name, i, j, var ) 3813 #if defined( __netcdf )3814 3818 3815 3819 USE indices … … 3829 3833 3830 3834 INTEGER( KIND = 1 ), DIMENSION(nzb:nzt+1), INTENT(INOUT) :: var !< variable to be read 3835 #if defined( __netcdf ) 3831 3836 3832 3837 ! … … 3855 3860 !------------------------------------------------------------------------------! 3856 3861 SUBROUTINE get_variable_3d_real( id, variable_name, i, j, var ) 3857 #if defined( __netcdf )3858 3862 3859 3863 USE indices … … 3873 3877 3874 3878 REAL(wp), DIMENSION(:), INTENT(INOUT) :: var !< variable to be read 3879 #if defined( __netcdf ) 3875 3880 3876 3881 ! … … 3900 3905 !------------------------------------------------------------------------------! 3901 3906 SUBROUTINE get_variable_4d_real( id, variable_name, i, j, var, n3, n4 ) 3902 #if defined( __netcdf )3903 3907 3904 3908 USE indices … … 3919 3923 3920 3924 REAL(wp), DIMENSION(:,:), INTENT(INOUT) :: var !< variable to be read 3925 #if defined( __netcdf ) 3921 3926 3922 3927 ! … … 3942 3947 SUBROUTINE get_variable_bc( id, variable_name, t_start, & 3943 3948 i2_s, count_2, i3_s, count_3, var ) 3944 #if defined( __netcdf )3945 3949 3946 3950 USE indices … … 3960 3964 3961 3965 REAL(wp), DIMENSION(:), INTENT(INOUT) :: var !< input variable 3966 #if defined( __netcdf ) 3962 3967 3963 3968 ! … … 3982 3987 !------------------------------------------------------------------------------! 3983 3988 SUBROUTINE inquire_num_variables( id, num_vars ) 3984 #if defined( __netcdf )3985 3989 3986 3990 USE indices … … 3991 3995 INTEGER(iwp), INTENT(IN) :: id !< file id 3992 3996 INTEGER(iwp), INTENT(INOUT) :: num_vars !< number of variables in a file 3997 #if defined( __netcdf ) 3993 3998 3994 3999 nc_stat = NF90_INQUIRE( id, NVARIABLES = num_vars ) … … 4005 4010 !------------------------------------------------------------------------------! 4006 4011 SUBROUTINE inquire_variable_names( id, var_names ) 4007 #if defined( __netcdf )4008 4012 4009 4013 USE indices … … 4017 4021 INTEGER(iwp) :: num_vars !< number of variables (unused return parameter) 4018 4022 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: varids !< dummy array to strore variable ids temporarily 4023 #if defined( __netcdf ) 4019 4024 4020 4025 ALLOCATE( varids(1:SIZE(var_names)) ) … … 4037 4042 !------------------------------------------------------------------------------! 4038 4043 SUBROUTINE handle_error( routine_name, errno ) 4039 #if defined( __netcdf )4040 4044 4041 4045 USE control_parameters, & … … 4048 4052 4049 4053 INTEGER(iwp) :: errno 4054 #if defined( __netcdf ) 4050 4055 4051 4056 IF ( nc_stat /= NF90_NOERR ) THEN
Note: See TracChangeset
for help on using the changeset viewer.