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 9729 for NEMO/trunk – NEMO

Changeset 9729 for NEMO/trunk


Ignore:
Timestamp:
2018-06-01T20:08:51+02:00 (6 years ago)
Author:
clem
Message:

debug vortex test case (update domvvl in my_src)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/tests/VORTEX/MY_SRC/domvvl.F90

    r9255 r9729  
    6464#  include "vectopt_loop_substitute.h90" 
    6565   !!---------------------------------------------------------------------- 
    66    !! NEMO/OPA 3.7 , NEMO-Consortium (2015)  
    67    !! $Id: domvvl.F90 9190 2018-01-06 14:18:23Z gm $ 
    68    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     66   !! NEMO/OCE 4.0 , NEMO Consortium (2018)  
     67   !! $Id: domvvl.F90 9598 2018-05-15 22:47:16Z nicolasmartin $ 
     68   !! Software governed by the CeCILL licence     (./LICENSE) 
    6969   !!---------------------------------------------------------------------- 
    7070CONTAINS 
     
    147147      CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' )  ! from V to UW 
    148148      CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
     149 
     150      ! We need to define e3[tuv]_a for AGRIF initialisation (should not be a problem for the restartability...) 
     151      e3t_a(:,:,:) = e3t_n(:,:,:) 
     152      e3u_a(:,:,:) = e3u_n(:,:,:) 
     153      e3v_a(:,:,:) = e3v_n(:,:,:) 
    149154      ! 
    150155      !                    !==  depth of t and w-point  ==!   (set the isf depth as it is in the initial timestep) 
     
    236241            ENDIF 
    237242         ENDIF 
     243      ENDIF 
     244      ! 
     245      IF(lwxios) THEN 
     246! define variables in restart file when writing with XIOS 
     247         CALL iom_set_rstw_var_active('e3t_b') 
     248         CALL iom_set_rstw_var_active('e3t_n') 
     249         !                                           ! ----------------------- ! 
     250         IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN  ! z_tilde and layer cases ! 
     251            !                                        ! ----------------------- ! 
     252            CALL iom_set_rstw_var_active('tilde_e3t_b') 
     253            CALL iom_set_rstw_var_active('tilde_e3t_n') 
     254         END IF 
     255         !                                           ! -------------!     
     256         IF( ln_vvl_ztilde ) THEN                    ! z_tilde case ! 
     257            !                                        ! ------------ ! 
     258            CALL iom_set_rstw_var_active('hdiv_lf') 
     259         ENDIF 
     260         ! 
    238261      ENDIF 
    239262      ! 
     
    781804         IF( ln_rstart ) THEN                   !* Read the restart file 
    782805            CALL rst_read_open                  !  open the restart file if necessary 
    783             CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn    ) 
     806            CALL iom_get( numror, jpdom_autoglo, 'sshn'   , sshn, ldxios = lrxios    ) 
    784807            ! 
    785808            id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) 
     
    792815            !                             ! --------- ! 
    793816            IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
    794                CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:) ) 
    795                CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:) ) 
     817               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios ) 
     818               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lrxios ) 
    796819               ! needed to restart if land processor not computed  
    797820               IF(lwp) write(numout,*) 'dom_vvl_rst : e3t_b and e3t_n found in restart files' 
     
    807830               IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 
    808831               IF(lwp) write(numout,*) 'neuler is forced to 0' 
    809                CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:) ) 
     832               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t_b(:,:,:), ldxios = lrxios ) 
    810833               e3t_n(:,:,:) = e3t_b(:,:,:) 
    811834               neuler = 0 
     
    814837               IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 
    815838               IF(lwp) write(numout,*) 'neuler is forced to 0' 
    816                CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:) ) 
     839               CALL iom_get( numror, jpdom_autoglo, 'e3t_n', e3t_n(:,:,:), ldxios = lrxios ) 
    817840               e3t_b(:,:,:) = e3t_n(:,:,:) 
    818841               neuler = 0 
     
    839862               !                          ! ----------------------- ! 
    840863               IF( MIN( id3, id4 ) > 0 ) THEN  ! all required arrays exist 
    841                   CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:) ) 
    842                   CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:) ) 
     864                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 
     865                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 
    843866               ELSE                            ! one at least array is missing 
    844867                  tilde_e3t_b(:,:,:) = 0.0_wp 
     
    849872                  !                       ! ------------ ! 
    850873                  IF( id5 > 0 ) THEN  ! required array exists 
    851                      CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:) ) 
     874                     CALL iom_get( numror, jpdom_autoglo, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 
    852875                  ELSE                ! array is missing 
    853876                     hdiv_lf(:,:,:) = 0.0_wp 
     
    929952         !                                   ! =================== 
    930953         IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 
     954         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
    931955         !                                           ! --------- ! 
    932956         !                                           ! all cases ! 
    933957         !                                           ! --------- ! 
    934          CALL iom_rstput( kt, nitrst, numrow, 'e3t_b', e3t_b(:,:,:) ) 
    935          CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:) ) 
     958         CALL iom_rstput( kt, nitrst, numrow, 'e3t_b', e3t_b(:,:,:), ldxios = lwxios ) 
     959         CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:), ldxios = lwxios ) 
    936960         !                                           ! ----------------------- ! 
    937961         IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN  ! z_tilde and layer cases ! 
    938962            !                                        ! ----------------------- ! 
    939             CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_b', tilde_e3t_b(:,:,:) ) 
    940             CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_n', tilde_e3t_n(:,:,:) ) 
     963            CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lwxios) 
     964            CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lwxios) 
    941965         END IF 
    942966         !                                           ! -------------!     
    943967         IF( ln_vvl_ztilde ) THEN                    ! z_tilde case ! 
    944968            !                                        ! ------------ ! 
    945             CALL iom_rstput( kt, nitrst, numrow, 'hdiv_lf', hdiv_lf(:,:,:) ) 
    946          ENDIF 
    947          ! 
     969            CALL iom_rstput( kt, nitrst, numrow, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lwxios) 
     970         ENDIF 
     971         ! 
     972         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    948973      ENDIF 
    949974      ! 
Note: See TracChangeset for help on using the changeset viewer.