Changeset 3779 for palm/trunk/UTIL/inifor/src/inifor_grid.f90
- Timestamp:
- Mar 5, 2019 11:13:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/src/inifor_grid.f90
r3765 r3779 15 15 ! PALM. If not, see <http://www.gnu.org/licenses/>. 16 16 ! 17 ! Copyright 2017-201 8Leibniz Universitaet Hannover18 ! Copyright 2017-201 8Deutscher Wetterdienst Offenbach17 ! Copyright 2017-2019 Leibniz Universitaet Hannover 18 ! Copyright 2017-2019 Deutscher Wetterdienst Offenbach 19 19 !------------------------------------------------------------------------------! 20 20 ! … … 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Assigned names to averaging grids 29 ! Improved variable naming and minor clean-up 30 ! 31 ! 32 ! 3765 2019-02-26 13:45:46Z eckhard 28 33 ! Removed dependency on radiation input files 29 34 ! … … 411 416 !-- Overwrite defaults with user configuration 412 417 CALL parse_command_line_arguments( cfg ) 418 CALL report('main_loop', 'Running INIFOR version ' // VERSION) 413 419 414 420 flow_prefix = TRIM(cfg % input_prefix) … … 444 450 CALL validate_config( cfg ) 445 451 446 CALL report('main_loop', 'Running INIFOR version ' // VERSION)447 452 CALL report('setup_parameters', "initialization mode: " // TRIM(cfg % ic_mode)) 448 453 CALL report('setup_parameters', " forcing mode: " // TRIM(cfg % bc_mode)) 449 454 CALL report('setup_parameters', " averaging mode: " // TRIM(cfg % averaging_mode)) 455 CALL report('setup_parameters', " averaging angle: " // real_to_str(cfg % averaging_angle)) 450 456 CALL report('setup_parameters', " data path: " // TRIM(cfg % input_path)) 451 457 CALL report('setup_parameters', " hhl file: " // TRIM(cfg % hhl_file)) … … 1051 1057 lonmin = lonmin_palm, lonmax = lonmax_palm, & 1052 1058 latmin = latmin_palm, latmax = latmax_palm, & 1053 kind='scalar' )1059 kind='scalar', name='averaged initial scalar') 1054 1060 1055 1061 CALL init_averaging_grid(averaged_initial_w_profile, cosmo_grid, & … … 1057 1063 lonmin = lonmin_palm, lonmax = lonmax_palm, & 1058 1064 latmin = latmin_palm, latmax = latmax_palm, & 1059 kind='w' )1065 kind='w', name='averaged initial w') 1060 1066 1061 1067 CALL init_averaging_grid(averaged_scalar_profile, cosmo_grid, & … … 1063 1069 lonmin = lam_west, lonmax = lam_east, & 1064 1070 latmin = phi_south, latmax = phi_north, & 1065 kind='scalar' )1071 kind='scalar', name='centre geostrophic scalar') 1066 1072 1067 1073 CALL init_averaging_grid(averaged_w_profile, cosmo_grid, & … … 1069 1075 lonmin = lam_west, lonmax = lam_east, & 1070 1076 latmin = phi_south, latmax = phi_north, & 1071 kind='w' )1077 kind='w', name='centre geostrophic w') 1072 1078 1073 1079 CALL init_averaging_grid(south_averaged_scalar_profile, cosmo_grid, & … … 1076 1082 latmin = phi_centre - averaging_angle, & 1077 1083 latmax = phi_centre, & 1078 kind='scalar' )1084 kind='scalar', name='south geostrophic scalar') 1079 1085 1080 1086 CALL init_averaging_grid(north_averaged_scalar_profile, cosmo_grid, & … … 1083 1089 latmin = phi_centre, & 1084 1090 latmax = phi_centre + averaging_angle, & 1085 kind='scalar' )1091 kind='scalar', name='north geostrophic scalar') 1086 1092 1087 1093 CALL init_averaging_grid(west_averaged_scalar_profile, cosmo_grid, & … … 1090 1096 lonmax = lam_centre, & 1091 1097 latmin = phi_south, latmax = phi_north, & 1092 kind='scalar' )1098 kind='scalar', name='west geostrophic scalar') 1093 1099 1094 1100 CALL init_averaging_grid(east_averaged_scalar_profile, cosmo_grid, & … … 1097 1103 lonmax = lam_centre + averaging_angle, & 1098 1104 latmin = phi_south, latmax = phi_north, & 1099 kind='scalar' )1105 kind='scalar', name='east geostrophic scalar') 1100 1106 1101 1107 ! … … 1304 1310 grid % z0 = z0 1305 1311 1306 SELECT CASE( TRIM 1312 SELECT CASE( TRIM(kind) ) 1307 1313 1308 1314 CASE('boundary') … … 1529 1535 !------------------------------------------------------------------------------! 1530 1536 SUBROUTINE init_averaging_grid(avg_grid, cosmo_grid, x, y, z, z0, & 1531 lonmin, lonmax, latmin, latmax, kind )1537 lonmin, lonmax, latmin, latmax, kind, name) 1532 1538 1533 1539 TYPE(grid_definition), INTENT(INOUT) :: avg_grid … … 1541 1547 1542 1548 CHARACTER(LEN=*), INTENT(IN) :: kind 1543 1544 LOGICAL :: level_based_averaging 1549 CHARACTER(LEN=*), INTENT(IN) :: name 1550 1551 LOGICAL :: level_based_averaging 1545 1552 1546 1553 ALLOCATE( avg_grid % x(1) ) … … 1559 1566 1560 1567 avg_grid % kind = TRIM(kind) 1568 avg_grid % name(1) = TRIM(name) 1561 1569 1562 1570 ! … … 1586 1594 ! 1587 1595 !-- For level-besed averaging, compute average heights 1596 !level_based_averaging = ( TRIM(mode) == 'level' ) 1588 1597 level_based_averaging = ( TRIM(cfg % averaging_mode) == 'level' ) 1589 1598 IF (level_based_averaging) THEN … … 1592 1601 CALL average_2d(avg_grid % cosmo_h, avg_grid % h(1,1,:), & 1593 1602 avg_grid % iii, avg_grid % jjj) 1603 1594 1604 END IF 1595 1605 … … 1645 1655 jmax = CEILING( (avg_grid % lat(2) - cosmo_lat(0)) / dlat ) 1646 1656 1647 message = " Averaging '" // TRIM(avg_grid % kind) // "' over "//&1657 message = "Grid " // TRIM(avg_grid % name(1)) // " averages over " // & 1648 1658 TRIM(str(imin)) // " <= i <= " // TRIM(str(imax)) // & 1649 1659 " and " // & … … 3167 3177 ) 3168 3178 output_var_table(57) % averaging_grid => north_averaged_scalar_profile 3169 output_var_table(57) % to_be_processed = .NOT. cfg % ug_ is_set3179 output_var_table(57) % to_be_processed = .NOT. cfg % ug_defined_by_user 3170 3180 3171 3181 … … 3182 3192 ) 3183 3193 output_var_table(58) % averaging_grid => south_averaged_scalar_profile 3184 output_var_table(58) % to_be_processed = .NOT. cfg % ug_ is_set3194 output_var_table(58) % to_be_processed = .NOT. cfg % ug_defined_by_user 3185 3195 3186 3196 … … 3197 3207 ) 3198 3208 output_var_table(59) % averaging_grid => east_averaged_scalar_profile 3199 output_var_table(59) % to_be_processed = .NOT. cfg % ug_ is_set3209 output_var_table(59) % to_be_processed = .NOT. cfg % ug_defined_by_user 3200 3210 3201 3211 … … 3212 3222 ) 3213 3223 output_var_table(60) % averaging_grid => west_averaged_scalar_profile 3214 output_var_table(60) % to_be_processed = .NOT. cfg % ug_ is_set3224 output_var_table(60) % to_be_processed = .NOT. cfg % ug_defined_by_user 3215 3225 3216 3226 output_var_table(61) = init_nc_var( & … … 3226 3236 ) 3227 3237 output_var_table(61) % averaging_grid => north_averaged_scalar_profile 3228 output_var_table(61) % to_be_processed = .NOT. cfg % ug_ is_set3238 output_var_table(61) % to_be_processed = .NOT. cfg % ug_defined_by_user 3229 3239 3230 3240 … … 3241 3251 ) 3242 3252 output_var_table(62) % averaging_grid => south_averaged_scalar_profile 3243 output_var_table(62) % to_be_processed = .NOT. cfg % ug_ is_set3253 output_var_table(62) % to_be_processed = .NOT. cfg % ug_defined_by_user 3244 3254 3245 3255 … … 3256 3266 ) 3257 3267 output_var_table(63) % averaging_grid => east_averaged_scalar_profile 3258 output_var_table(63) % to_be_processed = .NOT. cfg % ug_ is_set3268 output_var_table(63) % to_be_processed = .NOT. cfg % ug_defined_by_user 3259 3269 3260 3270 … … 3271 3281 ) 3272 3282 output_var_table(64) % averaging_grid => west_averaged_scalar_profile 3273 output_var_table(64) % to_be_processed = .NOT. cfg % ug_ is_set3283 output_var_table(64) % to_be_processed = .NOT. cfg % ug_defined_by_user 3274 3284 3275 3285 ! … … 3416 3426 var % task = "interpolate_2d" 3417 3427 3418 CASE( 'left scalar', 'right scalar') ! same as right3428 CASE( 'left scalar', 'right scalar') 3419 3429 var % lod = -1 3420 3430 var % ndim = 3 … … 3429 3439 var % task = "interpolate_3d" 3430 3440 3431 CASE( 'north scalar', 'south scalar') ! same as south3441 CASE( 'north scalar', 'south scalar') 3432 3442 var % lod = -1 3433 3443 var % ndim = 3
Note: See TracChangeset
for help on using the changeset viewer.