[mpas-developers] proposed addition to global_scvt
Todd Ringler
ringler at lanl.gov
Mon May 16 21:37:59 MDT 2011
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, &
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20110516/7d787dbb/attachment.html
More information about the mpas-developers
mailing list