Changeset 95 for palm/trunk/SOURCE
- Timestamp:
- Jun 2, 2007 4:48:38 PM (17 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 1 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r94 r95 2 2 --- 3 3 ocean version including prognostic equation for salinity and equation of state for seawater 4 + inipar-parameters ocean, sa_surface, sa_vertical_gradient, sa_vertical_gradient_level, top_salinity_flux4 + inipar-parameters bc_sa_t, bottom_salinityflux, ocean, sa_surface, sa_vertical_gradient, sa_vertical_gradient_level, top_salinityflux 5 5 6 check_parameters, diffusion_e, flow_statistics, header, init_grid, init_3d_model, modules, parin, prognostic_equations, read_var_list, write_var_list, write_3d_binary6 boundary_conds, check_parameters, diffusion_e, flow_statistics, header, init_grid, init_3d_model, modules, parin, prognostic_equations, read_var_list, swap_timelevel, time_integration, user_interface, write_var_list, write_3d_binary 7 7 8 New: 9 eqn_state_seawater, init_ocean 8 10 9 11 Changed: 10 12 ------- 13 hydro_press renamed hyp 11 14 12 13 15 advec_particles 14 16 15 17 … … 36 38 37 39 default disturbance level 40 41 Bott-Chlond scheme to be extended for salinity 42 43 Upstream-spline scheme to be extended for salinity????? -
palm/trunk/SOURCE/Makefile
r82 r95 4 4 # Actual revisions: 5 5 # ----------------- 6 # + local_flush6 # +eqn_state_seawater, init_ocean 7 7 # 8 8 # Former revisions: 9 9 # ----------------- 10 10 # $Id$ 11 # 12 # 82 2007-04-16 15:40:52Z raasch 13 # +local_flush 11 14 # 12 15 # 58 2007-03-09 14:27:38Z raasch … … 45 48 data_output_3d.f90 diffusion_e.f90 diffusion_s.f90 diffusion_u.f90 \ 46 49 diffusion_v.f90 diffusion_w.f90 diffusivities.f90 disturb_field.f90 \ 47 disturb_heatflux.f90 \exchange_horiz.f90 exchange_horiz_2d.f90 \50 disturb_heatflux.f90 eqn_state_seawater.f90 exchange_horiz.f90 exchange_horiz_2d.f90 \ 48 51 fft_xy.f90 flow_statistics.f90 global_min_max.f90 header.f90 \ 49 52 impact_of_latent_heat.f90 init_1d_model.f90 init_3d_model.f90 \ 50 53 init_advec.f90 init_cloud_physics.f90 init_dvrp.f90 init_grid.f90 \ 51 init_ particles.f90 init_pegrid.f90 init_pt_anomaly.f90 \54 init_ocean.f90 init_particles.f90 init_pegrid.f90 init_pt_anomaly.f90 \ 52 55 init_rankine.f90 init_slope.f90 interaction_droplets_ptq.f90 \ 53 56 local_flush.f90 local_getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \ … … 76 79 data_output_3d.o diffusion_e.o diffusion_s.o diffusion_u.o \ 77 80 diffusion_v.o diffusion_w.o diffusivities.o disturb_field.o \ 78 disturb_heatflux.o e xchange_horiz.o exchange_horiz_2d.o fft_xy.o \81 disturb_heatflux.o eqn_state_seawater.o exchange_horiz.o exchange_horiz_2d.o fft_xy.o \ 79 82 flow_statistics.o global_min_max.o header.o impact_of_latent_heat.o \ 80 83 init_1d_model.o init_3d_model.o init_advec.o init_cloud_physics.o \ 81 init_dvrp.o init_grid.o init_ particles.o init_pegrid.o \84 init_dvrp.o init_grid.o init_ocean.o init_particles.o init_pegrid.o \ 82 85 init_pt_anomaly.o init_rankine.o init_slope.o \ 83 86 interaction_droplets_ptq.o local_flush.o local_getenv.o local_stop.o \ … … 164 167 disturb_field.o: modules.o random_function.o 165 168 disturb_heatflux.o: modules.o 169 eqn_state_seawater.o: modules.o 166 170 exchange_horiz.o: modules.o 167 171 exchange_horiz_2d.o: modules.o … … 177 181 init_dvrp.o: modules.o 178 182 init_grid.o: modules.o 183 init_ocean.o: modules.o eqn_state_seawater.o 179 184 init_particles.o: modules.o random_function.o 180 185 init_pegrid.o: modules.o fft_xy.o poisfft.o poisfft_hybrid.o -
palm/trunk/SOURCE/advec_particles.f90
r82 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! hydro_press renamed hyp 6 7 ! TEST: PRINT statements on unit 9 (commented out) 7 8 ! … … 238 239 ! 239 240 !-- Calculate real temperature and saturation vapor pressure 240 p_int = hydro_press(k) + ( particles(n)%z - zu(k) ) / dz * & 241 ( hydro_press(k+1) - hydro_press(k) ) 241 p_int = hyp(k) + ( particles(n)%z - zu(k) ) / dz * ( hyp(k+1)-hyp(k) ) 242 242 t_int = pt_int * ( p_int / 100000.0 )**0.286 243 243 -
palm/trunk/SOURCE/boundary_conds.f90
r77 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Boundary conditions for salinity added 7 7 ! 8 8 ! Former revisions: … … 128 128 129 129 ! 130 !-- Boundary conditions for salinity 131 IF ( ocean ) THEN 132 ! 133 !-- Bottom boundary: Neumann condition because salinity flux is always 134 !-- given 135 DO i = nxl-1, nxr+1 136 DO j = nys-1, nyn+1 137 sa_p(nzb_s_inner(j,i),j,i) = sa_p(nzb_s_inner(j,i)+1,j,i) 138 ENDDO 139 ENDDO 140 141 ! 142 !-- Top boundary: Dirichlet or Neumann 143 IF ( ibc_sa_t == 0 ) THEN 144 sa_p(nzt+1,:,:) = sa(nzt+1,:,:) 145 ELSEIF ( ibc_sa_t == 1 ) THEN 146 sa_p(nzt+1,:,:) = sa_p(nzt,:,:) 147 ENDIF 148 149 ENDIF 150 151 ! 130 152 !-- Boundary conditions for total water content or scalar, 131 !-- bottom and surfaceboundary (see also temperature)153 !-- bottom and top boundary (see also temperature) 132 154 IF ( humidity .OR. passive_scalar ) THEN 133 155 ! -
palm/trunk/SOURCE/calc_liquid_water_content.f90
r39 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! hydro_press renamed hyp 7 7 ! 8 8 ! Former revisions: … … 59 59 ! 60 60 !-- Compute approximation of saturation humidity 61 q_s = 0.622 * e_s / & 62 ( hydro_press(k) - 0.378 * e_s ) 61 q_s = 0.622 * e_s / ( hyp(k) - 0.378 * e_s ) 63 62 64 63 ! -
palm/trunk/SOURCE/check_parameters.f90
r94 r95 1005 1005 1006 1006 ! 1007 !-- Boundary conditions for salinity 1008 IF ( ocean ) THEN 1009 IF ( bc_sa_t == 'dirichlet' ) THEN 1010 ibc_sa_t = 0 1011 ELSEIF ( bc_sa_t == 'neumann' ) THEN 1012 ibc_sa_t = 1 1013 ELSE 1014 IF ( myid == 0 ) THEN 1015 PRINT*, '+++ check_parameters:' 1016 PRINT*, ' unknown boundary condition: bc_sa_t = ', bc_sa_t 1017 ENDIF 1018 CALL local_stop 1019 ENDIF 1020 1021 IF ( top_salinityflux == 9999999.9 ) constant_top_salinityflux = .FALSE. 1022 1023 ! 1024 !-- A fixed salinity at the top implies Dirichlet boundary condition for 1025 !-- salinity. In this case specification of a constant salinity flux is 1026 !-- forbidden. 1027 IF ( ibc_sa_t == 0 .AND. constant_top_salinityflux .AND. & 1028 top_salinityflux /= 0.0 ) THEN 1029 IF ( myid == 0 ) THEN 1030 PRINT*, '+++ check_parameters:' 1031 PRINT*, ' boundary_condition: bc_sa_t = ', bc_sa_t 1032 PRINT*, ' is not allowed with constant_top_salinityflux = ', & 1033 '.TRUE.' 1034 ENDIF 1035 CALL local_stop 1036 ENDIF 1037 1038 ENDIF 1039 1040 ! 1007 1041 !-- In case of humidity or passive scalar, set boundary conditions for total 1008 1042 !-- water content / scalar -
palm/trunk/SOURCE/init_3d_model.f90
r94 r95 7 7 ! Actual revisions: 8 8 ! ----------------- 9 ! Initialization of salinity 9 ! Initialization of salinity, call of init_ocean 10 10 ! 11 11 ! Former revisions: … … 188 188 189 189 IF ( ocean ) THEN 190 ALLOCATE( saswst_1(nys-1:nyn+1,nxl-1:nxr+1) ) 191 ALLOCATE( r(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 190 ALLOCATE( saswsb_1(nys-1:nyn+1,nxl-1:nxr+1), & 191 saswst_1(nys-1:nyn+1,nxl-1:nxr+1) ) 192 ALLOCATE( rho(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 192 193 sa_1(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & 193 194 sa_2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1), & … … 303 304 304 305 IF ( ocean ) THEN 306 saswsb => saswsb_1 305 307 saswst => saswst_1 306 308 sa => sa_1; sa_p => sa_2; tsa_m => sa_3 … … 602 604 603 605 IF ( ocean ) THEN 606 saswsb = bottom_salinityflux 604 607 saswst = top_salinityflux 605 608 ENDIF … … 821 824 CALL local_stop 822 825 ENDIF 826 827 ! 828 !-- If required, initialize quantities needed for the ocean model 829 IF ( ocean ) CALL init_ocean 823 830 824 831 ! -
palm/trunk/SOURCE/init_cloud_physics.f90
r4 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! hydro_press renamed hyp 7 7 ! 8 8 ! Former revisions: … … 35 35 REAL :: t_surface 36 36 37 ALLOCATE( hy dro_press(nzb:nzt+1), pt_d_t(nzb:nzt+1), t_d_pt(nzb:nzt+1) )37 ALLOCATE( hyp(nzb:nzt+1), pt_d_t(nzb:nzt+1), t_d_pt(nzb:nzt+1) ) 38 38 39 39 ! … … 54 54 !-- pt / t : ratio of potential and actual temperature (pt_d_t) 55 55 !-- t / pt : ratio of actual and potential temperature (t_d_pt) 56 !-- p_0(z) : vertical profile of the hydrostatic pressure (hy dro_press)56 !-- p_0(z) : vertical profile of the hydrostatic pressure (hyp) 57 57 t_surface = pt_surface * ( surface_pressure / 1000.0 )**0.286 58 58 DO k = nzb, nzt+1 59 hy dro_press(k)= surface_pressure * 100.0 * &60 61 pt_d_t(k) = ( 100000.0 / hydro_press(k) )**0.28662 t_d_pt(k) 59 hyp(k) = surface_pressure * 100.0 * & 60 ( (t_surface - g/cp * zu(k)) / t_surface )**(1.0/0.286) 61 pt_d_t(k) = ( 100000.0 / hyp(k) )**0.286 62 t_d_pt(k) = 1.0 / pt_d_t(k) 63 63 ENDDO 64 64 -
palm/trunk/SOURCE/modules.f90
r94 r95 7 7 ! +ocean, r, + salinity variables 8 8 ! defaults of .._vertical_gradient_levels changed from -1.0 to -9999999.9 9 ! hydro_press renamed hyp 9 10 ! 10 11 ! Former revisions: … … 94 95 95 96 REAL, DIMENSION(:), ALLOCATABLE :: & 96 ddzu, dd2zu, dzu, ddzw, dzw, km_damp_x, km_damp_y, l_grid, pt_init,&97 q_init, rdf, sa_init, ug, u_init, u_nzb_p1_for_vfc, vg, v_init,&98 v_ nzb_p1_for_vfc, zu, zw97 ddzu, dd2zu, dzu, ddzw, dzw, hyp, km_damp_x, km_damp_y, l_grid, & 98 pt_init, q_init, rdf, sa_init, ug, u_init, u_nzb_p1_for_vfc, vg, & 99 v_init, v_nzb_p1_for_vfc, zu, zw 99 100 100 101 REAL, DIMENSION(:,:), ALLOCATABLE :: & … … 102 103 103 104 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET :: & 104 qsws_1, qsws_2, qswst_1, qswst_2, rif_1, rif_2, sasws t_1, shf_1,&105 shf_ 2, tswst_1, tswst_2, usws_1, usws_2, vsws_1, vsws_2105 qsws_1, qsws_2, qswst_1, qswst_2, rif_1, rif_2, saswsb_1, saswst_1, & 106 shf_1, shf_2, tswst_1, tswst_2, usws_1, usws_2, vsws_1, vsws_2 106 107 107 108 REAL, DIMENSION(:,:), POINTER :: & 108 qsws, qsws_m, qswst, qswst_m, rif, rif_m, sasws t, shf, shf_m, tswst,&109 tswst_m, usws, usws_m, vsws, vsws_m109 qsws, qsws_m, qswst, qswst_m, rif, rif_m, saswsb, saswst, shf, & 110 shf_m, tswst, tswst_m, usws, usws_m, vsws, vsws_m 110 111 111 112 REAL, DIMENSION(:,:,:), ALLOCATABLE :: & … … 118 119 REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET :: & 119 120 e_1, e_2, e_3, kh_1, kh_2, km_1, km_2, p, pt_1, pt_2, pt_3, q_1, & 120 q_2, q_3, ql_1, ql_2, r , sa_1, sa_2, sa_3, u_1, u_2, u_3, v_1, v_2,&121 v_ 3, vpt_1, vpt_2, w_1, w_2, w_3121 q_2, q_3, ql_1, ql_2, rho, sa_1, sa_2, sa_3, u_1, u_2, u_3, v_1, & 122 v_2, v_3, vpt_1, vpt_2, w_1, w_2, w_3 122 123 123 124 REAL, DIMENSION(:,:,:), POINTER :: & … … 167 168 mass_of_solute, molecular_weight_of_solute, & 168 169 prec_time_const = 0.001, ql_crit = 0.0005, rho_l = 1.0E3, & 169 r_d = 287.0, r_v = 461.51, rho_surface, & 170 thermal_conductivity_l = 2.43E-2 171 172 REAL, DIMENSION(:), ALLOCATABLE :: hydro_press, pt_d_t, t_d_pt 170 r_d = 287.0, r_v = 461.51, thermal_conductivity_l = 2.43E-2 171 172 REAL, DIMENSION(:), ALLOCATABLE :: pt_d_t, t_d_pt 173 173 174 174 REAL, DIMENSION(:,:), ALLOCATABLE :: precipitation_amount, & … … 241 241 bc_q_b = 'dirichlet', bc_q_t = 'neumann', & 242 242 bc_s_b = 'dirichlet', bc_s_t = 'neumann', & 243 bc_sa_t = 'neumann', & 243 244 bc_uv_b = 'dirichlet', bc_uv_t = 'dirichlet', & 244 245 dissipation_1d = 'as_in_3d_model', & … … 272 273 dvrp_filecount = 0, dz_stretch_level_index, gamma_mg, & 273 274 grid_level, ibc_e_b, ibc_p_b, ibc_p_t, ibc_pt_b, ibc_pt_t, & 274 ibc_q_b, ibc_q_t, ibc_ uv_b, ibc_uv_t, &275 ibc_q_b, ibc_q_t, ibc_sa_t, ibc_uv_b, ibc_uv_t, & 275 276 inflow_disturbance_begin = -1, inflow_disturbance_end = -1, & 276 277 intermediate_timestep_count, intermediate_timestep_count_max, & … … 302 303 conserve_volume_flow = .FALSE., constant_diffusion = .FALSE., & 303 304 constant_heatflux = .TRUE., constant_top_heatflux = .TRUE., & 305 constant_top_salinityflux = .TRUE., & 304 306 constant_waterflux = .TRUE., create_disturbances = .TRUE., & 305 307 cut_spline_overshoot = .TRUE., & … … 333 335 averaging_interval = 0.0, averaging_interval_pr = 9999999.9, & 334 336 averaging_interval_sp = 9999999.9, bc_pt_t_val, bc_q_t_val, & 337 bottom_salinityflux = 0.0, & 335 338 building_height = 50.0, building_length_x = 50.0, & 336 339 building_length_y = 50.0, building_wall_left = 9999999.9, & … … 363 366 q_surface_initial_change = 0.0, rayleigh_damping_factor = -1.0, & 364 367 rayleigh_damping_height = -1.0, residual_limit = 1.0E-4, & 365 restart_time = 9999999.9, r if_max = 1.0, rif_min = -5.0, &366 r oughness_length = 0.1, sa_surface = 35.0, simulated_time = 0.0, &367 simulated_time _at_begin, sin_alpha_surface, &368 restart_time = 9999999.9, rho_ref, rho_surface, rif_max = 1.0, & 369 rif_min = -5.0, roughness_length = 0.1, sa_surface = 35.0, & 370 simulated_time = 0.0, simulated_time_at_begin, sin_alpha_surface, & 368 371 skip_time_data_output = 0.0, skip_time_data_output_av = 9999999.9,& 369 372 skip_time_dopr = 9999999.9, skip_time_dosp = 9999999.9, & … … 380 383 time_do_sla = 0.0, time_dvrp = 0.0, time_prel = 0.0, & 381 384 time_restart = 9999999.9, time_run_control = 0.0, & 382 top_heatflux = 9999999.9, top_salinityflux = 0.0, &385 top_heatflux = 9999999.9, top_salinityflux = 9999999.9, & 383 386 ug_surface = 0.0, u_gtrans = 0.0, & 384 387 ups_limit_e = 0.0, ups_limit_pt = 0.0, ups_limit_u = 0.0, & … … 393 396 q_vertical_gradient_level(10) = -1.0, & 394 397 s_vertical_gradient(10) = 0.0, & 395 s_vertical_gradient_level(10) = -1.0, 398 s_vertical_gradient_level(10) = -1.0, & 396 399 sa_vertical_gradient(10) = 0.0, & 397 sa_vertical_gradient_level(10) = - 1.0, threshold(20) = 0.0, &400 sa_vertical_gradient_level(10) = -9999999.9, threshold(20) = 0.0, & 398 401 tsc(10) = (/ 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /), & 399 402 ug_vertical_gradient(10) = 0.0, & -
palm/trunk/SOURCE/parin.f90
r94 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! + ocean, sa_surface, sa_vertical_gradient, sa_vertical_gradient_level,7 ! top_salinity_flux in inipar,6 ! +bc_sa_t, bottom_salinityflux, ocean, sa_surface, sa_vertical_gradient, 7 ! sa_vertical_gradient_level, top_salinityflux in inipar, 8 8 ! sa_init is allocated 9 9 ! … … 63 63 NAMELIST /inipar/ adjust_mixing_length, alpha_surface, bc_e_b, bc_lr, & 64 64 bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, bc_q_b, & 65 bc_q_t,bc_s_b, bc_s_t, bc_uv_b, bc_uv_t, building_height, & 65 bc_q_t,bc_s_b, bc_s_t, bc_sa_t, bc_uv_b, bc_uv_t, & 66 bottom_salinityflux, building_height, & 66 67 building_length_x, building_length_y, building_wall_left, & 67 68 building_wall_south, cloud_droplets, cloud_physics, & … … 87 88 surface_waterflux, s_surface, s_surface_initial_change, & 88 89 s_vertical_gradient, s_vertical_gradient_level, top_heatflux, & 89 top_salinity _flux, timestep_scheme, topography, ug_surface, &90 top_salinityflux, timestep_scheme, topography, ug_surface, & 90 91 ug_vertical_gradient, ug_vertical_gradient_level, ups_limit_e, & 91 92 ups_limit_pt, ups_limit_u, ups_limit_v, ups_limit_w, & -
palm/trunk/SOURCE/prognostic_equations.f90
r94 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! prognostic equation for salinity 6 7 ! new argument zw in calls of diffusion_e 7 8 ! … … 414 415 415 416 ! 417 !-- If required, compute prognostic equation for salinity 418 IF ( ocean ) THEN 419 420 CALL cpu_log( log_point(37), 'sa-equation', 'start' ) 421 422 ! 423 !-- sa-tendency terms with communication 424 sat = tsc(1) 425 sbt = tsc(2) 426 IF ( scalar_advec == 'bc-scheme' ) THEN 427 428 IF ( timestep_scheme(1:5) /= 'runge' ) THEN 429 ! 430 !-- Bott-Chlond scheme always uses Euler time step when leapfrog is 431 !-- switched on. Thus: 432 sat = 1.0 433 sbt = 1.0 434 ENDIF 435 tend = 0.0 436 CALL advec_s_bc( sa, 'sa' ) 437 ELSE 438 IF ( tsc(2) /= 2.0 ) THEN 439 IF ( scalar_advec == 'ups-scheme' ) THEN 440 tend = 0.0 441 CALL advec_s_ups( sa, 'sa' ) 442 ENDIF 443 ENDIF 444 ENDIF 445 446 ! 447 !-- sa terms with no communication 448 DO i = nxl, nxr 449 DO j = nys, nyn 450 ! 451 !-- Tendency-terms 452 IF ( scalar_advec == 'bc-scheme' ) THEN 453 CALL diffusion_s( i, j, ddzu, ddzw, kh, sa, saswsb, saswst, & 454 tend ) 455 ELSE 456 IF ( tsc(2) == 2.0 .OR. timestep_scheme(1:5) == 'runge' ) THEN 457 tend(:,j,i) = 0.0 458 CALL advec_s_pw( i, j, sa ) 459 ELSE 460 IF ( scalar_advec /= 'ups-scheme' ) THEN 461 tend(:,j,i) = 0.0 462 CALL advec_s_up( i, j, sa ) 463 ENDIF 464 ENDIF 465 CALL diffusion_s( i, j, ddzu, ddzw, kh, sa, saswsb, saswst, & 466 tend ) 467 ENDIF 468 469 CALL user_actions( i, j, 'sa-tendency' ) 470 471 ! 472 !-- Prognostic equation for salinity 473 DO k = nzb_s_inner(j,i)+1, nzt 474 sa_p(k,j,i) = sat * sa(k,j,i) + & 475 dt_3d * ( & 476 sbt * tend(k,j,i) + tsc(3) * tsa_m(k,j,i) & 477 ) - & 478 tsc(5) * rdf(k) * ( sa(k,j,i) - sa_init(k) ) 479 IF ( sa_p(k,j,i) < 0.0 ) sa_p(k,j,i) = 0.1 * sa(k,j,i) 480 ENDDO 481 482 ! 483 !-- Calculate tendencies for the next Runge-Kutta step 484 IF ( timestep_scheme(1:5) == 'runge' ) THEN 485 IF ( intermediate_timestep_count == 1 ) THEN 486 DO k = nzb_s_inner(j,i)+1, nzt 487 tsa_m(k,j,i) = tend(k,j,i) 488 ENDDO 489 ELSEIF ( intermediate_timestep_count < & 490 intermediate_timestep_count_max ) THEN 491 DO k = nzb_s_inner(j,i)+1, nzt 492 tsa_m(k,j,i) = -9.5625 * tend(k,j,i) + & 493 5.3125 * tsa_m(k,j,i) 494 ENDDO 495 ENDIF 496 ENDIF 497 498 ENDDO 499 ENDDO 500 501 CALL cpu_log( log_point(37), 'sa-equation', 'stop' ) 502 503 ENDIF 504 505 ! 416 506 !-- If required, compute prognostic equation for total water content / scalar 417 507 IF ( humidity .OR. passive_scalar ) THEN … … 647 737 ! be called for the standard Piascek-Williams advection scheme. 648 738 ! 649 ! The call of this subroutine is embedded in two DO loops over i and j, thus 650 ! communication between CPUs is not allowed in this subroutine. 739 ! Here the calls of most subroutines are embedded in two DO loops over i and j, 740 ! so communication between CPUs is not allowed (does not make sense) within 741 ! these loops. 651 742 ! 652 743 ! (Optimized to avoid cache missings, i.e. for Power4/5-architectures.) … … 883 974 ENDDO 884 975 ENDIF 976 ENDIF 977 978 ! 979 !-- If required, compute prognostic equation for salinity 980 IF ( ocean ) THEN 981 982 ! 983 !-- Tendency-terms for salinity 984 tend(:,j,i) = 0.0 985 IF ( tsc(2) == 2.0 .OR. timestep_scheme(1:5) == 'runge' ) & 986 THEN 987 CALL advec_s_pw( i, j, sa ) 988 ELSE 989 CALL advec_s_up( i, j, sa ) 990 ENDIF 991 CALL diffusion_s( i, j, ddzu, ddzw, kh, sa, saswsb, saswst, & 992 tend ) 993 994 CALL user_actions( i, j, 'sa-tendency' ) 995 996 ! 997 !-- Prognostic equation for salinity 998 DO k = nzb_s_inner(j,i)+1, nzt 999 sa_p(k,j,i) = tsc(1) * sa(k,j,i) + & 1000 dt_3d * ( & 1001 tsc(2) * tend(k,j,i) + tsc(3) * tsa_m(k,j,i) & 1002 ) - & 1003 tsc(5) * rdf(k) * ( sa(k,j,i) - sa_init(k) ) 1004 IF ( sa_p(k,j,i) < 0.0 ) sa_p(k,j,i) = 0.1 * sa(k,j,i) 1005 ENDDO 1006 1007 ! 1008 !-- Calculate tendencies for the next Runge-Kutta step 1009 IF ( timestep_scheme(1:5) == 'runge' ) THEN 1010 IF ( intermediate_timestep_count == 1 ) THEN 1011 DO k = nzb_s_inner(j,i)+1, nzt 1012 tsa_m(k,j,i) = tend(k,j,i) 1013 ENDDO 1014 ELSEIF ( intermediate_timestep_count < & 1015 intermediate_timestep_count_max ) THEN 1016 DO k = nzb_s_inner(j,i)+1, nzt 1017 tsa_m(k,j,i) = -9.5625 * tend(k,j,i) + & 1018 5.3125 * tsa_m(k,j,i) 1019 ENDDO 1020 ENDIF 1021 ENDIF 1022 885 1023 ENDIF 886 1024 … … 1363 1501 1364 1502 ! 1503 !-- If required, compute prognostic equation for salinity 1504 IF ( ocean ) THEN 1505 1506 CALL cpu_log( log_point(37), 'sa-equation', 'start' ) 1507 1508 ! 1509 !-- sa-tendency terms with communication 1510 sat = tsc(1) 1511 sbt = tsc(2) 1512 IF ( scalar_advec == 'bc-scheme' ) THEN 1513 1514 IF ( timestep_scheme(1:5) /= 'runge' ) THEN 1515 ! 1516 !-- Bott-Chlond scheme always uses Euler time step when leapfrog is 1517 !-- switched on. Thus: 1518 sat = 1.0 1519 sbt = 1.0 1520 ENDIF 1521 tend = 0.0 1522 CALL advec_s_bc( sa, 'sa' ) 1523 ELSE 1524 IF ( tsc(2) /= 2.0 ) THEN 1525 IF ( scalar_advec == 'ups-scheme' ) THEN 1526 tend = 0.0 1527 CALL advec_s_ups( sa, 'sa' ) 1528 ENDIF 1529 ENDIF 1530 ENDIF 1531 1532 ! 1533 !-- Scalar/q-tendency terms with no communication 1534 IF ( scalar_advec == 'bc-scheme' ) THEN 1535 CALL diffusion_s( ddzu, ddzw, kh, sa, saswsb, saswst, tend ) 1536 ELSE 1537 IF ( tsc(2) == 2.0 .OR. timestep_scheme(1:5) == 'runge' ) THEN 1538 tend = 0.0 1539 CALL advec_s_pw( sa ) 1540 ELSE 1541 IF ( scalar_advec /= 'ups-scheme' ) THEN 1542 tend = 0.0 1543 CALL advec_s_up( sa ) 1544 ENDIF 1545 ENDIF 1546 CALL diffusion_s( ddzu, ddzw, kh, sa, saswsb, saswst, tend ) 1547 ENDIF 1548 1549 CALL user_actions( 'sa-tendency' ) 1550 1551 ! 1552 !-- Prognostic equation for salinity 1553 DO i = nxl, nxr 1554 DO j = nys, nyn 1555 DO k = nzb_s_inner(j,i)+1, nzt 1556 sa_p(k,j,i) = sat * sa(k,j,i) + & 1557 dt_3d * ( & 1558 sbt * tend(k,j,i) + tsc(3) * tsa_m(k,j,i) & 1559 ) - & 1560 tsc(5) * rdf(k) * ( sa(k,j,i) - sa_init(k) ) 1561 IF ( sa_p(k,j,i) < 0.0 ) sa_p(k,j,i) = 0.1 * sa(k,j,i) 1562 ENDDO 1563 ENDDO 1564 ENDDO 1565 1566 ! 1567 !-- Calculate tendencies for the next Runge-Kutta step 1568 IF ( timestep_scheme(1:5) == 'runge' ) THEN 1569 IF ( intermediate_timestep_count == 1 ) THEN 1570 DO i = nxl, nxr 1571 DO j = nys, nyn 1572 DO k = nzb_s_inner(j,i)+1, nzt 1573 tsa_m(k,j,i) = tend(k,j,i) 1574 ENDDO 1575 ENDDO 1576 ENDDO 1577 ELSEIF ( intermediate_timestep_count < & 1578 intermediate_timestep_count_max ) THEN 1579 DO i = nxl, nxr 1580 DO j = nys, nyn 1581 DO k = nzb_s_inner(j,i)+1, nzt 1582 tsa_m(k,j,i) = -9.5625 * tend(k,j,i) + & 1583 5.3125 * tsa_m(k,j,i) 1584 ENDDO 1585 ENDDO 1586 ENDDO 1587 ENDIF 1588 ENDIF 1589 1590 CALL cpu_log( log_point(37), 'sa-equation', 'stop' ) 1591 1592 ENDIF 1593 1594 ! 1365 1595 !-- If required, compute prognostic equation for total water content / scalar 1366 1596 IF ( humidity .OR. passive_scalar ) THEN -
palm/trunk/SOURCE/read_3d_binary.f90
r94 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +sa, sasws t6 ! +sa, saswsb, saswst 7 7 ! 8 8 ! Former revisions: … … 284 284 CASE ( 'sa' ) 285 285 READ ( 13 ) sa 286 CASE ( 'saswsb' ) 287 READ ( 13 ) saswsb 286 288 CASE ( 'saswst' ) 287 289 READ ( 13 ) saswst -
palm/trunk/SOURCE/read_var_list.f90
r94 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! + ocean, sa_init, sa_surface, sa_vertical_gradient,7 ! sa_vertical_gradient_level, top_salinity_flux6 ! +bc_sa_t, ocean, sa_init, sa_surface, sa_vertical_gradient, 7 ! sa_vertical_gradient_level, bottom/top_salinity_flux 8 8 ! 9 9 ! Former revisions: … … 161 161 CASE ( 'bc_s_t' ) 162 162 READ ( 13 ) bc_s_t 163 CASE ( 'bc_sa_t' ) 164 READ ( 13 ) bc_sa_t 163 165 CASE ( 'bc_uv_b' ) 164 166 READ ( 13 ) bc_uv_b 165 167 CASE ( 'bc_uv_t' ) 166 168 READ ( 13 ) bc_uv_t 169 CASE ( 'bottom_salinityflux' ) 170 READ ( 13 ) bottom_salinityflux 167 171 CASE ( 'building_height' ) 168 172 READ ( 13 ) building_height -
palm/trunk/SOURCE/swap_timelevel.f90
r77 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Swaping of salinity 7 7 ! 8 8 ! Former revisions: … … 106 106 pt => pt_1; pt_p => pt_2 107 107 IF ( .NOT. constant_diffusion ) THEN 108 e => e_1; e_p => e_2 109 ENDIF 110 IF ( humidity .OR. passive_scalar ) THEN 111 q => q_1; q_p => q_2 108 e => e_1; e_p => e_2 109 ENDIF 110 IF ( ocean ) THEN 111 sa => sa_1; sa_p => sa_2 112 ENDIF 113 IF ( humidity .OR. passive_scalar ) THEN 114 q => q_1; q_p => q_2 112 115 ENDIF 113 116 … … 152 155 pt => pt_2; pt_p => pt_1 153 156 IF ( .NOT. constant_diffusion ) THEN 154 e => e_2; e_p => e_1 155 ENDIF 156 IF ( humidity .OR. passive_scalar ) THEN 157 q => q_2; q_p => q_1 157 e => e_2; e_p => e_1 158 ENDIF 159 IF ( ocean ) THEN 160 sa => sa_2; sa_p => sa_1 161 ENDIF 162 IF ( humidity .OR. passive_scalar ) THEN 163 q => q_2; q_p => q_1 158 164 ENDIF 159 165 -
palm/trunk/SOURCE/time_integration.f90
r90 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Ghostpoint exchange for salinity and density 7 7 ! 8 8 ! Former revisions: … … 150 150 CALL exchange_horiz( pt_p ) 151 151 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e_p ) 152 IF ( ocean ) THEN 153 CALL exchange_horiz( sa_p ) 154 CALL exchange_horiz( rho ) 155 ENDIF 152 156 IF ( humidity .OR. passive_scalar ) CALL exchange_horiz( q_p ) 153 157 IF ( cloud_droplets ) THEN -
palm/trunk/SOURCE/user_interface.f90
r90 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! user action for salinity added 7 7 ! 8 8 ! Former revisions: … … 393 393 394 394 395 CASE ( 'sa-tendency' ) 396 397 395 398 CASE ( 'e-tendency' ) 396 399 … … 443 446 444 447 CASE ( 'pt-tendency' ) 448 449 450 CASE ( 'sa-tendency' ) 445 451 446 452 -
palm/trunk/SOURCE/write_3d_binary.f90
r94 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +sa, sasws t6 ! +sa, saswsb, saswst 7 7 ! 8 8 ! Former revisions: … … 134 134 IF ( ocean ) THEN 135 135 WRITE ( 14 ) 'sa '; WRITE ( 14 ) sa 136 WRITE ( 14 ) 'saswsb '; WRITE ( 14 ) saswsb 136 137 WRITE ( 14 ) 'saswst '; WRITE ( 14 ) saswst 137 138 ENDIF -
palm/trunk/SOURCE/write_var_list.f90
r94 r95 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! + ocean, sa_init, sa_surface, sa_vertical_gradient,7 ! sa_vertical_gradient_level, top_salinity_flux6 ! +bc_sa_t, ocean, sa_init, sa_surface, sa_vertical_gradient, 7 ! sa_vertical_gradient_level, bottom/top_salinity_flux 8 8 ! 9 9 ! Former revisions: … … 107 107 WRITE ( 14 ) 'bc_s_t ' 108 108 WRITE ( 14 ) bc_s_t 109 WRITE ( 14 ) 'bc_sa_t ' 110 WRITE ( 14 ) bc_sa_t 109 111 WRITE ( 14 ) 'bc_uv_b ' 110 112 WRITE ( 14 ) bc_uv_b 111 113 WRITE ( 14 ) 'bc_uv_t ' 112 114 WRITE ( 14 ) bc_uv_t 115 WRITE ( 14 ) 'bottom_salinityflux ' 116 WRITE ( 14 ) bottom_salinityflux 113 117 WRITE ( 14 ) 'building_height ' 114 118 WRITE ( 14 ) building_height
Note: See TracChangeset
for help on using the changeset viewer.