Ignore:
Timestamp:
Feb 5, 2019 5:02:38 PM (6 years ago)
Author:
eckhard
Message:

inifor: bugfix: removed dependency on soilmoisture input files; added netcdf preprocessor flag

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

Legend:

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

    r3447 r3716  
    2525# -----------------
    2626# $Id$
     27# Added __netcdf preprocessor flag
     28#
     29#
     30# 3447 2018-10-29 15:52:54Z eckhard
    2731# Renamed source files for compatibilty with PALM build system
    2832#
     
    6468                  -Wline-truncation -fbacktrace -fcheck=all -pedantic \
    6569                  -ffpe-trap=invalid,zero,underflow,overflow
    66 FFLAGS  = -fdefault-real-8 -Og -g $(WRNGS) -cpp -D__netcdf4
     70FFLAGS  = -fdefault-real-8 -Og -g $(WRNGS) -cpp -D__netcdf4 -D__netcdf
    6771INCLUDE = -I/home/ekadasch/local/include
    6872LIBRARY = -L/home/ekadasch/local/lib64 -lnetcdff
  • palm/trunk/UTIL/inifor/Makefile.gnu

    r3447 r3716  
    2525# -----------------
    2626# $Id$
     27# Added __netcdf preprocessor flag
     28#
     29#
     30# 3447 2018-10-29 15:52:54Z eckhard
    2731# Renamed source files for compatibilty with PALM build system
    2832#
     
    6569                  -Wline-truncation -fbacktrace -fcheck=all -pedantic \
    6670                  -ffpe-trap=invalid,zero,underflow,overflow
    67 FFLAGS  = -fdefault-real-8 -Og -g $(WRNGS) -cpp -D__netcdf4
     71FFLAGS  = -fdefault-real-8 -Og -g $(WRNGS) -cpp -D__netcdf4 -D__netcdf
    6872INCLUDE = -I/home/ekadasch/local/include
    6973LIBRARY = -L/home/ekadasch/local/lib64 -lnetcdff
  • palm/trunk/UTIL/inifor/Makefile.ifort

    r3447 r3716  
    2525# -----------------
    2626# $Id$
     27# Added __netcdf preprocessor flag
     28#
     29#
     30# 3447 2018-10-29 15:52:54Z eckhard
    2731# Renamed source files for compatibilty with PALM build system
    2832#
     
    6266
    6367FC      = ifort
    64 FFLAGS  = -g -real-size 64 -no-wrap-margin -cpp -D__netcdf4
     68FFLAGS  = -g -real-size 64 -no-wrap-margin -cpp -D__netcdf4 -D__netcdf
    6569INCLUDE = -I/usr/local/pkg/netcdf/4.3.2/include
    6670LIBRARY = -L/usr/local/pkg/netcdf/4.3.2/lib -lnetcdff
  • palm/trunk/UTIL/inifor/src/inifor_defs.f90

    r3680 r3716  
    132132 INTEGER, PARAMETER          ::  FORCING_STEP = 1             !< Number of hours between forcing time steps [h]
    133133 REAL(dp), PARAMETER         ::  NUDGING_TAU = 21600.0_dp     !< Nudging relaxation time scale [s]
    134  CHARACTER(LEN=*), PARAMETER ::  VERSION = '1.4.4'            !< INIFOR version number
     134 CHARACTER(LEN=*), PARAMETER ::  VERSION = '1.4.5'            !< INIFOR version number
    135135 CHARACTER(LEN=*), PARAMETER ::  COPYRIGHT = 'Copyright 2017-2018 Leibniz Universitaet Hannover' // &
    136136     ACHAR( 10 ) // ' Copyright 2017-2018 Deutscher Wetterdienst Offenbach' !< Copyright notice
  • palm/trunk/UTIL/inifor/src/inifor_grid.f90

    r3680 r3716  
    2626! -----------------
    2727! $Id$
     28! Removed dependency on soilmoisture input files
     29!
     30!
     31! 3680 2019-01-18 14:54:12Z knoop
    2832! bugfix: Avoid empty averaging regions for small PALM domains
    2933! change: moved get_input_file_list() to io module
     
    471475       CALL get_input_file_list(                                               &
    472476          cfg % start_date, start_hour_soilmoisture, end_hour_soilmoisture, step_hour, &
    473           cfg % input_path, soilmoisture_prefix, soilmoisture_suffix, soil_moisture_files)
     477          cfg % input_path, soilmoisture_prefix, soilmoisture_suffix, soil_moisture_files, nocheck=.TRUE.)
    474478
    475479!
     
    21962200          kind = 'surface'                                                     &
    21972201       )
     2202       io_group_list(12) % to_be_processed = .FALSE.
    21982203!
    21992204!--    incoming diffusive sw flux
  • palm/trunk/UTIL/inifor/src/inifor_io.f90

    r3680 r3716  
    2626! -----------------
    2727! $Id$
     28! Removed dependency on soilmoisture input files
     29!
     30!
     31! 3680 2019-01-18 14:54:12Z knoop
    2832! Moved get_input_file_list() here from grid module, added check for presence of
    2933!    input files
     
    576580   SUBROUTINE get_input_file_list( start_date_string, start_hour, end_hour,    &
    577581                                   step_hour, input_path, prefix, suffix,      &
    578                                    file_list )
     582                                   file_list, nocheck )
    579583
    580584      CHARACTER (LEN=DATE), INTENT(IN) ::  start_date_string
     
    582586      INTEGER,              INTENT(IN) ::  start_hour, end_hour, step_hour
    583587      CHARACTER(LEN=*), ALLOCATABLE, INTENT(INOUT) ::  file_list(:)
     588      LOGICAL, OPTIONAL, INTENT(IN)    ::  nocheck
    584589
    585590      INTEGER             ::  number_of_intervals, hour, i
    586591      CHARACTER(LEN=DATE) ::  date_string
    587592      CHARACTER(LEN=PATH) ::  file_name
     593      LOGICAL             ::  check_files
    588594
    589595      CALL get_datetime_file_list( start_date_string, start_hour, end_hour,    &
     
    591597                                   file_list )
    592598
    593       tip = "Please check if you specified the correct file prefix " //        &
    594             "using the options --input-prefix, --flow-prefix, etc."
    595 
    596       DO i = 1, SIZE(file_list)
    597           CALL verify_file(file_list(i), 'input', tip)
    598       END DO
     599      check_files = .TRUE.
     600      IF ( PRESENT ( nocheck ) )  THEN
     601         IF ( nocheck )  check_files = .FALSE.
     602      END IF
     603
     604      IF ( check_files )  THEN
     605
     606         tip = "Please check if you specified the correct file prefix " //     &
     607               "using the options --input-prefix, --flow-prefix, etc."
     608
     609         DO i = 1, SIZE(file_list)
     610             CALL verify_file(file_list(i), 'input', tip)
     611         END DO
     612
     613      END IF
    599614
    600615   END SUBROUTINE get_input_file_list
  • palm/trunk/UTIL/inifor/src/inifor_transform.f90

    r3680 r3716  
    2626! -----------------
    2727! $Id$
     28! Include out-of-bounds error message in log
     29!
     30!
     31! 3680 2019-01-18 14:54:12Z knoop
    2832! Check if set of averaging columns is empty
    2933!
     
    777781          latpos = (palm_clat(i,j) - lat0) * cosmo_dyi
    778782
    779           IF (lonpos < 0.0 .OR. latpos < 0.0)  THEN
    780              PRINT *, " Error while finding neighbours: lonpos or latpos out of bounds!"
    781              PRINT *, "     (i,j) = (", i, ",",j,")"
    782              PRINT *, "      lonpos ", lonpos*TO_DEGREES, ", latpos ", latpos*TO_DEGREES
    783              PRINT *, "        lon0 ", lon0  *TO_DEGREES,   ", lat0   ", lat0*TO_DEGREES
    784              PRINT *, "    PALM lon ", palm_clon(i,j)*TO_DEGREES,   ", PALM lat ",palm_clat(i,j)*TO_DEGREES
    785              STOP
     783          IF (lonpos < 0.0_dp .OR. latpos < 0.0_dp)  THEN
     784             message = "lonpos or latpos out of bounds " //                    &
     785                "while finding interpolation neighbours!" // NEW_LINE(' ') //  &
     786                "          (i,j) = (" //                                       &
     787                TRIM(str(i)) // ", " // TRIM(str(j)) // ")" // NEW_LINE(' ') //&
     788                "          lonpos " // TRIM(real_to_str(lonpos*TO_DEGREES)) // &
     789                ", latpos " // TRIM(real_to_str(latpos*TO_DEGREES)) // NEW_LINE(' ') // &
     790                "          lon0 " // TRIM(real_to_str(lon0  *TO_DEGREES)) //   &
     791                ", lat0   " // TRIM(real_to_str(lat0*TO_DEGREES)) // NEW_LINE(' ') // &
     792                "          PALM lon " // TRIM(real_to_str(palm_clon(i,j)*TO_DEGREES)) // &
     793                ", PALM lat " // TRIM(real_to_str(palm_clat(i,j)*TO_DEGREES))
     794             CALL inifor_abort('find_horizontal_neighbours', message)
    786795          END IF
    787796
Note: See TracChangeset for help on using the changeset viewer.