c*********************************************************************** subroutine NLTE_leedat c reads planetary and molecular parameters c jan 98 malv first version c jul 2011 malv+fgg adapted to LMD-MGCM c*********************************************************************** implicit none include 'nltedefs.h' include 'nlte_data.h' include 'datafile.h' include 'nlte_curtis.h' c local variables integer i,j, k,lun1, lun2 integer ib integer isot character isotcode*2 character ibcode1*1 c formats 132 format (i2) 101 format(i1) c*********************************************************************** lun1 = 1 lun2 = 2 do k=1,nisot ! encode (2,132,isotcode) indexisot(k) write (isotcode,132) indexisot(k) open (lun1, @ file=trim(datafile)//'/NLTEDAT/enelow'//isotcode//'.dat', @ status='old') open (lun2, @ file=trim(datafile)//'/NLTEDAT/deltanu'//isotcode//'.dat', @ status='old') read (lun1,*) read (lun2,*) read (lun1,*) (elow(k,i), i=1,nb) read (lun2,*) (deltanu(k,i), i=1,nb) close (lun1) close (lun2) end do c Call to rhist hfile1='hid' ! if (ib.eq.13 .or. ib.eq.14 ) hfile1 = dirspec//'his' if (ib.eq.13 .or. ib.eq.14 ) hfile1 = 'his' ib=1 do isot=1,4 c Cases 1,2,3,4 if (isot.eq.1) hisfile = hfile1//'26-1.dat' if (isot.eq.2) hisfile = hfile1//'28-1.dat' if (isot.eq.3) hisfile = hfile1//'36-1.dat' if (isot.eq.4) hisfile = hfile1//'27-1.dat' call rhist(1.0) if (isot.eq.1) then !Case 1 mm_c1=mm nbox_c1=nbox tmin_c1=tmin tmax_c1=tmax do i=1,nbox_max no_c1(i)=no(i) dist_c1(i)=dist(i) do j=1,nhist sk1_c1(j,i)=sk1(j,i) xls1_c1(j,i)=xls1(j,i) xln1_c1(j,i)=xln1(j,i) xld1_c1(j,i)=xld1(j,i) enddo enddo do j=1,nhist thist_c1(j)=thist(j) enddo else if(isot.eq.2) then !Case 2 mm_c2=mm nbox_c2=nbox tmin_c2=tmin tmax_c2=tmax do i=1,nbox_max no_c2(i)=no(i) dist_c2(i)=dist(i) do j=1,nhist sk1_c2(j,i)=sk1(j,i) xls1_c2(j,i)=xls1(j,i) xln1_c2(j,i)=xln1(j,i) xld1_c2(j,i)=xld1(j,i) enddo enddo do j=1,nhist thist_c2(j)=thist(j) enddo else if (isot.eq.3) then ! Case 3 mm_c3=mm nbox_c3=nbox tmin_c3=tmin tmax_c3=tmax do i=1,nbox_max no_c3(i)=no(i) dist_c3(i)=dist(i) do j=1,nhist sk1_c3(j,i)=sk1(j,i) xls1_c3(j,i)=xls1(j,i) xln1_c3(j,i)=xln1(j,i) xld1_c3(j,i)=xld1(j,i) enddo enddo do j=1,nhist thist_c3(j)=thist(j) enddo else if (isot.eq.4) then ! Case 4 mm_c4=mm nbox_c4=nbox tmin_c4=tmin tmax_c4=tmax do i=1,nbox_max no_c4(i)=no(i) dist_c4(i)=dist(i) do j=1,nhist sk1_c4(j,i)=sk1(j,i) xls1_c4(j,i)=xls1(j,i) xln1_c4(j,i)=xln1(j,i) xld1_c4(j,i)=xld1(j,i) enddo enddo do j=1,nhist thist_c4(j)=thist(j) enddo endif enddo do ib=2,4 isot=1 write (ibcode1,101) ib hisfile = hfile1//'26-'//ibcode1//'.dat' call rhist (1.0) if (ib.eq.2) then !Case 5 mm_c5=mm nbox_c5=nbox tmin_c5=tmin tmax_c5=tmax do i=1,nbox_max no_c5(i)=no(i) dist_c5(i)=dist(i) do j=1,nhist sk1_c5(j,i)=sk1(j,i) xls1_c5(j,i)=xls1(j,i) xln1_c5(j,i)=xln1(j,i) xld1_c5(j,i)=xld1(j,i) enddo enddo do j=1,nhist thist_c5(j)=thist(j) enddo else if (ib.eq.3) then !Case 6 mm_c6=mm nbox_c6=nbox tmin_c6=tmin tmax_c6=tmax do i=1,nbox_max no_c6(i)=no(i) dist_c6(i)=dist(i) do j=1,nhist sk1_c6(j,i)=sk1(j,i) xls1_c6(j,i)=xls1(j,i) xln1_c6(j,i)=xln1(j,i) xld1_c6(j,i)=xld1(j,i) enddo enddo do j=1,nhist thist_c6(j)=thist(j) enddo else if (ib.eq.4) then !Case 7 mm_c7=mm nbox_c7=nbox tmin_c7=tmin tmax_c7=tmax do i=1,nbox_max no_c7(i)=no(i) dist_c7(i)=dist(i) do j=1,nhist sk1_c7(j,i)=sk1(j,i) xls1_c7(j,i)=xls1(j,i) xln1_c7(j,i)=xln1(j,i) xld1_c7(j,i)=xld1(j,i) enddo enddo do j=1,nhist thist_c7(j)=thist(j) enddo endif enddo c end return end