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 7845 for branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90 – NEMO

Ignore:
Timestamp:
2017-03-30T11:39:38+02:00 (7 years ago)
Author:
glong
Message:

Split dyn_vrt_diag in divcur.F90 into two parts - and changed calls in dynhpg.F90, dynkeg.F90, dynldf_bilap.F90, dynvor.F90, dynzad.F90. Added calls to dyn_vrt_diag in dynspg_ts.F90. Also added call in dynzdf.F90 but this is more of a place holder as it is not currently correct.

File:
1 edited

Legend:

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

    r7649 r7845  
    3535   USE wrk_nemo        ! Memory Allocation 
    3636   USE timing          ! Timing 
    37    USE iom             ! I/O Manager for dyn_vrt_dia 
     37   USE iom             ! I/O Manager for dyn_vrt_dia_2d 
    3838 
    3939   IMPLICIT NONE 
    4040   PRIVATE 
    4141 
    42    PUBLIC   div_cur     ! routine called by step.F90 and istate.F90 
    43    PUBLIC   dyn_vrt_dia ! routine called by various modules 
     42   PUBLIC   div_cur        ! routine called by step.F90 and istate.F90 
     43   PUBLIC   dyn_vrt_dia_3d ! routine called by various modules 
     44   PUBLIC   dyn_vrt_dia_2d ! routine called by various modules 
    4445 
    4546   !! * Substitutions 
     
    342343 
    343344 
    344    SUBROUTINE dyn_vrt_dia( utend, vtend, id_dia_vor_int, id_dia_vor_mn) 
    345  
    346       !!---------------------------------------------------------------------- 
    347       !! 
    348       !! ** Purpose :  compute the integral and mean vorticity tendencies. 
     345   SUBROUTINE dyn_vrt_dia_3d( utend, vtend, id_dia_vor_int, id_dia_vor_mn) 
     346 
     347      !!---------------------------------------------------------------------- 
     348      !! 
     349      !! ** Purpose :  compute the vertical integrals of utend and vtend, and 
     350      !!               then pass to dyn_vrt_dia_2d to calculate vorticity 
     351      !!               tendencies. 
    349352      !! 
    350353      !! ** Action : a) Calculate the vertical integrals of utend & of vtend 
    351354      !!                (u_int & v_int) 
    352       !!             b) Calculate the vorticity tendencies for the vertical 
    353       !!                integrals. 
    354       !!             c) Calculate the vertical means, u_mn, v_mn from u_int 
    355       !!                and v_int by dividing by the depth 
    356       !!             d) Calculate the vorticity tendencies for the vertical 
    357       !!                means 
    358       !!             e) Call iom_put for the vertical integral vorticity 
    359       !!                tendencies (using id_dia_vor_int) 
    360       !!             f) Call iom_put for the vertical mean vorticity 
    361       !!                tendencies (using id_dia_vor_mn) 
     355      !!             b) Call dyn_vrt_dia_2d with vertical integrals 
    362356      !! 
    363357      !!---------------------------------------------------------------------- 
     
    370364      ! 
    371365      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    372       INTEGER  ::   ikbu, ikbv   ! dummy loop indices 
    373366      ! 
    374367      REAL(wp), POINTER, DIMENSION(:,:) :: u_int   ! u vertical integral 
    375368      REAL(wp), POINTER, DIMENSION(:,:) :: v_int   ! v vertical integral 
    376       REAL(wp), POINTER, DIMENSION(:,:) :: u_mn    ! u vertical means 
    377       REAL(wp), POINTER, DIMENSION(:,:) :: v_mn    ! u vertical means 
    378       REAL(wp), POINTER, DIMENSION(:,:) :: vor_int ! vort trend of vert integrals 
    379       REAL(wp), POINTER, DIMENSION(:,:) :: vor_mn  ! vort trend of vert means 
    380369 
    381370      CALL wrk_alloc(jpi, jpj, u_int) 
    382371      CALL wrk_alloc(jpi, jpj, v_int) 
    383       CALL wrk_alloc(jpi, jpj, u_mn) 
    384       CALL wrk_alloc(jpi, jpj, v_mn) 
    385       CALL wrk_alloc(jpi, jpj, vor_int) 
    386       CALL wrk_alloc(jpi, jpj, vor_mn) 
    387372 
    388373      u_int(:,:) = 0.0_wp 
     
    402387      END DO 
    403388 
     389      CALL lbc_lnk( u_int, 'U', 1. ) 
     390      CALL lbc_lnk( v_int, 'V', 1. ) 
     391 
     392      CALL dyn_vrt_dia_2d(u_int, v_int, id_dia_vor_int, id_dia_vor_mn) 
     393 
     394      CALL wrk_dealloc(jpi, jpj, u_int) 
     395      CALL wrk_dealloc(jpi, jpj, v_int) 
     396 
     397   END SUBROUTINE dyn_vrt_dia_3d 
     398 
     399 
     400   SUBROUTINE dyn_vrt_dia_2d( u_int, v_int, id_dia_vor_int, id_dia_vor_mn) 
     401 
     402      !!---------------------------------------------------------------------- 
     403      !! 
     404      !! ** Purpose :  compute the integral and mean vorticity tendencies. 
     405      !! 
     406      !! ** Action : a) Calculate the vorticity tendencies for the vertical 
     407      !!                integrals. 
     408      !!             b) Calculate the vertical means, u_mn, v_mn from u_int 
     409      !!                and v_int by dividing by the depth 
     410      !!             c) Calculate the vorticity tendencies for the vertical 
     411      !!                means 
     412      !!             d) Call iom_put for the vertical integral vorticity 
     413      !!                tendencies (using id_dia_vor_int) 
     414      !!             e) Call iom_put for the vertical mean vorticity 
     415      !!                tendencies (using id_dia_vor_mn) 
     416      !! 
     417      !!---------------------------------------------------------------------- 
     418      REAL :: u_int(jpi,jpj)     ! u vertical integral 
     419      REAL :: v_int(jpi,jpj)     ! v vertical integral 
     420      INTEGER :: id_dia_vor_int  ! identifier for the vertical integral vorticity diagnostic 
     421      INTEGER :: id_dia_vor_mn   ! identifier for the vertical mean vorticity diagnostic 
     422      ! 
     423      !!---------------------------------------------------------------------- 
     424      ! 
     425      INTEGER  ::   ji, jj       ! dummy loop indices 
     426      INTEGER  ::   ikbu, ikbv   ! dummy loop indices 
     427      ! 
     428      REAL(wp), POINTER, DIMENSION(:,:) :: u_mn    ! u vertical means 
     429      REAL(wp), POINTER, DIMENSION(:,:) :: v_mn    ! u vertical means 
     430      REAL(wp), POINTER, DIMENSION(:,:) :: vor_int ! vort trend of vert integrals 
     431      REAL(wp), POINTER, DIMENSION(:,:) :: vor_mn  ! vort trend of vert means 
     432 
     433      CALL wrk_alloc(jpi, jpj, u_mn) 
     434      CALL wrk_alloc(jpi, jpj, v_mn) 
     435      CALL wrk_alloc(jpi, jpj, vor_int) 
     436      CALL wrk_alloc(jpi, jpj, vor_mn) 
     437 
    404438      ! 
    405439      ! Calculate the vorticity tendencies for the vertical integrals. 
     
    469503      ENDIF 
    470504 
    471       CALL wrk_dealloc(jpi, jpj, u_int) 
    472       CALL wrk_dealloc(jpi, jpj, v_int) 
    473505      CALL wrk_dealloc(jpi, jpj, u_mn) 
    474506      CALL wrk_dealloc(jpi, jpj, v_mn) 
     
    476508      CALL wrk_dealloc(jpi, jpj, vor_mn) 
    477509 
    478    END SUBROUTINE dyn_vrt_dia 
     510   END SUBROUTINE dyn_vrt_dia_2d 
    479511 
    480512 
Note: See TracChangeset for help on using the changeset viewer.