Ignore:
Timestamp:
2024-01-14T15:15:57+01:00 (6 months ago)
Author:
jan.polcher
Message:

The modifications performed on the trunk for the coupling to WRF and the interpolation by XIOS on curviliean grids has been backported.

Location:
branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel/mod_orchidee_para.F90

    r7792 r8377  
    4141  !! \n 
    4242  !_ ==============================================================================================================================  
    43   SUBROUTINE Init_orchidee_para(communicator) 
     43  SUBROUTINE Init_orchidee_para(communicator, usexios) 
    4444    IMPLICIT NONE 
    4545    INTEGER,OPTIONAL,INTENT(in) :: communicator  
    46  
     46    LOGICAL,OPTIONAL,INTENT(in) :: usexios 
     47     
    4748    CALL Init_orchidee_omp 
    4849 
    49  
    5050    IF ( PRESENT(communicator) ) THEN 
    51        CALL Init_orchidee_mpi(communicator) 
     51       IF ( PRESENT(usexios) ) THEN 
     52          CALL Init_orchidee_mpi(communicator, usexios) 
     53       ELSE 
     54          CALL Init_orchidee_mpi(communicator) 
     55       ENDIF 
    5256    ELSE 
    5357       CALL Init_orchidee_mpi 
    5458    ENDIF 
    55  
    5659 
    5760    IF (is_mpi_root .AND. is_omp_root) THEN 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_parallel/xios_orchidee.f90

    r8011 r8377  
    126126  SUBROUTINE xios_orchidee_init(MPI_COMM_ORCH,                   & 
    127127       date0,    year,      month,             day, julian_diff, & 
    128        lon_mpi,  lat_mpi ) 
     128       lon_mpi,  lat_mpi, bounds2d_lon_mpi, bounds2d_lat_mpi ) 
    129129 
    130130    USE grid, ONLY : grid_type, unstructured, regular_lonlat, regular_xy, nvertex, & 
    131                      longitude, latitude, bounds_lon, bounds_lat, ind_cell_glo 
     131                     longitude, latitude, bounds_lon, bounds_lat, ind_cell_glo, NbSegments 
    132132 
    133133    USE vertical_soil_var, ONLY : znt, znh 
     
    144144    REAL(r_std), INTENT(in)                               :: julian_diff      !! Current day in the year [1,365(366)] 
    145145    REAL(r_std),DIMENSION (iim_g,jj_nb), INTENT(in)       :: lon_mpi, lat_mpi !! Longitudes and latitudes on MPI local domain 2D domain 
     146    REAL(r_std), OPTIONAL, DIMENSION (NbSegments,iim_g,jj_nb), INTENT(in)  :: bounds2d_lon_mpi 
     147    REAL(r_std), OPTIONAL, DIMENSION (NbSegments,iim_g,jj_nb), INTENT(in)  :: bounds2d_lat_mpi 
    146148    ! 
    147149    !! 0.2 Local variables 
     
    304306          ! Global domain 
    305307          CALL xios_set_domain_attr("domain_landpoints", ni_glo=iim_g, nj_glo=jjm_g) 
    306           ! Local MPI domain 
    307           CALL xios_set_domain_attr("domain_landpoints",type="curvilinear", ibegin=0, ni=iim_g, jbegin=jj_begin-1, nj=jj_nb) 
    308  
     308          ! Local MPI domain, nvertex is needed here so that XIOS recognises that it is a curvilieanr grid. 
     309          CALL xios_set_domain_attr("domain_landpoints",type="curvilinear", ibegin=0, ni=iim_g, jbegin=jj_begin-1, & 
     310               &                    nj=jj_nb, nvertex=NbSegments) 
    309311          ! Define how data is stored on memory : 1D array for only continental points 
    310312          CALL xios_set_domain_attr("domain_landpoints",data_dim=1, data_ibegin=0, data_ni=nbp_mpi) 
     
    314316          CALL xios_set_domain_attr("domain_landpoints",lonvalue_2d=lon_mpi,latvalue_2d=lat_mpi) 
    315317 
     318          ! If the bounds are provided in the interface then they are used. If not then probably there is an issue. 
     319          IF (PRESENT(bounds2d_lon_mpi) .AND. PRESENT(bounds2d_lat_mpi)) THEN 
     320             ! Passing the bounds to XIOS so that the interpolations can be used. 
     321             CALL xios_set_domain_attr("domain_landpoints",bounds_lon_2d=bounds2d_lon_mpi) 
     322             CALL xios_set_domain_attr("domain_landpoints",bounds_lat_2d=bounds2d_lat_mpi) 
     323          ELSE 
     324             CALL ipslerr_p(3,'xios_orchidee_init', 'For this curvilinear grid the bounds are not provided.',& 
     325                  'This means that the interpolation of fields through XIOS is not possible.', '') 
     326          ENDIF 
     327           
    316328       ELSE IF (grid_type==unstructured) THEN 
    317329           
Note: See TracChangeset for help on using the changeset viewer.