[mpas-developers] proposed addition to global_scvt

Michael Duda duda at ucar.edu
Tue May 17 17:13:11 MDT 2011


Hi, Todd.

I think the meshDensity field would be a very welcome addition to the
mesh files. We've just started to test the use of the mesh density
field to scale the eddy viscosities in the non-hydrostatic core, and had
modified a local copy of the global_scvt code as you've proposed. So,
there are certainly no objections here!

Cheers,
Michael


On Mon, May 16, 2011 at 09:37:59PM -0600, Todd Ringler wrote:
> 
> In the global_scvt algorithm, I propose adding a new variable to the grid.nc output file. This variable will be "meshDensity" and will hold the SCVT mesh density calculation (density_for_point) as computed at cell centers.
> 
> The benefit of having meshDensity is to be able to scale closure parameters (like del2 and del4) across the variable resolution mesh. meshDensity will have a maximum value of 1.0 and will be positive definite.
> 
> The snippet of major code addition is below. It is included in module_grid_meta.F
> 
> 
>   (compute mesh density at cell centers)
>       do i=1,nCells
>         pCell%lat = latCell(i)
>         pCell%lon = lonCell(i)
>         if(pCell%lon.gt. pii) pCell%lon=pCell%lon-2.0*pii
>         if(pCell%lon.ge.-pii) pCell%lon=pCell%lon+2.0*pii
>         meshDensity(i) = density_for_point(pCell)
>       enddo
> 
>    (set maxval of meshDensity to 1, check for inconsistencies)
>       meshDensity(:) = meshDensity(:)/maxval(meshDensity(:))
>       if(minval(meshDensity.le.0.0) then
>            write(6,*) 'meshDensity can not be negative'
>            stop
>        endif
> 
>       call write_netcdf_init( &
>                               nCells, &
>                               nEdges, &
>                               nVertices, &
>                               maxEdges, &
>                               nVertLevels, &
>                               nTracers &
>                               )
>     
>     (pass in meshDensity to be written to grid.nc)
>       call write_netcdf_fields( &
>                                 1, &
>                                 latCell, &
>                                 lonCell, &
>                                 meshDensity, &
> 
> 
> 

> _______________________________________________
> 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