Lester,
You should not have placed the code I wrote before your declarations.
There are only a few changes,
- remove my PI code
- include USE MOD_Precision in routine up_INT(n)
- change references to file units 1,2 & 5 to 21,22 & 25, as units 1:8 can be reserved file unit numbers with some compilers.
I see no problem with the definition of sp, dp or qp you now use ?
I copied your code then did my updates and used FC to identify all changes. The following is this list.
Comparing files arctica_ver0.f90 and ARCTICA_VER1.F90
***** arctica_ver0.f90
58: USE MOD_PARAM
59: !
60: pi = 4.0_dp * ATAN (1.0_dp)
61: piq = 4.0_qp * ATAN (1.0_qp)
62: pis = 4.0_sp * ATAN (1.0_sp)
63: write (,) pis, kind(pis), precision(pis)
64: write (,) pi, kind(pi), precision(pi)
65: write (,) piq, kind(piq), precision(piq)
66: write (,'(f27.19)') pis
67: write (,'(f27.19)') pi
68: write (*,'(f27.19)') piq
69: !
70: END
71:
72: REAL(dp) del_xd,del_xi,cx,cy,del_xBg,R_d,R_i,del_xdet,del_x_pr
***** ARCTICA_VER1.F90
58: USE MOD_PARAM
59: !
60: REAL(dp) del_xd,del_xi,cx,cy,del_xBg,R_d,R_i,del_xdet,del_x_pr
*****
***** arctica_ver0.f90
90: !
91:
92: !Last edited by arctica on Tue Jul 16, 2013 10:37 pm; edited 1 time in total
***** ARCTICA_VER1.F90
78: !
79: call write_pi
80: !
81: !Last edited by arctica on Tue Jul 16, 2013 10:37 pm; edited 1 time in total
*****
***** arctica_ver0.f90
119:
120:
121: OPEN(1, file='parameters.dat', status='OLD')
122: READ(1,'(I1)',ADVANCE='NO') det
123: IF (det==1) THEN
124: READ(1,*)del_xd,del_xi,del_xBg,rho_c,rho_w,N,M,R_d,R_i,land, &
125: slab_Boug,N_det,M_det,del_xdet
***** ARCTICA_VER1.F90
108:
109: OPEN(21, file='parameters.dat', status='OLD')
110: READ(21,'(I1)',ADVANCE='NO') det
111: IF (det==1) THEN
112: READ(21,*)del_xd,del_xi,del_xBg,rho_c,rho_w,N,M,R_d,R_i,land, &
113: slab_Boug,N_det,M_det,del_xdet
*****
***** arctica_ver0.f90
128: ELSE
129: READ(1,*)del_xd,del_xi,del_xBg,rho_c,rho_w,N,M,R_d,R_i,land, &
130: slab_Boug
***** ARCTICA_VER1.F90
116: ELSE
117: READ(21,*)del_xd,del_xi,del_xBg,rho_c,rho_w,N,M,R_d,R_i,land, &
118: slab_Boug
*****
***** arctica_ver0.f90
131: ENDIF
132: CLOSE(1)
133: !Open INPUT files
134: open(2,file='topo_cart.xyz', status='OLD')
135: open(5,file='gravi_cart.xyz',status='OLD')
136: !Open detailed topography, if necessary
137: IF (det==1) open(7,file='topo_cart_det.xyz', status='OLD')
138: !Open OUTPUT files
***** ARCTICA_VER1.F90
119: ENDIF
120: CLOSE(21)
121: !Open INPUT files
122: open(22,file='topo_cart.xyz', status='OLD')
123: open(25,file='gravi_cart.xyz',status='OLD')
124: !Open detailed topography, if necessary
125: IF (det==1) open(27,file='topo_cart_det.xyz', status='OLD')
126: !Open OUTPUT files
*****