Changeset 235 for LMDZ.3.3/branches/rel-LF
- Timestamp:
- Jun 20, 2001, 6:10:52 PM (23 years ago)
- Location:
- LMDZ.3.3/branches/rel-LF/libf/phylmd
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ.3.3/branches/rel-LF/libf/phylmd/clmain.F
r230 r235 282 282 y_flux_u = 0.0 283 283 y_flux_v = 0.0 284 ytsoil = 0.0284 ytsoil = 999999. 285 285 286 286 DO nsrf = 1, nbsrf … … 330 330 331 331 DO 99999 nsrf = 1, nbsrf 332 c$$$ PBtotalflu = radsol332 totalflu = radsol 333 333 334 334 c chercher les indices: … … 384 384 yu1(j) = u1lay(i) 385 385 yv1(j) = v1lay(i) 386 c$$$ PByrads(j) = totalflu(i)386 c$$$ yrads(j) = totalflu(i) 387 387 yrads(j) = (1 - albe(i,nsrf)) 388 388 $ /(1 - pctsrf(i,is_ter) * albe(i,is_ter) … … 493 493 evap(:,nsrf) = - flux_q(:,1,nsrf) 494 494 c 495 albe(:, nsrf) = 0. 496 snow(:, nsrf) = 0. 497 qsol(:, nsrf) = 0. 498 rugos(:, nsrf) = 0. 499 fluxlat(:,nsrf) = 0. 495 500 DO j = 1, knon 496 501 i = ni(j) … … 502 507 fluxlat(i,nsrf) = yfluxlat(j) 503 508 c$$$ pb rugmer(i) = yrugm(j) 504 IF (nsrf .EQ. is_oce) rugmer(i) = yrugm(j) 509 IF (nsrf .EQ. is_oce) then 510 rugmer(i) = yrugm(j) 511 rugos(i,nsrf) = yrugm(i) 512 endif 505 513 cdragh(i) = cdragh(i) + ycoefh(j,1) 506 514 cdragm(i) = cdragm(i) + ycoefm(j,1) … … 511 519 END DO 512 520 c$$$ PB ajout pour soil 521 ftsoil(:,:,nsrf) = 0. 513 522 DO k = 1, nsoilmx 514 523 DO j = 1, knon -
LMDZ.3.3/branches/rel-LF/libf/phylmd/conf_phys.F90
r223 r235 3 3 ! 4 4 5 !module conf_phys 6 ! 7 ! use IOIPSL 8 ! implicit none 9 ! 10 ! public conf_phys 11 ! 12 !contains 5 subroutine conf_phys(ocean, ok_veget, ok_journe, ok_mensuel, ok_instan) 13 6 14 subroutine conf_phys(ocean, ok_veget, ok_journe, ok_mensuel, ok_instan) 7 use IOIPSL 8 implicit none 15 9 16 10 ! … … 21 15 ! 22 16 23 use IOIPSL24 implicit none25 17 ! 26 18 ! ocean: type d'ocean (force, slab, couple) … … 104 96 end subroutine conf_phys 105 97 106 !end module conf_phys -
LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90
r233 r235 159 159 real, dimension(klon), intent(IN) :: ps, albedo 160 160 real, dimension(klon), intent(IN) :: tsurf, p1lay 161 real, dimension(klon), intent(INOUT) :: radsol161 REAL, DIMENSION(klon), INTENT(INOUT) :: radsol,fder 162 162 real, dimension(klon), intent(IN) :: zmasq 163 real, dimension(klon), intent(IN) :: fder,taux, tauy, rugos, rugoro163 real, dimension(klon), intent(IN) :: taux, tauy, rugos, rugoro 164 164 character (len = 6) :: ocean 165 165 integer :: npas, nexca ! nombre et pas de temps couplage … … 196 196 real, DIMENSION(klon):: zfra 197 197 logical :: cumul = .false. 198 logical,save :: scatter = .false.199 198 200 199 if (check) write(*,*) 'Entree ', modname … … 235 234 ! Initialisations diverses 236 235 ! 237 cal=0.; beta=1.; dif_grnd=0.; capsol=0. 238 alb_new = 0.; z0_new = 0.; alb_neig = 0.0 239 236 !!$ cal=0.; beta=1.; dif_grnd=0.; capsol=0. 237 !!$ alb_new = 0.; z0_new = 0.; alb_neig = 0.0 238 !!$! PB 239 !!$ tsurf_new = 0. 240 241 cal = 999999. ; beta = 999999. ; dif_grnd = 999999. ; capsol = 999999. 242 alb_new = 999999. ; z0_new = 999999. ; alb_neig = 999999. 243 tsurf_new = 999999. 240 244 ! Aiguillage vers les differents schemas de surface 241 245 … … 290 294 ! 291 295 !!$ PB ATTENTION changement ordre des appels 292 !!$ CALL albsno(klon,agesno,alb_neig_grid) 293 294 296 CALL albsno(klon,agesno,alb_neig_grid) 297 295 298 if (.not. ok_veget) then 296 299 ! … … 410 413 & petAcoef, peqAcoef, petBcoef, peqBcoef, & 411 414 & tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 415 416 fder = fder + dflux_s + dflux_l 412 417 413 418 ! … … 472 477 ! else if (ocean == 'slab ') then 473 478 ! call interfoce(nisurf) 474 else ! lecture conditions limites 475 call interfoce(itime, dtime, jour, & 476 & klon, nisurf, knon, knindex, & 477 & debut, & 478 & tsurf_new, pctsrf_new) 479 480 tsurf_temp = tsurf 481 dif_grnd = 1.0 / tau_gl 482 beta = 1.0 483 cal = RCPD * calice 484 WHERE (snow > 0.0) cal = RCPD * calsno 485 endif 486 487 call calcul_fluxs( klon, knon, nisurf, dtime, & 488 & tsurf_temp, p1lay, cal, beta, tq_cdrag, ps, & 489 & precip_rain, precip_snow, snow, qsol, & 490 & radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 491 & petAcoef, peqAcoef, petBcoef, peqBcoef, & 492 & tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 493 494 if (ocean /= 'couple') then 495 call fonte_neige( klon, knon, nisurf, dtime, & 496 & tsurf_temp, p1lay, cal, beta, tq_cdrag, ps, & 497 & precip_rain, precip_snow, snow, qsol, & 498 & radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 499 & petAcoef, peqAcoef, petBcoef, peqBcoef, & 500 & tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 501 endif 479 ELSE 480 ! ! lecture conditions limites 481 CALL interfoce(itime, dtime, jour, & 482 & klon, nisurf, knon, knindex, & 483 & debut, & 484 & tsurf_new, pctsrf_new) 485 486 CALL calbeta(dtime, nisurf, knon, snow, qsol, beta, capsol, dif_grnd) 487 488 IF (soil_model) THEN 489 CALL soil(dtime, nisurf, knon,snow, tsurf, tsoil,soilcap, soilflux) 490 cal(1:knon) = RCPD / soilcap(1:knon) 491 radsol(1:knon) = radsol(1:knon) + soilflux(1:knon) 492 dif_grnd = 0. 493 !!$ WRITE(*,*) 'radsol' 494 !!$ WRITE(*,*) radsol(1 : knon) 495 !!$ WRITE(*,*) 'soilflux' 496 !!$ WRITE(*,*) soilflux(1 : knon) 497 ELSE 498 ! if (check) write(*,*)'Sortie calbeta' 499 ! if (check) write(*,*)'RCPD = ',RCPD,' capsol = ' 500 ! if (check) write(*,*)capsol 501 dif_grnd = 1.0 / tau_gl 502 cal = RCPD * calice 503 WHERE (snow > 0.0) cal = RCPD * calsno 504 ENDIF 505 tsurf_temp = tsurf 506 beta = 1.0 507 ENDIF 508 509 CALL calcul_fluxs( klon, knon, nisurf, dtime, & 510 & tsurf_temp, p1lay, cal, beta, tq_cdrag, ps, & 511 & precip_rain, precip_snow, snow, qsol, & 512 & radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 513 & petAcoef, peqAcoef, petBcoef, peqBcoef, & 514 & tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 515 516 IF (ocean /= 'couple') THEN 517 CALL fonte_neige( klon, knon, nisurf, dtime, & 518 & tsurf_temp, p1lay, cal, beta, tq_cdrag, ps, & 519 & precip_rain, precip_snow, snow, qsol, & 520 & radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, & 521 & petAcoef, peqAcoef, petBcoef, peqBcoef, & 522 & tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 523 ENDIF 502 524 ! 503 525 ! 2eme appel a interfoce pour le cumul et le passage des flux a l'ocean … … 539 561 ! call interfsol(nisurf) 540 562 IF (soil_model) THEN 541 CALL soil(dtime, nisurf, snow, tsurf, tsoil,soilcap, soilflux) 542 cal = RCPD / soilcap 543 radsol = radsol + soilflux 563 CALL soil(dtime, nisurf, knon, snow, tsurf, tsoil,soilcap, soilflux) 564 cal(1:knon) = RCPD / soilcap(1:knon) 565 radsol(1:knon) = radsol(1:knon) + soilflux(1:knon) 566 !!$ WRITE(*,*) 'radsol' 567 !!$ WRITE(*,'(16f17.4)') radsol(1 : knon) 568 !!$ WRITE(*,*) 'soilflux' 569 !!$ WRITE(*,'(16f17.4)')soilflux(1:knon) 544 570 ELSE 545 571 cal = RCPD * calice … … 962 988 963 989 END SUBROUTINE interfsol 964 !965 !#########################################################################966 !967 SUBROUTINE interfsol_scat(itime, klon, dtime, date0, nisurf, knon, &968 & knindex, rlon, rlat, cufi, cvfi, iim, jjm, pctsrf, &969 & debut, lafin, ok_veget, &970 & zlev, u1_lay, v1_lay, temp_air, spechum, epot_air, ccanopy, &971 & tq_cdrag, petAcoef, peqAcoef, petBcoef, peqBcoef, &972 & precip_rain, precip_snow, lwdown, swnet, swdown, &973 & tsurf, p1lay, ps, radsol, &974 & evap, fluxsens, fluxlat, &975 & tsol_rad, tsurf_new, alb_new, emis_new, z0_new, dflux_l, dflux_s)976 977 USE intersurf978 979 ! Cette routine sert d'interface entre le modele atmospherique et le980 ! modele de sol continental. Appel a sechiba981 !982 ! L. Fairhead 02/2000983 !984 ! input:985 ! itime numero du pas de temps986 ! klon nombre total de points de grille987 ! dtime pas de temps de la physique (en s)988 ! nisurf index de la surface a traiter (1 = sol continental)989 ! knon nombre de points de la surface a traiter990 ! knindex index des points de la surface a traiter991 ! rlon longitudes de la grille entiere992 ! rlat latitudes de la grille entiere993 ! pctsrf tableau des fractions de surface de chaque maille994 ! debut logical: 1er appel a la physique (lire les restart)995 ! lafin logical: dernier appel a la physique (ecrire les restart)996 ! ok_veget logical: appel ou non au schema de surface continental997 ! (si false calcul simplifie des fluxs sur les continents)998 ! zlev hauteur de la premiere couche999 ! u1_lay vitesse u 1ere couche1000 ! v1_lay vitesse v 1ere couche1001 ! temp_air temperature de l'air 1ere couche1002 ! spechum humidite specifique 1ere couche1003 ! epot_air temp pot de l'air1004 ! ccanopy concentration CO2 canopee1005 ! tq_cdrag cdrag1006 ! petAcoef coeff. A de la resolution de la CL pour t1007 ! peqAcoef coeff. A de la resolution de la CL pour q1008 ! petBcoef coeff. B de la resolution de la CL pour t1009 ! peqBcoef coeff. B de la resolution de la CL pour q1010 ! precip_rain precipitation liquide1011 ! precip_snow precipitation solide1012 ! lwdown flux IR descendant a la surface1013 ! swnet flux solaire net1014 ! swdown flux solaire entrant a la surface1015 ! tsurf temperature de surface1016 ! p1lay pression 1er niveau (milieu de couche)1017 ! ps pression au sol1018 ! radsol rayonnement net aus sol (LW + SW)1019 !1020 !1021 ! input/output1022 ! run_off ruissellement total1023 !1024 ! output:1025 ! evap evaporation totale1026 ! fluxsens flux de chaleur sensible1027 ! fluxlat flux de chaleur latente1028 ! tsol_rad1029 ! tsurf_new temperature au sol1030 ! alb_new albedo1031 ! emis_new emissivite1032 ! z0_new surface roughness1033 1034 1035 ! Parametres d'entree1036 integer, intent(IN) :: itime1037 integer, intent(IN) :: klon1038 real, intent(IN) :: dtime1039 real, intent(IN) :: date01040 integer, intent(IN) :: nisurf1041 integer, intent(IN) :: knon1042 integer, intent(IN) :: iim, jjm1043 integer, dimension(klon), intent(IN) :: knindex1044 logical, intent(IN) :: debut, lafin, ok_veget1045 real, dimension(klon,nbsrf), intent(IN) :: pctsrf1046 real, dimension(klon), intent(IN) :: rlon, rlat1047 real, dimension(klon), intent(IN) :: cufi, cvfi1048 real, dimension(klon), intent(IN) :: zlev1049 real, dimension(klon), intent(IN) :: u1_lay, v1_lay1050 real, dimension(klon), intent(IN) :: temp_air, spechum1051 real, dimension(klon), intent(IN) :: epot_air, ccanopy1052 real, dimension(klon), intent(INOUT) :: tq_cdrag1053 real, dimension(klon), intent(IN) :: petAcoef, peqAcoef1054 real, dimension(klon), intent(IN) :: petBcoef, peqBcoef1055 real, dimension(klon), intent(IN) :: precip_rain, precip_snow1056 real, dimension(klon), intent(IN) :: lwdown, swnet, swdown, ps1057 real, dimension(klon), intent(IN) :: tsurf, p1lay1058 real, dimension(klon), intent(IN) :: radsol1059 ! Parametres de sortie1060 real, dimension(klon), intent(OUT):: evap, fluxsens, fluxlat1061 real, dimension(klon), intent(OUT):: tsol_rad, tsurf_new, alb_new1062 real, dimension(klon), intent(OUT):: emis_new, z0_new1063 real, dimension(klon), intent(OUT):: dflux_s, dflux_l1064 1065 ! Local1066 !1067 integer :: ii, ij, jj, igrid, ireal, i, index1068 integer :: error1069 character (len = 20) :: modname = 'interfsol_scat'1070 character (len = 80) :: abort_message1071 logical,save :: check = .TRUE.1072 real, dimension(klon) :: cal, beta, dif_grnd, capsol1073 ! type de couplage dans sechiba1074 ! character (len=10) :: coupling = 'implicit'1075 ! drapeaux controlant les appels dans SECHIBA1076 ! type(control_type), save :: control_in1077 ! coordonnees geographiques1078 real, allocatable, dimension(:,:), save :: lalo1079 ! pts voisins1080 integer,allocatable, dimension(:,:), save :: neighbours1081 ! fractions continents1082 real,allocatable, dimension(:), save :: contfrac1083 ! resolution de la grille1084 real, allocatable, dimension (:,:), save :: resolution1085 ! correspondance point n -> indices (i,j)1086 integer, allocatable, dimension(:,:), save :: correspond1087 ! offset pour calculer les point voisins1088 integer, dimension(8,3), save :: off_ini1089 integer, dimension(8), save :: offset1090 ! Identifieurs des fichiers restart et histoire1091 integer, save :: rest_id, hist_id1092 integer, save :: rest_id_stom, hist_id_stom1093 !1094 real, allocatable, dimension (:,:), save :: lon_scat, lat_scat1095 1096 logical, save :: lrestart_read = .true. , lrestart_write = .false.1097 1098 real, dimension(klon):: qsurf1099 real, dimension(klon):: snow, qsol1100 real, dimension(knon,2) :: albedo_out1101 ! Pb de nomenclature1102 real, dimension(klon) :: petA_orc, petB_orc, peqA_orc, peqB_orc1103 ! champs a passer a ORCHIDEE1104 real, dimension(:,:), allocatable, save :: lon_sc, lat_sc, contfrac_sc1105 real, dimension(iim,jjm+1) :: zlev_sc1106 real, dimension(iim,jjm+1) :: u1_lay_sc, v1_lay_sc, spechum_sc, temp_air_sc1107 real, dimension(iim,jjm+1) :: epot_air_sc, ccanopy_sc, tq_cdrag_sc1108 real, dimension(iim,jjm+1) :: petA_or_sc, peqA_or_sc, petB_or_sc, peqB_or_sc1109 real, dimension(iim,jjm+1) :: precip_rain_sc, precip_snow_sc, lwdown_sc1110 real, dimension(iim,jjm+1) :: swnet_sc, swdown_sc, p1lay_sc, evap_sc1111 real, dimension(iim,jjm+1) :: fluxsens_sc, fluxlat_sc, coastalflow_sc1112 real, dimension(iim,jjm+1) :: riverflow_sc, tsol_rad_sc, tsurf_new_sc1113 real, dimension(iim,jjm+1) :: qsurf_sc, emis_new_sc, z0_new_sc1114 real, dimension(iim,jjm+1,2) :: albedo_out_sc1115 1116 if (check) write(*,*)'Entree ', modname1117 if (check) write(*,*)'ok_veget = ',ok_veget1118 1119 ! initialisation1120 if (debut) then1121 if ((.not. allocated(lon_sc))) then1122 allocate(lon_sc(iim,jjm+1), stat = error)1123 if (error /= 0) then1124 abort_message='Pb allocation lon_sc'1125 call abort_gcm(modname,abort_message,1)1126 endif1127 endif1128 if ((.not. allocated(lat_sc))) then1129 allocate(lat_sc(iim,jjm+1), stat = error)1130 if (error /= 0) then1131 abort_message='Pb allocation lat_sc'1132 call abort_gcm(modname,abort_message,1)1133 endif1134 endif1135 index = 11136 do jj = 2, jjm1137 do ij = 1, iim1138 index = index + 11139 lon_sc(ij,jj) = rlon(index)1140 lat_sc(ij,jj) = rlat(index)1141 enddo1142 enddo1143 lon_sc(:,1) = lon_sc(:,2)1144 lat_sc(:,1) = rlat(1)1145 lon_sc(:,jjm+1) = lon_sc(:,jjm)1146 lat_sc(:,jjm+1) = rlat(klon)1147 if (( .not. allocated(contfrac_sc))) then1148 allocate(contfrac_sc(iim, jjm+1), stat = error)1149 if (error /= 0) then1150 abort_message='Pb allocation contfrac'1151 call abort_gcm(modname,abort_message,1)1152 endif1153 endif1154 contfrac_sc = 0.1155 call gath2cpl(pctsrf(:,is_ter), contfrac_sc, klon, knon,iim,jjm, knindex)1156 endif ! (fin debut)1157 1158 !1159 ! Appel a la routine sols continentaux1160 !1161 ! petit pb de nomenclature1162 !1163 if (lafin) lrestart_write = .true.1164 if (check) write(*,*)'lafin ',lafin,lrestart_write1165 1166 petA_orc = petBcoef * dtime1167 petB_orc = petAcoef1168 peqA_orc = peqBcoef * dtime1169 peqB_orc = peqAcoef1170 1171 !1172 ! Passage sur la grille 2D avant envoi a ORCHIDEE1173 !1174 call gath2cpl(zlev, zlev_sc, klon, knon,iim,jjm, knindex)1175 call gath2cpl(u1_lay, u1_lay_sc, klon, knon,iim,jjm, knindex)1176 call gath2cpl(v1_lay, v1_lay_sc, klon, knon,iim,jjm, knindex)1177 call gath2cpl(spechum, spechum_sc, klon, knon,iim,jjm, knindex)1178 call gath2cpl(temp_air, temp_air_sc, klon, knon,iim,jjm, knindex)1179 call gath2cpl(epot_air, epot_air_sc, klon, knon,iim,jjm, knindex)1180 call gath2cpl(ccanopy, ccanopy_sc, klon, knon,iim,jjm, knindex)1181 call gath2cpl(tq_cdrag, tq_cdrag_sc, klon, knon,iim,jjm, knindex)1182 call gath2cpl(petA_orc, petA_or_sc, klon, knon,iim,jjm, knindex)1183 call gath2cpl(peqA_orc, peqA_or_sc, klon, knon,iim,jjm, knindex)1184 call gath2cpl(petB_orc, petB_or_sc, klon, knon,iim,jjm, knindex)1185 call gath2cpl(peqB_orc, peqB_or_sc, klon, knon,iim,jjm, knindex)1186 call gath2cpl(precip_rain, precip_rain_sc, klon, knon,iim,jjm, knindex)1187 call gath2cpl(precip_snow, precip_snow_sc, klon, knon,iim,jjm, knindex)1188 call gath2cpl(lwdown, lwdown_sc, klon, knon,iim,jjm, knindex)1189 call gath2cpl(swnet, swnet_sc, klon, knon,iim,jjm, knindex)1190 call gath2cpl(swdown, swdown_sc, klon, knon,iim,jjm, knindex)1191 call gath2cpl(p1lay, p1lay_sc, klon, knon,iim,jjm, knindex)1192 !1193 ! Init Orchidee1194 !1195 if (debut) then1196 if (check) write(*,*) 'debut orchidee itime - 1', itime-1,date01197 call intersurf_main (itime-1, iim, jjm+1 , knon, knindex, dtime, &1198 & lrestart_read, lrestart_write, lon_sc, lat_sc, &1199 & contfrac_sc, date0, zlev_sc, u1_lay_sc, v1_lay_sc, &1200 & spechum_sc, temp_air_sc, epot_air_sc, ccanopy_sc, &1201 & tq_cdrag_sc, petA_or_sc, peqA_or_sc, petB_or_sc, peqB_or_sc, &1202 & precip_rain_sc, precip_snow_sc, lwdown_sc, swnet_sc, &1203 & swdown_sc, p1lay_sc, &1204 & evap_sc, fluxsens_sc, fluxlat_sc, &1205 & coastalflow_sc, riverflow_sc, tsol_rad_sc, tsurf_new_sc, &1206 & qsurf_sc, albedo_out_sc, emis_new_sc, z0_new_sc)1207 endif1208 1209 call intersurf_main (itime, iim, jjm+1 , knon, knindex, dtime, &1210 & lrestart_read, lrestart_write, lon_sc, lat_sc, &1211 & contfrac_sc, date0, zlev_sc, u1_lay_sc, v1_lay_sc, &1212 & spechum_sc, temp_air_sc, epot_air_sc, ccanopy_sc, &1213 & tq_cdrag_sc, petA_or_sc, peqA_or_sc, petB_or_sc, peqB_or_sc, &1214 & precip_rain_sc, precip_snow_sc, lwdown_sc, swnet_sc, &1215 & swdown_sc, p1lay_sc, &1216 & evap_sc, fluxsens_sc, fluxlat_sc, &1217 & coastalflow_sc, riverflow_sc, tsol_rad_sc, tsurf_new_sc, &1218 & qsurf_sc, albedo_out_sc, emis_new_sc, z0_new_sc)1219 !1220 ! sorties mises sur la grille physique1221 !1222 1223 call cpl2gath(evap_sc, evap, klon, knon,iim,jjm, knindex)1224 call cpl2gath(fluxsens_sc, fluxsens, klon, knon,iim,jjm, knindex)1225 call cpl2gath(fluxlat_sc, fluxlat, klon, knon,iim,jjm, knindex)1226 call cpl2gath(coastalflow_sc, coastalflow, klon, knon,iim,jjm, knindex)1227 call cpl2gath(riverflow_sc, riverflow, klon, knon,iim,jjm, knindex)1228 call cpl2gath(tsol_rad_sc, tsol_rad, klon, knon,iim,jjm, knindex)1229 call cpl2gath(tsurf_new_sc, tsurf_new, klon, knon,iim,jjm, knindex)1230 call cpl2gath(qsurf_sc, qsurf, klon, knon,iim,jjm, knindex)1231 call cpl2gath(albedo_out_sc(:,:,1), alb_new, klon, knon,iim,jjm, knindex)1232 call cpl2gath(emis_new_sc, emis_new, klon, knon,iim,jjm, knindex)1233 call cpl2gath(z0_new_sc, z0_new, klon, knon,iim,jjm, knindex)1234 1235 ! LF essai sensible1236 fluxsens = -1. * fluxsens1237 fluxlat = -1. * fluxlat1238 1239 if (debut) lrestart_read = .false.1240 1241 END SUBROUTINE interfsol_scat1242 990 ! 1243 991 !######################################################################### … … 2021 1769 ! Recopie des variables dans les champs de sortie 2022 1770 ! 1771 lmt_sst = 999999999. 2023 1772 do ii = 1, knon 2024 1773 lmt_sst(ii) = sst_lu(knindex(ii)) … … 2176 1925 ! Recopie des variables dans les champs de sortie 2177 1926 ! 2178 lmt_alb(:) = 0.0 2179 lmt_rug(:) = 0.0 1927 !!$ lmt_alb(:) = 0.0 1928 !!$ lmt_rug(:) = 0.0 1929 lmt_alb(:) = 999999. 1930 lmt_rug(:) = 999999. 2180 1931 DO ii = 1, knon 2181 1932 lmt_alb(ii) = alb_lu(knindex(ii)) -
LMDZ.3.3/branches/rel-LF/libf/phylmd/physiq.F
r230 r235 447 447 c 448 448 CHARACTER*2 str2 449 CHARACTER*2 iqn 449 450 c 450 451 REAL qcheck … … 549 550 c 550 551 REAL tr_seri(klon,klev,nbtr) 552 REAL d_tr(klon,klev,nbtr) 551 553 552 554 REAL zx_rh(klon,klev) -
LMDZ.3.3/branches/rel-LF/libf/phylmd/phytrac.F
r230 r235 242 242 zx_lon(i,jjm+1) = xlon(i+1) 243 243 ENDDO 244 DO ll=1,klev245 znivsig(ll)=float(ll)246 ENDDO244 c DO ll=1,klev 245 c znivsig(ll)=float(ll) 246 c ENDDO 247 247 CALL gr_fi_ecrit(1,klon,iim,jjm+1,xlat,zx_lat) 248 248 CALL histbeg("histrac", iim,zx_lon, jjm+1,zx_lat, -
LMDZ.3.3/branches/rel-LF/libf/phylmd/raddim.h
r230 r235 1 1 INTEGER kdlon, kflev 2 c 3 ccc PARAMETER (kdlon=klon,kflev=klev) 4 c 5 c resolution 72 45: 6 PARAMETER (kdlon=317,kflev=klev) 7 c resolution 64 32: 8 ccc PARAMETER (kdlon=331,kflev=klev) 9 c resolution 96 49: 10 ccc PARAMETER (kdlon=461,kflev=klev) 11 c resolution 144 73: 12 ccc PARAMETER (kdlon=610,kflev=klev) 13 c resolution 96 72: 14 c PARAMETER (kdlon=487,kflev=klev) 15 c resolution 128 64: 16 ccc PARAMETER (kdlon=4033,kflev=klev) 2 PARAMETER (kdlon=klon,kflev=klev) -
LMDZ.3.3/branches/rel-LF/libf/phylmd/soil.F
r2 r235 1 SUBROUTINE soil(ptimestep, indice, snow, ptsrf, ptsoil,1 SUBROUTINE soil(ptimestep, indice, knon, snow, ptsrf, ptsoil, 2 2 s pcapcal, pfluxgrd) 3 3 IMPLICIT NONE … … 47 47 48 48 #include "dimensions.h" 49 #include "YOMCST.h" 49 50 #include "dimphy.h" 50 51 #include "dimsoil.h" … … 56 57 57 58 REAL ptimestep 58 INTEGER indice 59 INTEGER indice, knon 59 60 REAL ptsrf(klon),ptsoil(klon,nsoilmx),snow(klon) 60 61 REAL pcapcal(klon),pfluxgrd(klon) … … 65 66 66 67 INTEGER ig,jk 67 REAL zdz2(nsoilmx),z1(klon) 68 c$$$ REAL zdz2(nsoilmx),z1(klon) 69 REAL zdz2(nsoilmx),z1(klon,nbsrf) 68 70 REAL min_period,dalph_soil 69 71 REAL ztherm_i(klon) … … 72 74 c ---------------------- 73 75 REAL dz1(nsoilmx),dz2(nsoilmx) 74 REAL zc(klon,nsoilmx),zd(klon,nsoilmx) 76 c$$$ REAL zc(klon,nsoilmx),zd(klon,nsoilmx) 77 REAL zc(klon,nsoilmx,nbsrf),zd(klon,nsoilmx,nbsrf) 75 78 REAL lambda 76 79 SAVE dz1,dz2,zc,zd,lambda 77 LOGICAL firstcall 78 SAVE firstcall 80 LOGICAL firstcall, firstsurf(nbsrf) 81 SAVE firstcall, firstsurf 79 82 REAL isol,isno,iice 80 83 SAVE isol,isno,iice 81 84 82 85 DATA firstcall/.true./ 86 DATA firstsurf/.TRUE.,.TRUE.,.TRUE.,.TRUE./ 83 87 84 88 DATA isol,isno,iice/2000.,2000.,2000./ … … 90 94 REAL fz,rk,fz1,rk1,rk2 91 95 fz(rk)=fz1*(dalph_soil**rk-1.)/(dalph_soil-1.) 92 96 pfluxgrd(:) = 0. 93 97 c calcul de l'inertie thermique a partir de la variable rnat. 94 98 c on initialise a iice meme au-dessus d'un point de mer au cas … … 97 101 c 98 102 IF (indice.EQ.is_sic) THEN 99 DO ig = 1, k lon103 DO ig = 1, knon 100 104 ztherm_i(ig) = iice 101 105 IF (snow(ig).GT.0.0) ztherm_i(ig) = isno 102 106 ENDDO 103 107 ELSE IF (indice.EQ.is_lic) THEN 104 DO ig = 1, k lon108 DO ig = 1, knon 105 109 ztherm_i(ig) = iice 106 110 IF (snow(ig).GT.0.0) ztherm_i(ig) = isno 107 111 ENDDO 108 112 ELSE IF (indice.EQ.is_ter) THEN 109 DO ig = 1, k lon113 DO ig = 1, knon 110 114 ztherm_i(ig) = isol 111 115 IF (snow(ig).GT.0.0) ztherm_i(ig) = isno 112 116 ENDDO 113 117 ELSE IF (indice.EQ.is_oce) THEN 114 DO ig = 1, k lon118 DO ig = 1, knon 115 119 ztherm_i(ig) = iice 116 120 ENDDO … … 121 125 122 126 123 IF (firstcall) THEN 127 c$$$ IF (firstcall) THEN 128 IF (firstsurf(indice)) THEN 124 129 125 130 c----------------------------------------------------------------------- … … 162 167 . fz(rk1)*fz(rk2)*3.14,fz(rk)*fz(rk)*3.14 163 168 ENDDO 164 165 firstcall =.false. 169 C PB 170 firstsurf(indice) = .FALSE. 171 c$$$ firstcall =.false. 166 172 167 173 c Initialisations: … … 175 181 176 182 c surface temperature 177 DO ig=1,k lon178 ptsoil(ig,1)=(lambda*zc(ig,1 )+ptsrf(ig))/179 s (lambda*(1.-zd(ig,1 ))+1.)183 DO ig=1,knon 184 ptsoil(ig,1)=(lambda*zc(ig,1,indice)+ptsrf(ig))/ 185 s (lambda*(1.-zd(ig,1,indice))+1.) 180 186 ENDDO 181 187 182 188 c other temperatures 183 189 DO jk=1,nsoilmx-1 184 DO ig=1,klon 185 ptsoil(ig,jk+1)=zc(ig,jk)+zd(ig,jk)*ptsoil(ig,jk) 190 DO ig=1,knon 191 ptsoil(ig,jk+1)=zc(ig,jk,indice)+zd(ig,jk,indice) 192 $ *ptsoil(ig,jk) 186 193 ENDDO 187 194 ENDDO … … 192 199 c --------------------------------------------------------------- 193 200 201 c$$$ PB ajout pour cas glace de mer 202 IF (indice .EQ. is_sic) THEN 203 DO ig = 1 , knon 204 ptsoil(ig,nsoilmx) = RTT - 1.8 205 END DO 206 ENDIF 207 194 208 DO jk=1,nsoilmx 195 209 zdz2(jk)=dz2(jk)/ptimestep 196 210 ENDDO 197 211 198 DO ig=1,klon 199 z1(ig)=zdz2(nsoilmx)+dz1(nsoilmx-1) 200 zc(ig,nsoilmx-1)=zdz2(nsoilmx)*ptsoil(ig,nsoilmx)/z1(ig) 201 zd(ig,nsoilmx-1)=dz1(nsoilmx-1)/z1(ig) 212 DO ig=1,knon 213 z1(ig,indice)=zdz2(nsoilmx)+dz1(nsoilmx-1) 214 zc(ig,nsoilmx-1,indice)= 215 $ zdz2(nsoilmx)*ptsoil(ig,nsoilmx)/z1(ig,indice) 216 zd(ig,nsoilmx-1,indice)=dz1(nsoilmx-1)/z1(ig,indice) 202 217 ENDDO 203 218 204 219 DO jk=nsoilmx-1,2,-1 205 DO ig=1,klon 206 z1(ig)=1./(zdz2(jk)+dz1(jk-1)+dz1(jk)*(1.-zd(ig,jk))) 207 zc(ig,jk-1)= 208 s (ptsoil(ig,jk)*zdz2(jk)+dz1(jk)*zc(ig,jk))*z1(ig) 209 zd(ig,jk-1)=dz1(jk-1)*z1(ig) 220 DO ig=1,knon 221 z1(ig,indice)=1./(zdz2(jk)+dz1(jk-1)+dz1(jk) 222 $ *(1.-zd(ig,jk,indice))) 223 zc(ig,jk-1,indice)= 224 s (ptsoil(ig,jk)*zdz2(jk)+dz1(jk)*zc(ig,jk,indice)) 225 $ *z1(ig,indice) 226 zd(ig,jk-1,indice)=dz1(jk-1)*z1(ig,indice) 210 227 ENDDO 211 228 ENDDO … … 216 233 c --------------------------------- 217 234 218 DO ig=1,k lon235 DO ig=1,knon 219 236 pfluxgrd(ig)=ztherm_i(ig)*dz1(1)* 220 s (zc(ig,1 )+(zd(ig,1)-1.)*ptsoil(ig,1))237 s (zc(ig,1,indice)+(zd(ig,1,indice)-1.)*ptsoil(ig,1)) 221 238 pcapcal(ig)=ztherm_i(ig)* 222 s (dz2(1)+ptimestep*(1.-zd(ig,1))*dz1(1)) 223 z1(ig)=lambda*(1.-zd(ig,1))+1. 224 pcapcal(ig)=pcapcal(ig)/z1(ig) 225 pfluxgrd(ig)=pfluxgrd(ig) 226 s +pcapcal(ig)*(ptsoil(ig,1)*z1(ig)-lambda*zc(ig,1)-ptsrf(ig)) 239 s (dz2(1)+ptimestep*(1.-zd(ig,1,indice))*dz1(1)) 240 z1(ig,indice)=lambda*(1.-zd(ig,1,indice))+1. 241 pcapcal(ig)=pcapcal(ig)/z1(ig,indice) 242 pfluxgrd(ig) = pfluxgrd(ig) 243 s + pcapcal(ig) * (ptsoil(ig,1) * z1(ig,indice) 244 $ - lambda * zc(ig,1,indice) 245 $ - ptsrf(ig)) 227 246 s /ptimestep 228 247 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.