Ignore:
Timestamp:
Apr 12, 2018 2:47:44 PM (6 years ago)
Author:
suehring
Message:

Minor revision of static input file checks, bugfix in initialization of surface-fractions in LSM; minor bugfix in initialization of albedo at window-surfaces; for clearer access of albedo and emissivity introduce index for vegetation/wall, pavement/green-wall and water/window surfaces

File:
1 edited

Legend:

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

    r2958 r2963  
    2525! -----------------
    2626! $Id$
     27! - Revise checks for static input variables.
     28! - Introduce index for vegetation/wall, pavement/green-wall and water/window
     29!   surfaces, for clearer access of surface fraction, albedo, emissivity, etc. .
     30!
     31! 2958 2018-04-11 15:38:13Z suehring
    2732! Synchronize longitude and latitude between nested model domains, values are
    2833! taken from the root model.
     
    126131
    127132    USE pegrid
     133
     134    USE surface_mod,                                                           &
     135        ONLY:  ind_pav_green, ind_veg_wall, ind_wat_win
    128136!
    129137!-- Define type for dimensions.
     
    29802988!--    More advanced methods, e.g. a nearest neighbor algorithm as used in GIS
    29812989!--    systems might be implemented later.
     2990!--    Please note, if no terrain height is provided, it is set to 0.
    29822991       IF ( ANY( terrain_height_f%var == terrain_height_f%fill ) )  THEN
    29832992          message_string = 'NetCDF variable orography_2D is not ' //           &
     
    30123021!--    Check for minimum requirement of surface-classification data in case
    30133022!--    static input file is used.
    3014        IF ( .NOT. vegetation_type_f%from_file  .OR.                            &
    3015             .NOT. pavement_type_f%from_file    .OR.                            &
    3016             .NOT. building_type_f%from_file    .OR.                            &
    3017             .NOT. water_type_f%from_file       .OR.                            &
    3018             .NOT. soil_type_f%from_file            )  THEN
     3023       IF ( ( .NOT. vegetation_type_f%from_file  .OR.                          &
     3024              .NOT. pavement_type_f%from_file    .OR.                          &
     3025              .NOT. water_type_f%from_file       .OR.                          &
     3026              .NOT. soil_type_f%from_file             ) .OR.                   &
     3027             ( urban_surface  .AND.  .NOT. building_type_f%from_file ) )  THEN
    30193028          message_string = 'Minimum requirement for surface classification ' //&
    30203029                           'is not fulfilled. At least ' //                    &
    30213030                           'vegetation_type, pavement_type, ' //               &
    3022                            'building_type, soil_type and water_type are '//    &
    3023                            'required.'
     3031                           'soil_type and water_type are '//                   &
     3032                           'required. If urban-surface model is applied, ' //  &
     3033                           'also building_type ist required'
    30243034          CALL message( 'netcdf_data_input_mod', 'NDI016', 1, 2, 0, 6, 0 )
    30253035       ENDIF
     
    31293139                  building_type_f%var(j,i)   == building_type_f%fill    .AND.  &
    31303140                  water_type_f%var(j,i)      == water_type_f%fill )  THEN
    3131                 message_string = 'At least one of the paramters '       //    &
     3141                WRITE( message_string, * ) 'At least one of the parameters '// &
    31323142                                 'vegetation_type, pavement_type, '     //     &
    31333143                                 'building_type, or water_type must be set '// &
    3134                                  'to a non-missing value'
     3144                                 'to a non-missing value. Grid point: ', j, i
    31353145                CALL message( 'netcdf_data_input_mod', 'NDI025', 2, 2, 0, 6, 0 )
    31363146             ENDIF
     
    31883198!--          surface vegetation fraction is zero.
    31893199             IF ( ( vegetation_type_f%var(j,i) /= vegetation_type_f%fill  .AND.&
    3190                  ( surface_fraction_f%frac(0,j,i) == 0.0_wp .OR.               &
    3191                    surface_fraction_f%frac(0,j,i) == surface_fraction_f%fill ) &
     3200                 ( surface_fraction_f%frac(ind_veg_wall,j,i) == 0.0_wp .OR.    &
     3201                   surface_fraction_f%frac(ind_veg_wall,j,i) ==                &
     3202                                                     surface_fraction_f%fill ) &
    31923203                  )  .OR.                                                      &
    31933204                  ( pavement_type_f%var(j,i) /= pavement_type_f%fill     .AND. &
    3194                  ( surface_fraction_f%frac(1,j,i) == 0.0_wp .OR.               &
    3195                    surface_fraction_f%frac(1,j,i) == surface_fraction_f%fill ) &
     3205                 ( surface_fraction_f%frac(ind_pav_green,j,i) == 0.0_wp .OR.   &
     3206                   surface_fraction_f%frac(ind_pav_green,j,i) ==               &
     3207                                                     surface_fraction_f%fill ) &
    31963208                  )  .OR.                                                      &
    31973209                  ( water_type_f%var(j,i) /= water_type_f%fill           .AND. &
    3198                  ( surface_fraction_f%frac(2,j,i) == 0.0_wp .OR.               &
    3199                    surface_fraction_f%frac(2,j,i) == surface_fraction_f%fill ) &
     3210                 ( surface_fraction_f%frac(ind_wat_win,j,i) == 0.0_wp .OR.     &
     3211                   surface_fraction_f%frac(ind_wat_win,j,i) ==                 &
     3212                                                     surface_fraction_f%fill ) &
    32003213                  ) )  THEN
    32013214                WRITE( message_string, * ) 'Mismatch in setting of '     //    &
     
    32103223!--          surface vegetation fraction is non-zero.
    32113224             IF ( ( vegetation_type_f%var(j,i) == vegetation_type_f%fill  .AND.&
    3212                  ( surface_fraction_f%frac(0,j,i) /= 0.0_wp .AND.              &
    3213                    surface_fraction_f%frac(0,j,i) /= surface_fraction_f%fill ) &
     3225                 ( surface_fraction_f%frac(ind_veg_wall,j,i) /= 0.0_wp .AND.   &
     3226                   surface_fraction_f%frac(ind_veg_wall,j,i) /=                &
     3227                                                     surface_fraction_f%fill ) &
    32143228                  )  .OR.                                                      &
    32153229                  ( pavement_type_f%var(j,i) == pavement_type_f%fill     .AND. &
    3216                  ( surface_fraction_f%frac(1,j,i) /= 0.0_wp .AND.              &
    3217                    surface_fraction_f%frac(1,j,i) /= surface_fraction_f%fill ) &
     3230                 ( surface_fraction_f%frac(ind_pav_green,j,i) /= 0.0_wp .AND.  &
     3231                   surface_fraction_f%frac(ind_pav_green,j,i) /=               &
     3232                                                     surface_fraction_f%fill ) &
    32183233                  )  .OR.                                                      &
    32193234                  ( water_type_f%var(j,i) == water_type_f%fill           .AND. &
    3220                  ( surface_fraction_f%frac(2,j,i) /= 0.0_wp .AND.              &
    3221                    surface_fraction_f%frac(2,j,i) /= surface_fraction_f%fill ) &
     3235                 ( surface_fraction_f%frac(ind_wat_win,j,i) /= 0.0_wp .AND.    &
     3236                   surface_fraction_f%frac(ind_wat_win,j,i) /=                 &
     3237                                                     surface_fraction_f%fill ) &
    32223238                  ) )  THEN
    32233239                WRITE( message_string, * ) 'Mismatch in setting of '     //    &
Note: See TracChangeset for help on using the changeset viewer.