- 积分
- 341
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2022-1-5
- 最后登录
- 1970-1-1
|
10金钱
我在获取ROMS所需要的运行文件中的forcing文件(可能是叫应力文件?)的时候从NARR网站提取数据却总是提取不全,请问各位大佬这样要怎么办啊。我用的是COAWST模式中的ncei_2roms.m文件,正常应该是运行得到 romsforc_NARR.nc文件,但是实际我在matlab中查看nc文件中的数值时发现总是会有缺失,具体代码在下面。
提取NAM数据的网址时使用的这个'https://www.ncei.noaa.gov/thredds/dodsC/model-namanl-old/'或者如果用NARR和GFS能提取到也可以)
- % (1) Select which variables to include in this netcdf forcing file.
- % put a '1' if you want to include it, '0' otherwise.
- % 1/0 Var description (Units)
- get_lwrad = 1; % gets downward and upward longwave and computes net flux of down-up (W/m2)
- % this will also store lwrad_down so you can use LONGWAVE option.
- get_swrad = 1; % gets downward and updward shortwave and computes net down-up flux (W/m2)
- get_rain = 1; % precipitation rate (kg/m2/s) at surface
- get_Tair = 1; % surface air temperature (C) at 2m
- get_Pair = 1; % pressure reduce to MSL (Pa)
- get_Qair = 1; % relative_humidity (percent) at 2m
- get_Wind = 1; % surface u- and v- winds (m/s) at 10m
- % (2) Enter name of output ROMS forcing file
- %ROMS_force_name = 'romsforc_GFS_Sandy2012.nc';
- %ROMS_force_name = 'romsforc_GFS_Mangkhut2018.nc';
- ROMS_force_name = 'romsforc_NAM_Mangkhut_0310_2.nc';
- % (3) Enter start and end dates
- time_start = datenum('15-Sep-2018');
- time_end = datenum('18-Sep-2018');
- % (4) Select which data to obtain: NAM, NARR, both NAM+NARR -- or -- GFS.
- get_NARR = 0; % NARR-A grid 221 32km data, available 1979-2014
- get_NAM = 1; % NAM grid 218 12km data
- % --- or ---
- get_GFS = 0; % GFS 0.5 degree
- % GFS is 6 hr and NAM/NARR is 3 hr. I dont have time interpolation
- % added in so you have to pick NAM/NARR or GFS.
- % (5) Select to interpolate to a roms grid or a user defined grid.
- % Set one of these to a 1, the other to a 0.
- interpto_roms_grid = 1;
- interpto_user_grid = 0;
- % The code has been written so that longitude is in -deg E.
- if interpto_roms_grid
- model_grid = 'F:\COAWST\Roms\Mangkhut\Mangkhut_roms_grid.nc';
- elseif interpto_user_grid
- % Provide lon_rho, lat_rho, and angle_rho.
- % NAM / NARR grids are centered at~ -100 deg lon; GFS = 0:360 lon
- if (get_NARR); offset=-360; end
- if (get_NAM); offset=-360; end
- if (get_GFS); offset=0; end
- % You Probably want to make a finer resolution from 0.2 to 0.1.
- lon_rho = [100:0.2:130]+offset;
- lat_rho = [ 10:0.2:50 ];
- lon_rho = repmat(lon_rho,size(lat_rho,2),1)';
- lat_rho = repmat(lat_rho',1,size(lon_rho,1))';
- angle_rho = lon_rho*0;
- else
- disp('pick a grid')
- end
- % (6) Select which method to use: ncread or nctoolbox
- use_matlab = 0;
- use_nctoolbox = 1;
复制代码
|
|