Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressure levels #5

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
de08957
test multiple XIOS versions
mo-marqh Feb 13, 2024
e0700e0
resample usage example
mo-marqh Jan 24, 2024
4036d8a
add python for test case scripting
mo-marqh Jan 24, 2024
b3faa0b
MO desktop setup
mo-marqh Jan 25, 2024
5c1d325
verMatrix
mo-marqh Feb 13, 2024
88806a7
add python for test case scripting
mo-marqh Jan 24, 2024
a22aba5
resample usage example
mo-marqh Jan 24, 2024
a3cf9ec
extend to new test scenario
mo-marqh Jan 30, 2024
b200991
axis but domain read fails xios
mo-marqh Jan 31, 2024
b7c1489
new domain examples + shared code
mo-marqh Feb 6, 2024
c3faae6
test runner refactor
mo-marqh Feb 6, 2024
0321c48
linear interpolate domain and add tolerance float compare
mo-marqh Feb 6, 2024
02572ed
re-introduce XIOS3 with individual test skip patterns
mo-marqh Feb 15, 2024
6ef0784
demonstration of model level to pressure level stratification resampling
mo-marqh Feb 21, 2024
c5086b4
set ni,nj,ibegin,jbegin (XIOS3)
mo-marqh Feb 21, 2024
c07aed3
set lons, lats -finalize-domain (XIOS3)
mo-marqh Feb 21, 2024
bfb5a1e
set lat lon bounds for single column
mo-marqh Feb 21, 2024
17ca59f
ensure transport for XIOS3 in xios.xml
mo-marqh Feb 22, 2024
7c688fe
ensure transport for XIOS3 in xios.xml
mo-marqh Feb 22, 2024
b5a9857
ensure transport for XIOS3 in xios.xml
mo-marqh Feb 22, 2024
d763be9
ensure context name for XIOS3 in xios.xml
mo-marqh Feb 22, 2024
d56a937
context id experiment
mo-marqh Feb 22, 2024
43ddf09
vertical data driven scenario 1
mo-marqh Feb 22, 2024
5c4fc1d
failing to retrieve bounds from input file
mo-marqh Feb 22, 2024
7e9d8b6
f
mo-marqh Feb 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions .github/workflows/buildTest.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: build-test-XIOS

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:

jobs:
build_test:
name: build XIOS and run tests
name: build test
runs-on: ubuntu-latest
strategy:
matrix:
version: [XIOS/trunk@2252, XIOS2/trunk, XIOS3/trunk]
steps:
# Check out repository branch
- uses: actions/checkout@v4
Expand All @@ -16,19 +23,33 @@ jobs:
sudo apt -yq install $(<dependencies)
- name: clone and build XIOS
run: |
svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS2/trunk XIOS2
cp arch/* XIOS2/arch/
cd XIOS2
svn co http://forge.ipsl.jussieu.fr/ioserver/svn/${{ matrix.version }} XIOS
cp arch/* XIOS/arch/
cd XIOS
if [ ${{ matrix.version }} == 'XIOS3/trunk' ]; then
patch -p0 < ../patches/xios3/revert_svn2517_transport.patch
sed -i 's/<variable_group id="parameters" >/<variable_group id="parameters" > <variable id="transport_protocol" type="string" >p2p<\/variable>/g' generic_testcase/iodef.xml
cat generic_testcase/iodef.xml
fi
./make_xios --job 2 --arch GCC_LINUX_APT
ls -l lib/
ls -l inc/
ls -l bin/
cd ..
shell: bash
- name: run generic
run: |
cd XIOS2/generic_testcase
cd XIOS/generic_testcase
ln -s ../bin/generic_testcase.exe
ln -s ../bin/xios_server.exe
sed -i 's/nb_proc_atm=4/nb_proc_atm=1/g' param.def
mpiexec -n 1 ./generic_testcase.exe : -n 1 ./xios_server.exe
cd ../..
- name: run resample example
run: |
. arch/arch-GCC_LINUX_APT.env
. arch/arch-GCC_LINUX_APT.path
export XIOS_BINDIR=$PWD/XIOS/bin
export XIOS_INCDIR=$PWD/XIOS/inc
export XIOS_LIBDIR=$PWD/XIOS/lib

export MVER=${{ matrix.version }}

python3 -m unittest discover -v -s xios_examples
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*__pycache__*
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# tcd-XIOS-demonstration
Demonstration code for XML I/O server XIOS usage.

Demonstrations of using XIOS are provided with Continuous Integration testing with respect to XIOS2 trunk.

## Environments

Environments are managed, with a little complication, to enable running on scientific desktop and on Github Continuous Integration.

There is a helper script that one can source, in the root directory, to ensure that the scientific desktop LFRic environment is loaded, using the environment variable setup for the Makefiles, which is also compatible with the Github CI runner.

`. desktopEnv`
2 changes: 2 additions & 0 deletions dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ libnetcdf-mpi-dev
libnetcdff-dev
libpnetcdf-dev
netcdf-bin
python3-numpy
python3-netcdf4
21 changes: 20 additions & 1 deletion desktopEnv
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
# this environment management script needs to be sourced in order to provide
# equivalent functionality on the MO Linux desktop to the Github CI environment.
# `. desktopEnv`

# Use the LFRic programming environment
module purge
module unuse /project/ukmo/rhel7/R/modulefiles; module unuse /project/ukmo/rhel7/fortran/opt/gfortran/modulefiles
module use /project/extrasoftware/modulefiles.rhel7
module use /data/users/lfric/software/modulefiles.rhel7

module load environment/lfric/gcc

# provide explit path set to the arch script for netCDF linking
export NETCDF_LIB_DIR=$NETCDF_4_8_1_ROOT/lib:$NETCDF_4_8_1_ROOT/lib64
export NETCDF_INC_DIR=$NETCDF_4_8_1_ROOT/include

. arch/arch-GCC_LINUX_APT.path

# provide explicit paths to all XIOS components
export XIOS_INCDIR=$XIOS_R2252_2_ROOT/include
export XIOS_LIBDIR=$XIOS_R2252_2_ROOT/lib
export XIOS_BINDIR=$XIOS_R2252_2_ROOT/bin
export XIOS_BINDIR=$XIOS_R2252_2_ROOT/bin

# use an extend LFRic Python environment
# that includes netCDF4-python built w.r.t. the LFRIC
# netCDF
. /data/users/itmh/pylfricpyexptl/bin/activate

# dev-notes (starting from the lfric Python as provided by module)
# - python -m venv {/some/path}
# - python -m pip install cython mpi4py
# - python -m pip install --no-build-isolation netCDF4==1.5.8
# - pinned version needed for compatability with libnetcdf 4.8.1
# - . activate {/some/path}
Loading
Loading