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 12602 for NEMO/branches/2020/ticket2377 – NEMO

Ignore:
Timestamp:
2020-03-25T13:22:28+01:00 (4 years ago)
Author:
smueller
Message:

Addition of XIOS-based restart I/O to the restart capability of option 2 of the freshwater-budget adjustment mechanism (ticket #2377)

This changeset extends the standard restart capability added in r12591 by adding optional XIOS-based restart I/O according to the recipe provided in section 10.2.1 of the reference manual for NEMO version 4.0.1.

Location:
NEMO/branches/2020/ticket2377/src/OCE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/ticket2377/src/OCE/IOM/iom.F90

    r12489 r12602  
    547547        i = i + 1; fields(i)%vname="hbli";           fields(i)%grid="grid_N" 
    548548        i = i + 1; fields(i)%vname="wn";             fields(i)%grid="grid_N_3D" 
     549        i = i + 1; fields(i)%vname="a_fwb_b";        fields(i)%grid="grid_scalar" 
     550        i = i + 1; fields(i)%vname="a_fwb";          fields(i)%grid="grid_scalar" 
    549551 
    550552        IF( i-1 > max_rst_fields) THEN 
  • NEMO/branches/2020/ticket2377/src/OCE/IOM/iom_def.F90

    r12377 r12602  
    6767   END TYPE file_descriptor 
    6868   TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC ::   iom_file !: array containing the info for all opened files 
    69    INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 95 !: maximum number of restart variables defined in iom_set_rst_vars 
     69   INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 97 !: maximum number of restart variables defined in iom_set_rst_vars 
    7070   TYPE, PUBLIC :: RST_FIELD   
    7171    CHARACTER(len=30) :: vname = "NO_NAME" ! names of variables in restart file 
  • NEMO/branches/2020/ticket2377/src/OCE/SBC/sbcfwb.F90

    r12591 r12602  
    119119               &           .AND. iom_varid( numror, 'a_fwb',   ldstop = .FALSE. ) > 0 ) THEN 
    120120               IF(lwp) WRITE(numout,*) 'sbc_fwb : reading FW-budget adjustment from restart file' 
    121                CALL iom_get( numror, 'a_fwb_b', a_fwb_b ) 
    122                CALL iom_get( numror, 'a_fwb',   a_fwb  ) 
     121               CALL iom_get( numror, 'a_fwb_b', a_fwb_b, ldxios = lrxios ) 
     122               CALL iom_get( numror, 'a_fwb',   a_fwb,   ldxios = lrxios ) 
    123123            ELSE 
    124124               CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
     
    132132            IF(lwp)WRITE(numout,*)'          year = ',iyear-1, ' freshwater budget read       = ', a_fwb 
    133133            IF(lwp)WRITE(numout,*)'          year = ',iyear-2, ' freshwater budget read       = ', a_fwb_b 
     134            ! 
     135            IF( lwxios ) THEN                         ! Activate output of restart variables 
     136               CALL iom_set_rstw_var_active( 'a_fwb_b' ) 
     137               CALL iom_set_rstw_var_active( 'a_fwb'   ) 
     138            END IF 
    134139         ENDIF    
    135140         !                                         ! Update fwfold if new year start 
     
    155160            IF(lwp) WRITE(numout,*) 'sbc_fwb : writing FW-budget adjustment to ocean restart file at it = ', kt 
    156161            IF(lwp) WRITE(numout,*) '~~~~' 
    157             CALL iom_rstput( kt, nitrst, numrow, 'a_fwb_b', a_fwb_b ) 
    158             CALL iom_rstput( kt, nitrst, numrow, 'a_fwb',   a_fwb   ) 
     162            IF( lwxios ) CALL iom_swap( cwxios_context ) 
     163            CALL iom_rstput( kt, nitrst, numrow, 'a_fwb_b', a_fwb_b, ldxios = lwxios ) 
     164            CALL iom_rstput( kt, nitrst, numrow, 'a_fwb',   a_fwb,   ldxios = lwxios ) 
     165            IF( lwxios ) CALL iom_swap( cxios_context  ) 
    159166         END IF 
    160167         ! 
Note: See TracChangeset for help on using the changeset viewer.