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 12950 for NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF – NEMO

Ignore:
Timestamp:
2020-05-19T12:53:16+02:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2462: new XIOS restart read/write interfaces

Location:
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdfgls.F90

    r12489 r12950  
    10251025      CALL gls_rst( nit000, 'READ' )      ! (en, avt_k, avm_k, hmxl_n) 
    10261026      ! 
    1027       IF( lwxios ) THEN 
    1028          CALL iom_set_rstw_var_active('en') 
    1029          CALL iom_set_rstw_var_active('avt_k') 
    1030          CALL iom_set_rstw_var_active('avm_k') 
    1031          CALL iom_set_rstw_var_active('hmxl_n') 
    1032       ENDIF 
    1033       ! 
    10341027   END SUBROUTINE zdf_gls_init 
    10351028 
     
    10591052         !                                   ! --------------- 
    10601053         IF( ln_rstart ) THEN                   !* Read the restart file 
     1054            IF( lrxios ) CALL iom_swap( TRIM(crxios_context) ) 
    10611055            id1 = iom_varid( numror, 'en'    , ldstop = .FALSE. ) 
    10621056            id2 = iom_varid( numror, 'avt_k' , ldstop = .FALSE. ) 
     
    10761070               ! avt_k, avm_k already set to the background value in zdf_phy_init 
    10771071            ENDIF 
     1072            IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 
    10781073         ELSE                                   !* Start from rest 
    10791074            IF(lwp) WRITE(numout,*) 
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdfosm.F90

    r12489 r12950  
    14241424     ghamv(:,:,:) = 0. 
    14251425     ! 
    1426      IF( lwxios ) THEN 
    1427         CALL iom_set_rstw_var_active('wn') 
    1428         CALL iom_set_rstw_var_active('hbl') 
    1429         CALL iom_set_rstw_var_active('hbli') 
    1430      ENDIF 
    14311426   END SUBROUTINE zdf_osm_init 
    14321427 
     
    14591454     !!----------------------------------------------------------------------------- 
    14601455     IF( TRIM(cdrw) == 'READ'.AND. ln_rstart) THEN 
     1456        IF( lrxios ) CALL iom_swap( TRIM(crxios_context) ) 
    14611457        id1 = iom_varid( numror, 'wn'   , ldstop = .FALSE. ) 
    14621458        IF( id1 > 0 ) THEN                       ! 'wn' exists; read 
     
    14731469           CALL iom_get( numror, jpdom_autoglo, 'hbli', hbli, ldxios = lrxios  ) 
    14741470           WRITE(numout,*) ' ===>>>> :  hbl & hbli read from restart file' 
     1471           IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 
    14751472           RETURN 
    14761473        ELSE                      ! 'hbl' & 'hbli' not in restart file, recalculate 
    14771474           WRITE(numout,*) ' ===>>>> : previous run without osmosis scheme, hbl computed from stratification' 
    14781475        END IF 
     1476        IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 
    14791477     END IF 
    14801478 
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdfric.F90

    r12489 r12950  
    103103      CALL ric_rst( nit000, 'READ' )  !* read or initialize all required files 
    104104      ! 
    105       IF( lwxios ) THEN 
    106          CALL iom_set_rstw_var_active('avt_k') 
    107          CALL iom_set_rstw_var_active('avm_k') 
    108       ENDIF 
    109105   END SUBROUTINE zdf_ric_init 
    110106 
     
    210206         !           !* Read the restart file 
    211207         IF( ln_rstart ) THEN 
     208            IF( lrxios ) CALL iom_swap( TRIM(crxios_context) ) 
    212209            id1 = iom_varid( numror, 'avt_k', ldstop = .FALSE. ) 
    213210            id2 = iom_varid( numror, 'avm_k', ldstop = .FALSE. ) 
     
    217214               CALL iom_get( numror, jpdom_autoglo, 'avm_k', avm_k, ldxios = lrxios ) 
    218215            ENDIF 
     216            IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 
    219217         ENDIF 
    220218         !           !* otherwise Kz already set to the background value in zdf_phy_init 
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdftke.F90

    r12702 r12950  
    634634      CALL tke_rst( nit000, 'READ' )      ! (en, avt_k, avm_k, dissl)  
    635635      ! 
    636       IF( lwxios ) THEN 
    637          CALL iom_set_rstw_var_active('en') 
    638          CALL iom_set_rstw_var_active('avt_k') 
    639          CALL iom_set_rstw_var_active('avm_k') 
    640          CALL iom_set_rstw_var_active('dissl') 
    641       ENDIF 
    642636   END SUBROUTINE zdf_tke_init 
    643637 
     
    665659         !                                   ! --------------- 
    666660         IF( ln_rstart ) THEN                   !* Read the restart file 
     661            IF( lrxios ) CALL iom_swap( TRIM(crxios_context) ) 
    667662            id1 = iom_varid( numror, 'en'   , ldstop = .FALSE. ) 
    668663            id2 = iom_varid( numror, 'avt_k', ldstop = .FALSE. ) 
     
    682677               ! avt_k, avm_k already set to the background value in zdf_phy_init 
    683678            ENDIF 
     679            IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 
    684680         ELSE                                   !* Start from rest 
    685681            IF(lwp) WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.