10 |
|
|
11 |
contains |
contains |
12 |
|
|
13 |
SUBROUTINE phyetat0(fichnom, pctsrf, tsol, tsoil, ocean, tslab, seaice, & |
SUBROUTINE phyetat0(pctsrf, tsol, tsoil, tslab, seaice, qsurf, qsol, & |
14 |
qsurf, qsol, snow, albe, alblw, evap, rain_fall, snow_fall, solsw, & |
snow, albe, alblw, evap, rain_fall, snow_fall, solsw, sollw, fder, & |
15 |
sollw, fder, radsol, frugs, agesno, zmea, zstd, zsig, zgam, zthe, & |
radsol, frugs, agesno, zmea, zstd, zsig, zgam, zthe, zpic, zval, & |
16 |
zpic, zval, t_ancien, q_ancien, ancien_ok, rnebcon, ratqs, clwcon, & |
t_ancien, q_ancien, ancien_ok, rnebcon, ratqs, clwcon, run_off_lic_0, & |
17 |
run_off_lic_0) |
sig1, w01) |
18 |
|
|
19 |
! From phylmd/phyetat0.F, version 1.4 2005/06/03 10:03:07 |
! From phylmd/phyetat0.F, version 1.4 2005/06/03 10:03:07 |
20 |
! Author: Z.X. Li (LMD/CNRS) |
! Author: Z.X. Li (LMD/CNRS) |
21 |
! Date: 1993/08/18 |
! Date: 1993/08/18 |
22 |
! Objet : Lecture de l'état initial pour la physique |
! Objet : lecture de l'état initial pour la physique |
23 |
|
|
24 |
USE indicesol, ONLY : epsfra, is_lic, is_oce, is_sic, is_ter, nbsrf |
use dimphy, only: zmasq, klev |
25 |
USE dimsoil, ONLY : nsoilmx |
USE dimsoil, ONLY : nsoilmx |
26 |
USE temps, ONLY : itau_phy |
USE indicesol, ONLY : epsfra, is_lic, is_oce, is_sic, is_ter, nbsrf |
27 |
use netcdf, only: nf90_get_att, nf90_global, nf90_inq_varid, NF90_NOERR, & |
use netcdf, only: nf90_get_att, nf90_global, nf90_inq_varid, NF90_NOERR, & |
28 |
NF90_NOWRITE |
NF90_NOWRITE |
29 |
use netcdf95, only: handle_err, nf95_get_var, nf95_close, NF95_OPEN, & |
use netcdf95, only: handle_err, nf95_get_var, nf95_close, NF95_OPEN, & |
30 |
nf95_inq_varid |
nf95_inq_varid |
31 |
use dimphy, only: zmasq, klev |
USE temps, ONLY : itau_phy |
32 |
|
|
33 |
CHARACTER(len=*), intent(in):: fichnom |
REAL pctsrf(klon, nbsrf) |
34 |
REAL tsol(klon, nbsrf) |
REAL tsol(klon, nbsrf) |
35 |
REAL tsoil(klon, nsoilmx, nbsrf) |
REAL tsoil(klon, nsoilmx, nbsrf) |
36 |
REAL tslab(klon), seaice(klon) |
REAL tslab(klon), seaice(klon) |
37 |
REAL qsurf(klon, nbsrf) |
REAL qsurf(klon, nbsrf) |
38 |
REAL qsol(klon) |
REAL, intent(out):: qsol(:) ! (klon) |
39 |
REAL snow(klon, nbsrf) |
REAL snow(klon, nbsrf) |
40 |
REAL albe(klon, nbsrf) |
REAL albe(klon, nbsrf) |
41 |
REAL alblw(klon, nbsrf) |
REAL alblw(klon, nbsrf) |
42 |
REAL evap(klon, nbsrf) |
REAL evap(klon, nbsrf) |
43 |
REAL radsol(klon) |
REAL, intent(out):: rain_fall(klon) |
|
REAL rain_fall(klon) |
|
44 |
REAL snow_fall(klon) |
REAL snow_fall(klon) |
|
REAL sollw(klon) |
|
45 |
real solsw(klon) |
real solsw(klon) |
46 |
|
REAL, intent(out):: sollw(klon) |
47 |
real fder(klon) |
real fder(klon) |
48 |
|
REAL radsol(klon) |
49 |
REAL frugs(klon, nbsrf) |
REAL frugs(klon, nbsrf) |
50 |
REAL agesno(klon, nbsrf) |
REAL agesno(klon, nbsrf) |
51 |
REAL zmea(klon) |
REAL zmea(klon) |
55 |
REAL zthe(klon) |
REAL zthe(klon) |
56 |
REAL zpic(klon) |
REAL zpic(klon) |
57 |
REAL zval(klon) |
REAL zval(klon) |
|
REAL pctsrf(klon, nbsrf) |
|
|
REAL fractint(klon) |
|
|
REAL run_off_lic_0(klon) |
|
|
|
|
58 |
REAL t_ancien(klon, klev), q_ancien(klon, klev) |
REAL t_ancien(klon, klev), q_ancien(klon, klev) |
|
real rnebcon(klon, klev), clwcon(klon, klev), ratqs(klon, klev) |
|
59 |
LOGICAL, intent(out):: ancien_ok |
LOGICAL, intent(out):: ancien_ok |
60 |
|
real rnebcon(klon, klev), ratqs(klon, klev), clwcon(klon, klev) |
61 |
|
REAL run_off_lic_0(klon) |
62 |
|
real, intent(out):: sig1(klon, klev) ! section adiabatic updraft |
63 |
|
|
64 |
CHARACTER(len=*), intent(in):: ocean |
real, intent(out):: w01(klon, klev) |
65 |
|
! vertical velocity within adiabatic updraft |
66 |
|
|
67 |
|
! Local: |
68 |
|
REAL fractint(klon) |
69 |
REAL xmin, xmax |
REAL xmin, xmax |
|
|
|
70 |
INTEGER ncid, varid |
INTEGER ncid, varid |
71 |
INTEGER ierr, i, nsrf, isoil |
INTEGER ierr, i, nsrf, isoil |
72 |
CHARACTER*7 str7 |
CHARACTER(len=7) str7 |
73 |
CHARACTER*2 str2 |
CHARACTER(len=2) str2 |
74 |
|
|
75 |
!--------------------------------------------------------------- |
!--------------------------------------------------------------- |
76 |
|
|
77 |
print *, "Call sequence information: phyetat0" |
print *, "Call sequence information: phyetat0" |
78 |
|
|
79 |
! Ouvrir le fichier contenant l'etat initial: |
! Fichier contenant l'état initial : |
80 |
print *, 'fichnom = ', fichnom |
call NF95_OPEN("startphy.nc", NF90_NOWRITE, ncid) |
|
call NF95_OPEN(fichnom, NF90_NOWRITE, ncid) |
|
81 |
|
|
82 |
ierr = nf90_get_att(ncid, nf90_global, "itau_phy", itau_phy) |
ierr = nf90_get_att(ncid, nf90_global, "itau_phy", itau_phy) |
83 |
call handle_err("phyetat0 itau_phy", ierr, ncid, nf90_global) |
call handle_err("phyetat0 itau_phy", ierr, ncid, nf90_global) |
225 |
ENDDO |
ENDDO |
226 |
|
|
227 |
!IM "slab" ocean |
!IM "slab" ocean |
|
|
|
228 |
! Lecture de tslab (pour slab ocean seulement): |
! Lecture de tslab (pour slab ocean seulement): |
229 |
|
tslab = 0. |
230 |
IF (ocean .eq. 'slab ') then |
seaice = 0. |
|
call NF95_INQ_VARID(ncid, "TSLAB", varid) |
|
|
call nf95_get_var(ncid, varid, tslab) |
|
|
xmin = 1.0E+20 |
|
|
xmax = -1.0E+20 |
|
|
DO i = 1, klon |
|
|
xmin = MIN(tslab(i), xmin) |
|
|
xmax = MAX(tslab(i), xmax) |
|
|
ENDDO |
|
|
PRINT *, 'Ecart de la SST tslab:', xmin, xmax |
|
|
|
|
|
! Lecture de seaice (pour slab ocean seulement): |
|
|
|
|
|
call NF95_INQ_VARID(ncid, "SEAICE", varid) |
|
|
call nf95_get_var(ncid, varid, seaice) |
|
|
xmin = 1.0E+20 |
|
|
xmax = -1.0E+20 |
|
|
DO i = 1, klon |
|
|
xmin = MIN(seaice(i), xmin) |
|
|
xmax = MAX(seaice(i), xmax) |
|
|
ENDDO |
|
|
PRINT *, 'Masse de la glace de mer seaice:', xmin, xmax |
|
|
ELSE |
|
|
tslab = 0. |
|
|
seaice = 0. |
|
|
ENDIF |
|
231 |
|
|
232 |
! Lecture de l'humidite de l'air juste au dessus du sol: |
! Lecture de l'humidite de l'air juste au dessus du sol: |
233 |
|
|
279 |
PRINT *, ' Valeur par defaut nulle' |
PRINT *, ' Valeur par defaut nulle' |
280 |
qsol = 0. |
qsol = 0. |
281 |
ENDIF |
ENDIF |
|
xmin = 1.0E+20 |
|
|
xmax = -1.0E+20 |
|
|
DO i = 1, klon |
|
|
xmin = MIN(qsol(i), xmin) |
|
|
xmax = MAX(qsol(i), xmax) |
|
|
ENDDO |
|
|
PRINT *, 'Eau dans le sol (mm) <QSOL>', xmin, xmax |
|
282 |
|
|
283 |
! Lecture de neige au sol: |
! Lecture de neige au sol: |
284 |
|
|
482 |
ELSE |
ELSE |
483 |
call nf95_get_var(ncid, varid, sollw) |
call nf95_get_var(ncid, varid, sollw) |
484 |
ENDIF |
ENDIF |
485 |
xmin = 1.0E+20 |
PRINT *, 'Rayonnement IF au sol sollw:', minval(sollw), maxval(sollw) |
|
xmax = -1.0E+20 |
|
|
DO i = 1, klon |
|
|
xmin = MIN(sollw(i), xmin) |
|
|
xmax = MAX(sollw(i), xmax) |
|
|
ENDDO |
|
|
PRINT *, 'Rayonnement IF au sol sollw:', xmin, xmax |
|
486 |
|
|
487 |
! Lecture derive des flux: |
! Lecture derive des flux: |
488 |
|
|
694 |
PRINT *, "Depart legerement fausse. Mais je continue" |
PRINT *, "Depart legerement fausse. Mais je continue" |
695 |
clwcon = 0. |
clwcon = 0. |
696 |
ELSE |
ELSE |
697 |
call nf95_get_var(ncid, varid, clwcon) |
call nf95_get_var(ncid, varid, clwcon(:, 1)) |
698 |
|
clwcon(:, 2:) = 0. |
699 |
ENDIF |
ENDIF |
700 |
xmin = 1.0E+20 |
xmin = 1.0E+20 |
701 |
xmax = -1.0E+20 |
xmax = -1.0E+20 |
709 |
PRINT *, "Depart legerement fausse. Mais je continue" |
PRINT *, "Depart legerement fausse. Mais je continue" |
710 |
rnebcon = 0. |
rnebcon = 0. |
711 |
ELSE |
ELSE |
712 |
call nf95_get_var(ncid, varid, rnebcon) |
call nf95_get_var(ncid, varid, rnebcon(:, 1)) |
713 |
|
rnebcon(:, 2:) = 0. |
714 |
ENDIF |
ENDIF |
715 |
xmin = 1.0E+20 |
xmin = 1.0E+20 |
716 |
xmax = -1.0E+20 |
xmax = -1.0E+20 |
726 |
PRINT *, "Depart legerement fausse. Mais je continue" |
PRINT *, "Depart legerement fausse. Mais je continue" |
727 |
ratqs = 0. |
ratqs = 0. |
728 |
ELSE |
ELSE |
729 |
call nf95_get_var(ncid, varid, ratqs) |
call nf95_get_var(ncid, varid, ratqs(:, 1)) |
730 |
|
ratqs(:, 2:) = 0. |
731 |
ENDIF |
ENDIF |
732 |
xmin = 1.0E+20 |
xmin = 1.0E+20 |
733 |
xmax = -1.0E+20 |
xmax = -1.0E+20 |
751 |
xmax = MAXval(run_off_lic_0) |
xmax = MAXval(run_off_lic_0) |
752 |
PRINT *, '(ecart-type) run_off_lic_0:', xmin, xmax |
PRINT *, '(ecart-type) run_off_lic_0:', xmin, xmax |
753 |
|
|
754 |
|
call nf95_inq_varid(ncid, "sig1", varid) |
755 |
|
call nf95_get_var(ncid, varid, sig1) |
756 |
|
|
757 |
|
call nf95_inq_varid(ncid, "w01", varid) |
758 |
|
call nf95_get_var(ncid, varid, w01) |
759 |
|
|
760 |
call NF95_CLOSE(ncid) |
call NF95_CLOSE(ncid) |
761 |
|
|
762 |
END SUBROUTINE phyetat0 |
END SUBROUTINE phyetat0 |