From 6b6d917a12b09854dbb3a4416e0859a3dc2224dd Mon Sep 17 00:00:00 2001 From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr> Date: Thu, 10 Jan 2019 13:03:42 +0100 Subject: [PATCH] Philippe 10/01/2019: IO: use NEWUNIT argument of OPEN for chemistry files + bug: close all files --- src/MNH/ch_f77.fx90 | 2549 +++++++++++++++---------------- src/MNH/ch_init_diagnostics.f90 | 18 +- src/MNH/ch_init_model0d.f90 | 21 +- src/MNH/ch_init_output.f90 | 18 +- src/MNH/ch_make_lookup.f90 | 35 +- src/MNH/ch_read_chem.f90 | 20 +- src/MNH/ch_surface0d.f90 | 76 +- src/MNH/ch_write_chem.f90 | 34 +- src/MNH/modd_ch_model0d.f90 | 10 +- 9 files changed, 1329 insertions(+), 1452 deletions(-) diff --git a/src/MNH/ch_f77.fx90 b/src/MNH/ch_f77.fx90 index 3040b37bb..836766326 100644 --- a/src/MNH/ch_f77.fx90 +++ b/src/MNH/ch_f77.fx90 @@ -1,12 +1,8 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1994-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source: /home/cvsroot/MNH-VX-Y-Z/src/MNH/ch_f77.fx90,v $ $Revision: 1.2.2.1.2.2.2.1.8.2.2.3 $ $Date: 2014/06/19 15:18:13 $ -!----------------------------------------------------------------- C**FILE: svode.f C**AUTHOR: Karsten Suhre C**DATE: Fri Nov 10 09:17:45 GMT 1995 @@ -20,6 +16,8 @@ C** in exponential calculation --> problem with "ifort -O2" compiler C**MODIFIED: 22/02/2011 (J.Escobar) remove erroneous 'CALL ABORT' C**MODIFIED: 19/06/2014 (J.Escobar & M.Leriche) write(kout,...) to OUTPUT_LISTING file C & correct IN_LUN = 11 => IN_LUN = 78 to avoid fort.11 creation +C**MODIFIED: 10/01/2019 (P.Wautelet) use newunit argument to open files +C + bug corrections: some files were not closed C! C! C! @@ -4514,11 +4512,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -5332,11 +5329,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -5478,12 +5474,12 @@ c wlabel = 'isaksen.grid' wlabel = 'combined.grid' fi = 'DATAE1/GRIDS/'//wlabel - OPEN(unit=kin,file=fi,status='old') - READ(kin,*) nw + OPEN(newunit=ilu,file=fi,status='old') + READ(ilu,*) nw DO iw = 1, nw - READ(kin,*) wl(iw) + READ(ilu,*) wl(iw) ENDDO - CLOSE(kin) + CLOSE(ilu) DO iw = 1, nw-1 wu(iw) = wl(iw+1) wc(iw) = 0.5*(wl(iw) + wu(iw)) @@ -5517,20 +5513,22 @@ c wlabel = 'isaksen.grid' wlabel = 'fast-TUV tropospheric grid' fi = 'DATAE1/GRIDS/fast_tuv.grid' - OPEN(UNIT=kin,FILE=fi,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fi,STATUS='old') DO iw = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO * skip wavelength shorter than 289.9 nm DO iw = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO nw = 8 DO iw = 1, nw-1 - READ(kin,*) dum, wl(iw), dum, dum + READ(UNIT=ilu,FMT=*) dum, wl(iw), dum, dum ENDDO + CLOSE(UNIT=ilu) + wl(nw) = dum DO iw = 1, nw-1 wu(iw) = wl(iw+1) @@ -5548,12 +5546,12 @@ c wlabel = 'isaksen.grid' wlabel = 'combined.grid' fi = 'DATAE1/GRIDS/'//wlabel - OPEN(unit=kin,file=fi,status='old') - READ(kin,*) + OPEN(newunit=ilu,file=fi,status='old') + READ(ilu,*) DO iw = 1, 38 - READ(kin,*) wl(iw) + READ(ilu,*) wl(iw) ENDDO - CLOSE(kin) + CLOSE(ilu) DO i = 1, 3859 iw = 3859 - i + 39 @@ -5718,11 +5716,10 @@ c wlabel = 'isaksen.grid' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -6034,11 +6031,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -6120,11 +6116,10 @@ c c * BROADLY USED PARAMETERS: c *_________________________________________________ c * i/o file unit numbers -c INTEGER kout, kin +c INTEGER :: ilu +c INTEGER kout c * output c PARAMETER(kout=6) -c * input -c PARAMETER(kin=78) c *_________________________________________________ c * altitude, wavelength, time (or solar zenith angle) grids c INTEGER kz, kw @@ -6273,11 +6268,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -6425,11 +6419,10 @@ c c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -6677,11 +6670,10 @@ c c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -6761,8 +6753,8 @@ c c INCLUDE 'params' rm(iz) = 0.D+00 ro2(iz) = 0.D+00 DO i = 1, 3 - rm(iz) = rm(iz) + b(i) * DEXP(-c(i) * DBLE(o2col(iz))) - ro2(iz) = ro2(iz) + d(i) * DEXP(-e(i) * DBLE(o2col(iz))) + rm(iz) = rm(iz) + b(i) * EXP(-c(i) * DBLE(o2col(iz))) + ro2(iz) = ro2(iz) + d(i) * EXP(-e(i) * DBLE(o2col(iz))) ENDDO ENDDO @@ -6835,11 +6827,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -7116,10 +7107,9 @@ C locals INTEGER IOST ! i/o status INTEGER I, J - !IN_LUN = 11 - IN_LUN = 78 + IN_LUN = -1 - OPEN (UNIT=IN_LUN, FILE= + OPEN (NEWUNIT=IN_LUN, FILE= $ 'DATAE1/O2/effxstex.txt',FORM='FORMATTED') READ( IN_LUN, 901 ) @@ -7210,11 +7200,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -7959,11 +7948,10 @@ c c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -8087,11 +8075,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -8790,11 +8777,10 @@ c c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -8939,16 +8925,16 @@ c c INCLUDE 'params' IF (msun .EQ. 1) THEN fil = 'DATAE1/SUN/extsol.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 3 n =121 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -8965,16 +8951,16 @@ c c INCLUDE 'params' ELSEIF (msun .EQ. 2) THEN fil = 'DATAE1/SUN/lowsun3.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 3 n = 4327 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -8991,16 +8977,16 @@ c c INCLUDE 'params' ELSEIF (msun .EQ. 3) THEN fil = 'DATAE1/SUN/modtran1.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 6 n = 14980 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9017,16 +9003,16 @@ c c INCLUDE 'params' ELSEIF (msun .EQ. 4) THEN fil = 'DATAE1/SUN/nicolarv.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 8 n = 1260 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9044,16 +9030,16 @@ c c INCLUDE 'params' * unofficial - do not use fil = 'DATAE2/SUN/solstice.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 11 n = 2047 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9071,17 +9057,17 @@ c c INCLUDE 'params' * unofficial - do not use fil = 'DATAE2/SUN/suntoms.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 3 n = 1200 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) y1(i) = y1(i)* 1.e-3 ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9098,20 +9084,20 @@ c c INCLUDE 'params' ELSEIF (msun .EQ. 7) THEN fil = 'DATAE1/SUN/neckel.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 11 n = 496 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) dum, y1(i) + READ(ilu,*) dum, y1(i) if (dum .lt. 630.0) x1(i) = dum - 0.5 if (dum .gt. 630.0 .and. dum .lt. 870.0) x1(i) = dum - 1.0 if (dum .gt. 870.0) x1(i) = dum - 2.5 y1(i) = y1(i) * 1.E4 * hc / (dum * 1.E-9) ENDDO - CLOSE (kin) + CLOSE (ilu) x1(n+1) = x1(n) + 2.5 do i = 1, n y1(i) = y1(i) * (x1(i+1)-x1(i)) @@ -9128,17 +9114,17 @@ c c INCLUDE 'params' nhead = 5 fil = 'DATAE1/SUN/atlas3_1994_317_a.dat' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 13 n = 5160 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) y1(i) = y1(i) * 1.E-3 ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9155,16 +9141,16 @@ c c INCLUDE 'params' ELSEIF (msun .EQ. 9) THEN fil = 'DATAE1/SUN/solstice.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 2 n = 302 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9198,20 +9184,20 @@ c c INCLUDE 'params' CALL read1(nw,wl,yg1,kout) fil = 'DATAE1/SUN/neckel.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 11 n = 496 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) dum, y1(i) + READ(ilu,*) dum, y1(i) if (dum .lt. 630.0) x1(i) = dum - 0.5 if (dum .gt. 630.0 .and. dum .lt. 870.0) x1(i) = dum - 1.0 if (dum .gt. 870.0) x1(i) = dum - 2.5 y1(i) = y1(i) * 1.E4 * hc / (dum * 1.E-9) ENDDO - CLOSE (kin) + CLOSE (ilu) x1(n+1) = x1(n) + 2.5 do i = 1, n y1(i) = y1(i) * (x1(i+1)-x1(i)) @@ -9237,16 +9223,16 @@ c c INCLUDE 'params' nhead = 5 fil = 'DATAE1/SUN/atlas3_1994_317_a.dat' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') n = 5160 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) y1(i) = y1(i) * 1.E-3 ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9259,20 +9245,20 @@ c c INCLUDE 'params' fil = 'DATAE1/SUN/neckel.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 11 n = 496 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) dum, y1(i) + READ(ilu,*) dum, y1(i) if (dum .lt. 630.0) x1(i) = dum - 0.5 if (dum .gt. 630.0 .and. dum .lt. 870.0) x1(i) = dum - 1.0 if (dum .gt. 870.0) x1(i) = dum - 2.5 y1(i) = y1(i) * 1.E4 * hc / (dum * 1.E-9) ENDDO - CLOSE (kin) + CLOSE (ilu) x1(n+1) = x1(n) + 2.5 call inter4(nw,wl,yg3,n+1,x1,y1,0) @@ -9296,20 +9282,20 @@ c c INCLUDE 'params' fil = 'DATAE1/SUN/neckel.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 11 n = 496 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) dum, y1(i) + READ(ilu,*) dum, y1(i) if (dum .lt. 630.0) x1(i) = dum - 0.5 if (dum .gt. 630.0 .and. dum .lt. 870.0) x1(i) = dum - 1.0 if (dum .gt. 870.0) x1(i) = dum - 2.5 y1(i) = y1(i) * 1.E4 * hc / (dum * 1.E-9) ENDDO - CLOSE (kin) + CLOSE (ilu) x1(n+1) = x1(n) + 2.5 call inter4(nw,wl,yg3,n+1,x1,y1,0) @@ -9332,16 +9318,16 @@ c c INCLUDE 'params' nhead = 5 fil = 'DATAE1/SUN/atlas3_1994_317_a.dat' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') n = 5160 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(ilu,*) x1(i), y1(i) y1(i) = y1(i) * 1.E-3 ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -9354,20 +9340,20 @@ c c INCLUDE 'params' fil = 'DATAE1/SUN/neckel.flx' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') nhead = 11 n = 496 DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) dum, y1(i) + READ(ilu,*) dum, y1(i) if (dum .lt. 630.0) x1(i) = dum - 0.5 if (dum .gt. 630.0 .and. dum .lt. 870.0) x1(i) = dum - 1.0 if (dum .gt. 870.0) x1(i) = dum - 2.5 y1(i) = y1(i) * 1.E4 * hc / (dum * 1.E-9) ENDDO - CLOSE (kin) + CLOSE (ilu) x1(n+1) = x1(n) + 2.5 call inter4(nw,wl,yg3,n+1,x1,y1,0) @@ -9375,16 +9361,16 @@ c c INCLUDE 'params' nhead = 8 fil = 'DATAE1/SUN/sao2010.solref.converted' write(kout,*) fil - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') n = 80099 - nhead DO i = 1, nhead - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, n - READ(kin,*) x1(i), dum, y1(i), dum + READ(ilu,*) x1(i), dum, y1(i), dum c y1(i) = y1(i) * 1.E4 * hc / (x1(i) * 1.E-9) ENDDO - CLOSE (kin) + CLOSE (ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -9444,11 +9430,10 @@ c c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -9531,14 +9516,14 @@ c c INCLUDE 'params' ** high resolution fil = 'DATAE1/SUN/susim_hi.flx' - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') DO 11, i = 1, 7 - READ(kin,*) + READ(ilu,*) 11 CONTINUE DO 12, i = 1, 559 - READ(kin,*)lambda,(irrad_hi(10*(i-1)+j), j=1, 10) + READ(ilu,*)lambda,(irrad_hi(10*(i-1)+j), j=1, 10) 12 CONTINUE - CLOSE (kin) + CLOSE (ilu) * compute wavelengths, convert from mW to W @@ -9588,11 +9573,10 @@ c c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -9663,13 +9647,13 @@ c c INCLUDE 'params' *********WMO 85 irradiance - OPEN(UNIT=kin,FILE='DATAE1/SUN/wmo85.flx',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/SUN/wmo85.flx',STATUS='old') DO 11, i = 1, 3 - READ(kin,*) + READ(ilu,*) 11 CONTINUE n = 158 DO 12, i = 1, n - READ(kin,*) idum, x1(i),x2(i),y1(i), dum, dum, dum + READ(ilu,*) idum, x1(i),x2(i),y1(i), dum, dum, dum x3(i) = 0.5 * (x1(i) + x2(i)) C average value needs to be calculated only if inter2 is @@ -9677,7 +9661,7 @@ C used to interpolate onto wavelength grid (see below) C y1(i) = y1(i) / (x2(i) - x1(i)) 12 CONTINUE - CLOSE (kin) + CLOSE (ilu) x1(n+1) = x2(n) @@ -9757,11 +9741,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -10008,11 +9991,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -10091,34 +10073,34 @@ c INCLUDE 'params' *= Malicet et al., J. Atmos. Chem. v.21, pp.263-273, 1995. =* *= over 345.01 - 830.00, use values from Brion, room temperature only - OPEN(UNIT=kin,FILE='DATAE1/O3/1995Malicet_O3.txt',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/O3/1995Malicet_O3.txt',STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(ilu,*) ENDDO n1 = 15001 n2 = 15001 n3 = 15001 n4 = 15001 DO i = 1, n1 - READ(kin,*) x1(i), y1(i), y2(i), y3(i), y4(i) + READ(ilu,*) x1(i), y1(i), y2(i), y3(i), y4(i) x2(i) = x1(i) x3(i) = x1(i) x4(i) = x1(i) ENDDO - CLOSE (kin) + CLOSE (ilu) *= over 345.01 - 830.00, use values from Brion, room temperature only * skip datum at 345.00 because already read in from 1995Malicet - OPEN(UNIT=kin,FILE='DATAE1/O3/1998Brion_295.txt',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/O3/1998Brion_295.txt',STATUS='old') DO i = 1, 15 - READ(kin,*) + READ(ilu,*) ENDDO DO i = 1, 48515-15 n1 = n1 + 1 - READ(kin,*) x1(n1), y1(n1) + READ(ilu,*) x1(n1), y1(n1) ENDDO - CLOSE (kin) + CLOSE (ilu) DO i = 1, n1 ri(i) = refrac(x1(i), 2.45E19) @@ -10212,11 +10194,10 @@ c c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -10295,18 +10276,18 @@ c c INCLUDE 'params' * cross sections from WMO 1985 Ozone Assessment * from 175.439 to 847.500 nm - OPEN(UNIT=kin,FILE='DATAE1/wmo85',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/wmo85',STATUS='old') DO i = 1, 3 - read(kin,*) + read(UNIT=ilu,FMT=*) ENDDO n1 = 158 n2 = 158 DO i = 1, n1 - READ(kin,*) idum, a1, a2, dum, dum, dum, y1(i), y2(i) + READ(UNIT=ilu,FMT=*) idum, a1, a2, dum, dum, dum, y1(i), y2(i) x1(i) = (a1+a2)/2. x2(i) = (a1+a2)/2. ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) * convert wavelengths to vacuum @@ -10375,11 +10356,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -10456,18 +10436,18 @@ c INCLUDE 'params' *********** - OPEN(UNIT=kin,FILE='DATAE1/O3/2006JPL_O3.txt',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/O3/2006JPL_O3.txt',STATUS='old') DO i = 1, 2 - read(kin,*) + read(ilu,*) ENDDO n1 = 167 n2 = 167 DO i = 1, n1 - READ(kin,*) dum, dum, x1(i), y1(i), y2(i) + READ(ilu,*) dum, dum, x1(i), y1(i), y2(i) y1(i) = y1(i) * 1.e-20 y2(i) = y2(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (ilu) * convert wavelengths to vacuum @@ -10538,11 +10518,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -10617,9 +10596,9 @@ c INCLUDE 'params' *---------------------------------------------------------- - OPEN(UNIT=kin,FILE='DATAE1/O3/1986Molina.txt',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/O3/1986Molina.txt',STATUS='old') DO i = 1, 10 - READ(kin,*) + READ(ilu,*) ENDDO n1 = 0 n2 = 0 @@ -10627,18 +10606,18 @@ c INCLUDE 'params' DO i = 1, 121-10 n1 = n1 + 1 n3 = n3 + 1 - READ(kin,*) x1(n1), y1(n1), y3(n3) + READ(ilu,*) x1(n1), y1(n1), y3(n3) x3(n3) = x1(n1) ENDDO DO i = 1, 341-122 n1 = n1 + 1 n2 = n2 + 1 n3 = n3 + 1 - READ(kin,*) x1(n1), y1(n1), y2(n2), y3(n3) + READ(ilu,*) x1(n1), y1(n1), y2(n2), y3(n3) x2(n2) = x1(n1) x3(n3) = x1(n1) ENDDO - CLOSE (kin) + CLOSE (ilu) * convert all wavelengths from air to vacuum @@ -10731,11 +10710,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -10811,20 +10789,20 @@ c INCLUDE 'params' ******************* - OPEN(UNIT=kin,FILE='DATAE1/O3/1985Bass_O3.txt',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/O3/1985Bass_O3.txt',STATUS='old') DO i = 1, 8 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n1 = 1915 n2 = 1915 n3 = 1915 DO i = 1, n1 - READ(kin,*) x1(i), y1(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i) y1(i) = 1.e-20 * y1(i) y2(i) = 1.e-20 * y2(i) y3(i) = 1.e-20 * y3(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) * convert all wavelengths from air to vacuum @@ -10902,11 +10880,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -10984,31 +10961,31 @@ c INCLUDE 'params' n = 0 - OPEN(UNIT=kin,FILE='DATAE1/O2/O2_brasseur.abs') + OPEN(NEWUNIT=ilu,FILE='DATAE1/O2/O2_brasseur.abs') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, 78 - READ(kin,*) x, y + READ(UNIT=ilu,FMT=*) x, y IF (x .LE. 204.) THEN n = n + 1 x1(n) = x y1(n) = y ENDIF ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) - OPEN(UNIT=kin,FILE='DATAE1/O2/O2_yoshino.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/O2/O2_yoshino.abs',STATUS='old') DO i = 1, 8 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, 36 n = n + 1 - READ(kin,*) x, y + READ(UNIT=ilu,FMT=*) x, y y1(n) = y*1.E-24 x1(n) = x END DO - CLOSE (kin) + CLOSE (UNIT=ilu) * Add termination points and interpolate onto the * user grid (set in subroutine gridw): @@ -11052,11 +11029,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -11149,11 +11125,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -11235,12 +11210,12 @@ c INCLUDE 'params' * Values at 273K from 263.8 to 648.8 nm in approximately 0.5 nm intervals fil = 'DATAE1/NO2/NO2_ncar_00.abs' - OPEN(UNIT=kin,FILE=fil,STATUS='old') + OPEN(NEWUNIT=ilu,FILE=fil,STATUS='old') n = 750 DO i = 1, n - READ(kin,*) x1(i), y1(i), dum, dum, idum + READ(UNIT=ilu,FMT=*) x1(i), y1(i), dum, dum, idum ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) * interpolate to wavelength grid @@ -11277,11 +11252,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -11355,10 +11329,10 @@ c INCLUDE 'params' * cross section data from JPL 94 recommendation * JPL 97 and JPL 2002 recommendations are identical - OPEN(UNIT=kin,FILE='DATAE1/NO2/NO2_jpl94.abs',STATUS='old') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAE1/NO2/NO2_jpl94.abs',STATUS='old') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO * read in wavelength bins, cross section at T0 and temperature correction @@ -11367,12 +11341,12 @@ c INCLUDE 'params' * inter3 DO i = 1, n - READ(kin,*) x1(i), x3(i), y1(i), dum, y2(i) + READ(UNIT=ilu,FMT=*) x1(i), x3(i), y1(i), dum, y2(i) y1(i) = (x3(i)-x1(i)) * y1(i)*1.E-20 y2(i) = (x3(i)-x1(i)) * y2(i)*1.E-22 x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) x1(n+1) = x3(n) x2(n+1) = x3(n) @@ -11408,11 +11382,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -11483,15 +11456,16 @@ c INCLUDE 'params' *** - OPEN(UNIT=kin,FILE='DATAE1/NO2/NO2_Har.abs',status='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/NO2/NO2_Har.abs',status='old') DO i = 1, 9 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 135 DO i = 1, n - READ(kin,*) idum, y1(i) + READ(UNIT=ilu,FMT=*) idum, y1(i) x1(i) = FLOAT(idum) ENDDO + CLOSe(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n, 0.,y1(1)) @@ -11520,11 +11494,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -11595,19 +11568,19 @@ c INCLUDE 'params' * NO2 absorption cross section from JPL2006 * with interpolation of bin midpoints - OPEN(UNIT=kin,FILE='DATAE1/NO2/NO2_jpl2006.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/NO2/NO2_jpl2006.abs',STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n1 = 73 DO i = 1, n1 - READ(kin,*) dum1, dum2, y1(i), y2(i) + READ(UNIT=ilu,FMT=*) dum1, dum2, y1(i), y2(i) x1(i) = 0.5 * (dum1 + dum2) x2(i) = x1(i) y1(i) = y1(i)*1.E-20 y2(i) = y2(i)*1.E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n2 = n1 CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -11644,11 +11617,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -11717,18 +11689,18 @@ c INCLUDE 'params' REAL dum1, dum2 REAL yg1(kw), yg2(kw) - OPEN(UNIT=kin,FILE='DATAE1/NO2/NO2_jpl2006.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/NO2/NO2_jpl2006.abs',STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 81 do i = 1, n - read(kin,*) x1(i), x3(i), y1(i), y2(i) + read(UNIT=ilu,FMT=*) x1(i), x3(i), y1(i), y2(i) y1(i) = (x3(i)-x1(i)) * y1(i)*1.E-20 y2(i) = (x3(i)-x1(i)) * y2(i)*1.E-20 x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) x1(n+1) = x3(n) x2(n+1) = x3(n) @@ -11799,11 +11771,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -11877,17 +11848,17 @@ c INCLUDE 'params' * Angstrom vs. cm2/molecule, value at 221 K fil = 'DATA/McGee87' - OPEN(UNIT=kin,FILE='DATAE1/SO2/SO2xs.all',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/SO2/SO2xs.all',STATUS='old') DO 11, i = 1,3 - read(kin,*) + read(UNIT=ilu,FMT=*) 11 CONTINUE c n = 681 n = 704 DO 12, i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) x1(i) = x1(i)/10. 12 CONTINUE - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -11980,11 +11951,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -12304,11 +12274,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -12801,11 +12770,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -13199,11 +13167,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -15647,11 +15614,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -19723,11 +19689,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -19877,17 +19842,18 @@ c myld = kjpl00 * read parameters from JPL'97 IF (myld .EQ. kjpl97) THEN - OPEN(UNIT=kin,FILE='DATAJ1/YLD/O3.param_jpl97.yld',STATUS='old') - READ(kin,*) - READ(kin,*) - READ(kin,*) + OPEN(NEWUNIT=ilu,FILE='DATAJ1/YLD/O3.param_jpl97.yld', + & STATUS='old') + READ(UNIT=ilu,FMT=*) + READ(UNIT=ilu,FMT=*) + READ(UNIT=ilu,FMT=*) n1 = 21 n2 = n1 DO i = 1, n1 - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n1, 0.,y1(1)) @@ -19914,17 +19880,17 @@ c myld = kjpl00 * and J. G. Anderson, Geophys. Res. Lett., 21, 2227-2230, 1994. IF (myld .EQ. kmich) THEN - OPEN(UNIT=kin,FILE='DATAJ1/YLD/O3.param.yld',STATUS='old') - READ(kin,*) - READ(kin,*) - READ(kin,*) + OPEN(NEWUNIT=ilu,FILE='DATAJ1/YLD/O3.param.yld',STATUS='old') + READ(UNIT=ilu,FMT=*) + READ(UNIT=ilu,FMT=*) + READ(UNIT=ilu,FMT=*) n1 = 21 n2 = n1 DO i = 1, n1 - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n1, 0.,y1(1)) @@ -19951,23 +19917,23 @@ c myld = kjpl00 * Shetter et al, J.Geophys.Res., v 101 (D9), pg. 14,631-14,641, June 20, 1996 IF (myld .EQ. kshet) THEN - OPEN(UNIT=kin,FILE='DATAJ1/YLD/O3_shetter.yld',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/YLD/O3_shetter.yld',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = n-2 DO i = 1, n - READ(kin,*) x1(i),y3(i),y4(i),y1(i),y2(i) + READ(UNIT=ilu,FMT=*) x1(i),y3(i),y4(i),y1(i),y2(i) x2(i) = x1(i) x3(i) = x1(i) x4(i) = x1(i) ENDDO DO i = n+1, n+2 - READ(kin,*) x3(i),y3(i),y4(i) + READ(UNIT=ilu,FMT=*) x3(i),y3(i),y4(i) x4(i) = x3(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -20182,11 +20148,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -20300,15 +20265,15 @@ c INCLUDE 'params' * from Gardiner, Sperry, and Calvert - OPEN(UNIT=kin,FILE='DATAJ1/YLD/NO2_calvert.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/YLD/NO2_calvert.yld',STATUS='old') DO i = 1, 8 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 66 DO i = 1, n - READ(kin,*) x1(i),y1(i) + READ(UNIT=ilu,FMT=*) x1(i),y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n, 0.,y1(1)) @@ -20330,17 +20295,17 @@ c INCLUDE 'params' * from jpl 2011 - OPEN(UNIT=kin,FILE='DATAJ1/YLD/NO2_jpl11.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/YLD/NO2_jpl11.yld',STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 25 n2 = n DO i = 1, n - READ(kin,*) x1(i),y1(i),y2(i) + READ(UNIT=ilu,FMT=*) x1(i),y1(i),y2(i) x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n, 0.,y1(1)) @@ -20423,11 +20388,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -20543,16 +20507,16 @@ c INCLUDE 'params' * cross section * measurements of Graham and Johnston 1978 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/NO3_gj78.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/NO3_gj78.abs',STATUS='old') DO i = 1, 9 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 305 DO irow = 1, 30 - READ(kin,*) ( y1(10*(irow-1) + icol), icol = 1, 10 ) + READ(UNIT=ilu,FMT=*) ( y1(10*(irow-1) + icol), icol = 1, 10 ) ENDDO - READ(kin,*) ( y1(300 + icol), icol = 1, 5 ) - CLOSE (kin) + READ(UNIT=ilu,FMT=*) ( y1(300 + icol), icol = 1, 5 ) + CLOSE (UNIT=ilu) DO i = 1, n y1(i) = y1(i) * 1.E-19 x1(i) = 400. + 1.*FLOAT(i-1) @@ -20572,16 +20536,16 @@ c INCLUDE 'params' * cross section from JPL94: - OPEN(UNIT=kin,FILE='DATAJ1/ABS/NO3_jpl94.abs',STATUS='old') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/NO3_jpl94.abs',STATUS='old') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i)*1E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) CALL addpnt(x1,y1,kdata,n,x1(n)*(1.+deltax),0.) @@ -20602,15 +20566,15 @@ c INCLUDE 'params' ELSEIF(MABS .EQ. 3) THEN - OPEN(UNIT=kin,FILE='DATAJ1/ABS/NO3_jpl11.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/NO3_jpl11.abs',STATUS='old') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, 289 - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i)*1E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n = 289 CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) @@ -20667,12 +20631,12 @@ c INCLUDE 'params' ELSEIF(myld .EQ. 2) THEN - open(unit=kin,file='DATAJ1/YLD/NO3_jpl2011.qy',status='old') + open(newunit=ilu,file='DATAJ1/YLD/NO3_jpl2011.qy',status='old') do i = 1, 5 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo do i = 1, 56 - read(kin,*) x(i), q1_298(i), q1_230(i), q1_190(i), + read(UNIT=ilu,FMT=*) x(i), q1_298(i), q1_230(i), q1_190(i), $ q2_298(i), q2_230(i), q2_190(i) q1_298(i) = q1_298(i)/1000. @@ -20683,7 +20647,7 @@ c INCLUDE 'params' q2_190(i) = q2_190(i)/1000. enddo - close(kin) + close(UNIT=ilu) n = 56 do i = 1, n @@ -20833,11 +20797,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -20929,26 +20892,26 @@ c INCLUDE 'params' * cross section from jpl2011, at 300 K - OPEN(UNIT=kin,FILE='DATAJ1/ABS/N2O5_jpl11.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/N2O5_jpl11.abs',STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n1 = 103 DO i = 1, n1 - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO * read temperature dependence coefficients: DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n2 = 8 DO i = 1, n2 - READ(kin,*) x2(i), A(i), B(i) + READ(UNIT=ilu,FMT=*) x2(i), A(i), B(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata, n1,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata, n1, 0.,0.) @@ -21040,11 +21003,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -21141,16 +21103,16 @@ c INCLUDE 'params' IF(mabs .eq. 1) then - OPEN(UNIT=kin,FILE='DATAJ1/ABS/HNO2_jpl92.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HNO2_jpl92.abs',STATUS='old') DO i = 1, 13 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 91 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -21164,16 +21126,16 @@ c INCLUDE 'params' ELSEIF(mabs .eq. 2) then - OPEN(UNIT=kin,FILE='DATAJ1/ABS/HONO_jpl11.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HONO_jpl11.abs',STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 192 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -21238,11 +21200,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -21330,16 +21291,16 @@ c INCLUDE 'params' C* cross section from JPL85 C -C OPEN(UNIT=kin,FILE='DATAJ1/ABS/HNO3.abs',STATUS='old') +C OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HNO3.abs',STATUS='old') C DO i = 1, 9 -C READ(kin,*) +C READ(UNIT=ilu,FMT=*) C ENDDO C n = 29 C DO i = 1, n -C READ(kin,*) x1(i), y1(i) +C READ(UNIT=ilu,FMT=*) x1(i), y1(i) C y1(i) = y1(i) * 1.E-20 C ENDDO -C CLOSE (kin) +C CLOSE (UNIT=ilu) C C CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) C CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -21363,18 +21324,18 @@ C ENDDO * HNO3 cross section parameters from Burkholder et al. 1993 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/HNO3_burk.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HNO3_burk.abs',STATUS='old') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) END DO n1 = 83 n2 = n1 DO i = 1, n1 - READ(kin,*) y1(i), y2(i) + READ(UNIT=ilu,FMT=*) y1(i), y2(i) x1(i) = 184. + i*2. x2(i) = x1(i) END DO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n1, 0.,0.) @@ -21447,11 +21408,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -21537,16 +21497,16 @@ C* local j = j + 1 jlabel(j) = 'HNO4 -> HO2 + NO2' - OPEN(UNIT=kin,FILE='DATAJ1/ABS/HNO4_jpl11.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HNO4_jpl11.abs',STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 54 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -21610,11 +21570,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -21708,16 +21667,16 @@ C INTEGER n1, n2, n3, n4, n5 j = j + 1 jlabel(j) = 'H2O2 -> 2 OH' -C OPEN(UNIT=kin,FILE='DATAJ1/ABS/H2O2_lin.abs',STATUS='old') +C OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/H2O2_lin.abs',STATUS='old') C DO i = 1, 7 -C READ(kin,*) +C READ(UNIT=ilu,FMT=*) C ENDDO C n = 32 C DO i = 1, n -C READ(kin,*) x1(i), y1(i) +C READ(UNIT=ilu,FMT=*) x1(i), y1(i) C y1(i) = y1(i) * 1.E-20 C ENDDO -C CLOSE (kin) +C CLOSE (UNIT=ilu) C C CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) C CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -21732,23 +21691,23 @@ C ENDIF * cross section from JPL94 (identical to JPL97) * tabulated data up to 260 nm - OPEN(UNIT=kin,FILE='DATAJ1/ABS/H2O2_jpl94.abs',STATUS='old') - READ(kin,*) idum,n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/H2O2_jpl94.abs',STATUS='old') + READ(UNIT=ilu,FMT=*) idum,n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) - OPEN(UNIT=kin,FILE='DATAJ1/ABS/H2O2_Kahan.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/H2O2_Kahan.abs',STATUS='old') DO i = 1, 494 n = n + 1 - READ(kin,*) x1(n), y1(n) + READ(UNIT=ilu,FMT=*) x1(n), y1(n) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -21847,11 +21806,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -21962,9 +21920,9 @@ c INCLUDE 'params' kopt = 2 if (kopt .eq. 1) then - OPEN(UNIT=kin,FILE='DATAJ1/ABS/CHBr3.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CHBr3.abs',STATUS='old') DO i = 1, 5 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n5 = 25 @@ -21973,21 +21931,21 @@ c INCLUDE 'params' n2 = 31 n1 = 39 DO i = 1, n5 - READ(kin,*) x1(i), y1(i), y2(i), y3(i), y4(i), y5(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i), y4(i), y5(i) ENDDO do i = n5 + 1, n4 - READ(kin,*) x1(i), y1(i), y2(i), y3(i), y4(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i), y4(i) enddo do i = n4 + 1, n3 - READ(kin,*) x1(i), y1(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i) enddo do i = n3 + 1, n2 - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) enddo do i = n2 + 1, n1 - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) enddo - CLOSE (kin) + CLOSE (UNIT=ilu) do i = 1, n1 y1(i) = y1(i) * 1.e-23 @@ -22100,16 +22058,16 @@ c INCLUDE 'params' ELSEIF (kopt .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/ABS/CHBr3.jpl97',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CHBr3.jpl97',STATUS='old') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n1 = 87 DO i = 1, n1 - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n1, 0.,y1(1)) @@ -22196,11 +22154,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -22360,12 +22317,13 @@ c INCLUDE 'params' * read NBS/Bass data - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_nbs.abs' + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_nbs.abs' $ ,STATUS='old') n = 4032 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) CALL addpnt(x,y,kdata,n,x(n)*(1.+deltax),0.) @@ -22379,16 +22337,16 @@ c INCLUDE 'params' ELSEIF (mopt1 .EQ. 2 .OR. mopt1 .EQ. 3 .OR. mopt1 .EQ. 4) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH2O_iupac1.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O_iupac1.abs',STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 121 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) CALL addpnt(x,y,kdata,n,x(n)*(1.+deltax),0.) @@ -22408,20 +22366,21 @@ c INCLUDE 'params' * if y1 < 0, then make = 0 (some negative cross sections, actually 273 K intercepts * are in the original data, Here, make equal to zero) - OPEN(kin,FILE='DATAJ1/CH2O/CH2O_can_hr.abs',STATUS='old') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_can_hr.abs', + & STATUS='old') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x1(i) = 1./x1(i) * 1E7 IF (x1(i) .GT. 360.) THEN y1(i) = 0. y2(i) = 0. ENDIF ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) DO i = 1, n/2 irev = n+1-i @@ -22464,17 +22423,17 @@ c INCLUDE 'params' ELSEIF(mopt1 .eq. 4) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_can_lr.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_can_lr.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 23 DO i = 1, n - READ(kin,*) x2(i), y2(i), y3(i), dum, dum + READ(UNIT=ilu,FMT=*) x2(i), y2(i), y3(i), dum, dum x3(i) = x2(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n2 = n n3 = n @@ -22504,16 +22463,17 @@ c INCLUDE 'params' * read Rodgers data - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_rog.abs' + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_rog.abs' $ ,STATUS='old') DO i = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 261 DO i = 1, n - READ(kin,*) x(i), y(i), dum + READ(UNIT=ilu,FMT=*) x(i), y(i), dum y(i) = y(i) * 1.e-20 ENDDO + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) CALL addpnt(x,y,kdata,n,x(n)*(1.+deltax),0.) @@ -22526,16 +22486,17 @@ c INCLUDE 'params' ELSEIF(mopt1 .EQ. 6) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_ncar.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_ncar.abs', + & STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 126 DO i = 1, n - READ(kin,*) x2(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x2(i), y2(i), y3(i) x3(i) = x2(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n2 = n n3 = n @@ -22565,15 +22526,16 @@ c INCLUDE 'params' IF (mopt2 .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_i_mad.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_i_mad.yld', + & STATUS='old') DO i = 1, 11 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 20 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),y(1)) CALL addpnt(x,y,kdata,n, 0.,y(1)) CALL addpnt(x,y,kdata,n,x(n)*(1.+deltax),0.) @@ -22584,15 +22546,16 @@ c INCLUDE 'params' STOP ENDIF - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_ii_mad.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_ii_mad.yld', + & STATUS='old') DO i = 1, 9 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 33 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),y(1)) CALL addpnt(x,y,kdata,n, 0.,y(1)) CALL addpnt(x,y,kdata,n,x(n)*(1.+deltax),0.) @@ -22605,16 +22568,17 @@ c INCLUDE 'params' ELSEIF(mopt2 .EQ. 2) then - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_iupac.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_iupac.yld', + & STATUS='old') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 13 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -22640,14 +22604,14 @@ c INCLUDE 'params' * box-filling interpolation. c DO i = 1, n -c READ(kin,*) x1(i), y1(i), y2(i) +c READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) c x1(i) = x1(i) - 5.0 c x2(i) = x1(i) c ENDDO c n = n + 1 c x1(n) = x1(n-1) + 5.0 c x2(n) = x1(n) -c CLOSE(kin) +c CLOSE(UNIT=ilu) c DO i = 1, n-1 c y1(i) = y1(i) * (x1(i+1)-x1(i)) c ENDDO @@ -22665,16 +22629,17 @@ c ENDDO ELSE IF(mopt2 .EQ. 3) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_jpl97.dat',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_jpl97.dat', + & STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 23 DO i = 1, n - READ(kin,*) x1(i), dum, dum, dum, dum, y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), dum, dum, dum, dum, y1(i), y2(i) x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -22809,11 +22774,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -22942,16 +22906,17 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/CH3CHO_iup.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/CH3CHO_iup.abs', + & STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 106 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -22967,17 +22932,18 @@ c INCLUDE 'params' * cross section from Calvert and Pitts - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/d021_cp.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/d021_cp.abs', + & STATUS='old') DO i = 1, 14 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 54 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) x1(i) = x1(i)/10. y1(i) = y1(i) * 3.82E-21 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -22991,15 +22957,16 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 3) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/CH3CHO_mar.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/CH3CHO_mar.abs', + & STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 106 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23021,23 +22988,23 @@ c INCLUDE 'params' * ch3cho.005 - IUPAC'92 * ch3cho.006 - Libuda, thesis Wuppertal 1992 -c OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cho.001',STATUS='old') +c OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cho.001',STATUS='old') C n = 217 -c OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cho.002',STATUS='old') +c OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cho.002',STATUS='old') c n = 63 -c OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cho.003',STATUS='old') +c OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cho.003',STATUS='old') c n = 13738 -c OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cho.004',STATUS='old') +c OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cho.004',STATUS='old') c n = 2053 - OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cho.005',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cho.005',STATUS='old') n = 18 -c OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cho.006',STATUS='old') +c OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cho.006',STATUS='old') c n = 1705 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23051,17 +23018,17 @@ c n = 1705 ELSEIF (mabs .EQ. 5) THEN - OPEN(UNIT=kin, + OPEN(NEWUNIT=ilu, $ FILE='DATAJ1/CH3CHO/CH3CHO_jpl11.abs',STATUS='old') do i = 1, 2 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 101 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23079,16 +23046,17 @@ c n = 1705 IF (myld .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/CH3CHO_iup.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/CH3CHO_iup.yld', + & STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 12 DO i = 1, n - READ(kin,*) x1(i), y2(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y2(i), y1(i) x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -23118,15 +23086,15 @@ c n = 1705 ELSEIF (myld .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/d021_i.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/d021_i.yld',STATUS='old') DO i = 1, 18 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 10 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n, 0.,y1(1)) @@ -23138,15 +23106,16 @@ c n = 1705 STOP ENDIF - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/d021_ii.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/d021_ii.yld', + & STATUS='old') DO i = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 9 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n, 0.,y1(1)) @@ -23158,15 +23127,16 @@ c n = 1705 STOP ENDIF - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/d021_iii.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/d021_iii.yld', + & STATUS='old') DO i = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 9 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),y1(1)) CALL addpnt(x1,y1,kdata,n, 0.,y1(1)) @@ -23182,16 +23152,16 @@ c n = 1705 * pressure-dependence parameters - OPEN(UNIT=kin,FILE='DATAJ1/CH3CHO/CH3CHO_press.yld', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3CHO/CH3CHO_press.yld', $ STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 5 DO i = 1, n - READ(kin,*) x1(i), dum, dum, y1(i) + READ(UNIT=ilu,FMT=*) x1(i), dum, dum, y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23298,11 +23268,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -23411,17 +23380,17 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/C2H5CHO/C2H5CHO_iup.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/C2H5CHO/C2H5CHO_iup.abs', $ STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 106 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23438,13 +23407,13 @@ c INCLUDE 'params' * cross section from KFA tables * c2h5cho.001 - Calvert and Pitts 1966 - OPEN(UNIT=kin,FILE='DATAJ2/KFA/c2h5cho.001',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/c2h5cho.001',STATUS='old') n = 83 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23462,16 +23431,16 @@ c INCLUDE 'params' IF (myld .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/C2H5CHO/C2H5CHO_iup.yld', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/C2H5CHO/C2H5CHO_iup.yld', $ STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 5 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -23556,11 +23525,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -23704,17 +23672,17 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CHOCHO/CHOCHO_iup.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CHOCHO/CHOCHO_iup.abs', $ STATUS='old') DO i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) ENDDO n = 110 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) @@ -23733,13 +23701,13 @@ c INCLUDE 'params' * cross section from KFA tables * chocho.001 - Plum et al. 1983 - OPEN(UNIT=kin,FILE='DATAJ2/KFA/chocho.001',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/chocho.001',STATUS='old') n = 219 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23757,17 +23725,17 @@ c INCLUDE 'params' * Orlando, J. J.; G. S. Tyndall, 2001: The atmospheric chemistry of the * HC(O)CO radical. Int. J. Chem. Kinet., 33, 149-156. - OPEN(UNIT=kin, + OPEN(NEWUNIT=ilu, $ FILE='DATAJ1/CHOCHO/glyoxal_orl.abs',STATUS='old') do i = 1, 6 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 481 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23781,18 +23749,18 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 4) THEN - OPEN(UNIT=kin, + OPEN(NEWUNIT=ilu, $ FILE='DATAJ1/CHOCHO/glyoxal_horowitz.abs',STATUS='old') DO i = 1, 8 - read(kin,*) + read(UNIT=ilu,FMT=*) ENDDO n = 270 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23806,18 +23774,18 @@ c INCLUDE 'params' ELSEIF(mabs .eq. 5) then - open(unit=kin, + open(newunit=ilu, $ FILE='DATAJ1/CHOCHO/glyoxal_jpl11.abs',STATUS='old') DO i = 1, 2 - read(kin,*) + read(UNIT=ilu,FMT=*) ENDDO n = 277 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -23835,17 +23803,17 @@ c INCLUDE 'params' IF(myld .eq. 2) then - open(unit=kin, + open(newunit=ilu, $ FILE='DATAJ1/CHOCHO/glyoxal_jpl11.qy',STATUS='old') DO i = 1, 3 - read(kin,*) + read(UNIT=ilu,FMT=*) ENDDO n = 40 DO i = 1, n - READ(kin,*) x(i), dum, y1(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x(i), dum, y1(i), y2(i), y3(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n do i = 1, n @@ -23989,11 +23957,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -24123,17 +24090,17 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCHO/CH3COCHO_iup1.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCHO/CH3COCHO_iup1.abs', $ STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 38 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24145,17 +24112,17 @@ c INCLUDE 'params' STOP ENDIF - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCHO/CH3COCHO_iup2.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCHO/CH3COCHO_iup2.abs', $ STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 75 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24177,13 +24144,13 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCHO/CH3COCHO_ncar.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCHO/CH3COCHO_ncar.abs', $ STATUS='old') n = 271 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24204,23 +24171,27 @@ c INCLUDE 'params' * ch3cocho.004 - Staffelbach et al. 1995 IF(mabs .EQ. 3) THEN - OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cocho.001',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cocho.001', + & STATUS='old') n = 136 ELSEIF(mabs .EQ. 4) THEN - OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cocho.002',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cocho.002', + & STATUS='old') n = 8251 ELSEIF(mabs .EQ. 5) THEN - OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cocho.003',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cocho.003', + & STATUS='old') n = 275 ELSEIF(mabs .EQ. 6) THEN - OPEN(UNIT=kin,FILE='DATAJ2/KFA/ch3cocho.004',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ2/KFA/ch3cocho.004', + & STATUS='old') n = 162 ENDIF DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24234,17 +24205,17 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 7) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCOCH3/biacetyl_plum.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCOCH3/biacetyl_plum.abs', $ STATUS='old') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 55 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -24257,16 +24228,16 @@ c INCLUDE 'params' ENDIF - OPEN(UNIT=kin, + OPEN(NEWUNIT=ilu, $ FILE='DATAJ1/CHOCHO/glyoxal_orl.abs',STATUS='old') do i = 1, 6 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 481 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24284,17 +24255,17 @@ c INCLUDE 'params' ELSEIF(mabs .eq. 8) then - OPEN(UNIT=kin, + OPEN(NEWUNIT=ilu, $ FILE='DATAJ1/CH3COCHO/CH3COCHO_jpl11.abs',STATUS='old') do i = 1, 2 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 294 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24311,17 +24282,17 @@ c INCLUDE 'params' * quantum yields IF(myld .EQ. 4) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCHO/CH3COCHO_km.yld', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCHO/CH3COCHO_km.yld', $ STATUS='old') DO i = 1, 5 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 5 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n n2 = n @@ -24468,11 +24439,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -24593,17 +24563,17 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCH3/CH3COCH3_cp.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCH3/CH3COCH3_cp.abs', $ STATUS='old') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 35 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 3.82E-21 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24617,17 +24587,17 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCH3/CH3COCH3_iup.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCH3/CH3COCH3_iup.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 96 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24641,18 +24611,18 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 3) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCH3/CH3COCH3_noaa.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCH3/CH3COCH3_noaa.abs', $ STATUS='old') DO i = 1, 12 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 135 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i) x2(i) = x1(i) x3(i) = x1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n n2 = n n3 = n @@ -24689,14 +24659,14 @@ c INCLUDE 'params' ENDIF ELSEIF(mabs.eq.4) then - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCH3/CH3COCH3_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCH3/CH3COCH3_jpl11.abs', $ STATUS='old') DO i = 1, 5 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 135 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i), y3(i), y4(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i), y4(i) x2(i) = x1(i) x3(i) = x1(i) x4(i) = x1(i) @@ -24705,7 +24675,7 @@ c INCLUDE 'params' y3(i) = y3(i) / 1.e5 y4(i) = y4(i) / 1.e8 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n n2 = n n3 = n @@ -24755,16 +24725,16 @@ c INCLUDE 'params' IF (myld .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCH3/CH3COCH3_iup.yld', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCH3/CH3COCH3_iup.yld', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 9 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -24890,11 +24860,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -24998,23 +24967,23 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN -c OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_jpl85.abs', +c OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_jpl85.abs', c $ STATUS='old') -c OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_jpl92.abs', +c OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_jpl92.abs', c $ STATUS='old') -c OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_jpl94.abs', +c OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_jpl94.abs', c $ STATUS='old') - OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_jpl94.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_jpl94.abs', $ STATUS='old') - READ(kin,*) idum, n + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25028,17 +24997,17 @@ c $ STATUS='old') ELSEIF (mabs .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_iup.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_iup.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 32 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25052,16 +25021,16 @@ c $ STATUS='old') ELSEIF (mabs .EQ. 3) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_ct.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_ct.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 12 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25075,16 +25044,16 @@ c $ STATUS='old') ELSEIF (mabs .EQ. 4) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_ma.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_ma.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 15 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25098,17 +25067,17 @@ c $ STATUS='old') ELSEIF (mabs .EQ. 5) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3OOH/CH3OOH_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3OOH/CH3OOH_jpl11.abs', $ STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 40 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25185,11 +25154,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -25296,15 +25264,16 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_cp.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_cp.abs', + & STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 15 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -25321,17 +25290,18 @@ c INCLUDE 'params' * sigma(T,lambda) = sigma(298,lambda) * exp(B * (T-298)) - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_tal.abs',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_tal.abs', + & STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 55 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n n2 = n @@ -25357,17 +25327,17 @@ c INCLUDE 'params' ELSEIF (mabs .EQ. 3) THEN - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_iup1.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_iup1.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 13 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i)*1e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -25384,19 +25354,19 @@ c INCLUDE 'params' * sigma(T,lambda) = sigma(298,lambda) * 10**(B * T) - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_iup2.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_iup2.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 7 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) y1(i) = y1(i) * 1.e-21 y2(i) = y2(i) * 1.e-3 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n n2 = n @@ -25422,16 +25392,16 @@ c INCLUDE 'params' ELSEIF (mabs .EQ. 5) THEN - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_tay.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_tay.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 13 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -25457,16 +25427,16 @@ c INCLUDE 'params' ELSEIF (mabs .EQ. 7) THEN - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_rat.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_rat.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 24 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -25481,16 +25451,16 @@ c INCLUDE 'params' ELSEIF (mabs .EQ. 8) THEN - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_lib.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_lib.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 1638 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -25505,19 +25475,19 @@ c INCLUDE 'params' ELSEIF (mabs. eq. 9) THEN - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/CH3ONO2_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/CH3ONO2_jpl11.abs', $ STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 65 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) y1(i) = y1(i) * 1.e-20 x2(i) = x1(i) y2(i) = y2(i) * 1.e-3 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -25604,11 +25574,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -25702,16 +25671,16 @@ c INCLUDE 'params' * cross section from Senum et al., 1984, J.Phys.Chem. 88/7, 1269-1270 -C OPEN(UNIT=kin,FILE='DATAJ1/RONO2/PAN_senum.abs',STATUS='OLD') +C OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/PAN_senum.abs',STATUS='OLD') C DO i = 1, 14 -C READ(kin,*) +C READ(UNIT=ilu,FMT=*) C ENDDO C n = 21 C DO i = 1, n -C READ(kin,*) x1(i), y1(i) +C READ(UNIT=ilu,FMT=*) x1(i), y1(i) C y1(i) = y1(i) * 1.E-20 C ENDDO -C CLOSE(kin) +C CLOSE(UNIT=ilu) C CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) C CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25726,19 +25695,20 @@ C ENDIF * cross section from * Talukdar et al., 1995, J.Geophys.Res. 100/D7, 14163-14174 - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/PAN_talukdar.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/PAN_talukdar.abs', + & STATUS='old') DO i = 1, 14 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 78 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) y1(i) = y1(i) * 1.E-20 y2(i) = y2(i) * 1E-3 x2(i) = x1(i) ENDDO n2 = n - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25819,11 +25789,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -25912,16 +25881,16 @@ c INCLUDE 'params' *** cross sections from JPL94 recommendation - OPEN(kin,FILE='DATAJ1/ABS/CCl2O_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CCl2O_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -25982,11 +25951,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -26086,16 +26054,16 @@ c INCLUDE 'params' IF(mabs .EQ. 1) THEN - OPEN(kin,FILE='DATAJ1/ABS/CCl4_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CCl4_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -26110,16 +26078,16 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 2) THEN - OPEN(kin,FILE='DATAJ1/ABS/CCl4_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CCl4_jpl11.abs',STATUS='OLD') DO i = 1, 5 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 44 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -26215,11 +26183,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -26309,16 +26276,16 @@ c INCLUDE 'params' *** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CClFO_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CClFO_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -26379,11 +26346,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -26473,16 +26439,16 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CF2O_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CF2O_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -26544,11 +26510,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -26641,18 +26606,18 @@ c INCLUDE 'params' *** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CFC-113_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CFC-113_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) y1(i) = y1(i) * 1E-20 y2(i) = y2(i) * 1E-20 x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -26737,11 +26702,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -26834,18 +26798,18 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CFC-114_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CFC-114_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) y1(i) = y1(i) * 1E-20 y2(i) = y2(i) * 1E-20 x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -26929,11 +26893,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -27023,16 +26986,16 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CFC-115_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CFC-115_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -27095,11 +27058,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -27190,16 +27152,16 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CFC-11_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CFC-11_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) ** sigma @ 298 K @@ -27265,11 +27227,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -27360,16 +27321,16 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CFC-12_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CFC-12_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) ** sigma @ 298 K @@ -27435,11 +27396,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -27528,16 +27488,16 @@ c INCLUDE 'params' j = j+1 jlabel(j) = 'CH3Br -> Products' - OPEN(kin,FILE='DATAJ1/ABS/CH3Br_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CH3Br_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -27601,11 +27561,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -27698,20 +27657,20 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CH3CCl3_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CH3CCl3_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i) y1(i) = y1(i) * 1E-20 y2(i) = y2(i) * 1E-20 y3(i) = y3(i) * 1E-20 x2(i) = x1(i) x3(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -27818,11 +27777,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -27915,20 +27873,20 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/CH3Cl_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CH3Cl_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i) y1(i) = y1(i) * 1E-20 y2(i) = y2(i) * 1E-20 y3(i) = y3(i) * 1E-20 x2(i) = x1(i) x3(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -28034,11 +27992,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -28129,16 +28086,16 @@ C INTEGER n1, n2, n3, n4, n5 **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/ClOO_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ClOO_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -28201,11 +28158,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -28290,16 +28246,16 @@ c INCLUDE 'params' **** cross sections from JPL94 recommendation -C OPEN(kin,FILE='DATAJ1/ABS/HCFC-123_jpl94.abs',STATUS='OLD') -C READ(kin,*) idum, n +C OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFC-123_jpl94.abs',STATUS='OLD') +C READ(UNIT=ilu,FMT=*) idum, n C DO i = 1, idum-2 -C READ(kin,*) +C READ(UNIT=ilu,FMT=*) C ENDDO C DO i = 1, n -C READ(kin,*) x1(i), y1(i) +C READ(UNIT=ilu,FMT=*) x1(i), y1(i) C y1(i) = y1(i) * 1E-20 C ENDDO -C CLOSE(kin) +C CLOSE(UNIT=ilu) C CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) C CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -28325,18 +28281,18 @@ C ENDDO **** cross section from Orlando et al., 1991 - OPEN(kin,FILE='DATAJ1/ABS/HCFCs_orl.abs',STATUS='OLD') - READ(kin,*) idum + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFCs_orl.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO - READ(kin,100) inline + READ(UNIT=ilu,FMT=100) inline 100 FORMAT(A120) READ(inline(6:),*) TBar,i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - CLOSE(kin) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + CLOSE(UNIT=ilu) LBar = 206.214 @@ -28408,11 +28364,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -28499,16 +28454,16 @@ c INCLUDE 'params' **** cross sections from JPL94 recommendation -C OPEN(kin,FILE='DATAJ1/ABS/HCFC-124_jpl94.abs',STATUS='OLD') -C READ(kin,*) idum, n +C OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFC-124_jpl94.abs',STATUS='OLD') +C READ(UNIT=ilu,FMT=*) idum, n C DO i = 1, idum-2 -C READ(kin,*) +C READ(UNIT=ilu,FMT=*) C ENDDO C DO i = 1, n -C READ(kin,*) x1(i), y1(i) +C READ(UNIT=ilu,FMT=*) x1(i), y1(i) C y1(i) = y1(i) * 1E-20 C ENDDO -C CLOSE(kin) +C CLOSE(UNIT=ilu) C CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) C CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -28533,19 +28488,19 @@ C ENDDO **** cross section from Orlando et al., 1991 - OPEN(kin,FILE='DATAJ1/ABS/HCFCs_orl.abs',STATUS='OLD') - READ(kin,*) idum + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFCs_orl.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum idum = idum+5 DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO - READ(kin,100) inline + READ(UNIT=ilu,FMT=100) inline 100 FORMAT(A120) READ(inline(6:),*) TBar,i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - CLOSE(kin) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + CLOSE(UNIT=ilu) LBar = 206.214 @@ -28613,11 +28568,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -28707,16 +28661,17 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/HCFC-141b_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFC-141b_jpl94.abs', + & STATUS='old') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -28781,11 +28736,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -28871,16 +28825,16 @@ c INCLUDE 'params' **** cross sections from JPL94 recommendation -C OPEN(kin,FILE='DATAJ1/ABS/HCFC-142b_jpl94.abs',STATUS='OLD') -C READ(kin,*) idum, n +C OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFC-142b_jpl94.abs',STATUS='OLD') +C READ(UNIT=ilu,FMT=*) idum, n C DO i = 1, idum-2 -C READ(kin,*) +C READ(UNIT=ilu,FMT=*) C ENDDO C DO i = 1, n -C READ(kin,*) x1(i), y1(i) +C READ(UNIT=ilu,FMT=*) x1(i), y1(i) C y1(i) = y1(i) * 1E-20 C ENDDO -C CLOSE(kin) +C CLOSE(UNIT=ilu) C CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) C CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -28905,19 +28859,19 @@ C ENDDO **** cross section from Orlando et al., 1991 - OPEN(kin,FILE='DATAJ1/ABS/HCFCs_orl.abs',STATUS='OLD') - READ(kin,*) idum + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFCs_orl.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum idum = idum+10 DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO - READ(kin,100) inline + READ(UNIT=ilu,FMT=100) inline 100 FORMAT(A80) READ(inline(6:),*) TBar,i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - READ(kin,*) i,(coeff(i,k),k=1,3) - CLOSE(kin) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + READ(UNIT=ilu,FMT=*) i,(coeff(i,k),k=1,3) + CLOSE(UNIT=ilu) LBar = 206.214 @@ -28995,11 +28949,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -29089,16 +29042,17 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/HCFC-225ca_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFC-225ca_jpl94.abs', + & STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -29162,11 +29116,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -29256,16 +29209,17 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/HCFC-225cb_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFC-225cb_jpl94.abs', + & STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -29329,11 +29283,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -29426,13 +29379,13 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/HCFC-22_jpl94.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCFC-22_jpl94.abs',STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i), y3(i), y4(i), y5(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i), y4(i), y5(i) y1(i) = y1(i) * 1E-20 y2(i) = y2(i) * 1E-20 y3(i) = y3(i) * 1E-20 @@ -29443,7 +29396,7 @@ c INCLUDE 'params' x4(i) = x1(i) x5(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n n2 = n @@ -29590,11 +29543,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -29684,16 +29636,16 @@ c INCLUDE 'params' **** cross sections from JPL11 recommendation - OPEN(kin,FILE='DATAJ1/ABS/HO2_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HO2_jpl11.abs',STATUS='OLD') DO i = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 15 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -29765,11 +29717,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -29859,16 +29810,17 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/Halon-1202_jpl97.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Halon-1202_jpl97.abs', + & STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -29932,11 +29884,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -30026,16 +29977,17 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/Halon-1211_jpl97.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Halon-1211_jpl97.abs', + & STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -30099,11 +30051,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -30193,16 +30144,17 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/Halon-1301_jpl97.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Halon-1301_jpl97.abs', + & STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -30266,11 +30218,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -30361,16 +30312,17 @@ c INCLUDE 'params' **** cross sections from JPL97 recommendation (identical to 94 recommendation) - OPEN(kin,FILE='DATAJ1/ABS/Halon-2402_jpl97.abs',STATUS='OLD') - READ(kin,*) idum, n + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Halon-2402_jpl97.abs', + & STATUS='OLD') + READ(UNIT=ilu,FMT=*) idum, n DO i = 1, idum-2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -30434,11 +30386,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -30596,11 +30547,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -30694,15 +30644,15 @@ c INCLUDE 'params' *** cross sections from JPL97 recommendation. Same in JPL-2011. - OPEN(kin,FILE='DATAJ1/ABS/ClONO2_jpl97.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ClONO2_jpl97.abs',STATUS='OLD') n = 119 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i), y3(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i), y3(i) y1(i) = y1(i) * 1E-20 x2(i) = x1(i) x3(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -30804,11 +30754,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -30901,16 +30850,16 @@ c INCLUDE 'params' *** cross sections from JPL03 recommendation - OPEN(kin,FILE='DATAJ1/ABS/BrONO2_jpl03.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/BrONO2_jpl03.abs',STATUS='OLD') DO i = 1, 13 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 61 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -30976,11 +30925,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -31080,16 +31028,16 @@ c INCLUDE 'params' *** cross sections from JPL97 recommendation (as tab by Finlayson-Pitts * and Pitts, 1999. - OPEN(kin,FILE='DATAJ1/ABS/CL2_fpp.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CL2_fpp.abs',STATUS='OLD') do i = 1, 5 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 22 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -31178,11 +31126,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -31284,16 +31231,16 @@ c INCLUDE 'params' *= The Atmospheric Chemistry of Glycolaldehyde, C. Bacher, G. S. Tyndall =* *= and J. J. Orlando, J. Atmos. Chem., 39 (2001) 171-189. =* - OPEN(UNIT=kin,FILE='DATAJ1/CH2OHCHO/glycolaldehyde.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2OHCHO/glycolaldehyde.abs', $ STATUS='old') DO i = 1, 15 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 131 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -31307,17 +31254,18 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH2OHCHO/glycolaldehyde_jpl11.abs', + OPEN(NEWUNIT=ilu, + $ FILE='DATAJ1/CH2OHCHO/glycolaldehyde_jpl11.abs', $ STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 63 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -31392,11 +31340,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -31492,17 +31439,17 @@ c INCLUDE 'params' jlabel(j) = 'CH3COCOCH3 -> Products' IF( mabs. EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCOCH3/biacetyl_plum.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCOCH3/biacetyl_plum.abs', $ STATUS='old') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 55 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -31515,17 +31462,18 @@ c INCLUDE 'params' ENDIF ELSEIF(mabs. EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCOCH3/biacetyl_horowitz.abs', + OPEN(NEWUNIT=ilu, + $ FILE='DATAJ1/CH3COCOCH3/biacetyl_horowitz.abs', $ STATUS='old') DO i = 1, 8 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 287 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -31597,11 +31545,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -31697,16 +31644,16 @@ c INCLUDE 'params' IF(mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/ABS/MVK_schneider.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/MVK_schneider.abs', $ STATUS='old') DO i = 1, 9 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 19682 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -31720,17 +31667,17 @@ c INCLUDE 'params' ELSEIF(mabs .EQ. 2) THEN - OPEN(UNIT=kin,FILE='DATAJ1/ABS/MVK_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/MVK_jpl11.abs', $ STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 146 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -31801,11 +31748,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -31898,17 +31844,17 @@ c INCLUDE 'params' * cross section from * JPL 2006 (originally from Gierczak et al.) - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Methacrolein_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Methacrolein_jpl11.abs', $ STATUS='OLD') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 146 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -31977,11 +31923,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -32075,17 +32020,17 @@ c INCLUDE 'params' IF (mabs .EQ. 1) THEN - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCOOH/pyruvic_horowitz.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCOOH/pyruvic_horowitz.abs', $ STATUS='old') DO i = 1, 8 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 148 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -32099,17 +32044,17 @@ c INCLUDE 'params' ELSEIF (mabs .eq. 2) then - OPEN(UNIT=kin,FILE='DATAJ1/CH3COCOOH/pyruvic_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH3COCOOH/pyruvic_jpl11.abs', $ STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 139 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -32179,11 +32124,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -32272,22 +32216,22 @@ c INCLUDE 'params' j = j+1 jlabel(j) = 'CH3CH2ONO2 -> CH3CH2O + NO2' - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/RONO2_talukdar.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/RONO2_talukdar.abs', $ STATUS='old') DO i = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n1 = 0 n2 = 0 DO i = 1, 63 - READ(kin,*) x1(i), dum, dum, y1(i), y2(i), dum, dum + READ(UNIT=ilu,FMT=*) x1(i), dum, dum, y1(i), y2(i), dum, dum if (y1(i) .gt. 0.) n1 = n1 + 1 if (y2(i) .gt. 0.) n2 = n2 + 1 x2(i) = x1(i) y1(i) = y1(i) * 1.e-20 y2(i) = y2(i) * 1.e-3 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n1, 0.,0.) @@ -32364,11 +32308,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -32457,22 +32400,22 @@ c INCLUDE 'params' j = j+1 jlabel(j) = 'CH3CHONO2CH3 -> CH3CHOCH3 + NO2' - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/RONO2_talukdar.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/RONO2_talukdar.abs', $ STATUS='old') DO i = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n1 = 0 n2 = 0 DO i = 1, 63 - READ(kin,*) x1(i), dum, dum, dum, dum, y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), dum, dum, dum, dum, y1(i), y2(i) if (y1(i) .gt. 0.) n1 = n1 + 1 if (y2(i) .gt. 0.) n2 = n2 + 1 x2(i) = x1(i) y1(i) = y1(i) * 1.e-20 y2(i) = y2(i) * 1.e-3 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n1, 0.,0.) @@ -32548,11 +32491,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -32697,11 +32639,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -32846,11 +32787,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -32993,11 +32933,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -33085,17 +33024,17 @@ c INCLUDE 'params' j = j+1 jlabel(j) = 'ClOOCl -> Cl + ClOO' - OPEN(UNIT=kin,FILE='DATAJ1/ABS/CLOOCL_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CLOOCL_jpl11.abs', $ STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 111 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -33161,11 +33100,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -33261,16 +33199,16 @@ c INCLUDE 'params' mabs = 2 if (mabs.eq.1) then - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Hydroxyacetone.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Hydroxyacetone.abs', $ STATUS='old') DO i = 1, 8 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 101 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -33283,17 +33221,17 @@ c INCLUDE 'params' ENDIF ELSEIF(mabs .eq. 2) then - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Hydroxyacetone_jpl11.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Hydroxyacetone_jpl11.abs', $ STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 96 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -33360,11 +33298,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -33497,11 +33434,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -33581,19 +33517,19 @@ c INCLUDE 'params' j = j+1 jlabel(j) = 'BrO -> Br + O' - OPEN(UNIT=kin,FILE='DATAJ1/ABS/BrO.jpl03', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/BrO.jpl03', $ STATUS='old') DO i = 1, 14 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 15 DO i = 1, n - READ(kin,*) x(i), dum, y(i) + READ(UNIT=ilu,FMT=*) x(i), dum, y(i) y(i) = y(i) * 1.e-20 ENDDO n = n + 1 x(n) = dum - CLOSE(kin) + CLOSE(UNIT=ilu) * use bin-to-bin interpolation @@ -33644,11 +33580,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -33734,17 +33669,17 @@ c INCLUDE 'params' * bromine, bromine chloride, iodine chloride, and iodine bromide, J. Phys. * Chem. 68, p. 2263 (1964). - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Br2.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Br2.abs', $ STATUS='old') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 29 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -33794,11 +33729,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -33898,20 +33832,20 @@ c INCLUDE 'params' if (mabs .eq. 1) then *** NO3-(aq) cross sections from Burley & Johnston (header lines = 24, * data lines = 19) - OPEN(kin,FILE='DATAJ1/ABS/NO3-_BJ92.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/NO3-_BJ92.abs',STATUS='OLD') n = 24 DO i = 1, n - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 19 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) y1(i)=y1(i)*1e-20 y2(i)=y2(i)*1e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n1, 0.,0.) @@ -33939,16 +33873,17 @@ c INCLUDE 'params' *** NO3-(aq) cross sections from Chu and Anastasio 2003: * convert from molar abs log10 to cm2 per molec - OPEN(kin,FILE='DATAJ1/ABS/NO3-_CA03.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/NO3-_CA03.abs',STATUS='OLD') n = 7 do i = 1, n - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 43 DO i = 1, n - read(kin,*) x1(i), y1(i), dum, dum, dum, dum + read(UNIT=ilu,FMT=*) x1(i), y1(i), dum, dum, dum, dum y1(i) = y1(i) * 3.82e-21 enddo + CLOSE(UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n1, 0.,0.) @@ -34022,11 +33957,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -34114,17 +34048,17 @@ c INCLUDE 'params' jlabel(j) = 'CH3COCH2CH3 -> CH3CO + CH2CH3' - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Martinez.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Martinez.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 96 DO i = 1, n - READ(kin,*) x(i), dum, y(i), dum, dum + READ(UNIT=ilu,FMT=*) x(i), dum, y(i), dum, dum y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -34194,11 +34128,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -34294,19 +34227,19 @@ c INCLUDE 'params' * cross section from * JPL 2011 (originally from Harwood et al. 2003) - OPEN(UNIT=kin,FILE='DATAJ1/ABS/PPN_Harwood.txt',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/PPN_Harwood.txt',STATUS='OLD') DO i = 1, 10 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 66 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) y1(i) = y1(i) * 1.E-20 y2(i) = y2(i) * 1E-3 x2(i) = x1(i) ENDDO n2 = n - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -34387,11 +34320,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -34484,16 +34416,16 @@ c INCLUDE 'params' * cross section from * JPL 2006 (originally from Bauerle and Moortgat 1999) - OPEN(UNIT=kin,FILE='DATAJ1/ABS/HOCH2OOH.txt',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HOCH2OOH.txt',STATUS='OLD') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 32 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -34560,11 +34492,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -34657,16 +34588,16 @@ c INCLUDE 'params' * cross section from * JPL 2006 (originally from Magneron et al.) - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Acrolein.txt',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Acrolein.txt',STATUS='OLD') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 55 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -34739,11 +34670,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -34836,16 +34766,17 @@ c INCLUDE 'params' * cross section from * JPL 2006 (originally from Orlando and Tyndall 2003) - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Peracetic_acid.txt',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Peracetic_acid.txt', + & STATUS='OLD') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 66 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -34910,11 +34841,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -35005,16 +34935,16 @@ c INCLUDE 'params' * cross section from * Lindley (1978, PhD Thesis Ohio State U., Jack Calvert advisor), cited by Calvert et al. (2009). - OPEN(UNIT=kin,FILE='DATAJ1/ABS/dmna.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/dmna.abs',STATUS='OLD') DO i = 1, 5 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 132 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-19 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -35077,11 +35007,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -35183,16 +35112,16 @@ c INCLUDE 'params' * their web site on 15 Septmeber 2009. - OPEN(UNIT=kin,FILE='DATAJ1/ABS/ClO_spectrum.prn',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ClO_spectrum.prn',STATUS='OLD') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO nn = 453 DO ii = 1, nn i = nn - ii + 1 - READ(kin,*) xdum, x(i), xdum, (y(i,m), m = 1, 12) + READ(UNIT=ilu,FMT=*) xdum, x(i), xdum, (y(i,m), m = 1, 12) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) DO m = 1, 12 tmp(m) = 190. + 10.*FLOAT(m-1) @@ -35292,11 +35221,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -35392,16 +35320,16 @@ c INCLUDE 'params' mabs = 1 if(mabs.eq.1) then - OPEN(UNIT=kin,FILE='DATAJ1/ABS/ClNO2.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ClNO2.abs',STATUS='OLD') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 26 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -35415,15 +35343,16 @@ c INCLUDE 'params' elseif (mabs .eq. 2) then - OPEN(UNIT=kin,FILE='DATAJ1/ABS/ClNO2_iupac.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ClNO2_iupac.abs', + & STATUS='OLD') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 17 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -35488,11 +35417,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -35583,15 +35511,15 @@ c INCLUDE 'params' * cross section from * JPL 2006 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/BrNO.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/BrNO.abs',STATUS='OLD') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 27 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -35655,11 +35583,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -35750,15 +35677,15 @@ c INCLUDE 'params' * cross section from * IUPAC (vol III) 2007 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/BrNO2.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/BrNO2.abs',STATUS='OLD') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 54 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -35822,11 +35749,10 @@ C INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -35919,15 +35845,15 @@ C INCLUDE 'params' * cross section from * IUPAC (vol III) 2007 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/BrONO.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/BrONO.abs',STATUS='OLD') DO i = 1, 8 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 32 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -35992,11 +35918,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -36087,15 +36012,15 @@ c INCLUDE 'params' * cross section from * IUPAC (vol III) 2007 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/HOCl.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HOCl.abs',STATUS='OLD') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 111 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -36157,11 +36082,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -36257,13 +36181,13 @@ c INCLUDE 'params' * cross section from * IUPAC (vol III) 2007 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/NOCl.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/NOCl.abs',STATUS='OLD') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 80 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y223(i) = y1(i) y243(i) = y1(i) y263(i) = y1(i) @@ -36279,11 +36203,11 @@ c INCLUDE 'params' x343(i) = x1(i) ENDDO - READ(kin,*) + READ(UNIT=ilu,FMT=*) n = 61 do i = 1, n ii = i + 80 - read(kin,*) x1(ii), y223(ii), y243(ii), y263(ii), + read(UNIT=ilu,FMT=*) x1(ii), y223(ii), y243(ii), y263(ii), $ y298(ii), y323(ii), y343(ii) x223(ii) = x1(ii) @@ -36295,7 +36219,7 @@ c INCLUDE 'params' enddo n = ii - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x223,y223,kdata,nn,x223(1)*(1.-deltax),0.) @@ -36441,11 +36365,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -36541,28 +36464,28 @@ c INCLUDE 'params' *Supplementary Data, as quoted at: *http://www.atmosphere.mpg.de/enid/26b4b5172008b02407b2e47f08de2fa1,0/Spectra/Introduction_1rr.html - OPEN(UNIT=kin,FILE='DATAJ1/ABS/OClO.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/OClO.abs',STATUS='OLD') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n204 = 1074-6 DO i = 1, n204 - READ(kin,*) x204(i), y204(i) + READ(UNIT=ilu,FMT=*) x204(i), y204(i) ENDDO - READ(kin,*) + READ(UNIT=ilu,FMT=*) n296 = 1067 do i = 1, n296 - read(kin,*) x296(i), y296(i) + read(UNIT=ilu,FMT=*) x296(i), y296(i) enddo - read(kin,*) + read(UNIT=ilu,FMT=*) n378 = 1068 do i = 1, n378 - read(kin,*) x378(i), y378(i) + read(UNIT=ilu,FMT=*) x378(i), y378(i) enddo - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n204 CALL addpnt(x204,y204,kdata,nn,x204(1)*(1.-deltax),0.) @@ -36665,11 +36588,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -36762,15 +36684,15 @@ c INCLUDE 'params' * absorption spectra of Br2 and BrCl," J. Photochem. Photobiol. A: Chem. * 83, 179-192 (1994). - OPEN(UNIT=kin,FILE='DATAJ1/ABS/BrCl.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/BrCl.abs',STATUS='OLD') DO i = 1, 9 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 81 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -36838,11 +36760,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -36935,15 +36856,15 @@ c INCLUDE 'params' *= of the equilibrium CH3O2 + NO2 « CH3O2NO2," Chemical Physics Letters *= 191, 259-263 (1992). - OPEN(UNIT=kin,FILE='DATAJ1/ABS/CH3OONO2.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CH3OONO2.abs',STATUS='OLD') DO i = 1, 9 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 26 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -37010,11 +36931,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -37106,15 +37026,16 @@ c INCLUDE 'params' *= V. McMillan, 1966, private communication to J.G. Calvert, J.N.Pitts, Jr., *= Photochemistry, London, 1966, p. 455. - OPEN(UNIT=kin,FILE='DATAJ1/ABS/t-butyl-nitrite.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/t-butyl-nitrite.abs', + & STATUS='OLD') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 96 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -37179,11 +37100,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -37281,15 +37201,15 @@ c INCLUDE 'params' * L.T. Molina and M.J. Molina, "Ultraviolet absorption spectrum of chlorine nitrite, ClONO," * Geophys. Res. Lett. 4, 83-86 (1977). - OPEN(UNIT=kin,FILE='DATAJ1/ABS/ClONO_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ClONO_jpl11.abs',STATUS='OLD') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 34 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -37354,11 +37274,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -37448,16 +37367,16 @@ c INCLUDE 'params' * cross section from JPL2011 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/HCl_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/HCl_jpl11.abs',STATUS='OLD') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 31 DO i = 1, n - READ(kin,*) x(i), y(i), dum + READ(UNIT=ilu,FMT=*) x(i), y(i), dum y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -37523,11 +37442,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -37629,21 +37547,21 @@ c INCLUDE 'params' * read JPL2011 cross section data: - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_jpl11.abs' + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_jpl11.abs' $ ,STATUS='old') do i = 1, 4 - read(kin,*) + read(UNIT=ilu,FMT=*) enddo n = 150 n1 = n n2 = n DO i = 1, n - READ(kin,*) x1(i), y298(i), tcoef(i) + READ(UNIT=ilu,FMT=*) x1(i), y298(i), tcoef(i) x2(i) = x1(i) y298(i) = y298(i) * 1.e-20 tcoef(i) = tcoef(i) * 1.e-24 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) * terminate endpoints and interpolate to working grid @@ -37669,18 +37587,18 @@ c INCLUDE 'params' * quantum yields: Read, terminate, interpolate: - OPEN(UNIT=kin,FILE='DATAJ1/CH2O/CH2O_jpl11.yld',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/CH2O/CH2O_jpl11.yld',STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 112 n1 = n n2 = n DO i = 1, n - READ(kin,*) x1(i), qr(i), qm(i) + READ(UNIT=ilu,FMT=*) x1(i), qr(i), qm(i) x2(i) = x1(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,qr,kdata,n1,x1(1)*(1.-deltax),qr(1)) CALL addpnt(x1,qr,kdata,n1, 0.,qr(1)) @@ -37783,11 +37701,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -37877,16 +37794,16 @@ c INCLUDE 'params' * cross section from JPL2011 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/CH3COOH_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CH3COOH_jpl11.abs',STATUS='OLD') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 18 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -37951,11 +37868,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -38045,16 +37961,16 @@ c INCLUDE 'params' * cross section from JPL2011 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/CH3OCl_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CH3OCl_jpl11.abs',STATUS='OLD') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 83 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -38119,11 +38035,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -38214,16 +38129,16 @@ c INCLUDE 'params' j = j+1 jlabel(j) = 'CHCl3 -> Products' - OPEN(kin,FILE='DATAJ1/ABS/CHCl3_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/CHCl3_jpl11.abs',STATUS='OLD') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 39 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1E-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -38311,11 +38226,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -38410,19 +38324,19 @@ c INCLUDE 'params' * mabs: absorption cross section options: * 1: IUPAC 2006 - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/C2H5ONO2_iup2006.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/C2H5ONO2_iup2006.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 32 DO i = 1, n - READ(kin,*) x1(i), y1(i), y2(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i), y2(i) x2(i) = x1(i) y1(i) = y1(i) * 1.e-20 y2(i) = y2(i) * 1.e-3 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -38503,11 +38417,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -38601,17 +38514,17 @@ c INCLUDE 'params' * 1: IUPAC 2006 - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/nC3H7ONO2_iup2006.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/nC3H7ONO2_iup2006.abs', $ STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 32 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -38676,11 +38589,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -38774,17 +38686,17 @@ c INCLUDE 'params' * 1: IUPAC 2006 - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/1C4H9ONO2_iup2006.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/1C4H9ONO2_iup2006.abs', $ STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 32 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -38849,11 +38761,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -38947,17 +38858,17 @@ c INCLUDE 'params' * 1: IUPAC 2006 - OPEN(UNIT=kin,FILE='DATAJ1/RONO2/2C4H9ONO2_iup2006.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/RONO2/2C4H9ONO2_iup2006.abs', $ STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 15 DO i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) y1(i) = y1(i) * 1.e-20 ENDDO - CLOSE (kin) + CLOSE (UNIT=ilu) n1 = n CALL addpnt(x1,y1,kdata,n1,x1(1)*(1.-deltax),0.) @@ -39020,11 +38931,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -39112,16 +39022,17 @@ c INCLUDE 'params' * cross section from JPL2011 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/PF-n-iodopropane.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/PF-n-iodopropane.abs', + & STATUS='old') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 16 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -39188,11 +39099,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -39280,16 +39190,16 @@ c INCLUDE 'params' * cross section from JPL2011 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/I2_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/I2_jpl11.abs',STATUS='OLD') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 104 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -39304,15 +39214,15 @@ c INCLUDE 'params' * quantum yields - OPEN(UNIT=kin,FILE='DATAJ1/YLD/I2.qy',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/YLD/I2.qy',STATUS='OLD') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 12 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),1.) @@ -39375,11 +39285,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -39467,16 +39376,16 @@ c INCLUDE 'params' * cross section from JPL2011 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/IO_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/IO_jpl11.abs',STATUS='OLD') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 133 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -39541,11 +39450,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -39633,16 +39541,16 @@ c INCLUDE 'params' * cross section from JPL2011 - OPEN(UNIT=kin,FILE='DATAJ1/ABS/IOH_jpl11.abs',STATUS='OLD') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/IOH_jpl11.abs',STATUS='OLD') DO i = 1, 2 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 101 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) nn = n CALL addpnt(x,y,kdata,nn,x(1)*(1.-deltax),0.) @@ -39712,11 +39620,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -39804,17 +39711,17 @@ c INCLUDE 'params' jlabel(j) = 'CH3COCH2CH2CH3 -> CH3CO + CH2CH2CH3' - OPEN(UNIT=kin,FILE='DATAJ1/ABS/Martinez.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/Martinez.abs', $ STATUS='old') DO i = 1, 4 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 96 DO i = 1, n - READ(kin,*) x(i), dum, dum, y(i), dum + READ(UNIT=ilu,FMT=*) x(i), dum, dum, y(i), dum y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -39886,11 +39793,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -39978,16 +39884,16 @@ c INCLUDE 'params' jlabel(j) = 'C6H5CHO -> HCO + HO2 + CO' - OPEN(UNIT=kin,FILE='DATAJ1/ABS/BENZALD.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/BENZALD.abs', $ STATUS='old') DO i = 1, 5 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 100 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -40058,11 +39964,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -40150,17 +40055,17 @@ c INCLUDE 'params' jlabel(j) = 'NO3-(aq) -> NO2(aq) + OH(aq)' - OPEN(UNIT=kin,FILE='DATAJ1/ABSAQ/NO3-aq.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABSAQ/NO3-aq.abs', $ STATUS='old') DO i = 1, 6 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 9 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-20 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -40237,11 +40142,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -40329,17 +40233,17 @@ c INCLUDE 'params' jlabel(j) = 'H2O2(aq) -> OH(aq) + OH(aq)' - OPEN(UNIT=kin,FILE='DATAJ1/ABSAQ/H2O2aq.abs', + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABSAQ/H2O2aq.abs', $ STATUS='old') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO n = 11 DO i = 1, n - READ(kin,*) x(i), y(i) + READ(UNIT=ilu,FMT=*) x(i), y(i) y(i) = y(i) * 1.e-23 ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) CALL addpnt(x,y,kdata,n,x(1)*(1.-deltax),0.) CALL addpnt(x,y,kdata,n, 0.,0.) @@ -40416,11 +40320,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -40661,11 +40564,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -40772,11 +40674,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -40996,11 +40897,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -41214,11 +41114,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -41362,11 +41261,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -41594,11 +41492,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -41670,20 +41567,20 @@ c INCLUDE 'params' * ice absorption cross sections from fil = 'DATA/ice' - OPEN(UNIT=kin,FILE='DATAJ1/ABS/ICE_Perov.acff',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ICE_Perov.acff',STATUS='old') m = 17 ! header lines n = 79 ! data lines - !OPEN(UNIT=kin,FILE='DATAJ1/ABS/ICE_min.acff',STATUS='old') + !OPEN(NEWUNIT=ilu,FILE='DATAJ1/ABS/ICE_min.acff',STATUS='old') !m = 13 ! header lines !n = 52 ! data lines DO 11, i = 1,m - read(kin,*) + read(UNIT=ilu,FMT=*) 11 CONTINUE DO 12, i = 1, n - READ(kin,*) x1(i), y1(i) + READ(UNIT=ilu,FMT=*) x1(i), y1(i) 12 CONTINUE - CLOSE (kin) + CLOSE (UNIT=ilu) CALL addpnt(x1,y1,kdata,n,x1(1)*(1.-deltax),0.) CALL addpnt(x1,y1,kdata,n, 0.,0.) @@ -41742,11 +41639,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -41997,11 +41893,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -42183,11 +42078,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -42321,11 +42215,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -42773,11 +42666,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -42877,17 +42769,17 @@ c INCLUDE 'params' WRITE(kout,*) 'air concentrations: USSA, 1976' - OPEN(kin,FILE='DATAE1/ATM/ussa.dens',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/ATM/ussa.dens',STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO nd = 1 4 CONTINUE - READ(kin,*,END=5) zd(nd), air(nd) + READ(UNIT=ilu,FMT=*,END=5) zd(nd), air(nd) nd = nd+1 GOTO 4 5 CONTINUE - CLOSE(kin) + CLOSE(UNIT=ilu) nd = nd-1 * add 1 meter to top, to avoid interpolation end-problem if z-grid is up to 120 km zd(nd) = zd(nd) + 0.001 @@ -42995,11 +42887,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -43104,15 +42995,15 @@ c INCLUDE 'params' * in this section (Section 1) should be replaced accordingly WRITE(kout,*) 'ozone profile: USSA, 1976' - OPEN(kin,FILE='DATAE1/ATM/ussa.ozone',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/ATM/ussa.ozone',STATUS='old') DO i = 1, 7 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO nd = 39 DO i = 1, nd - READ(kin,*) zd(i), xd(i) + READ(UNIT=ilu,FMT=*) zd(i), xd(i) ENDDO - CLOSE(kin) + CLOSE(UNIT=ilu) * Ussa data stop at 74 km. Add values up to 121 km, * assuming exponential decay from 74 km up, with scale height of @@ -43213,11 +43104,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw @@ -43284,17 +43174,17 @@ c INCLUDE 'params' WRITE(kout,*) 'air temperature: USSA, 1976' - OPEN(kin,FILE='DATAE1/ATM/ussa.temp',STATUS='old') + OPEN(NEWUNIT=ilu,FILE='DATAE1/ATM/ussa.temp',STATUS='old') DO i = 1, 3 - READ(kin,*) + READ(UNIT=ilu,FMT=*) ENDDO nd = 1 4 CONTINUE - READ(kin,*,END=5) zd(nd), td(nd) + READ(UNIT=ilu,FMT=*,END=5) zd(nd), td(nd) nd = nd+1 GOTO 4 5 CONTINUE - CLOSE(kin) + CLOSE(UNIT=ilu) nd = nd-1 * use constant temperature to infinity: @@ -43340,11 +43230,10 @@ c INCLUDE 'params' * BROADLY USED PARAMETERS: *_________________________________________________ * i/o file unit numbers - INTEGER kout, kin + INTEGER :: ilu + INTEGER kout * output * PARAMETER(kout=6) -* input - PARAMETER(kin=78) *_________________________________________________ * altitude, wavelength, time (or solar zenith angle) grids INTEGER kz, kw diff --git a/src/MNH/ch_init_diagnostics.f90 b/src/MNH/ch_init_diagnostics.f90 index 749d97478..9d7b72e9f 100644 --- a/src/MNH/ch_init_diagnostics.f90 +++ b/src/MNH/ch_init_diagnostics.f90 @@ -1,13 +1,8 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source$ $Revision$ -! MASDEV4_7 chimie 2006/05/18 13:07:25 -!----------------------------------------------------------------- !! ############################## SUBROUTINE CH_INIT_DIAGNOSTICS !! ############################## @@ -38,6 +33,7 @@ !! Original 14/05/95 !! 27/07/96 (K. Suhre) restructured !! 01/12/03 (Gazen) change Chemical scheme interface +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! EXTERNAL !! -------- @@ -82,11 +78,11 @@ ALLOCATE(IINDEX(2,NNONZEROTERMS)) ! --------------------- ! ! open the file +OPEN(NEWUNIT = NDIAGIO, & + FILE = CDIAGFILE, & + FORM = "FORMATTED", & + STATUS = "UNKNOWN" ) PRINT *, "CH_INIT_DIAGNOSTICS: opening unit ", NDIAGIO, " for file ", CDIAGFILE -OPEN(UNIT = NDIAGIO, & - FILE = CDIAGFILE, & - FORM = "FORMATTED", & - STATUS = "UNKNOWN" ) ! ! write the headder CALL DATE_AND_TIME(YDATE, YTIME) diff --git a/src/MNH/ch_init_model0d.f90 b/src/MNH/ch_init_model0d.f90 index 4801f7147..acf9882db 100644 --- a/src/MNH/ch_init_model0d.f90 +++ b/src/MNH/ch_init_model0d.f90 @@ -1,13 +1,8 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source$ $Revision$ -! MASDEV4_7 chimie 2006/12/21 15:21:50 -!----------------------------------------------------------------- !! ########################### MODULE MODI_CH_INIT_MODEL0D !! ########################### @@ -50,6 +45,7 @@ END MODULE MODI_CH_INIT_MODEL0D !! 19/03/96 (K. Suhre) insert namelists directly for compiler reasons !! 31/08/96 (K. SUHRE) read MODD_BLANK namelist !! 01/08/01 (C. Mari) change NAM_CH_SOLVER to $n +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! EXTERNAL !! -------- @@ -74,6 +70,9 @@ USE MODN_CH_SOLVER_n IMPLICIT NONE CHARACTER*(*), INTENT(IN) :: HNAMELISTFILE ! name of namelist input file + +INTEGER :: ILU ! unit number for IO + NAMELIST /NAM_CH_MODEL0D/ XTBEGIN, XTEND, XDTACT, & XDTOUT, XDTDIAG, & CRUNID, & @@ -107,10 +106,10 @@ CALL INIT_NAM_CH_SOLVERn PRINT *, 'CH_INIT_MODEL0D: opening namelist file: ', HNAMELISTFILE -OPEN(UNIT=NFILEIO,FILE=HNAMELISTFILE,STATUS="OLD",FORM="FORMATTED") -READ(NFILEIO,NAM_CH_MODEL0D) -READ(NFILEIO,NAM_CH_SOLVERn) -CLOSE(NFILEIO) +OPEN(NEWUNIT=ILU,FILE=HNAMELISTFILE,STATUS="OLD",FORM="FORMATTED") +READ(UNIT=ILU,NML=NAM_CH_MODEL0D) +READ(UNIT=ILU,NML=NAM_CH_SOLVERn) +CLOSE(UNIT=ILU) ! quick fix for use of the surface scheme in the box model CCHEM_INPUT_FILE = 'CHCONTROL1.nam' diff --git a/src/MNH/ch_init_output.f90 b/src/MNH/ch_init_output.f90 index 4abc6b91f..d6d4e7bc6 100644 --- a/src/MNH/ch_init_output.f90 +++ b/src/MNH/ch_init_output.f90 @@ -1,13 +1,8 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source$ $Revision$ -! MASDEV4_7 chimie 2006/05/18 13:07:25 -!----------------------------------------------------------------- !! ########################## MODULE MODI_CH_INIT_OUTPUT !! ########################## @@ -54,6 +49,7 @@ END MODULE MODI_CH_INIT_OUTPUT !! Original 25/04/95 !! 27/07/96 (K. Suhre) restructured !! 01/12/03 (D. Gazen) change Chemical scheme interface +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! EXTERNAL !! -------- @@ -88,11 +84,11 @@ INTEGER :: NAERO !* 1. OPEN OUTPUT FILE ! ---------------------- ! +OPEN(NEWUNIT = NRESULTIO, & + FILE = CRESULTFILE, & + FORM = "FORMATTED", & + STATUS = "UNKNOWN" ) PRINT *, "CH_INIT_OUTPUT: opening unit ", NRESULTIO, " for file ", CRESULTFILE -OPEN(UNIT = NRESULTIO, & - FILE = CRESULTFILE, & - FORM = "FORMATTED", & - STATUS = "UNKNOWN" ) ! !* 2. WRITE HEADDER ! ------------------ diff --git a/src/MNH/ch_make_lookup.f90 b/src/MNH/ch_make_lookup.f90 index cb6734208..dfc9b592c 100644 --- a/src/MNH/ch_make_lookup.f90 +++ b/src/MNH/ch_make_lookup.f90 @@ -1,13 +1,8 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1999-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source$ $Revision$ -! MASDEV4_7 chimie 2006/05/18 13:07:25 -!----------------------------------------------------------------- ! ###################### PROGRAM CH_MAKE_LOOKUP ! ###################### @@ -57,6 +52,7 @@ !! MODIFICATIONS !! ------------- !! Original 01/03/99 +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! EXTERNAL !! -------- @@ -92,6 +88,7 @@ CHARACTER*40, DIMENSION(NJOUT) :: JLABELOUT ! CHARACTER*120 :: HEADDER REAL :: UT +INTEGER :: ILU ! unit number for IO INTEGER :: I, J, K, NJIO CHARACTER*40 :: YFMT = '(2F11.2,5E11.4/99(7E11.4/))' ! @@ -122,11 +119,11 @@ DOBNEW = -1. ! ! read the namelist WRITE(*,*) "TRYING TO OPEN FILE LOOKUP1.nam ..." -OPEN(UNIT=42,FILE="LOOKUP1.nam",STATUS="OLD",FORM="FORMATTED", ERR=100) -READ(42,NAM_TUV) +OPEN(NEWUNIT=ILU,FILE="LOOKUP1.nam",STATUS="OLD",FORM="FORMATTED", ERR=100) +READ(UNIT=ILU,NML=NAM_TUV) WRITE(*,*) "NAMELIST NAM_TUV INITIALIZED TO:" WRITE(*,NAM_TUV) -CLOSE(42) +CLOSE(UNIT=ILU) GOTO 200 ! 100 CONTINUE @@ -171,21 +168,21 @@ ENDDO !* 3. WRITE LOOKUP TABLE FILE ! ----------------- ! -OPEN(66,FILE="PHOTO.TUV39",STATUS="UNKNOWN",FORM="FORMATTED") -WRITE(66,'(A)') HEADDER -WRITE(66,'(I6,A)') NJIO, " NUMBER OF PHOTOLYSIS REACTIONS" -WRITE(66,'(I6, F10.0, A)') NLEVEL, DZ, & +OPEN(NEWUNIT=ILU,FILE="PHOTO.TUV39",STATUS="UNKNOWN",FORM="FORMATTED") +WRITE(ILU,'(A)') HEADDER +WRITE(UNIT=ILU, FMT='(I6,A)') NJIO, " NUMBER OF PHOTOLYSIS REACTIONS" +WRITE(UNIT=ILU, FMT='(I6, F10.0, A)') NLEVEL, DZ, & " NUMBER OF LEVELS, VERTICAL INCREMENT (M)" -WRITE(66,'(I6, F10.4, A)') NTIME, DT, & +WRITE(UNIT=ILU, FMT='(I6, F10.4, A)') NTIME, DT, & " NUMBER OF TEMPORAL RECS, TEMPORAL INCREMENT (H)" -WRITE(66,'(A)') (JLABELOUT(K), K=1, NJIO) -WRITE(66,'(A)') YFMT +WRITE(UNIT=ILU, FMT='(A)') (JLABELOUT(K), K=1, NJIO) +WRITE(UNIT=ILU, FMT='(A)') YFMT DO J = 1, NLEVEL DO I = 1, NTIME - WRITE(66,YFMT) AZ(J), ATIME(I), (JDATA(J,K,I), K=1, NJIO) + WRITE(UNIT=ILU, FMT=YFMT) AZ(J), ATIME(I), (JDATA(J,K,I), K=1, NJIO) ENDDO ENDDO -CLOSE(66) +CLOSE(UNIT=ILU) ! PRINT *, 'Lookup table file PHOTO.TUV39 has been generated.' PRINT *, 'CH_MAKE_LOOKUP ended correctly.' diff --git a/src/MNH/ch_read_chem.f90 b/src/MNH/ch_read_chem.f90 index d53b435dd..56e358524 100644 --- a/src/MNH/ch_read_chem.f90 +++ b/src/MNH/ch_read_chem.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1994-2018 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -56,6 +56,7 @@ END MODULE MODI_CH_READ_CHEM !! 01/12/03 (D. Gazen) change Chemical scheme interface !! M.Leriche 2015 : masse molaire Black carbon à 12 g/mol !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! EXTERNAL !! -------- @@ -66,7 +67,7 @@ USE MODE_FM, ONLY: IO_FILE_CLOSE_ll !! !! IMPLICIT ARGUMENTS !! ------------------ -USE MODD_CH_MODEL0D, ONLY: NFILEIO, NVERB +USE MODD_CH_MODEL0D, ONLY: NVERB USE MODD_CH_M9_n, ONLY: NEQ, CNAMES USE MODD_CH_AEROSOL !! @@ -83,6 +84,7 @@ CHARACTER(LEN=*), INTENT(IN) :: HFILE ! name of the file to be read from !! ------------------------------ CHARACTER(LEN=32) :: YVARNAME CHARACTER(LEN=80) :: YINPUT +INTEGER :: ILU ! unit number for IO INTEGER :: JI, JJ, IIN REAL :: ZMD REAL, DIMENSION(NSP+NCARB+NSOA) :: ZMI ! aerosol molecular mass in g/mol @@ -114,15 +116,15 @@ ELSE ! open file ! PRINT *, 'CH_READ_CHEM: opening file ', HFILE - OPEN(UNIT = NFILEIO, & - FILE = HFILE, & - FORM = 'FORMATTED', & - STATUS = 'OLD') + OPEN(NEWUNIT = ILU, & + FILE = HFILE, & + FORM = 'FORMATTED', & + STATUS = 'OLD') ! ! read line by line and check variable names ! outer_loop : DO JI = 1, NEQ - READ(NFILEIO,*,END=999) YVARNAME, PCONC(JI) + READ(UNIT=ILU,FMT=*,END=999) YVARNAME, PCONC(JI) check_loop : DO JJ = 1, 32 IF (YVARNAME(JJ:JJ).NE.CNAMES(JI)(JJ:JJ)) THEN PRINT *, 'CH_READ_CHEM: Error: variable names do not match:' @@ -139,7 +141,7 @@ ELSE PCONC(:) = PCONC(:) * 1E-9 IF (LORILAM) THEN outer_loop2 : DO JI = 1, SIZE(PAERO,1) - READ(NFILEIO,*,END=997) YVARNAME, PAERO(JI) + READ(UNIT=ILU,FMT=*,END=997) YVARNAME, PAERO(JI) check_loop2 : DO JJ = 1, 32 IF (YVARNAME(JJ:JJ).NE.CAERONAMES(JI)(JJ:JJ)) THEN PRINT *, 'CH_READ_CHEM: Error: variable names do not match:' @@ -260,7 +262,7 @@ END IF END IF ! ! close file - CLOSE(NFILEIO) + CLOSE(UNIT=ILU) ! END IF diff --git a/src/MNH/ch_surface0d.f90 b/src/MNH/ch_surface0d.f90 index 05f1207b9..c4d4e412f 100644 --- a/src/MNH/ch_surface0d.f90 +++ b/src/MNH/ch_surface0d.f90 @@ -1,6 +1,6 @@ -!MNH_LIC Copyright 1994-2018 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1999-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- ! #################################################### @@ -39,6 +39,7 @@ !! ------------- !! Original 03/03/99 !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! EXTERNAL !! -------- @@ -51,7 +52,7 @@ USE MODI_CH_EMISSION_FLUX0D !! !! IMPLICIT ARGUMENTS !! ------------------ -USE MODD_CH_MODEL0D, ONLY: NFILEIO, XDTOUT, XTBEGIN, NVERB +USE MODD_CH_MODEL0D, ONLY: XDTOUT, XTBEGIN, NVERB USE MODD_CH_M9_n, ONLY: CNAMES !! !! EXPLICIT ARGUMENTS @@ -64,6 +65,7 @@ REAL, DIMENSION(KEQ), INTENT(INOUT) :: PCONC ! concentration vector ! !! DECLARATION OF LOCAL VARIABLES !! ------------------------------ +INTEGER, SAVE :: ILU = -1 ! unit number for IO INTEGER :: JI REAL, DIMENSION(KEQ) :: ZDEPO ! deposition velocity REAL, DIMENSION(KEQ) :: ZEMIS ! emission flux after multiplication @@ -174,49 +176,48 @@ PCONC(:) = (PCONC(:) + PDTACT*ZEMIS(:)/(100.*ZHEIGHT)) & ! IF (LSFIRST) THEN ZSTNEXTOUT = XTBEGIN - OPEN(UNIT = 86, & - FILE = "SURFACE.out", & - FORM = "FORMATTED", & - STATUS = "UNKNOWN" ) - WRITE(86,'(A)') 'parameters from the Wesley scheme' - WRITE(86,'(A)') 'quick & dirty coding :-)' - WRITE(86,'(2I5,A)') 1+2*KEQ+21, KEQ, ' 0 0' - WRITE(86,'(A)') 'XTSIMUL' + OPEN(NEWUNIT = ILU, & + FILE = "SURFACE.out", & + FORM = "FORMATTED", & + STATUS = "UNKNOWN" ) + WRITE(UNIT=ILU, FMT='(A)') 'parameters from the Wesley scheme' + WRITE(UNIT=ILU, FMT='(A)') 'quick & dirty coding :-)' + WRITE(UNIT=ILU, FMT='(2I5,A)') 1+2*KEQ+21, KEQ, ' 0 0' + WRITE(UNIT=ILU, FMT='(A)') 'XTSIMUL' DO JI = 1, KEQ - WRITE (86,'(2A)') "VDEP-", CNAMES(JI) + WRITE (UNIT=ILU, FMT='(2A)') "VDEP-", CNAMES(JI) END DO DO JI = 1, KEQ - WRITE (86,'(2A)') "EMIS-", CNAMES(JI) + WRITE (UNIT=ILU, FMT='(2A)') "EMIS-", CNAMES(JI) END DO - WRITE(86,'(A)') 'VMOD' - WRITE(86,'(A)') 'RHODREF' - WRITE(86,'(A)') 'RS' - WRITE(86,'(A)') 'RESA' - WRITE(86,'(A)') 'THT2D' - WRITE(86,'(A)') 'PABST2D' - WRITE(86,'(A)') 'CD' - WRITE(86,'(A)') 'CLAY' - WRITE(86,'(A)') 'SAND' - WRITE(86,'(A)') 'LAND' - WRITE(86,'(A)') 'VEG' - WRITE(86,'(A)') 'LAI' - WRITE(86,'(A)') 'SST' - WRITE(86,'(A)') 'TS' - WRITE(86,'(A)') 'HU' - WRITE(86,'(A)') 'PSN' - WRITE(86,'(A)') 'PSNG' - WRITE(86,'(A)') 'PSNV' - WRITE(86,'(A)') 'Z0VEG' - WRITE(86,'(A)') 'HEIGHT' - WRITE(86,'(A)') 'EMISFACTOR' -print *, "209" - WRITE(86,'(A)') '(5E16.8)' + WRITE(UNIT=ILU, FMT='(A)') 'VMOD' + WRITE(UNIT=ILU, FMT='(A)') 'RHODREF' + WRITE(UNIT=ILU, FMT='(A)') 'RS' + WRITE(UNIT=ILU, FMT='(A)') 'RESA' + WRITE(UNIT=ILU, FMT='(A)') 'THT2D' + WRITE(UNIT=ILU, FMT='(A)') 'PABST2D' + WRITE(UNIT=ILU, FMT='(A)') 'CD' + WRITE(UNIT=ILU, FMT='(A)') 'CLAY' + WRITE(UNIT=ILU, FMT='(A)') 'SAND' + WRITE(UNIT=ILU, FMT='(A)') 'LAND' + WRITE(UNIT=ILU, FMT='(A)') 'VEG' + WRITE(UNIT=ILU, FMT='(A)') 'LAI' + WRITE(UNIT=ILU, FMT='(A)') 'SST' + WRITE(UNIT=ILU, FMT='(A)') 'TS' + WRITE(UNIT=ILU, FMT='(A)') 'HU' + WRITE(UNIT=ILU, FMT='(A)') 'PSN' + WRITE(UNIT=ILU, FMT='(A)') 'PSNG' + WRITE(UNIT=ILU, FMT='(A)') 'PSNV' + WRITE(UNIT=ILU, FMT='(A)') 'Z0VEG' + WRITE(UNIT=ILU, FMT='(A)') 'HEIGHT' + WRITE(UNIT=ILU, FMT='(A)') 'EMISFACTOR' + WRITE(UNIT=ILU, FMT='(A)') '(5E16.8)' LSFIRST = .FALSE. END IF IF (PTSIMUL >= ZSTNEXTOUT) THEN ZSTNEXTOUT = ZSTNEXTOUT + XDTOUT - WRITE(86, '(5E16.8)') PTSIMUL, & + WRITE(UNIT=ILU, FMT= '(5E16.8)') PTSIMUL, & (ZDEPO(JI),JI=1,KEQ), & (ZEMIS(JI),JI=1,KEQ), & ZVMOD(1,1), & @@ -240,6 +241,7 @@ IF (PTSIMUL >= ZSTNEXTOUT) THEN ZZ0VEG(1,1), & ZHEIGHT, & ZEMISFACTOR + CALL FLUSH(UNIT=ILU) END IF RETURN diff --git a/src/MNH/ch_write_chem.f90 b/src/MNH/ch_write_chem.f90 index 25ee92cc4..ecc8a4b1e 100644 --- a/src/MNH/ch_write_chem.f90 +++ b/src/MNH/ch_write_chem.f90 @@ -1,13 +1,8 @@ -!MNH_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source$ $Revision$ -! MASDEV4_7 chimie 2006/06/30 11:47:01 -!----------------------------------------------------------------- !! ######################### MODULE MODI_CH_WRITE_CHEM !! ######################### @@ -55,6 +50,7 @@ END MODULE MODI_CH_WRITE_CHEM !! Original 21/04/95 !! 01/12/03 (D. Gazen) change Chemical scheme interface !! M.Leriche 2015 : masse molaire Black carbon à 12 g/mol +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! EXTERNAL !! -------- @@ -62,7 +58,6 @@ END MODULE MODI_CH_WRITE_CHEM !! !! IMPLICIT ARGUMENTS !! ------------------ -USE MODD_CH_MODEL0D, ONLY: NFILEIO USE MODD_CH_M9_n, ONLY: NEQ, CNAMES USE MODD_CH_AEROSOL !! @@ -76,7 +71,8 @@ CHARACTER(LEN=*), INTENT(IN) :: HFILE ! HFILE: name of the file for write ! !! DECLARATION OF LOCAL VARIABLES !! ------------------------------ -INTEGER :: JI, NAERO +INTEGER :: ILU ! unit number for IO +INTEGER :: JI, IAER REAL :: ZMD REAL, DIMENSION(NSP+NCARB+NSOA) :: ZMI ! aerosol molecular mass in g/mol @@ -84,20 +80,20 @@ REAL, DIMENSION(NSP+NCARB+NSOA) :: ZMI ! aerosol molecular mass in g/mol !* EXECUTABLE STATEMENTS ! --------------------- IF (LORILAM) THEN -NAERO=SIZE(PAERO) +IAER=SIZE(PAERO) ELSE -NAERO=0 +IAER=0 END IF ! ! open file PRINT *, 'CH_WRITE_CHEM: opening file ', HFILE -OPEN(UNIT = NFILEIO, & - FILE = HFILE, & - FORM = 'FORMATTED', & - STATUS = 'UNKNOWN' ) +OPEN(NEWUNIT = ILU, & + FILE = HFILE, & + FORM = 'FORMATTED', & + STATUS = 'UNKNOWN' ) ! DO JI = 1, NEQ - WRITE(NFILEIO,'(3A,E20.8)') "'", CNAMES(JI), "' ", PCONC(JI)*1.E9 ! convert ppp to ppb + WRITE(UNIT=ILU,FMT='(3A,E20.8)') "'", CNAMES(JI), "' ", PCONC(JI)*1.E9 ! convert ppp to ppb ENDDO IF (LORILAM) THEN !Conversion ppp to microgram/m3 @@ -206,12 +202,12 @@ IF (NSOA .EQ. 10) THEN END IF END IF -DO JI = 1, NAERO - WRITE(NFILEIO,'(3A,E20.8)') "'", CAERONAMES(JI), "' ", PAERO(JI) +DO JI = 1, IAER + WRITE(UNIT=ILU,FMT='(3A,E20.8)') "'", CAERONAMES(JI), "' ", PAERO(JI) ENDDO ! ! close file -CLOSE(NFILEIO) +CLOSE(UNIT=ILU) ! END SUBROUTINE CH_WRITE_CHEM diff --git a/src/MNH/modd_ch_model0d.f90 b/src/MNH/modd_ch_model0d.f90 index e91c500ae..f55a168be 100644 --- a/src/MNH/modd_ch_model0d.f90 +++ b/src/MNH/modd_ch_model0d.f90 @@ -1,6 +1,6 @@ -!MNH_LIC Copyright 1995-2018 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence -!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. !----------------------------------------------------------------- !! ###################### @@ -32,6 +32,7 @@ !! CCH_TUV_CLOUDS : method for the impact of clouds on radiation !! 18/02/99 LCH_SURFACE0D : apply surface emission / deposition fluxes !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +!! Philippe Wautelet: 10/01/2019: use newunit argument to open files !! !! IMPLICIT ARGUMENTS !! ------------------ @@ -74,9 +75,8 @@ CHARACTER*80 :: CRUNID = "no runid specified" ! runid for output file CHARACTER*40 :: CRESULTFORMAT = "(5E16.8)" ! Format for results CHARACTER*40 :: CDIAGFORMAT = "(5E16.8)" ! Format for diagnostics ! -INTEGER :: NFILEIO = 42 ! channel to be used for all intermediate file I/O -INTEGER :: NRESULTIO = 44 ! channel to be used for all regular result file I/O -INTEGER :: NDIAGIO = 45 ! channel to be used for all diagnostics file I/O +INTEGER :: NRESULTIO = -1 ! channel to be used for all regular result file I/O (set in CH_INIT_OUTPUT) +INTEGER :: NDIAGIO = -1 ! channel to be used for all diagnostics file I/O (set in CH_INIT_DIAGNOSTICS) ! !* 0.3 verbosity level ! -- GitLab