MAKEGGRID

create x,y grids ( in meshgrid sense) for various gaussian grids
          (only T30 at the moment)
it also return in lsm the land sea mask (-1 sea, 1 land )
function [x,y,lsm]= makeggrid(res)
%Usage:
%               [lon,lat,lsm]=makeggrid('T30');
%
%  res   'T30'   96x48 gaussian grids
%
%
if ~ischar(res), error(' Input not a string, try T30 '), end;
%
nx=96;

%  generate wrap around longitudes
lon = linspace(0.,360,nx+1)';
lat = [  -87.16    -83.48    -79.78    -76.07    -72.36    -68.65 ...
    -64.94    -61.23    -57.52    -53.81    -50.10    -46.39 ...
    -42.68    -38.97    -35.26    -31.54    -27.83    -24.12 ...
    -20.41    -16.70    -12.99     -9.28     -5.57     -1.86 ...
    1.86      5.57      9.28     12.99     16.70     20.41  ...
    24.12     27.83     31.54     35.26     38.97     42.68 ...
    46.39     50.10     53.81     57.52     61.23     64.94 ...
    68.65     72.36     76.07     79.78     83.48     87.16 ];
[x,y]=meshgrid(lon,lat);
%
%  read in land-sea mask
%
fid=fopen('lsm.ieee.mpi.t30.dat','r','b');
fread(fid,1,'float32');
tmp=fread(fid,[96 48],'float32');
fclose(fid);
lsm=flipud(tmp');




return