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