From 855b8f89627c1c08831c113f76bf063d70c727cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Riette?= <sebastien.riette@meteo.fr> Date: Thu, 30 Jun 2022 13:38:51 +0200 Subject: [PATCH] S. Riette 30/06/2022 Enable unlimited number of files in testprogs --- src/testprogs/ice_adjust/getdata_ice_adjust_mod.F90 | 10 ++++++---- src/testprogs/rain_ice/getdata_rain_ice_mod.F90 | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/testprogs/ice_adjust/getdata_ice_adjust_mod.F90 b/src/testprogs/ice_adjust/getdata_ice_adjust_mod.F90 index faf5d03f6..1fb0a4a02 100644 --- a/src/testprogs/ice_adjust/getdata_ice_adjust_mod.F90 +++ b/src/testprogs/ice_adjust/getdata_ice_adjust_mod.F90 @@ -107,7 +107,7 @@ KRR=6 NGPTOT = NPROMA * NGPBLKS IBL = 1 -WRITE (CLFILE, '("data/",I3.3,".dat")') IBL +WRITE (CLFILE, '("data/",I8.8,".dat")') IBL OPEN (IFILE, FILE=TRIM (CLFILE), FORM='UNFORMATTED') READ (IFILE) KLON, KDUM, KLEV CLOSE (IFILE) @@ -190,10 +190,12 @@ PHLC_HRC_B = ZNAN IOFF = 0 -IBL = 1 +IBL = 0 +LLEXIST = .TRUE. -DO IBL = 1, 296 - WRITE (CLFILE, '("data/",I3.3,".dat")') IBL +DO WHILE(LLEXIST) + IBL = IBL + 1 + WRITE (CLFILE, '("data/",I8.8,".dat")') IBL INQUIRE (FILE=TRIM (CLFILE), EXIST=LLEXIST) diff --git a/src/testprogs/rain_ice/getdata_rain_ice_mod.F90 b/src/testprogs/rain_ice/getdata_rain_ice_mod.F90 index 155ac9f3f..57c28b427 100644 --- a/src/testprogs/rain_ice/getdata_rain_ice_mod.F90 +++ b/src/testprogs/rain_ice/getdata_rain_ice_mod.F90 @@ -132,7 +132,7 @@ KRR=6 NGPTOT = NPROMA * NGPBLKS IBL = 1 -WRITE (CLFILE, '("data/",I3.3,".dat")') IBL +WRITE (CLFILE, '("data/",I8.8,".dat")') IBL OPEN (IFILE, FILE=TRIM (CLFILE), FORM='UNFORMATTED') READ (IFILE) IPROMA, ISIZE READ (IFILE) KLON, KDUM, KLEV, KRR @@ -224,10 +224,12 @@ ZRAINFR_OUT_B = ZNAN PFPR_OUT_B = ZNAN IOFF = 0 -IBL = 1 +IBL = 0 +LLEXIST = .TRUE. -DO IBL = 1, 150 - WRITE (CLFILE, '("data/",I3.3,".dat")') IBL +DO WHILE(LLEXIST) + IBL = IBL + 1 + WRITE (CLFILE, '("data/",I8.8,".dat")') IBL INQUIRE (FILE=TRIM (CLFILE), EXIST=LLEXIST) -- GitLab