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

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

devel : compute_pression for unstructured mesh

File size: 2.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
7  USE compute_caldyn_mod
8  USE compute_pvort_only_mod
9
10  IMPLICIT NONE
11  PRIVATE
12  SAVE
13 
14  PUBLIC :: init_grid_param
15
16CONTAINS
17
18  SUBROUTINE init_grid_param(is_mpi_root)
19    USE grid_param
20    USE ioipsl, ONLY : getin
21    USE init_unstructured_mod, ONLY : open_local_mesh_file
22    LOGICAL :: is_mpi_root
23    CHARACTER(len=255) :: grid_type_var
24   
25    grid_type_var='icosahedral'
26    CALL getin("grid_type",grid_type_var)
27    SELECT CASE(grid_type_var)
28    CASE('icosahedral')
29       grid_type = grid_ico
30       IF (is_mpi_root) PRINT *,'DYNAMICO mesh is icosahedral.'
31       CALL getin('nbp',iim_glo)
32       jjm_glo=iim_glo
33       IF(is_mpi_root) PRINT *, 'GETIN nbp = ',iim_glo
34       CALL select_compute_hex
35    CASE('unstructured')
36       grid_type = grid_unst
37       !       is_omp_level_master=.TRUE.
38       !       omp_level_size=1
39       CALL open_local_mesh_file
40       IF (is_mpi_root) PRINT *,'DYNAMICO mesh is unstructured/LAM.'
41       CALL select_compute_unst
42    CASE DEFAULT
43       PRINT *, 'Invalid value of grid_type :',TRIM(grid_type_var)
44       PRINT *, 'Valid values are : <icosahedral> <unstructured>'
45       STOP
46    END SELECT
47   
48    nqtot=1
49    CALL getin('nqtot',nqtot)
50    CALL getin('llm',llm)
51    IF(is_mpi_root) THEN
52       PRINT *, 'GETIN llm = ',llm
53       PRINT *, 'GETIN nqtot = ',nqtot
54    END IF
55   
56  END SUBROUTINE  init_grid_param
57
58
59  SUBROUTINE select_compute_hex
60    ! diagnostics
61    compute_rhodz        => compute_rhodz_hex
62    compute_pression     => compute_pression_hex
63    compute_pression_mid => compute_pression_mid_hex
64    ! dynamics
65    compute_pvort_only   => compute_pvort_only_hex
66  END SUBROUTINE select_compute_hex
67
68  SUBROUTINE select_compute_unst
69    ! diagnostics
70    compute_rhodz        => compute_rhodz_unst
71    compute_pression     => compute_pression_unst
72    compute_pression_mid => compute_pression_mid_unst
73    ! dynamics
74    compute_pvort_only   => compute_pvort_only_unst
75  END SUBROUTINE select_compute_unst
76
77 
78END MODULE init_grid_param_mod
Note: See TracBrowser for help on using the repository browser.