21 |
public surface_flux |
public surface_flux |
22 |
! ==== end of public interface =============================================== |
! ==== end of public interface =============================================== |
23 |
|
|
|
|
|
24 |
interface surface_flux |
interface surface_flux |
25 |
! module procedure surface_flux_0d |
! module procedure surface_flux_0d |
26 |
! module procedure surface_flux_1d |
! module procedure surface_flux_1d |
43 |
! d608 set to zero at initialization if the use of |
! d608 set to zero at initialization if the use of |
44 |
! virtual temperatures is turned off in namelist |
! virtual temperatures is turned off in namelist |
45 |
|
|
|
|
|
46 |
! ---- namelist with default values ------------------------------------------ |
! ---- namelist with default values ------------------------------------------ |
47 |
logical :: no_neg_q = .false. ! for backwards compatibility |
logical :: no_neg_q = .false. ! for backwards compatibility |
48 |
logical :: use_virtual_temp = .true. |
logical :: use_virtual_temp = .true. |
56 |
gust_const, & |
gust_const, & |
57 |
use_mixing_ratio |
use_mixing_ratio |
58 |
|
|
|
|
|
|
|
|
59 |
contains |
contains |
60 |
|
|
|
|
|
61 |
! ============================================================================ |
! ============================================================================ |
62 |
subroutine surface_flux_1d ( & |
subroutine surface_flux_1d ( & |
63 |
t_atm, q_atm_in, u_atm, v_atm, p_atm, z_atm, & |
t_atm, q_atm_in, u_atm, v_atm, p_atm, z_atm, & |
105 |
|
|
106 |
integer :: i, nbad |
integer :: i, nbad |
107 |
|
|
|
|
|
108 |
if (do_init) call surface_flux_init(myThid) |
if (do_init) call surface_flux_init(myThid) |
109 |
|
|
110 |
!---- use local value of surf temp ---- |
!---- use local value of surf temp ---- |
173 |
rough_mom, rough_heat, rough_moist, w_atm, & |
rough_mom, rough_heat, rough_moist, w_atm, & |
174 |
cd_m, cd_t, cd_q, u_star, b_star, myThid, avail ) |
cd_m, cd_t, cd_q, u_star, b_star, myThid, avail ) |
175 |
|
|
|
|
|
176 |
where (avail) |
where (avail) |
177 |
! surface layer drag coefficients |
! surface layer drag coefficients |
178 |
drag_t = cd_t * w_atm |
drag_t = cd_t * w_atm |
284 |
cd_m, cd_t, cd_q |
cd_m, cd_t, cd_q |
285 |
real, dimension(1) :: q_surf |
real, dimension(1) :: q_surf |
286 |
|
|
|
|
|
287 |
avail = .true. |
avail = .true. |
288 |
|
|
289 |
t_atm(1) = t_atm_0 |
t_atm(1) = t_atm_0 |
385 |
end do |
end do |
386 |
end subroutine surface_flux_2d |
end subroutine surface_flux_2d |
387 |
|
|
|
|
|
388 |
! ============================================================================ |
! ============================================================================ |
389 |
subroutine surface_flux_init (myThid) |
subroutine surface_flux_init (myThid) |
390 |
! ============================================================================ |
! ============================================================================ |
415 |
'SURFACE_FLUX_INIT: finished reading data.atm_gray' |
'SURFACE_FLUX_INIT: finished reading data.atm_gray' |
416 |
CALL PRINT_MESSAGE( msgBuf, gcm_stdMsgUnit, gcm_SQZ_R, myThid ) |
CALL PRINT_MESSAGE( msgBuf, gcm_stdMsgUnit, gcm_SQZ_R, myThid ) |
417 |
! Close the open data file |
! Close the open data file |
418 |
|
#ifdef SINGLE_DISK_IO |
419 |
CLOSE(iUnit) |
CLOSE(iUnit) |
420 |
|
#else |
421 |
|
CLOSE(iUnit,STATUS='DELETE') |
422 |
|
#endif /* SINGLE_DISK_IO */ |
423 |
|
|
424 |
! if ( file_exist('input.nml')) then |
! if ( file_exist('input.nml')) then |
425 |
! unit = open_namelist_file () |
! unit = open_namelist_file () |
436 |
|
|
437 |
! if ( mpp_pe() == mpp_root_pe() ) write (stdlog(), nml=surface_flux_nml) |
! if ( mpp_pe() == mpp_root_pe() ) write (stdlog(), nml=surface_flux_nml) |
438 |
|
|
|
|
|
439 |
! if(.not. use_virtual_temp) d608 = 0.0 |
! if(.not. use_virtual_temp) d608 = 0.0 |
440 |
|
|
441 |
do_init = .false. |
do_init = .false. |
445 |
|
|
446 |
end subroutine surface_flux_init |
end subroutine surface_flux_init |
447 |
|
|
|
|
|
448 |
end module surface_flux_mod |
end module surface_flux_mod |