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

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

devel : fixed diagnosis of hydrostatic pressure for Lagrangian vertical coordinate

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