diff --git a/src/LIB/SURCOUCHE/src/mode_io_read_lfi.f90 b/src/LIB/SURCOUCHE/src/mode_io_read_lfi.f90 index 1e704e9353370d54127bacf6a7596437f2ef4115..f98999c1ea643987e3825b791b28d30d41a151fa 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_read_lfi.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_read_lfi.f90 @@ -16,7 +16,7 @@ module mode_io_read_lfi use modd_field, only: tfielddata USE MODD_IO USE MODD_PARAMETERS, ONLY: NLFIMAXCOMMENTLENGTH -use modd_precision, only: LFIINT +use modd_precision, only: LFIINT, MNHINT64, MNHREAL32, MNHREAL64 ! USE MODE_MSG ! @@ -57,11 +57,11 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD -REAL,DIMENSION(1) :: ZFIELD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD +REAL,DIMENSION(1) :: ZFIELD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_X0',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -96,10 +96,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_X1',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -130,10 +130,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_X2',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -164,10 +164,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_X3',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -198,10 +198,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occur ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_X4',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -232,10 +232,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occ ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_X5',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -266,10 +266,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems o ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_X6',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -300,10 +300,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_N0',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -334,10 +334,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_N1',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -368,10 +368,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occure ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_N2',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -402,10 +402,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occu ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_N3',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -436,11 +436,11 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER :: IFIELD -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER :: IFIELD +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_L0',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -483,12 +483,12 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG -INTEGER :: JI -INTEGER, DIMENSION(SIZE(OFIELD)) :: IFIELD -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG +INTEGER :: JI +INTEGER, DIMENSION(SIZE(OFIELD)) :: IFIELD +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_L1',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -538,10 +538,10 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP,ITOTAL -INTEGER :: ILENG, ILENGMAX, JLOOP -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD +INTEGER(KIND=LFIINT) :: IRESP,ITOTAL +INTEGER :: ILENG, ILENGMAX, JLOOP +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_C0',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -588,13 +588,13 @@ INTEGER, INTENT(OUT) :: KRESP ! return-code if problems occured ! !* 0.2 Declarations of local variables ! -INTEGER(KIND=LFIINT) :: IRESP, ITOTAL -INTEGER :: ILENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -LOGICAL :: GGOOD -TYPE(TFIELDDATA) :: TZFIELD -INTEGER, DIMENSION(3) :: ITDATE ! date array -REAL,DIMENSION(1) :: ZTIME +INTEGER(KIND=LFIINT) :: IRESP, ITOTAL +INTEGER :: ILENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +LOGICAL :: GGOOD +TYPE(TFIELDDATA) :: TZFIELD +INTEGER, DIMENSION(3) :: ITDATE ! date array +REAL,DIMENSION(1) :: ZTIME ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_read_lfi_T0',TRIM(TPFILE%CNAME)//': reading '//TRIM(TPFIELD%CMNHNAME)) ! @@ -648,13 +648,13 @@ SUBROUTINE IO_Field_read_check_lfi(TPFILE,TPFIELD,KLENG,KWORK,KTOTAL,KRESP,OGOOD ! USE MODD_PARAMETERS, ONLY: NGRIDUNKNOWN ! -TYPE(TFILEDATA), INTENT(IN) :: TPFILE -TYPE(TFIELDDATA), INTENT(INOUT) :: TPFIELD -INTEGER, INTENT(IN) :: KLENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE,INTENT(OUT) :: KWORK -INTEGER(KIND=LFIINT), INTENT(OUT) :: KTOTAL -INTEGER(KIND=LFIINT), INTENT(OUT) :: KRESP -LOGICAL, INTENT(OUT) :: OGOOD +TYPE(TFILEDATA), INTENT(IN) :: TPFILE +TYPE(TFIELDDATA), INTENT(INOUT) :: TPFIELD +INTEGER, INTENT(IN) :: KLENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE,INTENT(OUT) :: KWORK +INTEGER(KIND=LFIINT), INTENT(OUT) :: KTOTAL +INTEGER(KIND=LFIINT), INTENT(OUT) :: KRESP +LOGICAL, INTENT(OUT) :: OGOOD ! INTEGER :: IERRLEVEL,IROW,J INTEGER,DIMENSION(JPXKRK) :: ICOMMENT @@ -788,12 +788,12 @@ END SUBROUTINE IO_Field_read_check_lfi ! FUNCTION TRANSFER_I8_R(KFIELDIN) RESULT(PFIELDOUT) ! -INTEGER(KIND=8),DIMENSION(:),INTENT(IN) :: KFIELDIN +INTEGER(KIND=MNHINT64),DIMENSION(:),INTENT(IN) :: KFIELDIN REAL,DIMENSION(SIZE(KFIELDIN)) :: PFIELDOUT ! INTEGER :: ILENG #if (MNH_REAL == 4) -REAL(KIND=8),DIMENSION(:),ALLOCATABLE :: ZFIELD8 +REAL(KIND=MNHREAL64),DIMENSION(:),ALLOCATABLE :: ZFIELD8 #endif ! ILENG = SIZE(PFIELDOUT) @@ -803,7 +803,7 @@ ILENG = SIZE(PFIELDOUT) #else ALLOCATE(ZFIELD8(ILENG)) ZFIELD8(:) = TRANSFER(KFIELDIN,ZFIELD8(1),ILENG) - PFIELDOUT(:) = REAL(ZFIELD8(:),KIND=4) + PFIELDOUT(:) = REAL(ZFIELD8(:),KIND=MNHREAL32) DEALLOCATE(ZFIELD8) #endif ! diff --git a/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 b/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 index f78a0e5fae68fe82c2df56794b1c9b89d777e5ca..430f06ccfed1c5d64d8daeec50f95164be6d1ed7 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_write_lfi.f90 @@ -17,7 +17,7 @@ module mode_io_write_lfi use modd_field, only: tfielddata USE MODD_IO USE MODD_PARAMETERS, ONLY: NLFIMAXCOMMENTLENGTH -use modd_precision, only: LFIINT +use modd_precision, only: LFIINT, MNHINT64, MNHREAL64 ! USE MODE_MSG ! @@ -59,10 +59,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(KIND=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(KIND=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_X0','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -98,10 +98,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_X1','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -145,13 +145,13 @@ INTEGER,OPTIONAL, INTENT(IN) :: KZFILE ! Number of the Z-level split fi ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=4) :: YSUFFIX -CHARACTER(LEN=LEN(TPFIELD%CMNHNAME)+4) :: YVARNAME -CHARACTER(LEN=LEN_HREC) :: YRECFM -TYPE(TFILEDATA),POINTER :: TZFILE +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=4) :: YSUFFIX +CHARACTER(LEN=LEN(TPFIELD%CMNHNAME)+4) :: YVARNAME +CHARACTER(LEN=LEN_HREC) :: YRECFM +TYPE(TFILEDATA),POINTER :: TZFILE ! IRESP=0 ! @@ -209,10 +209,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_X3','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -254,10 +254,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_X4','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -299,10 +299,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_X5','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -344,10 +344,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems arais ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_X6','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -389,10 +389,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_N0','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -428,10 +428,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_N1','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -473,10 +473,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_N2','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -518,10 +518,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_N3','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -564,10 +564,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araise ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_N4','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -610,11 +610,11 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: IFIELD -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: IFIELD +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_L0','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -657,11 +657,11 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER, DIMENSION(SIZE(OFIELD)) :: IFIELD -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER, DIMENSION(SIZE(OFIELD)) :: IFIELD +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_L1','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -712,10 +712,10 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG, ILENGMAX, JLOOP -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG, ILENGMAX, JLOOP +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_C0','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -770,12 +770,12 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems araised ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -TYPE(TFIELDDATA) :: TZFIELD -INTEGER, DIMENSION(3) :: ITDATE ! date array -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +TYPE(TFIELDDATA) :: TZFIELD +INTEGER, DIMENSION(3) :: ITDATE ! date array +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_T0','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -846,13 +846,13 @@ INTEGER, INTENT(OUT):: KRESP ! return-code if problems a ! !* 0.2 Declarations of local variables ! -INTEGER :: ILENG, IPOS -INTEGER :: JI -INTEGER(kind=LFIINT) :: IRESP, ITOTAL -TYPE(TFIELDDATA) :: TZFIELD -INTEGER, DIMENSION(:), ALLOCATABLE :: ITDATE ! date array -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE :: IWORK -CHARACTER(LEN=LEN_HREC) :: YRECFM +INTEGER :: ILENG, IPOS +INTEGER :: JI +INTEGER(kind=LFIINT) :: IRESP, ITOTAL +TYPE(TFIELDDATA) :: TZFIELD +INTEGER, DIMENSION(:), ALLOCATABLE :: ITDATE ! date array +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE :: IWORK +CHARACTER(LEN=LEN_HREC) :: YRECFM ! CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_Field_write_lfi_T1','writing '//TRIM(TPFIELD%CMNHNAME)) ! @@ -924,11 +924,11 @@ END SUBROUTINE IO_Field_write_lfi_T1 ! SUBROUTINE WRITE_PREPARE(TPFIELD,KLENG,KWORK,KTOTAL,KRESP) ! -TYPE(TFIELDDATA), INTENT(IN) :: TPFIELD -INTEGER, INTENT(IN) :: KLENG -INTEGER(KIND=8),DIMENSION(:),ALLOCATABLE,INTENT(INOUT) :: KWORK -INTEGER(kind=LFIINT), INTENT(OUT) :: KTOTAL -INTEGER(kind=LFIINT), INTENT(OUT) :: KRESP +TYPE(TFIELDDATA), INTENT(IN) :: TPFIELD +INTEGER, INTENT(IN) :: KLENG +INTEGER(KIND=MNHINT64),DIMENSION(:),ALLOCATABLE,INTENT(INOUT) :: KWORK +INTEGER(kind=LFIINT), INTENT(OUT) :: KTOTAL +INTEGER(kind=LFIINT), INTENT(OUT) :: KRESP ! INTEGER :: ICOMLEN INTEGER :: J @@ -971,12 +971,12 @@ END SUBROUTINE WRITE_PREPARE ! SUBROUTINE TRANSFER_R_I8(PFIELDIN,KFIELDOUT) ! -REAL,DIMENSION(:), INTENT(IN) :: PFIELDIN -INTEGER(KIND=8),DIMENSION(:),INTENT(OUT) :: KFIELDOUT +REAL,DIMENSION(:), INTENT(IN) :: PFIELDIN +INTEGER(KIND=MNHINT64),DIMENSION(:),INTENT(OUT) :: KFIELDOUT ! INTEGER :: ILENG #if (MNH_REAL == 4) -REAL(KIND=8),DIMENSION(:),ALLOCATABLE :: ZFIELD8 +REAL(KIND=MNHREAL64),DIMENSION(:),ALLOCATABLE :: ZFIELD8 #endif ! ILENG = SIZE(PFIELDIN) @@ -985,7 +985,7 @@ ILENG = SIZE(PFIELDIN) KFIELDOUT(:) = TRANSFER(PFIELDIN,KFIELDOUT(1),ILENG) #else ALLOCATE(ZFIELD8(ILENG)) - ZFIELD8(:) = REAL(PFIELDIN(:),KIND=8) + ZFIELD8(:) = REAL(PFIELDIN(:),KIND=MNHREAL64) KFIELDOUT(:) = TRANSFER(ZFIELD8,KFIELDOUT(1),ILENG) DEALLOCATE(ZFIELD8) #endif diff --git a/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 b/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 index cc24abb6fb9727634dcf7b04dfc413c34ba28049..53053069c936e71c6df416594babe000686782a7 100644 --- a/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 +++ b/src/LIB/SURCOUCHE/src/mode_io_write_nc4.f90 @@ -35,7 +35,7 @@ module mode_io_write_nc4 use modd_field, only: tfielddata use modd_io, only: gsmonoproc, tfiledata use modd_parameters, only: NMNHNAMELGTMAX -use modd_precision, only: CDFINT, MNHINT_NF90, MNHREAL_MPI, MNHREAL_NF90 +use modd_precision, only: CDFINT, MNHINT_NF90, MNHREAL32, MNHREAL_MPI, MNHREAL_NF90 use mode_io_tools_nc4, only: IO_Mnhname_clean, IO_Vdims_fill_nc4, IO_Dim_find_create_nc4, IO_Strdimid_get_nc4, IO_Err_handle_nc4 use mode_msg @@ -340,7 +340,7 @@ IF(TPFIELD%NTYPE==TYPEREAL .AND. TPFIELD%NDIMS>0) THEN ! * it cannot be modified if some data has already been written (->check OEXISTED) IF(.NOT.OEXISTED) THEN IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN - istatus = NF90_PUT_ATT(INCID, KVARID,'_FillValue', REAL(TPFIELD%XFILLVALUE,KIND=4)) + istatus = NF90_PUT_ATT(INCID, KVARID,'_FillValue', REAL(TPFIELD%XFILLVALUE,KIND=MNHREAL32)) ELSE istatus = NF90_PUT_ATT(INCID, KVARID,'_FillValue', TPFIELD%XFILLVALUE) END IF @@ -349,14 +349,14 @@ IF(TPFIELD%NTYPE==TYPEREAL .AND. TPFIELD%NDIMS>0) THEN ! ! Valid_min/max (CF/COMODO convention) IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN - istatus = NF90_PUT_ATT(INCID, KVARID,'valid_min', REAL(TPFIELD%XVALIDMIN,KIND=4)) + istatus = NF90_PUT_ATT(INCID, KVARID,'valid_min', REAL(TPFIELD%XVALIDMIN,KIND=MNHREAL32)) ELSE istatus = NF90_PUT_ATT(INCID, KVARID,'valid_min', TPFIELD%XVALIDMIN) END IF IF (istatus /= NF90_NOERR) CALL IO_Err_handle_nc4(istatus,'IO_Field_attr_write_nc4','NF90_PUT_ATT','valid_min') ! IF (TPFILE%LNCREDUCE_FLOAT_PRECISION) THEN - istatus = NF90_PUT_ATT(INCID, KVARID,'valid_max', REAL(TPFIELD%XVALIDMAX,KIND=4)) + istatus = NF90_PUT_ATT(INCID, KVARID,'valid_max', REAL(TPFIELD%XVALIDMAX,KIND=MNHREAL32)) ELSE istatus = NF90_PUT_ATT(INCID, KVARID,'valid_max',TPFIELD%XVALIDMAX) END IF diff --git a/src/MNH/ares.f b/src/MNH/ares.f index 3fd41e2b9bac4782d0b53f6df1eb606206cf6c31..2a300286f4320976d6edfc3de07d6ab24a574337 100644 --- a/src/MNH/ares.f +++ b/src/MNH/ares.f @@ -1071,12 +1071,14 @@ C /////////////////////////////////// C *** C234567 subroutine cubic(a2,a1,a0,nr,crutes) + use modd_precision, only: MNHREAL64 implicit none integer nr real a2,a1,a0,crutes(3) - real*8 qq,rr,a2sq,theta, sqrt3, one3rd - real*8 dum1,dum2,part1,part2,part3,rrsq,phi,yy1,yy2,yy3 - real*8 costh, sinth + real(kind=MNHREAL64) qq,rr,a2sq,theta, sqrt3, one3rd + real(kind=MNHREAL64) dum1,dum2,part1,part2,part3,rrsq,phi + real(kind=MNHREAL64) yy1,yy2,yy3 + real(kind=MNHREAL64) costh, sinth data sqrt3/1.732050808/, one3rd/0.333333333/ a2sq=a2*a2 qq=(a2sq-3.*a1)/9. diff --git a/src/MNH/modn_blankn.f90 b/src/MNH/modn_blankn.f90 index 44845258a5bddb348b631ccd3052e30696c64fb6..2825372c2e01dbc839105c6391cb7e107d9a7ff8 100644 --- a/src/MNH/modn_blankn.f90 +++ b/src/MNH/modn_blankn.f90 @@ -78,7 +78,7 @@ USE MODD_BLANK_n, ONLY:& IMPLICIT NONE LOGICAL, SAVE :: LDUMMY1, LDUMMY2, LDUMMY3, LDUMMY4,& LDUMMY5, LDUMMY6, LDUMMY7, LDUMMY8 -CHARACTER*80, SAVE :: CDUMMY1, CDUMMY2, CDUMMY3, CDUMMY4,& +CHARACTER(LEN=80), SAVE :: CDUMMY1, CDUMMY2, CDUMMY3, CDUMMY4,& CDUMMY5, CDUMMY6, CDUMMY7, CDUMMY8 INTEGER, SAVE :: NDUMMY1, NDUMMY2, NDUMMY3, NDUMMY4,& NDUMMY5, NDUMMY6, NDUMMY7, NDUMMY8