Latteral boundary condition problem
-
- Posts: 11
- Joined: Mon Apr 16, 2012 2:18 pm
- Location: IR of Iran Meteorological Organization
- Contact:
Latteral boundary condition problem
Hello everybody
I run the ROMS model for PERSIAN Gulf and Oman Sea for 10 years and its results are in good acceptance with sattelite images and other model results. I used GRADIENT LBC for east boundary. but when I extend the domain to Indian Ocean, the model blow_up. it is a sample of SST contour. please help me to find proper LBC.
I run the ROMS model for PERSIAN Gulf and Oman Sea for 10 years and its results are in good acceptance with sattelite images and other model results. I used GRADIENT LBC for east boundary. but when I extend the domain to Indian Ocean, the model blow_up. it is a sample of SST contour. please help me to find proper LBC.
- Attachments
-
- test.jpg (47.03 KiB) Viewed 77578 times
Re: Latteral boundary condition problem
For this sort of domain, I always use the RadNud option, providing values from a larger scale model at the open boundaries. If you are modeling recent years, you can download the HYCOM solutions and extract boundary files from them.
-
- Posts: 11
- Joined: Mon Apr 16, 2012 2:18 pm
- Location: IR of Iran Meteorological Organization
- Contact:
Re: Latteral boundary condition problem
Thanks for your suggestion. I saw the HYCOM website. it has analysis and reanalysis data. each reanalysis data file for 3-hour interval is about 2.5 Gb. how can I get the necessary data from these files?
Re: Latteral boundary condition problem
It depends on your tool of choice. I use Python scripts for the download and interpolation. Others use Matlab or whatever.
-
- Posts: 11
- Joined: Mon Apr 16, 2012 2:18 pm
- Location: IR of Iran Meteorological Organization
- Contact:
Re: Latteral boundary condition problem
Is there any matlab script for downloading and preparing boundary data from HYCOM website in ROMS data bank?
-
- Posts: 11
- Joined: Mon Apr 16, 2012 2:18 pm
- Location: IR of Iran Meteorological Organization
- Contact:
Re: Latteral boundary condition problem
I changed the LBC to RadNud, but this error apeared:
READ_PHYPAR - could not find input file: ocean_nud.nc
so, can you help me to make this file?
READ_PHYPAR - could not find input file: ocean_nud.nc
so, can you help me to make this file?
Re: Latteral boundary condition problem
Have you downloaded the Matlab tools from the myroms.org site? Look through there.
Re: Lateral boundary condition problem
Here is a link to some somewhat dated Matlab functions - two are for downloading HYCOM reanalysis, one is for preparing a boundary file. Beware that I wrote them in 2013 and I would probably do the boundary file function differently if I did it now (I'm including it as you may find it a useful starting point). It is possible that HYCOM has moved the data to a new machine (url). I ended up not using HYCOM data, but not because of any particular problem with HYCOM. The download required a script because it was to be used in batch mode daily (ie as part of a cron job). You probably don't require that at this stage so could combine the two download functions into a single script or function.
The link: https://1drv.ms/u/s!AvnPG7Gh4JsAgvZQYq04-vFWY-QEPA
Please let me know if and when you download it.
Best of luck.
The link: https://1drv.ms/u/s!AvnPG7Gh4JsAgvZQYq04-vFWY-QEPA
Please let me know if and when you download it.
Best of luck.
-
- Posts: 11
- Joined: Mon Apr 16, 2012 2:18 pm
- Location: IR of Iran Meteorological Organization
- Contact:
Re: Latteral boundary condition problem
thanks for your great help. I used the scripts, but it needs a file named 'latlontopo.mat'. how can I find or produce it?
Re: Latteral boundary condition problem
My apologies. The link at the end of this contains LatLonTopo.mat (as well as the matlab functions). It is simply a mat-file version of:
http://tds.hycom.org/thredds/dodsC/data ... epth_2d.nc
...which is what HYCOM uses for seafloor topography.
I cannot remember why I created a mat-file when I could have just used the netcdf. You could adapt the Matlab to go straight to the netcdf file. In fact I think I created subset versions of LatLonTopo.mat for different projects and I also can't remember why I did that. Maybe it seemed like a good idea at the time.
-- John
https://1drv.ms/u/s!AvnPG7Gh4JsAgvdeORb6Bq_P0gZ5ZA
Again, please let me know how it goes, in case others need this in future.
http://tds.hycom.org/thredds/dodsC/data ... epth_2d.nc
...which is what HYCOM uses for seafloor topography.
I cannot remember why I created a mat-file when I could have just used the netcdf. You could adapt the Matlab to go straight to the netcdf file. In fact I think I created subset versions of LatLonTopo.mat for different projects and I also can't remember why I did that. Maybe it seemed like a good idea at the time.
-- John
https://1drv.ms/u/s!AvnPG7Gh4JsAgvdeORb6Bq_P0gZ5ZA
Again, please let me know how it goes, in case others need this in future.
-
- Posts: 25
- Joined: Tue Sep 22, 2015 3:09 pm
- Location: Indian Institute of Technology Gandhinagar
Re: Latteral boundary condition problem
Hi John,
I want to try giving daily boundary values of tracers (to try Nudging) from HYCOM in my model domain for inter-annual simulations. I would be grateful if you can share the matlab code (which you mentioned here)for handling the HYCOM data.
Thanks in advance.
I want to try giving daily boundary values of tracers (to try Nudging) from HYCOM in my model domain for inter-annual simulations. I would be grateful if you can share the matlab code (which you mentioned here)for handling the HYCOM data.
Thanks in advance.
Re: Latteral boundary condition problem
Yadu,
I'm not sure when I'll get in to the office where the code you requested is located. Until then you might try following some more recent notes I made to myself after downloading HYCOM data (obviously your times and lats and lons will be different, and I only downloaded the surface data (level 1):
Notes:
http://tds.hycom.org/thredds/GLBa0.08/e ... -2009-uvel
http://tds.hycom.org/thredds/GLBa120.08 ... -2009-vvel
Choose Netcdf Subset
SAM: Select u, -31N -38N 123E 141E, select vertical level 1, select “Add Lat/Lon”, select a month of data (subsetter chokes if too much data); likewise for v.
Run p_combine_HYCOM.m to convert the nc files into a single pdf.
The script p_combine_HYCOM.m (nc_varget.m will order your data matrices as [t,lat,lon], which is why I still use nc_varget rather than ncread+permute):
%Combine monthly HYCOM netcdf files into a single matfile
clear
%*************************************************************
fnu(1,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200908.nc';
fnu(2,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200909.nc';
fnu(3,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200910.nc';
fnu(4,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200911.nc';
fnu(5,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200912.nc';
fnv(1,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200908.nc';
fnv(2,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200909.nc';
fnv(3,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200910.nc';
fnv(4,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200911.nc';
fnv(5,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200912.nc';
fnOUT='C:\mystuff\MODELS\HYCOM\DATA\SAM\HYCOM.mat';
%*************************************************************
[Nf,~]=size(fnu);
t=nc_varget(fnu(1,:),'MT');
t=HYCOM2dnum(t);
dat.Lat=nc_varget(fnu(1,:),'Latitude');
dat.Lon=nc_varget(fnv(1,:),'Longitude');
u=nc_varget(fnu(1,:),'u');
u=squeeze(u(:,1,:,:));
v=nc_varget(fnv(1,:),'v');
v=squeeze(v(:,1,:,:));
for k=2:Nf
t1=nc_varget(fnu(k,:),'MT');
t=vertcat(t,HYCOM2dnum(t1(:)));
u4=nc_varget(fnu(k,:),'u');
u3=squeeze(u4(:,1,:,:));
u=vertcat(u,u3);
v4=nc_varget(fnv(k,:),'v');
v3=squeeze(v4(:,1,:,:));
v=vertcat(v,v3);
end
dat.t=t;
dat.u=u;
dat.v=v;
save(fnOUT,'dat')
I'm not sure when I'll get in to the office where the code you requested is located. Until then you might try following some more recent notes I made to myself after downloading HYCOM data (obviously your times and lats and lons will be different, and I only downloaded the surface data (level 1):
Notes:
http://tds.hycom.org/thredds/GLBa0.08/e ... -2009-uvel
http://tds.hycom.org/thredds/GLBa120.08 ... -2009-vvel
Choose Netcdf Subset
SAM: Select u, -31N -38N 123E 141E, select vertical level 1, select “Add Lat/Lon”, select a month of data (subsetter chokes if too much data); likewise for v.
Run p_combine_HYCOM.m to convert the nc files into a single pdf.
The script p_combine_HYCOM.m (nc_varget.m will order your data matrices as [t,lat,lon], which is why I still use nc_varget rather than ncread+permute):
%Combine monthly HYCOM netcdf files into a single matfile
clear
%*************************************************************
fnu(1,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200908.nc';
fnu(2,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200909.nc';
fnu(3,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200910.nc';
fnu(4,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200911.nc';
fnu(5,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\uvel\200912.nc';
fnv(1,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200908.nc';
fnv(2,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200909.nc';
fnv(3,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200910.nc';
fnv(4,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200911.nc';
fnv(5,:)='C:\mystuff\MODELS\HYCOM\DATA\SAM\vvel\200912.nc';
fnOUT='C:\mystuff\MODELS\HYCOM\DATA\SAM\HYCOM.mat';
%*************************************************************
[Nf,~]=size(fnu);
t=nc_varget(fnu(1,:),'MT');
t=HYCOM2dnum(t);
dat.Lat=nc_varget(fnu(1,:),'Latitude');
dat.Lon=nc_varget(fnv(1,:),'Longitude');
u=nc_varget(fnu(1,:),'u');
u=squeeze(u(:,1,:,:));
v=nc_varget(fnv(1,:),'v');
v=squeeze(v(:,1,:,:));
for k=2:Nf
t1=nc_varget(fnu(k,:),'MT');
t=vertcat(t,HYCOM2dnum(t1(:)));
u4=nc_varget(fnu(k,:),'u');
u3=squeeze(u4(:,1,:,:));
u=vertcat(u,u3);
v4=nc_varget(fnv(k,:),'v');
v3=squeeze(v4(:,1,:,:));
v=vertcat(v,v3);
end
dat.t=t;
dat.u=u;
dat.v=v;
save(fnOUT,'dat')