MODULE init_grid_param_mod USE compute_diagnostics_mod USE compute_rhodz_mod USE compute_caldyn_mod USE compute_pvort_only_mod IMPLICIT NONE PRIVATE SAVE PUBLIC :: init_grid_param CONTAINS SUBROUTINE init_grid_param(is_mpi_root) USE grid_param USE ioipsl, ONLY : getin USE init_unstructured_mod, ONLY : open_local_mesh_file LOGICAL :: is_mpi_root CHARACTER(len=255) :: grid_type_var grid_type_var='icosahedral' CALL getin("grid_type",grid_type_var) SELECT CASE(grid_type_var) CASE('icosahedral') grid_type = grid_ico IF (is_mpi_root) PRINT *,'DYNAMICO mesh is icosahedral.' CALL getin('nbp',iim_glo) jjm_glo=iim_glo IF(is_mpi_root) PRINT *, 'GETIN nbp = ',iim_glo CALL select_compute_hex CASE('unstructured') grid_type = grid_unst ! is_omp_level_master=.TRUE. ! omp_level_size=1 CALL open_local_mesh_file IF (is_mpi_root) PRINT *,'DYNAMICO mesh is unstructured/LAM.' CALL select_compute_unst CASE DEFAULT PRINT *, 'Invalid value of grid_type :',TRIM(grid_type_var) PRINT *, 'Valid values are : ' STOP END SELECT nqtot=1 CALL getin('nqtot',nqtot) CALL getin('llm',llm) IF(is_mpi_root) THEN PRINT *, 'GETIN llm = ',llm PRINT *, 'GETIN nqtot = ',nqtot END IF END SUBROUTINE init_grid_param SUBROUTINE select_compute_hex compute_rhodz => compute_rhodz_hex compute_pvort_only => compute_pvort_only_hex END SUBROUTINE select_compute_hex SUBROUTINE select_compute_unst compute_rhodz => compute_rhodz_unst compute_pvort_only => compute_pvort_only_unst END SUBROUTINE select_compute_unst END MODULE init_grid_param_mod