Custom Query (986 matches)
Results (454 - 456 of 986)
Ticket
|
Owner
|
Reporter
|
Resolution
|
Summary
|
#563 |
arango
|
arango
|
Done
|
Updated and corrected several Matlab scripts
|
Description |
Several Matlab scripts where updated. The processing scripts roms2roms.m and obc_roms2roms.m have the incorrect calls to the nc_vinfo function. Many thanks to John Wilkin to remind me of these typos.
In addition several new scripts were introduced:
- coastline/get_coast.m: Extracts coastline data from the Global Self-consistent, Hierarchical, High-resolution Shoreline (GSHHS) database for the box corners bounded by (Llon,Blat) and (Rlon,Tlat).
- forcing/d_core2_frc.m: Driver template script showing how to create ROMS forcing NetCDF file(s) using ROMS metadata structure. The data source is the CORE 2 Global Air-Sea Flux Dataset. Notice that the original data set is sampled for the Gulf of Mexico (GOM).
- netcdf/check_metadata.m: Checks ROMS metadata structure for consistency and fills unassigned fields. This structure will be used elsewhere to create NetCDF files in a compact way.
- netcdf/nc_append.m: Defines/appends new variables to an existing NetCDF file. The variable(s) metadata is provided in input structure, which includes information about variable type, dimensions and attributes.
- roms_metadata.m: Sets metadata structure for requested ROMS NetCDF variable. The structure contains the same fields that are returned by nc_inq or native interface ncinfo. This can be used elsewhere to create a NetCDF file in a compact way.
- plot_field.m: Plots requested ROMS variable from input history NetCDF file. This function is very useful when debugging a ROMS application. The plotting is not that fancy but it provides enough information for browsing ROMS variables very quickly. The location of the minimum is marked with a filled magenta circle whereas the maximum is marked with a filled magenta square. It also draws the coastline, if the data is available in the grid file or structure.
Notice that the roms_metadata function builds a structure with similar information as in ROMS varinfo.dat. The strategy here is to create a structure that can be used with nc_create to generate ROMS input NetCDF files in a compact way. The driver template forcing/d_core2_frc.m provides an example of how the ROMS metadata structure is used to create several atmospheric forcing NetCDF files. It creates a single NetCDF file per forcing field. This is kind of nice since creating NetCDF file is too verbose and requirse hundreds of lines of coding. Here this is done in a very compact and generic way and with few lines. In addition, it provides the correct CF compliance.
I assume the the function roms_metadata will continue evolving in the future as we add more fields.
|
#564 |
arango
|
arango
|
Done
|
Continue working and updating the Matlab scripts.
|
Description |
Several scripts we updated to fix several compatibility issues with older versions of Matlab. I also expanded the functionality of several scripts.
I added two new directories: matlab/t_tide and matlab/tidal_ellipse to process tidal forcing for ROMS. The have been some issues with the versions of these routines when extracting data from OTPS.
I added new script matlab/forcing/write_tides.m to create and write extrated tides from OTPS. I continue working with this and I will release otps2roms.m in the future. The logic how this is done is difficult. I think that it will be much easier to use the NetCDF files availabe from OTPS.
|
#565 |
arango
|
arango
|
Done
|
IMPORTANT: Corrected and introduced new Matlab scripts
|
Description |
Changed the strategy to how to vertically interpolate in roms2roms.m and obc_roms2roms.m. It turns out that it is not a good idea to use the intrinsic function TriScatteredInterp for a full 3D interpolation in a terrain-following coordinates grid, like ROMS, because the triangulation may include shallower or deeper points in the interpolantion. Many thanks to John Wilkin for bringing this to my attention and helping to fix this problem.
The strategy now is to split the interpolation between horizontal and vertical. First, the horizontal interpolation is carried out at all the original levels of the Donor Grid data using TriScatteredInterp. Then, the vertical interpolation is carried out to the Receiver Grid using interp1. In order to facilitate a simple extrapolation when the Receiver Grid depths are outside the Donor Grid range, the shallowest and deepest levels of the Donor Grid data is duplicated to correspond to specified bogus depths: Zsur for shallowest and Zbot for deepest. To facilitate this type of interpolation in other scripts, two new generic functions are coded: interp_field.m and interp_boundary.m. Now, roms2roms.m and obs_roms2roms.m calls these generic interpolation functions.
Several new scripts are introduced:
- boundary/interp_boundary.m: Interpolates lateral boundary conditions for a ROMS generic 2D or 3D state variable from a Donor to Receiver. If 3D (vertical) interpolation, the Donor Grid data is interpolated first to the Receiver Grid horizontal locations using TriScatteredInterp at each of the Donor Grid vertical levels. Then, interp1 is used to interpolate to Receiver Grid vertical locations.
- boundary/plot_boundary.m: Plots requested ROMS variable from input lateral boundary NetCDF file. This function is very useful for browsing 3D lateral boundary conditions for ROMS in a vertical slab. The location of the minumum is marked with a filled magenta circle whereas the maximum is marked with a filled magenta square.
- forcing/otps2roms.m: Generates a ROMS tidal forcing from the OTPS dataset. The base_date is related to ROMS input parameter the TIDE_START. It is used in ROMS to compute the correct phase lag with respect initialization time. I still not happy how this is done and will revisit this function in the future to get the data directly without the awkward Fortran interface.
- initial/interp_field.m: interpolates a generic ROMS 2D or 3D field variable from a Donor to Receiver Grid. If 3D interpolation, the Donor Grid data is interpolated first to the Receiver Grid horizontal locations using TriScatteredInterp at each of the Donor Grid vertical levels. Then, interp1 is used to interpolate to Receiver Grid vertical locations.
- initial/d_oa2roms.m: User modifiable script showing how to create ROMS climatology NetCDF file(s). The data source are objective analyzed (OA) Annual and Monthly temperature and salinity fields from the Levitus (1998) dataset. These fields are generated using ROMS OA package.
- initial/oa_cat.m: Reads Annual and Monthly objective analysis (OA) files of the Levitus climatology and appends bottom Annual levels to Monthly OA fields. The Monthly Levitus Climatology is available from the surface to 1000m (1994 dataset) or 1500m (1998 dataset). The annual fields are used for the missing bottom levels.
- initial/oa2roms.m: Vertically interpolates requested OA variable to ROMS terrain-following vertical grid. The OA package generates qfields on a constant depth: standard depth levels.
- utility/roms_eos.m: Computes in situ density using ROMS nonlinear equation of state for seawater. It assumes no pressure variation along geopotential surfaces, that is, depth (meters; negative) and pressure (dbar; assumed negative here) are interchangeable.
|
Note:
See
TracQuery
for help on using queries.