- Timestamp:
- Apr 8, 2019 3:44:30 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r3872 r3873 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Moved ocean_mode specific code to ocean_mod 28 ! 29 ! 3872 2019-04-08 15:03:06Z knoop 27 30 ! Moved all USE statements to module level + removed salsa dependency 28 31 ! … … 287 290 288 291 USE control_parameters, & 289 ONLY: humidity, loop_optimization, passive_scalar, ocean_mode,&292 ONLY: humidity, loop_optimization, passive_scalar, & 290 293 rans_tke_e, ws_scheme_mom, ws_scheme_sca, & 291 294 momentum_advec, scalar_advec, & … … 409 412 ALLOCATE( sums_wsss_ws_l(nzb:nzt+1,0:threads_per_task-1) ) 410 413 sums_wsss_ws_l = 0.0_wp 411 ENDIF412 413 IF ( ocean_mode ) THEN414 ALLOCATE( sums_wssas_ws_l(nzb:nzt+1,0:threads_per_task-1) )415 sums_wssas_ws_l = 0.0_wp416 414 ENDIF 417 415 … … 472 470 ALLOCATE( flux_l_s(nzb+1:nzt,nys:nyn,0:threads_per_task-1), & 473 471 diss_l_s(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ) 474 ENDIF475 476 IF ( ocean_mode ) THEN477 ALLOCATE( flux_s_sa(nzb+1:nzt,0:threads_per_task-1), &478 diss_s_sa(nzb+1:nzt,0:threads_per_task-1) )479 ALLOCATE( flux_l_sa(nzb+1:nzt,nys:nyn,0:threads_per_task-1), &480 diss_l_sa(nzb+1:nzt,nys:nyn,0:threads_per_task-1) )481 472 ENDIF 482 473 … … 1112 1103 IF ( humidity ) sums_wsqs_ws_l = 0.0_wp 1113 1104 IF ( passive_scalar ) sums_wsss_ws_l = 0.0_wp 1114 IF ( ocean_mode ) sums_wssas_ws_l = 0.0_wp1115 1105 1116 1106 ENDIF -
palm/trunk/SOURCE/module_interface.f90
r3871 r3873 245 245 ocean_init, & 246 246 ocean_header, & 247 ocean_actions, & 247 248 ocean_prognostic_equations, & 248 249 ocean_swap_timelevel, & … … 881 882 IF ( bulk_cloud_model ) CALL bcm_actions( location ) 882 883 IF ( gust_module_enabled ) CALL gust_actions( location ) 884 IF ( ocean_mode ) CALL ocean_actions( location ) 883 885 IF ( salsa ) CALL salsa_actions( location ) 884 886 IF ( user_module_enabled ) CALL user_actions( location ) … … 903 905 IF ( bulk_cloud_model ) CALL bcm_actions( i, j, location ) 904 906 IF ( gust_module_enabled ) CALL gust_actions( i, j, location ) 907 IF ( ocean_mode ) CALL ocean_actions( i, j, location ) 905 908 IF ( salsa ) CALL salsa_actions( i, j, location ) 906 909 IF ( user_module_enabled ) CALL user_actions( i, j, location ) -
palm/trunk/SOURCE/ocean_mod.f90
r3767 r3873 25 25 ! ----------------- 26 26 ! $Id$ 27 ! implemented ocean_actions 28 ! 29 ! 3767 2019-02-27 08:18:02Z raasch 27 30 ! unused variable for file index and tmp_2d removed from rrd-subroutine parameter 28 31 ! list … … 77 80 USE arrays_3d, & 78 81 ONLY: prho, prho_1, rho_ocean, rho_1, sa, sa_init, sa_1, sa_2, sa_3, & 79 sa_p, tsa_m 82 sa_p, tsa_m, flux_l_sa, flux_s_sa, diss_l_sa, diss_s_sa 80 83 81 84 USE control_parameters, & 82 85 ONLY: atmos_ocean_sign, bottom_salinityflux, & 83 86 constant_top_salinityflux, ocean_mode, top_salinityflux, & 84 wall_salinityflux 87 wall_salinityflux, loop_optimization, ws_scheme_sca 85 88 86 89 USE kinds 90 91 USE pegrid, & 92 ONLY: threads_per_task 93 94 USE statistics, & 95 ONLY: sums_wssas_ws_l 87 96 88 97 … … 187 196 END INTERFACE ocean_parin 188 197 198 INTERFACE ocean_actions 199 MODULE PROCEDURE ocean_actions 200 MODULE PROCEDURE ocean_actions_ij 201 END INTERFACE ocean_actions 202 189 203 INTERFACE ocean_prognostic_equations 190 204 MODULE PROCEDURE ocean_prognostic_equations … … 229 243 ! 230 244 !-- Add INTERFACES that must be available to other modules (alphabetical order) 231 PUBLIC eqn_state_seawater, ocean_ check_data_output,&245 PUBLIC eqn_state_seawater, ocean_actions, ocean_check_data_output, & 232 246 ocean_check_data_output_pr, ocean_check_parameters, & 233 247 ocean_data_output_2d, ocean_data_output_3d, & … … 1177 1191 1178 1192 USE indices, & 1179 ONLY: nxlg, nxrg, nyn g, nysg, nzb, nzt1193 ONLY: nxlg, nxrg, nyn, nyng, nys, nysg, nzb, nzt 1180 1194 1181 1195 IMPLICIT NONE … … 1188 1202 IF ( salinity ) THEN 1189 1203 ALLOCATE( sa_2(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1204 ENDIF 1205 1206 IF ( ws_scheme_sca ) THEN 1207 ALLOCATE( sums_wssas_ws_l(nzb:nzt+1,0:threads_per_task-1) ) 1208 sums_wssas_ws_l = 0.0_wp 1209 ENDIF 1210 1211 IF ( loop_optimization /= 'vector' ) THEN 1212 1213 IF ( ws_scheme_sca ) THEN 1214 ALLOCATE( flux_s_sa(nzb+1:nzt,0:threads_per_task-1) ) 1215 ALLOCATE( diss_s_sa(nzb+1:nzt,0:threads_per_task-1) ) 1216 ALLOCATE( flux_l_sa(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ) 1217 ALLOCATE( diss_l_sa(nzb+1:nzt,nys:nyn,0:threads_per_task-1) ) 1218 ENDIF 1219 1190 1220 ENDIF 1191 1221 … … 1469 1499 1470 1500 END SUBROUTINE ocean_init 1501 1502 1503 !------------------------------------------------------------------------------! 1504 ! Description: 1505 ! ------------ 1506 !> Call for all grid points 1507 !------------------------------------------------------------------------------! 1508 SUBROUTINE ocean_actions( location ) 1509 1510 1511 CHARACTER (LEN=*), INTENT(IN) :: location !< call location string 1512 1513 SELECT CASE ( location ) 1514 1515 CASE ( 'before_timestep' ) 1516 1517 IF ( ws_scheme_sca ) THEN 1518 sums_wssas_ws_l = 0.0_wp 1519 ENDIF 1520 1521 CASE DEFAULT 1522 CONTINUE 1523 1524 END SELECT 1525 1526 END SUBROUTINE ocean_actions 1527 1528 1529 !------------------------------------------------------------------------------! 1530 ! Description: 1531 ! ------------ 1532 !> Call for grid points i,j 1533 !------------------------------------------------------------------------------! 1534 SUBROUTINE ocean_actions_ij( i, j, location ) 1535 1536 1537 INTEGER(iwp), INTENT(IN) :: i !< grid index in x-direction 1538 INTEGER(iwp), INTENT(IN) :: j !< grid index in y-direction 1539 CHARACTER (LEN=*), INTENT(IN) :: location !< call location string 1540 INTEGER(iwp) :: dummy !< call location string 1541 1542 IF ( ocean_mode ) dummy = i + j 1543 1544 SELECT CASE ( location ) 1545 1546 CASE ( 'before_timestep' ) 1547 1548 IF ( ws_scheme_sca ) THEN 1549 sums_wssas_ws_l = 0.0_wp 1550 ENDIF 1551 1552 CASE DEFAULT 1553 CONTINUE 1554 1555 END SELECT 1556 1557 END SUBROUTINE ocean_actions_ij 1471 1558 1472 1559
Note: See TracChangeset
for help on using the changeset viewer.