Changeset 75
- Timestamp:
- 06/28/16 18:04:12 (8 years ago)
- Location:
- trunk/SOURCES
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SOURCES/Ant40_files/lect-anteis_mod.f90
r46 r75 37 37 38 38 integer :: ios 39 ! pour les lectures ncdf 40 real*8, dimension(:,:), pointer :: tab !< tableau 2d real pointer 39 41 40 42 namelist/topo_file/topo_ref,topo_dep,grid_topo,ghf_fich … … 101 103 ! voir init_iso et a avoir une surface de reference pour les temperatures 102 104 ! lecture adaptee aux fichiers ZBL.dat ou netcdf ou grd 103 call lect_input(1,'Bsoc',1,Bsoc0,topo_ref,file_ncdf) ! socle 104 call lect_input(1,'S',1,S0,topo_ref,file_ncdf) ! surface 105 call lect_input(1,'H',1,H0,topo_ref,file_ncdf) ! epaisseur 105 ! call lect_input(1,'Bsoc',1,Bsoc0,topo_ref,file_ncdf) ! socle 106 ! call lect_input(1,'S',1,S0,topo_ref,file_ncdf) ! surface 107 ! call lect_input(1,'H',1,H0,topo_ref,file_ncdf) ! epaisseur 108 109 ! lecture pour eviter plantage avec compile -O0 110 call Read_Ncdf_var('Bsoc',topo_ref,tab) 111 Bsoc0(:,:) = tab(:,:) 112 call Read_Ncdf_var('S',topo_ref,tab) 113 S0(:,:) = tab(:,:) 114 call Read_Ncdf_var('H',topo_ref,tab) 115 H0(:,:) = tab(:,:) 106 116 !cdc correction point pole sud : 107 117 ! S0(71,71)=(S0(71,70)+S0(71,72)+S0(70,71)+S0(72,71))/4. … … 127 137 ! --------------------------- 128 138 ! lecture adaptee aux fichiers ZBL.dat ou netcdf ou grd 129 call lect_input(1,'Bsoc',1,Bsoc,topo_dep,file_ncdf) ! socle 130 call lect_input(1,'S',1,S,topo_dep,file_ncdf) ! surface 131 call lect_input(1,'H',1,H,topo_dep,file_ncdf) ! epaisseur 139 ! call lect_input(1,'Bsoc',1,Bsoc,topo_dep,file_ncdf) ! socle 140 ! call lect_input(1,'S',1,S,topo_dep,file_ncdf) ! surface 141 ! call lect_input(1,'H',1,H,topo_dep,file_ncdf) ! epaisseur 142 ! lecture pour eviter plantage avec compile -O0 143 call Read_Ncdf_var('Bsoc',topo_dep,tab) 144 Bsoc(:,:) = tab(:,:) 145 call Read_Ncdf_var('S',topo_dep,tab) 146 S(:,:) = tab(:,:) 147 call Read_Ncdf_var('H',topo_dep,tab) 148 H(:,:) = tab(:,:) 149 132 150 ! S(71,71)=(S(71,70)+S(71,72)+S(70,71)+S(72,71))/4. 133 151 ! Bsoc(71,71)=(Bsoc(71,70)+Bsoc(71,72)+Bsoc(70,71)+Bsoc(72,71))/4. … … 242 260 ! close(88) 243 261 244 call lect_input(1,'ghf',1,ghf,ghf_fich,file_ncdf) 262 ! call lect_input(1,'ghf',1,ghf,ghf_fich,file_ncdf) 263 ! pour eviter plantage -O0 264 call Read_Ncdf_var('ghf',ghf_fich,tab) 265 ghf(:,:) = tab(:,:) 245 266 246 267 ! pour passer les flux des mW/m2 au J/m2/an -
trunk/SOURCES/Fichiers-parametres/Makefile.tof-lsce3130.inc
r72 r75 28 28 29 29 # librairies 30 NCDF_INC = $(NETCDFHOME)/include30 NCDF_INC = -I$(NETCDFHOME)/include 31 31 NCDF_LIB = -L$(NETCDFHOME)/lib -lnetcdf -lnetcdff 32 32 33 33 # utilisation de MKL : 34 34 ifeq ($(mkl_c), 1) 35 MKL_LIB = -L$MKLROOT/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread 36 export $MKL_LIB 35 MKL_LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm # MKL parallele 36 # MKL_LIB = -L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm # MKL sequentiel 37 MKL_INC = -I$(MKLROOT)/include 37 38 endif 38 39 39 40 IFORT= ifort 40 41 41 ARITHMi = -O2 -fp-model precise -heap-arrays -traceback -mcmodel=medium #-openmp # -warn -traceback -CB -g # options pour une meilleure arithmetique42 ARITHMi = -O2 -fp-model precise 42 43 # (normalement reproductible) 43 44 ifeq ($(debug), 1) 44 ARITHM = $(ARITHMi) -CB -g -p -traceback -warn all -openmp45 ARITHM = $(ARITHMi) -CB -g -p -traceback -warn all #-openmp 45 46 else 46 47 ARITHM = $(ARITHMi) -diag-disable warn … … 50 51 # ARITHM = -03 # trop brutal ne pas utiliser 51 52 52 FT = $(IFORT) $(ARITHM) #-traceback -CB #-g #-pg # -g # -pg -ipo !aurel : j'ai enleve -CB53 FT = $(IFORT) $(ARITHM) $(MKL_INC) #-traceback -CB #-g #-pg # -g # -pg -ipo !aurel : j'ai enleve -CB 53 54 LK = $(IFORT) $(ARITHM) -i_dynamic # -traceback -CB # -g #-pg #-g # -pg 54 NETCDFINCLUDE = -I$(NCDF_INC)55 55 F_NETCDF = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback -CB #-g #-pg -ipo # -g 56 56 #FT = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) # -traceback -CB #-g #-pg -ipo # -g … … 79 79 FT = $(IFORT) $(ARITHM) -c 80 80 LK = $(IFORT) $(ARITHM) 81 NETCDFINCLUDE = -I$(NCDF_INC)82 81 F_NETCDF = $(IFORT) $(ARITHM) -c -I$(NCDF_INC) 83 82 endif -
trunk/SOURCES/Makefile.grisli.inc
r68 r75 341 341 echo 'entree fichier parametre par commande echo job' 342 342 343 $(FT) $(N ETCDFINCLUDE) -c initial-phy-2-job.f90343 $(FT) $(NCDF_INC) -c initial-phy-2-job.f90 344 344 else 345 345 echo ' fichier parametre defini par runname' 346 $(FT) $(N ETCDFINCLUDE) -c initial-phy-2.f90346 $(FT) $(NCDF_INC) -c initial-phy-2.f90 347 347 endif 348 348 349 349 # Hemin40_files : 350 350 %.o: Hemin40_files/%.f90 351 $(FT) $(N ETCDFINCLUDE) -c Hemin40_files/$*.f90351 $(FT) $(NCDF_INC) -c Hemin40_files/$*.f90 352 352 353 353 # Hemin15_files 354 354 %.o: Hemin15_files/%.f90 355 $(FT) $(N ETCDFINCLUDE) -c Hemin15_files/$*.f90355 $(FT) $(NCDF_INC) -c Hemin15_files/$*.f90 356 356 357 357 # Antarctique_general_files 358 358 %.o: Antarctique_general_files/%.f90 359 $(FT) $(N ETCDFINCLUDE) -c Antarctique_general_files/$*.f90359 $(FT) $(NCDF_INC) -c Antarctique_general_files/$*.f90 360 360 361 361 # GrIce2sea_files 362 362 %.o: GrIce2sea_files/%.f90 363 $(FT) $(N ETCDFINCLUDE) -c GrIce2sea_files/$*.f90363 $(FT) $(NCDF_INC) -c GrIce2sea_files/$*.f90 364 364 365 365 # Ant40_files 366 366 %.o: Ant40_files/%.f90 367 $(FT) $(N ETCDFINCLUDE) -c Ant40_files/$*.f90367 $(FT) $(NCDF_INC) -c Ant40_files/$*.f90 368 368 369 369 # ANT15-LBq_files 370 370 %.o: ANT15-LBq_files/%.f90 371 $(FT) $(N ETCDFINCLUDE) -c ANT15-LBq_files/$*.f90371 $(FT) $(NCDF_INC) -c ANT15-LBq_files/$*.f90 372 372 373 373 # Greeneem_files/Greeneem15_files 374 374 %.o: Greeneem_files/Greeneem15_files/%.f90 375 $(FT) $(N ETCDFINCLUDE) -c Greeneem_files/Greeneem15_files/$*.f90375 $(FT) $(NCDF_INC) -c Greeneem_files/Greeneem15_files/$*.f90 376 376 377 377 # Greeneem_files 378 378 %.o: Greeneem_files/%.f90 379 $(FT) $(N ETCDFINCLUDE) -c Greeneem_files/$*.f90379 $(FT) $(NCDF_INC) -c Greeneem_files/$*.f90 380 380 381 381 # Draggings_modules 382 382 %.o: Draggings_modules/%.f90 383 $(FT) $(N ETCDFINCLUDE) -c Draggings_modules/$*.f90383 $(FT) $(NCDF_INC) -c Draggings_modules/$*.f90 384 384 385 385 # Snowball_files 386 386 %.o: Snowball_files/%.f90 387 $(FT) $(N ETCDFINCLUDE) -c Snowball_files/$*.f90387 $(FT) $(NCDF_INC) -c Snowball_files/$*.f90 388 388 389 389 390 390 # subroutines communes : 391 391 %.o: %.f90 392 $(FT) $(N ETCDFINCLUDE) -c $*.f90392 $(FT) $(NCDF_INC) -c $*.f90 393 393 394 394 # New-remplimat : 395 395 %.o : New-remplimat/%.f90 396 $(FT) $(N ETCDFINCLUDE) -c New-remplimat/$*.f90396 $(FT) $(NCDF_INC) -c New-remplimat/$*.f90 397 397 398 398 # Netcdf-routines : 399 399 %.o: Netcdf-routines/%.f90 400 $(FT) $(N ETCDFINCLUDE) -c Netcdf-routines/$*.f90400 $(FT) $(NCDF_INC) -c Netcdf-routines/$*.f90 401 401 402 402 #toy_recul : 403 403 %.o: Recul_force_grounding_line/%.f90 404 $(FT) $(N ETCDFINCLUDE) -c Recul_force_grounding_line/$*.f90404 $(FT) $(NCDF_INC) -c Recul_force_grounding_line/$*.f90 405 405 406 406 #Temperature : 407 407 %.o : Temperature-routines/%.f90 408 $(FT) $(N ETCDFINCLUDE) -c Temperature-routines/$*.f90408 $(FT) $(NCDF_INC) -c Temperature-routines/$*.f90 409 409 410 410 # BLAS : -
trunk/SOURCES/New-remplimat/remplimat-shelves-tabTu.f90
r74 r75 1043 1043 subroutine Mu_Mv 1044 1044 1045 !$ USE OMP_LIB 1045 1046 !--------------------------------------------------------- 1046 1047 ! Pour déterminer Mu, Mv, Nu, Nv les colonnes de L2 … … 1050 1051 ! pourrait être dans un autre fichier 1051 1052 1053 implicit none 1054 1052 1055 if (itracebug.eq.1) call tracebug(' Mu_Mv') 1053 1056 1057 !$OMP PARALLEL 1058 !$OMP DO PRIVATE(ilmin,ilmax,jlmin,jlmax) 1054 1059 Col_U: do j=ny1,ny2 ! balaye tous les noeuds U 1055 1060 do i=nx1+1,nx2 … … 1077 1082 end do 1078 1083 end do Col_U 1079 1084 !$OMP END DO 1085 1086 !$OMP DO PRIVATE(ilmin,ilmax,jlmin,jlmax) 1080 1087 Col_V: do j=ny1+1,ny2 ! balaye tous les noeuds V 1081 1088 do i=nx1,nx2 … … 1102 1109 end do 1103 1110 end do Col_V 1111 !$OMP END DO 1112 !$OMP END PARALLEL 1104 1113 1105 1114 return … … 1110 1119 subroutine okmat0 1111 1120 1121 !$ USE OMP_LIB 1112 1122 ! pourrais être dans un autre fichier avec un appel (nx1,nx2,ny1,ny2) 1113 1123 … … 1117 1127 ! et qui ne dépendent d'aucun noeud (ligne Tu,Tv nulle sauf diagonale) 1118 1128 1119 1129 implicit none 1120 1130 1121 1131 ! tableaux de travail … … 1137 1147 pvi_ghost=40.*pvimin 1138 1148 !pvi_ghost=10.*pvimin ! condition trop faible : pas de ghost 1139 1149 !$OMP PARALLEL 1150 !$OMP WORKSHARE 1140 1151 ok_umat(:,:) =.false. 1141 1152 ok_vmat(:,:) =.false. 1142 1153 ghost_x(:,:) =.false. 1143 1154 ghost_y(:,:) =.false. 1144 1145 1155 !$OMP END WORKSHARE 1156 1157 !$OMP DO PRIVATE(Mloc,Nloc,Tuloc,Tvloc,Suloc,Svloc) 1146 1158 do j=ny1,ny2 1147 1159 do i=nx1,nx2 … … 1240 1252 end do 1241 1253 end do 1242 1254 !$OMP END DO 1243 1255 1244 1256 ! on enleve les lignes 1 decalees 1257 !$OMP WORKSHARE 1245 1258 ok_umat(1,:)=.false. 1246 1259 ok_vmat(:,1)=.false. 1260 !$OMP END WORKSHARE 1261 !$OMP END PARALLEL 1247 1262 1248 1263 ! sortie Netcdf pour verifier ok_umat 1249 where (ok_umat(:,:))1250 debug_3D(:,:,39)=11251 elsewhere1252 debug_3D(:,:,39)=01253 end where1254 1255 where (ok_vmat(:,:))1256 debug_3D(:,:,40)=11257 elsewhere1258 debug_3D(:,:,40)=01259 end where1260 1261 ! sortie Netcdf pour verifier ghost1262 where (ghost_x(:,:))1263 debug_3D(:,:,41)=11264 elsewhere1265 debug_3D(:,:,41)=01266 1267 end where1268 1269 where (ghost_y(:,:))1270 debug_3D(:,:,42)=11271 elsewhere1272 debug_3D(:,:,42)=01273 end where1264 !~ where (ok_umat(:,:)) 1265 !~ debug_3D(:,:,39)=1 1266 !~ elsewhere 1267 !~ debug_3D(:,:,39)=0 1268 !~ end where 1269 !~ 1270 !~ where (ok_vmat(:,:)) 1271 !~ debug_3D(:,:,40)=1 1272 !~ elsewhere 1273 !~ debug_3D(:,:,40)=0 1274 !~ end where 1275 !~ 1276 !~ ! sortie Netcdf pour verifier ghost 1277 !~ where (ghost_x(:,:)) 1278 !~ debug_3D(:,:,41)=1 1279 !~ elsewhere 1280 !~ debug_3D(:,:,41)=0 1281 !~ 1282 !~ end where 1283 !~ 1284 !~ where (ghost_y(:,:)) 1285 !~ debug_3D(:,:,42)=1 1286 !~ elsewhere 1287 !~ debug_3D(:,:,42)=0 1288 !~ end where 1274 1289 1275 1290 if (itracebug.eq.1) call tracebug(' Sortie Okmat') … … 1279 1294 !-------------------------------------------------------------------------------------- 1280 1295 subroutine ghost_identite ! mise a identite des noeuds fantomes 1281 1296 !$ USE OMP_LIB 1297 1298 implicit none 1299 1300 !$OMP PARALLEL 1301 !$OMP DO 1282 1302 do j=ny1,ny2 1283 1303 do i=nx1,nx2 … … 1300 1320 end do 1301 1321 end do 1322 !$OMP END DO 1323 !$OMP END PARALLEL 1302 1324 1303 1325 return … … 1306 1328 1307 1329 subroutine ghost_remove ! met a 0 les Tuij ... qui corresponde a des ghost 1308 1330 !$ USE OMP_LIB 1331 1332 implicit none 1333 1334 !$OMP PARALLEL 1335 !$OMP DO PRIVATE(ilmin,ilmax,jlmin,jlmax) 1309 1336 do j=ny1,ny2 1310 1337 do i=nx1,nx2 1311 1338 1312 1339 !u_ghost: if (ok_umat(i,j)) then 1313 1340 1314 1341 1315 ilmin=max(-1,nx1+1-i) ! pour avoir i+il entre nx1+1 et nx2 1316 ilmax=min(1,nx2-i) 1317 1318 jlmin=max(-1,ny1-j) ! pour avoir j+jl entre ny1 et ny2 1319 jlmax=min(1,ny2-j) 1320 1321 1322 1323 do jl = jlmin , jlmax ! balaye tous les coefficients d'un noeud U de -1 a 1 1324 do il = ilmin , ilmax ! de -1 a 1 1325 1326 if (ghost_x(i+il,j+jl)) then 1327 Tu(i,j,il,jl)=0. 1328 Su(i,j,il,jl)=0. 1329 end if 1330 1331 end do 1332 end do 1342 ilmin=max(-1,nx1+1-i) ! pour avoir i+il entre nx1+1 et nx2 1343 ilmax=min(1,nx2-i) 1344 1345 jlmin=max(-1,ny1-j) ! pour avoir j+jl entre ny1 et ny2 1346 jlmax=min(1,ny2-j) 1347 1348 do jl = jlmin , jlmax ! balaye tous les coefficients d'un noeud U de -1 a 1 1349 do il = ilmin , ilmax ! de -1 a 1 1350 if (ghost_x(i+il,j+jl)) then 1351 Tu(i,j,il,jl)=0. 1352 Su(i,j,il,jl)=0. 1353 end if 1354 end do 1355 end do 1333 1356 ! end if u_ghost 1334 1357 1335 1358 !v_ghost: if (ok_vmat(i,j)) then 1336 1359 1337 ilmin=max(-1,nx1-i) ! pour avoir i+il entre nx1 et nx2 1338 ilmax=min(1,nx2-i) 1339 1340 jlmin=max(-1,ny1+1-j) ! pour avoir j+jl entre ny1+1 et ny2 1341 jlmax=min(1,ny2-j) 1342 1343 do jl = jlmin , jlmax ! balaye tous les coefficients d'un noeud U de -1 a 1 1344 do il = ilmin , ilmax ! de -1 a 1 1345 if (ghost_y(i+il,j+jl)) then 1346 Tv(i,j,il,jl)=0. 1347 Sv(i,j,il,jl)=0. 1348 end if 1349 end do 1350 end do 1351 1360 ilmin=max(-1,nx1-i) ! pour avoir i+il entre nx1 et nx2 1361 ilmax=min(1,nx2-i) 1362 1363 jlmin=max(-1,ny1+1-j) ! pour avoir j+jl entre ny1+1 et ny2 1364 jlmax=min(1,ny2-j) 1365 1366 do jl = jlmin , jlmax ! balaye tous les coefficients d'un noeud U de -1 a 1 1367 do il = ilmin , ilmax ! de -1 a 1 1368 if (ghost_y(i+il,j+jl)) then 1369 Tv(i,j,il,jl)=0. 1370 Sv(i,j,il,jl)=0. 1371 end if 1372 end do 1373 end do 1352 1374 ! end if v_ghost 1353 1354 end do 1355 end do 1356 end subroutine ghost_remove 1375 end do 1376 end do 1377 !$OMP END DO 1378 !$OMP END PARALLEL 1379 end subroutine ghost_remove 1357 1380 !---------------------------------------------------------------------------------------- 1358 1381 subroutine calc_beta(uxgiven,uygiven) ! calcule betamx et betamy 1359 1382 !$USE OMP_LIB ! a partir du champ de vitesse 1360 1383 ! uxprec, uyprec 1361 1384 implicit none … … 1366 1389 real :: betamin = 10. ! minimum value on grounded point (in Pa an /m) 1367 1390 1368 debug_3D(:,:,69)=uxgiven(:,:)1369 debug_3D(:,:,70)=uygiven(:,:)1391 !debug_3D(:,:,69)=uxgiven(:,:) 1392 !debug_3D(:,:,70)=uygiven(:,:) 1370 1393 1371 1394 1372 1395 if (itracebug.eq.1) call tracebug(' Subroutine calc_beta') 1373 1396 1397 !$OMP PARALLEL 1398 !$OMP DO 1374 1399 do j=ny1+1,ny2-1 1375 1400 do i=nx1+1,nx2-1 … … 1384 1409 +Tv(i,j,il,jl)*uygiven(i+il,j+jl)) 1385 1410 1386 debug_3D(i,j,82)=debug_3D(i,j,82) + (Tu(i,j,il,jl)*uxgiven(i+il,j+jl) &1387 +Tv(i,j,il,jl)*uygiven(i+il,j+jl))1411 ! debug_3D(i,j,82)=debug_3D(i,j,82) + (Tu(i,j,il,jl)*uxgiven(i+il,j+jl) & 1412 ! +Tv(i,j,il,jl)*uygiven(i+il,j+jl)) 1388 1413 1389 1414 end do 1390 1415 end do 1391 1416 1392 debug_3D(i,j,82)=debug_3D(i,j,82)/dx/dx ! longitudinal stress computed from velocities1417 ! debug_3D(i,j,82)=debug_3D(i,j,82)/dx/dx ! longitudinal stress computed from velocities 1393 1418 1394 1419 … … 1416 1441 1417 1442 betamy(i,j)=-opposy(i,j) 1418 debug_3D(i,j,36) = opposy(i,j)/dx/dx ! driving stress ou pression hydrostatique (Pa)1443 ! debug_3D(i,j,36) = opposy(i,j)/dx/dx ! driving stress ou pression hydrostatique (Pa) 1419 1444 do jl=-1,1 1420 1445 do il=-1,1 … … 1423 1448 +Sv(i,j,il,jl)*uygiven(i+il,j+jl)) 1424 1449 1425 debug_3D(i,j,83)=debug_3D(i,j,83) + (Su(i,j,il,jl)*uxgiven(i+il,j+jl) &1426 +Sv(i,j,il,jl)*uygiven(i+il,j+jl))1450 ! debug_3D(i,j,83)=debug_3D(i,j,83) + (Su(i,j,il,jl)*uxgiven(i+il,j+jl) & 1451 ! +Sv(i,j,il,jl)*uygiven(i+il,j+jl)) 1427 1452 1428 1453 … … 1430 1455 end do 1431 1456 1432 debug_3D(i,j,83)=debug_3D(i,j,83) /dx/dx ! longitudinal stress computed from velocities1457 ! debug_3D(i,j,83)=debug_3D(i,j,83) /dx/dx ! longitudinal stress computed from velocities 1433 1458 1434 1459 ! fonctionne même quand frotmx n'est pas nul … … 1453 1478 end do 1454 1479 end do 1455 1480 !$OMP END DO 1481 !$OMP END PARALLEL 1456 1482 ! loop to spread negative beta on the neighbours 1457 1483 … … 1472 1498 1473 1499 ! average 1474 beta_centre(:,:)=0. 1475 do j=2,ny-1 1476 do i=2,nx-1 1477 beta_centre(i,j) = ((betamx(i,j)+betamx(i+1,j)) & 1478 + (betamy(i,j)+betamy(i,j+1)))*0.25 1479 end do 1480 end do 1481 1500 !$OMP PARALLEL 1501 !$OMP WORKSHARE 1502 beta_centre(:,:)=0. 1503 !$OMP END WORKSHARE 1504 !$OMP DO 1505 do j=2,ny-1 1506 do i=2,nx-1 1507 beta_centre(i,j) = ((betamx(i,j)+betamx(i+1,j)) & 1508 + (betamy(i,j)+betamy(i,j+1)))*0.25 1509 end do 1510 end do 1511 !$OMP END DO 1512 !$OMP END PARALLEL 1482 1513 1483 1514
Note: See TracChangeset
for help on using the changeset viewer.