Changeset 813 for codes


Ignore:
Timestamp:
03/13/19 16:02:44 (5 years ago)
Author:
jisesh
Message:

devel ; towards Fortran driver for unstructured/LAM meshes

Location:
codes/icosagcm/devel/src
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/base/grid_param.f90

    r533 r813  
    22  INTEGER  :: iim_glo=40 
    33  INTEGER  :: jjm_glo 
    4   INTEGER,PARAMETER  :: nb_face=10 
    5   INTEGER  :: llm=19 
     4  INTEGER, PARAMETER  :: nb_face=10 
     5  INTEGER, PARAMETER :: grid_unst=1, grid_ico = 2 
     6  INTEGER  :: grid_type ! unstructured or icosahedral 
     7  INTEGER, BIND(C) :: llm=19 
    68  INTEGER  :: nqtot ! number of tracers handled by advection scheme 
    7   INTEGER  :: nqdyn ! number of dynamical tracers : 1 if dry, more if moist 
     9  INTEGER, BIND(C) :: nqdyn ! number of dynamical tracers : 1 if dry, more if moist 
    810 
    911CONTAINS 
  • codes/icosagcm/devel/src/icosa_init.f90

    r726 r813  
    2222  USE diagflux_mod 
    2323  USE profiling_mod 
     24  USE init_unstructured_mod, ONLY: init_grid_type 
    2425  IMPLICIT NONE 
    2526   
    2627    CALL init_profiling 
    2728    CALL init_mpipara 
     29    CALL init_grid_type 
    2830    CALL trace_off 
    2931    CALL xios_init 
     
    7476 
    7577  CONTAINS 
    76    
     78  
    7779    SUBROUTINE check_total_area 
    7880    IMPLICIT NONE 
  • codes/icosagcm/devel/src/parallel/domain.f90

    r726 r813  
    579579    CALL assign_domain_omp 
    580580!$OMP END PARALLEL 
    581          
    582      
     581             
    583582  END SUBROUTINE  assign_domain       
    584583    
     
    612611  END SUBROUTINE assign_domain_omp 
    613612     
    614  
    615613           
    616614  SUBROUTINE compute_domain 
    617   IMPLICIT NONE 
    618     CALL init_domain_param 
    619     CALL create_domain 
    620     CALL assign_cell 
    621     CALL compute_boundary 
    622     CALL set_neighbour_indice 
    623     CALL assign_domain 
    624        
     615    USE grid_param, ONLY : grid_type, grid_unst, grid_ico 
     616    IMPLICIT NONE 
     617    SELECT CASE(grid_type) 
     618    CASE(grid_unst) 
     619       ndomain=1 
     620       ALLOCATE(assigned_domain(1)) 
     621       assigned_domain=.TRUE. 
     622    CASE DEFAULT 
     623       CALL init_domain_param 
     624       CALL create_domain 
     625       CALL assign_cell 
     626       CALL compute_boundary 
     627       CALL set_neighbour_indice 
     628       CALL assign_domain 
     629    END SELECT 
    625630  END SUBROUTINE compute_domain 
    626631           
    627632END MODULE domain_mod  
    628    
  • codes/icosagcm/devel/src/parallel/mpipara.F90

    r726 r813  
    99  LOGICAL,SAVE :: using_mpi 
    1010  LOGICAL,SAVE :: is_mpi_root 
    11   LOGICAL,SAVE :: is_mpi_master 
     11  LOGICAL,SAVE, BIND(C) :: is_mpi_master=.TRUE. 
    1212  INTEGER,SAVE :: mpi_master 
    1313   
  • codes/icosagcm/devel/src/unstructured/data_unstructured.F90

    r802 r813  
    22  USE ISO_C_BINDING 
    33  USE OMP_LIB 
     4  USE mpipara, ONLY : is_mpi_master 
     5  USE grid_param, ONLY : llm, nqdyn 
    46  IMPLICIT NONE 
    57  SAVE 
     8 
    69 
    710#include "unstructured.h90" 
     
    1215  INDEX,  BIND(C) :: caldyn_thermo=thermo_theta, caldyn_eta=eta_lag, & 
    1316       caldyn_vert_variant=caldyn_vert_cons, nb_threads=0, nb_stage=0 
    14   LOGICAL(C_BOOL), BIND(C) :: hydrostatic=.TRUE., is_mpi_master=.TRUE., debug_on=.FALSE. 
     17  LOGICAL(C_BOOL), BIND(C) :: hydrostatic=.TRUE., debug_on=.FALSE. 
    1518  LOGICAL(C_BOOL), BIND(C, NAME='debug_hevi_solver') :: debug_hevi_solver_=.TRUE. 
    1619 
     
    2124#endif 
    2225 
    23   INDEX, BIND(C) :: llm, nqdyn, edge_num, primal_num, dual_num, & 
     26  INDEX, BIND(C) :: edge_num, primal_num, dual_num, & 
    2427       max_primal_deg, max_dual_deg, max_trisk_deg 
    2528  INDEX, ALLOCATABLE :: & ! deg(ij) = nb of vertices = nb of edges of primal/dual cell ij 
Note: See TracChangeset for help on using the changeset viewer.