Changeset 4074 for palm/trunk/UTIL


Ignore:
Timestamp:
Jul 5, 2019 1:05:19 PM (5 years ago)
Author:
eckhard
Message:

inifor: Changed initialization mode from 'volume' to 'profile'

Location:
palm/trunk/UTIL/inifor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/inifor/Makefile

    r3785 r4074  
    5757PROJECT = inifor
    5858PROJECT_PATH = .
    59 BIN_PATH  = $(PROJECT_PATH)/../../SCRIPTS
     59BIN_PATH  = $(PROJECT_PATH)/bin
    6060SRC_PATH  = $(PROJECT_PATH)/src
    6161TEST_PATH = $(PROJECT_PATH)/tests
  • palm/trunk/UTIL/inifor/src/inifor_defs.f90

    r4019 r4074  
    2626! -----------------
    2727! $Id$
     28! Bumped version number
     29!
     30!
     31! 4019 2019-06-06 14:00:35Z eckhard
    2832! Bumped version number
    2933!
     
    180184    ACHAR( 10 ) // ' Copyright 2017-2019 Deutscher Wetterdienst Offenbach' !< Copyright notice
    181185 CHARACTER(LEN=*), PARAMETER ::  LOG_FILE_NAME = 'inifor.log' !< Name of INIFOR's log file
    182  CHARACTER(LEN=*), PARAMETER ::  VERSION = '1.4.10'           !< INIFOR version number
     186 CHARACTER(LEN=*), PARAMETER ::  VERSION = '1.4.11'           !< INIFOR version number
    183187 
    184188 END MODULE inifor_defs
  • palm/trunk/UTIL/inifor/src/inifor_grid.f90

    r4019 r4074  
    2626! -----------------
    2727! $Id$
     28! Changed default initialization mode from 'volume' to 'profile'
     29! Pass hhl_file to cosmo_grid() instead of entire INIFOR configuration
     30!
     31!
     32! 4019 2019-06-06 14:00:35Z eckhard
    2833! bugfix: Replaced z_top array literal with array, fixes wrong z_top height with gfortran -O2/-O3
    2934!
     
    386391
    387392!
    388 !-- Defaultmain centre (_c) of the PALM-4U grid in the geographical system (_g)
     393!-- Default coordinates of the PALM origin in the geographical reference system
    389394    origin_lat = 52.325079_wp * TO_RADIANS ! south-west of Berlin, origin used for the Dec 2017 showcase simulation
    390395    origin_lon = 13.082744_wp * TO_RADIANS
     
    433438    cfg%static_driver_file = ''
    434439    cfg%output_file = './palm-4u-input.nc'
    435     cfg%ic_mode = 'volume'
     440    cfg%ic_mode = 'profile'
    436441    cfg%bc_mode = 'real'
    437442    cfg%averaging_mode = 'level'
     
    584589    CALL log_runtime('time', 'read')
    585590
    586     CALL get_cosmo_grid( cfg, soil_files(1), rlon, rlat, hhl, hfl, depths,  &
    587                          d_depth, d_depth_rho_inv, phi_n, lambda_n,         &
    588                          phi_equat,                                         &
    589                          lonmin_cosmo, lonmax_cosmo,                        &
    590                          latmin_cosmo, latmax_cosmo,                        &
     591    CALL get_cosmo_grid( cfg % hhl_file, soil_files(1), rlon, rlat, hhl, hfl,  &
     592                         depths, d_depth, d_depth_rho_inv, phi_n, lambda_n,    &
     593                         phi_equat,                                            &
     594                         lonmin_cosmo, lonmax_cosmo,                           &
     595                         latmin_cosmo, latmax_cosmo,                           &
    591596                         nlon, nlat, nlev, ndepths )
    592597
  • palm/trunk/UTIL/inifor/src/inifor_io.f90

    r3997 r4074  
    2626! -----------------
    2727! $Id$
     28! Pass hhl_file directly instead of entire INIFOR configuration
     29!
     30!
     31! 3997 2019-05-23 12:35:57Z eckhard
    2832! Added boolean indicator for --elevation option invocation
    2933! Stop INIFOR if no command-line options given
     
    759763
    760764
    761  SUBROUTINE get_cosmo_grid( cfg, soil_file, rlon, rlat, hhl, hfl, depths, &
     765 SUBROUTINE get_cosmo_grid( hhl_file, soil_file, rlon, rlat, hhl, hfl, depths, &
    762766                            d_depth, d_depth_rho_inv, phi_n, lambda_n,       &
    763767                            phi_equat,                                       &
     
    766770                            nlon, nlat, nlev, ndepths )
    767771
    768     TYPE(inifor_config), INTENT(IN)                      ::  cfg
    769     CHARACTER(LEN=PATH), INTENT(IN)                      ::  soil_file !< list of soil input files (temperature, moisture, <prefix>YYYYMMDDHH-soil.nc)
     772    CHARACTER(LEN=PATH), INTENT(IN)                      ::  hhl_file  !< path to file containing the HHL variable (height of half layers)
     773    CHARACTER(LEN=PATH), INTENT(IN)                      ::  soil_file !< path to one of the soil input files for reading soil layer depths
    770774    REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(OUT)     ::  rlon      !< longitudes of COSMO-DE's rotated-pole grid
    771775    REAL(wp), DIMENSION(:), ALLOCATABLE, INTENT(OUT)     ::  rlat      !< latitudes of COSMO-DE's rotated-pole grid
     
    790794!-- Read in COSMO's heights of half layers (vertical cell faces)
    791795    cosmo_var%name = NC_HHL_NAME
    792     CALL get_netcdf_variable( cfg%hhl_file, cosmo_var, hhl )
    793     CALL get_netcdf_dim_vector( cfg%hhl_file, NC_RLON_NAME, rlon )
    794     CALL get_netcdf_dim_vector( cfg%hhl_file, NC_RLAT_NAME, rlat )
     796    CALL get_netcdf_variable( hhl_file, cosmo_var, hhl )
     797    CALL get_netcdf_dim_vector( hhl_file, NC_RLON_NAME, rlon )
     798    CALL get_netcdf_dim_vector( hhl_file, NC_RLAT_NAME, rlat )
    795799    CALL get_netcdf_dim_vector( soil_file, NC_DEPTH_NAME, depths)
    796800    CALL log_runtime( 'time', 'read' )
     
    820824!-- COSMO rotated pole coordinates
    821825    phi_n = TO_RADIANS                                                       &
    822           * get_netcdf_variable_attribute( cfg%hhl_file,                   &
     826          * get_netcdf_variable_attribute( hhl_file,                         &
    823827                                           NC_ROTATED_POLE_NAME,             &
    824828                                           NC_POLE_LATITUDE_NAME )
    825829
    826830    lambda_n = TO_RADIANS                                                    &
    827              * get_netcdf_variable_attribute( cfg%hhl_file,                &
     831             * get_netcdf_variable_attribute( hhl_file,                      &
    828832                                              NC_ROTATED_POLE_NAME,          &
    829833                                              NC_POLE_LONGITUDE_NAME )
Note: See TracChangeset for help on using the changeset viewer.