Changeset 3866 for palm/trunk/UTIL/inifor/src/inifor_types.f90
- Timestamp:
- Apr 5, 2019 2:25:01 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/src/inifor_types.f90
r3779 r3866 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Use PALM's working precision 29 ! 30 ! 31 ! 3779 2019-03-05 11:13:35Z eckhard 28 32 ! Improved variable naming 29 33 ! … … 68 72 !> The types module provides derived data types used in INIFOR. 69 73 !------------------------------------------------------------------------------! 70 #if defined ( __netcdf )71 74 MODULE inifor_types 72 75 73 76 USE inifor_defs, & 74 ONLY: dp, DATE, PATH, SNAME, LNAME 77 ONLY: DATE, PATH, SNAME, LNAME, wp 78 79 #if defined ( __netcdf ) 75 80 USE netcdf, & 76 81 ONLY: NF90_MAX_VAR_DIMS, NF90_MAX_NAME 82 #endif 77 83 78 84 IMPLICIT NONE … … 104 110 CHARACTER(LEN=SNAME) :: rotation_method !< selects method for velocity rotation 105 111 106 REAL( dp) :: p0 !< manually specified surface pressure [Pa]107 REAL( dp) :: ug !< manually spefied geostrophic wind component in x direction [m/s]108 REAL( dp) :: vg !< manually spefied geostrophic wind component in y direction [m/s]109 REAL( dp) :: z0 !< elevation of the PALM-4U domain above sea level [m]110 REAL( dp) :: averaging_angle !< latitudal and longitudal width of averaging regions [deg]112 REAL(wp) :: p0 !< manually specified surface pressure [Pa] 113 REAL(wp) :: ug !< manually spefied geostrophic wind component in x direction [m/s] 114 REAL(wp) :: vg !< manually spefied geostrophic wind component in y direction [m/s] 115 REAL(wp) :: z0 !< elevation of the PALM-4U domain above sea level [m] 116 REAL(wp) :: averaging_angle !< latitudal and longitudal width of averaging regions [deg] 111 117 112 118 LOGICAL :: debug !< indicates whether --debug option was given … … 143 149 INTEGER, ALLOCATABLE :: jjj(:) !< profile averaging neighbour indices 144 150 INTEGER, ALLOCATABLE :: kkk(:,:,:) !< indices of vertical interpolation neightbours, kkk(<source column>, <PALM k level>, <neighbour index>) 145 REAL( dp) :: lx !< domain length in the first dimension [m]146 REAL( dp) :: ly !< domain length in the second dimension [m]147 REAL( dp) :: x0 !< x coordinate of PALM-4U domain projection centre, i.e. location of zero distortion148 REAL( dp) :: y0 !< y coordinate of PALM-4U domain projection centre, i.e. location of zwro distortion149 REAL( dp) :: z0 !< displacement of the coordinate origin above sea level [m]150 REAL( dp), ALLOCATABLE :: x(:) !< coordinates of cell centers in x direction [m]151 REAL( dp), ALLOCATABLE :: y(:) !< coordinates of cell centers in y direction [m]152 REAL( dp), POINTER :: z(:) !< coordinates of cell centers in z direction [m]153 REAL( dp), ALLOCATABLE :: h(:,:,:) !< heights grid point for intermediate grids [m]154 REAL( dp), POINTER :: cosmo_h(:,:,:)!< pointer to appropriate COSMO level heights (scalar/w) [m]155 REAL( dp), POINTER :: hhl(:,:,:) !< heights of half layers (cell faces) above sea level in COSMO-DE, read in from156 REAL( dp), POINTER :: hfl(:,:,:) !< heights of full layers (cell centres) above sea level in COSMO-DE, computed as arithmetic average of hhl157 REAL( dp), POINTER :: depths(:) !< depths of output soil layers, equal the depths of the source model (e.g. COSMO-DE)158 REAL( dp), ALLOCATABLE :: xu(:) !< coordinates of cell faces in x direction [m]159 REAL( dp), ALLOCATABLE :: yv(:) !< coordinates of cell faces in y direction [m]160 REAL( dp), POINTER :: zw(:) !< coordinates of cell faces in z direction [m]161 REAL( dp), ALLOCATABLE :: lat(:) !< rotated-pole latitudes of scalars (cell centers) of the COSMO-DE grid [rad]162 REAL( dp), ALLOCATABLE :: lon(:) !< rotated-pole longitudes of scalars (cell centres) of the COSMO-DE grid [rad]163 REAL( dp), ALLOCATABLE :: latv(:) !< rotated-pole latitudes of v winds (face centres in latitudal/y direction) [rad]164 REAL( dp), ALLOCATABLE :: lonu(:) !< rotated-pole latitudes of u winds (face centres in longitudal/x direction) [rad]165 REAL( dp), ALLOCATABLE :: clat(:,:) !< latitudes of PALM-4U cell centres in COSMO-DE's rotated-pole grid [rad]166 REAL( dp), ALLOCATABLE :: clon(:,:) !< longitudes of PALM-4U scalars (cell centres) in COSMO-DE's rotated-pole grid [rad]167 REAL( dp), ALLOCATABLE :: clatu(:,:) !< latitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad]168 REAL( dp), ALLOCATABLE :: clonu(:,:) !< longitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad]169 REAL( dp), ALLOCATABLE :: clatv(:,:) !< latitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad]170 REAL( dp), ALLOCATABLE :: clonv(:,:) !< longitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad]171 REAL( dp), ALLOCATABLE :: w_horiz(:,:,:) !< weights for bilinear horizontal interpolation172 REAL( dp), ALLOCATABLE :: w_verti(:,:,:,:) !< weights for linear vertical interpolation173 REAL( dp), ALLOCATABLE :: w(:,:,:) !< vertical interpolation weights, w(<source_column>, <PALM k level>, <neighbour index>) [-]151 REAL(wp) :: lx !< domain length in the first dimension [m] 152 REAL(wp) :: ly !< domain length in the second dimension [m] 153 REAL(wp) :: x0 !< x coordinate of PALM-4U domain projection centre, i.e. location of zero distortion 154 REAL(wp) :: y0 !< y coordinate of PALM-4U domain projection centre, i.e. location of zwro distortion 155 REAL(wp) :: z0 !< displacement of the coordinate origin above sea level [m] 156 REAL(wp), ALLOCATABLE :: x(:) !< coordinates of cell centers in x direction [m] 157 REAL(wp), ALLOCATABLE :: y(:) !< coordinates of cell centers in y direction [m] 158 REAL(wp), POINTER :: z(:) !< coordinates of cell centers in z direction [m] 159 REAL(wp), ALLOCATABLE :: h(:,:,:) !< heights grid point for intermediate grids [m] 160 REAL(wp), POINTER :: cosmo_h(:,:,:)!< pointer to appropriate COSMO level heights (scalar/w) [m] 161 REAL(wp), POINTER :: hhl(:,:,:) !< heights of half layers (cell faces) above sea level in COSMO-DE, read in from 162 REAL(wp), POINTER :: hfl(:,:,:) !< heights of full layers (cell centres) above sea level in COSMO-DE, computed as arithmetic average of hhl 163 REAL(wp), POINTER :: depths(:) !< depths of output soil layers, equal the depths of the source model (e.g. COSMO-DE) 164 REAL(wp), ALLOCATABLE :: xu(:) !< coordinates of cell faces in x direction [m] 165 REAL(wp), ALLOCATABLE :: yv(:) !< coordinates of cell faces in y direction [m] 166 REAL(wp), POINTER :: zw(:) !< coordinates of cell faces in z direction [m] 167 REAL(wp), ALLOCATABLE :: lat(:) !< rotated-pole latitudes of scalars (cell centers) of the COSMO-DE grid [rad] 168 REAL(wp), ALLOCATABLE :: lon(:) !< rotated-pole longitudes of scalars (cell centres) of the COSMO-DE grid [rad] 169 REAL(wp), ALLOCATABLE :: latv(:) !< rotated-pole latitudes of v winds (face centres in latitudal/y direction) [rad] 170 REAL(wp), ALLOCATABLE :: lonu(:) !< rotated-pole latitudes of u winds (face centres in longitudal/x direction) [rad] 171 REAL(wp), ALLOCATABLE :: clat(:,:) !< latitudes of PALM-4U cell centres in COSMO-DE's rotated-pole grid [rad] 172 REAL(wp), ALLOCATABLE :: clon(:,:) !< longitudes of PALM-4U scalars (cell centres) in COSMO-DE's rotated-pole grid [rad] 173 REAL(wp), ALLOCATABLE :: clatu(:,:) !< latitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad] 174 REAL(wp), ALLOCATABLE :: clonu(:,:) !< longitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad] 175 REAL(wp), ALLOCATABLE :: clatv(:,:) !< latitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad] 176 REAL(wp), ALLOCATABLE :: clonv(:,:) !< longitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad] 177 REAL(wp), ALLOCATABLE :: w_horiz(:,:,:) !< weights for bilinear horizontal interpolation 178 REAL(wp), ALLOCATABLE :: w_verti(:,:,:,:) !< weights for linear vertical interpolation 179 REAL(wp), ALLOCATABLE :: w(:,:,:) !< vertical interpolation weights, w(<source_column>, <PALM k level>, <neighbour index>) [-] 174 180 END TYPE grid_definition 175 181 … … 190 196 INTEGER :: dimvarids_vel(3) !< NetCDF IDs of the grid coordinates of velocities xu, yu, zu. Note that velocities are located at mix of both coordinates, e.g. u(xu, y, z). 191 197 INTEGER :: dimvarids_soil(3) !< NetCDF IDs of the grid coordinates for soil points x, y, depth 192 REAL( dp), POINTER :: time(:) !< vector of output time steps198 REAL(wp), POINTER :: time(:) !< vector of output time steps 193 199 END TYPE nc_file 194 200 … … 199 205 !> Metadata container for netCDF variables 200 206 !------------------------------------------------------------------------------! 207 #if defined ( __netcdf ) 201 208 TYPE nc_var 202 209 INTEGER :: varid !< NetCDF ID of the variable … … 247 254 LOGICAL :: is_preprocessed = .FALSE. !< Inifor flag indicating whether the I/O group has been preprocessed 248 255 END TYPE io_group 249 256 #endif 250 257 251 258 !------------------------------------------------------------------------------! … … 257 264 !------------------------------------------------------------------------------! 258 265 TYPE container 259 REAL( dp), ALLOCATABLE :: array(:,:,:) !< generic data array266 REAL(wp), ALLOCATABLE :: array(:,:,:) !< generic data array 260 267 LOGICAL :: is_preprocessed = .FALSE. !< flag indicating whether input array has been preprocessed 261 268 END TYPE container 262 269 263 270 END MODULE inifor_types 264 #endif265
Note: See TracChangeset
for help on using the changeset viewer.