[3149] | 1 | MODULE compute_tend_mod |
---|
[3076] | 2 | |
---|
| 3 | implicit none |
---|
| 4 | |
---|
| 5 | !======================================================================= |
---|
| 6 | contains |
---|
| 7 | !======================================================================= |
---|
| 8 | |
---|
[3149] | 9 | SUBROUTINE compute_tend(ngrid,nslope,min_ice,tendencies_ice) |
---|
[2779] | 10 | |
---|
[3070] | 11 | implicit none |
---|
[2779] | 12 | |
---|
| 13 | !======================================================================= |
---|
| 14 | ! |
---|
[3367] | 15 | ! Compute the initial tendencies of the ice evolution based on the PCM data |
---|
[2779] | 16 | ! |
---|
| 17 | !======================================================================= |
---|
| 18 | |
---|
| 19 | ! arguments: |
---|
| 20 | ! ---------- |
---|
| 21 | ! INPUT |
---|
[3149] | 22 | integer, intent(in) :: ngrid ! # of grid points |
---|
| 23 | integer, intent(in) :: nslope ! # of subslopes |
---|
| 24 | real, dimension(ngrid,nslope,2), intent(in) :: min_ice ! Minima of ice at each point for the PCM years |
---|
[2779] | 25 | |
---|
| 26 | ! OUTPUT |
---|
[3149] | 27 | real, dimension(ngrid,nslope), intent(out) :: tendencies_ice ! Difference between the minima = evolution of perennial ice |
---|
[2779] | 28 | !======================================================================= |
---|
[3149] | 29 | ! We compute the difference |
---|
| 30 | tendencies_ice = min_ice(:,:,2) - min_ice(:,:,1) |
---|
[2779] | 31 | |
---|
[3149] | 32 | ! If the difference is too small, then there is no evolution |
---|
[3070] | 33 | where (abs(tendencies_ice) < 1.e-10) tendencies_ice = 0. |
---|
[2779] | 34 | |
---|
[3367] | 35 | ! If the minimum over the last year is 0, then we have no perennial ice |
---|
[3366] | 36 | where (abs(min_ice(:,:,2)) < 1.e-10) tendencies_ice = 0. |
---|
[3367] | 37 | |
---|
[3149] | 38 | END SUBROUTINE compute_tend |
---|
[2779] | 39 | |
---|
[3149] | 40 | END MODULE compute_tend_mod |
---|