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