Ignore:
Timestamp:
Aug 24, 2016 3:47:17 PM (5 years ago)
Author:
kanani
Message:

changes in the course of urban surface model implementation

File:
1 edited

Legend:

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

    r2001 r2007  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Added support for new urban surface model (temporary modifications of
     23! SELECT CASE ( ) necessary, see variable trimvar),
     24! added comments in variable declaration section
    2325!
    2426! Former revisions:
     
    150152        ONLY:  radiation, radiation_3d_data_averaging
    151153
     154    USE urban_surface_mod,                                                     &
     155        ONLY:  urban_surface, usm_average_3d_data
     156
    152157
    153158    IMPLICIT NONE
    154159
    155     INTEGER(iwp) ::  i   !<
    156     INTEGER(iwp) ::  ii  !<
    157     INTEGER(iwp) ::  j   !<
    158     INTEGER(iwp) ::  k   !<
     160    INTEGER(iwp) ::  i   !< running index
     161    INTEGER(iwp) ::  ii  !< running index
     162    INTEGER(iwp) ::  j   !< running index
     163    INTEGER(iwp) ::  k   !< running index
    159164    INTEGER(iwp) ::  n   !<
    160     INTEGER(iwp) ::  psi !<
    161165
    162166    REAL(wp)     ::  mean_r !<
    163167    REAL(wp)     ::  s_r2   !<
    164168    REAL(wp)     ::  s_r3   !<
     169
     170    CHARACTER (LEN=20) ::  trimvar  !< TRIM of output-variable string
     171
    165172
    166173    CALL cpu_log (log_point(34),'sum_up_3d_data','start')
     
    174181
    175182       DO  ii = 1, doav_n
    176 
    177           SELECT CASE ( TRIM( doav(ii) ) )
     183!
     184!--       Temporary solution to account for data output within the new urban
     185!--       surface model (urban_surface_mod.f90), see also SELECT CASE ( trimvar )
     186          trimvar = TRIM( doav(ii) )
     187          IF ( urban_surface  .AND.  trimvar(1:3) == 'us_' )  THEN
     188             trimvar = 'usm_output'
     189          ENDIF
     190       
     191          SELECT CASE ( trimvar )
    178192
    179193             CASE ( 'e' )
     
    374388                ENDIF
    375389                z0q_av = 0.0_wp
     390!             
     391!--          Block of urban surface model outputs
     392             CASE ( 'usm_output' )
     393
     394                CALL usm_average_3d_data( 'allocate', doav(ii) )
     395             
    376396
    377397             CASE DEFAULT
     
    402422!-- Loop of all variables to be averaged.
    403423    DO  ii = 1, doav_n
    404 
     424!
     425!--       Temporary solution to account for data output within the new urban
     426!--       surface model (urban_surface_mod.f90), see also SELECT CASE ( trimvar )
     427          trimvar = TRIM( doav(ii) )
     428          IF ( urban_surface  .AND.  trimvar(1:3) == 'us_' )  THEN
     429             trimvar = 'usm_output'
     430          ENDIF
    405431!
    406432!--    Store the array chosen on the temporary array.
    407        SELECT CASE ( TRIM( doav(ii) ) )
     433       SELECT CASE ( trimvar )
    408434
    409435          CASE ( 'e' )
     
    724750                ENDDO
    725751             ENDDO
     752!             
     753!--       Block of urban surface model outputs
     754          CASE ( 'usm_output' )
     755             CALL usm_average_3d_data( 'sum', doav(ii) )
    726756
    727757          CASE DEFAULT
Note: See TracChangeset for help on using the changeset viewer.