Ignore:
Timestamp:
06/13/19 16:45:41 (5 years ago)
Author:
adurocher
Message:

trunk : Fixed GCC warnings

Fixed iso c bindings
fixed warnings with -Wall -Wno-aliasing -Wno-unused -Wno-unused-dummy-argument -Wno-maybe-uninitialized -Wno-tabs warnings
Removed all unused variables (-Wunused-variable)
vector%dot_product is now dot_product_3d to avoid compilation warning "dot_product shadows intrinsic" with GCC

Location:
codes/icosagcm/trunk/src/output
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/trunk/src/output/netcdf_mod.F90

    r803 r899  
    8181        integer,                         intent(out) :: varid 
    8282        integer                                      :: nf90_def_var 
     83        nf90_def_var = 0 
    8384    end function nf90_def_var 
    8485     
     
    8990        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    9091        integer                                      :: nf90_put_var_int0 
     92        nf90_put_var_int0 = 0 
    9193    end function nf90_put_var_int0 
    9294 
     
    9698        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    9799        integer                                      :: nf90_put_var_int1 
     100        nf90_put_var_int1 = 0 
    98101    end function nf90_put_var_int1 
    99102 
     
    103106        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    104107        integer                                      :: nf90_put_var_int2 
     108        nf90_put_var_int2 = 0 
    105109    end function nf90_put_var_int2 
    106110 
     
    110114        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    111115        integer                                      :: nf90_put_var_int3 
     116        nf90_put_var_int3 = 0 
    112117    end function nf90_put_var_int3 
    113118     
     
    116121        real,                              intent( in) :: values 
    117122        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    118         integer                                      :: nf90_put_var_real0    
     123        integer                                      :: nf90_put_var_real0 
     124        nf90_put_var_real0 = 0 
    119125   end function nf90_put_var_real0 
    120126 
     
    123129        real,                              intent( in) :: values(:) 
    124130        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    125         integer                                      :: nf90_put_var_real1    
     131        integer                                      :: nf90_put_var_real1 
     132        nf90_put_var_real1 = 0 
    126133   end function nf90_put_var_real1 
    127134 
     
    130137        real,                              intent( in) :: values(:,:) 
    131138        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    132         integer                                      :: nf90_put_var_real2    
     139        integer                                      :: nf90_put_var_real2 
     140        nf90_put_var_real2 = 0 
    133141   end function nf90_put_var_real2 
    134142 
     
    137145        real,                              intent( in) :: values(:,:,:) 
    138146        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    139         integer                                      :: nf90_put_var_real3    
     147        integer                                      :: nf90_put_var_real3 
     148        nf90_put_var_real3 = 0 
    140149   end function nf90_put_var_real3 
    141150  
     
    146155        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    147156        integer                                      :: nf90_get_var_int0 
     157        nf90_get_var_int0 = 0 
    148158    end function nf90_get_var_int0 
    149159 
     
    153163        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    154164        integer                                      :: nf90_get_var_int1 
     165        nf90_get_var_int1 = 0 
    155166    end function nf90_get_var_int1 
    156167 
     
    160171        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    161172        integer                                      :: nf90_get_var_int2 
     173        nf90_get_var_int2 = 0 
    162174    end function nf90_get_var_int2 
    163175 
     
    167179        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    168180        integer                                      :: nf90_get_var_int3 
     181        nf90_get_var_int3 = 0 
    169182    end function nf90_get_var_int3 
    170183     
     
    173186        real,                              intent( out) :: values 
    174187        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    175         integer                                      :: nf90_get_var_real0    
     188        integer                                      :: nf90_get_var_real0 
     189        nf90_get_var_real0 = 0 
    176190   end function nf90_get_var_real0 
    177191 
     
    180194        real,                              intent( out) :: values(:) 
    181195        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    182         integer                                      :: nf90_get_var_real1    
     196        integer                                      :: nf90_get_var_real1 
     197        nf90_get_var_real1 = 0 
    183198   end function nf90_get_var_real1 
    184199 
     
    187202        real,                              intent( out) :: values(:,:) 
    188203        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    189         integer                                      :: nf90_get_var_real2    
     204        integer                                      :: nf90_get_var_real2 
     205        nf90_get_var_real2 = 0 
    190206   end function nf90_get_var_real2 
    191207 
     
    194210        real,                              intent( out) :: values(:,:,:) 
    195211        integer, dimension(:), optional, intent( in) :: start, count, stride, map 
    196         integer                                      :: nf90_get_var_real3    
     212        integer                                      :: nf90_get_var_real3 
     213        nf90_get_var_real3 = 0 
    197214   end function nf90_get_var_real3 
    198215   
  • codes/icosagcm/trunk/src/output/output_field.f90

    r667 r899  
    77  PRIVATE 
    88 
    9   LOGICAL,SAVE :: xios_output  
     9  LOGICAL :: xios_output  
    1010!$OMP THREADPRIVATE(xios_output)      
    11   LOGICAL,SAVE :: enable_io     
     11  LOGICAL :: enable_io     
    1212!$OMP THREADPRIVATE(enable_io)      
    1313 
  • codes/icosagcm/trunk/src/output/restart.f90

    r893 r899  
    6060    
    6161  TYPE(t_domain),POINTER :: d 
    62   TYPE(t_field),POINTER :: field_glo(:) 
    6362  TYPE(t_field),POINTER :: field(:) 
    6463   
     
    421420  INTEGER             :: fieldId(20) 
    422421    
    423   TYPE(t_domain),POINTER :: d 
    424   TYPE(t_field),POINTER :: field_glo(:) 
    425422  TYPE(t_field),POINTER :: field(:) 
    426423   
    427424  CHARACTER(LEN=255) :: start_file_name 
    428425  INTEGER,PARAMETER  :: nvert=6 
    429   INTEGER    ::  ncid, cellId, levId, edgeId,  vertid, lonId, latId, bounds_lonId, bounds_latId 
    430   INTEGER    :: ind,ind_glo,i,j,k,nf 
     426  INTEGER    ::  ncid 
     427  INTEGER    :: nf 
    431428  INTEGER    :: status 
    432   REAL(rstd),ALLOCATABLE :: lon(:),lat(:),bounds_lon(:,:),bounds_lat(:,:) 
    433429  REAL(rstd) :: it_real 
    434430   
     
    464460!      CALL xios_recv_field("it_start",it_real) 
    465461      CALL xios_read_var("it_start",it_real) 
    466       it=it_real 
     462      it=INT(it_real) 
    467463    ELSE 
    468464 
  • codes/icosagcm/trunk/src/output/write_field.f90

    r548 r899  
    350350      REAL(r8),ALLOCATABLE :: field_val2d(:) 
    351351      REAL(r8),ALLOCATABLE :: field_val3d(:,:) 
    352       REAL(r8),ALLOCATABLE :: field_val4d(:,:,:) 
    353352      LOGICAL, INTENT(IN) :: once 
    354353      TYPE(t_domain),POINTER :: d 
    355354      INTEGER :: Index 
    356355      INTEGER :: ind,i,j,k,n,ncell,q 
    357       INTEGER :: iie,jje,iin,jjn 
    358356      INTEGER :: status 
    359357      CHARACTER(len=255) :: name 
    360       CHARACTER(len=255) :: str_ind 
    361358      INTEGER :: ind_b,ind_e 
    362359      INTEGER :: halo_size 
     
    394391        Index=GetFieldIndex(name) 
    395392      else 
    396         FieldIndex(Index)=FieldIndex(Index)+1. 
     393        FieldIndex(Index)=FieldIndex(Index)+1 
    397394      endif 
    398395       
     
    629626      REAL(r8),ALLOCATABLE :: field_val2d(:) 
    630627      REAL(r8),ALLOCATABLE :: field_val3d(:,:) 
    631       REAL(r8),ALLOCATABLE :: field_val4d(:,:,:) 
    632628      TYPE(t_domain),POINTER :: d 
    633629      INTEGER :: Index 
    634630      INTEGER :: ind,i,j,l,k,n,ncell,q 
    635       INTEGER :: iie,jje,iin,jjn 
    636631      INTEGER :: status 
    637632      CHARACTER(len=255) :: name 
    638       CHARACTER(len=255) :: str_ind 
    639633      INTEGER :: ind_b,ind_e 
    640634      INTEGER :: halo_size 
     
    664658        Index=GetFieldIndex(name) 
    665659      else 
    666         FieldIndex(Index)=FieldIndex(Index)+1. 
     660        FieldIndex(Index)=FieldIndex(Index)+1 
    667661      endif 
    668662       
     
    11651159      TYPE(t_domain),POINTER :: d 
    11661160      INTEGER :: nvertId,ncid,lonId,latId,bounds_lonId,bounds_latId,timeId,ncellId 
    1167       INTEGER :: dim3id,dim4id 
     1161      INTEGER :: dim3id 
    11681162      INTEGER :: status 
    11691163      INTEGER :: ind,i,j,k,n,q 
    1170       INTEGER :: iie,jje,iin,jjn 
    11711164      INTEGER :: ind_b,ind_e 
    11721165      INTEGER :: halo_size 
     
    11741167      INTEGER :: nij 
    11751168      CHARACTER(LEN=255) :: name 
    1176       INTEGER :: l,level_size, levId, dimlevId 
     1169      INTEGER :: l,level_size, levId 
    11771170             
    11781171      name=TRIM(ADJUSTL(name_in)) 
     
    14771470      TYPE(t_domain),POINTER :: d 
    14781471      INTEGER :: nvertId,ncid,lonId,latId,bounds_lonId,bounds_latId,timeId,ncellId 
    1479       INTEGER :: dim3id,dim4id 
     1472      INTEGER :: dim3id 
    14801473      INTEGER :: status 
    14811474      INTEGER :: ind,i,j,k,n,q 
    1482       INTEGER :: iie,jje,iin,jjn 
    14831475      INTEGER :: ind_b,ind_e 
    14841476      INTEGER :: halo_size 
     
    17831775   USE netcdf_mod 
    17841776   IMPLICIT NONE 
    1785      INTEGER :: i,k,status 
     1777     INTEGER :: i,status 
    17861778!$OMP MASTER      
    17871779     DO i=1,NbField 
     
    18051797    int2str='' 
    18061798    do while (flag) 
    1807       int2str=CHAR(MOD(i,10)+48)//int2str 
     1799      int2str=CHAR(MOD(i,10)+48)//trim(int2str) 
    18081800      i=i/10 
    18091801      if (i==0) flag=.false. 
  • codes/icosagcm/trunk/src/output/xios_mod.F90

    r888 r899  
    99  LOGICAL,SAVE :: using_xios 
    1010 
     11#ifdef CPP_USING_XIOS 
     12   
    1113  INTEGER,SAVE :: ncell_i 
    1214!$OMP THREADPRIVATE(ncell_i) 
     
    1719 
    1820  PRIVATE ncell_i,ncell_v,ncell_e 
    19  
    20 #ifdef CPP_USING_XIOS 
    2121   
    2222CONTAINS 
Note: See TracChangeset for help on using the changeset viewer.