00001 subroutine IO_input_initial_3D_4ve
00002 use phys_constant, only : long
00003 use grid_parameter, only : nrf, ntf, npf
00004 use def_matter, only : utf, uxf, uyf, uzf
00005 use grid_temporary, only : nrftmp, ntftmp, npftmp, rgtmp, thgtmp, phigtmp
00006 use interface_interpo_3D_initial_4th
00007 use make_array_3d
00008 implicit none
00009 real(long), pointer :: utf_tmp(:,:,:),
00010 uxf_tmp(:,:,:), uyf_tmp(:,:,:), uzf_tmp(:,:,:)
00011 integer :: ir, it, ip, nrfmax, ntfmax, npfmax
00012
00013 nrfmax = max0(nrf,nrftmp)
00014 ntfmax = max0(ntf,ntftmp)
00015 npfmax = max0(npf,npftmp)
00016 call alloc_array3d(utf_tmp,0,nrfmax,0,ntfmax,0,npfmax)
00017 call alloc_array3d(uxf_tmp,0,nrfmax,0,ntfmax,0,npfmax)
00018 call alloc_array3d(uyf_tmp,0,nrfmax,0,ntfmax,0,npfmax)
00019 call alloc_array3d(uzf_tmp,0,nrfmax,0,ntfmax,0,npfmax)
00020
00021
00022 open(13,file='rns4ve_3D.ini',status='old')
00023 read(13,'(5i5)') nrftmp, ntftmp, npftmp
00024 do ip = 0, npftmp
00025 do it = 0, ntftmp
00026 do ir = 0, nrftmp
00027 read(13,'(1p,6e20.12)') utf_tmp(ir,it,ip), &
00028 & uxf_tmp(ir,it,ip), &
00029 & uyf_tmp(ir,it,ip), &
00030 & uzf_tmp(ir,it,ip)
00031 end do
00032 end do
00033 end do
00034 close(13)
00035
00036 if (nrf.ne.nrftmp.or.ntf.ne.ntftmp.or.npf.ne.npftmp) then
00037 call interpo_3D_initial_4th(utf_tmp,'sfco')
00038 call interpo_3D_initial_4th(uxf_tmp,'sfco')
00039 call interpo_3D_initial_4th(uyf_tmp,'sfco')
00040 call interpo_3D_initial_4th(uzf_tmp,'sfco')
00041 end if
00042
00043 utf(0:nrf,0:ntf,0:npf) = utf_tmp(0:nrf,0:ntf,0:npf)
00044 uxf(0:nrf,0:ntf,0:npf) = uxf_tmp(0:nrf,0:ntf,0:npf)
00045 uyf(0:nrf,0:ntf,0:npf) = uyf_tmp(0:nrf,0:ntf,0:npf)
00046 uzf(0:nrf,0:ntf,0:npf) = uzf_tmp(0:nrf,0:ntf,0:npf)
00047
00048 deallocate(utf_tmp)
00049 deallocate(uxf_tmp)
00050 deallocate(uyf_tmp)
00051 deallocate(uzf_tmp)
00052
00053 end subroutine IO_input_initial_3D_4ve