Changeset 846


Ignore:
Timestamp:
05/04/19 22:27:37 (5 years ago)
Author:
dubos
Message:

devel : towards Fortran driver for unstructured/LAM meshes

Location:
codes/icosagcm/devel
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/make_python

    r826 r846  
    1414function cmd_clean() # cleanup, invoked by : './make_python clean' 
    1515{ 
    16     rm -f lib/*.so lib/dynamico 
     16    rm -rf lib/*.so lib/dynamico 
    1717    cd $KERNELS/src 
    1818    rm -rf *.o *.so build/ 
  • codes/icosagcm/devel/src/dynamics/caldyn_gcm.F90

    r827 r846  
    150150    CALL allocate_caldyn 
    151151 
    152     DO ind=1,ndomain 
    153        IF (.NOT. assigned_domain(ind)) CYCLE 
    154        CALL swap_dimensions(ind) 
    155        CALL swap_geometry(ind) 
    156        planetvel=f_planetvel(ind) 
    157        CALL compute_planetvel(planetvel) 
    158     END DO 
     152    IF(grid_type==grid_ico) THEN 
     153       ! NB : unused now, would be useful for non-traditional / deep-atmosphere 
     154       DO ind=1,ndomain 
     155          IF (.NOT. assigned_domain(ind)) CYCLE 
     156          CALL swap_dimensions(ind) 
     157          CALL swap_geometry(ind) 
     158          planetvel=f_planetvel(ind) 
     159          CALL compute_planetvel(planetvel) 
     160       END DO 
     161    END IF 
    159162 
    160163    compute_pvort_only => compute_pvort_only_hex 
  • codes/icosagcm/devel/src/icosa_init.f90

    r835 r846  
    3434    CALL init_grid_param(is_mpi_master) 
    3535    CALL init_omp_para(is_mpi_master) 
    36     CALL compute_metric 
     36    IF(grid_type == grid_ico) CALL compute_metric 
    3737    CALL compute_domain 
    3838    CALL init_transfert 
     
    4242  !$OMP PARALLEL   
    4343    CALL switch_omp_no_distrib_level 
    44     CALL compute_geometry 
     44    IF(grid_type == grid_ico) CALL compute_geometry 
    4545    CALL check_total_area 
    4646   
     
    8080    SUBROUTINE check_total_area 
    8181    IMPLICIT NONE 
    82     TYPE(t_field),POINTER,SAVE :: sum_ne(:) 
    83     TYPE(t_field),POINTER,SAVE :: sum_ne_glo(:) 
    84     REAL(rstd),POINTER :: pt_sum_ne(:) 
    85     INTEGER :: ind,i,j,k,n 
     82    INTEGER :: ind,i,j,ij 
    8683    REAL(rstd) :: vect(3,6) 
    8784    REAL(rstd) :: centr(3),dist     
    8885    REAL(rstd) :: tot_sum=0 
    8986 
    90       CALL allocate_field(sum_ne,field_T,type_real) 
    91      
    9287    !$OMP BARRIER 
    9388    !$OMP MASTER 
    94       DO ind=1,ndomain 
    95         
    96         pt_sum_ne=sum_ne(ind) 
    97          
    98         CALL swap_dimensions(ind) 
    99         CALL swap_geometry(ind) 
    100         
    101         DO j=jj_begin,jj_end 
    102           DO i=ii_begin,ii_end 
    103             n=(j-1)*iim+i 
    104             pt_sum_ne(n)=0 
    105             DO k=1,6 
    106               pt_sum_ne(n)=pt_sum_ne(n)+ne(n,k) 
    107             ENDDO 
    108             IF (domain(ind)%own(i,j)) tot_sum=tot_sum+Ai(n) 
     89    IF(grid_type == grid_ico) THEN 
     90       DO ind=1,ndomain 
     91          CALL swap_dimensions(ind) 
     92          CALL swap_geometry(ind) 
     93          DO j=jj_begin,jj_end 
     94             DO i=ii_begin,ii_end 
     95                ij=(j-1)*iim+i 
     96                IF (domain(ind)%own(i,j)) tot_sum=tot_sum+Ai(ij) 
     97             ENDDO 
    10998          ENDDO 
    110         ENDDO 
    111       ENDDO 
    112      
    113       IF (is_mpi_root) PRINT *," Diff surf",1-tot_sum/(4*Pi*radius*radius) 
     99       ENDDO 
     100    END IF 
     101    IF (is_mpi_root) PRINT *," Diff surf",1-tot_sum/(4*Pi*radius*radius) 
    114102    !$OMP END MASTER 
    115103     
  • codes/icosagcm/devel/src/output/write_field.f90

    r533 r846  
    7070    USE mpipara 
    7171    USE netcdf_mod 
     72    USE grid_param 
    7273    IMPLICIT NONE   
    7374     CHARACTER(LEN=*),INTENT(IN) :: name_in 
     
    8081       
    8182      IF (no_io) RETURN 
    82        
     83      IF (grid_type==grid_unst) RETURN 
     84 
    8385!$OMP BARRIER 
    8486!$OMP MASTER       
  • codes/icosagcm/devel/src/parallel/transfert_mpi.f90

    r726 r846  
    9191       
    9292  SUBROUTINE init_transfert 
    93   USE profiling_mod 
     93    USE grid_param 
     94    USE profiling_mod, ONLY : register_id 
     95    USE mpipara, ONLY : id_mpi 
     96    CALL register_id('MPI', id_mpi) 
     97    IF(grid_type == grid_ico) CALL init_transfer_hex 
     98  END SUBROUTINE init_transfert 
     99 
     100  SUBROUTINE init_transfer_hex 
    94101  USE domain_mod 
    95102  USE dimensions 
     
    101108  INTEGER :: ind,i,j 
    102109  LOGICAL ::ok 
    103  
    104     CALL register_id('MPI', id_mpi) 
    105110 
    106111    CALL create_request(field_t,req_i1) 
     
    299304    CALL finalize_request(req_z1_scal) 
    300305 
    301   END SUBROUTINE init_transfert 
     306  END SUBROUTINE init_transfer_hex 
    302307   
    303308  SUBROUTINE create_request(type_field,request,vector) 
     
    925930  USE mpipara 
    926931  USE mpi_mod 
     932  USE grid_param 
    927933  IMPLICIT NONE 
    928934   
     
    942948!    TYPE(t_reorder),POINTER :: reorder(:) 
    943949!    TYPE(t_reorder) :: reorder_swap 
     950 
     951    IF(grid_type==grid_unst) RETURN 
    944952 
    945953!$OMP BARRIER 
Note: See TracChangeset for help on using the changeset viewer.