Changeset 4074 for trunk/LMDZ.COMMON/libf/evolution/surf_ice.F90
- Timestamp:
- Feb 17, 2026, 2:45:53 PM (10 days ago)
- File:
-
- 1 edited
-
trunk/LMDZ.COMMON/libf/evolution/surf_ice.F90 (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/surf_ice.F90
r4071 r4074 62 62 if (.not. allocated(is_h2o_perice_PCM)) allocate(is_h2o_perice_PCM(ngrid)) 63 63 if (.not. allocated(co2_perice_PCM)) allocate(co2_perice_PCM(ngrid,nslope)) 64 is_h2o_perice_PCM(:) = .false. 65 co2_perice_PCM(:,:) = 0._dp 64 66 65 67 END SUBROUTINE ini_surf_ice … … 359 361 360 362 if (ngrid == 1) then ! In 1D 361 h2o_ice = h2o_ice + d_h2oice*dt 362 zshift_surf = d_h2oice*dt/rho_h2oice 363 where (d_h2oice(:,:) < 0._dp .and. abs(d_h2oice(:,:)*dt) > h2o_ice(:,:)) ! Not enough ice to sublimate everything 364 ! We sublimate what we can 365 d_h2oice_new(:,:) = h2o_ice(:,:)/dt 366 ! It means the tendency is zero next time 367 d_h2oice(:,:) = 0._dp 368 else where 369 d_h2oice_new(:,:) = d_h2oice(:,:) 370 end where 363 371 else ! In 3D 364 372 call stopping_crit_h2o(delta_h2o_ads,delta_icetable,h2o_ice,d_h2oice,S_atm_2_h2o,S_h2o_2_atm,S_atm_2_h2oice,S_h2oice_2_atm,stopcrit) 365 373 if (stopcrit%stop_code() > 0) return 366 367 374 call balance_h2oice_reservoirs(S_atm_2_h2o,S_h2o_2_atm,S_atm_2_h2oice,S_h2oice_2_atm,h2o_ice,d_h2oice,d_h2oice_new) 368 h2o_ice = h2o_ice + d_h2oice_new*dt369 zshift_surf = d_h2oice_new*dt/rho_h2oice370 375 end if 376 377 h2o_ice = h2o_ice + d_h2oice_new*dt 378 zshift_surf = d_h2oice_new*dt/rho_h2oice 371 379 372 380 END SUBROUTINE evolve_h2oice … … 408 416 ! --------------- 409 417 integer(di) :: i, islope 410 real(qp) :: S_target, S_target_subl_h2oice, S_target_cond_h2oice, S_ghostice, d_target ! Balance variables 418 real(qp) :: S_target, S_target_subl_h2oice, S_target_cond_h2oice, S_ghostice ! Balance variables 419 real(dp) :: d_target 411 420 412 421 ! CODE … … 421 430 do islope = 1,nslope 422 431 if (d_h2oice(i,islope) > 0._dp) then ! Condensing 423 d_h2oice_new(i,islope) = d_h2oice _new(i,islope)*real(S_target_cond_h2oice/S_atm_2_h2oice,dp)432 d_h2oice_new(i,islope) = d_h2oice(i,islope)*real(S_target_cond_h2oice/S_atm_2_h2oice,dp) 424 433 else if (d_h2oice(i,islope) < 0._dp) then ! Sublimating 425 434 d_target = d_h2oice(i,islope)*real(S_target_subl_h2oice/S_h2oice_2_atm,dp) 426 if (abs(d_target*dt) < h2o_ice(i,islope)) then ! Enough ice to sublimate everything427 d_h2oice_new(i,islope) = real(d_target,dp)435 if (abs(d_target*dt) <= h2o_ice(i,islope)) then ! Enough ice to sublimate everything 436 d_h2oice_new(i,islope) = d_target 428 437 else ! Not enough ice to sublimate everything 429 438 ! We sublimate what we can … … 438 447 end do 439 448 440 ! We need to remove this ice unable to sublimate from places where ice condensed sin order to keep balance449 ! We need to remove this ice unable to sublimate from places where ice condensed in order to keep balance 441 450 where (d_h2oice_new > 0._dp) d_h2oice_new = d_h2oice_new*real((S_target_cond_h2oice - S_ghostice)/S_target_cond_h2oice,dp) 442 451
Note: See TracChangeset
for help on using the changeset viewer.
