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 8801 for branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90 – NEMO

Ignore:
Timestamp:
2017-11-23T16:52:17+01:00 (6 years ago)
Author:
andmirek
Message:

#1953 and #1962 merge dev_r8600_xios_read_write r8793

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90

    r8800 r8801  
    3232   USE timing          ! preformance summary 
    3333   USE wrk_nemo        ! work arrays 
    34    USE iom_def, ONLY : lxios_read 
     34   USE iom_def, ONLY : lwxios 
     35   USE iom_def, ONLY : lrxios 
    3536 
    3637   IMPLICIT NONE 
     
    256257           IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 
    257258           IF(lwp) WRITE(numout,*) '~~~~~~~' 
    258            CALL iom_get( numror, 'frc_v', frc_v, ldxios = lxios_read  ) 
    259            CALL iom_get( numror, 'frc_t', frc_t, ldxios = lxios_read ) 
    260            CALL iom_get( numror, 'frc_s', frc_s, ldxios = lxios_read ) 
     259           CALL iom_get( numror, 'frc_v', frc_v, ldxios = lrxios  ) 
     260           CALL iom_get( numror, 'frc_t', frc_t, ldxios = lrxios ) 
     261           CALL iom_get( numror, 'frc_s', frc_s, ldxios = lrxios ) 
    261262           IF( ln_linssh ) THEN 
    262               CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lxios_read ) 
    263               CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lxios_read ) 
     263              CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lrxios ) 
     264              CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios ) 
    264265           ENDIF 
    265            CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini, ldxios = lxios_read ) ! ice sheet coupling 
    266            CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:), ldxios = lxios_read ) 
    267            CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:), ldxios = lxios_read ) 
    268            CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:), ldxios = lxios_read ) 
    269            CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:), ldxios = lxios_read ) 
     266           CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini, ldxios = lrxios ) ! ice sheet coupling 
     267           CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:), ldxios = lrxios ) 
     268           CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:), ldxios = lrxios ) 
     269           CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:), ldxios = lrxios ) 
     270           CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:), ldxios = lrxios ) 
    270271           IF( ln_linssh ) THEN 
    271               CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lxios_read ) 
    272               CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lxios_read ) 
     272              CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lrxios ) 
     273              CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lrxios ) 
    273274           ENDIF 
    274275       ELSE 
     
    309310        IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 
    310311        IF(lwp) WRITE(numout,*) '~~~~~~~' 
    311  
    312         CALL iom_rstput( kt, nitrst, numrow, 'frc_v'   , frc_v     ) 
    313         CALL iom_rstput( kt, nitrst, numrow, 'frc_t'   , frc_t     ) 
    314         CALL iom_rstput( kt, nitrst, numrow, 'frc_s'   , frc_s     ) 
     312        IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     313        CALL iom_rstput( kt, nitrst, numrow, 'frc_v'   , frc_v, ldxios = lwxios) 
     314        CALL iom_rstput( kt, nitrst, numrow, 'frc_t'   , frc_t, ldxios = lwxios) 
     315        CALL iom_rstput( kt, nitrst, numrow, 'frc_s'   , frc_s, ldxios = lwxios) 
    315316        IF( ln_linssh ) THEN 
    316            CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t ) 
    317            CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s ) 
     317           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t, ldxios = lwxios) 
     318           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s, ldxios = lwxios ) 
    318319        ENDIF 
    319         CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini )      ! ice sheet coupling 
    320         CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:) ) 
    321         CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini(:,:,:) ) 
    322         CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini(:,:,:) ) 
    323         CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini(:,:,:) ) 
     320        CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini, ldxios = lwxios )      ! ice sheet coupling 
     321        CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:), ldxios = lwxios ) 
     322        CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini(:,:,:), ldxios = lwxios ) 
     323        CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini(:,:,:), ldxios = lwxios ) 
     324        CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini(:,:,:), ldxios = lwxios ) 
    324325        IF( ln_linssh ) THEN 
    325            CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:) ) 
    326            CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:) ) 
     326           CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lwxios ) 
     327           CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lwxios ) 
    327328        ENDIF 
    328329        ! 
     330        IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    329331     ENDIF 
    330332     ! 
     
    368370      IF( .NOT. ln_diahsb )   RETURN 
    369371 
     372      IF(lwxios) THEN 
     373! define variables in restart file when writing with XIOS 
     374        CALL iom_set_rstw_var_active('frc_v') 
     375        CALL iom_set_rstw_var_active('frc_t') 
     376        CALL iom_set_rstw_var_active('frc_s') 
     377        IF( ln_linssh ) THEN 
     378           CALL iom_set_rstw_var_active('frc_wn_t') 
     379           CALL iom_set_rstw_var_active('frc_wn_s') 
     380        ENDIF 
     381        CALL iom_set_rstw_var_active('surf_ini') 
     382        CALL iom_set_rstw_var_active('ssh_ini') 
     383        CALL iom_set_rstw_var_active('e3t_ini') 
     384        CALL iom_set_rstw_var_active('hc_loc_ini') 
     385        CALL iom_set_rstw_var_active('sc_loc_ini') 
     386        IF( ln_linssh ) THEN 
     387           CALL iom_set_rstw_var_active('ssh_hc_loc_ini') 
     388           CALL iom_set_rstw_var_active('ssh_sc_loc_ini') 
     389        ENDIF 
     390      ENDIF 
    370391      ! ------------------- ! 
    371392      ! 1 - Allocate memory ! 
Note: See TracChangeset for help on using the changeset viewer.