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/SBC/sbcmod.F90 – 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/SBC/sbcmod.F90

    r9190 r9367  
    5757   USE lib_mpp        ! MPP library 
    5858   USE timing         ! Timing 
    59  
    6059   USE diurnal_bulk, ONLY:   ln_diurnal_only   ! diurnal SST diagnostic 
    6160 
     
    339338      IF( ln_wave     )   CALL sbc_wave_init           ! surface wave initialisation 
    340339      ! 
     340      IF( lwxios ) THEN 
     341         CALL iom_set_rstw_var_active('utau_b') 
     342         CALL iom_set_rstw_var_active('vtau_b') 
     343         CALL iom_set_rstw_var_active('qns_b') 
     344         ! The 3D heat content due to qsr forcing is treated in traqsr 
     345         ! CALL iom_set_rstw_var_active('qsr_b') 
     346         CALL iom_set_rstw_var_active('emp_b') 
     347         CALL iom_set_rstw_var_active('sfx_b') 
     348      ENDIF 
     349 
    341350   END SUBROUTINE sbc_init 
    342351 
     
    446455            & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN 
    447456            IF(lwp) WRITE(numout,*) '          nit000-1 surface forcing fields red in the restart file' 
    448             CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b )   ! before i-stress  (U-point) 
    449             CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b )   ! before j-stress  (V-point) 
    450             CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b  )   ! before non solar heat flux (T-point) 
     457            CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b, ldxios = lrxios )   ! before i-stress  (U-point) 
     458            CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b, ldxios = lrxios )   ! before j-stress  (V-point) 
     459            CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b, ldxios = lrxios  )   ! before non solar heat flux (T-point) 
    451460            ! The 3D heat content due to qsr forcing is treated in traqsr 
    452             ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b  ) ! before     solar heat flux (T-point) 
    453             CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b  )    ! before     freshwater flux (T-point) 
     461            ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b, ldxios = lrxios  ) ! before     solar heat flux (T-point) 
     462            CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b, ldxios = lrxios  )    ! before     freshwater flux (T-point) 
    454463            ! To ensure restart capability with 3.3x/3.4 restart files    !! to be removed in v3.6 
    455464            IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN 
    456                CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b )  ! before salt flux (T-point) 
     465               CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b, ldxios = lrxios )  ! before salt flux (T-point) 
    457466            ELSE 
    458467               sfx_b (:,:) = sfx(:,:) 
     
    474483            &                    'at it= ', kt,' date= ', ndastp 
    475484         IF(lwp) WRITE(numout,*) '~~~~' 
    476          CALL iom_rstput( kt, nitrst, numrow, 'utau_b' , utau ) 
    477          CALL iom_rstput( kt, nitrst, numrow, 'vtau_b' , vtau ) 
    478          CALL iom_rstput( kt, nitrst, numrow, 'qns_b'  , qns  ) 
     485         IF( lwxios ) CALL iom_swap(      cwxios_context          ) 
     486         CALL iom_rstput( kt, nitrst, numrow, 'utau_b' , utau, ldxios = lwxios ) 
     487         CALL iom_rstput( kt, nitrst, numrow, 'vtau_b' , vtau, ldxios = lwxios ) 
     488         CALL iom_rstput( kt, nitrst, numrow, 'qns_b'  , qns, ldxios = lwxios  ) 
    479489         ! The 3D heat content due to qsr forcing is treated in traqsr 
    480490         ! CALL iom_rstput( kt, nitrst, numrow, 'qsr_b'  , qsr  ) 
    481          CALL iom_rstput( kt, nitrst, numrow, 'emp_b'  , emp  ) 
    482          CALL iom_rstput( kt, nitrst, numrow, 'sfx_b'  , sfx  ) 
     491         CALL iom_rstput( kt, nitrst, numrow, 'emp_b'  , emp, ldxios = lwxios  ) 
     492         CALL iom_rstput( kt, nitrst, numrow, 'sfx_b'  , sfx, ldxios = lwxios  ) 
     493         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    483494      ENDIF 
    484495      !                                                ! ---------------------------------------- ! 
Note: See TracChangeset for help on using the changeset viewer.