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 9367 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/DIA – NEMO

Ignore:
Timestamp:
2018-02-28T17:23:20+01:00 (6 years ago)
Author:
mathiot
Message:

Add restart read/write via XIOS capability (#1953 and #1962 and twiki: 2017WP/Met_Office-1_Mirek_XIOSread). WARNING: need to upgrade XIOS to r1296 to compile

File:
1 edited

Legend:

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

    r9227 r9367  
    260260            IF(lwp) WRITE(numout,*) '   dia_hsb_rst : read hsb restart at it= ', kt,' date= ', ndastp 
    261261            IF(lwp) WRITE(numout,*) 
    262             CALL iom_get( numror, 'frc_v', frc_v ) 
    263             CALL iom_get( numror, 'frc_t', frc_t ) 
    264             CALL iom_get( numror, 'frc_s', frc_s ) 
     262            CALL iom_get( numror, 'frc_v', frc_v, ldxios = lrxios ) 
     263            CALL iom_get( numror, 'frc_t', frc_t, ldxios = lrxios ) 
     264            CALL iom_get( numror, 'frc_s', frc_s, ldxios = lrxios ) 
    265265            IF( ln_linssh ) THEN 
    266                CALL iom_get( numror, 'frc_wn_t', frc_wn_t ) 
    267                CALL iom_get( numror, 'frc_wn_s', frc_wn_s ) 
     266               CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lrxios ) 
     267               CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios ) 
    268268            ENDIF 
    269             CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini ) ! ice sheet coupling 
    270             CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:) ) 
    271             CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini(:,:,:) ) 
    272             CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini(:,:,:) ) 
    273             CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini(:,:,:) ) 
     269            CALL iom_get( numror, jpdom_autoglo, 'surf_ini'  , surf_ini  , ldxios = lrxios ) ! ice sheet coupling 
     270            CALL iom_get( numror, jpdom_autoglo, 'ssh_ini'   , ssh_ini   , ldxios = lrxios ) 
     271            CALL iom_get( numror, jpdom_autoglo, 'e3t_ini'   , e3t_ini   , ldxios = lrxios ) 
     272            CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini, ldxios = lrxios ) 
     273            CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini, ldxios = lrxios ) 
    274274            IF( ln_linssh ) THEN 
    275                CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:) ) 
    276                CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:) ) 
     275               CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini, ldxios = lrxios ) 
     276               CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini, ldxios = lrxios ) 
    277277            ENDIF 
    278           ELSE 
     278         ELSE 
    279279            IF(lwp) WRITE(numout,*) 
    280280            IF(lwp) WRITE(numout,*) '   dia_hsb_rst : initialise hsb at initial state ' 
     
    314314         IF(lwp) WRITE(numout,*) 
    315315         ! 
    316          CALL iom_rstput( kt, nitrst, numrow, 'frc_v'   , frc_v     ) 
    317          CALL iom_rstput( kt, nitrst, numrow, 'frc_t'   , frc_t     ) 
    318          CALL iom_rstput( kt, nitrst, numrow, 'frc_s'   , frc_s     ) 
     316         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     317         CALL iom_rstput( kt, nitrst, numrow, 'frc_v', frc_v, ldxios = lwxios ) 
     318         CALL iom_rstput( kt, nitrst, numrow, 'frc_t', frc_t, ldxios = lwxios ) 
     319         CALL iom_rstput( kt, nitrst, numrow, 'frc_s', frc_s, ldxios = lwxios ) 
    319320         IF( ln_linssh ) THEN 
    320             CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t ) 
    321             CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s ) 
     321            CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t, ldxios = lwxios ) 
     322            CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s, ldxios = lwxios ) 
    322323         ENDIF 
    323          CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini )      ! ice sheet coupling 
    324          CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:) ) 
    325          CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini(:,:,:) ) 
    326          CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini(:,:,:) ) 
    327          CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini(:,:,:) ) 
     324         CALL iom_rstput( kt, nitrst, numrow, 'surf_ini'  , surf_ini  , ldxios = lwxios )      ! ice sheet coupling 
     325         CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini'   , ssh_ini   , ldxios = lwxios ) 
     326         CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini'   , e3t_ini   , ldxios = lwxios ) 
     327         CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini, ldxios = lwxios ) 
     328         CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini, ldxios = lwxios ) 
    328329         IF( ln_linssh ) THEN 
    329             CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:) ) 
    330             CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:) ) 
     330            CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini, ldxios = lwxios ) 
     331            CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini, ldxios = lwxios ) 
    331332         ENDIF 
     333         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    332334         ! 
    333335      ENDIF 
     
    373375      IF( .NOT. ln_diahsb )   RETURN 
    374376 
     377      IF(lwxios) THEN 
     378! define variables in restart file when writing with XIOS 
     379        CALL iom_set_rstw_var_active('frc_v') 
     380        CALL iom_set_rstw_var_active('frc_t') 
     381        CALL iom_set_rstw_var_active('frc_s') 
     382        CALL iom_set_rstw_var_active('surf_ini') 
     383        CALL iom_set_rstw_var_active('ssh_ini') 
     384        CALL iom_set_rstw_var_active('e3t_ini') 
     385        CALL iom_set_rstw_var_active('hc_loc_ini') 
     386        CALL iom_set_rstw_var_active('sc_loc_ini') 
     387        IF( ln_linssh ) THEN 
     388           CALL iom_set_rstw_var_active('ssh_hc_loc_ini') 
     389           CALL iom_set_rstw_var_active('ssh_sc_loc_ini') 
     390           CALL iom_set_rstw_var_active('frc_wn_t') 
     391           CALL iom_set_rstw_var_active('frc_wn_s') 
     392        ENDIF 
     393      ENDIF 
    375394      ! ------------------- ! 
    376395      ! 1 - Allocate memory ! 
Note: See TracChangeset for help on using the changeset viewer.