Changeset 4404 for palm/trunk/SOURCE/netcdf_data_input_mod.f90
- Timestamp:
- Feb 12, 2020 5:01:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r4401 r4404 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Fix misplaced preprocessor directives. 28 ! 29 ! 4401 2020-02-11 16:19:09Z suehring 27 30 ! Define a default list of coordinate reference system variables used when 28 31 ! no static driver input is available … … 3900 3903 !------------------------------------------------------------------------------! 3901 3904 SUBROUTINE close_input_file( id ) 3905 3906 USE pegrid 3907 3908 IMPLICIT NONE 3909 3910 INTEGER(iwp), INTENT(INOUT) :: id !< file id 3911 3902 3912 #if defined( __netcdf ) 3903 3904 USE pegrid3905 3906 IMPLICIT NONE3907 3908 INTEGER(iwp), INTENT(INOUT) :: id !< file id3909 3910 3913 nc_stat = NF90_CLOSE( id ) 3911 3914 CALL handle_error( 'close', 540 ) … … 3919 3922 !------------------------------------------------------------------------------! 3920 3923 SUBROUTINE open_read_file( filename, id ) 3921 #if defined( __netcdf )3922 3924 3923 3925 USE pegrid … … 3927 3929 CHARACTER (LEN=*), INTENT(IN) :: filename !< filename 3928 3930 INTEGER(iwp), INTENT(INOUT) :: id !< file id 3931 3932 #if defined( __netcdf ) 3929 3933 3930 3934 #if defined( __netcdf4_parallel ) … … 4166 4170 4167 4171 SUBROUTINE get_variable_string( id, variable_name, var_string, names_number ) 4168 #if defined( __netcdf )4169 4172 4170 4173 USE indices … … 4191 4194 ! the number of the components of the first dimensions 4192 4195 ! (rows) 4193 4196 #if defined( __netcdf ) 4194 4197 4195 4198 ALLOCATE(tmp_var_string(max_string_length,names_number)) … … 4418 4421 !------------------------------------------------------------------------------! 4419 4422 SUBROUTINE get_variable_pr( id, variable_name, t, var ) 4420 #if defined( __netcdf )4421 4423 4422 4424 USE pegrid … … 4434 4436 REAL(wp), DIMENSION(:), INTENT(INOUT) :: var !< variable to be read 4435 4437 4438 #if defined( __netcdf ) 4436 4439 ! 4437 4440 !-- First, inquire variable ID … … 4461 4464 !------------------------------------------------------------------------------! 4462 4465 SUBROUTINE get_variable_surf( id, variable_name, surf ) 4463 #if defined( __netcdf )4464 4466 4465 4467 USE pegrid … … 4473 4475 USE grid_variables, & 4474 4476 ONLY: dx, dy 4475 4477 4476 4478 USE basic_constants_and_equations_mod, & 4477 4479 ONLY: pi … … 4506 4508 REAL(wp) :: oro_max_l !< maximum terrain height under building 4507 4509 4510 #if defined( __netcdf ) 4508 4511 ! 4509 4512 !-- First, inquire variable ID … … 5599 5602 !------------------------------------------------------------------------------! 5600 5603 SUBROUTINE inquire_fill_value_int( id, var_name, nofill, fill_value ) 5601 #if defined( __netcdf ) 5604 5602 5605 CHARACTER(LEN=*), INTENT(IN) :: var_name !< variable name 5603 5606 … … 5607 5610 INTEGER(iwp) :: id_var !< netCDF variable id (varid) 5608 5611 5612 #if defined( __netcdf ) 5609 5613 nc_stat = NF90_INQ_VARID( id, TRIM( var_name ), id_var ) 5610 5614 nc_stat = NF90_INQ_VAR_FILL(id, id_var, no_fill, fill_value ) … … 5623 5627 !------------------------------------------------------------------------------! 5624 5628 SUBROUTINE inquire_fill_value_real( id, var_name, nofill, fill_value ) 5625 #if defined( __netcdf ) 5629 5626 5630 CHARACTER(LEN=*), INTENT(IN) :: var_name !< variable name 5627 5631 … … 5632 5636 REAL(wp), INTENT(OUT) :: fill_value !< fill value 5633 5637 5638 #if defined( __netcdf ) 5634 5639 nc_stat = NF90_INQ_VARID( id, TRIM( var_name ), id_var ) 5635 5640 nc_stat = NF90_INQ_VAR_FILL(id, id_var, no_fill, fill_value )
Note: See TracChangeset
for help on using the changeset viewer.