Changeset 2576 for palm/trunk


Ignore:
Timestamp:
Oct 24, 2017 1:49:46 PM (7 years ago)
Author:
Giersch
Message:

Bugfixes for restart runs

Location:
palm/trunk/SOURCE
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r2563 r2576  
    2525# -----------------
    2626# $Id$
     27# virtual_flight_mod.o, synthetic_turbulence_generator_mod.o and
     28# wind_turbine_model_mod.o were added to read_var_list.o
     29#
     30# 2563 2017-10-19 15:36:10Z Giersch
    2731# wind_turbine_model_mod.o and synthetic_turbulence_generator_mod.o were added to
    2832# write_var_list.o and virtual_flight_mod.o was deleted from read_var_list.o 
     
    630634   spectra_mod.o surface_mod.o urban_surface_mod.o
    631635read_var_list.o: modules.o mod_kinds.o model_1d_mod.o netcdf_interface_mod.o plant_canopy_model_mod.o \
    632    spectra_mod.o microphysics_mod.o urban_surface_mod.o vertical_nesting_mod.o
     636   spectra_mod.o microphysics_mod.o urban_surface_mod.o vertical_nesting_mod.o wind_turbine_model_mod.o \
     637   virtual_flight_mod.o synthetic_turbulence_generator_mod.o
    633638run_control.o: modules.o cpulog_mod.o mod_kinds.o
    634639set_slicer_attributes_dvrp.o: modules.o mod_kinds.o
  • palm/trunk/SOURCE/read_var_list.f90

    r2575 r2576  
    2525! -----------------
    2626! $Id$
     27! *** end *** marks the end of the standard parameter list of restart files
     28! like it was before revision 2563. To skip also the variables of the modules 
     29! wind_turbine_model_mod, flight_mod and synthetic_turbulence_generator_mod
     30! three new functions has to be defined which are called in skip_var_list.
     31! Adapted binary version number
     32!
     33! 2575 2017-10-24 09:57:58Z maronga
    2734! Renamed phi -> latitude, added longitude
    2835!
     
    276283!-- Make version number check first
    277284    READ ( 13 )  version_on_file
    278     binary_version = '4.3'
     285    binary_version = '4.4'
    279286    IF ( TRIM( version_on_file ) /= TRIM( binary_version ) )  THEN
    280287       WRITE( message_string, * ) 'version mismatch concerning control ', &
     
    353360!--          increased. The same changes must also be done in write_var_list.
    354361    READ ( 13 )  variable_chr
    355     DO  WHILE ( TRIM( variable_chr ) /= '*** end default ***' )
     362    DO  WHILE ( TRIM( variable_chr ) /= '*** end ***' )
    356363
    357364       SELECT CASE ( TRIM( variable_chr ) )
     
    987994    READ ( 13 )  variable_chr
    988995
    989     DO  WHILE ( TRIM( variable_chr ) /= '*** end default ***' )
     996    DO  WHILE ( TRIM( variable_chr ) /= '*** end ***' )
    990997
    991998       SELECT CASE ( TRIM( variable_chr ) )
     
    10751082 SUBROUTINE skip_var_list
    10761083
     1084    USE control_parameters,                                                    &
     1085        ONLY: wind_turbine, virtual_flight, synthetic_turbulence_generator
     1086
     1087    USE wind_turbine_model_mod,                                                &
     1088        ONLY: wtm_skip_var_list
     1089
     1090    USE flight_mod,                                                            &
     1091        ONLY: flight_skip_var_list
     1092
     1093    USE synthetic_turbulence_generator_mod,                                    &
     1094        ONLY: stg_skip_var_list
     1095
    10771096
    10781097    IMPLICIT NONE
     
    10951114    ENDDO
    10961115
     1116!
     1117!-- In case of virtual flights, skip also variables related to
     1118!-- this module.
     1119    IF ( wind_turbine )  CALL wtm_skip_var_list
     1120
     1121!
     1122!-- In case of virtual flights, skip also variables related to
     1123!-- this module.
     1124    IF ( virtual_flight )  CALL flight_skip_var_list
     1125
     1126!
     1127!-- In case of virtual flights, skip also variables related to
     1128!-- this module.
     1129    IF ( synthetic_turbulence_generator )  CALL stg_skip_var_list
     1130
    10971131
    10981132 END SUBROUTINE skip_var_list
  • palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90

    r2563 r2576  
    2525! -----------------
    2626! $Id$
     27! Definition of a new function called stg_skip_var_list to skip module
     28! parameters during reading restart data
     29!
     30! 2563 2017-10-19 15:36:10Z Giersch
    2731! stg_read_restart_data is called in stg_parin in the case of a restart run
    2832!
     
    179183
    180184!
     185!-- Skipping of parameters for restart runs
     186    INTERFACE stg_skip_var_list
     187       MODULE PROCEDURE stg_skip_var_list
     188    END INTERFACE stg_skip_var_list
     189
     190!
    181191!-- Reading of parameters for restart runs
    182192    INTERFACE stg_read_restart_data
     
    197207!-- Public interfaces
    198208    PUBLIC  stg_check_parameters, stg_header, stg_init, stg_main, stg_parin,   &
    199             stg_write_restart_data
     209            stg_write_restart_data, stg_skip_var_list
    200210
    201211!
     
    670680
    671681 END SUBROUTINE stg_parin
     682
     683
     684!------------------------------------------------------------------------------!
     685! Description:
     686! ------------
     687!> Skipping the stg variables from restart-file (binary format).
     688!------------------------------------------------------------------------------!
     689   SUBROUTINE stg_skip_var_list
     690       
     691      IMPLICIT NONE
     692           
     693      CHARACTER (LEN=1)  ::  cdum
     694      CHARACTER (LEN=30) ::  variable_chr
     695           
     696      READ ( 13 )  variable_chr
     697
     698      DO  WHILE ( TRIM( variable_chr ) /= '*** end stg module ***' )
     699
     700         READ ( 13 )  cdum
     701         READ ( 13 )  variable_chr
     702
     703      ENDDO   
     704           
     705   END SUBROUTINE stg_skip_var_list
    672706
    673707
  • palm/trunk/SOURCE/virtual_flight_mod.f90

    r2563 r2576  
    2525! -----------------
    2626! $Id$
     27! Definition of a new function called flight_skip_var_list to skip module
     28! parameters during reading restart data
     29!
     30! 2563 2017-10-19 15:36:10Z Giersch
    2731! flight_read_restart_data is called in flight_parin in the case of a restart
    2832! run. flight_skip_var_list is not necessary anymore due to marker changes in
     
    119123       MODULE PROCEDURE flight_measurement
    120124    END INTERFACE flight_measurement
     125
     126    INTERFACE flight_skip_var_list
     127       MODULE PROCEDURE flight_skip_var_list
     128    END INTERFACE flight_skip_var_list
    121129   
    122130    INTERFACE flight_read_restart_data
     
    134142!-- Public interfaces
    135143    PUBLIC flight_init, flight_header, flight_parin, flight_measurement,       &
    136            flight_write_restart_data                   
     144           flight_write_restart_data, flight_skip_var_list                   
    137145!
    138146!-- Public variables
     
    860868
    861869    END SUBROUTINE flight_check_parameters
     870
     871!------------------------------------------------------------------------------!
     872! Description:
     873! ------------
     874!> Skipping the flight-module variables from restart-file (binary format).
     875!------------------------------------------------------------------------------!
     876   SUBROUTINE flight_skip_var_list
     877       
     878      IMPLICIT NONE
     879           
     880      CHARACTER (LEN=1)  ::  cdum
     881      CHARACTER (LEN=30) ::  variable_chr
     882           
     883      READ ( 13 )  variable_chr
     884
     885      DO  WHILE ( TRIM( variable_chr ) /= '*** end flight ***' )
     886
     887         READ ( 13 )  cdum
     888         READ ( 13 )  variable_chr
     889
     890      ENDDO   
     891           
     892   END SUBROUTINE flight_skip_var_list
     893       
    862894   
    863895!------------------------------------------------------------------------------!
  • palm/trunk/SOURCE/wind_turbine_model_mod.f90

    r2563 r2576  
    2626! -----------------
    2727! $Id$
     28! Definition of a new function called wtm_skip_var_list to skip module
     29! parameters during reading restart data
     30!
     31! 2563 2017-10-19 15:36:10Z Giersch
    2832! Restart runs with wind turbine model are possible now. For this purpose, two
    2933! new subroutines wtm_write_restart_data and wtm_read_restart_data had to be
     
    377381    END INTERFACE wtm_parin
    378382
     383    INTERFACE wtm_skip_var_list
     384       MODULE PROCEDURE wtm_skip_var_list
     385    END INTERFACE wtm_skip_var_list
     386
    379387    INTERFACE wtm_write_restart_data
    380388       MODULE PROCEDURE wtm_write_restart_data
     
    425433   
    426434    PUBLIC wtm_check_parameters, wtm_forces, wtm_init, wtm_init_arrays,        &
    427            wtm_parin, wtm_write_restart_data, wtm_tendencies
     435           wtm_parin, wtm_write_restart_data, wtm_tendencies, wtm_skip_var_list
    428436
    429437
     
    491499
    492500    END SUBROUTINE wtm_parin
     501
     502
     503!------------------------------------------------------------------------------!
     504! Description:
     505! ------------
     506!> Skipping the wind turbine module variables from restart-file (binary format).
     507!------------------------------------------------------------------------------!
     508   SUBROUTINE wtm_skip_var_list
     509       
     510      IMPLICIT NONE
     511           
     512      CHARACTER (LEN=1)  ::  cdum
     513      CHARACTER (LEN=30) ::  variable_chr
     514           
     515      READ ( 13 )  variable_chr
     516
     517      DO  WHILE ( TRIM( variable_chr ) /= '*** end wtm ***' )
     518
     519         READ ( 13 )  cdum
     520         READ ( 13 )  variable_chr
     521
     522      ENDDO   
     523           
     524   END SUBROUTINE wtm_skip_var_list
    493525
    494526
     
    550582          CASE ( 'omega_gen_f' )
    551583             READ ( 13 )  omega_gen_f
     584          CASE ( 'omega_gen_f_old' )
     585             READ ( 13 )  omega_gen_f_old
    552586          CASE ( 'omega_gen_old' )
    553587             READ ( 13 )  omega_gen_old
    554           CASE ( 'omega_gen_f_old' )
    555              READ ( 13 )  omega_gen_f_old
    556588          CASE ( 'omega_rot' )
    557589             READ ( 13 )  omega_rot
     
    568600
    569601       END SELECT
    570 
     602       
    571603       READ ( 13 )  variable_chr
    572604
  • palm/trunk/SOURCE/write_var_list.f90

    r2575 r2576  
    2525! -----------------
    2626! $Id$
     27! The end of the standard parameter list is again marked with *** end *** like
     28! it was before revision 2563
     29!
     30! 2575 2017-10-24 09:57:58Z maronga
    2731! Renamed phi -> latitude, added longitude
    2832!
     
    756760!
    757761!-- Set the end-of-file mark for default parameter
    758     WRITE ( 14 )  '*** end default ***           '
     762    WRITE ( 14 )  '*** end ***                   '
    759763
    760764!
     
    770774    IF ( synthetic_turbulence_generator )  CALL stg_write_restart_data
    771775
    772 !
    773 !-- Set the end-of-file mark for default parameter
    774     WRITE ( 14 )  '*** end ***                   '
    775 
    776776
    777777 END SUBROUTINE write_var_list
Note: See TracChangeset for help on using the changeset viewer.