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

Philippe 15/03/2019: use MNHINT_NF90 and MNHREAL_NF90 from modd_precision

parent 54079678
No related branches found
No related tags found
No related merge requests found
...@@ -17,13 +17,13 @@ module mode_io_write_nc4 ...@@ -17,13 +17,13 @@ module mode_io_write_nc4
use modd_io_ll, only: gsmonoproc, tfiledata use modd_io_ll, only: gsmonoproc, tfiledata
use modd_netcdf, only: dimcdf, iocdf use modd_netcdf, only: dimcdf, iocdf
use modd_precision, only: CDFINT use modd_precision, only: CDFINT, MNHINT_NF90, MNHREAL_NF90
use mode_field, only: tfielddata use mode_field, only: tfielddata
use mode_io_tools_nc4, only: cleanmnhname, fillvdims, getdimcdf, getstrdimid, io_handle_err_nc4 use mode_io_tools_nc4, only: cleanmnhname, fillvdims, getdimcdf, getstrdimid, io_handle_err_nc4
use mode_msg use mode_msg
use NETCDF, only: NF90_CHAR, NF90_DOUBLE, NF90_FLOAT, NF90_INT, NF90_INT1, NF90_INT64, & use NETCDF, only: NF90_CHAR, NF90_FLOAT, NF90_INT1, &
NF90_GLOBAL, NF90_NOERR, & NF90_GLOBAL, NF90_NOERR, &
NF90_DEF_VAR, NF90_DEF_VAR_DEFLATE, NF90_GET_ATT, NF90_INQ_VARID, & NF90_DEF_VAR, NF90_DEF_VAR_DEFLATE, NF90_GET_ATT, NF90_INQ_VARID, &
NF90_INQUIRE_ATTRIBUTE, NF90_PUT_ATT, NF90_PUT_VAR NF90_INQUIRE_ATTRIBUTE, NF90_PUT_ATT, NF90_PUT_VAR
...@@ -280,20 +280,12 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -280,20 +280,12 @@ IF (STATUS /= NF90_NOERR) THEN
! Get the netcdf dimensions ! Get the netcdf dimensions
CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(PFIELD),KIND=CDFINT), IVDIMS) CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(PFIELD),KIND=CDFINT), IVDIMS)
! Define the variable ! Define the variable
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X0','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X0','NF90_DEF_VAR',trim(YVARNAME))
DEALLOCATE(IVDIMS) DEALLOCATE(IVDIMS)
ELSE ELSE
! Define the scalar variable ! Define the scalar variable
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X0','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X0','NF90_DEF_VAR',trim(YVARNAME))
END IF END IF
ELSE ELSE
...@@ -352,11 +344,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -352,11 +344,7 @@ IF (STATUS /= NF90_NOERR) THEN
IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID) STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
ELSE ELSE
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
#endif
END IF END IF
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X1','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X1','NF90_DEF_VAR',trim(YVARNAME))
! Add compression if asked for ! Add compression if asked for
...@@ -447,11 +435,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -447,11 +435,7 @@ IF (STATUS /= NF90_NOERR) THEN
IF (TZFILE%LNCREDUCE_FLOAT_PRECISION) THEN IF (TZFILE%LNCREDUCE_FLOAT_PRECISION) THEN
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID) STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
ELSE ELSE
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
#endif
END IF END IF
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X2','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X2','NF90_DEF_VAR',trim(YVARNAME))
! Add compression if asked for ! Add compression if asked for
...@@ -518,11 +502,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -518,11 +502,7 @@ IF (STATUS /= NF90_NOERR) THEN
IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID) STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
ELSE ELSE
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
#endif
END IF END IF
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X3','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X3','NF90_DEF_VAR',trim(YVARNAME))
...@@ -590,11 +570,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -590,11 +570,7 @@ IF (STATUS /= NF90_NOERR) THEN
IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID) STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
ELSE ELSE
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
#endif
END IF END IF
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X4','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X4','NF90_DEF_VAR',trim(YVARNAME))
...@@ -662,11 +638,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -662,11 +638,7 @@ IF (STATUS /= NF90_NOERR) THEN
IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID) STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
ELSE ELSE
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
#endif
END IF END IF
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X5','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X5','NF90_DEF_VAR',trim(YVARNAME))
...@@ -734,11 +706,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -734,11 +706,7 @@ IF (STATUS /= NF90_NOERR) THEN
IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID) STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
ELSE ELSE
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIMS, IVARID)
#endif
END IF END IF
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X6','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_X6','NF90_DEF_VAR',trim(YVARNAME))
...@@ -803,20 +771,12 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -803,20 +771,12 @@ IF (STATUS /= NF90_NOERR) THEN
! Get the netcdf dimensions ! Get the netcdf dimensions
CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS) CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS)
! Define the variable ! Define the variable
#if ( MNH_INT == 4 ) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHINT_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT64, IVDIMS, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N0','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N0','NF90_DEF_VAR',trim(YVARNAME))
DEALLOCATE(IVDIMS) DEALLOCATE(IVDIMS)
ELSE ELSE
! Define the scalar variable ! Define the scalar variable
#if ( MNH_INT == 4 ) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHINT_NF90, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT64, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N0','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N0','NF90_DEF_VAR',trim(YVARNAME))
END IF END IF
ELSE ELSE
...@@ -897,11 +857,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -897,11 +857,7 @@ IF (STATUS /= NF90_NOERR) THEN
CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS) CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS)
! Define the variable ! Define the variable
#if ( MNH_INT == 4 ) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHINT_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT64, IVDIMS, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N1','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N1','NF90_DEF_VAR',trim(YVARNAME))
ELSE ELSE
GEXISTED = .TRUE. GEXISTED = .TRUE.
...@@ -959,11 +915,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -959,11 +915,7 @@ IF (STATUS /= NF90_NOERR) THEN
CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS) CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS)
! Define the variable ! Define the variable
#if ( MNH_INT == 4 ) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHINT_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT64, IVDIMS, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N2','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N2','NF90_DEF_VAR',trim(YVARNAME))
! Add compression if asked for ! Add compression if asked for
IF (TPFILE%LNCCOMPRESS) THEN IF (TPFILE%LNCCOMPRESS) THEN
...@@ -1025,11 +977,7 @@ IF (STATUS /= NF90_NOERR) THEN ...@@ -1025,11 +977,7 @@ IF (STATUS /= NF90_NOERR) THEN
CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS) CALL FILLVDIMS(TPFILE, TPFIELD, INT(SHAPE(KFIELD),KIND=CDFINT), IVDIMS)
! Define the variable ! Define the variable
#if ( MNH_INT == 4 ) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHINT_NF90, IVDIMS, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT, IVDIMS, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_INT64, IVDIMS, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N3','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_N3','NF90_DEF_VAR',trim(YVARNAME))
! Add compression if asked for ! Add compression if asked for
IF (TPFILE%LNCCOMPRESS) THEN IF (TPFILE%LNCCOMPRESS) THEN
...@@ -1381,11 +1329,7 @@ IF (TPFIELD%LTIMEDEP) & ...@@ -1381,11 +1329,7 @@ IF (TPFIELD%LTIMEDEP) &
STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID) STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID)
IF (STATUS /= NF90_NOERR) THEN IF (STATUS /= NF90_NOERR) THEN
! Define the scalar variable ! Define the scalar variable
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_T0','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_T0','NF90_DEF_VAR',trim(YVARNAME))
ELSE ELSE
GEXISTED = .TRUE. GEXISTED = .TRUE.
...@@ -1452,11 +1396,7 @@ TZFIELD%CCOMMENT = 'SECONDS' ...@@ -1452,11 +1396,7 @@ TZFIELD%CCOMMENT = 'SECONDS'
STATUS = NF90_INQ_VARID(INCID, TZFIELD%CMNHNAME, IVARID) STATUS = NF90_INQ_VARID(INCID, TZFIELD%CMNHNAME, IVARID)
IF (STATUS /= NF90_NOERR) THEN IF (STATUS /= NF90_NOERR) THEN
! Define the scalar variable ! Define the scalar variable
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, TZFIELD%CMNHNAME, MNHREAL_NF90, IVARID)
STATUS = NF90_DEF_VAR(INCID, TZFIELD%CMNHNAME, NF90_DOUBLE, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, TZFIELD%CMNHNAME, NF90_FLOAT, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_T0','NF90_DEF_VAR',trim(TZFIELD%CMNHNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'IO_WRITE_FIELD_NC4_T0','NF90_DEF_VAR',trim(TZFIELD%CMNHNAME))
CALL IO_WRITE_FIELD_ATTR_NC4(TPFILE,TZFIELD,IVARID,GEXISTED) CALL IO_WRITE_FIELD_ATTR_NC4(TPFILE,TZFIELD,IVARID,GEXISTED)
ELSE ELSE
...@@ -1700,11 +1640,7 @@ SUBROUTINE WRITE_HOR_COORD(TDIM,HLONGNAME,HSTDNAME,HAXIS,PSHIFT,KBOUNDLOW,KBOUND ...@@ -1700,11 +1640,7 @@ SUBROUTINE WRITE_HOR_COORD(TDIM,HLONGNAME,HSTDNAME,HAXIS,PSHIFT,KBOUNDLOW,KBOUND
STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID) STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID)
IF (STATUS /= NF90_NOERR) THEN IF (STATUS /= NF90_NOERR) THEN
! Define the coordinate variable ! Define the coordinate variable
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIM, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIM, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIM, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'WRITE_HOR_COORD','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'WRITE_HOR_COORD','NF90_DEF_VAR',trim(YVARNAME))
ELSE ELSE
CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_HOR_COORD',TRIM(YVARNAME)//' already defined') CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_HOR_COORD',TRIM(YVARNAME)//' already defined')
...@@ -1811,11 +1747,7 @@ SUBROUTINE WRITE_VER_COORD(TDIM,HLONGNAME,HSTDNAME,HCOMPNAME,PSHIFT,KBOUNDLOW,KB ...@@ -1811,11 +1747,7 @@ SUBROUTINE WRITE_VER_COORD(TDIM,HLONGNAME,HSTDNAME,HCOMPNAME,PSHIFT,KBOUNDLOW,KB
STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID) STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID)
IF (STATUS /= NF90_NOERR) THEN IF (STATUS /= NF90_NOERR) THEN
! Define the coordinate variable ! Define the coordinate variable
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIM, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIM, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIM, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'WRITE_VER_COORD','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'WRITE_VER_COORD','NF90_DEF_VAR',trim(YVARNAME))
ELSE ELSE
CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_VER_COORD',TRIM(YVARNAME)//' already defined') CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_VER_COORD',TRIM(YVARNAME)//' already defined')
...@@ -1895,11 +1827,7 @@ SUBROUTINE WRITE_TIME_COORD(TDIM) ...@@ -1895,11 +1827,7 @@ SUBROUTINE WRITE_TIME_COORD(TDIM)
STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID) STATUS = NF90_INQ_VARID(INCID, YVARNAME, IVARID)
IF (STATUS /= NF90_NOERR) THEN IF (STATUS /= NF90_NOERR) THEN
! Define the coordinate variable ! Define the coordinate variable
#if (MNH_REAL == 8) STATUS = NF90_DEF_VAR(INCID, YVARNAME, MNHREAL_NF90, IVDIM, IVARID)
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_DOUBLE, IVDIM, IVARID)
#else
STATUS = NF90_DEF_VAR(INCID, YVARNAME, NF90_FLOAT, IVDIM, IVARID)
#endif
IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'WRITE_TIME_COORD','NF90_DEF_VAR',trim(YVARNAME)) IF (status /= NF90_NOERR) CALL IO_HANDLE_ERR_NC4(status,'WRITE_TIME_COORD','NF90_DEF_VAR',trim(YVARNAME))
ELSE ELSE
CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_TIME_COORD',TRIM(YVARNAME)//' already defined') CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_TIME_COORD',TRIM(YVARNAME)//' already defined')
......
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