Ignore:
Timestamp:
Oct 22, 2018 5:32:49 PM (6 years ago)
Author:
eckhard
Message:

inifor: Added computation of geostrophic winds from COSMO input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/inifor/src/types.f90

    r3183 r3395  
    2626! -----------------
    2727! $Id$
     28! Added *_is_set LOGICALs to inifor_config type to indicate option invocation
     29!     from the command-line
     30! Added 1D index vertical weights lists to support addressing averaging regions
     31!     by list of columns instead of index bounds
     32!
     33!
     34! 3183 2018-07-27 14:25:55Z suehring
    2835! Introduced new PALM grid stretching:
    2936! - Converted vertical grid_definition coordinte variables to pointers
     
    6673
    6774    CHARACTER(LEN=SNAME) ::  flow_prefix          !< Prefix of flow input files, e.g. 'laf' for COSMO-DE analyses
     75    CHARACTER(LEN=SNAME) ::  input_prefix         !< Prefix of all input files, e.g. 'laf' for COSMO-DE analyses
     76    CHARACTER(LEN=SNAME) ::  radiation_prefix     !< Prefix of radiation input files, e.g 'laf' for COSMO-DE analyses
    6877    CHARACTER(LEN=SNAME) ::  soil_prefix          !< Prefix of soil input files, e.g. 'laf' for COSMO-DE analyses
    69     CHARACTER(LEN=SNAME) ::  radiation_prefix     !< Prefix of radiation input files, e.g 'laf' for COSMO-DE analyses
    7078    CHARACTER(LEN=SNAME) ::  soilmoisture_prefix  !< Prefix of input files for soil moisture spin-up, e.g 'laf' for COSMO-DE analyses
    7179
     80    CHARACTER(LEN=SNAME) ::  averaging_mode
    7281    CHARACTER(LEN=SNAME) ::  bc_mode
    7382    CHARACTER(LEN=SNAME) ::  ic_mode
     
    7786    REAL(dp)             ::  ug
    7887    REAL(dp)             ::  vg
    79     REAL(dp)             ::  z0 !< Elevation of the PALM-4U domain above sea level [m]
     88    REAL(dp)             ::  z0                   !< Elevation of the PALM-4U domain above sea level [m]
     89    REAL(dp)             ::  averaging_angle      !< latitudal and longitudal width of averaging regions [deg]
     90   
     91
     92    LOGICAL              ::  debug
     93    LOGICAL              ::  p0_is_set
     94    LOGICAL              ::  ug_is_set
     95    LOGICAL              ::  vg_is_set
     96    LOGICAL              ::  flow_prefix_is_set          !<
     97    LOGICAL              ::  input_prefix_is_set         !<
     98    LOGICAL              ::  radiation_prefix_is_set     !<
     99    LOGICAL              ::  soil_prefix_is_set          !<
     100    LOGICAL              ::  soilmoisture_prefix_is_set  !<
    80101 END TYPE inifor_config
    81102
    82103 TYPE grid_definition
    83104    CHARACTER(LEN=SNAME)  ::  name(3)       !< names of the grid dimensions, e.g. (/'x', 'y', 'z'/) or (/'latitude', 'longitude', 'height'/)
     105    CHARACTER(LEN=SNAME)  ::  kind          !< names of the grid dimensions, e.g. (/'x', 'y', 'z'/) or (/'latitude', 'longitude', 'height'/)
     106    INTEGER               ::  k_min         !< Index of lowest PALM grid level that is not cut by local COSMO orography; vertically separates interpolation and extrapolation region.
    84107    INTEGER               ::  nx            !< number of gridpoints in the first dimension
    85108    INTEGER               ::  ny            !< number of gridpoints in the second dimension
    86     INTEGER               ::  nz            !< number of gridpoints in the third dimension
     109    INTEGER               ::  nz            !< number of gridpoints in the third dimension, used for PALM points
     110    INTEGER               ::  nlev          !< number of COSMO grid levels
     111    INTEGER               ::  n_columns     !< number of averaging columns of the source grid
    87112    INTEGER, ALLOCATABLE  ::  ii(:,:,:)     !< Given a point (i,j,k) in the PALM-4U grid, ii(i,j,l) gives the x index of the l'th horizontl neighbour on the COSMO-DE grid.
    88113    INTEGER, ALLOCATABLE  ::  jj(:,:,:)     !< Given a point (i,j,k) in the PALM-4U grid, jj(i,j,l) gives the y index of the l'th horizontl neighbour on the COSMO-DE grid.
    89114    INTEGER, ALLOCATABLE  ::  kk(:,:,:,:)   !< Given a point (i,j,k) in the PALM-4U grid, kk(i,j,k,l) gives the z index of the l'th vertical neighbour in the intermediate grid.
     115    INTEGER, ALLOCATABLE  ::  iii(:)        !< profile averaging neighbour indices
     116    INTEGER, ALLOCATABLE  ::  jjj(:)        !< profile averaging neighbour indices
     117    INTEGER, ALLOCATABLE  ::  kkk(:,:,:)    !< indices of vertical interpolation neightbours, kkk(<source column>, <PALM k level>, <neighbour index>)
    90118    REAL(dp)              ::  lx            !< domain length in the first dimension [m]
    91119    REAL(dp)              ::  ly            !< domain length in the second dimension [m]
     
    97125    REAL(dp), POINTER     ::  z(:)          !< coordinates of cell centers in z direction [m]
    98126    REAL(dp), ALLOCATABLE ::  h(:,:,:)      !< heights grid point for intermediate grids [m]
     127    REAL(dp), POINTER     ::  cosmo_h(:,:,:)!< pointer to appropriate COSMO level heights (scalar/w) [m]
    99128    REAL(dp), POINTER     ::  hhl(:,:,:)    !< heights of half layers (cell faces) above sea level in COSMO-DE, read in from
    100129    REAL(dp), POINTER     ::  hfl(:,:,:)    !< heights of full layers (cell centres) above sea level in COSMO-DE, computed as arithmetic average of hhl
     
    115144    REAL(dp), ALLOCATABLE ::  w_horiz(:,:,:)   !< weights for bilinear horizontal interpolation
    116145    REAL(dp), ALLOCATABLE ::  w_verti(:,:,:,:) !< weights for linear vertical interpolation
     146    REAL(dp), ALLOCATABLE ::  w(:,:,:)      !< vertical interpolation weights, w(<source_column>, <PALM k level>, <neighbour index>) [-]
    117147 END TYPE grid_definition
    118148
     
    150180    CHARACTER(LEN=SNAME)                  ::  task                      !< Processing task that generates this variable, e.g. 'interpolate_2d' or 'average profile'
    151181    LOGICAL                               ::  to_be_processed = .FALSE. !< INIFOR flag indicating whether variable shall be processed
     182    LOGICAL                               ::  is_internal = .FALSE.     !< INIFOR flag indicating whether variable shall be written to netCDF file (.FALSE.) or kept for later (.TRUE.)
    152183    LOGICAL                               ::  is_read = .FALSE.         !< INIFOR flag indicating whether variable has been read
    153     LOGICAL                               ::  is_upside_down  = .FALSE. !< INIFOR flag indicating whether variable shall be processed
     184    LOGICAL                               ::  is_upside_down  = .FALSE. !< INIFOR flag indicating whether vertical dimension is reversed (typically the case with COSMO-DE atmospheric fields)
    154185    TYPE(grid_definition), POINTER        ::  grid                      !< Pointer to the corresponding output grid
    155186    TYPE(grid_definition), POINTER        ::  intermediate_grid         !< Pointer to the corresponding intermediate grid
     187    TYPE(grid_definition), POINTER        ::  averaging_grid         !< Pointer to the corresponding intermediate grid
    156188 END TYPE nc_var
    157189
     
    159191 TYPE io_group                                          !< Input/Output group, groups together output variabels that share their input variables. For instance, all boundary surfaces and initialization fields of the potential temperature are base on T and p.
    160192    INTEGER                          ::  nt             !< maximum number of output time steps across all output variables
    161     INTEGER                          ::  nv             !< number of output variables
     193    INTEGER                          ::  nv             !< number of netCDF output variables
     194    INTEGER                          ::  n_inputs       !< number of input variables
     195    INTEGER                          ::  n_output_quantities !< number of physical quantities required for computing netCDF output variables
    162196    CHARACTER(LEN=SNAME)             ::  kind           !< kind of I/O group
    163197    CHARACTER(LEN=PATH), ALLOCATABLE ::  in_files(:)    !< list of nt input files
Note: See TracChangeset for help on using the changeset viewer.