Changeset 2064


Ignore:
Timestamp:
03/09/21 19:25:28 (11 months ago)
Author:
ymipsl
Message:

XIOS Traing : some update. YM

Location:
XIOS/xios_training
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS/xios_training/hands-on-3/Makefile

    r2060 r2064  
    66FCFLAGS= -I$(XIOS_DIR)/inc  -I$(NETCDF_INCDIR) 
    77# Librairies 
    8 LDFLAGS = -L$(XIOS_DIR)/lib -lxios $(NETCDF_LIBS) -lstdc++ 
     8LDFLAGS = -L$(XIOS_DIR)/lib -lxios $(NETCDFLIBS) -lstdc++ 
    99 
    1010all: test_tp3 
  • XIOS/xios_training/hands-on-3/iodef.xml

    r2045 r2064  
    2525   <file_definition> 
    2626     <file id="output" name="output" output_freq="1ts" type="one_file"> 
    27        <field id="field_A" default_value="1.e20"/> 
     27       <field id="field_A"/> 
    2828     </file> 
    2929   </file_definition> 
  • XIOS/xios_training/hands-on-3/test_tp3.f90

    r2045 r2064  
    2929  
    3030  INTEGER :: ts 
    31    
    32   INTEGER :: ni, nj, ibegin, jbegin 
    3331  
    3432  CALL MPI_INIT(ierr) 
     
    6765  if(rank.EQ.0) print*, "domain size = ", ni_glo, "*", nj_glo 
    6866 
    69   ni=ni_glo/size 
    70   nj=nj_glo 
     67  ALLOCATE(lonvalue(ni_glo)) 
     68  ALLOCATE(latvalue(nj_glo)) 
    7169 
    72   ibegin=ni*rank 
    73   jbegin=0 
    74  
    75   CALL xios_set_domain_attr("domain_A", ni=ni, nj=nj, ibegin=ibegin,jbegin=jbegin) 
    76   print*, "Proc ",rank, "occupies subdomain",ibegin,"->",ibegin+ni,"X",jbegin,"->",jbegin+nj 
    77  
    78  
    79   ALLOCATE(lonvalue(ni)) 
    80   ALLOCATE(latvalue(nj)) 
    81  
    82   DO i=1,ni 
    83     lonvalue(i) = -180 + (rank*ni+i) * 360/ni_glo 
     70  DO i=1,ni_glo 
     71    lonvalue(i) = -180 + i * 360/ni_glo 
    8472  ENDDO 
    8573 
    86   DO j=1,nj 
     74  DO j=1,nj_glo 
    8775    latvalue(j) = -90 + j * 180/nj_glo 
    8876  ENDDO 
    8977 
    9078  CALL xios_set_domain_attr("domain_A", lonvalue_1d=lonvalue,latvalue_1d=latvalue) 
    91    
    92   !--- Case 2 ---! 
    93   ! CALL xios_set_domain_attr("domain_A", data_dim=2, data_ibegin=-1, data_ni=ni+2, data_jbegin=-1, data_nj=nj+2) 
    94    
    95   !--- Case 3 ---! 
    96   CALL xios_set_domain_attr("domain_A", data_dim=2, data_ibegin=1, data_ni=ni-2, data_jbegin=0, data_nj=nj/2) 
    97    
     79 
    9880  CALL xios_close_context_definition() 
    9981 
    100   !--- Case 1 ---! 
    101   ! ALLOCATE(field_A(ni, nj, axis_size)) 
    102   ! field_A(:,:,:)=rank 
    103  
    104   !--- Case 2 ---! 
    105   ! ALLOCATE(field_A(ni+2, nj+2, axis_size)) 
    106   ! field_A(:,:,:)=rank 
    107  
    108   !--- Case 3 ---! 
    109   ALLOCATE(field_A(ni-2, nj/2, axis_size)) 
     82  ALLOCATE(field_A(ni_glo, nj_glo, axis_size)) 
    11083  field_A(:,:,:)=rank 
    11184 
  • XIOS/xios_training/hands-on.env

    r2059 r2064  
    44source ./xios_build/arch.env 
    55export NETCDF_INCLUDE="-I$NETCDF_INCDIR" 
    6 # some install could require also HDF5 to be linked 
    7 export NETCDF_LIBS="-L$NETCDF_LIBDIR -lnetcdf"  
     6export NETCDF_LIBS="-L$NETCDF_LIBDIR -lnetcdf -L$HDF5_LIBDIR -lhdf5_hl -lhdf5 -ldl -lz -lcurl"  
    87 
Note: See TracChangeset for help on using the changeset viewer.