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 11384 for branches/UKMO/dev_r5518_STOPACK/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90 – NEMO

Ignore:
Timestamp:
2019-07-31T18:05:50+02:00 (5 years ago)
Author:
mattmartin
Message:

Included Andrea Storto's STOPACK code into NEMO3.6 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_STOPACK/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90

    r5120 r11384  
    3232   USE wrk_nemo        ! Memory allocation 
    3333   USE timing          ! Timing 
     34   USE stopack 
    3435 
    3536   IMPLICIT NONE 
     
    4344   REAL, SAVE, ALLOCATABLE, DIMENSION(:,:,:) ::   t0_ldf, s0_ldf   !: lateral diffusion trends of T & S for a cst profile 
    4445   !                                                               !  (key_traldf_ano only) 
     46#if defined key_traldf_c3d 
     47   REAL, SAVE, ALLOCATABLE, DIMENSION(:,:,:) :: ahtu0,ahtv0,ahtw0,ahtt0 
     48#endif 
     49#if defined key_traldf_c2d 
     50   REAL, SAVE, ALLOCATABLE, DIMENSION(:,:  ) :: ahtu0,ahtv0,ahtw0,ahtt0 
     51#endif 
    4552 
    4653   !! * Substitutions 
     
    6875      ! 
    6976      rldf = 1     ! For active tracers the  
     77      r_fact_lap(:,:,:) = 1.0 
    7078 
    7179      IF( l_trdtra )   THEN                    !* Save ta and sa trends 
     
    7482         ztrds(:,:,:) = tsa(:,:,:,jp_sal) 
    7583      ENDIF 
     84 
     85#if defined key_traldf_c3d 
     86         IF( kt .eq. nit000 .and. (nn_spp_ahtu+nn_spp_ahtv+nn_spp_ahtw+nn_spp_ahtt) .gt. 0 ) THEN 
     87             ALLOCATE ( ahtu0(jpi,jpj,jpk), ahtv0(jpi,jpj,jpk) ) 
     88             ALLOCATE ( ahtt0(jpi,jpj,jpk), ahtw0(jpi,jpj,jpk) ) 
     89             ahtu0 = ahtu 
     90             ahtv0 = ahtv 
     91             ahtw0 = ahtw 
     92             ahtt0 = ahtt 
     93         ENDIF 
     94#endif 
     95#if defined key_traldf_c2d 
     96         IF( kt .eq. nit000 .and. (nn_spp_ahtu+nn_spp_ahtv+nn_spp_ahtw+nn_spp_ahtt) .gt. 0 ) THEN 
     97             ALLOCATE ( ahtu0(jpi,jpj), ahtv0(jpi,jpj) ) 
     98             ALLOCATE ( ahtt0(jpi,jpj), ahtw0(jpi,jpj) ) 
     99             ahtu0 = ahtu 
     100             ahtv0 = ahtv 
     101             ahtw0 = ahtw 
     102             ahtt0 = ahtt 
     103         ENDIF 
     104#endif 
     105#if defined key_traldf_c3d || defined key_traldf_c2d 
     106         IF( nn_spp_ahtu .GT. 0) THEN 
     107             ahtu = ahtu0 
     108             CALL spp_aht(kt,ahtu,nn_spp_ahtu,rn_ahtu_sd,jk_spp_ahtu) 
     109         ENDIF 
     110         IF( nn_spp_ahtv .GT. 0) THEN 
     111             ahtv = ahtv0 
     112             CALL spp_aht(kt,ahtv,nn_spp_ahtv,rn_ahtv_sd,jk_spp_ahtv) 
     113         ENDIF 
     114         IF( nn_spp_ahtw .GT. 0) THEN 
     115             ahtw = ahtw0 
     116             CALL spp_aht(kt,ahtw,nn_spp_ahtw,rn_ahtw_sd,jk_spp_ahtw) 
     117         ENDIF 
     118         IF( nn_spp_ahtt .GT. 0) THEN 
     119             ahtt = ahtt0 
     120             CALL spp_aht(kt,ahtt,nn_spp_ahtt,rn_ahtt_sd,jk_spp_ahtt) 
     121         ENDIF 
     122#endif 
    76123 
    77124      SELECT CASE ( nldf )                       ! compute lateral mixing trend and add it to the general trend 
     
    214261      IF( ierr == 1 )   CALL ctl_stop( ' iso-level in z-coordinate - partial step, not allowed' ) 
    215262      IF( ierr == 2 )   CALL ctl_stop( ' isoneutral bilaplacian operator does not exist' ) 
     263      IF( ln_traldf_hor .AND. ln_traldf_grif )    & 
     264            &   CALL ctl_stop( ' horizontal operator and Griffies triads not available; sitch to isoneutral operator' ) 
     265      IF( ln_traldf_grif .AND. ln_isfcav         )   & 
     266           CALL ctl_stop( ' ice shelf and traldf_grif not tested') 
    216267      IF( lk_traldf_eiv .AND. .NOT.ln_traldf_iso )   & 
    217268           CALL ctl_stop( '          eddy induced velocity on tracers',   & 
Note: See TracChangeset for help on using the changeset viewer.