NCAR / Topo

NCAR Global Model Topography Generation Software for Unstructured Grids
26 stars 16 forks source link

Issue with not smoothing over LANDFRAC=0 areas on high-resolution intermediate cubed-sphere grid #41

Closed PeterHjortLauritzen closed 2 years ago

PeterHjortLauritzen commented 2 years ago

Plot below shows the difference between smoothing everywhere and not smoothing when LANDFRAC=0 with ncube=3000 intermediate cubed-sphere grid (~3km):

Screen Shot 2022-05-20 at 8 55 30 AM

and ncube=540 (~12km)

Screen Shot 2022-05-20 at 7 54 28 AM

There are significant differences inland. Why?

The problem: Binning from ~1km LANDFRAC to 3km cubed-sphere picks up on isolated "inland" ocean points that are not picked up when using ncube=540 intermediate cubed-sphere grid. See this regional plots over Himalayas of LANDFRAC when using ncube=3000:

Screen Shot 2022-05-20 at 11 31 12 AM

and ncube=540:

Screen Shot 2022-05-20 at 2 32 21 PM

There are sporadic LANDFRAC=0 points (dark blue points) where the Laplacian smoother will not be applied in the ncube=3000 LANDFRAC but close to none in ncube=540 LANDFRAC.

PeterHjortLauritzen commented 2 years ago

Solution: @JulioTBacmeister

Set LANDFRAC=0 only when elevation is 0. That should remove inland LANDFRAC=0 points (unless inland lakes are at zero elevation!)

This is done with the following code

landfrac_local = 1.0_r8 do ip=1,6 do j=1,ncube do i=1,ncube if (ABS(terr(i,j,ip))<1.0E-12_r8.and.ABS(landfrac(i,j,ip))<1E-12_r8) then landfrac_local(i,j,ip) = 0.0_r8 end if end do end do end do

This leads to the following landfraction (mapped to the ne30pg3 grid):

Screen Shot 2022-05-20 at 4 05 49 PM

Looks like the inland LANDFRAC=0 problem has been solved.

Please note that the scope of this work is to have zero elevation in atmosphere model in coastal regions (for better coupling between atmosphere and ocean model). This approach does not make sure that elevation is at the height of inland lakes (e.g. Caspian Sea, Great Lakes).

The difference between not smoothing over ocean (using the above algorithm) and smoothing everywhere is here in terms of PHIS:

Screen Shot 2022-05-20 at 6 37 44 PM

Difference between not smoothing over ocean (using the above algorithm) and namelist default (/glade/p/cesmdata/inputdata/atm/cam/topo/se/ne30pg3_nc3000_Co060_Fi001_PF_nullRR_Nsw042_20171014.nc"):

Screen Shot 2022-05-20 at 6 39 49 PM

Differences PHIS at coast lines is obviously the zeroing out of Laplacian where there is ocean. The inland differences look like the differences in smoothing operator (over steep orography very minor changes in smoothing operator will show larger differences).

Latest and greatest topo file (with zeroing out smoothing over ocean) is here:

/glade/p/cgd/amp/pel/topo/files/ne30pg3_gmted2010_bedmachine_nc3000_Laplace0100_20220520.nc