Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1522dd7
First draft of the cloudsc store using field_api hdf5io
piotrows May 6, 2025
a5f8798
Fiat is now optional and replaces duplicated files of cloudsc
piotrows Jun 13, 2025
12f9f89
HDF5 output test complete
piotrows Jun 14, 2025
224903b
Make Field API IO optional
piotrows Aug 2, 2025
064722b
Update documentation
piotrows Aug 2, 2025
ab7f0f6
Merge branch 'develop' into napz-hdf5io-pr
piotrows Aug 2, 2025
20ef684
Restore compilation of gpu variant and develop-ecmwf branch of field_api
piotrows Aug 6, 2025
9eaec81
Correct misplaced cmake entry
piotrows Sep 2, 2025
4f1f7e5
Bump down Loki version
piotrows Sep 2, 2025
088d7f2
Merge branch 'develop' into napz-hdf5io-pr
piotrows Sep 5, 2025
dc95167
Disable caching for CI
piotrows Sep 6, 2025
dd9ac5b
Fix spacing
piotrows Sep 6, 2025
3fb48c0
Disable Fiat build by default
piotrows Sep 6, 2025
c007421
Build fiat when building field_api and remove spurious path
piotrows Sep 6, 2025
5cbf8f9
Remove spurious comment
piotrows Sep 8, 2025
6a3dfc3
Remove separation of Fiat sources
piotrows Sep 8, 2025
b7e11c7
Do not link fiat to common
piotrows Sep 8, 2025
214e3b6
Bump software versions
piotrows Sep 8, 2025
0a85172
Do not link field_api to common
piotrows Sep 8, 2025
570a2e0
enforce oml linking
piotrows Sep 8, 2025
eff8730
Rearrange bundle so fckit is before field_api
piotrows Sep 8, 2025
4ccb643
split test routine for fieldapi IO into read/write
piotrows Sep 8, 2025
d1ea252
Remove dependence on oml, wrong suggestion from CI?
piotrows Sep 8, 2025
cb4441a
Disable testing of fiat and field_api inside cloudsc
piotrows Sep 8, 2025
9a47bac
Make MPI and MPL fully optional - cloudsc side
piotrows Sep 10, 2025
2c1cfaf
Switch to special FA branch to accomodate optional MPI in FA again
piotrows Sep 10, 2025
a113138
Remove spurious comment
piotrows Sep 11, 2025
a7fd474
Cleanup
piotrows Sep 12, 2025
d099df9
FieldAPI IO update
piotrows Sep 16, 2025
33bf481
Update defines to execute the IO test
Sep 30, 2025
d6f7445
update atos CI with FA io option
Sep 30, 2025
0a80a13
update atos CI with FA io option
Sep 30, 2025
99329a2
Update versions in bundle.yml to direct to the develop-ecmwf FA and t…
piotrows Oct 16, 2025
5b51681
Remove unused definitions and singal error on improper mpi and FieldA…
piotrows Oct 16, 2025
16eb274
Bump software versions for Github CI
piotrows Oct 16, 2025
0034e29
Bump CI software versions
piotrows Oct 17, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/build-hpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
#SBATCH --qos=dg
arch: ecmwf/hpc2020/nvhpc/24.5
modules: ~
build_options: --with-loki=ON --with-field-api=ON --with-atlas=ON --with-cuda=ON --with-acc=ON
build_options: --with-loki=ON --with-field-api=ON --with-field-api-io-serial=ON --with-atlas=ON --with-cuda=ON --with-acc=ON
# TODO: These tests trigger a SIGFPE, to be investigated
# 'dwarf-cloudsc-gpu-std-par-scc-k-caching-dp-serial' works with NVHPC 22.11 but triggers SIGFPE with 24.5
exclude_tests:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
ctest_options: -E gpu-omp-scc-stack-sp
# SP stack segfaults somehow
python-version: 3.11
caching: true
caching: false

- name: linux nvhpc
os: ubuntu-24.04
Expand All @@ -61,7 +61,7 @@ jobs:
# Some OpenMP-target variants segfault when executed on the host but run fine on device,
# thus we will test these instead using a build-hpc workflow
python-version: 3.11
caching: true
caching: false

- name : linux intel-classic
os: ubuntu-22.04
Expand All @@ -71,7 +71,7 @@ jobs:
compiler_fc: ifort
cmake_options: " "
python-version: 3.11
caching: true
caching: false

- name : linux intel-llvm
os: ubuntu-24.04
Expand All @@ -83,7 +83,7 @@ jobs:
# cloudsc_driver_loki_mod.idem_stack.F90(138): error #5623: **Internal compiler error: internal abort**
ctest_options: -E gpu-omp
python-version: 3.11
caching: true
caching: false

- name : linux gnu-native mpi
os: ubuntu-24.04
Expand All @@ -96,7 +96,7 @@ jobs:
# SP stack segfaults somehow
build_type: Bit
python-version: 3.11
caching: true
caching: false

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -207,11 +207,11 @@ jobs:
cache_suffix: "${{ matrix.build_type }}-${{ env.CACHE_SUFFIX }}"
recreate_cache: ${{ matrix.caching == false }}
dependencies: |
ecmwf/ecbuild@refs/tags/3.11.0
ecmwf/eckit@refs/tags/1.30.0
ecmwf/ecbuild@refs/tags/3.12.0
ecmwf/eckit@refs/tags/1.32.2
ecmwf/fckit@refs/tags/0.14.0
ecmwf/atlas@refs/tags/0.43.1
ecmwf-ifs/loki@refs/tags/0.3.0
ecmwf/atlas@refs/tags/0.44.0
ecmwf-ifs/loki@refs/tags/0.3.5
dependency_branch: develop
dependency_cmake_options: |
ecmwf/eckit: -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_options }} -DENABLE_TESTS=OFF -DENABLE_ECKIT_CMD=OFF -DENABLE_ECKIT_SQL=OFF -DENABLE_ECKIT_GEO=OFF -DENABLE_WARNINGS=OFF
Expand Down
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ include(features/OMP)
ecbuild_add_option( FEATURE MPI
DESCRIPTION "Support for task-level parallelism using MPI"
DEFAULT OFF
REQUIRED_PACKAGES "MPI COMPONENTS Fortran" )
REQUIRED_PACKAGES "MPI COMPONENTS Fortran C CXX" )
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still curious what makes this necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As stated earlier, dependence of hdf5.h on mpi.h. I am not sure if CXX will be needed here, but it is hard to exclude at the moment.

if( HAVE_MPI )
list( APPEND CLOUDSC_DEFINITIONS HAVE_MPI )
endif()
Expand Down Expand Up @@ -133,6 +133,14 @@ ecbuild_add_option( FEATURE FIELD_API
DEFAULT ON
REQUIRED_PACKAGES "field_api" )

ecbuild_add_option( FEATURE FIELD_API_ENABLE_IO
DESCRIPTION "Use field_api IO to store field_api objects to disk."
CONDITION HAVE_FIELD_API
DEFAULT OFF )
if( HAVE_FIELD_API )
list( APPEND CLOUDSC_DEFINITIONS FIELD_API_IO )
endif()

ecbuild_add_option( FEATURE FIELD_API_DISABLE_MAPPED_MEMORY
DESCRIPTION "Disable the use of ACC mapped memory in Field API objects"
CONDITION HAVE_FIELD_API
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ In order to do so, please create a pull request with your contribution and sign
also is slightly cleaner than the original version.
- **dwarf-cloudsc-fortran-field**: A fortran version of CLOUDSC that uses Field API
for the data structures. The intent of this version is to show how
Field API is used in newer versions of the IFS.
Field API is used in newer versions of the IFS. Optionally, this version also tests
Field API IO. To test IO write/read feature, add --with-field-api-io at the build stage.
Note that this enables MPI by default. The IO feature is embedded in the
cloudsc-fortran Field API test.
Comment on lines +38 to +41
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs a small update later.

- **dwarf-cloudsc-c**: Standalone C version of the kernel that has
been generated by ECMWF tools. This relies exclusively on the Serialbox
validation mechanism.
Expand Down
40 changes: 31 additions & 9 deletions bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cmake : >
BUILD_eckit=OFF
BUILD_fckit=OFF
BUILD_atlas=OFF
BUILD_fiat=OFF
BUILD_field_api=OFF
BUILD_loki=OFF
ENABLE_MPI=OFF
Expand All @@ -19,7 +20,7 @@ projects :

- ecbuild :
git : https://github.com/ecmwf/ecbuild
version : 3.11.0
version : 3.12.0
bundle : false

- serialbox :
Expand All @@ -36,14 +37,14 @@ projects :

- loki :
git : https://github.com/ecmwf-ifs/loki
version : 0.3.1
version : 0.3.3
require : ecbuild
cmake : >
LOKI_ENABLE_TESTS=OFF

- eckit :
git : https://github.com/ecmwf/eckit
version : 1.30.0
version : 1.32.2
require : ecbuild
cmake : >
ECKIT_ENABLE_TESTS=OFF
Expand All @@ -54,24 +55,33 @@ projects :
ECKIT_ENABLE_ECKIT_SQL=OFF
ECKIT_ENABLE_WARNINGS=OFF

- field_api :
git : https://github.com/ecmwf-ifs/field_api
version : develop-ecmwf
- fiat :
Comment thread
piotrows marked this conversation as resolved.
git : https://github.com/ecmwf-ifs/fiat
version : 1.6.1
require : ecbuild
optional: true
cmake : >
UTIL_MODULE_PATH=${CMAKE_SOURCE_DIR}/cloudsc-dwarf/src/common/module

FIAT_ENABLE_TESTS=OFF
- fckit :
git : https://github.com/ecmwf/fckit
version : 0.14.0
require : ecbuild eckit
cmake : >
FCKIT_ENABLE_TESTS=OFF
FCKIT_ENABLE_FCKIT_VENV=ON

- field_api :
git : https://github.com/ecmwf-ifs/field_api.git
version : develop-ecmwf
require : ecbuild
cmake : >
UTIL_MODULE_PATH=${CMAKE_SOURCE_DIR}/cloudsc-dwarf/src/common/module
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this anymore if we build fiat

Suggested change
UTIL_MODULE_PATH=${CMAKE_SOURCE_DIR}/cloudsc-dwarf/src/common/module

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not necessarily building Fiat, so I would propose to leave it.

FIELD_API_ENABLE_TESTS=OFF

- atlas :
git : https://github.com/ecmwf/atlas
version : 0.43.1
version : 0.44.0
optional: true
require : ecbuild eckit fckit
cmake : >
Expand Down Expand Up @@ -100,6 +110,18 @@ options :
help : Enable Field API variants [ON|OFF]
cmake : BUILD_field_api={{value}}
Comment thread
piotrows marked this conversation as resolved.

- with-field-api-io-serial :
help : Enable Field API IO (serial only) [ON|OFF]
cmake : >
FIELD_API_ENABLE_IO_SERIAL={{value}}
ENABLE_FIELD_API_ENABLE_IO={{value}}

- with-field-api-io-parallel :
help : Enable Field API IO (requires MPI) [ON|OFF]
cmake : >
FIELD_API_ENABLE_IO_PARALLEL={{value}}
ENABLE_FIELD_API_ENABLE_IO={{value}}

- without-mapped-fields :
help : Disables automatic registering of Field API fields in ACC map
cmake : ENABLE_FIELD_API_DISABLE_MAPPED_MEMORY=ON
Expand Down
3 changes: 3 additions & 0 deletions src/cloudsc_cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ macro( cloudsc_add_cuda_exe TARGET DRIVER KERNEL )
$<${HAVE_HDF5}:hdf5::hdf5>
$<${HAVE_SERIALBOX}:Serialbox::Serialbox_C>
$<${HAVE_OMP}:OpenMP::OpenMP_C>
$<${HAVE_MPI}:MPI::MPI_C>
Comment thread
piotrows marked this conversation as resolved.
CUDA::cudart
DEFINITIONS
${CLOUDSC_DEFINITIONS}
Expand All @@ -40,6 +41,8 @@ macro( cloudsc_add_cuda_exe TARGET DRIVER KERNEL )
target_compile_options( ${TARGET}-${prec}-lib
PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:SHELL:${CLOUDSC_CUDA_OPT_FLAGS} ${CLOUDSC_CUDA_FLAGS}>
)
# target_link_libraries(${TARGET}-${prec}-lib PRIVATE $<${HAVE_MPI}:MPI::MPI_C>)

set_target_properties( ${TARGET}-${prec}-lib
PROPERTIES CUDA_SEPARABLE_COMPILATION ON
)
Expand Down
5 changes: 5 additions & 0 deletions src/cloudsc_fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ cloudsc_add_fortran_exe(

# Default Fortran driver using FIELD_API
if( HAVE_FIELD_API )
if(NOT HAVE_MPI AND FIELD_API_ENABLE_IO_PARALLEL STREQUAL "ON")
ecbuild_error("--with-field-api-io-parallel=ON was requested without --with-mpi=ON")
elseif(HAVE_MPI AND FIELD_API_ENABLE_IO_SERIAL STREQUAL "ON")
ecbuild_error("--with-field-api-io-serial=ON was requested but --with-mpi=ON")
endif()
cloudsc_add_fortran_exe(
TARGET dwarf-cloudsc-fortran-field
DRIVER cloudsc_driver_field_mod.F90
Expand Down
120 changes: 119 additions & 1 deletion src/cloudsc_fortran/cloudsc_driver_field_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ MODULE CLOUDSC_DRIVER_FIELD_MOD
SUBROUTINE CLOUDSC_DRIVER_FIELD( &
& NUMOMP, NPROMA, NLEV, NGPTOT, NGPTOTG, KFLDX, PTSPHY, PAUX, FLUX, &
& TENDENCY_TMP, TENDENCY_LOC, YDOMCST, YDOETHF, YDECLDP)
! Driver routine that invokes the optimized CLAW-based CLOUDSC GPU kernel

USE YOECLDP , ONLY : TECLDP
USE YOMCST , ONLY : TOMCST
Expand Down Expand Up @@ -50,6 +49,13 @@ SUBROUTINE CLOUDSC_DRIVER_FIELD( &
write(0,1003) NUMPROC,NUMOMP,NGPTOTG,NPROMA,NGPBLKS
end if

#ifdef FIELD_API_IO
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, the option to write the input state to file would be a run-time option, and not a compile-time option. How about we rename TEST_FIELD_HDF5 to WRITE_STATE_HDF5 and make it a property of the CLOUDSC_FIELD_STATE instead of invoking it from the kernel? This way we could toggle this via an environment flag in src/cloudsc_fortran/dwarf_cloudsc.F90 right after loading the input state from the classic input files?

Similar we could then write the output by implementing the same boilerplate on CLOUDSC_FLUX_TYPE instead of adding the I/O to the kernel driver.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we rename TEST_FIELD_HDF5 to WRITE_STATE_HDF5

Could be done but what we are doing at the moment is testing (write+read, not a write alone).

Copy link
Copy Markdown
Contributor Author

@piotrows piotrows Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it a property of the CLOUDSC_FIELD_STATE instead of invoking it from the kernel?

Well, this is an option, but then it looses the virtue of a top-level, clear example that teaches the FieldAPI IO. So it really depends if we want expand CLOUDSC capabilities or we would rather prefer a FA IO tutorial, or perhaps both.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is an option, but then it looses the virtue of a top-level, clear example that teaches the FieldAPI IO. So it really depends if we want expand CLOUDSC capabilities or we would rather prefer a FA IO tutorial, or perhaps both.

I disagree on this one - having a pure procedural test routine does not make a good "tutorial". Instead, the derived types CLOUDSC_FIELD_STATE and CLOUDSC_FLUX_STATE are intended as examples of group types used in the EC-physics context. Adding independent read/write routines to those types is the main goal here, so why not illustrate this here in exactly this form?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about splitting the two into a write and read routine and calling them in this order from here?
That would work as a demonstration of how to use either mode individually.

For a full-on switch to HDF5 as inputs, we would need to replicate the inputs in a third format commited to the repository. I think that is a good idea but could also be tackled in a follow-on PR maybe?
The input reading is still very much set-up in a Serialbox first, otherwise use the legacy hdf5 read method. We could first remove that and full-on switch to HDF5, then add the field_api hdf5 reader.

CALL WRITE_FIELD_HDF5(NUMOMP, NPROMA, NLEV, NGPTOT, NGPTOTG, KFLDX, PTSPHY, PAUX, &
& TENDENCY_TMP, TENDENCY_LOC)
CALL READ_FIELD_HDF5(NUMOMP, NPROMA, NLEV, NGPTOT, NGPTOTG, KFLDX, PTSPHY, PAUX, &
& TENDENCY_TMP, TENDENCY_LOC)
#endif

! Global timer for the parallel region
CALL TIMER%START(NUMOMP)

Expand Down Expand Up @@ -115,6 +121,118 @@ SUBROUTINE CLOUDSC_DRIVER_FIELD( &
CALL TIMER%PRINT_PERFORMANCE(NPROMA, NGPBLKS, NGPTOT)

END SUBROUTINE CLOUDSC_DRIVER_FIELD
#ifdef FIELD_API_IO
SUBROUTINE WRITE_FIELD_HDF5( &
& NUMOMP, NPROMA, NLEV, NGPTOT, NGPTOTG, KFLDX, PTSPHY, PAUX, &
& TENDENCY_TMP, TENDENCY_LOC)

USE FIELD_HDF5_MODULE, ONLY: WRITE_HDF5_PERRANK_DATA
INTEGER(KIND=JPIM) ,INTENT(IN) :: NUMOMP, NPROMA, NLEV, NGPTOT, NGPTOTG
INTEGER(KIND=JPIM) ,INTENT(IN) :: KFLDX
REAL(KIND=JPRB) ,INTENT(IN) :: PTSPHY ! PHYSICS TIMESTEP
TYPE(CLOUDSC_AUX_TYPE) ,INTENT(IN) :: PAUX
TYPE(CLOUDSC_STATE_TYPE) ,INTENT(IN) :: TENDENCY_TMP
TYPE(CLOUDSC_STATE_TYPE) ,INTENT(IN) :: TENDENCY_LOC

CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PT, "cloudsc_data", "PT", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PQ, "cloudsc_data", "PQ", HDFEXISTS=.TRUE.)

CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_TMP%F_T, "cloudsc_data", "TEND_TMP_T", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_TMP%F_Q, "cloudsc_data", "TEND_TMP_Q", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_TMP%F_A, "cloudsc_data", "TEND_TMP_A", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_TMP%F_CLD, "cloudsc_data", "TEND_TMP_CLD", HDFEXISTS=.TRUE.)

CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_LOC%F_T, "cloudsc_data", "TEND_LOC_T", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_LOC%F_Q, "cloudsc_data", "TEND_LOC_Q", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_LOC%F_A, "cloudsc_data", "TEND_LOC_A", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(TENDENCY_LOC%F_CLD, "cloudsc_data", "TEND_LOC_CLD", HDFEXISTS=.TRUE.)

CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PVFA, "cloudsc_data", "PVFA", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PVFL, "cloudsc_data", "PVFL", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PVFI, "cloudsc_data", "PVFI", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PDYNA, "cloudsc_data", "PDYNA", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PDYNL, "cloudsc_data", "PDYNL", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PDYNI, "cloudsc_data", "PDYNI", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PHRSW, "cloudsc_data", "PHRSW", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PHRLW, "cloudsc_data", "PHRLW", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PVERVEL, "cloudsc_data", "PVERVEL", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PAP, "cloudsc_data", "PAP", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PAPH, "cloudsc_data", "PAPH", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PLSM, "cloudsc_data", "PLSM" , HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_LDCUM, "cloudsc_data", "LDCUM", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_KTYPE, "cloudsc_data", "KTYPE", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PLU, "cloudsc_data", "PLU", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PLUDE, "cloudsc_data", "PLUDE", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PSNDE, "cloudsc_data", "PSNDE", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PMFU, "cloudsc_data", "PMFU", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PMFD, "cloudsc_data", "PMFD", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PA, "cloudsc_data", "PA", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PCLV, "cloudsc_data", "PCLV", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PSUPSAT, "cloudsc_data", "PSUPSAT", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PLCRIT_AER, "cloudsc_data", "PLCRIT_AER", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PICRIT_AER, "cloudsc_data", "PICRIT_AER", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PRE_ICE, "cloudsc_data", "PRE_ICE_AER", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PCCN, "cloudsc_data", "PCCN", HDFEXISTS=.TRUE.)
CALL WRITE_HDF5_PERRANK_DATA(PAUX%F_PNICE, "cloudsc_data", "PNICE", HDFEXISTS=.TRUE.)

END SUBROUTINE WRITE_FIELD_HDF5

SUBROUTINE READ_FIELD_HDF5( &
& NUMOMP, NPROMA, NLEV, NGPTOT, NGPTOTG, KFLDX, PTSPHY, PAUX, &
& TENDENCY_TMP, TENDENCY_LOC)

USE FIELD_HDF5_MODULE, ONLY: READ_HDF5_PERRANK_DATA
INTEGER(KIND=JPIM) :: NUMOMP, NPROMA, NLEV, NGPTOT, NGPTOTG
INTEGER(KIND=JPIM) :: KFLDX
REAL(KIND=JPRB) :: PTSPHY ! PHYSICS TIMESTEP
TYPE(CLOUDSC_AUX_TYPE) :: PAUX
TYPE(CLOUDSC_STATE_TYPE) :: TENDENCY_TMP
TYPE(CLOUDSC_STATE_TYPE) :: TENDENCY_LOC

CALL READ_HDF5_PERRANK_DATA(PAUX%F_PT, "cloudsc_data", "PT", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PQ, "cloudsc_data", "PQ", HDFEXISTS=.TRUE.)

CALL READ_HDF5_PERRANK_DATA(TENDENCY_TMP%F_T, "cloudsc_data", "TEND_TMP_T", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(TENDENCY_TMP%F_Q, "cloudsc_data", "TEND_TMP_Q", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(TENDENCY_TMP%F_A, "cloudsc_data", "TEND_TMP_A", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(TENDENCY_TMP%F_CLD, "cloudsc_data", "TEND_TMP_CLD", HDFEXISTS=.TRUE.)

CALL READ_HDF5_PERRANK_DATA(TENDENCY_LOC%F_T, "cloudsc_data", "TEND_LOC_T", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(TENDENCY_LOC%F_Q, "cloudsc_data", "TEND_LOC_Q", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(TENDENCY_LOC%F_A, "cloudsc_data", "TEND_LOC_A", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(TENDENCY_LOC%F_CLD, "cloudsc_data", "TEND_LOC_CLD", HDFEXISTS=.TRUE.)

CALL READ_HDF5_PERRANK_DATA(PAUX%F_PVFA, "cloudsc_data", "PVFA", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PVFL, "cloudsc_data", "PVFL", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PVFI, "cloudsc_data", "PVFI", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PDYNA, "cloudsc_data", "PDYNA", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PDYNL, "cloudsc_data", "PDYNL", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PDYNI, "cloudsc_data", "PDYNI", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PHRSW, "cloudsc_data", "PHRSW", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PHRLW, "cloudsc_data", "PHRLW", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PVERVEL, "cloudsc_data", "PVERVEL", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PAP, "cloudsc_data", "PAP", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PAPH, "cloudsc_data", "PAPH", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PLSM, "cloudsc_data", "PLSM" , HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_LDCUM, "cloudsc_data", "LDCUM", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_KTYPE, "cloudsc_data", "KTYPE", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PLU, "cloudsc_data", "PLU", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PLUDE, "cloudsc_data", "PLUDE", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PSNDE, "cloudsc_data", "PSNDE", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PMFU, "cloudsc_data", "PMFU", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PMFD, "cloudsc_data", "PMFD", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PA, "cloudsc_data", "PA", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PCLV, "cloudsc_data", "PCLV", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PSUPSAT, "cloudsc_data", "PSUPSAT", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PLCRIT_AER, "cloudsc_data", "PLCRIT_AER", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PICRIT_AER, "cloudsc_data", "PICRIT_AER", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PRE_ICE, "cloudsc_data", "PRE_ICE_AER", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PCCN , "cloudsc_data", "PCCN", HDFEXISTS=.TRUE.)
CALL READ_HDF5_PERRANK_DATA(PAUX%F_PNICE, "cloudsc_data", "PNICE", HDFEXISTS=.TRUE.)

END SUBROUTINE READ_FIELD_HDF5
#endif


END MODULE CLOUDSC_DRIVER_FIELD_MOD

Loading
Loading