Changeset 165


Ignore:
Timestamp:
12/13/17 18:03:43 (7 years ago)
Author:
dumas
Message:

Spinup with iterbeta is now compatible with steps_time_loop.f90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SOURCES/steps_time_loop.f90

    r161 r165  
    3131 
    3232  if (itracebug.eq.1)  call tracebug('Entree dans step_time_loop ') 
    33   if (itracebug.eq.1) write(num_tracebug,*) 'nt = ',nt,'  iter_beta = ',iter_beta 
     33  if (itracebug.eq.1) write(num_tracebug,*) 'nt = ',nt 
    3434 
    3535 
     
    3838 
    3939 
    40   spinup_icethick: if ((ispinup.eq.0.or.ispinup.eq.2.or.nt.lt.nt_init) & 
    41        .and.(iter_beta.eq.0)) then  
     40  spinup_icethick: if (ispinup.eq.0.or.ispinup.eq.2.or.nt.lt.nt_init) then  
    4241 
    4342     !------------------------------------------------------------------- 
     
    4544     !---------------- 
    4645     !   - est fait dans tous les cas pour les premieres boucles temporelles 
    47      !   - pour ispinup = 0 (run standard) sauf si iter_beta = 0 
     46     !   - pour ispinup = 0 (run standard) 
    4847     !   - pour ispinup = 2 (force avec vitesses de bilan) 
    4948     ! 
     
    121120  call testsort_time_ncdf(time) 
    122121  if (iglob_ncdf .EQ. 1) call sortie_ncdf_cat 
    123   if (isynchro.eq.1) then 
     122  if ((isynchro.eq.1).or.(nt.eq.1)) then 
    124123    call shortoutput 
    125124    diff_H = 0. 
     
    189188  timemax=time 
    190189  if (itracebug.eq.1) write(num_tracebug,*) 'entree dans step_thermomeca', & 
    191        '   nt=',nt,'iter_beta=',iter_beta 
     190       '   nt=',nt 
    192191 
    193192  !-------------------------------------------------------------------- 
     
    208207  !------------------------------------------- 
    209208  call masque() 
    210  
    211   if (iter_beta.gt.0)   call init_dragging 
    212209 
    213210 
     
    321318     ! Passe dans ce bloc que quand on veut calculer les vitesses dynamiques : 
    322319     ! - initialisations (nt.lt.nt_init_tm) 
    323      ! - run standard  (ispinup=0) (y compris iter_beta.ne.0) 
     320     ! - run standard  (ispinup=0) 
    324321     ! - spinup temperature avec vitesses dynamiques  (ispinup = 1)                 
    325322     !--------------------------------------------------------------------------------- 
     
    331328     call diffusiv() 
    332329 
    333  
    334      iterbeta:     if (iter_beta.ne.0) then          ! only for iterations on beta 
    335  
    336         if (.not.shelf_vitbil) then    !  bloc si les vitesses shelves viennent de diagnoshelf 
    337  
    338            !  Vcol declare dans le module spinup_mod  
    339            !  ou dans le dragging si no_spinup 
    340  
    341            where (flotmx(:,:)) 
    342               uxbar(:,:)=uxflgz(:,:) 
    343            elsewhere 
    344               uxbar(:,:)=Vcol_x(:,:) 
    345            end where 
    346  
    347            where (flotmy(:,:)) 
    348               uybar(:,:)=uyflgz(:,:) 
    349            elsewhere 
    350               uybar(:,:)=Vcol_y(:,:) 
    351            end where 
    352         else 
    353            uxbar(:,:)=Vcol_x(:,:) 
    354            uybar(:,:)=Vcol_y(:,:) 
    355         end if 
    356      end if iterbeta 
    357  
    358  
    359330     ! strain rate calculations 
    360331     !=========================== 
    361332 
    362333     call strain_rate() 
    363  
    364  
    365      if (iter_beta.ne.0) then               ! on n'a utilise les vitesses de bilan que pour strain_rate "Dirichlet ?" 
    366         uxbar(:,:)=uxflgz(:,:)+uxdef(:,:) 
    367         uybar(:,:)=uyflgz(:,:)+uydef(:,:) 
    368      end if 
    369  
    370  
    371334 
    372335     ! ice shelves and ice streams velocities : SSA 
     
    393356        end if 
    394357  
    395  
     358           test_iter_diag=0. 
    396359           do m=1,iter_visco               
    397360              call diagnoshelf 
    398361              call mix_SIA_L1   
    399362              call strain_rate 
    400               if (iter_beta.eq.0) then 
    401                 call dragging           
    402               endif 
    403363              if (test_iter_diag.lt.1.e-2) exit 
    404364           end do 
     365            
     366           ! iterations pour inversion du beta en fonction des vitesses de bilan 
     367           if ((inv_beta.eq.1).and.(time.ge.time_iter).and.(time.le.time_iter_end)) then  ! iterations pendant 20 ans 
     368              do m=1,nb_iter_vitbil 
     369                 call beta_iter_vitbil(m) 
     370                 call diagnoshelf 
     371                 call mix_SIA_L1 
     372                 call strain_rate 
     373              end do 
     374           end if 
     375           ! fin des iterations beta_iter_vitbil 
     376 
    405377        endif isync_2 
    406378 
Note: See TracChangeset for help on using the changeset viewer.