Changeset 3792
- Timestamp:
- Jan 4, 2021, 6:01:25 PM (4 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 21 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/conf_phys_m.F90
r3789 r3792 86 86 CHARACTER (len = 10),SAVE :: type_veget_omp 87 87 CHARACTER (len = 8), SAVE :: aer_type_omp 88 LOGICAL, SAVE :: ok_snow_omp 88 INTEGER, SAVE :: landice_opt_omp 89 INTEGER, SAVE :: n_dtis_omp 90 INTEGER, SAVE :: iflag_tsurf_inlandsis_omp 91 INTEGER, SAVE :: iflag_albzenith_omp 92 LOGICAL, SAVE :: SnoMod_omp,BloMod_omp,ok_outfor_omp 89 93 LOGICAL, SAVE :: ok_newmicro_omp 90 94 LOGICAL, SAVE :: ok_all_xml_omp … … 318 322 ! 319 323 320 ! Martin 321 !Config Key = ok_snow 322 !Config Desc = Flag to activate snow model SISVAT 323 !Config Def = .FALSE. 324 ok_snow_omp = .FALSE. 325 CALL getin('ok_snow', ok_snow_omp) 326 ! Martin 327 324 ! INLANDSIS 325 !================================================================== 326 ! Martin et Etienne 327 !Config Key = landice_opt 328 !Config Desc = which landice snow model (BULK, SISVAT or INLANDSIS) 329 !Config Def = 0 330 landice_opt_omp = 0 331 CALL getin('landice_opt', landice_opt_omp) 332 ! Martin et Etienne 333 334 !Etienne 335 !Config Key = iflag_tsurf_inlandsis 336 !Config Desc = which method to calculate tsurf in INLANDSIS 337 !Config Def = 0 338 iflag_tsurf_inlandsis_omp = 0 339 CALL getin('iflag_tsurf_inlandsis', iflag_tsurf_inlandsis_omp) 340 341 !Etienne 342 !Config Key = iflag_albzenith 343 !Config Desc = method to account for albedo sensitivity to solar zenith angle 344 !Config Def = 0 345 iflag_albzenith_omp = 0 346 CALL getin('iflag_albzenith', iflag_albzenith_omp) 347 348 !Etienne 349 !Config Key = n_dtis 350 !Config Desc = number of subtimesteps for INLANDSIS 351 !Config Def = 1 352 n_dtis_omp = 1 353 CALL getin('n_dtis', n_dtis_omp) 354 355 !Etienne 356 !Config Key = SnoMod 357 !Config Desc = activation of snow modules in inlandsis 358 !Config Def = 1 359 SnoMod_omp = .TRUE. 360 CALL getin('SnoMod', SnoMod_omp) 361 362 !Etienne 363 !Config Key = BloMod 364 !Config Desc = activation of blowing snow in inlandsis 365 !Config Def = 1 366 BloMod_omp = .FALSE. 367 CALL getin('BloMod', BloMod_omp) 368 369 !Etienne 370 !Config Key = ok_outfor 371 !Config Desc = activation of output ascii file in inlandsis 372 !Config Def = 1 373 ok_outfor_omp = .FALSE. 374 CALL getin('ok_outfor', ok_outfor_omp) 375 376 377 378 !================================================================== 379 328 380 !Config Key = OK_journe 329 381 !Config Desc = Pour des sorties journalieres … … 2291 2343 ok_veget=.FALSE. 2292 2344 ENDIF 2293 ! Martin 2294 ok_snow = ok_snow_omp 2295 ! Martin 2296 2345 ! SISVAT and INLANDSIS 2346 !================================================= 2347 landice_opt = landice_opt_omp 2348 iflag_tsurf_inlandsis = iflag_tsurf_inlandsis_omp 2349 iflag_albzenith = iflag_albzenith_omp 2350 n_dtis=n_dtis_omp 2351 SnoMod=SnoMod_omp 2352 BloMod=BloMod_omp 2353 ok_outfor=ok_outfor_omp 2354 !================================================= 2297 2355 ok_all_xml = ok_all_xml_omp 2298 2356 ok_lwoff = ok_lwoff_omp … … 2554 2612 WRITE(lunout,*) ' Version ocean = ', version_ocean 2555 2613 WRITE(lunout,*) ' Config veget = ', ok_veget,type_veget 2556 WRITE(lunout,*) ' Snow model SISVAT : ok_snow = ', ok_snow2614 WRITE(lunout,*) ' Snow model landice : landice_opt = ', landice_opt 2557 2615 WRITE(lunout,*) ' Config xml pour XIOS : ok_all_xml = ', ok_all_xml 2558 2616 WRITE(lunout,*) ' Sortie journaliere = ', ok_journe … … 2753 2811 WRITE(lunout,*) ' carbon_cycle_rad = ', carbon_cycle_rad 2754 2812 WRITE(lunout,*) ' level_coupling_esm = ', level_coupling_esm 2813 WRITE(lunout,*) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis 2814 WRITE(lunout,*) ' iflag_albzenith = ', iflag_albzenith 2815 WRITE(lunout,*) ' n_dtis = ', n_dtis 2816 WRITE(lunout,*) ' SnoMod = ', SnoMod 2817 WRITE(lunout,*) ' BloMod = ', BloMod 2818 WRITE(lunout,*) ' ok_outfor = ', ok_outfor 2819 2755 2820 2756 2821 !$OMP END MASTER -
LMDZ6/trunk/libf/phylmd/dimsoil.h
r1907 r3792 4 4 INTEGER nsoilmx 5 5 PARAMETER (nsoilmx=11) 6 7 ! For Inlandsis, Etienne Vignon: 8 9 INTEGER nsnowmx 10 PARAMETER (nsnowmx=35) 11 12 INTEGER nsismx 13 PARAMETER (nsismx=46) 14 15 ! nsismx should be equal to nsoilmx+nsnowmx 16 17 18 19 20 -
LMDZ6/trunk/libf/phylmd/phys_output_mod.F90
r3666 r3792 40 40 USE mod_phys_lmdz_para 41 41 !Martin 42 USE surface_data, ONLY : ok_snow42 USE surface_data, ONLY : landice_opt 43 43 USE phys_output_ctrlout_mod 44 44 USE mod_grid_phy_lmdz, only: klon_glo,nbp_lon,nbp_lat -
LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
r3787 r3792 361 361 USE infotrac_phy, ONLY: nqtot, nqo, type_trac, tname, niadv 362 362 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg 363 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow363 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, landice_opt 364 364 USE aero_mod, ONLY: naero_tot, id_STRAT_phy 365 365 USE ioipsl, ONLY: histend, histsync … … 1001 1001 CALL histwrite_phy(o_tauy, zx_tmp_fi2d) 1002 1002 1003 IF ( ok_snow) THEN1003 IF (landice_opt .GE. 1) THEN 1004 1004 CALL histwrite_phy(o_snowsrf, snow_o) 1005 1005 CALL histwrite_phy(o_qsnow, qsnow) -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r3784 r3792 65 65 USE regr_horiz_time_climoz_m, ONLY: regr_horiz_time_climoz 66 66 USE regr_pr_time_av_m, only: regr_pr_time_av 67 USE surface_data, ONLY : type_ocean, ok_veget, ok_snow67 USE surface_data, ONLY : type_ocean, ok_veget, landice_opt 68 68 USE time_phylmdz_mod, only: annee_ref, current_time, day_ini, day_ref, & 69 69 day_step_phy, itau_phy, pdtphys, raz_date, start_time, update_time -
LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90
r3780 r3792 25 25 26 26 USE dimphy 27 USE surface_data, ONLY : type_ocean, calice, calsno, ok_snow27 USE surface_data, ONLY : type_ocean, calice, calsno, landice_opt, n_dtis 28 28 USE fonte_neige_mod, ONLY : fonte_neige, run_off_lic 29 29 USE cpl_mod, ONLY : cpl_send_landice_fields … … 36 36 USE surf_sisvat_mod, ONLY : surf_sisvat 37 37 #endif 38 39 #ifdef CPP_INLANDSIS 40 USE surf_inlandsis_mod, ONLY : surf_inlandsis 41 #endif 42 38 43 USE indice_sol_mod 39 44 … … 86 91 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1 ! new albedo in visible SW interval 87 92 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2 ! new albedo in near IR interval 88 REAL, DIMENSION(6), INTENT(IN) ::SFRWL89 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif93 REAL, DIMENSION(6), INTENT(IN) :: SFRWL 94 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif 90 95 !albedo SB <<< 91 96 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat … … 108 113 REAL, DIMENSION(klon) :: zfra, alb_neig 109 114 REAL, DIMENSION(klon) :: radsol 110 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay 111 INTEGER :: i,j 115 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay, ustar 116 INTEGER :: i,j,nt 112 117 113 118 REAL, DIMENSION(klon) :: emis_new !Emissivity 114 119 REAL, DIMENSION(klon) :: swdown,lwdown 115 120 REAL, DIMENSION(klon) :: precip_snow_adv, snow_adv !Snow Drift precip./advection 116 REAL, DIMENSION(klon) :: bl_height, wind_velo !height boundary layer, wind spd121 REAL, DIMENSION(klon) :: zsl_height, wind_velo !surface layer height, wind spd 117 122 REAL, DIMENSION(klon) :: dens_air, snow_cont_air !air density; snow content air 118 123 REAL, DIMENSION(klon) :: alb_soil !albedo of underlying ice 119 124 REAL, DIMENSION(klon) :: pexner !Exner potential 120 125 REAL :: pref 121 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modfi 126 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modif 127 REAL :: dtis ! subtimestep 128 LOGICAL :: debut_is, lafin_is ! debut and lafin for inlandsis 122 129 123 130 CHARACTER (len = 20) :: modname = 'surf_landice' … … 139 146 LOGICAL, SAVE :: firstcall = .TRUE. 140 147 !$OMP THREADPRIVATE(firstcall) 141 !FC 142 143 148 149 150 !FC firtscall initializations 151 !****************************************************************************************** 144 152 IF (firstcall) THEN 145 153 alb_vis_sno_lic=0.77 … … 149 157 CALL getin_p('alb_nir_sno_lic',alb_nir_sno_lic) 150 158 PRINT*, 'alb_nir_sno_lic',alb_nir_sno_lic 159 160 ! z0m=1.e-3 161 ! z0h = z0m 151 162 firstcall=.false. 152 163 ENDIF 153 ! 164 !****************************************************************************************** 165 154 166 ! Initialize output variables 155 167 alb3(:) = 999999. … … 166 178 167 179 !**************************************************************************************** 168 ! ok_snow = TRUE : prepare and call SISVAT snow model 169 ! ok_snow = FALSE : soil_model, calcul_flux, fonte_neige, ... 170 ! 171 !**************************************************************************************** 172 IF (ok_snow) THEN 180 ! landice_opt = 0 : soil_model, calcul_flux, fonte_neige, ... 181 ! landice_opt = 1 : prepare and call SISVAT snow model 182 ! landice_opt = 2 : prepare and call INLANDSIS snow model 183 !**************************************************************************************** 184 185 186 IF (landice_opt .EQ. 1) THEN 187 188 !**************************************************************************************** 189 ! CALL to SISVAT interface 190 !**************************************************************************************** 191 173 192 #ifdef CPP_SISVAT 174 193 ! Prepare for calling SISVAT … … 192 211 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 193 212 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 194 bl_height(i) = pphi1(i)/RG213 zsl_height(i) = pphi1(i)/RG 195 214 END DO 196 215 197 !**************************************************************************************** 198 ! CALL to SISVAT interface 199 ! 200 !**************************************************************************************** 216 201 217 ! config: compute everything with SV but temperatures afterwards with soil/calculfluxs 202 218 DO i = 1, knon … … 209 225 rmu0, swdown, lwdown, pexner, ps, p1lay, & 210 226 precip_rain, precip_snow, precip_snow_adv, snow_adv, & 211 bl_height, wind_velo, temp_air, dens_air, spechum, tsurf, &227 zsl_height, wind_velo, temp_air, dens_air, spechum, tsurf, & 212 228 rugoro, snow_cont_air, alb_soil, slope, cloudf, & 213 229 radsol, qsol, tsoil0, snow, snowhgt, qsnow, to_ice,sissnow, agesno, & … … 232 248 flux_u1, flux_v1) 233 249 #else 234 abort_message='Pb de coherence: ok_snow = .true.mais CPP_SISVAT = .false.'250 abort_message='Pb de coherence: landice_opt = 1 mais CPP_SISVAT = .false.' 235 251 CALL abort_physic(modname,abort_message,1) 236 252 #endif 237 ELSE ! ok_snow=FALSE 253 254 !**************************************************************************************** 255 ! CALL to INLANDSIS interface 256 !**************************************************************************************** 257 258 ELSE IF (landice_opt .EQ. 2) THEN 259 #ifdef CPP_INLANDSIS 260 261 debut_is=debut 262 lafin_is=.false. 263 ! Suppose zero surface speed 264 u0(:) = 0.0 265 v0(:) = 0.0 266 267 268 CALL calcul_flux_wind(knon, dtime, & 269 u0, v0, u1, v1, gustiness, cdragm, & 270 AcoefU, AcoefV, BcoefU, BcoefV, & 271 p1lay, temp_air, & 272 flux_u1, flux_v1) 273 274 275 ! Set constants and compute some input for SISVAT 276 ! = 1000 hPa 277 ! and calculate incoming flux for SW and LW interval: swdown, lwdown 278 swdown(:) = 0.0 279 lwdown(:) = 0.0 280 snow_adv(:) = 0. ! no snow blown in for now 281 snow_cont_air(:) = 0. 282 alb_soil(:) = 0.4 ! before albedo(:) but here it is the ice albedo that we have to set 283 ustar(:) = 0. 284 pref = 100000. 285 DO i = 1, knon 286 swdown(i) = swnet(i)/(1-albedo(i)) 287 lwdown(i) = lwdownm(i) 288 wind_velo(i) = u1(i)**2 + v1(i)**2 289 wind_velo(i) = wind_velo(i)**0.5 290 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 291 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 292 zsl_height(i) = pphi1(i)/RG 293 tsoil0(i,:) = tsoil(i,:) 294 ustar(i)= (cdragm(i)*(wind_velo(i)**2))**0.5 295 END DO 296 297 298 ! Subtimestepping 299 300 dtis=dtime/n_dtis 301 302 DO nt=1,n_dtis 303 304 IF (lafin .and. nt.eq.n_dtis) THEN 305 lafin_is=.true. 306 END IF 307 308 !PRINT*,'RENTRE DANS INLANDSIS','itime',itime,'dtime',dtime,'dtis',dtis 309 CALL surf_inlandsis(knon, rlon, rlat, knindex, itime, dtis, debut_is, lafin_is, & 310 rmu0, swdown, lwdown, albedo, pexner, ps, p1lay, & 311 precip_rain, precip_snow, precip_snow_adv, snow_adv, & 312 zsl_height, wind_velo, ustar, temp_air, dens_air, spechum, tsurf, & 313 rugoro, snow_cont_air, alb_soil, slope, cloudf, & 314 radsol, qsol, tsoil0, snow, zfra, snowhgt, qsnow, to_ice,sissnow, agesno, & 315 AcoefH, AcoefQ, BcoefH, BcoefQ, cdragm, cdragh, & 316 run_off_lic, evap, fluxsens, fluxlat, dflux_s, dflux_l, & 317 tsurf_new, alb1, alb2, alb3, & 318 emis_new, z0m, z0h, qsurf) 319 320 debut_is=.false. 321 322 END DO 323 324 325 #else 326 abort_message='Pb de coherence: landice_opt = 2 mais CPP_INLANDSIS = .false.' 327 CALL abort_physic(modname,abort_message,1) 328 #endif 329 330 331 332 ELSE 238 333 239 334 !**************************************************************************************** … … 261 356 ! 262 357 !**************************************************************************************** 263 !beta(:) = 1.0264 !dif_grnd(:) = 0.0358 ! beta(:) = 1.0 359 ! dif_grnd(:) = 0.0 265 360 266 361 ! Suppose zero surface speed … … 287 382 ! 288 383 !**************************************************************************************** 289 CALL fonte_neige( 384 CALL fonte_neige(knon, is_lic, knindex, dtime, & 290 385 tsurf, precip_rain, precip_snow, & 291 386 snow, qsol, tsurf_new, evap) … … 323 418 z0m = SQRT(z0m**2+rugoro**2) 324 419 325 END IF ! ok_snow 420 421 422 423 424 425 END IF ! landice_opt 326 426 327 427 … … 340 440 341 441 !**************************************************************************************** 342 snow_o=0. 343 zfra_o = 0. 344 DO j = 1, knon 345 i = knindex(j) 346 snow_o(i) = snow(j) 347 zfra_o(i) = zfra(j) 348 ENDDO 349 442 ! Etienne: comment these lines because of duplication just below 443 ! snow_o=0. 444 ! zfra_o = 0. 445 ! DO j = 1, knon 446 ! i = knindex(j) 447 ! snow_o(i) = snow(j) 448 ! zfra_o(i) = zfra(j) 449 ! ENDDO 450 ! 350 451 !**************************************************************************************** 351 452 snow_o=0. -
LMDZ6/trunk/libf/phylmd/surface_data.F90
r3327 r3792 15 15 !$OMP THREADPRIVATE(type_veget) 16 16 17 LOGICAL, SAVE :: ok_snow ! true for coupling to snow model SISVAT18 !$OMP THREADPRIVATE(ok_snow)19 20 17 CHARACTER(len=6), SAVE :: type_ocean ! force/slab/couple 21 18 !$OMP THREADPRIVATE(type_ocean) … … 30 27 !$OMP THREADPRIVATE(t_coupl) 31 28 29 ! FOR INLANDSIS: 30 !=============== 31 32 INTEGER, SAVE :: landice_opt ! 1 for coupling with SISVAT, 2 for coupling with INLANDSIS 33 !$OMP THREADPRIVATE(landice_opt) 34 35 INTEGER, SAVE :: iflag_tsurf_inlandsis ! 0 SISVAT method, 1 LMDZ method 36 !$OMP THREADPRIVATE(iflag_tsurf_inlandsis) 37 38 INTEGER, SAVE :: iflag_albzenith ! dependency of albedo to zenith angle 39 !$OMP THREADPRIVATE(iflag_albzenith) 40 41 INTEGER, SAVE :: n_dtis ! number of subtimesteps for INLANDSIS 42 !$OMP THREADPRIVATE(n_dtis) 43 44 ! with or without snow module/ blowing snow, ascii outfile 45 LOGICAL, SAVE :: SnoMod,BloMod,ok_outfor 46 !$OMP THREADPRIVATE(SnoMod,BloMod,ok_outfor) 47 32 48 END MODULE surface_data
Note: See TracChangeset
for help on using the changeset viewer.