Changeset 3456


Ignore:
Timestamp:
Oct 30, 2018 2:29:54 PM (6 years ago)
Author:
eckhard
Message:

inifor: Removed surface forcing and internal arrays from netCDF output

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

Legend:

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

    r3395 r3456  
    1 # INIFOR - Mesoscale Interface for Initializing and Forcing PALM-4U (v1.4.0)
     1# INIFOR - Mesoscale Interface for Initializing and Forcing PALM-4U (v1.4.1)
    22
    33INIFOR provides the meteorological fields required to initialize and drive the
     
    6464
    6565
    66 ### AVAILABLE NAMELIST PARAMETERS
     66### NAMELIST PARAMETERS
    6767
    6868INIFOR mirrors a subset of the PALM-4U's Fortran namelists `inipar` and `d3par`
     
    103103
    104104
    105 ### AVAILABLE COMMAND-LINE PARAMETERS
     105### COMMAND-LINE PARAMETERS
     106
     107#### INIFOR configuration
     108
    106109    --averaging-mode <mode>:
    107110        Selects how averaged quantities (large-scale forcing terms) are computed.
     
    114117
    115118    -d, --date, -date <date>:
    116         Start date of the simulation in the form YYYYMMDD of YYYYMMDDHH. If no
     119        Start date of the simulation in the form YYYYMMDD or YYYYMMDDHH. If no
    117120        hours (HH) are given, INIFOR assumes that the simulation starts at O UTC
    118121        on that day. Default: 20130721
     
    122125        as either profiles or three-dimensional fields. The corresponding modes
    123126        are 'profile' and 'volume'. Default: volume
     127
     128    -r, --surface-pressure, -p0 <pressure>:
     129        Manually set the pressure at z=0 in the PALM-4U domain [Pa]. If not
     130        given, the surface pressure is computed from the COSMO pressure field.
     131
     132    -u, --geostrophic-u, -ug <velocity>:
     133        Manually specify the geostrophic wind in x direction [m/s]. If not
     134        given, the geostrophic wind is computed from the COSMO pressure field.
     135
     136    -v, --geostrophic-v, -vg <velocity>:
     137        Manually specify the geostrophic wind in y direction [m/s]. If not
     138        given, the geostrophic wind is computed from the COSMO pressure field.
     139
     140    -z, --elevation, -z0 <height>: Specifies the elevation of the PALM-4U domain
     141        above sea level [m]. Default: 35
     142
     143#### I/O
    124144
    125145    -l, --hhl-file, -hhl <netCDF file>:
     
    140160        Scenario path, i.e. the path of the meteorological input data. Default: ./
    141161
    142     -r, --surface-pressure, -p0 <pressure>:
    143         Manually set the pressure at z=0 in the PALM-4U domain [Pa]. If not
    144         given, the surface pressure is computed from the COSMO pressure field.
    145 
    146162    -s, --soil-file, -soil <netCDF file>:
    147163        Location of the netCDF file containing the COSMO soil type map.
     
    152168        to be simulated with PALM-4U. Optional parameter. Default: None
    153169
    154     -u, --geostrophic-u, -ug <velocity>:
    155         Manually specify the geostrophic wind in x direction [m/s]. If not
    156         given, the geostrophic wind is computed from the COSMO pressure field.
    157 
    158     -v, --geostrophic-v, -vg <velocity>:
    159         Manually specify the geostrophic wind in y direction [m/s]. If not
    160         given, the geostrophic wind is computed from the COSMO pressure field.
    161 
    162     -z, --elevation, -z0 <height>: Specifies the elevation of the PALM-4U domain
    163         above sea level [m]. Default: 35
    164170
    165171
    166 #### ADDITIONAL COMMAND-LINE OPTIONS
     172#### FILE PREFIXES
    167173
    168174    --input-prefix <prefix>:
     
    182188        Set the file prefix of soil moisture input files. Default: laf
    183189
     190#### Non-parameter options
     191
    184192    --debug:
    185         Enable debugging messages.
     193        Enable additional terminal messages and netCDF output for debugging.
    186194
    187195    --version:
  • palm/trunk/UTIL/inifor/src/inifor.f90

    r3401 r3456  
    2626! -----------------
    2727! $Id$
     28! NetCDf output of internal arrays only with --debug option
     29!
     30!
     31! 3401 2018-10-23 09:33:31Z eckhard
    2832! Re-compute geostrophic winds every time step
    2933!
     
    125129
    126130    ! Add the output variables to the netCDF output file
    127     CALL setup_netcdf_variables(output_file % name, output_var_table)
     131    CALL setup_netcdf_variables(output_file % name, output_var_table,          &
     132                                cfg % debug)
    128133
    129134    CALL setup_io_groups()
     
    424429                      message = "Writing variable '" // TRIM(output_var%name) // "'."
    425430                      CALL report('main loop', message)
    426                       CALL update_output(output_var, output_arr, iter, output_file)
     431                      CALL update_output(output_var, output_arr, iter,         &
     432                                         output_file, cfg)
    427433 CALL run_control('time', 'write')
    428434                   END IF
  • palm/trunk/UTIL/inifor/src/inifor_defs.f90

    r3447 r3456  
    2626! -----------------
    2727! $Id$
     28! Bumped version number
     29!
     30!
     31! 3447 2018-10-29 15:52:54Z eckhard
    2832! Renamed source files for compatibilty with PALM build system
    2933!
     
    9498 INTEGER, PARAMETER          ::  FORCING_STEP = 1             !< Number of hours between forcing time steps [h]
    9599 REAL(dp), PARAMETER         ::  NUDGING_TAU = 21600.0_dp     !< Nudging relaxation time scale [s]
    96  CHARACTER(LEN=*), PARAMETER ::  VERSION = '1.4.0'            !< INIFOR version number
     100 CHARACTER(LEN=*), PARAMETER ::  VERSION = '1.4.1'            !< INIFOR version number
    97101 CHARACTER(LEN=*), PARAMETER ::  COPYRIGHT = 'Copyright 2017-2018 Leibniz Universitaet Hannover' // &
    98102     NEW_LINE(' ') // ' Copyright 2017-2018 Deutscher Wetterdienst Offenbach' !< Copyright notice
  • palm/trunk/UTIL/inifor/src/inifor_grid.f90

    r3447 r3456  
    2626! -----------------
    2727! $Id$
     28! Remove surface forcing from netCDF output (radiation + precipitation)
     29! NetCDf output of internal arrays only with --debug option
     30!
     31!
     32! 3447 2018-10-29 15:52:54Z eckhard
    2833! Renamed source files for compatibilty with PALM build system
    2934!
     
    185190    LOGICAL ::  ls_forcing_variables_required
    186191    LOGICAL ::  profile_grids_required
     192    LOGICAL ::  surface_forcing_required
    187193
    188194    TYPE(nc_var), ALLOCATABLE, TARGET ::  input_var_table(:)  !< table of input variables
     
    371377       boundary_variables_required = TRIM( cfg % bc_mode ) == 'real'
    372378       ls_forcing_variables_required = TRIM( cfg % bc_mode ) == 'ideal'
     379       surface_forcing_required = .FALSE.
    373380
    374381       IF ( ls_forcing_variables_required )  THEN
     
    32703277          var % dimvarids(3)    = output_file % dimvarid_time
    32713278          var % dimvarids(1:2)  = output_file % dimvarids_soil(1:2)
    3272           var % to_be_processed = boundary_variables_required
     3279          var % to_be_processed = surface_forcing_required
    32733280          var % is_internal     = .FALSE.
    32743281          var % task            = "interpolate_2d"
  • palm/trunk/UTIL/inifor/src/inifor_io.f90

    r3447 r3456  
    2626! -----------------
    2727! $Id$
     28! NetCDf output of internal arrays only with --debug option
     29!
     30!
     31! 3447 2018-10-29 15:52:54Z eckhard
    2832! Removed INCLUDE statement for get_netcdf_variable()
    2933! Renamed source files for compatibilty with PALM build system
     
    711715
    712716
    713     SUBROUTINE setup_netcdf_variables(filename, output_variable_table)
     717    SUBROUTINE setup_netcdf_variables(filename, output_variable_table, debug)
    714718
    715719       CHARACTER (LEN=*), INTENT(IN)        ::  filename
    716720       TYPE(nc_var), INTENT(INOUT), TARGET  ::  output_variable_table(:)
     721       LOGICAL, INTENT(IN)                  ::  debug
     722
    717723       TYPE(nc_var), POINTER                ::  var
    718724       INTEGER                              ::  i, ncid
     725       LOGICAL                              ::  to_be_written
    719726
    720727       message = "Defining variables in dynamic driver '" // TRIM(filename) // "'."
     
    728735          var => output_variable_table(i)
    729736
    730           IF ( var % to_be_processed )  THEN
     737          to_be_written = ( var % to_be_processed  .AND. .NOT. var % is_internal) .OR.                        &
     738                          ( var % is_internal  .AND.  debug )
     739
     740          IF ( to_be_written )  THEN
    731741             message = "  variable #" // TRIM(str(i)) // " '" // TRIM(var%name) // "'."
    732742             CALL report('setup_netcdf_variables', message)
     
    920930
    921931
    922     SUBROUTINE update_output(var, array, iter, output_file)
     932    SUBROUTINE update_output(var, array, iter, output_file, cfg)
    923933       TYPE(nc_var), INTENT(IN)  ::  var
    924934       REAL(dp), INTENT(IN)      ::  array(:,:,:)
    925935       INTEGER, INTENT(IN)       ::  iter
    926936       TYPE(nc_file), INTENT(IN) ::  output_file
     937       TYPE(inifor_config)       ::  cfg
    927938
    928939       INTEGER ::  ncid, ndim, start(4), count(4)
     
    10071018                                   start=start(1:ndim+1) ) )
    10081019
    1009        CASE ( 'constant scalar profile', 'geostrophic', 'internal profile' )
     1020       CASE ( 'constant scalar profile', 'geostrophic' )
    10101021
    10111022          CALL check(nf90_put_var( ncid, var%varid, array(1,1,:),              &
    10121023                                   start=start(1:ndim+1),                      &
    10131024                                   count=count(1:ndim) ) )
     1025
     1026       CASE ( 'internal profile' )
     1027
     1028          IF ( cfg % debug )  THEN
     1029             CALL check(nf90_put_var( ncid, var%varid, array(1,1,:),           &
     1030                                      start=start(1:ndim+1),                   &
     1031                                      count=count(1:ndim) ) )
     1032          END IF
    10141033
    10151034       CASE ( 'large-scale scalar forcing', 'large-scale w forcing' )
Note: See TracChangeset for help on using the changeset viewer.