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 2198 for branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/SBC/sbcblk_core.F90 – NEMO

Ignore:
Timestamp:
2010-10-11T13:09:49+02:00 (14 years ago)
Author:
smasson
Message:

merge dev_r2174_DCY into DEV_r2106_LOCEAN2010

File:
1 edited

Legend:

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

    r1951 r2198  
    1212   !!            3.0  !  2006-06  (G. Madec) sbc rewritting    
    1313   !!            3.2  !  2009-04  (B. Lemaire)  Introduce iom_put 
     14   !!            3.3  !  2010-10  (S. Masson)  add diurnal cycle 
    1415   !!---------------------------------------------------------------------- 
    1516 
     
    2627   USE fldread         ! read input fields 
    2728   USE sbc_oce         ! Surface boundary condition: ocean fields 
     29   USE sbcdcy          ! surface boundary condition: diurnal cycle 
    2830   USE iom             ! I/O manager library 
    2931   USE in_out_manager  ! I/O manager 
     
    3436   USE sbc_ice         ! Surface boundary condition: ice fields 
    3537#endif 
    36  
    3738 
    3839   IMPLICIT NONE 
     
    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.   ! logical flag for height of air temp. and hum 
     67   LOGICAL  ::   ln_taudif = .FALSE.   ! logical flag to use the "mean of stress module - module of mean stress" data 
     68   REAL(wp) ::   rn_pfac   = 1.        ! multiplication 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 , NEMO-consortium (2010)  
    7475   !! $Id$ 
    7576   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    7677   !!---------------------------------------------------------------------- 
    77  
    7878CONTAINS 
    7979 
     
    144144         sn_tdif = FLD_N( 'taudif'  ,    24     ,  'taudif'  ,  .true.    , .false. ,   'yearly'  , ''       , ''         ) 
    145145         ! 
    146          REWIND( numnam )                    ! ... read in namlist namsbc_core 
     146         REWIND( numnam )                          ! read in namlist namsbc_core 
    147147         READ  ( numnam, namsbc_core ) 
    148          ! 
    149          ! store namelist information in an array 
     148         !                                         ! check: do we plan to use ln_dm2dc with non-daily forcing? 
     149         IF( ln_dm2dc .AND. sn_qsr%nfreqh /= 24 )   &  
     150            &   CALL ctl_stop( 'sbc_blk_core: ln_dm2dc can be activated only with daily short-wave forcing' )  
     151         IF( ln_dm2dc .AND. sn_qsr%ln_tint ) THEN 
     152            CALL ctl_warn( 'sbc_blk_core: ln_dm2dc is taking care of the temporal interpolation of daily qsr',   & 
     153                 &         '              ==> We force time interpolation = .false. for qsr' ) 
     154            sn_qsr%ln_tint = .false. 
     155         ENDIF 
     156         !                                         ! store namelist information in an array 
    150157         slf_i(jp_wndi) = sn_wndi   ;   slf_i(jp_wndj) = sn_wndj 
    151158         slf_i(jp_qsr ) = sn_qsr    ;   slf_i(jp_qlw ) = sn_qlw 
     
    153160         slf_i(jp_prec) = sn_prec   ;   slf_i(jp_snow) = sn_snow 
    154161         slf_i(jp_tdif) = sn_tdif 
    155          ! 
    156          ! do we use HF tau information? 
    157          lhftau = ln_taudif 
     162         !                  
     163         lhftau = ln_taudif                        ! do we use HF tau information? 
    158164         jfld = jpfld - COUNT( (/.NOT. lhftau/) ) 
    159165         ! 
    160          ! set sf structure 
    161          ALLOCATE( sf(jfld), STAT=ierror ) 
     166         ALLOCATE( sf(jfld), STAT=ierror )         ! set sf structure 
    162167         IF( ierror > 0 ) THEN 
    163168            CALL ctl_stop( 'sbc_blk_core: unable to allocate sf structure' )   ;   RETURN 
     
    167172            ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) ) 
    168173         END DO 
    169          ! 
    170          ! fill sf with slf_i and control print 
    171          CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulattion for ocean surface boundary condition', 'namsbc_core' ) 
     174         !                                         ! fill sf with slf_i and control print 
     175         CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulation for ocean surface boundary condition', 'namsbc_core' ) 
    172176         ! 
    173177      ENDIF 
    174178 
    175       CALL fld_read( kt, nn_fsbc, sf )                   ! input fields provided at the current time-step 
     179                       CALL fld_read( kt, nn_fsbc, sf )        ! input fields provided at the current time-step 
     180 
     181      IF( ln_dm2dc )   CALL sbc_dcy ( kt , sf(jp_qsr)%fnow )   ! modify now Qsr to include the diurnal cycle 
    176182 
    177183#if defined key_lim3 
    178       tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1) 
     184      tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1)                  ! LIM3: make Tair available in sea-ice 
    179185#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 
     186      !                                                        ! surface ocean fluxes computed with CLIO bulk formulea 
     187      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) 
     188      ! 
    185189   END SUBROUTINE sbc_blk_core 
    186190    
Note: See TracChangeset for help on using the changeset viewer.