Ignore:
Timestamp:
Apr 8, 2019 2:38:39 PM (5 years ago)
Author:
knoop
Message:

Moving prognostic equations of bcm into bulk_cloud_model_mod

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/advec_ws.f90

    r3870 r3871  
    267267!> the divergence is not sufficiently reduced, resulting in erroneous fluxes
    268268!> and could lead to numerical instabilities.
    269 !-----------------------------------------------------------------------------!
     269!------------------------------------------------------------------------------!
    270270 MODULE advec_ws
    271271
     272    USE arrays_3d,                                                             &
     273        ONLY:  ddzu, ddzw, tend, u, v, w,                                      &
     274               drho_air, drho_air_zw, rho_air, rho_air_zw,                     &
     275               u_stokes_zu, v_stokes_zu,                                       &
     276               diss_l_diss, diss_l_e, diss_l_pt, diss_l_q,                     &
     277               diss_l_s, diss_l_sa, diss_l_u, diss_l_v, diss_l_w,              &
     278               flux_l_diss, flux_l_e, flux_l_pt, flux_l_q, flux_l_s,           &
     279               flux_l_sa, flux_l_u, flux_l_v, flux_l_w,                        &
     280               diss_s_diss, diss_s_e, diss_s_pt, diss_s_q, diss_s_s,           &
     281               diss_s_sa, diss_s_u, diss_s_v, diss_s_w,                        &
     282               flux_s_diss, flux_s_e, flux_s_pt, flux_s_q, flux_s_s,           &
     283               flux_s_sa, flux_s_u, flux_s_v, flux_s_w
     284
     285    USE control_parameters,                                                    &
     286        ONLY:  humidity, loop_optimization, passive_scalar, ocean_mode,        &
     287               rans_tke_e, ws_scheme_mom, ws_scheme_sca,                       &
     288               momentum_advec, scalar_advec,                                   &
     289               bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,                 &
     290               bc_dirichlet_s, bc_radiation_l, bc_radiation_n,                 &
     291               bc_radiation_r, bc_radiation_s, intermediate_timestep_count,    &
     292               u_gtrans, v_gtrans
     293
     294    USE indices,                                                               &
     295        ONLY:  nbgp, nxl, nxlg, nxlu, nxr, nxrg, nyn, nyng, nys, nysg, nysv,   &
     296               nzb, nzb_max, nzt, advc_flags_1, advc_flags_2, wall_flags_0
     297
     298    USE grid_variables,                                                        &
     299        ONLY:  ddx, ddy
     300
     301    USE pegrid,                                                                &
     302           ONLY:  threads_per_task
     303
    272304    USE kinds
     305
     306    USE statistics,                                                            &
     307        ONLY:  sums_salsa_ws_l, sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l,   &
     308               sums_wspts_ws_l, sums_wsqs_ws_l, sums_wsss_ws_l,                &
     309               sums_wssas_ws_l, sums_wsus_ws_l, sums_wsvs_ws_l,                &
     310               sums_wsqcs_ws_l, sums_wsqrs_ws_l,                               &
     311               sums_wsncs_ws_l, sums_wsnrs_ws_l,                               &
     312               hom, weight_substep
    273313
    274314    IMPLICIT NONE
     
    326366!------------------------------------------------------------------------------!
    327367    SUBROUTINE ws_init
    328 
    329        USE arrays_3d,                                                          &
    330            ONLY:  diss_l_diss, diss_l_e, diss_l_pt,      &
    331                   diss_l_q, diss_l_s, diss_l_sa,         &
    332                   diss_l_u, diss_l_v, diss_l_w, flux_l_diss, flux_l_e,         &
    333                   flux_l_pt, flux_l_q,      &
    334                   flux_l_s, flux_l_sa, flux_l_u, flux_l_v,          &
    335                   flux_l_w, diss_s_diss, diss_s_e,      &
    336                   diss_s_pt, diss_s_q, diss_s_s,         &
    337                   diss_s_sa, diss_s_u, diss_s_v,  diss_s_w, flux_s_diss,       &
    338                   flux_s_e, flux_s_pt, flux_s_q,         &
    339                   flux_s_s, flux_s_sa, flux_s_u,         &
    340                   flux_s_v, flux_s_w
    341 
    342        USE control_parameters,                                                 &
    343            ONLY:  humidity, loop_optimization, passive_scalar, ocean_mode,     &
    344                   rans_tke_e, ws_scheme_mom, ws_scheme_sca, salsa
    345 
    346        USE indices,                                                            &
    347            ONLY:  nyn, nys, nzb, nzt
    348 
    349        USE kinds
    350 
    351        USE pegrid
    352 
    353        USE salsa_util_mod,                                                     &
    354            ONLY:  sums_salsa_ws_l
    355 
    356        USE statistics,                                                         &
    357            ONLY:  sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l,&
    358                   sums_wspts_ws_l,            &
    359                   sums_wsqs_ws_l, sums_wsss_ws_l,             &
    360                   sums_wssas_ws_l,  sums_wsss_ws_l, sums_wsus_ws_l,            &
    361                   sums_wsvs_ws_l
    362 
    363368
    364369!
     
    406411             ALLOCATE( sums_wssas_ws_l(nzb:nzt+1,0:threads_per_task-1) )
    407412             sums_wssas_ws_l = 0.0_wp
    408           ENDIF       
    409 
    410           IF ( salsa )  THEN
    411              ALLOCATE( sums_salsa_ws_l(nzb:nzt+1,0:threads_per_task-1) )
    412              sums_salsa_ws_l = 0.0_wp
    413413          ENDIF
    414414
     
    492492    SUBROUTINE ws_init_flags
    493493
    494        USE control_parameters,                                                 &
    495            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    496                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    497                   bc_radiation_r, bc_radiation_s, momentum_advec, scalar_advec
    498 
    499        USE indices,                                                            &
    500            ONLY:  advc_flags_1, advc_flags_2, nbgp, nxl, nxlg, nxlu, nxr, nxrg,&
    501                   nyn, nyng, nys, nysg, nysv, nzb, nzt, wall_flags_0
    502 
    503        USE kinds
    504 
    505        IMPLICIT NONE
    506494
    507495       INTEGER(iwp) ::  i     !< index variable along x
     
    10991087!------------------------------------------------------------------------------!
    11001088    SUBROUTINE ws_statistics
    1101    
    1102        USE control_parameters,                                                 &
    1103            ONLY:  humidity, passive_scalar, ocean_mode, ws_scheme_mom,         &
    1104                   ws_scheme_sca, salsa
    1105 
    1106        USE kinds
    1107 
    1108        USE salsa_util_mod,                                                     &
    1109            ONLY:  sums_salsa_ws_l
    1110 
    1111        USE statistics,                                                         &
    1112            ONLY:  sums_us2_ws_l, sums_vs2_ws_l, sums_ws2_ws_l, &
    1113                   sums_wspts_ws_l,           &
    1114                   sums_wsqs_ws_l, sums_wsss_ws_l,             &
    1115                   sums_wssas_ws_l, sums_wsus_ws_l, sums_wsvs_ws_l
    1116                    
    1117 
    1118        IMPLICIT NONE
    1119 
    1120 !       
     1089
     1090
     1091!
    11211092!--    The arrays needed for statistical evaluation are set to to 0 at the
    11221093!--    beginning of prognostic_equations.
     
    11391110          IF ( passive_scalar )  sums_wsss_ws_l = 0.0_wp
    11401111          IF ( ocean_mode )  sums_wssas_ws_l = 0.0_wp
    1141           IF ( salsa )       sums_salsa_ws_l = 0.0_wp
    11421112
    11431113       ENDIF
     
    11551125                              swap_diss_x_local, i_omp, tn )
    11561126
    1157        USE arrays_3d,                                                          &
    1158            ONLY:  ddzw, drho_air, rho_air_zw, tend, u, u_stokes_zu, v,         &
    1159                   v_stokes_zu, w
    1160 
    1161        USE control_parameters,                                                 &
    1162            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    1163                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    1164                   bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &
    1165                   u_gtrans, v_gtrans
    1166 
    1167        USE grid_variables,                                                     &
    1168            ONLY:  ddx, ddy
    1169 
    1170        USE indices,                                                            &
    1171            ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max,    &
    1172                   nzt, advc_flags_1
    1173 
    1174        USE kinds
    1175 
    1176        USE pegrid
    1177 
    1178        USE salsa_util_mod,                                                     &
    1179            ONLY:  sums_salsa_ws_l
    1180 
    1181        USE statistics,                                                         &
    1182            ONLY:  hom, sums_wsncs_ws_l, sums_wsnrs_ws_l, sums_wspts_ws_l,      &
    1183                   sums_wsqcs_ws_l,  sums_wsqrs_ws_l, sums_wsqs_ws_l,           &
    1184                   sums_wssas_ws_l, sums_wsss_ws_l, weight_substep
    1185                  
    1186 
    1187        IMPLICIT NONE
    11881127
    11891128       CHARACTER (LEN = *), INTENT(IN) ::  sk_char !< string identifier, used for assign fluxes to the correct dimension in the analysis array
     
    18211760    SUBROUTINE advec_u_ws_ij( i, j, i_omp, tn )
    18221761
    1823        USE arrays_3d,                                                          &
    1824            ONLY:  ddzw, diss_l_u, diss_s_u, flux_l_u, flux_s_u, tend, u, v, w, &
    1825                   drho_air, rho_air_zw
    1826 
    1827        USE control_parameters,                                                 &
    1828            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    1829                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    1830                   bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &
    1831                   u_gtrans, v_gtrans
    1832 
    1833        USE grid_variables,                                                     &
    1834            ONLY:  ddx, ddy
    1835 
    1836        USE indices,                                                            &
    1837            ONLY:  nyn, nys, nxl, nxlu, nxr, nzb, nzb_max, nzt, advc_flags_1
    1838 
    1839        USE kinds
    1840 
    1841        USE statistics,                                                         &
    1842            ONLY:  hom, sums_us2_ws_l, sums_wsus_ws_l, weight_substep
    1843 
    1844        IMPLICIT NONE
    18451762
    18461763       INTEGER(iwp) ::  i         !< grid index along x-direction
     
    23962313   SUBROUTINE advec_v_ws_ij( i, j, i_omp, tn )
    23972314
    2398        USE arrays_3d,                                                          &
    2399            ONLY:  ddzw, diss_l_v, diss_s_v, flux_l_v, flux_s_v, tend, u, v, w, &
    2400                   drho_air, rho_air_zw
    2401 
    2402        USE control_parameters,                                                 &
    2403            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    2404                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    2405                   bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &
    2406                   u_gtrans, v_gtrans
    2407 
    2408        USE grid_variables,                                                     &
    2409            ONLY:  ddx, ddy
    2410 
    2411        USE indices,                                                            &
    2412            ONLY:  nyn, nys, nysv, nxl, nxr, nzb, nzb_max, nzt, advc_flags_1
    2413 
    2414        USE kinds
    2415 
    2416        USE statistics,                                                         &
    2417            ONLY:  hom, sums_vs2_ws_l, sums_wsvs_ws_l, weight_substep
    2418 
    2419        IMPLICIT NONE
    24202315
    24212316       INTEGER(iwp)  ::  i         !< grid index along x-direction
     
    29792874    SUBROUTINE advec_w_ws_ij( i, j, i_omp, tn )
    29802875
    2981        USE arrays_3d,                                                          &
    2982            ONLY:  ddzu, diss_l_w, diss_s_w, flux_l_w, flux_s_w, tend, u, v, w, &
    2983                   drho_air_zw, rho_air
    2984 
    2985        USE control_parameters,                                                 &
    2986            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    2987                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    2988                   bc_radiation_r, bc_radiation_s,intermediate_timestep_count,  &
    2989                   u_gtrans, v_gtrans
    2990 
    2991        USE grid_variables,                                                     &
    2992            ONLY:  ddx, ddy
    2993 
    2994        USE indices,                                                            &
    2995            ONLY:  nyn, nys, nxl, nxr, nzb, nzb_max, nzt, advc_flags_1,         &
    2996                   advc_flags_2
    2997 
    2998        USE kinds
    2999        
    3000        USE statistics,                                                         &
    3001            ONLY:  hom, sums_ws2_ws_l, weight_substep
    3002 
    3003        IMPLICIT NONE
    30042876
    30052877       INTEGER(iwp) ::  i         !< grid index along x-direction
     
    35353407    SUBROUTINE advec_s_ws( sk, sk_char )
    35363408
    3537        USE arrays_3d,                                                          &
    3538            ONLY:  ddzw, drho_air, rho_air_zw, tend, u, u_stokes_zu, v,         &
    3539                   v_stokes_zu, w
    3540 
    3541        USE control_parameters,                                                 &
    3542            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    3543                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    3544                   bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &
    3545                   u_gtrans, v_gtrans
    3546 
    3547        USE grid_variables,                                                     &
    3548            ONLY:  ddx, ddy
    3549 
    3550        USE indices,                                                            &
    3551            ONLY:  nxl, nxlg, nxr, nxrg, nyn, nyng, nys, nysg, nzb, nzb_max,    &
    3552                   nzt, advc_flags_1
    3553 
    3554        USE kinds
    3555 
    3556        USE salsa_util_mod,                                                     &
    3557            ONLY:  sums_salsa_ws_l
    3558 
    3559        USE statistics,                                                         &
    3560            ONLY:  hom, sums_wspts_ws_l, sums_wsqs_ws_l, sums_wssas_ws_l,       &
    3561                   sums_wsqcs_ws_l, sums_wsqrs_ws_l, sums_wsncs_ws_l,           &
    3562                   sums_wsnrs_ws_l, sums_wsss_ws_l, weight_substep 
    3563 
    3564 
    3565 
    3566        IMPLICIT NONE
    35673409
    35683410       CHARACTER (LEN = *), INTENT(IN)    ::  sk_char !< string identifier, used for assign fluxes to the correct dimension in the analysis array
     
    44114253    SUBROUTINE advec_u_ws
    44124254
    4413        USE arrays_3d,                                                          &
    4414            ONLY:  ddzw, drho_air, tend, u, v, w, rho_air_zw
    4415 
    4416        USE control_parameters,                                                 &
    4417            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    4418                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    4419                   bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &
    4420                   u_gtrans, v_gtrans
    4421 
    4422        USE grid_variables,                                                     &
    4423            ONLY:  ddx, ddy
    4424 
    4425        USE indices,                                                            &
    4426            ONLY:  nxlu, nxr, nyn, nys, nzb, nzb_max, nzt, advc_flags_1
    4427            
    4428        USE kinds
    4429        
    4430        USE statistics,                                                         &
    4431            ONLY:  hom, sums_us2_ws_l, sums_wsus_ws_l, weight_substep
    4432 
    4433        IMPLICIT NONE
    44344255
    44354256       INTEGER(iwp) ::  i         !< grid index along x-direction
     
    50914912    SUBROUTINE advec_v_ws
    50924913
    5093        USE arrays_3d,                                                          &
    5094            ONLY:  ddzw, drho_air, tend, u, v, w, rho_air_zw
    5095 
    5096        USE control_parameters,                                                 &
    5097            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    5098                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    5099                   bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &
    5100                   u_gtrans, v_gtrans
    5101 
    5102        USE grid_variables,                                                     &
    5103            ONLY:  ddx, ddy
    5104 
    5105        USE indices,                                                            &
    5106            ONLY:  nxl, nxr, nyn, nys, nysv, nzb, nzb_max, nzt, advc_flags_1
    5107 
    5108        USE kinds
    5109 
    5110        USE statistics,                                                         &
    5111            ONLY:  hom, sums_vs2_ws_l, sums_wsvs_ws_l, weight_substep
    5112 
    5113        IMPLICIT NONE
    5114 
    51154914
    51164915       INTEGER(iwp) ::  i         !< grid index along x-direction
     
    57775576    SUBROUTINE advec_w_ws
    57785577
    5779        USE arrays_3d,                                                          &
    5780            ONLY:  ddzu, drho_air_zw, tend, u, v, w, rho_air
    5781 
    5782        USE control_parameters,                                                 &
    5783            ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,              &
    5784                   bc_dirichlet_s, bc_radiation_l, bc_radiation_n,              &
    5785                   bc_radiation_r, bc_radiation_s, intermediate_timestep_count, &
    5786                   u_gtrans, v_gtrans
    5787 
    5788        USE grid_variables,                                                     &
    5789            ONLY:  ddx, ddy
    5790 
    5791        USE indices,                                                            &
    5792            ONLY:  nxl, nxr, nyn, nys, nzb, nzb_max, nzt, advc_flags_1,         &
    5793                   advc_flags_2
    5794 
    5795        USE kinds
    5796        
    5797        USE statistics,                                                         &
    5798            ONLY:  hom, sums_ws2_ws_l, weight_substep
    5799 
    5800        IMPLICIT NONE
    58015578
    58025579       INTEGER(iwp) ::  i         !< grid index along x-direction
Note: See TracChangeset for help on using the changeset viewer.