Changeset 13871
- Timestamp:
- 2020-11-25T12:51:29+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_12905_xios_restart
- Files:
-
- 49 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_12905_xios_restart/src/ICE/ice.F90
r13727 r13871 179 179 LOGICAL , PUBLIC :: ln_cndflx !: use conduction flux as surface boundary condition (instead of qsr and qns) 180 180 LOGICAL , PUBLIC :: ln_cndemulate !: emulate conduction flux (if not provided) 181 LOGICAL , PUBLIC :: lrixios !: use xios to read restart in SI3182 181 ! ! Conduction flux as surface forcing or not 183 182 INTEGER, PUBLIC, PARAMETER :: np_cnd_OFF = 0 !: no forcing from conduction flux (ice thermodynamics forced via qsr and qns) -
NEMO/branches/2020/dev_12905_xios_restart/src/ICE/icedia.F90
r13727 r13871 221 221 IF( ln_rstart ) THEN !* Read the restart file 222 222 ! 223 IF(lr ixios) CALL iom_swap(crixios_context)224 CALL iom_get( numrir, 'kt_ice' , ziter, ldxios = lr ixios )223 IF(lrxios) CALL iom_swap(cr_icerst_cxt) 224 CALL iom_get( numrir, 'kt_ice' , ziter, ldxios = lrxios ) 225 225 IF(lwp) WRITE(numout,*) 226 226 IF(lwp) WRITE(numout,*) 'ice_dia_rst read at time step = ', ziter 227 227 IF(lwp) WRITE(numout,*) '~~~~~~~~~~' 228 CALL iom_get( numrir, 'frc_voltop' , frc_voltop, ldxios = lr ixios )229 CALL iom_get( numrir, 'frc_volbot' , frc_volbot, ldxios = lr ixios )230 CALL iom_get( numrir, 'frc_temtop' , frc_temtop, ldxios = lr ixios )231 CALL iom_get( numrir, 'frc_tembot' , frc_tembot, ldxios = lr ixios )232 CALL iom_get( numrir, 'frc_sal' , frc_sal, ldxios = lr ixios )233 CALL iom_get( numrir, jpdom_auto, 'vol_loc_ini', vol_loc_ini, ldxios = lr ixios )234 CALL iom_get( numrir, jpdom_auto, 'tem_loc_ini', tem_loc_ini, ldxios = lr ixios )235 CALL iom_get( numrir, jpdom_auto, 'sal_loc_ini', sal_loc_ini, ldxios = lr ixios )236 IF(lr ixios) CALL iom_swap(cxios_context)228 CALL iom_get( numrir, 'frc_voltop' , frc_voltop, ldxios = lrxios ) 229 CALL iom_get( numrir, 'frc_volbot' , frc_volbot, ldxios = lrxios ) 230 CALL iom_get( numrir, 'frc_temtop' , frc_temtop, ldxios = lrxios ) 231 CALL iom_get( numrir, 'frc_tembot' , frc_tembot, ldxios = lrxios ) 232 CALL iom_get( numrir, 'frc_sal' , frc_sal, ldxios = lrxios ) 233 CALL iom_get( numrir, jpdom_auto, 'vol_loc_ini', vol_loc_ini, ldxios = lrxios ) 234 CALL iom_get( numrir, jpdom_auto, 'tem_loc_ini', tem_loc_ini, ldxios = lrxios ) 235 CALL iom_get( numrir, jpdom_auto, 'sal_loc_ini', sal_loc_ini, ldxios = lrxios ) 236 IF(lrxios) CALL iom_swap(cxios_context) 237 237 ELSE 238 238 IF(lwp) WRITE(numout,*) … … 263 263 ! Write in numriw (if iter == nitrst) 264 264 ! ------------------ 265 IF( lwxios ) CALL iom_swap( cw ixios_context )265 IF( lwxios ) CALL iom_swap( cw_icerst_cxt ) 266 266 CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop, ldxios = lwxios ) 267 267 CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot, ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/ICE/icedyn_adv_pra.F90
r13727 r13871 955 955 ! 956 956 IF( id1 > 0 ) THEN !** Read the restart file **! 957 IF(lr ixios) CALL iom_swap(crixios_context)957 IF(lrxios) CALL iom_swap(cr_icerst_cxt) 958 958 ! 959 959 ! ! ice thickness 960 CALL iom_get( numrir, jpdom_auto, 'sxice' , sxice , psgn = -1._wp, ldxios = lr ixios )961 CALL iom_get( numrir, jpdom_auto, 'syice' , syice , psgn = -1._wp, ldxios = lr ixios )962 CALL iom_get( numrir, jpdom_auto, 'sxxice', sxxice, ldxios = lr ixios )963 CALL iom_get( numrir, jpdom_auto, 'syyice', syyice, ldxios = lr ixios )964 CALL iom_get( numrir, jpdom_auto, 'sxyice', sxyice, ldxios = lr ixios )960 CALL iom_get( numrir, jpdom_auto, 'sxice' , sxice , psgn = -1._wp, ldxios = lrxios ) 961 CALL iom_get( numrir, jpdom_auto, 'syice' , syice , psgn = -1._wp, ldxios = lrxios ) 962 CALL iom_get( numrir, jpdom_auto, 'sxxice', sxxice, ldxios = lrxios ) 963 CALL iom_get( numrir, jpdom_auto, 'syyice', syyice, ldxios = lrxios ) 964 CALL iom_get( numrir, jpdom_auto, 'sxyice', sxyice, ldxios = lrxios ) 965 965 ! ! snow thickness 966 CALL iom_get( numrir, jpdom_auto, 'sxsn' , sxsn , psgn = -1._wp, ldxios = lr ixios )967 CALL iom_get( numrir, jpdom_auto, 'sysn' , sysn , psgn = -1._wp, ldxios = lr ixios )968 CALL iom_get( numrir, jpdom_auto, 'sxxsn' , sxxsn, ldxios = lr ixios )969 CALL iom_get( numrir, jpdom_auto, 'syysn' , syysn, ldxios = lr ixios )970 CALL iom_get( numrir, jpdom_auto, 'sxysn' , sxysn, ldxios = lr ixios )966 CALL iom_get( numrir, jpdom_auto, 'sxsn' , sxsn , psgn = -1._wp, ldxios = lrxios ) 967 CALL iom_get( numrir, jpdom_auto, 'sysn' , sysn , psgn = -1._wp, ldxios = lrxios ) 968 CALL iom_get( numrir, jpdom_auto, 'sxxsn' , sxxsn, ldxios = lrxios ) 969 CALL iom_get( numrir, jpdom_auto, 'syysn' , syysn, ldxios = lrxios ) 970 CALL iom_get( numrir, jpdom_auto, 'sxysn' , sxysn, ldxios = lrxios ) 971 971 ! ! ice concentration 972 CALL iom_get( numrir, jpdom_auto, 'sxa' , sxa , psgn = -1._wp, ldxios = lr ixios )973 CALL iom_get( numrir, jpdom_auto, 'sya' , sya , psgn = -1._wp, ldxios = lr ixios )974 CALL iom_get( numrir, jpdom_auto, 'sxxa' , sxxa, ldxios = lr ixios )975 CALL iom_get( numrir, jpdom_auto, 'syya' , syya, ldxios = lr ixios )976 CALL iom_get( numrir, jpdom_auto, 'sxya' , sxya, ldxios = lr ixios )972 CALL iom_get( numrir, jpdom_auto, 'sxa' , sxa , psgn = -1._wp, ldxios = lrxios ) 973 CALL iom_get( numrir, jpdom_auto, 'sya' , sya , psgn = -1._wp, ldxios = lrxios ) 974 CALL iom_get( numrir, jpdom_auto, 'sxxa' , sxxa, ldxios = lrxios ) 975 CALL iom_get( numrir, jpdom_auto, 'syya' , syya, ldxios = lrxios ) 976 CALL iom_get( numrir, jpdom_auto, 'sxya' , sxya, ldxios = lrxios ) 977 977 ! ! ice salinity 978 CALL iom_get( numrir, jpdom_auto, 'sxsal' , sxsal , psgn = -1._wp, ldxios = lr ixios )979 CALL iom_get( numrir, jpdom_auto, 'sysal' , sysal , psgn = -1._wp, ldxios = lr ixios )980 CALL iom_get( numrir, jpdom_auto, 'sxxsal', sxxsal, ldxios = lr ixios )981 CALL iom_get( numrir, jpdom_auto, 'syysal', syysal, ldxios = lr ixios )982 CALL iom_get( numrir, jpdom_auto, 'sxysal', sxysal, ldxios = lr ixios )978 CALL iom_get( numrir, jpdom_auto, 'sxsal' , sxsal , psgn = -1._wp, ldxios = lrxios ) 979 CALL iom_get( numrir, jpdom_auto, 'sysal' , sysal , psgn = -1._wp, ldxios = lrxios ) 980 CALL iom_get( numrir, jpdom_auto, 'sxxsal', sxxsal, ldxios = lrxios ) 981 CALL iom_get( numrir, jpdom_auto, 'syysal', syysal, ldxios = lrxios ) 982 CALL iom_get( numrir, jpdom_auto, 'sxysal', sxysal, ldxios = lrxios ) 983 983 ! ! ice age 984 CALL iom_get( numrir, jpdom_auto, 'sxage' , sxage , psgn = -1._wp, ldxios = lr ixios )985 CALL iom_get( numrir, jpdom_auto, 'syage' , syage , psgn = -1._wp, ldxios = lr ixios )986 CALL iom_get( numrir, jpdom_auto, 'sxxage', sxxage, ldxios = lr ixios )987 CALL iom_get( numrir, jpdom_auto, 'syyage', syyage, ldxios = lr ixios )988 CALL iom_get( numrir, jpdom_auto, 'sxyage', sxyage, ldxios = lr ixios )984 CALL iom_get( numrir, jpdom_auto, 'sxage' , sxage , psgn = -1._wp, ldxios = lrxios ) 985 CALL iom_get( numrir, jpdom_auto, 'syage' , syage , psgn = -1._wp, ldxios = lrxios ) 986 CALL iom_get( numrir, jpdom_auto, 'sxxage', sxxage, ldxios = lrxios ) 987 CALL iom_get( numrir, jpdom_auto, 'syyage', syyage, ldxios = lrxios ) 988 CALL iom_get( numrir, jpdom_auto, 'sxyage', sxyage, ldxios = lrxios ) 989 989 ! ! snow layers heat content 990 990 DO jk = 1, nlay_s 991 991 WRITE(zchar1,'(I2.2)') jk 992 992 znam = 'sxc0'//'_l'//zchar1 993 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lr ixios ) ; sxc0 (:,:,jk,:) = z3d(:,:,:)993 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lrxios ) ; sxc0 (:,:,jk,:) = z3d(:,:,:) 994 994 znam = 'syc0'//'_l'//zchar1 995 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lr ixios ) ; syc0 (:,:,jk,:) = z3d(:,:,:)995 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lrxios ) ; syc0 (:,:,jk,:) = z3d(:,:,:) 996 996 znam = 'sxxc0'//'_l'//zchar1 997 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios ) ; sxxc0(:,:,jk,:) = z3d(:,:,:)997 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) ; sxxc0(:,:,jk,:) = z3d(:,:,:) 998 998 znam = 'syyc0'//'_l'//zchar1 999 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios ) ; syyc0(:,:,jk,:) = z3d(:,:,:)999 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) ; syyc0(:,:,jk,:) = z3d(:,:,:) 1000 1000 znam = 'sxyc0'//'_l'//zchar1 1001 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios ) ; sxyc0(:,:,jk,:) = z3d(:,:,:)1001 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) ; sxyc0(:,:,jk,:) = z3d(:,:,:) 1002 1002 END DO 1003 1003 ! ! ice layers heat content … … 1005 1005 WRITE(zchar1,'(I2.2)') jk 1006 1006 znam = 'sxe'//'_l'//zchar1 1007 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lr ixios ) ; sxe (:,:,jk,:) = z3d(:,:,:)1007 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lrxios ) ; sxe (:,:,jk,:) = z3d(:,:,:) 1008 1008 znam = 'sye'//'_l'//zchar1 1009 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lr ixios ) ; sye (:,:,jk,:) = z3d(:,:,:)1009 CALL iom_get( numrir, jpdom_auto, znam , z3d, psgn = -1._wp, ldxios = lrxios ) ; sye (:,:,jk,:) = z3d(:,:,:) 1010 1010 znam = 'sxxe'//'_l'//zchar1 1011 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios ) ; sxxe(:,:,jk,:) = z3d(:,:,:)1011 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) ; sxxe(:,:,jk,:) = z3d(:,:,:) 1012 1012 znam = 'syye'//'_l'//zchar1 1013 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios ) ; syye(:,:,jk,:) = z3d(:,:,:)1013 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) ; syye(:,:,jk,:) = z3d(:,:,:) 1014 1014 znam = 'sxye'//'_l'//zchar1 1015 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios ) ; sxye(:,:,jk,:) = z3d(:,:,:)1015 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) ; sxye(:,:,jk,:) = z3d(:,:,:) 1016 1016 END DO 1017 1017 ! 1018 1018 IF( ln_pnd_LEV ) THEN ! melt pond fraction 1019 1019 IF( iom_varid( numrir, 'sxap', ldstop = .FALSE. ) > 0 ) THEN 1020 CALL iom_get( numrir, jpdom_auto, 'sxap' , sxap , psgn = -1._wp, ldxios = lr ixios )1021 CALL iom_get( numrir, jpdom_auto, 'syap' , syap , psgn = -1._wp, ldxios = lr ixios )1022 CALL iom_get( numrir, jpdom_auto, 'sxxap', sxxap, ldxios = lr ixios )1023 CALL iom_get( numrir, jpdom_auto, 'syyap', syyap, ldxios = lr ixios )1024 CALL iom_get( numrir, jpdom_auto, 'sxyap', sxyap, ldxios = lr ixios )1020 CALL iom_get( numrir, jpdom_auto, 'sxap' , sxap , psgn = -1._wp, ldxios = lrxios ) 1021 CALL iom_get( numrir, jpdom_auto, 'syap' , syap , psgn = -1._wp, ldxios = lrxios ) 1022 CALL iom_get( numrir, jpdom_auto, 'sxxap', sxxap, ldxios = lrxios ) 1023 CALL iom_get( numrir, jpdom_auto, 'syyap', syyap, ldxios = lrxios ) 1024 CALL iom_get( numrir, jpdom_auto, 'sxyap', sxyap, ldxios = lrxios ) 1025 1025 ! ! melt pond volume 1026 CALL iom_get( numrir, jpdom_auto, 'sxvp' , sxvp , psgn = -1._wp, ldxios = lr ixios )1027 CALL iom_get( numrir, jpdom_auto, 'syvp' , syvp , psgn = -1._wp, ldxios = lr ixios )1028 CALL iom_get( numrir, jpdom_auto, 'sxxvp', sxxvp, ldxios = lr ixios )1029 CALL iom_get( numrir, jpdom_auto, 'syyvp', syyvp, ldxios = lr ixios )1030 CALL iom_get( numrir, jpdom_auto, 'sxyvp', sxyvp, ldxios = lr ixios )1026 CALL iom_get( numrir, jpdom_auto, 'sxvp' , sxvp , psgn = -1._wp, ldxios = lrxios ) 1027 CALL iom_get( numrir, jpdom_auto, 'syvp' , syvp , psgn = -1._wp, ldxios = lrxios ) 1028 CALL iom_get( numrir, jpdom_auto, 'sxxvp', sxxvp, ldxios = lrxios ) 1029 CALL iom_get( numrir, jpdom_auto, 'syyvp', syyvp, ldxios = lrxios ) 1030 CALL iom_get( numrir, jpdom_auto, 'sxyvp', sxyvp, ldxios = lrxios ) 1031 1031 ELSE 1032 1032 sxap = 0._wp ; syap = 0._wp ; sxxap = 0._wp ; syyap = 0._wp ; sxyap = 0._wp ! melt pond fraction … … 1036 1036 IF ( ln_pnd_lids ) THEN ! melt pond lid volume 1037 1037 IF( iom_varid( numrir, 'sxvl', ldstop = .FALSE. ) > 0 ) THEN 1038 CALL iom_get( numrir, jpdom_auto, 'sxvl' , sxvl , psgn = -1._wp, ldxios = lr ixios )1039 CALL iom_get( numrir, jpdom_auto, 'syvl' , syvl , psgn = -1._wp, ldxios = lr ixios )1040 CALL iom_get( numrir, jpdom_auto, 'sxxvl', sxxvl, ldxios = lr ixios )1041 CALL iom_get( numrir, jpdom_auto, 'syyvl', syyvl, ldxios = lr ixios )1042 CALL iom_get( numrir, jpdom_auto, 'sxyvl', sxyvl, ldxios = lr ixios )1038 CALL iom_get( numrir, jpdom_auto, 'sxvl' , sxvl , psgn = -1._wp, ldxios = lrxios ) 1039 CALL iom_get( numrir, jpdom_auto, 'syvl' , syvl , psgn = -1._wp, ldxios = lrxios ) 1040 CALL iom_get( numrir, jpdom_auto, 'sxxvl', sxxvl, ldxios = lrxios ) 1041 CALL iom_get( numrir, jpdom_auto, 'syyvl', syyvl, ldxios = lrxios ) 1042 CALL iom_get( numrir, jpdom_auto, 'sxyvl', sxyvl, ldxios = lrxios ) 1043 1043 ELSE 1044 1044 sxvl = 0._wp; syvl = 0._wp ; sxxvl = 0._wp ; syyvl = 0._wp ; sxyvl = 0._wp ! melt pond lid volume … … 1046 1046 ENDIF 1047 1047 ENDIF 1048 IF(lr ixios) CALL iom_swap(cxios_context)1048 IF(lrxios) CALL iom_swap(cxios_context) 1049 1049 ! 1050 1050 ELSE !** start rheology from rest **! … … 1079 1079 ! 1080 1080 ! ! ice thickness 1081 IF( lwxios ) CALL iom_swap( cw ixios_context )1081 IF( lwxios ) CALL iom_swap( cw_icerst_cxt ) 1082 1082 CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice, ldxios = lwxios) 1083 1083 CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice, ldxios = lwxios) -
NEMO/branches/2020/dev_12905_xios_restart/src/ICE/icedyn_rhg_evp.F90
r13727 r13871 1005 1005 IF( ln_rstart ) THEN !* Read the restart file 1006 1006 ! 1007 IF(lr ixios) CALL iom_swap(crixios_context)1007 IF(lrxios) CALL iom_swap(cr_icerst_cxt) 1008 1008 id1 = iom_varid( numrir, 'stress1_i' , ldstop = .FALSE. ) 1009 1009 id2 = iom_varid( numrir, 'stress2_i' , ldstop = .FALSE. ) … … 1011 1011 ! 1012 1012 IF( MIN( id1, id2, id3 ) > 0 ) THEN ! fields exist 1013 CALL iom_get( numrir, jpdom_auto, 'stress1_i' , stress1_i , cd_type = 'T', ldxios = lr ixios )1014 CALL iom_get( numrir, jpdom_auto, 'stress2_i' , stress2_i , cd_type = 'T', ldxios = lr ixios )1015 CALL iom_get( numrir, jpdom_auto, 'stress12_i', stress12_i, cd_type = 'F', ldxios = lr ixios )1013 CALL iom_get( numrir, jpdom_auto, 'stress1_i' , stress1_i , cd_type = 'T', ldxios = lrxios ) 1014 CALL iom_get( numrir, jpdom_auto, 'stress2_i' , stress2_i , cd_type = 'T', ldxios = lrxios ) 1015 CALL iom_get( numrir, jpdom_auto, 'stress12_i', stress12_i, cd_type = 'F', ldxios = lrxios ) 1016 1016 ELSE ! start rheology from rest 1017 1017 IF(lwp) WRITE(numout,*) … … 1021 1021 stress12_i(:,:) = 0._wp 1022 1022 ENDIF 1023 IF(lr ixios) CALL iom_swap(cxios_context)1023 IF(lrxios) CALL iom_swap(cxios_context) 1024 1024 ELSE !* Start from rest 1025 1025 IF(lwp) WRITE(numout,*) … … 1035 1035 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 1036 1036 ! 1037 IF( lwxios ) CALL iom_swap( cw ixios_context )1037 IF( lwxios ) CALL iom_swap( cw_icerst_cxt ) 1038 1038 CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i, ldxios = lwxios ) 1039 1039 CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i, ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/ICE/icerst.F90
r13750 r13871 89 89 ELSE 90 90 #if defined key_iomput 91 cw ixios_context = "rstwi_"//TRIM(ADJUSTL(clkt))91 cw_icerst_cxt = "rstwi_"//TRIM(ADJUSTL(clkt)) 92 92 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 93 93 clpname = clname … … 95 95 clpname = TRIM(Agrif_CFixed())//"_"//clname 96 96 ENDIF 97 CALL iom_init( cw ixios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. )97 CALL iom_init( cw_icerst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. ) 98 98 CALL iom_swap( cxios_context ) 99 99 #else … … 138 138 ! ------------------ 139 139 ! ! calendar control 140 IF( lwxios ) CALL iom_swap( cw ixios_context )140 IF( lwxios ) CALL iom_swap( cw_icerst_cxt ) 141 141 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ), ldxios = lwxios ) ! time-step 142 142 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ), ldxios = lwxios ) ! date … … 183 183 CALL iom_close( numriw ) 184 184 ELSE 185 CALL iom_context_finalize( cw ixios_context )185 CALL iom_context_finalize( cw_icerst_cxt ) 186 186 ENDIF 187 187 lrst_ice = .FALSE. … … 217 217 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir ) 218 218 219 lrixios = lrxios.AND.lxios_sini 220 IF( lrixios) THEN 221 crixios_context = 'si3_rst' 219 IF( lrxios) THEN 220 cr_icerst_cxt = 'si3_rst' 222 221 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for SI3' 223 222 IF( TRIM(Agrif_CFixed()) == '0' ) THEN … … 226 225 clpname = TRIM(Agrif_CFixed())//"_"//cn_icerst_in 227 226 ENDIF 228 CALL iom_init( cr ixios_context, fname = TRIM(cn_icerst_indir)//'/'//TRIM(clpname), &227 CALL iom_init( cr_icerst_cxt, fname = TRIM(cn_icerst_indir)//'/'//TRIM(clpname), & 229 228 idfp = iom_file(numrir)%nfid, ld_closedef = .TRUE. ) 230 229 ENDIF … … 236 235 IF( id0 > 0 ) THEN ! == case of a normal restart == ! 237 236 ! ! ------------------------------ ! 238 IF(lr ixios) CALL iom_swap(crixios_context)237 IF(lrxios) CALL iom_swap(cr_icerst_cxt) 239 238 ! Time info 240 CALL iom_get( numrir, 'nn_fsbc', zfice, ldxios = lr ixios )241 CALL iom_get( numrir, 'kt_ice' , ziter, ldxios = lr ixios )239 CALL iom_get( numrir, 'nn_fsbc', zfice, ldxios = lrxios ) 240 CALL iom_get( numrir, 'kt_ice' , ziter, ldxios = lrxios ) 242 241 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 243 242 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 … … 254 253 255 254 ! --- mandatory fields --- ! 256 CALL iom_get( numrir, jpdom_auto, 'v_i' , v_i , ldxios = lr ixios )257 CALL iom_get( numrir, jpdom_auto, 'v_s' , v_s , ldxios = lr ixios )258 CALL iom_get( numrir, jpdom_auto, 'sv_i' , sv_i , ldxios = lr ixios )259 CALL iom_get( numrir, jpdom_auto, 'a_i' , a_i , ldxios = lr ixios )260 CALL iom_get( numrir, jpdom_auto, 't_su' , t_su , ldxios = lr ixios )261 CALL iom_get( numrir, jpdom_auto, 'u_ice', u_ice, cd_type = 'U', psgn = -1._wp, ldxios = lr ixios )262 CALL iom_get( numrir, jpdom_auto, 'v_ice', v_ice, cd_type = 'V', psgn = -1._wp, ldxios = lr ixios )255 CALL iom_get( numrir, jpdom_auto, 'v_i' , v_i , ldxios = lrxios ) 256 CALL iom_get( numrir, jpdom_auto, 'v_s' , v_s , ldxios = lrxios ) 257 CALL iom_get( numrir, jpdom_auto, 'sv_i' , sv_i , ldxios = lrxios ) 258 CALL iom_get( numrir, jpdom_auto, 'a_i' , a_i , ldxios = lrxios ) 259 CALL iom_get( numrir, jpdom_auto, 't_su' , t_su , ldxios = lrxios ) 260 CALL iom_get( numrir, jpdom_auto, 'u_ice', u_ice, cd_type = 'U', psgn = -1._wp, ldxios = lrxios ) 261 CALL iom_get( numrir, jpdom_auto, 'v_ice', v_ice, cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 263 262 ! Snow enthalpy 264 263 DO jk = 1, nlay_s 265 264 WRITE(zchar1,'(I2.2)') jk 266 265 znam = 'e_s'//'_l'//zchar1 267 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios )266 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) 268 267 e_s(:,:,jk,:) = z3d(:,:,:) 269 268 END DO … … 272 271 WRITE(zchar1,'(I2.2)') jk 273 272 znam = 'e_i'//'_l'//zchar1 274 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lr ixios )273 CALL iom_get( numrir, jpdom_auto, znam , z3d, ldxios = lrxios ) 275 274 e_i(:,:,jk,:) = z3d(:,:,:) 276 275 END DO … … 279 278 id1 = iom_varid( numrir, 'oa_i' , ldstop = .FALSE. ) 280 279 IF( id1 > 0 ) THEN ! fields exist 281 CALL iom_get( numrir, jpdom_auto, 'oa_i', oa_i, ldxios = lr ixios )280 CALL iom_get( numrir, jpdom_auto, 'oa_i', oa_i, ldxios = lrxios ) 282 281 ELSE ! start from rest 283 282 IF(lwp) WRITE(numout,*) ' ==>> previous run without ice age output then set it to zero' … … 287 286 id2 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 288 287 IF( id2 > 0 ) THEN ! fields exist 289 CALL iom_get( numrir, jpdom_auto, 'a_ip' , a_ip, ldxios = lr ixios )290 CALL iom_get( numrir, jpdom_auto, 'v_ip' , v_ip, ldxios = lr ixios )288 CALL iom_get( numrir, jpdom_auto, 'a_ip' , a_ip, ldxios = lrxios ) 289 CALL iom_get( numrir, jpdom_auto, 'v_ip' , v_ip, ldxios = lrxios ) 291 290 ELSE ! start from rest 292 291 IF(lwp) WRITE(numout,*) ' ==>> previous run without melt ponds output then set it to zero' … … 297 296 id3 = iom_varid( numrir, 'v_il' , ldstop = .FALSE. ) 298 297 IF( id3 > 0 ) THEN 299 CALL iom_get( numrir, jpdom_auto, 'v_il', v_il, ldxios = lr ixios)298 CALL iom_get( numrir, jpdom_auto, 'v_il', v_il, ldxios = lrxios) 300 299 ELSE 301 300 IF(lwp) WRITE(numout,*) ' ==>> previous run without melt ponds lids output then set it to zero' … … 307 306 id5 = iom_varid( numrir, 't1_ice' , ldstop = .FALSE. ) 308 307 IF( id4 > 0 .AND. id5 > 0 ) THEN ! fields exist 309 CALL iom_get( numrir, jpdom_auto, 'cnd_ice', cnd_ice, ldxios = lr ixios )310 CALL iom_get( numrir, jpdom_auto, 't1_ice' , t1_ice , ldxios = lr ixios )308 CALL iom_get( numrir, jpdom_auto, 'cnd_ice', cnd_ice, ldxios = lrxios ) 309 CALL iom_get( numrir, jpdom_auto, 't1_ice' , t1_ice , ldxios = lrxios ) 311 310 ELSE ! start from rest 312 311 IF(lwp) WRITE(numout,*) ' ==>> previous run without conductivity output then set it to zero' … … 317 316 318 317 CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables 319 IF(lr ixios) CALL iom_swap(cxios_context)318 IF(lrxios) CALL iom_swap(cxios_context) 320 319 ! ! ---------------------------------- ! 321 320 ELSE ! == case of a simplified restart == ! -
NEMO/branches/2020/dev_12905_xios_restart/src/ICE/icestp.F90
r13727 r13871 293 293 IF( ln_rstart ) THEN 294 294 CALL iom_close( numrir ) ! close input ice restart file 295 IF(lr ixios) CALL iom_context_finalize( crixios_context )295 IF(lrxios) CALL iom_context_finalize( cr_icerst_cxt ) 296 296 ENDIF 297 297 ! -
NEMO/branches/2020/dev_12905_xios_restart/src/ICE/iceupdate.F90
r13727 r13871 427 427 ! 428 428 IF( id1 > 0 ) THEN ! fields exist 429 IF(lr ixios) CALL iom_swap(crixios_context)430 CALL iom_get( numrir, jpdom_auto, 'snwice_mass' , snwice_mass , ldxios = lr ixios )431 CALL iom_get( numrir, jpdom_auto, 'snwice_mass_b', snwice_mass_b, ldxios = lr ixios )432 IF(lr ixios) CALL iom_swap(cxios_context)429 IF(lrxios) CALL iom_swap(cr_icerst_cxt) 430 CALL iom_get( numrir, jpdom_auto, 'snwice_mass' , snwice_mass , ldxios = lrxios ) 431 CALL iom_get( numrir, jpdom_auto, 'snwice_mass_b', snwice_mass_b, ldxios = lrxios ) 432 IF(lrxios) CALL iom_swap(cxios_context) 433 433 ELSE ! start from rest 434 434 IF(lwp) WRITE(numout,*) ' ==>> previous run without snow-ice mass output then set it' … … 447 447 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 448 448 ! 449 IF( lwxios ) CALL iom_swap( cw ixios_context )449 IF( lwxios ) CALL iom_swap( cw_icerst_cxt ) 450 450 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass' , snwice_mass, ldxios = lwxios ) 451 451 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass_b', snwice_mass_b, ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/DIA/diahsb.F90
r13727 r13871 267 267 IF(lwp) WRITE(numout,*) ' dia_hsb_rst : read hsb restart at it= ', kt,' date= ', ndastp 268 268 IF(lwp) WRITE(numout,*) 269 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )270 CALL iom_get( numror, 'frc_v', frc_v, ldxios = lr oxios )271 CALL iom_get( numror, 'frc_t', frc_t, ldxios = lr oxios )272 CALL iom_get( numror, 'frc_s', frc_s, ldxios = lr oxios )269 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 270 CALL iom_get( numror, 'frc_v', frc_v, ldxios = lrxios ) 271 CALL iom_get( numror, 'frc_t', frc_t, ldxios = lrxios ) 272 CALL iom_get( numror, 'frc_s', frc_s, ldxios = lrxios ) 273 273 IF( ln_linssh ) THEN 274 CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lr oxios )275 CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lr oxios )274 CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lrxios ) 275 CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios ) 276 276 ENDIF 277 CALL iom_get( numror, jpdom_auto, 'surf_ini' , surf_ini , ldxios = lr oxios ) ! ice sheet coupling278 CALL iom_get( numror, jpdom_auto, 'ssh_ini' , ssh_ini , ldxios = lr oxios )279 CALL iom_get( numror, jpdom_auto, 'e3t_ini' , e3t_ini , ldxios = lr oxios )280 CALL iom_get( numror, jpdom_auto, 'tmask_ini' , tmask_ini , ldxios = lr oxios )281 CALL iom_get( numror, jpdom_auto, 'hc_loc_ini', hc_loc_ini, ldxios = lr oxios )282 CALL iom_get( numror, jpdom_auto, 'sc_loc_ini', sc_loc_ini, ldxios = lr oxios )277 CALL iom_get( numror, jpdom_auto, 'surf_ini' , surf_ini , ldxios = lrxios ) ! ice sheet coupling 278 CALL iom_get( numror, jpdom_auto, 'ssh_ini' , ssh_ini , ldxios = lrxios ) 279 CALL iom_get( numror, jpdom_auto, 'e3t_ini' , e3t_ini , ldxios = lrxios ) 280 CALL iom_get( numror, jpdom_auto, 'tmask_ini' , tmask_ini , ldxios = lrxios ) 281 CALL iom_get( numror, jpdom_auto, 'hc_loc_ini', hc_loc_ini, ldxios = lrxios ) 282 CALL iom_get( numror, jpdom_auto, 'sc_loc_ini', sc_loc_ini, ldxios = lrxios ) 283 283 IF( ln_linssh ) THEN 284 CALL iom_get( numror, jpdom_auto, 'ssh_hc_loc_ini', ssh_hc_loc_ini, ldxios = lr oxios )285 CALL iom_get( numror, jpdom_auto, 'ssh_sc_loc_ini', ssh_sc_loc_ini, ldxios = lr oxios )284 CALL iom_get( numror, jpdom_auto, 'ssh_hc_loc_ini', ssh_hc_loc_ini, ldxios = lrxios ) 285 CALL iom_get( numror, jpdom_auto, 'ssh_sc_loc_ini', ssh_sc_loc_ini, ldxios = lrxios ) 286 286 ENDIF 287 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )287 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 288 288 ELSE 289 289 IF(lwp) WRITE(numout,*) … … 325 325 IF(lwp) WRITE(numout,*) 326 326 ! 327 IF( lwxios ) CALL iom_swap( cw xios_context )327 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 328 328 CALL iom_rstput( kt, nitrst, numrow, 'frc_v', frc_v, ldxios = lwxios ) 329 329 CALL iom_rstput( kt, nitrst, numrow, 'frc_t', frc_t, ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/DOM/daymod.F90
r13727 r13871 316 316 317 317 IF( TRIM(cdrw) == 'READ' ) THEN 318 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )318 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 319 319 IF( iom_varid( numror, 'kt', ldstop = .FALSE. ) > 0 ) THEN 320 320 ! Get Calendar informations 321 CALL iom_get( numror, 'kt', zkt, ldxios = lr oxios ) ! last time-step of previous run321 CALL iom_get( numror, 'kt', zkt, ldxios = lrxios ) ! last time-step of previous run 322 322 IF(lwp) THEN 323 323 WRITE(numout,*) ' *** Info read in restart : ' … … 338 338 IF ( nrstdt == 2 ) THEN 339 339 ! read the parameters corresponding to nit000 - 1 (last time step of previous run) 340 CALL iom_get( numror, 'ndastp', zndastp, ldxios = lr oxios )340 CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios ) 341 341 ndastp = NINT( zndastp ) 342 CALL iom_get( numror, 'adatrj', adatrj , ldxios = lr oxios )343 CALL iom_get( numror, 'ntime' , ktime , ldxios = lr oxios )342 CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios ) 343 CALL iom_get( numror, 'ntime' , ktime , ldxios = lrxios ) 344 344 nn_time0 = NINT(ktime) 345 345 ! calculate start time in hours and minutes … … 384 384 adatrj = ( REAL( nit000-1, wp ) * rn_Dt ) / rday 385 385 ENDIF 386 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )386 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 387 387 IF( ABS(adatrj - REAL(NINT(adatrj),wp)) < 0.1 / rday ) adatrj = REAL(NINT(adatrj),wp) ! avoid truncation error 388 388 ! … … 403 403 ENDIF 404 404 ! calendar control 405 IF( lwxios ) CALL iom_swap( cw xios_context )405 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 406 406 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step 407 407 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/DOM/domvvl.F90
r13727 r13871 785 785 IF( ln_rstart ) THEN !* Read the restart file 786 786 CALL rst_read_open ! open the restart file if necessary 787 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )788 CALL iom_get( numror, jpdom_auto, 'sshn' , ssh(:,:,Kmm), ldxios = lr oxios )787 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 788 CALL iom_get( numror, jpdom_auto, 'sshn' , ssh(:,:,Kmm), ldxios = lrxios ) 789 789 ! 790 790 id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) … … 799 799 ! 800 800 IF( MIN( id1, id2 ) > 0 ) THEN ! all required arrays exist 801 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lr oxios )802 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lr oxios )801 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 802 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 803 803 ! needed to restart if land processor not computed 804 804 IF(lwp) write(numout,*) 'dom_vvl_rst : e3t(:,:,:,Kbb) and e3t(:,:,:,Kmm) found in restart files' … … 814 814 IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 815 815 IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 816 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lr oxios )816 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 817 817 e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 818 818 l_1st_euler = .true. … … 821 821 IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 822 822 IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 823 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lr oxios )823 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 824 824 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 825 825 l_1st_euler = .true. … … 846 846 ! ! ----------------------- ! 847 847 IF( MIN( id3, id4 ) > 0 ) THEN ! all required arrays exist 848 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lr oxios )849 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lr oxios )848 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 849 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 850 850 ELSE ! one at least array is missing 851 851 tilde_e3t_b(:,:,:) = 0.0_wp … … 856 856 ! ! ------------ ! 857 857 IF( id5 > 0 ) THEN ! required array exists 858 CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lr oxios )858 CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 859 859 ELSE ! array is missing 860 860 hdiv_lf(:,:,:) = 0.0_wp … … 862 862 ENDIF 863 863 ENDIF 864 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )864 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 865 865 ! 866 866 ELSE !* Initialize at "rest" … … 930 930 ! ! =================== 931 931 IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 932 IF( lwxios ) CALL iom_swap( cw xios_context )932 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 933 933 ! ! --------- ! 934 934 ! ! all cases ! -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/DYN/dynspg_ts.F90
r13727 r13871 899 899 IF( TRIM(cdrw) == 'READ' ) THEN ! Read/initialise 900 900 ! ! --------------- 901 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )901 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 902 902 IF( ln_rstart .AND. ln_bt_fw .AND. (.NOT.l_1st_euler) ) THEN !* Read the restart file 903 CALL iom_get( numror, jpdom_auto, 'ub2_b' , ub2_b (:,:), cd_type = 'U', psgn = -1._wp, ldxios = lr oxios )904 CALL iom_get( numror, jpdom_auto, 'vb2_b' , vb2_b (:,:), cd_type = 'V', psgn = -1._wp, ldxios = lr oxios )905 CALL iom_get( numror, jpdom_auto, 'un_bf' , un_bf (:,:), cd_type = 'U', psgn = -1._wp, ldxios = lr oxios )906 CALL iom_get( numror, jpdom_auto, 'vn_bf' , vn_bf (:,:), cd_type = 'V', psgn = -1._wp, ldxios = lr oxios )903 CALL iom_get( numror, jpdom_auto, 'ub2_b' , ub2_b (:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios ) 904 CALL iom_get( numror, jpdom_auto, 'vb2_b' , vb2_b (:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 905 CALL iom_get( numror, jpdom_auto, 'un_bf' , un_bf (:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios ) 906 CALL iom_get( numror, jpdom_auto, 'vn_bf' , vn_bf (:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 907 907 IF( .NOT.ln_bt_av ) THEN 908 CALL iom_get( numror, jpdom_auto, 'sshbb_e' , sshbb_e(:,:), cd_type = 'T', psgn = 1._wp, ldxios = lr oxios )909 CALL iom_get( numror, jpdom_auto, 'ubb_e' , ubb_e(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lr oxios )910 CALL iom_get( numror, jpdom_auto, 'vbb_e' , vbb_e(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lr oxios )911 CALL iom_get( numror, jpdom_auto, 'sshb_e' , sshb_e(:,:), cd_type = 'T', psgn = 1._wp, ldxios = lr oxios )912 CALL iom_get( numror, jpdom_auto, 'ub_e' , ub_e(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lr oxios )913 CALL iom_get( numror, jpdom_auto, 'vb_e' , vb_e(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lr oxios )908 CALL iom_get( numror, jpdom_auto, 'sshbb_e' , sshbb_e(:,:), cd_type = 'T', psgn = 1._wp, ldxios = lrxios ) 909 CALL iom_get( numror, jpdom_auto, 'ubb_e' , ubb_e(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios ) 910 CALL iom_get( numror, jpdom_auto, 'vbb_e' , vbb_e(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 911 CALL iom_get( numror, jpdom_auto, 'sshb_e' , sshb_e(:,:), cd_type = 'T', psgn = 1._wp, ldxios = lrxios ) 912 CALL iom_get( numror, jpdom_auto, 'ub_e' , ub_e(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios ) 913 CALL iom_get( numror, jpdom_auto, 'vb_e' , vb_e(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 914 914 ENDIF 915 915 #if defined key_agrif 916 916 ! Read time integrated fluxes 917 917 IF ( .NOT.Agrif_Root() ) THEN 918 CALL iom_get( numror, jpdom_auto, 'ub2_i_b' , ub2_i_b(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lr oxios )919 CALL iom_get( numror, jpdom_auto, 'vb2_i_b' , vb2_i_b(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lr oxios )918 CALL iom_get( numror, jpdom_auto, 'ub2_i_b' , ub2_i_b(:,:), cd_type = 'U', psgn = -1._wp, ldxios = lrxios ) 919 CALL iom_get( numror, jpdom_auto, 'vb2_i_b' , vb2_i_b(:,:), cd_type = 'V', psgn = -1._wp, ldxios = lrxios ) 920 920 ELSE 921 921 ub2_i_b(:,:) = 0._wp ; vb2_i_b(:,:) = 0._wp ! used in the 1st update of agrif … … 932 932 #endif 933 933 ENDIF 934 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )934 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 935 935 ! 936 936 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN ! Create restart file 937 937 ! ! ------------------- 938 938 IF(lwp) WRITE(numout,*) '---- ts_rst ----' 939 IF( lwxios ) CALL iom_swap( cw xios_context )939 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 940 940 CALL iom_rstput( kt, nitrst, numrow, 'ub2_b' , ub2_b (:,:), ldxios = lwxios ) 941 941 CALL iom_rstput( kt, nitrst, numrow, 'vb2_b' , vb2_b (:,:), ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/in_out_manager.F90
r13727 r13871 166 166 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 167 167 CHARACTER(LEN=lc) :: cxios_context !: context name used in xios 168 CHARACTER(LEN=lc) :: cr xios_context !: context name used in xios to read OCE restart169 CHARACTER(LEN=lc) :: cw xios_context !: context name used in xios to write OCE restart file170 CHARACTER(LEN=lc) :: cr ixios_context !: context name used in xios to read SI3 restart171 CHARACTER(LEN=lc) :: cw ixios_context !: context name used in xios to write SI3 restart file172 CHARACTER(LEN=lc) :: cr txios_context !: context name used in xios to read TOP restart173 CHARACTER(LEN=lc) :: cw txios_context !: context name used in xios to write TOP restart file174 CHARACTER(LEN=lc) :: cr sxios_context !: context name used in xios to read SEDIMENT restart175 CHARACTER(LEN=lc) :: cw sxios_context !: context name used in xios to write SEDIMENT restart file168 CHARACTER(LEN=lc) :: cr_ocerst_cxt !: context name used in xios to read OCE restart 169 CHARACTER(LEN=lc) :: cw_ocerst_cxt !: context name used in xios to write OCE restart file 170 CHARACTER(LEN=lc) :: cr_icerst_cxt !: context name used in xios to read SI3 restart 171 CHARACTER(LEN=lc) :: cw_icerst_cxt !: context name used in xios to write SI3 restart file 172 CHARACTER(LEN=lc) :: cr_toprst_cxt !: context name used in xios to read TOP restart 173 CHARACTER(LEN=lc) :: cw_toprst_cxt !: context name used in xios to write TOP restart file 174 CHARACTER(LEN=lc) :: cr_sedrst_cxt !: context name used in xios to read SEDIMENT restart 175 CHARACTER(LEN=lc) :: cw_sedrst_cxt !: context name used in xios to write SEDIMENT restart file 176 176 177 177 -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/iom.F90
r13750 r13871 141 141 CALL iom_swap( cdname ) 142 142 143 llrstr = ( TRIM(cdname) == TRIM(crxios_context)) .OR. (TRIM(cdname) == TRIM(crixios_context))144 llrstr = llrstr .OR. ( TRIM(cdname) == TRIM(crtxios_context))145 llrstr = llrstr .OR. ( TRIM(cdname) == TRIM(crsxios_context))146 147 llrstw = ( TRIM(cdname) == TRIM(cwxios_context)) .OR. (TRIM(cdname) == TRIM(cwixios_context))148 llrstw = llrstw .OR. ( TRIM(cdname) == TRIM(cwtxios_context))149 llrstw = llrstw .OR. ( TRIM(cdname) == TRIM(cwsxios_context))143 llrstr = (cdname == cr_ocerst_cxt) .OR. (cdname == cr_icerst_cxt) 144 llrstr = llrstr .OR. (cdname == cr_toprst_cxt) 145 llrstr = llrstr .OR. (cdname == cr_sedrst_cxt) 146 147 llrstw = (cdname == cw_ocerst_cxt) .OR. (cdname == cw_icerst_cxt) 148 llrstw = llrstw .OR. (cdname == cw_toprst_cxt) 149 llrstw = llrstw .OR. (cdname == cw_sedrst_cxt) 150 150 151 151 llrst_context = llrstr .OR. llrstw … … 168 168 IF(.NOT.llrst_context) CALL set_scalar 169 169 ! 170 IF( TRIM(cdname) == TRIM(cxios_context)) THEN170 IF( cdname == cxios_context ) THEN 171 171 CALL set_grid( "T", glamt, gphit, .FALSE., .FALSE. ) 172 172 CALL set_grid( "U", glamu, gphiu, .FALSE., .FALSE. ) … … 212 212 ! vertical grid definition 213 213 IF(.NOT.llrst_context) THEN 214 215 216 217 214 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 215 CALL iom_set_axis_attr( "depthu", paxis = gdept_1d ) 216 CALL iom_set_axis_attr( "depthv", paxis = gdept_1d ) 217 CALL iom_set_axis_attr( "depthw", paxis = gdepw_1d ) 218 218 219 219 ! ABL 220 221 222 223 224 225 226 220 IF( .NOT. ALLOCATED(ght_abl) ) THEN ! force definition for xml files (xios) 221 ALLOCATE( ght_abl(jpka), ghw_abl(jpka), e3t_abl(jpka), e3w_abl(jpka) ) ! default allocation needed by iom 222 ght_abl(:) = -1._wp ; ghw_abl(:) = -1._wp 223 e3t_abl(:) = -1._wp ; e3w_abl(:) = -1._wp 224 ENDIF 225 CALL iom_set_axis_attr( "ght_abl", ght_abl(2:jpka) ) 226 CALL iom_set_axis_attr( "ghw_abl", ghw_abl(2:jpka) ) 227 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 228 ! Add vertical grid bounds 229 zt_bnds(2,: ) = gdept_1d(:) 230 zt_bnds(1,2:jpk ) = gdept_1d(1:jpkm1) 231 zt_bnds(1,1 ) = gdept_1d(1) - e3w_1d(1) 232 zw_bnds(1,: ) = gdepw_1d(:) 233 zw_bnds(2,1:jpkm1) = gdepw_1d(2:jpk) 234 zw_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk) 235 CALL iom_set_axis_attr( "deptht", bounds=zw_bnds ) 236 CALL iom_set_axis_attr( "depthu", bounds=zw_bnds ) 237 CALL iom_set_axis_attr( "depthv", bounds=zw_bnds ) 238 CALL iom_set_axis_attr( "depthw", bounds=zt_bnds ) 239 240 ! ABL 241 za_bnds(1,:) = ghw_abl(1:jpkam1) 242 za_bnds(2,:) = ghw_abl(2:jpka ) 243 CALL iom_set_axis_attr( "ght_abl", bounds=za_bnds ) 244 za_bnds(1,:) = ght_abl(2:jpka ) 245 za_bnds(2,:) = ght_abl(2:jpka ) + e3w_abl(2:jpka) 246 CALL iom_set_axis_attr( "ghw_abl", bounds=za_bnds ) 247 248 CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,jpnfl) /) ) 249 249 # if defined key_si3 250 251 252 250 CALL iom_set_axis_attr( "ncatice", (/ (REAL(ji,wp), ji=1,jpl) /) ) 251 ! SIMIP diagnostics (4 main arctic straits) 252 CALL iom_set_axis_attr( "nstrait", (/ (REAL(ji,wp), ji=1,4) /) ) 253 253 # endif 254 254 #if defined key_top 255 256 #endif 257 258 259 260 261 262 263 264 255 IF( ALLOCATED(profsed) ) CALL iom_set_axis_attr( "profsed", paxis = profsed ) 256 #endif 257 CALL iom_set_axis_attr( "icbcla", class_num ) 258 CALL iom_set_axis_attr( "iax_20C", (/ REAL(20,wp) /) ) ! strange syntaxe and idea... 259 CALL iom_set_axis_attr( "iax_26C", (/ REAL(26,wp) /) ) ! strange syntaxe and idea... 260 CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) ) ! strange syntaxe and idea... 261 ! for diaprt, we need to define an axis which size can be 1 (default) or 5 (if the file subbasins.nc exists) 262 INQUIRE( FILE = 'subbasins.nc', EXIST = ll_exist ) 263 nbasin = 1 + 4 * COUNT( (/ll_exist/) ) 264 CALL iom_set_axis_attr( "basin" , (/ (REAL(ji,wp), ji=1,nbasin) /) ) 265 265 ENDIF 266 266 ! 267 267 ! automatic definitions of some of the xml attributs 268 268 IF(llrstr) THEN 269 270 269 IF(PRESENT(idfp)) THEN 270 CALL iom_set_rst_context(.TRUE.) 271 271 !set which fields will be read from restart file 272 273 274 275 272 CALL iom_set_vars_active(fname, idfp) 273 ELSE 274 CALL ctl_stop( 'iom_init:', 'restart read with XIOS: missing pointer to NETCDF file' ) 275 ENDIF 276 276 ELSE IF(llrstw) THEN 277 277 CALL iom_set_rstw_file(fname) 278 278 ELSE 279 279 CALL set_xmlatt 280 280 ENDIF 281 281 ! … … 301 301 !! 302 302 !!---------------------------------------------------------------------- 303 CHARACTER(len=*), OPTIONAL, INTENT(IN) :: cdname303 CHARACTER(len=*), OPTIONAL, INTENT(IN) :: cdname 304 304 #if defined key_iomput 305 LOGICAL :: llrstw305 LOGICAL :: llrstw 306 306 307 307 llrstw = .FALSE. 308 308 IF(PRESENT(cdname)) THEN 309 llrstw = ( TRIM(cdname) == TRIM(cwxios_context))310 llrstw = llrstw .OR. ( TRIM(cdname) == TRIM(cwixios_context))311 llrstw = llrstw .OR. ( TRIM(cdname) == TRIM(cwtxios_context))312 llrstw = llrstw .OR. ( TRIM(cdname) == TRIM(cwsxios_context))309 llrstw = (cdname == cw_ocerst_cxt) 310 llrstw = llrstw .OR. (cdname == cw_icerst_cxt) 311 llrstw = llrstw .OR. (cdname == cw_toprst_cxt) 312 llrstw = llrstw .OR. (cdname == cw_sedrst_cxt) 313 313 ENDIF 314 314 315 315 IF( llrstw ) THEN 316 316 !set names of the fields in restart file IF using XIOS to write data 317 318 317 CALL iom_set_rst_context(.FALSE.) 318 CALL xios_close_context_definition() 319 319 ELSE 320 321 320 CALL xios_close_context_definition() 321 CALL xios_update_calendar( 0 ) 322 322 ENDIF 323 323 #else … … 335 335 !! id of the file is assumed to be rrestart. 336 336 !!--------------------------------------------------------------------- 337 338 CHARACTER(len=*), INTENT(IN) :: cdfname 339 INTEGER , INTENT(IN) :: idnum 337 CHARACTER(len=*), INTENT(IN) :: cdfname 338 INTEGER , INTENT(IN) :: idnum 340 339 #if defined key_iomput 341 INTEGER :: ndims, nvars, natts, unlimitedDimId, dimlen, xtype,mdims 342 TYPE(xios_field) :: field_hdl 343 TYPE(xios_file) :: file_hdl 344 TYPE(xios_filegroup) :: filegroup_hdl 345 INTEGER :: dimids(4), jv,i, idim 346 CHARACTER(LEN=256) :: clinfo ! info character 347 INTEGER, ALLOCATABLE :: indimlens(:) 348 CHARACTER(LEN=nf90_max_name), ALLOCATABLE :: indimnames(:) 349 CHARACTER(LEN=nf90_max_name) :: dimname, varname 350 LOGICAL :: lmeta 351 352 meta(1) = "nav_lat" 353 meta(2) = "nav_lon" 354 meta(3) = "nav_lev" 355 meta(4) = "time_instant" 356 meta(5) = "time_instant_bounds" 357 meta(6) = "time_counter" 358 meta(7) = "time_counter_bounds" 359 meta(8) = "x" 360 meta(9) = "y" 361 meta(10) = "numcat" 362 363 clinfo = ' iom_set_vars_active, file: '//TRIM(cdfname) 340 INTEGER :: ndims, nvars, natts, unlimitedDimId, dimlen, xtype,mdims 341 TYPE(xios_field) :: field_hdl 342 TYPE(xios_file) :: file_hdl 343 TYPE(xios_filegroup) :: filegroup_hdl 344 INTEGER :: dimids(4), jv,i, idim 345 CHARACTER(LEN=256) :: clinfo ! info character 346 INTEGER, ALLOCATABLE :: indimlens(:) 347 CHARACTER(LEN=nf90_max_name), ALLOCATABLE :: indimnames(:) 348 CHARACTER(LEN=nf90_max_name) :: dimname, varname 349 LOGICAL :: lmeta 350 !metadata in restart file for restart read with XIOS 351 INTEGER, PARAMETER :: NMETA = 10 352 CHARACTER(LEN=lc) :: meta(NMETA) 353 354 355 meta(1) = "nav_lat" 356 meta(2) = "nav_lon" 357 meta(3) = "nav_lev" 358 meta(4) = "time_instant" 359 meta(5) = "time_instant_bounds" 360 meta(6) = "time_counter" 361 meta(7) = "time_counter_bounds" 362 meta(8) = "x" 363 meta(9) = "y" 364 meta(10) = "numcat" 365 366 clinfo = ' iom_set_vars_active, file: '//TRIM(cdfname) 364 367 365 368 !set name of the restart file and enable available fields 366 CALL xios_get_handle("file_definition", filegroup_hdl ) 367 CALL xios_add_child(filegroup_hdl, file_hdl, 'rrestart') 368 CALL xios_set_file_attr( "rrestart", name=trim(cdfname), type="one_file", & 369 par_access="collective", enabled=.TRUE., mode="read", & 370 output_freq=xios_timestep) 371 372 CALL iom_nf90_check( nf90_inquire(idnum, ndims, nvars, natts ), clinfo ) 373 ALLOCATE(indimlens(ndims), indimnames(ndims)) 374 CALL iom_nf90_check( nf90_inquire(idnum, unlimitedDimId = unlimitedDimId ), clinfo ) 375 376 DO idim = 1, ndims 377 CALL iom_nf90_check( nf90_inquire_dimension(idnum, idim, dimname, dimlen ), clinfo ) 378 indimlens(idim) = dimlen 379 indimnames(idim) = dimname 380 ENDDO 381 382 DO jv =1, nvars 383 lmeta = .FALSE. 384 CALL iom_nf90_check( nf90_inquire_variable(idnum, jv, varname, xtype, ndims, dimids, natts ), clinfo ) 385 DO i = 1, NMETA 386 IF(TRIM(varname) == TRIM(meta(i))) THEN 387 lmeta = .TRUE. 388 ENDIF 389 ENDDO 390 IF(.NOT.lmeta) THEN 391 CALL xios_add_child(file_hdl, field_hdl, TRIM(varname)) 392 mdims = ndims 393 394 IF(ANY(dimids(1:ndims) == unlimitedDimId)) THEN 395 mdims = mdims - 1 396 ENDIF 397 398 IF(mdims == 3) THEN 399 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(varname), & 400 domain_ref="grid_N", axis_ref=TRIM(iom_axis(indimlens(dimids(mdims)))), & 401 prec = 8, operation = "instant") 402 ELSEIF(mdims == 2) THEN 403 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(varname), & 404 domain_ref="grid_N", prec = 8, operation = "instant") 405 ELSEIF(mdims == 1) THEN 406 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(varname), & 407 axis_ref=TRIM(iom_axis(indimlens(dimids(mdims)))), prec = 8, operation = "instant") 408 ELSEIF(mdims == 0) THEN 409 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(varname), & 410 scalar_ref = "grid_scalar", prec = 8, operation = "instant") 411 ELSE 412 WRITE(ctmp1,*) 'iom_set_vars_active: variable ', TRIM(varname) ,' incorrect number of dimensions' 413 CALL ctl_stop( 'iom_set_vars_active:', ctmp1 ) 414 ENDIF 369 CALL xios_get_handle("file_definition", filegroup_hdl ) 370 CALL xios_add_child(filegroup_hdl, file_hdl, 'rrestart') 371 CALL xios_set_file_attr( "rrestart", name=trim(cdfname), type="one_file", & 372 par_access="collective", enabled=.TRUE., mode="read", & 373 output_freq=xios_timestep ) 374 375 CALL iom_nf90_check( nf90_inquire(idnum, ndims, nvars, natts ), clinfo ) 376 ALLOCATE(indimlens(ndims), indimnames(ndims)) 377 CALL iom_nf90_check( nf90_inquire(idnum, unlimitedDimId = unlimitedDimId ), clinfo ) 378 379 DO idim = 1, ndims 380 CALL iom_nf90_check( nf90_inquire_dimension(idnum, idim, dimname, dimlen ), clinfo ) 381 indimlens(idim) = dimlen 382 indimnames(idim) = dimname 383 ENDDO 384 385 DO jv =1, nvars 386 lmeta = .FALSE. 387 CALL iom_nf90_check( nf90_inquire_variable(idnum, jv, varname, xtype, ndims, dimids, natts ), clinfo ) 388 DO i = 1, NMETA 389 IF(varname == meta(i)) THEN 390 lmeta = .TRUE. 391 ENDIF 392 ENDDO 393 IF(.NOT.lmeta) THEN 394 CALL xios_add_child(file_hdl, field_hdl, varname) 395 mdims = ndims 396 397 IF(ANY(dimids(1:ndims) == unlimitedDimId)) THEN 398 mdims = mdims - 1 415 399 ENDIF 416 ENDDO 417 DEALLOCATE(indimlens, indimnames) 400 401 IF(mdims == 3) THEN 402 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = varname, & 403 domain_ref="grid_N", & 404 axis_ref=iom_axis(indimlens(dimids(mdims))), & 405 prec = 8, operation = "instant" ) 406 ELSEIF(mdims == 2) THEN 407 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = varname, & 408 domain_ref="grid_N", prec = 8, & 409 operation = "instant" ) 410 ELSEIF(mdims == 1) THEN 411 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = varname, & 412 axis_ref=iom_axis(indimlens(dimids(mdims))), & 413 prec = 8, operation = "instant" ) 414 ELSEIF(mdims == 0) THEN 415 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = varname, & 416 scalar_ref = "grid_scalar", prec = 8, & 417 operation = "instant" ) 418 ELSE 419 WRITE(ctmp1,*) 'iom_set_vars_active: variable ', TRIM(varname) ,' incorrect number of dimensions' 420 CALL ctl_stop( 'iom_set_vars_active:', ctmp1 ) 421 ENDIF 422 ENDIF 423 ENDDO 424 DEALLOCATE(indimlens, indimnames) 418 425 #endif 419 426 END SUBROUTINE iom_set_vars_active … … 425 432 !! ** Purpose : define file name in XIOS context for writing restart 426 433 !!--------------------------------------------------------------------- 427 CHARACTER(len=*) :: cdrst_file434 CHARACTER(len=*) :: cdrst_file 428 435 #if defined key_iomput 429 TYPE(xios_file) :: file_hdl 430 TYPE(xios_filegroup) :: filegroup_hdl 431 INTEGER :: i 432 CHARACTER(lc) :: clpath 436 TYPE(xios_file) :: file_hdl 437 TYPE(xios_filegroup) :: filegroup_hdl 433 438 434 439 !set name of the restart file and enable available fields 435 436 437 438 439 440 mode="write", output_freq=xios_timestep)441 if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in one_file mode'442 443 444 mode="write", output_freq=xios_timestep)445 if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in multiple_file mode'446 447 440 IF(lwp) WRITE(numout,*) 'Setting restart filename (for XIOS write) to: ',cdrst_file 441 CALL xios_get_handle("file_definition", filegroup_hdl ) 442 CALL xios_add_child(filegroup_hdl, file_hdl, 'wrestart') 443 IF(nxioso.eq.1) THEN 444 CALL xios_set_file_attr( "wrestart", type="one_file", enabled=.TRUE.,& 445 mode="write", output_freq=xios_timestep) 446 IF(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in one_file mode' 447 ELSE 448 CALL xios_set_file_attr( "wrestart", type="multiple_file", enabled=.TRUE.,& 449 mode="write", output_freq=xios_timestep) 450 IF(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in multiple_file mode' 451 ENDIF 452 CALL xios_set_file_attr( "wrestart", name=trim(cdrst_file)) 448 453 #endif 449 454 END SUBROUTINE iom_set_rstw_file … … 458 463 !!--------------------------------------------------------------------- 459 464 !sets enabled = .TRUE. for each field in restart file 460 CHARACTER(len = *), INTENT(IN) :: sdfield461 REAL(dp), OPTIONAL, INTENT(IN) :: rd0462 REAL(sp), OPTIONAL, INTENT(IN) :: rs0463 REAL(dp), OPTIONAL, INTENT(IN), DIMENSION(:) :: rd1464 REAL(sp), OPTIONAL, INTENT(IN), DIMENSION(:) :: rs1465 REAL(dp), OPTIONAL, INTENT(IN), DIMENSION(:, :) :: rd2466 REAL(sp), OPTIONAL, INTENT(IN), DIMENSION(:, :) :: rs2467 REAL(dp), OPTIONAL, INTENT(IN), DIMENSION(:, :, :) :: rd3468 REAL(sp), OPTIONAL, INTENT(IN), DIMENSION(:, :, :) :: rs3465 CHARACTER(len = *), INTENT(IN) :: sdfield 466 REAL(dp), OPTIONAL, INTENT(IN) :: rd0 467 REAL(sp), OPTIONAL, INTENT(IN) :: rs0 468 REAL(dp), OPTIONAL, INTENT(IN), DIMENSION(:) :: rd1 469 REAL(sp), OPTIONAL, INTENT(IN), DIMENSION(:) :: rs1 470 REAL(dp), OPTIONAL, INTENT(IN), DIMENSION(:, :) :: rd2 471 REAL(sp), OPTIONAL, INTENT(IN), DIMENSION(:, :) :: rs2 472 REAL(dp), OPTIONAL, INTENT(IN), DIMENSION(:, :, :) :: rd3 473 REAL(sp), OPTIONAL, INTENT(IN), DIMENSION(:, :, :) :: rs3 469 474 #if defined key_iomput 470 TYPE(xios_field) :: field_hdl 471 TYPE(xios_file) :: file_hdl 472 INTEGER :: i 473 CHARACTER(lc) :: clpath 474 CHARACTER(len=1024) :: fname 475 CHARACTER(len=lc) :: axis_ref 476 477 CALL xios_get_handle("wrestart", file_hdl) 475 TYPE(xios_field) :: field_hdl 476 TYPE(xios_file) :: file_hdl 477 478 CALL xios_get_handle("wrestart", file_hdl) 478 479 !define fields for restart context 479 CALL xios_add_child(file_hdl, field_hdl, TRIM(sdfield)) 480 481 IF(PRESENT(rd3)) THEN 482 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 483 domain_ref="grid_N", axis_ref=TRIM(iom_axis(size(rd3, 3))), & 484 prec = 8, operation = "instant") 485 ELSEIF(PRESENT(rs3)) THEN 486 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 487 domain_ref="grid_N", axis_ref=TRIM(iom_axis(size(rd3, 3))), & 488 prec = 4, operation = "instant") 489 ELSEIF(PRESENT(rd2)) THEN 490 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 491 domain_ref="grid_N", prec = 8, operation = "instant") 492 ELSEIF(PRESENT(rs2)) THEN 493 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 494 domain_ref="grid_N", prec = 4, operation = "instant") 495 ELSEIF(PRESENT(rd1)) THEN 496 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 497 axis_ref=TRIM(iom_axis(size(rd1, 1))), prec = 8, operation = "instant") 498 ELSEIF(PRESENT(rs1)) THEN 499 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 500 axis_ref=TRIM(iom_axis(size(rd1, 1))), prec = 4, operation = "instant") 501 ELSEIF(PRESENT(rd0)) THEN 502 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 503 scalar_ref = "grid_scalar", prec = 8, operation = "instant") 504 ELSEIF(PRESENT(rs0)) THEN 505 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(sdfield), & 506 scalar_ref = "grid_scalar", prec = 4, operation = "instant") 507 ENDIF 480 CALL xios_add_child(file_hdl, field_hdl, sdfield) 481 482 IF(PRESENT(rd3)) THEN 483 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 484 domain_ref = "grid_N", & 485 axis_ref = iom_axis(size(rd3, 3)), & 486 prec = 8, operation = "instant" ) 487 ELSEIF(PRESENT(rs3)) THEN 488 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 489 domain_ref = "grid_N", & 490 axis_ref = iom_axis(size(rd3, 3)), & 491 prec = 4, operation = "instant" ) 492 ELSEIF(PRESENT(rd2)) THEN 493 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 494 domain_ref = "grid_N", prec = 8, & 495 operation = "instant" ) 496 ELSEIF(PRESENT(rs2)) THEN 497 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 498 domain_ref = "grid_N", prec = 4, & 499 operation = "instant" ) 500 ELSEIF(PRESENT(rd1)) THEN 501 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 502 axis_ref = iom_axis(size(rd1, 1)), & 503 prec = 8, operation = "instant" ) 504 ELSEIF(PRESENT(rs1)) THEN 505 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 506 axis_ref = iom_axis(size(rd1, 1)), & 507 prec = 4, operation = "instant" ) 508 ELSEIF(PRESENT(rd0)) THEN 509 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 510 scalar_ref = "grid_scalar", prec = 8, & 511 operation = "instant" ) 512 ELSEIF(PRESENT(rs0)) THEN 513 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = sdfield, & 514 scalar_ref = "grid_scalar", prec = 4, & 515 operation = "instant" ) 516 ENDIF 508 517 #endif 509 518 END SUBROUTINE iom_set_rstw_active … … 518 527 !! iom_set_rst_context 519 528 !!--------------------------------------------------------------------- 520 INTEGER, INTENT(IN) :: idlev521 CHARACTER(len=lc) :: axis_ref522 CHARACTER(len=12) :: str523 529 INTEGER, INTENT(IN) :: idlev 530 CHARACTER(len=lc) :: axis_ref 531 CHARACTER(len=12) :: str 532 IF(idlev == jpk) THEN 524 533 axis_ref="nav_lev" 525 534 #if defined key_si3 526 535 ELSEIF(idlev == jpl) THEN 527 536 axis_ref="numcat" 528 537 #endif 529 538 ELSE 530 539 write(str, *) idlev 531 540 CALL ctl_stop( 'iom_axis', 'Definition for axis with '//TRIM(ADJUSTL(str))//' levels missing') 532 541 ENDIF 533 542 END FUNCTION iom_axis 534 543 … … 541 550 !! 542 551 !!--------------------------------------------------------------------- 543 LOGICAL, INTENT(IN) :: ld_rstr544 INTEGER :: ji552 LOGICAL, INTENT(IN) :: ld_rstr 553 INTEGER :: ji 545 554 #if defined key_iomput 546 TYPE(xios_domaingroup) :: domaingroup_hdl547 TYPE(xios_domain) :: domain_hdl548 TYPE(xios_axisgroup) :: axisgroup_hdl549 TYPE(xios_axis) :: axis_hdl550 TYPE(xios_scalar) :: scalar_hdl551 TYPE(xios_scalargroup) :: scalargroup_hdl552 553 CALL xios_get_handle("domain_definition",domaingroup_hdl)554 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N")555 CALL set_grid("N", glamt, gphit, .TRUE., ld_rstr)555 TYPE(xios_domaingroup) :: domaingroup_hdl 556 TYPE(xios_domain) :: domain_hdl 557 TYPE(xios_axisgroup) :: axisgroup_hdl 558 TYPE(xios_axis) :: axis_hdl 559 TYPE(xios_scalar) :: scalar_hdl 560 TYPE(xios_scalargroup) :: scalargroup_hdl 561 562 CALL xios_get_handle("domain_definition",domaingroup_hdl) 563 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 564 CALL set_grid("N", glamt, gphit, .TRUE., ld_rstr) 556 565 557 CALL xios_get_handle("axis_definition",axisgroup_hdl)558 CALL xios_add_child(axisgroup_hdl, axis_hdl, "nav_lev")566 CALL xios_get_handle("axis_definition",axisgroup_hdl) 567 CALL xios_add_child(axisgroup_hdl, axis_hdl, "nav_lev") 559 568 !AGRIF fails to compile when unit= is in call to xios_set_axis_attr 560 ! CALL xios_set_axis_attr( "nav_lev", long_name="Vertical levels", unit="m", positive="down")561 CALL xios_set_axis_attr( "nav_lev", long_name="Vertical levels in meters", positive="down")562 CALL iom_set_axis_attr( "nav_lev", paxis = gdept_1d )569 ! CALL xios_set_axis_attr( "nav_lev", long_name="Vertical levels", unit="m", positive="down") 570 CALL xios_set_axis_attr( "nav_lev", long_name = "Vertical levels in meters", positive = "down") 571 CALL iom_set_axis_attr( "nav_lev", paxis = gdept_1d ) 563 572 #if defined key_si3 564 CALL xios_add_child(axisgroup_hdl, axis_hdl, "numcat") 565 CALL iom_set_axis_attr( "numcat", (/ (REAL(ji,wp), ji=1,jpl) /) ) 566 #endif 567 568 CALL xios_get_handle("scalar_definition", scalargroup_hdl) 569 CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 573 CALL xios_add_child(axisgroup_hdl, axis_hdl, "numcat") 574 CALL iom_set_axis_attr( "numcat", (/ (REAL(ji,wp), ji=1,jpl) /) ) 575 #endif 576 CALL xios_get_handle("scalar_definition", scalargroup_hdl) 577 CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 570 578 #endif 571 579 END SUBROUTINE iom_set_rst_context … … 1526 1534 #ifdef key_iomput 1527 1535 IF( kt == kwrite ) THEN 1528 1529 1536 IF(lwp) write(numout,*) 'RESTART: write (XIOS 0D) ',trim(cdvar) 1537 CALL iom_put(trim(cdvar), pvar) 1530 1538 ELSE 1531 1532 1539 IF(lwp) write(numout,*) 'RESTART: define (XIOS 0D) ',trim(cdvar) 1540 CALL iom_set_rstw_active( trim(cdvar), rs0 = pvar ) 1533 1541 ENDIF 1534 1542 #endif … … 1559 1567 #ifdef key_iomput 1560 1568 IF( kt == kwrite ) THEN 1561 1562 1569 IF(lwp) write(numout,*) 'RESTART: write (XIOS 0D) ',trim(cdvar) 1570 CALL iom_put(trim(cdvar), pvar) 1563 1571 ELSE 1564 1565 1572 IF(lwp) write(numout,*) 'RESTART: define (XIOS 0D) ',trim(cdvar) 1573 CALL iom_set_rstw_active( trim(cdvar), rd0 = pvar ) 1566 1574 ENDIF 1567 1575 #endif … … 1729 1737 IF(lwp) write(numout,*) 'RESTART: write (XIOS 3D) ',trim(cdvar) 1730 1738 CALL iom_put(trim(cdvar), pvar) 1731 ELSE1739 ELSE 1732 1740 IF(lwp) write(numout,*) 'RESTART: define (XIOS 3D)',trim(cdvar) 1733 1741 CALL iom_set_rstw_active( trim(cdvar), rs3 = pvar ) … … 2135 2143 CALL iom_swap( cdname ) ! swap to cdname context 2136 2144 CALL xios_update_calendar(kt) 2137 IF( cdname /= TRIM(cxios_context) ) CALL iom_swap( TRIM(cxios_context)) ! return back to nemo context2145 IF( cdname /= TRIM(cxios_context) ) CALL iom_swap( cxios_context ) ! return back to nemo context 2138 2146 END SUBROUTINE iom_setkt 2139 2147 … … 2149 2157 CALL iom_swap( cdname ) ! swap to cdname context 2150 2158 CALL xios_context_finalize() ! finalize the context 2151 IF( cdname /= TRIM(cxios_context) ) CALL iom_swap( TRIM(cxios_context)) ! return back to nemo context2159 IF( cdname /= cxios_context ) CALL iom_swap( cxios_context ) ! return back to nemo context 2152 2160 ENDIF 2153 2161 ! -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/iom_def.F90
r13727 r13871 38 38 !XIOS read restart 39 39 LOGICAL, PUBLIC :: lrxios = .FALSE. !: read single file restart using XIOS main switch 40 LOGICAL, PUBLIC :: lroxios = .FALSE. !: read single file restart using XIOS for oce41 40 LOGICAL, PUBLIC :: lxios_sini = .FALSE. ! is restart in a single file 42 41 … … 62 61 END TYPE file_descriptor 63 62 TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC :: iom_file !: array containing the info for all opened files 64 !metadata in restart file for restart read with XIOS65 INTEGER, PUBLIC, PARAMETER :: NMETA = 1066 CHARACTER(LEN=nf90_max_name), PUBLIC :: meta(NMETA)67 63 !$AGRIF_END_DO_NOT_TREAT 68 64 ! -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/restart.F90
r13750 r13871 110 110 ELSE 111 111 #if defined key_iomput 112 cw xios_context = "rstw_"//TRIM(ADJUSTL(clkt))112 cw_ocerst_cxt = "rstw_"//TRIM(ADJUSTL(clkt)) 113 113 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 114 114 clpname = clname … … 116 116 clpname = TRIM(Agrif_CFixed())//"_"//clname 117 117 ENDIF 118 CALL iom_init( cw xios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .false. )118 CALL iom_init( cw_ocerst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .false. ) 119 119 CALL iom_swap( cxios_context ) 120 120 #else … … 142 142 INTEGER, INTENT(in) :: Kbb, Kmm ! ocean time level indices 143 143 !!---------------------------------------------------------------------- 144 IF(lwxios) CALL iom_swap( cw xios_context )144 IF(lwxios) CALL iom_swap( cw_ocerst_cxt ) 145 145 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rn_Dt , ldxios = lwxios) ! dynamics time step 146 146 CALL iom_delay_rst( 'WRITE', 'OCE', numrow ) ! save only ocean delayed global communication variables … … 167 167 CALL iom_close( numrow ) ! close the restart file (only at last time step) 168 168 ELSE 169 CALL iom_context_finalize( cw xios_context )169 CALL iom_context_finalize( cw_ocerst_cxt ) 170 170 ENDIF 171 171 !!gm IF( .NOT. lk_trdmld ) lrst_oce = .FALSE. … … 209 209 ! can handle checking if variable is in the restart file (there will be no need to open 210 210 ! restart) 211 lr oxios = lrxios.AND.lxios_sini212 213 IF( lr oxios) THEN214 cr xios_context = 'oce_rst'211 lrxios = lrxios.AND.lxios_sini 212 213 IF( lrxios) THEN 214 cr_ocerst_cxt = 'oce_rst' 215 215 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS' 216 216 IF( TRIM(Agrif_CFixed()) == '0' ) THEN … … 219 219 clpname = TRIM(Agrif_CFixed())//"_"//cn_ocerst_in 220 220 ENDIF 221 CALL iom_init( cr xios_context, fname = TRIM(clpath)//TRIM(clpname), &221 CALL iom_init( cr_ocerst_cxt, fname = TRIM(clpath)//TRIM(clpname), & 222 222 idfp = iom_file(numror)%nfid, ld_closedef = .TRUE. ) 223 223 ENDIF … … 245 245 246 246 ! Check dynamics and tracer time-step consistency and force Euler restart if changed 247 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context))247 IF( lrxios ) CALL iom_swap( cr_ocerst_cxt ) 248 248 IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 ) THEN 249 CALL iom_get( numror, 'rdt', zrdt, ldxios = lr oxios )249 CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios ) 250 250 IF( zrdt /= rn_Dt ) THEN 251 251 IF(lwp) WRITE( numout,*) … … 260 260 261 261 ! Diurnal DSST 262 IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst, ldxios = lr oxios )262 IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst, ldxios = lrxios ) 263 263 IF ( ln_diurnal_only ) THEN 264 264 IF(lwp) WRITE( numout, * ) & 265 265 & "rst_read:- ln_diurnal_only set, setting rhop=rho0" 266 266 rhop = rho0 267 CALL iom_get( numror, jpdom_auto, 'tn' , w3d, ldxios = lr oxios )267 CALL iom_get( numror, jpdom_auto, 'tn' , w3d, ldxios = lrxios ) 268 268 ts(:,:,1,jp_tem,Kmm) = w3d(:,:,1) 269 269 RETURN … … 288 288 CALL iom_get( numror, jpdom_auto, 'sshn' ,ssh(:,: ,Kmm), ldxios = lrxios ) 289 289 IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN 290 CALL iom_get( numror, jpdom_auto, 'rhop' , rhop, ldxios = lr oxios ) ! now potential density290 CALL iom_get( numror, jpdom_auto, 'rhop' , rhop, ldxios = lrxios ) ! now potential density 291 291 ELSE 292 292 CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, gdept(:,:,:,Kmm) ) 293 293 ENDIF 294 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context))294 IF( lrxios ) CALL iom_swap( cxios_context ) 295 295 ! 296 296 IF( l_1st_euler ) THEN ! Euler restart -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ISF/isfcpl.F90
r13750 r13871 144 144 END DO 145 145 ! 146 IF( lwxios ) CALL iom_swap( cw xios_context )146 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 147 147 CALL iom_rstput( kt, nitrst, numrow, 'tmask' , tmask , ldxios = lwxios ) 148 148 CALL iom_rstput( kt, nitrst, numrow, 'ssmask' , ssmask, ldxios = lwxios ) … … 174 174 !!---------------------------------------------------------------------- 175 175 ! 176 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )177 CALL iom_get( numror, jpdom_auto, 'ssmask' , zssmask_b, ldxios = lr oxios ) ! need to extrapolate T/S178 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )176 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 177 CALL iom_get( numror, jpdom_auto, 'ssmask' , zssmask_b, ldxios = lrxios ) ! need to extrapolate T/S 178 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 179 179 180 180 ! compute new ssh if we open a full water column … … 257 257 !!---------------------------------------------------------------------- 258 258 ! 259 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )260 CALL iom_get( numror, jpdom_auto, 'tmask' , ztmask_b, ldxios = lr oxios ) ! need to extrapolate T/S261 !CALL iom_get( numror, jpdom_auto, 'wmask' , zwmask_b, ldxios = lr oxios ) ! need to extrapolate T/S262 !CALL iom_get( numror, jpdom_auto, 'gdepw_n', zdepw_b(:,:,:), ldxios = lr oxios ) ! need to interpol vertical profile (vvl)263 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )259 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 260 CALL iom_get( numror, jpdom_auto, 'tmask' , ztmask_b, ldxios = lrxios ) ! need to extrapolate T/S 261 !CALL iom_get( numror, jpdom_auto, 'wmask' , zwmask_b, ldxios = lrxios ) ! need to extrapolate T/S 262 !CALL iom_get( numror, jpdom_auto, 'gdepw_n', zdepw_b(:,:,:), ldxios = lrxios ) ! need to interpol vertical profile (vvl) 263 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 264 264 ! 265 265 ! … … 405 405 !!---------------------------------------------------------------------- 406 406 ! 407 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )408 CALL iom_get( numror, jpdom_auto, 'tmask' , ztmask_b, ldxios = lr oxios )409 CALL iom_get( numror, jpdom_auto, 'e3u_n' , ze3u_b , ldxios = lr oxios )410 CALL iom_get( numror, jpdom_auto, 'e3v_n' , ze3v_b , ldxios = lr oxios )411 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )407 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 408 CALL iom_get( numror, jpdom_auto, 'tmask' , ztmask_b, ldxios = lrxios ) 409 CALL iom_get( numror, jpdom_auto, 'e3u_n' , ze3u_b , ldxios = lrxios ) 410 CALL iom_get( numror, jpdom_auto, 'e3v_n' , ze3v_b , ldxios = lrxios ) 411 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 412 412 ! 413 413 ! 1.0: compute horizontal volume flux divergence difference before-after coupling … … 517 517 518 518 ! get restart variable 519 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )520 CALL iom_get( numror, jpdom_auto, 'tmask' , ztmask_b(:,:,:), ldxios = lr oxios ) ! need to extrapolate T/S521 CALL iom_get( numror, jpdom_auto, 'e3t_n' , ze3t_b(:,:,:) , ldxios = lr oxios )522 CALL iom_get( numror, jpdom_auto, 'tn' , zt_b(:,:,:) , ldxios = lr oxios )523 CALL iom_get( numror, jpdom_auto, 'sn' , zs_b(:,:,:) , ldxios = lr oxios )524 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )519 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 520 CALL iom_get( numror, jpdom_auto, 'tmask' , ztmask_b(:,:,:), ldxios = lrxios ) ! need to extrapolate T/S 521 CALL iom_get( numror, jpdom_auto, 'e3t_n' , ze3t_b(:,:,:) , ldxios = lrxios ) 522 CALL iom_get( numror, jpdom_auto, 'tn' , zt_b(:,:,:) , ldxios = lrxios ) 523 CALL iom_get( numror, jpdom_auto, 'sn' , zs_b(:,:,:) , ldxios = lrxios ) 524 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 525 525 526 526 ! compute run length -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ISF/isfrst.F90
r13727 r13871 53 53 IF( iom_varid( numror, cfwf_b, ldstop = .FALSE. ) > 0 ) THEN 54 54 IF(lwp) WRITE(numout,*) ' nit000-1 isf tracer content forcing fields read in the restart file' 55 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )56 CALL iom_get( numror, jpdom_auto, cfwf_b, pfwf_b(:,:) , ldxios = lr oxios ) ! before ice shelf melt57 CALL iom_get( numror, jpdom_auto, chc_b , ptsc_b (:,:,jp_tem), ldxios = lr oxios ) ! before ice shelf heat flux58 CALL iom_get( numror, jpdom_auto, csc_b , ptsc_b (:,:,jp_sal), ldxios = lr oxios ) ! before ice shelf heat flux59 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )55 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 56 CALL iom_get( numror, jpdom_auto, cfwf_b, pfwf_b(:,:) , ldxios = lrxios ) ! before ice shelf melt 57 CALL iom_get( numror, jpdom_auto, chc_b , ptsc_b (:,:,jp_tem), ldxios = lrxios ) ! before ice shelf heat flux 58 CALL iom_get( numror, jpdom_auto, csc_b , ptsc_b (:,:,jp_sal), ldxios = lrxios ) ! before ice shelf heat flux 59 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 60 60 ELSE 61 61 pfwf_b(:,:) = pfwf(:,:) … … 91 91 ! 92 92 ! write restart variable 93 IF( lwxios ) CALL iom_swap( cw xios_context )93 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 94 94 CALL iom_rstput( kt, nitrst, numrow, cfwf_b, pfwf(:,:) , ldxios = lwxios ) 95 95 CALL iom_rstput( kt, nitrst, numrow, chc_b , ptsc(:,:,jp_tem), ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/SBC/sbcapr.F90
r13727 r13871 148 148 ! ! ---------------------------------------- ! 149 149 ! !* Restart: read in restart file 150 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )150 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 151 151 IF( ln_rstart .AND. iom_varid( numror, 'ssh_ibb', ldstop = .FALSE. ) > 0 ) THEN 152 152 IF(lwp) WRITE(numout,*) 'sbc_apr: ssh_ibb read in the restart file' 153 CALL iom_get( numror, jpdom_auto, 'ssh_ibb', ssh_ibb, ldxios = lr oxios ) ! before inv. barometer ssh153 CALL iom_get( numror, jpdom_auto, 'ssh_ibb', ssh_ibb, ldxios = lrxios ) ! before inv. barometer ssh 154 154 ! 155 155 ELSE !* no restart: set from nit000 values … … 157 157 ssh_ibb(:,:) = ssh_ib(:,:) 158 158 ENDIF 159 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )159 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 160 160 ENDIF 161 161 ! ! ---------------------------------------- ! … … 165 165 IF(lwp) WRITE(numout,*) 'sbc_apr : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp 166 166 IF(lwp) WRITE(numout,*) '~~~~' 167 IF( lwxios ) CALL iom_swap( cw xios_context )167 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 168 168 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib, ldxios = lwxios ) 169 169 IF( lwxios ) CALL iom_swap( cxios_context ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/SBC/sbcmod.F90
r13727 r13871 497 497 IF( kt == nit000 ) THEN ! set the forcing field at nit000 - 1 ! 498 498 ! ! ---------------------------------------- ! 499 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )499 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 500 500 IF( ln_rstart .AND. & !* Restart: read in restart file 501 501 & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN 502 502 IF(lwp) WRITE(numout,*) ' nit000-1 surface forcing fields red in the restart file' 503 CALL iom_get( numror, jpdom_auto, 'utau_b', utau_b, ldxios = lr oxios ) ! before i-stress (U-point)504 CALL iom_get( numror, jpdom_auto, 'vtau_b', vtau_b, ldxios = lr oxios ) ! before j-stress (V-point)505 CALL iom_get( numror, jpdom_auto, 'qns_b', qns_b, ldxios = lr oxios ) ! before non solar heat flux (T-point)503 CALL iom_get( numror, jpdom_auto, 'utau_b', utau_b, ldxios = lrxios ) ! before i-stress (U-point) 504 CALL iom_get( numror, jpdom_auto, 'vtau_b', vtau_b, ldxios = lrxios ) ! before j-stress (V-point) 505 CALL iom_get( numror, jpdom_auto, 'qns_b', qns_b, ldxios = lrxios ) ! before non solar heat flux (T-point) 506 506 ! The 3D heat content due to qsr forcing is treated in traqsr 507 ! CALL iom_get( numror, jpdom_auto, 'qsr_b' , qsr_b, ldxios = lr oxios ) ! before solar heat flux (T-point)508 CALL iom_get( numror, jpdom_auto, 'emp_b', emp_b, ldxios = lr oxios ) ! before freshwater flux (T-point)507 ! CALL iom_get( numror, jpdom_auto, 'qsr_b' , qsr_b, ldxios = lrxios ) ! before solar heat flux (T-point) 508 CALL iom_get( numror, jpdom_auto, 'emp_b', emp_b, ldxios = lrxios ) ! before freshwater flux (T-point) 509 509 ! To ensure restart capability with 3.3x/3.4 restart files !! to be removed in v3.6 510 510 IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN 511 CALL iom_get( numror, jpdom_auto, 'sfx_b', sfx_b, ldxios = lr oxios ) ! before salt flux (T-point)511 CALL iom_get( numror, jpdom_auto, 'sfx_b', sfx_b, ldxios = lrxios ) ! before salt flux (T-point) 512 512 ELSE 513 513 sfx_b (:,:) = sfx(:,:) … … 521 521 sfx_b (:,:) = sfx (:,:) 522 522 ENDIF 523 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )523 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 524 524 ENDIF 525 525 ! ! ---------------------------------------- ! … … 530 530 & 'at it= ', kt,' date= ', ndastp 531 531 IF(lwp) WRITE(numout,*) '~~~~' 532 IF( lwxios ) CALL iom_swap( cw xios_context )532 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 533 533 CALL iom_rstput( kt, nitrst, numrow, 'utau_b' , utau, ldxios = lwxios ) 534 534 CALL iom_rstput( kt, nitrst, numrow, 'vtau_b' , vtau, ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/SBC/sbcrnf.F90
r13727 r13871 157 157 IF( kt == nit000 ) THEN ! set the forcing field at nit000 - 1 ! 158 158 ! ! ---------------------------------------- ! 159 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )159 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 160 160 IF( ln_rstart .AND. & !* Restart: read in restart file 161 161 & iom_varid( numror, 'rnf_b', ldstop = .FALSE. ) > 0 ) THEN 162 IF(lwp) WRITE(numout,*) ' nit000-1 runoff forcing fields red in the restart file', lr oxios163 CALL iom_get( numror, jpdom_auto, 'rnf_b', rnf_b, ldxios = lr oxios ) ! before runoff164 CALL iom_get( numror, jpdom_auto, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), ldxios = lr oxios ) ! before heat content of runoff165 CALL iom_get( numror, jpdom_auto, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), ldxios = lr oxios ) ! before salinity content of runoff162 IF(lwp) WRITE(numout,*) ' nit000-1 runoff forcing fields red in the restart file', lrxios 163 CALL iom_get( numror, jpdom_auto, 'rnf_b', rnf_b, ldxios = lrxios ) ! before runoff 164 CALL iom_get( numror, jpdom_auto, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem), ldxios = lrxios ) ! before heat content of runoff 165 CALL iom_get( numror, jpdom_auto, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal), ldxios = lrxios ) ! before salinity content of runoff 166 166 ELSE !* no restart: set from nit000 values 167 167 IF(lwp) WRITE(numout,*) ' nit000-1 runoff forcing fields set to nit000' … … 169 169 rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 170 170 ENDIF 171 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )171 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 172 172 ENDIF 173 173 ! ! ---------------------------------------- ! … … 178 178 & 'at it= ', kt,' date= ', ndastp 179 179 IF(lwp) WRITE(numout,*) '~~~~' 180 IF( lwxios ) CALL iom_swap( cw xios_context )180 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 181 181 CALL iom_rstput( kt, nitrst, numrow, 'rnf_b' , rnf, ldxios = lwxios ) 182 182 CALL iom_rstput( kt, nitrst, numrow, 'rnf_hc_b', rnf_tsc(:,:,jp_tem), ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/SBC/sbcssm.F90
r13727 r13871 154 154 IF(lwp) WRITE(numout,*) '~~~~~~~' 155 155 zf_sbc = REAL( nn_fsbc, wp ) 156 IF( lwxios ) CALL iom_swap( cw xios_context )156 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 157 157 CALL iom_rstput( kt, nitrst, numrow, 'nn_fsbc', zf_sbc, ldxios = lwxios ) ! sbc frequency 158 158 CALL iom_rstput( kt, nitrst, numrow, 'ssu_m' , ssu_m, ldxios = lwxios ) ! sea surface mean fields … … 206 206 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~ ' 207 207 ! 208 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )208 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 209 209 IF( ln_rstart .AND. iom_varid( numror, 'nn_fsbc', ldstop = .FALSE. ) > 0 ) THEN 210 210 l_ssm_mean = .TRUE. 211 CALL iom_get( numror , 'nn_fsbc', zf_sbc,ldxios = lr oxios ) ! sbc frequency of previous run212 CALL iom_get( numror, jpdom_auto, 'ssu_m' , ssu_m, ldxios = lr oxios, cd_type = 'U', psgn = -1._wp ) ! sea surface mean velocity (U-point)213 CALL iom_get( numror, jpdom_auto, 'ssv_m' , ssv_m, ldxios = lr oxios, cd_type = 'V', psgn = -1._wp ) ! " " velocity (V-point)214 CALL iom_get( numror, jpdom_auto, 'sst_m' , sst_m, ldxios = lr oxios ) ! " " temperature (T-point)215 CALL iom_get( numror, jpdom_auto, 'sss_m' , sss_m, ldxios = lr oxios ) ! " " salinity (T-point)216 CALL iom_get( numror, jpdom_auto, 'ssh_m' , ssh_m, ldxios = lr oxios ) ! " " height (T-point)217 CALL iom_get( numror, jpdom_auto, 'e3t_m' , e3t_m, ldxios = lr oxios ) ! 1st level thickness (T-point)211 CALL iom_get( numror , 'nn_fsbc', zf_sbc,ldxios = lrxios ) ! sbc frequency of previous run 212 CALL iom_get( numror, jpdom_auto, 'ssu_m' , ssu_m, ldxios = lrxios, cd_type = 'U', psgn = -1._wp ) ! sea surface mean velocity (U-point) 213 CALL iom_get( numror, jpdom_auto, 'ssv_m' , ssv_m, ldxios = lrxios, cd_type = 'V', psgn = -1._wp ) ! " " velocity (V-point) 214 CALL iom_get( numror, jpdom_auto, 'sst_m' , sst_m, ldxios = lrxios ) ! " " temperature (T-point) 215 CALL iom_get( numror, jpdom_auto, 'sss_m' , sss_m, ldxios = lrxios ) ! " " salinity (T-point) 216 CALL iom_get( numror, jpdom_auto, 'ssh_m' , ssh_m, ldxios = lrxios ) ! " " height (T-point) 217 CALL iom_get( numror, jpdom_auto, 'e3t_m' , e3t_m, ldxios = lrxios ) ! 1st level thickness (T-point) 218 218 ! fraction of solar net radiation absorbed in 1st T level 219 219 IF( iom_varid( numror, 'frq_m', ldstop = .FALSE. ) > 0 ) THEN 220 CALL iom_get( numror, jpdom_auto, 'frq_m' , frq_m, ldxios = lr oxios )220 CALL iom_get( numror, jpdom_auto, 'frq_m' , frq_m, ldxios = lrxios ) 221 221 ELSE 222 222 frq_m(:,:) = 1._wp ! default definition … … 237 237 ENDIF 238 238 ENDIF 239 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )239 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 240 240 ENDIF 241 241 ! -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/TRA/traqsr.F90
r13727 r13871 135 135 ! !-----------------------------------! 136 136 IF( kt == nit000 ) THEN !== 1st time step ==! 137 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )137 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 138 138 IF( ln_rstart .AND. iom_varid( numror, 'qsr_hc_b', ldstop = .FALSE. ) > 0 .AND. .NOT.l_1st_euler ) THEN ! read in restart 139 139 IF(lwp) WRITE(numout,*) ' nit000-1 qsr tracer content forcing field read in the restart file' 140 140 z1_2 = 0.5_wp 141 CALL iom_get( numror, jpdom_auto, 'qsr_hc_b', qsr_hc_b, ldxios = lr oxios ) ! before heat content trend due to Qsr flux141 CALL iom_get( numror, jpdom_auto, 'qsr_hc_b', qsr_hc_b, ldxios = lrxios ) ! before heat content trend due to Qsr flux 142 142 ELSE ! No restart or restart not found: Euler forward time stepping 143 143 z1_2 = 1._wp 144 144 qsr_hc_b(:,:,:) = 0._wp 145 145 ENDIF 146 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )146 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 147 147 ELSE !== Swap of qsr heat content ==! 148 148 z1_2 = 0.5_wp … … 294 294 ! 295 295 IF( lrst_oce ) THEN ! write in the ocean restart file 296 IF( lwxios ) CALL iom_swap( cw xios_context )296 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 297 297 CALL iom_rstput( kt, nitrst, numrow, 'qsr_hc_b' , qsr_hc , ldxios = lwxios ) 298 298 CALL iom_rstput( kt, nitrst, numrow, 'fraqsr_1lev', fraqsr_1lev, ldxios = lwxios ) … … 432 432 ! 433 433 ! 1st ocean level attenuation coefficient (used in sbcssm) 434 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )434 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 435 435 IF( iom_varid( numror, 'fraqsr_1lev', ldstop = .FALSE. ) > 0 ) THEN 436 CALL iom_get( numror, jpdom_auto, 'fraqsr_1lev' , fraqsr_1lev, ldxios = lr oxios )436 CALL iom_get( numror, jpdom_auto, 'fraqsr_1lev' , fraqsr_1lev, ldxios = lrxios ) 437 437 ELSE 438 438 fraqsr_1lev(:,:) = 1._wp ! default : no penetration 439 439 ENDIF 440 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )440 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 441 441 ! 442 442 END SUBROUTINE tra_qsr_init -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/TRA/trasbc.F90
r13727 r13871 107 107 ! !== Set before sbc tracer content fields ==! 108 108 IF( kt == nit000 ) THEN !* 1st time-step 109 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )109 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 110 110 IF( ln_rstart .AND. & ! Restart: read in restart file 111 111 & iom_varid( numror, 'sbc_hc_b', ldstop = .FALSE. ) > 0 ) THEN … … 113 113 zfact = 0.5_wp 114 114 sbc_tsc(:,:,:) = 0._wp 115 CALL iom_get( numror, jpdom_auto, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem), ldxios = lr oxios ) ! before heat content sbc trend116 CALL iom_get( numror, jpdom_auto, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal), ldxios = lr oxios ) ! before salt content sbc trend115 CALL iom_get( numror, jpdom_auto, 'sbc_hc_b', sbc_tsc_b(:,:,jp_tem), ldxios = lrxios ) ! before heat content sbc trend 116 CALL iom_get( numror, jpdom_auto, 'sbc_sc_b', sbc_tsc_b(:,:,jp_sal), ldxios = lrxios ) ! before salt content sbc trend 117 117 ELSE ! No restart or restart not found: Euler forward time stepping 118 118 zfact = 1._wp … … 120 120 sbc_tsc_b(:,:,:) = 0._wp 121 121 ENDIF 122 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )122 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 123 123 ELSE !* other time-steps: swap of forcing fields 124 124 zfact = 0.5_wp … … 147 147 ! 148 148 IF( lrst_oce ) THEN !== write sbc_tsc in the ocean restart file ==! 149 IF( lwxios ) CALL iom_swap( cw xios_context )149 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 150 150 CALL iom_rstput( kt, nitrst, numrow, 'sbc_hc_b', sbc_tsc(:,:,jp_tem), ldxios = lwxios ) 151 151 CALL iom_rstput( kt, nitrst, numrow, 'sbc_sc_b', sbc_tsc(:,:,jp_sal), ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdfgls.F90
r13727 r13871 1084 1084 ! ! --------------- 1085 1085 IF( ln_rstart ) THEN !* Read the restart file 1086 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )1086 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 1087 1087 id1 = iom_varid( numror, 'en' , ldstop = .FALSE. ) 1088 1088 id2 = iom_varid( numror, 'avt_k' , ldstop = .FALSE. ) … … 1091 1091 ! 1092 1092 IF( MIN( id1, id2, id3, id4 ) > 0 ) THEN ! all required arrays exist 1093 CALL iom_get( numror, jpdom_auto, 'en' , en , ldxios = lr oxios )1094 CALL iom_get( numror, jpdom_auto, 'avt_k' , avt_k , ldxios = lr oxios )1095 CALL iom_get( numror, jpdom_auto, 'avm_k' , avm_k , ldxios = lr oxios )1096 CALL iom_get( numror, jpdom_auto, 'hmxl_n', hmxl_n, ldxios = lr oxios )1093 CALL iom_get( numror, jpdom_auto, 'en' , en , ldxios = lrxios ) 1094 CALL iom_get( numror, jpdom_auto, 'avt_k' , avt_k , ldxios = lrxios ) 1095 CALL iom_get( numror, jpdom_auto, 'avm_k' , avm_k , ldxios = lrxios ) 1096 CALL iom_get( numror, jpdom_auto, 'hmxl_n', hmxl_n, ldxios = lrxios ) 1097 1097 ELSE 1098 1098 IF(lwp) WRITE(numout,*) … … 1102 1102 ! avt_k, avm_k already set to the background value in zdf_phy_init 1103 1103 ENDIF 1104 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )1104 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 1105 1105 ELSE !* Start from rest 1106 1106 IF(lwp) WRITE(numout,*) … … 1114 1114 ! ! ------------------- 1115 1115 IF(lwp) WRITE(numout,*) '---- gls-rst ----' 1116 IF( lwxios ) CALL iom_swap( cw xios_context )1116 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 1117 1117 CALL iom_rstput( kt, nitrst, numrow, 'en' , en , ldxios = lwxios ) 1118 1118 CALL iom_rstput( kt, nitrst, numrow, 'avt_k' , avt_k , ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdfosm.F90
r13727 r13871 1467 1467 !!----------------------------------------------------------------------------- 1468 1468 IF( TRIM(cdrw) == 'READ'.AND. ln_rstart) THEN 1469 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )1469 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 1470 1470 id1 = iom_varid( numror, 'wn' , ldstop = .FALSE. ) 1471 1471 IF( id1 > 0 ) THEN ! 'wn' exists; read 1472 CALL iom_get( numror, jpdom_auto, 'wn', ww, ldxios = lr oxios )1472 CALL iom_get( numror, jpdom_auto, 'wn', ww, ldxios = lrxios ) 1473 1473 WRITE(numout,*) ' ===>>>> : ww read from restart file' 1474 1474 ELSE … … 1479 1479 id2 = iom_varid( numror, 'hbli' , ldstop = .FALSE. ) 1480 1480 IF( id1 > 0 .AND. id2 > 0) THEN ! 'hbl' exists; read and return 1481 CALL iom_get( numror, jpdom_auto, 'hbl' , hbl , ldxios = lr oxios )1482 CALL iom_get( numror, jpdom_auto, 'hbli', hbli, ldxios = lr oxios )1481 CALL iom_get( numror, jpdom_auto, 'hbl' , hbl , ldxios = lrxios ) 1482 CALL iom_get( numror, jpdom_auto, 'hbli', hbli, ldxios = lrxios ) 1483 1483 WRITE(numout,*) ' ===>>>> : hbl & hbli read from restart file' 1484 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )1484 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 1485 1485 RETURN 1486 1486 ELSE ! 'hbl' & 'hbli' not in restart file, recalculate 1487 1487 WRITE(numout,*) ' ===>>>> : previous run without osmosis scheme, hbl computed from stratification' 1488 1488 END IF 1489 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )1489 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 1490 1490 END IF 1491 1491 -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdfric.F90
r13727 r13871 206 206 ! !* Read the restart file 207 207 IF( ln_rstart ) THEN 208 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )208 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 209 209 id1 = iom_varid( numror, 'avt_k', ldstop = .FALSE. ) 210 210 id2 = iom_varid( numror, 'avm_k', ldstop = .FALSE. ) 211 211 ! 212 212 IF( MIN( id1, id2 ) > 0 ) THEN ! restart exists => read it 213 CALL iom_get( numror, jpdom_auto, 'avt_k', avt_k, ldxios = lr oxios )214 CALL iom_get( numror, jpdom_auto, 'avm_k', avm_k, ldxios = lr oxios )213 CALL iom_get( numror, jpdom_auto, 'avt_k', avt_k, ldxios = lrxios ) 214 CALL iom_get( numror, jpdom_auto, 'avm_k', avm_k, ldxios = lrxios ) 215 215 ENDIF 216 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )216 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 217 217 ENDIF 218 218 ! !* otherwise Kz already set to the background value in zdf_phy_init … … 221 221 ! ! ------------------- 222 222 IF(lwp) WRITE(numout,*) '---- ric-rst ----' 223 IF( lwxios ) CALL iom_swap( cw xios_context )223 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 224 224 CALL iom_rstput( kt, nitrst, numrow, 'avt_k', avt_k, ldxios = lwxios ) 225 225 CALL iom_rstput( kt, nitrst, numrow, 'avm_k', avm_k, ldxios = lwxios) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/ZDF/zdftke.F90
r13727 r13871 746 746 ! ! --------------- 747 747 IF( ln_rstart ) THEN !* Read the restart file 748 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context) )748 IF( lrxios ) CALL iom_swap( TRIM(cr_ocerst_cxt) ) 749 749 id1 = iom_varid( numror, 'en' , ldstop = .FALSE. ) 750 750 id2 = iom_varid( numror, 'avt_k', ldstop = .FALSE. ) … … 753 753 ! 754 754 IF( MIN( id1, id2, id3, id4 ) > 0 ) THEN ! fields exist 755 CALL iom_get( numror, jpdom_auto, 'en' , en , ldxios = lr oxios )756 CALL iom_get( numror, jpdom_auto, 'avt_k', avt_k, ldxios = lr oxios )757 CALL iom_get( numror, jpdom_auto, 'avm_k', avm_k, ldxios = lr oxios )758 CALL iom_get( numror, jpdom_auto, 'dissl', dissl, ldxios = lr oxios )755 CALL iom_get( numror, jpdom_auto, 'en' , en , ldxios = lrxios ) 756 CALL iom_get( numror, jpdom_auto, 'avt_k', avt_k, ldxios = lrxios ) 757 CALL iom_get( numror, jpdom_auto, 'avm_k', avm_k, ldxios = lrxios ) 758 CALL iom_get( numror, jpdom_auto, 'dissl', dissl, ldxios = lrxios ) 759 759 ELSE ! start TKE from rest 760 760 IF(lwp) WRITE(numout,*) … … 764 764 ! avt_k, avm_k already set to the background value in zdf_phy_init 765 765 ENDIF 766 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context) )766 IF( lrxios ) CALL iom_swap( TRIM(cxios_context) ) 767 767 ELSE !* Start from rest 768 768 IF(lwp) WRITE(numout,*) … … 776 776 ! ! ------------------- 777 777 IF(lwp) WRITE(numout,*) '---- tke_rst ----' 778 IF( lwxios ) CALL iom_swap( cw xios_context )778 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 779 779 CALL iom_rstput( kt, nitrst, numrow, 'en' , en , ldxios = lwxios ) 780 780 CALL iom_rstput( kt, nitrst, numrow, 'avt_k', avt_k, ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/step.F90
r13727 r13871 125 125 ENDIF 126 126 IF((kstp == nitrst) .AND. lwxios) THEN 127 CALL iom_swap( cw xios_context )128 CALL iom_init_closedef(cw xios_context)129 CALL iom_setkt( kstp - nit000 + 1, cw xios_context )127 CALL iom_swap( cw_ocerst_cxt ) 128 CALL iom_init_closedef(cw_ocerst_cxt) 129 CALL iom_setkt( kstp - nit000 + 1, cw_ocerst_cxt ) 130 130 #if defined key_top 131 CALL iom_swap( cw txios_context )132 CALL iom_init_closedef(cw txios_context)133 CALL iom_setkt( kstp - nit000 + 1, cw txios_context )131 CALL iom_swap( cw_toprst_cxt ) 132 CALL iom_init_closedef(cw_toprst_cxt) 133 CALL iom_setkt( kstp - nit000 + 1, cw_toprst_cxt ) 134 134 #endif 135 135 ENDIF 136 136 #if defined key_si3 137 137 IF(((kstp + nn_fsbc - 1) == nitrst) .AND. lwxios) THEN 138 CALL iom_swap( cw ixios_context )139 CALL iom_init_closedef(cw ixios_context)140 CALL iom_setkt( kstp - nit000 + 1, cw ixios_context )138 CALL iom_swap( cw_icerst_cxt ) 139 CALL iom_init_closedef(cw_icerst_cxt) 140 CALL iom_setkt( kstp - nit000 + 1, cw_icerst_cxt ) 141 141 ENDIF 142 142 #endif … … 355 355 IF( kstp == nit000 ) THEN ! 1st time step only 356 356 CALL iom_close( numror ) ! close input ocean restart file 357 IF( lr oxios ) CALL iom_context_finalize( crxios_context )357 IF( lrxios ) CALL iom_context_finalize( cr_ocerst_cxt ) 358 358 IF(lwm) CALL FLUSH ( numond ) ! flush output namelist oce 359 359 IF(lwm .AND. numoni /= -1 ) CALL FLUSH ( numoni ) ! flush output namelist ice (if exist) -
NEMO/branches/2020/dev_12905_xios_restart/src/OCE/stpMLF.F90
r13727 r13871 364 364 IF( kstp == nitend .OR. indic < 0 ) THEN 365 365 CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 366 IF(lrxios) CALL iom_context_finalize( cr xios_context )366 IF(lrxios) CALL iom_context_finalize( cr_ocerst_cxt ) 367 367 IF( ln_crs ) CALL iom_context_finalize( trim(cxios_context)//"_crs" ) ! 368 368 ENDIF -
NEMO/branches/2020/dev_12905_xios_restart/src/OFF/nemogcm.F90
r13727 r13871 127 127 ! 128 128 IF((istp == nitrst) .AND. lwxios) THEN 129 CALL iom_swap( cw txios_context )130 CALL iom_init_closedef(cw txios_context)131 CALL iom_setkt( istp - nit000 + 1, cw txios_context )129 CALL iom_swap( cw_toprst_cxt ) 130 CALL iom_init_closedef(cw_toprst_cxt) 131 CALL iom_setkt( istp - nit000 + 1, cw_toprst_cxt ) 132 132 ENDIF 133 133 -
NEMO/branches/2020/dev_12905_xios_restart/src/SAS/step.F90
r13727 r13871 91 91 CALL iom_setkt( kstp - nit000 + 1, cxios_context ) ! tell iom we are at time step kstp 92 92 IF((kstp == nitrst) .AND. lwxios) THEN 93 CALL iom_swap( cw xios_context )94 CALL iom_init_closedef(cw xios_context)95 CALL iom_setkt( kstp - nit000 + 1, cw xios_context )93 CALL iom_swap( cw_ocerst_cxt ) 94 CALL iom_init_closedef(cw_ocerst_cxt) 95 CALL iom_setkt( kstp - nit000 + 1, cw_ocerst_cxt ) 96 96 #if defined key_top 97 CALL iom_swap( cw txios_context )98 CALL iom_init_closedef(cw txios_context)99 CALL iom_setkt( kstp - nit000 + 1, cw txios_context )97 CALL iom_swap( cw_toprst_cxt ) 98 CALL iom_init_closedef(cw_toprst_cxt) 99 CALL iom_setkt( kstp - nit000 + 1, cw_toprst_cxt ) 100 100 #endif 101 101 ENDIF … … 104 104 #if defined key_si3 105 105 IF(((kstp + nn_fsbc - 1) == nitrst) .AND. lwxios) THEN 106 CALL iom_swap( cw ixios_context )107 CALL iom_init_closedef(cw ixios_context)108 CALL iom_setkt( kstp - nit000 + 1, cw ixios_context )106 CALL iom_swap( cw_icerst_cxt ) 107 CALL iom_init_closedef(cw_icerst_cxt) 108 CALL iom_setkt( kstp - nit000 + 1, cw_icerst_cxt ) 109 109 ENDIF 110 110 #endif … … 148 148 IF( kstp == nit000 ) THEN 149 149 CALL iom_close( numror ) ! close input ocean restart file 150 IF( lr oxios ) CALL iom_context_finalize( crxios_context )150 IF( lrxios ) CALL iom_context_finalize( cr_ocerst_cxt ) 151 151 ENDIF 152 152 … … 161 161 CALL iom_close( numrow ) 162 162 ELSE 163 CALL iom_context_finalize( cw xios_context )163 CALL iom_context_finalize( cw_ocerst_cxt ) 164 164 ENDIF 165 165 lrst_oce = .FALSE. -
NEMO/branches/2020/dev_12905_xios_restart/src/SWE/domvvl.F90
r13472 r13871 1251 1251 ! ! =================== 1252 1252 IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 1253 IF( lwxios ) CALL iom_swap( cw xios_context )1253 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 1254 1254 ! ! --------- ! 1255 1255 ! ! all cases ! -
NEMO/branches/2020/dev_12905_xios_restart/src/SWE/step.F90
r13458 r13871 304 304 IF( kstp == nitend .OR. indic < 0 ) THEN 305 305 CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 306 IF(lrxios) CALL iom_context_finalize( cr xios_context )306 IF(lrxios) CALL iom_context_finalize( cr_ocerst_cxt ) 307 307 ENDIF 308 308 #endif -
NEMO/branches/2020/dev_12905_xios_restart/src/SWE/stepLF.F90
r13295 r13871 318 318 IF( kstp == nitend .OR. indic < 0 ) THEN 319 319 CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 320 IF(lrxios) CALL iom_context_finalize( cr xios_context )320 IF(lrxios) CALL iom_context_finalize( cr_ocerst_cxt ) 321 321 ENDIF 322 322 #endif -
NEMO/branches/2020/dev_12905_xios_restart/src/SWE/stpRK3.F90
r13295 r13871 361 361 IF( kstp == nitend .OR. indic < 0 ) THEN 362 362 CALL iom_context_finalize( cxios_context ) ! needed for XIOS+AGRIF 363 IF(lrxios) CALL iom_context_finalize( cr xios_context )363 IF(lrxios) CALL iom_context_finalize( cr_ocerst_cxt ) 364 364 ENDIF 365 365 #endif -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/C14/trcini_c14.F90
r13727 r13871 68 68 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 69 69 ! 70 IF(lr txios) CALL iom_swap(crtxios_context)71 CALL iom_get( numrtr, 'co2sbc', co2sbc, ldxios = lr txios )72 CALL iom_get( numrtr, jpdom_auto, 'c14sbc', c14sbc, ldxios = lr txios )73 CALL iom_get( numrtr, jpdom_auto, 'exch_co2', exch_co2, ldxios = lr txios )74 CALL iom_get( numrtr, jpdom_auto, 'exch_c14', exch_c14, ldxios = lr txios )75 CALL iom_get( numrtr, jpdom_auto, 'qtr_c14', qtr_c14, ldxios = lr txios )76 IF(lr txios) CALL iom_swap(cxios_context)70 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 71 CALL iom_get( numrtr, 'co2sbc', co2sbc, ldxios = lrxios ) 72 CALL iom_get( numrtr, jpdom_auto, 'c14sbc', c14sbc, ldxios = lrxios ) 73 CALL iom_get( numrtr, jpdom_auto, 'exch_co2', exch_co2, ldxios = lrxios ) 74 CALL iom_get( numrtr, jpdom_auto, 'exch_c14', exch_c14, ldxios = lrxios ) 75 CALL iom_get( numrtr, jpdom_auto, 'qtr_c14', qtr_c14, ldxios = lrxios ) 76 IF(lrxios) CALL iom_swap(cxios_context) 77 77 ! 78 78 END IF … … 87 87 ELSE 88 88 ! 89 IF(lr txios) CALL iom_swap(crtxios_context)90 CALL iom_get( numrtr, jpdom_auto, 'qint_c14', qint_c14, ldxios = lr txios )91 IF(lr txios) CALL iom_swap(cxios_context)89 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 90 CALL iom_get( numrtr, jpdom_auto, 'qint_c14', qint_c14, ldxios = lrxios ) 91 IF(lrxios) CALL iom_swap(cxios_context) 92 92 ! 93 93 ENDIF -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/C14/trcsms_c14.F90
r13727 r13871 144 144 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 145 145 ! 146 IF( lwxios ) CALL iom_swap( cw txios_context )146 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 147 147 CALL iom_rstput( kt, nitrst, numrtw, 'co2sbc', co2sbc, ldxios = lwxios ) ! These five need & 148 148 CALL iom_rstput( kt, nitrst, numrtw, 'c14sbc', c14sbc, ldxios = lwxios ) ! & to be written & -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/CFC/trcsms_cfc.F90
r13727 r13871 179 179 IF(lwp) WRITE(numout,*) '~~~~' 180 180 jl = 0 181 IF( lwxios ) CALL iom_swap( cw txios_context )181 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 182 182 DO jn = jp_cfc0, jp_cfc1 183 183 jl = jl + 1 … … 298 298 ! 299 299 jl = 0 300 IF(lr txios) CALL iom_swap(crtxios_context)300 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 301 301 DO jn = jp_cfc0, jp_cfc1 302 302 jl = jl + 1 303 CALL iom_get( numrtr, jpdom_auto, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jl), ldxios = lr txios )303 CALL iom_get( numrtr, jpdom_auto, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jl), ldxios = lrxios ) 304 304 END DO 305 IF(lr txios) CALL iom_swap(cxios_context)305 IF(lrxios) CALL iom_swap(cxios_context) 306 306 ENDIF 307 307 IF(lwp) WRITE(numout,*) -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/PISCES/P2Z/p2zexp.F90
r13727 r13871 134 134 & 'at it= ', kt,' date= ', ndastp 135 135 IF(lwp) WRITE(numout,*) '~~~~' 136 IF( lwxios ) CALL iom_swap( cw txios_context )136 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 137 137 CALL iom_rstput( kt, nitrst, numrtw, 'SEDB'//ctrcnm(jpdet), sedpocb(:,:), ldxios = lwxios ) 138 138 CALL iom_rstput( kt, nitrst, numrtw, 'SEDN'//ctrcnm(jpdet), sedpocn(:,:), ldxios = lwxios ) … … 216 216 ! 217 217 IF( ln_rsttr ) THEN 218 IF(lr txios) CALL iom_swap(crtxios_context)219 CALL iom_get( numrtr, jpdom_auto, 'SEDB'//ctrcnm(jpdet), sedpocb(:,:), ldxios = lr txios )220 CALL iom_get( numrtr, jpdom_auto, 'SEDN'//ctrcnm(jpdet), sedpocn(:,:), ldxios = lr txios )221 IF(lr txios) CALL iom_swap(cxios_context)218 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 219 CALL iom_get( numrtr, jpdom_auto, 'SEDB'//ctrcnm(jpdet), sedpocb(:,:), ldxios = lrxios ) 220 CALL iom_get( numrtr, jpdom_auto, 'SEDN'//ctrcnm(jpdet), sedpocn(:,:), ldxios = lrxios ) 221 IF(lrxios) CALL iom_swap(cxios_context) 222 222 ELSE 223 223 sedpocb(:,:) = 0._wp -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/PISCES/P4Z/p4zsms.F90
r13727 r13871 332 332 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 333 333 ! 334 IF(lr txios) CALL iom_swap(crtxios_context)334 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 335 335 IF( iom_varid( numrtr, 'PH', ldstop = .FALSE. ) > 0 ) THEN 336 CALL iom_get( numrtr, jpdom_auto, 'PH' , hi(:,:,:), ldxios = lr txios )336 CALL iom_get( numrtr, jpdom_auto, 'PH' , hi(:,:,:), ldxios = lrxios ) 337 337 ELSE 338 338 CALL p4z_che( Kbb, Kmm ) ! initialize the chemical constants 339 339 CALL ahini_for_at( hi, Kbb ) 340 340 ENDIF 341 CALL iom_get( numrtr, jpdom_auto, 'Silicalim', xksi(:,:), ldxios = lr txios )341 CALL iom_get( numrtr, jpdom_auto, 'Silicalim', xksi(:,:), ldxios = lrxios ) 342 342 IF( iom_varid( numrtr, 'Silicamax', ldstop = .FALSE. ) > 0 ) THEN 343 CALL iom_get( numrtr, jpdom_auto, 'Silicamax' , xksimax(:,:), ldxios = lr txios )343 CALL iom_get( numrtr, jpdom_auto, 'Silicamax' , xksimax(:,:), ldxios = lrxios ) 344 344 ELSE 345 345 xksimax(:,:) = xksi(:,:) … … 347 347 ! 348 348 IF( iom_varid( numrtr, 'tcflxcum', ldstop = .FALSE. ) > 0 ) THEN ! cumulative total flux of carbon 349 CALL iom_get( numrtr, 'tcflxcum' , t_oce_co2_flx_cum, ldxios = lr txios )349 CALL iom_get( numrtr, 'tcflxcum' , t_oce_co2_flx_cum, ldxios = lrxios ) 350 350 ELSE 351 351 t_oce_co2_flx_cum = 0._wp … … 354 354 IF( ln_p5z ) THEN 355 355 IF( iom_varid( numrtr, 'sized', ldstop = .FALSE. ) > 0 ) THEN 356 CALL iom_get( numrtr, jpdom_auto, 'sizep' , sizep(:,:,:), ldxios = lr txios )357 CALL iom_get( numrtr, jpdom_auto, 'sizen' , sizen(:,:,:), ldxios = lr txios )358 CALL iom_get( numrtr, jpdom_auto, 'sized' , sized(:,:,:), ldxios = lr txios )356 CALL iom_get( numrtr, jpdom_auto, 'sizep' , sizep(:,:,:), ldxios = lrxios ) 357 CALL iom_get( numrtr, jpdom_auto, 'sizen' , sizen(:,:,:), ldxios = lrxios ) 358 CALL iom_get( numrtr, jpdom_auto, 'sized' , sized(:,:,:), ldxios = lrxios ) 359 359 ELSE 360 360 sizep(:,:,:) = 1. … … 363 363 ENDIF 364 364 ENDIF 365 IF(lr txios) CALL iom_swap(cxios_context)365 IF(lrxios) CALL iom_swap(cxios_context) 366 366 ! 367 367 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN … … 371 371 IF(lwp) WRITE(numout,*) '~~~~~~~' 372 372 ENDIF 373 IF( lwxios ) CALL iom_swap( cw txios_context )373 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 374 374 CALL iom_rstput( kt, nitrst, numrtw, 'PH', hi(:,:,:), ldxios = lwxios ) 375 375 CALL iom_rstput( kt, nitrst, numrtw, 'Silicalim', xksi(:,:), ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/PISCES/SED/sed.F90
r12969 r13871 53 53 INTEGER , PUBLIC :: nn_rstsed !: control of the time step ( 0 or 1 ) for pass. tr. 54 54 INTEGER , PUBLIC :: nn_dtsed = 1 !: frequency of step on passive tracers 55 LOGICAL, PUBLIC :: lrsxios !: use xios to read restart56 55 CHARACTER(len = 80) , PUBLIC :: cn_sedrst_in !: suffix of pass. tracer restart name (input) 57 56 CHARACTER(len = 256), PUBLIC :: cn_sedrst_indir !: restart input directory -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/PISCES/SED/sedrst.F90
r13750 r13871 85 85 ELSE 86 86 #if defined key_iomput 87 cw sxios_context = "rstws_"//TRIM(ADJUSTL(clkt))87 cw_sedrst_cxt = "rstws_"//TRIM(ADJUSTL(clkt)) 88 88 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 89 89 clpname = clname … … 91 91 clpname = TRIM(Agrif_CFixed())//"_"//clname 92 92 ENDIF 93 CALL iom_init( cw sxios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. )93 CALL iom_init( cw_sedrst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. ) 94 94 CALL iom_swap( cxios_context ) 95 95 #else … … 138 138 zdta2 = 0. 139 139 140 IF(lr sxios) CALL iom_swap(crsxios_context)140 IF(lrxios) CALL iom_swap(cr_sedrst_cxt) 141 141 DO jn = 1, jptrased 142 142 cltra = TRIM(sedtrcd(jn)) 143 143 IF( iom_varid( numrsr, TRIM(cltra) , ldstop = .FALSE. ) > 0 ) THEN 144 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta(:,:,:,jn), ldxios = lr sxios )144 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta(:,:,:,jn), ldxios = lrxios ) 145 145 ELSE 146 146 zdta(:,:,:,jn) = 0.0 … … 161 161 cltra = TRIM(seddia3d(jn)) 162 162 IF( iom_varid( numrsr, TRIM(cltra) , ldstop = .FALSE. ) > 0 ) THEN 163 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta1(:,:,:,jn), ldxios = lr sxios )163 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta1(:,:,:,jn), ldxios = lrxios ) 164 164 ELSE 165 165 zdta1(:,:,:,jn) = 0.0 … … 188 188 cltra = "dbioturb" 189 189 IF( iom_varid( numrsr, TRIM(cltra) , ldstop = .FALSE. ) > 0 ) THEN 190 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta2(:,:,:), ldxios = lr sxios )190 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta2(:,:,:), ldxios = lrxios ) 191 191 ELSE 192 192 zdta2(:,:,:) = 0.0 … … 198 198 cltra = "irrig" 199 199 IF( iom_varid( numrsr, TRIM(cltra) , ldstop = .FALSE. ) > 0 ) THEN 200 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta2(:,:,:), ldxios = lr sxios )200 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta2(:,:,:), ldxios = lrxios ) 201 201 ELSE 202 202 zdta2(:,:,:) = 0.0 … … 208 208 cltra = "sedligand" 209 209 IF( iom_varid( numrsr, TRIM(cltra) , ldstop = .FALSE. ) > 0 ) THEN 210 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta2(:,:,:), ldxios = lr sxios )210 CALL iom_get( numrsr, jpdom_auto, TRIM(cltra), zdta2(:,:,:), ldxios = lrxios ) 211 211 ELSE 212 212 zdta2(:,:,:) = 0.0 … … 215 215 CALL pack_arr( jpoce, sedligand(1:jpoce,1:jpksed), & 216 216 & zdta2(1:jpi,1:jpj,1:jpksed), iarroce(1:jpoce) ) 217 IF(lr sxios) CALL iom_swap(cxios_context)217 IF(lrxios) CALL iom_swap(cxios_context) 218 218 IF( ln_timing ) CALL timing_stop('sed_rst_read') 219 219 … … 259 259 !! 1. WRITE in nutwrs 260 260 !! ------------------ 261 IF( lwxios ) CALL iom_swap( cw sxios_context )261 IF( lwxios ) CALL iom_swap( cw_sedrst_cxt ) 262 262 ! zinfo(1) = REAL( kt) 263 263 CALL iom_rstput( kt, nitrst, numrsw, 'kt', REAL( kt , wp), ldxios = lwxios ) … … 322 322 CALL iom_close( numrsw ) ! close the restart file (only at last time step) 323 323 ELSE 324 CALL iom_context_finalize( cw sxios_context )324 CALL iom_context_finalize( cw_sedrst_cxt ) 325 325 ENDIF 326 326 IF( l_offline .AND. ln_rst_list ) THEN … … 381 381 CALL iom_open( TRIM(cn_sedrst_indir)//'/'//cn_sedrst_in, numrsr ) 382 382 383 lrsxios = lrxios.AND.lxios_sini 384 IF( lrsxios) THEN 385 crsxios_context = 'sed_rst' 383 IF( lrxios) THEN 384 cr_sedrst_cxt = 'sed_rst' 386 385 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for SED' 387 386 IF( TRIM(Agrif_CFixed()) == '0' ) THEN … … 390 389 clpname = TRIM(Agrif_CFixed())//"_"//cn_sedrst_in 391 390 ENDIF 392 CALL iom_init( cr sxios_context, fname = TRIM(cn_sedrst_indir)//'/'//TRIM(clpname), &391 CALL iom_init( cr_sedrst_cxt, fname = TRIM(cn_sedrst_indir)//'/'//TRIM(clpname), & 393 392 idfp = iom_file(numrsr)%nfid, ld_closedef = .TRUE. ) 394 393 ENDIF 395 IF(lr sxios) CALL iom_swap(crsxios_context)396 CALL iom_get ( numrsr, 'kt', zkt, ldxios = lr sxios ) ! last time-step of previous run397 IF(lr sxios) CALL iom_swap(cxios_context)394 IF(lrxios) CALL iom_swap(cr_sedrst_cxt) 395 CALL iom_get ( numrsr, 'kt', zkt, ldxios = lrxios ) ! last time-step of previous run 396 IF(lrxios) CALL iom_swap(cxios_context) 398 397 IF(lwp) THEN 399 398 WRITE(numsed,*) ' *** Info read in restart : ' … … 416 415 ! ! set the date in offline mode 417 416 IF( ln_rst_sed .AND. nn_rstsed == 2 ) THEN 418 IF(lr sxios) CALL iom_swap(crsxios_context)419 CALL iom_get( numrsr, 'ndastp', zndastp, ldxios = lr sxios )417 IF(lrxios) CALL iom_swap(cr_sedrst_cxt) 418 CALL iom_get( numrsr, 'ndastp', zndastp, ldxios = lrxios ) 420 419 ndastp = NINT( zndastp ) 421 CALL iom_get( numrsr, 'adatrj', adatrj, ldxios = lr sxios )422 IF(lr sxios) CALL iom_swap(crxios_context)420 CALL iom_get( numrsr, 'adatrj', adatrj, ldxios = lrxios ) 421 IF(lrxios) CALL iom_swap(cr_ocerst_cxt) 423 422 ELSE 424 423 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam … … 444 443 IF(lwp) WRITE(numsed,*) 'trc_wri : write the TOP restart file (NetCDF) at it= ', kt, ' date= ', ndastp 445 444 IF(lwp) WRITE(numsed,*) '~~~~~~~' 446 IF( lwxios ) CALL iom_init_closedef(cw sxios_context)447 ENDIF 448 IF( lwxios ) CALL iom_swap( cw sxios_context )445 IF( lwxios ) CALL iom_init_closedef(cw_sedrst_cxt) 446 ENDIF 447 IF( lwxios ) CALL iom_swap( cw_sedrst_cxt ) 449 448 CALL iom_rstput( kt, nitrst, numrsw, 'kt' , REAL( kt , wp), ldxios = lwxios ) ! time-step 450 449 CALL iom_rstput( kt, nitrst, numrsw, 'ndastp' , REAL( ndastp, wp), ldxios = lwxios ) ! date -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/PISCES/SED/sedstp.F90
r12969 r13871 86 86 IF( kt == nitsed000 ) THEN 87 87 CALL iom_close( numrsr ) ! close input tracer restart file 88 IF(lr sxios) CALL iom_context_finalize( crsxios_context )88 IF(lrxios) CALL iom_context_finalize( cr_sedrst_cxt ) 89 89 ! IF(lwm) CALL FLUSH( numont ) ! flush namelist output 90 90 ENDIF -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/TRP/trcsbc.F90
r13727 r13871 87 87 IF(lwp) WRITE(numout,*) ' nittrc000-1 surface tracer content forcing fields read in the restart file' 88 88 zfact = 0.5_wp 89 IF(lr txios) CALL iom_swap(crtxios_context)89 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 90 90 DO jn = 1, jptra 91 CALL iom_get( numrtr, jpdom_auto, 'sbc_'//TRIM(ctrcnm(jn))//'_b', sbc_trc_b(:,:,jn), ldxios = lr txios ) ! before tracer content sbc91 CALL iom_get( numrtr, jpdom_auto, 'sbc_'//TRIM(ctrcnm(jn))//'_b', sbc_trc_b(:,:,jn), ldxios = lrxios ) ! before tracer content sbc 92 92 END DO 93 IF(lr txios) CALL iom_swap(cxios_context)93 IF(lrxios) CALL iom_swap(cxios_context) 94 94 ELSE ! No restart or restart not found: Euler forward time stepping 95 95 zfact = 1._wp … … 183 183 & 'at it= ', kt,' date= ', ndastp 184 184 IF(lwp) WRITE(numout,*) '~~~~' 185 IF( lwxios ) CALL iom_swap( cw txios_context )185 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 186 186 DO jn = 1, jptra 187 187 CALL iom_rstput( kt, nitrst, numrtw, 'sbc_'//TRIM(ctrcnm(jn))//'_b', sbc_trc(:,:,jn), ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/trc.F90
r13727 r13871 69 69 INTEGER , PUBLIC :: nittrc000 !: first time step of passive tracers model 70 70 LOGICAL , PUBLIC :: l_trcdm2dc !: Diurnal cycle for TOP 71 LOGICAL , PUBLIC :: lrtxios !: read TOP restart with XIOS72 71 73 72 !! Information for the ice module for tracers -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/trcrst.F90
r13750 r13871 96 96 ELSE 97 97 #if defined key_iomput 98 cw txios_context = "rstwt_"//TRIM(ADJUSTL(clkt))98 cw_toprst_cxt = "rstwt_"//TRIM(ADJUSTL(clkt)) 99 99 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 100 100 clpname = clname … … 102 102 clpname = TRIM(Agrif_CFixed())//"_"//clname 103 103 ENDIF 104 CALL iom_init( cw txios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. )104 CALL iom_init( cw_toprst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .FALSE. ) 105 105 CALL iom_swap( cxios_context ) 106 106 #else … … 130 130 131 131 ! READ prognostic variables and computes diagnostic variable 132 IF(lr txios) CALL iom_swap(crtxios_context)132 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 133 133 DO jn = 1, jptra 134 CALL iom_get( numrtr, jpdom_auto, 'TRN'//ctrcnm(jn), tr(:,:,:,jn,Kmm), ldxios = lr txios )134 CALL iom_get( numrtr, jpdom_auto, 'TRN'//ctrcnm(jn), tr(:,:,:,jn,Kmm), ldxios = lrxios ) 135 135 END DO 136 136 137 137 DO jn = 1, jptra 138 CALL iom_get( numrtr, jpdom_auto, 'TRB'//ctrcnm(jn), tr(:,:,:,jn,Kbb), ldxios = lr txios )138 CALL iom_get( numrtr, jpdom_auto, 'TRB'//ctrcnm(jn), tr(:,:,:,jn,Kbb), ldxios = lrxios ) 139 139 END DO 140 140 ! 141 141 CALL iom_delay_rst( 'READ', 'TOP', numrtr ) ! read only TOP delayed global communication variables 142 IF(lr txios) CALL iom_swap(cxios_context)142 IF(lrxios) CALL iom_swap(cxios_context) 143 143 END SUBROUTINE trc_rst_read 144 144 … … 155 155 !!---------------------------------------------------------------------- 156 156 ! 157 IF( lwxios ) CALL iom_swap( cw txios_context )157 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 158 158 CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rn_Dt, ldxios = lwxios ) ! passive tracer time step (= ocean time step) 159 159 ! prognostic variables … … 173 173 CALL trc_rst_stat( Kmm, Krhs ) ! statistics 174 174 IF(lwxios) THEN 175 CALL iom_context_finalize( cw txios_context )175 CALL iom_context_finalize( cw_toprst_cxt ) 176 176 ELSE 177 177 CALL iom_close( numrtw ) ! close the restart file (only at last time step) … … 234 234 lxios_sini = .FALSE. 235 235 CALL iom_open( TRIM(cn_trcrst_indir)//'/'//cn_trcrst_in, numrtr ) 236 lrtxios = lrxios.AND.lxios_sini 237 IF( lrtxios) THEN 238 crtxios_context = 'top_rst' 236 IF( lrxios) THEN 237 cr_toprst_cxt = 'top_rst' 239 238 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for TOP' 240 239 IF( TRIM(Agrif_CFixed()) == '0' ) THEN … … 243 242 clpname = TRIM(Agrif_CFixed())//"_"//cn_trcrst_in 244 243 ENDIF 245 CALL iom_init( cr txios_context, fname = TRIM(cn_trcrst_indir)//'/'//TRIM(clpname), &244 CALL iom_init( cr_toprst_cxt, fname = TRIM(cn_trcrst_indir)//'/'//TRIM(clpname), & 246 245 idfp = iom_file(numrtr)%nfid, ld_closedef = .TRUE. ) 247 246 ENDIF 248 247 249 IF(lr txios) CALL iom_swap(crtxios_context)250 CALL iom_get ( numrtr, 'kt', zkt, ldxios = lr txios ) ! last time-step of previous run251 IF(lr txios) CALL iom_swap(cxios_context)248 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 249 CALL iom_get ( numrtr, 'kt', zkt, ldxios = lrxios ) ! last time-step of previous run 250 IF(lrxios) CALL iom_swap(cxios_context) 252 251 253 252 IF(lwp) THEN … … 271 270 ! ! set the date in offline mode 272 271 IF( ln_rsttr .AND. nn_rsttr == 2 ) THEN 273 IF(lr txios) CALL iom_swap(crtxios_context)274 CALL iom_get( numrtr, 'ndastp', zndastp, ldxios = lr txios )272 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 273 CALL iom_get( numrtr, 'ndastp', zndastp, ldxios = lrxios ) 275 274 ndastp = NINT( zndastp ) 276 CALL iom_get( numrtr, 'adatrj', adatrj, ldxios = lr txios )277 CALL iom_get( numrtr, 'ntime' , ktime, ldxios = lr txios )278 IF(lr txios) CALL iom_swap(cxios_context)275 CALL iom_get( numrtr, 'adatrj', adatrj, ldxios = lrxios ) 276 CALL iom_get( numrtr, 'ntime' , ktime, ldxios = lrxios ) 277 IF(lrxios) CALL iom_swap(cxios_context) 279 278 nn_time0=INT(ktime) 280 279 ! calculate start time in hours and minutes … … 336 335 IF(lwp) WRITE(numout,*) '~~~~~~~' 337 336 ENDIF 338 IF( lwxios ) CALL iom_swap( cw txios_context )337 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 339 338 CALL iom_rstput( kt, nitrst, numrtw, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step 340 339 CALL iom_rstput( kt, nitrst, numrtw, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date -
NEMO/branches/2020/dev_12905_xios_restart/src/TOP/trcstp.F90
r13727 r13871 110 110 IF( kt == nittrc000 ) THEN 111 111 CALL iom_close( numrtr ) ! close input tracer restart file 112 IF(lr txios) CALL iom_context_finalize( crtxios_context )112 IF(lrxios) CALL iom_context_finalize( cr_toprst_cxt ) 113 113 IF(lwm) CALL FLUSH( numont ) ! flush namelist output 114 114 ENDIF … … 197 197 & .AND. iom_varid( numrtr, 'ktdcy' , ldstop = .FALSE. ) > 0 & 198 198 & .AND. iom_varid( numrtr, 'nrdcy' , ldstop = .FALSE. ) > 0 ) THEN 199 IF(lr txios) CALL iom_swap(crtxios_context)200 CALL iom_get( numrtr, 'ktdcy', zkt, ldxios = lr txios )199 IF(lrxios) CALL iom_swap(cr_toprst_cxt) 200 CALL iom_get( numrtr, 'ktdcy', zkt, ldxios = lrxios ) 201 201 rsecfst = INT( zkt ) * rn_Dt 202 202 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean read in the restart file at time-step rsecfst =', rsecfst, ' s ' 203 CALL iom_get( numrtr, jpdom_auto, 'qsr_mean', qsr_mean, ldxios = lr txios ) ! A mean of qsr204 CALL iom_get( numrtr, 'nrdcy', zrec, ldxios = lr txios ) ! Number of record per days203 CALL iom_get( numrtr, jpdom_auto, 'qsr_mean', qsr_mean, ldxios = lrxios ) ! A mean of qsr 204 CALL iom_get( numrtr, 'nrdcy', zrec, ldxios = lrxios ) ! Number of record per days 205 205 IF( INT( zrec ) == nb_rec_per_day ) THEN 206 206 DO jn = 1, nb_rec_per_day 207 207 IF( jn <= 9 ) THEN 208 208 WRITE(cl1,'(i1)') jn 209 CALL iom_get( numrtr, jpdom_auto, 'qsr_arr_'//cl1, qsr_arr(:,:,jn), ldxios = lr txios ) ! A mean of qsr209 CALL iom_get( numrtr, jpdom_auto, 'qsr_arr_'//cl1, qsr_arr(:,:,jn), ldxios = lrxios ) ! A mean of qsr 210 210 ELSE 211 211 WRITE(cl2,'(i2.2)') jn 212 CALL iom_get( numrtr, jpdom_auto, 'qsr_arr_'//cl2, qsr_arr(:,:,jn), ldxios = lr txios ) ! A mean of qsr212 CALL iom_get( numrtr, jpdom_auto, 'qsr_arr_'//cl2, qsr_arr(:,:,jn), ldxios = lrxios ) ! A mean of qsr 213 213 ENDIF 214 214 END DO … … 218 218 ENDDO 219 219 ENDIF 220 IF(lr txios) CALL iom_swap(cxios_context)220 IF(lrxios) CALL iom_swap(cxios_context) 221 221 ELSE !* no restart: set from nit000 values 222 222 IF(lwp) WRITE(numout,*) 'trc_qsr_mean: qsr_mean set to nit000 values' … … 252 252 zkt = REAL( ktdcy, wp ) 253 253 zrec = REAL( nb_rec_per_day, wp ) 254 IF( lwxios ) CALL iom_swap( cw txios_context )254 IF( lwxios ) CALL iom_swap( cw_toprst_cxt ) 255 255 CALL iom_rstput( kt, nitrst, numrtw, 'ktdcy', zkt, ldxios = lwxios ) 256 256 CALL iom_rstput( kt, nitrst, numrtw, 'nrdcy', zrec, ldxios = lwxios ) -
NEMO/branches/2020/dev_12905_xios_restart/tests/CANAL/MY_SRC/domvvl.F90
r13727 r13871 785 785 IF( ln_rstart ) THEN !* Read the restart file 786 786 CALL rst_read_open ! open the restart file if necessary 787 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context))788 CALL iom_get( numror, jpdom_auto, 'sshn' , ssh(:,:,Kmm), ldxios = lr oxios )787 IF( lrxios ) CALL iom_swap( cr_ocerst_cxt ) 788 CALL iom_get( numror, jpdom_auto, 'sshn' , ssh(:,:,Kmm), ldxios = lrxios ) 789 789 ! 790 790 id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) … … 799 799 ! 800 800 IF( MIN( id1, id2 ) > 0 ) THEN ! all required arrays exist 801 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lr oxios )802 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lr oxios )801 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 802 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 803 803 ! needed to restart if land processor not computed 804 804 IF(lwp) write(numout,*) 'dom_vvl_rst : e3t(:,:,:,Kbb) and e3t(:,:,:,Kmm) found in restart files' … … 814 814 IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 815 815 IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 816 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lr oxios )816 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 817 817 e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 818 818 l_1st_euler = .true. … … 821 821 IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 822 822 IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 823 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lr oxios )823 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 824 824 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 825 825 l_1st_euler = .true. … … 846 846 ! ! ----------------------- ! 847 847 IF( MIN( id3, id4 ) > 0 ) THEN ! all required arrays exist 848 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lr oxios )849 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lr oxios )848 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 849 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 850 850 ELSE ! one at least array is missing 851 851 tilde_e3t_b(:,:,:) = 0.0_wp … … 856 856 ! ! ------------ ! 857 857 IF( id5 > 0 ) THEN ! required array exists 858 CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lr oxios )858 CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 859 859 ELSE ! array is missing 860 860 hdiv_lf(:,:,:) = 0.0_wp … … 862 862 ENDIF 863 863 ENDIF 864 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context))864 IF( lrxios ) CALL iom_swap( cxios_context ) 865 865 ! 866 866 ELSE !* Initialize at "rest" … … 931 931 ! ! =================== 932 932 IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 933 IF( lwxios ) CALL iom_swap( cw xios_context )933 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 934 934 ! ! --------- ! 935 935 ! ! all cases ! -
NEMO/branches/2020/dev_12905_xios_restart/tests/VORTEX/MY_SRC/domvvl.F90
r13750 r13871 785 785 IF( ln_rstart ) THEN !* Read the restart file 786 786 CALL rst_read_open ! open the restart file if necessary 787 IF( lr oxios ) CALL iom_swap( TRIM(crxios_context))788 CALL iom_get( numror, jpdom_auto, 'sshn' , ssh(:,:,Kmm), ldxios = lr oxios )787 IF( lrxios ) CALL iom_swap( cr_ocerst_cxt ) 788 CALL iom_get( numror, jpdom_auto, 'sshn' , ssh(:,:,Kmm), ldxios = lrxios ) 789 789 ! 790 790 id1 = iom_varid( numror, 'e3t_b', ldstop = .FALSE. ) … … 799 799 ! 800 800 IF( MIN( id1, id2 ) > 0 ) THEN ! all required arrays exist 801 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lr oxios )802 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lr oxios )801 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 802 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 803 803 ! needed to restart if land processor not computed 804 804 IF(lwp) write(numout,*) 'dom_vvl_rst : e3t(:,:,:,Kbb) and e3t(:,:,:,Kmm) found in restart files' … … 814 814 IF(lwp) write(numout,*) 'e3t_n set equal to e3t_b.' 815 815 IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 816 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lr oxios )816 CALL iom_get( numror, jpdom_auto, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 817 817 e3t(:,:,:,Kmm) = e3t(:,:,:,Kbb) 818 818 l_1st_euler = .true. … … 821 821 IF(lwp) write(numout,*) 'e3t_b set equal to e3t_n.' 822 822 IF(lwp) write(numout,*) 'l_1st_euler is forced to true' 823 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lr oxios )823 CALL iom_get( numror, jpdom_auto, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lrxios ) 824 824 e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 825 825 l_1st_euler = .true. … … 846 846 ! ! ----------------------- ! 847 847 IF( MIN( id3, id4 ) > 0 ) THEN ! all required arrays exist 848 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lr oxios )849 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lr oxios )848 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_b', tilde_e3t_b(:,:,:), ldxios = lrxios ) 849 CALL iom_get( numror, jpdom_auto, 'tilde_e3t_n', tilde_e3t_n(:,:,:), ldxios = lrxios ) 850 850 ELSE ! one at least array is missing 851 851 tilde_e3t_b(:,:,:) = 0.0_wp … … 856 856 ! ! ------------ ! 857 857 IF( id5 > 0 ) THEN ! required array exists 858 CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lr oxios )858 CALL iom_get( numror, jpdom_auto, 'hdiv_lf', hdiv_lf(:,:,:), ldxios = lrxios ) 859 859 ELSE ! array is missing 860 860 hdiv_lf(:,:,:) = 0.0_wp … … 862 862 ENDIF 863 863 ENDIF 864 IF( lr oxios ) CALL iom_swap( TRIM(cxios_context))864 IF( lrxios ) CALL iom_swap( cxios_context ) 865 865 ! 866 866 ELSE !* Initialize at "rest" … … 931 931 ! ! =================== 932 932 IF(lwp) WRITE(numout,*) '---- dom_vvl_rst ----' 933 IF( lwxios ) CALL iom_swap( cw xios_context )933 IF( lwxios ) CALL iom_swap( cw_ocerst_cxt ) 934 934 ! ! --------- ! 935 935 ! ! all cases !
Note: See TracChangeset
for help on using the changeset viewer.