Changeset 99 for trunk/SOURCES


Ignore:
Timestamp:
03/29/17 11:17:32 (7 years ago)
Author:
dumas
Message:

First version of a closed water cycle in GRISLI. Output in short file for Ant-40 and Greeneem

Location:
trunk/SOURCES
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/SOURCES/3D-physique-gen_mod.f90

    r93 r99  
    115115  real ::  HMAX                         !< epasisseur de glace max 
    116116  real ::  HMEAN                        !< epasisseur de glace moyenne 
     117  real,parameter :: Hmin=1.001          !< Hmin pour etre considere comme point ice   
    117118  real ::  HWATERMAX                    !< hauteur d'eau basale maximum dans le sediment 
    118119  real ::  HWATSTREAM                   !< seuil min. d'eau basale (hwater) pour ice stream 
     
    197198  real ::  pvimin                       !< valeur de pvi pour les noeuds fictifs 
    198199  real ::  test_iter_diag               !< test sur les vitesses pour iterations diagnostiques 
     200  real :: water_bilan                   !< bilan d'eau sur la calotte 
    199201 
    200202  !     ************** common des caracteres ************** 
     
    217219  real,dimension(2*nx*ny) :: SAV        !<  
    218220 
    219  
     221  real :: sum_H_old 
     222  real :: diff_H 
    220223 
    221224 
     
    239242  real,dimension(nx,ny) :: ABL          !< Ablation  'o'  negative quand perte 
    240243  real,dimension(nx,ny) :: ABLBORD      !< Ablation dans les zones non englacees 
     244  real,dimension(nx,ny) :: ablbord_dtt  !< Ablation sur le bord de la calotte (flux de glace inférieur à ablation sur le bord) sur dtt 
    241245  real,dimension(nx,ny) :: ACQUA        !< Surface des surfaces en eau 
    242246  real,dimension(nx,ny) :: B            !< Altitude de la base de la glace  'o' 
     
    257261  ! 
    258262  real,dimension(nx,ny) :: BM           !< mass balance   'o' 
     263  real,dimension(nx,ny) :: Bm_dtt       !< mass balance on ice points accumulated during dtt 
    259264  real,dimension(nx,ny) :: BMELT        !< basal melting  'o' 
     265  real,dimension(nx,ny) :: Bmelt_dtt    !< basal melting on ice points accumulated during dtt 
    260266  real,dimension(nx,ny) :: CORRBMELT    !< correction du basal melting  'o' 
    261267  real,dimension(nx,ny) :: HWATER       !< hauteur d'eau basale dans le sediment 
     
    263269  real,dimension(nx,ny) :: COEFMYBMELT  !<  
    264270  real,dimension(nx,ny) :: CALV         !< calving 
     271  real,dimension(nx,ny) :: calv_dtt     !< calving sur dtt (pour calcul bilan d'eau) 
     272   
    265273  !real,dimension(:,:,:),allocatable :: DDX  ! pour le calcul de UX  
    266274  !real,dimension(:,:,:),allocatable :: DDY  ! pour le calcul de UY 
     
    340348  real,dimension(nx,ny) :: S0           !< altitude actuelle de la surface 
    341349  real,dimension(nx,ny) :: slv          !< niveau de flottaison (sealevel et lakes) 
     350  real,dimension(nx,ny) :: tot_water    !< bilan d'eau 
    342351  real,dimension(nx,ny) :: TJULY        !< Ground air temperature July 
    343352  real,dimension(nx,ny) :: TANN         !< Ground air temperature annual 
  • trunk/SOURCES/Ant40_files/output_anta40_mod-0.4.f90

    r27 r99  
    139139!     **** short display ****  
    140140 
    141         write(num_ritz,903) nt,time,tafor,sealevel,vol,volf,np, & 
     141        write(num_ritz,904) nt,time,tafor,sealevel,vol,volf,np, & 
    142142          nint(hmean),nint(smax),                    & 
    143143          bmean,tbmean,nint(vsmean),                 & 
    144 !         tbdotmean,vsdotmean,hdotmean,bdotmean,    & 
    145 !          tbdotmean,hdotmean,dt,bmeltmean,accmean  
    146  
    147           tbdotmean,hdotmean,dt,bmelt(3,3),accmean  
     144                                  tbdotmean,hdotmean,dt,accmean, & 
     145                                  diff_H,water_bilan,sum(calv_dtt(:,:))/dtt, & 
     146                                  sum(ablbord_dtt(:,:))/dtt, & 
     147                                  sum(Bm_dtt(:,:))/dtt,sum(bmelt_dtt(:,:))/dtt 
    148148 
    149149 
    150150903   format(i8,1x,f0.2,1x,f0.4,1x,f0.2,1x,2(e10.5,1x),i6,1x,i4,1x,i5,1x, & 
    151151             f0.4,1x,f0.3,1x,i3,4(1x,e8.2),1x,f0.4,1x,f0.4)  
     152904   format(i8,1x,f0.2,4(1x,e15.8),3(1x,i8),2(1x,e15.8),1x,i8,10(1x,e15.8)) 
    152153!940   format('%%%% ',a,'   time=',f8.0,' %%%%') 
    153154 
  • trunk/SOURCES/Fichiers-parametres/anteis1_LISTE-VAR-NETCDF.dat

    r50 r99  
    126126Calv             
    12712713 
    128 0       1       1                                
     1281       1       1                                
    129129----------------------------------------------------------- 
    130130dHdt             
     
    27127154 
    2722721       1       1                                        
     273----------------------------------------------------------- 
     274ablbord 
     27555 
     2761       1       1 
     277----------------------------------------------------------- 
     278ice 
     27956 
     2801       1       1 
     281----------------------------------------------------------- 
     282front 
     28357 
     2841       1       1 
     285----------------------------------------------------------- 
     286tot_water 
     28758 
     2881       1       1 
    273289----------------------------------------------------------- 
    274290Hwat             
     
    3884040       0       0        
    389405----------------------------------------------------------- 
     406calv 
     40787 
     4081       1       1 
     409----------------------------------------------------------- 
     410ablbord 
     41188 
     4121       1       1 
     413----------------------------------------------------------- 
     414 
     415 
     416 
    390417!! Variables 3 D a ajouter 
    391418!! SA, S2A,SA_mx,S2A_mx,SA_my,S2A_my 
  • trunk/SOURCES/Fichiers-parametres/greeneem15_LISTE-VAR-NETCDF.dat

    r34 r99  
    126126Calv             
    12712713 
    128 0       1       1                                
     1281       1       1                                
    129129----------------------------------------------------------- 
    130130dHdt             
    13113114 
    132 0       1       1                        
     1321       1       1                        
    133133----------------------------------------------------------- 
    134134Tann             
     
    27127154 
    2722721       1       1                                        
     273----------------------------------------------------------- 
     274ablbord 
     27555 
     2761       1       1 
     277----------------------------------------------------------- 
     278ice 
     27956 
     2801       1       1 
     281----------------------------------------------------------- 
     282front 
     28357 
     2841       1       1 
     285----------------------------------------------------------- 
     286tot_water 
     28758 
     2881       1       1 
    273289----------------------------------------------------------- 
    274290Hwat             
  • trunk/SOURCES/Greeneem_files/output_greeneem_mod-0.4.f90

    r19 r99  
    6565WRITE(num_ritz, '(a134)')         "! IS         :      1      2      3      4      5      6      7      8      9     10     11     12     13     14     15     16     17 " 
    6666WRITE(num_ritz, '(a21,16(5x,i2))')'! Greenland  :       ',((i),i=18,33) 
    67 WRITE(num_ritz,*) 
    6867end subroutine init_outshort 
    6968 
     
    169168   
    170169 
    171   write(num_ritz,905)   time,((isvol(kk),inp(kk),isvolf(kk),isvol_shelf(kk),inf(kk),isacc(kk),isabl(kk),    &   
    172        isablbord(kk),ablatot(kk),iscalv(kk),isbm(kk),Tjulymean(kk),Hmean(kk),Hmax(kk),nabl(kk),nacc(kk)),kk=1,nbregion)     
     170!  write(num_ritz,905)   time,((isvol(kk),inp(kk),isvolf(kk),isvol_shelf(kk),inf(kk),isacc(kk),isabl(kk),    &   
     171!       isablbord(kk),ablatot(kk),iscalv(kk),isbm(kk),Tjulymean(kk),Hmean(kk),Hmax(kk),nabl(kk),nacc(kk)),kk=1,nbregion) 
     172 
     173  write(num_ritz,906) time,diff_H,water_bilan,sum(calv_dtt(:,:))/dtt, & 
     174                         sum(ablbord_dtt(:,:))/dtt, & 
     175                         sum(Bm_dtt(:,:))/dtt,sum(bmelt_dtt(:,:))/dtt    
    173176 
    174177905  format(f10.1,1x,2(e11.4, 1x, i5, 1x, e11.4, 1x, e11.4, 1x, i5, 9(1x, e12.5),2(1x,i5))) 
     178906  format (f0.2,6(1x,e15.8)) 
    175179          
    176180! pour verifier la zone groenland sur carte  
  • trunk/SOURCES/Makefile.grisli.inc

    r93 r99  
    8282        conserv-mass-adv-diff_sept2009_mod.o  \ 
    8383        eaubasale-0.5_mod.o spinup_mod.o no_spinup_mod.o \ 
    84         tridiag_mod-0.3.o out_horiz_mod.o bmelt-seuil-profondeur_mod.o  
     84        tridiag_mod-0.3.o out_horiz_mod.o bmelt-seuil-profondeur_mod.o \ 
     85        bilan_eau.o  
    8586 
    8687mod_communs_RGL =   util_recovery.o \ 
  • trunk/SOURCES/Netcdf-routines/Description_Variables.dat

    r34 r99  
    454454"Pa an/m "               
    455455"beta average on o nodes" 
     456------------------------------------------------------ 
     457"ablbord" 
     45855      "ablbord"        2 
     459"o" 
     460"ablbord" 
     461"ablbord" 
     462"m/an" 
     463"ablation on the edges" 
     464------------------------------------------------------ 
     465"ice" 
     46656      "ice"        2 
     467"o" 
     468"ice" 
     469"ice" 
     470"xxx" 
     471"points with ice" 
     472------------------------------------------------------ 
     473"front" 
     47457      "front"        2 
     475"o" 
     476"front" 
     477"front" 
     478"xxx" 
     479"front of ice" 
     480------------------------------------------------------ 
     481"tot_water" 
     48257      "tot_water"        2 
     483"o" 
     484"tot_water" 
     485"tot_water" 
     486"xxx" 
     487"water bilan : Bm - Bmelt + Calv + ablbord" 
    456488------------------------------------------------------ 
    457489"xxx" 
  • trunk/SOURCES/Netcdf-routines/sortie_netcdf_GRISLI_mod.0.2-hassine.f90

    r86 r99  
    781781                end if 
    782782                if (itab.eq.13) then 
    783                    tab(:,:) = calv(:,:) 
     783                   tab(:,:) = calv_dtt(:,:)/dtt 
    784784                end if 
    785785                if (itab.eq.14) then 
     
    896896                   tab(:,:) = beta_centre(:,:) 
    897897                endif 
     898                if (itab.eq.55) then  
     899                   tab(:,:) = ablbord_dtt(:,:)/dtt 
     900                endif 
     901                if (itab.eq.56) then  
     902                   tab(:,:) = ice(:,:) 
     903                endif 
     904                if (itab.eq.57) then 
     905                   tab(:,:) = front(:,:) 
     906                endif                 
     907                if (itab.eq.58) then 
     908                   tab(:,:) = tot_water(:,:) 
     909                endif  
    898910                if (itab.eq.60) then 
    899911                   tab(:,:) = hwater(:,:) 
  • trunk/SOURCES/ablation_bord.f90

    r4 r99  
    1717!> 
    1818 
    19 subroutine   ablation_bord 
     19subroutine ablation_bord 
    2020 
    2121 
     
    2929! ablbord contient pour l'instant Hneg/dt  
    3030! ailleurs ablbord=0 
     31 
     32! mise a jour du masque "ice" 
     33where (flot(:,:))        ! points flottants, sera éventuellement réévalué dans flottab 
     34   where(H(:,:).gt.max(Hmin,Hmin+BM(:,:)-Bmelt(:,:))) 
     35      ice(:,:)=1 
     36   elsewhere 
     37      ice(:,:)=0 
     38      H(:,:)=max(1.,min(0.,(sealevel - Bsoc(:,:))*row/ro-0.01)) 
     39   endwhere 
     40elsewhere                ! points posés 
     41   where(H(:,:).gt.0.) 
     42      ice(:,:)=1 
     43   elsewhere 
     44      ice(:,:)=0 
     45   endwhere 
     46endwhere 
     47 
    3148 
    3249where (ice(:,:).eq.1)    !  quand glace : abl=bm-acc  
     
    4461 
    4562         somm=ice(ip1,j)+ice(im1,j)+ice(i,jp1)+ice(i,jm1) 
    46          if (somm.gt.0) then                               ! voisins englaces 
    47             ablbord(i,j)=bm(i,j)-Acc(i,j)-ablbord(i,j)     !  Ablvrai=bmpdd-Acc-Hcalc/dt  
     63         if (somm.gt.0.and.(ablbord(i,j).LT.0.)) then                               ! voisins englaces 
     64!         if (somm.gt.0.and.((ablbord(i,j).LT.0.).OR.(flot(ip1,j).OR.flot(im1,j).OR.flot(i,jp1).OR.flot(i,jm1)))) then   ! voisins englaces 
     65!            ablbord(i,j)= ablbord(i,j) - (Acc(i,j) * dt)     !  Ablvrai=bmpdd-Acc-Hcalc/dt 
     66            ablbord(i,j)= ablbord(i,j) + ((Bmelt(i,j) - Bm(i,j)) * dt)  ! version Tof : ablbord = Hcons_mass - Bm - Bmelt 
     67 
    4868         else 
    49             ablbord(i,j)=hdot(i,j)-acc(i,j)   ! on ne fond que ce qui est tombe + existant 
     69! version cat            ablbord(i,j)=hdot(i,j)-acc(i,j)   ! on ne fond que ce qui est tombe + existant 
     70                                                ablbord(i,j)=0. 
    5071         endif 
    5172 
     
    5475end do 
    5576 
     77ablbord_dtt(:,:) = ablbord_dtt(:,:) + ablbord(:,:) 
     78 
     79ablbord(:,:)=0. 
     80 
    5681end subroutine ablation_bord 
  • trunk/SOURCES/calving_frange.f90

    r4 r99  
    4141 
    4242calv(:,:)=0.  
     43calv_dtt(:,:)=0. 
    4344 
    4445! formats pour les ecritures dans 42 
     
    110111! ifext: pour les noeuds flottants avec h < hcoup  
    111112 
    112 ifint:    if(front(i,j).lt.4) then         
     113!ifint:    if((front(i,j).gt.0).and.(front(i,j).lt.4)) then 
     114        ifint:    if(front(i,j).lt.4) then 
    113115! ifint: le point doit avoir au - 1 voisin mais ne pas etre entouré de glace 
    114116! ce qui evite la formation des polynies dans les shelfs 
     
    357359 if ((.not.(testmij.or.testpij.or.testimj.or.testipj))  &  ! pas suffisament alimente 
    358360                .and.(.not.interieur)) then                ! et pas interieur 
    359                      calv(i,j)=-h(i,j)   
    360                      H(i,j)=1              
    361                      endif   
     361                     calv(i,j)=-h(i,j)  
     362!cdc                     H(i,j)=1.  
     363                     H(i,j)=min(1.,max(0.,(sealevel - Bsoc(i,j))*row/ro-0.01)) 
     364                   endif   
    362365 
    363366                  end if ifint 
     
    365368         end do 
    366369      end do 
     370       
     371       where (front.le.0) 
     372         calv(:,:)=0. 
     373       endwhere 
     374       calv_dtt(:,:) = calv_dtt(:,:) + calv(:,:) ! somme du calving sur dtt    
     375       ! calv_dtt est remis à 0 dans bilan_eau (tous les dtt) 
    367376    end subroutine calving 
    368377!------------------------------------------------------------------------------------------ 
  • trunk/SOURCES/conserv-mass-adv-diff_sept2009_mod.f90

    r76 r99  
    3333logical,  dimension(nx,ny) :: zonemy      !< pour separer advection-diffusion 
    3434real :: adv_frac                          !< fraction du flux traitee en advection 
     35!real, parameter :: Hmin=1.001             !< Hmin pour être considere comme point ice  
    3536integer :: itesti 
    3637integer :: itour 
     
    7677!------------------------------------------------------------------ 
    7778!> SUBROUTINE: icethick3 
    78 !! Routine pour le calcule de l'epaisseur de glace  
     79!! Routine pour le calcul de l'epaisseur de glace  
    7980!< 
    8081subroutine icethick3 
     
    479480call resol_adv_diff_2D_vect (Dmx,Dmy,advmx,advmy,Hp,i_Hp,bilmass,vieuxH,H) 
    480481 
    481 ! remise à 0 des epaisseurs negatives, on garde la difference dans ablbord 
    482482!$OMP PARALLEL 
    483 !$OMP WORKSHARE  
     483!$OMP DO 
     484! on met à 0 l'épaisseur sur les bords si nécessaire 
     485do i=1,nx 
     486        if (H(i,1).gt.max(Hmin,Hmin+BM(i,1)-Bmelt(i,1))) then 
     487                ice(i,1)=1 
     488  else 
     489    ice(i,1)=0 
     490    H(i,1)=0. 
     491  endif   
     492        if (H(i,ny).gt.max(Hmin,Hmin+BM(i,ny)-Bmelt(i,ny))) then 
     493                ice(i,ny)=1 
     494  else 
     495    ice(i,ny)=0 
     496    H(i,ny)=0. 
     497  endif 
     498enddo 
     499!$OMP END DO 
     500!$OMP DO 
     501do j=1,ny 
     502        if (H(1,j).gt.max(Hmin,Hmin+BM(1,j)-Bmelt(1,j))) then 
     503                ice(1,j)=1 
     504  else 
     505    ice(1,j)=0 
     506    H(1,j)=0. 
     507  endif   
     508        if (H(nx,j).gt.max(Hmin,Hmin+BM(nx,j)-Bmelt(nx,j))) then 
     509                ice(nx,j)=1 
     510  else 
     511    ice(nx,j)=0 
     512    H(nx,j)=0. 
     513  endif 
     514enddo 
     515!$OMP END DO 
     516 
     517! remise a 0 des epaisseurs negatives, on garde la difference dans ablbord 
     518 
     519!$OMP WORKSHARE 
    484520where (H(:,:).lt.0.) 
    485    ablbord(:,:)=H(:,:)/dt 
     521!where ((H(:,:).lt.0.).OR.(H(:,:).GT.0..AND.H(:,:).LT.min(1.,vieuxH(:,:)).AND.flot(:,:))) 
     522   ablbord(:,:)=H(:,:)  ! ici ablbord = Hcons_mass = Hadv + Bm - Bmelt 
    486523elsewhere 
    487524   ablbord(:,:)=0. 
     
    490527H(:,:)=max(H(:,:),0.)       ! pas d'epaisseur negative 
    491528 
    492  
    493 ! calcul du masque "ice" 
    494 where (flot(:,:))        ! points flottants, sera éventuellement réévalué dans flottab 
    495    H(:,:)=max(H(:,:),1.) ! dans la partie marine l'épaisseur mini est 1 m 
    496    where(H(:,:).gt.1.) 
    497       ice(:,:)=1 
    498    elsewhere 
    499       ice(:,:)=0 
    500    endwhere 
    501 elsewhere                ! points posés 
    502    where(H(:,:).gt.0.) 
    503       ice(:,:)=1 
    504    elsewhere 
    505       ice(:,:)=0 
    506    endwhere 
    507 endwhere 
     529!~ ! calcul du masque "ice" 
     530!~ where (flot(:,:))        ! points flottants, sera éventuellement réévalué dans flottab 
     531!~    where(H(:,:).gt.max(Hmin,Hmin+BM(:,:)-Bmelt(:,:))) 
     532!~       ice(:,:)=1 
     533!~    elsewhere 
     534!~       ice(:,:)=0 
     535!~       H(:,:)=max(1.,min(0.,(sealevel - Bsoc(:,:))*row/ro-0.01)) 
     536!~    endwhere 
     537!~ !   H(:,:)=max(H(:,:),1.) ! dans la partie marine l'épaisseur mini est 1 m 
     538!~ !   H(:,:)=max(1.,min(0.,(sealevel - Bsoc(:,:))*row/ro-0.01)) 
     539!~ elsewhere                ! points posés 
     540!~    where(H(:,:).gt.0.) 
     541!~       ice(:,:)=1 
     542!~    elsewhere 
     543!~       ice(:,:)=0 
     544!~    endwhere 
     545!~ endwhere 
    508546 
    509547! eventuellement retirer apres spinup ou avoir un cas serac 
     
    535573!$OMP END PARALLEL 
    536574 
    537 !calul de l'ablation sur les bords (pourrait n'être appelé que pour les sorties courtes) 
    538 if (isynchro.eq.1) call ablation_bord 
    539  
    540  
    541575if (itracebug.eq.1)  call tracebug(' Fin routine icethick') !, maxval(H) ',maxval(H(:,:)) 
    542576 
    543  
    544577end subroutine icethick3 
    545578 
  • trunk/SOURCES/flottab2-0.7.f90

    r86 r99  
    2626 real ::  surnet !< surnet hauteur de glace au dessus de la mer 
    2727 real ::  archim !< test de flottaison 
     28! real, parameter :: Hmin=1.001   !< Hmin pour être considere comme point ice  
    2829 
    2930 integer:: itestf 
     
    106107    !~ print*,'debut flottab',S(132,183),H(132,183),BSOC(132,183),B(132,183),sealevel 
    107108    !~ print*,'debut flottab',flot(132,183),ice(132,183) 
     109!print*,'H(90,179) flottab 1',H(90,179),ice(90,179), flot(90,179) 
    108110 
    109111    if (itracebug.eq.1)  call tracebug(' Entree dans routine flottab') 
     
    219221             B(i,j)=Bsoc(i,j) 
    220222 
    221  
    222223          else if  ((H(i,j).LE.0.).and.(archim.LT.0.)) then    !    terre deglace qui devient ocean  
    223              ice(i,j)=0 
    224              h(i,j)=1. 
     224!cdc             ice(i,j)=0 
     225!cdc         H(i,j)=1. 
     226             H(i,j)=min(1.,max(0.,(sealevel - Bsoc(i,j))*row/ro-0.01)) 
    225227             surnet=H(i,j)*(1.-ro/row) 
    226228             S(i,j)=surnet+sealevel 
     
    586588!!$   end do 
    587589!!$end do 
    588  
     590!                       print*, 'flolottab debug', H(71,25),flot(71,25),bm(71,25),ice(71,25),time 
     591!print*,'H(90,179) flottab 2',H(90,179),ice(90,179),flot(90,179) 
    589592    !$OMP WORKSHARE 
    590593    where (flot(:,:)) 
    591        where (H(:,:).gt.(1.1))  
     594       where (H(:,:).gt.max(Hmin,Hmin+BM(:,:)-Bmelt(:,:)))  
    592595          ice(:,:)=1 
    593596       elsewhere  
     
    595598       end where 
    596599    elsewhere 
    597        where (H(:,:).gt.(.1))  
     600       where (H(:,:).gt.(0.))  
    598601          ice(:,:)=1 
    599602       elsewhere  
     
    603606    !$OMP END WORKSHARE 
    604607    !$OMP END PARALLEL 
    605  
     608!print*,'H(90,179) flottab 3',H(90,179),ice(90,179),flot(90,179),Bsoc(90,179)+H(90,179)*ro/row -sealevel 
    606609    !~ call DETERMIN_TACHE  
    607610    !~  
     
    733736    !~ print*,'fin flottab',flot(132,183),ice(132,183),gzmx(132,183),gzmy(132,183),ilemx(132,183),ilemy(132,183) 
    734737    !read(5,*) 
     738 
     739    call determin_front_tof ! version simplifiee 
     740     
    735741  end subroutine flottab 
    736742!--------------------------------------------------------------------   
     
    12171223!------------------------------------------------------------------------------ 
    12181224 
     1225subroutine determin_front_tof 
     1226 
     1227integer,dimension(nx,ny) :: nofront ! tableau de travail (points au dela du front) 
     1228!$OMP PARALLEL 
     1229!$OMP DO 
     1230do j=2,ny-1 
     1231   do i=2,nx-1 
     1232 
     1233      if (ice(i,j).eq.1) then     !         test si ice=1 
     1234 
     1235! if ice, on determine front... 
     1236! ainsi, front=0 sur les zones = 0 
     1237 
     1238         front(i,j)=(ice(i-1,j)+ice(i+1,j)+ice(i,j+1)+ice(i,j-1)) 
     1239         !front= le nb de faces en contact avec un voisin englacé 
     1240      endif 
     1241   end do 
     1242end do 
     1243!$OMP END DO 
     1244 
     1245! traitement des bords. On considere que l'exterieur n'a pas de glace 
     1246! attention ce n'est vrai que sur la grande grille 
     1247 
     1248!$OMP DO PRIVATE(i) 
     1249do j=2,ny-1 
     1250   i=1 
     1251   front(i,j)=(ice(i+1,j)+ice(i,j+1)+ice(i,j-1)) 
     1252   i=nx 
     1253   front(i,j)=(ice(i-1,j)+ice(i,j+1)+ice(i,j-1)) 
     1254end do 
     1255!$OMP END DO  
     1256 
     1257!$OMP DO PRIVATE(j) 
     1258do i=2,nx-1 
     1259   j=1  
     1260   front(i,j)=(ice(i-1,j)+ice(i+1,j)+ice(i,j+1)) 
     1261   j=ny 
     1262   front(i,j)=(ice(i-1,j)+ice(i+1,j)+ice(i,j-1)) 
     1263end do 
     1264!$OMP END DO  
     1265 
     1266! traitement des coins 
     1267 
     1268front(1,1)=ice(2,1)+ice(2,1) 
     1269front(1,ny)=ice(2,ny)+ice(1,ny-1) 
     1270front(nx,1)=ice(nx,2)+ice(nx-1,1) 
     1271front(nx,ny)=ice(nx,ny-1)+ice(nx-1,ny) 
     1272 
     1273! Les points à plus d'un point de grille du bord sont front=-1 
     1274nofront(:,:)=0 
     1275 
     1276!$OMP DO 
     1277do j=2,ny-1 
     1278        do i=2,nx-1 
     1279                if ((ice(i,j).eq.0).and.(front(i-1,j)+front(i+1,j)+front(i,j-1)+front(i,j+1)).eq.0) then 
     1280                        nofront(i,j)=-1 
     1281                endif 
     1282        enddo 
     1283enddo 
     1284!$OMP END DO 
     1285where (nofront(:,:).eq.-1) 
     1286        front(:,:)=-1 
     1287endwhere 
     1288 
     1289!$OMP END PARALLEL               
     1290 
     1291end subroutine determin_front_tof 
     1292 
    12191293end module flottab_mod 
    12201294 
  • trunk/SOURCES/steps_time_loop.f90

    r71 r99  
    5454     if (itracebug.eq.1)  call tracebug(' Dans spinup_icethick : appelle icethick') 
    5555 
    56      call icethick3() 
     56     call icethick3 
     57      
     58     call flottab 
    5759 
    5860     call calving 
     61      
     62     call ablation_bord 
     63      
     64     call bilan_eau 
     65      
     66     call flottab 
    5967 
    6068     if (itracebug.eq.1)  call tracebug('apres calving') 
     
    104112 
    105113     call shortoutput() 
     114!cdc initialisation des variables bilan eau 
     115                 diff_H = 0. 
     116                 Bm_dtt(:,:) = 0. 
     117                 bmelt_dtt(:,:) = 0. 
    106118 
    107119  endif 
     
    157169 
    158170  call out_recovery(iout) 
    159  
     171   
    160172  ! end of outputs 
    161173  !=================================================================== 
    162  
     174        ! remise a 0 de ablbord_dtt et calving_dtt 
     175 
     176        if (isynchro.eq.1) then 
     177                calv_dtt(:,:)=0. 
     178                ablbord_dtt(:,:)=0. 
     179        endif 
    163180 
    164181  !==================================================================== 
Note: See TracChangeset for help on using the changeset viewer.