Skip to content

Commit

Permalink
failing to retrieve bounds from input file
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-marqh committed Feb 22, 2024
1 parent 43ddf09 commit 5c4fc1d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion xios_examples/vertical_stratify_scenarios/iodef.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<simulation>
<simulation id="simulation">

<context id="main" src="main.xml"/>
<context id="axis_check" src="axis_check.xml"/>
Expand Down
4 changes: 3 additions & 1 deletion xios_examples/vertical_stratify_scenarios/resample.F90
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ subroutine initialise()
allocate ( lonb(2, lenx) )
allocate ( latb(2, leny) )

! call xios_get_axis_attr('xm', bounds=lonb)
! call xios_get_axis_attr('ym', bounds=latb)

lonb = reshape((/-6.0, -3.0/), shape(lonb))
latb = reshape((/50.0, 53.0/), shape(latb))


call xios_get_axis_attr('xm', value=lonvals)
call xios_get_axis_attr('ym', value=latvals)
call xios_get_axis_attr('mlev', value=mlvals)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
netcdf axis_output {
netcdf stratify_input_in_domain_1 {
dimensions:
axis_nbounds = 2 ;
lon = 1 ;
lat = 1 ;
nvertex = 2 ;
levels = 39 ;
pressure_levels1 = 5 ;
time_counter = UNLIMITED ; // (0 currently)
Expand All @@ -12,16 +12,19 @@ variables:
lat:standard_name = "latitude" ;
lat:long_name = "Latitude" ;
lat:units = "degrees_north" ;
lat:bounds = "bounds_lat" ;
float lon(lon) ;
lon:axis = "X" ;
lon:standard_name = "longitude" ;
lon:long_name = "Longitude" ;
lon:units = "degrees_east" ;
lon:bounds = "bounds_lon" ;
float bounds_lon(lon, nvertex) ;
float bounds_lat(lat, nvertex) ;
float levels(levels) ;
levels:name = "levels" ;
levels:units = "1" ;
float pressure_levels1(pressure_levels1) ;
pressure_levels1:name = "pressure_levels1" ;
pressure_levels1:standard_name = "air_pressure" ;
pressure_levels1:long_name = "Air Pressure" ;
pressure_levels1:units = "Pa" ;
Expand All @@ -46,21 +49,21 @@ variables:
temponP:coordinates = "" ;

// global attributes:
:name = "axis_output" ;
:description = "Created by xios" ;
:title = "Created by xios" ;
:Conventions = "CF-1.6" ;
:timeStamp = "2024-Feb-21 16:04:41 GMT" ;
:uuid = "f37ac2ba-85d7-47fd-b1ba-4748d5eb9bb6" ;

data:

lat = 51.5 ;

lon = -4.5 ;

levels = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 171, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39 ;
bounds_lon =
-6.0, -3.0 ;

bounds_lat =
50.0, 53.0 ;

levels = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 171, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ;

pressure_levels1 = 100000, 92500, 85000, 75000, 65000 ;

Expand Down
10 changes: 0 additions & 10 deletions xios_examples/vertical_stratify_scenarios/test_resample_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ class TestResampleDomain(xshared._TestCase):
transient_outputs = ['pressure_stratify.nc']
rtol = 5e-03

# def test_running(self):
# subprocess.run(['ncgen', '-k', 'nc4', '-o',
# self.transient_inputs[0],
# 'stratify_input_in_domain_1.cdl'],
# cwd=self.test_dir, check=True)
# # run the compiled Fortran XIOS programme
# subprocess.run(['mpiexec', '-n', '1', './resample.exe', ':',
# '-n', '1', './xios_server.exe'],
# cwd=self.test_dir, check=True)


# A list of input `.cdl` files where XIOS is known to produce different
# output from the expected output data
Expand Down

0 comments on commit 5c4fc1d

Please sign in to comment.