Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Question on damping towards prescribed zonal speed

Hi, I want to run a simulation in which I damp the zonal (u) component towards a prescribed field.

This would be similar to d u / d t = [CAM physics] - C ( u - u_prescribed)

However, I would prefer this to work on the instantaneous ***zonal mean*** rather than the instantaneous ***local value*** of u. This is where the difficulty comes in. I think I know how to do this for the local value of u - thought about using gw_drag.F90 since that has the zonal wind component and computes a u-tendency term there that could be added to. Plus, the zonal mean could be computed easily enough in non-parallel run, The catch is how to do this in a parallel (reduced domain) run? I've been running with 16 or 32 processors. I need results in short order and can't wait months and months for a non-parallel run to finish. Is there a subroutine in which the entire u-field is recomposed (so I can compute zonal means) rather than the subdivided parallel grid? Is there some other way I can compute a zonal mean in a parallel (fast) run? Does the spectral decomposition (for the non-horizontal-grid-point part of the code) provide any assistance?

Thanks for any advice!
 
eaton said:
Which dycore are you using?

Now that the control run is finished I would like to start looking into how to apply the damping. Figuring out how to compute a zonal mean in a sub-divided-domain parallel-processed run is the problem.

Edit. Hmmm, someone suggested the coupler may be a place to implement this "analysis nudging" of the u-component. Apparently, the coupler needs fields for the entire domain, not just the sectors for the individual (parallel) processors, so a zonal mean calculation is plausible there. I will have to look into this.
 

eaton

CSEG and Liaisons
The dynamics/physics coupler does not require global fields. But, that is one possible place to do this. The important point here is that the Eulerian dycore only uses a 1D domain decomposition, and the decomposed dimension is latitude, which means that once the state variables are present in the dynamics decomposition you have full latitude circles of data over which zonal means can be calculated. In the p_d_coupling subroutine (in src/dynamics/eul/dp_coupling.F90) what is happening is that the data from the physics decomposition is being transformed back into the dynamics decomposition. But there is a catch. The Eulerian dycore only sends tendency information for the T, U, and V fields back to the dycore (these are the arrays t2, fu, fv). So there is no need for it to assemble arrays that contain the state variables themselves. You'll need to add code to do this, then compute the zonal means, compute the U tendency term, and update the fu field.

There is one more complication which is that there are two separate sections of code which are doing the rearrangement of physics decomp to dynamics decomp. If you are using the default for the phys_loadbalance namelist variable (which is 0), then you only need to modify the section of the conditional for local_dp_map=.true.. If you are changing that variable to obtain better load balancing then you'll need to modify code in the "else" section of that conditional.

The code to mimic is the code that is rearranging the constituents which are coming out of the phys_state structure. The U field is contained in phys_state(lchnk)%u(i,k)
 
Top