Changeset 433


Ignore:
Timestamp:
04/26/23 18:23:45 (12 months ago)
Author:
dumas
Message:

Use only in step_time_loop : module_choix is used only when it is required

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GRISLIv3/SOURCES/steps_time_loop.f90

    r430 r433  
    1414subroutine step_time_loop         
    1515 
    16   use module3d_phy 
    17   use module_choix ! module de choix du type de run 
    18                    !  module_choix donne acces a tous les modules 
    19                    !  de declaration des packages 
    20   use sorties_ncdf_grisli 
    21   use flottab_mod 
    22   use icetempmod 
    23   use diagno_mod 
    24   use bilan_eau_mod 
    25   use bilan_flux_mod 
    26   !  use track_debug  
     16  use module3d_phy, only: ispinup,isynchro,timemax,time,flot,S,B,Bsoc,H,sealevel_2d,hmx,hmy,& 
     17       uxbar,uybar,hdot,dtmax,dtmin,iout 
     18  use runparam, only: itracebug,nt,num_tracebug 
     19  use equat_adv_diff_2D_vect, only: icethick3 
     20  use calving_frange, only: calving 
     21  use flottab_mod, only: flottab,determin_tache,determin_marais 
     22  use sorties_ncdf_grisli, only: iglob_ncdf,testsort_time_ncdf,sortie_ncdf_cat 
     23  use resolmeca_SIA_L1, only: mix_SIA_L1 
     24  use bilan_eau_mod, only: diff_H,Bm_dtt,bmelt_dtt,calv_dtt,ablbord_dtt,diff_H_2D,grline_dtt,& 
     25       bilan_eau 
     26  use bilan_flux_mod, only: bilan_flux_output 
     27  !  module_choix donne acces aux modules interchangeables 
     28  use module_choix, only: shortoutput 
    2729 
    2830  implicit none 
     
    119121  call testsort_time_ncdf(time) 
    120122  if (iglob_ncdf .EQ. 1) call sortie_ncdf_cat 
    121 !  if ((isynchro.eq.1).or.(nt.eq.1).and.(mod(abs(TIME),1.).lt.dtmin)) then 
     123  !  if ((isynchro.eq.1).or.(nt.eq.1).and.(mod(abs(TIME),1.).lt.dtmin)) then 
    122124  if ((nt.eq.1).or.((isynchro.eq.1).and.(mod(abs(TIME),1.).lt.dtmin))) then 
    123     call shortoutput 
    124     diff_H = 0. 
    125     Bm_dtt(:,:) = 0. 
    126     bmelt_dtt(:,:) = 0. 
    127     calv_dtt(:,:)=0. 
    128     ablbord_dtt(:,:)=0. 
    129     diff_H_2D(:,:)=0. 
    130     grline_dtt(:,:)=0. 
     125     call shortoutput 
     126     diff_H = 0. 
     127     Bm_dtt(:,:) = 0. 
     128     bmelt_dtt(:,:) = 0. 
     129     calv_dtt(:,:)=0. 
     130     ablbord_dtt(:,:)=0. 
     131     diff_H_2D(:,:)=0. 
     132     grline_dtt(:,:)=0. 
    131133  endif 
    132134 
     
    138140 
    139141  call out_recovery(iout) 
    140    
     142 
    141143  ! end of outputs 
    142144 
     
    162164! - ice temperature 
    163165 
    164 subroutine step_thermomeca() 
    165  
    166  
    167   use module3d_phy 
    168   use module_choix ! module de choix du type de run 
    169   !  module_choix donne acces a tous les modules 
    170   !  de declaration des packages 
    171   use icetempmod 
    172   use sorties_ncdf_grisli 
    173   use flottab_mod 
    174   use diagno_mod 
    175   use resolmeca_SIA_L1 
    176   use iso_declar, only: dt_iso 
    177 !  use track_debug  
    178  
     166subroutine step_thermomeca 
     167   
     168  use module3d_phy, only: ispinup,isynchro,timemax,time,marine,iglen,shelfy,icompteur,& 
     169       test_iter_diag,inv_beta,dtmin 
     170  use runparam, only: itracebug,nt,num_tracebug 
     171  use geography, only: geoplace 
     172  use deformation_mod_2lois, only: n1poly,n2poly 
     173  use iso_declar, only: nbed,dt_iso 
     174  use sorties_ncdf_grisli, only: 
     175  use resolmeca_SIA_L1, only: mix_SIA_L1 
     176  use diagno_mod, only: diagnoshelf 
     177  use beta_iter_vitbil_mod, only: beta_iter_vitbil 
     178  use icetempmod, only: icetemp 
     179  use deformation_mod_2lois, only: flow_general,flowlaw 
     180  !  module_choix donne acces aux modules interchangeables 
     181  use module_choix, only: time_iter,time_iter_end,nb_iter_vitbil,bedrock,forclim,ablation,& 
     182       rsl,bmeltshelf,tracer,calc_coef_vitbil,force_balance_vel 
    179183 
    180184  implicit none 
     
    197201  !-------------------------------------------------------------------- 
    198202 
    199 !  call limit_file(nt,real(time),dt,tend,dtsortie,dtcpt,testdiag,dtt,runname) 
     203  !  call limit_file(nt,real(time),dt,tend,dtsortie,dtcpt,testdiag,dtt,runname) 
    200204 
    201205  !if (time.lt.tgrounded) then 
     
    207211  ! update the regions (floating, ice ...) 
    208212  !------------------------------------------- 
    209   call masque() 
     213  call masque 
    210214 
    211215 
     
    293297        if (itracebug.eq.1)  call tracebug(' Dans spinup_2_flowlaw') 
    294298 
    295            call flow_general 
    296            do iglen=n1poly,n2poly 
    297               call flowlaw(iglen) 
    298            end do 
     299        call flow_general 
     300        do iglen=n1poly,n2poly 
     301           call flowlaw(iglen) 
     302        end do 
    299303 
    300304 
     
    353357 
    354358        else if ((icompteur.ne.1).and.(nt.le.1)) then  ! initialisation avec reprise partielle  
    355                                                        ! ou nulle du vecteur d' etat 
    356           iter_visco = 10 
     359           ! ou nulle du vecteur d' etat 
     360           iter_visco = 10 
    357361        else 
    358           iter_visco = 2 
     362           iter_visco = 2 
    359363        end if 
    360   
    361            test_iter_diag=0. 
    362            do m=1,iter_visco               
     364 
     365        test_iter_diag=0. 
     366        do m=1,iter_visco               
     367           call diagnoshelf 
     368           call mix_SIA_L1   
     369           call strain_rate 
     370           if (test_iter_diag.lt.1.e-2) exit 
     371        end do 
     372 
     373        ! iterations pour inversion du beta en fonction des vitesses de bilan 
     374        if ((inv_beta.eq.1).and.(time.ge.time_iter).and.(time.le.time_iter_end)) then  ! iterations pendant 20 ans 
     375           do m=1,nb_iter_vitbil 
     376              call beta_iter_vitbil(m) 
    363377              call diagnoshelf 
    364               call mix_SIA_L1   
     378              call mix_SIA_L1 
    365379              call strain_rate 
    366               if (test_iter_diag.lt.1.e-2) exit 
    367380           end do 
    368             
    369            ! iterations pour inversion du beta en fonction des vitesses de bilan 
    370            if ((inv_beta.eq.1).and.(time.ge.time_iter).and.(time.le.time_iter_end)) then  ! iterations pendant 20 ans 
    371               do m=1,nb_iter_vitbil 
    372                  call beta_iter_vitbil(m) 
    373                  call diagnoshelf 
    374                  call mix_SIA_L1 
    375                  call strain_rate 
    376               end do 
    377            end if 
    378            ! fin des iterations beta_iter_vitbil 
    379  
    380         endif isync_2 
     381        end if 
     382        ! fin des iterations beta_iter_vitbil 
     383 
     384     endif isync_2 
    381385 
    382386     call  mix_SIA_L1   
    383387 
    384388  end if spinup_4_vitdyn 
    385   
    386    
     389 
     390 
    387391  ! isostasy 
    388392  !================= 
    389393 
    390394  spinup_3_bed: if ((ISYNCHRO.eq.1).and.(ispinup.eq.0.or.nt.lt.nt_init_tm)) then 
    391   !--------------------------------------------------------------------------------- 
    392   ! spinup_3_bed 
    393   !---------------- 
    394   ! Ne passe dans ce bloc que quand on veut l'isostasie, donc si variations epaisseur 
    395   ! run standard  (ispinup=0) et pour les initialisations                   
    396   !--------------------------------------------------------------------------------- 
    397  
    398   if (itracebug.eq.1)  call tracebug(' Dans spinup_3_bed') 
    399  
    400   if ((nbed.eq.1).and.nt.ne.1.and.isynchro.eq.1.and.(mod(abs(TIME),dt_iso).lt.dtmin)) then 
    401     call bedrock                 !  bedrock adjustment 
    402   endif 
     395     !--------------------------------------------------------------------------------- 
     396     ! spinup_3_bed 
     397     !---------------- 
     398     ! Ne passe dans ce bloc que quand on veut l'isostasie, donc si variations epaisseur 
     399     ! run standard  (ispinup=0) et pour les initialisations                   
     400     !--------------------------------------------------------------------------------- 
     401 
     402     if (itracebug.eq.1)  call tracebug(' Dans spinup_3_bed') 
     403 
     404     if ((nbed.eq.1).and.nt.ne.1.and.isynchro.eq.1.and.(mod(abs(TIME),dt_iso).lt.dtmin)) then 
     405        call bedrock                 !  bedrock adjustment 
     406     endif 
    403407 
    404408 
    405409  end if spinup_3_bed 
    406    
     410 
    407411 
    408412end subroutine step_thermomeca 
Note: See TracChangeset for help on using the changeset viewer.