Changeset 2408 for LMDZ5/branches/testing/libf/phylmd/iophy.F90
- Timestamp:
- Dec 14, 2015, 11:43:09 AM (9 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2293-2295,2297,2299-2302,2305-2313,2315,2317-2380,2382-2396
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/iophy.F90
r2160 r2408 46 46 is_sequential, is_south_pole 47 47 USE mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo 48 USE print_control_mod, ONLY: prt_level,lunout 48 49 #ifdef CPP_IOIPSL 49 50 USE ioipsl, only: flio_dom_set … … 53 54 #endif 54 55 IMPLICIT NONE 55 INCLUDE 'dimensions.h'56 include 'iniprint.h'57 56 REAL,DIMENSION(klon),INTENT(IN) :: rlon 58 57 REAL,DIMENSION(klon),INTENT(IN) :: rlat … … 77 76 78 77 !$OMP MASTER 79 ALLOCATE(io_lat(jjm+1-1/(iim*jjm))) 80 io_lat(1)=rlat_glo(1) 81 io_lat(jjm+1-1/(iim*jjm))=rlat_glo(klon_glo) 82 IF ((iim*jjm) > 1) then 83 DO i=2,jjm 84 io_lat(i)=rlat_glo(2+(i-2)*iim) 78 ALLOCATE(io_lat(nbp_lat)) 79 IF (klon_glo == 1) THEN 80 io_lat(1)=rlat_glo(1) 81 ELSE 82 io_lat(1)=rlat_glo(1) 83 io_lat(nbp_lat)=rlat_glo(klon_glo) 84 DO i=2,nbp_lat-1 85 io_lat(i)=rlat_glo(2+(i-2)*nbp_lon) 85 86 ENDDO 86 87 ENDIF 87 88 88 ALLOCATE(io_lon(iim)) 89 io_lon(:)=rlon_glo(2-1/(iim*jjm):iim+1-1/(iim*jjm)) 89 ALLOCATE(io_lon(nbp_lon)) 90 IF (klon_glo == 1) THEN 91 io_lon(1)=rlon_glo(1) 92 ELSE 93 io_lon(1:nbp_lon)=rlon_glo(2:nbp_lon+1) 94 ENDIF 95 90 96 !! (I) dtnb : total number of domains 91 97 !! (I) dnb : domain number … … 104 110 105 111 ddid=(/ 1,2 /) 106 dsg=(/ iim, jjm+1-1/(iim*jjm)/)107 dsl=(/ iim, jj_nb /)112 dsg=(/ nbp_lon, nbp_lat /) 113 dsl=(/ nbp_lon, jj_nb /) 108 114 dpf=(/ 1,jj_begin /) 109 dpl=(/ iim, jj_end /)115 dpl=(/ nbp_lon, jj_end /) 110 116 dhs=(/ ii_begin-1,0 /) 111 117 IF (mpi_rank==mpi_size-1) THEN 112 118 dhe=(/0,0/) 113 119 ELSE 114 dhe=(/ iim-ii_end,0 /)120 dhe=(/ nbp_lon-ii_end,0 /) 115 121 ENDIF 116 122 … … 155 161 mpi_size, mpi_rank 156 162 USE ioipsl, only: flio_dom_set 163 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 157 164 IMPLICIT NONE 158 INCLUDE 'dimensions.h' 159 REAL,DIMENSION(iim),INTENT(IN) :: lon 160 REAL,DIMENSION(jjm+1-1/(iim*jjm)),INTENT(IN) :: lat 165 REAL,DIMENSION(nbp_lon),INTENT(IN) :: lon 166 REAL,DIMENSION(nbp_lat),INTENT(IN) :: lat 161 167 162 168 INTEGER,DIMENSION(2) :: ddid … … 169 175 170 176 !$OMP MASTER 171 allocate(io_lat( jjm+1-1/(iim*jjm)))177 allocate(io_lat(nbp_lat)) 172 178 io_lat(:)=lat(:) 173 allocate(io_lon( iim))179 allocate(io_lon(nbp_lon)) 174 180 io_lon(:)=lon(:) 175 181 176 182 ddid=(/ 1,2 /) 177 dsg=(/ iim, jjm+1-1/(iim*jjm)/)178 dsl=(/ iim, jj_nb /)183 dsg=(/ nbp_lon, nbp_lat /) 184 dsl=(/ nbp_lon, jj_nb /) 179 185 dpf=(/ 1,jj_begin /) 180 dpl=(/ iim, jj_end /)186 dpl=(/ nbp_lon, jj_end /) 181 187 dhs=(/ ii_begin-1,0 /) 182 188 if (mpi_rank==mpi_size-1) then 183 189 dhe=(/0,0/) 184 190 else 185 dhe=(/ iim-ii_end,0 /)191 dhe=(/ nbp_lon-ii_end,0 /) 186 192 endif 187 193 … … 198 204 USE mod_phys_lmdz_para, only: is_sequential, is_using_mpi, is_mpi_root, & 199 205 jj_begin, jj_end, jj_nb 206 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 200 207 use ioipsl, only: histbeg 201 208 #ifdef CPP_XIOS … … 203 210 #endif 204 211 IMPLICIT NONE 205 include 'dimensions.h'206 212 include 'clesphys.h' 207 213 … … 217 223 !$OMP MASTER 218 224 if (is_sequential) then 219 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &220 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)225 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 226 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 221 227 else 222 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &223 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)228 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 229 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 224 230 endif 225 231 … … 240 246 241 247 USE mod_phys_lmdz_para, only: jj_begin, jj_end, jj_nb, is_sequential 248 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 242 249 use ioipsl, only: histbeg 243 250 244 251 IMPLICIT NONE 245 include 'dimensions.h'246 252 247 253 character*(*), INTENT(IN) :: name … … 255 261 #ifndef CPP_IOIPSL_NO_OUTPUT 256 262 if (is_sequential) then 257 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &258 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)263 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 264 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 259 265 else 260 call histbeg(name, iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &261 1, iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)266 call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 267 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 262 268 endif 263 269 #endif … … 274 280 is_sequential, klon_mpi_begin, klon_mpi_end, & 275 281 mpi_rank 276 USE mod_grid_phy_lmdz, only: klon_glo 282 USE mod_grid_phy_lmdz, only: klon_glo, nbp_lon, nbp_lat 277 283 use ioipsl, only: histbeg 278 284 279 285 IMPLICIT NONE 280 include 'dimensions.h'281 286 282 287 REAL,DIMENSION(klon),INTENT(IN) :: rlon … … 304 309 REAL, allocatable, DIMENSION(:) :: npplat, npplon 305 310 REAL, allocatable, DIMENSION(:,:) :: npplat_bounds, npplon_bounds 306 INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm 307 REAL, DIMENSION(iim,jjmp1) :: zx_lon, zx_lat 311 REAL, DIMENSION(nbp_lon,nbp_lat) :: zx_lon, zx_lat 308 312 309 313 CALL gather(rlat,rlat_glo) … … 330 334 endif 331 335 ! 332 IF ( tabij(i).LE. iim) THEN336 IF ( tabij(i).LE.nbp_lon) THEN 333 337 plat_bounds(i,1)=rlat_glo(tabij(i)) 334 338 ELSE 335 plat_bounds(i,1)=rlat_glo(tabij(i)- iim)339 plat_bounds(i,1)=rlat_glo(tabij(i)-nbp_lon) 336 340 ENDIF 337 plat_bounds(i,2)=rlat_glo(tabij(i)+ iim)341 plat_bounds(i,2)=rlat_glo(tabij(i)+nbp_lon) 338 342 ! 339 343 ! print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon_glo(tabij(i)),plon_bounds(i,2) … … 351 355 ENDDO 352 356 353 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlon_glo,zx_lon)354 if (( iim*jjm).gt.1) then355 DO i = 1, iim357 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon) 358 if ((nbp_lon*nbp_lat).gt.1) then 359 DO i = 1, nbp_lon 356 360 zx_lon(i,1) = rlon_glo(i+1) 357 zx_lon(i, jjmp1) = rlon_glo(i+1)361 zx_lon(i,nbp_lat) = rlon_glo(i+1) 358 362 ENDDO 359 363 endif 360 CALL gr_fi_ecrit(1,klon, iim,jjmp1,rlat_glo,zx_lat)364 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat) 361 365 362 366 DO i=1,pim … … 367 371 368 372 if (ipt(i).EQ.1) then 369 plon_bounds(i,1)=zx_lon( iim,jpt(i))373 plon_bounds(i,1)=zx_lon(nbp_lon,jpt(i)) 370 374 plon_bounds(i,2)=360.+zx_lon(ipt(i)+1,jpt(i)) 371 375 endif 372 376 373 if (ipt(i).EQ. iim) then377 if (ipt(i).EQ.nbp_lon) then 374 378 plon_bounds(i,2)=360.+zx_lon(1,jpt(i)) 375 379 endif … … 383 387 endif 384 388 385 if (jpt(i).EQ. jjmp1) then386 plat_bounds(i,1)=zx_lat(ipt(i), jjmp1)+0.001387 plat_bounds(i,2)=zx_lat(ipt(i), jjmp1)-0.001389 if (jpt(i).EQ.nbp_lat) then 390 plat_bounds(i,1)=zx_lat(ipt(i),nbp_lat)+0.001 391 plat_bounds(i,2)=zx_lat(ipt(i),nbp_lat)-0.001 388 392 endif 389 393 ! … … 451 455 use phys_output_var_mod, only: type_ecri, zoutm, zdtime_moy, lev_files, & 452 456 nid_files, nhorim, swaero_diag, nfiles 457 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 453 458 IMPLICIT NONE 454 459 455 INCLUDE "dimensions.h"456 INCLUDE "temps.h"457 460 INCLUDE "clesphys.h" 458 461 … … 478 481 IF ( flag_var(iff)<=lev_files(iff) ) THEN 479 482 CALL histdef (nid_files(iff),nomvar,titrevar,unitvar, & 480 iim,jj_nb,nhorim(iff), 1,1,1, -99, 32, &483 nbp_lon,jj_nb,nhorim(iff), 1,1,1, -99, 32, & 481 484 type_ecri(iff), zstophym,zoutm(iff)) 482 485 ENDIF … … 507 510 nhorim, zdtime_moy, levmin, levmax, & 508 511 nvertm, nfiles 512 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 509 513 IMPLICIT NONE 510 514 511 INCLUDE "dimensions.h"512 INCLUDE "temps.h"513 ! INCLUDE "indicesol.h"514 515 INCLUDE "clesphys.h" 515 516 … … 535 536 IF ( flag_var(iff)<=lev_files(iff) ) THEN 536 537 CALL histdef (nid_files(iff), nomvar, titrevar, unitvar, & 537 iim, jj_nb, nhorim(iff), klev, levmin(iff), &538 nbp_lon, jj_nb, nhorim(iff), klev, levmin(iff), & 538 539 levmax(iff)-levmin(iff)+1, nvertm(iff), 32, type_ecri(iff), & 539 540 zstophym, zoutm(iff)) … … 563 564 clef_stations, phys_out_filenames, lev_files, & 564 565 nid_files, nhorim, swaero_diag 566 USE print_control_mod, ONLY: prt_level,lunout 567 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 565 568 #ifdef CPP_XIOS 566 569 use wxios, only: wxios_add_field_to_file … … 568 571 IMPLICIT NONE 569 572 570 INCLUDE "dimensions.h"571 INCLUDE "temps.h"572 573 INCLUDE "clesphys.h" 573 INCLUDE "iniprint.h"574 574 575 575 INTEGER :: iff … … 621 621 IF ( var%flag(iff)<=lev_files(iff) ) THEN 622 622 CALL histdef (nid_files(iff), var%name, var%description, var%unit, & 623 iim,jj_nb,nhorim(iff), 1,1,1, -99, 32, &623 nbp_lon,jj_nb,nhorim(iff), 1,1,1, -99, 32, & 624 624 typeecrit, zstophym,zoutm(iff)) 625 625 ENDIF … … 650 650 nid_files, nhorim, swaero_diag, levmin, & 651 651 levmax, nvertm 652 USE print_control_mod, ONLY: prt_level,lunout 653 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 652 654 #ifdef CPP_XIOS 653 655 use wxios, only: wxios_add_field_to_file … … 655 657 IMPLICIT NONE 656 658 657 INCLUDE "dimensions.h"658 INCLUDE "temps.h"659 659 INCLUDE "clesphys.h" 660 INCLUDE "iniprint.h"661 660 662 661 INTEGER :: iff … … 708 707 IF ( var%flag(iff)<=lev_files(iff) ) THEN 709 708 CALL histdef (nid_files(iff), var%name, var%description, var%unit, & 710 iim, jj_nb, nhorim(iff), klev, levmin(iff), &709 nbp_lon, jj_nb, nhorim(iff), klev, levmin(iff), & 711 710 levmax(iff)-levmin(iff)+1, nvertm(iff), 32, typeecrit, & 712 711 zstophym, zoutm(iff)) … … 728 727 use ioipsl, only: getin 729 728 use phys_output_var_mod, only: nfiles 729 USE print_control_mod, ONLY: prt_level,lunout 730 730 IMPLICIT NONE 731 732 include 'iniprint.h'733 731 734 732 CHARACTER(LEN=20) :: nam_var … … 750 748 jj_nb, klon_mpi 751 749 USE ioipsl, only: histwrite 750 USE print_control_mod, ONLY: prt_level,lunout 751 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 752 752 IMPLICIT NONE 753 include 'dimensions.h'754 include 'iniprint.h'755 753 756 754 integer,INTENT(IN) :: nid … … 761 759 REAL,DIMENSION(klon_mpi) :: buffer_omp 762 760 INTEGER, allocatable, DIMENSION(:) :: index2d 763 REAL :: Field2d( iim,jj_nb)761 REAL :: Field2d(nbp_lon,jj_nb) 764 762 765 763 integer :: ip … … 767 765 768 766 769 IF (size(field)/=klon) CALL abort_ gcm('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)767 IF (size(field)/=klon) CALL abort_physic('iophy::histwrite2d','Field first DIMENSION not equal to klon',1) 770 768 771 769 CALL Gather_omp(field,buffer_omp) … … 773 771 CALL grid1Dto2D_mpi(buffer_omp,Field2d) 774 772 if(.NOT.lpoint) THEN 775 ALLOCATE(index2d( iim*jj_nb))776 ALLOCATE(fieldok( iim*jj_nb))773 ALLOCATE(index2d(nbp_lon*jj_nb)) 774 ALLOCATE(fieldok(nbp_lon*jj_nb)) 777 775 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' 778 CALL histwrite(nid,name,itau,Field2d, iim*jj_nb,index2d)776 CALL histwrite(nid,name,itau,Field2d,nbp_lon*jj_nb,index2d) 779 777 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 780 778 else … … 814 812 is_sequential, klon_mpi_begin, klon_mpi_end, & 815 813 jj_nb, klon_mpi 814 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 816 815 use ioipsl, only: histwrite 816 USE print_control_mod, ONLY: prt_level,lunout 817 817 IMPLICIT NONE 818 include 'dimensions.h'819 include 'iniprint.h'820 818 821 819 integer,INTENT(IN) :: nid … … 825 823 REAL,DIMENSION(:,:),INTENT(IN) :: field ! --> field(klon,:) 826 824 REAL,DIMENSION(klon_mpi,size(field,2)) :: buffer_omp 827 REAL :: Field3d( iim,jj_nb,size(field,2))825 REAL :: Field3d(nbp_lon,jj_nb,size(field,2)) 828 826 INTEGER :: ip, n, nlev 829 827 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d … … 831 829 832 830 833 IF (size(field,1)/=klon) CALL abort_ gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)831 IF (size(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1) 834 832 nlev=size(field,2) 835 833 … … 838 836 CALL grid1Dto2D_mpi(buffer_omp,field3d) 839 837 if(.NOT.lpoint) THEN 840 ALLOCATE(index3d( iim*jj_nb*nlev))841 ALLOCATE(fieldok( iim*jj_nb,nlev))838 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 839 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 842 840 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' 843 CALL histwrite(nid,name,itau,Field3d, iim*jj_nb*nlev,index3d)841 CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d) 844 842 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 845 843 else … … 889 887 nfiles, vars_defined, clef_stations, & 890 888 nid_files 889 USE print_control_mod, ONLY: prt_level,lunout 890 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 891 891 #ifdef CPP_XIOS 892 892 USE xios, only: xios_send_field … … 895 895 896 896 IMPLICIT NONE 897 INCLUDE 'dimensions.h'898 INCLUDE 'iniprint.h'899 897 include 'clesphys.h' 900 898 … … 909 907 REAL,DIMENSION(klon_mpi) :: buffer_omp 910 908 INTEGER, allocatable, DIMENSION(:) :: index2d 911 REAL :: Field2d( iim,jj_nb)909 REAL :: Field2d(nbp_lon,jj_nb) 912 910 913 911 INTEGER :: ip … … 945 943 946 944 !Et sinon on.... écrit 947 IF (SIZE(field)/=klon) CALL abort_ gcm('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1)945 IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1) 948 946 949 947 if (prt_level >= 10) then … … 971 969 endif 972 970 #else 973 CALL abort_ gcm('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)971 CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) 974 972 #endif 975 973 ELSE … … 990 988 991 989 IF(.NOT.clef_stations(iff)) THEN 992 ALLOCATE(index2d( iim*jj_nb))993 ALLOCATE(fieldok( iim*jj_nb))990 ALLOCATE(index2d(nbp_lon*jj_nb)) 991 ALLOCATE(fieldok(nbp_lon*jj_nb)) 994 992 #ifndef CPP_IOIPSL_NO_OUTPUT 995 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d, iim*jj_nb,index2d)993 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d,nbp_lon*jj_nb,index2d) 996 994 #endif 997 995 !#ifdef CPP_XIOS … … 1049 1047 nfiles, vars_defined, clef_stations, & 1050 1048 nid_files 1049 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1051 1050 #ifdef CPP_XIOS 1052 1051 USE xios, only: xios_send_field 1053 1052 #endif 1054 1053 USE print_control_mod, ONLY: prt_level,lunout 1055 1054 1056 1055 IMPLICIT NONE 1057 INCLUDE 'dimensions.h'1058 INCLUDE 'iniprint.h'1059 1056 include 'clesphys.h' 1060 1057 … … 1067 1064 !$OMP THREADPRIVATE(firstx) 1068 1065 REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp 1069 REAL :: Field3d( iim,jj_nb,SIZE(field,2))1066 REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2)) 1070 1067 INTEGER :: ip, n, nlev, nlevx 1071 1068 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d … … 1095 1092 ELSE 1096 1093 !Et sinon on.... écrit 1097 IF (SIZE(field,1)/=klon) CALL abort_ gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)1094 IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1) 1098 1095 nlev=SIZE(field,2) 1099 1096 if (nlev.eq.klev+1) then … … 1119 1116 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx)) 1120 1117 #else 1121 CALL abort_ gcm('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)1118 CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) 1122 1119 #endif 1123 1120 ELSE … … 1133 1130 write(lunout,*)'histwrite3d_phy: call xios_send_field for ', & 1134 1131 trim(var%name), ' with iim jjm nlevx = ', & 1135 iim,jj_nb,nlevx1132 nbp_lon,jj_nb,nlevx 1136 1133 endif 1137 1134 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx)) … … 1140 1137 #endif 1141 1138 IF (.NOT.clef_stations(iff)) THEN 1142 ALLOCATE(index3d( iim*jj_nb*nlev))1143 ALLOCATE(fieldok( iim*jj_nb,nlev))1139 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 1140 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 1144 1141 1145 1142 #ifndef CPP_IOIPSL_NO_OUTPUT 1146 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field3d, iim*jj_nb*nlev,index3d)1143 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field3d,nbp_lon*jj_nb*nlev,index3d) 1147 1144 #endif 1148 1145 … … 1196 1193 is_sequential, klon_mpi_begin, klon_mpi_end, & 1197 1194 jj_nb, klon_mpi 1195 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1198 1196 USE xios, only: xios_send_field 1199 1197 USE print_control_mod, ONLY: prt_level,lunout 1200 1198 1201 1199 IMPLICIT NONE 1202 INCLUDE 'dimensions.h'1203 INCLUDE 'iniprint.h'1204 1200 1205 1201 CHARACTER(LEN=*), INTENT(IN) :: field_name … … 1208 1204 REAL,DIMENSION(klon_mpi) :: buffer_omp 1209 1205 INTEGER, allocatable, DIMENSION(:) :: index2d 1210 REAL :: Field2d( iim,jj_nb)1206 REAL :: Field2d(nbp_lon,jj_nb) 1211 1207 1212 1208 INTEGER :: ip … … 1216 1212 1217 1213 !Et sinon on.... écrit 1218 IF (SIZE(field)/=klon) CALL abort_ gcm('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon',1)1214 IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon',1) 1219 1215 1220 1216 CALL Gather_omp(field,buffer_omp) … … 1227 1223 !IF(.NOT.clef_stations(iff)) THEN 1228 1224 IF (.TRUE.) THEN 1229 ALLOCATE(index2d( iim*jj_nb))1230 ALLOCATE(fieldok( iim*jj_nb))1225 ALLOCATE(index2d(nbp_lon*jj_nb)) 1226 ALLOCATE(fieldok(nbp_lon*jj_nb)) 1231 1227 1232 1228 … … 1268 1264 jj_nb, klon_mpi 1269 1265 USE xios, only: xios_send_field 1270 1266 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1267 USE print_control_mod, ONLY: prt_level,lunout 1271 1268 1272 1269 IMPLICIT NONE 1273 INCLUDE 'dimensions.h'1274 INCLUDE 'iniprint.h'1275 1270 1276 1271 CHARACTER(LEN=*), INTENT(IN) :: field_name … … 1278 1273 1279 1274 REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp 1280 REAL :: Field3d( iim,jj_nb,SIZE(field,2))1275 REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2)) 1281 1276 INTEGER :: ip, n, nlev 1282 1277 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d … … 1286 1281 1287 1282 !Et on.... écrit 1288 IF (SIZE(field,1)/=klon) CALL abort_ gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)1283 IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1) 1289 1284 nlev=SIZE(field,2) 1290 1285 … … 1299 1294 !IF (.NOT.clef_stations(iff)) THEN 1300 1295 IF(.TRUE.)THEN 1301 ALLOCATE(index3d( iim*jj_nb*nlev))1302 ALLOCATE(fieldok( iim*jj_nb,nlev))1296 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 1297 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 1303 1298 CALL xios_send_field(field_name, Field3d(:,:,1:nlev)) 1304 1299
Note: See TracChangeset
for help on using the changeset viewer.