Changeset 3875


Ignore:
Timestamp:
Apr 8, 2019 5:35:12 PM (5 years ago)
Author:
knoop
Message:

Implemented wtm_actions and moved respective module code into it

Location:
palm/trunk/SOURCE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r3874 r3875  
    17051705        vertical_nesting_mod.o \
    17061706        virtual_flight_mod.o \
    1707         virtual_measurement_mod.o \
    1708         wind_turbine_model_mod.o
     1707        virtual_measurement_mod.o
    17091708time_integration_spinup.o: \
    17101709        basic_constants_and_equations_mod.o \
  • palm/trunk/SOURCE/module_interface.f90

    r3874 r3875  
    361361               wtm_init_arrays,                                                &
    362362               wtm_init,                                                       &
     363               wtm_actions,                                                    &
    363364               wtm_rrd_global,                                                 &
    364365               wtm_wrd_global
     
    891892    IF ( ocean_mode          )  CALL ocean_actions( location )
    892893    IF ( salsa               )  CALL salsa_actions( location )
     894    IF ( wind_turbine        )  CALL wtm_actions( location )
    893895    IF ( user_module_enabled )  CALL user_actions( location )
    894896
     
    914916    IF ( ocean_mode          )  CALL ocean_actions( i, j, location )
    915917    IF ( salsa               )  CALL salsa_actions( i, j, location )
     918    IF ( wind_turbine        )  CALL wtm_actions( i, j, location )
    916919    IF ( user_module_enabled )  CALL user_actions( i, j, location )
    917920
  • palm/trunk/SOURCE/prognostic_equations.f90

    r3874 r3875  
    2525! -----------------
    2626! $Id$
     27! Moved wtm_tendencies to module_interface_actions
     28!
     29! 3874 2019-04-08 16:53:48Z knoop
    2730! Added non_transport_physics module interfaces and moved bcm code into it
    2831!
     
    475478        ONLY:  tcm_prognostic_equations
    476479
    477     USE wind_turbine_model_mod,                                                &
    478         ONLY:  wtm_tendencies
    479 
    480480    IMPLICIT NONE
    481481
     
    722722!--          Effect of Stokes drift (in ocean mode only)
    723723             IF ( stokes_force )  CALL stokes_drift_terms( i, j, 1 )
    724 
    725 !
    726 !--          Forces by wind turbines
    727              IF ( wind_turbine )  CALL wtm_tendencies( i, j, 1 )
    728724
    729725             CALL module_interface_actions( i, j, 'u-tendency' )
     
    806802             IF ( stokes_force )  CALL stokes_drift_terms( i, j, 2 )
    807803
    808 !
    809 !--          Forces by wind turbines
    810              IF ( wind_turbine )  CALL wtm_tendencies( i, j, 2 )
    811 
    812804             CALL module_interface_actions( i, j, 'v-tendency' )
    813805!
     
    885877          IF ( stokes_force )  CALL stokes_drift_terms( i, j, 3 )
    886878
    887 !
    888 !--       Forces by wind turbines
    889           IF ( wind_turbine )  CALL wtm_tendencies( i, j, 3 )
    890 
    891879          CALL module_interface_actions( i, j, 'w-tendency' )
    892880!
     
    13421330!-- Effect of Stokes drift (in ocean mode only)
    13431331    IF ( stokes_force )  CALL stokes_drift_terms( 1 )
    1344 
    1345 !
    1346 !-- Forces by wind turbines
    1347     IF ( wind_turbine )  CALL wtm_tendencies( 1 )
    13481332
    13491333    CALL module_interface_actions( 'u-tendency' )
     
    14501434    IF ( stokes_force )  CALL stokes_drift_terms( 2 )
    14511435
    1452 !
    1453 !-- Forces by wind turbines
    1454     IF ( wind_turbine )  CALL wtm_tendencies( 2 )
    1455 
    14561436    CALL module_interface_actions( 'v-tendency' )
    14571437
     
    15531533    IF ( stokes_force )  CALL stokes_drift_terms( 3 )
    15541534
    1555 !
    1556 !-- Forces by wind turbines
    1557     IF ( wind_turbine )  CALL wtm_tendencies( 3 )
    1558 
    15591535    CALL module_interface_actions( 'w-tendency' )
    15601536
  • palm/trunk/SOURCE/time_integration.f90

    r3872 r3875  
    2525! -----------------
    2626! $Id$
     27! Moved wtm_forces to module_interface_actions
     28!
     29! 3872 2019-04-08 15:03:06Z knoop
    2730! Modifications made for salsa:
    2831! - Call salsa_emission_update at each time step but do the checks within
     
    536539               turbulent_inflow, turbulent_outflow, urban_surface,                                 &
    537540               use_initial_profile_as_reference, use_single_reference_value, u_gtrans, v_gtrans,   &
    538                virtual_flight, virtual_measurement, wind_turbine, ws_scheme_mom, ws_scheme_sca
     541               virtual_flight, virtual_measurement, ws_scheme_mom, ws_scheme_sca
    539542
    540543    USE cpulog,                                                                                    &
     
    643646    USE virtual_measurement_mod,                                                                   &
    644647        ONLY:  vm_data_output, vm_sampling, vm_time_start
    645 
    646     USE wind_turbine_model_mod,                                                                    &
    647         ONLY:  wtm_forces
    648648
    649649
     
    894894!--    Execute alle other module actions routunes
    895895       CALL module_interface_actions( 'before_timestep' )
    896 
    897 !
    898 !--    Calculate forces by wind turbines
    899        IF ( wind_turbine )  CALL wtm_forces 
    900896       
    901897!
  • palm/trunk/SOURCE/wind_turbine_model_mod.f90

    r3832 r3875  
    2626! -----------------
    2727! $Id$
     28! Addaped wtm_tendency to fit the module actions interface
     29!
     30! 3832 2019-03-28 13:16:58Z raasch
    2831! instrumented with openmp directives
    2932!
     
    463466    END INTERFACE wtm_parin
    464467
    465     INTERFACE wtm_wrd_global
    466        MODULE PROCEDURE wtm_wrd_global
    467     END INTERFACE wtm_wrd_global
    468 
    469     INTERFACE wtm_rrd_global
    470        MODULE PROCEDURE wtm_rrd_global
    471     END INTERFACE wtm_rrd_global
    472    
    473468    INTERFACE wtm_check_parameters
    474469       MODULE PROCEDURE wtm_check_parameters
    475470    END INTERFACE wtm_check_parameters
    476        
     471
    477472    INTERFACE wtm_init_arrays
    478473       MODULE PROCEDURE wtm_init_arrays
     
    482477       MODULE PROCEDURE wtm_init
    483478    END INTERFACE wtm_init
    484    
    485     INTERFACE wtm_read_blade_tables
    486        MODULE PROCEDURE wtm_read_blade_tables
    487     END INTERFACE wtm_read_blade_tables
    488            
    489     INTERFACE wtm_forces
    490        MODULE PROCEDURE wtm_forces
    491     END INTERFACE wtm_forces
    492 
    493     INTERFACE wtm_yawcontrol
    494        MODULE PROCEDURE wtm_yawcontrol
    495     END INTERFACE wtm_yawcontrol
    496    
    497     INTERFACE wtm_rotate_rotor
    498        MODULE PROCEDURE wtm_rotate_rotor
    499     END INTERFACE wtm_rotate_rotor
    500    
    501     INTERFACE wtm_speed_control
    502        MODULE PROCEDURE wtm_init_speed_control
    503        MODULE PROCEDURE wtm_speed_control
    504     END INTERFACE wtm_speed_control
    505 
    506     INTERFACE wtm_tendencies
    507        MODULE PROCEDURE wtm_tendencies
    508        MODULE PROCEDURE wtm_tendencies_ij
    509     END INTERFACE wtm_tendencies
    510    
    511    
    512     PUBLIC wtm_check_parameters, wtm_forces, wtm_init, wtm_init_arrays,        &
    513            wtm_parin, wtm_wrd_global, wtm_rrd_global, wtm_tendencies
     479
     480    INTERFACE wtm_actions
     481       MODULE PROCEDURE wtm_actions
     482       MODULE PROCEDURE wtm_actions_ij
     483    END INTERFACE wtm_actions
     484
     485    INTERFACE wtm_rrd_global
     486       MODULE PROCEDURE wtm_rrd_global
     487    END INTERFACE wtm_rrd_global
     488
     489    INTERFACE wtm_wrd_global
     490       MODULE PROCEDURE wtm_wrd_global
     491    END INTERFACE wtm_wrd_global
     492
     493
     494    PUBLIC                                                                     &
     495           wtm_parin,                                                          &
     496           wtm_check_parameters,                                               &
     497           wtm_init_arrays,                                                    &
     498           wtm_init,                                                           &
     499           wtm_actions,                                                        &
     500           wtm_rrd_global,                                                     &
     501           wtm_wrd_global
    514502
    515503
     
    10851073       IF ( speed_control)  THEN
    10861074       
    1087           CALL wtm_speed_control
     1075          CALL wtm_init_speed_control
    10881076
    10891077          IF ( TRIM( initializing_actions ) == 'read_restart_data' ) THEN
     
    27712759!> Call for all grid points
    27722760!------------------------------------------------------------------------------!
    2773     SUBROUTINE wtm_tendencies( component )
    2774 
    2775    
    2776        IMPLICIT NONE
    2777 
    2778        INTEGER(iwp) ::  component   !< prognostic variable (u,v,w)
     2761    SUBROUTINE wtm_actions( location )
     2762
     2763
     2764       CHARACTER (LEN=*) ::  location !<
     2765
    27792766       INTEGER(iwp) ::  i           !< running index
    27802767       INTEGER(iwp) ::  j           !< running index
     
    27822769
    27832770
    2784        SELECT CASE ( component )
    2785 
    2786        CASE ( 1 )
     2771       SELECT CASE ( location )
     2772
     2773       CASE ( 'before_timestep' )
     2774
     2775          CALL wtm_forces
     2776
     2777       CASE ( 'u-tendency' )
    27872778!
    27882779!--       Apply the x-component of the force to the u-component of the flow:
     
    28072798          ENDIF
    28082799
    2809        CASE ( 2 )
     2800       CASE ( 'v-tendency' )
    28102801!
    28112802!--       Apply the y-component of the force to the v-component of the flow:
     
    28272818          ENDIF
    28282819
    2829        CASE ( 3 )
     2820       CASE ( 'w-tendency' )
    28302821!
    28312822!--       Apply the z-component of the force to the w-component of the flow:
     
    28452836       CASE DEFAULT
    28462837
    2847           WRITE( message_string, * ) 'unknown prognostic variable: ', component
    2848           CALL message( 'wtm_tendencies', 'PA04??', 1, 2, 0, 6, 0 )
     2838          WRITE( message_string, * ) 'unknown prognostic variable: ', TRIM( location )
     2839          CALL message( 'wtm_actions', 'PA04??', 1, 2, 0, 6, 0 )
    28492840
    28502841       END SELECT
    28512842
    28522843
    2853     END SUBROUTINE wtm_tendencies
     2844    END SUBROUTINE wtm_actions
    28542845
    28552846
     
    28612852!> Call for grid point i,j
    28622853!------------------------------------------------------------------------------!
    2863     SUBROUTINE wtm_tendencies_ij( i, j, component )
    2864 
    2865 
    2866        IMPLICIT NONE
    2867 
    2868        INTEGER(iwp) ::  component   !< prognostic variable (u,v,w)
     2854    SUBROUTINE wtm_actions_ij( i, j, location )
     2855
     2856
     2857       CHARACTER (LEN=*) ::  location !<
    28692858       INTEGER(iwp) ::  i           !< running index
    28702859       INTEGER(iwp) ::  j           !< running index
    28712860       INTEGER(iwp) ::  k           !< running index
    28722861
    2873        SELECT CASE ( component )
    2874 
    2875        CASE ( 1 )
     2862       SELECT CASE ( location )
     2863
     2864       CASE ( 'before_timestep' )
     2865
     2866          CALL wtm_forces
     2867
     2868       CASE ( 'u-tendency' )
    28762869!
    28772870!--       Apply the x-component of the force to the u-component of the flow:
     
    28912884          ENDIF
    28922885
    2893        CASE ( 2 )
     2886       CASE ( 'v-tendency' )
    28942887!
    28952888!--       Apply the y-component of the force to the v-component of the flow:
     
    29072900          ENDIF
    29082901
    2909        CASE ( 3 )
     2902       CASE ( 'w-tendency' )
    29102903!
    29112904!--       Apply the z-component of the force to the w-component of the flow:
     
    29212914       CASE DEFAULT
    29222915
    2923           WRITE( message_string, * ) 'unknown prognostic variable: ', component
    2924           CALL message( 'wtm_tendencies', 'PA04??', 1, 2, 0, 6, 0 )
     2916          WRITE( message_string, * ) 'unknown prognostic variable: ', TRIM( location )
     2917          CALL message( 'wtm_actions', 'PA04??', 1, 2, 0, 6, 0 )
    29252918
    29262919       END SELECT
    29272920
    29282921
    2929     END SUBROUTINE wtm_tendencies_ij
     2922    END SUBROUTINE wtm_actions_ij
    29302923
    29312924 END MODULE wind_turbine_model_mod
Note: See TracChangeset for help on using the changeset viewer.