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 12249 for NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/step_c1d.F90 – NEMO

Ignore:
Timestamp:
2019-12-13T19:48:00+01:00 (4 years ago)
Author:
laurent
Message:

Made STATION_ASF testcase fully compliant with new timestepping scheme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/tests/STATION_ASF/MY_SRC/step_c1d.F90

    r11930 r12249  
    66   !! History :   2.0  !  2004-04  (C. Ethe)  adapted from step.F90 for C1D 
    77   !!             3.0  !  2008-04  (G. Madec)  redo the adaptation to include SBC 
     8   !!             4.1  !  2019-08  (A. Coward, D. Storkey) rewrite in preparation for new timestepping scheme 
     9   !!             4.1  !  2019-12  (L. Brodeau) STATION_ASF test-case 
    810   !!---------------------------------------------------------------------- 
    911#if defined key_c1d 
    1012   !!---------------------------------------------------------------------- 
    1113   !!   'key_c1d'                                       1D Configuration 
    12    !!----------------------------------------------------------------------   
     14   !!---------------------------------------------------------------------- 
    1315   !!   stp_c1d        : NEMO system time-stepping in c1d case 
    1416   !!---------------------------------------------------------------------- 
    15    USE step_oce        ! time stepping definition modules  
    16    !LB:USE dyncor_c1d      ! Coriolis term (c1d case)         (dyn_cor_1d     ) 
    17    !LB:USE dynnxt          ! time-stepping                    (dyn_nxt routine) 
    18    !LB:USE dyndmp          ! U & V momentum damping           (dyn_dmp routine) 
    19    USE restart         ! restart  
     17   USE step_oce        ! time stepping definition modules 
     18   USE step, ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices 
     19   USE restart         ! restart 
    2020 
    2121   IMPLICIT NONE 
    2222   PRIVATE 
    2323 
    24    PUBLIC   stp_c1d   ! called by nemogcm.F90 
     24   PUBLIC stp_c1d   ! called by nemogcm.F90 
    2525 
    2626   !!---------------------------------------------------------------------- 
     
    3434      !!---------------------------------------------------------------------- 
    3535      !!                     ***  ROUTINE stp_c1d  *** 
    36       !!                       
     36      !! 
    3737      !! ** Purpose :  - Time stepping of SBC including sea ice (dynamic and thermodynamic eqs.) 
    3838      !!               - Time stepping of OPA (momentum and active tracer eqs.) 
    3939      !!               - Time stepping of TOP (passive tracer eqs.) 
    40       !!  
    41       !! ** Method  : -1- Update forcings and data   
    42       !!              -2- Update vertical ocean physics  
    43       !!              -3- Compute the t and s trends  
    44       !!              -4- Update t and s  
     40      !! 
     41      !! ** Method  : -1- Update forcings and data 
     42      !!              -2- Update vertical ocean physics 
     43      !!              -3- Compute the t and s trends 
     44      !!              -4- Update t and s 
    4545      !!              -5- Compute the momentum trends 
    4646      !!              -6- Update the horizontal velocity 
     
    5454      !! --------------------------------------------------------------------- 
    5555 
    56                              indic = 0                ! reset to no error condition 
     56      indic = 0                ! reset to no error condition 
    5757      IF( kstp == nit000 )   CALL iom_init( "nemo")   ! iom_put initialization (must be done after nemo_init for AGRIF+XIOS+OASIS) 
    5858      IF( kstp /= nit000 )   CALL day( kstp )         ! Calendar (day was already called at nit000 in day_init) 
    59                              CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp 
     59      CALL iom_setkt( kstp - nit000 + 1, "nemo" )   ! say to iom that we are at time step kstp 
    6060 
    61                              CALL sbc    ( kstp )         ! Sea Boundary Condition (including sea-ice) 
     61      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     62      ! Update data, open boundaries, surface boundary condition (including sea-ice) 
     63      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     64      CALL sbc    ( kstp, Nbb, Nnn )  ! Sea Boundary Condition (including sea-ice) 
    6265 
    63                              CALL dia_wri( kstp )         ! ocean model: outputs 
     66      CALL dia_wri( kstp, Nnn )  ! ocean model: outputs 
    6467 
    65                               
     68      ! Swap time levels 
     69      Nrhs = Nbb 
     70      Nbb = Nnn 
     71      Nnn = Naa 
     72      Naa = Nrhs 
     73 
    6674      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    67       ! Control 
     75      ! Control and restarts 
    6876      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    69                              CALL stp_ctl( kstp, indic ) 
    70       IF( indic < 0  )  THEN 
    71                              CALL ctl_stop( 'step: indic < 0' ) 
    72                              CALL dia_wri_state( 'output.abort' ) 
    73       ENDIF 
    74                               
    75       IF( kstp == nit000   ) CALL iom_close( numror )     ! close input  ocean restart file 
    76  
    77       !#LB: from C1D: 
    78       IF( lrst_oce       )   CALL rst_write( kstp )        ! write output ocean restart file 
     77      CALL stp_ctl( kstp, Nbb, Nnn, indic ) 
     78      IF( kstp == nit000 )   CALL iom_close( numror )          ! close input  ocean restart file 
     79      IF( lrst_oce       )   CALL rst_write( kstp, Nbb, Nnn )  ! write output ocean restart file 
    7980      ! 
    8081#if defined key_iomput 
    8182      IF( kstp == nitend .OR. indic < 0 )   CALL xios_context_finalize()   ! needed for XIOS 
     83      ! 
    8284#endif 
    83  
    84       !#LB: from SAS" 
    85 !#if defined key_iomput 
    86 !      IF( kstp == nitrst ) THEN 
    87 !         IF(.NOT.lwxios) THEN 
    88 !            CALL iom_close( numrow ) 
    89 !         ELSE 
    90 !            CALL iom_context_finalize( cwxios_context ) 
    91 !         ENDIF 
    92 !         lrst_oce = .FALSE. 
    93 !      ENDIF 
    94 !      IF( kstp == nitend .OR. indic < 0 ) THEN 
    95 !                             CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 
    96 !      ENDIF 
    97 !#endif 
    98 !      ! 
    99 !      IF( ln_timing .AND.  kstp == nit000  )   CALL timing_reset 
    100       ! 
    10185   END SUBROUTINE stp_c1d 
    10286 
    10387#else 
    104    !!----------------------------------------------------------------------                                                                      
    105    !!   Default key                                            NO 1D Config                                                                      
    106    !!----------------------------------------------------------------------                                                                      
     88   !!---------------------------------------------------------------------- 
     89   !!   Default key                                            NO 1D Config 
     90   !!---------------------------------------------------------------------- 
    10791CONTAINS 
    108    SUBROUTINE stp_c1d ( kt )      ! dummy routine                                                                                                
     92   SUBROUTINE stp_c1d ( kt )      ! dummy routine 
    10993      IMPLICIT NONE 
    11094      INTEGER, INTENT( in ) :: kt 
     
    11296   END SUBROUTINE stp_c1d 
    11397#endif 
    114     
     98 
    11599   !!====================================================================== 
    116100END MODULE step_c1d 
Note: See TracChangeset for help on using the changeset viewer.