Error while executing ROMS for a self created grid region

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

Error while executing ROMS for a self created grid region

#1 Post by neelbasak08 »

Hello people,

I am a student from India and a pretty new user of ROMS having run only a few test cases. I am trying to run ROMS model for my own region. I created grid file in .nc format using GridBuilder.exe windows application provided generously by Austides team. And my header file looks like this:
/*
** svn $Id: basin.h 1001 2020-01-10 22:41:16Z arango $
*******************************************************************************
** Copyright (c) 2002-2020 The ROMS/TOMS Group **
** Licensed under a MIT/X style license **
** See License_ROMS.txt **
*******************************************************************************
**
** Options for Big Bad Basin.
**
** Application flag: BASIN
** Input script: roms_basin.in
*/

#define UV_ADV
#define UV_COR
#define UV_QDRAG
#define UV_VIS4
#define MIX_S_UV
#define DJ_GRADPS
#define SPLINES_VDIFF
#define SPLINES_VVISC
#define SOLVE3D
#define BODYFORCE
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_SSFLUX
#define ANA_DRAG
#define ANA_BSFLUX
#define ANA_BTFLUX
#define MASKING
#define SSH_TIDES
#define UV_TIDES
~ ~ ~ ~ ~ ~ ~ ~ ~
After this I compiled my build_roms.sh file and it ran successfully with no error. But when I tried to run my model using ./romsG < External/roms_alderneyrace.in , I get the following error:
sbasak08@DESKTOP-UOIVLQT:~/roms/Projects/alderney_race$ ./romsG <External/roms_alderneyrace.in
--------------------------------------------------------------------------------
Model Input Parameters: ROMS/TOMS version 3.9
Friday - January 22, 2021 - 9:11:34 PM
--------------------------------------------------------------------------------

Alderney Race Case

Operating system : Linux
CPU/hardware : x86_64
Compiler system : gfortran
Compiler command : /usr/bin/gfortran
Compiler flags : -frepack-arrays -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -

SVN Root URL : https://www.myroms.org/svn/src/trunk
SVN Revision : 1053

Local Root : /home/sbasak08/roms
Header Dir : /home/sbasak08/roms/Projects/alderney_race
Header file : alderneyrace.h
Analytical Dir : /home/sbasak08/roms/Projects/alderney_race

Resolution, Grid 01: 300x150x15, Parallel Threads: 1, Tiling: 1x4


Physical Parameters, Grid: 01
=============================

6000000 ntimes Number of timesteps for 3-D equations.
10.000 dt Timestep size (s) for 3-D equations.
20 ndtfast Number of timesteps for 2-D equations between
each 3D timestep.
1 ERstr Starting ensemble/perturbation run number.
1 ERend Ending ensemble/perturbation run number.
0 nrrec Number of restart records to read from disk.
T LcycleRST Switch to recycle time-records in restart file.
360 nRST Number of timesteps between the writing of data
into restart fields.
360 ninfo Number of timesteps between print of information
to standard output.
T ldefout Switch to create a new output NetCDF file(s).
60 nHIS Number of timesteps between the writing fields
into history file.
1 nQCK Number of timesteps between the writing fields
into quicksave file.
0.0000E+00 nl_visc4 NLM Horizontal, biharmonic mixing coefficient
(m4/s) for momentum.
F LuvSponge Turning OFF sponge on horizontal momentum.
F LtracerSponge(01) Turning OFF sponge on tracer 01: temp
1.0000E-06 Akt_bak(01) Background vertical mixing coefficient (m2/s)
for tracer 01: temp
1.0000E+00 Akv_bak Background vertical mixing coefficient (m2/s)
for momentum.
2.6500E-04 rdrg Linear bottom drag coefficient (m/s).
3.0000E-03 rdrg2 Quadratic bottom drag coefficient.
2.0000E-02 Zob Bottom roughness (m).
12 levsfrc Deepest level to apply surface stress as a
bodyforce.
1 levbfrc Shallowest level to apply bottom stress as a
bodyforce.
2 Vtransform S-coordinate transformation equation.
4 Vstretching S-coordinate stretching function.
8.0000E+00 theta_s S-coordinate surface control parameter.
4.0000E+00 theta_b S-coordinate bottom control parameter.
20.000 Tcline S-coordinate surface/bottom layer width (m) used
in vertical coordinate stretching.
1025.000 rho0 Mean density (kg/m3) for Boussinesq approximation.
18485.000 dstart Time-stamp assigned to model initialization (days).
18485.000 tide_start Reference time origin for tidal forcing (days).
755666.00 time_ref Reference time for units attribute (yyyymmdd.dd)
5.0000E+01 Tnudg(01) Nudging/relaxation time scale (days)
for tracer 01: temp
0.0000E+00 Znudg Nudging/relaxation time scale (days)
for free-surface.
0.0000E+00 M2nudg Nudging/relaxation time scale (days)
for 2D momentum.
0.0000E+00 M3nudg Nudging/relaxation time scale (days)
for 3D momentum.
0.0000E+00 obcfac Factor between passive and active
open boundary conditions.
F VolCons(1) NLM western edge boundary volume conservation.
F VolCons(2) NLM southern edge boundary volume conservation.
F VolCons(3) NLM eastern edge boundary volume conservation.
F VolCons(4) NLM northern edge boundary volume conservation.
5.000 T0 Background potential temperature (C) constant.
35.000 S0 Background salinity (PSU) constant.
1028.000 R0 Background density (kg/m3) used in linear Equation
of State.
1.0000E-04 Tcoef Thermal expansion coefficient (1/Celsius).
0.0000E+00 Scoef Saline contraction coefficient (1/PSU).
1.000 gamma2 Slipperiness variable: free-slip (1.0) or
no-slip (-1.0).
F LuvSrc Turning OFF momentum point Sources/Sinks.
F LwSrc Turning OFF volume influx point Sources/Sinks.
F LtracerSrc(01) Turning OFF point Sources/Sinks on tracer 01: temp
F LsshCLM Turning OFF processing of SSH climatology.
F Lm2CLM Turning OFF processing of 2D momentum climatology.
F Lm3CLM Turning OFF processing of 3D momentum climatology.
F LtracerCLM(01) Turning OFF processing of climatology tracer 01: temp
F LnudgeM2CLM Turning OFF nudging of 2D momentum climatology.
F LnudgeM3CLM Turning OFF nudging of 3D momentum climatology.
F LnudgeTCLM(01) Turning OFF nudging of climatology tracer 01: temp

T Hout(idFsur) Write out free-surface.
T Hout(idUbar) Write out 2D U-momentum component.
T Hout(idVbar) Write out 2D V-momentum component.
T Hout(idUvel) Write out 3D U-momentum component.
T Hout(idVvel) Write out 3D V-momentum component.
T Hout(idWvel) Write out W-momentum component.
T Hout(idOvel) Write out omega vertical velocity.
T Hout(idTvar) Write out tracer 01: temp
T Hout(idDano) Write out density anomaly.

T Qout(idFsur) Write out free-surface.
T Qout(idUbar) Write out 2D U-momentum component.
T Qout(idVbar) Write out 2D V-momentum component.
T Qout(idu2dE) Write out 2D U-eastward at RHO-points.
T Qout(idv2dN) Write out 2D V-northward at RHO-points.
T Qout(idUsur) Write out surface U-momentum component.
T Qout(idVsur) Write out surface V-momentum component.
T Qout(idsurT) Write out surface tracer 01: temp_sur

Output/Input Files:

Output Restart File: Alderney_roms_rst.nc
Output History File: Alderney_roms_his.nc
Input Grid File: /home/sbasak08/roms/Projects/alderney_race/ROMS_alderney_z_test.nc

INP_PAR:FIND_FILE - empty file name string for standard input script KeyWord: ININAME
Found Error: 05 Line: 428 Source: ROMS/Utility/inp_decode.F, find_file

READ_PHYPAR - Grid 01, could not find input file: Oops unassigned file name. Check standard input script...
Found Error: 04 Line: 6375 Source: ROMS/Utility/read_phypar.F
Found Error: 04 Line: 191 Source: ROMS/Utility/inp_par.F
Found Error: 04 Line: 115 Source: ROMS/Drivers/nl_ocean.h, ROMS_initialize

Elapsed wall CPU time for each process (seconds):


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Dynamic and Automatic memory (MB) usage for Grid 01: 300x150x15 tiling: 1x4

tile Dynamic Automatic USAGE

0 0.99 11.75 12.75
1 0.00 11.75 11.75
2 0.00 11.75 11.75
3 0.00 11.75 11.75

TOTAL 0.99 47.01 48.00

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

ROMS/TOMS - Output NetCDF summary for Grid 01:
Found Error: 04 Line: 361 Source: ROMS/Utility/close_io.F, close_out

ROMS/TOMS - I/O error ............... exit_flag: 4


ERROR: I/O related problem.
ERROR STOP

Error termination. Backtrace:
#0 0x7faf38090d01 in ???
#1 0x7faf38091849 in ???
#2 0x7faf38092f77 in ???
#3 0x7faf3c177462 in ocean
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:101
#4 0x7faf3c1774bb in main
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:50

I am unable to understand the error what might be causing this and I need some serious help.

Any help from anyone is extremely appreciated by me.

Kind regards
-Neel
Last edited by neelbasak08 on Sat Jan 23, 2021 5:31 am, edited 1 time in total.

jcwarner
Posts: 967
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

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

#2 Post by jcwarner »

looks closely at the output text, and you will see
INP_PAR:FIND_FILE - empty file name string for standard input script KeyWord: ININAME
so the code is looking for a file listed in the ININAME field in the ocean.in

If you use
#define ANA_INITIAL
then it will not look for the ininame and you can use analytical (such as all 0's) initial conditions.

so 2 options:
1- create an initial file and list it in the ocean.in
or
2- #define ANA_INITIAL and edit FUNCTIONALS/ana_initial.h

-j

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#3 Post by neelbasak08 »

Thank you sir for your generous help.
I was able to understand now what caused the error:
INP_PAR:FIND_FILE - empty file name string for standard input script KeyWord: ININAME
Found Error: 05 Line: 428 Source: ROMS/Utility/inp_decode.F, find_file
Thanks to your guidance , sir.

Are the other errors also connected to ININAME ? Or there is some modification needed in read_phypar.F, inp_par.F , nl_ocean.h , from my end ?(a part from the previous post)
READ_PHYPAR - Grid 01, could not find input file: Oops unassigned file name. Check standard input script...
Found Error: 04 Line: 6375 Source: ROMS/Utility/read_phypar.F
Found Error: 04 Line: 191 Source: ROMS/Utility/inp_par.F
Found Error: 04 Line: 115 Source: ROMS/Drivers/nl_ocean.h, ROMS_initialize
Regards
-Neel

jcwarner
Posts: 967
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

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

#4 Post by jcwarner »

those other errors were initiated by the first one, so get the init file method figured out then try again.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#5 Post by neelbasak08 »

jcwarner wrote: Sat Jan 23, 2021 3:42 pm those other errors were initiated by the first one, so get the init file method figured out then try again.
Thanks Mr. Jcwarner. My ROMS was running pretty well after that. Although I made a few necessary modifications that I required for my purpose. And then it generated this error.

In my header file, I added define BULK_FlUXES for my wind forcing data from ERA5:

Code: Select all

 ** Application flag:   BASIN
** Input script:       roms_basin.in
*/

#define UV_ADV
#define UV_COR
#define UV_QDRAG
#define UV_VIS4
#define MIX_S_UV
#define DJ_GRADPS
#define SPLINES_VDIFF
#define SPLINES_VVISC
#define BULK_FLUXES
#define SOLVE3D
#define BODYFORCE
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_INITIAL
#define ANA_SSFLUX 
Then these are the forcing file which I added in my .in script:

Code: Select all

 ! also possible to split input data time records into several NetCDF files
! (see Prolog instructions above). Use a single line per entry with a
! continuation (\) or a vertical bar (|) symbol after each entry, except
! the last one.

     NFFILES == 1                          ! number of unique forcing files

     FRCNAME == frc_TPXO9_alderneyrace_09Dec2068.nc |              ! forcing file 1, grid 1 (tidal forcing)
                        frc_watl_ERA5_bulkflux_new_201805.nc                !(wind forcing)
And this was the error I got :
INQUIRY - unable to find requested variable: Uwind
in file:
frc_TPXO9_alderneyrace_09Dec2068.nc
Found Error: 02 Line: 399 Source: ROMS/Utility/inquiry.F
Found Error: 02 Line: 133 Source: ROMS/Utility/get_2dfld.F
Found Error: 02 Line: 158 Source: ROMS/Nonlinear/get_data.F
Found Error: 02 Line: 659 Source: ROMS/Nonlinear/initial.F
Found Error: 02 Line: 191 Source: ROMS/Drivers/nl_ocean.h, ROMS_initialize

Elapsed wall CPU time for each process (seconds):

Thread # 0 CPU: 2.938
Total: 2.938

Nonlinear model elapsed CPU time profile, Grid: 01

Allocation and array initialization .............. 2.047 (69.6809 %)
2D/3D coupling, vertical metrics ................. 0.250 ( 8.5106 %)
Omega vertical velocity .......................... 0.078 ( 2.6596 %)
Equation of state for seawater ................... 0.141 ( 4.7872 %)
Total: 2.516 85.6383 %

Unique kernel(s) regions profiled ................ 2.516 85.6383 %
Residual, non-profiled code ...................... 0.422 14.3617 %


All percentages are with respect to total time = 2.938


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Dynamic and Automatic memory (MB) usage for Grid 01: 298x148x15 tiling: 1x4

tile Dynamic Automatic USAGE

0 183.52 11.52 195.04
1 0.00 11.52 11.52
2 0.00 11.52 11.52
3 0.00 11.52 11.52

TOTAL 183.52 46.08 229.60

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

ROMS/TOMS - Output NetCDF summary for Grid 01:

Analytical header files used:

ROMS/Functionals/ana_initial.h
Found Error: 02 Line: 361 Source: ROMS/Utility/close_io.F, close_out

ROMS/TOMS - Input error ............. exit_flag: 2


ERROR: Abnormal termination: NetCDF INPUT.
REASON: No error
ERROR STOP

Error termination. Backtrace:
#0 0x7f3b77c00d01 in ???
#1 0x7f3b77c01849 in ???
#2 0x7f3b77c02f77 in ???
#3 0x7f3b7be0e482 in ocean
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:101
#4 0x7f3b7be0e4db in main
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:50
I am not sure why is it trying to find Uwind from frc_TPXO9_alderneyrace_09Dec2068.nc when it is for tidal forcing and I have added sepeartely wind forcing file in the form of frc_watl_ERA5_bulkflux_new_201805.nc ? Is there a way to fix this error ? My wind forcing file frc_watl_ERA5_bulkflux_new_201805.nc has the following parameters:
10-m wind (u),10-m wind (v), 2 meter dewpoint temperature, 2 meter temperature, mean sea-level pressure, mean surface sensible heat flux, mean surface latent heat flux, mean surface downward long-wave radiation flux, mean surface net long-wave radiation flux, mean total precipitation rate.
(I am attaching my complete error as shown in terminal window for your reference)

Any help in any kind is deeply appreciated by me.

Kind regards
-Neel
Attachments
error in alderneyrace.txt
Complete error log as seen in terminal
(25.36 KiB) Downloaded 17 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#6 Post by kate »

NFFILES == 1 ! number of unique forcing files

FRCNAME == frc_TPXO9_alderneyrace_09Dec2068.nc | ! forcing file 1, grid 1 (tidal forcing)
frc_watl_ERA5_bulkflux_new_201805.nc !(wind forcing)
This should instead be:

Code: Select all

    NFFILES == 2                          ! number of unique forcing files

     FRCNAME == frc_TPXO9_alderneyrace_09Dec2068.nc \              ! forcing file 1, grid 1 (tidal forcing)
                        frc_watl_ERA5_bulkflux_new_201805.nc                !(wind forcing)

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#7 Post by neelbasak08 »

Thank you so much Kate for your kind reply. I made the changes suggested by you. But again I'm down with the following error:
ANA_INITIAL - vertically integrated u-momentum component: ubar
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - vertically integrated v-momentum component: vbar
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - free-surface: zeta
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - u-momentum component: u
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - v-momentum component: v
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - potential temperature: temp
(Grid = 01, Min = 5.00000000E+00 Max = 5.00000000E+00)

MULTIFILE_INFO_S2D - Error while processing forcing multi-files:
data does not include initialization time = 0126-09-15 00:00:00.00

2018-05-01 00:00:00.00 2018-05-31 23:00:00.00 frc_watl_ERA5_bulkflux_new_201805.nc
Found Error: 04 Line: 481 Source: ROMS/Utility/check_multifile.F, multifile_info_s2d
Found Error: 04 Line: 188 Source: ROMS/Utility/check_multifile.F
Found Error: 04 Line: 645 Source: ROMS/Nonlinear/initial.F
Found Error: 04 Line: 191 Source: ROMS/Drivers/nl_ocean.h, ROMS_initialize

Elapsed wall CPU time for each process (seconds):

Thread # 0 CPU: 3.531
Total: 3.531

Nonlinear model elapsed CPU time profile, Grid: 01

Allocation and array initialization .............. 2.234 (63.2743 %)
2D/3D coupling, vertical metrics ................. 0.312 ( 8.8496 %)
Omega vertical velocity .......................... 0.078 ( 2.2124 %)
Equation of state for seawater ................... 0.188 ( 5.3097 %)
Total: 2.812 79.6460 %

Unique kernel(s) regions profiled ................ 2.812 79.6460 %
Residual, non-profiled code ...................... 0.719 20.3540 %


All percentages are with respect to total time = 3.531


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Dynamic and Automatic memory (MB) usage for Grid 01: 298x148x15 tiling: 1x4

tile Dynamic Automatic USAGE

0 183.52 11.52 195.04
1 0.00 11.52 11.52
2 0.00 11.52 11.52
3 0.00 11.52 11.52

TOTAL 183.52 46.08 229.60

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

ROMS/TOMS - Output NetCDF summary for Grid 01:

Analytical header files used:

ROMS/Functionals/ana_initial.h
Found Error: 04 Line: 361 Source: ROMS/Utility/close_io.F, close_out

ROMS/TOMS - I/O error ............... exit_flag: 4


ERROR: I/O related problem.
ERROR STOP

Error termination. Backtrace:
#0 0x7f1d7bf80d01 in ???
#1 0x7f1d7bf81849 in ???
#2 0x7f1d7bf82f77 in ???
#3 0x7f1d80191482 in ocean
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:101
#4 0x7f1d801914db in main
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:50
I am not sure what in my file is causing this error '' MULTIFILE_INFO_S2D - Error while processing forcing multi-files: data does not include initialization time = 0126-09-15 00:00:00.00".
Here is a snippet of the matlab code I used to extract ERA5 data to make a ROMS compatible .nc format file frc_watl_ERA5_bulkflux_new_201805.nc :

Code: Select all

% ERA5 data in this archive use time since 01-01-1900
epoch = datenum(1900,1,1);
yyyy = 2018;
mm = 05;
bbox = [-110 -30 0 55];
YYYYMM = [sprintf('%d',yyyy) sprintf('%02d',mm);];
YYYY = sprintf('%d',yyyy);
Here is a snippet of my matlab code I used to extract TPXO9 v4 data to make a ROMS compatible .nc format file:

Code: Select all

%****************Modify to suit*************** 
TIDE_START=18485;  %From ROMS *.in file (TIME_REF=-2)
t0=TIDE_START+datenum(2018,5,1);  %TIDE_START in Matlab datenum
lengthSim=30;  %approximate length of model run in days
fnGrid='C:\Users\aBc\Documents\MATLAB\TPXO\ROMS_alderney_z_test.nc';
fnOut=['C:\Users\aBc\Documents\MATLAB\TPXO\frc_TPXO9_alderneyrace_' datestr(t0,'ddmmmyyyy') '.nc'];
ROMSnames={'M2' 'S2' 'N2' 'K2' 'K1' 'O1' 'P1' 'Q1' 'MM' 'MF' 'M4' 'MN4' 'MS4' '2N2' 'S1'};
Is there something wrong in my ERA5 forcing file ? Because previously I had run the model only with TPXO9 forcing file , it ran pretty well. Now after adding ERA5 forcing, it's showing this error.

It would be of great help if you could help me out in the right direction.

Extremely thankful.

Kind regards
-Neel
Attachments
error in alderneyrace.txt
(25.47 KiB) Downloaded 17 times

ymamoutos
Posts: 67
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

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

#8 Post by ymamoutos »

Greetings

from the log file you attached it seems that you have
inconsistent calendar

18485.000 dstart
755666.00 time_ref

dstart is the initialization time and your value (18485) refers to 01-January-2019 00:00:00 if your are using
modified Julian days calendar and time_ref = -2.0 (see roms.in section Time stamps). Time reference 755666.0
refers to which year and calendar?

Giannis

P.S. : I think you must read/check more thoroughly both roms.in file comments and ROMS manual.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#9 Post by neelbasak08 »

Hey Ymamoutos.

Thanks a lot for your help. I understand the direction to which you are are pointing me, but I believe it has not been the issue. The reason of my belief is that I had initial run the ROMS model with only TPXO9 tidal forcing file frc_TPXO9_alderneyrace_09Dec2068.nc and it was running pretty well without any error. I had the same TIME_REF=755666.00 and D_start =18485.

But as soon as I added my ERA5 forcing file frc_watl_ERA5_bulkflux_new_201805.nc , it started showing this error.

Any suggestion as to what might be going wrong and how can I remove this problem ?

Kind regards
-Neel

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#10 Post by kate »

The forcing times need to be along the same time axis as everything else. What are the times in your files? It might be easier to make ROMS consistent with them rather than vice versa.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#11 Post by neelbasak08 »

Thanks Kate for your generous reply.

Is there a way to calculate TIME_REF for a given date for example I want to get data for 1 August 2019 and my tide start is D_START=1845 which corresponds to 1 January 2019 ?

Maybe I change the time references of my forcing files. Maybe that can work ? Instead of calculating for 2018, since D_START is from January 2019 then I can change it to sometime in 2019 ? What should be my TIME_REF value in that case ?
Thanks a lot
-Neel

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#12 Post by kate »

I always have a TIME_REF of 19000101, which is year 1900, day 1. What year is your time origin? My DSTART is the offset in days from that time, 29225 for 1980, something larger for more recent times. Again, how does the time look in the forcing and what are its attributes?

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#13 Post by neelbasak08 »

Thanks a lot @kate. I tried to work with the changes you have suggested but I am getting the following error:
MULTIFILE_INFO_S2D - Error while processing forcing multi-files:
data does not include initialization time = 2019-01-02 00:00:00.00

2019-05-01 00:00:00.00 2019-05-31 23:00:00.00 frc_watl_ERA5_bulkflux_201905.nc
Found Error: 04 Line: 481 Source: ROMS/Utility/check_multifile.F, multifile_info_s2d
Found Error: 04 Line: 188 Source: ROMS/Utility/check_multifile.F
Found Error: 04 Line: 645 Source: ROMS/Nonlinear/initial.F
Found Error: 04 Line: 191 Source: ROMS/Drivers/nl_ocean.h, ROMS_initialize

Elapsed wall CPU time for each process (seconds):

Thread # 0 CPU: 3.016
Total: 3.016

Nonlinear model elapsed CPU time profile, Grid: 01

Allocation and array initialization .............. 2.125 (70.4663 %)
2D/3D coupling, vertical metrics ................. 0.250 ( 8.2902 %)
Omega vertical velocity .......................... 0.062 ( 2.0725 %)
Equation of state for seawater ................... 0.172 ( 5.6995 %)
Total: 2.609 86.5285 %

Unique kernel(s) regions profiled ................ 2.609 86.5285 %
Residual, non-profiled code ...................... 0.406 13.4715 %


All percentages are with respect to total time = 3.016


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Dynamic and Automatic memory (MB) usage for Grid 01: 298x148x15 tiling: 1x4

tile Dynamic Automatic USAGE

0 183.52 11.52 195.04
1 0.00 11.52 11.52
2 0.00 11.52 11.52
3 0.00 11.52 11.52

TOTAL 183.52 46.08 229.60

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

ROMS/TOMS - Output NetCDF summary for Grid 01:

Analytical header files used:

ROMS/Functionals/ana_initial.h
Found Error: 04 Line: 361 Source: ROMS/Utility/close_io.F, close_out

ROMS/TOMS - I/O error ............... exit_flag: 4


ERROR: I/O related problem.
ERROR STOP

Error termination. Backtrace:
#0 0x7f38d5250d01 in ???
#1 0x7f38d5251849 in ???
#2 0x7f38d5252f77 in ???
#3 0x7f38d9453482 in ocean
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:101
#4 0x7f38d94534db in main
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:50
I changed my time parameters to the following:

Code: Select all

  43464.000  dstart            Time-stamp assigned to model initialization (days).
19000101.00  time_ref          Reference time for units attribute (yyyymmdd.dd)
        43584 tide_start
Is there anything I am doing wrong or it's an issue with my files ?
Attachments
frc_TPXO9_alderneyrace_09Dec2068.nc
(51.5 MiB) Downloaded 20 times
frc_watl_ERA5_bulkflux_201905.nc
(428.25 KiB) Downloaded 16 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#14 Post by kate »

From your frc file:

Code: Select all

	double time(time) ;
		time:long_name = "time since intialization" ;
		time:units = "days since 2011-01-01 00:00:00" ;
		time:calendar = "gregorian" ;
Can you use 20110101 as your time origin for everything else?

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#15 Post by neelbasak08 »

Thanks a lot Dr. Kate.

I made the hanges as suggested by you. But now I am facing a different error while executing the model :

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


Found Error: 02 Line: 140 Source: ROMS/Utility/get_cycle.F
Found Error: 02 Line: 321 Source: ROMS/Utility/inquiry.F
Found Error: 02 Line: 133 Source: ROMS/Utility/get_2dfld.F
Found Error: 02 Line: 341 Source: ROMS/Nonlinear/get_data.F
Found Error: 02 Line: 659 Source: ROMS/Nonlinear/initial.F
Found Error: 02 Line: 191 Source: ROMS/Drivers/nl_ocean.h, ROMS_initialize

Elapsed wall CPU time for each process (seconds):

Thread # 0 CPU: 3.594
Total: 3.594

Nonlinear model elapsed CPU time profile, Grid: 01

Allocation and array initialization .............. 2.344 (65.2174 %)
2D/3D coupling, vertical metrics ................. 0.312 ( 8.6957 %)
Omega vertical velocity .......................... 0.062 ( 1.7391 %)
Equation of state for seawater ................... 0.156 ( 4.3478 %)
Total: 2.875 80.0000 %

Unique kernel(s) regions profiled ................ 2.875 80.0000 %
Residual, non-profiled code ...................... 0.719 20.0000 %


All percentages are with respect to total time = 3.594


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Dynamic and Automatic memory (MB) usage for Grid 01: 298x148x15 tiling: 1x1

tile Dynamic Automatic USAGE

0 183.52 36.48 220.01

TOTAL 183.52 36.48 220.01

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Found Error: 02 Line: 55 Source: ROMS/Utility/close_io.F, close_inp.F

ROMS/TOMS - Output NetCDF summary for Grid 01:

Analytical header files used:

ROMS/Functionals/ana_initial.h
Found Error: 02 Line: 361 Source: ROMS/Utility/close_io.F, close_out

ROMS/TOMS - Input error ............. exit_flag: 2


ERROR: Abnormal termination: NetCDF INPUT.
REASON: No error
ERROR STOP

Error termination. Backtrace:
#0 0x7fa897e20d01 in ???
#1 0x7fa897e21849 in ???
#2 0x7fa897e22f77 in ???
#3 0x7fa89c022482 in ocean
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:101
#4 0x7fa89c0224db in main
at /home/sbasak08/roms/Projects/alderney_race/Build_romsG/master.f90:50
I see my forcing file hasn't got SRF_TIME variable. Is there any way I could turn this variable off in my model so that I could work with my current forcing file ? My wind current forcing file has only 0-m wind (u),10-m wind (v), 2 meter dewpoint temperature, 2 meter temperature, mean sea-level pressure, mean surface sensible heat flux, mean surface latent heat flux, mean surface downward long-wave radiation flux, mean surface net long-wave radiation flux, mean total precipitation rate.

What should I change in my .in file that it runs smoothly with my current wind forcing and tidal forcing file ?

My header file looks like this:

Code: Select all

** Application flag:   BASIN
** Input script:       roms_basin.in
*/

#define UV_ADV
#define UV_COR
#define UV_QDRAG
#define UV_VIS4
#define MIX_S_UV
#define DJ_GRADPS
#define SPLINES_VDIFF
#define SPLINES_VVISC
#define BULK_FLUXES
#define SOLVE3D
#define BODYFORCE
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_INITIAL
#define ANA_SSFLUX 
Any help in any form is appreciated.

Kind Regards
-Neel
Attachments
frc_TPXO9_alderneyz01May2019_v4a.nc
TPXO9 tidal forcing
(51.5 MiB) Downloaded 18 times
frc_watl_ERA5_bulkflux_alderney201905_new.nc
Wind forcing file
(846.96 KiB) Downloaded 16 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#16 Post by kate »

You just need to change some attributes in your frc file. You now have:

Code: Select all

	double time(time) ;
		time:long_name = "time since intialization" ;
		time:units = "days since 2011-01-01 00:00:00" ;
		time:calendar = "gregorian" ;
	float Uwind(time, lat, lon) ;
		Uwind:long_name = "surface u-wind component (east) at 10 m" ;
		Uwind:units = "meter second-1" ;
		Uwind:time = "time" ;
		Uwind:coordinates = "lon lat time" ;
	float swrad(time, lat, lon) ;
		swrad:long_name = "net solar shortwave radiation flux" ;
		swrad:units = "Watt meter-2" ;
		swrad:positive_value = "time" ;
		swrad:negative_value = "upward flux, cooling" ;
		swrad:time = "srf_time" ;
		swrad:coordinates = "lon lat time" ;
	float lwrad_down(time, lat, lon) ;
		lwrad_down:long_name = "downwelling longwave radiation flux" ;
		lwrad_down:units = "Watt meter-2" ;
		lwrad_down:positive_value = "time" ;
		lwrad_down:negative_value = "upward flux, cooling" ;
		lwrad_down:time = "lrf_time" ;
		lwrad_down:coordinates = "lon lat time" ;
You need the swrad:time to match that for Uwind:time. The swrad:positive_value = "time" is pretty odd and I would change that too.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#17 Post by neelbasak08 »

You need the swrad:time to match that for Uwind:time. The swrad:positive_value = "time" is pretty odd and I would change that too.
I am not sure what I am supposed to change here. Do I need to change swrad:time='srf_time' to swrad:time='time' as Uwind:time='time' ?

Another issue I believe is to how to make this change. I am using roms_wilkin matlab toolkit provided by Dr. Wilkin on github that converts ERA5 data into wind forcing file for ROMS. I looked into the script and i didn't find any place where I could make these changes , again I am only a month old to using MATLAB. The code looks pretty generic to me. I don't know maybe you could help me out in this direction as to what needs to be done.

I am attaching my script that I used. I am unsure as to what I need to change in the script.

Kind regards
-Neel
Attachments
roms_write_era5_NCARds633_frcfile.m
This script is run after roms_get_era5_NCARds633_bulkflux.m script
(7.47 KiB) Downloaded 18 times
roms_get_era5_NCARds633_bulkflux.m
(15.31 KiB) Downloaded 17 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#18 Post by kate »

I would use the NCO package for this job, specifically the "ncatted" command. Something like:

Code: Select all

ncatted -a time,,m,c,'time'
Note that the missing value between two commas means apply to all variables.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#19 Post by neelbasak08 »

Thanks a lot Kate.
I was able to sort that out but now I am facing another issue. It's not an error as no error message is popping up but I am also getting my required output files. When I execute the model it ends within a second and no output file/files are generated from it. I checked my input grid and forcing file. They are okay now. I also checked time stepping and duration of simulation. They are fine too. I am running the model on a single processor.
Time Splitting Weights for Grid 01: ndtfast = 20 nfast = 29
==================================

Primary Secondary Accumulated to Current Step

1-0.0009651193358779 0.0500000000000000-0.0009651193358779 0.0500000000000000
2-0.0013488780126037 0.0500482559667939-0.0023139973484816 0.1000482559667939
3-0.0011514592651645 0.0501156998674241-0.0034654566136460 0.1501639558342179
4-0.0003735756740661 0.0501732728306823-0.0038390322877122 0.2003372286649002
5 0.0009829200513762 0.0501919516143856-0.0028561122363360 0.2505291802792858
6 0.0029141799764308 0.0501428056118168 0.0000580677400948 0.3006719858911026
7 0.0054132615310267 0.0499970966129952 0.0054713292711215 0.3506690825040978
8 0.0084687837865132 0.0497264335364439 0.0139401130576347 0.4003955160405417
9 0.0120633394191050 0.0493029943471183 0.0260034524767397 0.4496985103876600
10 0.0161716623600090 0.0486998273761630 0.0421751148367486 0.4983983377638230
11 0.0207585511322367 0.0478912442581626 0.0629336659689853 0.5462895820219856
12 0.0257765478740990 0.0468533167015507 0.0887102138430843 0.5931428987235363
13 0.0311633730493853 0.0455644893078458 0.1198735868924696 0.6387073880313821
14 0.0368391158442262 0.0440063206553765 0.1567127027366958 0.6827137086867585
15 0.0427031802506397 0.0421643648631652 0.1994158829873354 0.7248780735499237
16 0.0486309868367616 0.0400292058506332 0.2480468698240970 0.7649072794005569
17 0.0544704302037591 0.0375976565087951 0.3025173000278562 0.8025049359093520
18 0.0600380921294285 0.0348741349986072 0.3625553921572847 0.8373790709079592
19 0.0651152103984763 0.0318722303921358 0.4276706025557610 0.8692513013000949
20 0.0694434033194839 0.0286164698722119 0.4971140058752449 0.8978677711723068
21 0.0727201499285569 0.0251442997062377 0.5698341558038018 0.9230120708785445
22 0.0745940258796570 0.0215082922098099 0.6444281816834588 0.9445203630883544
23 0.0746596950216180 0.0177785909158270 0.7190878767050768 0.9622989540041814
24 0.0724526566618460 0.0140456061647461 0.7915405333669228 0.9763445601689276
25 0.0674437485167025 0.0104229733316538 0.8589842818836253 0.9867675335005814
26 0.0590334053485720 0.0070507859058187 0.9180176872321973 0.9938183194064002
27 0.0465456732896125 0.0040991156383901 0.9645633605218099 0.9979174350447904
28 0.0292219798521905 0.0017718319739095 0.9937853403740005 0.9996892670186999
29 0.0062146596259994 0.0003107329813000 0.9999999999999999 0.9999999999999999

ndtfast, nfast = 20 29 nfast/ndtfast = 1.45000

Centers of gravity and integrals (values must be 1, 1, approx 1/2, 1, 1):

1.000000000000 1.060707743385 0.530353871693 1.000000000000 1.000000000000

Power filter parameters, Fgamma, gamma = 0.28400 0.14200

Metrics information for Grid 01:
===============================

Minimum X-grid spacing, DXmin = 4.33100151E+00 km Water points = 4.33100151E+00 km
Maximum X-grid spacing, DXmax = 4.58379434E+00 km Water points = 4.58379433E+00 km
Minimum Y-grid spacing, DYmin = 1.11244929E+01 km Water points = 1.11244929E+01 km
Maximum Y-grid spacing, DYmax = 1.11244929E+01 km Water points = 1.11244929E+01 km
Minimum Z-grid spacing, DZmin = -7.64865639E+03 m Water points = 0.00000000E+00 m
Maximum Z-grid spacing, DZmax = 3.86818936E+03 m Water points = 0.00000000E+00 m

Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 0.00000000E+00
Maximum Coriolis Courant Number = 4.91222333E-04

ANA_INITIAL - vertically integrated u-momentum component: ubar
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - vertically integrated v-momentum component: vbar
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - free-surface: zeta
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - u-momentum component: u
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - v-momentum component: v
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - potential temperature: temp
(Grid = 01, Min = 5.00000000E+00 Max = 5.00000000E+00)
I am not sure what might have gone wrong from my side ? Is there a way to sort this issue out ?

I am attaching my complete terminal log for your reference.

Kind regards
-Neel
Attachments
error in philippines grid.txt
log file from terminal
(21.79 KiB) Downloaded 17 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#20 Post by kate »

Once the model gets the initial conditions, it should start reading in your surface forcing fields. I see you have BULK_FLUXES, so it should read in shortwave, longwave, winds, etc. There's no mention of that in your output so I have no idea what went wrong. There is a listing of your input forcing files above, so it did manage to find them.

Actually, it would have read the tides first, but you haven't turned on any of the tides options. This is when I'd use a debugger, but you're probably going to have to rely on print statements. Go to initial.F and add them between get_state and get_idata.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#21 Post by neelbasak08 »

I forgot to mention that I had run another model with the exact same configuration (just different header file, forcing file ofcourse) and it ran smoothly generating the output file in the form of diag.nc, his.nc etc. I am attaching that run terminal output.
Actually, it would have read the tides first, but you haven't turned on any of the tides options. This is when I'd use a debugger, but you're probably going to have to rely on print statements. Go to initial.F and add them between get_state and get_idata.
I am not able to understand how to debug the model run in ROMS and what should I be adding between get_state and get_idata ?

Kind regards
-Neel
Attachments
Alderney_race_run.txt
Other model which ran successfully and generated output
(28.82 KiB) Downloaded 16 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#22 Post by kate »

Simply add statements such as these marked with the plus signs:

Code: Select all

diff --git a/ROMS/Nonlinear/initial.F b/ROMS/Nonlinear/initial.F
index 6e20ae7d9..25fd9c4e6 100644
--- a/ROMS/Nonlinear/initial.F
+++ b/ROMS/Nonlinear/initial.F
@@ -677,6 +677,7 @@
         END DO
       END IF
 #endif
+      print, *, "after get_state"
 
 #ifdef TLM_CHECK
 !
@@ -824,6 +825,7 @@
 !
 !  If applicable, read in input data.
 !
+      print, *, "before get_idata"
       DO ng=1,Ngrids
 !$OMP MASTER
         CALL get_idata (ng)
Then, if it makes it through both, start adding more, like after get_idata, maybe inside if it doesn't get through get_idata, or else inside get_data. Debugging can be a useful skill.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#23 Post by neelbasak08 »

Thanks a lot Kate. The issue has been solved.

I had a query, I believe I earlier hadn't switched on tides option in my header file. i wanted tidal forcing in my model as well. Therefore I added UV_TIDES in my header file. I have confusion as to what parameters I should turn on (i.e. change from F to T) in my .in file ?
! Logical switches (TRUE/FALSE) to activate writing of fields into
! HISTORY output file.

Hout(idUvel) == T ! u 3D U-velocity
Hout(idVvel) == T ! v 3D V-velocity
Hout(idu3dE) == F ! u_eastward 3D U-eastward at RHO-points
Hout(idv3dN) == F ! v_northward 3D V-northward at RHO-points
Hout(idWvel) == T ! w 3D W-velocity
Hout(idOvel) == T ! omega omega vertical velocity
Hout(idUbar) == T ! ubar 2D U-velocity
Hout(idVbar) == T ! vbar 2D V-velocity
Hout(idu2dE) == F ! ubar_eastward 2D U-eastward at RHO-points
Hout(idv2dN) == F ! vbar_northward 2D V-northward at RHO-points
Hout(idFsur) == T ! zeta free-surface
Hout(idBath) == T ! bath time-dependent bathymetry

Hout(idTvar) == T T ! temp, salt temperature and salinity

Hout(idpthR) == F ! z_rho time-varying depths of RHO-points
Hout(idpthU) == F ! z_u time-varying depths of U-points
Hout(idpthV) == F ! z_v time-varying depths of V-points
Hout(idpthW) == F ! z_w time-varying depths of W-points

Hout(idUsms) == F ! sustr surface U-stress
Hout(idVsms) == F ! svstr surface V-stress
Hout(idUbms) == F ! bustr bottom U-stress
Hout(idVbms) == F ! bvstr bottom V-stress

Hout(idUbrs) == F ! bustrc bottom U-current stress
Hout(idVbrs) == F ! bvstrc bottom V-current stress
Hout(idUbws) == F ! bustrw bottom U-wave stress
Hout(idVbws) == F ! bvstrw bottom V-wave stress
Hout(idUbcs) == F ! bustrcwmax bottom max wave-current U-stress
Hout(idVbcs) == F ! bvstrcwmax bottom max wave-current V-stress

Hout(idUbot) == F ! Ubot bed wave orbital U-velocity
Hout(idVbot) == F ! Vbot bed wave orbital V-velocity
Hout(idUbur) == F ! Ur bottom U-velocity above bed
Hout(idVbvr) == F ! Vr bottom V-velocity above bed

Hout(idW2xx) == F ! Sxx_bar 2D radiation stress, Sxx component
Hout(idW2xy) == F ! Sxy_bar 2D radiation stress, Sxy component
Hout(idW2yy) == F ! Syy_bar 2D radiation stress, Syy component
Hout(idU2rs) == F ! Ubar_Rstress 2D radiation U-stress
Hout(idV2rs) == F ! Vbar_Rstress 2D radiation V-stress
Hout(idU2Sd) == F ! ubar_stokes 2D U-Stokes velocity
Hout(idV2Sd) == F ! vbar_stokes 2D V-Stokes velocity

Hout(idW3xx) == F ! Sxx 3D radiation stress, Sxx component
Hout(idW3xy) == F ! Sxy 3D radiation stress, Sxy component
Hout(idW3yy) == F ! Syy 3D radiation stress, Syy component
Hout(idW3zx) == F ! Szx 3D radiation stress, Szx component
Hout(idW3zy) == F ! Szy 3D radiation stress, Szy component
Hout(idU3rs) == F ! u_Rstress 3D U-radiation stress
Hout(idV3rs) == F ! v_Rstress 3D V-radiation stress
Hout(idU3Sd) == F ! u_stokes 3D U-Stokes velocity
Hout(idV3Sd) == F ! v_stokes 3D V-Stokes velocity

Hout(idWamp) == F ! Hwave wave height
Hout(idWlen) == F ! Lwave wave length
Hout(idWdir) == F ! Dwave wave direction
Hout(idWptp) == F ! Pwave_top wave surface period
Hout(idWpbt) == F ! Pwave_bot wave bottom period
Hout(idWorb) == F ! Ub_swan wave bottom orbital velocity
Hout(idWdis) == F ! Wave_dissip wave dissipation

Hout(idPair) == T ! Pair surface air pressure
Hout(idTair) == T ! Tair surface air temperature
Hout(idUair) == T ! Uair surface U-wind component
Hout(idVair) == T ! Vair surface V-wind component

Hout(idTsur) == F F ! shflux, ssflux surface net heat and salt flux
Hout(idLhea) == F ! latent latent heat flux
Hout(idShea) == F ! sensible sensible heat flux
Hout(idLrad) == F ! lwrad longwave radiation flux
Hout(idSrad) == F ! swrad shortwave radiation flux
Hout(idEmPf) == F ! EminusP E-P flux
Hout(idevap) == F ! evaporation evaporation rate
Hout(idrain) == F ! rain precipitation rate

Hout(idDano) == T ! rho density anomaly
Hout(idVvis) == F ! AKv vertical viscosity
Hout(idTdif) == F ! AKt vertical T-diffusion
Hout(idSdif) == F ! AKs vertical Salinity diffusion
Hout(idHsbl) == F ! Hsbl depth of surface boundary layer
Hout(idHbbl) == F ! Hbbl depth of bottom boundary layer
Hout(idMtke) == F ! tke turbulent kinetic energy
Hout(idMtls) == F ! gls turbulent length scale
I didn't find anything specific to tides in here. Also do I need to change the following part as well:

Code: Select all

 ! Input tidal forcing file name.

    TIDENAME == roms_tides.nc

! Input forcing NetCDF file name(s). 
I have already added both my wind and tidal forcing netcdf files in this section:
! Input forcing NetCDF file name(s).
!
! The USER has the option to enter several sets of file names for each
! nested grid. For example, the USER may have different data for the
! wind products, heat fluxes, etc. Alternatively, if the all the forcing
! files are the same for nesting and the data is in its native resolution,
! we could enter only one set of files names and ROMS will replicate those
! files internally to the remaining grids using the plural KEYWORD protocol.
!
! The model will scan the files and will read the needed data from the first
! file in the list containing the forcing field. Therefore, the order of the
! filenames is critical. If using multiple forcing files per grid, first
! enter all the file names for grid one followed by two, and so on. It is
! also possible to split input data time records into several NetCDF files
! (see Prolog instructions above). Use a single line per entry with a
! continuation (\) or a vertical bar (|) symbol after each entry, except
! the last one.

NFFILES == 2 ! number of unique forcing files

FRCNAME == frc_TPXO9_cebu01Jan2020_v4a.nc \ ! forcing file 1, grid 1
frc_MYAPPLICATION_ERA5_bulkflux_cebu_v1202001.nc !
Kind regards
-Neel

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#24 Post by kate »

All those Dout flags control the output, not the tides. I have this section in my .h file:

Code: Select all

/* tides */

#define LTIDES
#ifdef LTIDES
# if defined AVERAGES && !defined USE_DEBUG
#  define FILTERED
# endif
# define SSH_TIDES
# define UV_TIDES
# define ADD_FSOBC
# define ADD_M2OBC
# undef RAMP_TIDES
# define TIDES_ASTRO
# define POT_TIDES
#endif
Some of these won't be available in the ROMS trunk, but the SSH_TIDES, UV_TIDES, ADD_xxxx should be.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#25 Post by neelbasak08 »

Thanks a lot Kate.

I was able to sort that out thanks to your help. I am facing another issue now. Now, I want to use SWAN along with ROMS. I am not sure how to do it for my existing ROMS model. I tried to activate SWAN by adding:

Code: Select all

 #define SWAN_COUPLING 
But while building it using ./build_roms.sh I am getting an error of the kind :
ROMS/Bin/cpp_clean /home/sbasak08/roms/Projects/Cebu/Build_romsG/m_fileio.f90
/usr/bin/cpp -P -traditional -w -DLINUX -DX86_64 -DGFORTRAN -D'ROOT_DIR="/home/sbasak08/roms"' -DCEBU -D'HEADER="cebu.h"' -D'ROMS_HEADER="/home/sbasak08/roms/Projects/Cebu/cebu.h"' -DNestedGrids= -D'ANALYTICAL_DIR="/home/sbasak08/roms/Projects/Cebu"' -D'MY_ANALYTICAL="on"' -D'SVN_URL="https://www.myroms.org/svn/src/trunk"' -D'SVN_REV="1053"' -IROMS/Include -I/home/sbasak08/roms/Projects/Cebu -IROMS/Nonlinear -IROMS/Nonlinear/Biology -IROMS/Nonlinear/Sediment -IROMS/Utility -IROMS/Drivers -IROMS/Functionals -I/home/sbasak08/roms/Projects/Cebu -IWaves/SWAN/Src -IMaster -ICompilers -D'HEADER_DIR="/home/sbasak08/roms/Projects/Cebu"' Waves/SWAN/Src/swmod2.F > /home/sbasak08/roms/Projects/Cebu/Build_romsG/swmod2.f90
ROMS/Bin/cpp_clean /home/sbasak08/roms/Projects/Cebu/Build_romsG/swmod2.f90
cd /home/sbasak08/roms/Projects/Cebu/Build_romsG; /usr/bin/gfortran -c -frepack-arrays -g -O0 -fbounds-check -fbacktrace -fcheck=all -fsanitize=address -fsanitize=undefined -finit-real=nan -ffpe-trap=invalid,zero,overflow -ffixed-form -ffree-form -ffree-line-length-none -ffixed-form swmod2.f90
swmod2.f90:1079: Error: Can't open included file 'mpif.h'
make: *** [Waves/SWAN/Src/Module.mk:15: /home/sbasak08/roms/Projects/Cebu/Build_romsG/swmod2.o] Error 1
I am not sure what might be triggering this error. I am not even sure how to proceed in order to incorporate SWAN in my current ROMS model.

I am attaching my complete build file error and cpp defs :
CPP defs header file :
/*
** svn $Id: basin.h 1001 2020-01-10 22:41:16Z arango $
*******************************************************************************
** Copyright (c) 2002-2020 The ROMS/TOMS Group **
** Licensed under a MIT/X style license **
** See License_ROMS.txt **
*******************************************************************************
**
** Options for Big Bad Basin.
**
** Application flag: BASIN
** Input script: roms_basin.in
*/

#define UV_ADV
#define UV_COR
#define UV_QDRAG
#define UV_VIS4
#define MIX_S_UV
#define DJ_GRADPS
#define SPLINES_VDIFF
#define SPLINES_VVISC
#define BULK_FLUXES
#define SOLVE3D
#define BODYFORCE
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_INITIAL
#define ANA_SSFLUX
#define ANA_DRAG
#define ANA_BSFLUX
#define ANA_BTFLUX
#define MASKING
#define SSH_TIDES
#define UV_TIDES
#undef RAMP_TIDES
#define ADD_FSOBC
#define ADD_M2OBC
#define SWAN_COUPLING
~ ~ ~ ~ "cebu.h" 39L, 1058C
Any help is deeply appreciated by me.
Kind regards
-Neel
Attachments
error in build file.txt
Build file error as seen in terminal
(320.88 KiB) Downloaded 7 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#26 Post by kate »

I always have USE_MPIF90 on so that it knows where to find mpif.h.
Are you using COAWST? It is recommended to use that code when coupling to SWAN. Not that I've done it with any of the versions.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#27 Post by neelbasak08 »

Thanks a lot Kate for the reply.

I changed in my makefile and switched USE_MPIF90=on in my makefile (and got romsS as executable)and changed it accordingly in my build_roms.sh file as well but still for some reason I continue to get the same error as I had stated before while execeting the build_roms.sh file.

I am not using COAWST as you had asked whether I did or not. I believe COAWST requires to install complete version of COAWST with their version of ROMS in it.
Kind regards
-Neel
Last edited by neelbasak08 on Thu Mar 18, 2021 1:26 pm, edited 1 time in total.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#28 Post by neelbasak08 »

kate wrote: Fri Feb 12, 2021 7:39 pm Simply add statements such as these marked with the plus signs:

Code: Select all

diff --git a/ROMS/Nonlinear/initial.F b/ROMS/Nonlinear/initial.F
index 6e20ae7d9..25fd9c4e6 100644
--- a/ROMS/Nonlinear/initial.F
+++ b/ROMS/Nonlinear/initial.F
@@ -677,6 +677,7 @@
         END DO
       END IF
 #endif
+      print, *, "after get_state"
 
 #ifdef TLM_CHECK
 !
@@ -824,6 +825,7 @@
 !
 !  If applicable, read in input data.
 !
+      print, *, "before get_idata"
       DO ng=1,Ngrids
 !$OMP MASTER
         CALL get_idata (ng)
Then, if it makes it through both, start adding more, like after get_idata, maybe inside if it doesn't get through get_idata, or else inside get_data. Debugging can be a useful skill.
Hello Kate !
This is in reference to one of your previous post in this thread.

I tried to add print statement in initial.F file (I made a copy of initial.F in my project directory so as to not to overwrite the existing initial.F in NONLINEAR folder). Before get_state and get_idata but it doesn't print anything so as to specify whats going wrong. In fact it ends in the same way as previous error i.e. stopping abruptly. I tried adding a few print statements to #ifdef ANA_INITIAL but with no luck.

I am not sure what might be going wrong in this case. I'm attaching my terminal output for your reference.
Any help in any kind is deeply appreciated by me.
Kind regards
Neel
error_in_roms_terminal_for_model.txt
(21.11 KiB) Downloaded 9 times

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#29 Post by kate »

You know it got to ANA_INITIAL because it printed stuff from there. I think the next calls it would make from initial.F are these:

Code: Select all

          CALL set_depth0 (ng, tile, iNLM)
          CALL set_depth  (ng, tile, iNLM)
          CALL set_massflux (ng, tile, iNLM)
I would add print statements before these, then after these, then after the call to rho_eos.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#30 Post by neelbasak08 »

Thanks Kate.

I'm very sorry to inform you that after adding print statements to the lines you had directed me, it didn't print anything on screen. It stopped as usual. So was the case before and after adding print statement CALL omega (ng, tile, iNLM),CALL rho_eos (ng, tile, iNLM) and CALL ana_psource (ng, tile, iNLM).

What might be the reason in that case why the ROMS model abruptly stops without generating neither an error nor an output ?

Any help is deeply appreciated by me.

Kind regards
-Neel

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#31 Post by kate »

We know it's dying for some unknown reason. So maybe it didn't actually finish ana_initial. I would look in there. Did you change anything there?

Personally, I would run this in the debugger to watch it go bad.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#32 Post by neelbasak08 »

Thanks Kate !

I don't think so I changed anything in ana_initial . Because I am able to run a different model based on exact same configurations in ROMS using same parameters and just changing the grid, wind and tidal forcing files. But when I run this model, it ends up abruptly.

I was wondering what's the debugging tool you were mentioning in your previous post in this thread. Does that debugger come installed with ROMS package ?

Kind regards
-Neel

User avatar
kate
Posts: 3936
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

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

#33 Post by kate »

The debugger I use is called totalview. There is also ddt. Both are quite expensive, but the supercomputer center I use pays for the license. For free, there is gdb, which works if you run on just one processor. There may be a gui (ddd?) that can make it easier to use, but using these things is still a skill to develop. Once you learn that skill, it can be very powerful.

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#34 Post by neelbasak08 »

Thanks Kate !

Can it be an issue with the mesh that I'm using ? Maybe ROMS isn't able to read every parameter from the grid file I'm using ? I'm not sure about that as I just changed my resolution in my previous and it happened to stop. Can it be an issue with my bathymetry or forcing files ?

I believe something looks a bit fishy to me in this portion of the terminal output:
Metrics information for Grid 01:
===============================

Minimum X-grid spacing, DXmin = 3.36048413E-01 km Water points = 3.36048413E-01 km
Maximum X-grid spacing, DXmax = 3.36480082E-01 km Water points = 3.36480082E-01 km
Minimum Y-grid spacing, DYmin = 3.61553977E-01 km Water points = 3.61553977E-01 km
Maximum Y-grid spacing, DYmax = 3.61554076E-01 km Water points = 3.61554076E-01 km
Minimum Z-grid spacing, DZmin = -1.69797972E+04 m Water points = 0.00000000E+00 m
Maximum Z-grid spacing, DZmax = 3.35531350E+04 m Water points = 0.00000000E+00 m

Minimum barotropic Courant Number = 0.00000000E+00
Maximum barotropic Courant Number = 0.00000000E+00
Maximum Coriolis Courant Number = 6.74928730E-04


ANA_INITIAL - vertically integrated u-momentum component: ubar
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - vertically integrated v-momentum component: vbar
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - free-surface: zeta
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - u-momentum component: u
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - v-momentum component: v
(Grid = 01, Min = 0.00000000E+00 Max = 0.00000000E+00)
ANA_INITIAL - potential temperature: temp
(Grid = 01, Min = 5.00000000E+00 Max = 5.00000000E+00)
How come minimum and maximum barotropic Courant Number == 0.00000000E+00. Might this be creating the issue ?
Kind regards
-Neel

User avatar
wilkin
Posts: 623
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

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

#35 Post by wilkin »

Minimum Z-grid spacing, DZmin = -1.69797972E+04 m Water points = 0.00000000E+00 m
You have h = 0 somewhere.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
wilkin
Posts: 623
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

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

#36 Post by wilkin »

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.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
neelbasak08
Posts: 84
Joined: Wed Dec 09, 2020 3:58 pm
Location: Thapar Institute of Engineering and Technology, Patiala, PN, India

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

#37 Post by neelbasak08 »

Thanks, Mr. Wilkin!

Another thing which I wanted to ask is that, is there a way or MATLAB script in ROMS that can show the value of given variables at certain a given depth in tabular format?
What I mean is that for example, I need to get a tabular form of u momentum component velocity at a certain depth say d of coordinates lat = x and lon = y; arranged according to their coordinates and time? Because u momentum component is in 4D double array in the form of xi_u x eta_u x s_rho x ocean_time. Am I missing something that in MATLAB capability that can do that?

Or is there a MATLAB script for that?

Kind regards
-Neel

User avatar
wilkin
Posts: 623
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

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

#38 Post by wilkin »

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 structure. See >> help roms_zview. Or you can just do the slice and no plot. See >> help roms_zslice.

If you want ROMS itself to sample the model at a fixed point and output a time series then see the ROMS option #define STATIONS.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply