Changeset 7875


Ignore:
Timestamp:
2017-04-05T16:22:33+02:00 (3 years ago)
Author:
glong
Message:

Removed changes to dynzdf.F90 as they were placeholds. Added calls (and associated required variables) to dyn_vrt_dia_3d in dynzdf_imp.F90 - still required modification. This is the next step placeholder

Location:
branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90

    r7845 r7875  
    2727   USE wrk_nemo        ! Memory Allocation 
    2828   USE timing          ! Timing 
    29    USE divcur          ! for dyn_vrt_dia_3d 
    3029 
    3130   IMPLICIT NONE 
     
    5958      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    6059      ! 
    61       INTEGER :: id_dia_vrt_zdf_int  = 1 ! TODO remove once flags set properly 
    62       INTEGER :: id_dia_vrt_zdf_mean = 1 ! TODO remove once flags set properly 
    6360      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv 
    6461      !!--------------------------------------------------------------------- 
     
    7168      ENDIF 
    7269 
    73       IF ( ( l_trddyn ) .or. ( id_dia_vrt_zdf_int == 1 ) .or. ( id_dia_vrt_zdf_mean == 1 ) ) THEN                      ! temporary save of ta and sa trends 
     70      IF( l_trddyn )  THEN                      ! temporary save of ta and sa trends 
    7471         CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv )  
    7572         ztrdu(:,:,:) = ua(:,:,:) 
     
    9188      END SELECT 
    9289 
    93       IF ( ( l_trddyn ) .or. ( id_dia_vrt_zdf_int == 1 ) .or. ( id_dia_vrt_zdf_mean == 1 ) ) THEN                      ! save the vertical diffusive trends for further diagnostics 
     90      IF( l_trddyn )  THEN                      ! save the vertical diffusive trends for further diagnostics 
    9491         ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 
    9592         ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 
    96  
    97          ! Calculate dia_vor_int & dia_vor_mn if required. 
    98          IF ( ( id_dia_vrt_zdf_int == 1 ) .or. ( id_dia_vrt_zdf_mean == 1 ) ) THEN 
    99              CALL dyn_vrt_dia_3d(ztrdu, ztrdv, id_dia_vrt_zdf_int, id_dia_vrt_zdf_mean) 
    100          END IF 
    101  
    10293         CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt ) 
    10394         CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv )  
  • branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90

    r6795 r7875  
    2626   USE timing          ! Timing 
    2727   USE dynadv          ! dynamics: vector invariant versus flux form 
     28   USE divcur          ! for dyn_vrt_dia_3d 
    2829   USE dynspg_oce, ONLY: lk_dynspg_ts 
    2930 
     
    6869      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    6970      INTEGER  ::   ikbu, ikbv   ! local integers 
     71      INTEGER  ::   id_dia_vrt_zdf_int  = 1 ! TODO remove once flags set properly 
     72      INTEGER  ::   id_dia_vrt_zdf_mean = 1 ! TODO remove once flags set properly 
    7073      REAL(wp) ::   z1_p2dt, zcoef, zzwi, zzws, zrhs   ! local scalars 
    7174      REAL(wp) ::   ze3ua, ze3va 
    7275      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zwi, zwd, zws 
     76      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zua, zva 
    7377      !!---------------------------------------------------------------------- 
    7478      ! 
     
    7680      ! 
    7781      CALL wrk_alloc( jpi,jpj,jpk, zwi, zwd, zws )  
     82      CALL wrk_alloc( jpi,jpj,jpk, zua, zva      )  
    7883      ! 
    7984      IF( kt == nit000 ) THEN 
     
    268273#endif 
    269274 
     275      ! TODO merge with above if possible 
     276      ! Calculate the values in preparation to calculate dia_vor_int & dia_vor_mn if required 
     277      IF ( ( id_dia_vrt_zdf_int == 1 ) .or. ( id_dia_vrt_zdf_mean == 1 ) ) THEN 
     278          DO jk = 1, jpkm1 
     279             DO jj = 2, jpjm1    
     280                DO ji = fs_2, fs_jpim1   ! vector opt. 
     281                   zua(ji,jj,jk) = ( ua(ji,jj,jk) - ub(ji,jj,jk) ) * z1_p2dt 
     282                END DO 
     283             END DO 
     284          END DO 
     285      END IF 
     286 
     287 
    270288      ! 3. Vertical diffusion on v 
    271289      ! --------------------------- 
     
    367385      END DO 
    368386#endif 
     387 
     388      ! TODO merge with above if possible 
     389      ! Calculate dia_vor_int & dia_vor_mn if required 
     390      IF ( ( id_dia_vrt_zdf_int == 1 ) .or. ( id_dia_vrt_zdf_mean == 1 ) ) THEN 
     391          DO jk = 1, jpkm1 
     392             DO jj = 2, jpjm1    
     393                DO ji = fs_2, fs_jpim1   ! vector opt. 
     394                   zva(ji,jj,jk) = ( va(ji,jj,jk) - vb(ji,jj,jk) ) * z1_p2dt 
     395                END DO 
     396             END DO 
     397          END DO 
     398 
     399          CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_zdf_int, id_dia_vrt_zdf_mean) 
     400      END IF 
    369401 
    370402      ! J. Chanut: Lines below are useless ? 
     
    392424      ! 
    393425      CALL wrk_dealloc( jpi,jpj,jpk, zwi, zwd, zws)  
     426      CALL wrk_dealloc( jpi,jpj,jpk, zua, zva     )  
    394427      ! 
    395428      IF( nn_timing == 1 )  CALL timing_stop('dyn_zdf_imp') 
Note: See TracChangeset for help on using the changeset viewer.