Changeset 3381


Ignore:
Timestamp:
Oct 19, 2018 1:09:06 PM (6 years ago)
Author:
raasch
Message:

spin-up cooling for ocean surface implemented, see new parameter surface_cooling_spinup_time

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r3355 r3381  
    2525# -----------------
    2626# $Id$
     27# dependencies for ocean_mod fixed
     28#
     29# 3355 2018-10-16 14:03:34Z knoop
    2730# Add module for offline nesting;
    2831# Add surface_mod to synthetic-turbulence generator;
     
    13081311        modules.o \
    13091312        pmc_interface_mod.o \
     1313        surface_mod.o \
    13101314        user_actions.o
    13111315outflow_turbulence.o: \
  • palm/trunk/SOURCE/ocean_mod.f90

    r3311 r3381  
    2525! -----------------
    2626! $Id$
     27! spin-up cooling for ocean surface implemented, see new parameter
     28! surface_cooling_spinup_time
     29!
     30! 3311 2018-10-05 12:34:56Z raasch
    2731! check if ocean mode is used for invalid combinations
    2832!
     
    7983    LOGICAL ::  stokes_force = .FALSE.        !< switch to switch on the Stokes force
    8084    LOGICAL ::  wave_breaking = .FALSE.       !< switch to switch on wave breaking effects
     85    LOGICAL ::  surface_cooling_switched_off = .FALSE.  !< variable to check if surface heat flux has been switched off
    8186
    8287    REAL(wp) ::  alpha_wave_breaking = 3.0_wp !< coefficient for wave breaking generated turbulence from Noh et al. (2004), JPO
     
    8792    REAL(wp) ::  stokes_waveheight = 0.0_wp  !< wave height assumed for Stokes drift velocity
    8893    REAL(wp) ::  stokes_wavelength = 0.0_wp  !< wavelength assumed for Stokes drift velocity
     94    REAL(wp) ::  surface_cooling_spinup_time = 999999.9_wp  !< time after which surface heat flux is switched off
    8995    REAL(wp) ::  timescale_wave_breaking     !< time scale of random forcing
    9096    REAL(wp) ::  u_star_wave_breaking        !< to store the absolute value of friction velocity at the ocean surface
     
    509515    NAMELIST /ocean_parameters/  bc_sa_t, bottom_salinityflux, salinity,       &
    510516             sa_surface, sa_vertical_gradient, sa_vertical_gradient_level,     &
    511              stokes_waveheight, stokes_wavelength, top_salinityflux,           &
    512              wall_salinityflux, wave_breaking
     517             stokes_waveheight, stokes_wavelength, surface_cooling_spinup_time,&
     518             top_salinityflux, wall_salinityflux, wave_breaking
    513519
    514520!
     
    11311137    ENDIF
    11321138    IF ( .NOT. salinity )  WRITE( io, 4 )
     1139    IF ( surface_cooling_spinup_time /= 999999.9_wp )  THEN
     1140       WRITE( io, 5 )  surface_cooling_spinup_time
     1141    ENDIF
    11331142
    113411431   FORMAT (//' Ocean settings:'/                                              &
     
    11411150            '        timescale:',F5.1,' s')
    114211514   FORMAT ('    --> prognostic salinity equation is switched off' )
     11525   FORMAT ('    --> surface heat flux is switched off after ',F8.1,' s')
    11431153
    11441154 END SUBROUTINE ocean_header
     
    14841494
    14851495    USE control_parameters,                                                    &
    1486         ONLY:  dt_3d, intermediate_timestep_count, intermediate_timestep_count_max,   &
    1487                scalar_advec, timestep_scheme, tsc, ws_scheme_sca
     1496        ONLY:  dt_3d, intermediate_timestep_count,                             &
     1497               intermediate_timestep_count_max, scalar_advec, simulated_time,  &
     1498               timestep_scheme, tsc, ws_scheme_sca
    14881499
    14891500    USE cpulog,                                                                &
     
    15101521
    15111522    REAL(wp)     ::  sbt     !< weighting factor for sub-time step
     1523
     1524!
     1525!-- Switch of the surface heat flux, if requested
     1526    IF ( surface_cooling_spinup_time /= 999999.9_wp )  THEN
     1527       IF ( .NOT. surface_cooling_switched_off  .AND.                          &
     1528            simulated_time >= surface_cooling_spinup_time )  THEN
     1529
     1530          surf_def_h(2)%shf = 0.0_wp
     1531          surface_cooling_switched_off = .TRUE.
     1532
     1533       ENDIF
     1534    ENDIF
    15121535
    15131536!
     
    16361659    USE control_parameters,                                                    &
    16371660        ONLY:  dt_3d, intermediate_timestep_count,                             &
    1638                intermediate_timestep_count_max, timestep_scheme, tsc,          &
    1639                ws_scheme_sca
     1661               intermediate_timestep_count_max, simulated_time,                &
     1662               timestep_scheme, tsc, ws_scheme_sca
    16401663
    16411664    USE diffusion_s_mod,                                                       &
     
    16601683    INTEGER(iwp) ::  k             !< loop index z direction
    16611684    INTEGER(iwp) ::  tn            !< task number of openmp task
     1685
     1686
     1687!
     1688!-- Switch of the surface heat flux, if requested
     1689    IF ( surface_cooling_spinup_time /= 999999.9_wp )  THEN
     1690       IF ( .NOT. surface_cooling_switched_off  .AND.                          &
     1691            simulated_time >= surface_cooling_spinup_time )  THEN
     1692
     1693          surf_def_h(2)%shf = 0.0_wp
     1694          surface_cooling_switched_off = .TRUE.
     1695
     1696       ENDIF
     1697    ENDIF
    16621698
    16631699!
     
    18131849       CASE ( 'stokes_wavelength' )
    18141850          READ ( 13 )  stokes_wavelength
     1851
     1852       CASE ( 'surface_cooling_spinup_time' )
     1853          READ ( 13 )  surface_cooling_spinup_time
    18151854
    18161855       CASE ( 'top_salinityflux' )
     
    19451984    CALL wrd_write_string( 'stokes_wavelength' )
    19461985    WRITE ( 14 )  stokes_wavelength
     1986
     1987    CALL wrd_write_string( 'surface_cooling_spinup_time' )
     1988    WRITE ( 14 )  surface_cooling_spinup_time
    19471989
    19481990    CALL wrd_write_string( 'top_salinityflux' )
Note: See TracChangeset for help on using the changeset viewer.