Ignore:
Timestamp:
Jan 26, 2019 6:57:21 PM (5 years ago)
Author:
knoop
Message:

Added module switch for user_module.
User module is enabled as soon as the user_parameters namelist is found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/module_interface.f90

    r3700 r3701  
    270270
    271271   USE user,                                                                   &
    272        ONLY:  user_parin,                                                      &
     272       ONLY:  user_module_enabled,                                             &
     273              user_parin,                                                      &
    273274              user_check_parameters,                                           &
    274275              user_check_data_output_ts,                                       &
     
    479480   IF ( urban_surface )        CALL usm_check_parameters
    480481   IF ( wind_turbine )         CALL wtm_check_parameters
    481                                CALL user_check_parameters
     482   IF ( user_module_enabled )  CALL user_check_parameters
    482483
    483484
     
    503504   ENDIF
    504505
    505    CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit )
     506   IF ( user_module_enabled )  THEN
     507      CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit )
     508   ENDIF
    506509
    507510
     
    551554   ENDIF
    552555
    553    IF ( unit == 'illegal' )  THEN
     556   IF ( unit == 'illegal'  .AND.  user_module_enabled )  THEN
    554557      unit = '' ! ToDo: Seems like a hack. Find a general soultion!
    555558      CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit )
     
    618621   ENDIF
    619622
    620    IF ( unit == 'illegal' )  THEN
     623   IF ( unit == 'illegal'  .AND.  user_module_enabled )  THEN
    621624      unit = ''
    622625      CALL user_check_data_output( variable, unit )
     
    652655   ENDIF
    653656
    654    IF ( unit == 'illegal' )  THEN
     657   IF ( unit == 'illegal'  .AND.  user_module_enabled )  THEN
    655658      unit = ''
    656659      CALL user_check_data_output( variable, unit )
     
    732735   IF ( wind_turbine        )  CALL wtm_init
    733736   IF ( radiation           )  CALL radiation_init
    734                                CALL user_init
     737   IF ( user_module_enabled )  CALL user_init
    735738
    736739
     
    763766   IF ( calculate_spectra   )  CALL spectra_header( io )
    764767   IF ( syn_turb_gen        )  CALL stg_header( io )
    765 
    766    CALL user_header( io ) ! ToDo: make user module switch
     768   IF ( user_module_enabled )  CALL user_header( io )
    767769
    768770
     
    782784
    783785   IF ( gust_module_enabled )  CALL gust_actions( location )
    784 
    785    CALL user_actions( location ) ! ToDo: make user module switch
     786   IF ( user_module_enabled )  CALL user_actions( location )
    786787
    787788
     
    803804
    804805   IF ( gust_module_enabled )  CALL gust_actions( i, j, location )
    805 
    806    CALL user_actions( i, j, location ) ! ToDo: make user module switch
     806   IF ( user_module_enabled )  CALL user_actions( i, j, location )
    807807
    808808
     
    853853   IF ( salsa               )  CALL salsa_3d_data_averaging( mode, variable )
    854854   IF ( urban_surface       )  CALL usm_3d_data_averaging( mode, variable )
    855 
    856    CALL user_3d_data_averaging( mode, variable ) ! ToDo: make user module switch
     855   IF ( user_module_enabled )  CALL user_3d_data_averaging( mode, variable )
    857856
    858857
     
    930929   ENDIF
    931930
    932    IF ( .NOT. found )  THEN  ! ToDo: make user module switch
     931   IF ( .NOT. found  .AND.  user_module_enabled )  THEN
    933932      CALL user_data_output_2d(                                                &
    934933              av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do       &
     
    1000999   ENDIF
    10011000
    1002    IF ( .NOT. found )  THEN  ! ToDo: make user module switch
     1001   IF ( .NOT. found  .AND.  user_module_enabled )  THEN
    10031002      CALL user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do )
    10041003      resorted = .TRUE.
     
    10241023   IF ( gust_module_enabled )  CALL gust_statistics( mode, sr, tn, dots_max )
    10251024   IF ( air_chemistry       )  CALL chem_statistics( mode, sr, tn )
    1026 
    1027    CALL user_statistics( mode, sr, tn ) ! ToDo: make user module switch
     1025   IF ( user_module_enabled )  CALL user_statistics( mode, sr, tn )
    10281026
    10291027
     
    10491047   IF ( .NOT. found )  CALL stg_rrd_global ( found ) ! ToDo: change interface to pass variable
    10501048   IF ( .NOT. found )  CALL wtm_rrd_global( found ) ! ToDo: change interface to pass variable
    1051 
    10521049   IF ( .NOT. found )  CALL user_rrd_global( found ) ! ToDo: change interface to pass variable
    10531050
     
    10711068   IF ( syn_turb_gen )         CALL stg_wrd_global
    10721069   IF ( wind_turbine )         CALL wtm_wrd_global
    1073 
    1074    CALL user_wrd_global ! ToDo: make user module switch
     1070   IF ( user_module_enabled )  CALL user_wrd_global
    10751071
    10761072
     
    12181214   IF ( salsa )                CALL salsa_wrd_local
    12191215   IF ( urban_surface )        CALL usm_wrd_local
    1220 
    1221    CALL user_wrd_local ! ToDo: make user module switch
     1216   IF ( user_module_enabled )  CALL user_wrd_local
    12221217
    12231218
     
    12331228
    12341229
    1235    CALL user_last_actions ! ToDo: make user module switch
     1230   IF ( user_module_enabled )  CALL user_last_actions
    12361231
    12371232
Note: See TracChangeset for help on using the changeset viewer.