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 11870 for NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE – NEMO

Ignore:
Timestamp:
2019-11-07T12:27:28+01:00 (5 years ago)
Author:
andmirek
Message:

Ticket #2323: open single restart write context for all restart files

Location:
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedia.F90

    r11840 r11870  
    277277         ! Write in numriw (if iter == nitrst) 
    278278         ! ------------------  
    279          IF(lwxios) CALL iom_swap(      cwixios_context          ) 
     279         IF(lwxios) CALL iom_swap(      cwxios_context          ) 
    280280         CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop,  ldxios = lwxios ) 
    281281         CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot,  ldxios = lwxios ) 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedyn_adv_pra.F90

    r11840 r11870  
    893893         ! 
    894894         !                                                           ! ice thickness 
    895          IF(lwxios) CALL iom_swap( TRIM(cwixios_context) ) 
     895         IF(lwxios) CALL iom_swap( TRIM(cwxios_context) ) 
    896896         CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice,  ldxios = lwxios ) 
    897897         CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice,  ldxios = lwxios ) 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedyn_rhg_evp.F90

    r11840 r11870  
    870870      !!---------------------------------------------------------------------- 
    871871      ! 
     872      IF(lwxios) THEN 
     873         CALL iom_set_rstw_var_active(rsti_wfields, 'stress1_i' ) 
     874         CALL iom_set_rstw_var_active(rsti_wfields, 'stress2_i' ) 
     875         CALL iom_set_rstw_var_active(rsti_wfields, 'stress12_i') 
     876      ENDIF 
     877 
    872878      IF( TRIM(cdrw) == 'READ' ) THEN        ! Read/initialize 
    873879         !                                   ! --------------- 
    874          IF(lwxios) THEN 
    875             CALL iom_set_rstw_var_active(rsti_wfields, 'stress1_i' ) 
    876             CALL iom_set_rstw_var_active(rsti_wfields, 'stress2_i' ) 
    877             CALL iom_set_rstw_var_active(rsti_wfields, 'stress12_i') 
    878          ENDIF 
    879          ! 
    880880         IF( ln_rstart ) THEN                   !* Read the restart file 
    881881            ! 
     
    910910         iter = kt + nn_fsbc - 1             ! ice restarts are written at kt == nitrst - nn_fsbc + 1 
    911911         ! 
    912          IF(lwxios) CALL iom_swap( TRIM(cwixios_context) ) 
     912         IF(lwxios) CALL iom_swap( TRIM(cwxios_context) ) 
    913913         CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i,  ldxios = lwxios ) 
    914914         CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i,  ldxios = lwxios ) 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icerst.F90

    r11840 r11870  
    8181            ENDIF 
    8282            ! 
    83             IF(.NOT.lwxios) THEN 
     83            IF(lwxios) THEN 
     84               CALL iom_setkt( nitrst, cwxios_context ) 
     85            ELSE 
    8486               CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl ) 
    85             ELSE 
    86 #if defined key_iomput 
    87                cwixios_context = "si3_rstw_"//TRIM(ADJUSTL(clkt)) 
    88                IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
    89                   clpname = clname 
    90                ELSE 
    91                   clpname = TRIM(Agrif_CFixed())//"_"//clname 
    92                ENDIF 
    93                CALL iom_init( cwixios_context, TRIM(clpath)//TRIM(clpname), .false. ) 
    94                CALL xios_update_calendar(nitrst) 
    95                CALL iom_swap(      cxios_context          ) 
    96 #else 
    97                clinfo = 'Can not use XIOS in rst_opn' 
    98                CALL ctl_stop(TRIM(clinfo)) 
    99 #endif 
    10087            ENDIF 
    10188            lrst_ice = .TRUE. 
     
    135122      ! ------------------  
    136123      !                                                                        ! calendar control 
    137       IF(lwxios) CALL iom_swap(      cwixios_context          ) 
    138       CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ), ldxios = lwxios )      ! time-step  
     124      IF(lwxios) CALL iom_swap(      cwxios_context          ) 
     125      CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc_ice', REAL( nn_fsbc, wp ), ldxios = lwxios )      ! time-step  
    139126      CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter   , wp ), ldxios = lwxios )      ! date 
    140127      CALL iom_delay_rst( 'WRITE', 'ICE', numriw )   ! save only ice delayed global communication variables 
     
    176163      ! ------------------ 
    177164      IF( iter == nitrst ) THEN 
    178          IF(lwxios) THEN 
    179             CALL iom_context_finalize(      cwixios_context          ) 
    180          ELSE 
     165         IF(.NOT. lwxios) THEN 
    181166            CALL iom_close( numriw ) 
    182167         ENDIF 
     
    235220 
    236221         ! Time info 
    237          CALL iom_get( numrir, 'nn_fsbc', zfice, ldxios = lrxios ) 
     222         CALL iom_get( numrir, 'nn_fsbc_ice', zfice, ldxios = lrxios ) 
    238223         CALL iom_get( numrir, 'kt_ice' , ziter, ldxios = lrxios )     
    239224         IF(lwp) WRITE(numout,*) '   read ice restart file at time step    : ', ziter 
     
    246231            &                   '   control of time parameter  nrstdt' ) 
    247232         IF( NINT(zfice) /= nn_fsbc          .AND. ABS( nrstdt ) == 1 )   & 
    248             &     CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart',  & 
     233                 CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart',  & 
    249234            &                   '   verify the file or rerun with the value 0 for the',         & 
    250235            &                   '   control of time parameter  nrstdt' ) 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/iceupdate.F90

    r11840 r11870  
    448448         iter = kt + nn_fsbc - 1             ! ice restarts are written at kt == nitrst - nn_fsbc + 1 
    449449         ! 
    450          IF(lwxios) CALL iom_swap(      cwixios_context          ) 
     450         IF(lwxios) CALL iom_swap(      cwxios_context          ) 
    451451         CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass'  , snwice_mass, ldxios = lwxios   ) 
    452452         CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass_b', snwice_mass_b, ldxios = lwxios ) 
Note: See TracChangeset for help on using the changeset viewer.