Changeset 3421 for palm/trunk/SOURCE
- Timestamp:
- Oct 24, 2018 6:39:32 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 1 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r3381 r3421 25 25 # ----------------- 26 26 # $Id$ 27 # Add netcdf_data_input_mod to netcdf_interface_mod 28 # bugfix: add dependencies to chemistry_model_mod 29 # Add module for surface data output 30 # 31 # 3381 2018-10-19 13:09:06Z raasch 27 32 # dependencies for ocean_mod fixed 28 33 # … … 611 616 surface_layer_fluxes_mod.f90 \ 612 617 surface_mod.f90 \ 618 surface_output_mod.f90 \ 613 619 swap_timelevel.f90 \ 614 620 synthetic_turbulence_generator_mod.f90 \ … … 798 804 spectra_mod.o \ 799 805 subsidence_mod.o \ 806 surface_output_mod.o \ 800 807 synthetic_turbulence_generator_mod.o \ 801 808 turbulence_closure_mod.o \ … … 1052 1059 surface_layer_fluxes_mod.o \ 1053 1060 surface_mod.o \ 1061 surface_output_mod.o \ 1054 1062 synthetic_turbulence_generator_mod.o \ 1055 1063 turbulence_closure_mod.o \ … … 1289 1297 mod_kinds.o \ 1290 1298 modules.o \ 1299 netcdf_data_input_mod.o \ 1291 1300 ocean_mod.o \ 1292 1301 radiation_model_mod.o \ … … 1358 1367 read_restart_data_mod.o \ 1359 1368 spectra_mod.o \ 1369 surface_output_mod.o \ 1360 1370 synthetic_turbulence_generator_mod.o \ 1361 1371 turbulence_closure_mod.o \ … … 1574 1584 mod_kinds.o \ 1575 1585 modules.o 1586 surface_output_mod.o: \ 1587 mod_kinds.o \ 1588 modules.o \ 1589 surface_mod.o 1576 1590 swap_timelevel.o: \ 1577 1591 bulk_cloud_model_mod.o \ … … 1625 1639 surface_layer_fluxes_mod.o \ 1626 1640 surface_mod.o \ 1641 surface_output_mod.o \ 1627 1642 synthetic_turbulence_generator_mod.o \ 1628 1643 time_to_string.o \ -
palm/trunk/SOURCE/average_3d_data.f90
r3337 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3419 2018-10-24 17:27:31Z gronemeier 27 30 ! (from resler branch) 28 31 ! Add biometeorology output, … … 250 253 ENDIF 251 254 252 CASE ( ' lpt' )255 CASE ( 'thetal' ) 253 256 IF ( ALLOCATED( lpt_av ) ) THEN 254 257 DO i = nxlg, nxrg … … 313 316 ENDIF 314 317 315 CASE ( ' pt' )318 CASE ( 'theta' ) 316 319 IF ( ALLOCATED( pt_av ) ) THEN 317 320 DO i = nxlg, nxrg … … 463 466 ENDIF 464 467 465 CASE ( 'u *' )468 CASE ( 'us*' ) 466 469 IF ( ALLOCATED( us_av ) ) THEN 467 470 DO i = nxlg, nxrg … … 484 487 ENDIF 485 488 486 CASE ( ' vpt' )489 CASE ( 'thetav' ) 487 490 IF ( ALLOCATED( vpt_av ) ) THEN 488 491 DO i = nxlg, nxrg -
palm/trunk/SOURCE/check_open.f90
r3241 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Open files for surface data 28 ! 29 ! 3399 2018-10-22 20:13:45Z gronemeier 27 30 ! unused variables and format statements removed 28 31 ! … … 455 458 456 459 ENDIF 460 461 CASE ( 25 ) 462 ! 463 !-- Binary files for surface data 464 OPEN ( 25, FILE='SURFACE_DATA_BIN'//TRIM( coupling_char )//myid_char, & 465 FORM='UNFORMATTED', POSITION='APPEND' ) 466 467 CASE ( 26 ) 468 ! 469 !-- Binary files for averaged surface data 470 OPEN ( 26, FILE='SURFACE_DATA_AV_BIN'//TRIM( coupling_char )//myid_char, & 471 FORM='UNFORMATTED', POSITION='APPEND' ) 472 457 473 458 474 CASE ( 30 ) … … 1131 1147 ENDIF 1132 1148 1149 1133 1150 ! 1134 1151 !-- nc-file for virtual flight measurements -
palm/trunk/SOURCE/check_parameters.f90
r3377 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! Add checks for surface data output 29 ! 30 ! 3419 2018-10-24 17:27:31Z gronemeier 27 31 ! Remove offline nesting in if clause for pressure top boundary condition 28 32 ! … … 777 781 778 782 USE statistics 783 784 USE surface_output_mod, & 785 ONLY: surface_output_check_parameters 779 786 780 787 USE synthetic_turbulence_generator_mod, & … … 1494 1501 IF ( urban_surface ) CALL usm_check_parameters 1495 1502 IF ( wind_turbine ) CALL wtm_check_parameters 1503 ! 1504 !-- Checks for surface data output 1505 IF ( surface_data_output ) CALL surface_output_check_parameters 1496 1506 1497 1507 ! … … 2363 2373 hom(:,2,3,:) = SPREAD( zw, 2, statistic_regions+1 ) 2364 2374 2365 CASE ( ' pt', '#pt' )2375 CASE ( 'theta', '#theta' ) 2366 2376 IF ( .NOT. bulk_cloud_model ) THEN 2367 2377 dopr_index(i) = 4 … … 2452 2462 hom(:,2,15,:) = SPREAD( zw, 2, statistic_regions+1 ) 2453 2463 2454 CASE ( 'w" pt"' )2464 CASE ( 'w"theta"' ) 2455 2465 dopr_index(i) = 16 2456 2466 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2457 2467 hom(:,2,16,:) = SPREAD( zw, 2, statistic_regions+1 ) 2458 2468 2459 CASE ( 'w* pt*' )2469 CASE ( 'w*theta*' ) 2460 2470 dopr_index(i) = 17 2461 2471 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2462 2472 hom(:,2,17,:) = SPREAD( zw, 2, statistic_regions+1 ) 2463 2473 2464 CASE ( 'w pt' )2474 CASE ( 'wtheta' ) 2465 2475 dopr_index(i) = 18 2466 2476 dopr_unit(i) = TRIM ( heatflux_output_unit ) … … 2479 2489 IF ( constant_flux_layer ) hom(nzb,2,20,:) = zu(1) 2480 2490 2481 CASE ( 'w* pt*BC' )2491 CASE ( 'w*theta*BC' ) 2482 2492 dopr_index(i) = 21 2483 2493 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2484 2494 hom(:,2,21,:) = SPREAD( zw, 2, statistic_regions+1 ) 2485 2495 2486 CASE ( 'w ptBC' )2496 CASE ( 'wthetaBC' ) 2487 2497 dopr_index(i) = 22 2488 2498 dopr_unit(i) = TRIM ( heatflux_output_unit ) … … 2504 2514 hom(:,2,32,:) = SPREAD( zw, 2, statistic_regions+1 ) 2505 2515 2506 CASE ( ' pt*2' )2516 CASE ( 'theta*2' ) 2507 2517 dopr_index(i) = 33 2508 2518 dopr_unit(i) = 'K2' … … 2603 2613 ENDIF 2604 2614 2605 CASE ( ' lpt', '#lpt' )2615 CASE ( 'thetal', '#thetal' ) 2606 2616 IF ( .NOT. bulk_cloud_model ) THEN 2607 2617 message_string = 'data_output_pr = ' // & … … 2621 2631 ENDIF 2622 2632 2623 CASE ( ' vpt', '#vpt' )2633 CASE ( 'thetav', '#thetav' ) 2624 2634 dopr_index(i) = 44 2625 2635 dopr_unit(i) = 'K' … … 2632 2642 ENDIF 2633 2643 2634 CASE ( 'w" vpt"' )2644 CASE ( 'w"thetav"' ) 2635 2645 dopr_index(i) = 45 2636 2646 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2637 2647 hom(:,2,45,:) = SPREAD( zw, 2, statistic_regions+1 ) 2638 2648 2639 CASE ( 'w* vpt*' )2649 CASE ( 'w*thetav*' ) 2640 2650 dopr_index(i) = 46 2641 2651 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2642 2652 hom(:,2,46,:) = SPREAD( zw, 2, statistic_regions+1 ) 2643 2653 2644 CASE ( 'w vpt' )2654 CASE ( 'wthetav' ) 2645 2655 dopr_index(i) = 47 2646 2656 dopr_unit(i) = TRIM ( heatflux_output_unit ) … … 2798 2808 hom(:,2,57,:) = SPREAD( zu, 2, statistic_regions+1 ) 2799 2809 2800 CASE ( 'u" pt"' )2810 CASE ( 'u"theta"' ) 2801 2811 dopr_index(i) = 58 2802 2812 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2803 2813 hom(:,2,58,:) = SPREAD( zu, 2, statistic_regions+1 ) 2804 2814 2805 CASE ( 'u* pt*' )2815 CASE ( 'u*theta*' ) 2806 2816 dopr_index(i) = 59 2807 2817 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2808 2818 hom(:,2,59,:) = SPREAD( zu, 2, statistic_regions+1 ) 2809 2819 2810 CASE ( 'u pt_t' )2820 CASE ( 'utheta_t' ) 2811 2821 dopr_index(i) = 60 2812 2822 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2813 2823 hom(:,2,60,:) = SPREAD( zu, 2, statistic_regions+1 ) 2814 2824 2815 CASE ( 'v" pt"' )2825 CASE ( 'v"theta"' ) 2816 2826 dopr_index(i) = 61 2817 2827 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2818 2828 hom(:,2,61,:) = SPREAD( zu, 2, statistic_regions+1 ) 2819 2829 2820 CASE ( 'v* pt*' )2830 CASE ( 'v*theta*' ) 2821 2831 dopr_index(i) = 62 2822 2832 dopr_unit(i) = TRIM ( heatflux_output_unit ) 2823 2833 hom(:,2,62,:) = SPREAD( zu, 2, statistic_regions+1 ) 2824 2834 2825 CASE ( ' vpt_t' )2835 CASE ( 'thetav_t' ) 2826 2836 dopr_index(i) = 63 2827 2837 dopr_unit(i) = TRIM ( heatflux_output_unit ) … … 2855 2865 hom(:,2,72,:) = SPREAD( zu, 2, statistic_regions+1 ) 2856 2866 2857 CASE ( 'rho _air' )2867 CASE ( 'rho' ) 2858 2868 dopr_index(i) = 119 2859 2869 dopr_unit(i) = 'kg/m3' 2860 2870 hom(:,2,119,:) = SPREAD( zu, 2, statistic_regions+1 ) 2861 2871 2862 CASE ( 'rho_ air_zw' )2872 CASE ( 'rho_zw' ) 2863 2873 dopr_index(i) = 120 2864 2874 dopr_unit(i) = 'kg/m3' … … 3023 3033 unit = 'm2/s2' 3024 3034 3025 CASE ( ' lpt' )3035 CASE ( 'thetal' ) 3026 3036 IF ( .NOT. bulk_cloud_model ) THEN 3027 3037 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 3041 3051 IF ( TRIM( var ) == 'pr' ) unit = 'm' 3042 3052 3043 CASE ( 'q', ' vpt' )3053 CASE ( 'q', 'thetav' ) 3044 3054 IF ( .NOT. humidity ) THEN 3045 3055 message_string = 'output of "' // TRIM( var ) // '" requi' // & … … 3048 3058 ENDIF 3049 3059 IF ( TRIM( var ) == 'q' ) unit = 'kg/kg' 3050 IF ( TRIM( var ) == ' vpt' ) unit = 'K'3060 IF ( TRIM( var ) == 'thetav' ) unit = 'K' 3051 3061 3052 3062 CASE ( 'ql' ) … … 3084 3094 unit = 'kg/m3' 3085 3095 3086 CASE ( 'p', ' pt', 'u', 'v', 'w' )3096 CASE ( 'p', 'theta', 'u', 'v', 'w' ) 3087 3097 IF ( TRIM( var ) == 'p' ) unit = 'Pa' 3088 IF ( TRIM( var ) == ' pt' ) unit = 'K'3098 IF ( TRIM( var ) == 'theta' ) unit = 'K' 3089 3099 IF ( TRIM( var ) == 'u' ) unit = 'm/s' 3090 3100 IF ( TRIM( var ) == 'v' ) unit = 'm/s' … … 3093 3103 3094 3104 CASE ( 'ghf*', 'lwp*', 'ol*', 'qsws*', 'r_a*', & 3095 'shf*', 'ssws*', 't*', 'tsurf*', 'u *', 'z0*', 'z0h*', 'z0q*' )3105 'shf*', 'ssws*', 't*', 'tsurf*', 'us*', 'z0*', 'z0h*', 'z0q*' ) 3096 3106 IF ( k == 0 .OR. data_output(i)(ilen-2:ilen) /= '_xy' ) THEN 3097 3107 message_string = 'illegal value for data_output: "' // & … … 3141 3151 IF ( TRIM( var ) == 't*' ) unit = 'K' 3142 3152 IF ( TRIM( var ) == 'tsurf*' ) unit = 'K' 3143 IF ( TRIM( var ) == 'u *') unit = 'm/s'3153 IF ( TRIM( var ) == 'us*' ) unit = 'm/s' 3144 3154 IF ( TRIM( var ) == 'z0*' ) unit = 'm' 3145 3155 IF ( TRIM( var ) == 'z0h*' ) unit = 'm' -
palm/trunk/SOURCE/data_output_2d.f90
r3298 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3419 2018-10-24 17:27:31Z gronemeier 27 30 ! minor formatting (kanani) 28 31 ! chem_data_output_2d subroutine added (basit) … … 562 565 IF ( mode == 'xy' ) level_z = zu 563 566 564 CASE ( ' lpt_xy', 'lpt_xz', 'lpt_yz' )567 CASE ( 'thetal_xy', 'thetal_xz', 'thetal_yz' ) 565 568 IF ( av == 0 ) THEN 566 569 to_be_resorted => pt … … 750 753 ENDIF 751 754 752 CASE ( ' pt_xy', 'pt_xz', 'pt_yz' )755 CASE ( 'theta_xy', 'theta_xz', 'theta_yz' ) 753 756 IF ( av == 0 ) THEN 754 757 IF ( .NOT. bulk_cloud_model ) THEN … … 1121 1124 ENDIF 1122 1125 1123 CASE ( 'u *_xy' ) ! 2d-array1126 CASE ( 'us*_xy' ) ! 2d-array 1124 1127 IF ( av == 0 ) THEN 1125 1128 DO m = 1, surf_def_h(0)%ns … … 1172 1175 ENDIF 1173 1176 1174 CASE ( ' vpt_xy', 'vpt_xz', 'vpt_yz' )1177 CASE ( 'thetav_xy', 'thetav_xz', 'thetav_yz' ) 1175 1178 IF ( av == 0 ) THEN 1176 1179 to_be_resorted => vpt -
palm/trunk/SOURCE/data_output_3d.f90
r3405 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3419 2018-10-24 17:27:31Z gronemeier 27 30 ! bugfix: nx, ny are required in non-parallel case 28 31 ! … … 418 421 ENDIF 419 422 420 CASE ( ' lpt' )423 CASE ( 'thetal' ) 421 424 IF ( av == 0 ) THEN 422 425 to_be_resorted => pt … … 512 515 ENDIF 513 516 514 CASE ( ' pt' )517 CASE ( 'theta' ) 515 518 IF ( av == 0 ) THEN 516 519 IF ( .NOT. bulk_cloud_model ) THEN … … 671 674 ENDIF 672 675 673 CASE ( ' vpt' )676 CASE ( 'thetav' ) 674 677 IF ( av == 0 ) THEN 675 678 to_be_resorted => vpt -
palm/trunk/SOURCE/data_output_dvrp.f90
r3274 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3419 2018-10-24 17:27:31Z gronemeier 27 30 ! Modularization of all bulk cloud physics code components 28 31 ! … … 337 340 ENDDO 338 341 339 CASE ( ' pt', 'pt_xy', 'pt_xz', 'pt_yz' )342 CASE ( 'theta', 'theta_xy', 'theta_xz', 'theta_yz' ) 340 343 IF ( .NOT. bulk_cloud_model ) THEN 341 344 DO i = nxl_dvrp, nxr_dvrp+1 … … 409 412 ENDIF 410 413 411 CASE ( 'u *_xy' )414 CASE ( 'us*_xy' ) 412 415 DO i = nxl_dvrp, nxr_dvrp+1 413 416 DO j = nys_dvrp, nyn_dvrp+1 -
palm/trunk/SOURCE/data_output_mask.f90
r3298 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3419 2018-10-24 17:27:31Z gronemeier 27 30 ! Minor formatting (kanani) 28 31 ! Call for chem_data_output_mask added (basit) … … 273 276 ENDIF 274 277 275 CASE ( ' lpt' )278 CASE ( 'thetal' ) 276 279 IF ( av == 0 ) THEN 277 280 to_be_resorted => pt … … 365 368 ENDIF 366 369 367 CASE ( ' pt' )370 CASE ( 'theta' ) 368 371 IF ( av == 0 ) THEN 369 372 IF ( .NOT. bulk_cloud_model ) THEN … … 481 484 ENDIF 482 485 483 CASE ( 'rho_ ocean' )486 CASE ( 'rho_sea_water' ) 484 487 IF ( av == 0 ) THEN 485 488 to_be_resorted => rho_ocean … … 516 519 ENDIF 517 520 518 CASE ( ' vpt' )521 CASE ( 'thetav' ) 519 522 IF ( av == 0 ) THEN 520 523 to_be_resorted => vpt … … 531 534 532 535 CASE DEFAULT 536 533 537 ! 534 538 !-- Radiation quantity -
palm/trunk/SOURCE/data_output_spectra.f90
r3274 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3419 2018-10-24 17:27:31Z gronemeier 27 30 ! Modularization of all bulk cloud physics code components 28 31 ! … … 179 182 pr = 3 180 183 181 CASE ( ' pt' )184 CASE ( 'theta' ) 182 185 pr = 4 183 186 -
palm/trunk/SOURCE/init_3d_model.f90
r3404 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Initialize surface data output 28 ! 29 ! 3415 2018-10-24 11:57:50Z suehring 27 30 ! Set bottom boundary condition for geostrophic wind components in inifor 28 31 ! initialization … … 625 628 ONLY : init_surface_arrays, init_surfaces, surf_def_h, surf_lsm_h, & 626 629 surf_usm_h, get_topography_top_index_ji, vertical_surfaces_exist 630 631 USE surface_output_mod, & 632 ONLY: surface_output_init 627 633 628 634 USE transpose_indices … … 2400 2406 CALL gust_init( dots_label, dots_unit, dots_num, dots_max ) 2401 2407 ENDIF 2408 ! 2409 !-- Initialize surface data output 2410 IF ( surface_data_output ) THEN 2411 CALL surface_output_init 2412 ENDIF 2402 2413 2403 2414 ! -
palm/trunk/SOURCE/init_masks.f90
r3294 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3419 2018-10-24 17:27:31Z gronemeier 27 30 ! ocean renamed ocean_mode 28 31 ! … … 316 319 unit = 'm2/s2' 317 320 318 CASE ( ' lpt' )321 CASE ( 'thetal' ) 319 322 IF ( .NOT. bulk_cloud_model ) THEN 320 323 WRITE ( message_string, * ) 'output of "', TRIM( var ), & … … 358 361 IF ( TRIM( var ) == 'pr' ) unit = 'm' 359 362 360 CASE ( 'q', ' vpt' )363 CASE ( 'q', 'thetav' ) 361 364 IF ( .NOT. humidity ) THEN 362 365 WRITE ( message_string, * ) 'output of "', TRIM( var ), & … … 365 368 ENDIF 366 369 IF ( TRIM( var ) == 'q' ) unit = 'kg/kg' 367 IF ( TRIM( var ) == ' vpt' ) unit = 'K'370 IF ( TRIM( var ) == 'thetav' ) unit = 'K' 368 371 369 372 CASE ( 'qc' ) … … 414 417 unit = 'kg/kg' 415 418 416 CASE ( 'rho_ ocean' )419 CASE ( 'rho_sea_water' ) 417 420 IF ( .NOT. ocean_mode ) THEN 418 421 WRITE ( message_string, * ) 'output of "', TRIM( var ), & … … 438 441 unit = 'psu' 439 442 440 CASE ( 'u *', 't*', 'lwp*', 'pra*', 'prr*', 'z0*', 'z0h*' )443 CASE ( 'us*', 't*', 'lwp*', 'pra*', 'prr*', 'z0*', 'z0h*' ) 441 444 WRITE ( message_string, * ) 'illegal value for data_', & 442 445 'output: "', TRIM( var ), '" is only allowed', & … … 444 447 CALL message( 'init_masks', 'PA0111', 1, 2, 0, 6, 0 ) 445 448 446 CASE ( 'p', ' pt', 'u', 'v', 'w' )449 CASE ( 'p', 'theta', 'u', 'v', 'w' ) 447 450 IF ( TRIM( var ) == 'p' ) unit = 'Pa' 448 IF ( TRIM( var ) == ' pt' ) unit = 'K'451 IF ( TRIM( var ) == 'theta' ) unit = 'K' 449 452 IF ( TRIM( var ) == 'u' ) unit = 'm/s' 450 453 IF ( TRIM( var ) == 'v' ) unit = 'm/s' -
palm/trunk/SOURCE/modules.f90
r3355 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! +surface_data_output 29 ! 30 ! 3355 2018-10-16 14:03:34Z knoop 27 31 ! (from branch resler) 28 32 ! Increase dimension of uv_heights etc. … … 1353 1357 LOGICAL :: sloping_surface = .FALSE. !< use sloped surface? (namelist parameter alpha_surface) 1354 1358 LOGICAL :: spinup = .FALSE. !< perform model spinup without atmosphere code? 1359 LOGICAL :: surface_data_output = .FALSE. !< output of surface data 1355 1360 LOGICAL :: stop_dt = .FALSE. !< internal switch to stop the time stepping 1356 1361 LOGICAL :: synchronous_exchange = .FALSE. !< namelist parameter … … 2027 2032 INTEGER(iwp), PARAMETER :: crmax = 100 !< maximum number of coordinate systems for profile output 2028 2033 2029 CHARACTER (LEN=20), DIMENSION(20) :: cross_ts_profiles = & !< time series to be plotted into one coordinate system, respectively 2030 (/ ' E E* ', ' dt ', & 2031 ' u* w* ', ' th* ', & 2032 ' umax vmax wmax ', ' div_old div_new ', & 2033 ' z_i_wpt z_i_pt ', ' w"pt"0 w"pt" wpt ', & 2034 ' pt(0) pt(zp) ', ' splux spluy spluz ', & 2035 ' L ', & 2036 ( ' ', i9 = 1, 9 ) /) 2034 CHARACTER (LEN=27), DIMENSION(20) :: cross_ts_profiles = & !< time series to be plotted into one coordinate system, respectively 2035 (/ ' E E* ', & 2036 ' dt ', & 2037 ' u* w* ', & 2038 ' th* ', & 2039 ' umax vmax wmax ', & 2040 ' div_old div_new ', & 2041 ' zi_wtheta zi_theta ', & 2042 ' w"theta"0 w"theta" wtheta ', & 2043 ' theta(0) theta(zp) ', & 2044 ' splux spluy spluz ', & 2045 ' L ', & 2046 ( ' ', i9 = 1, 9 ) /) 2037 2047 2038 2048 CHARACTER (LEN=100), DIMENSION(crmax) :: cross_profiles = & !< quantities to be plotted into one coordinate system, respectively 2039 (/ ' u v', &2040 ' pt', &2041 ' w"pt" w*pt* w*pt*BC wpt wptBC ', &2042 ' w"u" w*u* wu w"v" w*v* wv', &2043 ' km kh', &2044 ' l', &2049 (/ ' u v ', & 2050 ' pt ', & 2051 ' w"theta" w*theta* w*theta*BC wtheta wthetaBC ', & 2052 ' w"u" w*u* wu w"v" w*v* wv ', & 2053 ' km kh ', & 2054 ' l ', & 2045 2055 ( ' ', i9 = 1, 94 ) /) 2046 2056 -
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r3404 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! add default values of origin_x/y/z 28 ! 29 ! 3404 2018-10-23 13:29:11Z suehring 27 30 ! Consider time-dependent geostrophic wind components in offline nesting 28 31 ! … … 328 331 LOGICAL :: from_file_w = .FALSE. !< flag indicating whether w is already initialized from file 329 332 330 REAL(wp) :: fill_msoil !< fill value for soil moisture331 REAL(wp) :: fill_pt !< fill value for pt332 REAL(wp) :: fill_q !< fill value for q333 REAL(wp) :: fill_tsoil !< fill value for soil temperature334 REAL(wp) :: fill_u !< fill value for u335 REAL(wp) :: fill_v !< fill value for v336 REAL(wp) :: fill_w !< fill value for w337 REAL(wp) :: latitude !< latitude of the southern model boundary338 REAL(wp) :: longitude !< longitude of the western model boundary339 REAL(wp) :: origin_x !< x position of the western model boundary340 REAL(wp) :: origin_y !< y position of the northern model boundary341 REAL(wp) :: origin_z !< reference height of input data342 REAL(wp) :: rotation_angle 333 REAL(wp) :: fill_msoil !< fill value for soil moisture 334 REAL(wp) :: fill_pt !< fill value for pt 335 REAL(wp) :: fill_q !< fill value for q 336 REAL(wp) :: fill_tsoil !< fill value for soil temperature 337 REAL(wp) :: fill_u !< fill value for u 338 REAL(wp) :: fill_v !< fill value for v 339 REAL(wp) :: fill_w !< fill value for w 340 REAL(wp) :: latitude !< latitude of the southern model boundary 341 REAL(wp) :: longitude !< longitude of the western model boundary 342 REAL(wp) :: origin_x = 0.0_wp !< x position of the western model boundary (default: Hannover) 343 REAL(wp) :: origin_y = 0.0_wp !< y position of the northern model boundary (default: Hannover) 344 REAL(wp) :: origin_z = 0.0_wp !< reference height of input data (default: Hannover) 345 REAL(wp) :: rotation_angle = 0.0_wp !< rotation angle of input data 343 346 344 347 REAL(wp), DIMENSION(:), ALLOCATABLE :: msoil_1d !< initial vertical profile of soil moisture -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r3337 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix: move ocean output variables to ocean_mod 28 ! Renamed output variables 29 ! Add UTM coordinates to mask, 3d, xy, xz, yz output 30 ! 31 ! 3337 2018-10-12 15:17:09Z kanani 27 32 ! (from branch resler) 28 33 ! Add biometeorology … … 330 335 INTEGER(iwp), PARAMETER :: dopr_norm_num = 7, dopts_num = 29, dots_max = 100 331 336 332 CHARACTER (LEN= 6), DIMENSION(dopr_norm_num) :: dopr_norm_names = &333 (/ 'w pt0 ', 'ws2 ', 'tsw2 ', 'ws3 ', 'ws2tsw', 'wstsw2',&334 'z_i ' /)335 336 CHARACTER (LEN= 6), DIMENSION(dopr_norm_num) :: dopr_norm_longnames = &337 (/ 'w pt0 ', 'w*2 ', 't*w2 ', 'w*3 ', 'w*2t*w', 'w*t*w2',&338 'z_i ' /)337 CHARACTER (LEN=7), DIMENSION(dopr_norm_num) :: dopr_norm_names = & 338 (/ 'wtheta0', 'ws2 ', 'tsw2 ', 'ws3 ', 'ws2tsw ', 'wstsw2 ', & 339 'z_i ' /) 340 341 CHARACTER (LEN=7), DIMENSION(dopr_norm_num) :: dopr_norm_longnames = & 342 (/ 'wtheta0', 'w*2 ', 't*w2 ', 'w*3 ', 'w*2t*w ', 'w*t*w2 ', & 343 'z_i ' /) 339 344 340 345 CHARACTER (LEN=7), DIMENSION(dopts_num) :: dopts_label = & … … 358 363 CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_label = & 359 364 (/ 'E ', 'E* ', 'dt ', & 360 'u *', 'th* ', 'umax ', &365 'us* ', 'th* ', 'umax ', & 361 366 'vmax ', 'wmax ', 'div_new ', & 362 'div_old ', 'z _i_wpt ', 'z_i_pt', &363 'w* ', 'w" pt"0 ', 'w"pt"', &364 'w pt ', 'pt(0) ', 'pt(z_mo)', &367 'div_old ', 'zi_wtheta ', 'zi_theta ', & 368 'w* ', 'w"theta"0 ', 'w"theta" ', & 369 'wtheta ', 'theta(0) ', 'theta(z_mo) ', & 365 370 'w"u"0 ', 'w"v"0 ', 'w"q"0 ', & 366 371 'ol ', 'q* ', 'w"s" ', & … … 456 461 id_var_zw_xy, id_var_zw_xz, id_var_zw_yz, id_var_zw_3d 457 462 463 INTEGER(iwp), DIMENSION(0:1,0:2) :: id_var_eutm_3d, id_var_nutm_3d, & 464 id_var_eutm_xy, id_var_nutm_xy, & 465 id_var_eutm_xz, id_var_nutm_xz, & 466 id_var_eutm_yz, id_var_nutm_yz, & 467 id_var_eutm_ma, id_var_nutm_ma 468 458 469 INTEGER :: netcdf_data_format = 2 !< NetCDF3 64bit offset format 459 470 INTEGER :: netcdf_deflate = 0 !< NetCDF compression, default: no … … 498 509 id_var_zu_mask, id_var_zw_mask, & 499 510 id_var_zusi_mask, id_var_zwwi_mask 511 512 INTEGER(iwp), DIMENSION(1:max_masks,0:1,0:2) :: id_var_eutm_mask, & 513 id_var_nutm_mask 500 514 501 515 INTEGER(iwp), DIMENSION(1:max_masks,0:1,100) :: id_var_domask … … 596 610 USE land_surface_model_mod, & 597 611 ONLY: lsm_define_netcdf_grid, nzb_soil, nzt_soil, nzs, zs 612 613 USE netcdf_data_input_mod, & 614 ONLY: init_model 598 615 599 616 USE ocean_mod, & … … 692 709 693 710 LOGICAL, SAVE :: init_netcdf = .FALSE. !< 711 712 REAL(wp) :: cos_ra !< cosine of rotation_angle 713 REAL(wp) :: shift_x !< shift of x coordinate 714 REAL(wp) :: shift_y !< shift of y coordinate 715 REAL(wp) :: sin_ra !< sine of rotation_angle 694 716 695 717 REAL(wp), DIMENSION(1) :: last_time_coordinate !< last time value in file … … 901 923 'meters', '', 486, 487, 000 ) 902 924 ! 925 !-- Define UTM coordinates 926 IF ( init_model%rotation_angle == 0.0_wp ) THEN 927 CALL netcdf_create_var( id_set_mask(mid,av), & 928 (/ id_dim_x_mask(mid,av) /), & 929 'E_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,0), & 930 'm', '', 000, 000, 000 ) 931 CALL netcdf_create_var( id_set_mask(mid,av), & 932 (/ id_dim_y_mask(mid,av) /), & 933 'N_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,0), & 934 'm', '', 000, 000, 000 ) 935 CALL netcdf_create_var( id_set_mask(mid,av), & 936 (/ id_dim_xu_mask(mid,av) /), & 937 'Eu_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,1), & 938 'm', '', 000, 000, 000 ) 939 CALL netcdf_create_var( id_set_mask(mid,av), & 940 (/ id_dim_y_mask(mid,av) /), & 941 'Nu_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,1), & 942 'm', '', 000, 000, 000 ) 943 CALL netcdf_create_var( id_set_mask(mid,av), & 944 (/ id_dim_x_mask(mid,av) /), & 945 'Ev_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,2), & 946 'm', '', 000, 000, 000 ) 947 CALL netcdf_create_var( id_set_mask(mid,av), & 948 (/ id_dim_yv_mask(mid,av) /), & 949 'Nv_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,2), & 950 'm', '', 000, 000, 000 ) 951 ELSE 952 CALL netcdf_create_var( id_set_mask(mid,av), & 953 (/ id_dim_x_mask(mid,av), id_dim_y_mask(mid,av) /), & 954 'E_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,0), & 955 'm', '', 000, 000, 000 ) 956 CALL netcdf_create_var( id_set_mask(mid,av), & 957 (/ id_dim_x_mask(mid,av), id_dim_y_mask(mid,av) /), & 958 'N_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,0), & 959 'm', '', 000, 000, 000 ) 960 CALL netcdf_create_var( id_set_mask(mid,av), & 961 (/ id_dim_xu_mask(mid,av), id_dim_y_mask(mid,av) /), & 962 'Eu_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,1), & 963 'm', '', 000, 000, 000 ) 964 CALL netcdf_create_var( id_set_mask(mid,av), & 965 (/ id_dim_xu_mask(mid,av), id_dim_y_mask(mid,av) /), & 966 'Nu_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,1), & 967 'm', '', 000, 000, 000 ) 968 CALL netcdf_create_var( id_set_mask(mid,av), & 969 (/ id_dim_x_mask(mid,av), id_dim_yv_mask(mid,av) /), & 970 'Ev_UTM', NF90_DOUBLE, id_var_eutm_mask(mid,av,2), & 971 'm', '', 000, 000, 000 ) 972 CALL netcdf_create_var( id_set_mask(mid,av), & 973 (/ id_dim_x_mask(mid,av), id_dim_yv_mask(mid,av) /), & 974 'Nv_UTM', NF90_DOUBLE, id_var_nutm_mask(mid,av,2), & 975 'm', '', 000, 000, 000 ) 976 ENDIF 977 ! 903 978 !-- In case of non-flat topography define 2d-arrays containing the height 904 979 !-- information. Only for parallel netcdf output. … … 954 1029 ! 955 1030 !-- Most variables are defined on the scalar grid 956 CASE ( 'e', ' lpt', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', 'pt',&1031 CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', & 957 1032 'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', & 958 's', ' vpt')1033 's', 'theta', 'thetal', 'thetav' ) 959 1034 960 1035 grid_x = 'x' … … 1144 1219 1145 1220 ! 1221 !-- Write UTM coordinates 1222 IF ( init_model%rotation_angle == 0.0_wp ) THEN 1223 ! 1224 !-- 1D in case of no rotation 1225 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 1226 ! 1227 !-- x coordinates 1228 ALLOCATE( netcdf_data(mask_size(mid,1)) ) 1229 DO k = 0, 2 1230 ! 1231 !-- Scalar grid points 1232 IF ( k == 0 ) THEN 1233 shift_x = 0.5 1234 ! 1235 !-- u grid points 1236 ELSEIF ( k == 1 ) THEN 1237 shift_x = 0.0 1238 ! 1239 !-- v grid points 1240 ELSEIF ( k == 2 ) THEN 1241 shift_x = 0.5 1242 ENDIF 1243 1244 netcdf_data = init_model%origin_x + cos_ra & 1245 * ( mask_i_global(mid,:mask_size(mid,1)) + shift_x ) * dx 1246 1247 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 1248 id_var_eutm_mask(mid,av,k), & 1249 netcdf_data, start = (/ 1 /), & 1250 count = (/ mask_size(mid,1) /) ) 1251 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 1252 1253 ENDDO 1254 DEALLOCATE( netcdf_data ) 1255 ! 1256 !-- y coordinates 1257 ALLOCATE( netcdf_data(mask_size(mid,2)) ) 1258 DO k = 0, 2 1259 ! 1260 !-- Scalar grid points 1261 IF ( k == 0 ) THEN 1262 shift_y = 0.5 1263 ! 1264 !-- u grid points 1265 ELSEIF ( k == 1 ) THEN 1266 shift_y = 0.5 1267 ! 1268 !-- v grid points 1269 ELSEIF ( k == 2 ) THEN 1270 shift_y = 0.0 1271 ENDIF 1272 1273 netcdf_data = init_model%origin_y + cos_ra & 1274 * ( mask_j_global(mid,:mask_size(mid,2)) + shift_y ) * dy 1275 1276 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 1277 id_var_nutm_mask(mid,av,k), & 1278 netcdf_data, start = (/ 1 /), & 1279 count = (/ mask_size(mid,2) /) ) 1280 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 1281 1282 ENDDO 1283 DEALLOCATE( netcdf_data ) 1284 1285 ELSE 1286 ! 1287 !-- 2D in case of rotation 1288 ALLOCATE( netcdf_data_2d(mask_size(mid,1),mask_size(mid,2)) ) 1289 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 1290 sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp ) 1291 1292 DO k = 0, 2 1293 ! 1294 !-- Scalar grid points 1295 IF ( k == 0 ) THEN 1296 shift_x = 0.5 ; shift_y = 0.5 1297 ! 1298 !-- u grid points 1299 ELSEIF ( k == 1 ) THEN 1300 shift_x = 0.0 ; shift_y = 0.5 1301 ! 1302 !-- v grid points 1303 ELSEIF ( k == 2 ) THEN 1304 shift_x = 0.5 ; shift_y = 0.0 1305 ENDIF 1306 1307 DO j = 1, mask_size(mid,2) 1308 DO i = 1, mask_size(mid,1) 1309 netcdf_data_2d(i,j) = init_model%origin_x & 1310 + cos_ra * ( mask_i_global(mid,i) + shift_x ) * dx & 1311 + sin_ra * ( mask_j_global(mid,j) + shift_y ) * dy 1312 ENDDO 1313 ENDDO 1314 1315 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 1316 id_var_eutm_mask(mid,av,k), & 1317 netcdf_data_2d, start = (/ 1, 1 /), & 1318 count = (/ mask_size(mid,1), & 1319 mask_size(mid,2) /) ) 1320 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 1321 1322 DO j = 1, mask_size(mid,2) 1323 DO i = 1, mask_size(mid,1) 1324 netcdf_data_2d(i,j) = init_model%origin_y & 1325 - sin_ra * ( mask_i_global(mid,i) + shift_x ) * dx & 1326 + cos_ra * ( mask_j_global(mid,j) + shift_y ) * dy 1327 ENDDO 1328 ENDDO 1329 1330 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 1331 id_var_nutm_mask(mid,av,k), & 1332 netcdf_data_2d, start = (/ 1, 1 /), & 1333 count = (/ mask_size(mid,1), & 1334 mask_size(mid,2) /) ) 1335 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 1336 1337 ENDDO 1338 DEALLOCATE( netcdf_data_2d ) 1339 ENDIF 1340 1341 ! 1146 1342 !-- Write zu and zw data (vertical axes) 1147 1343 ALLOCATE( netcdf_data(mask_size(mid,3)) ) … … 1456 1652 362, 363, 000 ) 1457 1653 ! 1654 !-- Define UTM coordinates 1655 IF ( init_model%rotation_angle == 0.0_wp ) THEN 1656 CALL netcdf_create_var( id_set_3d(av), & 1657 (/ id_dim_x_3d(av) /), & 1658 'E_UTM', NF90_DOUBLE, id_var_eutm_3d(av,0), & 1659 'm', '', 000, 000, 000 ) 1660 CALL netcdf_create_var( id_set_3d(av), & 1661 (/ id_dim_y_3d(av) /), & 1662 'N_UTM', NF90_DOUBLE, id_var_nutm_3d(av,0), & 1663 'm', '', 000, 000, 000 ) 1664 CALL netcdf_create_var( id_set_3d(av), & 1665 (/ id_dim_xu_3d(av) /), & 1666 'Eu_UTM', NF90_DOUBLE, id_var_eutm_3d(av,1), & 1667 'm', '', 000, 000, 000 ) 1668 CALL netcdf_create_var( id_set_3d(av), & 1669 (/ id_dim_y_3d(av) /), & 1670 'Nu_UTM', NF90_DOUBLE, id_var_nutm_3d(av,1), & 1671 'm', '', 000, 000, 000 ) 1672 CALL netcdf_create_var( id_set_3d(av), & 1673 (/ id_dim_x_3d(av) /), & 1674 'Ev_UTM', NF90_DOUBLE, id_var_eutm_3d(av,2), & 1675 'm', '', 000, 000, 000 ) 1676 CALL netcdf_create_var( id_set_3d(av), & 1677 (/ id_dim_yv_3d(av) /), & 1678 'Nv_UTM', NF90_DOUBLE, id_var_nutm_3d(av,2), & 1679 'm', '', 000, 000, 000 ) 1680 ELSE 1681 CALL netcdf_create_var( id_set_3d(av), & 1682 (/ id_dim_x_3d(av), id_dim_y_3d(av) /), & 1683 'E_UTM', NF90_DOUBLE, id_var_eutm_3d(av,0), & 1684 'm', '', 000, 000, 000 ) 1685 CALL netcdf_create_var( id_set_3d(av), & 1686 (/ id_dim_x_3d(av), id_dim_y_3d(av) /), & 1687 'N_UTM', NF90_DOUBLE, id_var_nutm_3d(av,0), & 1688 'm', '', 000, 000, 000 ) 1689 CALL netcdf_create_var( id_set_3d(av), & 1690 (/ id_dim_xu_3d(av), id_dim_y_3d(av) /), & 1691 'Eu_UTM', NF90_DOUBLE, id_var_eutm_3d(av,1), & 1692 'm', '', 000, 000, 000 ) 1693 CALL netcdf_create_var( id_set_3d(av), & 1694 (/ id_dim_xu_3d(av), id_dim_y_3d(av) /), & 1695 'Nu_UTM', NF90_DOUBLE, id_var_nutm_3d(av,1), & 1696 'm', '', 000, 000, 000 ) 1697 CALL netcdf_create_var( id_set_3d(av), & 1698 (/ id_dim_x_3d(av), id_dim_yv_3d(av) /), & 1699 'Ev_UTM', NF90_DOUBLE, id_var_eutm_3d(av,2), & 1700 'm', '', 000, 000, 000 ) 1701 CALL netcdf_create_var( id_set_3d(av), & 1702 (/ id_dim_x_3d(av), id_dim_yv_3d(av) /), & 1703 'Nv_UTM', NF90_DOUBLE, id_var_nutm_3d(av,2), & 1704 'm', '', 000, 000, 000 ) 1705 ENDIF 1706 ! 1458 1707 !-- In case of non-flat topography define 2d-arrays containing the height 1459 1708 !-- information. Only output 2d topography information in case of parallel … … 1506 1755 ! 1507 1756 !-- Most variables are defined on the scalar grid 1508 CASE ( 'e', ' lpt', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', &1757 CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', & 1509 1758 'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', & 1510 ' rho_ocean', 's', 'sa', 'vpt' )1759 's', 'theta', 'thetal', 'thetav' ) 1511 1760 1512 1761 grid_x = 'x' … … 1551 1800 CALL lsm_define_netcdf_grid( do3d(av,i), found, grid_x, & 1552 1801 grid_y, grid_z ) 1802 ENDIF 1803 ! 1804 !-- Check for ocean quantities 1805 IF ( .NOT. found .AND. ocean_mode ) THEN 1806 CALL ocean_define_netcdf_grid( do3d(av,i), found, & 1807 grid_x, grid_y, grid_z ) 1553 1808 ENDIF 1554 1809 … … 1729 1984 DEALLOCATE( netcdf_data ) 1730 1985 1986 ! 1987 !-- Write UTM coordinates 1988 IF ( init_model%rotation_angle == 0.0_wp ) THEN 1989 ! 1990 !-- 1D in case of no rotation 1991 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 1992 ! 1993 !-- x coordinates 1994 ALLOCATE( netcdf_data(0:nx) ) 1995 DO k = 0, 2 1996 ! 1997 !-- Scalar grid points 1998 IF ( k == 0 ) THEN 1999 shift_x = 0.5 2000 ! 2001 !-- u grid points 2002 ELSEIF ( k == 1 ) THEN 2003 shift_x = 0.0 2004 ! 2005 !-- v grid points 2006 ELSEIF ( k == 2 ) THEN 2007 shift_x = 0.5 2008 ENDIF 2009 2010 DO i = 0, nx 2011 netcdf_data(i) = init_model%origin_x & 2012 + cos_ra * ( i + shift_x ) * dx 2013 ENDDO 2014 2015 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_eutm_3d(av,k),& 2016 netcdf_data, start = (/ 1 /), & 2017 count = (/ nx+1 /) ) 2018 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 2019 2020 ENDDO 2021 DEALLOCATE( netcdf_data ) 2022 ! 2023 !-- y coordinates 2024 ALLOCATE( netcdf_data(0:ny) ) 2025 DO k = 0, 2 2026 ! 2027 !-- Scalar grid points 2028 IF ( k == 0 ) THEN 2029 shift_y = 0.5 2030 ! 2031 !-- u grid points 2032 ELSEIF ( k == 1 ) THEN 2033 shift_y = 0.5 2034 ! 2035 !-- v grid points 2036 ELSEIF ( k == 2 ) THEN 2037 shift_y = 0.0 2038 ENDIF 2039 2040 DO j = 0, ny 2041 netcdf_data(j) = init_model%origin_y & 2042 + cos_ra * ( j + shift_y ) * dy 2043 ENDDO 2044 2045 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_nutm_3d(av,k),& 2046 netcdf_data, start = (/ 1 /), & 2047 count = (/ ny+1 /) ) 2048 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 2049 2050 ENDDO 2051 DEALLOCATE( netcdf_data ) 2052 2053 ELSE 2054 ! 2055 !-- 2D in case of rotation 2056 ALLOCATE( netcdf_data_2d(0:nx,0:ny) ) 2057 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 2058 sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp ) 2059 2060 DO k = 0, 2 2061 ! 2062 !-- Scalar grid points 2063 IF ( k == 0 ) THEN 2064 shift_x = 0.5 ; shift_y = 0.5 2065 ! 2066 !-- u grid points 2067 ELSEIF ( k == 1 ) THEN 2068 shift_x = 0.0 ; shift_y = 0.5 2069 ! 2070 !-- v grid points 2071 ELSEIF ( k == 2 ) THEN 2072 shift_x = 0.5 ; shift_y = 0.0 2073 ENDIF 2074 2075 DO j = 0, ny 2076 DO i = 0, nx 2077 netcdf_data_2d(i,j) = init_model%origin_x & 2078 + cos_ra * ( i + shift_x ) * dx & 2079 + sin_ra * ( j + shift_y ) * dy 2080 ENDDO 2081 ENDDO 2082 2083 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_eutm_3d(av,k), & 2084 netcdf_data_2d, start = (/ 1, 1 /), & 2085 count = (/ nx+1, ny+1 /) ) 2086 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 2087 2088 DO j = 0, ny 2089 DO i = 0, nx 2090 netcdf_data_2d(i,j) = init_model%origin_y & 2091 - sin_ra * ( i + shift_x ) * dx & 2092 + cos_ra * ( j + shift_y ) * dy 2093 ENDDO 2094 ENDDO 2095 2096 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_nutm_3d(av,k), & 2097 netcdf_data_2d, start = (/ 1, 1 /), & 2098 count = (/ nx+1, ny+1 /) ) 2099 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 2100 2101 ENDDO 2102 DEALLOCATE( netcdf_data_2d ) 2103 ENDIF 1731 2104 ! 1732 2105 !-- Write zu and zw data (vertical axes) … … 2242 2615 365, 366, 000 ) 2243 2616 ! 2617 !-- Define UTM coordinates 2618 IF ( init_model%rotation_angle == 0.0_wp ) THEN 2619 CALL netcdf_create_var( id_set_xy(av), & 2620 (/ id_dim_x_xy(av) /), & 2621 'E_UTM', NF90_DOUBLE, id_var_eutm_xy(av,0), & 2622 'm', '', 000, 000, 000 ) 2623 CALL netcdf_create_var( id_set_xy(av), & 2624 (/ id_dim_y_xy(av) /), & 2625 'N_UTM', NF90_DOUBLE, id_var_nutm_xy(av,0), & 2626 'm', '', 000, 000, 000 ) 2627 CALL netcdf_create_var( id_set_xy(av), & 2628 (/ id_dim_xu_xy(av) /), & 2629 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xy(av,1), & 2630 'm', '', 000, 000, 000 ) 2631 CALL netcdf_create_var( id_set_xy(av), & 2632 (/ id_dim_y_xy(av) /), & 2633 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xy(av,1), & 2634 'm', '', 000, 000, 000 ) 2635 CALL netcdf_create_var( id_set_xy(av), & 2636 (/ id_dim_x_xy(av) /), & 2637 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xy(av,2), & 2638 'm', '', 000, 000, 000 ) 2639 CALL netcdf_create_var( id_set_xy(av), & 2640 (/ id_dim_yv_xy(av) /), & 2641 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xy(av,2), & 2642 'm', '', 000, 000, 000 ) 2643 ELSE 2644 CALL netcdf_create_var( id_set_xy(av), & 2645 (/ id_dim_x_xy(av), id_dim_y_xy(av) /), & 2646 'E_UTM', NF90_DOUBLE, id_var_eutm_xy(av,0), & 2647 'm', '', 000, 000, 000 ) 2648 CALL netcdf_create_var( id_set_xy(av), & 2649 (/ id_dim_x_xy(av), id_dim_y_xy(av) /), & 2650 'N_UTM', NF90_DOUBLE, id_var_nutm_xy(av,0), & 2651 'm', '', 000, 000, 000 ) 2652 CALL netcdf_create_var( id_set_xy(av), & 2653 (/ id_dim_xu_xy(av), id_dim_y_xy(av) /), & 2654 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xy(av,1), & 2655 'm', '', 000, 000, 000 ) 2656 CALL netcdf_create_var( id_set_xy(av), & 2657 (/ id_dim_xu_xy(av), id_dim_y_xy(av) /), & 2658 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xy(av,1), & 2659 'm', '', 000, 000, 000 ) 2660 CALL netcdf_create_var( id_set_xy(av), & 2661 (/ id_dim_x_xy(av), id_dim_yv_xy(av) /), & 2662 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xy(av,2), & 2663 'm', '', 000, 000, 000 ) 2664 CALL netcdf_create_var( id_set_xy(av), & 2665 (/ id_dim_x_xy(av), id_dim_yv_xy(av) /), & 2666 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xy(av,2), & 2667 'm', '', 000, 000, 000 ) 2668 ENDIF 2669 ! 2244 2670 !-- In case of non-flat topography define 2d-arrays containing the height 2245 2671 !-- information. Only for parallel netcdf output. … … 2289 2715 ! 2290 2716 !-- Most variables are defined on the zu grid 2291 CASE ( 'e_xy', ' lpt_xy', 'nc_xy', 'nr_xy', 'p_xy',&2292 'pc_xy', 'pr_xy', 'prr_xy', ' pt_xy', 'q_xy',&2717 CASE ( 'e_xy', 'nc_xy', 'nr_xy', 'p_xy', & 2718 'pc_xy', 'pr_xy', 'prr_xy', 'q_xy', & 2293 2719 'qc_xy', 'ql_xy', 'ql_c_xy', 'ql_v_xy', & 2294 'ql_vp_xy', 'qr_xy', 'qv_xy', 'rho_ocean_xy', & 2295 's_xy', 'sa_xy', 'vpt_xy' ) 2720 'ql_vp_xy', 'qr_xy', 'qv_xy', & 2721 's_xy', & 2722 'theta_xy', 'thetal_xy', 'thetav_xy' ) 2296 2723 2297 2724 grid_x = 'x' … … 2335 2762 ENDIF 2336 2763 2764 ! 2765 !-- Check for ocean quantities 2766 IF ( .NOT. found .AND. ocean_mode ) THEN 2767 CALL ocean_define_netcdf_grid( do2d(av,i), found, & 2768 grid_x, grid_y, & 2769 grid_z ) 2770 ENDIF 2337 2771 ! 2338 2772 !-- Check for radiation quantities … … 2591 3025 2592 3026 DEALLOCATE( netcdf_data ) 2593 2594 ENDIF 2595 3027 ! 3028 !-- Write UTM coordinates 3029 IF ( init_model%rotation_angle == 0.0_wp ) THEN 3030 ! 3031 !-- 1D in case of no rotation 3032 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 3033 ! 3034 !-- x coordinates 3035 ALLOCATE( netcdf_data(0:nx) ) 3036 DO k = 0, 2 3037 ! 3038 !-- Scalar grid points 3039 IF ( k == 0 ) THEN 3040 shift_x = 0.5 3041 ! 3042 !-- u grid points 3043 ELSEIF ( k == 1 ) THEN 3044 shift_x = 0.0 3045 ! 3046 !-- v grid points 3047 ELSEIF ( k == 2 ) THEN 3048 shift_x = 0.5 3049 ENDIF 3050 3051 DO i = 0, nx 3052 netcdf_data(i) = init_model%origin_x & 3053 + cos_ra * ( i + shift_x ) * dx 3054 ENDDO 3055 3056 nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_eutm_xy(av,k),& 3057 netcdf_data, start = (/ 1 /), & 3058 count = (/ nx+1 /) ) 3059 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 3060 3061 ENDDO 3062 DEALLOCATE( netcdf_data ) 3063 ! 3064 !-- y coordinates 3065 ALLOCATE( netcdf_data(0:ny) ) 3066 DO k = 0, 2 3067 ! 3068 !-- Scalar grid points 3069 IF ( k == 0 ) THEN 3070 shift_y = 0.5 3071 ! 3072 !-- u grid points 3073 ELSEIF ( k == 1 ) THEN 3074 shift_y = 0.5 3075 ! 3076 !-- v grid points 3077 ELSEIF ( k == 2 ) THEN 3078 shift_y = 0.0 3079 ENDIF 3080 3081 DO j = 0, ny 3082 netcdf_data(j) = init_model%origin_y & 3083 + cos_ra * ( j + shift_y ) * dy 3084 ENDDO 3085 3086 nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_nutm_xy(av,k),& 3087 netcdf_data, start = (/ 1 /), & 3088 count = (/ ny+1 /) ) 3089 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 3090 3091 ENDDO 3092 DEALLOCATE( netcdf_data ) 3093 3094 ELSE 3095 ! 3096 !-- 2D in case of rotation 3097 ALLOCATE( netcdf_data_2d(0:nx,0:ny) ) 3098 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 3099 sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp ) 3100 3101 DO k = 0, 2 3102 ! 3103 !-- Scalar grid points 3104 IF ( k == 0 ) THEN 3105 shift_x = 0.5 ; shift_y = 0.5 3106 ! 3107 !-- u grid points 3108 ELSEIF ( k == 1 ) THEN 3109 shift_x = 0.0 ; shift_y = 0.5 3110 ! 3111 !-- v grid points 3112 ELSEIF ( k == 2 ) THEN 3113 shift_x = 0.5 ; shift_y = 0.0 3114 ENDIF 3115 3116 DO j = 0, ny 3117 DO i = 0, nx 3118 netcdf_data_2d(i,j) = init_model%origin_x & 3119 + cos_ra * ( i + shift_x ) * dx & 3120 + sin_ra * ( j + shift_y ) * dy 3121 ENDDO 3122 ENDDO 3123 3124 nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_eutm_xy(av,k), & 3125 netcdf_data_2d, start = (/ 1, 1 /), & 3126 count = (/ nx+1, ny+1 /) ) 3127 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 3128 3129 DO j = 0, ny 3130 DO i = 0, nx 3131 netcdf_data_2d(i,j) = init_model%origin_y & 3132 - sin_ra * ( i + shift_x ) * dx & 3133 + cos_ra * ( j + shift_y ) * dy 3134 ENDDO 3135 ENDDO 3136 3137 nc_stat = NF90_PUT_VAR( id_set_xy(av), id_var_nutm_xy(av,k), & 3138 netcdf_data_2d, start = (/ 1, 1 /), & 3139 count = (/ nx+1, ny+1 /) ) 3140 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 3141 3142 ENDDO 3143 DEALLOCATE( netcdf_data_2d ) 3144 ENDIF 3145 3146 ENDIF 2596 3147 ! 2597 3148 !-- In case of non-flat topography write height information. Only for … … 2985 3536 NF90_DOUBLE, id_var_zw_xz(av), 'meters', '', & 2986 3537 157, 158, 000 ) 3538 ! 3539 !-- Define UTM coordinates 3540 IF ( init_model%rotation_angle == 0.0_wp ) THEN 3541 CALL netcdf_create_var( id_set_xz(av), & 3542 (/ id_dim_x_xz(av) /), & 3543 'E_UTM', NF90_DOUBLE, id_var_eutm_xz(av,0), & 3544 'm', '', 000, 000, 000 ) 3545 CALL netcdf_create_var( id_set_xz(av), & 3546 (/ id_dim_y_xz(av) /), & 3547 'N_UTM', NF90_DOUBLE, id_var_nutm_xz(av,0), & 3548 'm', '', 000, 000, 000 ) 3549 CALL netcdf_create_var( id_set_xz(av), & 3550 (/ id_dim_xu_xz(av) /), & 3551 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xz(av,1), & 3552 'm', '', 000, 000, 000 ) 3553 CALL netcdf_create_var( id_set_xz(av), & 3554 (/ id_dim_y_xz(av) /), & 3555 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xz(av,1), & 3556 'm', '', 000, 000, 000 ) 3557 CALL netcdf_create_var( id_set_xz(av), & 3558 (/ id_dim_x_xz(av) /), & 3559 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xz(av,2), & 3560 'm', '', 000, 000, 000 ) 3561 CALL netcdf_create_var( id_set_xz(av), & 3562 (/ id_dim_yv_xz(av) /), & 3563 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xz(av,2), & 3564 'm', '', 000, 000, 000 ) 3565 ELSE 3566 CALL netcdf_create_var( id_set_xz(av), & 3567 (/ id_dim_x_xz(av), id_dim_y_xz(av) /), & 3568 'E_UTM', NF90_DOUBLE, id_var_eutm_xz(av,0), & 3569 'm', '', 000, 000, 000 ) 3570 CALL netcdf_create_var( id_set_xz(av), & 3571 (/ id_dim_x_xz(av), id_dim_y_xz(av) /), & 3572 'N_UTM', NF90_DOUBLE, id_var_nutm_xz(av,0), & 3573 'm', '', 000, 000, 000 ) 3574 CALL netcdf_create_var( id_set_xz(av), & 3575 (/ id_dim_xu_xz(av), id_dim_y_xz(av) /), & 3576 'Eu_UTM', NF90_DOUBLE, id_var_eutm_xz(av,1), & 3577 'm', '', 000, 000, 000 ) 3578 CALL netcdf_create_var( id_set_xz(av), & 3579 (/ id_dim_xu_xz(av), id_dim_y_xz(av) /), & 3580 'Nu_UTM', NF90_DOUBLE, id_var_nutm_xz(av,1), & 3581 'm', '', 000, 000, 000 ) 3582 CALL netcdf_create_var( id_set_xz(av), & 3583 (/ id_dim_x_xz(av), id_dim_yv_xz(av) /), & 3584 'Ev_UTM', NF90_DOUBLE, id_var_eutm_xz(av,2), & 3585 'm', '', 000, 000, 000 ) 3586 CALL netcdf_create_var( id_set_xz(av), & 3587 (/ id_dim_x_xz(av), id_dim_yv_xz(av) /), & 3588 'Nv_UTM', NF90_DOUBLE, id_var_nutm_xz(av,2), & 3589 'm', '', 000, 000, 000 ) 3590 ENDIF 2987 3591 2988 3592 IF ( land_surface ) THEN … … 3011 3615 ! 3012 3616 !-- Most variables are defined on the zu grid 3013 CASE ( 'e_xz', ' lpt_xz', 'nc_xz', 'nr_xz', 'p_xz', 'pc_xz',&3014 'pr_xz', 'prr_xz', ' pt_xz', 'q_xz', 'qc_xz',&3617 CASE ( 'e_xz', 'nc_xz', 'nr_xz', 'p_xz', 'pc_xz', & 3618 'pr_xz', 'prr_xz', 'q_xz', 'qc_xz', & 3015 3619 'ql_xz', 'ql_c_xz', 'ql_v_xz', 'ql_vp_xz', 'qr_xz', & 3016 'qv_xz', 'rho_ocean_xz', 's_xz', 'sa_xz', 'vpt_xz' ) 3620 'qv_xz', 's_xz', & 3621 'theta_xz', 'thetal_xz', 'thetav_xz' ) 3017 3622 3018 3623 grid_x = 'x' … … 3055 3660 ENDIF 3056 3661 3662 ! 3663 !-- Check for ocean quantities 3664 IF ( .NOT. found .AND. ocean_mode ) THEN 3665 CALL ocean_define_netcdf_grid( do2d(av,i), found, & 3666 grid_x, grid_y, grid_z ) 3667 ENDIF 3057 3668 ! 3058 3669 !-- Check for radiation quantities … … 3294 3905 ENDIF 3295 3906 3296 3297 3907 DEALLOCATE( netcdf_data ) 3908 ! 3909 !-- Write UTM coordinates 3910 IF ( init_model%rotation_angle == 0.0_wp ) THEN 3911 ! 3912 !-- 1D in case of no rotation 3913 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 3914 ! 3915 !-- x coordinates 3916 ALLOCATE( netcdf_data(0:nx) ) 3917 DO k = 0, 2 3918 ! 3919 !-- Scalar grid points 3920 IF ( k == 0 ) THEN 3921 shift_x = 0.5 3922 ! 3923 !-- u grid points 3924 ELSEIF ( k == 1 ) THEN 3925 shift_x = 0.0 3926 ! 3927 !-- v grid points 3928 ELSEIF ( k == 2 ) THEN 3929 shift_x = 0.5 3930 ENDIF 3931 3932 DO i = 0, nx 3933 netcdf_data(i) = init_model%origin_x & 3934 + cos_ra * ( i + shift_x ) * dx 3935 ENDDO 3936 3937 nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_eutm_xz(av,k),& 3938 netcdf_data, start = (/ 1 /), & 3939 count = (/ nx+1 /) ) 3940 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 3941 3942 ENDDO 3943 DEALLOCATE( netcdf_data ) 3944 ! 3945 !-- y coordinates 3946 ALLOCATE( netcdf_data(1:ns) ) 3947 DO k = 0, 2 3948 ! 3949 !-- Scalar grid points 3950 IF ( k == 0 ) THEN 3951 shift_y = 0.5 3952 ! 3953 !-- u grid points 3954 ELSEIF ( k == 1 ) THEN 3955 shift_y = 0.5 3956 ! 3957 !-- v grid points 3958 ELSEIF ( k == 2 ) THEN 3959 shift_y = 0.0 3960 ENDIF 3961 3962 DO i = 1, ns 3963 IF( section(i,2) == -1 ) THEN 3964 netcdf_data(i) = -1.0_wp ! section averaged along y 3965 ELSE 3966 netcdf_data(i) = init_model%origin_y & 3967 + cos_ra * ( section(i,2) + shift_y ) * dy 3968 ENDIF 3969 ENDDO 3970 3971 nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_nutm_xz(av,k),& 3972 netcdf_data, start = (/ 1 /), & 3973 count = (/ ns /) ) 3974 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 3975 3976 ENDDO 3977 DEALLOCATE( netcdf_data ) 3978 3979 ELSE 3980 ! 3981 !-- 2D in case of rotation 3982 ALLOCATE( netcdf_data_2d(0:nx,1:ns) ) 3983 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 3984 sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp ) 3985 3986 DO k = 0, 2 3987 ! 3988 !-- Scalar grid points 3989 IF ( k == 0 ) THEN 3990 shift_x = 0.5 ; shift_y = 0.5 3991 ! 3992 !-- u grid points 3993 ELSEIF ( k == 1 ) THEN 3994 shift_x = 0.0 ; shift_y = 0.5 3995 ! 3996 !-- v grid points 3997 ELSEIF ( k == 2 ) THEN 3998 shift_x = 0.5 ; shift_y = 0.0 3999 ENDIF 4000 4001 DO j = 1, ns 4002 IF( section(j,2) == -1 ) THEN 4003 netcdf_data_2d(:,j) = -1.0_wp ! section averaged along y 4004 ELSE 4005 DO i = 0, nx 4006 netcdf_data_2d(i,j) = init_model%origin_x & 4007 + cos_ra * ( i + shift_x ) * dx & 4008 + sin_ra * ( section(j,2) + shift_y ) * dy 4009 ENDDO 4010 ENDIF 4011 ENDDO 4012 4013 nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_eutm_xz(av,k), & 4014 netcdf_data_2d, start = (/ 1, 1 /), & 4015 count = (/ nx+1, ns /) ) 4016 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 4017 4018 DO j = 1, ns 4019 IF( section(j,2) == -1 ) THEN 4020 netcdf_data_2d(:,j) = -1.0_wp ! section averaged along y 4021 ELSE 4022 DO i = 0, nx 4023 netcdf_data_2d(i,j) = init_model%origin_y & 4024 - sin_ra * ( i + shift_x ) * dx & 4025 + cos_ra * ( section(j,2) + shift_y ) * dy 4026 ENDDO 4027 ENDIF 4028 ENDDO 4029 4030 nc_stat = NF90_PUT_VAR( id_set_xz(av), id_var_nutm_xz(av,k), & 4031 netcdf_data_2d, start = (/ 1, 1 /), & 4032 count = (/ nx+1, ns /) ) 4033 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 4034 4035 ENDDO 4036 DEALLOCATE( netcdf_data_2d ) 4037 ENDIF 3298 4038 3299 4039 ENDIF … … 3654 4394 NF90_DOUBLE, id_var_zw_yz(av), 'meters', '', & 3655 4395 196, 197, 000 ) 4396 ! 4397 !-- Define UTM coordinates 4398 IF ( init_model%rotation_angle == 0.0_wp ) THEN 4399 CALL netcdf_create_var( id_set_yz(av), & 4400 (/ id_dim_x_yz(av) /), & 4401 'E_UTM', NF90_DOUBLE, id_var_eutm_yz(av,0), & 4402 'm', '', 000, 000, 000 ) 4403 CALL netcdf_create_var( id_set_yz(av), & 4404 (/ id_dim_y_yz(av) /), & 4405 'N_UTM', NF90_DOUBLE, id_var_nutm_yz(av,0), & 4406 'm', '', 000, 000, 000 ) 4407 CALL netcdf_create_var( id_set_yz(av), & 4408 (/ id_dim_xu_yz(av) /), & 4409 'Eu_UTM', NF90_DOUBLE, id_var_eutm_yz(av,1), & 4410 'm', '', 000, 000, 000 ) 4411 CALL netcdf_create_var( id_set_yz(av), & 4412 (/ id_dim_y_yz(av) /), & 4413 'Nu_UTM', NF90_DOUBLE, id_var_nutm_yz(av,1), & 4414 'm', '', 000, 000, 000 ) 4415 CALL netcdf_create_var( id_set_yz(av), & 4416 (/ id_dim_x_yz(av) /), & 4417 'Ev_UTM', NF90_DOUBLE, id_var_eutm_yz(av,2), & 4418 'm', '', 000, 000, 000 ) 4419 CALL netcdf_create_var( id_set_yz(av), & 4420 (/ id_dim_yv_yz(av) /), & 4421 'Nv_UTM', NF90_DOUBLE, id_var_nutm_yz(av,2), & 4422 'm', '', 000, 000, 000 ) 4423 ELSE 4424 CALL netcdf_create_var( id_set_yz(av), & 4425 (/ id_dim_x_yz(av), id_dim_y_yz(av) /), & 4426 'E_UTM', NF90_DOUBLE, id_var_eutm_yz(av,0), & 4427 'm', '', 000, 000, 000 ) 4428 CALL netcdf_create_var( id_set_yz(av), & 4429 (/ id_dim_x_yz(av), id_dim_y_yz(av) /), & 4430 'N_UTM', NF90_DOUBLE, id_var_nutm_yz(av,0), & 4431 'm', '', 000, 000, 000 ) 4432 CALL netcdf_create_var( id_set_yz(av), & 4433 (/ id_dim_xu_yz(av), id_dim_y_yz(av) /), & 4434 'Eu_UTM', NF90_DOUBLE, id_var_eutm_yz(av,1), & 4435 'm', '', 000, 000, 000 ) 4436 CALL netcdf_create_var( id_set_yz(av), & 4437 (/ id_dim_xu_yz(av), id_dim_y_yz(av) /), & 4438 'Nu_UTM', NF90_DOUBLE, id_var_nutm_yz(av,1), & 4439 'm', '', 000, 000, 000 ) 4440 CALL netcdf_create_var( id_set_yz(av), & 4441 (/ id_dim_x_yz(av), id_dim_yv_yz(av) /), & 4442 'Ev_UTM', NF90_DOUBLE, id_var_eutm_yz(av,2), & 4443 'm', '', 000, 000, 000 ) 4444 CALL netcdf_create_var( id_set_yz(av), & 4445 (/ id_dim_x_yz(av), id_dim_yv_yz(av) /), & 4446 'Nv_UTM', NF90_DOUBLE, id_var_nutm_yz(av,2), & 4447 'm', '', 000, 000, 000 ) 4448 ENDIF 3656 4449 3657 4450 IF ( land_surface ) THEN … … 3680 4473 ! 3681 4474 !-- Most variables are defined on the zu grid 3682 CASE ( 'e_yz', ' lpt_yz', 'nc_yz', 'nr_yz', 'p_yz', 'pc_yz',&3683 'pr_yz','prr_yz', ' pt_yz', 'q_yz', 'qc_yz', 'ql_yz',&4475 CASE ( 'e_yz', 'nc_yz', 'nr_yz', 'p_yz', 'pc_yz', & 4476 'pr_yz','prr_yz', 'q_yz', 'qc_yz', 'ql_yz', & 3684 4477 'ql_c_yz', 'ql_v_yz', 'ql_vp_yz', 'qr_yz', 'qv_yz', & 3685 'rho_ocean_yz', 's_yz', 'sa_yz', 'vpt_yz' ) 4478 's_yz', & 4479 'theta_yz', 'thetal_yz', 'thetav_yz' ) 3686 4480 3687 4481 grid_x = 'x' … … 3724 4518 ENDIF 3725 4519 4520 ! 4521 !-- Check for ocean quantities 4522 IF ( .NOT. found .AND. ocean_mode ) THEN 4523 CALL ocean_define_netcdf_grid( do2d(av,i), found, & 4524 grid_x, grid_y, grid_z ) 4525 ENDIF 3726 4526 ! 3727 4527 !-- Check for radiation quantities … … 3951 4751 3952 4752 DEALLOCATE( netcdf_data ) 4753 ! 4754 !-- Write UTM coordinates 4755 IF ( init_model%rotation_angle == 0.0_wp ) THEN 4756 ! 4757 !-- 1D in case of no rotation 4758 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 4759 ! 4760 !-- x coordinates 4761 ALLOCATE( netcdf_data(1:ns) ) 4762 DO k = 0, 2 4763 ! 4764 !-- Scalar grid points 4765 IF ( k == 0 ) THEN 4766 shift_x = 0.5 4767 ! 4768 !-- u grid points 4769 ELSEIF ( k == 1 ) THEN 4770 shift_x = 0.0 4771 ! 4772 !-- v grid points 4773 ELSEIF ( k == 2 ) THEN 4774 shift_x = 0.5 4775 ENDIF 4776 4777 DO i = 1, ns 4778 IF( section(i,3) == -1 ) THEN 4779 netcdf_data(i) = -1.0_wp ! section averaged along x 4780 ELSE 4781 netcdf_data(i) = init_model%origin_x & 4782 + cos_ra * ( section(i,3) + shift_x ) * dx 4783 ENDIF 4784 ENDDO 4785 4786 nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_eutm_yz(av,k),& 4787 netcdf_data, start = (/ 1 /), & 4788 count = (/ ns /) ) 4789 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 4790 4791 ENDDO 4792 DEALLOCATE( netcdf_data ) 4793 ! 4794 !-- y coordinates 4795 ALLOCATE( netcdf_data(0:ny) ) 4796 DO k = 0, 2 4797 ! 4798 !-- Scalar grid points 4799 IF ( k == 0 ) THEN 4800 shift_y = 0.5 4801 ! 4802 !-- u grid points 4803 ELSEIF ( k == 1 ) THEN 4804 shift_y = 0.5 4805 ! 4806 !-- v grid points 4807 ELSEIF ( k == 2 ) THEN 4808 shift_y = 0.0 4809 ENDIF 4810 4811 DO i = 0, ny 4812 netcdf_data(i) = init_model%origin_y & 4813 + cos_ra * ( i + shift_y ) * dy 4814 ENDDO 4815 4816 nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_nutm_yz(av,k),& 4817 netcdf_data, start = (/ 1 /), & 4818 count = (/ ny+1 /) ) 4819 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 4820 4821 ENDDO 4822 DEALLOCATE( netcdf_data ) 4823 4824 ELSE 4825 ! 4826 !-- 2D in case of rotation 4827 ALLOCATE( netcdf_data_2d(1:ns,0:ny) ) 4828 cos_ra = COS( init_model%rotation_angle * pi / 180.0_wp ) 4829 sin_ra = SIN( init_model%rotation_angle * pi / 180.0_wp ) 4830 4831 DO k = 0, 2 4832 ! 4833 !-- Scalar grid points 4834 IF ( k == 0 ) THEN 4835 shift_x = 0.5 ; shift_y = 0.5 4836 ! 4837 !-- u grid points 4838 ELSEIF ( k == 1 ) THEN 4839 shift_x = 0.0 ; shift_y = 0.5 4840 ! 4841 !-- v grid points 4842 ELSEIF ( k == 2 ) THEN 4843 shift_x = 0.5 ; shift_y = 0.0 4844 ENDIF 4845 4846 DO j = 0, ny 4847 DO i = 1, ns 4848 IF( section(i,3) == -1 ) THEN 4849 netcdf_data_2d(i,:) = -1.0_wp !section averaged along x 4850 ELSE 4851 netcdf_data_2d(i,j) = init_model%origin_x & 4852 + cos_ra * ( section(i,3) + shift_x ) * dx & 4853 + sin_ra * ( j + shift_y ) * dy 4854 ENDIF 4855 ENDDO 4856 ENDDO 4857 4858 nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_eutm_yz(av,k), & 4859 netcdf_data_2d, start = (/ 1, 1 /), & 4860 count = (/ ns, ny+1 /) ) 4861 CALL netcdf_handle_error( 'netcdf_define_header', 555 ) 4862 4863 DO j = 0, ny 4864 DO i = 1, ns 4865 IF( section(i,3) == -1 ) THEN 4866 netcdf_data_2d(i,:) = -1.0_wp !section averaged along x 4867 ELSE 4868 netcdf_data_2d(i,j) = init_model%origin_y & 4869 - sin_ra * ( section(i,3) + shift_x ) * dx & 4870 + cos_ra * ( j + shift_y ) * dy 4871 ENDIF 4872 ENDDO 4873 ENDDO 4874 4875 nc_stat = NF90_PUT_VAR( id_set_yz(av), id_var_nutm_yz(av,k), & 4876 netcdf_data_2d, start = (/ 1, 1 /), & 4877 count = (/ ns, ny+1 /) ) 4878 CALL netcdf_handle_error( 'netcdf_define_header', 556 ) 4879 4880 ENDDO 4881 DEALLOCATE( netcdf_data_2d ) 4882 ENDIF 3953 4883 3954 4884 ENDIF … … 4871 5801 ! 4872 5802 !-- Most variables are defined on the zu levels 4873 CASE ( 'e', ' lpt', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', 'pt', &5803 CASE ( 'e', 'nc', 'nr', 'p', 'pc', 'pr', 'prr', & 4874 5804 'q', 'qc', 'ql', 'ql_c', 'ql_v', 'ql_vp', 'qr', 'qv', & 4875 'rho_ocean', 's', 'sa', 'u', 'v', 'vpt' ) 5805 'rho_sea_water', 's', 'sa', & 5806 'theta', 'thetal', 'thetav', 'u', 'v' ) 4876 5807 4877 5808 grid_z = 'zu' -
palm/trunk/SOURCE/ocean_mod.f90
r3381 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3381 2018-10-19 13:09:06Z raasch 27 30 ! spin-up cooling for ocean surface implemented, see new parameter 28 31 ! surface_cooling_spinup_time … … 674 677 SELECT CASE ( TRIM( var ) ) 675 678 676 CASE ( 'rho_ ocean' )679 CASE ( 'rho_sea_water' ) 677 680 unit = 'kg/m3' 678 681 … … 723 726 unit = dopr_unit 724 727 725 CASE ( 'rho_ ocean' )728 CASE ( 'rho_sea_water' ) 726 729 dopr_index(var_count) = 64 727 730 dopr_unit = 'kg/m3' … … 797 800 SELECT CASE ( TRIM( var ) ) 798 801 799 CASE ( 'rho_ocean', 'sa' ) 802 CASE ( 'rho_sea_water', 'rho_sea_water_xy', 'rho_sea_water_xz', & 803 'rho_sea_water_yz', 'sa', 'sa_xy', 'sa_xz', 'sa_yz' ) 800 804 grid_x = 'x' 801 805 grid_y = 'y' … … 846 850 SELECT CASE ( TRIM( variable ) ) 847 851 848 CASE ( 'rho_ ocean' )852 CASE ( 'rho_sea_water' ) 849 853 IF ( .NOT. ALLOCATED( rho_ocean_av ) ) THEN 850 854 ALLOCATE( rho_ocean_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) … … 867 871 SELECT CASE ( TRIM( variable ) ) 868 872 869 CASE ( 'rho_ ocean' )873 CASE ( 'rho_sea_water' ) 870 874 IF ( ALLOCATED( rho_ocean_av ) ) THEN 871 875 DO i = nxlg, nxrg … … 899 903 SELECT CASE ( TRIM( variable ) ) 900 904 901 CASE ( 'rho_ ocean' )905 CASE ( 'rho_sea_water' ) 902 906 IF ( ALLOCATED( rho_ocean_av ) ) THEN 903 907 DO i = nxlg, nxrg … … 980 984 SELECT CASE ( TRIM( variable ) ) 981 985 982 CASE ( 'rho_ ocean_xy', 'rho_ocean_xz', 'rho_ocean_yz' )986 CASE ( 'rho_sea_water_xy', 'rho_sea_water_xz', 'rho_sea_water_yz' ) 983 987 IF ( av == 0 ) THEN 984 988 to_be_resorted => rho_ocean … … 1073 1077 SELECT CASE ( TRIM( variable ) ) 1074 1078 1075 CASE ( 'rho_ ocean' )1079 CASE ( 'rho_sea_water' ) 1076 1080 IF ( av == 0 ) THEN 1077 1081 to_be_resorted => rho_ocean -
palm/trunk/SOURCE/parin.f90
r3355 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Added module for data output at surfaces 28 ! 29 ! 3355 2018-10-16 14:03:34Z knoop 27 30 ! - offline nesting separated from large-scale forcing module 28 31 ! - top boundary condition for pressure in offline nesting changed … … 512 515 USE statistics, & 513 516 ONLY: hom, hom_sum, pr_palm, region, statistic_regions 517 518 USE surface_output_mod, & 519 ONLY: surface_output_parin 514 520 515 521 USE synthetic_turbulence_generator_mod, & … … 874 880 !-- Check for module namelists and read them 875 881 CALL lsm_parin 876 CALL bcm_parin 882 ! 883 !-- Check if bulk cloud model is used and read namelist if required 884 CALL bcm_parin 885 ! 886 !-- Check if surface output is enabled and read 887 !-- &surface_output_parameters if required 888 CALL surface_output_parin 877 889 CALL usm_parin 878 890 CALL spectra_parin -
palm/trunk/SOURCE/print_1d.f90
r3241 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3241 2018-09-12 15:02:00Z raasch 27 30 ! unused format statement removed 28 31 ! … … 181 184 111 FORMAT (1X,131('-')) 182 185 112 FORMAT (/) 183 120 FORMAT (' k zu u du v dv pt dpt', &186 120 FORMAT (' k zu u du v dv theta dtheta ', & 184 187 ' e Km Kh l zu k') 185 188 121 FORMAT (1X,I4,1X,F7.1,1X,F6.2,1X,F5.2,1X,F6.2,1X,F5.2,2X,F6.2,1X,F5.2, & 186 189 1X,F7.4,1X,F5.2,1X,F5.2,1X,F6.2,1X,F7.1,2X,I4) 187 130 FORMAT (' k zw w'' pt'' wptw''u'' wu ',&190 130 FORMAT (' k zw w''theta'' wtheta w''u'' wu ',& 188 191 ' w''v'' wv zw k') 189 192 131 FORMAT (1X,I4,1X,F7.1,6(1X,E10.3),1X,F7.1,2X,I4) -
palm/trunk/SOURCE/spectra_mod.f90
r3248 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3248 2018-09-14 09:42:06Z sward 27 30 ! Minor formating changes 28 31 ! … … 622 625 d(nzb+1:nzt,nys:nyn,nxl:nxr) = w(nzb+1:nzt,nys:nyn,nxl:nxr) 623 626 624 CASE ( ' pt' )627 CASE ( 'theta' ) 625 628 pr = 4 626 629 d(nzb+1:nzt,nys:nyn,nxl:nxr) = pt(nzb+1:nzt,nys:nyn,nxl:nxr) -
palm/trunk/SOURCE/sum_up_3d_data.f90
r3337 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3337 2018-10-12 15:17:09Z kanani 27 30 ! (from branch resler) 28 31 ! Add biometeorology, … … 331 334 e_av = 0.0_wp 332 335 333 CASE ( ' lpt' )336 CASE ( 'thetal' ) 334 337 IF ( .NOT. ALLOCATED( lpt_av ) ) THEN 335 338 ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) … … 367 370 pr_av = 0.0_wp 368 371 369 CASE ( ' pt' )372 CASE ( 'theta' ) 370 373 IF ( .NOT. ALLOCATED( pt_av ) ) THEN 371 374 ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) … … 457 460 u_av = 0.0_wp 458 461 459 CASE ( 'u *' )462 CASE ( 'us*' ) 460 463 IF ( .NOT. ALLOCATED( us_av ) ) THEN 461 464 ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) … … 469 472 v_av = 0.0_wp 470 473 471 CASE ( ' vpt' )474 CASE ( 'thetav' ) 472 475 IF ( .NOT. ALLOCATED( vpt_av ) ) THEN 473 476 ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) … … 609 612 ENDIF 610 613 611 CASE ( ' lpt' )614 CASE ( 'thetal' ) 612 615 IF ( ALLOCATED( lpt_av ) ) THEN 613 616 DO i = nxlg, nxrg … … 712 715 ENDIF 713 716 714 CASE ( ' pt' )717 CASE ( 'theta' ) 715 718 IF ( ALLOCATED( pt_av ) ) THEN 716 719 IF ( .NOT. bulk_cloud_model ) THEN … … 1005 1008 ENDIF 1006 1009 1007 CASE ( 'u *' )1010 CASE ( 'us*' ) 1008 1011 IF ( ALLOCATED( us_av ) ) THEN 1009 1012 DO i = nxl, nxr … … 1044 1047 ENDIF 1045 1048 1046 CASE ( ' vpt' )1049 CASE ( 'thetav' ) 1047 1050 IF ( ALLOCATED( vpt_av ) ) THEN 1048 1051 DO i = nxlg, nxrg -
palm/trunk/SOURCE/time_integration.f90
r3418 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Surface data output 28 ! 29 ! 3418 2018-10-24 16:07:39Z kanani 27 30 ! call to material_heat_model now with check if spinup runs (rvtils) 28 31 ! … … 432 435 skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz, & 433 436 skip_time_do3d, skip_time_domask, skip_time_dopr, & 434 skip_time_data_output_av, sloping_surface, & 435 stop_dt, terminate_coupled, terminate_run, timestep_scheme, & 437 skip_time_data_output_av, sloping_surface, stop_dt, & 438 surface_data_output, terminate_coupled, terminate_run, & 439 timestep_scheme, & 436 440 time_coupling, time_do2d_xy, time_do2d_xz, time_do2d_yz, & 437 441 time_do3d, time_domask, time_dopr, time_dopr_av, & … … 519 523 USE surface_mod, & 520 524 ONLY: surf_def_h, surf_lsm_h, surf_usm_h 525 526 USE surface_output_mod, & 527 ONLY: average_count_surf, averaging_interval_surf, dt_dosurf, & 528 dt_dosurf_av, surface_output, surface_output_averaging, & 529 skip_time_dosurf, skip_time_dosurf_av, time_dosurf, & 530 time_dosurf_av 521 531 522 532 USE turbulence_closure_mod, & … … 1235 1245 time_run_control = time_run_control + dt_3d 1236 1246 ! 1247 !-- Increment time-counter for surface output 1248 IF ( surface_data_output ) THEN 1249 IF ( simulated_time >= skip_time_dosurf ) THEN 1250 time_dosurf = time_dosurf + dt_3d 1251 ENDIF 1252 IF ( simulated_time >= skip_time_dosurf_av ) THEN 1253 time_dosurf_av = time_dosurf_av + dt_3d 1254 ENDIF 1255 ENDIF 1256 ! 1237 1257 !-- In case of synthetic turbulence generation and parametrized turbulence 1238 1258 !-- information, update the time counter and if required, adjust the … … 1324 1344 average_count_3d = average_count_3d + 1 1325 1345 time_do_sla = MOD( time_do_sla, MAX( dt_averaging_input, dt_3d ) ) 1346 ENDIF 1347 ENDIF 1348 ! 1349 !-- Average surface data 1350 IF ( surface_data_output ) THEN 1351 IF ( averaging_interval_surf /= 0.0_wp .AND. & 1352 ( dt_dosurf_av - time_dosurf_av ) <= averaging_interval_surf & 1353 .AND. simulated_time >= skip_time_dosurf_av ) THEN 1354 IF ( time_dosurf_av >= dt_averaging_input ) THEN 1355 CALL surface_output_averaging 1356 average_count_surf = average_count_surf + 1 1357 ENDIF 1326 1358 ENDIF 1327 1359 ENDIF … … 1424 1456 time_do_av = MOD( time_do_av, MAX( dt_data_output_av, dt_3d ) ) 1425 1457 ENDIF 1458 ! 1459 !-- Output of surface data, instantaneous and averaged data 1460 IF ( surface_data_output ) THEN 1461 IF ( time_dosurf >= dt_dosurf ) THEN 1462 CALL surface_output( 0 ) 1463 time_dosurf = MOD( time_dosurf, MAX( dt_dosurf, dt_3d ) ) 1464 ENDIF 1465 IF ( time_dosurf_av >= dt_dosurf_av ) THEN 1466 CALL surface_output( 1 ) 1467 time_dosurf_av = MOD( time_dosurf_av, MAX( dt_dosurf_av, dt_3d ) ) 1468 ENDIF 1469 ENDIF 1426 1470 1427 1471 ! -
palm/trunk/SOURCE/user_spectra.f90
r3049 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3049 2018-05-29 13:52:36Z Giersch 27 30 ! Error messages revised 28 31 ! … … 105 108 SELECT CASE ( TRIM( data_output_sp(m) ) ) 106 109 107 CASE ( 'u', 'v', 'w', ' pt', 'q', 's' )110 CASE ( 'u', 'v', 'w', 'theta', 'q', 's' ) 108 111 !-- Not allowed here since these are the standard quantities used in 109 112 !-- preprocess_spectra. … … 124 127 SELECT CASE ( TRIM( data_output_sp(m) ) ) 125 128 126 CASE ( 'u', 'v', 'w', ' pt', 'q', 's' )129 CASE ( 'u', 'v', 'w', 'theta', 'q', 's' ) 127 130 !-- Not allowed here since these are the standard quantities used in 128 131 !-- data_output_spectra. -
palm/trunk/SOURCE/virtual_flight_mod.f90
r3274 r3421 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Renamed output variables 28 ! 29 ! 3274 2018-09-24 15:42:55Z knoop 27 30 ! Modularization of all bulk cloud physics code components 28 31 ! … … 496 499 k = k + 1 497 500 ELSEIF ( i == id_pt ) THEN 498 dofl_label(k) = TRIM( label_leg ) // '_ pt'501 dofl_label(k) = TRIM( label_leg ) // '_theta' 499 502 dofl_unit(k) = 'K' 500 503 k = k + 1
Note: See TracChangeset
for help on using the changeset viewer.