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

Doug Jacobsen dwj07 at fsu.edu
Tue Jan 25 11:13:56 MST 2011


Mark and Michael,

Thanks for the comments. Here is an updated version of the code with the
loop split into two loops, each with it's own logical surrounding it.

Please let me know if there are any more comments. Thanks again!

Doug

On Tue, Jan 25, 2011 at 12:42 PM, Mark Petersen <mpetersen at lanl.gov> wrote:

> 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
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20110125/66854207/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module_time_integration.F
Type: text/x-fortran
Size: 50048 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20110125/66854207/attachment-0001.bin 


More information about the mpas-developers mailing list