A ROMS nesting question

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
d.kobashi
Posts: 66
Joined: Tue Sep 28, 2010 11:59 pm
Location: Texas A&M University

A ROMS nesting question

#1 Unread post by d.kobashi »

Hi,

I have a question on nesting.

I set up a refined grid and contact file to run a nested model. When I ran the model, I had the following error.

Code: Select all

 NETCDF_CHECK_DIM - inconsistent size of dimension: xi_rho    644 1112
                    in file: /scratch/user/d.kobashi/projects/hindcasts/projects/nwgom/inputs/frc/2013/nwgom_frc_2013_01.nc
 Found Error: 02   Line: 177      Source: ROMS/Utility/inquiry.F
 Found Error: 02   Line: 126      Source: ROMS/Utility/get_2dfld.F
 Found Error: 02   Line: 308      Source: ROMS/Nonlinear/get_data.F
 Found Error: 02   Line: 851      Source: ROMS/Nonlinear/initial.F
 Found Error: 02   Line: 200      Source: ROMS/Drivers/nl_ocean.h
I think that the error is as a result of not specifying forcing file for my child grid because I want to use the same forcing data for the parent and child grids.

I found the following statement in ocean.in
! 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.
According to the statement, we can either specify a different forcing file for a child domain if we want to use higher-resolution data or use forcing of the parent grid to a child grid. I chose the latter so my FRCNAME in ocean.in is the same as the parent grid-only model as follow.

Code: Select all

     NFFILES == 1                  ! number of unique forcing files

     FRCNAME == ./frc/2013/nwgom_frc_2013_01.nc |
                             ./frc/2013/nwgom_frc_2013_02.nc | 
                             ./frc/2013/nwgom_frc_2013_03.nc | 
                             ./frc/2013/nwgom_frc_2013_04.nc | 
                             ./frc/2013/nwgom_frc_2013_05.nc | 
                             ./frc/2013/nwgom_frc_2013_06.nc | 
                             ./frc/2013/nwgom_frc_2013_07.nc | 
                             ./frc/2013/nwgom_frc_2013_08.nc | 
                             ./frc/2013/nwgom_frc_2013_09.nc | 
                             ./frc/2013/nwgom_frc_2013_10.nc | 
                             ./frc/2013/nwgom_frc_2013_11.nc | 
                             ./frc/2013/nwgom_frc_2013_12.nc | 
                             ./frc/2014/nwgom_frc_2014_01.nc  
The above FRCNAME worked fine for the non-nesting run (i.e. parent grid only).

Then I had the error I mentioned.

Can someone tell me what went wrong? What do you mean by "the plural keyword protocol" in the statement in ocean.in?
I run the model with COAWST version 3.3 (ROMS 3.7).

Thanks in advance.

-DJ

MIDHILAVARNAV
Posts: 30
Joined: Fri Dec 15, 2017 6:07 pm

Re: A ROMS nesting question

#2 Unread post by MIDHILAVARNAV »

Dear Kobashi,

I also had the same problem when I used same forcing files for nested grids(exception tidal forcing), the same was solved by repeating the forcing names as follows

The following is an excerpt from my .in file

NFFILES == 9 9 ! number of unique forcing files

FRCNAME == input/ncmrwf/Input_SHRTWV.nc \
input/ncmrwf/Input_LONGWV.nc \
input/ncmrwf/Input_U10.nc \
input/ncmrwf/Input_V10.nc \
input/ncmrwf/Input_T2M.nc \
input/ncmrwf/Input_Q2M.nc \
input/ncmrwf/Input_PRES.nc \
input/ncmrwf/Input_PRATE.nc \
input/frc_romsIO.nc \
input/ncmrwf/Input_SHRTWV.nc \
input/ncmrwf/Input_LONGWV.nc \
input/ncmrwf/Input_U10.nc \
input/ncmrwf/Input_V10.nc \
input/ncmrwf/Input_T2M.nc \
input/ncmrwf/Input_Q2M.nc \
input/ncmrwf/Input_PRES.nc \
input/ncmrwf/Input_PRATE.nc \
input/child_frc.nc

I hope this helps.

MV

d.kobashi
Posts: 66
Joined: Tue Sep 28, 2010 11:59 pm
Location: Texas A&M University

Re: A ROMS nesting question

#3 Unread post by d.kobashi »

Hello,
Thanks for your input.

I tried your suggestion and I had the following error.

Code: Select all

 NETCDF_CHECK_DIM - inconsistent size of dimension: eta_rho    400  872
                    in file: /scratch/user/d.kobashi/projects/hindcasts/projects/nwgom/inputs/frc/2013/nwgom_frc_2013.nc
It seems that the forcing file for the child grid needs to be the same dimension of the child grid (for the above error, 400 is for the parent grid and 872 is for the child grid). Did you get the same error? I may need to extract and interpolate the forcing file of the parent grid for the child grid. I did that for initialization. It's a bit cumbersome and will suck up my storage space because the file size of the forcing file will be huge. Sigh...

Hope I don't need to do the same for clm and bry files....

-DJ

MIDHILAVARNAV
Posts: 30
Joined: Fri Dec 15, 2017 6:07 pm

Re: A ROMS nesting question

#4 Unread post by MIDHILAVARNAV »

Dear Kobashi,

You may please note that ROMS has the capability to perform the spatial and temporal interpolation of 2D forcing fields. So it is not necessary that you need to interpolate your forcing files to your grid. But make sure that forcing file is either larger in dimension or smaller ( I mean coordinates) than your grid. If the grid dimension matches the forcing dimension, then such inconsistency arises in which you may need 2 forcing files for 2 grids. For my case, for instance I am having forcing file of dimension: 441x321 (North Indian Ocean lower resolution)
and Parent grid as 1081 x757 (North Indian Ocean Higher resolution)
Child grid as 452 x671 (West Coast of India)
I did not create forcing files by interpolation, instead just laid down all the variables needed as separate files. ( as was specified earlier)

That is the grid dimensions do not match with that of forcing.

I suppose that the forcing file which you used
/scratch/user/d.kobashi/projects/hindcasts/projects/nwgom/inputs/frc/2013/nwgom_frc_2013.nc
is not created by interpolating the forcing fileds to your parent grid.
The best option is to not interpolate your forcing fields to any grid, let them be in their normal grid and let ROMS itself use its capability to interpolate. This way you could save your time and space.

MV

d.kobashi
Posts: 66
Joined: Tue Sep 28, 2010 11:59 pm
Location: Texas A&M University

Re: A ROMS nesting question

#5 Unread post by d.kobashi »

Thanks for your help.

After I recreated forcing file based on your suggestion, I passed the error on surface fluxes and now I am getting a similar error for climatology file as follow.

Code: Select all

 NETCDF_CHECK_DIM - inconsistent size of dimension: xi_rho    644 1112
                    in file: /scratch/user/d.kobashi/projects/hindcasts/projects/nwgom/inputs/bryclm/2013/nwgom.clm.2013.nc
You mentioned that the interpolation inside ROMS is for 2-D fields. What about climatology files which has 3-D as well as 2-D fields? Do we need to extract/interpolate manually for child grids?
If yes, it may be tricky as ROMS has multiple coordinate coordinate dimensions for rho, u, v, psi grids. Not easy to use NCO or CDO to extract.

BTW, the following did not work.

Code: Select all

      NCLMFILES == 1 1                        ! number of climate files

      CLMNAME == ./inputs/bryclm/2013/nwgom.clm.2013.nc \
                              ./inputs/bryclm/2013/nwgom.clm.2013.nc

Thanks,

-DJ

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

Re: A ROMS nesting question

#6 Unread post by kate »

The climatology files are meant to be provided on your grid. Yes, if you need climatology nudging, you will need to make files for all grids that need it, though one might hope that online nesting will mean the children don't need climatology nudging.

d.kobashi
Posts: 66
Joined: Tue Sep 28, 2010 11:59 pm
Location: Texas A&M University

Re: A ROMS nesting question

#7 Unread post by d.kobashi »

Thanks for your input.

Hmm... I am a bit confused.
I don't understand what's the point of providing climatology file for child grids for online nesting. If we do online nesting (either one way or two way), there should be no nudging for child grids (otherwise, there is no difference between online and offline nesting). I thought the contact file we need to create is to connect parent and child grid models to provide boundary conditions (with Nes option in ocean.in). So when specifying climatology and boundary file for child grids, those data are not actually used?

What I did so far is to create zero nudging file for child grids (a dummy file) so there is no nudging for child grids (i.e. nudging for parent and child grids is different).
And I created a dummy climatology and boundary file for child grids because I think those data are not used.

When I did the above, the model blew up only after 2 time steps... so my interpretation on clima and bry files for child grids may be wrong...

Any comments would be appreciated .

Thanks,

-DJ

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: A ROMS nesting question

#8 Unread post by arango »

Check your standard input file, roms.in or your standard output log file, which contains lots of information. Notice that in roms.in we have:

Code: Select all

! Logical switches (TRUE/FALSE) to nudge the desired climatology field(s).
! If not analytical climatology fields, users need to turn ON the logical
! switches above to process the fields from the climatology NetCDF file
! that are needed for nudging. See the glossary below for details.

 LnudgeM2CLM == F  F                       ! 2D momentum
 LnudgeM3CLM == F  F                       ! 3D momentum

  LnudgeTCLM == T F                        ! temperature, salinity, inert
So you can have nudging in the desired nested grids. If you do nudging in grid ng=1, make sure that the logical flag above it is false if nudging is not desired in the other nested grids. It is that simple. Now, why are you nudging in your shallow-water application? Is the nudging because of open boundary conditions? It absolutely does not make sense to nudging free-surface. It was removed from ROMS many years ago because it affects the continuity equation. The free-surface is an expression of the time evolution of the vertically integrated momentum divergence.

When in doubt, it is always a good strategy to check the *.f90 files in the Build directory. It will provide the information that you are seeking.

d.kobashi
Posts: 66
Joined: Tue Sep 28, 2010 11:59 pm
Location: Texas A&M University

Re: A ROMS nesting question

#9 Unread post by d.kobashi »

Hmm...

I want to setup climatology and nudging for 3d momemtunm and tracers (temp, salt, dye_01) only for the parent grids of my nesting runs.

So if I only need nudging for the parent grids, the setup in ocean.in for climatology and nudging is the following?

Code: Select all

      LsshCLM == F F                         ! sea-surface height
      Lm2CLM == F F                         ! 2D momentum
      Lm3CLM == T F                         ! 3D momentum
  
    LtracerCLM == T T T F F F              ! temperature, salinity, inert

    LnudgeM2CLM == F F                         ! 2D momentum
    LnudgeM3CLM == T F                         ! 3D momentum
  
    LnudgeTCLM == T T T F F F                   ! temperature, salinity, inert
If so, I do not have to include climatology file and nudging coefficient file for the child grids?


Also, I found something strange. As suggested, I created surface fluxes file for lon, lat grids which are the same as the grid dimension of the forcing file (~32 km) and are larger than the parent and child domain.
I did not get the error when ROMS reads the file; however, The min and max values of all surface forcing variables on the log is 1.0e+37 (see below) as well as child grid climatology file. I guess ROMS did not read surface flux data and climatology data of the child grids properly. That may be the reason why the model blew up.

Code: Select all

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.00000000E+35)      regrid = T
1261     GET_2DFLD   - surface v-wind component,                        2013-01-01 00:00:00.00
1262                    (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1263                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1264                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
1265     GET_2DFLD   - surface air pressure,                            2013-01-01 00:00:00.00
1266                    (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1267                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1268                    (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T
1269     GET_2DFLD   - surface air temperature,                         2013-01-01 00:00:00.00
1270                    (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1271                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1272                  (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
1273     GET_2DFLD   - surface air relative humidity,                   2013-01-01 00:00:00.00
1274                    (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1275                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1276                  (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
1277     GET_2DFLD   - cloud fraction,                                  2013-01-01 00:00:00.00
1278                    (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1279                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1280                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
1281     GET_2DFLD   - solar shortwave radiation flux,                  2013-01-01 00:00:00.00
1282                    (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1283                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1284                    (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T
1285     GET_2DFLD   - rain fall rate,                                  2013-01-01 00:00:00.00
1286                    (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1287                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1288                    (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T

1417     GET_2DFLD   - surface u-wind component,                        2013-01-01 00:00:00.00
1418                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1419                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1420                   (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T
1421     GET_2DFLD   - surface v-wind component,                        2013-01-01 00:00:00.00
1422                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1423                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1424                   (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T
1425     GET_2DFLD   - surface air pressure,                            2013-01-01 00:00:00.00
1426                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1427                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1428                  (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
1429     GET_2DFLD   - surface air temperature,                         2013-01-01 00:00:00.00
1430                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1431                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1432                   (Min =  1.00000000E+35 Max = -1.00000000E+35)      regrid = T
1433     GET_2DFLD   - surface air relative humidity,                   2013-01-01 00:00:00.00
1434                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1435                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1436                   (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T
1437     GET_2DFLD   - cloud fraction,                                  2013-01-01 00:00:00.00
1438                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1439                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1440                  (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T
1441     GET_2DFLD   - solar shortwave radiation flux,                  2013-01-01 00:00:00.00
1442                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1443                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1444                  (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T
1445     GET_2DFLD   - rain fall rate,                                  2013-01-01 00:00:00.00
1446                    (Grid=02, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1447                    (Tmin=      15706.0000 Tmax=      16101.9583)      t =      15706.0000
1448                   (Min =  1.00000000E+35 Max = -1.00000000E+35)     regrid = T

1357     GET_3DFLD   - u-momentum component climatology,                2012-12-31 12:00:00.00
1358                    (Grid=01, Rec=0000001, Index=1, File: nwgom.clm.2013.nc)
1359                    (Tmin=      15705.5000 Tmax=      16071.5000)      t =      15705.5000
1360                    (Min = -4.98561160E-01 Max =  3.69598288E-01)
1361     GET_3DFLD   - v-momentum component climatology,                2012-12-31 12:00:00.00
1362                    (Grid=01, Rec=0000001, Index=1, File: nwgom.clm.2013.nc)
1363                    (Tmin=      15705.5000 Tmax=      16071.5000)      t =      15705.5000
1364                    (Min = -5.84828497E-01 Max =  6.65681484E-01)
1365     GET_3DFLD   - potential temperature climatology,               2012-12-31 12:00:00.00
1366                    (Grid=01, Rec=0000001, Index=1, File: nwgom.clm.2013.nc)
1367                    (Tmin=      15705.5000 Tmax=      16071.5000)      t =      15705.5000
1368                    (Min =  3.85741550E+00 Max =  2.52482539E+01)
1369     GET_3DFLD   - salinity climatology,                            2012-12-31 12:00:00.00
1370                    (Grid=01, Rec=0000001, Index=1, File: nwgom.clm.2013.nc)
1371                    (Tmin=      15705.5000 Tmax=      16071.5000)      t =      15705.5000
1372                    (Min =  7.91513724E+00 Max =  3.67398640E+01)
1373     GET_3DFLD   - dye concentration, type 01 climatology,          2012-12-31 12:00:00.00
1374                    (Grid=01, Rec=0000001, Index=1, File: nwgom.clm.2013.nc)
1375                    (Tmin=      15705.5000 Tmax=      16071.5000)      t =      15705.5000
1376                    (Min =  2.08549218E+02 Max =  3.25602617E+02)
1377     GET_3DFLD   - dye concentration, type 02 climatology,          2012-12-31 12:00:00.00
1378                    (Grid=01, Rec=0000001, Index=1, File: nwgom.clm.2013.nc)
1379                    (Tmin=      15705.5000 Tmax=      16071.5000)      t =      15705.5000
1380                    (Min =  0.00000000E+00 Max =  0.00000000E+00)
1381     GET_3DFLD   - dye concentration, type 03 climatology,          2012-12-31 12:00:00.00
1382                    (Grid=01, Rec=0000001, Index=1, File: nwgom.clm.2013.nc)
1383                    (Tmin=      15705.5000 Tmax=      16071.5000)      t =      15705.5000
1384                    (Min =  0.00000000E+00 Max =  0.00000000E+00)

1449     GET_3DFLD   - u-momentum component climatology,                2013-01-01 00:00:00.00
1450                    (Grid=02, Rec=0000001, Index=1, File: nwgom.clm.2013_child.nc)
1451                    (Tmin=      15706.0000 Tmax=      15737.0000)      t =      15706.0000
1452                  (Min =  1.00000000E+37 Max = -1.00000000E+37)
1453     GET_3DFLD   - v-momentum component climatology,                2013-01-01 00:00:00.00
1454                    (Grid=02, Rec=0000001, Index=1, File: nwgom.clm.2013_child.nc)
1455                    (Tmin=      15706.0000 Tmax=      15737.0000)      t =      15706.0000
1456                    (Min =  1.00000000E+37 Max = -1.00000000E+37)
1457     GET_3DFLD   - potential temperature climatology,               2013-01-01 00:00:00.00
1458                    (Grid=02, Rec=0000001, Index=1, File: nwgom.clm.2013_child.nc)
1459                    (Tmin=      15706.0000 Tmax=      15737.0000)      t =      15706.0000
1460                   (Min =  1.00000000E+37 Max = -1.00000000E+37)
1461     GET_3DFLD   - salinity climatology,                            2013-01-01 00:00:00.00
1462                    (Grid=02, Rec=0000001, Index=1, File: nwgom.clm.2013_child.nc)
1463                    (Tmin=      15706.0000 Tmax=      15737.0000)      t =      15706.0000
1464                   (Min =  1.00000000E+37 Max = -1.00000000E+37)
1465     GET_3DFLD   - dye concentration, type 01 climatology,          2013-01-01 00:00:00.00
1466                    (Grid=02, Rec=0000001, Index=1, File: nwgom.clm.2013_child.nc)
1467                    (Tmin=      15706.0000 Tmax=      15737.0000)      t =      15706.0000
1468                   (Min =  1.00000000E+37 Max = -1.00000000E+37)
1469     GET_3DFLD   - dye concentration, type 02 climatology,          2013-01-01 00:00:00.00
1470                    (Grid=02, Rec=0000001, Index=1, File: nwgom.clm.2013_child.nc)
1471                    (Tmin=      15706.0000 Tmax=      15737.0000)      t =      15706.0000
1472                 (Min =  1.00000000E+37 Max = -1.00000000E+37)
1473     GET_3DFLD   - dye concentration, type 03 climatology,          2013-01-01 00:00:00.00
1474                    (Grid=02, Rec=0000001, Index=1, File: nwgom.clm.2013_child.nc)
1475                    (Tmin=      15706.0000 Tmax=      15737.0000)      t =      15706.0000
1476                   (Min =  1.00000000E+37 Max = -1.00000000E+37)



However, I created the surface flux file based on wikiROMS FAQ.
ROMS can also read fields from NetCDF files, also stresses or winds, depending on the state of BULK_FLUXES. These can be provided as:
Point measurements, in which ROMS will rotate to the correct directions from East (u) and North (v).
Gridded fields on the ROMS grid, in which case the directions have to match the directions on your grid.
Gridded fields on a larger, usually coarser grid. These are in East and North, with ROMS doing the rotation. ROMS picks up its cue on whether to interpolate+rotate or not based on the grid dimensions of these fields. If the dimensions exactly match that of your own grid, ROMS will assume that it is on your grid. If you plan on using global fields of dimension 180x90, say, don't build a grid with those dimensions. The cdl for a working example is shown here:
netcdf rain.1948-2006 {
dimensions:


rain_time = UNLIMITED ; // (708 currently)
lat = 94 ;
lon = 192 ;

variables:


float rain(rain_time, lat, lon) ;
rain:_FillValue = -1.e+34f ;
rain:units = "Kg_meter-2_sec-1\000Kg_meter-2_sec-1" ;
rain:long_name = "rain fall rate" ;
rain:coordinates = "lon lat" ;
double lat(lat) ;
lat:units = "degrees_north" ;
lat:point_spacing = "uneven" ;
lat:axis = "Y" ;
double lon(lon) ;
lon:units = "degrees_east" ;
lon:modulo = 360. ;
lon:point_spacing = "even" ;
lon:axis = "X" ;
float SNOW(rain_time, lat, lon) ;
SNOW:missing_value = -1.e+34f ;
SNOW:_FillValue = -1.e+34f ;
SNOW:long_name = "SNOW_FRAC[D=2,GXYT=PRC_MOD@ASN]*PRC_MOD" ;
SNOW:long_name_mod = "L=1:12" ;
double rain_time(rain_time) ;
rain_time:units = "days since 1900-01-01 00:00:00" ;
rain_time:axis = "T" ;
rain_time:bounds = "TIME_bnds" ;
rain_time:time_origin = "1-JAN-1948" ;
rain_time:calendar = "LEAP" ;
The meta data of the surface flux file I created is below.

Code: Select all

netcdf nwgom_frc_2013 {                        
dimensions:                                   
        time = UNLIMITED ; // (9504 currently)
        lon = 73 ;                                 
        lat = 53 ;                             
variables:                                    
        double time(time) ;                                                   
                time:long_name = "bulk formulation atmospheric forcing time" ;
                time:units = "days since 1970-01-01 00:00:00" ;
        double lon(lon) ;                       
                lon:long_name = "Longitude" ;  
                lon:units = "degrees_east" ;
                lon:axis = "X" ;      
        double lat(lat) ;                                      
                lat:long_name = "Latitude" ;    
                lat:units = "degrees_north" ;  
                lat:axis = "Y" ;     
        double Tair(time, lat, lon) ;                       
                Tair:long_name = "surface air temperature" ;
                Tair:units = "Celsius" ;          
                Tair:coordinates = "lon lat" ;     
                Tair:time = "time" ;                                                                                
        double Pair(time, lat, lon) ;                                                                                                                         
                Pair:long_name = "surface pressure" ;                                                                                                         
                Pair:units = "millibar" ;      
                Pair:coordinates = "lon lat" ;                     
                Pair:time = "time" ;                 
        double Qair(time, lat, lon) ;                 
                Qair:long_name = "relative humidity" ;
                Qair:units = "percentage" ;    
                Qair:coordinates = "lon lat" ;
                Qair:time = "time" ; 
        double rain(time, lat, lon) ;                  
                rain:long_name = "precipitation rate" ;
                rain:units = "kg m-2 s-1" ;   
                rain:coordinates = "lon lat" ;
                rain:time = "time" ;   
        double swflux(time, lat, lon) ;                           
                swflux:long_name = "net surface freshwater flux" ;
                swflux:units = "cm day-1" ;     
                swflux:coordinates = "lon lat" ;
                swflux:time = "time" ;                               
                swflux:positive_value = "downward flux, freshening" ;
                swflux:negative_value = "upward flux, salting" ;
        double lwrad(time, lat, lon) ;                           
                lwrad:long_name = "net longwave radiation flux" ;
                lwrad:units = "Watts metre-2" ;
                lwrad:coordinates = "lon lat" ;
                lwrad:time = "time" ;                            
                lwrad:positive_value = "downward flux, heating" ;
                lwrad:negative_value = "upward flux, cooling" ;
        double lwrad_down(time, lat, lon) ;                           
                lwrad_down:long_name = "downward longwave radiation" ;
                lwrad_down:units = "Watts metre-2" ;
                lwrad_down:coordinates = "lon lat" ;
                lwrad_down:time = "time" ;
        double swrad(time, lat, lon) ;                   
                swrad:long_name = "shortwave radiation" ;
                swrad:units = "Watts metre-2" ;
                swrad:coordinates = "lon lat" ;
                swrad:time = "time" ;                            
                swrad:positive_value = "downward flux, heating" ;
                swrad:negative_value = "upward flux, cooling" ;
        double shflux(time, lat, lon) ;                     
                shflux:long_name = "net surface heat flux" ;
                shflux:units = "Watts metre-2" ;
                shflux:coordinates = "lon lat" ;
                shflux:time = "time" ;                            
                shflux:positive_value = "downward flux, heating" ;
                shflux:negative_value = "upward flux, cooling" ;
        double Uwind(time, lat, lon) ;      
                Uwind:long_name = "u-wind" ;    
                Uwind:units = "metre second-1" ;
                Uwind:coordinates = "lon lat" ;
                Uwind:time = "time" ; 
        double Vwind(time, lat, lon) ;      
                Vwind:long_name = "v-wind" ;    
                Vwind:units = "metre second-1" ;
                Vwind:coordinates = "lon lat" ;
                Vwind:time = "time" ;
        double cloud(time, lat, lon) ;
                cloud:long_name = "cloud fraction" ;
                cloud:units = "nondimensional" ;
                cloud:coordinates = "lon lat" ;
                cloud:time = "time" ;
        double wspd(time, lat, lon) ;
                wspd:long_name = "wind speed 10m" ;
                wspd:units = "metre second-1" ;
                wspd:coordinates = "lon lat" ;
                wspd:time = "time" ;
        double sustr(time, lat, lon) ;
                sustr:long_name = "surface u-momentum stress" ;
                sustr:units = "Newton metre-2" ;
                sustr:coordinates = "lon lat" ;
                sustr:time = "time" ;
        double svstr(time, lat, lon) ;
                svstr:long_name = "surface v-momentum stress" ;
                svstr:units = "Newton metre-2" ;
                svstr:coordinates = "lon lat" ;
                svstr:time = "time" ;
Any comments/suggestions would be appreciated.

Thanks in advance.

-DJ

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

Re: A ROMS nesting question

#10 Unread post by wilkin »

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.00000000E+35) regrid = T
1261 GET_2DFLD - surface v-wind component, 2013-01-01 00:00:00.00
1262 (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)
1263 (Tmin= 15706.0000 Tmax= 16101.9583) t = 15706.0000
1264 (Min = 1.00000000E+35 Max = -1.00000000E+35) regrid = T
1265 GET_2DFLD - surface air pressure, 2013-01-01 00:00:00.00
1266 (Grid=01, Rec=0000001, Index=1, File: nwgom_frc_2013.nc)

... indicates the 1E+35 values occur in the parent grid.

Since the regrid option is on (as you intended) I expect you have inherited _FillValue extremes in the land from your meteorology data. ROMS is interpolating these to the full grid and so they contaminate the result.

Eliminate the 1E+35 values from the forcing files. Even one can mess things up. The meteorology conditions you specify for bulk fluxes are perfectly well defined over land so there is no reason to mask them with special values.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
arango
Site Admin
Posts: 1347
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: A ROMS nesting question

#11 Unread post by arango »

You need to make sure that the variables in your forcing NetCDF files have the _FillValue = 1.e+35 attribute or whatever other value you used. Otherwise, ROMS doesn't know how to process such data without the _FillValue that have land/sea masks. However, the fact the you have Min = 1.0E+35 and Max = -1.0E-35 indicates that, when regridding, ROMS where not able to find bounded values in the interpolation module interpolate.F. In linterp2d, we have:

Code: Select all

!
!-----------------------------------------------------------------------
!  Linearly interpolate requested field
!-----------------------------------------------------------------------
!
      Fmin=1.0E+35_r8
      Fmax=-1.0E+35_r8
      DO j=Jstr,Jend
        DO i=Istr,Iend
          i1=INT(Iout(i,j))
          i2=i1+1
          j1=INT(Jout(i,j))
          j2=j1+1
          IF (((LBx.le.i1).and.(i1.le.UBx)).and.                        &
     &        ((LBy.le.j1).and.(j1.le.UBy))) THEN
            ...
The IF-statement is failing in your application. Something is very wrong with the (lon,lat) of your grid NetCDF files. I assume that you have spherical coordinates. Is your spherical variable activated in the NetCDF files? ROMS is expecting something like:

Code: Select all

	int spherical ;
		spherical:long_name = "grid type logical switch" ;
		spherical:flag_values = 0, 1 ;
		spherical:flag_meanings = "Cartesian spherical" ; 
Such a variable is needed for ROMS to decide how to do in the spatial interpolation. If your application is configured correctly, ROMS will take care of the forcing needed for the nested grids. If the data grid size is not the same as the application grid size, it will trigger the spatial interpolation in ROMS. You need to be sure that all the applications grids are bounded (contained) in the input forcing data!. We assume that the user checks all these aspects during configuration before running ROMS. Check your longitude data range (-180:180, 0:360, or module(360)) is consistent with the range in your ROMS NetCDF grids. If you are curious, you need to check regrid.F.

Post Reply