[830] | 1 | MODULE init_grid_param_mod |
---|
[906] | 2 | |
---|
| 3 | USE compute_diagnostics_mod |
---|
| 4 | USE compute_rhodz_mod |
---|
[913] | 5 | USE compute_pression_mod |
---|
[906] | 6 | |
---|
| 7 | USE compute_caldyn_mod |
---|
| 8 | USE compute_pvort_only_mod |
---|
| 9 | |
---|
[830] | 10 | IMPLICIT NONE |
---|
[906] | 11 | PRIVATE |
---|
| 12 | SAVE |
---|
| 13 | |
---|
| 14 | PUBLIC :: init_grid_param |
---|
[830] | 15 | |
---|
| 16 | CONTAINS |
---|
| 17 | |
---|
| 18 | SUBROUTINE init_grid_param(is_mpi_root) |
---|
| 19 | USE grid_param |
---|
| 20 | USE ioipsl, ONLY : getin |
---|
[863] | 21 | USE init_unstructured_mod, ONLY : open_local_mesh_file |
---|
[830] | 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 |
---|
[906] | 34 | CALL select_compute_hex |
---|
[830] | 35 | CASE('unstructured') |
---|
| 36 | grid_type = grid_unst |
---|
| 37 | ! is_omp_level_master=.TRUE. |
---|
| 38 | ! omp_level_size=1 |
---|
[863] | 39 | CALL open_local_mesh_file |
---|
[830] | 40 | IF (is_mpi_root) PRINT *,'DYNAMICO mesh is unstructured/LAM.' |
---|
[906] | 41 | CALL select_compute_unst |
---|
[830] | 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 |
---|
[906] | 57 | |
---|
| 58 | |
---|
| 59 | SUBROUTINE select_compute_hex |
---|
[913] | 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 |
---|
[906] | 66 | END SUBROUTINE select_compute_hex |
---|
| 67 | |
---|
| 68 | SUBROUTINE select_compute_unst |
---|
[913] | 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 |
---|
[906] | 75 | END SUBROUTINE select_compute_unst |
---|
| 76 | |
---|
[830] | 77 | |
---|
| 78 | END MODULE init_grid_param_mod |
---|