source: trunk/tradit_spectral_model/PROJECTS/trivial/runtime_initialization.h @ 2

Last change on this file since 2 was 2, checked in by xlvlod, 17 years ago

initial import from /home2/xlvlod/IDRIS/SVN_BASE_TRUNK

File size: 2.7 KB
Line 
1c***************************************************************
2c     BEGIN RUNTIME INITIALIZATION
3c***************************************************************
4
5        if(ny .eq. 0) then
6                num_dims = 2
7        else
8                num_dims = 3
9        endif
10
11      if( myid .eq. 0 ) then
12       write(6,*) ' '
13       write(6,*) ' '
14       write(6,*)'problem_params.h executed via include statement: flow_solve.x'
15      endif
16 
17      t_write_selective=-999999*dt    ! not implemented yet
18      if(num_dims .eq. 2) then
19       Ly=1.0                         ! 2d calculation, per unit length in y [m]
20       nyplanes=1                     ! parameter ny is zero for 2d xz calcs
21      else
22       nyplanes=ny
23      endif
24
25c     Create specialized data structure for MPI data swaps
26      call create_MPI_data_type(nx,ny,nz,locnx,locnz,twoslice,subslice,myid,comm)
27      call MPI_BARRIER(comm,ierr)
28
29c     Prescribe initial conditions and nondimensionalize variables
30      istart_floats=(t_floats_on-t_start)/dt    ! step to begin float tracking
31      call initialize(u,v,w,s1,s2,ambient_density,u_cplx,v_cplx,w_cplx,s1_cplx,s2_cplx,
32     *                nx,ny,nz,num_dims,efactor,
33     *                Lx,Ly,Lz,dx,dy,dz,U0,DGRAD,s1_scale,s2_scale,rho_0,f,g,kappa_1,kappa_2,nu,
34     *                bc_flag,ifax,ifay,ifaz,trigx,trigy,trigz,wn,
35     *                wnx,wny,wnz,amp,p,T_diss,diss_flag,N,NM1,M,MM1,MM2,step_flag,
36     *                Rot,Ri,Re,Pr_1,Pr_2,istart,iend,i_all,i_selective,i_stat,
37     *                dt,t_start,t_end,t_write_selective,
38     *                t_stat,xt,work(1,1,1,1),work_cplx(1,1,1,8),myid,
39     *                numprocs,locnx,locnz,comm,twoslice,subslice,work(1,1,1,8),
40     *                netcdf_file,nyplanes,force_cplx,force_flag,
41     *                work(1,1,1,2),scalars)
42
43
44c     Check accuracy of spectral interpolation:
45c     (a) reproduce initial u(z) profile at x=y=0
46c     i=1 
47c     j=1
48c     if( myid .eq. 0 ) open(1,file='output/interp_check')
49c     do k=1,nz+1
50
51c      dimensionless positions i.e. on gridpoints
52c      x0=(i-1.)*dx/Lz
53c      y0=(j-1.)*dy/Lz
54c      z0=(k-1.)*dz/Lz
55
56c      interpolate to find u on grid points
57c      fcs_flag='c'
58c      call ds_interp(x0,y0,z0,u_cplx(1,1,1,N),wnx,wny,wnz,locnx,ny,nz,
59c    *                fcs_flag,interp_val,myid,comm)
60c      if( myid .eq. 0 ) write(1,*) x0*Lz,y0*Lz,z0*Lz,interp_val*U0
61
62c     enddo
63
64      if( myid .eq. 0 ) write(0,*) 'runtime initialization completed'
65      if( myid .eq. 0 ) write(6,*) 'runtime initialization completed'
66      if( myid .eq. 0 ) close(1)
67
68c***************************************************************
69c     END RUNTIME INITIALIZATION
70c***************************************************************
Note: See TracBrowser for help on using the repository browser.