- Timestamp:
- 2017-10-30T12:44:29+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8616 r8668 106 106 CHARACTER(len=10) :: clname 107 107 INTEGER :: ji, jkmin 108 LOGICAL :: l rst_context ! is context related to restart108 LOGICAL :: llrst_context ! is context related to restart 109 109 ! 110 110 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zt_bnds, zw_bnds … … 117 117 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 118 118 CALL iom_swap( cdname ) 119 l rst_context = (TRIM(cdname) == TRIM(rxios_context))119 llrst_context = (TRIM(cdname) == TRIM(crxios_context)) 120 120 121 121 ! Calendar type is now defined in xml file … … 130 130 131 131 ! horizontal grid definition 132 IF(.NOT.l rst_context) CALL set_scalar132 IF(.NOT.llrst_context) CALL set_scalar 133 133 134 134 IF( TRIM(cdname) == TRIM(cxios_context) ) THEN … … 162 162 CALL dom_grid_glo ! Return to parent grid domain 163 163 ! 164 IF( ln_cfmeta .AND. TRIM(cdname) .NE. TRIM( rxios_context)) THEN ! Add additional grid metadata164 IF( ln_cfmeta .AND. TRIM(cdname) .NE. TRIM(crxios_context)) THEN ! Add additional grid metadata 165 165 CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(nldi:nlei, nldj:nlej)) 166 166 CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej)) … … 175 175 176 176 ! vertical grid definition 177 IF(.NOT.l rst_context) THEN177 IF(.NOT.llrst_context) THEN 178 178 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 179 179 CALL iom_set_axis_attr( "depthu", paxis = gdept_1d ) … … 206 206 ENDIF 207 207 ! automatic definitions of some of the xml attributs 208 IF( l rst_context ) THEN208 IF( llrst_context ) THEN 209 209 !set names of the fields in restart file IF using XIOS to read/write data 210 210 CALL set_rst_context() … … 724 724 !! INTERFACE iom_get 725 725 !!---------------------------------------------------------------------- 726 SUBROUTINE iom_g0d( kiomid, cdvar, pvar, ktime, l rxios )726 SUBROUTINE iom_g0d( kiomid, cdvar, pvar, ktime, ldxios ) 727 727 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 728 728 CHARACTER(len=*), INTENT(in ) :: cdvar ! Name of the variable 729 729 REAL(wp) , INTENT( out) :: pvar ! read field 730 730 INTEGER , INTENT(in ), OPTIONAL :: ktime ! record number 731 LOGICAL , INTENT(in ), OPTIONAL :: l rxios ! use xios to read restart731 LOGICAL , INTENT(in ), OPTIONAL :: ldxios ! use xios to read restart 732 732 ! 733 733 INTEGER :: idvar ! variable id … … 737 737 CHARACTER(LEN=100) :: clname ! file name 738 738 CHARACTER(LEN=1) :: cldmspc ! 739 LOGICAL :: l xios740 ! 741 l xios = .FALSE.742 IF( PRESENT(l rxios) ) lxios = lrxios743 744 IF(.NOT.l xios) THEN ! read data using default library739 LOGICAL :: llxios 740 ! 741 llxios = .FALSE. 742 IF( PRESENT(ldxios) ) llxios = ldxios 743 744 IF(.NOT.llxios) THEN ! read data using default library 745 745 itime = 1 746 746 IF( PRESENT(ktime) ) itime = ktime … … 767 767 ELSE 768 768 IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar) 769 CALL iom_swap( TRIM( rxios_context) )769 CALL iom_swap( TRIM(crxios_context) ) 770 770 CALL xios_recv_field( trim(cdvar), pvar) 771 771 CALL iom_swap( TRIM(cxios_context) ) … … 773 773 END SUBROUTINE iom_g0d 774 774 775 SUBROUTINE iom_g1d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, l rxios )775 SUBROUTINE iom_g1d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, ldxios ) 776 776 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 777 777 INTEGER , INTENT(in ) :: kdom ! Type of domain to be read … … 781 781 INTEGER , INTENT(in ), DIMENSION(1), OPTIONAL :: kstart ! start axis position of the reading 782 782 INTEGER , INTENT(in ), DIMENSION(1), OPTIONAL :: kcount ! number of points in each axis 783 LOGICAL , INTENT(in ), OPTIONAL :: l rxios ! read data using XIOS783 LOGICAL , INTENT(in ), OPTIONAL :: ldxios ! read data using XIOS 784 784 ! 785 785 IF( kiomid > 0 ) THEN 786 786 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom , cdvar , pv_r1d=pvar, & 787 787 & ktime=ktime, kstart=kstart, kcount=kcount, & 788 & l rxios=lrxios )788 & ldxios=ldxios ) 789 789 ENDIF 790 790 END SUBROUTINE iom_g1d 791 791 792 SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, l rxios)792 SUBROUTINE iom_g2d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, ldxios) 793 793 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 794 794 INTEGER , INTENT(in ) :: kdom ! Type of domain to be read … … 802 802 ! called open_ocean_jstart to set the start 803 803 ! value for the 2nd dimension (netcdf only) 804 LOGICAL , INTENT(in ), OPTIONAL :: l rxios ! read data using XIOS804 LOGICAL , INTENT(in ), OPTIONAL :: ldxios ! read data using XIOS 805 805 ! 806 806 IF( kiomid > 0 ) THEN 807 807 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom , cdvar , pv_r2d=pvar, & 808 808 & ktime=ktime, kstart=kstart, kcount=kcount, & 809 & lrowattr=lrowattr, l rxios=lrxios)809 & lrowattr=lrowattr, ldxios=ldxios) 810 810 ENDIF 811 811 END SUBROUTINE iom_g2d 812 812 813 SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, l rxios )813 SUBROUTINE iom_g3d( kiomid, kdom, cdvar, pvar, ktime, kstart, kcount, lrowattr, ldxios ) 814 814 INTEGER , INTENT(in ) :: kiomid ! Identifier of the file 815 815 INTEGER , INTENT(in ) :: kdom ! Type of domain to be read … … 823 823 ! called open_ocean_jstart to set the start 824 824 ! value for the 2nd dimension (netcdf only) 825 LOGICAL , INTENT(in ), OPTIONAL :: l rxios ! read data using XIOS825 LOGICAL , INTENT(in ), OPTIONAL :: ldxios ! read data using XIOS 826 826 ! 827 827 IF( kiomid > 0 ) THEN 828 828 IF( iom_file(kiomid)%nfid > 0 ) CALL iom_get_123d( kiomid, kdom , cdvar , pv_r3d=pvar, & 829 829 & ktime=ktime, kstart=kstart, kcount=kcount, & 830 & lrowattr=lrowattr, l rxios=lrxios )830 & lrowattr=lrowattr, ldxios=ldxios ) 831 831 ENDIF 832 832 END SUBROUTINE iom_g3d … … 836 836 & pv_r1d, pv_r2d, pv_r3d, & 837 837 & ktime , kstart, kcount, & 838 & lrowattr, l rxios )838 & lrowattr, ldxios ) 839 839 !!----------------------------------------------------------------------- 840 840 !! *** ROUTINE iom_get_123d *** … … 857 857 ! called open_ocean_jstart to set the start 858 858 ! value for the 2nd dimension (netcdf only) 859 LOGICAL , INTENT(in ), OPTIONAL :: l rxios ! use XIOS to read restart860 ! 861 LOGICAL :: l xios ! local definition for XIOS read859 LOGICAL , INTENT(in ), OPTIONAL :: ldxios ! use XIOS to read restart 860 ! 861 LOGICAL :: llxios ! local definition for XIOS read 862 862 LOGICAL :: llnoov ! local definition to read overlap 863 863 LOGICAL :: luse_jattr ! local definition to read open_ocean_jstart file attribute … … 887 887 ! 888 888 REAL(wp) :: gma, gmi 889 l xios = .FALSE.890 if(PRESENT(l rxios)) lxios = lrxios889 llxios = .FALSE. 890 if(PRESENT(ldxios)) llxios = ldxios 891 891 idvar = iom_varid( kiomid, cdvar ) 892 892 idom = kdom 893 893 894 IF(.NOT.l xios) THEN894 IF(.NOT.llxios) THEN 895 895 clname = iom_file(kiomid)%name ! esier to read 896 896 clinfo = ' iom_get_123d, file: '//trim(clname)//', var: '//trim(cdvar) … … 1123 1123 #if defined key_iomput 1124 1124 !would be good to be able to check which context is active and swap only if current is not restart 1125 CALL iom_swap( TRIM( rxios_context) )1125 CALL iom_swap( TRIM(crxios_context) ) 1126 1126 IF( PRESENT(pv_r3d) ) THEN 1127 1127 if(lwp) write(numout,*) 'XIOS RST READ (3D): ',trim(cdvar) … … 1626 1626 1627 1627 1628 SUBROUTINE set_grid( cdgrd, plon, plat, l xios )1628 SUBROUTINE set_grid( cdgrd, plon, plat, ldxios ) 1629 1629 !!---------------------------------------------------------------------- 1630 1630 !! *** ROUTINE set_grid *** … … 1639 1639 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask 1640 1640 INTEGER :: ni,nj 1641 LOGICAL, INTENT(IN) :: l xios1641 LOGICAL, INTENT(IN) :: ldxios 1642 1642 1643 1643 ni=nlei-nldi+1 ; nj=nlej-nldj+1 … … 1648 1648 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1649 1649 1650 IF ( ln_mskland.AND.(.NOT.l xios) ) THEN1650 IF ( ln_mskland.AND.(.NOT.ldxios) ) THEN 1651 1651 ! mask land points, keep values on coast line -> specific mask for U, V and W points 1652 1652 SELECT CASE ( cdgrd )
Note: See TracChangeset
for help on using the changeset viewer.