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 11893 for NEMO – NEMO

Changeset 11893 for NEMO


Ignore:
Timestamp:
2019-11-13T09:48:43+01:00 (4 years ago)
Author:
andmirek
Message:

Ticket #2323 read/write SI3 restart file

Location:
NEMO/branches/2019/dev_r11756_SI3restart_XIOS
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/cfgs/AMM12/EXPREF/iodef.xml

    r7646 r11893  
    2424 
    2525  <context id="nemo" src="./context_nemo.xml"/>       <!--  NEMO       --> 
     26  <context id="nemo_rstw" src="./nemo_rstw.xml"/> 
     27  <context id="si3_rst" src="./si3_rst.xml"/> 
    2628   
    2729</simulation> 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/cfgs/ORCA2_ICE_PISCES/EXPREF/iodef.xml

    r9526 r11893  
    2323 
    2424  <context id="nemo" src="./context_nemo.xml"/>       <!--  NEMO       --> 
     25  <context id="nemo_rstw" src="./nemo_rstw.xml"/>     <!-- NEMO restart write context -->  
     26  <context id="si3_rst" src="./si3_rst.xml"/>         <!-- SI3  restart read context --> 
    2527 
    2628</simulation> 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/cfgs/ORCA2_SAS_ICE/EXPREF/iodef.xml

    r9572 r11893  
    2323 
    2424  <context id="nemo" src="./context_nemo.xml"/>       <!--  NEMO       --> 
     25  <context id="nemo_rstw" src="./nemo_rstw.xml"/> 
     26  <context id="si3_rst" src="./si3_rst.xml"/> 
    2527 
    2628</simulation> 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/cfgs/SHARED/grid_def_nemo.xml

    r11536 r11893  
    5757        <scalar/> 
    5858      </grid> 
     59        <!-- writeng/reading SI3 4D restart --> 
     60       <grid id="grid_Ni_4D" > 
     61         <domain id="grid_N" /> 
     62         <axis id="nlay_i" /> 
     63         <axis id="numcat" />  
     64       </grid> 
     65        <!-- writeng/reading SI3 4D restart --> 
     66       <grid id="grid_Ns_4D" > 
     67         <domain id="grid_N" /> 
     68         <axis id="nlay_s" /> 
     69         <axis id="numcat" /> 
     70       </grid> 
     71 
     72        <!--  --> 
     73 
    5974 
    6075    </grid_definition> 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/cfgs/SPITZ12/EXPREF/iodef.xml

    r9552 r11893  
    2323 
    2424  <context id="nemo" src="./context_nemo.xml"/>       <!--  NEMO       --> 
    25  
     25  <context id="nemo_rstw" src="./nemo_rstw.xml"/> 
     26  <context id="si3_rst" src="./si3_rst.xml"/> 
    2627</simulation> 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedyn_adv_pra.F90

    r11870 r11893  
    702702         CALL iom_set_rstw_var_active(rsti_wfields, 'syyage') 
    703703         CALL iom_set_rstw_var_active(rsti_wfields, 'sxyage') 
    704          DO jk = 1, nlay_s 
    705             WRITE(zchar1,'(I2.2)') jk 
    706             znam = 'sxc0'//'_l'//zchar1   
    707             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    708             znam = 'syc0'//'_l'//zchar1   
    709             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    710             znam = 'sxxc0'//'_l'//zchar1  
    711             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    712             znam = 'syyc0'//'_l'//zchar1  
    713             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    714             znam = 'sxyc0'//'_l'//zchar1  
    715             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    716          END DO 
    717          DO jk = 1, nlay_i 
    718             WRITE(zchar1,'(I2.2)') jk 
    719             znam = 'sxe'//'_l'//zchar1    
    720             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    721             znam = 'sye'//'_l'//zchar1    
    722             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    723             znam = 'sxxe'//'_l'//zchar1   
    724             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    725             znam = 'syye'//'_l'//zchar1   
    726             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    727             znam = 'sxye'//'_l'//zchar1   
    728             CALL iom_set_rstw_var_active(rsti_wfields, znam ) 
    729          END DO 
     704        
     705         CALL iom_set_rstw_var_active(rsti_wfields, 'sxc0') 
     706         CALL iom_set_rstw_var_active(rsti_wfields, 'syc0') 
     707         CALL iom_set_rstw_var_active(rsti_wfields, 'sxxc0') 
     708         CALL iom_set_rstw_var_active(rsti_wfields, 'syyc0') 
     709         CALL iom_set_rstw_var_active(rsti_wfields, 'sxyc0') 
     710 
     711         CALL iom_set_rstw_var_active(rsti_wfields, 'sxe') 
     712         CALL iom_set_rstw_var_active(rsti_wfields, 'sye') 
     713         CALL iom_set_rstw_var_active(rsti_wfields, 'sxxe') 
     714         CALL iom_set_rstw_var_active(rsti_wfields, 'syye') 
     715         CALL iom_set_rstw_var_active(rsti_wfields, 'sxye') 
    730716         ! 
    731717         IF( ln_pnd_H12 ) THEN                                       ! melt pond fraction 
     
    842828               CALL iom_get( numrir, jpdom_autoglo, "syyc0", syyc0, ldxios = lrxios ) 
    843829               CALL iom_get( numrir, jpdom_autoglo, "sxyc0", sxyc0, ldxios = lrxios ) 
    844                CALL iom_get( numrir, jpdom_autoglo, "sxe", sxc0, ldxios = lrxios ) 
    845                CALL iom_get( numrir, jpdom_autoglo, "sye", syc0, ldxios = lrxios ) 
    846                CALL iom_get( numrir, jpdom_autoglo, "sxxe", sxxc0, ldxios = lrxios ) 
    847                CALL iom_get( numrir, jpdom_autoglo, "syye", syyc0, ldxios = lrxios ) 
    848                CALL iom_get( numrir, jpdom_autoglo, "sxye", sxyc0, ldxios = lrxios ) 
     830               CALL iom_get( numrir, jpdom_autoglo, "sxe", sxe, ldxios = lrxios ) 
     831               CALL iom_get( numrir, jpdom_autoglo, "sye", sye, ldxios = lrxios ) 
     832               CALL iom_get( numrir, jpdom_autoglo, "sxxe", sxxe, ldxios = lrxios ) 
     833               CALL iom_get( numrir, jpdom_autoglo, "syye", syye, ldxios = lrxios ) 
     834               CALL iom_get( numrir, jpdom_autoglo, "sxye", sxye, ldxios = lrxios ) 
    849835            ENDIF 
    850836            ! 
     
    924910         CALL iom_rstput( iter, nitrst, numriw, 'sxyage', sxyage, ldxios = lwxios )  
    925911         !                                                           ! snow layers heat content 
    926          DO jk = 1, nlay_s 
    927             WRITE(zchar1,'(I2.2)') jk 
    928             znam = 'sxc0'//'_l'//zchar1   
    929             z3d(:,:,:) = sxc0 (:,:,jk,:)   
    930             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    931  
    932             znam = 'syc0'//'_l'//zchar1   
    933             z3d(:,:,:) = syc0 (:,:,jk,:)   
    934             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    935  
    936             znam = 'sxxc0'//'_l'//zchar1  
    937             z3d(:,:,:) = sxxc0(:,:,jk,:)   
    938             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    939  
    940             znam = 'syyc0'//'_l'//zchar1  
    941             z3d(:,:,:) = syyc0(:,:,jk,:)   
    942             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    943  
    944             znam = 'sxyc0'//'_l'//zchar1  
    945             z3d(:,:,:) = sxyc0(:,:,jk,:)   
    946             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    947          END DO 
    948          !                                                           ! ice layers heat content 
    949          DO jk = 1, nlay_i 
    950             WRITE(zchar1,'(I2.2)') jk 
    951             znam = 'sxe'//'_l'//zchar1    
    952             z3d(:,:,:) = sxe (:,:,jk,:)    
    953             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    954             znam = 'sye'//'_l'//zchar1    
    955             z3d(:,:,:) = sye (:,:,jk,:)    
    956             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    957             znam = 'sxxe'//'_l'//zchar1   
    958             z3d(:,:,:) = sxxe(:,:,jk,:)    
    959             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    960             znam = 'syye'//'_l'//zchar1   
    961             z3d(:,:,:) = syye(:,:,jk,:)    
    962             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    963             znam = 'sxye'//'_l'//zchar1   
    964             z3d(:,:,:) = sxye(:,:,jk,:)    
    965             CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
    966          END DO 
     912         IF(lwxios) THEN 
     913            CALL iom_rstput( iter, nitrst, numriw, 'sxc0' ,  sxc0,  ldxios = lwxios ) 
     914            CALL iom_rstput( iter, nitrst, numriw, 'syc0' ,  syc0,  ldxios = lwxios ) 
     915            CALL iom_rstput( iter, nitrst, numriw, 'sxxc0', sxxc0,  ldxios = lwxios ) 
     916            CALL iom_rstput( iter, nitrst, numriw, 'syyc0', syyc0,  ldxios = lwxios ) 
     917            CALL iom_rstput( iter, nitrst, numriw, 'sxyc0', sxyc0,  ldxios = lwxios ) 
     918 
     919 
     920            CALL iom_rstput( iter, nitrst, numriw, 'sxe' ,  sxe,  ldxios = lwxios ) 
     921            CALL iom_rstput( iter, nitrst, numriw, 'sye' ,  sye,  ldxios = lwxios ) 
     922            CALL iom_rstput( iter, nitrst, numriw, 'sxxe', sxxe,  ldxios = lwxios ) 
     923            CALL iom_rstput( iter, nitrst, numriw, 'syye', syye,  ldxios = lwxios ) 
     924            CALL iom_rstput( iter, nitrst, numriw, 'sxye', sxye,  ldxios = lwxios ) 
     925         ELSE 
     926            DO jk = 1, nlay_s 
     927               WRITE(zchar1,'(I2.2)') jk 
     928               znam = 'sxc0'//'_l'//zchar1   
     929               z3d(:,:,:) = sxc0 (:,:,jk,:)   
     930               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     931 
     932               znam = 'syc0'//'_l'//zchar1   
     933               z3d(:,:,:) = syc0 (:,:,jk,:)   
     934               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     935 
     936               znam = 'sxxc0'//'_l'//zchar1  
     937               z3d(:,:,:) = sxxc0(:,:,jk,:)   
     938               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     939    
     940               znam = 'syyc0'//'_l'//zchar1  
     941               z3d(:,:,:) = syyc0(:,:,jk,:)   
     942               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     943    
     944               znam = 'sxyc0'//'_l'//zchar1  
     945               z3d(:,:,:) = sxyc0(:,:,jk,:)   
     946               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     947            END DO 
     948            !                                                           ! ice layers heat content 
     949            DO jk = 1, nlay_i 
     950               WRITE(zchar1,'(I2.2)') jk 
     951               znam = 'sxe'//'_l'//zchar1    
     952               z3d(:,:,:) = sxe (:,:,jk,:)    
     953               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     954               znam = 'sye'//'_l'//zchar1    
     955               z3d(:,:,:) = sye (:,:,jk,:)    
     956               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     957               znam = 'sxxe'//'_l'//zchar1   
     958               z3d(:,:,:) = sxxe(:,:,jk,:)    
     959               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     960               znam = 'syye'//'_l'//zchar1   
     961               z3d(:,:,:) = syye(:,:,jk,:)    
     962               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     963               znam = 'sxye'//'_l'//zchar1   
     964               z3d(:,:,:) = sxye(:,:,jk,:)    
     965               CALL iom_rstput( iter, nitrst, numriw, znam , z3d,  ldxios = lwxios ) 
     966            END DO 
     967         ENDIF 
    967968         ! 
    968969         IF( ln_pnd_H12 ) THEN                                       ! melt pond fraction 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icerst.F90

    r11870 r11893  
    138138      CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip, ldxios = lwxios  ) 
    139139      CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip, ldxios = lwxios  ) 
     140      IF(lwxios) THEN 
     141         CALL iom_rstput( iter, nitrst, numriw, 'e_s' , e_s, ldxios = lwxios ) 
     142         CALL iom_rstput( iter, nitrst, numriw, 'e_i' , e_i, ldxios = lwxios ) 
     143      ELSE 
    140144      ! Snow enthalpy 
    141       DO jk = 1, nlay_s  
    142          WRITE(zchar1,'(I2.2)') jk 
    143          znam = 'e_s'//'_l'//zchar1 
    144          z3d(:,:,:) = e_s(:,:,jk,:) 
    145          CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 
    146       END DO 
    147       ! Ice enthalpy 
    148       DO jk = 1, nlay_i  
    149          WRITE(zchar1,'(I2.2)') jk 
    150          znam = 'e_i'//'_l'//zchar1 
    151          z3d(:,:,:) = e_i(:,:,jk,:) 
    152          CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 
    153       END DO 
     145         DO jk = 1, nlay_s  
     146            WRITE(zchar1,'(I2.2)') jk 
     147            znam = 'e_s'//'_l'//zchar1 
     148            z3d(:,:,:) = e_s(:,:,jk,:) 
     149            CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 
     150         END DO 
     151         ! Ice enthalpy 
     152         DO jk = 1, nlay_i  
     153            WRITE(zchar1,'(I2.2)') jk 
     154            znam = 'e_i'//'_l'//zchar1 
     155            z3d(:,:,:) = e_i(:,:,jk,:) 
     156            CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 
     157         END DO 
     158      ENDIF 
    154159      ! fields needed for Met Office (Jules) coupling 
    155160      IF( ln_cpl ) THEN 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/iom.F90

    r11870 r11893  
    6464   PUBLIC iom_use, iom_context_finalize, iom_miss_val 
    6565 
    66    PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 
     66   PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d, iom_rp4d 
    6767   PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_g4d, iom_get_123d 
    6868   PRIVATE iom_p1d, iom_p2d, iom_p3d 
     
    8989   END INTERFACE 
    9090   INTERFACE iom_rstput 
    91       MODULE PROCEDURE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 
     91      MODULE PROCEDURE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d, iom_rp4d 
    9292   END INTERFACE 
    9393   INTERFACE iom_put 
     
    451451                CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_rfields(i)%vname)) 
    452452                SELECT CASE (TRIM(rst_rfields(i)%grid)) 
    453 !                CASE ("grid_Ni_4D") 
    454 !                   CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
    455 !                       domain_ref="grid_N", axis_ref="nlay_i", axis_ref="numcat", operation = "instant") 
    456 !                CASE ("grid_Ns_4D") 
    457 !                   CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
    458 !                       domain_ref="grid_N", axis_ref="nlay_s", axis_ref="numcat", operation = "instant") 
     453#if defined key_si3 
     454                 CASE ("grid_Ni_4D") 
     455                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
     456                         grid_ref="grid_Ni_4D", operation = "instant") 
     457                 CASE ("grid_Ns_4D") 
     458                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
     459                         grid_ref="grid_Ns_4D", operation = "instant") 
    459460                 CASE ("grid_Ni_3D") 
    460461                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
    461                         domain_ref="grid_N", axis_ref="numcat", operation = "instant") 
     462                         domain_ref="grid_N", axis_ref="numcat", operation = "instant") 
     463#endif 
    462464                 CASE ("grid_N_3D") 
    463465                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
    464                         domain_ref="grid_N", axis_ref="nav_lev", operation = "instant") 
     466                         domain_ref="grid_N", axis_ref="nav_lev", operation = "instant") 
    465467                 CASE ("grid_N") 
    466468                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
    467                         domain_ref="grid_N", operation = "instant")  
     469                         domain_ref="grid_N", operation = "instant")  
    468470                CASE ("grid_vector") 
    469471                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
     
    471473                 CASE ("grid_scalar") 
    472474                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(rst_rfields(i)%vname), & 
    473                         scalar_ref = "grid_scalar", operation = "instant") 
     475                         scalar_ref = "grid_scalar", operation = "instant") 
    474476                END SELECT 
    475477                IF(lwp) WRITE(numout,*) 'XIOS read: ', TRIM(rst_rfields(i)%vname), ' enabled in ', TRIM(rst_file) 
     
    526528         CALL iom_set_rstw_var_active(drst_wfields, 'sbc_sc_b') 
    527529   ELSE IF(cdmdl == "SI3") THEN 
     530#if defined key_si3 
    528531      CALL iom_set_rstw_var_active(drst_wfields, 'nn_fsbc_ice') 
    529       CALL iom_set_rstw_var_active(drst_wfields, 'kt_ice') 
    530       CALL iom_set_rstw_var_active(drst_wfields, 'v_i') 
    531       CALL iom_set_rstw_var_active(drst_wfields, 'v_s') 
    532       CALL iom_set_rstw_var_active(drst_wfields, 'sv_i') 
    533       CALL iom_set_rstw_var_active(drst_wfields, 'a_i') 
    534       CALL iom_set_rstw_var_active(drst_wfields, 't_su') 
    535       CALL iom_set_rstw_var_active(drst_wfields, 'u_ice') 
    536       CALL iom_set_rstw_var_active(drst_wfields, 'v_ice') 
    537       CALL iom_set_rstw_var_active(drst_wfields, 'oa_i') 
    538       CALL iom_set_rstw_var_active(drst_wfields, 'a_ip') 
    539       CALL iom_set_rstw_var_active(drst_wfields, 'v_ip') 
    540       DO jk = 1, nlay_s  
    541          WRITE(zchar1,'(I2.2)') jk 
    542          znam = 'e_s'//'_l'//zchar1 
    543          CALL iom_set_rstw_var_active(drst_wfields, znam ) 
    544       END DO 
    545       ! Ice enthalpy 
    546       DO jk = 1, nlay_i  
    547          WRITE(zchar1,'(I2.2)') jk 
    548          znam = 'e_i'//'_l'//zchar1 
    549          CALL iom_set_rstw_var_active(drst_wfields, znam ) 
    550       END DO 
     532      CALL iom_set_rstw_var_active(drst_wfields, 'kt_ice'     ) 
     533      CALL iom_set_rstw_var_active(drst_wfields, 'v_i'        ) 
     534      CALL iom_set_rstw_var_active(drst_wfields, 'v_s'        ) 
     535      CALL iom_set_rstw_var_active(drst_wfields, 'sv_i'       ) 
     536      CALL iom_set_rstw_var_active(drst_wfields, 'a_i'        ) 
     537      CALL iom_set_rstw_var_active(drst_wfields, 't_su'       ) 
     538      CALL iom_set_rstw_var_active(drst_wfields, 'u_ice'      ) 
     539      CALL iom_set_rstw_var_active(drst_wfields, 'v_ice'      ) 
     540      CALL iom_set_rstw_var_active(drst_wfields, 'oa_i'       ) 
     541      CALL iom_set_rstw_var_active(drst_wfields, 'a_ip'       ) 
     542      CALL iom_set_rstw_var_active(drst_wfields, 'v_ip'       ) 
     543      CALL iom_set_rstw_var_active(drst_wfields, 'e_s'        ) 
     544      CALL iom_set_rstw_var_active(drst_wfields, 'e_i'        ) 
     545#endif 
    551546   ENDIF 
    552547#else 
     
    707702        i = iom_add(i); fields(i)%vname="syyage";         fields(i)%grid="grid_Ni_3D" 
    708703        i = iom_add(i); fields(i)%vname="sxyage";         fields(i)%grid="grid_Ni_3D" 
    709 !this part is in addition to 4D grids, to handle old format of SI3 resart 
     704!this part is in addition to 4D grids, to handle old format for SI3 resart 
    710705!NEMO format restart 
    711706        DO jk = 1, nlay_s 
     
    727722        i = iom_add(i); fields(i)%vname="sxxc0";          fields(i)%grid="grid_Ns_4D" 
    728723        i = iom_add(i); fields(i)%vname="syyc0";          fields(i)%grid="grid_Ns_4D" 
    729         i = iom_add(i); fields(i)%vname="sxxc0";          fields(i)%grid="grid_Ns_4D" 
     724        i = iom_add(i); fields(i)%vname="sxyc0";          fields(i)%grid="grid_Ns_4D" 
    730725        ! 
    731726!NEMO format restart 
     
    839834                CALL xios_add_child(file_hdl, field_hdl, TRIM(drst_wfields(i)%vname)//"_"//TRIM(ADJUSTL(snr))) 
    840835                SELECT CASE (TRIM(drst_wfields(i)%grid)) 
     836#if defined key_si3 
     837                 CASE ("grid_Ni_4D") 
     838                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 
     839                         grid_ref="grid_Ni_4D", prec = 8, operation = "instant") 
     840                 CASE ("grid_Ns_4D") 
     841                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 
     842                         grid_ref="grid_Ns_4D", prec = 8, operation = "instant") 
    841843                 CASE ("grid_Ni_3D") 
    842844                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 
    843                         domain_ref="grid_N", axis_ref="numcat", prec = 8, operation = "once",            & 
    844                         freq_offset=(kdstep -1) * xios_timestep) 
     845                         domain_ref="grid_N", axis_ref="numcat", prec = 8, operation = "instant") 
     846#endif 
    845847                 CASE ("grid_N_3D") 
    846848                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 
    847                         domain_ref="grid_N", axis_ref="nav_lev", prec = 8, operation = "once",           & 
    848                         freq_offset=(kdstep -1) * xios_timestep) 
     849                         domain_ref="grid_N", axis_ref="nav_lev", prec = 8, operation = "instant") 
    849850                 CASE ("grid_N") 
    850851                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 
    851                         domain_ref="grid_N", prec = 8, operation = "once",                               & 
    852                         freq_offset=(kdstep -1) * xios_timestep) 
     852                         domain_ref="grid_N", prec = 8, operation = "instant") 
    853853                 CASE ("grid_vector") 
    854854                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 
    855                          axis_ref="nav_lev", prec = 8, operation = "once",                               & 
    856                         freq_offset=(kdstep -1) * xios_timestep) 
     855                         axis_ref="nav_lev", prec = 8, operation = "instant") 
    857856                 CASE ("grid_scalar") 
    858857                    CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 
    859                         scalar_ref = "grid_scalar", prec = 8, operation = "once",                        & 
    860                         freq_offset=(kdstep -1) * xios_timestep) 
     858                         scalar_ref = "grid_scalar", prec = 8, operation = "instant") 
    861859                END SELECT 
    862860         ENDIF 
     
    19531951   END SUBROUTINE iom_rp3d 
    19541952 
    1955  
    1956   SUBROUTINE iom_delay_rst( cdaction, cdcpnt, kncid ) 
     1953   SUBROUTINE iom_rp4d( kt, kwrite, kiomid, cdvar, pvar, ktype, ldxios ) 
     1954      INTEGER         , INTENT(in)                         ::   kt       ! ocean time-step 
     1955      INTEGER         , INTENT(in)                         ::   kwrite   ! writing time-step 
     1956      INTEGER         , INTENT(in)                         ::   kiomid   ! Identifier of the file  
     1957      CHARACTER(len=*), INTENT(in)                         ::   cdvar    ! time axis name 
     1958      REAL(wp)        , INTENT(in),     DIMENSION(:,:,:,:) ::   pvar     ! written field 
     1959      INTEGER         , INTENT(in), OPTIONAL               ::   ktype    ! variable external type 
     1960      LOGICAL, OPTIONAL :: ldxios   ! xios write flag 
     1961      LOGICAL :: llx                 ! local xios write flag 
     1962      INTEGER :: ivid   ! variable id 
     1963 
     1964      llx = .FALSE. 
     1965      IF(PRESENT(ldxios)) llx = ldxios 
     1966      IF( llx ) THEN 
     1967#ifdef key_iomput 
     1968      IF( kt == kwrite ) THEN 
     1969         IF(lwp) write(numout,*) 'RESTART: write (XIOS 4D) ',trim(cdvar) 
     1970         write(snr, *) nitrst 
     1971         CALL xios_send_field(trim(cdvar)//"_"//TRIM(ADJUSTL(snr)), pvar) 
     1972      ENDIF 
     1973#endif 
     1974      ELSE 
     1975        CALL ctl_stop('Error in the name  iom_rp4d for variable '//TRIM(cdvar),   & 
     1976           & 'Restart with iom_nf90_rstput can not handle 4D cases' ) 
     1977      ENDIF 
     1978   END SUBROUTINE iom_rp4d 
     1979 
     1980   SUBROUTINE iom_delay_rst( cdaction, cdcpnt, kncid ) 
    19571981      !!--------------------------------------------------------------------- 
    19581982      !!   Routine iom_delay_rst: used read/write restart related to mpp_delay 
     
    19701994      ! 
    19711995      !return for now. When XIOS is used to write restart it also should be used to write this attribute 
    1972       IF(lwxios) return 
     1996      IF(lwxios) THEN 
     1997         CALL ctl_warn( 'From iom_delay_rst: ', 'Can not '//cdaction//' mpp_delay information with XIOS') 
     1998         RETURN 
     1999      ENDIF 
     2000 
    19732001      !                                      =================================== 
    19742002      IF( TRIM(cdaction) == 'READ' ) THEN   ! read restart related to mpp_delay ! 
     
    27402768   IF( iom_add > max_rst_fields) THEN 
    27412769     WRITE(ctmp1,*) 'E R R O R : iom_set_rst_vars SIZE of RST_FIELD array is too small' 
    2742      CALL ctl_stop( 'iom_add:', ctmp1 ) 
     2770     CALL ctl_stop( 'iom_add:', ctmp1, 'Increase parameter max_rst_fields') 
    27432771   ENDIF 
    27442772 
  • NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/iom_def.F90

    r11840 r11893  
    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 = 190!: maximum number of restart variables defined in iom_set_rst_vars 
     69   INTEGER, PARAMETER, PUBLIC                   :: max_rst_fields = 250!: 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/2019/dev_r11756_SI3restart_XIOS/src/OCE/step.F90

    r11870 r11893  
    311311#if defined key_iomput 
    312312      IF( kstp == nitend .OR. indic < 0 ) THEN  
    313                       CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
    314                       IF(lrxios) THEN 
    315                          CALL iom_context_finalize(      crxios_context          ) 
     313         IF(lrxios) THEN 
     314            CALL iom_context_finalize(      crxios_context          ) 
    316315#if defined key_si3 
    317                          CALL iom_context_finalize(      crixios_context          ) 
    318 #endif 
    319                       ENDIF 
     316            CALL iom_context_finalize(      crixios_context          ) 
     317#endif 
     318         ENDIF 
     319         IF(lwxios) CALL iom_context_finalize(      cwxios_context          ) 
    320320         IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) !  
     321         CALL iom_context_finalize(      cxios_context          ) ! needed for XIOS+AGRIF 
    321322      ENDIF 
    322323#endif 
Note: See TracChangeset for help on using the changeset viewer.