爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 13278|回复: 8

介绍海洋模式ROMS的初始化与气候程序包(fortran及matlab)

[复制链接]

新浪微博达人勋

发表于 2013-6-1 19:52:15 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
本帖最后由 hillside 于 2013-6-1 20:57 编辑

一、http://www.myroms.org/index.php?page=initial
ROMS Initialization and Climatology Package

This document contains information about how to generate initial an climatology conditions for ROMS. The package described here can be used to generate the initialization and climatology NetCDF file. It also can be used to append fields to existing initial and climatology files; see processing switch JOB in input scripts. The source code can be obtained as tar file from ROMS web site.

Because of the terrain-following vertical coordinates of the model, this package only interpolates vertically the input data to the depths of each grid point. This allows fast generation of the initial/climatology files when vertical coordinates parameters are changed. The interpolation or mapping to model horizontal grid is performed elsewhere. Usually,objective analysis (OA) package is used to map data to the model horizontal curvilinear grid using statistical correlation functions. For example, if the Levitus or other climatology is used to generate initial or climatological conditions, the OA package can be used first to map data to the model horizontal grid at each available (flat) depth level. Then, this package can be used to perform the appropriate vertical interpolation.

Notice that it is easy to modify the vertical transformation of the model grid. The User just needs to provide the appropriate code in routine get_depths.F. Currently, this routine is configured for the S-coordinate transformation. See input switch ztype.

This package assumes that input data is in NetCDF format and it is currently constructed to read OA NetCDF files. TheUser can modify the names of input NetCDF variables easily in subroutine init_vars.F. See documentation for Vname. This package can be modified easily to read other input formats. The User just needs to write a routine with the same functionality as get_ncfields.F. Notice that the switch inpfrmt controls which input format type to use.

The initialization NetCDF file contains initial conditions for free-surface, 2D momentum, 3D momentum, and all tracer variables. Except for tracer variables, all the other fields are set to zero. This is the default when setting JOB=0 in the input script. Other values can be assigned to these variables in appending mode, JOB=3. The initialization file has only one time record in the unlimited NetCDF time dimension.

The climatology NetCDF file is created if JOB=1. It is similar to the initialization file, except that all the variables now have more than one time record in its associated time dimension. Notice that each variable have different time variable and dimension that can be of different size. This allows building of climatology data for different temporal intervals and scales. The climatology data can be used in the model for: interior grid nudging, nudging in sponge areas, open boundary conditions, and one-way nesting.

For consistency, all NetCDF variables names in both initial and climatology files have exactly the same name as the model output variables. This will allow model history or average NetCDF files to be used as the climatology file. The names of the NetCDF variables and units are shown in Table 1.

Table 1[td][tr][/tr]
Initialization
Climatology
Model Field
Variable
Time
Variable
Time
free-surface
zeta
ocean_time
zeta
zeta_time
2D U-momentum
ubar
ocean_time
ubar
v2d_time
2D V-momentum
vbar
ocean_time
vbar
v2d_time
3D U-momentum
u
ocean_time
u
v3d_time
3D V-momentum
v
ocean_time
v
v3d_time
potential temperature
temp
ocean_time
temp
temp_time
salinity
salt
ocean_time
salt
salt_time


The associate time variable default names are given in parenthesis. However, other names are allowed; provided that the field variable contains the time attribute specifying its associate time name. For example, a ncdump of a climatology file will give you:
  dimensions:        temp_time = 12 ;  variables:        double temp_time(temp_time) ;                temp_time:long_name = "time for potential temperature" ;                temp_time:units = "day" ;                temp_time:field = "temp_time, scalar, series" ;                temp_time:cycle_length = 360. ;         float temp(temp_time, s_rho, eta_rho, xi_rho) ;                temp:long_name = "potential temperature" ;                temp:units = "Celsius" ;                temp:field = "temperature, scalar, series" ;                temp:time = "temp_time" ;  data:  temp_time = 15, 45, 75, 105, 135, 165, 195, 225, 255, 285, 315, 345 ;  Notice that time variable temp_time associated with temperature has the attribute cycle_length with a value of 360.0 indicating to the model that data can be used in a 360 days perpetual cycle. This is an example for monthly climatology: every month is assumed to be 30 days long and there are 360 days in a year. Each monthly data is time centered at the 15th of each month. The model will interpolate between available records to get data at each timestep.

Execution
Several input scripts are provided as template to generate initial and climatology conditions NetCDF files:
      initial.in       Script to generate initial conditions file.                       Command:   initial < initial.in      initial_clm.in   Script to generate climatology file.                       It writes only NT tracer variables.                       Command:   initial < initial_clm.in      initial_zeta.in  Script to append free-surface (sea surface                       height) into an existing climatology file.                       Command:   initial < initial_zeta.in  Matlab Scripts
In addition to the Fortran code, two Matlab scripts are provided to generate initial and climatology NetCDF files:

c_initial.mCreates the NetCDF file. It also appends new variables to existing NetCDF file.

d_initial.mDriver prototype script. Users can modify this script according to his/her application.
In order to allow functionality and clarity, several structure arrays are used. See scripts for more details. These scripts use other generic Matlab scripts that can be found in tar file matlab.tar.


二、http://oces.us/RNT/
ROMS Numerical Toolbox for MATLAB
E. Di Lorenzo, Georgia Institute of Technology ( RNT@ocean3d.org )


From this page you can download a set of matlab toolboxes to work with Regional Ocean Modeling System related stuff. The RNT toolbox combines and uses also the work done by other people: Hernan Arango, Sasha Sheckeptkin, Rich Signel, Pierrick Penven, John Wilkin, Kate Hedstrom and others.
WARNING: these toolboxes where meant to help my own work and have not been written/documented well enough to be so user friendly. However I have attempted a general help on each routines. Keep in mind that it will take you some time and therefore you may not find them as useful. On the other hand they can do pretty sophisticated stuff and fast!
Please contact me if you need to use any of this and are a bit confused. - MANU

DOWNLOADS
1) Download complete set of Toolboxes (MANU_TOOLBOX.tar 237 MB). Create a directory and extract the content of the tarfile in it. You will find a startup.m file, customize to add the toolboxes contained in the tarfile that you extracted. Alternatively, if you have already downloaded this in the past you may want to take only the essntial toolboxes (MANU_RNT_ESSENTIAL.tar 53 MB). I am sorry these files are so big but I have not taken the care to clean stuff up.

2) Download matlab script file to build grid, initial condition, forcing and boundary condition files (MAIN.tar 50K). MAIN_grid.m willl guide you in the creation of a new grid. There also script to create the rest of the input files like MAIN_ncfiles_forc.m, MAIN_ncfiles_TS, etc.
3) Download DATA files to produce climatological input files for ROMS using Levitus and NCEP climatological means (DATA.tar 1.1 GB). Untar the file which will produce a directory called "data". Add this directory in the matlab path in your startup script by adding a statement "path(path,'whatever_path/data').
4) Download TPXO topography to use in grid generation (TPXO6.tar 1.1 GB). This is added as a matlab toolbox.  
5) How to compile the RNT Fotran code with MEX (mex_compile.txt ).


FAQ -
How to add a grid configuration to the RNT toolbox?


Edit the configuration file rnt_gridinfo.m. You can find the location of this file from the matlab prompt by typing rnt_config. Once you open the file add a section with the information of your grid, for example:


case 'scb20'
   gridindo.id = gridid;
   gridindo.name = 'Southern California Bigth 20 km';
   gridindo.grdfile = '/d6/edl/ROMS-pak/scb-data/scb20-grid.nc';
   gridindo.N = 20;
   gridindo.thetas = 5.0;
   gridindo.thetab = 0.2;
   gridindo.hc = 84.2521;
   gridindo.cstfile = '/d6/edl/ROMS-pak/matlib/rgrd/rgrd_CCS_CstLine.mat';

save the file and load the grid information by typing. NOTE that if you do not have a gridfile you can use a history file instead.


grd = rnt_gridload('scb20')


How to compute geostrophic flow using the TS on sigma coordinate?


If you know the free-surface (zeta), then you do not need a ref. level and you can compute the velocity using the pressure gradient routine:

[ugeo,vgeo,rv,ru]=rnt_prsV2(zeta,rho,rho0,z_r,z_w,Hz,f,grd)

do a help on rnt_prsV2.m for more info. The density rho can be computed using the TS with the ROMS equations of state:

rho=rnt_rho_eos(T,S,z_r);

and z_r can be computed

[z_r,z_w,Hz] = rnt_setdepth(zeta,grd);

If you do not know zeta First load the T and S from the model. Then set what reference level you want e.g ref='bottom' or ref='500' meters. At this point execute the following:
[ssh,ugeo,vgeo]=rnt_calcSSH(temp,salt,grd,'bottom');



三、ROM前处理与后处理工具箱-ROMSTOOLShttp://www.romsagrif.org/index.php/download


ROMS_AGRIF is based on the Regional Ocean Modeling System (ROMS) and has benefited from developments made by the ROMS community. If not done yet, we encourage you to also register at the official ROMS website.

ROMSTOOLS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ROMSTOOLS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA



注:本人并不熟悉具体内容,只是提供信息。




initial.tar.gz

46.61 KB, 下载次数: 23, 下载积分: 金钱 -5

评分

参与人数 1金钱 +6 贡献 -2 收起 理由
言深深 + 6 -2

查看全部评分

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-11-24 13:54:08 | 显示全部楼层
1111111111111111111
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-12-7 12:38:17 | 显示全部楼层
谢谢楼主分享!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-4-17 14:55:51 | 显示全部楼层
看着好牛逼的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-9-17 22:56:55 | 显示全部楼层
很好  谢谢楼主的分享
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-10-2 14:29:56 | 显示全部楼层
好好理解一下
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-10-20 21:35:52 | 显示全部楼层
楼主有中文版的吗,英文吃起来实在吃力
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-9-27 07:39:49 | 显示全部楼层
英文无力。。哭
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-4-13 08:46:44 | 显示全部楼层
{:5_213:}{:5_213:}
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表