source: codes/icosagcm/devel/src/base/init_grid_param.f90 @ 935

Last change on this file since 935 was 935, checked in by dubos, 5 years ago

devel : interfaces for caldyn_fast and caldyn_slow_hydro

File size: 2.7 KB
Line 
1MODULE init_grid_param_mod
2
3  USE compute_diagnostics_mod
4  USE compute_rhodz_mod
5  USE compute_pression_mod
6
7  USE compute_caldyn_mod
8  USE compute_pvort_only_mod
9  USE compute_theta_mod
10  USE compute_geopot_mod
11  USE compute_caldyn_fast_mod
12  USE compute_caldyn_slow_hydro_mod
13
14  IMPLICIT NONE
15  PRIVATE
16  SAVE
17 
18  PUBLIC :: init_grid_param
19
20CONTAINS
21
22  SUBROUTINE init_grid_param(is_mpi_root)
23    USE grid_param
24    USE ioipsl, ONLY : getin
25    USE init_unstructured_mod, ONLY : open_local_mesh_file
26    LOGICAL :: is_mpi_root
27    CHARACTER(len=255) :: grid_type_var
28   
29    grid_type_var='icosahedral'
30    CALL getin("grid_type",grid_type_var)
31    SELECT CASE(grid_type_var)
32    CASE('icosahedral')
33       grid_type = grid_ico
34       IF (is_mpi_root) PRINT *,'DYNAMICO mesh is icosahedral.'
35       CALL getin('nbp',iim_glo)
36       IF(is_mpi_root) PRINT *, 'GETIN nbp = ',iim_glo
37       iim_glo=iim_glo+1
38       jjm_glo=iim_glo
39       CALL select_compute_hex
40    CASE('unstructured')
41       grid_type = grid_unst
42       !       is_omp_level_master=.TRUE.
43       !       omp_level_size=1
44       CALL open_local_mesh_file
45       IF (is_mpi_root) PRINT *,'DYNAMICO mesh is unstructured/LAM.'
46       CALL select_compute_unst
47    CASE DEFAULT
48       PRINT *, 'Invalid value of grid_type :',TRIM(grid_type_var)
49       PRINT *, 'Valid values are : <icosahedral> <unstructured>'
50       STOP
51    END SELECT
52   
53    nqtot=1
54    CALL getin('nqtot',nqtot)
55    CALL getin('llm',llm)
56    IF(is_mpi_root) THEN
57       PRINT *, 'GETIN llm = ',llm
58       PRINT *, 'GETIN nqtot = ',nqtot
59    END IF
60   
61  END SUBROUTINE  init_grid_param
62
63
64  SUBROUTINE select_compute_hex
65    ! diagnostics
66    compute_rhodz        => compute_rhodz_hex
67    compute_pression     => compute_pression_hex
68    compute_pression_mid => compute_pression_mid_hex
69    ! dynamics
70    compute_pvort_only        => compute_pvort_only_hex
71    compute_theta             => compute_theta_hex
72    compute_geopot            => compute_geopot_hex
73    compute_caldyn_fast       => compute_caldyn_fast_hex
74    compute_caldyn_slow_hydro => compute_caldyn_slow_hydro_hex
75  END SUBROUTINE select_compute_hex
76
77  SUBROUTINE select_compute_unst
78    ! diagnostics
79    compute_rhodz        => compute_rhodz_unst
80    compute_pression     => compute_pression_unst
81    compute_pression_mid => compute_pression_mid_unst
82    ! dynamics
83    compute_pvort_only         => compute_pvort_only_unst
84    compute_theta              => compute_theta_unst
85!    compute_geopot           => compute_geopot_unst
86    compute_caldyn_fast        => compute_caldyn_fast_unst
87    compute_caldyn_slow_hydro  => compute_caldyn_slow_hydro_unst
88  END SUBROUTINE select_compute_unst
89 
90END MODULE init_grid_param_mod
Note: See TracBrowser for help on using the repository browser.