Changeset 2696 for palm/trunk/SOURCE/read_3d_binary.f90
- Timestamp:
- Dec 14, 2017 5:12:51 PM (6 years ago)
- Location:
- palm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk
-
palm/trunk/SOURCE
-
palm/trunk/SOURCE/read_3d_binary.f90
r2644 r2696 1 1 !> @file read_3d_binary.f90 2 2 !------------------------------------------------------------------------------! 3 ! This file is part of PALM.3 ! This file is part of the PALM model system. 4 4 ! 5 5 ! PALM is free software: you can redistribute it and/or modify it under the … … 21 21 ! ----------------- 22 22 ! 23 ! 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - kh_av, km_av (TG) 28 ! - Implementation of chemistry module (FK) 29 ! - Changes from trunk concerning random generator added (MS) 30 ! 31 ! 2644 2017-11-27 09:27:09Z raasch 27 32 ! further bugfix for r2636 (wrong datatype used for allocation) 28 33 ! … … 144 149 USE averaging 145 150 151 #if defined( __chem ) 152 USE chemistry_model_mod, & 153 ONLY: chem_read_restart_data, chem_species, nspec 154 #endif 155 146 156 USE control_parameters, & 147 ONLY: iran, land_surface, message_string, outflow_l, outflow_n,&148 outflow_ r, outflow_s, urban_surface157 ONLY: air_chemistry, iran, land_surface, message_string, outflow_l, & 158 outflow_n, outflow_r, outflow_s, urban_surface 149 159 150 160 USE cpulog, & … … 234 244 REAL(wp) :: rdummy 235 245 236 REAL(wp), DIMENSION(:,:), ALLOCATABLE:: tmp_2d !< temporary array for storing 2D data246 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tmp_2d !< temporary array for storing 2D data 237 247 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3d !< temporary array for storing 3D data 238 248 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwul !< … … 360 370 !-- First compare the version numbers 361 371 READ ( 13 ) version_on_file 362 binary_version = '4. 5'372 binary_version = '4.6' 363 373 IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN 364 374 WRITE( message_string, * ) 'version mismatch concerning data ', & … … 460 470 nync = nynfa(i,k) + offset_ya(i,k) 461 471 462 write(9,*) "f", nxlf, nxrf, nysf, nynf463 write(9,*) "c", nxlc, nxrc, nysc, nync464 465 472 466 473 … … 489 496 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 490 497 498 CASE ( 'kh_av' ) 499 IF ( .NOT. ALLOCATED( kh_av ) ) THEN 500 ALLOCATE( kh_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) 501 ENDIF 502 IF ( k == 1 ) READ ( 13 ) tmp_3d 503 kh_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 504 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 505 491 506 CASE ( 'km' ) 492 507 IF ( k == 1 ) READ ( 13 ) tmp_3d 493 508 km(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 494 509 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 510 511 CASE ( 'km_av' ) 512 IF ( .NOT. ALLOCATED( km_av ) ) THEN 513 ALLOCATE( km_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) 514 ENDIF 515 IF ( k == 1 ) READ ( 13 ) tmp_3d 516 km_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 517 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 495 518 496 519 CASE ( 'lpt_av' ) … … 703 726 IF ( k == 1 ) READ ( 13 ) random_iv 704 727 IF ( k == 1 ) READ ( 13 ) random_iy 705 728 706 729 CASE ( 'seq_random_array' ) 707 730 ALLOCATE( tmp_2d_id_random(nys_on_file:nyn_on_file, & … … 722 745 tmp_2d_seq_random(:,nysf:nynf,nxlf:nxrf) 723 746 DEALLOCATE( tmp_2d_id_random, tmp_2d_seq_random ) 747 724 748 CASE ( 'rho_ocean_av' ) 725 749 IF ( .NOT. ALLOCATED( rho_ocean_av ) ) THEN … … 1054 1078 1055 1079 ! 1080 !-- Read urban surface restart data 1081 IF ( urban_surface ) THEN 1082 CALL usm_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, & 1083 nxr_on_file, nynfa, nyn_on_file, nysfa, & 1084 nys_on_file, offset_xa, offset_ya, & 1085 overlap_count(i) ) 1086 ENDIF 1087 1088 ! 1056 1089 !-- Read land surface restart data 1057 1090 IF ( land_surface ) THEN … … 1061 1094 overlap_count(i), tmp_2d ) 1062 1095 1063 ENDIF1064 1065 !1066 !-- Read land surface restart data1067 IF ( urban_surface ) THEN1068 CALL usm_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, &1069 nxr_on_file, nynfa, nyn_on_file, nysfa, &1070 nys_on_file, offset_xa, offset_ya, &1071 overlap_count(i) )1072 1096 ENDIF 1073 1097 … … 1083 1107 1084 1108 ! 1109 !-- Read chemistry restart data 1110 #if defined( __chem ) 1111 IF ( air_chemistry ) THEN 1112 CALL chem_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, & 1113 nxr_on_file, nynfa, nyn_on_file, & 1114 nysfa, nys_on_file, offset_xa, & 1115 offset_ya, overlap_count(i), & 1116 tmp_2d, tmp_3d ) 1117 ENDIF 1118 #endif 1119 1120 ! 1085 1121 !-- Read user-defined restart data 1086 1122 CALL user_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, nxr_on_file, &
Note: See TracChangeset
for help on using the changeset viewer.