Comments (11)
@Jiangchao3 The time_vector
needs to be a datetime vector, not a float vector like you have. The time_interval
is using the "seconds" function to convert datetime to a float inside. It seems to be doing some weird thing where it gives a duration if you provide a float. I guess you can make a catch so you don't have to provide a datetime vector, and assumes what you provide is in seconds.
from oceanmesh2d.
@WPringle Thanks, I will have a try and let you know the result.
from oceanmesh2d.
Hi @WPringle, I use a datetime vector for time_interval, it works well.
t1 = datetime(2017,9,6,1,0,0); t2 = datetime(2017,9,12,0,0,0); time_vector = t1:hours(1):t2;
But the offset time series in the generated offset.63 file still have been rounded:
the following is the original offset data:
I guess all the values less than 0.5 are rounded down to 0, while numbers greater than 0.5 are rounded up to 1.
Does this make sense?
I look through the source code in writeoffset63, i thinkt he source code do not have any problem,
for tt = 1: f63dat.num_times fprintf(fid,'%d \t %12.6f \n',[f63dat.offset_nodes; f63dat.offset_values(tt,:)]); fprintf(fid,'%s \n','##'); end
but why the generated file have such a digital error? a bit confused.
from oceanmesh2d.
@WPringle in additon, how to understand the concept of
dynamicWaterLevelCorrectionRampStart and dynamicWaterLevelCorrectionRampEnd?
if my bia correction period start from t1 = datetime(2017,9,6,1,0,0) and end at t2 = datetime(2017,9,12,0,0,0),
so should I set dynamicWaterLevelCorrectionRampStart as the time t1 relative from the coldstart time
and set dynamicWaterLevelCorrectionRampEnd as the time t2 relative from the coldstart time?
or just give it one or two days to spin up for the dynamic water level correction like tidal rampup?
I am not sure if I understand it correctly, although there is a example about it on https://wiki.adcirc.org/Dynamic_water_level_correction#Controlling_Water_Level_Correction
from oceanmesh2d.
@Jiangchao3 What do the values in msh.offset63 look like?
The ramp is like the tidal ramp, just give it like a couple of days spinup.
from oceanmesh2d.
Hi @WPringle , in msh.offset63, the values is as following:
from oceanmesh2d.
how does msh.offset63
(the struct) look?
from oceanmesh2d.
I am sorry i am not in the office right now, i can share the msh object tomorrow morning for inspecting more details.
but i think the msh.offset63 (struct) is just like the following, except the time_intervel has been updated using a datetime
from oceanmesh2d.
Hi @WPringle ๏ผHere is my msh object with offset63 and the original data for offset time series
the following is my code to deal with the offset.
%% Make dynamic water level offset file
% read into offset dataset
offset_values = readtable('/data/users/qiujch24/OceanMesh2D/florida/validation_irma/offset.csv')
offset_values = table2array(offset_values);
offset_values = offset_values(:, 2:3);
offset_values = single(offset_values);
station = m.f15.elvstaloc;
[offset_nodes,dst] = ourKNNsearch(m.p',station',1);
t1 = datetime(2017,9,6,1,0,0);
t2 = datetime(2017,9,12,0,0,0);
time_vector = t1:hours(1):t2;
m = Make_offset63(m,time_vector,offset_nodes,offset_values);
m.f15.controllist(2).var(1).val = 'fort.fortset.63';
m.f15.controllist(2).var(3).val = 1243600; % RampStart
m.f15.controllist(2).var(4).val = 2243600; % RampEnd
%%
really appreciate with you for help check it out
from oceanmesh2d.
@Jiangchao3 I found the problem, it is a bit esoteric. When the offset_nodes
are of type int
, it converts the offset_values
to type int
when they are combined during the writing process.
You can see the fix in #287
from oceanmesh2d.
clear,thanks very much @WPringle
from oceanmesh2d.
Related Issues (20)
- Mark to be removed triangles when using Fix_single_connec_edge_elements.m
- Additional package for converting .mat msh object into Telemac input files (slf and cli) HOT 4
- Thalweg data format HOT 1
- Error setup.sh link m_map HOT 1
- Get stuck in using Cal_IT_Fric. HOT 13
- extra lines in fort.15 file! HOT 7
- make animation for fort.63.nc HOT 10
- meshgen.build Exiting early HOT 2
- Infinite loop when cleanup the mesh HOT 6
- Need for rapid changes in grid resolution HOT 4
- Issues with refining mesh in channels HOT 2
- Problem making fort.15 file for ADCIRC model in OceanMesh2D HOT 2
- Problem creating fort.13 file for ADCIRC model in OceanMesh2D HOT 3
- startup.sh HOT 2
- Issue regarding input files of ADCIRC model HOT 2
- How to specify the wind control and wind timestep parameters in Make_f15 function of OceanMesh2D? HOT 1
- How to make the fort.22 file for ADCIRC model? HOT 2
- Re-meshing patches function
- How to make a fort.15 file for NWS = 30 Blended GAHM & Background Gridded Wind and Pressure?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oceanmesh2d.