[781] | 1 | ! |
---|
[2227] | 2 | ! $Id: surf_seaice_mod.F90 5285 2024-10-28 13:33:29Z evignon $ |
---|
| 3 | ! |
---|
[781] | 4 | MODULE surf_seaice_mod |
---|
| 5 | |
---|
| 6 | IMPLICIT NONE |
---|
| 7 | |
---|
| 8 | CONTAINS |
---|
| 9 | ! |
---|
| 10 | !**************************************************************************************** |
---|
| 11 | ! |
---|
| 12 | SUBROUTINE surf_seaice( & |
---|
[888] | 13 | rlon, rlat, swnet, lwnet, alb1, fder, & |
---|
[781] | 14 | itime, dtime, jour, knon, knindex, & |
---|
[1067] | 15 | lafin, & |
---|
| 16 | tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & |
---|
| 17 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 18 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2244] | 19 | ps, u1, v1, gustiness, pctsrf, & |
---|
[888] | 20 | snow, qsurf, qsol, agesno, tsoil, & |
---|
[2243] | 21 | z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, & |
---|
[1067] | 22 | tsurf_new, dflux_s, dflux_l, & |
---|
[5022] | 23 | flux_u1, flux_v1 & |
---|
| 24 | #ifdef ISO |
---|
| 25 | & ,xtprecip_rain, xtprecip_snow,xtspechum,Roce, & |
---|
| 26 | & xtsnow,xtsol,xtevap,Rland_ice & |
---|
| 27 | #endif |
---|
| 28 | & ) |
---|
[1067] | 29 | |
---|
| 30 | USE dimphy |
---|
| 31 | USE surface_data |
---|
| 32 | USE ocean_forced_mod, ONLY : ocean_forced_ice |
---|
| 33 | USE ocean_cpl_mod, ONLY : ocean_cpl_ice |
---|
[2209] | 34 | USE ocean_slab_mod, ONLY : ocean_slab_ice |
---|
[1785] | 35 | USE indice_sol_mod |
---|
[5022] | 36 | #ifdef ISO |
---|
| 37 | USE infotrac_phy, ONLY : ntiso,niso |
---|
| 38 | #endif |
---|
[5282] | 39 | USE clesphys_mod_h |
---|
[5285] | 40 | USE yomcst_mod_h |
---|
[5274] | 41 | USE dimsoil_mod_h, ONLY: nsoilmx |
---|
[1067] | 42 | |
---|
[781] | 43 | ! |
---|
[5274] | 44 | ! This subroutine will make a call to ocean_XXX_ice according to the ocean mode (force, |
---|
[781] | 45 | ! slab or couple). The calculation of rugosity for the sea-ice surface is also done |
---|
| 46 | ! in here because it is the same calculation for the different modes of ocean. |
---|
| 47 | ! |
---|
| 48 | |
---|
[5274] | 49 | |
---|
[3815] | 50 | ! for rd and retv |
---|
| 51 | |
---|
[781] | 52 | ! Input arguments |
---|
| 53 | !**************************************************************************************** |
---|
| 54 | INTEGER, INTENT(IN) :: itime, jour, knon |
---|
| 55 | INTEGER, DIMENSION(klon), INTENT(IN) :: knindex |
---|
[1067] | 56 | LOGICAL, INTENT(IN) :: lafin |
---|
[781] | 57 | REAL, INTENT(IN) :: dtime |
---|
| 58 | REAL, DIMENSION(klon), INTENT(IN) :: rlon, rlat |
---|
[888] | 59 | REAL, DIMENSION(klon), INTENT(IN) :: swnet ! net shortwave radiation at surface |
---|
| 60 | REAL, DIMENSION(klon), INTENT(IN) :: lwnet ! net longwave radiation at surface |
---|
| 61 | REAL, DIMENSION(klon), INTENT(IN) :: alb1 ! albedo in visible SW interval |
---|
[781] | 62 | REAL, DIMENSION(klon), INTENT(IN) :: fder |
---|
| 63 | REAL, DIMENSION(klon), INTENT(IN) :: tsurf |
---|
| 64 | REAL, DIMENSION(klon), INTENT(IN) :: p1lay |
---|
[1072] | 65 | REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm |
---|
[781] | 66 | REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow |
---|
| 67 | REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum |
---|
[1067] | 68 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ |
---|
| 69 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV |
---|
[781] | 70 | REAL, DIMENSION(klon), INTENT(IN) :: ps |
---|
[2240] | 71 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness |
---|
[781] | 72 | REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf |
---|
[5022] | 73 | #ifdef ISO |
---|
| 74 | REAL, DIMENSION(ntiso,klon), INTENT(IN) :: xtprecip_rain, xtprecip_snow |
---|
| 75 | REAL, DIMENSION(klon), INTENT(IN) :: xtspechum |
---|
| 76 | REAL, DIMENSION(niso,klon), INTENT(IN) :: Roce |
---|
| 77 | REAL, DIMENSION(niso,klon), INTENT(IN) :: Rland_ice |
---|
| 78 | #endif |
---|
[781] | 79 | |
---|
| 80 | ! In/Output arguments |
---|
| 81 | !**************************************************************************************** |
---|
| 82 | REAL, DIMENSION(klon), INTENT(INOUT) :: snow, qsurf, qsol |
---|
| 83 | REAL, DIMENSION(klon), INTENT(INOUT) :: agesno |
---|
| 84 | REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil |
---|
[5022] | 85 | #ifdef ISO |
---|
| 86 | REAL, DIMENSION(niso,klon), INTENT(INOUT) :: xtsnow |
---|
| 87 | REAL, DIMENSION(niso,klon), INTENT(IN) :: xtsol |
---|
| 88 | #endif |
---|
[781] | 89 | |
---|
| 90 | ! Output arguments |
---|
| 91 | !**************************************************************************************** |
---|
[2243] | 92 | REAL, DIMENSION(klon), INTENT(OUT) :: z0m, z0h |
---|
[2227] | 93 | !albedo SB >>> |
---|
| 94 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1_new ! new albedo in visible SW interval |
---|
| 95 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2_new ! new albedo in near IR interval |
---|
| 96 | REAL, DIMENSION(6), INTENT(IN) :: SFRWL |
---|
| 97 | REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir_new,alb_dif_new |
---|
| 98 | !albedo SB <<< |
---|
[781] | 99 | REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat |
---|
[888] | 100 | REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new |
---|
[781] | 101 | REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l |
---|
[1067] | 102 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 |
---|
[5022] | 103 | #ifdef ISO |
---|
| 104 | REAL, DIMENSION(ntiso,klon), INTENT(OUT) :: xtevap |
---|
| 105 | #endif |
---|
[781] | 106 | |
---|
[888] | 107 | ! Local arguments |
---|
| 108 | !**************************************************************************************** |
---|
| 109 | REAL, DIMENSION(klon) :: radsol |
---|
[5022] | 110 | #ifdef ISO |
---|
| 111 | #ifdef ISOVERIF |
---|
| 112 | INTEGER :: j |
---|
| 113 | #endif |
---|
| 114 | #endif |
---|
[1067] | 115 | |
---|
[2227] | 116 | !albedo SB >>> |
---|
| 117 | REAL, DIMENSION(klon) :: alb1_new,alb2_new |
---|
| 118 | !albedo SB <<< |
---|
[3815] | 119 | |
---|
| 120 | real rhoa(knon) ! density of moist air (kg / m3) |
---|
| 121 | |
---|
[781] | 122 | ! End definitions |
---|
| 123 | !**************************************************************************************** |
---|
| 124 | |
---|
[888] | 125 | |
---|
[781] | 126 | !**************************************************************************************** |
---|
[888] | 127 | ! Calculate total net radiance at surface |
---|
| 128 | ! |
---|
| 129 | !**************************************************************************************** |
---|
| 130 | radsol(:) = 0.0 |
---|
| 131 | radsol(1:knon) = swnet(1:knon) + lwnet(1:knon) |
---|
| 132 | |
---|
[3815] | 133 | rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon))) |
---|
| 134 | |
---|
[888] | 135 | !**************************************************************************************** |
---|
[781] | 136 | ! Switch according to type of ocean (couple, slab or forced) |
---|
| 137 | ! |
---|
| 138 | !**************************************************************************************** |
---|
[996] | 139 | IF (type_ocean == 'couple') THEN |
---|
| 140 | |
---|
[781] | 141 | CALL ocean_cpl_ice( & |
---|
[996] | 142 | rlon, rlat, swnet, lwnet, alb1, & |
---|
| 143 | fder, & |
---|
| 144 | itime, dtime, knon, knindex, & |
---|
| 145 | lafin,& |
---|
[1067] | 146 | p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum,& |
---|
| 147 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 148 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 149 | ps, u1, v1, gustiness, pctsrf, & |
---|
[996] | 150 | radsol, snow, qsurf, & |
---|
[1067] | 151 | alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[3815] | 152 | tsurf_new, dflux_s, dflux_l, rhoa) |
---|
[996] | 153 | |
---|
[2209] | 154 | ELSE IF (type_ocean == 'slab'.AND.version_ocean=='sicINT') THEN |
---|
| 155 | CALL ocean_slab_ice( & |
---|
| 156 | itime, dtime, jour, knon, knindex, & |
---|
| 157 | tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum,& |
---|
| 158 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 159 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 160 | ps, u1, v1, gustiness, & |
---|
[2209] | 161 | radsol, snow, qsurf, qsol, agesno, & |
---|
| 162 | alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
| 163 | tsurf_new, dflux_s, dflux_l, swnet) |
---|
| 164 | |
---|
[2057] | 165 | ELSE ! type_ocean=force or slab +sicOBS or sicNO |
---|
[1067] | 166 | CALL ocean_forced_ice( & |
---|
| 167 | itime, dtime, jour, knon, knindex, & |
---|
| 168 | tsurf, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum,& |
---|
| 169 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 170 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 171 | ps, u1, v1, gustiness, & |
---|
[996] | 172 | radsol, snow, qsol, agesno, tsoil, & |
---|
[1067] | 173 | qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[5022] | 174 | tsurf_new, dflux_s, dflux_l, rhoa & |
---|
| 175 | #ifdef ISO |
---|
| 176 | ,xtprecip_rain, xtprecip_snow, xtspechum,Roce, & |
---|
| 177 | xtsnow, xtsol,xtevap,Rland_ice & |
---|
| 178 | #endif |
---|
| 179 | ) |
---|
[781] | 180 | |
---|
[996] | 181 | END IF |
---|
| 182 | |
---|
[781] | 183 | !**************************************************************************************** |
---|
| 184 | ! Calculate rugosity |
---|
| 185 | ! |
---|
| 186 | !**************************************************************************************** |
---|
| 187 | |
---|
[2243] | 188 | z0m=z0m_seaice |
---|
| 189 | z0h = z0h_seaice |
---|
[2227] | 190 | |
---|
| 191 | !albedo SB >>> |
---|
| 192 | select case(NSW) |
---|
| 193 | case(2) |
---|
| 194 | alb_dir_new(1:knon,1)=alb1_new(1:knon) |
---|
| 195 | alb_dir_new(1:knon,2)=alb2_new(1:knon) |
---|
| 196 | case(4) |
---|
| 197 | alb_dir_new(1:knon,1)=alb1_new(1:knon) |
---|
| 198 | alb_dir_new(1:knon,2)=alb2_new(1:knon) |
---|
| 199 | alb_dir_new(1:knon,3)=alb2_new(1:knon) |
---|
| 200 | alb_dir_new(1:knon,4)=alb2_new(1:knon) |
---|
| 201 | case(6) |
---|
| 202 | alb_dir_new(1:knon,1)=alb1_new(1:knon) |
---|
| 203 | alb_dir_new(1:knon,2)=alb1_new(1:knon) |
---|
| 204 | alb_dir_new(1:knon,3)=alb1_new(1:knon) |
---|
| 205 | alb_dir_new(1:knon,4)=alb2_new(1:knon) |
---|
| 206 | alb_dir_new(1:knon,5)=alb2_new(1:knon) |
---|
| 207 | alb_dir_new(1:knon,6)=alb2_new(1:knon) |
---|
| 208 | end select |
---|
| 209 | alb_dif_new=alb_dir_new |
---|
| 210 | !albedo SB <<< |
---|
| 211 | |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | |
---|
[781] | 215 | END SUBROUTINE surf_seaice |
---|
| 216 | ! |
---|
| 217 | !**************************************************************************************** |
---|
| 218 | ! |
---|
| 219 | END MODULE surf_seaice_mod |
---|
| 220 | |
---|