Main menu

Navigation

spectral element core grid

4 posts / 0 new
Last post
andreasb
spectral element core grid

Hi all,

I have tried to plot the centers and vertices of a spectral element ne4np4 grid (attached). Turns out the grid is "almost quadrilateral":

blue crosses are the centers of quadrilateral elements

red crosses are the centers of triangular elements

green crosses are centers of elements with five sides (for some two corners are very close togehter and can't be distinguised in the plot)

Now my question: Is that correct?

Background for the question: I want to use the coordinates of the corners for scrip regridding in the CESM1/MESSy code (doi:10.5194/gmdd-8-6523-2015).

Thanks!

Andreas

 

For reference, here's the matlab script for plotting the grid:

 ncid=netcdf.open('SCRIPgrid_ne4np4_nomask_c110808.nc');
 grid_corner_lat_id=netcdf.inqVarID(ncid,'grid_corner_lat');
 grid_corner_lat=netcdf.getVar(ncid,grid_corner_lat_id);
 grid_corner_lon_id=netcdf.inqVarID(ncid,'grid_corner_lon');
 grid_corner_lon=netcdf.getVar(ncid,grid_corner_lon_id);
 grid_center_lat_id=netcdf.inqVarID(ncid,'grid_center_lat');
 grid_center_lat=netcdf.getVar(ncid,grid_center_lat_id);
 grid_center_lon_id=netcdf.inqVarID(ncid,'grid_center_lon');
 grid_center_lon=netcdf.getVar(ncid,grid_center_lon_id);
 netcdf.close(ncid)

 for i=1:size(grid_corner_lat,2)
    numdoublecorners(i)=0;
    for k=1:5
    for j=((k+1):5)      
        if  ((grid_corner_lat(k,i)==grid_corner_lat(j,i)) && (grid_corner_lon(k,i)==grid_corner_lon(j,i)))
            numdoublecorners(i)=numdoublecorners(i)+1;
        end
    end
    end
    numcorners(i)=5-numdoublecorners(i);
 end
 
 figure
 plot(grid_center_lon,grid_center_lat,'x')
 hold on
 plot(grid_center_lon(find(numcorners==3)),grid_center_lat(find(numcorners==3)),'rx')
 plot(grid_center_lon(find(numcorners==5)),grid_center_lat(find(numcorners==5)),'gx')
 plot(grid_center_lon(find(numcorners==2)),grid_center_lat(find(numcorners==2)),'rx')
 for k=1:5
     plot(grid_corner_lon(k,:),grid_corner_lat(k,:),'k.')
 end
 

 for i=1:size(grid_corner_lat,2)
    if (any(grid_corner_lon(:,i)>350) && any(grid_corner_lon(:,i)<10))
    else
    fill(grid_corner_lon(:,i),grid_corner_lat(:,i),'k')
     alpha 0
    end
 end
 

Attachment: 
pel

Dear Andres,

 

What you are plotting is a control volume grid (solid lines) where a volume/area around each quadrature grid point has been defined so that the spherical area exactly matches the Gauss-Lobatto-Legendre (GLL) weights times the metric factors. This grid exists only for couling the dynamical core with other components (land, ocean etc.), i.e. conservatively remap quantitiies to other grids. You may, of course, also use this grid for offline remapping. For example, there are ESMF functions in NCL that use this control volume grid to compute overlap weights between two grids for conservative remapping.

 

Regards,

Peter Hjort Lauritzen

andreasb

Dear Peter,

excellent, thanks! That's exactly what I need (I want to remap data on Gaussian grids to the atmospheric grid with the spectral element core. The remapping will be online, with weight generation whenever a new datafile is read. That way we can use the same input data files (e.g. for emissions) for any type of core (HOMME-SE, FV, ECHAM5 spectral transform).

best regards,

Andreas

brose@...

Andreas and Peter,

Just wanted to say thanks, this thread is incredibly helpful for someone (me) who has been struggling to understand the geometry of the spectral element grid!

- Brian

Brian Rose
University at Albany

Log in or register to post comments

Who's new

  • rlove@...
  • afox
  • shanru@...
  • yongxiao@...
  • terry.mcguinness@...