| 1 | ! |
|---|
| 2 | ! $Id $ |
|---|
| 3 | ! |
|---|
| 4 | SUBROUTINE criterion_ice_stop_slope(cell_area,ini_surf,qsurf,STOPPING,ngrid,initial_h2o_ice,global_ave_press_GCM,global_ave_press_new,nslope) |
|---|
| 5 | |
|---|
| 6 | USE temps_mod_evol, ONLY: alpha_criterion |
|---|
| 7 | use comslope_mod, ONLY: subslope_dist |
|---|
| 8 | |
|---|
| 9 | IMPLICIT NONE |
|---|
| 10 | |
|---|
| 11 | !======================================================================= |
|---|
| 12 | ! |
|---|
| 13 | ! Routine that checks if the criterion to stop the PEM is reached |
|---|
| 14 | ! |
|---|
| 15 | !======================================================================= |
|---|
| 16 | |
|---|
| 17 | ! arguments: |
|---|
| 18 | ! ---------- |
|---|
| 19 | |
|---|
| 20 | ! INPUT |
|---|
| 21 | INTEGER, intent(in) :: ngrid,nslope ! # of grid physical grid points |
|---|
| 22 | REAL, intent(in) :: cell_area(ngrid) ! physical point field : Area of the cells |
|---|
| 23 | REAL, intent(in) :: qsurf(ngrid,nslope) ! physical point field : Actual density of water ice |
|---|
| 24 | REAL, intent(in) :: ini_surf |
|---|
| 25 | REAL, intent(in) :: initial_h2o_ice(ngrid,nslope) |
|---|
| 26 | REAL, intent(in) :: global_ave_press_GCM |
|---|
| 27 | REAL, intent(in) :: global_ave_press_new |
|---|
| 28 | |
|---|
| 29 | ! OUTPUT |
|---|
| 30 | LOGICAL, intent(out) :: STOPPING ! Logical : is the criterion reached? |
|---|
| 31 | |
|---|
| 32 | ! local: |
|---|
| 33 | ! ----- |
|---|
| 34 | INTEGER :: i,islope ! Loop |
|---|
| 35 | REAL :: present_surf ! Initial/Actual surface of water ice |
|---|
| 36 | |
|---|
| 37 | !======================================================================= |
|---|
| 38 | |
|---|
| 39 | ! initialisation to false |
|---|
| 40 | STOPPING=.FALSE. |
|---|
| 41 | |
|---|
| 42 | ! computation of the actual surface |
|---|
| 43 | present_surf=0. |
|---|
| 44 | do i=1,ngrid |
|---|
| 45 | do islope=1,nslope |
|---|
| 46 | if (initial_h2o_ice(i,islope).GT.0.5 .and. qsurf(i,islope).GT.0.) then |
|---|
| 47 | present_surf=present_surf+cell_area(i)*subslope_dist(i,islope) |
|---|
| 48 | endif |
|---|
| 49 | enddo |
|---|
| 50 | enddo |
|---|
| 51 | |
|---|
| 52 | ! check of the criterion |
|---|
| 53 | if(present_surf.LT.ini_surf*(1-alpha_criterion) .OR. & |
|---|
| 54 | present_surf.GT.ini_surf*(1+alpha_criterion)) then |
|---|
| 55 | STOPPING=.TRUE. |
|---|
| 56 | print *, "Reason of stopping : The surface of co2 ice sublimating reach the threshold:" |
|---|
| 57 | print *, "Current surface of co2 ice sublimating=", present_surf |
|---|
| 58 | print *, "Initial surface of co2 ice sublimating=", ini_surf |
|---|
| 59 | print *, "Percentage of change accepted=", alpha_criterion*100 |
|---|
| 60 | print *, "present_surf<ini_surf*(1-alpha_criterion)", (present_surf.LT.ini_surf*(1-alpha_criterion)) |
|---|
| 61 | endif |
|---|
| 62 | |
|---|
| 63 | if (ini_surf.LT. 1E-5 .and. ini_surf.GT. -1E-5) then |
|---|
| 64 | STOPPING=.FALSE. |
|---|
| 65 | endif |
|---|
| 66 | |
|---|
| 67 | if(global_ave_press_new.LT.global_ave_press_GCM*(0.9) .OR. & |
|---|
| 68 | global_ave_press_new.GT.global_ave_press_GCM*(1.1)) then |
|---|
| 69 | STOPPING=.TRUE. |
|---|
| 70 | print *, "Reason of stopping : The global pressure reach the threshold:" |
|---|
| 71 | print *, "Current global pressure=", global_ave_press_new |
|---|
| 72 | print *, "GCM global pressure=", global_ave_press_GCM |
|---|
| 73 | print *, "Percentage of change accepted=", 0.1*100 |
|---|
| 74 | print *, "global_ave_press_new<global_ave_press_GCM*(0.9)", (global_ave_press_new.LT.global_ave_press_GCM*(0.9)) |
|---|
| 75 | endif |
|---|
| 76 | |
|---|
| 77 | END SUBROUTINE criterion_ice_stop_slope |
|---|
| 78 | |
|---|
| 79 | |
|---|