Changeset 12914


Ignore:
Timestamp:
2020-05-12T15:59:32+02:00 (7 months ago)
Author:
andmirek
Message:

Ticket #2462: merge changes from ticket #2386 to fix XIOS write-read restart

Location:
NEMO/branches/2020/dev_12905_xios_restart/src/OCE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/DOM/domain.F90

    r12489 r12914  
    115115         WRITE(numout,*)     '         cn_cfg = ', TRIM( cn_cfg ), '   nn_cfg = ', nn_cfg 
    116116      ENDIF 
    117       lwxios = .FALSE. 
     117      nn_wxios = 0 
    118118      ln_xios_read = .FALSE. 
    119119      ! 
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/in_out_manager.F90

    r12377 r12914  
    178178   LOGICAL       ::   lsp_area = .TRUE.     !: to make a control print over a specific area 
    179179   CHARACTER(lc) ::   cxios_context         !: context name used in xios 
    180    CHARACTER(lc) ::   crxios_context         !: context name used in xios to read restart 
     180   CHARACTER(lc) ::   crxios_context        !: context name used in xios to read restart 
    181181   CHARACTER(lc) ::   cwxios_context        !: context name used in xios to write restart file 
    182182 
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/iom.F90

    r12649 r12914  
    119119      INTEGER ::   nldi_save, nlei_save    !:      and close boundaries in output files 
    120120      INTEGER ::   nldj_save, nlej_save    !: 
    121       LOGICAL ::   ll_closedef = .TRUE. 
     121      LOGICAL ::   ll_closedef 
    122122      !!---------------------------------------------------------------------- 
    123123      ! 
     
    134134         IF( njmpp + jpj - 1 == jpjglo ) nlej = jpj 
    135135      ENDIF 
     136      ! 
     137      ll_closedef = .TRUE. 
    136138      IF ( PRESENT(ld_closedef) ) ll_closedef = ld_closedef 
    137139      ! 
     
    363365           rst_file = TRIM(clpath)//TRIM(cn_ocerst_in) 
    364366        ELSE 
    365            rst_file = TRIM(clpath)//'1_'//TRIM(cn_ocerst_in) 
     367           rst_file = TRIM(clpath)//TRIM(Agrif_CFixed())//'_'//TRIM(cn_ocerst_in) 
    366368        ENDIF 
    367369!set name of the restart file and enable available fields 
    368         if(lwp) WRITE(numout,*) 'Setting restart filename (for XIOS) to: ',rst_file 
     370        if(lwp) WRITE(numout,*) 'Setting restart filename (for XIOS) to: ', TRIM(rst_file) 
    369371        CALL xios_get_handle("file_definition", filegroup_hdl ) 
    370372        CALL xios_add_child(filegroup_hdl, file_hdl, 'rrestart') 
     
    409411   IF(cdmdl == "OPA") THEN 
    410412!from restart.F90 
    411    CALL iom_set_rstw_var_active("rn_Dt") 
     413   CALL iom_set_rstw_var_active("rdt") 
    412414   IF ( .NOT. ln_diurnal_only ) THEN 
    413415        CALL iom_set_rstw_var_active('ub'  ) 
     
    447449 
    448450        i = 0 
    449         i = i + 1; fields(i)%vname="rn_Dt";            fields(i)%grid="grid_scalar" 
     451        i = i + 1; fields(i)%vname="rdt";            fields(i)%grid="grid_scalar" 
    450452        i = i + 1; fields(i)%vname="un";             fields(i)%grid="grid_N_3D" 
    451453        i = i + 1; fields(i)%vname="ub";             fields(i)%grid="grid_N_3D" 
     
    475477        i = i + 1; fields(i)%vname="qsr_hc_b";       fields(i)%grid="grid_N_3D" 
    476478        i = i + 1; fields(i)%vname="fraqsr_1lev";    fields(i)%grid="grid_N" 
    477         i = i + 1; fields(i)%vname="greenland_icesheet_mass" 
    478                                                fields(i)%grid="grid_scalar" 
    479         i = i + 1; fields(i)%vname="greenland_icesheet_timelapsed" 
    480                                                fields(i)%grid="grid_scalar" 
    481         i = i + 1; fields(i)%vname="greenland_icesheet_mass_roc" 
    482                                                fields(i)%grid="grid_scalar" 
    483         i = i + 1; fields(i)%vname="antarctica_icesheet_mass" 
    484                                                fields(i)%grid="grid_scalar" 
    485         i = i + 1; fields(i)%vname="antarctica_icesheet_timelapsed" 
    486                                                fields(i)%grid="grid_scalar" 
    487         i = i + 1; fields(i)%vname="antarctica_icesheet_mass_roc" 
    488                                                fields(i)%grid="grid_scalar" 
    489479        i = i + 1; fields(i)%vname="frc_v";          fields(i)%grid="grid_scalar" 
    490480        i = i + 1; fields(i)%vname="frc_t";          fields(i)%grid="grid_scalar" 
     
    546536        i = i + 1; fields(i)%vname="hbli";           fields(i)%grid="grid_N" 
    547537        i = i + 1; fields(i)%vname="wn";             fields(i)%grid="grid_N_3D" 
     538        i = i + 1; fields(i)%vname="fwfisf_cav_b";   fields(i)%grid="grid_N" 
     539        i = i + 1; fields(i)%vname="isf_hc_cav_b";   fields(i)%grid="grid_N" 
     540        i = i + 1; fields(i)%vname="isf_sc_cav_b";   fields(i)%grid="grid_N" 
    548541 
    549542        IF( i-1 > max_rst_fields) THEN 
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/iom_def.F90

    r12649 r12914  
    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 = 105 !: 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/dev_12905_xios_restart/src/OCE/ISF/isfcav.F90

    r12489 r12914  
    183183      ! cavity mask 
    184184      mskisf_cav(:,:)    = (1._wp - tmask(:,:,1)) * ssmask(:,:) 
    185       ! 
    186       !================ 
    187       ! 2: read restart 
     185      !================ 
     186      ! 2: activate restart 
     187      !================ 
     188      ! 
     189      IF( lwxios ) THEN 
     190         CALL iom_set_rstw_var_active('fwfisf_cav_b') 
     191         CALL iom_set_rstw_var_active('isf_hc_cav_b') 
     192         CALL iom_set_rstw_var_active('isf_sc_cav_b') 
     193      ENDIF 
     194      ! 
     195      !================ 
     196      ! 3: read restart 
    188197      !================ 
    189198      ! 
Note: See TracChangeset for help on using the changeset viewer.