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 5917 for branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90 – NEMO

Ignore:
Timestamp:
2015-11-25T11:03:43+01:00 (8 years ago)
Author:
jchanut
Message:

Free surface simplification #1620. Step 4 (Final): add Gurvan's suggestions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90

    r5906 r5917  
    182182      !  Ocean dynamics : hdiv, ssh, e3, u, v, w 
    183183      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    184                          ua(:,:,:) = 0._wp            ! set dynamics trends to zero 
    185                          va(:,:,:) = 0._wp 
    186184 
    187185                         CALL ssh_nxt       ( kstp )  ! after ssh (includes call to div_hor) 
     
    194192                         CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation 
    195193                             
    196       IF( ln_zps .AND. .NOT. ln_isfcav)   &                              ! Partial steps: bottom before horizontal gradient 
    197                &         CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &  ! of t, s, rd at the last ocean level 
    198                &                                          rhd, gru , grv    ) 
    199       IF( ln_zps .AND.       ln_isfcav)   &                              ! Partial steps: top & bottom before horizontal gradient 
    200                &         CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv, gtui, gtvi,   &  
    201                &                                       rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   & 
    202                &                                            grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    ) 
    203  
     194                         ua(:,:,:) = 0._wp            ! set dynamics trends to zero 
     195                         va(:,:,:) = 0._wp 
    204196 
    205197      IF(  lk_asminc .AND. ln_asmiau .AND. ln_dyninc )   & 
     
    218210                                                      ! With split-explicit free surface, since now transports have been updated and ssha as well 
    219211      IF( ln_dynspg_ts ) THEN                         ! vertical scale factors and vertical velocity need to be updated 
    220                             CALL div_hor    ( kstp )  ! Horizontal divergence  (2nd call in time-split case) 
    221          IF( lk_vvl     )   CALL dom_vvl_sf_nxt( kstp, kcall=2 )  ! after vertical scale factors (update depth average component) 
    222                             CALL wzv        ( kstp )  ! now cross-level velocity  
     212                            CALL div_hor    ( kstp )              ! Horizontal divergence  (2nd call in time-split case) 
     213         IF( lk_vvl )       CALL dom_vvl_sf_nxt( kstp, kcall=2 )  ! after vertical scale factors (update depth average component) 
     214                            CALL wzv        ( kstp )              ! now cross-level velocity  
    223215      ENDIF 
    224216 
     
    249241      ! Active tracers                               
    250242      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    251                              tsa(:,:,:,:) = 0._wp           ! set tracer trends to zero 
     243                         tsa(:,:,:,:) = 0._wp         ! set tracer trends to zero 
    252244 
    253245      IF(  lk_asminc .AND. ln_asmiau .AND. & 
    254          & ln_trainc     )   CALL tra_asm_inc( kstp )       ! apply tracer assimilation increment 
    255                              CALL tra_sbc    ( kstp )       ! surface boundary condition 
    256       IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr 
    257       IF( ln_trabbc      )   CALL tra_bbc    ( kstp )       ! bottom heat flux 
    258       IF( lk_trabbl      )   CALL tra_bbl    ( kstp )       ! advective (and/or diffusive) bottom boundary layer scheme 
    259       IF( ln_tradmp      )   CALL tra_dmp    ( kstp )       ! internal damping trends 
    260       IF( lk_bdy         )   CALL bdy_tra_dmp( kstp )       ! bdy damping trends 
    261 #if defined key_agrif 
    262       IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_tra          ! tracers sponge 
    263 #endif 
    264                              CALL tra_adv    ( kstp )       ! horizontal & vertical advection 
    265                              CALL tra_ldf    ( kstp )       ! lateral mixing 
     246         & ln_trainc )   CALL tra_asm_inc   ( kstp )  ! apply tracer assimilation increment 
     247                         CALL tra_sbc       ( kstp )  ! surface boundary condition 
     248      IF( ln_traqsr  )   CALL tra_qsr       ( kstp )  ! penetrative solar radiation qsr 
     249      IF( ln_trabbc  )   CALL tra_bbc       ( kstp )  ! bottom heat flux 
     250      IF( lk_trabbl  )   CALL tra_bbl       ( kstp )  ! advective (and/or diffusive) bottom boundary layer scheme 
     251      IF( ln_tradmp  )   CALL tra_dmp       ( kstp )  ! internal damping trends 
     252      IF( lk_bdy     )   CALL bdy_tra_dmp   ( kstp )  ! bdy damping trends 
     253#if defined key_agrif 
     254      IF(.NOT. Agrif_Root())  &  
     255               &         CALL Agrif_Sponge_tra        ! tracers sponge 
     256#endif 
     257                         CALL tra_adv       ( kstp )  ! horizontal & vertical advection 
     258                         CALL tra_ldf       ( kstp )  ! lateral mixing 
    266259 
    267260!!gm : why CALL to dia_ptr has been moved here??? (use trends info?) 
    268       IF( ln_diaptr      )   CALL dia_ptr                   ! Poleward adv/ldf TRansports diagnostics 
     261      IF( ln_diaptr  )   CALL dia_ptr                 ! Poleward adv/ldf TRansports diagnostics 
    269262!!gm 
    270                              CALL tra_zdf    ( kstp )       ! vertical mixing and after tracer fields 
    271       IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )       ! update after fields by non-penetrative convection 
     263                         CALL tra_zdf       ( kstp )  ! vertical mixing and after tracer fields 
     264      IF( ln_zdfnpc  )   CALL tra_npc       ( kstp )  ! update after fields by non-penetrative convection 
    272265 
    273266      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    288281!!  
    289282!!jc2: dynnxt must be the latest call. fse3t_b are indeed updated in that routine 
    290                              CALL tra_nxt    ( kstp )       ! tracer fields at next time step 
    291                              CALL dyn_nxt    ( kstp )       ! lateral velocity at next time step 
    292                              CALL ssh_swp    ( kstp )       ! swap of sea surface height 
    293       IF( lk_vvl         )   CALL dom_vvl_sf_swp( kstp )    ! swap of vertical scale factors 
     283                         CALL tra_nxt       ( kstp )  ! finalize (bcs) tracer fields at next time step and swap 
     284                         CALL dyn_nxt       ( kstp )  ! finalize (bcs) velocities at next time step and swap 
     285                         CALL ssh_swp       ( kstp )  ! swap of sea surface height 
     286      IF( lk_vvl     )   CALL dom_vvl_sf_swp( kstp )  ! swap of vertical scale factors 
    294287      ! 
    295288 
     
    299292!!jc: That would be better, but see comment above 
    300293!! 
    301       IF( lrst_oce       )   CALL rst_write( kstp )       ! write output ocean restart file 
     294      IF( lrst_oce   )   CALL rst_write     ( kstp )  ! write output ocean restart file 
    302295 
    303296#if defined key_agrif 
     
    305298      ! AGRIF 
    306299      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<       
    307                                CALL Agrif_Integrate_ChildGrids( stp )   
    308  
    309       IF ( Agrif_NbStepint().EQ.0 ) THEN 
    310                                CALL Agrif_Update_Tra()      ! Update active tracers 
    311                                CALL Agrif_Update_Dyn()      ! Update momentum 
    312       ENDIF 
    313 #endif 
    314       IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics 
    315       IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
     300                         CALL Agrif_Integrate_ChildGrids( stp )   
     301 
     302      IF ( Agrif_NbStepint().EQ.0 ) THEN              ! AGRIF Update  
     303!!jc in fact update i useless at last time step, but do it for global diagnostics 
     304                         CALL Agrif_Update_Tra()      ! Update active tracers 
     305                         CALL Agrif_Update_Dyn()      ! Update momentum 
     306      ENDIF 
     307#endif 
     308      IF( ln_diahsb  )   CALL dia_hsb       ( kstp )  ! - ML - global conservation diagnostics 
     309      IF( lk_diaobs  )   CALL dia_obs       ( kstp )  ! obs-minus-model (assimilation) diagnostics (call after dynamics update) 
    316310 
    317311      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    318312      ! Control 
    319313      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    320                                CALL stp_ctl( kstp, indic ) 
    321       IF( indic < 0        )   THEN 
    322                                CALL ctl_stop( 'step: indic < 0' ) 
    323                                CALL dia_wri_state( 'output.abort', kstp ) 
    324       ENDIF 
    325       IF( kstp == nit000   )   THEN 
     314                         CALL stp_ctl       ( kstp, indic ) 
     315      IF( indic < 0  )   THEN 
     316                         CALL ctl_stop( 'step: indic < 0' ) 
     317                         CALL dia_wri_state( 'output.abort', kstp ) 
     318      ENDIF 
     319      IF( kstp == nit000 )   THEN 
    326320                 CALL iom_close( numror )     ! close input  ocean restart file 
    327321         IF(lwm) CALL FLUSH    ( numond )     ! flush output namelist oce 
     
    334328      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    335329!!gm why lk_oasis and not lk_cpl ???? 
    336       IF( lk_oasis         )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
     330      IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges 
    337331      ! 
    338332#if defined key_iomput 
Note: See TracChangeset for help on using the changeset viewer.