Changeset 4619 for LMDZ6/trunk/libf/phydev
- Timestamp:
- Jul 10, 2023, 1:40:39 AM (17 months ago)
- Location:
- LMDZ6/trunk/libf/phydev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phydev/iophy.F90
r2588 r4619 13 13 14 14 15 #ifdef CPP_XIOS16 15 ! interfaces for both IOIPSL and XIOS 17 16 INTERFACE histwrite_phy 18 17 MODULE PROCEDURE histwrite2d_phy,histwrite3d_phy,histwrite2d_xios,histwrite3d_xios 19 18 END INTERFACE 20 #else 21 ! interfaces for IOIPSL 22 INTERFACE histwrite_phy 23 MODULE PROCEDURE histwrite2d_phy,histwrite3d_phy 24 END INTERFACE 25 #endif 26 27 #ifdef CPP_XIOS 19 28 20 ! interfaces for both IOIPSL and XIOS 29 21 INTERFACE histbeg_phy_all 30 22 MODULE PROCEDURE histbeg_phy, histbeg_phyxios 31 23 END INTERFACE 32 #else33 ! interfaces for IOIPSL34 INTERFACE histbeg_phy_all35 MODULE PROCEDURE histbeg_phy36 END INTERFACE37 #endif38 24 39 25 contains … … 51 37 USE ioipsl, only: flio_dom_set 52 38 #endif 53 #ifdef CPP_XIOS 54 use wxios, only: wxios_domain_param 55 #endif 39 use wxios, only: wxios_domain_param, using_xios 56 40 implicit none 57 41 real,dimension(klon),intent(in) :: rlon … … 122 106 'APPLE',phys_domain_id) 123 107 #endif 124 #ifdef CPP_XIOS 125 ! Set values for the mask:126 IF (mpi_rank == 0) THEN127 data_ibegin = 0128 ELSE129 data_ibegin = ii_begin - 1130 END IF131 132 IF (mpi_rank == mpi_size-1) THEN133 data_iend = nbp_lon134 ELSE135 data_iend = ii_end + 1136 END IF137 138 if (prt_level>=10) then139 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end140 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat141 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend142 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend143 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn144 endif145 146 ! Initialize the XIOS domain coreesponding to this process:147 CALL wxios_domain_param("dom_glo", is_sequential, nbp_lon, jj_nb, nbp_lon, nbp_lat, &148 1, nbp_lon, ii_begin, ii_end, jj_begin, jj_end, &149 klon_mpi+2*(nbp_lon-1), data_ibegin, data_iend, &150 io_lat, io_lon,is_south_pole_dyn,mpi_rank)151 #endif 108 IF (using_xios) THEN 109 ! Set values for the mask: 110 IF (mpi_rank == 0) THEN 111 data_ibegin = 0 112 ELSE 113 data_ibegin = ii_begin - 1 114 END IF 115 116 IF (mpi_rank == mpi_size-1) THEN 117 data_iend = nbp_lon 118 ELSE 119 data_iend = ii_end + 1 120 END IF 121 122 if (prt_level>=10) then 123 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end 124 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat 125 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 126 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 127 write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn 128 endif 129 130 ! Initialize the XIOS domain coreesponding to this process: 131 CALL wxios_domain_param("dom_glo", is_sequential, nbp_lon, jj_nb, nbp_lon, nbp_lat, & 132 1, nbp_lon, ii_begin, ii_end, jj_begin, jj_end, & 133 klon_mpi+2*(nbp_lon-1), data_ibegin, data_iend, & 134 io_lat, io_lon,is_south_pole_dyn,mpi_rank) 135 ENDIF 152 136 !$OMP END MASTER 153 137 … … 184 168 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 185 169 186 #ifdef CPP_XIOS187 170 188 171 ! SUBROUTINE histbeg_phyxios(name,itau0,zjulian,dtime,ffreq,lev,nhori,nid_day) … … 213 196 END SUBROUTINE histbeg_phyxios 214 197 215 #endif216 198 217 199 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 339 321 340 322 ! VERSION DES HISTWRITE DEDIEES AU TOUT-XIOS-XML DEJA UTILISEE DANS PHYDEV 341 #ifdef CPP_XIOS 323 342 324 SUBROUTINE histwrite2d_xios(field_name,field) 343 325 USE dimphy, only: klon 344 326 USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, & 345 327 jj_nb, klon_mpi 346 USE xios, only: xios_send_field328 USE lmdz_xios, only: xios_send_field 347 329 USE print_control_mod, ONLY: prt_level, lunout 348 330 USE mod_grid_phy_lmdz, ONLY: nbp_lon … … 368 350 IF (prt_level >= 10) WRITE(lunout,*)'End histrwrite2d_xios ',trim(field_name) 369 351 END SUBROUTINE histwrite2d_xios 370 #endif371 352 372 353 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 373 354 374 355 ! VERSION DES HISTWRITE DEDIEES AU TOUT-XIOS-XML DEJA UTILISEE DANS PHYDEV 375 #ifdef CPP_XIOS 356 376 357 SUBROUTINE histwrite3d_xios(field_name, field) 377 358 USE dimphy, only: klon, klev 378 359 USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, & 379 360 jj_nb, klon_mpi 380 USE xios, only: xios_send_field361 USE lmdz_xios, only: xios_send_field 381 362 USE print_control_mod, ONLY: prt_level,lunout 382 363 USE mod_grid_phy_lmdz, ONLY: nbp_lon … … 407 388 IF (prt_level >= 10) write(lunout,*)'End histrwrite3d_xios ',trim(field_name) 408 389 END SUBROUTINE histwrite3d_xios 409 #endif410 390 411 391 end module iophy -
LMDZ6/trunk/libf/phydev/physiq_mod.F90
r2643 r4619 23 23 USE mod_grid_phy_lmdz, ONLY: nbp_lon,nbp_lat 24 24 25 #ifdef CPP_XIOS 26 USE xios, ONLY: xios_update_calendar 25 USE lmdz_xios, ONLY: xios_update_calendar, using_xios 27 26 USE wxios, only: wxios_add_vaxis, wxios_set_cal, wxios_closedef 28 27 USE iophy, ONLY: histwrite_phy 29 #endif30 28 31 29 IMPLICIT none … … 126 124 #endif 127 125 128 #ifdef CPP_XIOS 126 IF (using_xios) THEN 129 127 !XIOS 130 ! Declare available vertical axes to be used in output files:131 CALL wxios_add_vaxis("presnivs", klev, presnivs)128 ! Declare available vertical axes to be used in output files: 129 CALL wxios_add_vaxis("presnivs", klev, presnivs) 132 130 133 ! Declare calendar and time step134 CALL wxios_set_cal(dtime,"earth_360d",1,1,1,0.0,1,1,1,0.0)131 ! Declare calendar and time step 132 CALL wxios_set_cal(dtime,"earth_360d",1,1,1,0.0,1,1,1,0.0) 135 133 136 !Finalize the context:137 CALL wxios_closedef()138 #endif 134 !Finalize the context: 135 CALL wxios_closedef() 136 ENDIF 139 137 !$OMP END MASTER 140 138 !$OMP BARRIER … … 176 174 177 175 !XIOS 178 #ifdef CPP_XIOS 179 !$OMP MASTER176 IF (using_xios) THEN 177 !$OMP MASTER 180 178 !Increment XIOS time 181 179 CALL xios_update_calendar(itau) 182 !$OMP END MASTER183 !$OMP BARRIER180 !$OMP END MASTER 181 !$OMP BARRIER 184 182 185 183 !Send fields to XIOS: (NB these fields must also be defined as … … 190 188 CALL histwrite_phy("v",v) 191 189 CALL histwrite_phy("ps",paprs(:,1)) 192 #endif 190 ENDIF 193 191 194 192 ! if lastcall, then it is time to write "restartphy.nc" file
Note: See TracChangeset
for help on using the changeset viewer.