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

File:
1 edited

Legend:

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