New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 1859 for branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcblk_core.F90 – NEMO

Ignore:
Timestamp:
2010-05-06T10:40:07+02:00 (14 years ago)
Author:
gm
Message:

ticket:#665 step 2 & 3: heat content in qns & new forcing terms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/OPA_SRC/SBC/sbcblk_core.F90

    r1730 r1859  
    1212   !!            3.0  !  2006-06  (G. Madec) sbc rewritting    
    1313   !!            3.2  !  2009-04  (B. Lemaire)  Introduce iom_put 
     14   !!            3.3  !  2010-05  (Y. Aksenov G. Madec) salt flux + heat associated with emp 
    1415   !!---------------------------------------------------------------------- 
    1516 
     
    4546   INTEGER , PARAMETER ::   jp_wndi = 1           ! index of 10m wind velocity (i-component) (m/s)    at T-point 
    4647   INTEGER , PARAMETER ::   jp_wndj = 2           ! index of 10m wind velocity (j-component) (m/s)    at T-point 
    47    INTEGER , PARAMETER ::   jp_humi = 3           ! index of specific humidity               ( - ) 
     48   INTEGER , PARAMETER ::   jp_humi = 3           ! index of specific humidity               ( % ) 
    4849   INTEGER , PARAMETER ::   jp_qsr  = 4           ! index of solar heat                      (W/m2) 
    4950   INTEGER , PARAMETER ::   jp_qlw  = 5           ! index of Long wave                       (W/m2) 
     
    6263   REAL(wp), PARAMETER ::   Cice =    1.63e-3     ! transfer coefficient over ice 
    6364 
    64    !                                !!* Namelist namsbc_core : CORE bulk parameters 
    65    LOGICAL  ::   ln_2m     = .FALSE.     ! logical flag for height of air temp. and hum 
    66    LOGICAL  ::   ln_taudif = .FALSE.     ! logical flag to use the "mean of stress module - module of mean stress" data 
    67    REAL(wp) ::   rn_pfac   = 1.          ! multiplication factor for precipitation 
     65   !                                    !!* Namelist namsbc_core : CORE bulk parameters 
     66   LOGICAL  ::   ln_2m     = .FALSE.     ! air temperature and humidity given at 2m (T) or 10m (F) 
     67   LOGICAL  ::   ln_taudif = .FALSE.     ! (T) use the "mean of stress module - module of mean stress" data or (F) not 
     68   REAL(wp) ::   rn_pfac   = 1.          ! multiplicative factor for precipitation 
    6869 
    6970   !! * Substitutions 
     
    7172#  include "vectopt_loop_substitute.h90" 
    7273   !!---------------------------------------------------------------------- 
    73    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
     74   !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)  
    7475   !! $Id$ 
    7576   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     
    8889      !!      the 10m wind velocity (i-component) (m/s)    at T-point 
    8990      !!      the 10m wind velocity (j-component) (m/s)    at T-point 
    90       !!      the specific humidity               ( - ) 
     91      !!      the 10m or 2m specific humidity     ( % ) 
    9192      !!      the solar heat                      (W/m2) 
    9293      !!      the Long wave                       (W/m2) 
    93       !!      the 10m air temperature             (Kelvin) 
     94      !!      the 10m or 2m air temperature       (Kelvin) 
    9495      !!      the total precipitation (rain+snow) (Kg/m2/s) 
    9596      !!      the snow (solid prcipitation)       (kg/m2/s) 
    96       !!   OPTIONAL parameter (see ln_taudif namelist flag): 
    97       !!      the tau diff associated to HF tau   (N/m2)   at T-point  
     97      !!      the tau diff associated to HF tau   (N/m2)   at T-point   (ln_taudif=T) 
    9898      !!              (2) CALL blk_oce_core 
    9999      !! 
    100100      !!      C A U T I O N : never mask the surface stress fields 
    101       !!                      the stress is assumed to be in the mesh referential 
    102       !!                      i.e. the (i,j) referential 
     101      !!                      the stress is assumed to be in the (i,j) mesh referential 
    103102      !! 
    104103      !! ** Action  :   defined at each time-step at the air-sea interface 
    105104      !!              - utau, vtau  i- and j-component of the wind stress 
    106       !!              - taum        wind stress module at T-point 
    107       !!              - wndm        10m wind module at T-point 
    108       !!              - qns, qsr    non-slor and solar heat flux 
    109       !!              - emp, emps   evaporation minus precipitation 
     105      !!              - taum, wndm  wind stress and 10m wind modules at T-point 
     106      !!              - qns, qsr    non-solar and solar heat flux 
     107      !!              - emp         upward mass flux (evapo. - precip.) 
    110108      !!---------------------------------------------------------------------- 
    111109      INTEGER, INTENT( in  ) ::   kt   ! ocean time step 
    112110      !! 
     111      INTEGER  ::   jf       ! dummy loop indice 
     112      INTEGER  ::   ifld     ! number of files to be read 
    113113      INTEGER  ::   ierror   ! return error code 
    114       INTEGER  ::   ifpr     ! dummy loop indice 
    115       INTEGER  ::   jfld     ! dummy loop arguments 
    116114      !! 
    117115      CHARACTER(len=100) ::  cn_dir   !   Root directory for location of core files 
    118116      TYPE(FLD_N), DIMENSION(jpfld) ::   slf_i     ! array of namelist informations on the fields to read 
    119       TYPE(FLD_N) ::   sn_wndi, sn_wndj, sn_humi, sn_qsr       ! informations about the fields to be read 
    120       TYPE(FLD_N) ::   sn_qlw , sn_tair, sn_prec, sn_snow      !   "                                 " 
    121       TYPE(FLD_N) ::   sn_tdif                                 !   "                                 " 
     117      TYPE(FLD_N) ::   sn_wndi, sn_wndj, sn_humi, sn_qsr             ! informations about the fields to be read 
     118      TYPE(FLD_N) ::   sn_qlw , sn_tair, sn_prec, sn_snow, sn_tdif   !       -                       - 
    122119      NAMELIST/namsbc_core/ cn_dir , ln_2m  , ln_taudif, rn_pfac,           & 
    123120         &                  sn_wndi, sn_wndj, sn_humi  , sn_qsr ,           & 
     
    156153         ! do we use HF tau information? 
    157154         lhftau = ln_taudif 
    158          jfld = jpfld - COUNT( (/.NOT. lhftau/) ) 
     155         ifld = jpfld - COUNT( (/.NOT. lhftau/) ) 
    159156         ! 
    160157         ! set sf structure 
    161          ALLOCATE( sf(jfld), STAT=ierror ) 
     158         ALLOCATE( sf(ifld), STAT=ierror ) 
    162159         IF( ierror > 0 ) THEN 
    163160            CALL ctl_stop( 'sbc_blk_core: unable to allocate sf structure' )   ;   RETURN 
    164161         ENDIF 
    165          DO ifpr= 1, jfld 
    166             ALLOCATE( sf(ifpr)%fnow(jpi,jpj) ) 
    167             ALLOCATE( sf(ifpr)%fdta(jpi,jpj,2) ) 
     162         DO jf = 1, ifld 
     163            ALLOCATE( sf(jf)%fnow(jpi,jpj) ) 
     164            ALLOCATE( sf(jf)%fdta(jpi,jpj,2) ) 
    168165         END DO 
    169166         ! 
     
    173170      ENDIF 
    174171 
     172!!gm    all the below lines should be executed only at nn_fbc frequency, no???   check fldread capability 
     173 
    175174      CALL fld_read( kt, nn_fsbc, sf )                   ! input fields provided at the current time-step 
    176  
     175      ! 
    177176#if defined key_lim3 
    178       tatm_ice(:,:) = sf(jp_tair)%fnow(:,:) 
     177      tatm_ice(:,:) = sf(jp_tair)%fnow(:,:)              ! air temperature over ice (LIM3 only) 
    179178#endif 
    180  
    181       IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 
    182           CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m )   ! compute the surface ocean fluxes using CLIO bulk formulea 
    183       ENDIF 
    184       !                                                  ! using CORE bulk formulea 
     179      !                                                  ! surface ocean fluxes using CORE bulk formulea 
     180      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) 
     181      ! 
    185182   END SUBROUTINE sbc_blk_core 
    186183    
     
    196193      !!      fields read in sbc_read 
    197194      !!  
    198       !! ** Outputs : - utau    : i-component of the stress at U-point  (N/m2) 
    199       !!              - vtau    : j-component of the stress at V-point  (N/m2) 
    200       !!              - taum    : Wind stress module at T-point         (N/m2) 
    201       !!              - wndm    : Wind speed module at T-point          (m/s) 
    202       !!              - qsr     : Solar heat flux over the ocean        (W/m2) 
    203       !!              - qns     : Non Solar heat flux over the ocean    (W/m2) 
    204       !!              - evap    : Evaporation over the ocean            (kg/m2/s) 
    205       !!              - emp(s)  : evaporation minus precipitation       (kg/m2/s) 
     195      !! ** Action  : - utau  : i-component of the stress at U-point  (N/m2) 
     196      !!              - vtau  : j-component of the stress at V-point  (N/m2) 
     197      !!              - taum  : Wind stress module at T-point         (N/m2) 
     198      !!              - wndm  : 10m Wind speed module at T-point      (m/s) 
     199      !!              - qsr   : Solar heat flux over the ocean        (W/m2) 
     200      !!              - qns   : Non Solar heat flux over the ocean    (W/m2) 
     201      !!                        including the latent heat of solid  
     202      !!                        precip. melting and emp heat content 
     203      !!              - emp   : upward mass flux (evap. - precip.)    (kg/m2/s) 
    206204      !! 
    207205      !!  ** Nota  :   sf has to be a dummy argument for AGRIF on NEC 
    208206      !!--------------------------------------------------------------------- 
    209       TYPE(fld), INTENT(in), DIMENSION(:)       ::   sf    ! input data 
    210       REAL(wp), INTENT(in), DIMENSION(jpi,jpj) ::   pst   ! surface temperature                      [Celcius] 
    211       REAL(wp), INTENT(in), DIMENSION(jpi,jpj) ::   pu    ! surface current at U-point (i-component) [m/s] 
    212       REAL(wp), INTENT(in), DIMENSION(jpi,jpj) ::   pv    ! surface current at V-point (j-component) [m/s] 
    213  
     207      TYPE(fld), INTENT(in), DIMENSION(:)       ::   sf    ! input data (forcing field structure) 
     208      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) ::   pst   ! surface temperature                      [Celcius] 
     209      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) ::   pu    ! surface current at U-point (i-component) [m/s] 
     210      REAL(wp) , INTENT(in), DIMENSION(jpi,jpj) ::   pv    ! surface current at V-point (j-component) [m/s] 
     211      !! 
    214212      INTEGER  ::   ji, jj     ! dummy loop indices 
    215       REAL(wp) ::   zcoef_qsatw 
    216       REAL(wp) ::   zztmp                                 ! temporary variable 
     213      REAL(wp) ::   zcoef_qsatw, zztmp                    ! temporary scalar 
    217214      REAL(wp), DIMENSION(jpi,jpj) ::   zwnd_i, zwnd_j    ! wind speed components at T-point 
    218215      REAL(wp), DIMENSION(jpi,jpj) ::   zqsatw            ! specific humidity at pst 
     
    230227      zcoef_qsatw = 0.98 * 640380. / rhoa 
    231228       
    232       zst(:,:) = pst(:,:) + rt0      ! converte Celcius to Kelvin (and set minimum value far above 0 K) 
     229      zst(:,:) = pst(:,:) + rt0      ! converte SST from Celcius to Kelvin (and set minimum value far above 0 K) 
    233230 
    234231      ! ----------------------------------------------------------------------------- ! 
     
    262259      ! ocean albedo assumed to be 0.066 
    263260!CDIR COLLAPSE 
    264       qsr (:,:) = ( 1. - 0.066 ) * sf(jp_qsr)%fnow(:,:) * tmask(:,:,1)                                 ! Short Wave 
     261      qsr (:,:) = ( 1. - 0.066 ) * sf(jp_qsr)%fnow(:,:) * tmask(:,:,1)                                     ! Short Wave 
    265262!CDIR COLLAPSE 
    266263      zqlw(:,:) = (  sf(jp_qlw)%fnow(:,:) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:)  ) * tmask(:,:,1)   ! Long  Wave 
     
    353350      
    354351!CDIR COLLAPSE 
    355       qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)      ! Downward Non Solar flux 
    356 !CDIR COLLAPSE 
    357       emp (:,:) = zevap(:,:) - sf(jp_prec)%fnow(:,:) * rn_pfac * tmask(:,:,1) 
    358 !CDIR COLLAPSE 
    359       emps(:,:) = emp(:,:) 
     352      emp (:,:) = (  zevap(:,:)                                          &   ! mass flux (evap. - precip.) 
     353         &         - sf(jp_prec)%fnow(:,:) * rn_pfac  ) * tmask(:,:,1) 
     354!CDIR COLLAPSE 
     355      qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)                       &   ! Downward Non Solar flux 
     356         &     - sf(jp_snow)%fnow(:,:) * lfus                            &   ! remove latent melting heat for solid precip 
     357         &     - zevap(:,:) * pst(ji,jj) * rcp                           &   ! remove evap heat content at SST 
     358         &     + ( sf(jp_prec)%fnow(:,:) - sf(jp_snow)%fnow(:,:) )       &   ! add liquid precip heat content at Tair 
     359         &     * ( sf(jp_tair)%fnow(:,:) - rt0 ) * rcp                   &    
     360         &     + sf(jp_snow)%fnow(:,:)                                   &   ! add solid  precip heat content at min(Tair,Tsnow) 
     361         &     * ( MIN( sf(jp_tair)%fnow(:,:), rt0_snow ) - rt0 ) * cpic  
    360362      ! 
    361363      CALL iom_put( "qlw_oce",   zqlw )                 ! output downward longwave heat over the ocean 
     
    392394      !! caution : the net upward water flux has with mm/day unit 
    393395      !!--------------------------------------------------------------------- 
    394       REAL(wp), INTENT(in   ), DIMENSION(:,:,:)      ::   pst      ! ice surface temperature (>0, =rt0 over land) [Kelvin] 
    395       REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj)    ::   pui      ! ice surface velocity (i- and i- components      [m/s] 
    396       REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj)    ::   pvi      !    at I-point (B-grid) or U & V-point (C-grid) 
    397       REAL(wp), INTENT(in   ), DIMENSION(:,:,:)      ::   palb     ! ice albedo (clear sky) (alb_ice_cs)               [%] 
    398       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj)    ::   p_taui   ! i- & j-components of surface ice stress        [N/m2] 
    399       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj)    ::   p_tauj   !   at I-point (B-grid) or U & V-point (C-grid) 
    400       REAL(wp), INTENT(  out), DIMENSION(:,:,:)      ::   p_qns    ! non solar heat flux over ice (T-point)         [W/m2] 
    401       REAL(wp), INTENT(  out), DIMENSION(:,:,:)      ::   p_qsr    !     solar heat flux over ice (T-point)         [W/m2] 
    402       REAL(wp), INTENT(  out), DIMENSION(:,:,:)      ::   p_qla    ! latent    heat flux over ice (T-point)         [W/m2] 
    403       REAL(wp), INTENT(  out), DIMENSION(:,:,:)      ::   p_dqns   ! non solar heat sensistivity  (T-point)         [W/m2] 
    404       REAL(wp), INTENT(  out), DIMENSION(:,:,:)      ::   p_dqla   ! latent    heat sensistivity  (T-point)         [W/m2] 
    405       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj)    ::   p_tpr    ! total precipitation          (T-point)      [Kg/m2/s] 
    406       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj)    ::   p_spr    ! solid precipitation          (T-point)      [Kg/m2/s] 
    407       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj)    ::   p_fr1    ! 1sr fraction of qsr penetration in ice (T-point)  [%] 
    408       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj)    ::   p_fr2    ! 2nd fraction of qsr penetration in ice (T-point)  [%] 
    409       CHARACTER(len=1), INTENT(in   )                ::   cd_grid  ! ice grid ( C or B-grid) 
    410       INTEGER, INTENT(in   )                         ::   pdim     ! number of ice categories 
     396      REAL(wp), INTENT(in   ), DIMENSION(:,:,:)   ::   pst      ! ice surface temperature (>0, =rt0 over land) [Kelvin] 
     397      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   pui      ! ice surface velocity (i- and i- components      [m/s] 
     398      REAL(wp), INTENT(in   ), DIMENSION(jpi,jpj) ::   pvi      !    at I-point (B-grid) or U & V-point (C-grid) 
     399      REAL(wp), INTENT(in   ), DIMENSION(:,:,:)   ::   palb     ! ice albedo (clear sky) (alb_ice_cs)               [%] 
     400      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   p_taui   ! i- & j-components of surface ice stress        [N/m2] 
     401      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   p_tauj   !   at I-point (B-grid) or U & V-point (C-grid) 
     402      REAL(wp), INTENT(  out), DIMENSION(:,:,:)   ::   p_qns    ! non solar heat flux over ice (T-point)         [W/m2] 
     403      REAL(wp), INTENT(  out), DIMENSION(:,:,:)   ::   p_qsr    !     solar heat flux over ice (T-point)         [W/m2] 
     404      REAL(wp), INTENT(  out), DIMENSION(:,:,:)   ::   p_qla    ! latent    heat flux over ice (T-point)         [W/m2] 
     405      REAL(wp), INTENT(  out), DIMENSION(:,:,:)   ::   p_dqns   ! non solar heat sensistivity  (T-point)         [W/m2] 
     406      REAL(wp), INTENT(  out), DIMENSION(:,:,:)   ::   p_dqla   ! latent    heat sensistivity  (T-point)         [W/m2] 
     407      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   p_tpr    ! total precipitation          (T-point)      [Kg/m2/s] 
     408      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   p_spr    ! solid precipitation          (T-point)      [Kg/m2/s] 
     409      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   p_fr1    ! 1sr fraction of qsr penetration in ice (T-point)  [%] 
     410      REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   p_fr2    ! 2nd fraction of qsr penetration in ice (T-point)  [%] 
     411      CHARACTER(len=1), INTENT(in   )             ::   cd_grid  ! ice grid ( C or B-grid) 
     412      INTEGER, INTENT(in   )                      ::   pdim     ! number of ice categories 
    411413      !! 
    412414      INTEGER  ::   ji, jj, jl    ! dummy loop indices 
    413415      INTEGER  ::   ijpl          ! number of ice categories (size of 3rd dim of input arrays) 
    414       REAL(wp) ::   zst2, zst3 
    415       REAL(wp) ::   zcoef_wnorm, zcoef_wnorm2, zcoef_dqlw, zcoef_dqla, zcoef_dqsb 
    416       REAL(wp) ::   zcoef_frca                                   ! fractional cloud amount 
    417       REAL(wp) ::   zwnorm_f, zwndi_f , zwndj_f                  ! relative wind module and components at F-point 
    418       REAL(wp) ::             zwndi_t , zwndj_t                  ! relative wind components at T-point 
    419       REAL(wp), DIMENSION(jpi,jpj) ::   z_wnds_t                 ! wind speed ( = | U10m - U_ice | ) at T-point 
    420       REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_qlw               ! long wave heat flux over ice 
    421       REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_qsb               ! sensible  heat flux over ice 
    422       REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_dqlw              ! long wave heat sensitivity over ice 
    423       REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_dqsb              ! sensible  heat sensitivity over ice 
     416      REAL(wp) ::   zst2, zcoef_wnorm , zcoef_dqlw              ! 
     417      REAL(wp) ::   zst3, zcoef_wnorm2, zcoef_dqla, zcoef_dqsb  ! 
     418      REAL(wp) ::   zcoef_frca                                  ! fractional cloud amount 
     419      REAL(wp) ::   zwnorm_f, zwndi_f , zwndj_f                 ! relative wind module and components at F-point 
     420      REAL(wp) ::             zwndi_t , zwndj_t                 ! relative wind components at T-point 
     421      REAL(wp), DIMENSION(jpi,jpj)      ::   z_wnds_t           ! wind speed ( = | U10m - U_ice | ) at T-point 
     422      REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_qlw              ! long wave heat flux over ice 
     423      REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_qsb              ! sensible  heat flux over ice 
     424      REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_dqlw             ! long wave heat sensitivity over ice 
     425      REAL(wp), DIMENSION(jpi,jpj,pdim) ::   z_dqsb             ! sensible  heat sensitivity over ice 
    424426      !!--------------------------------------------------------------------- 
    425427 
     
    576578         CALL prt_ctl(tab2d_1=z_wnds_t, clinfo1=' blk_ice_core: z_wnds_t : ') 
    577579      ENDIF 
    578  
     580      ! 
    579581   END SUBROUTINE blk_ice_core 
    580582   
    581583 
    582584   SUBROUTINE TURB_CORE_1Z(zu, sst, T_a, q_sat, q_a,   & 
    583       &                        dU, Cd, Ch, Ce   ) 
     585      &                        dU , Cd , Ch   , Ce   ) 
    584586      !!---------------------------------------------------------------------- 
    585587      !!                      ***  ROUTINE  turb_core  *** 
     
    704706 
    705707 
    706     SUBROUTINE TURB_CORE_2Z(zt, zu, sst, T_zt, q_sat, q_zt, dU, Cd, Ch, Ce, T_zu, q_zu) 
     708    SUBROUTINE TURB_CORE_2Z( zt  , zu, sst, T_zt, q_sat,   & 
     709      &                      q_zt, dU, Cd , Ch  , Ce   , T_zu, q_zu) 
    707710      !!---------------------------------------------------------------------- 
    708711      !!                      ***  ROUTINE  turb_core  *** 
     
    838841         Ce  = Ce_n10*sqrt_Cd/sqrt_Cd_n10/xct 
    839842         !! 
    840          !! 
    841843      END DO 
    842       !! 
     844      ! 
    843845    END SUBROUTINE TURB_CORE_2Z 
    844846 
Note: See TracChangeset for help on using the changeset viewer.