Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

How do we use grid%itimestep to change the variables with time?

MSdueon12

Member
Hello,
I am doing a job that changes the aerosol concentration at different simulation times. However I am not able to get the values of the variable changed. I appreciate any help or direction from you in figuring this question out.
I want to change the value of aerocu to 10* aerocu between the 12 hours to 24 hours of simulation time. Here the timestep is 54s, which is the first domain. I assume that the aerocu change in the outmost domain would imapct the aerocu concentration in the innermost domain. Is that correct?
What I did is add these codes:
if (grid%id ==1) then
if (grid%itimestep .ge.800 .and. grid%itimestep .le. 1600) then
do i = ids,ide
do j = jds,jde
do k = kds,kde
if (ips .LE. i .and. ipe .GE. i .and. jps.Le.j .and. jpe .GE. j .and. kps .LE. k .and. kpe .GE. k) then
aerocu(i,k,j,1) = 10* aerocu(i,k,j,1)
aerocu(i,k,j,2) = 10* aerocu(i,k,j,2)
aerocu(i,k,j,3) = 10* aerocu(i,k,j,3)
aerocu(i,k,j,4) = 10* aerocu(i,k,j,4)
end if
end do
end do
end do
end if
end if

This part of the code is inserted between CALL get_ijk_from_grid. and CALL get_ijk_from_subgrid with the hint from @kwerner mentioned in heat bubble thread.

This solve_em.F has been uploaded. Thank you so much for your help.
 

Attachments

  • solve_em.F
    251.6 KB · Views: 0
Top