Changeset 3266 for LMDZ6/trunk
- Timestamp:
- Mar 14, 2018, 7:02:21 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/iophy.F90
r3238 r3266 40 40 ! ug Routine pour définir itau_iophy depuis phys_output_write_mod: 41 41 SUBROUTINE set_itau_iophy(ito) 42 43 44 42 IMPLICIT NONE 43 INTEGER, INTENT(IN) :: ito 44 itau_iophy = ito 45 45 END SUBROUTINE 46 46 47 47 SUBROUTINE init_iophy_new(rlat,rlon) 48 USE dimphy, ONLY: klon 49 USE mod_phys_lmdz_para, ONLY: gather, bcast, & 50 jj_nb, jj_begin, jj_end, ii_begin, ii_end, & 51 mpi_size, mpi_rank, klon_mpi, & 48 49 USE dimphy, ONLY: klon 50 USE mod_phys_lmdz_para, ONLY: gather, bcast, & 51 jj_nb, jj_begin, jj_end, ii_begin, ii_end, & 52 mpi_size, mpi_rank, klon_mpi, & 52 53 is_sequential, is_south_pole_dyn 53 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo54 USE print_control_mod, ONLY: prt_level,lunout54 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo 55 USE print_control_mod, ONLY: prt_level,lunout 55 56 #ifdef CPP_IOIPSL 56 USE ioipsl, ONLY: flio_dom_set57 #endif 58 #ifdef CPP_XIOS 59 USE wxios, ONLY: wxios_domain_param60 #endif 61 IMPLICIT NONE57 USE ioipsl, ONLY: flio_dom_set 58 #endif 59 #ifdef CPP_XIOS 60 USE wxios, ONLY: wxios_domain_param 61 #endif 62 IMPLICIT NONE 62 63 REAL,DIMENSION(klon),INTENT(IN) :: rlon 63 64 REAL,DIMENSION(klon),INTENT(IN) :: rlat … … 163 164 END SUBROUTINE init_iophy_new 164 165 166 165 167 SUBROUTINE init_iophy(lat,lon) 166 USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, ii_begin, ii_end, jj_nb, & 167 mpi_size, mpi_rank 168 USE ioipsl, ONLY: flio_dom_set 169 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 170 IMPLICIT NONE 168 169 USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, ii_begin, ii_end, jj_nb, & 170 mpi_size, mpi_rank 171 USE ioipsl, ONLY: flio_dom_set 172 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 173 174 IMPLICIT NONE 175 171 176 REAL,DIMENSION(nbp_lon),INTENT(IN) :: lon 172 177 REAL,DIMENSION(nbp_lat),INTENT(IN) :: lat … … 216 221 #endif 217 222 IMPLICIT NONE 218 include'clesphys.h'219 220 221 222 223 224 225 226 227 223 INCLUDE 'clesphys.h' 224 225 CHARACTER*(*), INTENT(IN) :: name 226 INTEGER, INTENT(IN) :: itau0 227 REAL,INTENT(IN) :: zjulian 228 REAL,INTENT(IN) :: dtime 229 CHARACTER(LEN=*), INTENT(IN) :: ffreq 230 INTEGER,INTENT(IN) :: lev 231 INTEGER,INTENT(OUT) :: nhori 232 INTEGER,INTENT(OUT) :: nid_day 228 233 229 234 !$OMP MASTER 230 231 callhistbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &232 233 234 callhistbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &235 236 237 238 #ifdef CPP_XIOS 239 240 241 242 243 244 245 235 IF (is_sequential) THEN 236 CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 237 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 238 ELSE 239 CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 240 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 241 ENDIF 242 243 #ifdef CPP_XIOS 244 ! ug OMP en chantier... 245 IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN 246 ! ug Création du fichier 247 IF (.not. ok_all_xml) THEN 248 CALL wxios_add_file(name, ffreq, lev) 249 ENDIF 250 ENDIF 246 251 #endif 247 252 !$OMP END MASTER … … 267 272 #ifndef CPP_IOIPSL_NO_OUTPUT 268 273 IF (is_sequential) THEN 269 callhistbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &274 CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 270 275 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 271 276 ELSE 272 callhistbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &277 CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 273 278 1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 274 279 ENDIF … … 404 409 405 410 #ifndef CPP_IOIPSL_NO_OUTPUT 406 callhistbeg(nname,pim,plon,plon_bounds, &411 CALL histbeg(nname,pim,plon,plon_bounds, & 407 412 plat,plat_bounds, & 408 413 itau0, zjulian, dtime, nnhori, nnid_day) … … 445 450 ENDDO 446 451 #ifndef CPP_IOIPSL_NO_OUTPUT 447 callhistbeg(nname,npstn,npplon,npplon_bounds, &452 CALL histbeg(nname,npstn,npplon,npplon_bounds, & 448 453 npplat,npplat_bounds, & 449 454 itau0,zjulian,dtime,nnhori,nnid_day,phys_domain_id) … … 706 711 USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, & 707 712 clef_stations, phys_out_filenames, lev_files, & 708 nid_files, nhorim, swaerofree_diag, swaero_diag, dryaod_diag,levmin, &713 nid_files, nhorim, swaerofree_diag, levmin, & 709 714 levmax, nvertm 710 715 USE print_control_mod, ONLY: prt_level,lunout … … 740 745 ENDIF 741 746 742 743 747 ! Appel a la lecture des noms et niveau d'ecriture des variables dans output.def 744 748 CALL conf_physoutputs(var%name,var%flag) … … 809 813 810 814 SUBROUTINE histwrite2d_phy_old(nid,lpoint,name,itau,field) 811 USE dimphy, ONLY: klon 812 USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, & 813 is_sequential, klon_mpi_begin, klon_mpi_end, & 814 jj_nb, klon_mpi, is_master 815 USE ioipsl, ONLY: histwrite 816 USE print_control_mod, ONLY: prt_level,lunout 817 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 818 IMPLICIT NONE 815 816 USE dimphy, ONLY: klon 817 USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, & 818 is_sequential, klon_mpi_begin, klon_mpi_end, & 819 jj_nb, klon_mpi, is_master 820 USE ioipsl, ONLY: histwrite 821 USE print_control_mod, ONLY: prt_level,lunout 822 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 823 824 IMPLICIT NONE 819 825 820 826 INTEGER,INTENT(IN) :: nid … … 836 842 !$OMP MASTER 837 843 CALL grid1Dto2D_mpi(buffer_omp,Field2d) 838 if(.NOT.lpoint) THEN844 IF (.NOT.lpoint) THEN 839 845 ALLOCATE(index2d(nbp_lon*jj_nb)) 840 846 ALLOCATE(fieldok(nbp_lon*jj_nb)) … … 874 880 875 881 SUBROUTINE histwrite3d_phy_old(nid,lpoint,name,itau,field) 876 USE dimphy, ONLY: klon 877 USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, & 878 is_sequential, klon_mpi_begin, klon_mpi_end, & 879 jj_nb, klon_mpi, is_master 880 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 881 USE ioipsl, ONLY: histwrite 882 USE print_control_mod, ONLY: prt_level,lunout 883 IMPLICIT NONE 882 883 USE dimphy, ONLY: klon 884 USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, & 885 is_sequential, klon_mpi_begin, klon_mpi_end, & 886 jj_nb, klon_mpi, is_master 887 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 888 USE ioipsl, ONLY: histwrite 889 USE print_control_mod, ONLY: prt_level,lunout 890 891 IMPLICIT NONE 884 892 885 893 INTEGER,INTENT(IN) :: nid … … 903 911 CALL grid1Dto2D_mpi(buffer_omp,field3d) 904 912 IF (.NOT.lpoint) THEN 905 ALLOCATE(index3d(nbp_lon*jj_nb*nlev))906 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))907 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'908 CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d)909 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'910 ELSE913 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 914 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 915 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' 916 CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d) 917 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 918 ELSE 911 919 nlev=size(field,2) 912 920 ALLOCATE(index3d(npstn*nlev)) … … 914 922 915 923 IF (is_sequential) THEN 916 ! klon_mpi_begin=1917 ! klon_mpi_end=klon918 DO n=1, nlev919 DO ip=1, npstn920 fieldok(ip,n)=buffer_omp(nptabij(ip),n)921 ENDDO922 ENDDO924 ! klon_mpi_begin=1 925 ! klon_mpi_end=klon 926 DO n=1, nlev 927 DO ip=1, npstn 928 fieldok(ip,n)=buffer_omp(nptabij(ip),n) 929 ENDDO 930 ENDDO 923 931 ELSE 924 DO n=1, nlev925 DO ip=1, npstn926 IF(nptabij(ip).GE.klon_mpi_begin.AND. &927 nptabij(ip).LE.klon_mpi_end) THEN928 fieldok(ip,n)=buffer_omp(nptabij(ip)-klon_mpi_begin+1,n)929 ENDIF930 ENDDO931 ENDDO932 DO n=1, nlev 933 DO ip=1, npstn 934 IF(nptabij(ip).GE.klon_mpi_begin.AND. & 935 nptabij(ip).LE.klon_mpi_end) THEN 936 fieldok(ip,n)=buffer_omp(nptabij(ip)-klon_mpi_begin+1,n) 937 ENDIF 938 ENDDO 939 ENDDO 932 940 ENDIF 933 941 IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL' … … 935 943 IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL' 936 944 ENDIF 937 DEALLOCATE(index3d)938 DEALLOCATE(fieldok)945 DEALLOCATE(index3d) 946 DEALLOCATE(fieldok) 939 947 !$OMP END MASTER 940 948 941 949 END SUBROUTINE histwrite3d_phy_old 942 943 944 950 945 951 946 952 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE 947 953 SUBROUTINE histwrite2d_phy(var,field, STD_iff) 954 955 USE mod_phys_lmdz_omp_transfert, ONLY: bcast_omp 948 956 USE dimphy, ONLY: klon, klev 949 957 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, & … … 953 961 USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, & 954 962 nfiles, vars_defined, clef_stations, & 955 nid_files 963 nid_files, swaerofree_diag, swaero_diag, dryaod_diag, ok_4xCO2atm 956 964 USE print_control_mod, ONLY: prt_level,lunout 957 965 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat … … 960 968 #endif 961 969 962 963 970 IMPLICIT NONE 964 include'clesphys.h'965 966 967 968 971 INCLUDE 'clesphys.h' 972 973 TYPE(ctrl_out), INTENT(IN) :: var 974 REAL, DIMENSION(:), INTENT(IN) :: field 975 INTEGER, INTENT(IN), OPTIONAL :: STD_iff ! ug RUSTINE POUR LES STD LEVS..... 969 976 970 971 977 INTEGER :: iff, iff_beg, iff_end 978 LOGICAL, SAVE :: firstx 972 979 !$OMP THREADPRIVATE(firstx) 973 980 974 REAL,DIMENSION(klon_mpi) :: buffer_omp 975 INTEGER, allocatable, DIMENSION(:) :: index2d 976 REAL :: Field2d(nbp_lon,jj_nb) 977 978 INTEGER :: ip 979 REAL, ALLOCATABLE, DIMENSION(:) :: fieldok 980 981 IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite2d_phy for ',trim(var%name) 982 983 IF (prt_level >= 10) THEN 984 WRITE(lunout,*)'Begin histwrite2d_phy for ',trim(var%name) 985 ENDIF 981 REAL,DIMENSION(klon_mpi) :: buffer_omp 982 INTEGER, allocatable, DIMENSION(:) :: index2d 983 REAL :: Field2d(nbp_lon,jj_nb) 984 985 INTEGER :: ip 986 REAL, ALLOCATABLE, DIMENSION(:) :: fieldok 987 988 IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite2d_phy for ',trim(var%name) 989 990 IF (prt_level >= 10) THEN 991 WRITE(lunout,*)'Begin histwrite2d_phy for ',trim(var%name) 992 ENDIF 993 986 994 ! ug RUSTINE POUR LES STD LEVS..... 987 988 989 990 991 992 993 995 IF (PRESENT(STD_iff)) THEN 996 iff_beg = STD_iff 997 iff_end = STD_iff 998 ELSE 999 iff_beg = 1 1000 iff_end = nfiles 1001 ENDIF 994 1002 995 1003 ! On regarde si on est dans la phase de définition ou d'écriture: … … 1008 1016 ENDIF 1009 1017 !$OMP END MASTER 1018 !--broadcasting the flags that have been changed in histdef2d on OMP masters 1019 CALL bcast_omp(swaero_diag) 1020 CALL bcast_omp(swaerofree_diag) 1021 CALL bcast_omp(dryaod_diag) 1022 CALL bcast_omp(ok_4xCO2atm) 1023 1010 1024 ELSE 1011 1025 … … 1109 1123 !$OMP END MASTER 1110 1124 ENDIF ! vars_defined 1125 1111 1126 IF (prt_level >= 10) WRITE(lunout,*)'End histwrite2d_phy ',trim(var%name) 1127 1112 1128 END SUBROUTINE histwrite2d_phy 1113 1129 … … 1115 1131 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE 1116 1132 SUBROUTINE histwrite3d_phy(var, field, STD_iff) 1133 1134 USE mod_phys_lmdz_omp_transfert, ONLY: bcast_omp 1117 1135 USE dimphy, ONLY: klon, klev 1118 1136 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, & … … 1122 1140 USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, & 1123 1141 nfiles, vars_defined, clef_stations, & 1124 nid_files 1142 nid_files, swaerofree_diag 1125 1143 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1126 1144 #ifdef CPP_XIOS … … 1130 1148 1131 1149 IMPLICIT NONE 1132 include'clesphys.h'1133 1134 1135 1136 1150 INCLUDE 'clesphys.h' 1151 1152 TYPE(ctrl_out), INTENT(IN) :: var 1153 REAL, DIMENSION(:,:), INTENT(IN) :: field ! --> field(klon,:) 1154 INTEGER, INTENT(IN), OPTIONAL :: STD_iff ! ug RUSTINE POUR LES STD LEVS..... 1137 1155 1138 1139 1156 INTEGER :: iff, iff_beg, iff_end 1157 LOGICAL, SAVE :: firstx 1140 1158 !$OMP THREADPRIVATE(firstx) 1141 1142 1143 1144 1145 1159 REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp 1160 REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2)) 1161 INTEGER :: ip, n, nlev, nlevx 1162 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d 1163 REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok 1146 1164 1147 1165 IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite3d_phy for ', trim(var%name) … … 1159 1177 1160 1178 ! On regarde si on est dans la phase de définition ou d'écriture: 1161 IF (.NOT.vars_defined) THEN1179 IF (.NOT.vars_defined) THEN 1162 1180 !Si phase de définition.... on définit 1163 1181 !$OMP MASTER … … 1168 1186 ENDDO 1169 1187 !$OMP END MASTER 1188 !--broadcasting the flag that have been changed in histdef3d on OMP masters 1189 CALL bcast_omp(swaerofree_diag) 1170 1190 ELSE 1171 1191 !Et sinon on.... écrit … … 1188 1208 CALL grid1Dto2D_mpi(buffer_omp,field3d) 1189 1209 1190 1191 1210 ! BOUCLE SUR LES FICHIERS 1192 firstx=.true. 1193 1194 IF (ok_all_xml) THEN 1195 #ifdef CPP_XIOS 1196 IF (prt_level >= 10) THEN 1197 write(lunout,*)'Dans iophy histwrite3D,var%name ',& 1198 trim(var%name) 1199 ENDIF 1200 IF (SIZE(field,1) == klon) then 1211 firstx=.true. 1212 1213 IF (ok_all_xml) THEN 1214 #ifdef CPP_XIOS 1215 IF (prt_level >= 10) THEN 1216 write(lunout,*)'Dans iophy histwrite3D,var%name ',trim(var%name) 1217 ENDIF 1218 IF (SIZE(field,1) == klon) then 1201 1219 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx)) 1202 1220 ELSE 1203 1221 CALL xios_send_field(var%name, field) 1204 1222 ENDIF 1205 1223 #else 1206 1224 CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) 1207 1225 #endif 1208 ELSE 1209 1210 1211 DO iff=iff_beg, iff_end 1212 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN 1226 ELSE 1227 1228 DO iff=iff_beg, iff_end 1229 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN 1213 1230 #ifdef CPP_XIOS 1214 1231 IF (firstx) THEN … … 1228 1245 ENDIF 1229 1246 #endif 1230 1247 IF (.NOT.clef_stations(iff)) THEN 1231 1248 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 1232 1249 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) … … 1242 1259 !#endif 1243 1260 ! 1244 1261 ELSE 1245 1262 nlev=size(field,2) 1246 1263 ALLOCATE(index3d(npstn*nlev)) … … 1266 1283 CALL histwrite(nid_files(iff),var%name,itau_iophy,fieldok,npstn*nlev,index3d) 1267 1284 #endif 1268 1269 1270 1271 1285 ENDIF 1286 DEALLOCATE(index3d) 1287 DEALLOCATE(fieldok) 1288 ENDIF 1272 1289 ENDDO 1273 1290 ENDIF 1274 1291 !$OMP END MASTER 1275 1292 ENDIF ! vars_defined 1293 1276 1294 IF (prt_level >= 10) write(lunout,*)'End histrwrite3d ',var%name 1295 1277 1296 END SUBROUTINE histwrite3d_phy 1278 1297 … … 1281 1300 #ifdef CPP_XIOS 1282 1301 SUBROUTINE histwrite2d_xios(field_name,field) 1302 1283 1303 USE dimphy, ONLY: klon, klev 1284 1304 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, & … … 1291 1311 IMPLICIT NONE 1292 1312 1293 1294 1313 CHARACTER(LEN=*), INTENT(IN) :: field_name 1314 REAL, DIMENSION(:), INTENT(IN) :: field 1295 1315 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1316 REAL,DIMENSION(klon_mpi) :: buffer_omp 1317 INTEGER, allocatable, DIMENSION(:) :: index2d 1318 REAL :: Field2d(nbp_lon,jj_nb) 1319 1320 INTEGER :: ip 1321 REAL, ALLOCATABLE, DIMENSION(:) :: fieldok 1322 1323 IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite2d_xios for ', field_name 1324 1325 IF (prt_level >= 10) WRITE(lunout,*)'Begin histrwrite2d_xios ',field_name 1326 1327 !Et sinon on.... écrit 1328 IF (SIZE(field)/=klon .AND. SIZE(field)/=klev) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon/klev',1) 1329 1330 IF (SIZE(field) == klev) then 1311 1331 !$OMP MASTER 1312 1332 CALL xios_send_field(field_name,field) 1313 1333 !$OMP END MASTER 1314 1334 ELSE 1315 1335 CALL Gather_omp(field,buffer_omp) 1316 1336 !$OMP MASTER … … 1351 1371 DEALLOCATE(fieldok) 1352 1372 !$OMP END MASTER 1353 1373 ENDIF 1354 1374 1355 1375 IF (prt_level >= 10) WRITE(lunout,*)'End histrwrite2d_xios ',field_name … … 1359 1379 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE 1360 1380 SUBROUTINE histwrite3d_xios(field_name, field) 1381 1361 1382 USE dimphy, ONLY: klon, klev 1362 1383 USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, & … … 1369 1390 IMPLICIT NONE 1370 1391 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1392 CHARACTER(LEN=*), INTENT(IN) :: field_name 1393 REAL, DIMENSION(:,:), INTENT(IN) :: field ! --> field(klon,:) 1394 1395 REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp 1396 REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2)) 1397 INTEGER :: ip, n, nlev 1398 INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d 1399 REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok 1400 1401 IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite3d_xios for ', field_name 1402 1403 IF (prt_level >= 10) write(lunout,*)'Begin histrwrite3d_xios ',field_name 1404 1405 !Et on.... écrit 1406 IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev) CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1) 1407 1408 IF (SIZE(field,1) == klev) then 1388 1409 !$OMP MASTER 1389 1410 CALL xios_send_field(field_name,field) 1390 1411 !$OMP END MASTER 1391 1412 ELSE 1392 1413 nlev=SIZE(field,2) 1393 1414 … … 1431 1452 DEALLOCATE(fieldok) 1432 1453 !$OMP END MASTER 1433 1454 ENDIF 1434 1455 1435 1456 IF (prt_level >= 10) write(lunout,*)'End histrwrite3d_xios ',field_name 1457 1436 1458 END SUBROUTINE histwrite3d_xios 1437 1459 … … 1443 1465 IMPLICIT NONE 1444 1466 1445 1446 1447 1448 1467 CHARACTER(LEN=*), INTENT(IN) :: field_name 1468 REAL, INTENT(IN) :: field ! --> scalar 1469 1470 IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite0d_xios for ', field_name 1449 1471 1450 1472 !$OMP MASTER 1451 1473 CALL xios_send_field(field_name, field) 1452 1474 !$OMP END MASTER 1453 1475 … … 1456 1478 1457 1479 #endif 1458 end moduleiophy1480 END MODULE iophy
Note: See TracChangeset
for help on using the changeset viewer.