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 2382 for branches/nemo_v3_3_beta/NEMOGCM – NEMO

Ignore:
Timestamp:
2010-11-13T14:08:12+01:00 (13 years ago)
Author:
gm
Message:

v3.3beta: C1D - bug correction to compile with key_c1d

Location:
branches/nemo_v3_3_beta/NEMOGCM/NEMO
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/c1d.F90

    r2287 r2382  
    2020   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    2121   !! $Id$  
    22    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    23    !!===================================================================== 
     22   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     23   !!====================================================================== 
    2424END MODULE c1d 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/diawri_c1d.F90

    r2364 r2382  
    4646   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    4747   !! $Id$ 
    48    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    49    !!---------------------------------------------------------------------- 
    50  
     48   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     49   !!---------------------------------------------------------------------- 
    5150CONTAINS 
    5251 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dyncor_c1d.F90

    r2287 r2382  
    3131   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    3232   !! $Id$  
    33    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     33   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3434   !!---------------------------------------------------------------------- 
    35  
    3635CONTAINS 
    3736 
     
    4039      !!                   ***  ROUTINE cor_c1d  *** 
    4140      !!  
    42       !! ** Purpose : Compute the Coriolis factor at T-point 
     41      !! ** Purpose : set the Coriolis factor at T-point 
    4342      !!---------------------------------------------------------------------- 
    4443      REAL(wp) ::   zphi0, zbeta, zf0         !  temporary scalars 
     
    8382      !!                   ***  ROUTINE dyn_cor_c1d  *** 
    8483      !!  
    85       !! ** Purpose :   Compute the now total vorticity trend and add it to  
    86       !!               the general trend of the momentum equation 
    87       !! 
    88       !! ** Method  : 
    89       !! 
    90       !! History : 
    91       !!   9.0  !  04-09  (C. Ethe) 1D configuration 
     84      !! ** Purpose :   Compute the now Coriolis trend and add it to  
     85      !!               the general trend of the momentum equation in 1D case. 
    9286      !!---------------------------------------------------------------------- 
    9387      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/dynnxt_c1d.F90

    r2287 r2382  
    1111   !!   'key_c1d'                                          1D Configuration 
    1212   !!----------------------------------------------------------------------   
    13    !!---------------------------------------------------------------------- 
    1413   !!   dyn_nxt_c1d : update the horizontal velocity from the momentum trend 
    1514   !!---------------------------------------------------------------------- 
     
    2726   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    2827   !! $Id$  
    29    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     28   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    3029   !!---------------------------------------------------------------------- 
    31  
    3230CONTAINS 
    3331 
     
    3634      !!                  ***  ROUTINE dyn_nxt_c1d  *** 
    3735      !!                    
    38       !! ** Purpose :   Compute the after horizontal velocity from the  
    39       !!      momentum trend. 
     36      !! ** Purpose :   Compute the after horizontal velocity from the momentum trend. 
    4037      !! 
    4138      !! ** Method  :   Apply lateral boundary conditions on the trends (ua,va)  
     
    6158         IF(lwp) WRITE(numout,*) 
    6259         IF(lwp) WRITE(numout,*) 'dyn_nxt_c1d : time stepping on 1D configuation' 
    63          IF(lwp) WRITE(numout,*) '~~~~~~~' 
     60         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    6461      ENDIF 
    6562 
    66       ! Local constant initialization 
    67       z2dt = 2. * rdt 
     63      z2dt = 2._wp * rdt                                                   ! Local constant initialization 
    6864      IF( neuler == 0 .AND. kt == nit000 )  z2dt = rdt 
    6965 
    70       ! Lateral boundary conditions on ( ua, va ) 
    71       CALL lbc_lnk( ua, 'U', -1. ) 
    72       CALL lbc_lnk( va, 'V', -1. ) 
     66      CALL lbc_lnk( ua, 'U', -1. )   ;   CALL lbc_lnk( va, 'V', -1. )      ! Lateral boundary conditions 
    7367 
    74       DO jk = 1, jpkm1      ! Next Velocity 
     68      DO jk = 1, jpkm1                                                     ! Next Velocity 
    7569         ua(:,:,jk) = ( ub(:,:,jk) + z2dt * ua(:,:,jk) ) * umask(:,:,jk) 
    7670         va(:,:,jk) = ( vb(:,:,jk) + z2dt * va(:,:,jk) ) * vmask(:,:,jk) 
    7771      END DO  
    7872  
    79       DO jk = 1, jpkm1      ! Time filter and swap of dynamics arrays 
    80          IF( neuler == 0 .AND. kt == nit000 ) THEN      ! Euler (forward) time stepping 
     73      DO jk = 1, jpkm1                                                     ! Time filter and swap of dynamics arrays 
     74         IF( neuler == 0 .AND. kt == nit000 ) THEN                               ! Euler (forward) time stepping 
    8175             ub(:,:,jk) = un(:,:,jk) 
    8276             vb(:,:,jk) = vn(:,:,jk) 
    8377             un(:,:,jk) = ua(:,:,jk) 
    8478             vn(:,:,jk) = va(:,:,jk) 
    85          ELSE                                           ! Leap-frog time stepping 
     79         ELSE                                                                    ! Leap-frog time stepping 
    8680             ub(:,:,jk) = atfp * ( ub(:,:,jk) + ua(:,:,jk) ) + atfp1 * un(:,:,jk) 
    8781             vb(:,:,jk) = atfp * ( vb(:,:,jk) + va(:,:,jk) ) + atfp1 * vn(:,:,jk) 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/C1D_SRC/step_c1d.F90

    r2287 r2382  
    1313   !!   stp_c1d        : NEMO system time-stepping in c1d case 
    1414   !!---------------------------------------------------------------------- 
    15    USE oce             ! ocean dynamics and tracers variables 
    16    USE dom_oce         ! ocean space and time domain variables  
    17    USE zdf_oce         ! ocean vertical physics variables 
    18    USE in_out_manager  ! I/O manager 
    19    USE iom             ! 
    20    USE lbclnk 
    21  
    22    USE daymod          ! calendar                         (day     routine) 
    23  
    24    USE dtatem          ! ocean temperature data           (dta_tem routine) 
    25    USE dtasal          ! ocean salinity    data           (dta_sal routine) 
    26    USE sbcmod          ! surface boundary condition       (sbc     routine) 
    27    USE sbcrnf          ! surface boundary condition: runoff variables 
    28  
    29    USE trcstp          ! passive tracer time-stepping      (trc_stp routine) 
    30  
    31    USE traqsr          ! solar radiation penetration      (tra_qsr routine) 
    32    USE trasbc          ! surface boundary condition       (tra_sbc routine) 
    33    !   zdfkpp          ! KPP non-local tracer fluxes      (tra_kpp routine) 
    34    USE trazdf          ! vertical mixing                  (tra_zdf routine) 
    35    USE tranxt          ! time-stepping                    (tra_nxt routine) 
    36    USE tranpc          ! non-penetrative convection       (tra_npc routine) 
    37  
    38    USE eosbn2          ! equation of state                (eos_bn2 routine) 
    39  
     15   USE step_oce         ! time stepping definition modules  
     16#if defined key_top 
     17   USE trcstp           ! passive tracer time-stepping      (trc_stp routine) 
     18#endif 
    4019   USE dyncor_c1d      ! Coriolis term (c1d case)         (dyn_cor_1d     ) 
    41    USE dynzdf          ! vertical diffusion               (dyn_zdf routine) 
    4220   USE dynnxt_c1d      ! time-stepping                    (dyn_nxt routine) 
    4321   USE diawri_c1d      ! write outputs                (dia_wri_c1d routine) 
    44  
    45    USE zdfbfr          ! bottom friction                  (zdf_bfr routine) 
    46    USE zdftke          ! TKE vertical mixing              (zdf_tke routine) 
    47    USE zdfkpp          ! KPP vertical mixing              (zdf_kpp routine) 
    48    USE zdfddm          ! double diffusion mixing          (zdf_ddm routine) 
    49    USE zdfevd          ! enhanced vertical diffusion      (zdf_evd routine) 
    50    USE zdfric          ! Richardson vertical mixing       (zdf_ric routine) 
    51    USE zdfmxl          ! Mixed-layer depth                (zdf_mxl routine) 
    52  
    53  
    54    USE diawri          ! Standard run outputs             (dia_wri routine) 
    55  
    56    USE stpctl          ! time stepping control            (stp_ctl routine) 
    57    USE restart         ! ocean restart                    (rst_wri routine) 
    58    USE prtctl          ! Print control                    (prt_ctl routine) 
    5922 
    6023   IMPLICIT NONE 
     
    6932   !! NEMO/C1D 3.3 , NEMO Consortium (2010) 
    7033   !! $Id$ 
    71    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     34   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    7235   !!---------------------------------------------------------------------- 
    73  
    7436CONTAINS 
    7537 
     
    9658      !! --------------------------------------------------------------------- 
    9759 
    98       indic = 1                    ! reset to no error condition 
    99  
    100       CALL day( kstp )             ! Calendar 
    101  
    102       CALL rst_opn( kstp )         ! Open the restart file 
     60                             indic = 0                ! reset to no error condition 
     61      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init) 
     62                             CALL iom_setkt( kstp )   ! say to iom that we are at time step kstp 
    10363 
    10464      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    10565      ! Update data, open boundaries, surface boundary condition (including sea-ice) 
    10666      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    107  
    10867      IF( lk_dtatem  )   CALL dta_tem( kstp )         ! update 3D temperature data 
    10968      IF( lk_dtasal  )   CALL dta_sal( kstp )         ! update 3D salinity data 
    110  
    11169                         CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice) 
    11270 
    113       IF( ninist == 1 ) THEN                          ! Output the initial state and forcings 
    114                         CALL dia_wri_state( 'output.init', kstp )   ;   ninist = 0 
     71      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     72      ! Ocean physics update                (ua, va, ta, sa used as workspace) 
     73      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     74                         CALL bn2( tsb, rn2b )        ! before Brunt-Vaisala frequency 
     75                         CALL bn2( tsn, rn2  )        ! now    Brunt-Vaisala frequency 
     76      !  VERTICAL PHYSICS    
     77                         CALL zdf_bfr( kstp )         ! bottom friction 
     78      !                                               ! Vertical eddy viscosity and diffusivity coefficients 
     79      IF( lk_zdfric  )   CALL zdf_ric( kstp )            ! Richardson number dependent Kz 
     80      IF( lk_zdftke  )   CALL zdf_tke( kstp )            ! TKE closure scheme for Kz 
     81      IF( lk_zdfgls  )   CALL zdf_gls( kstp )            ! GLS closure scheme for Kz 
     82      IF( lk_zdfkpp  )   CALL zdf_kpp( kstp )            ! KPP closure scheme for Kz 
     83      IF( lk_zdfcst  )   THEN                            ! Constant Kz (reset avt, avm[uv] to the background value) 
     84         avt (:,:,:) = rn_avt0 * tmask(:,:,:) 
     85         avmu(:,:,:) = rn_avm0 * umask(:,:,:) 
     86         avmv(:,:,:) = rn_avm0 * vmask(:,:,:) 
    11587      ENDIF 
    11688 
     89      IF( ln_rnf_mouth ) THEN                         ! increase diffusivity at rivers mouths 
     90         DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:)   ;   END DO 
     91      ENDIF 
     92      IF( ln_zdfevd  )   CALL zdf_evd( kstp )         ! enhanced vertical eddy diffusivity 
     93 
     94      IF( lk_zdftmx  )   CALL zdf_tmx( kstp )         ! tidal vertical mixing 
     95 
     96      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   & 
     97         &               CALL zdf_ddm( kstp )         ! double diffusive mixing 
     98          
     99                         CALL zdf_mxl( kstp )         ! mixed layer depth 
     100 
     101                                                      ! write tke information in the restart file 
     102      IF( lrst_oce .AND. lk_zdftke )   CALL tke_rst( kstp, 'WRITE' ) 
     103                                                      ! write gls information in the restart file 
     104      IF( lrst_oce .AND. lk_zdfgls )   CALL gls_rst( kstp, 'WRITE' ) 
    117105 
    118106      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    119       ! Ocean physics update 
     107      ! diagnostics and outputs             (ua, va, ta, sa used as workspace) 
    120108      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    121       !----------------------------------------------------------------------- 
    122       !  VERTICAL PHYSICS 
    123       !----------------------------------------------------------------------- 
    124       ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
    125       !----------------------------------------------------------------------- 
    126  
    127                         CALL bn2( tb, sb, rn2 )             ! before Brunt-Vaisala frequency 
    128        
    129       !                                                     ! Vertical eddy viscosity and diffusivity coefficients 
    130       IF( lk_zdfric )   CALL zdf_ric( kstp )                     ! Richardson number dependent Kz 
    131       IF( lk_zdftke )   CALL zdf_tke( kstp )                     ! TKE closure scheme for Kz 
    132       IF( lk_zdfkpp )   CALL zdf_kpp( kstp )                     ! KPP closure scheme for Kz 
    133       IF( lk_zdfcst )   THEN                                     ! Constant Kz (reset avt, avm to the background value) 
    134          avt (:,:,:) = avt0 * tmask(:,:,:) 
    135          avmu(:,:,:) = avm0 * umask(:,:,:) 
    136          avmv(:,:,:) = avm0 * vmask(:,:,:) 
    137       ENDIF 
    138  
    139       IF( ln_rnf_mouth ) THEN                                ! increase diffusivity at rivers mouths 
    140          DO jk = 2, nkrnf   ;   avt(:,:,jk) = avt(:,:,jk) + 2.e0 * rn_avt_rnf * rnfmsk(:,:)   ;   END DO 
    141       ENDIF 
    142       IF( ln_zdfevd )   CALL zdf_evd( kstp )                 ! enhanced vertical eddy diffusivity 
    143       IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   & 
    144          &              CALL zdf_ddm( kstp )                 ! double diffusive mixing 
    145                         CALL zdf_bfr( kstp )                 ! bottom friction 
    146                         CALL zdf_mxl( kstp )                 ! mixed layer depth 
     109                         CALL dia_wri_c1d( kstp, indic )       ! ocean model: outputs 
    147110 
    148111#if defined key_top 
     
    150113      ! Passive Tracer Model 
    151114      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    152       ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
    153       !----------------------------------------------------------------------- 
    154                              CALL trc_stp( kstp, indic )            ! time-stepping 
     115                         CALL trc_stp( kstp, indic )            ! time-stepping 
    155116#endif 
    156117 
    157118      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    158       ! Active tracers 
     119      ! Active tracers                              (ua, va used as workspace) 
    159120      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    160       ! N.B. ua, va arrays are used as workspace in this section 
    161       !----------------------------------------------------------------------- 
    162121                             tsa(:,:,:,:) = 0.e0                ! set tracer trends to zero 
    163122 
    164123                             CALL tra_sbc    ( kstp )        ! surface boundary condition 
    165124      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )        ! penetrative solar radiation qsr 
    166       IF( lk_zdfkpp )        CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes 
     125      IF( lk_zdfkpp      )   CALL tra_kpp    ( kstp )        ! KPP non-local tracer fluxes 
    167126                             CALL tra_zdf    ( kstp )        ! vertical mixing 
    168127                             CALL tra_nxt    ( kstp )        ! tracer fields at next time step 
    169128      IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )        ! applied non penetrative convective adjustment on (t,s) 
    170                              CALL eos( tsb, rhd, rhop )   ! now (swap=before) in situ density for dynhpg module 
     129                             CALL eos( tsb, rhd, rhop )      ! now (swap=before) in situ density for dynhpg module 
     130                             CALL tra_unswap                 ! udate T & S 3D arrays  (to be suppressed) 
    171131 
    172132      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    173       ! Dynamics 
     133      ! Dynamics                                    (ta, sa used as workspace) 
    174134      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    175       ! N.B. ta, sa arrays are used as workspace in this section  
    176       !----------------------------------------------------------------------- 
    177135                               ua(:,:,:) = 0.e0               ! set dynamics trends to zero 
    178136                               va(:,:,:) = 0.e0 
     
    188146      IF( kstp == nit000     )   CALL iom_close( numror )             ! close input  ocean restart file 
    189147      IF( lrst_oce           )   CALL rst_write  ( kstp )             ! write output ocean restart file 
    190  
    191       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    192       ! diagnostics and outputs 
    193       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    194       ! N.B. ua, va, ta, sa arrays are used as workspace in this section 
    195       !----------------------------------------------------------------------- 
    196  
    197       IF( nstop == 0 )           CALL dia_wri_c1d( kstp, indic )       ! ocean model: outputs 
    198148      ! 
    199149   END SUBROUTINE stp_c1d 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r2364 r2382  
    1111   !!   NEMO     1.0  !  2002-08  (G. Madec)  F90: Free form and module 
    1212   !!            2.0  !  2005-11  (V. Garnier) Surface pressure gradient organization 
     13   !!            3.3  !  2010-11  (G. Madec)  initialisation in C1D configuration 
    1314   !!---------------------------------------------------------------------- 
    1415    
     
    1819   !!   dom_ctl        : control print for the ocean domain 
    1920   !!---------------------------------------------------------------------- 
    20    USE oce             !  
    21    USE dom_oce         ! ocean space and time domain 
     21   USE oce             ! ocean variables 
     22   USE dom_oce         ! domain: ocean 
    2223   USE sbc_oce         ! surface boundary condition: ocean 
    2324   USE phycst          ! physical constants 
     
    3233   USE domwri          ! domain: write the meshmask file 
    3334   USE domvvl          ! variable volume 
     35#if defined key_c1d 
     36   USE dyncor_c1d      ! Coriolis term (c1d case)         (cor_c1d routine) 
     37#endif 
    3438 
    3539   IMPLICIT NONE 
     
    4347   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    4448   !! $Id$ 
    45    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     49   !! Software governed by the CeCILL licence        (NEMOGCM/NEMO_CeCILL.txt) 
    4650   !!------------------------------------------------------------------------- 
    47  
    4851CONTAINS 
    4952 
     
    6265      !!              - dom_stp: defined the model time step 
    6366      !!              - dom_wri: create the meshmask file if nmsh=1 
     67      !!              - "key_c1d": 1D configuration, move Coriolis, u and v at T-point 
    6468      !!---------------------------------------------------------------------- 
    6569      INTEGER ::   jk                ! dummy loop argument 
     
    7983                             CALL dom_msk      ! Masks 
    8084      IF( lk_vvl         )   CALL dom_vvl      ! Vertical variable mesh 
     85      ! 
     86#if defined key_c1d 
     87      !                                        ! 1D configuration ("key_c1d") 
     88      CALL cor_c1d                                 ! Coriolis set at T-point 
     89      umask(:,:,:) = tmask(:,:,:)                  ! U, V moved at T-point 
     90      vmask(:,:,:) = tmask(:,:,:) 
     91#endif 
    8192      ! 
    8293      hu(:,:) = 0.e0                           ! Ocean depth at U- and V-points 
     
    188199#endif 
    189200 
    190       REWIND( numnam )             ! Namelist namdom : space & time domain (bathymetry, mesh, timestep) 
     201      REWIND( numnam )              ! Namelist namdom : space & time domain (bathymetry, mesh, timestep) 
    191202      READ  ( numnam, namdom ) 
    192203 
     
    224235      nclosea   = nn_closea 
    225236 
    226       REWIND( numnam )             ! Namelist cross land advection 
     237      REWIND( numnam )              ! Namelist cross land advection 
    227238      READ  ( numnam, namcla ) 
    228239      IF(lwp) THEN 
     
    238249 
    239250#if defined key_netcdf4 
    240  
    241       REWIND( numnam )              ! Namelist namnc4 : netcdf4 chunking parameters 
     251      !                             ! NetCDF 4 case   ("key_netcdf4" defined) 
     252      REWIND( numnam )                    ! Namelist namnc4 : netcdf4 chunking parameters 
    242253      READ  ( numnam, namnc4 ) 
    243       IF(lwp) THEN 
     254      IF(lwp) THEN                        ! control print 
    244255         WRITE(numout,*) 
    245256         WRITE(numout,*) '   Namelist namnc4 - Netcdf4 chunking parameters' 
     
    256267      snc4set%nk   = nn_nchunks_k 
    257268      snc4set%luse = ln_nc4zip 
    258  
    259269#else 
    260  
    261       snc4set%luse = .FALSE. 
    262   
    263 #endif 
     270      snc4set%luse = .FALSE.        ! No NetCDF 4 case 
     271#endif 
     272      ! 
    264273   END SUBROUTINE dom_nam 
    265274 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90

    r2375 r2382  
    3737   !!   tke_rst      : read/write tke restart in ocean restart file 
    3838   !!---------------------------------------------------------------------- 
    39    USE oce            ! ocean dynamics and active tracers  
    40    USE dom_oce        ! ocean space and time domain 
    41    USE domvvl         ! ocean space and time domain : variable volume layer 
    42    USE zdf_oce        ! ocean vertical physics 
     39   USE oce            ! ocean: dynamics and active tracers variables 
     40   USE phycst         ! physical constants 
     41   USE dom_oce        ! domain: ocean 
     42   USE domvvl         ! domain: variable volume layer 
    4343   USE sbc_oce        ! surface boundary condition: ocean 
    44    USE phycst         ! physical constants 
    45    USE zdfmxl         ! mixed layer 
    46    USE restart        ! only for lrst_oce 
     44   USE zdf_oce        ! vertical physics: ocean variables 
     45   USE zdfmxl         ! vertical physics: mixed layer 
     46   USE zdfbfr         ! vertical mixing: bottom friction 
     47   USE restart        ! ocean restart 
    4748   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    4849   USE prtctl         ! Print control 
    4950   USE in_out_manager ! I/O manager 
    5051   USE iom            ! I/O manager library 
    51    USE zdfbfr          ! bottom friction 
    5252 
    5353   IMPLICIT NONE 
     
    180180      !! 
    181181      INTEGER  ::   ji, jj, jk                      ! dummy loop arguments 
    182 !!$      INTEGER  ::   ikbu, ikbv, ikbum1, ikbvm1      ! temporary scalar 
    183 !!$      INTEGER  ::   ikbt, ikbumm1, ikbvmm1          ! temporary scalar 
     182!!bfr      INTEGER  ::   ikbu, ikbv, ikbum1, ikbvm1      ! temporary scalar 
     183!!bfr      INTEGER  ::   ikbt, ikbumm1, ikbvmm1          ! temporary scalar 
    184184      REAL(wp) ::   zrhoa  = 1.22                   ! Air density kg/m3 
    185185      REAL(wp) ::   zcdrag = 1.5e-3                 ! drag coefficient 
     
    190190      REAL(wp) ::   zus   , zwlc  , zind            !    -         - 
    191191      REAL(wp) ::   zzd_up, zzd_lw                  !    -         - 
    192 !!$      REAL(wp) ::   zebot                           !    -         - 
     192!!bfr      REAL(wp) ::   zebot                           !    -         - 
    193193      INTEGER , DIMENSION(jpi,jpj)     ::   imlc    ! 2D workspace 
    194194      REAL(wp), DIMENSION(jpi,jpj)     ::   zhlc    !  -      - 
     
    209209         END DO 
    210210      END DO 
    211       ! 
     211       
     212!!bfr   - start commented area 
    212213      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    213214      !                     !  Bottom boundary condition on tke 
     
    219220      ! computational cost is justified 
    220221      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    221       ! 
    222222      !                     en(bot)   = (rn_ebb0/rau0)*0.5*sqrt(u_botfr^2+v_botfr^2) (min value rn_emin) 
    223223!CDIR NOVERRCHK 
     
    242242!!       END DO 
    243243!!    END DO 
    244       ! 
     244!!bfr   - end commented area 
    245245      ! 
    246246      !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     
    275275            END DO 
    276276         END DO 
    277 # if defined key_c1d 
    278          hlc(:,:) = zhlc(:,:) * tmask(:,:,1)      ! c1d configuration: save finite Langmuir Circulation depth 
    279 # endif 
    280277         zcof = 0.016 / SQRT( zrhoa * zcdrag ) 
    281278!CDIR NOVERRCHK 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/opa.F90

    r2329 r2382  
    3636   !!---------------------------------------------------------------------- 
    3737 
    38    USE step_oce        ! Time stepping module definition 
     38   USE step_oce        ! module used in the ocean time stepping module 
    3939   USE sbc_oce         ! surface boundary condition: ocean 
    4040   USE domcfg          ! domain configuration               (dom_cfg routine) 
     
    103103      INTEGER ::   istp       ! time step index 
    104104      !!---------------------------------------------------------------------- 
    105  
     105      ! 
    106106#if defined key_agrif 
    107107      CALL Agrif_Init_Grids()      ! AGRIF: set the meshes 
     
    247247      ELSE                            ;   CALL mpp_init2     ! eliminate land processors 
    248248      ENDIF 
    249 !!gm c1d case can be moved in dom_init routine 
    250 #if defined key_c1d 
    251          CALL cor_c1d                            ! Coriolis defined at T-point 
    252          umask(:,:,:) = tmask(:,:,:)             ! U, V and T-points are the same 
    253          vmask(:,:,:) = tmask(:,:,:)             !  
    254 #endif 
    255 !!gm c1d end 
    256  
     249      ! 
    257250      !                                      ! General initialization 
    258251                            CALL     phy_cst    ! Physical constants 
     
    307300                            CALL     trc_init 
    308301#endif 
    309       !                                     ! diagnostics 
     302      !                                     ! Diagnostics 
    310303                            CALL     iom_init   ! iom_put initialization 
    311304      IF( lk_floats    )    CALL     flo_init   ! drifting Floats 
     
    314307                            CALL dia_hsb_init   ! heat content, salt content and volume budgets 
    315308                            CALL trd_mod_init   ! Mixed-layer/Vorticity/Integral constraints trends 
    316       IF( lk_diaobs    ) THEN 
    317          CALL dia_obs_init                  ! Initialize observational data 
    318          CALL dia_obs( nit000 - 1 )         ! Observation operator for restart 
     309      IF( lk_diaobs    ) THEN                   ! Observation & model comparison 
     310                            CALL dia_obs_init            ! Initialize observational data 
     311                            CALL dia_obs( nit000 - 1 )   ! Observation operator for restart 
    319312      ENDIF       
    320       IF( lk_asminc    )    CALL asm_inc_init     ! Initialize assimilation increments 
    321       IF(lwp) WRITE(numout,*)'Euler time step switch is ', neuler 
    322  
     313      !                                     ! Assimilation increments 
     314      IF( lk_asminc    )    CALL asm_inc_init   ! Initialize assimilation increments 
     315      IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 
    323316      ! 
    324317   END SUBROUTINE opa_init 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step.F90

    r2370 r2382  
    3232   USE trcstp           ! passive tracer time-stepping      (trc_stp routine) 
    3333#endif 
     34#if defined key_agrif 
     35   USE agrif_opa_sponge ! Momemtum and tracers sponges 
     36#endif 
    3437   USE asminc           ! assimilation increments    (tra_asm_inc, dyn_asm_inc routines) 
    35    USE stpctl           ! time stepping control            (stp_ctl routine) 
    36    USE restart          ! ocean restart                    (rst_wri routine) 
    37    USE prtctl           ! Print control                    (prt_ctl routine) 
    38  
    39 #if defined key_agrif 
    40    USE agrif_opa_sponge ! Momemtum and tracers sponges 
    41 #endif 
    4238 
    4339   IMPLICIT NONE 
     
    116112      !  VERTICAL PHYSICS    
    117113                         CALL zdf_bfr( kstp )         ! bottom friction 
     114                          
    118115      !                                               ! Vertical eddy viscosity and diffusivity coefficients 
    119       IF( lk_zdfric     )   CALL zdf_ric    ( kstp )  ! Richardson number dependent Kz 
    120       IF( lk_zdftke     )   CALL zdf_tke    ( kstp )  ! TKE closure scheme for Kz 
    121       IF( lk_zdfgls     )   CALL zdf_gls    ( kstp )  ! GLS closure scheme for Kz 
    122       IF( lk_zdfkpp     )   CALL zdf_kpp    ( kstp )  ! KPP closure scheme for Kz 
    123       IF( lk_zdfcst     )   THEN                      ! Constant Kz (reset avt, avm[uv] to the background value) 
     116      IF( lk_zdfric  )   CALL zdf_ric( kstp )            ! Richardson number dependent Kz 
     117      IF( lk_zdftke  )   CALL zdf_tke( kstp )            ! TKE closure scheme for Kz 
     118      IF( lk_zdfgls  )   CALL zdf_gls( kstp )            ! GLS closure scheme for Kz 
     119      IF( lk_zdfkpp  )   CALL zdf_kpp( kstp )            ! KPP closure scheme for Kz 
     120      IF( lk_zdfcst  )   THEN                            ! Constant Kz (reset avt, avm[uv] to the background value) 
    124121         avt (:,:,:) = rn_avt0 * tmask(:,:,:) 
    125122         avmu(:,:,:) = rn_avm0 * umask(:,:,:) 
     
    135132      IF( lk_zdfddm .AND. .NOT. lk_zdfkpp )   & 
    136133         &               CALL zdf_ddm( kstp )         ! double diffusive mixing 
     134          
    137135                         CALL zdf_mxl( kstp )         ! mixed layer depth 
    138136 
    139                                                       ! write tke information in the restart file 
     137                                                      ! write TKE or GLS information in the restart file 
    140138      IF( lrst_oce .AND. lk_zdftke )   CALL tke_rst( kstp, 'WRITE' ) 
    141                                                       ! write gls information in the restart file 
    142139      IF( lrst_oce .AND. lk_zdfgls )   CALL gls_rst( kstp, 'WRITE' ) 
    143140      ! 
     
    156153#if defined key_traldf_c2d 
    157154      IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )      ! eddy induced velocity coefficient 
    158 #  endif 
     155#endif 
    159156 
    160157      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    179176      ! Active tracers                              (ua, va used as workspace) 
    180177      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    181                              tsa(:,:,:,:) = 0.e0               ! set tracer trends to zero 
     178                             tsa(:,:,:,:) = 0.e0            ! set tracer trends to zero 
    182179 
    183180      IF(  ln_asmiau .AND. & 
     
    190187                             CALL tra_adv    ( kstp )       ! horizontal & vertical advection 
    191188      IF( n_cla == 1     )   CALL tra_cla    ( kstp )       ! Cross Land Advection (Update Hor. advection) 
    192       IF( lk_zdfkpp )        CALL tra_kpp    ( kstp )       ! KPP non-local tracer fluxes 
     189      IF( lk_zdfkpp      )   CALL tra_kpp    ( kstp )       ! KPP non-local tracer fluxes 
    193190                             CALL tra_ldf    ( kstp )       ! lateral mixing 
    194191#if defined key_agrif 
     
    213210                             CALL tra_nxt    ( kstp )       ! tracer fields at next time step 
    214211      ENDIF  
    215                              CALL tra_unswap 
     212                             CALL tra_unswap                ! udate T & S 3D arrays  (to be suppressed) 
    216213 
    217214      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    222219 
    223220      IF(  ln_asmiau .AND. & 
    224          & ln_dyninc     )     CALL dyn_asm_inc( kstp )       ! apply dynamics assimilation increment 
     221         & ln_dyninc       )   CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment 
    225222                               CALL dyn_adv( kstp )         ! advection (vector or flux form) 
    226223                               CALL dyn_vor( kstp )         ! vorticity term including Coriolis 
     
    230227#endif 
    231228                               CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure 
    232                                CALL dyn_bfr( kstp )           ! bottom friction    
     229                               CALL dyn_bfr( kstp )         ! bottom friction    
    233230                               CALL dyn_zdf( kstp )         ! vertical diffusion 
    234231                               CALL dyn_spg( kstp, indic )  ! surface pressure gradient 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step_oce.F90

    r2348 r2382  
    22   !!====================================================================== 
    33   !!                       ***  MODULE step_oce  *** 
    4    !! Time-stepping    : module used for the ocean time stepping 
     4   !! Ocean time-stepping : module used in both initialisation phase and time stepping 
    55   !!====================================================================== 
    6    !!---------------------------------------------------------------------- 
    7    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    8    !! $Id$ 
    9    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     6   !! History :   3.3  ! 2010-08  (C. Ethe)  Original code - reorganisation of the initial phase 
    107   !!---------------------------------------------------------------------- 
    118   USE oce              ! ocean dynamics and tracers variables 
     
    103100   USE agrif_opa_sponge ! Momemtum and tracers sponges 
    104101#endif 
     102   !!---------------------------------------------------------------------- 
     103   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     104   !! $Id$ 
     105   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    105106   !!====================================================================== 
    106107END MODULE step_oce 
Note: See TracChangeset for help on using the changeset viewer.