Changeset 11840 for NEMO/branches/2019/dev_r11756_SI3restart_XIOS
- Timestamp:
- 2019-10-31T16:30:50+01:00 (4 years ago)
- Location:
- NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedia.F90
r11837 r11840 202 202 IF( ice_dia_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'ice_dia_init : unable to allocate arrays' ) ! allocate tke arrays 203 203 CALL ice_dia_rst( 'READ' ) ! read or initialize all required files 204 IF(lwxios) THEN 205 CALL iom_set_rstw_var_active(rsti_wfields, 'frc_voltop' ) 206 CALL iom_set_rstw_var_active(rsti_wfields, 'frc_volbot' ) 207 CALL iom_set_rstw_var_active(rsti_wfields, 'frc_temtop' ) 208 CALL iom_set_rstw_var_active(rsti_wfields, 'frc_tembot' ) 209 CALL iom_set_rstw_var_active(rsti_wfields, 'frc_sal' ) 210 CALL iom_set_rstw_var_active(rsti_wfields, 'vol_loc_ini') 211 CALL iom_set_rstw_var_active(rsti_wfields, 'tem_loc_ini') 212 CALL iom_set_rstw_var_active(rsti_wfields, 'sal_loc_ini') 213 ENDIF 204 214 ENDIF 205 215 ! … … 267 277 ! Write in numriw (if iter == nitrst) 268 278 ! ------------------ 269 CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop ) 270 CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot ) 271 CALL iom_rstput( iter, nitrst, numriw, 'frc_temtop' , frc_temtop ) 272 CALL iom_rstput( iter, nitrst, numriw, 'frc_tembot' , frc_tembot ) 273 CALL iom_rstput( iter, nitrst, numriw, 'frc_sal' , frc_sal ) 274 CALL iom_rstput( iter, nitrst, numriw, 'vol_loc_ini', vol_loc_ini ) 275 CALL iom_rstput( iter, nitrst, numriw, 'tem_loc_ini', tem_loc_ini ) 276 CALL iom_rstput( iter, nitrst, numriw, 'sal_loc_ini', sal_loc_ini ) 279 IF(lwxios) CALL iom_swap( cwixios_context ) 280 CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop, ldxios = lwxios ) 281 CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot, ldxios = lwxios ) 282 CALL iom_rstput( iter, nitrst, numriw, 'frc_temtop' , frc_temtop, ldxios = lwxios ) 283 CALL iom_rstput( iter, nitrst, numriw, 'frc_tembot' , frc_tembot, ldxios = lwxios ) 284 CALL iom_rstput( iter, nitrst, numriw, 'frc_sal' , frc_sal, ldxios = lwxios ) 285 CALL iom_rstput( iter, nitrst, numriw, 'vol_loc_ini', vol_loc_ini, ldxios = lwxios ) 286 CALL iom_rstput( iter, nitrst, numriw, 'tem_loc_ini', tem_loc_ini, ldxios = lwxios ) 287 CALL iom_rstput( iter, nitrst, numriw, 'sal_loc_ini', sal_loc_ini, ldxios = lwxios ) 288 IF(lwxios) CALL iom_swap( cxios_context ) 277 289 ! 278 290 ENDIF -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedyn_adv_pra.F90
r11837 r11840 650 650 !!------------------------------------------------------------------- 651 651 INTEGER :: ierr 652 INTEGER :: jk 653 CHARACTER(len=25) :: znam 654 CHARACTER(len=2) :: zchar1 652 655 !!------------------------------------------------------------------- 653 656 ! … … 671 674 IF( ierr /= 0 ) CALL ctl_stop('STOP', 'adv_pra_init : unable to allocate ice arrays for Prather advection scheme') 672 675 ! 673 CALL adv_pra_rst( 'READ' ) !* read or initialize all required files 676 CALL adv_pra_rst( 'READ' ) !* read or initialize all required files 677 ! 678 IF(lwxios) THEN 679 CALL iom_set_rstw_var_active(rsti_wfields, 'sxice') 680 CALL iom_set_rstw_var_active(rsti_wfields, 'syice') 681 CALL iom_set_rstw_var_active(rsti_wfields, 'sxxice') 682 CALL iom_set_rstw_var_active(rsti_wfields, 'syyice') 683 CALL iom_set_rstw_var_active(rsti_wfields, 'sxyice') 684 CALL iom_set_rstw_var_active(rsti_wfields, 'sxsn' ) 685 CALL iom_set_rstw_var_active(rsti_wfields, 'sysn' ) 686 CALL iom_set_rstw_var_active(rsti_wfields, 'sxxsn' ) 687 CALL iom_set_rstw_var_active(rsti_wfields, 'syysn' ) 688 CALL iom_set_rstw_var_active(rsti_wfields, 'sxysn' ) 689 CALL iom_set_rstw_var_active(rsti_wfields, 'sxa' ) 690 CALL iom_set_rstw_var_active(rsti_wfields, 'sya' ) 691 CALL iom_set_rstw_var_active(rsti_wfields, 'sxxa' ) 692 CALL iom_set_rstw_var_active(rsti_wfields, 'syya' ) 693 CALL iom_set_rstw_var_active(rsti_wfields, 'sxya' ) 694 CALL iom_set_rstw_var_active(rsti_wfields, 'sxsal' ) 695 CALL iom_set_rstw_var_active(rsti_wfields, 'sysal' ) 696 CALL iom_set_rstw_var_active(rsti_wfields, 'sxxsal') 697 CALL iom_set_rstw_var_active(rsti_wfields, 'syysal') 698 CALL iom_set_rstw_var_active(rsti_wfields, 'sxysal') 699 CALL iom_set_rstw_var_active(rsti_wfields, 'sxage' ) 700 CALL iom_set_rstw_var_active(rsti_wfields, 'syage' ) 701 CALL iom_set_rstw_var_active(rsti_wfields, 'sxxage') 702 CALL iom_set_rstw_var_active(rsti_wfields, 'syyage') 703 CALL iom_set_rstw_var_active(rsti_wfields, 'sxyage') 704 DO jk = 1, nlay_s 705 WRITE(zchar1,'(I2.2)') jk 706 znam = 'sxc0'//'_l'//zchar1 707 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 708 znam = 'syc0'//'_l'//zchar1 709 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 710 znam = 'sxxc0'//'_l'//zchar1 711 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 712 znam = 'syyc0'//'_l'//zchar1 713 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 714 znam = 'sxyc0'//'_l'//zchar1 715 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 716 END DO 717 DO jk = 1, nlay_i 718 WRITE(zchar1,'(I2.2)') jk 719 znam = 'sxe'//'_l'//zchar1 720 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 721 znam = 'sye'//'_l'//zchar1 722 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 723 znam = 'sxxe'//'_l'//zchar1 724 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 725 znam = 'syye'//'_l'//zchar1 726 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 727 znam = 'sxye'//'_l'//zchar1 728 CALL iom_set_rstw_var_active(rsti_wfields, znam ) 729 END DO 730 ! 731 IF( ln_pnd_H12 ) THEN ! melt pond fraction 732 CALL iom_set_rstw_var_active(rsti_wfields, 'sxap' ) 733 CALL iom_set_rstw_var_active(rsti_wfields, 'syap' ) 734 CALL iom_set_rstw_var_active(rsti_wfields, 'sxxap') 735 CALL iom_set_rstw_var_active(rsti_wfields, 'syyap') 736 CALL iom_set_rstw_var_active(rsti_wfields, 'sxyap') 737 CALL iom_set_rstw_var_active(rsti_wfields, 'sxvp' ) 738 CALL iom_set_rstw_var_active(rsti_wfields, 'syvp' ) 739 CALL iom_set_rstw_var_active(rsti_wfields, 'sxxvp') 740 CALL iom_set_rstw_var_active(rsti_wfields, 'syyvp') 741 CALL iom_set_rstw_var_active(rsti_wfields, 'sxyvp') 742 ENDIF 743 ENDIF 674 744 ! 675 745 END SUBROUTINE adv_pra_init … … 823 893 ! 824 894 ! ! ice thickness 825 CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice ) 826 CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice ) 827 CALL iom_rstput( iter, nitrst, numriw, 'sxxice', sxxice ) 828 CALL iom_rstput( iter, nitrst, numriw, 'syyice', syyice ) 829 CALL iom_rstput( iter, nitrst, numriw, 'sxyice', sxyice ) 895 IF(lwxios) CALL iom_swap( TRIM(cwixios_context) ) 896 CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice, ldxios = lwxios ) 897 CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice, ldxios = lwxios ) 898 CALL iom_rstput( iter, nitrst, numriw, 'sxxice', sxxice, ldxios = lwxios ) 899 CALL iom_rstput( iter, nitrst, numriw, 'syyice', syyice, ldxios = lwxios ) 900 CALL iom_rstput( iter, nitrst, numriw, 'sxyice', sxyice, ldxios = lwxios ) 830 901 ! ! snow thickness 831 CALL iom_rstput( iter, nitrst, numriw, 'sxsn' , sxsn 832 CALL iom_rstput( iter, nitrst, numriw, 'sysn' , sysn 833 CALL iom_rstput( iter, nitrst, numriw, 'sxxsn' , sxxsn 834 CALL iom_rstput( iter, nitrst, numriw, 'syysn' , syysn 835 CALL iom_rstput( iter, nitrst, numriw, 'sxysn' , sxysn 902 CALL iom_rstput( iter, nitrst, numriw, 'sxsn' , sxsn, ldxios = lwxios ) 903 CALL iom_rstput( iter, nitrst, numriw, 'sysn' , sysn, ldxios = lwxios ) 904 CALL iom_rstput( iter, nitrst, numriw, 'sxxsn' , sxxsn, ldxios = lwxios ) 905 CALL iom_rstput( iter, nitrst, numriw, 'syysn' , syysn, ldxios = lwxios ) 906 CALL iom_rstput( iter, nitrst, numriw, 'sxysn' , sxysn, ldxios = lwxios ) 836 907 ! ! ice concentration 837 CALL iom_rstput( iter, nitrst, numriw, 'sxa' , sxa 838 CALL iom_rstput( iter, nitrst, numriw, 'sya' , sya 839 CALL iom_rstput( iter, nitrst, numriw, 'sxxa' , sxxa 840 CALL iom_rstput( iter, nitrst, numriw, 'syya' , syya 841 CALL iom_rstput( iter, nitrst, numriw, 'sxya' , sxya 908 CALL iom_rstput( iter, nitrst, numriw, 'sxa' , sxa, ldxios = lwxios ) 909 CALL iom_rstput( iter, nitrst, numriw, 'sya' , sya, ldxios = lwxios ) 910 CALL iom_rstput( iter, nitrst, numriw, 'sxxa' , sxxa, ldxios = lwxios ) 911 CALL iom_rstput( iter, nitrst, numriw, 'syya' , syya, ldxios = lwxios ) 912 CALL iom_rstput( iter, nitrst, numriw, 'sxya' , sxya, ldxios = lwxios ) 842 913 ! ! ice salinity 843 CALL iom_rstput( iter, nitrst, numriw, 'sxsal' , sxsal 844 CALL iom_rstput( iter, nitrst, numriw, 'sysal' , sysal 845 CALL iom_rstput( iter, nitrst, numriw, 'sxxsal', sxxsal )846 CALL iom_rstput( iter, nitrst, numriw, 'syysal', syysal )847 CALL iom_rstput( iter, nitrst, numriw, 'sxysal', sxysal )914 CALL iom_rstput( iter, nitrst, numriw, 'sxsal' , sxsal, ldxios = lwxios ) 915 CALL iom_rstput( iter, nitrst, numriw, 'sysal' , sysal, ldxios = lwxios ) 916 CALL iom_rstput( iter, nitrst, numriw, 'sxxsal', sxxsal, ldxios = lwxios ) 917 CALL iom_rstput( iter, nitrst, numriw, 'syysal', syysal, ldxios = lwxios ) 918 CALL iom_rstput( iter, nitrst, numriw, 'sxysal', sxysal, ldxios = lwxios ) 848 919 ! ! ice age 849 CALL iom_rstput( iter, nitrst, numriw, 'sxage' , sxage 850 CALL iom_rstput( iter, nitrst, numriw, 'syage' , syage 851 CALL iom_rstput( iter, nitrst, numriw, 'sxxage', sxxage )852 CALL iom_rstput( iter, nitrst, numriw, 'syyage', syyage )853 CALL iom_rstput( iter, nitrst, numriw, 'sxyage', sxyage )920 CALL iom_rstput( iter, nitrst, numriw, 'sxage' , sxage, ldxios = lwxios ) 921 CALL iom_rstput( iter, nitrst, numriw, 'syage' , syage, ldxios = lwxios ) 922 CALL iom_rstput( iter, nitrst, numriw, 'sxxage', sxxage, ldxios = lwxios ) 923 CALL iom_rstput( iter, nitrst, numriw, 'syyage', syyage, ldxios = lwxios ) 924 CALL iom_rstput( iter, nitrst, numriw, 'sxyage', sxyage, ldxios = lwxios ) 854 925 ! ! snow layers heat content 855 926 DO jk = 1, nlay_s 856 927 WRITE(zchar1,'(I2.2)') jk 857 znam = 'sxc0'//'_l'//zchar1 ; z3d(:,:,:) = sxc0 (:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 858 znam = 'syc0'//'_l'//zchar1 ; z3d(:,:,:) = syc0 (:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 859 znam = 'sxxc0'//'_l'//zchar1 ; z3d(:,:,:) = sxxc0(:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 860 znam = 'syyc0'//'_l'//zchar1 ; z3d(:,:,:) = syyc0(:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 861 znam = 'sxyc0'//'_l'//zchar1 ; z3d(:,:,:) = sxyc0(:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 928 znam = 'sxc0'//'_l'//zchar1 929 z3d(:,:,:) = sxc0 (:,:,jk,:) 930 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 931 932 znam = 'syc0'//'_l'//zchar1 933 z3d(:,:,:) = syc0 (:,:,jk,:) 934 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 935 936 znam = 'sxxc0'//'_l'//zchar1 937 z3d(:,:,:) = sxxc0(:,:,jk,:) 938 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 939 940 znam = 'syyc0'//'_l'//zchar1 941 z3d(:,:,:) = syyc0(:,:,jk,:) 942 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 943 944 znam = 'sxyc0'//'_l'//zchar1 945 z3d(:,:,:) = sxyc0(:,:,jk,:) 946 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 862 947 END DO 863 948 ! ! ice layers heat content 864 949 DO jk = 1, nlay_i 865 950 WRITE(zchar1,'(I2.2)') jk 866 znam = 'sxe'//'_l'//zchar1 ; z3d(:,:,:) = sxe (:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 867 znam = 'sye'//'_l'//zchar1 ; z3d(:,:,:) = sye (:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 868 znam = 'sxxe'//'_l'//zchar1 ; z3d(:,:,:) = sxxe(:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 869 znam = 'syye'//'_l'//zchar1 ; z3d(:,:,:) = syye(:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 870 znam = 'sxye'//'_l'//zchar1 ; z3d(:,:,:) = sxye(:,:,jk,:) ; CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 951 znam = 'sxe'//'_l'//zchar1 952 z3d(:,:,:) = sxe (:,:,jk,:) 953 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 954 znam = 'sye'//'_l'//zchar1 955 z3d(:,:,:) = sye (:,:,jk,:) 956 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 957 znam = 'sxxe'//'_l'//zchar1 958 z3d(:,:,:) = sxxe(:,:,jk,:) 959 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 960 znam = 'syye'//'_l'//zchar1 961 z3d(:,:,:) = syye(:,:,jk,:) 962 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 963 znam = 'sxye'//'_l'//zchar1 964 z3d(:,:,:) = sxye(:,:,jk,:) 965 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 871 966 END DO 872 967 ! 873 968 IF( ln_pnd_H12 ) THEN ! melt pond fraction 874 CALL iom_rstput( iter, nitrst, numriw, 'sxap' , sxap 875 CALL iom_rstput( iter, nitrst, numriw, 'syap' , syap 876 CALL iom_rstput( iter, nitrst, numriw, 'sxxap', sxxap )877 CALL iom_rstput( iter, nitrst, numriw, 'syyap', syyap )878 CALL iom_rstput( iter, nitrst, numriw, 'sxyap', sxyap )969 CALL iom_rstput( iter, nitrst, numriw, 'sxap' , sxap, ldxios = lwxios ) 970 CALL iom_rstput( iter, nitrst, numriw, 'syap' , syap, ldxios = lwxios ) 971 CALL iom_rstput( iter, nitrst, numriw, 'sxxap', sxxap, ldxios = lwxios ) 972 CALL iom_rstput( iter, nitrst, numriw, 'syyap', syyap, ldxios = lwxios ) 973 CALL iom_rstput( iter, nitrst, numriw, 'sxyap', sxyap, ldxios = lwxios ) 879 974 ! ! melt pond volume 880 CALL iom_rstput( iter, nitrst, numriw, 'sxvp' , sxvp 881 CALL iom_rstput( iter, nitrst, numriw, 'syvp' , syvp 882 CALL iom_rstput( iter, nitrst, numriw, 'sxxvp', sxxvp )883 CALL iom_rstput( iter, nitrst, numriw, 'syyvp', syyvp )884 CALL iom_rstput( iter, nitrst, numriw, 'sxyvp', sxyvp )975 CALL iom_rstput( iter, nitrst, numriw, 'sxvp' , sxvp, ldxios = lwxios ) 976 CALL iom_rstput( iter, nitrst, numriw, 'syvp' , syvp, ldxios = lwxios ) 977 CALL iom_rstput( iter, nitrst, numriw, 'sxxvp', sxxvp, ldxios = lwxios ) 978 CALL iom_rstput( iter, nitrst, numriw, 'syyvp', syyvp, ldxios = lwxios ) 979 CALL iom_rstput( iter, nitrst, numriw, 'sxyvp', sxyvp, ldxios = lwxios ) 885 980 ENDIF 981 ! 982 IF(lwxios) CALL iom_swap( TRIM(cxios_context) ) 886 983 ! 887 984 ENDIF -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedyn_rhg_evp.F90
r11837 r11840 872 872 IF( TRIM(cdrw) == 'READ' ) THEN ! Read/initialize 873 873 ! ! --------------- 874 IF(lwxios) THEN 875 CALL iom_set_rstw_var_active(rsti_wfields, 'stress1_i' ) 876 CALL iom_set_rstw_var_active(rsti_wfields, 'stress2_i' ) 877 CALL iom_set_rstw_var_active(rsti_wfields, 'stress12_i') 878 ENDIF 879 ! 874 880 IF( ln_rstart ) THEN !* Read the restart file 875 881 ! … … 904 910 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 905 911 ! 906 CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i ) 907 CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i ) 908 CALL iom_rstput( iter, nitrst, numriw, 'stress12_i', stress12_i ) 912 IF(lwxios) CALL iom_swap( TRIM(cwixios_context) ) 913 CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i, ldxios = lwxios ) 914 CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i, ldxios = lwxios ) 915 CALL iom_rstput( iter, nitrst, numriw, 'stress12_i', stress12_i, ldxios = lwxios ) 916 IF(lwxios) CALL iom_swap( TRIM(cxios_context) ) 909 917 ! 910 918 ENDIF -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icerst.F90
r11839 r11840 51 51 CHARACTER(len=50) :: clname ! ice output restart file name 52 52 CHARACTER(len=256) :: clpath ! full path to ice output restart file 53 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 53 54 !!---------------------------------------------------------------------- 54 55 ! … … 80 81 ENDIF 81 82 ! 82 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl ) 83 IF(.NOT.lwxios) THEN 84 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl ) 85 ELSE 86 #if defined key_iomput 87 cwixios_context = "si3_rstw_"//TRIM(ADJUSTL(clkt)) 88 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 89 clpname = clname 90 ELSE 91 clpname = TRIM(Agrif_CFixed())//"_"//clname 92 ENDIF 93 CALL iom_init( cwixios_context, TRIM(clpath)//TRIM(clpname), .false. ) 94 CALL xios_update_calendar(nitrst) 95 CALL iom_swap( cxios_context ) 96 #else 97 clinfo = 'Can not use XIOS in rst_opn' 98 CALL ctl_stop(TRIM(clinfo)) 99 #endif 100 ENDIF 83 101 lrst_ice = .TRUE. 84 102 ENDIF … … 117 135 ! ------------------ 118 136 ! ! calendar control 119 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) ) ! time-step 120 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ) ) ! date 137 IF(lwxios) CALL iom_swap( cwixios_context ) 138 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ), ldxios = lwxios ) ! time-step 139 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ), ldxios = lwxios ) ! date 121 140 CALL iom_delay_rst( 'WRITE', 'ICE', numriw ) ! save only ice delayed global communication variables 122 141 123 142 ! Prognostic variables 124 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i )125 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s )126 CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i )127 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i )128 CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su )129 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice )130 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice )131 CALL iom_rstput( iter, nitrst, numriw, 'oa_i' , oa_i )132 CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip )133 CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip )143 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i, ldxios = lwxios ) 144 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s, ldxios = lwxios ) 145 CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i, ldxios = lwxios ) 146 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i, ldxios = lwxios ) 147 CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su, ldxios = lwxios ) 148 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice, ldxios = lwxios ) 149 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice, ldxios = lwxios ) 150 CALL iom_rstput( iter, nitrst, numriw, 'oa_i' , oa_i, ldxios = lwxios ) 151 CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip, ldxios = lwxios ) 152 CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip, ldxios = lwxios ) 134 153 ! Snow enthalpy 135 154 DO jk = 1, nlay_s … … 137 156 znam = 'e_s'//'_l'//zchar1 138 157 z3d(:,:,:) = e_s(:,:,jk,:) 139 CALL iom_rstput( iter, nitrst, numriw, znam , z3d )158 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 140 159 END DO 141 160 ! Ice enthalpy … … 144 163 znam = 'e_i'//'_l'//zchar1 145 164 z3d(:,:,:) = e_i(:,:,jk,:) 146 CALL iom_rstput( iter, nitrst, numriw, znam , z3d )165 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 147 166 END DO 148 167 ! fields needed for Met Office (Jules) coupling 149 168 IF( ln_cpl ) THEN 150 CALL iom_rstput( iter, nitrst, numriw, 'cnd_ice', cnd_ice ) 151 CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice ) 152 ENDIF 169 CALL iom_rstput( iter, nitrst, numriw, 'cnd_ice', cnd_ice, ldxios = lwxios ) 170 CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice, ldxios = lwxios ) 171 ENDIF 172 IF(lwxios) CALL iom_swap( cxios_context ) 153 173 ! 154 174 … … 156 176 ! ------------------ 157 177 IF( iter == nitrst ) THEN 158 CALL iom_close( numriw ) 178 IF(lwxios) THEN 179 CALL iom_context_finalize( cwixios_context ) 180 ELSE 181 CALL iom_close( numriw ) 182 ENDIF 159 183 lrst_ice = .FALSE. 160 184 ENDIF -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icestp.F90
r11536 r11840 239 239 CALL par_init ! set some ice run parameters 240 240 ! 241 IF(lwxios) THEN 242 CALL iom_set_rst_vars(rsti_wfields) 243 CALL iom_set_rstw_core(rsti_wfields, "SI3") 244 ENDIF 241 245 ! ! Allocate the ice arrays (sbc_ice already allocated in sbc_init) 242 246 ierr = ice_alloc () ! ice variables -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/iceupdate.F90
r11837 r11840 398 398 ! 399 399 CALL update_rst( 'READ' ) !* read or initialize all required files 400 IF( lwxios ) THEN 401 CALL iom_set_rstw_var_active(rsti_wfields, 'snwice_mass') 402 CALL iom_set_rstw_var_active(rsti_wfields, 'snwice_mass_b') 403 ENDIF 400 404 ! 401 405 END SUBROUTINE ice_update_init … … 444 448 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 445 449 ! 446 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass' , snwice_mass ) 447 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass_b', snwice_mass_b ) 450 IF(lwxios) CALL iom_swap( cwixios_context ) 451 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass' , snwice_mass, ldxios = lwxios ) 452 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass_b', snwice_mass_b, ldxios = lwxios ) 453 IF(lwxios) CALL iom_swap( cxios_context ) 448 454 ! 449 455 ENDIF -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/DOM/domain.F90
r11536 r11840 124 124 !define names for restart write and set core output (restart.F90) 125 125 CALL iom_set_rst_vars(rst_wfields) 126 CALL iom_set_rstw_core( cdstr)126 CALL iom_set_rstw_core(rst_wfields, cdstr) 127 127 ENDIF 128 128 !reset namelist for SAS -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/in_out_manager.F90
r11837 r11840 171 171 CHARACTER(lc) :: cwxios_context !: context name used in xios to write NEMO restart file 172 172 CHARACTER(lc) :: crixios_context !: context name used in xios to read SI3 restart 173 CHARACTER(lc) :: cwixios_context !: context name used in xios to write SI3 restart 173 174 LOGICAL :: lrsi3_nemo !: is SI3 irestart in nemo format 174 175 -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/iom.F90
r11837 r11840 244 244 !set names of the fields in restart file IF using XIOS to write data 245 245 CALL iom_set_rst_context(.FALSE.) 246 CALL iom_set_rst_vars(rst_wfields)247 246 !set which fields are to be written to a restart file 248 247 CALL iom_set_rstw_active(rst_wfields, fname) 248 ELSE IF( TRIM(cdname) == TRIM(cwixios_context) ) THEN 249 !set names of the fields in restart file IF using XIOS to write data 250 CALL iom_set_rst_context(.FALSE.) 251 !set which fields are to be written to a restart file 252 CALL iom_set_rstw_active(rsti_wfields, fname) 249 253 ELSE 250 254 CALL set_xmlatt … … 361 365 END SUBROUTINE iom_set_rstr_active 362 366 363 SUBROUTINE iom_set_rstw_core( cdmdl)367 SUBROUTINE iom_set_rstw_core(drst_wfields, cdmdl) 364 368 !!--------------------------------------------------------------------- 365 369 !! *** SUBROUTINE iom_set_rstw_core *** … … 367 371 !! ** Purpose : set variables which are always in restart file 368 372 !!--------------------------------------------------------------------- 369 CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA or SAS 370 CHARACTER(LEN=256) :: clinfo ! info character 373 CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA, SAS or SI3 374 TYPE(RST_FIELD), INTENT(INOUT) :: drst_wfields(max_rst_fields) 375 CHARACTER(LEN=256) :: clinfo ! info character 376 CHARACTER(len=25) :: znam 377 CHARACTER(len=2) :: zchar1 378 INTEGER :: jk 371 379 #if defined key_iomput 372 380 IF(cdmdl == "OPA") THEN 373 381 !from restart.F90 374 CALL iom_set_rstw_var_active( rst_wfields, "rdt")382 CALL iom_set_rstw_var_active(drst_wfields, "rdt") 375 383 IF ( .NOT. ln_diurnal_only ) THEN 376 CALL iom_set_rstw_var_active( rst_wfields, 'ub' )377 CALL iom_set_rstw_var_active( rst_wfields, 'vb' )378 CALL iom_set_rstw_var_active( rst_wfields, 'tb' )379 CALL iom_set_rstw_var_active( rst_wfields, 'sb' )380 CALL iom_set_rstw_var_active( rst_wfields, 'sshb')384 CALL iom_set_rstw_var_active(drst_wfields, 'ub' ) 385 CALL iom_set_rstw_var_active(drst_wfields, 'vb' ) 386 CALL iom_set_rstw_var_active(drst_wfields, 'tb' ) 387 CALL iom_set_rstw_var_active(drst_wfields, 'sb' ) 388 CALL iom_set_rstw_var_active(drst_wfields, 'sshb') 381 389 ! 382 CALL iom_set_rstw_var_active( rst_wfields, 'un' )383 CALL iom_set_rstw_var_active( rst_wfields, 'vn' )384 CALL iom_set_rstw_var_active( rst_wfields, 'tn' )385 CALL iom_set_rstw_var_active( rst_wfields, 'sn' )386 CALL iom_set_rstw_var_active( rst_wfields, 'sshn')387 CALL iom_set_rstw_var_active( rst_wfields, 'rhop')390 CALL iom_set_rstw_var_active(drst_wfields, 'un' ) 391 CALL iom_set_rstw_var_active(drst_wfields, 'vn' ) 392 CALL iom_set_rstw_var_active(drst_wfields, 'tn' ) 393 CALL iom_set_rstw_var_active(drst_wfields, 'sn' ) 394 CALL iom_set_rstw_var_active(drst_wfields, 'sshn') 395 CALL iom_set_rstw_var_active(drst_wfields, 'rhop') 388 396 ! extra variable needed for the ice sheet coupling 389 397 IF ( ln_iscpl ) THEN 390 CALL iom_set_rstw_var_active( rst_wfields, 'tmask')391 CALL iom_set_rstw_var_active( rst_wfields, 'umask')392 CALL iom_set_rstw_var_active( rst_wfields, 'vmask')393 CALL iom_set_rstw_var_active( rst_wfields, 'smask')394 CALL iom_set_rstw_var_active( rst_wfields, 'e3t_n')395 CALL iom_set_rstw_var_active( rst_wfields, 'e3u_n')396 CALL iom_set_rstw_var_active( rst_wfields, 'e3v_n')397 CALL iom_set_rstw_var_active( rst_wfields, 'gdepw_n')398 CALL iom_set_rstw_var_active(drst_wfields, 'tmask') 399 CALL iom_set_rstw_var_active(drst_wfields, 'umask') 400 CALL iom_set_rstw_var_active(drst_wfields, 'vmask') 401 CALL iom_set_rstw_var_active(drst_wfields, 'smask') 402 CALL iom_set_rstw_var_active(drst_wfields, 'e3t_n') 403 CALL iom_set_rstw_var_active(drst_wfields, 'e3u_n') 404 CALL iom_set_rstw_var_active(drst_wfields, 'e3v_n') 405 CALL iom_set_rstw_var_active(drst_wfields, 'gdepw_n') 398 406 END IF 399 407 ENDIF 400 IF(ln_diurnal) CALL iom_set_rstw_var_active( rst_wfields, 'Dsst')408 IF(ln_diurnal) CALL iom_set_rstw_var_active(drst_wfields, 'Dsst') 401 409 !from trasbc.F90 402 CALL iom_set_rstw_var_active(rst_wfields, 'sbc_hc_b') 403 CALL iom_set_rstw_var_active(rst_wfields, 'sbc_sc_b') 410 CALL iom_set_rstw_var_active(drst_wfields, 'sbc_hc_b') 411 CALL iom_set_rstw_var_active(drst_wfields, 'sbc_sc_b') 412 ELSE IF(cdmdl == "SI3") THEN 413 CALL iom_set_rstw_var_active(drst_wfields, 'nn_fsbc') 414 CALL iom_set_rstw_var_active(drst_wfields, 'kt_ice') 415 CALL iom_set_rstw_var_active(drst_wfields, 'v_i') 416 CALL iom_set_rstw_var_active(drst_wfields, 'v_s') 417 CALL iom_set_rstw_var_active(drst_wfields, 'sv_i') 418 CALL iom_set_rstw_var_active(drst_wfields, 'a_i') 419 CALL iom_set_rstw_var_active(drst_wfields, 't_su') 420 CALL iom_set_rstw_var_active(drst_wfields, 'u_ice') 421 CALL iom_set_rstw_var_active(drst_wfields, 'v_ice') 422 CALL iom_set_rstw_var_active(drst_wfields, 'oa_i') 423 CALL iom_set_rstw_var_active(drst_wfields, 'a_ip') 424 CALL iom_set_rstw_var_active(drst_wfields, 'v_ip') 425 DO jk = 1, nlay_s 426 WRITE(zchar1,'(I2.2)') jk 427 znam = 'e_s'//'_l'//zchar1 428 CALL iom_set_rstw_var_active(drst_wfields, znam ) 429 END DO 430 ! Ice enthalpy 431 DO jk = 1, nlay_i 432 WRITE(zchar1,'(I2.2)') jk 433 znam = 'e_i'//'_l'//zchar1 434 CALL iom_set_rstw_var_active(drst_wfields, znam ) 435 END DO 404 436 ENDIF 405 437 #else … … 689 721 CALL xios_add_child(file_hdl, field_hdl, TRIM(drst_wfields(i)%vname)) 690 722 SELECT CASE (TRIM(drst_wfields(i)%grid)) 723 CASE ("grid_Ni_3D") 724 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 725 domain_ref="grid_N", axis_ref="numcat", prec = 8, operation = "instant") 691 726 CASE ("grid_N_3D") 692 727 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/iom_def.F90
r11837 r11840 67 67 END TYPE file_descriptor 68 68 TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC :: iom_file !: array containing the info for all opened files 69 INTEGER, PARAMETER, PUBLIC :: max_rst_fields = 360!: maximum number of restart variables defined in iom_set_rst_vars69 INTEGER, PARAMETER, PUBLIC :: max_rst_fields = 190!: maximum number of restart variables defined in iom_set_rst_vars 70 70 TYPE, PUBLIC :: RST_FIELD 71 71 CHARACTER(len=30) :: vname = "NO_NAME" ! names of variables in restart file … … 75 75 !$AGRIF_END_DO_NOT_TREAT 76 76 ! 77 TYPE(RST_FIELD), PUBLIC, SAVE :: rst_wfields(max_rst_fields), rst_rfields(max_rst_fields) 77 TYPE(RST_FIELD), PUBLIC, SAVE :: rst_wfields(max_rst_fields), rst_rfields(max_rst_fields), rsti_wfields(max_rst_fields) 78 78 ! 79 79 !!----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.