Changeset 124
- Timestamp:
- 07/06/17 11:55:54 (7 years ago)
- Location:
- trunk/SOURCES
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SOURCES/3D-physique-gen_mod.f90
r112 r124 36 36 integer :: err !< pour l'allocation des tableaux 37 37 integer :: igrdline !< si 1 fixe la position en jouant sur la fusion shelf 38 integer :: ibmelt_inv !< si 1 inversion du bmelt (avec igrdline=1) 38 39 integer :: i_resolmeca !< defini le type d'association SIA-L1 39 40 integer :: iter_beta !< pour la determination du frottement -
trunk/SOURCES/Ant40_files/lect-anteis_mod.f90
r113 r124 228 228 do J=1,NY 229 229 do I=1,NX 230 if (( (BSOC(I,J)+H(I,J)*RO/ROW -SEALEVEL).LT.0.).and.(H(I,J).gt.1.E-3)) then230 if ((BSOC(I,J)+H(I,J)*RO/ROW -SEALEVEL).LT.0.) then 231 231 FLOT(I,J)=.TRUE. 232 232 else -
trunk/SOURCES/bmelt-seuil-profondeur_mod.f90
r67 r124 16 16 module bmelt_seuil_prof 17 17 18 ! prametrise la fusion basale (ice shelves)19 ! Pour l'actuel : 2 valeurs pour 2 domaines de profondeur20 ! + une valeur pour bmgrz21 ! A choisir dans le module_choix18 ! prametrise la fusion basale (ice shelves) 19 ! Pour l'actuel : 2 valeurs pour 2 domaines de profondeur 20 ! + une valeur pour bmgrz 21 ! A choisir dans le module_choix 22 22 23 use module3d_phy23 use module3d_phy 24 24 25 25 26 implicit none26 implicit none 27 27 28 real :: bm_grz !< valeur prescrite a la grounding zone29 real,dimension(nx,ny) :: bmgrz !< tabelau fusion basale a la grounding zone28 real :: bm_grz !< valeur prescrite a la grounding zone 29 real,dimension(nx,ny) :: bmgrz !< tabelau fusion basale a la grounding zone 30 30 31 real :: bmshelf_plateau !< valeur prescrite sur le plateau cont.32 real :: bmshelf_abysses !< valeur prescrite au dessus de l'ocean profond33 real :: depth_talus !< profondeur de transition34 real,dimension(nx,ny) :: bmshelf !< tableau fusion basale sous shelf31 real :: bmshelf_plateau !< valeur prescrite sur le plateau cont. 32 real :: bmshelf_abysses !< valeur prescrite au dessus de l'ocean profond 33 real :: depth_talus !< profondeur de transition 34 real,dimension(nx,ny) :: bmshelf !< tableau fusion basale sous shelf 35 35 36 36 37 37 contains 38 !-------------------------------------------------------------------------------39 !> SUBROUTINE: init_bmelt40 !! Cette routine fait l'initialisation pour la fusion basale.41 !! @note Elle est appelée par inputfile-vec-0.5.f9042 !!43 !>44 subroutine init_bmelt38 !------------------------------------------------------------------------------- 39 !> SUBROUTINE: init_bmelt 40 !! Cette routine fait l'initialisation pour la fusion basale. 41 !! @note Elle est appelée par inputfile-vec-0.5.f90 42 !! 43 !> 44 subroutine init_bmelt 45 45 46 46 47 47 48 ! Cette routine fait l'initialisation pour la fusion basale.49 ! Elle est appelée par inputfile-vec-0.5.f9048 ! Cette routine fait l'initialisation pour la fusion basale. 49 ! Elle est appelée par inputfile-vec-0.5.f90 50 50 51 51 52 namelist/bmelt_seuil/bm_grz,bmshelf_plateau,bmshelf_abysses,depth_talus52 namelist/bmelt_seuil/bm_grz,bmshelf_plateau,bmshelf_abysses,depth_talus 53 53 54 if (itracebug.eq.1) call tracebug('entree dans init_bmelt de bmelt_seuil_prof')54 if (itracebug.eq.1) call tracebug('entree dans init_bmelt de bmelt_seuil_prof') 55 55 56 rewind(num_param) ! pour revenir au debut du fichier param_list.dat57 read(num_param,bmelt_seuil)58 write(num_rep_42,bmelt_seuil)56 rewind(num_param) ! pour revenir au debut du fichier param_list.dat 57 read(num_param,bmelt_seuil) 58 write(num_rep_42,bmelt_seuil) 59 59 60 ! ecriture dans le fichier parametres60 ! ecriture dans le fichier parametres 61 61 62 62 428 format(A) 63 63 64 write(num_rep_42,428)'!___________________________________________________________'65 write(num_rep_42,428) '&bmelt_seuil ! module bmelt_seuil_prof'66 write(num_rep_42,*) 'bm_grz =',bm_grz67 write(num_rep_42,*) 'bmshelf_plateau =',bmshelf_plateau68 write(num_rep_42,*) 'bmshelf_abysses =',bmshelf_abysses69 write(num_rep_42,*) 'depth_talus =',depth_talus70 write(num_rep_42,*)'/'71 write(num_rep_42,428) '! Pour l actuel : bm_grz a la grounding line'72 write(num_rep_42,428) '! bmshelf_plateau sur le plateau continental'73 write(num_rep_42,428) '! bmshelf_abysses pour les grandes profondeurs'74 write(num_rep_42,428) '! depth_talus, negative, separation entre les 2 domaines'75 write(num_rep_42,*)76 write(num_rep_42,428)'!___________________________________________________________'64 write(num_rep_42,428)'!___________________________________________________________' 65 write(num_rep_42,428) '&bmelt_seuil ! module bmelt_seuil_prof' 66 write(num_rep_42,*) 'bm_grz =',bm_grz 67 write(num_rep_42,*) 'bmshelf_plateau =',bmshelf_plateau 68 write(num_rep_42,*) 'bmshelf_abysses =',bmshelf_abysses 69 write(num_rep_42,*) 'depth_talus =',depth_talus 70 write(num_rep_42,*)'/' 71 write(num_rep_42,428) '! Pour l actuel : bm_grz a la grounding line' 72 write(num_rep_42,428) '! bmshelf_plateau sur le plateau continental' 73 write(num_rep_42,428) '! bmshelf_abysses pour les grandes profondeurs' 74 write(num_rep_42,428) '! depth_talus, negative, separation entre les 2 domaines' 75 write(num_rep_42,*) 76 write(num_rep_42,428)'!___________________________________________________________' 77 77 78 78 79 79 80 bmgrz(:,:) = bm_grz80 bmgrz(:,:) = bm_grz 81 81 82 where (Bsoc0(:,:).lt.depth_talus)83 bmshelf(:,:)=bmshelf_abysses84 elsewhere85 bmshelf(:,:)=bmshelf_plateau86 end where82 where (Bsoc0(:,:).lt.depth_talus) 83 bmshelf(:,:)=bmshelf_abysses 84 elsewhere 85 bmshelf(:,:)=bmshelf_plateau 86 end where 87 87 88 debug_3D(:,:,34)=bmshelf(:,:)89 return90 end subroutine init_bmelt88 debug_3D(:,:,34)=bmshelf(:,:) 89 return 90 end subroutine init_bmelt 91 91 92 !________________________________________________________________________________92 !________________________________________________________________________________ 93 93 94 !> SUBROUTINE: bmeltshelf95 !! Cette routine calcule la fusion basale proprement dite pour les points flottants96 !! @note coefbmshelf a ete calcule par forclim et permet de faire varier en fonction du climat97 !>94 !> SUBROUTINE: bmeltshelf 95 !! Cette routine calcule la fusion basale proprement dite pour les points flottants 96 !! @note coefbmshelf a ete calcule par forclim et permet de faire varier en fonction du climat 97 !> 98 98 99 subroutine bmeltshelf99 subroutine bmeltshelf 100 100 101 101 102 ! cette routine calcule la fusion basale proprement dite pour les points flottants103 ! coefbmshelf a ete calcule par forclim et permet de faire varier en fonction du climat102 ! cette routine calcule la fusion basale proprement dite pour les points flottants 103 ! coefbmshelf a ete calcule par forclim et permet de faire varier en fonction du climat 104 104 105 integer :: ngr ! nombre de voisins flottants106 real :: coef_talus ! pour ne pas changer la fusion au dessus de l'ocean profond105 integer :: ngr ! nombre de voisins flottants 106 real :: coef_talus ! pour ne pas changer la fusion au dessus de l'ocean profond 107 107 108 if (itracebug.eq.1) call tracebug('entree dans bmeltshelf de bmelt_seuil_prof')108 if (itracebug.eq.1) call tracebug('entree dans bmeltshelf de bmelt_seuil_prof') 109 109 110 where (Bsoc0(:,:).lt.depth_talus)111 bmshelf(:,:)=bmshelf_abysses112 elsewhere113 bmshelf(:,:)=bmshelf_plateau114 end where110 where (Bsoc0(:,:).lt.depth_talus) 111 bmshelf(:,:)=bmshelf_abysses 112 elsewhere 113 bmshelf(:,:)=bmshelf_plateau 114 end where 115 115 116 do j=1,ny117 do i=1,nx116 do j=1,ny 117 do i=1,nx 118 118 119 talus_nochange: if (Bsoc0(i,j).lt.depth_talus) then120 coef_talus = 1 ! pas de changement au dessus de l'ocecan profond119 talus_nochange: if (Bsoc0(i,j).lt.depth_talus) then 120 coef_talus = 1 ! pas de changement au dessus de l'ocecan profond 121 121 else 122 coef_talus = coefbmshelf122 coef_talus = coefbmshelf 123 123 endif talus_nochange 124 124 125 125 126 shelf:if (flot(i,j)) then ! partie flottante126 shelf: if (flot(i,j)) then ! partie flottante 127 127 128 128 bmelt(i,j)=coef_talus*bmshelf(i,j) 129 129 130 ! fbm est vrai si le point est flottant mais un des voisins est pose131 ! calcule dans flottab130 ! fbm est vrai si le point est flottant mais un des voisins est pose 131 ! calcule dans flottab 132 132 133 133 if (fbm(i,j)) then 134 bmelt(i,j)=coef_talus*bmgrz(i,j)135 endif 134 bmelt(i,j)=coef_talus*bmgrz(i,j) 135 endif 136 136 137 137 138 138 139 ! ATTENTION le bloc suivant sert a determiner la fusion basale d'equilibre140 ! pour les shelves stationnaires139 ! ATTENTION le bloc suivant sert a determiner la fusion basale d'equilibre 140 ! pour les shelves stationnaires 141 141 142 if (igrdline.eq.1) then 143 corrbmelt(i,j)=hdot(i,j)+bmelt(i,j) ! le bmelt d'equilibre 144 debug_3D(i,j,28)=corrbmelt(i,j) 145 endif 142 if ((igrdline.eq.1).and.(ibmelt_inv.eq.1)) then 143 ! corrbmelt(i,j)=hdot(i,j)+bmelt(i,j) ! le bmelt d'equilibre 144 ! bmelt(i,j)=corrbmelt(i,j) 145 corrbmelt(i,j)=corrbmelt(i,j)+hdot(i,j)*0.85 146 bmelt(i,j)=bmelt(i,j)+corrbmelt(i,j) 147 endif 146 148 147 149 148 150 else ! point posé, on compte le nombre de voisins flottants 149 ngr=0 150 if ((i.ne.1).and.(i.ne.nx).and.(j.ne.1).and.(j.ne.ny)) then 151 if (flot(i+1,j)) ngr=ngr+1 152 if (flot(i-1,j)) ngr=ngr+1 153 if (flot(i,j+1)) ngr=ngr+1 154 if (flot(i,j-1)) ngr=ngr+1 155 end if 156 151 ngr=0 152 if ((i.ne.1).and.(i.ne.nx).and.(j.ne.1).and.(j.ne.ny)) then 153 if (flot(i+1,j)) ngr=ngr+1 154 if (flot(i-1,j)) ngr=ngr+1 155 if (flot(i,j+1)) ngr=ngr+1 156 if (flot(i,j-1)) ngr=ngr+1 157 end if 157 158 158 ! la fusion des points limites est une combinaison entre valeur posée et valeur flottante159 ! en fonction du nombre de points flottants160 159 161 bmelt(i,j)= ngr/4.*bmgrz(i,j)*coef_talus+(1.-ngr/4.)*bmelt(i,j)162 160 ! la fusion des points limites est une combinaison entre valeur posée et valeur flottante 161 ! en fonction du nombre de points flottants 163 162 163 bmelt(i,j)= ngr/4.*bmgrz(i,j)*coef_talus+(1.-ngr/4.)*bmelt(i,j) 164 165 if ((igrdline.eq.1).and.(ibmelt_inv.eq.1)) then 166 corrbmelt(i,j)=corrbmelt(i,j)+hdot(i,j) !*0.85 167 bmelt(i,j)=bmelt(i,j)+corrbmelt(i,j) 168 endif 164 169 endif shelf 165 166 end do 170 end do 167 171 end do 168 172 169 170 if (igrdline.eq.1) then 171 bmelt(:,:)=0. ! hdot donne alors le -bmelt 173 if ((igrdline.eq.1).and.(ibmelt_inv.eq.0)) then 174 where (i_Hp(:,:).eq.1) 175 bmelt(:,:)=0. ! hdot donne alors le -bmelt 176 endwhere 172 177 endif 173 174 178 175 179 return -
trunk/SOURCES/conserv-mass-adv-diff_sept2009_mod.f90
r102 r124 416 416 417 417 ! if ((time.lt.time_gl(1)).or.(nt.lt.2)) then ATTENTION test seulement si version prescribe-H_mod.f90 418 call prescribe_present_H_gl ! prescribe present thickness at the grounding line 418 if (ibmelt_inv.eq.0) then 419 call prescribe_present_H_gl ! prescribe present thickness at the grounding line 420 else if (ibmelt_inv.eq.1) then ! inversion bmelt 421 call prescribe_present_H_gl_bmelt ! prescribe only grounding line points 422 else 423 print*,'ibmelt_inv value must be 0 or 1 !!!' 424 stop 425 endif 419 426 ! else 420 427 ! call prescribe_retreat … … 550 557 H(:,:)=max(H(:,:),0.) ! pas d'epaisseur negative 551 558 552 !~ ! calcul du masque "ice"553 !~ where (flot(:,:)) ! points flottants, sera éventuellement réévalué dans flottab554 !~ where(H(:,:).gt.max(Hmin,Hmin+BM(:,:)-Bmelt(:,:)))555 !~ ice(:,:)=1556 !~ elsewhere557 !~ ice(:,:)=0558 !~ H(:,:)=max(1.,min(0.,(sealevel - Bsoc(:,:))*row/ro-0.01))559 !~ endwhere560 !~ ! H(:,:)=max(H(:,:),1.) ! dans la partie marine l'épaisseur mini est 1 m561 !~ ! H(:,:)=max(1.,min(0.,(sealevel - Bsoc(:,:))*row/ro-0.01))562 !~ elsewhere ! points posés563 !~ where(H(:,:).gt.0.)564 !~ ice(:,:)=1565 !~ elsewhere566 !~ ice(:,:)=0567 !~ endwhere568 !~ endwhere569 570 559 ! eventuellement retirer apres spinup ou avoir un cas serac 571 560 Hdot(:,:)=(H(:,:)-vieuxH(:,:))/dt 572 561 !$OMP END WORKSHARE 573 562 574 !~ if (igrdline.ne.3) then 575 !~ !$OMP WORKSHARE 576 !~ Hdot(:,:)=min(Hdot(:,:),10.) 577 !~ Hdot(:,:)=max(Hdot(:,:),-10.) 578 !~ !$OMP END WORKSHARE 579 !~ endif 563 if (ibmelt_inv.eq.1) then ! inversion du bmelt avec igrdline=1 564 !$OMP WORKSHARE 565 where (i_Hp(:,:).eq.1) 566 H(:,:)=Hp(:,:) 567 endwhere 568 !$OMP END WORKSHARE 569 endif 580 570 581 571 !$OMP WORKSHARE 582 where (i_hp(:,:).ne.1)583 H(:,:)=vieuxH(:,:)+Hdot(:,:)*dt584 end where585 586 587 588 572 ! si mk0=-1, on garde l'epaisseur precedente 589 573 ! en attendant un masque plus propre -
trunk/SOURCES/initial-phy-2.f90
r93 r124 27 27 28 28 namelist/runpar/runname,icompteur,iout,reprcptr,itracebug,num_tracebug,comment_run 29 namelist/grdline/igrdline,Schoof 29 namelist/grdline/igrdline,Schoof,ibmelt_inv 30 30 namelist/timesteps/dtmin,dtmax,dtt,testdiag,tbegin,tend 31 31 … … 123 123 write(num_rep_42,*) 'igrdline = ',igrdline 124 124 write(num_rep_42,*) 'Schoof = ',Schoof 125 write(num_rep_42,*) 'ibmelt_inv = ',ibmelt_inv 125 126 write(num_rep_42,*)'/' 126 write(num_rep_42,428)'! igrdline : 1 ligne d echouage fixée, sinon 0' 127 write(num_rep_42,428)'! Schoof : 0 pas de Schoof, 1 flux de Schoof' 127 write(num_rep_42,428)'! igrdline : 1 ligne d echouage fixée, sinon 0' 128 write(num_rep_42,428)'! Schoof : 0 pas de Schoof, 1 flux de Schoof' 129 write(num_rep_42,428)'! ibmelt_inv : 0 cas std, 1 inversion du bmelt (avec igrdline=1)' 128 130 write(num_rep_42,*) 129 131 -
trunk/SOURCES/prescribe-H-i2s_mod.f90
r4 r124 127 127 hp(:,:) = Hp0(:,:) 128 128 end where 129 if (itracebug.eq.1) call tracebug(' fin prescribe_present_H_gl 129 if (itracebug.eq.1) call tracebug(' fin prescribe_present_H_gl') 130 130 131 131 132 132 end subroutine prescribe_present_H_gl 133 134 !______________________________________________________________________________________ 135 !> function prescribe_present_H_gl_bmelt 136 !! calculate the initial grounding line position 137 !! only grounding line points are prescribed to present value 138 !! @return i_hp(:,:) and hp(:,:) 139 140 subroutine prescribe_present_H_gl_bmelt 141 142 implicit none 143 144 if (itracebug.eq.1) call tracebug(' Entree dans routine prescribe_present_H_gl_bmelt') 145 146 ! where (MK_gl0(:,:) .eq. 1) ! grounding line only !cdc pour calcule fonte basale 147 ! i_hp(:,:) = 1 ! thickness prescribed to present value 148 ! hp(:,:) = Hp0(:,:) 149 ! end where 150 i_hp(:,:) = 0 151 if (itracebug.eq.1) call tracebug(' fin prescribe_present_H_gl_bmelt') 152 153 154 end subroutine prescribe_present_H_gl_bmelt 133 155 134 156 !______________________________________________________________________________________ -
trunk/SOURCES/resol_adv_diff_2D-sept2009.f90
r73 r124 278 278 279 279 relax_loop: do while(.not.stopp) 280 ntour=ntour+1 281 !$OMP PARALLEL 282 !$OMP DO PRIVATE(reste) 283 do j=2,ny-1 284 do i=2,nx-1 285 286 reste = (((arelax(i,j)*newH(i-1,j) +drelax(i,j)*newH(i,j-1)) & 287 + (brelax(i,j)*newH(i+1,j) + erelax(i,j)*newH(i,j+1))) & 288 + crelax(i,j)*newH(i,j))- frelax(i,j) 289 290 !if (ntour.eq.1) debug_3D(i,j,49)=(((arelax(i,j)*newH(i-1,j) +drelax(i,j)*newH(i,j-1)) & 291 ! + (brelax(i,j)*newH(i+1,j) + erelax(i,j)*newH(i,j+1))) & 292 ! + crelax(i,j)*newH(i,j)) 293 294 295 deltaH(i,j) = reste/crelax(i,j) 296 280 ntour=ntour+1 281 !$OMP PARALLEL 282 !$OMP DO PRIVATE(reste) 283 do j=2,ny-1 284 do i=2,nx-1 285 reste = (((arelax(i,j)*newH(i-1,j) +drelax(i,j)*newH(i,j-1)) & 286 + (brelax(i,j)*newH(i+1,j) + erelax(i,j)*newH(i,j+1))) & 287 + crelax(i,j)*newH(i,j))- frelax(i,j) 288 289 deltaH(i,j) = reste/crelax(i,j) 290 end do 297 291 end do 298 end do 299 !$OMP END DO 300 301 !debug_3D(:,:,50)=arelax(:,:) 302 !debug_3D(:,:,51)=brelax(:,:) 303 !debug_3D(:,:,52)=crelax(:,:) 304 !debug_3D(:,:,53)=drelax(:,:) 305 !debug_3D(:,:,54)=erelax(:,:) 306 !debug_3D(:,:,55)=frelax(:,:) 307 308 309 !$OMP WORKSHARE 310 newH(:,:)=newH(:,:)-deltaH(:,:) 311 !$OMP END WORKSHARE 312 !$OMP END PARALLEL 292 !$OMP END DO 293 294 !$OMP WORKSHARE 295 newH(:,:)=newH(:,:)-deltaH(:,:) 296 !$OMP END WORKSHARE 297 !$OMP END PARALLEL 313 298 314 299 315 300 ! critere d'arret: 316 301 ! ---------------- 317 318 delh=0 319 320 !$OMP PARALLEL 321 !$OMP DO REDUCTION(+:delh) 322 do j=2,ny-1323 do i=2,nx-1324 delh=delh+deltaH(i,j)**2302 delh=0 303 304 !$OMP PARALLEL 305 !$OMP DO REDUCTION(+:delh) 306 do j=2,ny-1 307 do i=2,nx-1 308 delh=delh+deltaH(i,j)**2 309 end do 325 310 end do 326 end do 327 !$OMP END DO 328 !$OMP END PARALLEL 329 330 if (delh.gt.0.) then 331 testh=sqrt(delh)/((nx-2)*(ny-2)) 332 else 333 testh=0. 334 endif 335 stopp = (testh.lt.1.e-4).or.(ntour.gt.100) 336 337 311 !$OMP END DO 312 !$OMP END PARALLEL 313 314 if (delh.gt.0.) then 315 testh=sqrt(delh)/((nx-2)*(ny-2)) 316 else 317 testh=0. 318 endif 319 stopp = (testh.lt.1.e-4).or.(ntour.gt.100) 338 320 339 321 end do relax_loop 340 322 341 342 ! thickness at the upwind node343 !do j = 1, ny344 ! do i = 2, nx345 ! debug_3D(i,j,92) = c_west(i,j) * newH(i-1,j) + c_east(i,j) * newH(i,j)346 ! end do347 !end do348 !do j = 2, ny349 ! do i = 1, nx350 ! debug_3D(i,j,93) = c_south(i,j) * newH(i,j-1) + c_north(i,j) * newH(i,j)351 ! end do352 !end do353 354 323 if (itracebug.eq.1) call tracebug(' fin routine resolution_diffusion') 355 356 324 357 325 return -
trunk/SOURCES/spinup_mod.f90
r115 r124 102 102 case default 103 103 print*,'type_vitbil valeur invalide dans spinup_vitbil' 104 stop 104 105 end select 105 106
Note: See TracChangeset
for help on using the changeset viewer.