Ignore:
Timestamp:
Mar 26, 2018 9:39:22 AM (4 years ago)
Author:
maronga
Message:

renamed all Fortran NAMELISTS

File:
1 edited

Legend:

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

    r2894 r2932  
    2626! -----------------
    2727! $Id$
     28! renamed wind_turbine_par to wind_turbine_parameters
     29!
     30! 2894 2018-03-15 09:17:58Z Giersch
    2831! variable named found has been introduced for checking if restart data was
    2932! found, reading of restart strings has been moved completely to
     
    493496                                  turb_cd_nacelle, turb_cd_tower, pitch_rate,  &
    494497                                  yaw_control, yaw_speed, tl_cor
    495 
     498                                 
     499       NAMELIST /wind_turbine_parameters/                                      &
     500                                  air_dens, dtow, gear_eff, gear_ratio,        &
     501                                  gen_eff, inertia_gen, inertia_rot, max_miss, &
     502                                  max_torque_gen, max_trq_rate, min_miss,      &
     503                                  min_reg15, min_reg2, nairfoils, nturbines,   &
     504                                  omega_rot, phi_yaw, pitch_add, pitch_control,&
     505                                  rated_genspeed, rated_power, rcx, rcy, rcz,  &
     506                                  rnac, rr, segment_length, segment_width,     &
     507                                  slope2, speed_control, tilt, time_turbine_on,&
     508                                  turb_cd_nacelle, turb_cd_tower, pitch_rate,  &
     509                                  yaw_control, yaw_speed, tl_cor
    496510!
    497511!--    Try to find wind turbine model package
    498512       REWIND ( 11 )
    499513       line = ' '
     514       DO  WHILE ( INDEX( line, '&wind_turbine_parameters' ) == 0 )
     515          READ ( 11, '(A)', END=10 )  line
     516       ENDDO
     517       BACKSPACE ( 11 )
     518
     519!
     520!--    Read user-defined namelist
     521       READ ( 11, wind_turbine_parameters, IOSTAT=ierrn )
     522
     523       IF ( ierrn < 0 )  THEN
     524          message_string = 'no wind_turbine_parameters-NAMELIST found: '  //    &
     525                           'End of file has reached'
     526          CALL message( 'wtm_parin', 'PA0460', 1, 2, 0, 6, 0 )
     527       ELSEIF ( ierrn > 0 ) THEN
     528          message_string = 'errors in wind_turbine_parameters-NAMELIST: '  //   &
     529                           'some variables for steering may not be properly set'
     530          CALL message( 'wtm_parin', 'PA0466', 1, 2, 0, 6, 0 )               
     531       ENDIF
     532       
     533!
     534!--    Set flag that indicates that the wind turbine model is switched on
     535       wind_turbine = .TRUE.
     536       
     537       GOTO 12
     538
     539!
     540!--    Try to find wind turbine model package
     541 10    REWIND ( 11 )
     542       line = ' '
    500543       DO  WHILE ( INDEX( line, '&wind_turbine_par' ) == 0 )
    501           READ ( 11, '(A)', END=10 )  line
     544          READ ( 11, '(A)', END=12 )  line
    502545       ENDDO
    503546       BACKSPACE ( 11 )
     
    512555          CALL message( 'wtm_parin', 'PA0460', 1, 2, 0, 6, 0 )
    513556       ELSEIF ( ierrn > 0 ) THEN
    514           message_string = 'errors in wind_turbine_par-NAMELIST: '  //          &
     557          message_string = 'errors in wind_turbine_par-NAMELIST: '  //         &
    515558                           'some variables for steering may not be properly set'
    516559          CALL message( 'wtm_parin', 'PA0466', 1, 2, 0, 6, 0 )               
    517560       ENDIF
    518        
     561     
     562       message_string = 'namelist wind_tubrine_par is deprecated and will ' // &
     563                        'be removed in near future. Please &use namelist ' //  &
     564                        'wind_turbine_parameters instead'
     565       CALL message( 'wtm_parin', 'PA0487', 0, 1, 0, 6, 0 )     
     566     
    519567!
    520568!--    Set flag that indicates that the wind turbine model is switched on
    521569       wind_turbine = .TRUE.
    522570
    523 
    524  10    CONTINUE   ! TBD Change from continue, mit ierrn machen
     571 12    CONTINUE   ! TBD Change from continue, mit ierrn machen
    525572
    526573
Note: See TracChangeset for help on using the changeset viewer.