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

Ignore:
Timestamp:
2017-12-12T11:41:19+01:00 (6 years ago)
Author:
timgraham
Message:

Merge in XIOS read/write branch again

File:
1 edited

Legend:

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

    r8924 r8987  
    255255           IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 
    256256           IF(lwp) WRITE(numout,*) '~~~~~~~' 
    257            CALL iom_get( numror, 'frc_v', frc_v ) 
    258            CALL iom_get( numror, 'frc_t', frc_t ) 
    259            CALL iom_get( numror, 'frc_s', frc_s ) 
     257           CALL iom_get( numror, 'frc_v', frc_v, ldxios = lrxios  ) 
     258           CALL iom_get( numror, 'frc_t', frc_t, ldxios = lrxios ) 
     259           CALL iom_get( numror, 'frc_s', frc_s, ldxios = lrxios ) 
     260           CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini, ldxios = lrxios ) ! ice sheet coupling 
     261           CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:), ldxios = lrxios ) 
     262           CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:), ldxios = lrxios ) 
     263           CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:), ldxios = lrxios ) 
     264           CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:), ldxios = lrxios ) 
    260265           IF( ln_linssh ) THEN 
    261               CALL iom_get( numror, 'frc_wn_t', frc_wn_t ) 
    262               CALL iom_get( numror, 'frc_wn_s', frc_wn_s ) 
    263            ENDIF 
    264            CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini ) ! ice sheet coupling 
    265            CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:) ) 
    266            CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:) ) 
    267            CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:) ) 
    268            CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:) ) 
    269            IF( ln_linssh ) THEN 
    270               CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:) ) 
    271               CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:) ) 
     266              CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lrxios ) 
     267              CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lrxios ) 
     268              CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lrxios ) 
     269              CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios ) 
    272270           ENDIF 
    273271       ELSE 
     
    308306        IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 
    309307        IF(lwp) WRITE(numout,*) '~~~~~~~' 
    310  
    311         CALL iom_rstput( kt, nitrst, numrow, 'frc_v'   , frc_v     ) 
    312         CALL iom_rstput( kt, nitrst, numrow, 'frc_t'   , frc_t     ) 
    313         CALL iom_rstput( kt, nitrst, numrow, 'frc_s'   , frc_s     ) 
     308        IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     309        CALL iom_rstput( kt, nitrst, numrow, 'frc_v'   , frc_v, ldxios = lwxios) 
     310        CALL iom_rstput( kt, nitrst, numrow, 'frc_t'   , frc_t, ldxios = lwxios) 
     311        CALL iom_rstput( kt, nitrst, numrow, 'frc_s'   , frc_s, ldxios = lwxios) 
     312        CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini, ldxios = lwxios )      ! ice sheet coupling 
     313        CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:), ldxios = lwxios ) 
     314        CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini(:,:,:), ldxios = lwxios ) 
     315        CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini(:,:,:), ldxios = lwxios ) 
     316        CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini(:,:,:), ldxios = lwxios ) 
    314317        IF( ln_linssh ) THEN 
    315            CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t ) 
    316            CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s ) 
    317         ENDIF 
    318         CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini )      ! ice sheet coupling 
    319         CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:) ) 
    320         CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini(:,:,:) ) 
    321         CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini(:,:,:) ) 
    322         CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini(:,:,:) ) 
    323         IF( ln_linssh ) THEN 
    324            CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:) ) 
    325            CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:) ) 
     318           CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lwxios ) 
     319           CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lwxios ) 
     320           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t, ldxios = lwxios) 
     321           CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s, ldxios = lwxios ) 
    326322        ENDIF 
    327323        ! 
     324        IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    328325     ENDIF 
    329326     ! 
     
    367364      IF( .NOT. ln_diahsb )   RETURN 
    368365 
     366      IF(lwxios) THEN 
     367! define variables in restart file when writing with XIOS 
     368        CALL iom_set_rstw_var_active('frc_v') 
     369        CALL iom_set_rstw_var_active('frc_t') 
     370        CALL iom_set_rstw_var_active('frc_s') 
     371        CALL iom_set_rstw_var_active('surf_ini') 
     372        CALL iom_set_rstw_var_active('ssh_ini') 
     373        CALL iom_set_rstw_var_active('e3t_ini') 
     374        CALL iom_set_rstw_var_active('hc_loc_ini') 
     375        CALL iom_set_rstw_var_active('sc_loc_ini') 
     376        IF( ln_linssh ) THEN 
     377           CALL iom_set_rstw_var_active('ssh_hc_loc_ini') 
     378           CALL iom_set_rstw_var_active('ssh_sc_loc_ini') 
     379           CALL iom_set_rstw_var_active('frc_wn_t') 
     380           CALL iom_set_rstw_var_active('frc_wn_s') 
     381        ENDIF 
     382      ENDIF 
    369383      ! ------------------- ! 
    370384      ! 1 - Allocate memory ! 
Note: See TracChangeset for help on using the changeset viewer.