[mpas-developers] Trunk Commit Check: Adding Wind Stress and Bottom Drag to SW Core

Mark Petersen mpetersen at lanl.gov
Tue Jan 25 10:42:47 MST 2011


Doug,

Thanks for taking the time to commit this.  I also need to use wind stress 
and bottom drag in the sw core, so this is perfect.

I would go a step further and separate the loops to avoid ifs within dos:

     if(config_wind_stress) then
         do iEdge=1,grid % nEdges
         ...
     endif

     if (config_bottom_drag) then
         do iEdge=1,grid % nEdges
         ...
     endif

I think branches within loops are a greater efficiency hit than multiple 
loops, but it depends on how smart the compiler is.

As for c, I copied the bottom drag from POP.  The manual says, "The 
dimensionless constant c is typically chosen to be of order 10^{-3}". 
This is definitely one of those tunable parameters set based on 
experience.

Mark




On Mon, 24 Jan 2011, Michael Duda wrote:

> Hi, Doug.
>
> Overall, the changes look good to me. As a performance improvement, though,
> you could add an if-test around the new block of code at line 503 in
> module_time_integration.F to prevent the edge loop from iterating if neither
> of the new options are active, e.g.,
>
>      if (config_wind_stress .or. config_bottom_drag) then
>         ...
>      end if
>
> Also, I was wondering where the 1.0e-3 constant at line 518 comes from; is
> this just the inverse of rho_ref?
>
> Cheers!
> Michael
>
>
> On Fri, Jan 21, 2011 at 04:48:32PM -0500, Doug Jacobsen wrote:
>> Hi Everyone,
>>
>> I am adding Wind Stress forcing and Bottom Drag to the Shallow water core.
>> They are implemented in the same fashion as the Ocean core. I have added
>> logicals to the namelist that allow the user to selectively turn each on or
>> off for a run. Please let me know if anyone has any comments, I will commit
>> these at the latest on Wednesday unless there are any objections.
>>
>> Doug
>
>
>
>
>> _______________________________________________
>> mpas-developers mailing list
>> mpas-developers at mailman.ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/mpas-developers
>
> _______________________________________________
> mpas-developers mailing list
> mpas-developers at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/mpas-developers
>


More information about the mpas-developers mailing list