<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>The snippet of major code addition is below. It is included in module_grid_meta.F</div><div><br></div><div><br></div><div> <b>(compute mesh density at cell centers)</b></div><div><div> do i=1,nCells</div><div> pCell%lat = latCell(i)</div><div> pCell%lon = lonCell(i)</div><div> if(pCell%lon.gt. pii) pCell%lon=pCell%lon-2.0*pii</div><div> if(pCell%lon.ge.-pii) pCell%lon=pCell%lon+2.0*pii</div><div> meshDensity(i) = density_for_point(pCell)</div><div> enddo</div><div><br></div><div> (<b>set maxval of meshDensity to 1, check for inconsistencies)</b></div><div> meshDensity(:) = meshDensity(:)/maxval(meshDensity(:))</div><div> if(minval(meshDensity.le.0.0) then</div><div> write(6,*) 'meshDensity can not be negative'</div><div> stop</div><div> endif</div><div><br></div><div> call write_netcdf_init( &</div><div> nCells, &</div><div> nEdges, &</div><div> nVertices, &</div><div> maxEdges, &</div><div> nVertLevels, &</div><div> nTracers &</div><div> )</div><div> </div><div> <b>(pass in meshDensity to be written to grid.nc)</b></div><div> call write_netcdf_fields( &</div><div> 1, &</div><div> latCell, &</div><div> lonCell, &</div><div> meshDensity, &</div></div><div><br></div><div><br></div><div><br></div></body></html>