Search found 15 matches

by mjfconan
Thu Jul 12, 2018 12:41 pm
Forum: ROMS Bugs
Topic: a little bug in nc_read.m
Replies: 0
Views: 889

a little bug in nc_read.m

bkresning found a bug in the Matlab script "nc_read.m", line 430. it should be case {netcdf.getConstant('nc_int'), ... netcdf.getConstant('nc_short'), ... netcdf.getConstant('nc_byte')} f = double(f).*scale+offset; the original post is in: https://www.myroms.org/forum/viewtopic.php?f=23&t=4677
by mjfconan
Thu Jul 12, 2018 12:23 pm
Forum: ROMS Tools and Techniques
Topic: D_ECMWF2ROMS Matlab scripts
Replies: 7
Views: 3261

Re: D_ECMWF2ROMS Matlab scripts

Undefined function or variable 'nc_int'. Error in nc_read>nc_read_matlab (line 430) case {nc_int, nc_short, nc_byte} Error in nc_read (line 95) f = nc_read_matlab(ncfile,Vname,Tindex,ReplaceValue,PreserveType,Info); Error in d_ecmwf2roms_na (line 476) field = nc_read(InpFile, Vecmwf, Rec); I think ...
by mjfconan
Thu Jul 05, 2018 6:15 am
Forum: ROMS Problems
Topic: problem when activate AVERAGES_DETIDE
Replies: 2
Views: 648

Re: problem when activate AVERAGES_DETIDE

Maybe you did not compile NetCDF with a suitable HDF library? Sometimes, it's tricky to compile NetCDF and HDF4/5 completely. Therefor, creating all nc files under format of "classic" or "64bit" which is "Original NetCDF format" could be an easier way to bypass re-compiling NetCDF and other librarie...
by mjfconan
Tue Apr 17, 2018 6:25 am
Forum: ROMS Bugs
Topic: maybe a little bug in check_multifile.F?
Replies: 4
Views: 1978

Re: maybe a little bug in check_multifile.F?

I have similar problem with dates in my Input climatology file. Did you maybe solve your problem or not yet? As mentioned in the post, it was the false attribute in a time variable (such as in the "river_time") that caused my problem. If ROMS does not find an attribute of "units", it will use "seco...
by mjfconan
Thu Jan 04, 2018 3:02 pm
Forum: ROMS Bugs
Topic: maybe a little bug in check_multifile.F?
Replies: 4
Views: 1978

maybe a little bug in check_multifile.F?

There may be a little bug in "check_multifile.F". When my river force file encountered a problem (owing to a missing "s" of "units" in attribute :? ), said: CHECK_MULTIFILE - Error while checking input Sources/Sinks Data file: ../input_const/ECS_N1_1_rvr.nc last data time record available is for day...
by mjfconan
Thu Jun 15, 2017 2:39 pm
Forum: ROMS Discussion
Topic: Delft3D grid to roms
Replies: 9
Views: 3568

Re: Delft3D grid to roms

I always use [lon_rho, lat_rho, ~, ~, ~] = wlgrid('read', 'd3d_all.grd'); to get the full grid without deleting any land point. And then [tmp_lon_mask, ~, ~, ~, ~] = wlgrid('read', 'd3d_water.grd'); mask_rho = ones(size(lon_rho)); mask_rho(tmp_lon_mask == 0 | isnan(tmp_lon_mask)) = 0; to create a ma...
by mjfconan
Thu Mar 02, 2017 8:03 am
Forum: ROMS Discussion
Topic: How to change Coriolis parameter?
Replies: 2
Views: 1153

Re: How to change Coriolis parameter?

In general, ROMS reads Coriolis factor "f" from the grid file. If using Matlab to create a grid file, you may find a function-"sw_f" provided by authority, which calculates it on every points. Or do you not offer your own grid but use an analytical one? function f = sw_f(lat) % SW_F Coriolis factor ...
by mjfconan
Fri Feb 24, 2017 3:55 pm
Forum: ROMS Problems
Topic: ecmwf2roms
Replies: 10
Views: 4977

Re: ecmwf2roms

Thanks for your correction!

In my opinion, if the added judgement works, the 1st record is the only bad one and should be discarded, is that right?
by mjfconan
Fri Feb 24, 2017 8:36 am
Forum: ROMS Problems
Topic: ecmwf2roms
Replies: 10
Views: 4977

Re: ecmwf2roms

if (F(n).scale < 0), step = rem(frc_time,0.5)*24; if step == 3 fieldfinal = field; elseif step == 0 fieldfinal = field - field_previous; % At other steps subtract end % the previous accumulation frc_time = frc_time - 1.5/24; % Center forcing time on the % accumulation interval field_previous = fiel...
by mjfconan
Thu Apr 07, 2016 8:18 am
Forum: ROMS Discussion
Topic: Installing ROMS on Mac El Captain
Replies: 7
Views: 3046

Re: Installing ROMS on Mac El Captain

0) before applying your own netcdf 4.3.3, maybe its "make check" should be passed through at first. 1) since a certain version, netcdf-fortran is splitted out, therefor the environment parameter "LIBS" should be set like this: "LIBS := -L$(NETCDF_LIBDIR) -lnetcdf -lnetcdff" instead of "LIBS := -L$(N...
by mjfconan
Thu Apr 07, 2016 5:18 am
Forum: ROMS Discussion
Topic: Installing ROMS on Mac El Captain
Replies: 7
Views: 3046

Re: Installing ROMS on Mac El Captain

There may be some bugs in netcdf when doing "make check", and a possible solution is "make" firstly, means "make; make check". As mentioned in the document of netcdf, it is complicated and without "check", there may hide some risks :twisted: (Generally, "install" will never check the capability but ...
by mjfconan
Wed Apr 06, 2016 11:21 am
Forum: ROMS Discussion
Topic: Installing ROMS on Mac El Captain
Replies: 7
Views: 3046

Re: Installing ROMS on Mac El Captain

Could you please post the output of command: "make install" or "make check", rather than "configure"?
by mjfconan
Sun Jan 31, 2016 5:01 am
Forum: ROMS Tools and Techniques
Topic: Error in ROMS BIOLOGY , plz Help me.
Replies: 2
Views: 2220

Re: Error in ROMS BIOLOGY , plz Help me.

There are many tips about Segmentation fault in FAQ https://www.myroms.org/wiki/Frequently_Asked_Questions#Segmentation_fault It's a copy: Segmentation fault There is more than one way to get a seg fault. Ways I know of include (a) running out of memory or some other system limit, (b) accessing an a...
by mjfconan
Thu Oct 29, 2015 1:01 pm
Forum: ROMS Bugs
Topic: Running problem
Replies: 5
Views: 3014

Re: Running problem

I met a similar problem. Maybe it can give you a small hint or nothing :o .
My fault was giving a wrong time unit in boundary file, says the 'units' attribute of "zeta_time". viewtopic.php?f=19&t=3450&hilit=time+unit
by mjfconan
Sun Sep 13, 2015 1:09 am
Forum: ROMS Bugs
Topic: Selection with regard to ECMWF ERA datasets
Replies: 4
Views: 3835

Re: Selection with regard to ECMWF ERA datasets

For example, if this is netCDF file including two days data, time array is 0 12 24 36 48 3 6 9 15 18 21 27 30 33 39 42 45. Thank you very much to hbzong. I was struggling from a while with internal times of ERA-interim netcdf's extracted from the data portal and now finally I have understood. For a...