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

Annotation of /trunk/dyn3d/Inter_barxy/test_inter_barxy.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 313 - (hide annotations)
Mon Dec 10 15:54:30 2018 UTC (5 years, 6 months ago) by guez
File size: 1835 byte(s)
Remove module temps. Move variable itau_dyn from module temps to
module dynetat0_m, where it is defined.

Split module dynetat0_m into dynetat0_m and dynetat0_chosen_m. The
motivation is to create smaller modules. Procedures principal_cshift
and invert_zoomx had to stay in dynetat0_m because of circular
dependency. Now we will be able to move them away. Module variables
which are chosen by the user, not computed, in program ce0l go to
dynetat0_chosen_m: day_ref, annee_ref, clon, clat, grossismx,
grossismy, dzoomx, dzoomy, taux, tauy.

Move variable "pa" from module disvert_m to module
dynetat0_chosen_m. Define "pa" in dynetat0_chosen rather than etat0.

Define day_ref and annee_ref in procedure read_serre rather than
etat0.

1 guez 123 program test_inter_barxy
2    
3 guez 266 use comconst, only: iniconst
4 guez 191 use comdissnew, only: read_comdissnew
5 guez 139 use comgeom, only: inigeom
6 guez 266 use conf_gcm_m, only: conf_gcm
7 guez 265 use dimensions, only: iim, jjm
8 guez 313 USE dynetat0_m, only: rlonu, rlatv, fyhyp, fxhyp
9     use dynetat0_chosen_m, only: read_serre
10 guez 123 use inter_barxy_m, only: inter_barxy
11     USE nr_util, ONLY : pi
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 guez 191 call read_comdissnew
36 guez 123 CALL iniconst
37 guez 139 call read_serre
38 guez 277 CALL fyhyp
39     CALL fxhyp
40 guez 123 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