Changeset 3447 for palm/trunk/UTIL/inifor
- Timestamp:
- Oct 29, 2018 3:52:54 PM (6 years ago)
- Location:
- palm/trunk/UTIL/inifor
- Files:
-
- 1 deleted
- 3 edited
- 7 moved
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/Makefile
r3395 r3447 25 25 # ----------------- 26 26 # $Id$ 27 # Renamed source files for compatibilty with PALM build system 28 # 29 # 3395 2018-10-22 17:32:49Z eckhard 27 30 # Updated build order 28 31 # … … 50 53 TEST_PATH = $(PROJECT_PATH)/tests 51 54 52 MODULES = $(SRC_PATH)/defs.mod $(SRC_PATH)/types.mod $(SRC_PATH)/util.mod $(SRC_PATH)/control.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod 55 MODULES = $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_types.mod \ 56 $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_control.mod \ 57 $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod \ 58 $(SRC_PATH)/inifor_grid.mod 53 59 SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90 54 60 OBJECTS = $(SOURCES:%.f90=%.o) -
palm/trunk/UTIL/inifor/Makefile.gnu
r3395 r3447 25 25 # ----------------- 26 26 # $Id$ 27 # Renamed source files for compatibilty with PALM build system 28 # 29 # 3395 2018-10-22 17:32:49Z eckhard 27 30 # Updated build order 28 31 # … … 51 54 TEST_PATH = $(PROJECT_PATH)/tests 52 55 53 MODULES = $(SRC_PATH)/defs.mod $(SRC_PATH)/types.mod $(SRC_PATH)/util.mod $(SRC_PATH)/control.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod 56 MODULES = $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_types.mod \ 57 $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_control.mod \ 58 $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod \ 59 $(SRC_PATH)/inifor_grid.mod 54 60 SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90 55 61 OBJECTS = $(SOURCES:%.f90=%.o) -
palm/trunk/UTIL/inifor/Makefile.ifort
r3395 r3447 25 25 # ----------------- 26 26 # $Id$ 27 # Renamed source files for compatibilty with PALM build system 28 # 29 # 3395 2018-10-22 17:32:49Z eckhard 27 30 # Updated build order 28 31 # … … 51 54 TEST_PATH = $(PROJECT_PATH)/tests 52 55 53 MODULES = $(SRC_PATH)/defs.mod $(SRC_PATH)/types.mod $(SRC_PATH)/util.mod $(SRC_PATH)/control.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod 56 MODULES = $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_types.mod \ 57 $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_control.mod \ 58 $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod \ 59 $(SRC_PATH)/inifor_grid.mod 54 60 SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90 55 61 OBJECTS = $(SOURCES:%.f90=%.o) -
palm/trunk/UTIL/inifor/src/inifor_control.f90
r3446 r3447 1 !> @file src/ control.f901 !> @file src/inifor_control.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Renamed source files for compatibilty with PALM build system 29 ! 30 ! 31 ! 3395 2018-10-22 17:32:49Z eckhard 28 32 ! Suppress debugging messages unless --debug option is given 29 33 ! -
palm/trunk/UTIL/inifor/src/inifor_defs.f90
r3446 r3447 1 !> @file src/ defs.f901 !> @file src/inifor_defs.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Renamed source files for compatibilty with PALM build system 29 ! 30 ! 31 ! 3395 2018-10-22 17:32:49Z eckhard 28 32 ! New parameters for computation of geostrophic winds 29 33 ! Bumped INIFOR version number -
palm/trunk/UTIL/inifor/src/inifor_grid.f90
r3446 r3447 1 !> @file src/ grid.f901 !> @file src/inifor_grid.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Renamed source files for compatibilty with PALM build system 29 ! 30 ! 31 ! 3395 2018-10-22 17:32:49Z eckhard 28 32 ! Added computation of geostrophic winds form COSMO pressure fields 29 33 ! Introduced averaging grids and internal 'output' variables for computation of -
palm/trunk/UTIL/inifor/src/inifor_io.f90
r3446 r3447 1 !> @file src/i o.f901 !> @file src/inifor_io.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Removed INCLUDE statement for get_netcdf_variable() 29 ! Renamed source files for compatibilty with PALM build system 30 ! 31 ! 32 ! 3395 2018-10-22 17:32:49Z eckhard 28 33 ! Added command-line options for configuring the computation of geostrophic 29 34 ! winds (--averagin-mode, --averaging-angle) … … 91 96 INTEGER(hp), ALLOCATABLE, INTENT(INOUT) :: buffer(:,:,:) 92 97 93 INCLUDE 'get_netcdf_variable.inc' 98 INTEGER :: ncid 99 INTEGER, DIMENSION(3) :: start, count 100 101 IF ( nf90_open( TRIM(in_file), NF90_NOWRITE, ncid ) .EQ. NF90_NOERR .AND. & 102 nf90_inq_varid( ncid, in_var % name, in_var % varid ) .EQ. NF90_NOERR ) THEN 103 104 CALL get_input_dimensions(in_var, ncid) 105 106 CALL get_netcdf_start_and_count(in_var, start, count) 107 CALL run_control('time', 'read') 108 109 ALLOCATE( buffer( count(1), count(2), count(3) ) ) 110 CALL run_control('time', 'alloc') 111 112 CALL check(nf90_get_var( ncid, in_var % varid, buffer, & 113 start = start, & 114 count = count )) 115 116 ELSE 117 118 message = "Failed to read '" // TRIM(in_var % name) // & 119 "' from file '" // TRIM(in_file) // "'." 120 CALL abort('get_netcdf_variable', message) 121 122 END IF 123 124 CALL check(nf90_close(ncid)) 125 CALL run_control('time', 'read') 94 126 95 127 END SUBROUTINE get_netcdf_variable_int … … 102 134 REAL(dp), ALLOCATABLE, INTENT(INOUT) :: buffer(:,:,:) 103 135 104 INCLUDE 'get_netcdf_variable.inc' 136 INTEGER :: ncid 137 INTEGER, DIMENSION(3) :: start, count 138 139 IF ( nf90_open( TRIM(in_file), NF90_NOWRITE, ncid ) .EQ. NF90_NOERR .AND. & 140 nf90_inq_varid( ncid, in_var % name, in_var % varid ) .EQ. NF90_NOERR ) THEN 141 142 CALL get_input_dimensions(in_var, ncid) 143 144 CALL get_netcdf_start_and_count(in_var, start, count) 145 CALL run_control('time', 'read') 146 147 ALLOCATE( buffer( count(1), count(2), count(3) ) ) 148 CALL run_control('time', 'alloc') 149 150 CALL check(nf90_get_var( ncid, in_var % varid, buffer, & 151 start = start, & 152 count = count )) 153 154 ELSE 155 156 message = "Failed to read '" // TRIM(in_var % name) // & 157 "' from file '" // TRIM(in_file) // "'." 158 CALL abort('get_netcdf_variable', message) 159 160 END IF 161 162 CALL check(nf90_close(ncid)) 163 CALL run_control('time', 'read') 105 164 106 165 END SUBROUTINE get_netcdf_variable_real 166 167 168 SUBROUTINE get_input_dimensions(in_var, ncid) 169 170 TYPE(nc_var), INTENT(INOUT) :: in_var 171 INTEGER, INTENT(OUT) :: ncid 172 173 INTEGER :: i 174 175 CALL check(nf90_get_att( ncid, in_var % varid, "long_name", & 176 in_var % long_name)) 177 178 CALL check(nf90_get_att( ncid, in_var % varid, "units", & 179 in_var % units )) 180 181 CALL check(nf90_inquire_variable( ncid, in_var % varid, & 182 ndims = in_var % ndim, & 183 dimids = in_var % dimids )) 184 185 DO i = 1, in_var % ndim 186 CALL check(nf90_inquire_dimension( ncid, in_var % dimids(i), & 187 name = in_var % dimname(i), & 188 len = in_var % dimlen(i) )) 189 END DO 190 191 END SUBROUTINE get_input_dimensions 192 193 194 SUBROUTINE get_netcdf_start_and_count(in_var, start, count) 195 196 TYPE(nc_var), INTENT(INOUT) :: in_var 197 INTEGER, DIMENSION(3), INTENT(OUT) :: start, count 198 199 INTEGER :: ndim 200 201 IF ( in_var % ndim .LT. 2 .OR. in_var % ndim .GT. 4 ) THEN 202 203 message = "Failed reading NetCDF variable " // & 204 TRIM(in_var % name) // " with " // TRIM(str(in_var%ndim)) // & 205 " dimensions because only two- and and three-dimensional" // & 206 " variables are supported." 207 CALL abort('get_netcdf_start_and_count', message) 208 209 END IF 210 211 start = (/ 1, 1, 1 /) 212 IF ( TRIM(in_var % name) .EQ. 'T_SO' ) THEN 213 ! Skip depth = 0.0 for T_SO and reduce number of depths from 9 to 8 214 in_var % dimlen(3) = in_var % dimlen(3) - 1 215 216 ! Start reading from second level, e.g. depth = 0.005 instead of 0.0 217 start(3) = 2 218 END IF 219 220 IF (in_var % ndim .EQ. 2) THEN 221 in_var % dimlen(3) = 1 222 ENDIF 223 224 ndim = MIN(in_var % ndim, 3) 225 count = (/ 1, 1, 1 /) 226 count(1:ndim) = in_var % dimlen(1:ndim) 227 228 END SUBROUTINE get_netcdf_start_and_count 107 229 108 230 -
palm/trunk/UTIL/inifor/src/inifor_transform.f90
r3446 r3447 1 !> @file src/ transform.f901 !> @file src/inifor_transform.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Renamed source files for compatibilty with PALM build system 29 ! 30 ! 31 ! 3395 2018-10-22 17:32:49Z eckhard 28 32 ! Switched addressing of averaging regions from index bounds to list of columns 29 33 ! Added routines for the computation of geostrophic winds including: -
palm/trunk/UTIL/inifor/src/inifor_types.f90
r3446 r3447 1 !> @file src/ types.f901 !> @file src/inifor_types.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Renamed source files for compatibilty with PALM build system 29 ! 30 ! 31 ! 3395 2018-10-22 17:32:49Z eckhard 28 32 ! Added *_is_set LOGICALs to inifor_config type to indicate option invocation 29 33 ! from the command-line -
palm/trunk/UTIL/inifor/src/inifor_util.f90
r3446 r3447 1 !> @file src/ util.f901 !> @file src/inifor_util.f90 2 2 !------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Renamed source files for compatibilty with PALM build system 29 ! 30 ! 31 ! 3395 2018-10-22 17:32:49Z eckhard 28 32 ! New routines for computing potential temperature and moist air density 29 33 ! Increased number of digits in real-to-str conversion
Note: See TracChangeset
for help on using the changeset viewer.