Ignore:
Timestamp:
Oct 1, 2018 2:37:10 AM (6 years ago)
Author:
raasch
Message:

modularization of the ocean code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/swap_timelevel.f90

    r3274 r3294  
    2525! -----------------
    2626! $Id$
     27! changes concerning modularization of ocean option
     28!
     29! 3274 2018-09-24 15:42:55Z knoop
    2730! Modularization of all bulk cloud physics code components
    2831!
     
    147150        ONLY:  chem_swap_timelevel
    148151
    149     USE land_surface_model_mod,                                                &
    150         ONLY: lsm_swap_timelevel
    151 
    152152    USE cpulog,                                                                &
    153153        ONLY: cpu_log, log_point
    154154
    155155    USE control_parameters,                                                    &
    156         ONLY:  air_chemistry, humidity, land_surface,                          &
    157                neutral, ocean, passive_scalar, timestep_count, urban_surface
     156        ONLY:  air_chemistry, humidity, land_surface, neutral, ocean_mode,     &
     157               passive_scalar, timestep_count, urban_surface
    158158
    159159    USE gust_mod,                                                              &
     
    164164        ONLY:  nxlg, nxrg, nyng, nysg, nzb, nzt
    165165#endif
     166
     167    USE land_surface_model_mod,                                                &
     168        ONLY: lsm_swap_timelevel
     169
     170    USE ocean_mod,                                                             &
     171        ONLY:  ocean_swap_timelevel
    166172
    167173    USE pmc_interface,                                                         &
     
    202208    ENDDO
    203209
    204     CALL tcm_swap_timelevel ( 0 )
    205 
    206     IF ( ocean )  THEN
    207        sa = sa_p
    208     ENDIF
    209 
    210210    IF ( humidity )  THEN
    211211       q = q_p
     
    214214    IF ( passive_scalar )  s = s_p             
    215215
    216     IF ( humidity  .AND.  bulk_cloud_model )  THEN
    217        CALL bcm_swap_timelevel ( 0 )
    218     ENDIF
    219 
    220     IF ( land_surface )  THEN
    221        CALL lsm_swap_timelevel ( 0 )
    222     ENDIF
    223 
    224     IF ( urban_surface )  THEN
    225        CALL usm_swap_timelevel ( 0 )
    226     ENDIF
    227 
    228     IF ( gust_module_enabled )  THEN
    229        CALL gust_swap_timelevel ( 0 )
    230     ENDIF
    231 
     216!
     217!-- Swapping the timelevel of other modules
     218    IF ( humidity  .AND.  bulk_cloud_model )  CALL bcm_swap_timelevel( 0 )
     219    IF ( gust_module_enabled )                CALL gust_swap_timelevel( 0 )
     220    IF ( land_surface )                       CALL lsm_swap_timelevel( 0 )
     221    IF ( ocean_mode )                         CALL ocean_swap_timelevl( 0 )
     222    CALL tcm_swap_timelevel( 0 )
     223    IF ( urban_surface )                      CALL usm_swap_timelevel( 0 )
    232224
    233225    CALL cpu_log( log_point(28), 'swap_timelevel (nop)', 'stop' )
     
    245237             pt => pt_1;  pt_p => pt_2
    246238          ENDIF
    247           IF ( ocean )  THEN
     239          IF ( ocean_mode )  THEN
    248240             sa => sa_1;  sa_p => sa_2
    249241          ENDIF
     
    254246             s => s_1;    s_p => s_2
    255247          ENDIF
    256 
    257           IF ( air_chemistry )  CALL chem_swap_timelevel(0)
    258248
    259249          swap_level = 1
     
    267257             pt => pt_2;  pt_p => pt_1
    268258          ENDIF
    269           IF ( ocean )  THEN
     259          IF ( ocean_mode )  THEN
    270260             sa => sa_2;  sa_p => sa_1
    271261          ENDIF
     
    277267          ENDIF
    278268
    279           IF ( air_chemistry )  CALL chem_swap_timelevel(1)
    280 
    281269          swap_level = 2
    282270
    283271    END SELECT
     272
     273    IF ( air_chemistry )  CALL chem_swap_timelevel( MOD( timestep_count, 2) )
    284274
    285275    CALL tcm_swap_timelevel ( MOD( timestep_count, 2) )
Note: See TracChangeset for help on using the changeset viewer.