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

Changeset 5869


Ignore:
Timestamp:
2015-11-09T11:51:12+01:00 (8 years ago)
Author:
jchanut
Message:

Free surface simplification #1620. Step 2: suppress implicit pressure gradient

Location:
branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/SHARED/namelist_ref

    r5868 r5869  
    863863   ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial) 
    864864   ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme) 
    865    ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T) 
    866                                  !           centered      time scheme  (F) 
    867865/ 
    868866!----------------------------------------------------------------------- 
  • branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90

    r5836 r5869  
    5858   LOGICAL , PUBLIC ::   ln_hpg_prj      !: s-coordinate (Pressure Jacobian scheme) 
    5959   LOGICAL , PUBLIC ::   ln_hpg_isf      !: s-coordinate similar to sco modify for isf 
    60    LOGICAL , PUBLIC ::   ln_dynhpg_imp   !: semi-implicite hpg flag 
    6160 
    6261   INTEGER , PUBLIC ::   nhpg  =  0   ! = 0 to 7, type of pressure gradient scheme used ! (deduced from ln_hpg_... flags) (PUBLIC for TAM) 
     
    132131      !! 
    133132      NAMELIST/namdyn_hpg/ ln_hpg_zco, ln_hpg_zps, ln_hpg_sco,     & 
    134          &                 ln_hpg_djc, ln_hpg_prj, ln_hpg_isf, ln_dynhpg_imp 
     133         &                 ln_hpg_djc, ln_hpg_prj, ln_hpg_isf 
    135134      !!---------------------------------------------------------------------- 
    136135      ! 
     
    155154         WRITE(numout,*) '      s-coord. (Density Jacobian: Cubic polynomial)     ln_hpg_djc    = ', ln_hpg_djc 
    156155         WRITE(numout,*) '      s-coord. (Pressure Jacobian: Cubic polynomial)    ln_hpg_prj    = ', ln_hpg_prj 
    157          WRITE(numout,*) '      time stepping: centered (F) or semi-implicit (T)  ln_dynhpg_imp = ', ln_dynhpg_imp 
    158156      ENDIF 
    159157      ! 
  • branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90

    r5868 r5869  
    2222   USE dynspg_ts      ! surface pressure gradient     (dyn_spg_ts  routine) 
    2323   USE dynadv         ! dynamics: vector invariant versus flux form 
    24    USE dynhpg, ONLY: ln_dynhpg_imp 
    2524   USE sbctide 
    2625   USE updtide 
     
    235234         IF( nspg ==  1 )   WRITE(numout,*) '     free surface with time splitting scheme' 
    236235      ENDIF 
    237       !               ! Control of hydrostatic pressure choice 
    238       IF( lk_dynspg_ts .AND. ln_dynhpg_imp )   CALL ctl_stop( 'Semi-implicit hpg not compatible with time splitting' ) 
    239236      ! 
    240237      IF( nn_timing == 1 )  CALL timing_stop('dyn_spg_init') 
  • branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r5836 r5869  
    3232   USE domvvl          ! variable volume 
    3333   USE dynspg_oce      ! surface     pressure gradient variables 
    34    USE dynhpg          ! hydrostatic pressure gradient  
    3534   USE trd_oce         ! trends: ocean variables 
    3635   USE trdtra          ! trends manager: tracers  
     
    5857   PUBLIC   tra_nxt_vvl   ! to be used in trcnxt 
    5958 
    60    REAL(wp) ::   rbcp   ! Brown & Campana parameters for semi-implicit hpg 
    6159 
    6260   !! * Substitutions 
     
    9088      !! 
    9189      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    92       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     90      !! 
    9391      !!---------------------------------------------------------------------- 
    9492      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
     
    105103         IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap' 
    106104         IF(lwp) WRITE(numout,*) '~~~~~~~' 
    107          ! 
    108          rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp)      ! Brown & Campana parameter for semi-implicit hpg 
    109105      ENDIF 
    110106 
     
    181177      !!  
    182178      !! ** Method  : - Apply a Asselin time filter on now fields. 
    183       !!              - save in (ta,sa) an average over the three time levels  
    184       !!             which will be used to compute rdn and thus the semi-implicit 
    185       !!             hydrostatic pressure gradient (ln_dynhpg_imp = T) 
    186179      !!              - swap tracer fields to prepare the next time_step. 
    187       !!                This can be summurized for tempearture as: 
    188       !!             ztm = tn + rbcp * [ta -2 tn + tb ]       ln_dynhpg_imp = T 
    189       !!             ztm = 0                                   otherwise 
    190       !!                   with rbcp=1/4 * (1-atfp^4) / (1-atfp) 
    191       !!             tb  = tn + atfp*[ tb - 2 tn + ta ] 
    192       !!             tn  = ta   
    193       !!             ta  = ztm       (NB: reset to 0 after eos_bn2 call) 
    194180      !! 
    195181      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    196       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     182      !!               
    197183      !!---------------------------------------------------------------------- 
    198184      INTEGER         , INTENT(in   )                               ::   kt       ! ocean time-step index 
     
    205191      ! 
    206192      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
    207       LOGICAL  ::   ll_tra_hpg       ! local logical 
    208193      REAL(wp) ::   ztn, ztd         ! local scalars 
    209194      !!---------------------------------------------------------------------- 
     
    215200      ENDIF 
    216201      ! 
    217       IF( cdtype == 'TRA' )  THEN   ;   ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg     
    218       ELSE                          ;   ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    219       ENDIF 
    220202      ! 
    221203      DO jn = 1, kjpt 
     
    230212                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)                       ! ptn <-- pta 
    231213                  ! 
    232                   IF( ll_tra_hpg )   pta(ji,jj,jk,jn) = ztn + rbcp * ztd    ! pta <-- Brown & Campana average 
    233214               END DO 
    234215           END DO 
     
    248229      !!  
    249230      !! ** Method  : - Apply a thickness weighted Asselin time filter on now fields. 
    250       !!              - save in (ta,sa) a thickness weighted average over the three  
    251       !!             time levels which will be used to compute rdn and thus the semi- 
    252       !!             implicit hydrostatic pressure gradient (ln_dynhpg_imp = T) 
    253231      !!              - swap tracer fields to prepare the next time_step. 
    254232      !!                This can be summurized for tempearture as: 
    255       !!             ztm = ( e3t_n*tn + rbcp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )   ln_dynhpg_imp = T 
    256       !!                  /( e3t_n    + rbcp*[ e3t_b    - 2 e3t_n    + e3t_a    ] )    
    257       !!             ztm = 0                                                       otherwise 
    258       !!             tb  = ( e3t_n*tn + atfp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] ) 
    259       !!                  /( e3t_n    + atfp*[ e3t_b    - 2 e3t_n    + e3t_a    ] ) 
    260       !!             tn  = ta  
    261       !!             ta  = zt        (NB: reset to 0 after eos_bn2 call) 
    262233      !! 
    263234      !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step 
    264       !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T) 
     235      !! 
    265236      !!---------------------------------------------------------------------- 
    266237      INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index 
     
    276247 
    277248      !!      
    278       LOGICAL  ::   ll_tra_hpg, ll_traqsr, ll_rnf, ll_isf   ! local logical 
     249      LOGICAL  ::   ll_traqsr, ll_rnf, ll_isf   ! local logical 
    279250      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    280251      REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
     
    289260      ! 
    290261      IF( cdtype == 'TRA' )  THEN    
    291          ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg 
    292262         ll_traqsr  = ln_traqsr        ! active  tracers case  and  solar penetration 
    293263         ll_rnf     = ln_rnf           ! active  tracers case  and  river runoffs 
     
    298268         END IF 
    299269      ELSE                           
    300          ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg 
    301270         ll_traqsr  = .FALSE.          ! active  tracers case and NO solar penetration 
    302271         ll_rnf     = .FALSE.          ! passive tracers or NO river runoffs 
     
    356325                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta 
    357326                  ! 
    358                   IF( ll_tra_hpg ) THEN        ! semi-implicit hpg (T & S only) 
    359                      ze3t_d           = 1.e0   / ( ze3t_n + rbcp * ze3t_d ) 
    360                      pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average 
    361                   ENDIF 
    362327               END DO 
    363328            END DO 
  • branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90

    r5868 r5869  
    268268#endif 
    269269                             CALL tra_zdf    ( kstp )       ! vertical mixing and after tracer fields 
    270  
    271       IF( ln_dynhpg_imp  ) THEN                             ! semi-implicit hpg (time stepping then eos) 
    272          IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    273                              CALL tra_nxt( kstp )                ! tracer fields at next time step 
     270                                                ! centered hpg  (eos then time stepping) 
     271      IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case 
    274272!!gm : why again a call to sto_pts ??? 
    275             IF( ln_sto_eos ) CALL sto_pts( tsn )                 ! Random T/S fluctuations 
    276 !!gm 
    277                              CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation 
    278             IF( ln_zps .AND. .NOT. ln_isfcav)                                & 
    279                &             CALL zps_hde    ( kstp, jpts, tsa, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient 
    280                &                                           rhd, gru , grv    )  ! of t, s, rd at the last ocean level 
    281             IF( ln_zps .AND.       ln_isfcav)                                & 
    282                &             CALL zps_hde_isf( kstp, jpts, tsa, gtsu, gtsv, gtui, gtvi,  &    ! Partial steps for top/bottom cells 
    283                &                                           rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   & 
    284                &                                                grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    ) 
    285       ELSE                                                  ! centered hpg  (eos then time stepping) 
    286          IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case 
    287 !!gm : why again a call to sto_pts ??? 
    288             IF( ln_sto_eos ) CALL sto_pts( tsn )    ! Random T/S fluctuations 
     273         IF( ln_sto_eos )    CALL sto_pts( tsn )    ! Random T/S fluctuations 
    289274!!gm 
    290275                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation 
     
    296281               &                                           rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   & 
    297282               &                                    grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    ) ! of t, s, rd at the last ocean level 
    298          ENDIF 
    299          IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
     283      ENDIF 
     284      IF( ln_zdfnpc   )      CALL tra_npc( kstp )                ! update after fields by non-penetrative convection 
    300285                             CALL tra_nxt( kstp )                ! tracer fields at next time step 
    301       ENDIF 
    302286 
    303287      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Note: See TracChangeset for help on using the changeset viewer.