Changeset 10905


Ignore:
Timestamp:
2019-04-29T13:50:19+02:00 (18 months ago)
Author:
davestorkey
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps :

  1. Alter top-level TOP routines so they use the time-level indices from step.F90 rather than having their own time level indices.
  2. First part of changes for OFF modules.
Location:
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/nemogcm.F90

    r10883 r10905  
    405405 
    406406      ! Initialisation of temporary pointers (to be deleted after development finished) 
    407       CALL update_pointers() 
     407      CALL update_pointers( Nbb, Nnn, Naa ) 
    408408      !                             !-------------------------------! 
    409409      !                             !  NEMO general initialization  ! 
     
    473473#if defined key_top 
    474474      !                                      ! Passive tracers 
    475                            CALL     trc_init 
     475                           CALL     trc_init( Nbb, Nnn, Naa ) 
    476476#endif 
    477477      IF( l_ldfslp     )   CALL ldf_slp_init    ! slope of lateral mixing 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/step.F90

    r10884 r10905  
    232232      ! Passive Tracer Model 
    233233      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
    234                          CALL trc_stp       ( kstp )  ! time-stepping 
     234                         CALL trc_stp       ( kstp, Nbb, Nnn, Nrhs, Naa )  ! time-stepping 
    235235#endif 
    236236 
     
    335335   END SUBROUTINE stp 
    336336    
    337    SUBROUTINE update_pointers 
     337   SUBROUTINE update_pointers( Kbb, Kmm, Kaa ) 
    338338      !!---------------------------------------------------------------------- 
    339339      !!                     ***  ROUTINE update_pointers  *** 
     
    344344      !! ** Method  : 
    345345      !!---------------------------------------------------------------------- 
    346  
    347       ub => uu(:,:,:,Nbb); un => uu(:,:,:,Nnn); ua => uu(:,:,:,Naa) 
    348       vb => vv(:,:,:,Nbb); vn => vv(:,:,:,Nnn); va => vv(:,:,:,Naa) 
     346      INTEGER, INTENT( in ) :: Kbb, Kmm, Kaa ! time level indices 
     347 
     348      ub => uu(:,:,:,Kbb); un => uu(:,:,:,Kmm); ua => uu(:,:,:,Kaa) 
     349      vb => vv(:,:,:,Kbb); vn => vv(:,:,:,Kmm); va => vv(:,:,:,Kaa) 
    349350      wn => ww(:,:,:) 
    350351      hdivn => hdiv(:,:,:) 
    351352 
    352       tsb => ts(:,:,:,:,Nbb); tsn => ts(:,:,:,:,Nnn); tsa => ts(:,:,:,:,Naa) 
    353  
    354       e3t_b => e3t(:,:,:,Nbb); e3t_n => e3t(:,:,:,Nnn); e3t_a => e3t(:,:,:,Naa) 
    355       e3u_b => e3u(:,:,:,Nbb); e3u_n => e3u(:,:,:,Nnn); e3u_a => e3u(:,:,:,Naa) 
    356       e3v_b => e3v(:,:,:,Nbb); e3v_n => e3v(:,:,:,Nnn); e3v_a => e3v(:,:,:,Naa) 
     353      tsb => ts(:,:,:,:,Kbb); tsn => ts(:,:,:,:,Kmm); tsa => ts(:,:,:,:,Kaa) 
     354 
     355      e3t_b => e3t(:,:,:,Kbb); e3t_n => e3t(:,:,:,Kmm); e3t_a => e3t(:,:,:,Kaa) 
     356      e3u_b => e3u(:,:,:,Kbb); e3u_n => e3u(:,:,:,Kmm); e3u_a => e3u(:,:,:,Kaa) 
     357      e3v_b => e3v(:,:,:,Kbb); e3v_n => e3v(:,:,:,Kmm); e3v_a => e3v(:,:,:,Kaa) 
    357358 
    358359      e3f_n => e3f(:,:,:) 
    359360 
    360       e3w_b  => e3w (:,:,:,Nbb); e3w_n  => e3w (:,:,:,Nnn) 
    361       e3uw_b => e3uw(:,:,:,Nbb); e3uw_n => e3uw(:,:,:,Nnn) 
    362       e3vw_b => e3vw(:,:,:,Nbb); e3vw_n => e3vw(:,:,:,Nnn) 
    363  
    364       gdept_b => gdept(:,:,:,Nbb); gdept_n => gdept(:,:,:,Nnn)  
    365       gdepw_b => gdepw(:,:,:,Nbb); gdepw_n => gdepw(:,:,:,Nnn)  
     361      e3w_b  => e3w (:,:,:,Kbb); e3w_n  => e3w (:,:,:,Kmm) 
     362      e3uw_b => e3uw(:,:,:,Kbb); e3uw_n => e3uw(:,:,:,Kmm) 
     363      e3vw_b => e3vw(:,:,:,Kbb); e3vw_n => e3vw(:,:,:,Kmm) 
     364 
     365      gdept_b => gdept(:,:,:,Kbb); gdept_n => gdept(:,:,:,Kmm)  
     366      gdepw_b => gdepw(:,:,:,Kbb); gdepw_n => gdepw(:,:,:,Kmm)  
    366367      gde3w_n => gde3w(:,:,:) 
    367368 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OFF/nemogcm.F90

    r10874 r10905  
    5959   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    6060   USE lbcnfd  , ONLY : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges 
     61   USE step, ONLY : update_pointers  
    6162 
    6263   IMPLICIT NONE 
     
    6667 
    6768   CHARACTER (len=64) ::   cform_aaa="( /, 'AAAAAAAA', / ) "   ! flag for output listing 
     69 
     70   !!---------------------------------------------------------------------- 
     71   !! time level indices 
     72   !!---------------------------------------------------------------------- 
     73   INTEGER :: Nbb, Nnn, Naa, Nrhs        
    6874 
    6975   !!---------------------------------------------------------------------- 
     
    116122         IF( .NOT.ln_linssh )   CALL dta_dyn_swp( istp )         ! swap of sea  surface height and vertical scale factors 
    117123#endif 
    118                                 CALL trc_stp    ( istp )         ! time-stepping 
     124                                CALL trc_stp    ( istp, Nbb, Nnn, Nrhs, Naa )         ! time-stepping 
    119125                                CALL stp_ctl    ( istp, indic )  ! Time loop: control and print 
    120126         istp = istp + 1 
     
    287293      CALL nemo_alloc() 
    288294 
     295      ! Initialise time level indices 
     296      Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa 
     297    
     298      ! Initialisation of temporary pointers (to be deleted after development finished) 
     299      CALL update_pointers( Nbb, Nnn, Naa ) 
     300 
    289301      !                             !-------------------------------! 
    290302      !                             !  NEMO general initialization  ! 
     
    324336#endif 
    325337 
    326                            CALL     trc_init   ! Passive tracers initialization 
     338                           CALL     trc_init( Nbb, Nnn, Naa )   ! Passive tracers initialization 
    327339                           CALL dia_ptr_init   ! Poleward TRansports initialization 
    328340                            
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/trcini.F90

    r10880 r10905  
    4040CONTAINS 
    4141    
    42    SUBROUTINE trc_init 
     42   SUBROUTINE trc_init( Kbb, Kmm, Kaa ) 
    4343      !!--------------------------------------------------------------------- 
    4444      !!                     ***  ROUTINE trc_init  *** 
     
    5252      !!                or read data or analytical formulation 
    5353      !!--------------------------------------------------------------------- 
     54      !! Time level indices only required for call to update_pointers_trc 
     55      !! To be removed after IMMERSE development finished.  
     56      INTEGER, INTENT( in ) :: Kbb, Kmm, Kaa ! time level indices 
    5457      ! 
    5558      IF( ln_timing )   CALL timing_start('trc_init') 
     
    6366      CALL top_alloc()   ! allocate TOP arrays 
    6467 
    65       ! Initialise time level indices 
    66       Nbb = 1; Nnn = 2; Naa = 3; Nrhs = Naa 
    67  
    6868      ! Initialisation of temporary pointers (to be deleted after development finished) 
    69       CALL update_pointers_trc() 
     69      CALL update_pointers_trc( Kbb, Kmm, Kaa ) 
    7070      ! 
    7171      IF(.NOT.ln_trcdta )   ln_trc_ini(:) = .FALSE. 
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/TOP/trcstp.F90

    r10880 r10905  
    3232   PUBLIC   update_pointers_trc ! called in initialisation 
    3333 
    34    !!---------------------------------------------------------------------- 
    35    !! time level indices 
    36    !!---------------------------------------------------------------------- 
    37    INTEGER, PUBLIC :: Nbb, Nnn, Naa, Nrhs               !! used by trc_init 
    38  
    3934   LOGICAL  ::   llnew                   ! ??? 
    4035   REAL(wp) ::   rdt_sampl               ! ??? 
     
    5045CONTAINS 
    5146 
    52    SUBROUTINE trc_stp( kt ) 
     47   SUBROUTINE trc_stp( kt, Kbb, Kmm, Krhs, Kaa ) 
    5348      !!------------------------------------------------------------------- 
    5449      !!                     ***  ROUTINE trc_stp  *** 
     
    5954      !!                Update the passive tracers 
    6055      !!------------------------------------------------------------------- 
    61       INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
     56      INTEGER, INTENT( in ) :: kt                  ! ocean time-step index 
     57      INTEGER, INTENT( in ) :: Kbb, Kmm, Krhs, Kaa ! time level indices 
    6258      ! 
    6359      INTEGER ::   jk, jn   ! dummy loop indices 
     
    106102                                   CALL trc_wri      ( kt )       ! output of passive tracers with iom I/O manager 
    107103                                   CALL trc_sms      ( kt )       ! tracers: sinks and sources 
    108                                    CALL trc_trp      ( kt, Nbb, Nnn, Nrhs, Naa )       ! transport of passive tracers 
     104                                   CALL trc_trp      ( kt, Kbb, Kmm, Krhs, Kaa )       ! transport of passive tracers 
    109105         IF( kt == nittrc000 ) THEN 
    110106            CALL iom_close( numrtr )       ! close input tracer restart file 
     
    131127   END SUBROUTINE trc_stp 
    132128 
    133    SUBROUTINE update_pointers_trc 
     129   SUBROUTINE update_pointers_trc( Kbb, Kmm, Kaa ) 
    134130      !!---------------------------------------------------------------------- 
    135131      !!                     ***  ROUTINE update_pointers_trc  *** 
     
    140136      !! ** Method  : 
    141137      !!---------------------------------------------------------------------- 
    142  
    143       trb => tr(:,:,:,:,Nbb); trn => tr(:,:,:,:,Nnn); tra => tr(:,:,:,:,Naa) 
     138      INTEGER, INTENT( in ) :: Kbb, Kmm, Kaa ! time level indices 
     139 
     140      trb => tr(:,:,:,:,Kbb); trn => tr(:,:,:,:,Kmm); tra => tr(:,:,:,:,Kaa) 
    144141 
    145142   END SUBROUTINE update_pointers_trc 
Note: See TracChangeset for help on using the changeset viewer.