24 & carbon_cycle_tr, carbon_cycle_cpl, co2_send
31 #include "dimensions.h"
33 #include "indicesol.h"
37 #include "thermcell.h"
44 REAL tsoil(klon,nsoilmx,nbsrf)
45 REAL tslab(klon), seaice(klon)
46 REAL qsurf(klon,nbsrf)
51 REAL frugs(klon,nbsrf)
52 REAL agesno(klon,nbsrf)
53 REAL run_off_lic_0(klon)
62 REAL clesphy0( longcles )
67 INTEGER ierr,
i,
nsrf, isoil ,
k
71 REAL tab_cntrl(length), tabcntr0(length)
78 real iolat(jjm+1-1/(
iim*jjm))
90 CALL
get_var(
"controle",tab_cntrl)
105 tabcntr0(
i ) = tab_cntrl(
i )
112 IF (carbon_cycle_tr .OR. carbon_cycle_cpl)
THEN
114 rco2 =
co2_ppm * 1.0e-06 * 44.011/28.97
121 solaire_etat0 = tab_cntrl(4)
136 clesphy0(1)=tab_cntrl( 5 )
137 clesphy0(2)=tab_cntrl( 6 )
138 clesphy0(3)=tab_cntrl( 7 )
139 clesphy0(4)=tab_cntrl( 8 )
140 clesphy0(5)=tab_cntrl( 9 )
141 clesphy0(6)=tab_cntrl( 10 )
142 clesphy0(7)=tab_cntrl( 11 )
143 clesphy0(8)=tab_cntrl( 12 )
160 IF (.NOT. found)
THEN
161 print*,
'phyetat0: Le champ <masque> est absent'
162 print *,
'fichier startphy non compatible avec phyetat0'
175 CALL
get_field(
"FTER",pctsrf(:,is_ter),found)
176 IF (.NOT. found) print*,
'phyetat0: Le champ <FTER> est absent'
181 CALL
get_field(
"FLIC",pctsrf(:,is_lic),found)
182 IF (.NOT. found) print*,
'phyetat0: Le champ <FLIC> est absent'
187 CALL
get_field(
"FOCE",pctsrf(:,is_oce),found)
188 IF (.NOT. found) print*,
'phyetat0: Le champ <FOCE> est absent'
193 CALL
get_field(
"FSIC",pctsrf(:,is_sic),found)
194 IF (.NOT. found) print*,
'phyetat0: Le champ <FSIC> est absent'
199 fractint( 1 : klon) = pctsrf(1 : klon, is_ter)
200 $ + pctsrf(1 : klon, is_lic)
202 IF ( abs(fractint(
i) - zmasq(
i) ) .GT. epsfra )
THEN
203 WRITE(*,*)
'phyetat0: attention fraction terre pas ',
204 $
'coherente ',
i, zmasq(
i), pctsrf(
i, is_ter)
206 WRITE(*,*)
'Je force la coherence zmasq=fractint'
207 zmasq(
i) = fractint(
i)
210 fractint(1 : klon) = pctsrf(1 : klon, is_oce)
211 $ + pctsrf(1 : klon, is_sic)
213 IF ( abs( fractint(
i) - (1. - zmasq(
i))) .GT. epsfra )
THEN
214 WRITE(*,*)
'phyetat0 attention fraction ocean pas ',
215 $
'coherente ',
i, zmasq(
i) , pctsrf(
i, is_oce)
217 WRITE(*,*)
'Je force la coherence zmasq=fractint'
218 zmasq(
i) = fractint(
i)
227 IF (.NOT. found)
THEN
228 print*,
'phyetat0: Le champ <TS> est absent'
229 print*,
' Mais je vais essayer de lire TS**'
232 print*,
"Trop de sous-mailles"
235 WRITE(str2,
'(i2.2)')
nsrf
241 xmin = min(ftsol(
i,
nsrf),xmin)
242 xmax = max(ftsol(
i,
nsrf),xmax)
244 print*,
'Temperature du sol TS**:',
nsrf, xmin, xmax
247 print*,
'phyetat0: Le champ <TS> est present'
248 print*,
' J ignore donc les autres temperatures TS**'
252 xmin = min(ftsol(
i,1),xmin)
253 xmax = max(ftsol(
i,1),xmax)
255 print*,
'Temperature du sol <TS>', xmin, xmax
258 ftsol(
i,
nsrf) = ftsol(
i,1)
268 IF (isoil.GT.99 .AND.
nsrf.GT.99)
THEN
269 print*,
"Trop de couches ou sous-mailles"
272 WRITE(str7,
'(i2.2,"srf",i2.2)') isoil,
nsrf
275 IF (.NOT. found)
THEN
276 print*,
"phyetat0: Le champ <Tsoil"//str7//
"> est absent"
277 print*,
" Il prend donc la valeur de surface"
289 IF (.NOT. found)
THEN
290 print*,
'phyetat0: Le champ <QS> est absent'
291 print*,
' Mais je vais essayer de lire QS**'
294 print*,
"Trop de sous-mailles"
297 WRITE(str2,
'(i2.2)')
nsrf
305 print*,
'Humidite pres du sol QS**:',
nsrf, xmin, xmax
308 print*,
'phyetat0: Le champ <QS> est present'
309 print*,
' J ignore donc les autres humidites QS**'
313 xmin = min(
qsurf(
i,1),xmin)
314 xmax = max(
qsurf(
i,1),xmax)
316 print*,
'Humidite pres du sol <QS>', xmin, xmax
328 IF (.NOT. found)
THEN
329 print*,
'phyetat0: Le champ <QSOL> est absent'
330 print*,
' Valeur par defaut nulle'
337 xmin = min(
qsol(
i),xmin)
338 xmax = max(
qsol(
i),xmax)
340 print*,
'Eau dans le sol (mm) <QSOL>', xmin, xmax
347 IF (.NOT. found)
THEN
348 print*,
'phyetat0: Le champ <SNOW> est absent'
349 print*,
' Mais je vais essayer de lire SNOW**'
352 print*,
"Trop de sous-mailles"
355 WRITE(str2,
'(i2.2)')
nsrf
360 xmin = min(snow(
i,
nsrf),xmin)
361 xmax = max(snow(
i,
nsrf),xmax)
363 print*,
'Neige du sol SNOW**:',
nsrf, xmin, xmax
366 print*,
'phyetat0: Le champ <SNOW> est present'
367 print*,
' J ignore donc les autres neiges SNOW**'
371 xmin = min(snow(
i,1),xmin)
372 xmax = max(snow(
i,1),xmax)
374 print*,
'Neige du sol <SNOW>', xmin, xmax
385 IF (.NOT. found)
THEN
386 print*,
'phyetat0: Le champ <ALBE> est absent'
387 print*,
' Mais je vais essayer de lire ALBE**'
390 print*,
"Trop de sous-mailles"
393 WRITE(str2,
'(i2.2)')
nsrf
398 xmin = min(falb1(
i,
nsrf),xmin)
399 xmax = max(falb1(
i,
nsrf),xmax)
401 print*,
'Albedo du sol ALBE**:',
nsrf, xmin, xmax
404 print*,
'phyetat0: Le champ <ALBE> est present'
405 print*,
' J ignore donc les autres ALBE**'
409 xmin = min(falb1(
i,1),xmin)
410 xmax = max(falb1(
i,1),xmax)
412 print*,
'Neige du sol <ALBE>', xmin, xmax
415 falb1(
i,
nsrf) = falb1(
i,1)
424 IF (.NOT. found)
THEN
425 print*,
'phyetat0: Le champ <ALBLW> est absent'
426 print*,
' Mais je vais prendre ALBE**'
433 print*,
'phyetat0: Le champ <ALBLW> est present'
434 print*,
' J ignore donc les autres ALBLW**'
438 xmin = min(falb2(
i,1),xmin)
439 xmax = max(falb2(
i,1),xmax)
441 print*,
'Neige du sol <ALBLW>', xmin, xmax
444 falb2(
i,
nsrf) = falb2(
i,1)
452 IF (.NOT. found)
THEN
453 print*,
'phyetat0: Le champ <EVAP> est absent'
454 print*,
' Mais je vais essayer de lire EVAP**'
457 print*,
"Trop de sous-mailles"
460 WRITE(str2,
'(i2.2)')
nsrf
465 xmin = min(evap(
i,
nsrf),xmin)
466 xmax = max(evap(
i,
nsrf),xmax)
468 print*,
'evap du sol EVAP**:',
nsrf, xmin, xmax
471 print*,
'phyetat0: Le champ <EVAP> est present'
472 print*,
' J ignore donc les autres EVAP**'
476 xmin = min(evap(
i,1),xmin)
477 xmax = max(evap(
i,1),xmax)
479 print*,
'Evap du sol <EVAP>', xmin, xmax
493 xmin = min(rain_fall(
i),xmin)
494 xmax = max(rain_fall(
i),xmax)
496 print*,
'Precipitation liquide rain_f:', xmin, xmax
504 xmin = min(snow_fall(
i),xmin)
505 xmax = max(snow_fall(
i),xmax)
507 print*,
'Precipitation solide snow_f:', xmin, xmax
512 IF (.NOT. found)
THEN
513 print*,
'phyetat0: Le champ <solsw> est absent'
520 xmin = min(solsw(
i),xmin)
521 xmax = max(solsw(
i),xmax)
523 print*,
'Rayonnement solaire au sol solsw:', xmin, xmax
528 IF (.NOT. found)
THEN
529 print*,
'phyetat0: Le champ <sollw> est absent'
536 xmin = min(sollw(
i),xmin)
537 xmax = max(sollw(
i),xmax)
539 print*,
'Rayonnement IF au sol sollw:', xmin, xmax
545 IF (.NOT. found)
THEN
546 print*,
'phyetat0: Le champ <fder> est absent'
553 xmin = min(fder(
i),xmin)
554 xmax = max(fder(
i),xmax)
556 print*,
'Derive des flux fder:', xmin, xmax
565 xmin = min(radsol(
i),xmin)
566 xmax = max(radsol(
i),xmax)
568 print*,
'Rayonnement net au sol radsol:', xmin, xmax
574 IF (.NOT. found)
THEN
575 print*,
'phyetat0: Le champ <RUG> est absent'
576 print*,
' Mais je vais essayer de lire RUG**'
579 print*,
"Trop de sous-mailles"
582 WRITE(str2,
'(i2.2)')
nsrf
587 xmin = min(frugs(
i,
nsrf),xmin)
588 xmax = max(frugs(
i,
nsrf),xmax)
590 print*,
'rugosite du sol RUG**:',
nsrf, xmin, xmax
593 print*,
'phyetat0: Le champ <RUG> est present'
594 print*,
' J ignore donc les autres RUG**'
598 xmin = min(frugs(
i,1),xmin)
599 xmax = max(frugs(
i,1),xmax)
601 print*,
'rugosite <RUG>', xmin, xmax
604 frugs(
i,
nsrf) = frugs(
i,1)
612 CALL
get_field(
"AGESNO",agesno(:,1),found)
613 IF (.NOT. found)
THEN
614 print*,
'phyetat0: Le champ <AGESNO> est absent'
615 print*,
' Mais je vais essayer de lire AGESNO**'
618 print*,
"Trop de sous-mailles"
621 WRITE(str2,
'(i2.2)')
nsrf
623 IF (.NOT. found)
THEN
624 print*,
"phyetat0: Le champ <AGESNO"//str2//
"> est absent"
630 xmin = min(agesno(
i,
nsrf),xmin)
631 xmax = max(agesno(
i,
nsrf),xmax)
633 print*,
'Age de la neige AGESNO**:',
nsrf, xmin, xmax
636 print*,
'phyetat0: Le champ <AGESNO> est present'
637 print*,
' J ignore donc les autres AGESNO**'
641 xmin = min(agesno(
i,1),xmin)
642 xmax = max(agesno(
i,1),xmax)
644 print*,
'Age de la neige <AGESNO>', xmin, xmax
647 agesno(
i,
nsrf) = agesno(
i,1)
657 xmin = min(zmea(
i),xmin)
658 xmax = max(zmea(
i),xmax)
660 print*,
'OROGRAPHIE SOUS-MAILLE zmea:', xmin, xmax
667 xmin = min(zstd(
i),xmin)
668 xmax = max(zstd(
i),xmax)
670 print*,
'OROGRAPHIE SOUS-MAILLE zstd:', xmin, xmax
677 xmin = min(zsig(
i),xmin)
678 xmax = max(zsig(
i),xmax)
680 print*,
'OROGRAPHIE SOUS-MAILLE zsig:', xmin, xmax
687 xmin = min(zgam(
i),xmin)
688 xmax = max(zgam(
i),xmax)
690 print*,
'OROGRAPHIE SOUS-MAILLE zgam:', xmin, xmax
697 xmin = min(zthe(
i),xmin)
698 xmax = max(zthe(
i),xmax)
700 print*,
'OROGRAPHIE SOUS-MAILLE zthe:', xmin, xmax
707 xmin = min(zpic(
i),xmin)
708 xmax = max(zpic(
i),xmax)
710 print*,
'OROGRAPHIE SOUS-MAILLE zpic:', xmin, xmax
716 xmin = min(zval(
i),xmin)
717 xmax = max(zval(
i),xmax)
719 print*,
'OROGRAPHIE SOUS-MAILLE zval:', xmin, xmax
726 xmin = min(rugoro(
i),xmin)
727 xmax = max(rugoro(
i),xmax)
729 print*,
'Rugosite relief (ecart-type) rugsrel:', xmin, xmax
737 IF (.NOT. found)
THEN
738 print*,
"phyetat0: Le champ <TANCIEN> est absent"
739 print*,
"Depart legerement fausse. Mais je continue"
745 IF (.NOT. found)
THEN
746 print*,
"phyetat0: Le champ <QANCIEN> est absent"
747 print*,
"Depart legerement fausse. Mais je continue"
752 IF (.NOT. found)
THEN
753 print*,
"phyetat0: Le champ <UANCIEN> est absent"
754 print*,
"Depart legerement fausse. Mais je continue"
759 IF (.NOT. found)
THEN
760 print*,
"phyetat0: Le champ <VANCIEN> est absent"
761 print*,
"Depart legerement fausse. Mais je continue"
767 IF (.NOT. found)
THEN
768 print*,
"phyetat0: Le champ CLWCON est absent"
769 print*,
"Depart legerement fausse. Mais je continue"
773 xmin = minval(clwcon)
774 xmax = maxval(clwcon)
775 print*,
'Eau liquide convective (ecart-type) clwcon:', xmin, xmax
779 IF (.NOT. found)
THEN
780 print*,
"phyetat0: Le champ RNEBCON est absent"
781 print*,
"Depart legerement fausse. Mais je continue"
785 xmin = minval(rnebcon)
786 xmax = maxval(rnebcon)
787 print*,
'Nebulosite convective (ecart-type) rnebcon:', xmin, xmax
794 IF (.NOT. found)
THEN
795 print*,
"phyetat0: Le champ <RATQS> est absent"
796 print*,
"Depart legerement fausse. Mais je continue"
802 print*,
'(ecart-type) ratqs:', xmin, xmax
806 CALL
get_field(
"RUNOFFLIC0",run_off_lic_0,found)
807 IF (.NOT. found)
THEN
808 print*,
"phyetat0: Le champ <RUNOFFLIC0> est absent"
809 print*,
"Depart legerement fausse. Mais je continue"
814 xmin = minval(run_off_lic_0)
815 xmax = maxval(run_off_lic_0)
816 print*,
'(ecart-type) run_off_lic_0:', xmin, xmax
822 IF (iflag_pbl>1)
then
825 print*,
"Trop de sous-mailles"
828 WRITE(str2,
'(i2.2)')
nsrf
830 IF (.NOT. found)
THEN
831 print*,
"phyetat0: <TKE"//str2//
"> est absent"
832 pbl_tke(:,:,
nsrf)=1.e-8
838 xmin = min(pbl_tke(
i,
k,
nsrf),xmin)
839 xmax = max(pbl_tke(
i,
k,
nsrf),xmax)
842 print*,
'Temperature du sol TKE**:',
nsrf, xmin, xmax
848 IF (.NOT. found)
THEN
849 print*,
"phyetat0: Le champ <ZMAX0> est absent"
850 print*,
"Depart legerement fausse. Mais je continue"
857 print*,
'(ecart-type) zmax0:', xmin, xmax
862 IF (.NOT. found)
THEN
863 print*,
"phyetat0: Le champ <f0> est absent"
864 print*,
"Depart legerement fausse. Mais je continue"
871 print*,
'(ecart-type) f0:', xmin, xmax
875 CALL
get_field(
"EMA_WORK1",ema_work1,found)
876 IF (.NOT. found)
THEN
877 print*,
"phyetat0: Le champ <EMA_WORK1> est absent"
878 print*,
"Depart legerement fausse. Mais je continue"
885 xmin = min(ema_work1(
i,
k),xmin)
886 xmax = max(ema_work1(
i,
k),xmax)
889 print*,
'ema_work1:', xmin, xmax
894 CALL
get_field(
"EMA_WORK2",ema_work2,found)
895 IF (.NOT. found)
THEN
896 print*,
"phyetat0: Le champ <EMA_WORK2> est absent"
897 print*,
"Depart legerement fausse. Mais je continue"
904 xmin = min(ema_work2(
i,
k),xmin)
905 xmax = max(ema_work2(
i,
k),xmax)
908 print*,
'ema_work2:', xmin, xmax
913 CALL
get_field(
"WAKE_DELTAT",wake_deltat,found)
914 IF (.NOT. found)
THEN
915 print*,
"phyetat0: Le champ <WAKE_DELTAT> est absent"
916 print*,
"Depart legerement fausse. Mais je continue"
923 xmin = min(wake_deltat(
i,
k),xmin)
924 xmax = max(wake_deltat(
i,
k),xmax)
927 print*,
'wake_deltat:', xmin, xmax
932 CALL
get_field(
"WAKE_DELTAQ",wake_deltaq,found)
933 IF (.NOT. found)
THEN
934 print*,
"phyetat0: Le champ <WAKE_DELTAQ> est absent"
935 print*,
"Depart legerement fausse. Mais je continue"
942 xmin = min(wake_deltaq(
i,
k),xmin)
943 xmax = max(wake_deltaq(
i,
k),xmax)
946 print*,
'wake_deltaq:', xmin, xmax
952 IF (.NOT. found)
THEN
953 print*,
"phyetat0: Le champ <WAKE_S> est absent"
954 print*,
"Depart legerement fausse. Mais je continue"
959 xmin = minval(wake_s)
960 xmax = maxval(wake_s)
961 print*,
'(ecart-type) wake_s:', xmin, xmax
965 CALL
get_field(
"WAKE_CSTAR",wake_cstar,found)
966 IF (.NOT. found)
THEN
967 print*,
"phyetat0: Le champ <WAKE_CSTAR> est absent"
968 print*,
"Depart legerement fausse. Mais je continue"
973 xmin = minval(wake_cstar)
974 xmax = maxval(wake_cstar)
975 print*,
'(ecart-type) wake_cstar:', xmin, xmax
980 IF (.NOT. found)
THEN
981 print*,
"phyetat0: Le champ <WAKE_PE> est absent"
982 print*,
"Depart legerement fausse. Mais je continue"
987 xmin = minval(wake_pe)
988 xmax = maxval(wake_pe)
989 print*,
'(ecart-type) wake_pe:', xmin, xmax
993 CALL
get_field(
"WAKE_FIP",wake_fip,found)
994 IF (.NOT. found)
THEN
995 print*,
"phyetat0: Le champ <WAKE_FIP> est absent"
996 print*,
"Depart legerement fausse. Mais je continue"
1001 xmin = minval(wake_fip)
1002 xmax = maxval(wake_fip)
1003 print*,
'(ecart-type) wake_fip:', xmin, xmax
1008 CALL
get_field(
"FM_THERM",fm_therm,found)
1009 IF (.NOT. found)
THEN
1010 print*,
"phyetat0: Le champ <fm_therm> est absent"
1011 print*,
"Depart legerement fausse. Mais je continue"
1016 xmin = minval(fm_therm)
1017 xmax = maxval(fm_therm)
1018 print*,
'(ecart-type) fm_therm:', xmin, xmax
1020 CALL
get_field(
"ENTR_THERM",entr_therm,found)
1021 IF (.NOT. found)
THEN
1022 print*,
"phyetat0: Le champ <entr_therm> est absent"
1023 print*,
"Depart legerement fausse. Mais je continue"
1028 xmin = minval(entr_therm)
1029 xmax = maxval(entr_therm)
1030 print*,
'(ecart-type) entr_therm:', xmin, xmax
1032 CALL
get_field(
"DETR_THERM",detr_therm,found)
1033 IF (.NOT. found)
THEN
1034 print*,
"phyetat0: Le champ <detr_therm> est absent"
1035 print*,
"Depart legerement fausse. Mais je continue"
1040 xmin = minval(detr_therm)
1041 xmax = maxval(detr_therm)
1042 print*,
'(ecart-type) detr_therm:', xmin, xmax
1049 IF (type_trac ==
'lmdz')
THEN
1052 CALL
get_field(
"trs_"//tname(iiq),trs(:,
it),found)
1053 IF (.NOT. found)
THEN
1055 $
"phyetat0: Le champ <trs_"//tname(iiq)//
"> est absent"
1056 print*,
"Depart legerement fausse. Mais je continue"
1061 xmin = minval(trs(:,
it))
1062 xmax = maxval(trs(:,
it))
1063 print*,
"(ecart-type) trs_"//tname(iiq)//
" :", xmin, xmax
1068 IF (carbon_cycle_cpl)
THEN
1069 ALLOCATE(co2_send(klon), stat=ierr)
1071 & (
'phyetat0',
'pb allocation co2_send',1)
1072 CALL
get_field(
"co2_send",co2_send,found)
1073 IF (.NOT. found)
THEN
1074 print*,
"phyetat0: Le champ <co2_send> est absent"
1075 print*,
"Initialisation uniforme a co2_ppm=",
co2_ppm
1092 $ evap, frugs, agesno, tsoil)
1095 IF ( type_ocean ==
'couple' )
THEN