error as reading my atmospheric forcing files

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
mdessert
Posts: 18
Joined: Thu Mar 15, 2018 3:00 pm
Location: EXWEXs - Plouzané - France

error as reading my atmospheric forcing files

#1 Unread post by mdessert »

Hello modellers,
I'm trying to run ROMS using the BULK FLUX Formulae to simulate my atmosphere. For that, I have build the netcdf files using the pyroms tools and inspiring from the MERRA example (providing with pyroms package).
  • atm_forc_GFS_2018-01-01_Pair.nc
    atm_forc_GFS_2018-01-01_Tair.nc
    atm_forc_GFS_2018-01-01_Qair.nc
    atm_forc_GFS_2018-01-01_Uwind.nc
    atm_forc_GFS_2018-01-01_Vwind.nc
    atm_forc_GFS_2018-01-01_swrad.nc
    atm_forc_GFS_2018-01-01_lwrad_down.nc
    atm_forc_GFS_2018-01-01_rain.nc
Then I wrote them in my ocean.in file.

As I use the #define LONGWAVE_OUT option, I only need the downward component of the long wave radiative flux (if I've well understood).

My files look like this one :

Code: Select all

netcdf atm_forc_GFS_2018-01-01_Uwind {
dimensions:
	lon = 101 ;
	lat = 81 ;
	wind_time = UNLIMITED ; // (154 currently)
variables:
	double lon(lon) ;
		lon:long_name = "longitude" ;
		lon:units = "degrees_east" ;
	double lat(lat) ;
		lat:long_name = "latitude" ;
		lat:units = "degrees_north" ;
	double wind_time(wind_time) ;
		wind_time:units = "hours since 2000-01-01 00:00:00" ;
		wind_time:long_name = "wind_time" ;
		wind_time:coordinates = "wind_time" ;
		wind_time:calendar = "standard" ;
	double Uwind(wind_time, lat, lon) ;
		Uwind:coordinates = "wind_time lat lon" ;
		Uwind:long_name = "U-component of wind" ;
		Uwind:units = "m s-1" ;
		Uwind:time = "wind_time" ;

// global attributes:
		:_NCProperties = "version=1|netcdflibversion=4.6.1|hdf5libversion=1.10.1" ;
		:creation_date = "Thu May 17 06:26:22 MDT 2018" ;
		:NCL_Version = "6.4.0" ;
		:system = "Linux geyser04 2.6.32-358.el6.x86_64 #1 SMP Wed Nov 2 11:00:18 MDT 2016 x86_64 x86_64 x86_64 GNU/Linux" ;
		:Conventions = "None" ;
		:grib_source = "gfs.0p25.2018010112.f003.grib2.dessert296523.grb2" ;
		:title = "NCL: convert-GRIB-to-netCDF" ;

I activated the ONLINE option to make ROMS make the interpolation online.

During the compilation, no errors appears and everything seems to be OK.

But when I try to run the ROMs model, it crashes with this lines of commentary:

Code: Select all

REGRID - input gridded data does not contain model grid:

          Gridded:  LonMin = ********* LonMax = *********
                    LatMin =  -30.0000 LatMax =  -10.0000
          Model:    LonMin =    7.0795 LonMax =   13.9205
                    LatMin =  -27.8908 LatMax =  -18.1176
Found Error: 04   Line: 286      Source: ROMS/Utility/get_2dfld.F
Found Error: 04   Line: 134      Source: ROMS/Nonlinear/get_data.F
Found Error: 04   Line: 767      Source: ROMS/Nonlinear/initial.F
Found Error: 04   Line: 188      Source: ROMS/Drivers/nl_ocean.h
 Nonlinear model elapsed CPU time profile, Grid: 01

  Allocation and array initialization ..............         0.078  (58.6131 %)
  Reading of input data ............................         0.000  ( 0.0007 %)
  2D/3D coupling, vertical metrics .................         0.003  ( 2.0339 %)
  Omega vertical velocity ..........................         0.001  ( 0.4808 %)
  Equation of state for seawater ...................         0.003  ( 1.9494 %)
  Reading model state vector .......................         0.009  ( 6.7410 %)
                                              Total:         0.093   69.8190

 Nonlinear model message Passage profile, Grid: 01

  Message Passage: 2D halo exchanges ...............         0.001  ( 0.8367 %)
  Message Passage: 3D halo exchanges ...............         0.002  ( 1.1665 %)
  Message Passage: data broadcast ..................         0.020  (15.1930 %)
  Message Passage: data reduction ..................         0.000  ( 0.0366 %)
  Message Passage: data scattering..................         0.003  ( 2.5065 %)
  Message Passage: synchronization barrier .........         0.000  ( 0.0486 %)
                                              Total:         0.026   19.7879

  Unique code regions profiled .....................         0.093   69.8190 %
  Residual, non-profiled code ......................         0.040   30.1810 %


 All percentages are with respect to total time =            0.134


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

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


 ERROR: I/O related problem.
I suspect a wrong format of my atmospheric forcing files but even if I tried and verify hard, I don't find what made my model stopped. It seems that it crash as it tried to read the last time step from my Uwind file (as it wanted to read further than the end of my file). Is it possible?
As I "print" the input of the nf_fread2d function (which is used in ROMS/Utility/get_2dfld.F just before the error in 286th line) to verify (and try to understand) them, I can read that :

Code: Select all

 ng =            1 
model =           1 
ncfile = atm_forc_GFS_2018-01-01_Uwind.nc                                                                                                                                                                                                                                ncid=      131072 
Vname(1,ifield)=Uwind                                                                                               
Vid =           4 
Trec=         154 
Vtype=           2 
Vsize =         101          81           829           0  ! ! ! ! !  I do not understand why Vsize(3) is 829! Should not it be 154?
LBi=           0 
UBi =           44 
LBj=           0 
UBj =           24 
Fscale(ifield,ng):   1.0000000000000000      
Fmin =    0.0000000000000000      
Fmax =   0.0000000000000000      
shape(Fout)          45          25 
Lregrid :  F
Thank you very much ! :)
Hope it's only a silly mistake...

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

Re: error as reading my atmospheric forcing files

#2 Unread post by jcwarner »

I think you have the 'coordinates' info backwards. here is some information:

ROMS/Utility/get_varcoords.F

! This routine reads the spatial positions of any NetCDF variable !
! having the attribute "coordinates", as specified by CF rules. !
! For example, in CDL syntax: !
! !
! float my_var(time, lat, lon) ; !
! my_var:long_name = "my variable long name" ; !
! my_var:units = "my variable units" ; !
! my_var:coordinates = "lon lat time" ; !
! my_var:time = "time" ; !
! !
! The following "coordinates" attribute is also allowed: !
! !
! my_var:coordinates = "lon lat" ; !
! !
! That is, the time variable "time" is missing in the "coordinates" !
! attribute. !
! !
! Notice that the associated coordinate names "lon" and "lat" are !
! separated by a single blank space. Both "lon" and "lat" can be !
! 1D or 2D arrays. If 1D array, the positions are rectangular and !
! and full 2D arrays are filled with the same values. !
! !
! It also determines the rectangular switch which indicates that !
! the spatial positions have a plaid distribution. !
! !
!=======================================================================
!

mdessert
Posts: 18
Joined: Thu Mar 15, 2018 3:00 pm
Location: EXWEXs - Plouzané - France

Re: error as reading my atmospheric forcing files

#3 Unread post by mdessert »

Silly mistake! I was right on that point!
Thank you very much :)
It works ... further now!

Post Reply