4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
SUBROUTINE limit |
SUBROUTINE limit(pctsrf) |
8 |
|
|
9 |
! Authors: L. Fairhead, Z. X. Li, P. Le Van |
! Authors: L. Fairhead, Z. X. Li, P. Le Van |
10 |
|
|
13 |
! regular. |
! regular. |
14 |
|
|
15 |
use conf_dat2d_m, only: conf_dat2d |
use conf_dat2d_m, only: conf_dat2d |
16 |
use dimens_m, only: iim, jjm |
use dimensions, only: iim, jjm |
17 |
use dimphy, only: klon, zmasq |
use dimphy, only: klon |
18 |
use dynetat0_m, only: rlonu, rlatv |
use dynetat0_m, only: rlonu, rlatv |
|
use etat0_mod, only: pctsrf |
|
19 |
use grid_change, only: dyn_phy |
use grid_change, only: dyn_phy |
20 |
use indicesol, only: epsfra, is_ter, is_oce, is_lic, is_sic |
use indicesol, only: epsfra, is_ter, is_oce, is_lic, is_sic |
21 |
use inter_barxy_m, only: inter_barxy |
use inter_barxy_m, only: inter_barxy |
27 |
NF90_UNLIMITED |
NF90_UNLIMITED |
28 |
use nr_util, only: assert |
use nr_util, only: assert |
29 |
use numer_rec_95, only: spline, splint |
use numer_rec_95, only: spline, splint |
30 |
|
use phyetat0_m, only: masque |
31 |
use start_init_orog_m, only: mask |
use start_init_orog_m, only: mask |
32 |
use unit_nml_m, only: unit_nml |
use unit_nml_m, only: unit_nml |
33 |
|
|
34 |
|
REAL, intent(inout):: pctsrf(:, :) ! (klon, nbsrf) |
35 |
|
! "pctsrf(i, :)" is the composition of the surface at horizontal |
36 |
|
! position "i". |
37 |
|
|
38 |
! Local: |
! Local: |
39 |
|
|
40 |
LOGICAL:: extrap = .FALSE. |
LOGICAL:: extrap = .FALSE. |
249 |
pctsrf(:, is_sic) = max(phy_ice - pctsrf(:, is_lic), 0.) |
pctsrf(:, is_sic) = max(phy_ice - pctsrf(:, is_lic), 0.) |
250 |
! Il y a des cas o\`u il y a de la glace dans landiceref et |
! Il y a des cas o\`u il y a de la glace dans landiceref et |
251 |
! pas dans AMIP |
! pas dans AMIP |
252 |
WHERE (1. - zmasq < EPSFRA) |
WHERE (1. - masque < EPSFRA) |
253 |
pctsrf(:, is_sic) = 0. |
pctsrf(:, is_sic) = 0. |
254 |
pctsrf(:, is_oce) = 0. |
pctsrf(:, is_oce) = 0. |
255 |
elsewhere |
elsewhere |
256 |
where (pctsrf(:, is_sic) >= 1 - zmasq) |
where (pctsrf(:, is_sic) >= 1 - masque) |
257 |
pctsrf(:, is_sic) = 1. - zmasq |
pctsrf(:, is_sic) = 1. - masque |
258 |
pctsrf(:, is_oce) = 0. |
pctsrf(:, is_oce) = 0. |
259 |
ELSEwhere |
ELSEwhere |
260 |
pctsrf(:, is_oce) = 1. - zmasq - pctsrf(:, is_sic) |
pctsrf(:, is_oce) = 1. - masque - pctsrf(:, is_sic) |
261 |
where (pctsrf(:, is_oce) < EPSFRA) |
where (pctsrf(:, is_oce) < EPSFRA) |
262 |
pctsrf(:, is_oce) = 0. |
pctsrf(:, is_oce) = 0. |
263 |
pctsrf(:, is_sic) = 1 - zmasq |
pctsrf(:, is_sic) = 1 - masque |
264 |
end where |
end where |
265 |
end where |
end where |
266 |
end where |
end where |