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

inifor: Removed surface forcing and internal arrays from netCDF output

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

Legend:

Unmodified
Added
Removed
  • 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.