Skip to content
Snippets Groups Projects
Commit ae0a473a authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 11/04/2017: IO: bug fix: problem when writing arrays of character in netCDF file

parent 2fdeeaec
No related branches found
No related tags found
No related merge requests found
......@@ -1599,6 +1599,8 @@ TYPE(IOCDF), POINTER :: PZCDF
CHARACTER(LEN=*),DIMENSION(:),INTENT(IN) :: HFIELD
INTEGER, INTENT(OUT) :: KRESP
!
INTEGER(KIND=IDCDF_KIND),PARAMETER :: IONE = 1
!
INTEGER(KIND=IDCDF_KIND) :: STATUS
INTEGER(KIND=IDCDF_KIND) :: INCID
CHARACTER(LEN=LEN(TPFIELD%CMNHNAME)) :: YVARNAME
......@@ -1636,7 +1638,7 @@ ELSE
END IF
! Write the data
STATUS = NF90_PUT_VAR(INCID, IVARID, HFIELD)
STATUS = NF90_PUT_VAR(INCID, IVARID, HFIELD(1:ISIZE)(1:ILEN), START=(/IONE,IONE/), COUNT=(/ILEN,ISIZE/))
IF (status /= NF90_NOERR) CALL HANDLE_ERR(status,__LINE__,'IO_WRITE_FIELD_NC4_C1[NF90_PUT_VAR] '//TRIM(TPFIELD%CMNHNAME),IRESP)
KRESP = IRESP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment