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 10855 for NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src – NEMO

Ignore:
Timestamp:
2019-04-09T13:32:20+02:00 (5 years ago)
Author:
smueller
Message:

Simplification of subroutine tide_update (module tide_mod) by transferring variable initialisations to other subroutines (ticket #2194)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE/TDE/tide_mod.F90

    r10852 r10855  
    156156      IF( ln_read_load ) THEN 
    157157         ALLOCATE( amp_load(jpi,jpj,nb_harmo), phi_load(jpi,jpj,nb_harmo) ) 
     158         CALL tide_init_load 
     159         amp_pot(:,:,:) = amp_load(:,:,:) 
     160         phi_pot(:,:,:) = phi_load(:,:,:) 
     161      ELSE      
     162         amp_pot(:,:,:) = 0._wp 
     163         phi_pot(:,:,:) = 0._wp    
    158164      ENDIF 
    159165      ! 
     
    254260      !!---------------------------------------------------------------------- 
    255261 
     262      IF( ln_read_load ) THEN 
     263    amp_pot(:,:,:) = amp_load(:,:,:) 
     264    phi_pot(:,:,:) = phi_load(:,:,:) 
     265      ELSE      
     266         amp_pot(:,:,:) = 0._wp 
     267         phi_pot(:,:,:) = 0._wp    
     268      ENDIF 
    256269      DO jk = 1, nb_harmo 
    257270         zcons = rn_tide_gamma * tide_components(jk)%equitide * tide_harmonics(jk)%f 
     
    327340      IF( nsec_day == NINT(0.5_wp * rdt) .OR. kt == nit000 ) THEN      ! start a new day 
    328341         ! 
    329          ! 
    330          IF( ln_read_load )THEN 
    331             IF ( kt == nit000 ) CALL tide_init_load 
    332             amp_pot(:,:,:) = amp_load(:,:,:) 
    333             phi_pot(:,:,:) = phi_load(:,:,:) 
    334          ELSE  
    335             amp_pot(:,:,:) = 0._wp 
    336             phi_pot(:,:,:) = 0._wp 
    337          ENDIF 
    338          pot_astro(:,:) = 0._wp 
    339          ! 
    340342         ! If the run does not start from midnight then need to initialise tides 
    341343         ! at the start of the current day (only occurs when kt==nit000) 
Note: See TracChangeset for help on using the changeset viewer.