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/sbcmod.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/sbcmod.F90

    r2148 r2198  
    55   !!====================================================================== 
    66   !! History :  3.0  !  2006-07  (G. Madec)  Original code 
    7    !!            3.1  !  2008-08  (S. Masson, E. Maisonnave, G. Madec) coupled interface 
     7   !!            3.1  !  2008-08  (S. Masson, A. Caubel, E. Maisonnave, G. Madec) coupled interface 
    88   !!            3.3  !  2010-04  (M. Leclair, G. Madec)  Forcing averaged over 2 time steps 
     9   !!            3.3  !  2010-10  (S. Masson)  add diurnal cycle 
    910   !!---------------------------------------------------------------------- 
    1011 
     
    1314   !!   sbc            : surface ocean momentum, heat and freshwater boundary conditions 
    1415   !!---------------------------------------------------------------------- 
    15    USE oce             ! ocean dynamics and tracers 
    16    USE dom_oce         ! ocean space and time domain 
    17    USE phycst          ! physical constants 
    18  
    19    USE sbc_oce         ! Surface boundary condition: ocean fields 
    20    USE sbc_ice         ! Surface boundary condition: ice fields 
    21    USE sbcssm          ! surface boundary condition: sea-surface mean variables 
    22    USE sbcana          ! surface boundary condition: analytical formulation 
    23    USE sbcflx          ! surface boundary condition: flux formulation 
    24    USE sbcblk_clio     ! surface boundary condition: bulk formulation : CLIO 
    25    USE sbcblk_core     ! surface boundary condition: bulk formulation : CORE 
    26    USE sbcice_if       ! surface boundary condition: ice-if sea-ice model 
    27    USE sbcice_lim      ! surface boundary condition: LIM 3.0 sea-ice model 
    28    USE sbcice_lim_2    ! surface boundary condition: LIM 2.0 sea-ice model 
    29    USE sbccpl          ! surface boundary condition: coupled florulation 
     16   USE oce              ! ocean dynamics and tracers 
     17   USE dom_oce          ! ocean space and time domain 
     18   USE phycst           ! physical constants 
     19   USE sbc_oce          ! Surface boundary condition: ocean fields 
     20   USE sbc_ice          ! Surface boundary condition: ice fields 
     21   USE sbcssm           ! surface boundary condition: sea-surface mean variables 
     22   USE sbcana           ! surface boundary condition: analytical formulation 
     23   USE sbcflx           ! surface boundary condition: flux formulation 
     24   USE sbcblk_clio      ! surface boundary condition: bulk formulation : CLIO 
     25   USE sbcblk_core      ! surface boundary condition: bulk formulation : CORE 
     26   USE sbcice_if        ! surface boundary condition: ice-if sea-ice model 
     27   USE sbcice_lim       ! surface boundary condition: LIM 3.0 sea-ice model 
     28   USE sbcice_lim_2     ! surface boundary condition: LIM 2.0 sea-ice model 
     29   USE sbccpl           ! surface boundary condition: coupled florulation 
    3030   USE cpl_oasis3, ONLY:lk_cpl      ! are we in coupled mode? 
    31    USE sbcssr          ! surface boundary condition: sea surface restoring 
    32    USE sbcrnf          ! surface boundary condition: runoffs 
    33    USE sbcfwb          ! surface boundary condition: freshwater budget 
    34    USE closea          ! closed sea 
    35  
    36    USE prtctl          ! Print control                    (prt_ctl routine) 
    37    USE restart         ! ocean restart 
    38    USE iom 
    39    USE in_out_manager  ! I/O manager 
     31   USE sbcssr           ! surface boundary condition: sea surface restoring 
     32   USE sbcrnf           ! surface boundary condition: runoffs 
     33   USE sbcfwb           ! surface boundary condition: freshwater budget 
     34   USE closea           ! closed sea 
     35 
     36   USE prtctl           ! Print control                    (prt_ctl routine) 
     37   USE restart          ! ocean restart 
     38   USE iom              ! IOM library 
     39   USE in_out_manager   ! I/O manager 
    4040 
    4141   IMPLICIT NONE 
     
    5050#  include "domzgr_substitute.h90" 
    5151   !!---------------------------------------------------------------------- 
    52    !! NEMO/OPA 3.3 , LOCEAN-IPSL (2010)  
     52   !! NEMO/OPA 3.3 , NEMO-consortium (2010)  
    5353   !! $Id$ 
    5454   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    5555   !!---------------------------------------------------------------------- 
    56  
    5756CONTAINS 
    5857 
     
    7069      INTEGER ::   icpt      ! temporary integer 
    7170      !! 
    72       NAMELIST/namsbc/ nn_fsbc, ln_ana, ln_flx, ln_blk_clio, ln_blk_core, ln_cpl,   & 
    73          &             nn_ice , ln_dm2dc, ln_rnf, ln_ssr, nn_fwb, nn_ico_cpl 
     71      NAMELIST/namsbc/ nn_fsbc, ln_ana  , ln_flx, ln_blk_clio, ln_blk_core, ln_cpl    ,   & 
     72         &             nn_ice , ln_dm2dc, ln_rnf, ln_ssr     , nn_fwb     , nn_ico_cpl 
    7473      !!---------------------------------------------------------------------- 
    7574 
     
    8079      ENDIF 
    8180 
    82       REWIND( numnam )                   ! Read Namelist namsbc 
     81      REWIND( numnam )           ! Read Namelist namsbc 
    8382      READ  ( numnam, namsbc ) 
    8483 
    85       ! overwrite namelist parameter using CPP key information 
    86 !!gm here no overwrite, test all option via namelist change: require more incore memory 
    87 !!gm  IF( lk_sbc_cpl       ) THEN   ;   ln_cpl      = .TRUE.   ;   ELSE   ;   ln_cpl      = .FALSE.   ;   ENDIF 
    88  
    89       IF( Agrif_Root() ) THEN 
    90         IF( lk_lim2 )            nn_ice      = 2 
    91         IF( lk_lim3 )            nn_ice      = 3 
    92       ENDIF 
    93       ! 
    94       IF( cp_cfg == 'gyre' ) THEN 
     84      !                          ! overwrite namelist parameter using CPP key information 
     85      IF( Agrif_Root() ) THEN                ! AGRIF zoom 
     86        IF( lk_lim2 )   nn_ice      = 2 
     87        IF( lk_lim3 )   nn_ice      = 3 
     88      ENDIF 
     89      IF( cp_cfg == 'gyre' ) THEN            ! GYRE configuration 
    9590          ln_ana      = .TRUE.    
    9691          nn_ice      =   0 
    9792      ENDIF 
    9893       
    99       ! Control print 
    100       IF(lwp) THEN 
     94      IF(lwp) THEN               ! Control print 
    10195         WRITE(numout,*) '        Namelist namsbc (partly overwritten with CPP key setting)' 
    10296         WRITE(numout,*) '           frequency update of sbc (and ice)             nn_fsbc     = ', nn_fsbc 
     
    117111      ENDIF 
    118112 
     113      !                          ! Checks: 
    119114      IF( .NOT. ln_rnf ) THEN                      ! no specific treatment in vicinity of river mouths  
    120115         ln_rnf_mouth  = .false.                       
     
    139134         &   CALL ctl_stop( 'sea-ice model requires a bulk formulation or coupled configuration' ) 
    140135       
    141       ! Choice of the Surface Boudary Condition (set nsbc) 
     136      IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) )   & 
     137         &   CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' ) 
     138       
     139      IF( ln_dm2dc .AND. ( ( NINT(rday) / ( nn_fsbc * NINT(rdt) ) )  < 8 ) )   & 
     140         &   CALL ctl_warn( 'diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 
     141       
     142      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
    142143      icpt = 0 
    143144      IF( ln_ana          ) THEN   ;   nsbc =  1   ; icpt = icpt + 1   ;   ENDIF       ! analytical      formulation 
     
    148149      IF( cp_cfg == 'gyre') THEN   ;   nsbc =  0                       ;   ENDIF       ! GYRE analytical formulation 
    149150      IF( lk_esopa        )            nsbc = -1                                       ! esopa test, ALL formulations 
    150  
     151      ! 
    151152      IF( icpt /= 1 .AND. .NOT.lk_esopa ) THEN 
    152153         WRITE(numout,*) 
     
    229230 
    230231      !                                            !==  Misc. Options  ==! 
    231  
    232 !!gm  IF( ln_dm2dc       )   CALL sbc_dcy( kt )                 ! Daily mean qsr distributed over the Diurnal Cycle 
    233232       
    234233      SELECT CASE( nn_ice )                                     ! Update heat and freshwater fluxes over sea-ice areas 
     
    293292         CALL iom_put( "emp-rnf" , emp  - rnf )                   ! upward water flux 
    294293         CALL iom_put( "emps-rnf", emps - rnf )                   ! c/d water flux 
    295          CALL iom_put( "qns+qsr" , qns  + qsr )                   ! total heat flux   (caution if ln_dm2dc=true, to be  
    296          CALL iom_put( "qns"     , qns        )                   ! solar heat flux    moved after the call to iom_setkt) 
    297          CALL iom_put( "qsr"     ,       qsr  )                   ! solar heat flux    moved after the call to iom_setkt) 
     294         CALL iom_put( "qns+qsr" , qns  + qsr )                   ! total heat flux  
     295         CALL iom_put( "qns"     , qns        )                   ! solar heat flux 
     296         CALL iom_put( "qsr"     ,       qsr  )                   ! solar heat flux 
    298297         IF( nn_ice > 0 )   CALL iom_put( "ice_cover", fr_i )   ! ice fraction  
    299298      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.