Ignore:
Timestamp:
Jun 21, 2007 8:23:15 AM (14 years ago)
Author:
raasch
Message:

New:
---
ocean version including prognostic equation for salinity and equation of state for seawater. Routine buoyancy can be used with both temperature and density.
+ inipar-parameters bc_sa_t, bottom_salinityflux, ocean, sa_surface, sa_vertical_gradient, sa_vertical_gradient_level, top_salinityflux

advec_s_bc, average_3d_data, boundary_conds, buoyancy, check_parameters, data_output_2d, data_output_3d, diffusion_e, flow_statistics, header, init_grid, init_3d_model, modules, netcdf, parin, production_e, prognostic_equations, read_var_list, sum_up_3d_data, swap_timelevel, time_integration, user_interface, write_var_list, write_3d_binary

New:
eqn_state_seawater, init_ocean

Changed:


inipar-parameter use_pt_reference renamed use_reference

hydro_press renamed hyp, routine calc_mean_pt_profile renamed calc_mean_profile

format adjustments for the ocean version (run_control)

advec_particles, buoyancy, calc_liquid_water_content, check_parameters, diffusion_e, diffusivities, header, init_cloud_physics, modules, production_e, prognostic_equations, run_control

Errors:


Bugfix: height above topography instead of height above level k=0 is used for calculating the mixing length (diffusion_e and diffusivities).

Bugfix: error in boundary condition for TKE removed (advec_s_bc)

advec_s_bc, diffusion_e, prognostic_equations

File:
1 edited

Legend:

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

    r94 r97  
    88! This is also a bugfix, because the height above the topography is now
    99! used instead of the height above level k=0.
     10! theta renamed var, dpt_dz renamed dvar_dz, +new argument var_reference
     11! use_pt_reference renamed use_reference
    1012!
    1113! Former revisions:
     
    5052! Call for all grid points
    5153!------------------------------------------------------------------------------!
    52     SUBROUTINE diffusion_e( ddzu, dd2zu, ddzw, diss, e, km, l_grid, theta, &
    53                             rif, tend, zu, zw )
     54    SUBROUTINE diffusion_e( ddzu, dd2zu, ddzw, diss, e, km, l_grid, var, &
     55                            var_reference, rif, tend, zu, zw )
    5456
    5557       USE control_parameters
     
    6163
    6264       INTEGER ::  i, j, k
    63        REAL            ::  dpt_dz, l_stable, phi_m
     65       REAL            ::  dvar_dz, l_stable, phi_m, var_reference
    6466       REAL            ::  ddzu(1:nzt+1), dd2zu(1:nzt), ddzw(1:nzt+1), &
    6567                           l_grid(1:nzt), zu(0:nzt+1), zw(0:nzt+1)
    6668       REAL, DIMENSION(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) :: diss, tend
    6769       REAL, DIMENSION(:,:), POINTER   ::  rif
    68        REAL, DIMENSION(:,:,:), POINTER ::  e, km, theta
     70       REAL, DIMENSION(:,:,:), POINTER ::  e, km, var
    6971       REAL, DIMENSION(nzb+1:nzt,nys:nyn) ::  dissipation, l, ll
    7072 
     
    7375!--    This if clause must be outside the k-loop because otherwise
    7476!--    runtime errors occur with -C hopt on NEC
    75        IF ( use_pt_reference )  THEN
     77       IF ( use_reference )  THEN
    7678
    7779          DO  i = nxl, nxr
     
    9193!
    9294!--                Calculate the mixing length (for dissipation)
    93                    dpt_dz = ( theta(k+1,j,i) - theta(k-1,j,i) ) * dd2zu(k)
    94                    IF ( dpt_dz > 0.0 ) THEN
     95                   dvar_dz = atmos_ocean_sign * &
     96                             ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k)
     97                   IF ( dvar_dz > 0.0 ) THEN
    9598                      l_stable = 0.76 * SQRT( e(k,j,i) ) / &
    96                                         SQRT( g / pt_reference * dpt_dz ) + 1E-5
     99                                 SQRT( g / var_reference * dvar_dz ) + 1E-5
    97100                   ELSE
    98101                      l_stable = l_grid(k)
     
    180183!
    181184!--                Calculate the mixing length (for dissipation)
    182                    dpt_dz = ( theta(k+1,j,i) - theta(k-1,j,i) ) * dd2zu(k)
    183                    IF ( dpt_dz > 0.0 ) THEN
     185                   dvar_dz = atmos_ocean_sign * &
     186                             ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k)
     187                   IF ( dvar_dz > 0.0 ) THEN
    184188                      l_stable = 0.76 * SQRT( e(k,j,i) ) / &
    185                                         SQRT( g / theta(k,j,i) * dpt_dz ) + 1E-5
     189                                        SQRT( g / var(k,j,i) * dvar_dz ) + 1E-5
    186190                   ELSE
    187191                      l_stable = l_grid(k)
     
    270274!------------------------------------------------------------------------------!
    271275    SUBROUTINE diffusion_e_ij( i, j, ddzu, dd2zu, ddzw, diss, e, km, l_grid, &
    272                                theta, rif, tend, zu, zw )
     276                               var, var_reference, rif, tend, zu, zw )
    273277
    274278       USE control_parameters
     
    280284
    281285       INTEGER         ::  i, j, k
    282        REAL            ::  dpt_dz, l_stable, phi_m
     286       REAL            ::  dvar_dz, l_stable, phi_m, var_reference
    283287       REAL            ::  ddzu(1:nzt+1), dd2zu(1:nzt), ddzw(1:nzt+1), &
    284288                           l_grid(1:nzt), zu(0:nzt+1), zw(0:nzt+1)
    285289       REAL, DIMENSION(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) ::  diss, tend
    286290       REAL, DIMENSION(:,:), POINTER   ::  rif
    287        REAL, DIMENSION(:,:,:), POINTER ::  e, km, theta
     291       REAL, DIMENSION(:,:,:), POINTER ::  e, km, var
    288292       REAL, DIMENSION(nzb+1:nzt)    ::  dissipation, l, ll
    289293
     
    303307!--    Calculate the mixing length (for dissipation)
    304308       DO  k = nzb_s_inner(j,i)+1, nzt
    305           dpt_dz = ( theta(k+1,j,i) - theta(k-1,j,i) ) * dd2zu(k)
    306           IF ( dpt_dz > 0.0 ) THEN
    307              IF ( use_pt_reference )  THEN
     309          dvar_dz = atmos_ocean_sign * &
     310                    ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k)
     311          IF ( dvar_dz > 0.0 ) THEN
     312             IF ( use_reference )  THEN
    308313                l_stable = 0.76 * SQRT( e(k,j,i) ) / &
    309                                   SQRT( g / pt_reference * dpt_dz ) + 1E-5
     314                                  SQRT( g / var_reference * dvar_dz ) + 1E-5
    310315             ELSE
    311316                l_stable = 0.76 * SQRT( e(k,j,i) ) / &
    312                                   SQRT( g / theta(k,j,i) * dpt_dz ) + 1E-5
     317                                  SQRT( g / var(k,j,i) * dvar_dz ) + 1E-5
    313318             ENDIF
    314319          ELSE
Note: See TracChangeset for help on using the changeset viewer.