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 13970 for NEMO/trunk/src/ICE – NEMO

Changeset 13970 for NEMO/trunk/src/ICE


Ignore:
Timestamp:
2020-12-02T10:56:33+01:00 (3 years ago)
Author:
andmirek
Message:

Ticket #2462 into the trunk

Location:
NEMO/trunk/src/ICE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/icedia.F90

    r13286 r13970  
    261261         ! Write in numriw (if iter == nitrst) 
    262262         ! ------------------  
    263          CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop  ) 
    264          CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot  ) 
    265          CALL iom_rstput( iter, nitrst, numriw, 'frc_temtop' , frc_temtop  ) 
    266          CALL iom_rstput( iter, nitrst, numriw, 'frc_tembot' , frc_tembot  ) 
    267          CALL iom_rstput( iter, nitrst, numriw, 'frc_sal'    , frc_sal     ) 
     263         CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop ) 
     264         CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot ) 
     265         CALL iom_rstput( iter, nitrst, numriw, 'frc_temtop' , frc_temtop ) 
     266         CALL iom_rstput( iter, nitrst, numriw, 'frc_tembot' , frc_tembot ) 
     267         CALL iom_rstput( iter, nitrst, numriw, 'frc_sal'    , frc_sal    ) 
    268268         CALL iom_rstput( iter, nitrst, numriw, 'vol_loc_ini', vol_loc_ini ) 
    269269         CALL iom_rstput( iter, nitrst, numriw, 'tem_loc_ini', tem_loc_ini ) 
  • NEMO/trunk/src/ICE/icedyn_adv_pra.F90

    r13637 r13970  
    989989            DO jk = 1, nlay_s 
    990990               WRITE(zchar1,'(I2.2)') jk 
    991                znam = 'sxc0'//'_l'//zchar1  ;   CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   sxc0 (:,:,jk,:) = z3d(:,:,:) 
    992                znam = 'syc0'//'_l'//zchar1  ;   CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   syc0 (:,:,jk,:) = z3d(:,:,:) 
    993                znam = 'sxxc0'//'_l'//zchar1 ;   CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxxc0(:,:,jk,:) = z3d(:,:,:) 
    994                znam = 'syyc0'//'_l'//zchar1 ;   CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   syyc0(:,:,jk,:) = z3d(:,:,:) 
    995                znam = 'sxyc0'//'_l'//zchar1 ;   CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxyc0(:,:,jk,:) = z3d(:,:,:) 
     991               znam = 'sxc0'//'_l'//zchar1   
     992               CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   sxc0 (:,:,jk,:) = z3d(:,:,:) 
     993               znam = 'syc0'//'_l'//zchar1   
     994               CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   syc0 (:,:,jk,:) = z3d(:,:,:) 
     995               znam = 'sxxc0'//'_l'//zchar1  
     996               CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxxc0(:,:,jk,:) = z3d(:,:,:) 
     997               znam = 'syyc0'//'_l'//zchar1  
     998               CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   syyc0(:,:,jk,:) = z3d(:,:,:) 
     999               znam = 'sxyc0'//'_l'//zchar1  
     1000               CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxyc0(:,:,jk,:) = z3d(:,:,:) 
    9961001            END DO 
    9971002            !                                                        ! ice layers heat content 
    9981003            DO jk = 1, nlay_i 
    9991004               WRITE(zchar1,'(I2.2)') jk 
    1000                znam = 'sxe'//'_l'//zchar1   ;   CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   sxe (:,:,jk,:) = z3d(:,:,:) 
    1001                znam = 'sye'//'_l'//zchar1   ;   CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   sye (:,:,jk,:) = z3d(:,:,:) 
    1002                znam = 'sxxe'//'_l'//zchar1  ;   CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxxe(:,:,jk,:) = z3d(:,:,:) 
    1003                znam = 'syye'//'_l'//zchar1  ;   CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   syye(:,:,jk,:) = z3d(:,:,:) 
    1004                znam = 'sxye'//'_l'//zchar1  ;   CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxye(:,:,jk,:) = z3d(:,:,:) 
     1005               znam = 'sxe'//'_l'//zchar1    
     1006               CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   sxe (:,:,jk,:) = z3d(:,:,:) 
     1007               znam = 'sye'//'_l'//zchar1    
     1008               CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp )   ;   sye (:,:,jk,:) = z3d(:,:,:) 
     1009               znam = 'sxxe'//'_l'//zchar1   
     1010               CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxxe(:,:,jk,:) = z3d(:,:,:) 
     1011               znam = 'syye'//'_l'//zchar1   
     1012               CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   syye(:,:,jk,:) = z3d(:,:,:) 
     1013               znam = 'sxye'//'_l'//zchar1   
     1014               CALL iom_get( numrir, jpdom_auto, znam , z3d )   ;   sxye(:,:,jk,:) = z3d(:,:,:) 
    10051015            END DO 
    10061016            ! 
     
    10671077         ! 
    10681078         !                                                           ! ice thickness 
    1069          CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice  ) 
    1070          CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice  ) 
    1071          CALL iom_rstput( iter, nitrst, numriw, 'sxxice', sxxice ) 
    1072          CALL iom_rstput( iter, nitrst, numriw, 'syyice', syyice ) 
    1073          CALL iom_rstput( iter, nitrst, numriw, 'sxyice', sxyice ) 
     1079         CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice) 
     1080         CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice) 
     1081         CALL iom_rstput( iter, nitrst, numriw, 'sxxice', sxxice) 
     1082         CALL iom_rstput( iter, nitrst, numriw, 'syyice', syyice) 
     1083         CALL iom_rstput( iter, nitrst, numriw, 'sxyice', sxyice) 
    10741084         !                                                           ! snow thickness 
    1075          CALL iom_rstput( iter, nitrst, numriw, 'sxsn'  , sxsn   ) 
    1076          CALL iom_rstput( iter, nitrst, numriw, 'sysn'  , sysn   ) 
    1077          CALL iom_rstput( iter, nitrst, numriw, 'sxxsn' , sxxsn  ) 
    1078          CALL iom_rstput( iter, nitrst, numriw, 'syysn' , syysn  ) 
    1079          CALL iom_rstput( iter, nitrst, numriw, 'sxysn' , sxysn  ) 
     1085         CALL iom_rstput( iter, nitrst, numriw, 'sxsn'  , sxsn ) 
     1086         CALL iom_rstput( iter, nitrst, numriw, 'sysn'  , sysn ) 
     1087         CALL iom_rstput( iter, nitrst, numriw, 'sxxsn' , sxxsn ) 
     1088         CALL iom_rstput( iter, nitrst, numriw, 'syysn' , syysn ) 
     1089         CALL iom_rstput( iter, nitrst, numriw, 'sxysn' , sxysn ) 
    10801090         !                                                           ! ice concentration 
    1081          CALL iom_rstput( iter, nitrst, numriw, 'sxa'   , sxa    ) 
    1082          CALL iom_rstput( iter, nitrst, numriw, 'sya'   , sya    ) 
    1083          CALL iom_rstput( iter, nitrst, numriw, 'sxxa'  , sxxa   ) 
    1084          CALL iom_rstput( iter, nitrst, numriw, 'syya'  , syya   ) 
    1085          CALL iom_rstput( iter, nitrst, numriw, 'sxya'  , sxya   ) 
     1091         CALL iom_rstput( iter, nitrst, numriw, 'sxa'   , sxa  ) 
     1092         CALL iom_rstput( iter, nitrst, numriw, 'sya'   , sya  ) 
     1093         CALL iom_rstput( iter, nitrst, numriw, 'sxxa'  , sxxa  ) 
     1094         CALL iom_rstput( iter, nitrst, numriw, 'syya'  , syya  ) 
     1095         CALL iom_rstput( iter, nitrst, numriw, 'sxya'  , sxya  ) 
    10861096         !                                                           ! ice salinity 
    1087          CALL iom_rstput( iter, nitrst, numriw, 'sxsal' , sxsal  ) 
    1088          CALL iom_rstput( iter, nitrst, numriw, 'sysal' , sysal  ) 
    1089          CALL iom_rstput( iter, nitrst, numriw, 'sxxsal', sxxsal ) 
    1090          CALL iom_rstput( iter, nitrst, numriw, 'syysal', syysal ) 
    1091          CALL iom_rstput( iter, nitrst, numriw, 'sxysal', sxysal ) 
     1097         CALL iom_rstput( iter, nitrst, numriw, 'sxsal' , sxsal) 
     1098         CALL iom_rstput( iter, nitrst, numriw, 'sysal' , sysal) 
     1099         CALL iom_rstput( iter, nitrst, numriw, 'sxxsal', sxxsal) 
     1100         CALL iom_rstput( iter, nitrst, numriw, 'syysal', syysal) 
     1101         CALL iom_rstput( iter, nitrst, numriw, 'sxysal', sxysal) 
    10921102         !                                                           ! ice age 
    1093          CALL iom_rstput( iter, nitrst, numriw, 'sxage' , sxage  ) 
    1094          CALL iom_rstput( iter, nitrst, numriw, 'syage' , syage  ) 
    1095          CALL iom_rstput( iter, nitrst, numriw, 'sxxage', sxxage ) 
    1096          CALL iom_rstput( iter, nitrst, numriw, 'syyage', syyage ) 
    1097          CALL iom_rstput( iter, nitrst, numriw, 'sxyage', sxyage ) 
     1103         CALL iom_rstput( iter, nitrst, numriw, 'sxage' , sxage) 
     1104         CALL iom_rstput( iter, nitrst, numriw, 'syage' , syage) 
     1105         CALL iom_rstput( iter, nitrst, numriw, 'sxxage', sxxage) 
     1106         CALL iom_rstput( iter, nitrst, numriw, 'syyage', syyage) 
     1107         CALL iom_rstput( iter, nitrst, numriw, 'sxyage', sxyage) 
    10981108         !                                                           ! snow layers heat content 
    10991109         DO jk = 1, nlay_s 
    11001110            WRITE(zchar1,'(I2.2)') jk 
    1101             znam = 'sxc0'//'_l'//zchar1  ;   z3d(:,:,:) = sxc0 (:,:,jk,:)  ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1102             znam = 'syc0'//'_l'//zchar1  ;   z3d(:,:,:) = syc0 (:,:,jk,:)  ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1103             znam = 'sxxc0'//'_l'//zchar1 ;   z3d(:,:,:) = sxxc0(:,:,jk,:)  ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1104             znam = 'syyc0'//'_l'//zchar1 ;   z3d(:,:,:) = syyc0(:,:,jk,:)  ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1105             znam = 'sxyc0'//'_l'//zchar1 ;   z3d(:,:,:) = sxyc0(:,:,jk,:)  ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
     1111            znam = 'sxc0'//'_l'//zchar1  ;   z3d(:,:,:) = sxc0 (:,:,jk,:) 
     1112            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1113            znam = 'syc0'//'_l'//zchar1  ;   z3d(:,:,:) = syc0 (:,:,jk,:) 
     1114            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1115            znam = 'sxxc0'//'_l'//zchar1 ;   z3d(:,:,:) = sxxc0(:,:,jk,:) 
     1116            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1117            znam = 'syyc0'//'_l'//zchar1 ;   z3d(:,:,:) = syyc0(:,:,jk,:) 
     1118            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1119            znam = 'sxyc0'//'_l'//zchar1 ;   z3d(:,:,:) = sxyc0(:,:,jk,:) 
     1120            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
    11061121         END DO 
    11071122         !                                                           ! ice layers heat content 
    11081123         DO jk = 1, nlay_i 
    11091124            WRITE(zchar1,'(I2.2)') jk 
    1110             znam = 'sxe'//'_l'//zchar1   ;   z3d(:,:,:) = sxe (:,:,jk,:)   ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1111             znam = 'sye'//'_l'//zchar1   ;   z3d(:,:,:) = sye (:,:,jk,:)   ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1112             znam = 'sxxe'//'_l'//zchar1  ;   z3d(:,:,:) = sxxe(:,:,jk,:)   ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1113             znam = 'syye'//'_l'//zchar1  ;   z3d(:,:,:) = syye(:,:,jk,:)   ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
    1114             znam = 'sxye'//'_l'//zchar1  ;   z3d(:,:,:) = sxye(:,:,jk,:)   ;   CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 
     1125            znam = 'sxe'//'_l'//zchar1   ;   z3d(:,:,:) = sxe (:,:,jk,:) 
     1126            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1127            znam = 'sye'//'_l'//zchar1   ;   z3d(:,:,:) = sye (:,:,jk,:) 
     1128            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1129            znam = 'sxxe'//'_l'//zchar1  ;   z3d(:,:,:) = sxxe(:,:,jk,:) 
     1130            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1131            znam = 'syye'//'_l'//zchar1  ;   z3d(:,:,:) = syye(:,:,jk,:) 
     1132            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
     1133            znam = 'sxye'//'_l'//zchar1  ;   z3d(:,:,:) = sxye(:,:,jk,:) 
     1134            CALL iom_rstput( iter, nitrst, numriw, znam , z3d) 
    11151135         END DO 
    11161136         ! 
  • NEMO/trunk/src/ICE/icedyn_rhg_evp.F90

    r13612 r13970  
    10331033         iter = kt + nn_fsbc - 1             ! ice restarts are written at kt == nitrst - nn_fsbc + 1 
    10341034         ! 
    1035          CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i  ) 
    1036          CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i  ) 
     1035         CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i ) 
     1036         CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i ) 
    10371037         CALL iom_rstput( iter, nitrst, numriw, 'stress12_i', stress12_i ) 
    10381038         ! 
  • NEMO/trunk/src/ICE/icerst.F90

    r13472 r13970  
    5555      CHARACTER(len=50)   ::   clname   ! ice output restart file name 
    5656      CHARACTER(len=256)  ::   clpath   ! full path to ice output restart file  
     57      CHARACTER(LEN=52)   ::   clpname   ! ocean output restart file name including prefix for AGRIF 
    5758      !!---------------------------------------------------------------------- 
    5859      ! 
     
    8485            ENDIF 
    8586            ! 
    86             CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 
     87            IF(.NOT.lwxios) THEN 
     88               CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 
     89            ELSE 
     90#if defined key_iomput 
     91               cw_icerst_cxt = "rstwi_"//TRIM(ADJUSTL(clkt)) 
     92               IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
     93                  clpname = clname 
     94               ELSE 
     95                  clpname = TRIM(Agrif_CFixed())//"_"//clname 
     96               ENDIF 
     97               numriw = iom_xios_setid(TRIM(clpath)//TRIM(clpname)) 
     98               CALL iom_init( cw_icerst_cxt, kdid = numriw, ld_closedef = .FALSE. ) 
     99               CALL iom_swap( cxios_context ) 
     100#else 
     101               clinfo = 'Can not use XIOS in rst_opn' 
     102               CALL ctl_stop(TRIM(clinfo)) 
     103#endif 
     104            ENDIF 
    87105            lrst_ice = .TRUE. 
    88106         ENDIF 
     
    117135         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~'          
    118136      ENDIF 
    119  
     137       
    120138      ! Write in numriw (if iter == nitrst) 
    121139      ! ------------------  
     
    123141      CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) )      ! time-step  
    124142      CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter   , wp ) )      ! date 
    125       CALL iom_delay_rst( 'WRITE', 'ICE', numriw )   ! save only ice delayed global communication variables 
     143       
     144      IF(.NOT.lwxios) CALL iom_delay_rst( 'WRITE', 'ICE', numriw )   ! save only ice delayed global communication variables 
    126145 
    127146      ! Prognostic variables 
     
    154173      IF( ln_cpl ) THEN 
    155174         CALL iom_rstput( iter, nitrst, numriw, 'cnd_ice', cnd_ice ) 
    156          CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice  ) 
     175         CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice ) 
    157176      ENDIF 
    158177      ! 
     
    161180      ! ------------------ 
    162181      IF( iter == nitrst ) THEN 
    163          CALL iom_close( numriw ) 
     182         IF(.NOT.lwxios) THEN 
     183            CALL iom_close( numriw ) 
     184         ELSE 
     185            CALL iom_context_finalize(      cw_icerst_cxt          ) 
     186            iom_file(numriw)%nfid       = 0 
     187            numriw = 0 
     188         ENDIF 
    164189         lrst_ice = .FALSE. 
    165190      ENDIF 
     
    181206      CHARACTER(len=2)  ::   zchar, zchar1 
    182207      REAL(wp)          ::   zfice, ziter 
     208      CHARACTER(lc)     ::   clpname 
    183209      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z3d   ! 3D workspace 
    184210      !!---------------------------------------------------------------------- 
     
    190216      ENDIF 
    191217 
     218      lxios_sini = .FALSE. 
    192219      CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir ) 
     220 
     221      IF( lrxios) THEN 
     222          cr_icerst_cxt = 'si3_rst' 
     223          IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for SI3' 
     224!         IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
     225!            clpname = cn_icerst_in 
     226!         ELSE 
     227!            clpname = TRIM(Agrif_CFixed())//"_"//cn_icerst_in    
     228!         ENDIF 
     229          CALL iom_init( cr_icerst_cxt, kdid = numrir, ld_closedef = .TRUE. ) 
     230      ENDIF 
    193231 
    194232      ! test if v_i exists  
     
    198236      IF( id0 > 0 ) THEN   ! == case of a normal restart == ! 
    199237         !                 ! ------------------------------ ! 
    200           
    201238         ! Time info 
    202239         CALL iom_get( numrir, 'nn_fsbc', zfice ) 
     
    278315         ENDIF 
    279316 
    280          CALL iom_delay_rst( 'READ', 'ICE', numrir )   ! read only ice delayed global communication variables 
    281  
     317         IF(.NOT.lrxios) CALL iom_delay_rst( 'READ', 'ICE', numrir )   ! read only ice delayed global communication variables 
    282318         !                 ! ---------------------------------- ! 
    283319      ELSE                 ! == case of a simplified restart == ! 
  • NEMO/trunk/src/ICE/icestp.F90

    r13721 r13970  
    291291      tn_ice(:,:,:) = t_su(:,:,:)      ! initialisation of surface temp for coupled simu 
    292292      ! 
    293       IF( ln_rstart )   CALL iom_close( numrir )  ! close input ice restart file 
     293      IF( ln_rstart )  THEN 
     294         CALL iom_close( numrir )  ! close input ice restart file 
     295         IF(lrxios) CALL iom_context_finalize(      cr_icerst_cxt         ) 
     296      ENDIF 
    294297      ! 
    295298   END SUBROUTINE ice_init 
Note: See TracChangeset for help on using the changeset viewer.