source: Roms_tools/Preprocessing_tools/make_ini.m @ 1

Last change on this file since 1 was 1, checked in by cholod, 13 years ago

import Roms_Agrif

File size: 2.7 KB
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%
3%  Build a ROMS initial file from Levitus Data
4%
5%  Extrapole and interpole temperature and salinity from a
6%  Climatology to get initial conditions for
7%  ROMS (initial netcdf files) .
8%  Get the velocities and sea surface elevation via a
9%  geostrophic computation.
10%
11%  Data input format (netcdf):
12%     temperature(T, Z, Y, X)
13%     T : time [Months]
14%     Z : Depth [m]
15%     Y : Latitude [degree north]
16%     X : Longitude [degree east]
17%
18%  Data source : IRI/LDEO Climate Data Library (World Ocean Atlas 1998)
19%    http://ingrid.ldgo.columbia.edu/
20%    http://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NODC/.WOA98/
21%
22%  P. Marchesiello & P. Penven - IRD 2005
23%
24%  Version of 21-Sep-2005
25%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26clear all
27close all
28%%%%%%%%%%%%%%%%%%%%% USERS DEFINED VARIABLES %%%%%%%%%%%%%%%%%%%%%%%%
29%
30%  Title
31%
32title='Climatology';
33%
34% Common parameters
35%
36romstools_param
37
38%  Data climatologies file names:
39%
40%    temp_month_data : monthly temperature climatology
41%    temp_ann_data   : annual temperature climatology
42%    salt_month_data : monthly salinity climatology
43%    salt_ann_data   : annual salinity climatology
44%
45temp_month_data  = [woa_dir,'temp_month.cdf'];
46temp_ann_data    = [woa_dir,'temp_ann.cdf'];
47insitu2pot       = 1;   %1: transform in-situ temperature to potential temperature
48salt_month_data  = [woa_dir,'salt_month.cdf'];
49salt_ann_data    = [woa_dir,'salt_ann.cdf'];
50%
51%
52%%%%%%%%%%%%%%%%%%% END USERS DEFINED VARIABLES %%%%%%%%%%%%%%%%%%%%%%%
53%
54% Title
55%
56disp(' ')
57disp([' Making initial file: ',ininame])
58disp(' ')
59disp([' Title: ',title])
60%
61% Initial file
62%
63create_inifile(ininame,grdname,title,...
64               theta_s,theta_b,hc,N,...
65               tini,'clobber');
66%
67% Horizontal and vertical interp/extrapolations
68%
69disp(' ')
70disp(' Interpolations / extrapolations')
71disp(' ')
72disp(' Temperature...')
73ext_tracers_ini(ininame,grdname,temp_month_data,temp_ann_data,...
74            'temperature','temp','r',tini);
75disp(' ')
76disp(' Salinity...')
77ext_tracers_ini(ininame,grdname,salt_month_data,salt_ann_data,...
78             'salinity','salt','r',tini);
79%
80% Geostrophy
81%
82%  disp(' ')
83%  disp(' Compute geostrophic currents')
84%  geost_currents(ininame,grdname,oaname,frcname,zref,obc,0)
85%
86% Initial file
87%
88if (insitu2pot)
89  disp(' ')
90  disp(' Compute potential temperature from in-situ...')
91  getpot(ininame,grdname)
92end
93%
94% Make a few plots
95%
96disp(' ')
97disp(' Make a few plots...')
98test_clim(ininame,grdname,'temp',1,coastfileplot)
99figure
100test_clim(ininame,grdname,'salt',1,coastfileplot)
101%
102% End
103%
104%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracBrowser for help on using the repository browser.