Search found 756 matches

by wilkin
Tue Oct 04, 2022 4:49 pm
Forum: ROMS Problems
Topic: NaN occur in fisrt step
Replies: 6
Views: 143

Re: NaN occur in fisrt step

Your air pressure data are in Pascals ranging from 98,040 to 102,590. By default, ROMS expects Pair in millibars unless you have modified varinfo.dat to do the conversion via a scale factor of 0.01. It is likely you have crazy air pressures in your run. Quickly plotting your Pair data I find that ev...
by wilkin
Mon Oct 03, 2022 3:53 pm
Forum: ROMS Problems
Topic: ERROR: Abnormal termination: NetCDF OUTPUT
Replies: 6
Views: 240

Re: ERROR: Abnormal termination: NetCDF OUTPUT

Read the documentation.

The | joins files with the same variables that are broken into time segments.

You want \ which goes to the next file - here you have different variables in each file in a list. You have 7 files.
by wilkin
Mon Oct 03, 2022 1:37 pm
Forum: ROMS Problems
Topic: ERROR: Abnormal termination: NetCDF OUTPUT
Replies: 6
Views: 240

Re: ERROR: Abnormal termination: NetCDF OUTPUT

The "|" character is used to effectively concatenate files with sequential time records, e.g. one year at a time. When this is used it counts as only one file. You should use the "\" character to end one file and go to the next, with a different variable, in a list. What you have...
by wilkin
Thu Sep 22, 2022 2:30 pm
Forum: ROMS Discussion
Topic: Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
Replies: 6
Views: 738

Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)

Your file output.txt indicates that the ERA5 forcing data were read successfully. The next thing ROMS is doing when the error occurs is reading the open boundary conditions file, and the first variable it reads is zeta, so that's why you are getting an error about zeta_time. The log says your Input ...
by wilkin
Thu Sep 22, 2022 1:53 pm
Forum: ROMS Discussion
Topic: Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
Replies: 6
Views: 738

Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)

The netcdf files created by roms_write_era5_NCARds633_frcfile.m have a time coordinate variable called "time" (not zeta_time) and the "time" attribute of all variables will point ROMS to read "time" in preference the default in varinfo.dat. But, I can't imagine what met...
by wilkin
Wed Sep 21, 2022 4:00 pm
Forum: ROMS Tools and Techniques
Topic: no bitcount using roms_write_era5_NCARds633_frcfile.m
Replies: 12
Views: 194

Re: no bitcount using roms_write_era5_NCARds633_frcfile.m

I have updated the svn repository, but at some time in the medium term future we will shut that down and keep everything just in GitHub.
by wilkin
Wed Sep 21, 2022 2:59 pm
Forum: ROMS Tools and Techniques
Topic: no bitcount using roms_write_era5_NCARds633_frcfile.m
Replies: 12
Views: 194

Re: no bitcount using roms_write_era5_NCARds633_frcfile.m

You are correct that the svn version is out of date. I'll try to get that updated soon, but the latest version will always be at GitHub for the foreseeable future.
by wilkin
Wed Sep 21, 2022 2:21 pm
Forum: ROMS Tools and Techniques
Topic: no bitcount using roms_write_era5_NCARds633_frcfile.m
Replies: 12
Views: 194

Re: no bitcount using roms_write_era5_NCARds633_frcfile.m

Do you have a current version of this function from https://github.com/johnwilkin/roms_wilkin ? I updated it 4 months ago in response to a similar post from another user, and I just tested that ... >> E = roms_get_era5_NCARds633_bulkflux(2020,1,[99 140 0 26]) works just fine with the present version.
by wilkin
Mon Sep 19, 2022 11:24 am
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

Is the error repeatable?

It looks like a failure on the server side which might be a temporary problem at NCAR.
by wilkin
Wed Sep 07, 2022 11:21 am
Forum: ROMS Discussion
Topic: pan-Arctic grid
Replies: 4
Views: 333

Re: pan-Arctic grid

I've been making simple rectangular equi-spaced grids in Matlab using an arbitrary Lambert projection which you can center on any point and rotate. There is a post here: https://www.myroms.org/forum/viewtopic.php?p=23769#p23769. I have not tried, but I don't see any reason it would fail spanning the...
by wilkin
Fri Aug 19, 2022 2:29 pm
Forum: ROMS Tools and Techniques
Topic: roms_matlab plotting and analysis routines
Replies: 103
Views: 72614

Re: roms_matlab plotting and analysis routines

I thought I had expunged all the old calls to SNC tools functions, but missed this one.

The first line just needs to be:

Code: Select all

cpp = ncreadatt(file,'/','CPP_options');
I've updated the repo on GitHub.
by wilkin
Wed Aug 17, 2022 2:43 pm
Forum: Job Opportunities
Topic: Post-doc in Southern Ocean climate dynamics - Princeton and Arizona
Replies: 0
Views: 312

Post-doc in Southern Ocean climate dynamics - Princeton and Arizona

The University of Arizona, Princeton University, and NOAA’s Geophysical Fluid Dynamics Laboratory (GFDL) are seeking applicants for a position to analyze simulations of the Southern Ocean from GFDL’s CMIP6-generation ocean-only and coupled climate models using observational constraints. The position...
by wilkin
Wed Aug 10, 2022 3:58 pm
Forum: ROMS Discussion
Topic: Particle floats in ROMS?
Replies: 4
Views: 332

Re: Particle floats in ROMS?

Where did you get your source code? My up-to-date checkout from myroms.org has flt_test.h at revision 1099, and the #define FLOATS is definitely there. /* ** svn $Id: flt_test.h 1099 2022-01-06 21:01:01Z arango $ ******************************************************************************* ** Copy...
by wilkin
Wed Aug 10, 2022 11:28 am
Forum: ROMS Discussion
Topic: Particle floats in ROMS?
Replies: 4
Views: 332

Re: Particle floats in ROMS?

#define FLOATS

then ROMS reads the "floats.in" file name set by option FPOSNAME in roms.in. There is an example floats.in file in External that is documented further on WikiROMS here
https://www.myroms.org/wiki/floats.in
by wilkin
Tue Aug 09, 2022 10:52 am
Forum: ROMS Discussion
Topic: the middle layer velocity blows up
Replies: 1
Views: 206

Re: the middle layer velocity blows up

You chose 4-th order centered advection for tracers. Is that what you used previously with the stable model?

Your barotropic Courant number is 0.6 which is getting a bit large, though still stable. You might need to increase NDTFAST.
by wilkin
Mon Aug 01, 2022 2:32 pm
Forum: ROMS Tools and Techniques
Topic: How to extract all sea surface height data along the lon, lat path
Replies: 3
Views: 385

Re: How to extract all sea surface height data along the lon, lat path

Just code it yourself using the scatteredInterpolant class: % some ROMS output f = 'http://tds.marine.rutgers.edu/thredds/dodsC/roms/doppio/2017_da/his/History_Best'; % get some zeta output t0 = 1000; tcount = 100; zeta = ncread(f,'zeta',[1 1 t0],[Inf Inf tcount]); % get the lon/lat coordinates lon ...
by wilkin
Mon Aug 01, 2022 11:17 am
Forum: ROMS Usage
Topic: An error occurred when running ROMS in COAWST
Replies: 10
Views: 613

Re: An error occurred when running ROMS in COAWST

I notice you have salinities in the initial conditions (and boundary conditions) of minus 11 NLM: GET_STATE - Reading state initial conditions, 2005-08-27 00:00:00.00 (Grid 01, t = 53609.0000, File: Katrina_ini.nc, Rec=0001, Index=1) ... - salinity (Min = -1.15371107E+01 Max = 3.68318607E+01) That i...
by wilkin
Sat Jul 30, 2022 7:44 pm
Forum: ROMS Discussion
Topic: Meet a problem while using contact.m
Replies: 1
Views: 205

Re: Meet a problem while using contact.m

I get that error recomputing the contacts points file for my DOPPIO and PIONEER application. I had previously computed the file some time ago with an earlier version of contact.m.

So, yes, it looks like a bug has crept in.
by wilkin
Wed Jul 06, 2022 2:22 pm
Forum: ROMS Tools and Techniques
Topic: obc_roms2roms.m
Replies: 1
Views: 239

Re: obc_roms2roms.m

I don't get that error. At that place in the code u_west and v_west are the same dimension because they have been interpolated to the receiver rho points (for rotation). On exit from obc_roms2roms they have been placed on their respective grids so have different dimensions. But, my code has a few ha...
by wilkin
Tue Jul 05, 2022 2:17 pm
Forum: ROMS Discussion
Topic: How to improve modelled salinity and salinity initial condition
Replies: 14
Views: 1124

Re: How to improve modelled salinity and salinity initial condition

As you have discovered, when whole chunks of code are not active (such as 4dvar in your example) the relevant subroutines simply have MODULE ... END MODULE and no executable code. We do this because otherwise the BUILD script would have to have logic that modified the list of routines to be compiled...
by wilkin
Mon Jul 04, 2022 12:23 pm
Forum: ROMS Discussion
Topic: How to improve modelled salinity and salinity initial condition
Replies: 14
Views: 1124

Re: How to improve modelled salinity and salinity initial condition

The question here is why ROMS is looking for 'swflux' at all when you have ANA_STFLUX, which should set the surface salinity/freshwater flux in ana_flux.h. You might have some conflicting or contradicting CPP defs. Rather than look at the .F code as you were, go into the build directory and look at ...
by wilkin
Fri Jul 01, 2022 4:57 pm
Forum: ROMS Discussion
Topic: I want to use HYCOM GLB v0.08 as the initial / boundary data of ROMS.
Replies: 16
Views: 1171

Re: I want to use HYCOM GLB v0.08 as the initial / boundary data of ROMS.

You would do better to use seapy https://github.com/powellb/seapy From the README: Find out how to download global HYCOM data that will span my grid from 1/1/2015 through 5/1/2015: >> seapy.model.hycom.load_history("hycom_file.nc", start_time=datetime(2015,1,1), end_time=datetime(2015,5,1)...
by wilkin
Tue Jun 28, 2022 11:26 am
Forum: ROMS Discussion
Topic: I want to use HYCOM GLB v0.08 as the initial / boundary data of ROMS.
Replies: 16
Views: 1171

Re: I want to use HYCOM GLB v0.08 as the initial / boundary data of ROMS.

The Matlab tools at https://github.com/NakamuraTakashi/matlab appear to be a clone (that is not up to date) of the myroms.org repo documented here https://www.myroms.org/wiki/Matlab_Scripts.
by wilkin
Wed Jun 22, 2022 3:01 pm
Forum: ROMS Discussion
Topic: too high bottom temperature result in estuary
Replies: 6
Views: 533

Re: too high bottom temperature result in estuary

If you now have too-warm conditions at the surface where water is clearer (because heating is too surface intensified with wtype=5), then you can try a regionally varying water type. See https://www.myroms.org/projects/src/ticket/609. This must be static - not time varying. Other users have had some...
by wilkin
Thu Jun 16, 2022 2:44 pm
Forum: ROMS Installation
Topic: understanding of solar_source, diurnal_srflx,atm_press etc.
Replies: 2
Views: 1826

Re: understanding of solar_source, diurnal_srflx,atm_press etc.

#define BULK_FLUXES uses the COARE3.0 algorithm of Fairall et al. (references are in the code bulk_flux.F) to compute air-sea heat and momentum flux (stress) on the basis of input marine atmospheric boundary layer conditions (air temp, wind etc.) #define LONGWAVE_OUT computes the outgoing longwave r...
by wilkin
Wed Jun 15, 2022 12:36 am
Forum: ROMS Discussion
Topic: How to improve modelled salinity and salinity initial condition
Replies: 14
Views: 1124

Re: How to improve modelled salinity and salinity initial condition

Gaoyang, First, let me say thank you for such an informative and interesting post. You show detailed plots of model and data, succinctly describe your model set-up, and ask directed questions so that we might offer an informed response. Other ROMS Forum readers take note! That said, I have few concr...
by wilkin
Mon Jun 13, 2022 10:34 pm
Forum: ROMS Discussion
Topic: Matlab code(wikin code) for forcing
Replies: 7
Views: 471

Re: Matlab code(wikin code) for forcing

Or use NCO tools ncrcat to merge the monthly files into fewer files. Also, perhaps it's not obvious in the script documentation but my intention with % Output file name prefix. If not set, name is MY_APPLICATION if ~exist('ROMS_APP','var') ROMS_APP = 'MY_APPLICATION'; end is that the user chooses a ...
by wilkin
Mon Jun 13, 2022 3:58 pm
Forum: ROMS Discussion
Topic: too high bottom temperature result in estuary
Replies: 6
Views: 533

Re: too high bottom temperature result in estuary

Tmax is time. The max value 26.6 is OK. Consider your jerlov water type WTYPE. If it's 1 (clear ocean water) then in a shallow estuary a lot of sunlight reaches the seafloor and is trapped there because the bottom is effectively insulated. Use type 3 or 4 and absorption is more rapid keeping heating...
by wilkin
Thu Jun 09, 2022 11:50 am
Forum: ROMS Discussion
Topic: Matlab code(wikin code) for forcing
Replies: 7
Views: 471

Re: Matlab code(wikin code) for forcing

Yes, you have to request a bounding box that is larger than your domain by at least the 0.25 deg resolution of ERA5. Make it 1 or 2 deg more ... there is no reason not to.
by wilkin
Wed Jun 08, 2022 2:58 pm
Forum: ROMS Problems
Topic: GET_2DFLD_NF90 - error while reading variable: Uwind at TIME index = 56
Replies: 4
Views: 358

Re: GET_2DFLD_NF90 - error while reading variable: Uwind at TIME index = 56

Also check your rivers options. The log says ... Rivers_NorthSea8_smooth013_Dai2014_AnnualCycle_1993-2019.nc LuvSrc = F u-face = 63 LuvSrc = F v-face = 0 LwSrc = F w-face = 0 You have FALSE for all, which I expect renders the rivers inactive. There were recent enhancements to the LuvSrc/LwSrc option...
by wilkin
Wed Jun 08, 2022 2:47 pm
Forum: ROMS Problems
Topic: GET_2DFLD_NF90 - error while reading variable: Uwind at TIME index = 56
Replies: 4
Views: 358

Re: GET_2DFLD_NF90 - error while reading variable: Uwind at TIME index = 56

The error says ROMS is failing while attempting to regrid the Uwind data to the model grid: Statement of problem in log: REGRID - input gridded data does not contain model grid: Gridded: LonMin = -24.0000 LonMax = 14.0000 LatMin = 32.0000 LatMax = 66.0000 Model: LonMin = 0.0000 LonMax = 0.0000 LatMi...
by wilkin
Wed Jun 08, 2022 2:28 pm
Forum: ROMS Discussion
Topic: Matlab code(wikin code) for forcing
Replies: 7
Views: 471

Re: Matlab code(wikin code) for forcing

That was an easy to solve bug. It's fixed now and updated in GitHub.
by wilkin
Sat Jun 04, 2022 12:06 pm
Forum: ROMS Problems
Topic: Averaging in time or space (best practices)
Replies: 1
Views: 250

Re: Averaging in time or space (best practices)

In the water depths you are looking at > 250 m the vast majority of in situ ocean observations would not be referenced to a fixed vertical datum but instead as a depth below the sea surface with no regard for the changing sea surface height because depth was obtained from a pressure sensor. Most oce...
by wilkin
Fri Jun 03, 2022 2:47 pm
Forum: Job Opportunities
Topic: Coastal Modeler, NOAA NOS, Silver Spring MD
Replies: 0
Views: 425

Coastal Modeler, NOAA NOS, Silver Spring MD

There is an opening for a Coastal Modeler to support National Oceanic and Atmospheric Administration (NOAA), Center for Operational Oceanographic Products and Services (CO-OPS) in Silver Spring, MD. Key Responsibilities: Assist CO-OPS with the transition and implementation of new hydrodynamic coasta...
by wilkin
Thu Jun 02, 2022 2:14 pm
Forum: ROMS Usage
Topic: facing Error:ROMS/TOMS - Blows up ......... exit_flag: 1
Replies: 13
Views: 7063

Re: facing Error:ROMS/TOMS - Blows up ......... exit_flag: 1

You still have negative DZmin, so you have negative bottom depth h somewhere - probably in the land but that can still cause problems. Make h > 0 in the land. You also have: GET_NGFLD - river runoff mass transport vertical profile (Grid = 01, Min = 0.00000000E+00 Max = 2.00000000E-01) ... GET_NGFLD ...
by wilkin
Wed Jun 01, 2022 1:22 pm
Forum: ROMS Discussion
Topic: How to calculate turbulent shear rate / energy dissipation
Replies: 3
Views: 331

Re: How to calculate turbulent shear rate / energy dissipation

Phil, The GLS k-kl closure is effectively Mellor-Yamada 2.5. Here is my Python code for calculating dissipation and turbulence length scale from the output, reading the GLS p,m,n parameters from the netcdf file (so this is generic for any chosen closure). ds is a DataArray opened with xarray (I was ...
by wilkin
Tue May 31, 2022 4:27 pm
Forum: ROMS Usage
Topic: facing Error:ROMS/TOMS - Blows up ......... exit_flag: 1
Replies: 13
Views: 7063

Re: facing Error:ROMS/TOMS - Blows up ......... exit_flag: 1

Looks like your initial conditions have a NaN in them. STEP Day HH:MM:SS KINETIC_ENRG POTEN_ENRG TOTAL_ENRG NET_VOLUME C => (i,j,k) Cu Cv Cw Max Speed 0 9135 12:00:00 NaN NaN NaN 0.000000E+00 You have negative DZ in the land Minimum Z-grid spacing, DZmin = -1.31577343E+04 m Water points = 6.68401986...
by wilkin
Thu May 26, 2022 3:56 pm
Forum: ROMS Results
Topic: Specific humidity performs worse than the relative
Replies: 3
Views: 404

Re: Specific humidity performs worse than the relative

Notice that ROMS bulk_flux.F has this code.... ! ! Compute specific humidity, Q (kg/kg). ! IF (RH.lt.2.0_r8) THEN !RH fraction cff=cff*RH !Vapor pres (mb) Q(i)=0.62197_r8*(cff/(PairM-0.378_r8*cff)) !Spec hum (kg/kg) ELSE !RH input was actually specific humidity in g/kg Q(i)=RH/1000.0_r8 !Spec Hum (k...
by wilkin
Thu May 26, 2022 2:14 pm
Forum: ROMS Results
Topic: Specific humidity performs worse than the relative
Replies: 3
Views: 404

Re: Specific humidity performs worse than the relative

When I make forcing files for ROMS from ERA5 (in my roms_wilkin tools function roms_write_era5_NCARds633_frcfile.m) I compute relative humidity from 2-m air temperature and specific humidity. % Compute relative humidity using Clausius-Clapeyron equation tsur = t2; % 2m temperature from ERA5 tdew = d...
by wilkin
Fri May 20, 2022 11:37 am
Forum: ROMS Discussion
Topic: Blow up in Second step
Replies: 12
Views: 884

Re: Blow up in Second step

196 2020-05-01 00:32:40.00 3.869347E-01 1.555930E+04 1.555969E+04 8.325429E+15 (225,061,23) 3.047532E-04 2.696655E-04 5.290505E-01 1.944507E+01 197 2020-05-01 00:32:50.00 3.923971E-01 1.555928E+04 1.555967E+04 8.325429E+15 (225,061,23) 3.276896E-04 2.693862E-04 5.415630E-01 1.996086E+01 198 2020-05...
by wilkin
Tue May 17, 2022 1:43 pm
Forum: ROMS Discussion
Topic: Average file problem
Replies: 1
Views: 251

Re: Average file problem

Your average is from 1 January to 30 January, so the date written to the output file to be associated with the average is the average time, 15 January. Makes sense. If you look at the log closely you will see that WRT_AVG executes on January 30, as it must because not until then can it have accumula...
by wilkin
Fri May 13, 2022 7:52 pm
Forum: ROMS Discussion
Topic: Blow up in Second step
Replies: 12
Views: 884

Re: Blow up in Second step

Now you have deactivated all horizontal mixing. You have neither #define TS_DIF2 not #define TS_DIF4, which is why no horizontal mixing coefficient values nl_tnu2 are reported to the log. #define MIX_GEO_TS You do have some horizontal viscosity (#define MIX_GEO_UV) but the viscosity coefficient is z...
by wilkin
Fri May 13, 2022 1:56 pm
Forum: ROMS Discussion
Topic: Blow up in Second step
Replies: 12
Views: 884

Re: Blow up in Second step

I see a number of things in your logfiles that are a bit unconventional and you might consider adjusting. Both runs have both these defined: UV_VIS2 Harmonic mixing of momentum UV_VIS4 Biharmonic mixing of momentum I recommend you start with only #undef UV_VIS4 until to show you need it. Especially ...
by wilkin
Mon May 09, 2022 9:22 pm
Forum: ROMS Tools and Techniques
Topic: roms_matlab plotting and analysis routines
Replies: 103
Views: 72614

Re: roms_matlab plotting and analysis routines

Looks to me like you have the wrong ncread . You are not getting the ncread that is the native Matlab netcdf interface. In Matlab try ... >> which ncread -all You should see something like ... >> which ncread -all /Applications/MATLAB_R2020b.app/toolbox/matlab/imagesci/ncread.m >> If you see some ot...
by wilkin
Sun May 08, 2022 12:49 pm
Forum: ROMS Tools and Techniques
Topic: roms_matlab plotting and analysis routines
Replies: 103
Views: 72614

Re: roms_matlab plotting and analysis routines

That nothing has changed at http://romsmatlab.tiddlyspot.com/ since 2010 is your clue that maybe that's not up to date. I'm struggling to remember how to update that web site with new info, but here it is... My codes, much updated since 2010, are now on GitHub at https://github.com/johnwilkin/roms_w...
by wilkin
Sat May 07, 2022 7:42 pm
Forum: ROMS Ice
Topic: Build Lambert Grid
Replies: 4
Views: 635

Re: Build Lambert Grid

I misspoke in my message. I previously used the contributed m_map mapping toolbox to do this, but the code I posted uses Matlab's own Mapping toolbox ... the mstruct = defaultm('lambertstd'); etc steps. It's just very simple code to make a simple grid. In this example we created the bathymetry and l...
by wilkin
Fri May 06, 2022 9:46 pm
Forum: ROMS Ice
Topic: Build Lambert Grid
Replies: 4
Views: 635

Re: Build Lambert Grid

I have been making simple rectangular Lambert grids, optionally rotated, using simple Matlab code and the m_map toolbox and some utilities from the myroms Matlab toolset to compute the grid metrics. mstruct = defaultm('lambertstd'); mstruct.mapparallels = 71.42; mstruct.origin = [71.42 -52.6]; mstru...
by wilkin
Thu May 05, 2022 2:15 pm
Forum: ROMS Discussion
Topic: River runoff problem
Replies: 9
Views: 630

Re: River runoff problem

Here s_rho is just an index for the vertical dimension. You say you have 40 vertical layers, i.e. you have N = 40 in ROMS. If you are working in Python then the index is from 0 to 39, if you are in Matlab the index is from 1 to 40. That plot is an oddly varying profile for river_Vshape. You do under...
by wilkin
Thu May 05, 2022 1:56 pm
Forum: ROMS Discussion
Topic: River runoff problem
Replies: 9
Views: 630

Re: River runoff problem

river_Vshape has the properties ... double river_Vshape(s_rho, river) ; river_Vshape:long_name = "river runoff mass transport vertical profile" ; river_Vshape:requires = "must sum to 1 over the s_rho coordinate" ; so in your case dimension s_rho = 40. But whether you count from 0...
by wilkin
Thu Apr 28, 2022 11:03 am
Forum: ROMS Discussion
Topic: River runoff problem
Replies: 9
Views: 630

Re: River runoff problem

The function roms_plot_river_source_locations.m in my roms_wilkin tools https://github.com/johnwilkin/roms_wilkin will plot the sources in Matlab with symbols to indicate the flow direction.
by wilkin
Thu Apr 14, 2022 4:56 pm
Forum: ROMS Discussion
Topic: "gls" in the output file, and calculation of TKE dissipation
Replies: 7
Views: 575

Re: "gls" in the output file, and calculation of TKE dissipation

Variable "gls" takes on different meanings, and units, depending on whether the parameters set in roms.in are for k-kl, k-epsilon, k-omega or "GLS". Since roms.in is processed at run time, not compile time, the logic becomes rather tortured for setting the output netcdf long_name...
by wilkin
Thu Apr 14, 2022 4:41 pm
Forum: Job Opportunities
Topic: Physical Scientist Ocean Modeling @ NOAA College Park, MD
Replies: 0
Views: 473

Physical Scientist Ocean Modeling @ NOAA College Park, MD

https://www.usajobs.gov/job/648447500 Duties: The working title for this position is Physical Scientist (Development). As a Physical Scientist (Development), you will perform the following duties: Independently conduct numerical model and data assimilation development for prediction techniques (such...
by wilkin
Tue Mar 08, 2022 12:31 pm
Forum: ROMS Discussion
Topic: SIGSEGV, segmentation fault occurred (with Empty log file)
Replies: 6
Views: 595

Re: SIGSEGV, segmentation fault occurred (with Empty log file)

Your shallow2d.h file has almost nothing in it. I'm not sure what you're going to get for default options on so many aspects of the code. Your roms_shallow.in is based of the upwelling example. Did you manage to run the upwelling test case successfully? If so, build from that by changing the options...
by wilkin
Sun Mar 06, 2022 1:34 pm
Forum: ROMS Discussion
Topic: forrtl: severe (174): SIGSEGV, segmentation fault occurred
Replies: 8
Views: 777

Re: forrtl: severe (174): SIGSEGV, segmentation fault occurred

... I annotated these two lines because there is no frc file when using ROMS You don't have any ANA_* functionals defined for forcing (wind stress, heat flux etc.), so ROMS is trying to read those from a forcing netcdf file. Even if you want zero forcing, you need to set how that is implemented. Th...
by wilkin
Sat Mar 05, 2022 1:07 pm
Forum: ROMS Discussion
Topic: forrtl: severe (174): SIGSEGV, segmentation fault occurred
Replies: 8
Views: 777

Re: forrtl: severe (174): SIGSEGV, segmentation fault occurred

The error occurs in get_data, so there is something wrong with one of your netcdf forcing files.
oceanG 00000000014F36CD get_data_ 101 get_data.f90
Look in get_data.f90 at what ROMS is reading at when the error occurs, and fix that file.
by wilkin
Fri Mar 04, 2022 3:47 pm
Forum: ROMS Discussion
Topic: ERA5_wind_problem
Replies: 9
Views: 1345

Re: ERA5_wind_problem

The boundary condition options are described here: https://www.myroms.org/wiki/Boundary_Conditions Only the Clamped and Flather conditions use boundary zeta. Only the Flather condition uses boundary ubar/vbar. If you choose to continue this discussion, please start another thread. This topic has not...
by wilkin
Sun Feb 27, 2022 2:16 pm
Forum: ROMS Discussion
Topic: shallow water blow up due to large wind speed or too much cooling?
Replies: 3
Views: 466

Re: shallow water blow up due to large wind speed or too much cooling?

Upon blow-up a third record should have been written to the Restart file. So you should examine that closely. The log is telling you the i,j,k point where maximum speed is occurring so look in that general area. ( 307,125,03 ) 6.701547E-03 8.329611E-03 2.118809E+00 1.411828E+00 133918 2003-01-24 05:...
by wilkin
Tue Feb 15, 2022 9:07 pm
Forum: ROMS Discussion
Topic: Bizarre blow-up issue, seemingly due to tracers
Replies: 6
Views: 732

Re: Bizarre blow-up issue, seemingly due to tracers

I recommend that at all points in permanent land mask the depth be given a modest positive value so that they play nicely with adjacent wet point at the coast. Within ROMS internal calculations you don't ever want NaNs anywhere. Is it possible that after some time wetting/drying dipped into a region...
by wilkin
Tue Feb 15, 2022 4:31 pm
Forum: ROMS Discussion
Topic: Bizarre blow-up issue, seemingly due to tracers
Replies: 6
Views: 732

Re: Bizarre blow-up issue, seemingly due to tracers

You should look for NaNs irrespective of the masks because ROMS computes on all points, and then applies the mask. A NaN could have arisen in the land prior to masking. You don't have any explicit horizontal viscosity activated (UV_VIS2 is undefined) yet you have VISC_3DCOEFF, so I suspect those vis...
by wilkin
Sat Feb 12, 2022 8:33 pm
Forum: ROMS Discussion
Topic: ERA5_wind_problem
Replies: 9
Views: 1345

Re: ERA5_wind_problem

You have Rad + Nud boundary conditions for u,v but your logfile indicates the nuding time scale is zero. So you have only radiation, but that's probably OK. Boundary velocities will be controlled more by 2D Flather. I would just use Rad for u,v anyway. But if boundaries are open for u,v I don't thin...
by wilkin
Mon Feb 07, 2022 6:25 pm
Forum: ROMS Discussion
Topic: ERA5_wind_problem
Replies: 9
Views: 1345

Re: ERA5_wind_problem

User Bilge Tutak may be correct. Your temp and salt open boundary data are both zero for all times, which is something you need to fix. GET_NGFLD_NF90 - temperature eastern boundary condition, 2013-01-01 00:18:00.00 (Grid= 01, Rec=4, Index=1, File: persian_bry.nc) (Tmin= 0.0000 Tmax= 36.5958) t = 0....
by wilkin
Tue Jan 18, 2022 8:59 pm
Forum: ROMS Discussion
Topic: Error in c_initial matlab script
Replies: 7
Views: 645

Re: Error in c_initial matlab script

It's explained in mexnc.m. function [varargout] = mexnc ( varargin ) % MEXNC is a gateway to the netCDF interface. To use this function, you % should be familiar with the information about netCDF contained in the % "User's Guide for netCDF". This documentation may be obtained from % Unidat...
by wilkin
Tue Jan 18, 2022 4:10 pm
Forum: ROMS Ecosystem
Topic: Light attenuation in Fasham
Replies: 4
Views: 4126

Re: Light attenuation in Fasham

You are correct. The units of AttChl are m^2 / mg_Chl. This is because they are inverse meters per chlorophyll concentration. At line 711 in fennel.h where AttChl is multiplied by the chlorophyll concentration (mg_Chl / m^3) it has to give units of inverse length ... to match units of AttSW ... and ...
by wilkin
Tue Jan 18, 2022 3:59 pm
Forum: ROMS Discussion
Topic: Error in c_initial matlab script
Replies: 7
Views: 645

Re: Error in c_initial matlab script

I just tried that exact code you posted and it works fine for me ... >> INIname = 'shallow2d-init-v2.nc'; OA_INTERPOLATE = 1; S.ncname = INIname; S.spherical = 0; S.Lm = 128; S.Mm = 128; S.N = 20; S.NT = 2; S.Vtransform = 2; S.Vstretching = 2; S.theta_s = 7.0; S.theta_b = 0.1; S.Tcline = 200.0; S.hc...
by wilkin
Wed Jan 05, 2022 9:18 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

I have updated my routines roms_get_era5_NCARds633_bulkflux.m and roms_write_era5_NCARds633_frcfile.m at https://github.com/johnwilkin/roms_wilkin Relative humidity is now computed using the formula documented by WMO-No.8 report (2018). In my test comparison the values differed at most by a factor o...
by wilkin
Wed Jan 05, 2022 8:01 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

I would look at the documentation at NCAR for this specific version of the dataset, not other versions hosted by Copernicus. NCAR provide some variables as mean fluxes per unit time and some as instantaneous time analysis. The structure E in my code shows which variables are loaded from the meanflux...
by wilkin
Wed Jan 05, 2022 3:40 pm
Forum: ROMS Problems
Topic: Question about tracer routine
Replies: 4
Views: 762

Re: Question about tracer routine

It is my understanding that the conversion of t(nnew) back to tracer units,before switching nnew and nstp, occurs in step3d_t.F, but as John Warner points out this depends on the advection scheme (MPDATA is different) and the status of SPLINES _VDIFF. See line 1190 in step3d_t.F: # ifdef SPLINES_VDI...
by wilkin
Fri Dec 31, 2021 4:01 pm
Forum: ROMS Discussion
Topic: Adding a river runoff in simulation
Replies: 2
Views: 556

Re: Adding a river runoff in simulation

Is it possible you have placed your source in the land? In the wiki notes ... When using option LuvSrc = T, river_Xposition and river_Eposition refer to the i,j index of the u-face or v-face the flow crosses - NOT the i,j index of the rho cell it flows into. The i,j values must follow ROMS Fortran n...
by wilkin
Mon Dec 20, 2021 5:51 pm
Forum: ROMS Discussion
Topic: Variables for Masked Grid Cells
Replies: 5
Views: 600

Re: Variables for Masked Grid Cells

Here for example is what NOAA NOS did to pad out cells in the land for their Chesapeake Bay CBOFS grid, which was computed with Delft tools. This shows "dy" grid spacing (1/pn) plotted in the grid i,j coordinates, because the filled bogus lon/lats in the land mess up my plotting routines (...
by wilkin
Mon Dec 20, 2021 5:04 pm
Forum: ROMS Discussion
Topic: Variables for Masked Grid Cells
Replies: 5
Views: 600

Re: Variables for Masked Grid Cells

The min/max grid spacings reported in the log ... e.g. Metrics information for Grid 01: =============================== Minimum X-grid spacing, DXmin = 2.14507269E-01 km Water points = 2.30213420E-01 km Maximum X-grid spacing, DXmax = 2.20401588E+00 km Water points = 1.53947491E+00 km are calculated...
by wilkin
Mon Dec 20, 2021 12:39 pm
Forum: ROMS Discussion
Topic: Variables for Masked Grid Cells
Replies: 5
Views: 600

Re: Variables for Masked Grid Cells

Yes, that's a problem. ROMS computes on all cells and then applies the masks. So, NaN values just inside the coastline can propagate into the interior. Zero values of, say, depth (but also other grid metrics) can cause divide-by-zero. Just fill the land with modest finite values and the masks should...
by wilkin
Sat Dec 18, 2021 1:36 pm
Forum: ROMS Discussion
Topic: Introducing Eulerian tracer during a simulation - flushing time
Replies: 18
Views: 2579

Re: Introducing Eulerian tracer during a simulation - flushing time

Tracer_NudgCoef is an inverse time scale. So it will interact with DT and your concentration of 100 to approach 100 in discrete steps. The ideal solution will approach 100 as a negative exponential. You can probably quickly calculate numerically what those discrete steps would be under the assumptio...
by wilkin
Sat Dec 11, 2021 9:39 pm
Forum: ROMS Discussion
Topic: blow up when nudging SST and SSS
Replies: 10
Views: 1879

Re: blow up when nudging SST and SSS

These error messages are quite helpful if you read them closely: Screen Shot 2021-12-11 at 4.32.34 PM.png If you inspect line 512 of set_data.F (last line of the code chunk below) you'll see it is the error condition triggered by a call to set_2dfld_tile to get surface salinity, which is code outsid...
by wilkin
Fri Dec 10, 2021 5:37 pm
Forum: ROMS Discussion
Topic: blow up when nudging SST and SSS
Replies: 10
Views: 1879

Re: blow up when nudging SST and SSS

The error says Tmin and Tmax are both zero. So, you have not associated the correct time coordinate variable with the SSS variable in the netcdf file. This is done by the "time" attribute for variable SSS, or if that is absent, it uses the entry for SSS in varinfo.dat.
by wilkin
Fri Dec 10, 2021 12:37 pm
Forum: ROMS Discussion
Topic: blow up when nudging SST and SSS
Replies: 10
Views: 1879

Re: blow up when nudging SST and SSS

Looks like your initial time is -389 days, which is not between 0 and 360.

It would probably make your time arithmetic easier to use DSTART = 0, and make the times in the forcing file [0, 180]. Make sure you spelled cycle_length correctly.
by wilkin
Thu Dec 02, 2021 5:20 pm
Forum: ROMS Installation
Topic: How to organize custom bio code
Replies: 3
Views: 693

Re: How to organize custom bio code

The trick here is the angle bracket syntax for the #include in biology.F: # if defined BIO_FENNEL # include <fennel.h> # elif defined ECOSIM # include <ecosim.h> # elif defined HYPOXIA_SRM # include <hypoxia_srm.h> which you also see in analytical.F: analytical.F: #include "cppdefs.h" .. #...
by wilkin
Tue Nov 30, 2021 12:43 pm
Forum: ROMS Problems
Topic: Query regarding atmospheric CO2 value in ROMS Fennel coupled model.
Replies: 1
Views: 453

Re: Query regarding atmospheric CO2 value in ROMS Fennel coupled model.

The code uses a constant CO2 concentration, and the default value may be out of date for the contemporary atmosphere. If you look in the code where that value is used, you'll see it's not difficult to introduce your own simple time series such as a uniformly increasing concentration, or even modulat...
by wilkin
Tue Nov 30, 2021 12:24 am
Forum: ROMS Discussion
Topic: Problems with restarting the model
Replies: 11
Views: 1368

Re: Problems with restarting the model

Kia ora Gaoyang, You can use the 'trac' source code browser https://www.myroms.org/projects/src/browser to explicitly compare two svn release numbers to see what might differ. But, if you don't have the three time level fields in your output that suggests it was not a perfect restart configuration. ...
by wilkin
Mon Nov 29, 2021 7:35 pm
Forum: ROMS Discussion
Topic: How can I understand ROMS vertical salt fluxes?
Replies: 2
Views: 649

Re: How can I understand ROMS vertical salt fluxes?

The ROMS state variable is salinity, not freshwater, and we do not treat precipitation as if it actually adds freshwater volume to the top cell, thereby decreasing the average salinity of the cell by dilution (the mass of salt is conserved in reality). Instead, we fudge it by imposing a salt flux th...
by wilkin
Wed Nov 24, 2021 4:02 pm
Forum: ROMS Discussion
Topic: High Temperature in Summer
Replies: 4
Views: 907

Re: High Temperature in Summer

Telling us only your CPP definitions is not much information to go on. There are a lot more details in the log file. But what I notice is you have: #define TS_MPDATA #define TS_DIF2 #define MIX_S_TS MPDATA is already quite diffusive, so adding explicit horizontal mixing (especially if your coefficie...
by wilkin
Tue Nov 23, 2021 3:42 pm
Forum: ROMS Discussion
Topic: usage of both LuvSrc and LwSrc
Replies: 4
Views: 822

Re: usage of both LuvSrc and LwSrc

In principle, yes, 'uv' and 'w' sources can co-exist, and the Dsrc flag is not used in 'w' sources so it is available to indicate the distinction. The existing LuvSrc and LwSrc logical flags in roms.in would have to take on the meanings ... if(ANY(LuvSrc)) and if(ANY(LwSrc)) ... to force scanning th...
by wilkin
Sat Nov 06, 2021 1:14 am
Forum: ROMS Tools and Techniques
Topic: TPXO to ROMS EXPRESS (tide extraction software)
Replies: 107
Views: 42022

Re: TPXO to ROMS EXPRESS (tide extraction software)

My suggestion was simply to compare the input tides file harmonics, but your analysis of a short ROMS model run suffices for the same purpose. Each harmonic shows a spatially uniform phase offset. To me, this implicates the processing of the time base date. I think you need to look very closely as t...
by wilkin
Thu Nov 04, 2021 2:14 pm
Forum: ROMS Tools and Techniques
Topic: TPXO to ROMS EXPRESS (tide extraction software)
Replies: 107
Views: 42022

Re: TPXO to ROMS EXPRESS (tide extraction software)

Since the domain-wide mean phase isn't very illuminating, I encourage you to plot a map of the phases, and differences, to check that the offset is more or less constant everyone. That would be a clear indication of a time base problem. Likewise, mapping the amplitudes should show very little spatia...
by wilkin
Tue Nov 02, 2021 6:33 pm
Forum: ROMS Tools and Techniques
Topic: TPXO to ROMS EXPRESS (tide extraction software)
Replies: 107
Views: 42022

Re: TPXO to ROMS EXPRESS (tide extraction software)

Just to be sure I understand what you are showing ... The blue line is your data. The orange line is ROMS, and you have two cases where the tide harmonic boundary forcing is computed for TPXO7 and TPXO9 with the same Matlab code. Is this right? Do the two orange lines overlay with a simple phase shi...
by wilkin
Tue Nov 02, 2021 5:26 pm
Forum: ROMS Bugs
Topic: tiling and divide by zero error
Replies: 10
Views: 1140

Re: tiling and divide by zero error

Parker, You can use svn to methodically bring your code up to date. (1) Check out a clean version of release 823. (2) copy over your NPZD mods to that repo (check with svn diff how it differs from 823). (3) Proceed in modest steps to update the whole repo to increasing version numbers ... svn update...
by wilkin
Tue Nov 02, 2021 4:52 pm
Forum: ROMS Bugs
Topic: tiling and divide by zero error
Replies: 10
Views: 1140

Re: tiling and divide by zero error

Hernan can correct me if I'm wrong, but ideally it is Lm and Mm that have many small prime factors so that you can have equal size tiles on many cores.
So, if you rho variables are 1302 x 663 (Lp by Mp) you are looking at prime factors of 1300 by 661. Unfortunately, 661 is prime.
by wilkin
Mon Nov 01, 2021 7:34 pm
Forum: ROMS Discussion
Topic: Problems with restarting the model
Replies: 11
Views: 1368

Re: Problems with restarting the model

A few things ... You have #define TS_FIXED so your tracer fields temp and salt are not going to evolve in time. I can see this might be a valid approach for your initial testing, especially if you have set them to constants so you are effectively solving a homogenous ocean problem with z-dependence ...
by wilkin
Thu Oct 28, 2021 1:53 pm
Forum: ROMS Tools and Techniques
Topic: TPXO to ROMS EXPRESS (tide extraction software)
Replies: 107
Views: 42022

Re: TPXO to ROMS EXPRESS (tide extraction software)

The safest approach to start, to avoid any confusion with these time coordinates, would be to use a TIME_REF that matches t0 in the TPXO function, and then TIDE_START and DSTART both = 0. Any phase mismatch then would point to something other than these switches.
by wilkin
Sat Oct 09, 2021 12:42 pm
Forum: ROMS Discussion
Topic: relative/potential vorticity outputs
Replies: 7
Views: 1372

Re: relative/potential vorticity outputs

For vorticity at an individual timestamp you can calculate this from output of other variables in the History file.

In Averages and Diagnostics we save things that cannot be saved (accurately) otherwise unless computed online at runtime.
by wilkin
Tue Sep 14, 2021 2:56 pm
Forum: ROMS Discussion
Topic: Elevation decreased at all of grids except outermost grid at the boundary
Replies: 2
Views: 662

Re: Elevation decreased at all of grids except outermost grid at the boundary

Do the bathymetries of the parent and child grids match for several grid cells near to the edge of the child grid? This is recommended so that the volumes of the grids match in the transition region. Have you compared one-way and two-way nesting to see if the issue occurs in both? Note that the nest...
by wilkin
Fri Sep 03, 2021 1:33 pm
Forum: ROMS Problems
Topic: READ_INP ERROR: A total of 1 configuration errors discovered.
Replies: 3
Views: 892

Re: READ_INP ERROR: A total of 1 configuration errors discovered.

Vertical S-coordinate System: level S-coord Cs-curve at_hmin over_slope at_hmax 30 0.0000000 0.0000000 0.000 0.000 0.000 29 -0.0333333 -0.0001156 Infinity************ -Infinity 28 -0.0666667 -0.0004685 Infinity************ -Infinity 27 -0.1000000 -0.0010779 Infinity************ -Infinity 26 -0.1333...
by wilkin
Fri Sep 03, 2021 11:51 am
Forum: ROMS Discussion
Topic: Incorporating phytoplankton floating (Fennel model)
Replies: 6
Views: 1126

Re: Incorporating phytoplankton floating (Fennel model)

This is way more difficult than you'd think, but we've already done it. See the RED_TIDE ecosystem model code:
https://www.myroms.org/projects/src/ticket/694
It has upward "swimming" tracers.
by wilkin
Wed Sep 01, 2021 2:13 pm
Forum: ROMS Tools and Techniques
Topic: Surface geostrophic velocity issue
Replies: 27
Views: 3548

Re: Surface geostrophic velocity issue

David is correct. Setting

Code: Select all

>> axis equal
does not solve the problem. Try it and you'll see.
by wilkin
Wed Sep 01, 2021 2:12 pm
Forum: ROMS Problems
Topic: READ_INP ERROR: A total of 1 configuration errors discovered.
Replies: 3
Views: 892

Re: READ_INP ERROR: A total of 1 configuration errors discovered.

We would need to see you logfile to debug this.

But, since you are running CROCO and not ROMS from myroms.org, you might want to consult your CROCO colleagues directly.
by wilkin
Wed Sep 01, 2021 2:10 pm
Forum: ROMS Discussion
Topic: Hello
Replies: 4
Views: 1966

Re: Hello

You are using PARALLEL_IO which is a very new option recently added to ROMS. If this is not essential to achieving the performance you need, disable that option. I also notice that ROMS is unable to format DSTART and TIDE_START in the log file: *********** dstart Time-stamp assigned to model initial...
by wilkin
Wed Sep 01, 2021 2:06 pm
Forum: ROMS Discussion
Topic: ROMS/TOMS - Output error ............ exit_flag: 3
Replies: 3
Views: 614

Re: ROMS/TOMS - Output error ............ exit_flag: 3

I see you are using #define PARALLEL_IO

That is almost certainly the issue. Try running without that and see if the error occurs.
by wilkin
Sat Aug 28, 2021 8:53 pm
Forum: ROMS Tools and Techniques
Topic: Surface geostrophic velocity issue
Replies: 27
Views: 3548

Re: Surface geostrophic velocity issue

Mike is on to the problem. It's a failing of Matlab quiver with no easy workaround. If the plot space has a highly elongated aspect ratio the quiver vector components are distorted. This is why one can't simply put vectors of horizontal and vertical velocity on a vertical slice plot. I have a rather...
by wilkin
Fri Aug 27, 2021 9:08 pm
Forum: ROMS Tools and Techniques
Topic: Surface geostrophic velocity issue
Replies: 27
Views: 3548

Re: Surface geostrophic velocity issue

Well, this is a mystery. I recomputed your angle and metrics from the grid lon/lat using roms_metrics.m (part of the Matlab tools at myroms.org). The values are not appreciably different. So, I made a sanity check plot using mature code that that I have used for years. I plotted two sets of vectors ...
by wilkin
Fri Aug 27, 2021 6:23 pm
Forum: ROMS Tools and Techniques
Topic: Surface geostrophic velocity issue
Replies: 27
Views: 3548

Re: Surface geostrophic velocity issue

Yes, I would suspect your grid angle.

How did you generate the grid? Was it an angle preserving map projection?

Try plotting some velocity vectors with my roms_quivergrd and look closely if they are parallel to the coast. They absolutely should be.
by wilkin
Thu Aug 26, 2021 7:18 pm
Forum: ROMS Tools and Techniques
Topic: Surface geostrophic velocity issue
Replies: 27
Views: 3548

Re: Surface geostrophic velocity issue

I added a function roms_surface_geostrophic_velocity.m to my ROMS tools at https://github.com/johnwilkin/roms_wilkin. It returns surface geostrophic velocity in east-north coordinates on the lon_rho grid ready for plotting by quiver. It gives vectors that align with zeta contours in my test plots. T...
by wilkin
Wed Aug 25, 2021 5:01 pm
Forum: ROMS Tools and Techniques
Topic: Surface geostrophic velocity issue
Replies: 27
Views: 3548

Re: Surface geostrophic velocity issue

I think your average to u-points of 1/pm is not the same as 1/(average of pm). ROMS uses (look in metrics.F) !----------------------------------------------------------------------- ! Compute m/n, 1/m, and 1/n at horizontal U-points. !-----------------------------------------------------------------...
by wilkin
Wed Aug 25, 2021 2:30 pm
Forum: ROMS Tools and Techniques
Topic: Surface geostrophic velocity issue
Replies: 27
Views: 3548

Re: Surface geostrophic velocity issue

pm, pn have units inverse distance, so d(zeta)/d(xi) is diff(zeta) TIMES pm. But pm,pn are defined at cell center rho points, same as zeta. What ROMS does is average pm to the cell face u-point, say pm_u, and calculate diff(zeta)*pm_u. Then you have the zeta slope at u-points, and you need to averag...
by wilkin
Tue Aug 03, 2021 2:41 pm
Forum: ROMS Information
Topic: conversion of sigma levels in to depth
Replies: 4
Views: 3375

Re: conversion of sigma levels in to depth

The vertical coordinate is documented here in WikiROMS https://www.myroms.org/wiki/Vertical_S-coordinate. In the depths.m function you quote fname is any ROMS output file - history, averages, restart etc. Strictly speaking, the vertical coordinate changes in time with sea level zeta . The input tind...
by wilkin
Tue Aug 03, 2021 2:34 pm
Forum: ROMS Discussion
Topic: How to create the bathymetry data for nesting ROMS grids
Replies: 2
Views: 640

Re: How to create the bathymetry data for nesting ROMS grids

x,y,x are longitude, latitude and depth.
by wilkin
Fri Jul 30, 2021 11:50 am
Forum: ROMS Discussion
Topic: Introducing Eulerian tracer during a simulation - flushing time
Replies: 18
Views: 2579

Re: Introducing Eulerian tracer during a simulation - flushing time

Look carefully at the logfile output from both runs. ROMS is very complete in documenting what it did, and you may stop some differences in configuration. Consider especially the settings for advection scheme because this can be a source of tracer over/under-shoot.
by wilkin
Fri Jul 30, 2021 11:45 am
Forum: ROMS Adjoint
Topic: INP_PAR, PHYPAR: Problems finding input file.
Replies: 7
Views: 1390

Re: INP_PAR, PHYPAR: Problems finding input file.

it is not clear to me how to "make sure my roms.in is up to date". My grid-file is included like this: Start from one of the example roms.in files in a recent version of the code, and work your way through adding the options you want. This is a safe way to make sure the file is complete, ...
by wilkin
Thu Jul 29, 2021 7:00 pm
Forum: ROMS Discussion
Topic: ROMS grid for conservative remapping
Replies: 12
Views: 1674

Re: ROMS grid for conservative remapping

Good point, Kate.

The mapping toolbox does include the stereographic projection (there are 72 projections in total) but I have no idea how to drive it, and will resist the temptation to delve into some recreational Matlab today to try and figure it out.
by wilkin
Thu Jul 29, 2021 6:11 pm
Forum: ROMS Discussion
Topic: ROMS grid for conservative remapping
Replies: 12
Views: 1674

Re: ROMS grid for conservative remapping

I've attached here another approach to making a simple grid using the Matlab mapping toolbox to set a Lambert conformal projection, and create a rectangular grid in Lambert space (optionally rotated w.r.t. east-north) that is then projected back to geographic coordinates. It takes a bit of trial and...
by wilkin
Thu Jul 29, 2021 3:16 pm
Forum: ROMS Discussion
Topic: Introducing Eulerian tracer during a simulation - flushing time
Replies: 18
Views: 2579

Re: Introducing Eulerian tracer during a simulation - flushing time

You might be able to do this with a hack to step3d_t.F using the tracer climatology nudging. See the code chuck near line 1559: ! ! Nudge towards tracer climatology. ! IF (LtracerCLM(itrc,ng).and.LnudgeTCLM(itrc,ng)) THEN DO k=1,N(ng) DO j=JstrR,JendR DO i=IstrR,IendR t(i,j,k,nnew,itrc)=t(i,j,k,nnew...
by wilkin
Thu Jul 29, 2021 11:55 am
Forum: ROMS Discussion
Topic: Problems reading the grid netCDF file
Replies: 1
Views: 427

Re: Problems reading the grid netCDF file

Are you sure your roms.in is up to date with your code? When updates are made to the code sometimes they require new entries in roms.in (and varinfo.dat), and if you don't also update those input files it can trigger errors (because ROMS is expecting to read some settings from roms.in). Recent chang...
by wilkin
Thu Jul 29, 2021 11:48 am
Forum: ROMS Discussion
Topic: Introducing Eulerian tracer during a simulation - flushing time
Replies: 18
Views: 2579

Re: Introducing Eulerian tracer during a simulation - flushing time

No, that won't work because the point sources will also introduce mass (you have to specify discharge in m3/s) and radically change the circulation. I think your only choice is to stop and restart, or make some radical hack to reset dye_01 concentration at a chosen time (and I'm not sure how to do t...
by wilkin
Wed Jul 28, 2021 11:40 am
Forum: ROMS Discussion
Topic: Introducing Eulerian tracer during a simulation - flushing time
Replies: 18
Views: 2579

Re: Introducing Eulerian tracer during a simulation - flushing time

I can't think of any way to initialize passive tracers other than via the initial conditions file ... so here a restart.

But you can have floats initialize with a time delay, and you could estimate flushing time from a large float ensemble.
by wilkin
Tue Jul 27, 2021 3:42 pm
Forum: ROMS Discussion
Topic: ROMS grid for conservative remapping
Replies: 12
Views: 1674

Re: ROMS grid for conservative remapping

I struck the same problem working from the Met Norway grids and wrote simple code to add the lon_psi etc. kiwi:sandbox wilkin$ more roms_add_psi_latlon.m function g = roms_add_psi_latlon(ncfile,~) % grd = roms_add_psi_latlon(grd_file,[writeit]) % or roms_add_psi_latlon(grd_structure,[writeit]) % % I...
by wilkin
Tue Jul 27, 2021 3:34 pm
Forum: ROMS Discussion
Topic: Error in extract_bath.m program
Replies: 2
Views: 617

Re: Error in extract_bath.m program

Blat=25.0; % Bottom corner latitude
Tlat=5.0; % Top corner latitude
Could it be that Blat > Tlat ?
by wilkin
Thu Jul 22, 2021 12:39 am
Forum: ROMS Discussion
Topic: DIURNAL_SRFLUX and cloud fraction
Replies: 3
Views: 929

Re: DIURNAL_SRFLUX and cloud fraction

Kate's advice is right on. Look at the code. A quick search of where the option is active is accomplished with ... grep -r DIURNAL_SRFLUX . The only relevant entry is ... ./Functionals/ana_srflux.h My reading of the code in there is that daily average SWRAD is converted to a diurnal cycle of swrad, ...
by wilkin
Sat Jul 17, 2021 10:42 am
Forum: ROMS Problems
Topic: Boundary forcing error (t3dbc_im)
Replies: 8
Views: 1765

Re: Boundary forcing error (t3dbc_im)

Your log file indicates Tracer Affection Schemes are undefined. You might want to fix that first. You have a very large value for OBCFAC > 500. That's an unconventional choice that will lead to very different OBC behavior when the radiation switches sign. I suggest a smaller nudging time scale so th...
by wilkin
Fri Jun 25, 2021 11:10 am
Forum: ROMS Discussion
Topic: Issue of exceptionally low velocity
Replies: 8
Views: 2315

Re: Issue of exceptionally low velocity

Your log file shows all open boundaries are "Closed". You need Chapman and Flather conditions for the tides to be active. Set the appropriate LBC options in roms.in
by wilkin
Tue Jun 22, 2021 2:52 pm
Forum: ROMS Discussion
Topic: Issue of exceptionally low velocity
Replies: 8
Views: 2315

Re: Issue of exceptionally low velocity

The output of stresses does not require ANA_SMFLUX. ROMS can determine stresses analytically, from the bulk flux formulae, or from model coupling. Whatever it does, output is controlled by the relevant Hout option in roms.in. The log file tells you what ROMS actually did. So read that closely. Look ...
by wilkin
Tue Jun 22, 2021 11:16 am
Forum: ROMS Discussion
Topic: Issue of exceptionally low velocity
Replies: 8
Views: 2315

Re: Issue of exceptionally low velocity

You have defined ANA_SMFLUX but also BULK_FLUXES. So I'm not sure what you actually got. Think more carefully about your setup.
by wilkin
Fri Jun 18, 2021 3:48 pm
Forum: ROMS Discussion
Topic: problems to use d_ecmwf2roms
Replies: 2
Views: 807

Re: problems to use d_ecmwf2roms

Your forcing files do not have to span precisely the interval of your simulation. Download extra files for the months before and after the run interval and concatenate them together (or use the | syntax in the FRCNAME list). From the time of the initial conditions in your ININAME file, ROMS will fig...
by wilkin
Sat Jun 12, 2021 1:00 pm
Forum: ROMS Discussion
Topic: Error in ending value for forcing
Replies: 4
Views: 1069

Re: Error in ending value for forcing

Does this error occur at the vert start, or after the model has run for a while?

Are you using the cycle_length attribute with the time coordinate?
by wilkin
Thu Jun 03, 2021 6:25 pm
Forum: ROMS Ecosystem
Topic: NPZD nesting
Replies: 5
Views: 1205

Re: NPZD nesting

Hernan, The user has this in npzd_Powell.in ... BioIni(iNO3_) == 17.0d0 17.0d0 ! nitrate BioIni(iPhyt) == 1.0d0 1.0d0 ! phytoplankton BioIni(iZoop) == 1.0d0 1.0d0 ! zooplankton BioIni(iSDet) == 1.0d0 1.0d0 ! detritus but gets this in stdout ... NPZD Model Parameters, Grid: 02 =======================...
by wilkin
Thu Jun 03, 2021 2:53 pm
Forum: ROMS Ecosystem
Topic: NPZD nesting
Replies: 5
Views: 1205

Re: NPZD nesting

Looks to me like this piece of npzd_Powell_inp.h ... #ifdef ANA_BIOLOGY CASE ('BioIni(iNO3_)') Npts=load_r(Nval, Rval, Ngrids, BioIni(iNO3_,1)) CASE ('BioIni(iPhyt)') Npts=load_r(Nval, Rval, Ngrids, BioIni(iPhyt,1)) CASE ('BioIni(iZoop)') Npts=load_r(Nval, Rval, Ngrids, BioIni(iZoop,1)) CASE ('BioIn...
by wilkin
Tue Jun 01, 2021 7:48 pm
Forum: ROMS Discussion
Topic: Problem faced during online nesting for ROMS using self created grid
Replies: 12
Views: 2238

Re: Problem faced during online nesting for ROMS using self created grid

Are you reading the instructions - "GLOSSARY" - at the end of the roms.in template? You see there that the tides go in one file - and apply only to the parent grid: ! TIDENAME Tidal constituents period, phase, elevation, and current data. ! This data is needed when SSH_TIDES, UV_TIDES, or ...
by wilkin
Tue Jun 01, 2021 6:30 pm
Forum: ROMS Discussion
Topic: Problem faced during online nesting for ROMS using self created grid
Replies: 12
Views: 2238

Re: Problem faced during online nesting for ROMS using self created grid

You can't have a tidal boundary condition file for the nested grid. It gets its boundary conditions from the parent.
by wilkin
Tue Jun 01, 2021 2:58 pm
Forum: ROMS Discussion
Topic: Problem faced during online nesting for ROMS using self created grid
Replies: 12
Views: 2238

Re: Problem faced during online nesting for ROMS using self created grid

You log file is reporting exactly the same inputs for the parent and child grids: Resolution, Grid 01: 298x148x15, Parallel Threads: 1, Tiling: 1x1 Physical Parameters, Grid: 01 ============================= 60000 ntimes Number of timesteps for 3-D equations. 10.000 dt Timestep size (s) for 3-D equa...
by wilkin
Thu May 27, 2021 11:28 am
Forum: ROMS Discussion
Topic: WET_DRY compilation problem
Replies: 10
Views: 6611

Re: WET_DRY compilation problem

Is your code up to date? I'm not seeing that syntax error in my code.
by wilkin
Thu May 27, 2021 11:20 am
Forum: ROMS Discussion
Topic: How repeat one year forcig for some years?
Replies: 1
Views: 557

Re: How repeat one year forcig for some years?

Add a cycle_length attribute to the time coordinate variable in your forcing file. See the example in frc_fluxclm.cdl.
by wilkin
Thu May 27, 2021 11:17 am
Forum: ROMS Discussion
Topic: Boundary Condition Choice
Replies: 4
Views: 985

Re: Boundary Condition Choice

If you put a one-cell wide strip of masked land down most of your west boundary, the open boundary condition can apply just to the "estuary".
by wilkin
Wed May 26, 2021 2:43 pm
Forum: ROMS Results
Topic: Wrong surface wind results when run ROMS
Replies: 3
Views: 918

Re: Wrong surface wind results when run ROMS

You have a problem with the longwave radiation forcing data: GET_2DFLD - downwelling longwave radiation flux, 2008-01-01 00:00:00.00 (Grid=01, Rec=0000001, Index=1, File: east_vietnam_blk_1.nc) (Tmin= 0.0000 Tmax= 62.0000) t = 0.0000 (Min = 1.00000000E+37 Max = -1.00000000E+37) regrid = F
by wilkin
Thu May 20, 2021 11:32 am
Forum: ROMS Discussion
Topic: Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)
Replies: 6
Views: 738

Re: D_ECMWF2ROMS Matlab scripts (ECMWF hourly data accumulation)

I wrote that code long ago and have not updated from ERA-Interim to ERA5. You will have to figure out the accumulation logic yourself, if indeed that is still how the data are presented (it may not be, check the units). I now access ERA5 from the NCAR Research Data Archive using roms_write_era5_NCAR...
by wilkin
Mon May 17, 2021 3:13 pm
Forum: ROMS Discussion
Topic: MaxDensity blowup
Replies: 2
Views: 899

Re: MaxDensity blowup

Both your log files show high vertical velocity values in the vicinity of point (060,092,30) ... roms.log: 23871 2012-11-25 03:05:00.00 5.381065E-03 1.213158E+04 1.213159E+04 1.738389E+14 (060,092,30) 5.036566E-02 3.810904E-02 7.289321E+01 3.587618E+00 23872 2012-11-25 03:06:40.00 5.381077E-03 1.213...
by wilkin
Tue May 11, 2021 3:57 pm
Forum: ROMS Usage
Topic: Having trouble getting lagrangian float working...
Replies: 8
Views: 1985

Re: Having trouble getting lagrangian float working...

It's a bit of a wild guess, but possibly having Fcount > 0 but all of Fdt=Fdx=Fdy=Fdz=0 is messing things up. It looks like you are trying to release all 240 floats at the same location and time. They will all go the same place unless you also #define VWALK_FORWARD. Perhaps try spreading them out us...
by wilkin
Wed May 05, 2021 7:53 pm
Forum: ROMS Discussion
Topic: How to split the advection and diffusion term
Replies: 4
Views: 1229

Re: How to split the advection and diffusion term

You need to be a bit thoughtful here about what will happen if you disable all vertical mixing. If you have no vertical viscosity, then if you also want surface stress or bottom drag then the way in which those mix into the interior is going to be significantly modified. Surface and bottom stresses ...
by wilkin
Mon May 03, 2021 3:23 pm
Forum: ROMS Adjoint
Topic: observation data rejected!
Replies: 9
Views: 5294

Re: observation data rejected!

Rafael, Look in the mod file. It reports all the variables that ROMS uses to make a decision as to which observations are rejected. There you will see reported the innovations, obs and background errors. If you have BGQC active you can determine whether it is configured as you intended for your spec...
by wilkin
Mon May 03, 2021 3:17 pm
Forum: ROMS Discussion
Topic: Blow up ( River run off)
Replies: 7
Views: 1914

Re: Blow up ( River run off)

It looks like your river source is between 52E and 53E, far from the blow-up point. There is no particular reason to suspect the river is the direct cause. You need to go through the usual debugging and testing steps... Does the logile show you are perpetually close to CFL instability? If so, try de...
by wilkin
Sat May 01, 2021 12:31 pm
Forum: ROMS Discussion
Topic: Blow up ( River run off)
Replies: 7
Views: 1914

Re: Blow up ( River run off)

Your interpretation of direction and transport is correct for LuvSrc. Are you sure the blowup is associated with the river source? The log file shows which grid point has the extreme values, and there should a 3rd record in the RST file capturing the state at blowup.
by wilkin
Sun Apr 25, 2021 4:52 pm
Forum: ROMS Discussion
Topic: A strange error while open the biological options
Replies: 5
Views: 1396

Re: A strange error while open the biological options

Your logfile shows ... Tracer Advection Scheme: NLM ======================== Variable Grid Horizontal Vertical --------- ---- ------------ ------------ temp 1 HSIMT Centered4 salt 1 HSIMT Centered4 NO3 1 ^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@ NH4 1 ^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^...
by wilkin
Fri Apr 23, 2021 6:02 pm
Forum: ROMS Discussion
Topic: add passive tracer
Replies: 9
Views: 1849

Re: add passive tracer

Read the GLOSSARY at the end of one of the floats files, e.g. floats_upwelling.in, in the External directory. It is quite comprehensive.
by wilkin
Thu Apr 22, 2021 3:35 pm
Forum: ROMS Discussion
Topic: add passive tracer
Replies: 9
Views: 1849

Re: add passive tracer

There is an FAQ
https://www.myroms.org/wiki/Frequently_ ... tracers.3F
and also guidance on what to do if you want passive tracers in your rivers
https://www.myroms.org/wiki/River_Runoff
by wilkin
Mon Apr 19, 2021 2:36 pm
Forum: ROMS Discussion
Topic: problem with two-way nesting
Replies: 58
Views: 11214

Re: problem with two-way nesting

Take a look at ... Debreu, L., Marchesiello, P., Penven, P. and Cambon, G., 2012. Two-way nesting in split-explicit ocean models: Algorithms, implementation and validation. Ocean Modelling, 49, pp.1-21, http://dx.doi.org/10.1016/j.ocemod.2012.03.003 Let us know if you have an suggestions on how to i...
by wilkin
Wed Apr 07, 2021 11:43 am
Forum: ROMS Problems
Topic: Error while executing ROMS for a self created grid region
Replies: 37
Views: 6674

Re: Error while executing ROMS for a self created grid region

Looks like you need some MATLAB help more than ROMS. There are lots of good tutorials at https://matlabacademy.mathworks.com. If you want a slice of model output at constant depth, like you were plotting with roms_zview.m, then you can have roms_zview give you those data as an optional output struct...
by wilkin
Fri Apr 02, 2021 5:58 pm
Forum: ROMS Tools and Techniques
Topic: roms_matlab plotting and analysis routines
Replies: 103
Views: 72614

Re: roms_matlab plotting and analysis routines

I have modified roms_zslice_var.m to reset all z to equal 0 on land.

If you update from github https://github.com/johnwilkin/roms_wilkin you should be able to plot from the output files you already have.
by wilkin
Fri Apr 02, 2021 3:57 pm
Forum: ROMS Tools and Techniques
Topic: roms_matlab plotting and analysis routines
Replies: 103
Views: 72614

Re: roms_matlab plotting and analysis routines

The issue is that your grid has bathymetry values h < 0 and roms_get_grid is calculating z_r etc. values that are not monotonic. roms_zslice_var uses the tests: zg_ind = find(diff(z<depth)~=0); and zl_ind = find(diff(z>depth)~=0); as the basis of the logic to find the k indices immediately above and...
by wilkin
Fri Apr 02, 2021 2:06 pm
Forum: ROMS Discussion
Topic: blow up when nudging SST and SSS
Replies: 10
Views: 1879

Re: blow up when nudging SST and SSS

The ocean_time in your climatology file ECS_clm_2016.nc is only relevant if the variables in the file (temp, salt etc.) are directed to ocean_time by their "time" attribute. This is not ocean_time that ROMS itself is using. Something like: double temp(ocean_time, s_rho, eta_rho, xi_rho) ; ...
by wilkin
Thu Apr 01, 2021 3:21 pm
Forum: ROMS Tools and Techniques
Topic: roms_matlab plotting and analysis routines
Replies: 103
Views: 72614

Re: roms_matlab plotting and analysis routines

Have you inadvertently edited any of the roms_wilkin code?

Is it up to date?

Maybe send a small version of your output file for me to look at. Not all 172 records. Just a couple.
by wilkin
Thu Apr 01, 2021 1:36 pm
Forum: ROMS Discussion
Topic: blow up when nudging SST and SSS
Replies: 10
Views: 1879

Re: blow up when nudging SST and SSS

I suspect the problem is in your climatology file CLMNAME == /public/home/rengz/roms/Apps/Lagrangian/input/ECS_clm_2016.nc The error message ... SET_3DFLD - current model time exceeds ending value for variable: temp TDAYS = 16801.0000 is saying that on checking your inputs before the run starts the ...
by wilkin
Wed Mar 31, 2021 2:10 pm
Forum: ROMS Tools and Techniques
Topic: roms_matlab plotting and analysis routines
Replies: 103
Views: 72614

Re: roms_matlab plotting and analysis routines

I have no idea what you have done wrong. I assume you have tested other options, like plotting different variables than 'u', specifying time as an index instead of a date string, plotting at constant vertical index (instead of z) using roms_sview? Does that tell us anything? Where you are getting th...
by wilkin
Mon Mar 29, 2021 11:26 am
Forum: ROMS Problems
Topic: Error while executing ROMS for a self created grid region
Replies: 37
Views: 6674

Re: Error while executing ROMS for a self created grid region

Here Lonmin etc are the range of coordinates in your forcing file. They do not fully encompass your grid. Rebuild those files with more lon/lat points.
by wilkin
Sun Mar 28, 2021 12:41 pm
Forum: ROMS Problems
Topic: Error while executing ROMS for a self created grid region
Replies: 37
Views: 6674

Re: Error while executing ROMS for a self created grid region

Minimum Z-grid spacing, DZmin = -1.69797972E+04 m Water points = 0.00000000E+00 m
You have h = 0 somewhere.
by wilkin
Fri Mar 19, 2021 2:15 pm
Forum: ROMS Problems
Topic: errors when running Lagrangian floats in ROMS 3.9
Replies: 10
Views: 2231

Re: errors when running Lagrangian floats in ROMS 3.9

Iny our logfile: GET_2DFLD - surface air pressure, 2016-04-10 06:00:00.00 (Grid=01, Rec=0000386, Index=1, File: Pair_2016.nc) (Tmin= 16801.0000 Tmax= 17166.7500) t = 16901.2500 (Min = 7.66470933E+00 Max = 1.02419869E+01) regrid = T Air pressure should be given in millibar (or converted with a scale ...
by wilkin
Thu Mar 18, 2021 7:57 pm
Forum: ROMS Problems
Topic: errors when running Lagrangian floats in ROMS 3.9
Replies: 10
Views: 2231

Re: errors when running Lagrangian floats in ROMS 3.9

You have GIT Root URL : https://github.com/kshedstrom/roms.git You are running Kate's code, so I can't be entirely sure my experience will help. And if you are mixing and matching float routines from myroms.org with Kate's then I'm not sure if that's a problem. But looking at the logfile I have a fe...
by wilkin
Thu Mar 18, 2021 7:30 pm
Forum: ROMS Discussion
Topic: Grid rotation angle and diagnostics
Replies: 1
Views: 616

Re: Grid rotation angle and diagnostics

All vector component diagnostics are in the ROMS coordinate system. So, if you want them east/north you need to rotate them. Note that many components are on their respective faces of the rho cells, not necessarily at the cell center. So "u" and "v" components would need to be av...
by wilkin
Wed Mar 17, 2021 2:27 pm
Forum: ROMS Problems
Topic: errors when running Lagrangian floats in ROMS 3.9
Replies: 10
Views: 2231

Re: errors when running Lagrangian floats in ROMS 3.9

You log file indicates the problems with reading initial conditions are all at line 208 and 285 of initial.f90. So, see what ROMS is trying to read at that line. But your errors seem more like a fundamental problem with netcdf. Is your netcdf library built with the same compiler you are using for RO...
by wilkin
Tue Mar 16, 2021 8:15 pm
Forum: ROMS Problems
Topic: errors when running Lagrangian floats in ROMS 3.9
Replies: 10
Views: 2231

Re: errors when running Lagrangian floats in ROMS 3.9

If you try this with the myroms.org version of the code more of us might be able to help you.
by wilkin
Mon Mar 15, 2021 10:19 pm
Forum: ROMS Discussion
Topic: d_ecmwf2roms.m
Replies: 12
Views: 3868

Re: d_ecmwf2roms.m

I started down that route with a modified version of my roms_write_era5_NCARds633_frcfile.m accessing the JRA data at NCAR (https://rda.ucar.edu/datasets/ds628.0/#!access). I was having some trouble tracking down all the variables required for bulk fluxes - they are scattered through several OPeNDP ...
by wilkin
Tue Mar 09, 2021 10:28 pm
Forum: ROMS Discussion
Topic: problem with two-way nesting
Replies: 58
Views: 11214

Re: problem with two-way nesting

Boundary tides are going to input a lot more barotropic energy than without. I don't think it's directly relevant to the nesting issue you are seeing, just making it more apparent because there is so much more high frequency zeta variability. Clutching at straws a bit, but ... try without SMAGORINSK...
by wilkin
Mon Mar 08, 2021 2:55 pm
Forum: ROMS Discussion
Topic: Modify UPWELLING case to a flat bottom, etc.
Replies: 3
Views: 935

Re: Modify UPWELLING case to a flat bottom, etc.

A quick way to find all the things that might be customized for a test case, such as UPWELLING, is to grep for that CPP directive at the top level of the code (see the man page for grep to understand that -r means recursively check all subdirectories.: kiwi:myroms wilkin$ grep -r UPWELLING . ./Bin/b...
by wilkin
Fri Mar 05, 2021 9:41 pm
Forum: ROMS Problems
Topic: ocean_time in AVG files
Replies: 4
Views: 1075

Re: ocean_time in AVG files

But it looks like the times in the latter averages files are wrong. Reassure me it all works if you make NTSAVG = 1, and just discard the first average file is you are worried about it. In principle, the accumulation of the tidal harmonic fit continues for the duration of the run (that was the plan ...
by wilkin
Fri Mar 05, 2021 3:41 pm
Forum: ROMS Discussion
Topic: Problem faced during online nesting for ROMS using self created grid
Replies: 12
Views: 2238

Re: Problem faced during online nesting for ROMS using self created grid

The help on coarse2fine explains: % Imin Coarse grid lower-left I-coordinate (PSI-point) % Imax Coarse grid upper-right I-coordinate (PSI-point) % Jmin Coarse grid lower-left J-coordinate (PSI-point) % Jmax Coarse grid upper-right J-coordinate (PSI-point) In your parent grid file you have variables ...
by wilkin
Fri Mar 05, 2021 2:01 pm
Forum: ROMS Problems
Topic: ocean_time in AVG files
Replies: 4
Views: 1075

Re: ocean_time in AVG files

! NTSAVG Starting timestep for the accumulation of output time-averaged ! data. You asked ROMS to wait 2880 time steps before beginning the average accumulation, yet you want to output averages every 12 times steps (you have NAVG = 12). I'm not sure what ROMS does in this situation - it's an unusua...
by wilkin
Fri Mar 05, 2021 1:52 pm
Forum: ROMS Discussion
Topic: Problem faced during online nesting for ROMS using self created grid
Replies: 12
Views: 2238

Re: Problem faced during online nesting for ROMS using self created grid

You have ...

Code: Select all

>> Imin = 123;
>> Imax = 125;
>> Jmin = 9;
>> Jmax = 12;
Those are i,j indices, not longitude and latitude. You asked for a 2 x 3 (!) subset of your parent grid and that's exactly what you got.
by wilkin
Mon Mar 01, 2021 2:25 pm
Forum: ROMS Ecosystem
Topic: Problems with river input forcing when using NEMURO
Replies: 11
Views: 2947

Re: Problems with river input forcing when using NEMURO

Regarding your river source problems specifically ... look closely at the logfile. Are the river point source tracer concentrations being reported for all the variables you want to have inflow? The choice is controlled in the nemuro.in file. Do the values look bio-physically reasonable? In particula...
by wilkin
Mon Mar 01, 2021 2:22 pm
Forum: ROMS Ecosystem
Topic: Problems with river input forcing when using NEMURO
Replies: 11
Views: 2947

Re: Problems with river input forcing when using NEMURO

Generally speaking COAWST keeps pretty close to the myroms.org version for aspects of the forward model - a Herculean task by John Warner. But if you have concerns with application modules like BIO_FENNEL or NEMURO, then it's prudent to check for differences - the unix 'diff' command will do that ni...
by wilkin
Thu Feb 25, 2021 2:43 pm
Forum: ROMS Discussion
Topic: problem with two-way nesting
Replies: 58
Views: 11214

Re: problem with two-way nesting

I never saw anything like you are showing for 2-way nesting (3 grids) in our Mid-Atlantic Bight model. Maybe we need a comparison of what our respective codes generate for the contacts point file.
by wilkin
Wed Feb 17, 2021 3:46 pm
Forum: ROMS Discussion
Topic: How to setup the river discharges with only salinity but no temperature?
Replies: 6
Views: 1542

Re: How to setup the river discharges with only salinity but no temperature?

Could you please tell me more information about how you setup? I want to make the LtracerSrc == F T worked perfectly. I am not sure how to code as you say in proper way. DId you recoded the LwSrc section? I very appreciate your help. The code update is documented in this ticket from July 2020: http...
by wilkin
Mon Feb 15, 2021 10:36 pm
Forum: ROMS Discussion
Topic: problem with two-way nesting
Replies: 58
Views: 11214

Re: problem with two-way nesting

...it is probably better to add an additional CPP option in ROMS and change the nesting source code so that the vertical regridding can be turned on and off in refinement nesting as needed. I don't know if anyone has much experience with exercising that code. The nesting has many features that were...
by wilkin
Thu Feb 11, 2021 3:37 pm
Forum: ROMS Discussion
Topic: How to setup the river discharges with only salinity but no temperature?
Replies: 6
Views: 1542

Re: How to setup the river discharges with only salinity but no temperature?

When I recoded the LwSrc option to introduce point sources as a divergence at the cell centers (instead of the the cell faces with LuvSrc) I did a sequence of tests with a modified RIVERPLUME1 test case and LtracerSrc == F T worked perfectly. When LTracerSrc is false, tracer mass is added to compens...
by wilkin
Wed Feb 10, 2021 3:47 pm
Forum: ROMS Discussion
Topic: problem with two-way nesting
Replies: 58
Views: 11214

Re: problem with two-way nesting

The removal of unnecessary repeated operations in nesting was reported in this ticket: https://www.myroms.org/projects/src/ticket/861 You can find notes like this by going to the search box in trac https://www.myroms.org/projects/src/search I simply entered "nesting" and the ticket was the...
by wilkin
Tue Feb 09, 2021 9:57 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

would be related to store physical limitation at the NCAR. That is correct or have a sense for you? No. My understanding is that the radiation variables are not part of the state space of the analysis. They are computed diagnostically by the radiation transfer scheme (RTTOV611) while the forecast i...
by wilkin
Tue Feb 09, 2021 6:42 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

Responses to two posts in this thread: (1) From user neelbasak08 regarding the error: NETCDF_INQ_VAR - requested variable: srf_time not found in input file: frc_watl_ERA5_bulkflux_alderney201905_new.nc call from: ROMS/Utility/get_cycle.F Sorry, that was a bug. I grab the basic metadata for each forc...
by wilkin
Mon Feb 08, 2021 9:55 pm
Forum: ROMS Discussion
Topic: problem with two-way nesting
Replies: 58
Views: 11214

Re: problem with two-way nesting

This indeed would be an interesting test. I'll be interested to see what you find out, Guangyu. I have noted in other posts that in principle it makes no difference what goes on in the portion of the parent grid that is supplanted by the child beyond the coarse2fine contact region. I've mentioned th...
by wilkin
Sat Feb 06, 2021 9:29 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

I updated my code on github to automatically detect if the user requested longitudes as negative or positive in BBOX and adjust accordingly.
by wilkin
Sat Feb 06, 2021 7:47 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

Your two questions: (1) Wrong yyyy in filename: I have no idea how you got this: >> E = roms_get_era5_NCARds633_bulkflux( 2019 ,5,bbox) ... E = struct with fields: ... yyyy: 2018 mm: 5 Did you hack something inside the code while you were testing? Use the MATLAB debugger to step through roms_get_era...
by wilkin
Sat Feb 06, 2021 7:47 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

Your two questions: (1) Wrong yyyy in filename: I have no idea how you got this: >> E = roms_get_era5_NCARds633_bulkflux( 2019 ,5,bbox) ... E = struct with fields: ... yyyy: 2018 mm: 5 Did you hack something inside the code while you were testing? Use the MATLAB debugger to step through roms_get_era...
by wilkin
Fri Feb 05, 2021 12:13 pm
Forum: ROMS Discussion
Topic: problem with two-way nesting
Replies: 58
Views: 11214

Re: problem with two-way nesting

I have thought about this issue a lot in the context of our own multiply-nested Mid-Atlantic Bight OOI Pioneer grids. What I suspect might be happening is deep in the 2-way fine2coarse step. After the fine grid completes its 3 (or 5 in your case) time steps, the fine solution is regridded with a (si...
by wilkin
Thu Feb 04, 2021 6:37 pm
Forum: ROMS Problems
Topic: water age
Replies: 3
Views: 1102

Re: water age

There is no river_dye_01 _age etc. Look in varinfo.dat. There is no entry for river dye age. Your river dye concentration variables have to be named river_dye_01 through river_dye_12 and it's on you to keep track that the odd numbers are passive and even numbers are age concentration. Likewise for t...
by wilkin
Thu Feb 04, 2021 12:39 pm
Forum: ROMS Problems
Topic: water age
Replies: 3
Views: 1102

Re: water age

The tracers have to be in pairs. So you need river conditions for all 12 tracers. Each odd number tracer is strictly passive and tags the water mass whose age you are tracking, so its inflow concentration is 1. It has a companion age concentration tracer (the even index in the passive tracer array) ...
by wilkin
Fri Jan 29, 2021 5:57 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

#define BULK_FLUXES is basically what you need. You have other choices though. #define LONGWAVE_OUT if you wish ROMS to compute upward longwave radiation from the model SST. ROMS will read lwrad_down from the ERA-5 file. The default if this is not defined is to use lwrad (net) from the ERA-5 file. #...
by wilkin
Fri Jan 29, 2021 3:41 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

Script roms_write_era5_NCARds633_frcfile.m notes that ... % This script uses routines from the myroms.org Matlab tools % (roms_metadata, nc_create, nc_write, etc.). nc_constant is part of that suite of MATLAB codes available from myroms.org. BTW, when you post here there is no need to quote a previo...
by wilkin
Thu Jan 28, 2021 3:17 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

In the preamble comments for these two scripts it says: In roms_write_era5_NCARds633_frcfile.m: % First run e.g. E = roms_get_era5_ncar_ds633(year,month,bounding_box...) % and then run this script to create the forcing netcdf file. In roms_get_era5_NCARds633_bulkflux.m: % Use this function to extrac...
by wilkin
Mon Jan 25, 2021 3:58 pm
Forum: ROMS Tools and Techniques
Topic: Extraction of ERA 5 data for custom grid
Replies: 29
Views: 6348

Re: Extraction of ERA 5 data for custom grid

I have MATLAB code roms_get_era5_NCARds633_bulkflux.m that reads ECMWF ERA-5 meteorological reanalysis from the NCAR Research Data Archive (RDA) dataset ds633.0 https://rda.ucar.edu/datasets/ds633.0. Access to this dataset at RDA requires authentication with a login, so you need to be a registered u...
by wilkin
Mon Jan 25, 2021 3:48 pm
Forum: ROMS Installation
Topic: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system
Replies: 8
Views: 2105

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

Works fine for me on Catalina. You likely have to update macports.
by wilkin
Wed Jan 20, 2021 2:25 pm
Forum: ROMS Tools and Techniques
Topic: D_ECMWF2ROMS Matlab scripts
Replies: 10
Views: 6289

Re: D_ECMWF2ROMS Matlab scripts

This is a user modifiable script demonstrating how to create ROMS forcing NetCDF files, but you need to customize it for your own environment and application. The very first executable line in the script is: % Path to downloaded ERA data files. Dir = fullfile(getenv('HOME'), ... 'ocean/repository/Pr...
by wilkin
Fri Jan 15, 2021 5:33 pm
Forum: ROMS Discussion
Topic: Curvilinear grid for ROMS
Replies: 4
Views: 1489

Re: Curvilinear grid for ROMS

If you make a simple rectangular grid in a conformal map projection, then when you convert back to lon/lat the orthogonality is preserved and you can compute all the grid metrics for the projected lon/lat. I made a simple test in Matlab using a Lambert Conformal projection for an arbitrary region in...
by wilkin
Thu Jan 07, 2021 5:09 pm
Forum: ROMS Discussion
Topic: Erorr when applying rivers
Replies: 8
Views: 1859

Re: Erorr when applying rivers

Did you read this: https://www.myroms.org/wiki/River_Runoff#river_Xposition_and_river_Eposition When using option LuvSrc = T, river_Xposition and river_Eposition refer to the i,j index of the u-face or v-face the flow crosses - NOT the i,j index of the rho cell it flows into. The i,j values must fol...
by wilkin
Thu Jan 07, 2021 12:18 pm
Forum: ROMS Discussion
Topic: Erorr when applying rivers
Replies: 8
Views: 1859

Re: Erorr when applying rivers

There is a CDL template rivers file in the source code distribution at: Data/ROMS/CDL/frc_rivers.cdl If you build your file like this it should work with the myroms.org code. The fact that your file is named croco _runoff_monthly.nc makes me think you are using a different version of ROMS. If so, yo...
by wilkin
Wed Dec 23, 2020 7:02 pm
Forum: ROMS Discussion
Topic: blowing up error
Replies: 15
Views: 3531

Re: blowing up error

Then I'm out of suggestions. But I add a few comments ... The code base you are using must be extremely old because in roms_ini.nc you have a variable scrum_time , in addition to ocean_time . The SCRUM model went away a decade or more ago, so you should be careful you have not inherited some outdate...
by wilkin
Wed Dec 23, 2020 6:02 pm
Forum: ROMS Discussion
Topic: blowing up error
Replies: 15
Views: 3531

Re: blowing up error

Is this supposed to a real ocean, or something idealized? You have some odd looking ranges of initial temperature and salinity: - potential temperature (Min = 7.05641875E-02 Max = 2.01933636E+01) - salinity (Min = 1.01258829E+01 Max = 1.46311805E+01) 0.7 C to 20 C for temperature. 10 to 14 for salin...
by wilkin
Wed Dec 23, 2020 3:12 pm
Forum: ROMS Discussion
Topic: blowing up error
Replies: 15
Views: 3531

Re: blowing up error

You have defined LMD_MIXING, but then you also have this block of definitions ... #if defined GLS_MIXING || defined MY25_MIXING # define KANTHA_CLAYSON # define N2S2_HORAVG # define RI_SPLINES #else # define ANA_VMIX #endif The else clause activates #define ANA_VMIX, so you have a conflict, both LMD...
by wilkin
Tue Dec 22, 2020 12:39 pm
Forum: ROMS Discussion
Topic: Zeta data in boundary files can't be read
Replies: 2
Views: 826

Re: Zeta data in boundary files can't be read

In tropical_pacific.h you have ...

Code: Select all

#define ANA_M2OBC
#define ANA_FSOBC

which says use analytical boundary zeta and ubar/vbar. That's why it doesn't read boundary zeta.
by wilkin
Thu Dec 10, 2020 1:00 pm
Forum: ROMS Discussion
Topic: ROMS 3.7 nesting problems
Replies: 8
Views: 1574

Re: ROMS 3.7 nesting problems

That looks a MPI problem rather than a ROMS problem. You're only using only tile, so try compiling and running in serial mode instead of parallel.

I think those temperature plots (from the initial conditions?) might be an artifact of shading interp.
by wilkin
Sat Nov 07, 2020 1:00 pm
Forum: ROMS Discussion
Topic: Adding Sediment to the Latte Example
Replies: 3
Views: 1244

Re: Adding Sediment to the Latte Example

This is a very old example ... 2008! It needs updating to be useful with the present version of the code. One day I'll get to it.
by wilkin
Sun Oct 11, 2020 6:14 pm
Forum: Meetings/Workshops
Topic: IOOS DMAC Breakout Session on cloud computing
Replies: 0
Views: 717

IOOS DMAC Breakout Session on cloud computing

The U.S. Integrated Ocean Observing System (IOOS) Annual DMAC Meeting (Data Management and Communications) is this coming week - online. On October 15 at 3:45 pm we* are convening a breakout session on IOOS Modeling Strategies for Numerical Modeling on the Cloud . Discussion topics are intended to c...
by wilkin
Fri Oct 02, 2020 1:49 pm
Forum: ROMS Discussion
Topic: sigma to isopycnal coordinates
Replies: 1
Views: 963

Re: sigma to isopycnal coordinates

In the myroms.org Matlab tools https://www.myroms.org/projects/src/bro ... ab/utility see scoord.m and set_depth.m.

Also in pyroms, available at various places e.g. https://zenodo.org/record/3727272#.X3cvbpNJGL4

Explained here: https://www.myroms.org/wiki/Vertical_S-coordinate
by wilkin
Mon Sep 28, 2020 11:50 am
Forum: ROMS Adjoint
Topic: How to build the ADM individually?
Replies: 2
Views: 1049

Re: How to build the ADM individually?

Have you looked at the extensive set of tutorials, lectures and exercises at WikiROMS ...
https://www.myroms.org/wiki/4DVar_Tutorial_Introduction
by wilkin
Mon Sep 21, 2020 11:38 am
Forum: ROMS Discussion
Topic: scorrection: freshwater flux correction
Replies: 2
Views: 1266

Re: scorrection: freshwater flux correction

I believe that code is the boundary condition defined in terms of a freshwater flux given as a velocity being converted into a virtual salt flux for the purposes of imposing the vertical boundary condition on salinity. ROMS does not have a conservation equation for freshwater, only salt.
by wilkin
Sun Sep 20, 2020 3:23 pm
Forum: ROMS Discussion
Topic: Evaporation + precipitation mass conservation
Replies: 5
Views: 2026

Re: Evaporation + precipitation mass conservation

I suggest you look at the code for handling river point sources in the LwSrc option. This adds the volume flux as a cell centered divergence. You obviously don't want to create Lm times Mm sources, but a few modifications to omega.F and step3d_t.F might be sufficient. If you look in omega.F at the b...
by wilkin
Tue Sep 15, 2020 11:14 am
Forum: ROMS Adjoint
Topic: How to use ECMWF product
Replies: 4
Views: 1692

Re: How to use ECMWF product

The preamble comments in d_ecmwf2roms.m note that it is a "ussr modifiable script" and a "template". You have to configure this for your own purposes - several pieces of the code are examples only. % Path to downloaded ERA data files. Dir = fullfile(getenv('HOME'), ... 'ocean/rep...
by wilkin
Mon Sep 14, 2020 4:10 pm
Forum: ROMS Discussion
Topic: Appropriate open boundary conditions for tidal forcing
Replies: 11
Views: 3913

Re: Appropriate open boundary conditions for tidal forcing

Guangyu, Nudging to "climatological" (some external information about the ocean) tracers (temp/salt) is common practise to control both components of thermal wind near the boundary (and suppress wave modes that might travel along the boundary). But nudging to 3-D velocity is less common, f...
by wilkin
Sun Sep 13, 2020 12:49 pm
Forum: ROMS Tools and Techniques
Topic: Error in matlab codes
Replies: 5
Views: 2259

Re: Error in matlab codes

That error it at the call to nc_interface. Read the help on nc_interface. Your system is having trouble figuring out the best method to read netcdf files. Are you running an old version of Matlab? Have you successfully read and written netcdf files before?
by wilkin
Thu Sep 10, 2020 11:44 am
Forum: ROMS Installation
Topic: Need help to build my application base on riverplume test case
Replies: 2
Views: 1130

Re: Need help to build my application base on riverplume test case

I think you might need to define

Code: Select all

./Include/cppdefs.h:** ANA_SPFLUX              if analytical surface passive tracers fluxes      **
and though you don't mention, to turn on the tracers ...

Code: Select all

./Include/cppdefs.h:** T_PASSIVE               if inert passive tracers (dyes, etc)              **
by wilkin
Tue Sep 08, 2020 2:21 am
Forum: ROMS Discussion
Topic: Appropriate open boundary conditions for tidal forcing
Replies: 11
Views: 3913

Re: Appropriate open boundary conditions for tidal forcing

For inflows, ROMS will nudge the interior velocities to match the boundary conditions. Because the 3D velocities in the boundary conditions are from NEMO and do not have tides, I am concerned that nudging in this case will backfire because of the inconsistency between the interior 3D velocities tha...
by wilkin
Mon Sep 07, 2020 12:20 pm
Forum: ROMS Tools and Techniques
Topic: Error in matlab codes
Replies: 5
Views: 2259

Re: Error in matlab codes

d_ecmwf2rom.m is adapted from code I wrote a long time ago and may not work nicely with new versions of ECMWF outputs. That said, the particular error you get indicates trouble opening a file, so you should check that it exists and that you've given the correct path. Easiest way is to set a debug st...
by wilkin
Sun Sep 06, 2020 1:34 pm
Forum: ROMS Discussion
Topic: Appropriate open boundary conditions for tidal forcing
Replies: 11
Views: 3913

Re: Appropriate open boundary conditions for tidal forcing

#define ADD_FSOBC is typically used to introduce slowly varying non-tidal sea level (e.g. from a larger domain model, or climatology) at the boundary. The TIDES are added separately. It's probably helpful to look at the code. It's easy to find that ADD_FSOBC is only active in one subroutine, set_tid...
by wilkin
Fri Sep 04, 2020 2:11 pm
Forum: ROMS Discussion
Topic: Appropriate open boundary conditions for tidal forcing
Replies: 11
Views: 3913

Re: Appropriate open boundary conditions for tidal forcing

You definitely should not use VOLCONS. Your 300 km wide domain is much smaller than the wavelength of the barotropic M2 tide (about 7000 km in 2500 m water) so the sea level should be heaving up and down almost in unison across your domain and constantly changing volume. It's fine to use 3-D radiati...
by wilkin
Thu Sep 03, 2020 2:51 pm
Forum: ROMS Discussion
Topic: swrad and lwrad not reading properly in ROMS
Replies: 6
Views: 1882

Re: swrad and lwrad not reading properly in ROMS

Because I have noticed that the peak of swrad is around 18hrs in the data but it's actually supposed to be around 12hrs I am not mistaken. When you convert data that are accumulations into rates, the natural time to use would be the center of the accumulation interval. So a quantity accumulated fro...
by wilkin
Tue Aug 25, 2020 1:26 pm
Forum: ROMS Sediment
Topic: Lake_jersey test case error at first time steps
Replies: 4
Views: 1706

Re: Lake_jersey test case error at first time steps

Code: Select all

 Minimum Z-grid spacing, DZmin = -3.07148846E+02 m     Water points = -5.80559302E+00 m
 Maximum Z-grid spacing, DZmax =  7.34847624E+02 m     Water points =  7.34847624E+02 m

 
You have negative vertical grid spacing. Check your bathymetry and initial zeta.
by wilkin
Fri Aug 21, 2020 3:58 pm
Forum: ROMS Discussion
Topic: River Sinks
Replies: 7
Views: 2148

Re: River Sinks

The existing LtracerSrc functionality is to give the option to have selected tracer concentration data applied at all rivers, or none . If I understand what you are asking, it is to break down that choice so that you specify inflow tracer concentration for some rivers (presumably where you have thos...
by wilkin
Thu Aug 06, 2020 12:33 pm
Forum: ROMS Discussion
Topic: River Sinks
Replies: 7
Views: 2148

Re: River Sinks

Did you read the description in wikiroms? https://www.myroms.org/wiki/River_Runoff I would hope if you simply followed the protocols for a reversed sign for a sink it would work. The code was originally conceived that way long, long ago, but you are in novel territory on this as a user. I did not te...
by wilkin
Tue Aug 04, 2020 1:22 pm
Forum: ROMS Discussion
Topic: Lagrangian floats
Replies: 2
Views: 1105

Re: Lagrangian floats

What's the typical value of zeta (sea level). Might be something to do with depth being with respect to z=0.

Did you verify the depth was correct at initialization and then changed? Or is it starting out wrong.
by wilkin
Sun Jul 26, 2020 1:49 pm
Forum: ROMS Discussion
Topic: My boundary condition is not working.
Replies: 4
Views: 1552

Re: My boundary condition is not working.

Check the log file to verify you have radiation and nudging activated for oxygen on the correct boundaries. For example, my model shows Rad+Nad on my 3 open boundaries: Lateral Boundary Conditions: NLM ============================ Variable Grid West Edge South Edge East Edge North Edge --------- ---...
by wilkin
Tue Jul 21, 2020 9:42 pm
Forum: ROMS Discussion
Topic: time-dependent bottom fluxes in roms?
Replies: 3
Views: 1518

Re: time-dependent bottom fluxes in roms?

ana_btflux.h sets the bottom boundary condition to the vertical turbulent flux of tracer, like a heat flux. It has no associated volume flux of water, so it is not the same thing as using LwSrc which adds water of a given tracer concentration. It's like the difference between warming the ocean by bl...
by wilkin
Sat Jul 11, 2020 8:43 pm
Forum: ROMS Documentation
Topic: Updated LwSrc rivers documentation
Replies: 0
Views: 866

Updated LwSrc rivers documentation

Following the release of the corrected LwSrc code (see ticket https://www.myroms.org/projects/src/ticket/860)
the documentation in WikiROMS for river Runoff has been updated.
https://www.myroms.org/wiki/River_Runoff
by wilkin
Wed Jul 08, 2020 4:16 pm
Forum: Meetings/Workshops
Topic: AGU 2020: Ocean Modeling in Support of Blue Economy
Replies: 0
Views: 985

AGU 2020: Ocean Modeling in Support of Blue Economy

Dear Coastal Modellers NOAA Office of Coast Survey and its academic partners teamed up to host a session at the 2020 AGU Fall Meeting (Dec 7-11, 2020), to explore how the ocean modeling community would be able to support marine navigation and the Blue Economy. We specifically encourage oral and post...
by wilkin
Mon Jul 06, 2020 2:45 pm
Forum: ROMS Discussion
Topic: disagreement between ouput ubar and calculated values
Replies: 2
Views: 1192

Re: disagreement between ouput ubar and calculated values

Remember that ROMS uses a vertically stretched s-coordinate system (set by your choice of Vtransform, Vstretching and the parameters theta_s, theta_b etc.). These determine the layer thicknesses you need to use to correctly calculate a vertical integral. The time varying sea surface height, zeta, en...
by wilkin
Thu Jun 25, 2020 7:40 am
Forum: ROMS Discussion
Topic: Budgell vs. CICE sea ice model with ROMS
Replies: 7
Views: 2412

Re: Budgell vs. CICE sea ice model with ROMS

Some enhancements to the Budgell ice code are reported here: "A high-resolution coupled ice-ocean model of winter circulation on the bering sea shelf. Part I: Ice model refinements and skill assessments", by Durski and Kurapov, 2019, Ocean Modelling https://www.sciencedirect.com/science/ar...
by wilkin
Wed Jun 24, 2020 2:28 pm
Forum: ROMS Adjoint
Topic: Offline Heat Budget calculations from ROMS model output
Replies: 13
Views: 11831

Re: Offline Heat Budget calculations from ROMS model output

Your plots seem to indicate the mismatch in your budgets is only at the Antarctic coast. So that does rather implicate the ice shelf as a possible issue - perhaps some term not added to the diagnostics, or that needs to be separately explicitly taken account of in your analysis. I don't follow what ...
by wilkin
Mon Jun 22, 2020 2:33 pm
Forum: ROMS Adjoint
Topic: Offline Heat Budget calculations from ROMS model output
Replies: 13
Views: 11831

Re: Offline Heat Budget calculations from ROMS model output

temp_rate = temp_hadv + temp_vadv + temp_vdiff + temp_hdiff + shflux You shouldn't have shflux here because it was applied as the surface boundary condition to temp_vdiff and so is already included in the vertical divergence d/dz*(K_v*dT/dz) (i.e. shflux/(Cp*rho0) = K_v(dT/dz at z = zeta; notice th...
by wilkin
Wed Jun 17, 2020 12:03 pm
Forum: ROMS Discussion
Topic: Boundary condition problems
Replies: 4
Views: 1470

Re: Boundary condition problems

The Shchepetkin boundary conditions needs ubar and vbar so you have to provide them in the boundary conditions file. If you have u,v and are using the myroms Matlab tools then the function uv_barotropic.m will do the calculation. It can work on both boundary and initial conditions files.
by wilkin
Tue Jun 16, 2020 1:50 pm
Forum: ROMS Usage
Topic: How do I input my own netCDF grid file for the ROMS Upwelling test case?
Replies: 10
Views: 3196

Re: How do I input my own netCDF grid file for the ROMS Upwelling test case?

ROMS computes on all points, even the land, and then masks the result afterward. So you can't have h < 0 anywhere - including in the land. There are many places where terms in the ROMS equations involve a division by zeta+h, so if this is zero or close to it then there's your problem. Where you have...
by wilkin
Mon Jun 15, 2020 1:34 pm
Forum: ROMS Discussion
Topic: BODYFORCE-transform acceleration to stress
Replies: 2
Views: 1069

Re: BODYFORCE-transform acceleration to stress

There is a different approach to imposing an effective horizontal acceleration that is uniform throughout the vertical water column. This is to introduce a horizontal gradient in the air pressure (e.g. within ana_pair.h) and impose this force via #define ATM_PRESS. I use this method to impose a time...
by wilkin
Mon Jun 15, 2020 1:09 pm
Forum: ROMS Usage
Topic: BLOWING UP during nesting
Replies: 11
Views: 4307

Re: BLOWING UP during nesting

When updating your source code remember you may need to update the roms.in (ocean.in). New options may have been introduced to manage file input/output that your old set-up does not have. It is not difficult to diff your input script with the trunk version it was based on to highlight possible missi...
by wilkin
Sun Jun 14, 2020 4:27 pm
Forum: ROMS Discussion
Topic: the defination of density rho
Replies: 16
Views: 4531

Re: the defination of density rho

I see your point. Then you might have to code some workaround, like ... # if !defined BODYFORCE ! the original code ... DO i=Istr,Iend cff=om_v(i,j)*on_v(i,j) cff1= svstr(i,j)*cff cff2=-bvstr(i,j)*cff rvfrc(i,j)=rvfrc(i,j)+cff1+cff2 ... #else ! the code you want, whatever that is ... But before you ...
by wilkin
Sat Jun 13, 2020 2:14 pm
Forum: ROMS Discussion
Topic: the defination of density rho
Replies: 16
Views: 4531

Re: the defination of density rho

Code: Select all

    cff1= 0.0_r8
    cff2= 0.0_r8
    rufrc(i,j)=rufrc(i,j)+cff1+cff2
I can't find that code anywhere in my version of rhs3d.F.
by wilkin
Thu Jun 11, 2020 1:52 pm
Forum: ROMS Discussion
Topic: the defination of density rho
Replies: 16
Views: 4531

Re: the defination of density rho

(But I modify sbstr code, I don't want to transform it to bodyforce, it is still used in 2d equation), as shown below: All you need to do to prevent the bottom stress also being applied as a bodyforce is make LEVBFRC = 0 in roms.in: !-----------------------------------------------------------------...
by wilkin
Wed Jun 10, 2020 11:45 am
Forum: ROMS Usage
Topic: How do I input my own netCDF grid file for the ROMS Upwelling test case?
Replies: 10
Views: 3196

Re: How do I input my own netCDF grid file for the ROMS Upwelling test case?

When ROMS runs it writes the grid information to the output netcdf files. Everything is in there to actually use the history file as a grid file. So test this out. Run UPWELLING with the ana_grid option for a brief simulation. Then #undef ANA_GRID and instead point GRDNAME to the history file. Does ...
by wilkin
Wed Jun 10, 2020 11:39 am
Forum: ROMS Discussion
Topic: the defination of density rho
Replies: 16
Views: 4531

Re: the defination of density rho

It seems that the forcing term ru on the right hand side of the equation euqals τ*A*Hz/Wrk,which has a force (N) dimension (Pa*m2*m/m). No, at this point in the code sustr is a kinematic stress tao/rho0 and has units m2/s2. It is not Pascals. See in bulk_flux.F and ana_smflux.h that Tau gets divide...
by wilkin
Tue Jun 09, 2020 4:20 pm
Forum: ROMS Discussion
Topic: the defination of density rho
Replies: 16
Views: 4531

Re: the defination of density rho

Where ROMS expresses anything in kinematic units (per unit mass), such as converting stress to friction velocity (tau/rho0), or heat flux (W/m2) to degrees meters/s (Hf/(Cp*rho0) in the surface temperature boundary condition, it always uses the constant parameter rho0. Likewise, to calculate Brunt-V...
by wilkin
Sun May 24, 2020 12:59 pm
Forum: ROMS Discussion
Topic: roms river LwSrc problem
Replies: 8
Views: 3970

Re: roms river LwSrc problem

I have corrected code that passes my simple tests for all tracer advection schemes. Contact me if you want to test it in advance or its addition to the public code.
by wilkin
Wed Apr 29, 2020 11:36 am
Forum: ROMS Discussion
Topic: Why ROMS does not read the provided swflux?
Replies: 2
Views: 1127

Re: Why ROMS does not read the provided swflux?

# if defined NL_BULK_FLUXES && !defined BULK_FLUXES (read EminusP) # elif !(defined ANA_SSFLUX || defined FRC_COUPLING || \ defined EMINUSP || defined SRELAXATION) (read swflux) # endif || is a logical "OR", and since defined SRELAXATION is "TRUE" the expression in () is...
by wilkin
Thu Apr 23, 2020 1:22 pm
Forum: ROMS Discussion
Topic: tidal phase mismatch between ADCP data and ROMS output
Replies: 4
Views: 1885

Re: tidal phase mismatch between ADCP data and ROMS output

I am very surprised that TPXO currents would be so out of agreement with an open ocean current meter time series. Are you sure you have the correct time base for both, and that you are interpreting phase correctly?
by wilkin
Tue Apr 21, 2020 12:28 pm
Forum: ROMS Discussion
Topic: tidal phase mismatch between ADCP data and ROMS output
Replies: 4
Views: 1885

Re: tidal phase mismatch between ADCP data and ROMS output

Did you try computing the tidal harmonics from the data directly and comparing them to TPXO? This to take ROMS out of the loop and be sure you've got the correct interpretation of phase for both data sets.
by wilkin
Mon Apr 20, 2020 9:06 pm
Forum: ROMS Discussion
Topic: Computing advection using 'utemp' vs 'temp_xadv'
Replies: 4
Views: 1545

Re: Computing advection using 'utemp' vs 'temp_xadv'

HuonT is dimensioned (i,j,k). It still has k dependence. It's just that it has already been multiplied by the elemental layer thickness "Hz" prior to time averaging, but it is not summed over k. That's why it has units m^3*tracer/s, not m^2*tracer/s The vertical integral of HuonT is just t...
by wilkin
Mon Apr 20, 2020 1:46 pm
Forum: ROMS Discussion
Topic: Computing advection using 'utemp' vs 'temp_xadv'
Replies: 4
Views: 1545

Re: Computing advection using 'utemp' vs 'temp_xadv'

No, these things won't be exactly the same. The _xadv and _yadv terms (and their divergence which is already saved for you in the companion _hadv diagnostics) are the fluxes through the faces (time averaged) exactly as ROMS computed them according to the selected advection scheme. In the case of the...
by wilkin
Tue Mar 31, 2020 3:04 pm
Forum: ROMS Discussion
Topic: Question about radiation boundary condition
Replies: 7
Views: 1944

Re: Question about radiation boundary condition

Yes, Perkins et al. (1997) choose to radiate "Q_inner minus Q_outer" in their nested model application, but this is not what Marchesiello et al. (2001) do and it is not implemented in ROMS. Radiating the difference between model and climatology - as opposed to the difference in nested grid...
by wilkin
Mon Mar 30, 2020 7:45 pm
Forum: ROMS Discussion
Topic: Question about radiation boundary condition
Replies: 7
Views: 1944

Re: Question about radiation boundary condition

...the authors mention that only the difference between model and climatology is radiated out at the open boundaries. Where do you see this in Marchesiello et al (2001)? My reading of it says the radiation calculation is based on the prognostic variables u,v,T,S separately, and the active/passive d...
by wilkin
Wed Mar 25, 2020 12:09 pm
Forum: ROMS Discussion
Topic: Artificially strong surface velocities (BODYFORCE?)
Replies: 5
Views: 1970

Re: Artificially strong surface velocities (BODYFORCE?)

It's not obvious to me why you would be getting that surface shear effect, and quickly looking at the BODYFORCE code I don't see any problems with the k indexing. Maybe try stripping out a lot of the options you have that you don't need. In particular, MIX_GEO_UV (and MIX_GEO_TS) - you have no densi...
by wilkin
Tue Mar 24, 2020 11:40 am
Forum: ROMS Discussion
Topic: Artificially strong surface velocities (BODYFORCE?)
Replies: 5
Views: 1970

Re: Artificially strong surface velocities (BODYFORCE?)

What do you have for LEVBFRC?
by wilkin
Fri Mar 13, 2020 8:52 am
Forum: ROMS Usage
Topic: Confusion with d_nudgcoef.m script
Replies: 2
Views: 1443

Re: Confusion with d_nudgcoef.m script

Does this mean that if I want to apply spatially varying nudging coefficients, I have to provide the boundary conditions as a climatology file instead (specified by CLMNAME)? Yes, if you want to use 3-D nudging to help constrain the solution near to the boundary then you must have a 3-D file of val...
by wilkin
Tue Mar 03, 2020 12:31 pm
Forum: ROMS Discussion
Topic: Inundation Blowing Up
Replies: 2
Views: 1099

Re: Inundation Blowing Up

Your log file shows you have set "nested" open boundary conditions for some variables but you have only one grid. You have also mixed "gradient" and "closed" along the same boundary, so that can't be right. Your initial conditions show a starting ubar and vbar of 4.5 an...
by wilkin
Sun Mar 01, 2020 9:34 pm
Forum: ROMS Source
Topic: Typo in roms.in following overhaul of advection schemes
Replies: 4
Views: 1994

Re: Typo in roms.in following overhaul of advection schemes

Well this is something that needs some testing and experimentation. In our model "Doppio" for the Mid-Atlantic Bight and Gulf of Maine we know that the MPDATA scheme tends to foster a poor separation of the Gulf Stream. The 3rd-order upwind (U3) or 4th-order Akima (A4) schemes give better ...
by wilkin
Sat Feb 22, 2020 2:09 pm
Forum: ROMS Bugs
Topic: WET_DRY and Gridbuilder Problem
Replies: 21
Views: 6133

Re: WET_DRY and Gridbuilder Problem

Keep in mind that the rx0 value is guidance only with respect to bathymetry steepness than might introduce truncation errors in the baroclinic pressure gradient. In shallow tidal flats that wet and dry it is unlikely you will see sufficiently large vertical stratification to introduce baroclinicity ...
by wilkin
Sun Feb 02, 2020 2:03 pm
Forum: ROMS Problems
Topic: A ROMS nesting question
Replies: 10
Views: 3732

Re: A ROMS nesting question

I don't think your problem is with nesting. The logfile info you show ... 1257 GET_2DFLD - surface u-wind component, 2013-01-01 00:00:00.00 1258 ( Grid=01 , Rec=0000001, Index=1, File: nwgom_frc_2013.nc) 1259 (Tmin= 15706.0000 Tmax= 16101.9583) t = 15706.0000 1260 ( Min = 1.00000000E+35 Max = -1.000...
by wilkin
Wed Jan 01, 2020 4:31 pm
Forum: ROMS Source
Topic: passive tracer: decay term added but not working
Replies: 2
Views: 1433

Re: passive tracer: decay term added but not working

Check your step3d_t.f90 in Build. The first DO and its closing ENDDO begin in column 6 which compilers should interpret as a continuation. But if that were so you would get an error. But check that you got what you intended. As written, your RHS term is positive and is a source, not a decay (you mul...
by wilkin
Thu Dec 05, 2019 12:31 pm
Forum: ROMS Discussion
Topic: doubts about BULK_FLUX
Replies: 3
Views: 1307

Re: doubts about BULK_FLUX

You can #define ANA_PAIR and ROMS will go to your code in Functionals/ana_pair.h where you can set a default constant value. It will read all others from the file - which is the default if no 'ANA' is defined. At runtime you should see the variables it reads from your netcdf file, but not get an err...
by wilkin
Fri Nov 15, 2019 3:01 pm
Forum: ROMS Discussion
Topic: Is it a must to use VolCons if RadNud activated?
Replies: 8
Views: 2326

Re: Is it a must to use VolCons if RadNud activated?

Look at the log file report on the grid ... ANA_GRID - bathymetry at RHO-points: h (Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00) The water depth is zero everywhere! Which explains why the vertical grid spacing is zero ... Metrics information for Grid 01: =============================== ... ...
by wilkin
Wed Nov 13, 2019 2:50 pm
Forum: ROMS Problems
Topic: Nudging time scales for RadNud boundaries
Replies: 4
Views: 2181

Re: Nudging time scales for RadNud boundaries

Running a recursive grep query for Tobc_in will guide you to where open boundary nudging time scales are set. In subroutine inp_par.F you find ... DO itrc=1,NT(ng) IF (LBC(ibry,isTvar(itrc),ng)%nudging) THEN Tobc_out(itrc,ng,ibry)=Tnudg(itrc,ng) Tobc_in (itrc,ng,ibry)=obcfac(ng)*Tnudg(itrc,ng) END I...
by wilkin
Tue Nov 12, 2019 11:56 am
Forum: ROMS Discussion
Topic: Is it a must to use VolCons if RadNud activated?
Replies: 8
Views: 2326

Re: Is it a must to use VolCons if RadNud activated?

You can't mix Periodic and Closed on the same boundary for different variables. Lateral Boundary Conditions: NLM ============================ Variable Grid West Edge South Edge East Edge North Edge --------- ---- ---------- ---------- ---------- ---------- zeta 1 Closed Chapman Imp Chapman Imp Chapm...