Changeset 1682 for trunk/LMDZ.GENERIC
- Timestamp:
- Mar 31, 2017, 11:31:38 AM (8 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r1673 r1682 1295 1295 >> Followup on updates in LMDZ.COMMON, add print_control_mod.F90 1296 1296 and abort_physic.F90 inphy_common 1297 1298 == 30/03/2017 == EM 1299 >> Keep up with updates in LMDZ.COMMON: 1300 In phystd: 1301 - ocean_slab_mod.F90 : call abort_physic, rather than abort_gcm 1302 - inifis_mod.F90 : initialize print_control variables 1303 - physiq_mod.F90 : add XIOS context initialization and finalization 1304 - xios_output_mod.F90 : update initialize_xios_output initialization 1305 of the horizontal domain 1306 In dynphy_lonlat : 1307 - inigeomphy_mod.F90 : add ind_cell_glo computation and transfer 1308 to init_geometry 1309 - mod_interface_dyn_phys.F90 : use is_north_pole_dyn and is_south_pole_dyn 1310 (instead of is_north_pole, is_south_pole) 1311 1312 In phy_common: 1313 - geometry_mod.F90 : add ind_cell_glo module variable to store global 1314 column index 1315 - init_print_control_mod.F90 : added to initialize print_control_mod module 1316 variables 1317 - print_control_mod.F90 : make initialization occur via init_print_control_mod 1318 to avoid circular module dependencies 1319 - mod_phys_lmdz_mpi_data.F90 : use print_control_mod (rather than iniprint.h) 1320 and define is_north_pole_dyn, is_south_pole_dyn 1321 (instead of is_north_pole, is_south_pole) 1322 - mod_phys_lmdz_mpi_transfert.F90 : use is_north_pole_dyn, is_south_pole_dyn 1323 (instead of is_north_pole, is_south_pole) 1324 - mod_phys_lmdz_omp_data.F90 : add is_omp_master (alias of is_omp_root) module 1325 variable and use print_control_mod (rather than 1326 iniprint.h), and introduce is_north_pole_phy 1327 and is_south_pole_phy 1328 - mod_phys_lmdz_para.F90 : use print_control_mod (rather than iniprint.h) 1329 - physics_distribution_mod.F90 : add call to init_dimphy in 1330 init_physics_distribution -
trunk/LMDZ.GENERIC/libf/dynphy_lonlat/inigeomphy_mod.F90
r1621 r1682 73 73 REAL,ALLOCATABLE,SAVE :: boundslonfi(:,:) 74 74 REAL,ALLOCATABLE,SAVE :: boundslatfi(:,:) 75 !$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi) 75 INTEGER,ALLOCATABLE,SAVE :: ind_cell_glo_fi(:) 76 !$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi,ind_cell_glo_fi) 76 77 77 78 ! Initialize Physics distibution and parameters and interface with dynamics … … 201 202 ALLOCATE(boundslonfi(klon_omp,4)) 202 203 ALLOCATE(boundslatfi(klon_omp,4)) 203 ! CALL initcomgeomphy 204 ALLOCATE(ind_cell_glo_fi(klon_omp)) 205 204 206 205 207 offset = klon_mpi_begin - 1 … … 211 213 boundslonfi(1:klon_omp,:) = boundslonfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 212 214 boundslatfi(1:klon_omp,:) = boundslatfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 215 ind_cell_glo_fi(1:klon_omp)=(/ (i,i=offset+klon_omp_begin,offset+klon_omp_end) /) 213 216 214 217 ! copy over local grid longitudes and latitudes 215 218 CALL init_geometry(klon_omp,lonfi,latfi,boundslonfi,boundslatfi, & 216 airefi, cufi,cvfi)219 airefi,ind_cell_glo_fi,cufi,cvfi) 217 220 218 221 ! copy over preff , ap(), bp(), etc -
trunk/LMDZ.GENERIC/libf/dynphy_lonlat/mod_interface_dyn_phys.F90
r1543 r1682 22 22 23 23 k=1 24 IF (is_north_pole ) THEN24 IF (is_north_pole_dyn) THEN 25 25 index_i(k)=1 26 26 index_j(k)=1 … … 42 42 ENDDO 43 43 44 IF (is_south_pole ) THEN44 IF (is_south_pole_dyn) THEN 45 45 index_i(k)=1 46 46 index_j(k)=jj_end -
trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/iniphysiq_mod.F90
r1573 r1682 73 73 ! and do some initializations 74 74 75 ! Initialize dimphy module 76 call init_dimphy(klon_omp,nlayer)75 ! Initialize dimphy module => Now done in physics_distribution_mod 76 ! call init_dimphy(klon_omp,nlayer) 77 77 78 78 ! copy over preff , ap() and bp() -
trunk/LMDZ.GENERIC/libf/phy_common/geometry_mod.F90
r1543 r1682 30 30 !$OMP THREADPRIVATE(cell_area) 31 31 32 INTEGER,SAVE,ALLOCATABLE :: ind_cell_glo(:) ! global index of a local cell 33 !$OMP THREADPRIVATE(ind_cell_glo) 32 34 33 35 CONTAINS … … 35 37 SUBROUTINE init_geometry(klon,longitude_,latitude_, & 36 38 boundslon_,boundslat_, & 37 cell_area_, dx_,dy_)39 cell_area_,ind_cell_glo_,dx_,dy_) 38 40 USE mod_grid_phy_lmdz, ONLY: nvertex 39 41 USE nrtype, ONLY : PI … … 45 47 REAL,INTENT(IN) :: boundslat_(klon,nvertex) 46 48 REAL,INTENT(IN) :: cell_area_(klon) 49 INTEGER,OPTIONAL,INTENT(IN) :: ind_cell_glo_(klon) 47 50 REAL,OPTIONAL,INTENT(IN) :: dx_(klon) 48 51 REAL,OPTIONAL,INTENT(IN) :: dy_(klon) … … 55 58 ALLOCATE(boundslat(klon,nvertex)) 56 59 ALLOCATE(cell_area(klon)) 60 IF (PRESENT(ind_cell_glo_)) ALLOCATE(ind_cell_glo(klon)) 57 61 IF (PRESENT(dx_)) ALLOCATE(dx(klon)) 58 62 IF (PRESENT(dy_))ALLOCATE(dy(klon)) … … 65 69 boundslat(:,:) = boundslat_(:,:) 66 70 cell_area(:) = cell_area_(:) 71 IF (PRESENT(ind_cell_glo_)) ind_cell_glo(:) = ind_cell_glo_(:) 67 72 IF (PRESENT(dx_)) dx(:) = dx_(:) 68 73 IF (PRESENT(dy_)) dy(:) = dy_(:) -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_mpi_data.F90
r1543 r1682 1 1 ! 2 !$ Header$2 !$Id$ 3 3 ! 4 4 MODULE mod_phys_lmdz_mpi_data 5 ! USE mod_const_mpi6 5 7 6 INTEGER,SAVE :: ii_begin … … 36 35 INTEGER,SAVE :: mpi_size 37 36 INTEGER,SAVE :: mpi_master 38 ! INTEGER,SAVE :: mpi_root39 37 LOGICAL,SAVE :: is_mpi_root 40 38 LOGICAL,SAVE :: is_using_mpi 41 39 42 40 43 LOGICAL,SAVE :: is_north_pole 44 LOGICAL,SAVE :: is_south_pole 41 LOGICAL,SAVE :: is_north_pole_dyn 42 LOGICAL,SAVE :: is_south_pole_dyn 45 43 INTEGER,SAVE :: COMM_LMDZ_PHY 46 44 INTEGER,SAVE :: MPI_REAL_LMDZ ! MPI_REAL8 … … 48 46 CONTAINS 49 47 50 ! SUBROUTINE Init_phys_lmdz_mpi_data(iim,jjp1,nb_proc,distrib)51 48 SUBROUTINE init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, communicator) 52 ! USE mod_const_mpi, ONLY : COMM_LMDZ53 49 IMPLICIT NONE 54 50 #ifdef CPP_MPI 55 51 INCLUDE 'mpif.h' 56 52 #endif 57 INTEGER,INTENT( in) :: nbp58 INTEGER,INTENT( in) :: nbp_lon59 INTEGER,INTENT( in) :: nbp_lat60 INTEGER,INTENT( in) :: communicator53 INTEGER,INTENT(IN) :: nbp 54 INTEGER,INTENT(IN) :: nbp_lon 55 INTEGER,INTENT(IN) :: nbp_lat 56 INTEGER,INTENT(IN) :: communicator 61 57 62 58 INTEGER,ALLOCATABLE :: distrib(:) … … 109 105 110 106 IF (mpi_rank == 0) THEN 111 is_north_pole = .TRUE.112 ELSE 113 is_north_pole = .FALSE.107 is_north_pole_dyn = .TRUE. 108 ELSE 109 is_north_pole_dyn = .FALSE. 114 110 ENDIF 115 111 116 112 IF (mpi_rank == mpi_size-1) THEN 117 is_south_pole = .TRUE.118 ELSE 119 is_south_pole = .FALSE.113 is_south_pole_dyn = .TRUE. 114 ELSE 115 is_south_pole_dyn = .FALSE. 120 116 ENDIF 121 117 … … 187 183 188 184 SUBROUTINE print_module_data 189 !USE print_control_mod, ONLY: lunout185 USE print_control_mod, ONLY: lunout 190 186 IMPLICIT NONE 191 INCLUDE "iniprint.h"192 187 193 188 WRITE(lunout,*) 'ii_begin =', ii_begin … … 217 212 WRITE(lunout,*) 'mpi_master =', mpi_master 218 213 WRITE(lunout,*) 'is_mpi_root =', is_mpi_root 219 WRITE(lunout,*) 'is_north_pole =', is_north_pole220 WRITE(lunout,*) 'is_south_pole =', is_south_pole214 WRITE(lunout,*) 'is_north_pole_dyn =', is_north_pole_dyn 215 WRITE(lunout,*) 'is_south_pole_dyn =', is_south_pole_dyn 221 216 WRITE(lunout,*) 'COMM_LMDZ_PHY =', COMM_LMDZ_PHY 222 217 -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90
r1543 r1682 1 1 ! 2 !$ Header$2 !$Id$ 3 3 ! 4 4 MODULE mod_phys_lmdz_mpi_transfert … … 1693 1693 1694 1694 offset=ii_begin 1695 IF (is_north_pole ) Offset=nbp_lon1695 IF (is_north_pole_dyn) Offset=nbp_lon 1696 1696 1697 1697 … … 1703 1703 1704 1704 1705 IF (is_north_pole ) THEN1705 IF (is_north_pole_dyn) THEN 1706 1706 DO i=1,dimsize 1707 1707 DO ij=1,nbp_lon … … 1711 1711 ENDIF 1712 1712 1713 IF (is_south_pole ) THEN1713 IF (is_south_pole_dyn) THEN 1714 1714 DO i=1,dimsize 1715 1715 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb … … 1737 1737 1738 1738 offset=ii_begin 1739 IF (is_north_pole ) Offset=nbp_lon1739 IF (is_north_pole_dyn) Offset=nbp_lon 1740 1740 1741 1741 … … 1747 1747 1748 1748 1749 IF (is_north_pole ) THEN1749 IF (is_north_pole_dyn) THEN 1750 1750 DO i=1,dimsize 1751 1751 DO ij=1,nbp_lon … … 1755 1755 ENDIF 1756 1756 1757 IF (is_south_pole ) THEN1757 IF (is_south_pole_dyn) THEN 1758 1758 DO i=1,dimsize 1759 1759 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb … … 1782 1782 1783 1783 offset=ii_begin 1784 IF (is_north_pole ) Offset=nbp_lon1784 IF (is_north_pole_dyn) Offset=nbp_lon 1785 1785 1786 1786 … … 1792 1792 1793 1793 1794 IF (is_north_pole ) THEN1794 IF (is_north_pole_dyn) THEN 1795 1795 DO i=1,dimsize 1796 1796 DO ij=1,nbp_lon … … 1800 1800 ENDIF 1801 1801 1802 IF (is_south_pole ) THEN1802 IF (is_south_pole_dyn) THEN 1803 1803 DO i=1,dimsize 1804 1804 DO ij=nbp_lon*(jj_nb-1)+1,nbp_lon*jj_nb … … 1824 1824 1825 1825 offset=ii_begin 1826 IF (is_north_pole ) offset=nbp_lon1826 IF (is_north_pole_dyn) offset=nbp_lon 1827 1827 1828 1828 DO i=1,dimsize … … 1832 1832 ENDDO 1833 1833 1834 IF (is_north_pole ) THEN1834 IF (is_north_pole_dyn) THEN 1835 1835 DO i=1,dimsize 1836 1836 VarOut(1,i)=VarIn(1,i) … … 1854 1854 1855 1855 offset=ii_begin 1856 IF (is_north_pole ) offset=nbp_lon1856 IF (is_north_pole_dyn) offset=nbp_lon 1857 1857 1858 1858 DO i=1,dimsize … … 1862 1862 ENDDO 1863 1863 1864 IF (is_north_pole ) THEN1864 IF (is_north_pole_dyn) THEN 1865 1865 DO i=1,dimsize 1866 1866 VarOut(1,i)=VarIn(1,i) … … 1883 1883 1884 1884 offset=ii_begin 1885 IF (is_north_pole ) offset=nbp_lon1885 IF (is_north_pole_dyn) offset=nbp_lon 1886 1886 1887 1887 DO i=1,dimsize … … 1891 1891 ENDDO 1892 1892 1893 IF (is_north_pole ) THEN1893 IF (is_north_pole_dyn) THEN 1894 1894 DO i=1,dimsize 1895 1895 VarOut(1,i)=VarIn(1,i) -
trunk/LMDZ.GENERIC/libf/phy_common/mod_phys_lmdz_omp_data.F90
r1543 r1682 1 1 ! 2 !$Id: mod_phys_lmdz_omp_data.F90 2 326 2015-07-10 12:24:29Z emillour$2 !$Id: mod_phys_lmdz_omp_data.F90 2429 2016-01-27 12:43:09Z fairhead $ 3 3 ! 4 4 MODULE mod_phys_lmdz_omp_data … … 7 7 INTEGER,SAVE :: omp_rank 8 8 LOGICAL,SAVE :: is_omp_root 9 LOGICAL,SAVE :: is_omp_master ! alias of is_omp_root 9 10 LOGICAL,SAVE :: is_using_omp 11 LOGICAL,SAVE :: is_north_pole_phy, is_south_pole_phy 10 12 11 13 INTEGER,SAVE,DIMENSION(:),ALLOCATABLE :: klon_omp_para_nb … … 16 18 INTEGER,SAVE :: klon_omp_begin 17 19 INTEGER,SAVE :: klon_omp_end 18 !$OMP THREADPRIVATE(omp_rank,klon_omp,is_omp_root,klon_omp_begin,klon_omp_end) 20 !$OMP THREADPRIVATE(omp_rank,klon_omp,is_omp_root,is_omp_master,klon_omp_begin,klon_omp_end) 21 !$OMP THREADPRIVATE(is_north_pole_phy, is_south_pole_phy) 19 22 20 23 CONTAINS 21 24 22 25 SUBROUTINE Init_phys_lmdz_omp_data(klon_mpi) 23 USE dimphy 26 USE dimphy 27 USE mod_phys_lmdz_mpi_data, ONLY : is_north_pole_dyn, is_south_pole_dyn 24 28 IMPLICIT NONE 25 29 INTEGER, INTENT(in) :: klon_mpi … … 43 47 omp_size=OMP_GET_NUM_THREADS() 44 48 !$OMP END MASTER 49 !$OMP BARRIER 45 50 omp_rank=OMP_GET_THREAD_NUM() 46 51 #else … … 56 61 ELSE 57 62 abort_message = 'ANORMAL : OMP_MASTER /= 0' 58 CALL abort_ gcm(modname,abort_message,1)63 CALL abort_physic (modname,abort_message,1) 59 64 ENDIF 60 65 !$OMP END MASTER 61 66 is_omp_master=is_omp_root 62 67 63 68 !$OMP MASTER 69 64 70 ALLOCATE(klon_omp_para_nb(0:omp_size-1)) 65 71 ALLOCATE(klon_omp_para_begin(0:omp_size-1)) … … 80 86 !$OMP END MASTER 81 87 !$OMP BARRIER 88 89 if ((is_north_pole_dyn) .AND. (omp_rank == 0 )) then 90 is_north_pole_phy = .TRUE. 91 else 92 is_north_pole_phy = .FALSE. 93 endif 94 if ((is_south_pole_dyn) .AND. (omp_rank == omp_size-1)) then 95 is_south_pole_phy = .TRUE. 96 else 97 is_south_pole_phy = .FALSE. 98 endif 82 99 83 100 klon_omp=klon_omp_para_nb(omp_rank) … … 90 107 91 108 SUBROUTINE Print_module_data 109 USE print_control_mod, ONLY: lunout 92 110 IMPLICIT NONE 93 INCLUDE "iniprint.h"94 111 95 112 !$OMP CRITICAL -
trunk/LMDZ.GENERIC/libf/phy_common/physics_distribution_mod.F90
r1543 r1682 10 10 nbp, nbp_lon, nbp_lat, nbp_lev, & 11 11 communicator) 12 USE mod_phys_lmdz_para, ONLY: init_phys_lmdz_para 12 USE mod_phys_lmdz_para, ONLY: init_phys_lmdz_para, klon_omp 13 13 USE mod_grid_phy_lmdz, ONLY: init_grid_phy_lmdz 14 USE dimphy, ONLY : Init_dimphy 15 14 16 IMPLICIT NONE 15 17 INTEGER,INTENT(IN) :: grid_type … … 24 26 CALL init_grid_phy_lmdz(grid_type,nvertex, nbp_lon,nbp_lat,nbp_lev) 25 27 CALL init_phys_lmdz_para(nbp,nbp_lon, nbp_lat, communicator) 28 !$OMP PARALLEL 29 CALL init_dimphy(klon_omp,nbp_lev) 30 !$OMP END PARALLEL 26 31 27 32 END SUBROUTINE init_physics_distribution -
trunk/LMDZ.GENERIC/libf/phy_common/print_control_mod.F90
r1673 r1682 7 7 !$OMP THREADPRIVATE(lunout,prt_level,debug) 8 8 9 ! NB: Module variable Initializations done by set_print_control 10 ! routine from init_print_control_mod to avoid circular 11 ! module dependencies 12 9 13 CONTAINS 10 14 11 SUBROUTINE init_print_control 12 USE ioipsl_getin_p_mod, ONLY : getin_p 13 USE mod_phys_lmdz_para, ONLY: is_omp_root, is_master 15 SUBROUTINE set_print_control(lunout_,prt_level_,debug_) 14 16 IMPLICIT NONE 15 16 LOGICAL :: opened 17 INTEGER :: number 17 INTEGER :: lunout_ 18 INTEGER :: prt_level_ 19 LOGICAL :: debug_ 20 21 lunout = lunout_ 22 prt_level = prt_level_ 23 debug = debug_ 18 24 19 !Config Key = prt_level 20 !Config Desc = niveau d'impressions de débogage 21 !Config Def = 0 22 !Config Help = Niveau d'impression pour le débogage 23 !Config (0 = minimum d'impression) 24 prt_level = 0 25 CALL getin_p('prt_level',prt_level) 26 27 !Config Key = lunout 28 !Config Desc = unite de fichier pour les impressions 29 !Config Def = 6 30 !Config Help = unite de fichier pour les impressions 31 !Config (defaut sortie standard = 6) 32 lunout=6 33 CALL getin_p('lunout', lunout) 34 35 IF (is_omp_root) THEN 36 IF (lunout /= 5 .and. lunout /= 6) THEN 37 INQUIRE(FILE='lmdz.out_0000',OPENED=opened,NUMBER=number) 38 IF (opened) THEN 39 lunout=number 40 ELSE 41 OPEN(UNIT=lunout,FILE='lmdz.out_0000',ACTION='write', & 42 STATUS='unknown',FORM='formatted') 43 ENDIF 44 ENDIF 45 ENDIF 46 47 !Config Key = debug 48 !Config Desc = mode debogage 49 !Config Def = false 50 !Config Help = positionne le mode debogage 51 52 debug = .FALSE. 53 CALL getin_p('debug',debug) 54 55 IF (is_master) THEN 56 WRITE(lunout,*)"init_print_control: prt_level=",prt_level 57 WRITE(lunout,*)"init_print_control: lunout=",lunout 58 WRITE(lunout,*)"init_print_control: debug=",debug 59 ENDIF 60 61 END SUBROUTINE init_print_control 25 END SUBROUTINE set_print_control 62 26 63 27 END MODULE print_control_mod -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r1677 r1682 9 9 prad,pg,pr,pcpp) 10 10 11 use init_print_control_mod, only: init_print_control 11 12 use radinc_h, only: ini_radinc_h, naerkind 12 13 use radcommon_h, only: ini_radcommon_h … … 76 77 REAL SSUM 77 78 79 ! Initialize flags lunout, prt_level, debug (in print_control_mod) 80 CALL init_print_control 81 78 82 ! initialize constants in comcstfi_mod 79 83 rad=prad -
trunk/LMDZ.GENERIC/libf/phystd/ocean_slab_mod.F90
r1397 r1682 94 94 IF (error /= 0) THEN 95 95 abort_message='Pb allocation tmp_tslab' 96 CALL abort_ gcm(modname,abort_message,1)96 CALL abort_physic(modname,abort_message,1) 97 97 ENDIF 98 98 tmp_tslab(:,:) = tslab_rst(:,:) … … 100 100 IF (error /= 0) THEN 101 101 abort_message='Pb allocation tmp_tslab_loc' 102 CALL abort_ gcm(modname,abort_message,1)102 CALL abort_physic(modname,abort_message,1) 103 103 ENDIF 104 104 tmp_tslab_loc(:,:) = tslab_rst(:,:) … … 107 107 IF (error /= 0) THEN 108 108 abort_message='Pb allocation tmp_seaice' 109 CALL abort_ gcm(modname,abort_message,1)109 CALL abort_physic(modname,abort_message,1) 110 110 ENDIF 111 111 tmp_seaice(:) = seaice_rst(:) … … 114 114 IF (error /= 0) THEN 115 115 abort_message='Pb allocation tmp_pctsrf_slab' 116 CALL abort_ gcm(modname,abort_message,1)116 CALL abort_physic(modname,abort_message,1) 117 117 ENDIF 118 118 tmp_pctsrf_slab(:) = pctsrf_rst(:) … … 122 122 IF (error /= 0) THEN 123 123 abort_message='Pb allocation tmp_radsol' 124 CALL abort_ gcm(modname,abort_message,1)124 CALL abort_physic(modname,abort_message,1) 125 125 ENDIF 126 126 … … 128 128 IF (error /= 0) THEN 129 129 abort_message='Pb allocation tmp_flux_o' 130 CALL abort_ gcm(modname,abort_message,1)130 CALL abort_physic(modname,abort_message,1) 131 131 ENDIF 132 132 … … 134 134 IF (error /= 0) THEN 135 135 abort_message='Pb allocation tmp_flux_g' 136 CALL abort_ gcm(modname,abort_message,1)136 CALL abort_physic(modname,abort_message,1) 137 137 ENDIF 138 138 … … 141 141 IF (error /= 0) THEN 142 142 abort_message='Pb allocation slab_bils' 143 CALL abort_ gcm(modname,abort_message,1)143 CALL abort_physic(modname,abort_message,1) 144 144 ENDIF 145 145 slab_bils(:) = 0.0 … … 148 148 IF (error /= 0) THEN 149 149 abort_message='Pb allocation dt_hdiff' 150 CALL abort_ gcm(modname,abort_message,1)150 CALL abort_physic(modname,abort_message,1) 151 151 ENDIF 152 152 dt_hdiff = 0.0 … … 155 155 IF (error /= 0) THEN 156 156 abort_message='Pb allocation dt_hdiff' 157 CALL abort_ gcm(modname,abort_message,1)157 CALL abort_physic(modname,abort_message,1) 158 158 ENDIF 159 159 dt_ekman = 0.0 … … 163 163 IF (error /= 0) THEN 164 164 abort_message='Pb allocation lmt_bils' 165 CALL abort_ gcm(modname,abort_message,1)165 CALL abort_physic(modname,abort_message,1) 166 166 ENDIF 167 167 lmt_bils(:) = 0.0 … … 170 170 IF (error /= 0) THEN 171 171 abort_message='Pb allocation slabh' 172 CALL abort_ gcm(modname,abort_message,1)172 CALL abort_physic(modname,abort_message,1) 173 173 ENDIF 174 174 slabh(1)=50. -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r1669 r1682 48 48 use callkeys_mod 49 49 use vertical_layers_mod, only: presnivs, pseudoalt 50 use mod_phys_lmdz_omp_data, ONLY: is_omp_master 50 51 #ifdef CPP_XIOS 51 52 use xios_output_mod, only: initialize_xios_output, & 52 53 update_xios_timestep, & 53 54 send_xios_field 55 use wxios, only: wxios_context_init, xios_context_finalize 54 56 #endif 55 57 implicit none … … 529 531 endif 530 532 533 #ifdef CPP_XIOS 534 ! Initialize XIOS context 535 write(*,*) "physiq: call wxios_context_init" 536 CALL wxios_context_init 537 #endif 531 538 532 539 ! Read 'startfi.nc' file. … … 735 742 presnivs,pseudoalt) 736 743 #endif 744 write(*,*) "physiq: end of firstcall" 737 745 endif ! end of 'firstcall' 738 746 … … 1893 1901 end if 1894 1902 1895 1896 endif ! end of 'lastcall' 1903 endif ! end of 'lastcall' 1897 1904 1898 1905 … … 2181 2188 CALL send_xios_field("u",zu) 2182 2189 CALL send_xios_field("v",zv) 2183 2190 2191 if (lastcall.and.is_omp_master) then 2192 write(*,*) "physiq: call xios_context_finalize" 2193 call xios_context_finalize 2194 endif 2184 2195 #endif 2185 2196 -
trunk/LMDZ.GENERIC/libf/phystd/xios_output_mod.F90
r1626 r1682 26 26 mpi_size, mpi_rank, klon_mpi, & 27 27 is_sequential, is_south_pole_dyn 28 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo 28 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, grid_type, unstructured 29 29 USE print_control_mod, ONLY: lunout, prt_level 30 30 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 31 31 USE regular_lonlat_mod, ONLY: lon_reg, lat_reg 32 32 USE nrtype, ONLY: pi 33 USE wxios 33 #ifdef CPP_XIOS 34 USE xios 35 #endif 36 USE wxios, ONLY: wxios_domain_param, wxios_domain_param_unstructured, wxios_closedef 34 37 IMPLICIT NONE 35 38 … … 60 63 ! 2. Declare horizontal domain 61 64 ! Set values for the mask: 62 IF (mpi_rank == 0) THEN 63 data_ibegin = 0 64 ELSE 65 data_ibegin = ii_begin - 1 66 END IF 67 68 IF (mpi_rank == mpi_size-1) THEN 69 data_iend = nbp_lon 70 ELSE 71 data_iend = ii_end + 1 72 END IF 73 74 if (prt_level>=10) then 75 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end 76 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat 77 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 78 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 79 write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn 80 endif 81 65 ! IF (mpi_rank == 0) THEN 66 ! data_ibegin = 0 67 ! ELSE 68 ! data_ibegin = ii_begin - 1 69 ! END IF 70 71 ! IF (mpi_rank == mpi_size-1) THEN 72 ! data_iend = nbp_lon 73 ! ELSE 74 ! data_iend = ii_end + 1 75 ! END IF 76 77 ! if (prt_level>=10) then 78 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end 79 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat 80 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 81 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend 82 ! write(lunout,*) "initialize_xios_output: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn 83 ! endif 84 85 !$OMP END MASTER 86 !$OMP BARRIER 82 87 ! Initialize the XIOS domain coreesponding to this process: 83 88 if (prt_level>=10) write(lunout,*) "initialize_xios_output: call wxios_domain_param" 84 CALL wxios_domain_param("dom_glo", is_sequential, nbp_lon, jj_nb, nbp_lon, nbp_lat, & 85 1, nbp_lon, ii_begin, ii_end, jj_begin, jj_end, & 86 klon_mpi+2*(nbp_lon-1), data_ibegin, data_iend, & 87 lat_reg*(180./pi), lon_reg*(180./pi), & 88 is_south_pole_dyn,mpi_rank) 89 89 ! CALL wxios_domain_param("dom_glo", is_sequential, nbp_lon, jj_nb, nbp_lon, nbp_lat, & 90 ! 1, nbp_lon, ii_begin, ii_end, jj_begin, jj_end, & 91 ! klon_mpi+2*(nbp_lon-1), data_ibegin, data_iend, & 92 ! lat_reg*(180./pi), lon_reg*(180./pi), & 93 ! is_south_pole_dyn,mpi_rank) 94 95 IF (grid_type==unstructured) THEN 96 CALL wxios_domain_param_unstructured("dom_glo") 97 ELSE 98 CALL wxios_domain_param("dom_glo") 99 ENDIF 100 101 !$OMP MASTER 90 102 ! 3. Declare calendar and time step 91 103 if (prt_level>=10) write(lunout,*) "initialize_xios_output: build calendar"
Note: See TracChangeset
for help on using the changeset viewer.