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 1241 – NEMO

Changeset 1241


Ignore:
Timestamp:
2009-01-05T17:14:49+01:00 (15 years ago)
Author:
rblod
Message:

Fix a stupid bug for time splitting and ensure restartability for dynspg_ts in addition, see tickets #280 and #292

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/CONFIG/GYRE/EXP00/namelist

    r1229 r1241  
    7878   rdtmax      = 7200.     !  maximum time step on tracers (used if nacc=1) 
    7979   rdth        =  800.     !  depth variation of tracer time step  (used if nacc=1) 
    80    rdtbt       =  120.     ! barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
     80   nn_baro     =   60      !  number of barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
    8181   nclosea     =    0      !  = 0 no closed sea in the model domain 
    8282                           !  = 1 closed sea (Black Sea, Caspian Sea, Great US Lakes...)  
  • trunk/CONFIG/GYRE_LOBSTER/EXP00/namelist

    r1229 r1241  
    7878   rdtmax      = 7200.     !  maximum time step on tracers (used if nacc=1) 
    7979   rdth        =  800.     !  depth variation of tracer time step  (used if nacc=1) 
    80    rdtbt       =  120.     ! barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
     80   nn_baro     =   60      !  number of barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
    8181   nclosea     =    0      !  = 0 no closed sea in the model domain 
    8282                           !  = 1 closed sea (Black Sea, Caspian Sea, Great US Lakes...)  
  • trunk/CONFIG/ORCA2_LIM/EXP00/1_namelist

    r1229 r1241  
    7878   rdtmax      = 2880.     !  maximum time step on tracers (used if nacc=1) 
    7979   rdth        =  800.     !  depth variation of tracer time step  (used if nacc=1) 
    80    rdtbt       =   90.     ! barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
     80   nn_baro     =   64      !  number of barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
    8181   nclosea     =    0      !  = 0 no closed sea in the model domain 
    8282                           !  = 1 closed sea (Black Sea, Caspian Sea, Great US Lakes...)  
  • trunk/CONFIG/ORCA2_LIM/EXP00/namelist

    r1229 r1241  
    7878   rdtmax      = 5760.     !  maximum time step on tracers (used if nacc=1) 
    7979   rdth        =  800.     !  depth variation of tracer time step  (used if nacc=1) 
    80    rdtbt       =   90.     ! barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
     80   nn_baro     =   64      !  number of barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
    8181   nclosea     =    0      !  = 0 no closed sea in the model domain 
    8282                           !  = 1 closed sea (Black Sea, Caspian Sea, Great US Lakes...)  
  • trunk/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist

    r1229 r1241  
    7878   rdtmax      = 5760.     !  maximum time step on tracers (used if nacc=1) 
    7979   rdth        =  800.     !  depth variation of tracer time step  (used if nacc=1) 
    80    rdtbt       =   90.     ! barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
     80   nn_baro     =   64      !  number of barotropic time step (for the split explicit algorithm) ("key_dynspg_ts") 
    8181   nclosea     =    0      !  = 0 no closed sea in the model domain 
    8282                           !  = 1 closed sea (Black Sea, Caspian Sea, Great US Lakes...)  
  • trunk/NEMO/OPA_SRC/BDY/bdydta.F90

    r1146 r1241  
    669669      ! ********************************************* 
    670670 
    671       itimer = ((kt-1)-nit000+1)*rdt      ! current time in seconds for interpolation  
    672       itimer = itimer + jit*rdtbt         ! in non-climatological case 
     671      itimer = ((kt-1)-nit000+1)*rdt                      ! current time in seconds for interpolation  
     672      itimer = itimer + jit*rdt/REAL(nn_baro,wp)      ! in non-climatological case 
    673673 
    674674      IF ( ln_bdy_tides ) THEN 
  • trunk/NEMO/OPA_SRC/BDY/bdytides.F90

    r1146 r1241  
    301301         z_arg = kt * rdt * rad / 3600.0 
    302302      ELSE                              ! we are in a barotropic subcycle (for timesplitting option) 
    303          z_arg = ( (kt-1) * rdt + jit * rdtbt ) * rad / 3600.0 
     303         z_arg = ( (kt-1) * rdt + jit * rdt / REAL(nn_baro,lwp) ) * rad / 3600.0 
    304304      ENDIF 
    305305 
  • trunk/NEMO/OPA_SRC/DOM/dom_oce.F90

    r1200 r1241  
    200200   !! time domain 
    201201   !!---------------------------------------------------------------------- 
    202    INTEGER, PUBLIC ::    & !!: * Namelist * ??? 
    203       nacc   = 0 ,       &  !: = 0/1 use of the acceleration of convergence technique 
    204       neuler                !: restart euler forward option (0=Euler) 
    205  
     202   INTEGER, PUBLIC ::      & !!: * Namelist * ??? 
     203      nacc   = 0   ,       &  !: = 0/1 use of the acceleration of convergence technique 
     204      neuler       ,       &  !: restart euler forward option (0=Euler) 
     205      nn_baro = 64            !: number of barotropic time steps (key_dynspg_ts) 
    206206 
    207207   REAL(wp), PUBLIC ::       & !!: * Namelist ??? * 
     
    210210      rdtmax = 3600._wp ,    &  !: maximum time step on tracers 
    211211      rdth   =  800._wp ,    &  !: depth variation of tracer step 
    212       rdtbt  =   90._wp ,    &  !: barotropic time step for the dynamics (lk_dynspg_ts=T) 
    213212      atfp   = 0.1_wp   ,    &  !: asselin time filter parameter 
    214213      atfp1                     !: asselin time filter coeff. (atfp1= 1-2*atfp) 
  • trunk/NEMO/OPA_SRC/DOM/domain.F90

    r1229 r1241  
    146146      NAMELIST/namdom/ ntopo , e3zps_min, e3zps_rat, nmsh   ,   & 
    147147         &             nacc  , atfp     , rdt      , rdtmin ,   & 
    148          &             rdtmax, rdth     , rdtbt    , nclosea 
     148         &             rdtmax, rdth     , nn_baro  , nclosea 
    149149      NAMELIST/namcla/ n_cla 
    150150      !!---------------------------------------------------------------------- 
     
    248248         WRITE(numout,*) '           maximum time step on tracers   rdtmax    = ', rdtmax 
    249249         WRITE(numout,*) '           depth variation tracer step    rdth      = ', rdth 
    250          WRITE(numout,*) '           barotropic time step           rdtbt     = ', rdtbt 
     250         WRITE(numout,*) '           number of barotropic time step nn_baro   = ', nn_baro 
    251251      ENDIF 
    252252 
  • trunk/NEMO/OPA_SRC/DYN/dynspg.F90

    r1152 r1241  
    158158      ! Control of timestep choice 
    159159      ! -------------------------- 
    160       IF( lk_dynspg_ts ) THEN 
    161          IF( MOD( rdt , rdtbt ) /= 0. )   & 
    162            &   CALL ctl_stop( ' The barotropic timestep must be an integer divisor of the baroclinic timestep' ) 
     160      IF( lk_dynspg_ts .OR. lk_dynspg_exp ) THEN 
     161         IF( n_cla == 1 )   & 
     162           &   CALL ctl_stop( ' Crossland advection not implemented for this free surface formulation ' ) 
    163163      ENDIF 
    164164 
  • trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90

    r1170 r1241  
    9999      !! * Local declarations 
    100100      INTEGER  ::  ji, jj, jk, jit             ! dummy loop indices 
    101       INTEGER  ::  icycle, ibaro               ! temporary scalar 
     101      INTEGER  ::  icycle                      ! temporary scalar 
    102102      REAL(wp) ::                           & 
    103103         zraur, zcoef, z2dt_e, z2dt_b, zfac25,   &  ! temporary scalars 
     
    128128         IF(lwp) WRITE(numout,*) 'dyn_spg_ts : surface pressure gradient trend' 
    129129         IF(lwp) WRITE(numout,*) '~~~~~~~~~~   free surface with time splitting' 
    130          IF(lwp) WRITE(numout,*) ' Number of sub cycle in 1 time-step (2 rdt) : icycle = ', FLOOR( 2*rdt/rdtbt ) 
     130         IF(lwp) WRITE(numout,*) ' Number of sub cycle in 1 time-step (2 rdt) : icycle = ',  2*nn_baro 
    131131 
    132132         CALL ts_rst( nit000, 'READ' )   ! read or initialize the following fields: 
     
    304304      !---------------- 
    305305      ! Number of iteration of the barotropic loop 
    306       ibaro = FLOOR( rdt / rdtbt ) 
    307       icycle = 3 /2 * ibaro  
     306      icycle = 3  * nn_baro / 2 
    308307 
    309308      ! variables for the barotropic equations 
     
    341340      DO jit = 1, icycle                                   !  sub-time-step loop  ! 
    342341         !                                                 ! ==================== ! 
    343          z2dt_e = 2. * rdtbt 
    344          IF ( jit == 1 )   z2dt_e = rdtbt 
     342         z2dt_e = 2. * ( rdt / nn_baro ) 
     343         IF ( jit == 1 )   z2dt_e = rdt / nn_baro 
    345344 
    346345         ! Time interpolation of open boundary condition data 
     
    484483         ! temporal sum 
    485484         !------------- 
    486          IF( jit >= ibaro/2 ) THEN 
     485         IF( jit >= nn_baro / 2 ) THEN 
    487486            zssha_b(:,:) = zssha_b(:,:) + ssha_e(:,:) 
    488487            zua_b  (:,:) = zua_b  (:,:) + ua_e  (:,:) 
     
    552551 
    553552      ! Time average of after barotropic variables 
    554       zcoef =  1.e0 / ( ibaro + 1 ) 
     553      zcoef =  1.e0 / ( nn_baro + 1 )  
    555554      zssha_b(:,:) = zcoef * zssha_b(:,:)  
    556555      zua_b  (:,:) = zcoef *  zua_b (:,:)  
    557556      zva_b  (:,:) = zcoef *  zva_b (:,:)  
    558557#if defined key_obc 
    559          IF( lp_obc_east  )   sshfoe_b(:,:) = zcoef * sshfoe_b(:,:) 
    560          IF( lp_obc_west  )   sshfow_b(:,:) = zcoef * sshfow_b(:,:) 
    561          IF( lp_obc_north )   sshfon_b(:,:) = zcoef * sshfon_b(:,:) 
    562          IF( lp_obc_south )   sshfos_b(:,:) = zcoef * sshfos_b(:,:) 
     558      IF( lp_obc_east  )   sshfoe_b(:,:) = zcoef * sshfoe_b(:,:) 
     559      IF( lp_obc_west  )   sshfow_b(:,:) = zcoef * sshfow_b(:,:) 
     560      IF( lp_obc_north )   sshfon_b(:,:) = zcoef * sshfon_b(:,:) 
     561      IF( lp_obc_south )   sshfos_b(:,:) = zcoef * sshfos_b(:,:) 
    563562#endif 
    564563      
     
    620619      ! ------------------------------------------ 
    621620      sshb_b(:,:) = sshn_b (:,:) 
    622       IF ( kt == nit000 ) zssha_b(:,:) = sshn(:,:) 
     621      IF ( neuler == 0 .AND. kt == nit000 ) zssha_b(:,:) = sshn(:,:) 
    623622      sshn_b(:,:) = zssha_b(:,:) 
    624623      un_b  (:,:) = zua_b  (:,:)  
  • trunk/NEMO/OPA_SRC/DYN/wzvmod.F90

    r1151 r1241  
    2121   USE bdy_oce         ! unstructured open boundaries 
    2222   USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
     23   USE obc_par         ! open boundary cond. parameter 
     24   USE obc_oce 
    2325 
    2426   IMPLICIT NONE 
  • trunk/NEMO/OPA_SRC/OBC/obcdta.F90

    r1156 r1241  
    986986 
    987987    IF( lk_dynspg_ts ) THEN 
    988        isrel = (kt-1)*rdt + kbt*rdtbt 
     988       isrel = (kt-1)*rdt + kbt*(rdt/REAL(nn_baro,wp)) 
    989989 
    990990       IF( nobc_dta == 1 ) THEN 
    991           isrel = (kt-1)*rdt + kbt*rdtbt 
     991          isrel = (kt-1)*rdt + kbt*(rdt/REAL(nn_baro,wp)) 
    992992          itimo  = FLOOR(  kt*rdt    / (tcobc(2)-tcobc(1)) ) 
    993993          itimom = FLOOR( (kt-1)*rdt / (tcobc(2)-tcobc(1)) ) 
Note: See TracChangeset for help on using the changeset viewer.