/[lmdze]/trunk/Sources/dyn3d/Inter_barxy/test_inter_barxy.f
ViewVC logotype

Contents of /trunk/Sources/dyn3d/Inter_barxy/test_inter_barxy.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 166 - (show annotations)
Wed Jul 29 14:32:55 2015 UTC (8 years, 10 months ago) by guez
File size: 1846 byte(s)
Split ppm3d.f into files containing a single procedure.

Factorized computations of filtering matrices into a procedure
inifilr_hemisph. Had then to change the matrices from allocatable to
pointer and from customized lower bound to lower bound 1. The change
in lower bounds does not matter because the matrices are only used as
a whole as actual arguments.

Also, in infilr, instead of finding jfilt[ns][uv] from approximately
jjm /2, start at index j1 that corresponds to the equator. This is not
the same if there is a zoom in latitude.

Also, the test (rlamda(modfrst[ns][uv](j)) * cos(rlat[uv](j)) < 1) in
the loops on filtered latitudes is not useful now that we start from
j1: it is necessarily true. See notes.

Just encapsulated lwvn into a module and removed unused argument ktraer.

1 program test_inter_barxy
2
3 use comconst, only: dtvr, daysec, iniconst
4 use comgeom, only: inigeom
5 use conf_gcm_m, only: conf_gcm, day_step
6 use dimens_m, only: iim, jjm
7 USE dynetat0_m, only: rlonu, rlatv
8 use disvert_m, only: pa
9 use inter_barxy_m, only: inter_barxy
10 USE nr_util, ONLY : pi
11 use read_serre_m, only: read_serre
12
13 implicit none
14
15 integer:: iml_dyn = 3, jml_dyn = 6
16 real, allocatable:: lon_rad(:), lon_ini(:)
17 real, allocatable:: lat_rad(:), lat_ini(:)
18 integer i
19 real, allocatable:: var_ana3d(:, :)
20 REAL var_tmp2d(iim, jjm + 1)
21
22 namelist /main/iml_dyn, jml_dyn
23
24 !------------------------
25
26 print *, "Enter namelist 'main'."
27 read (unit=*, nml=main)
28 write(unit=*, nml=main)
29
30 allocate(lon_rad(iml_dyn), lon_ini(iml_dyn))
31 allocate(lat_rad(jml_dyn-1), lat_ini(jml_dyn))
32 allocate(var_ana3d(iml_dyn, jml_dyn))
33
34 CALL conf_gcm
35 dtvr = daysec / real(day_step)
36 print *, 'dtvr = ', dtvr
37 pa = 5e4
38 CALL iniconst
39 call read_serre
40 CALL inigeom
41
42 lon_ini = - pi + 2 * pi / iml_dyn * (/(i, i = 0, iml_dyn - 1)/)
43
44 forall (i = 1: iml_dyn - 1) lon_rad(i) = (lon_ini(i) + lon_ini(i + 1)) / 2
45 lon_rad(iml_dyn) = (lon_ini(iml_dyn) + pi) / 2
46
47 lat_ini = pi / 2 - pi / (jml_dyn - 1) * (/(i, i = 0, jml_dyn - 1)/)
48 forall (i = 1: jml_dyn - 1) lat_rad(i) = (lat_ini(i) + lat_ini(i + 1)) / 2
49
50 !!forall (i = 1: jml_dyn) var_ana3d(:, i) = i
51 forall (i = 1: jml_dyn) var_ana3d(:, i) = 240. + real(i) / 2
52
53 call inter_barxy(lon_rad, lat_rad, var_ana3d, rlonu(:iim), rlatv, var_tmp2d)
54
55 !!print *, "lon_rad * 180. / pi = ", lon_rad * 180. / pi
56 print *, "lat_rad * 180. / pi = ", lat_rad * 180. / pi
57 !!print *, "var_tmp2d = ", var_tmp2d
58
59 print *, "minval(var_tmp2d, dim=1) = ", minval(var_tmp2d, dim=1)
60 print *, "maxval(var_tmp2d, dim=1) = ", maxval(var_tmp2d, dim=1)
61
62 end program test_inter_barxy

  ViewVC Help
Powered by ViewVC 1.1.21