% function forcfiles=nepd_ex_forc(sub_I, sub_J, grd, grdn, nameit res) % Extract the subgrid FORCINGs file at resolution RES for the % subdomain SUB_I, SUB_J. % RES=1 keep existing resolution % RES=2 double the resolution % % Requires RNT, RNC, RGRD, Opendap, netcdf % % GLOBEC Ocean Modeling Support % - E. Di Lorenzo (globec_extract@o3d.org) % function forcfiles=nepd_ex_forc(sub_I, sub_J, grd, grdn, nameit, res); % Note this section is going to change depending on the model % solution used. if res ==1 ftvars= ... {'shf_time' 'srf_time' 'swf_time' 'sms_time' ... 'sms_time' 'sst_time' 'sst_time' 'sss_time' }; fvars= ... {'shflux' 'swrad' 'swflux' 'sustr' ... 'svstr' 'SST' 'dQdSST' 'SSS' }; k=0; % Configure NEPD forcing file using the OPenDap server forcfile='http://dods.o3d.org:8080/thredds/dodsC/nepd/nepd_data/nepd-forc-winds-50yr.nc'; iv=[4 5]; forcfilen=[nameit,'-forc-uvstress.nc']; rnc_SubForcEx(forcfile,grd,forcfilen,grdn,sub_I,sub_J,ftvars(iv),fvars(iv)); k=k+1; forcfiles{k}=forcfilen; forcfile='http://dods.o3d.org:8080/thredds/dodsC/nepd/nepd_data/nepd-forc-SST-50yr.nc'; iv=[6 7]; forcfilen=[nameit,'-forc-SST.nc']; rnc_SubForcEx(forcfile,grd,forcfilen,grdn,sub_I,sub_J,ftvars(iv),fvars(iv)); k=k+1; forcfiles{k}=forcfilen; forcfile='http://dods.o3d.org:8080/thredds/dodsC/nepd/nepd_data/nepd-forc-heat-fresh-CLIMA-noSST.nc'; iv=[1 2 3 8]; forcfilen=[nameit,'-forc-other.nc']; rnc_SubForcEx(forcfile,grd,forcfilen,grdn,sub_I,sub_J,ftvars(iv),fvars(iv)); k=k+1; forcfiles{k}=forcfilen; else disp(['Double resolution not available here']) disp(['Contact globec_extract@o3d.org to have it done']); end