[781] | 1 | ! |
---|
| 2 | MODULE surf_land_mod |
---|
[2952] | 3 | |
---|
[781] | 4 | IMPLICIT NONE |
---|
| 5 | |
---|
| 6 | CONTAINS |
---|
| 7 | ! |
---|
| 8 | !**************************************************************************************** |
---|
| 9 | ! |
---|
| 10 | SUBROUTINE surf_land(itime, dtime, date0, jour, knon, knindex, & |
---|
[2410] | 11 | rlon, rlat, yrmu0, & |
---|
[888] | 12 | debut, lafin, zlev, ccanopy, swnet, lwnet, albedo, & |
---|
[1067] | 13 | tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & |
---|
| 14 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 15 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 16 | pref, u1, v1, gustiness, rugoro, pctsrf, & |
---|
[1146] | 17 | lwdown_m, q2m, t2m, & |
---|
[888] | 18 | snow, qsol, agesno, tsoil, & |
---|
[2243] | 19 | z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, & |
---|
[996] | 20 | qsurf, tsurf_new, dflux_s, dflux_l, & |
---|
[2952] | 21 | flux_u1, flux_v1 , & |
---|
| 22 | veget,lai,height) |
---|
[781] | 23 | |
---|
[1067] | 24 | USE dimphy |
---|
| 25 | USE surface_data, ONLY : ok_veget |
---|
[4283] | 26 | USE carbon_cycle_mod |
---|
[1146] | 27 | |
---|
[4283] | 28 | |
---|
[2571] | 29 | ! See comments in each module surf_land_orchidee_xxx for compatiblity with ORCHIDEE |
---|
[1146] | 30 | #ifdef ORCHIDEE_NOOPENMP |
---|
[2571] | 31 | ! Compilation with cpp key ORCHIDEE NOOPENMP |
---|
[1146] | 32 | USE surf_land_orchidee_noopenmp_mod |
---|
| 33 | #else |
---|
[2571] | 34 | #if ORCHIDEE_NOZ0H |
---|
| 35 | ! Compilation with cpp key ORCHIDEE NOZ0H |
---|
| 36 | USE surf_land_orchidee_noz0h_mod |
---|
| 37 | #else |
---|
[2952] | 38 | #if ORCHIDEE_NOFREIN |
---|
| 39 | ! Compilation with cpp key ORCHIDEE_NOFREIN |
---|
| 40 | USE surf_land_orchidee_nofrein_mod |
---|
| 41 | #else |
---|
[3435] | 42 | #if ORCHIDEE_NOUNSTRUCT |
---|
| 43 | ! Compilation with cpp key ORCHIDEE_NOUNSTRUCT |
---|
| 44 | USE surf_land_orchidee_nounstruct_mod |
---|
| 45 | #else |
---|
[4283] | 46 | #if ORCHIDEE_NOLIC |
---|
| 47 | ! Compilation with cpp key ORCHIDEE_NOLIC |
---|
| 48 | USE surf_land_orchidee_nolic_mod |
---|
| 49 | #else |
---|
| 50 | ! Default version |
---|
[1067] | 51 | USE surf_land_orchidee_mod |
---|
[1146] | 52 | #endif |
---|
[2571] | 53 | #endif |
---|
[2952] | 54 | #endif |
---|
[3435] | 55 | #endif |
---|
[4283] | 56 | #endif |
---|
| 57 | |
---|
[1067] | 58 | USE surf_land_bucket_mod |
---|
| 59 | USE calcul_fluxs_mod |
---|
[1785] | 60 | USE indice_sol_mod |
---|
[3391] | 61 | USE print_control_mod, ONLY: lunout |
---|
| 62 | |
---|
[781] | 63 | INCLUDE "dimsoil.h" |
---|
[888] | 64 | INCLUDE "YOMCST.h" |
---|
[2227] | 65 | INCLUDE "clesphys.h" |
---|
[2952] | 66 | INCLUDE "dimpft.h" |
---|
[781] | 67 | |
---|
| 68 | ! Input variables |
---|
| 69 | !**************************************************************************************** |
---|
| 70 | INTEGER, INTENT(IN) :: itime, jour, knon |
---|
| 71 | INTEGER, DIMENSION(klon), INTENT(IN) :: knindex |
---|
| 72 | REAL, INTENT(IN) :: date0 |
---|
| 73 | REAL, DIMENSION(klon), INTENT(IN) :: rlon, rlat |
---|
[2410] | 74 | REAL, DIMENSION(klon), INTENT(IN) :: yrmu0 ! cosine of solar zenith angle |
---|
[781] | 75 | LOGICAL, INTENT(IN) :: debut, lafin |
---|
| 76 | REAL, INTENT(IN) :: dtime |
---|
[888] | 77 | REAL, DIMENSION(klon), INTENT(IN) :: zlev, ccanopy |
---|
| 78 | REAL, DIMENSION(klon), INTENT(IN) :: swnet, lwnet |
---|
| 79 | REAL, DIMENSION(klon), INTENT(IN) :: albedo ! albedo for whole short-wave interval |
---|
[781] | 80 | REAL, DIMENSION(klon), INTENT(IN) :: tsurf |
---|
| 81 | REAL, DIMENSION(klon), INTENT(IN) :: p1lay |
---|
[1067] | 82 | REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm |
---|
[781] | 83 | REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow |
---|
| 84 | REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum |
---|
[1067] | 85 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ |
---|
| 86 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV |
---|
[888] | 87 | REAL, DIMENSION(klon), INTENT(IN) :: pref ! pressure reference |
---|
[2240] | 88 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness |
---|
[781] | 89 | REAL, DIMENSION(klon), INTENT(IN) :: rugoro |
---|
| 90 | REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf |
---|
[888] | 91 | REAL, DIMENSION(klon), INTENT(IN) :: lwdown_m ! downwelling longwave radiation at mean surface |
---|
| 92 | ! corresponds to previous sollwdown |
---|
[1146] | 93 | REAL, DIMENSION(klon), INTENT(IN) :: q2m, t2m |
---|
[888] | 94 | |
---|
[781] | 95 | ! In/Output variables |
---|
| 96 | !**************************************************************************************** |
---|
| 97 | REAL, DIMENSION(klon), INTENT(INOUT) :: snow, qsol |
---|
| 98 | REAL, DIMENSION(klon), INTENT(INOUT) :: agesno |
---|
| 99 | REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil |
---|
| 100 | |
---|
| 101 | ! Output variables |
---|
| 102 | !**************************************************************************************** |
---|
[2243] | 103 | REAL, DIMENSION(klon), INTENT(OUT) :: z0m, z0h |
---|
[2227] | 104 | !albedo SB >>> |
---|
| 105 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1_new ! albdeo for shortwave interval 1(visible) |
---|
| 106 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2_new ! albedo for shortwave interval 2(near infrared) |
---|
| 107 | REAL, DIMENSION(6), INTENT(IN) :: SFRWL |
---|
| 108 | REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir_new,alb_dif_new |
---|
| 109 | !albedo SB <<< |
---|
[888] | 110 | REAL, DIMENSION(klon), INTENT(OUT) :: evap |
---|
| 111 | REAL, DIMENSION(klon), INTENT(OUT) :: fluxsens, fluxlat |
---|
[781] | 112 | REAL, DIMENSION(klon), INTENT(OUT) :: qsurf |
---|
[888] | 113 | REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new |
---|
[781] | 114 | REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l |
---|
[1067] | 115 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 ! flux for U and V at first model level |
---|
[2952] | 116 | REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget,lai |
---|
| 117 | REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height |
---|
[781] | 118 | |
---|
| 119 | ! Local variables |
---|
| 120 | !**************************************************************************************** |
---|
[888] | 121 | REAL, DIMENSION(klon) :: p1lay_tmp |
---|
| 122 | REAL, DIMENSION(klon) :: pref_tmp |
---|
| 123 | REAL, DIMENSION(klon) :: swdown ! downwelling shortwave radiation at land surface |
---|
| 124 | REAL, DIMENSION(klon) :: epot_air ! potential air temperature |
---|
[781] | 125 | REAL, DIMENSION(klon) :: tsol_rad, emis_new ! output from interfsol not used |
---|
[1067] | 126 | REAL, DIMENSION(klon) :: u0, v0 ! surface speed |
---|
[781] | 127 | INTEGER :: i |
---|
| 128 | |
---|
[2227] | 129 | !albedo SB >>> |
---|
| 130 | REAL, DIMENSION(klon) :: alb1_new,alb2_new |
---|
| 131 | !albedo SB <<< |
---|
[781] | 132 | |
---|
| 133 | !**************************************************************************************** |
---|
| 134 | ! Choice between call to vegetation model (ok_veget=true) or simple calculation below |
---|
| 135 | ! |
---|
| 136 | !**************************************************************************************** |
---|
| 137 | IF (ok_veget) THEN |
---|
| 138 | !**************************************************************************************** |
---|
[888] | 139 | ! Call model sechiba in model ORCHIDEE |
---|
[781] | 140 | ! |
---|
| 141 | !**************************************************************************************** |
---|
| 142 | p1lay_tmp(:) = 0.0 |
---|
[888] | 143 | pref_tmp(:) = 0.0 |
---|
[781] | 144 | p1lay_tmp(1:knon) = p1lay(1:knon)/100. |
---|
[888] | 145 | pref_tmp(1:knon) = pref(1:knon)/100. |
---|
| 146 | ! |
---|
[2188] | 147 | !* Calculate incoming flux for SW and LW interval: swdown |
---|
[888] | 148 | ! |
---|
| 149 | swdown(:) = 0.0 |
---|
| 150 | DO i = 1, knon |
---|
| 151 | swdown(i) = swnet(i)/(1-albedo(i)) |
---|
| 152 | END DO |
---|
| 153 | ! |
---|
| 154 | !* Calculate potential air temperature |
---|
| 155 | ! |
---|
| 156 | epot_air(:) = 0.0 |
---|
| 157 | DO i = 1, knon |
---|
| 158 | epot_air(i) = RCPD*temp_air(i)*(pref(i)/p1lay(i))**RKAPPA |
---|
| 159 | END DO |
---|
[781] | 160 | |
---|
[888] | 161 | ! temporary for keeping same results using lwdown_m instead of lwdown |
---|
[781] | 162 | CALL surf_land_orchidee(itime, dtime, date0, knon, & |
---|
[2410] | 163 | knindex, rlon, rlat, yrmu0, pctsrf, & |
---|
[781] | 164 | debut, lafin, & |
---|
[2240] | 165 | zlev, u1, v1, gustiness, temp_air, spechum, epot_air, ccanopy, & |
---|
[1067] | 166 | cdragh, AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
[888] | 167 | precip_rain, precip_snow, lwdown_m, swnet, swdown, & |
---|
[1146] | 168 | pref_tmp, q2m, t2m, & |
---|
[781] | 169 | evap, fluxsens, fluxlat, & |
---|
[888] | 170 | tsol_rad, tsurf_new, alb1_new, alb2_new, & |
---|
[2952] | 171 | emis_new, z0m, z0h, qsurf, & |
---|
| 172 | veget, lai, height) |
---|
[781] | 173 | ! |
---|
[888] | 174 | !* Add contribution of relief to surface roughness |
---|
[781] | 175 | ! |
---|
| 176 | DO i=1,knon |
---|
[2243] | 177 | z0m(i) = MAX(1.5e-05,SQRT(z0m(i)**2 + rugoro(i)**2)) |
---|
[781] | 178 | ENDDO |
---|
| 179 | |
---|
| 180 | ELSE ! not ok_veget |
---|
| 181 | !**************************************************************************************** |
---|
| 182 | ! No extern vegetation model choosen, call simple bucket calculations instead. |
---|
| 183 | ! |
---|
| 184 | !**************************************************************************************** |
---|
| 185 | CALL surf_land_bucket(itime, jour, knon, knindex, debut, dtime,& |
---|
[1067] | 186 | tsurf, p1lay, cdragh, precip_rain, precip_snow, temp_air, & |
---|
| 187 | spechum, AcoefH, AcoefQ, BcoefH, BcoefQ, pref, & |
---|
[2240] | 188 | u1, v1, gustiness, rugoro, swnet, lwnet, & |
---|
[888] | 189 | snow, qsol, agesno, tsoil, & |
---|
[2243] | 190 | qsurf, z0m, alb1_new, alb2_new, evap, & |
---|
[888] | 191 | fluxsens, fluxlat, tsurf_new, dflux_s, dflux_l) |
---|
[2243] | 192 | z0h(1:knon)=z0m(1:knon) ! En attendant mieux |
---|
[781] | 193 | |
---|
| 194 | ENDIF ! ok_veget |
---|
| 195 | |
---|
[1067] | 196 | !**************************************************************************************** |
---|
| 197 | ! Calculation for all land models |
---|
| 198 | ! - Flux calculation at first modele level for U and V |
---|
| 199 | !**************************************************************************************** |
---|
| 200 | ! Suppose zero surface speed |
---|
| 201 | u0(:)=0.0 |
---|
| 202 | v0(:)=0.0 |
---|
| 203 | CALL calcul_flux_wind(knon, dtime, & |
---|
[2240] | 204 | u0, v0, u1, v1, gustiness, cdragm, & |
---|
[1067] | 205 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
| 206 | p1lay, temp_air, & |
---|
| 207 | flux_u1, flux_v1) |
---|
[2227] | 208 | |
---|
| 209 | !albedo SB >>> |
---|
[3391] | 210 | SELECT CASE(NSW) |
---|
| 211 | CASE(2) |
---|
[2227] | 212 | alb_dir_new(1:knon,1)=alb1_new(1:knon) |
---|
| 213 | alb_dir_new(1:knon,2)=alb2_new(1:knon) |
---|
[3391] | 214 | CASE(4) |
---|
[2227] | 215 | alb_dir_new(1:knon,1)=alb1_new(1:knon) |
---|
| 216 | alb_dir_new(1:knon,2)=alb2_new(1:knon) |
---|
| 217 | alb_dir_new(1:knon,3)=alb2_new(1:knon) |
---|
| 218 | alb_dir_new(1:knon,4)=alb2_new(1:knon) |
---|
[3391] | 219 | CASE(6) |
---|
[2227] | 220 | alb_dir_new(1:knon,1)=alb1_new(1:knon) |
---|
| 221 | alb_dir_new(1:knon,2)=alb1_new(1:knon) |
---|
| 222 | alb_dir_new(1:knon,3)=alb1_new(1:knon) |
---|
| 223 | alb_dir_new(1:knon,4)=alb2_new(1:knon) |
---|
| 224 | alb_dir_new(1:knon,5)=alb2_new(1:knon) |
---|
| 225 | alb_dir_new(1:knon,6)=alb2_new(1:knon) |
---|
[3391] | 226 | END SELECT |
---|
| 227 | |
---|
| 228 | alb_dif_new=alb_dir_new |
---|
[2227] | 229 | !albedo SB <<< |
---|
[1067] | 230 | |
---|
[781] | 231 | END SUBROUTINE surf_land |
---|
| 232 | ! |
---|
| 233 | !**************************************************************************************** |
---|
| 234 | ! |
---|
| 235 | END MODULE surf_land_mod |
---|
| 236 | ! |
---|
| 237 | !**************************************************************************************** |
---|
| 238 | ! |
---|