/[MITgcm]/MITgcm/pkg/atm_phys/surface_flux_mod.F90
ViewVC logotype

Diff of /MITgcm/pkg/atm_phys/surface_flux_mod.F90

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by jmc, Mon Jul 31 16:07:05 2017 UTC revision 1.3 by jmc, Fri Aug 11 20:48:51 2017 UTC
# Line 21  private Line 21  private
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
# Line 44  real            :: d608   = d378/d622 Line 43  real            :: d608   = d378/d622
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.
# Line 58  namelist /surface_flux_nml/ no_neg_q, Line 56  namelist /surface_flux_nml/ no_neg_q,
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,    &
# Line 110  subroutine surface_flux_1d ( Line 105  subroutine surface_flux_1d (
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 ----
# Line 179  subroutine surface_flux_1d ( Line 173  subroutine surface_flux_1d (
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
# Line 291  subroutine surface_flux_0d ( Line 284  subroutine surface_flux_0d (
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
# Line 393  subroutine surface_flux_2d ( Line 385  subroutine surface_flux_2d (
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  ! ============================================================================  ! ============================================================================
# Line 424  subroutine surface_flux_init (myThid) Line 415  subroutine surface_flux_init (myThid)
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 ()
# Line 441  subroutine surface_flux_init (myThid) Line 436  subroutine surface_flux_init (myThid)
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.
# Line 451  subroutine surface_flux_init (myThid) Line 445  subroutine surface_flux_init (myThid)
445    
446  end subroutine surface_flux_init  end subroutine surface_flux_init
447    
   
448  end module surface_flux_mod  end module surface_flux_mod

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22