diff --git a/arch/CNRS/arch-X64_IRENE.fcm b/arch/CNRS/arch-X64_IRENE.fcm index b96db19b0b1265f9957230557e3b07c8d022d998..63431b643fbc3b903929d82a209233e9a6c7672e 100644 --- a/arch/CNRS/arch-X64_IRENE.fcm +++ b/arch/CNRS/arch-X64_IRENE.fcm @@ -30,7 +30,8 @@ # - unix variables "$..." are accpeted and will be evaluated before calling fcm. # - fcm variables are starting with a % (and not a $) # -%XIOS_HOME $CCCWORKDIR/xios-trunk +%PROD_XIOS_HOME $CCCWORKDIR/xios-trunk +%DEBUG_XIOS_HOME %{PROD_XIOS_HOME}_debug %OASIS_HOME $CCCWORKDIR/now/models/oa3mct %NCDF_INC -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR @@ -43,7 +44,8 @@ %CPP cpp %FC mpif90 -c -cpp -%FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias +%PROD_FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias +%DEBUG_FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge %FFLAGS %FCFLAGS %LD mpif90 %LDFLAGS diff --git a/arch/CNRS/arch-X64_IRENE_DEBUG.fcm b/arch/CNRS/arch-X64_IRENE_DEBUG.fcm deleted file mode 100644 index 0db4df2dd0695d14281bb1d6c99506286bcc5970..0000000000000000000000000000000000000000 --- a/arch/CNRS/arch-X64_IRENE_DEBUG.fcm +++ /dev/null @@ -1,58 +0,0 @@ -# Irene BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm -# -# NCDF_HOME root directory containing lib and include subdirectories for netcdf4 -# HDF5_HOME root directory containing lib and include subdirectories for HDF5 -# XIOS_HOME root directory containing lib for XIOS -# OASIS_HOME root directory containing lib for OASIS -# -# NCDF_INC netcdf4 include file -# NCDF_LIB netcdf4 library -# XIOS_INC xios include file (taken into accound only if key_xios is activated) -# XIOS_LIB xios library (taken into accound only if key_xios is activated) -# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated) -# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated) -# -# FC Fortran compiler command -# FCFLAGS Fortran compiler flags -# FFLAGS Fortran 77 compiler flags -# LD linker -# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries -# FPPFLAGS pre-processing flags -# AR assembler -# ARFLAGS assembler flags -# MK make -# USER_INC complete list of include files -# USER_LIB complete list of libraries to pass to the linker -# CC C compiler used to compile conv for AGRIF -# CFLAGS compiler flags used with CC -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -%XIOS_HOME $CCCWORKDIR/xios-trunk -%OASIS_HOME $CCCWORKDIR/now/models/oa3mct - -%NCDF_INC -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR -%NCDF_LIB -L$NETCDFFORTRAN_LIBDIR -lnetcdff -L$NETCDF_LIBDIR -lnetcdf -L$HDF5_LIBDIR -lhdf5_hl -lhdf5 -lz -lcurl - -%XIOS_INC -I%XIOS_HOME/inc -%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++ -%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 -%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -%FC mpif90 -c -cpp -%FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge -%FFLAGS %FCFLAGS -%LD mpif90 -%LDFLAGS -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK gmake -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC cc -%CFLAGS -O0 diff --git a/arch/CNRS/arch-X64_IRENE_GCC.fcm b/arch/CNRS/arch-X64_IRENE_GCC.fcm index 6d27c5fa3809c1a577f9c4ec020bade2c7f5d7f5..99dffdfbefe76486365f86c46e1a7f23590c0382 100644 --- a/arch/CNRS/arch-X64_IRENE_GCC.fcm +++ b/arch/CNRS/arch-X64_IRENE_GCC.fcm @@ -29,7 +29,8 @@ %CPP cpp -Dkey_nosignedzero %FC mpif90 -%FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -Wno-missing-include-dirs +%PROD_FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -Wno-missing-include-dirs +%DEBUG_FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan %FFLAGS %FCFLAGS %LD mpif90 %LDFLAGS diff --git a/arch/CNRS/arch-X64_IRENE_GCC_DEBUG.fcm b/arch/CNRS/arch-X64_IRENE_GCC_DEBUG.fcm deleted file mode 100644 index f83799fccad826737d897caf5d6512b24a60435a..0000000000000000000000000000000000000000 --- a/arch/CNRS/arch-X64_IRENE_GCC_DEBUG.fcm +++ /dev/null @@ -1,44 +0,0 @@ -# Irene BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm -# -# list of modules used -# -# module purge -# module load gnu/8.3.0 -# module load flavor/buildcompiler/gcc/8 -# module load flavor/buildmpi/openmpi/2.0 -# module load flavor/hdf5/parallel -# module load mpi/openmpi/2.0.4 -# module load hdf5/1.8.20 -# module load netcdf-c/4.6.0 -# module load netcdf-fortran/4.4.4 -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -%XIOS_HOME $CCCWORKDIR/xios-trunk_gcc -%OASIS_HOME $CCCWORKDIR/now/models/oa3mct - -%NCDF_INC -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR -%NCDF_LIB -L$NETCDFFORTRAN_LIBDIR -lnetcdff -L$NETCDF_LIBDIR -lnetcdf -L$HDF5_LIBDIR -lhdf5_hl -lhdf5 -lz -lcurl - -%XIOS_INC -I%XIOS_HOME/inc -%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++ -%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 -%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -Dkey_nosignedzero -%FC mpif90 -%FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan -%FFLAGS %FCFLAGS -%LD mpif90 -%LDFLAGS -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK make -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC cc -%CFLAGS -O0 diff --git a/arch/CNRS/arch-X64_JEANZAY.fcm b/arch/CNRS/arch-X64_JEANZAY.fcm index e6e7ee1d09e47bd8ff1cb993eddf8d8f2cfcf2bb..069b4fbce6e9091861b64a0039c00dfcc3f1bcfc 100644 --- a/arch/CNRS/arch-X64_JEANZAY.fcm +++ b/arch/CNRS/arch-X64_JEANZAY.fcm @@ -48,7 +48,8 @@ %CPP cpp %FC mpiifort -c -cpp -%FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias +%PROD_FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias +%DEBUG_FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge %FFLAGS %FCFLAGS %LD mpiifort %LDFLAGS diff --git a/arch/CNRS/arch-X64_JEANZAY_DEBUG.fcm b/arch/CNRS/arch-X64_JEANZAY_DEBUG.fcm deleted file mode 100644 index 727cabff564c9afbddd9da1e5ca026a0995aeefc..0000000000000000000000000000000000000000 --- a/arch/CNRS/arch-X64_JEANZAY_DEBUG.fcm +++ /dev/null @@ -1,63 +0,0 @@ -# Jean-Zay HPE at IDRIS, http://www.idris.fr/jean-zay -# -# XIOS_HOME root directory containing lib for XIOS -# OASIS_HOME root directory containing lib for OASIS -# -# NCDF_INC netcdf4 include file -# NCDF_LIB netcdf4 library -# XIOS_INC xios include file (taken into accound only if key_xios is activated) -# XIOS_LIB xios library (taken into accound only if key_xios is activated) -# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated) -# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated) -# -# FC Fortran compiler command -# FCFLAGS Fortran compiler flags -# FFLAGS Fortran 77 compiler flags -# LD linker -# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries -# FPPFLAGS pre-processing flags -# AR assembler -# ARFLAGS assembler flags -# MK make -# USER_INC complete list of include files -# USER_LIB complete list of libraries to pass to the linker -# CC C compiler used to compile conv for AGRIF -# CFLAGS compiler flags used with CC -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# All NETCDF and HDF paths are empty as they are automatically defined through environment -# variables by the load of modules -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# -# -%XIOS_HOME $WORK/xios-trunk -%OASIS_HOME - -%NCDF_INC -%NCDF_LIB -lnetcdff -lnetcdf -%XIOS_INC -I%XIOS_HOME/inc -%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++ -%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 -%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -%FC mpiifort -c -cpp -%FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge -%FFLAGS %FCFLAGS -%LD mpiifort -%LDFLAGS -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK gmake -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC cc -%CFLAGS -O0 diff --git a/arch/MERCATOR/arch-X64_AA_INTEL_IMPI.fcm b/arch/MERCATOR/arch-X64_AA_INTEL_IMPI.fcm index 40a7450e43c2f8dc52938825ff460953b627ca7a..fbe1226d3ccbe720a6cb3a96f72b83fbe9d6d056 100644 --- a/arch/MERCATOR/arch-X64_AA_INTEL_IMPI.fcm +++ b/arch/MERCATOR/arch-X64_AA_INTEL_IMPI.fcm @@ -41,12 +41,13 @@ %NCDF_LIB ${NETCDF4_LIB} ${HDF5_LIB} %XIOS_INC -I${XIOS_INC} %XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++ -%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1 +%OASIS_INC -I${OASIS_DIR}/include %OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip %CPP cpp %FC mpiifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge %FFLAGS %FCFLAGS %LD mpiifort %LDFLAGS diff --git a/arch/MERCATOR/arch-X64_AA_INTEL_OMPI.fcm b/arch/MERCATOR/arch-X64_AA_INTEL_OMPI.fcm index 2e8a3139941ccc5df7a6d8812d3df486dfb0acb3..b30d157c4f8163b069cd6b6dfa8d4650412f33c0 100644 --- a/arch/MERCATOR/arch-X64_AA_INTEL_OMPI.fcm +++ b/arch/MERCATOR/arch-X64_AA_INTEL_OMPI.fcm @@ -47,7 +47,8 @@ %CPP cpp %FC mpifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge %FFLAGS %FCFLAGS %LD mpifort %LDFLAGS diff --git a/arch/MERCATOR/arch-X64_AA_INTEL_OMPI_DEBUG.fcm b/arch/MERCATOR/arch-X64_AA_INTEL_OMPI_DEBUG.fcm deleted file mode 100644 index dd0994798d826bada2dced97f0a2527dea176e61..0000000000000000000000000000000000000000 --- a/arch/MERCATOR/arch-X64_AA_INTEL_OMPI_DEBUG.fcm +++ /dev/null @@ -1,62 +0,0 @@ -# compiler options for AA (using INTEL compiler & OpenMPI) -# -# module purge -# module use /home/ar0s/modules -# module load prgenv/intel intel/2021.4.0 openmpi/4.1.1.1 hdf5-parallel/1.10.6 netcdf4-parallel/4.7.4 xios/trunk/rev2320-nmpi -# -# -# NCDF_INC netcdf4 include file -# NCDF_LIB netcdf4 library -# XIOS_INC xios include file (taken into accound only if key_xios is activated) -# XIOS_LIB xios library (taken into accound only if key_xios is activated) -# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated) -# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated) -# -# FC Fortran compiler command -# FCFLAGS Fortran compiler flags -# FFLAGS Fortran 77 compiler flags -# LD linker -# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries -# FPPFLAGS pre-processing flags -# AR assembler -# ARFLAGS assembler flags -# MK make -# USER_INC complete list of include files -# USER_LIB complete list of libraries to pass to the linker -# CC C compiler used to compile conv for AGRIF -# CFLAGS compiler flags used with CC -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# All NETCDF and HDF paths are empty as they are automatically defined through environment -# variables by the load of modules -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# -# -%NCDF_INC ${NETCDF4_INCLUDE} -%NCDF_LIB ${NETCDF4_LIB} -L${HDF5_DIR}/lib -Wl,-rpath,${HDF5_DIR}/lib -lhdf5_hl -lhdf5 -lz -%XIOS_INC -I${XIOS_INC} -%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++ -%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1 -%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -%FC mpifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge -%FFLAGS %FCFLAGS -%LD mpifort -%LDFLAGS -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK gmake -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC mpicc -%CFLAGS -O0 diff --git a/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI.fcm b/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI.fcm index 83772b33db60d8575d031b3fa74e30e3d2eff468..f41974d3dc0300b35a3ad44986d36361a4714d45 100644 --- a/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI.fcm +++ b/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI.fcm @@ -55,7 +55,8 @@ %CPP cpp %FC mpiifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge %FFLAGS %FCFLAGS %LD mpiifort %LDFLAGS diff --git a/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI_DEBUG.fcm b/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI_DEBUG.fcm deleted file mode 100644 index 9ca5dcc091d181d8b1d6c2b1d393c2a3a68cc0a6..0000000000000000000000000000000000000000 --- a/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI_DEBUG.fcm +++ /dev/null @@ -1,70 +0,0 @@ -# compiler options for BELENOS/TARANIS (using INTEL compiler) -# -# -------------------------------- -# INTEL_IMPI (NEMO 4.0 + XIOS-2.5) -# -------------------------------- -# module use /home/ext/mr/smer/samsong/modules -# module load intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/2.5/rev1903 -# -# ---------------------------------- -# INTEL_IMPI (NEMO 4.2 + XIOS-TRUNK) -# ---------------------------------- -# module use /home/ext/mr/smer/samsong/modules -# module load gcc/9.2.0 intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/trunk/rev2134 -# -# -# NCDF_INC netcdf4 include file -# NCDF_LIB netcdf4 library -# XIOS_INC xios include file (taken into accound only if key_xios is activated) -# XIOS_LIB xios library (taken into accound only if key_xios is activated) -# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated) -# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated) -# -# FC Fortran compiler command -# FCFLAGS Fortran compiler flags -# FFLAGS Fortran 77 compiler flags -# LD linker -# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries -# FPPFLAGS pre-processing flags -# AR assembler -# ARFLAGS assembler flags -# MK make -# USER_INC complete list of include files -# USER_LIB complete list of libraries to pass to the linker -# CC C compiler used to compile conv for AGRIF -# CFLAGS compiler flags used with CC -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# All NETCDF and HDF paths are empty as they are automatically defined through environment -# variables by the load of modules -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# -# -%NCDF_INC -I${NETCDF_INC} -%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${PHDF5_LIB_DIR} -lhdf5_hl -lhdf5 -%XIOS_INC -I${XIOS_INC} -%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++ -%OASIS_INC -I${OASIS_DIR}/include -%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -%FC mpiifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge -%FFLAGS %FCFLAGS -%LD mpiifort -%LDFLAGS -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK gmake -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC mpiicc -%CFLAGS -O0 diff --git a/arch/MERCATOR/arch-X64_BELENOS_INTEL_MVAP.fcm b/arch/MERCATOR/arch-X64_BELENOS_INTEL_MVAP.fcm index 0e28d12b963e3ffb1b796478f5eb1799d91ff4c0..5c2b92541b742b48abb1e38e325933066d3307ec 100644 --- a/arch/MERCATOR/arch-X64_BELENOS_INTEL_MVAP.fcm +++ b/arch/MERCATOR/arch-X64_BELENOS_INTEL_MVAP.fcm @@ -50,14 +50,15 @@ %NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${PHDF5_LIB_DIR} -lhdf5_hl -lhdf5 %XIOS_INC -I${XIOS_INC} %XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++ -%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1 +%OASIS_INC -I${OASIS_DIR}/include %OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip %CPP cpp -%FC mpifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%FC mpiifort -c -cpp +%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte +%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge %FFLAGS %FCFLAGS -%LD mpifort +%LD mpiifort %LDFLAGS %FPPFLAGS -P -traditional %AR ar @@ -66,5 +67,5 @@ %USER_INC %XIOS_INC %OASIS_INC %NCDF_INC %USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB -%CC mpicc +%CC mpiicc %CFLAGS -O0 diff --git a/arch/MERCATOR/arch-X64_BELENOS_INTEL_MVAP_DEBUG.fcm b/arch/MERCATOR/arch-X64_BELENOS_INTEL_MVAP_DEBUG.fcm deleted file mode 100644 index 4ec5587d320d34ac132ea03dfea97a76238ec544..0000000000000000000000000000000000000000 --- a/arch/MERCATOR/arch-X64_BELENOS_INTEL_MVAP_DEBUG.fcm +++ /dev/null @@ -1,70 +0,0 @@ -# compiler options for BELENOS/TARANIS (using INTEL compiler + Intel MPI) -# -# -------------------------------- -# INTEL_IMPI (NEMO 4.0 + XIOS-2.5) -# -------------------------------- -# module use /home/ext/mr/smer/samsong/modules -# module load intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/2.5/rev1903 -# -# ---------------------------------- -# INTEL_IMPI (NEMO 4.2 + XIOS-TRUNK) -# ---------------------------------- -# module use /home/ext/mr/smer/samsong/modules -# module load gcc/9.2.0 intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/trunk/rev2134 -# -# -# NCDF_INC netcdf4 include file -# NCDF_LIB netcdf4 library -# XIOS_INC xios include file (taken into accound only if key_xios is activated) -# XIOS_LIB xios library (taken into accound only if key_xios is activated) -# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated) -# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated) -# -# FC Fortran compiler command -# FCFLAGS Fortran compiler flags -# FFLAGS Fortran 77 compiler flags -# LD linker -# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries -# FPPFLAGS pre-processing flags -# AR assembler -# ARFLAGS assembler flags -# MK make -# USER_INC complete list of include files -# USER_LIB complete list of libraries to pass to the linker -# CC C compiler used to compile conv for AGRIF -# CFLAGS compiler flags used with CC -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# All NETCDF and HDF paths are empty as they are automatically defined through environment -# variables by the load of modules -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# -# -%NCDF_INC -I${NETCDF_INC} -%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${PHDF5_LIB_DIR} -lhdf5_hl -lhdf5 -%XIOS_INC -I${XIOS_INC} -%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++ -%OASIS_INC -I${OASIS_DIR}/include -%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -%FC mpiifort -c -cpp -%FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge -%FFLAGS %FCFLAGS -%LD mpiifort -%LDFLAGS -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK gmake -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC mpiicc -%CFLAGS -O0 diff --git a/arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI_DEBUG.fcm b/arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI_DEBUG.fcm deleted file mode 120000 index 43aab11434e9921cdf8f32e0bead519434f2ece6..0000000000000000000000000000000000000000 --- a/arch/MERCATOR/arch-X64_BELENOS_INTEL_OMPI_DEBUG.fcm +++ /dev/null @@ -1 +0,0 @@ -arch-X64_BELENOS_INTEL_IMPI_DEBUG.fcm \ No newline at end of file diff --git a/arch/MERCATOR/arch-X64_KARA_GCC_OMPI.fcm b/arch/MERCATOR/arch-X64_KARA_GCC_OMPI.fcm index 8ba606ef0c6a45926364e6dff51284410bb90945..5e886a887d184dada1d609717b7ae8afdf243d8f 100644 --- a/arch/MERCATOR/arch-X64_KARA_GCC_OMPI.fcm +++ b/arch/MERCATOR/arch-X64_KARA_GCC_OMPI.fcm @@ -49,8 +49,9 @@ %CPP cpp -Dkey_nosignedzero %FC mpif90 -c -cpp -#%FCFLAGS -fdefault-real-8 -O2 -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs -%FCFLAGS -fdefault-real-8 -O1 -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs +#%PROD_FCFLAGS -fdefault-real-8 -O2 -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs +%PROD_FCFLAGS -fdefault-real-8 -O1 -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs +%DEBUG_FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -fcheck=all -finit-real=snan -Wno-missing-include-dirs -ffpe-trap=invalid,zero,overflow %FFLAGS %FCFLAGS %LD mpif90 %LDFLAGS -lstdc++ diff --git a/arch/MERCATOR/arch-X64_KARA_GCC_OMPI_DEBUG.fcm b/arch/MERCATOR/arch-X64_KARA_GCC_OMPI_DEBUG.fcm deleted file mode 100644 index dad25a47a46c45ec5c16edf5254ab27e98d8918f..0000000000000000000000000000000000000000 --- a/arch/MERCATOR/arch-X64_KARA_GCC_OMPI_DEBUG.fcm +++ /dev/null @@ -1,64 +0,0 @@ -# compiler options for KARA (using GNU compiler) -# -# GNU_OMPI (NEMO-4.0 + XIOS-2.5) -# gcc/9.3.0 openmpi/4.0.5_gcc9.3.0 hdf5/1.8.18_gcc9.3.0 netcdf/4.7.1_gcc9.3.0 xios/2.5_rev1903_gcc9.3.0 -# -# GNU_OMPI (NEMO-4.2 + XIOS-TRUNK) -# gcc/9.3.0 openmpi/4.0.5_gcc9.3.0 hdf5/1.8.18_gcc9.3.0 netcdf/4.7.1_gcc9.3.0 xios/trunk_rev2136_gcc9.3.0 -# -# -# NCDF_INC netcdf4 include file -# NCDF_LIB netcdf4 library -# XIOS_INC xios include file (taken into accound only if key_xios is activated) -# XIOS_LIB xios library (taken into accound only if key_xios is activated) -# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated) -# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated) -# -# FC Fortran compiler command -# FCFLAGS Fortran compiler flags -# FFLAGS Fortran 77 compiler flags -# LD linker -# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries -# FPPFLAGS pre-processing flags -# AR assembler -# ARFLAGS assembler flags -# MK make -# USER_INC complete list of include files -# USER_LIB complete list of libraries to pass to the linker -# CC C compiler used to compile conv for AGRIF -# CFLAGS compiler flags used with CC -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# All NETCDF and HDF paths are empty as they are automatically defined through environment -# variables by the load of modules -#--------------------------------------------------------------------------------------------- -#--------------------------------------------------------------------------------------------- -# -# -%NCDF_INC -I${NETCDF_INC} -%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${HDF5_LIB} -lhdf5_hl -lhdf5 -%XIOS_INC -I${XIOS_INC} -%XIOS_LIB -L${XIOS_LIB} -lxios -%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1 -%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -Dkey_nosignedzero -%FC mpif90 -c -cpp -%FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -fcheck=all -finit-real=snan -Wno-missing-include-dirs -ffpe-trap=invalid,zero,overflow -%FFLAGS %FCFLAGS -%LD mpif90 -%LDFLAGS -lstdc++ -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK gmake -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC gcc -%CFLAGS -O0 diff --git a/arch/arch-linux_gfortran.fcm b/arch/arch-linux_gfortran.fcm index 39327645b6889dcaebf0d75a86153804daf73ecd..d1995a365b6fae51898b67f2859e3bd092f26650 100644 --- a/arch/arch-linux_gfortran.fcm +++ b/arch/arch-linux_gfortran.fcm @@ -49,7 +49,7 @@ %FFLAGS %FCFLAGS %LD mpif90 %LDFLAGS -%FPPFLAGS -P -C -traditional +%FPPFLAGS -P -traditional %AR ar %ARFLAGS rs %MK make diff --git a/arch/arch-linux_ifort.fcm b/arch/arch-linux_ifort.fcm index cf1d3c2e1765935b6f69ac35d43a212e5f8a2ebf..93bbe8ee86c8826bb1d452f1d57520bc85a752ae 100644 --- a/arch/arch-linux_ifort.fcm +++ b/arch/arch-linux_ifort.fcm @@ -48,7 +48,7 @@ %FFLAGS %FCFLAGS %LD ftn %LDFLAGS -%FPPFLAGS -P -C -traditional +%FPPFLAGS -P -traditional %AR ar %ARFLAGS rs %MK gmake diff --git a/arch/arch-linux_ifort_omp.fcm b/arch/arch-linux_ifort_omp.fcm index e695f81128fbf221a792fae958a549ce8b4b38d3..d8faadd5813575a73382185ab3c55f7b2d94a23c 100644 --- a/arch/arch-linux_ifort_omp.fcm +++ b/arch/arch-linux_ifort_omp.fcm @@ -20,7 +20,7 @@ %FCFLAGS -r8 -O3 -traceback -openmp %FFLAGS -r8 -O3 -traceback -openmp %LD ifort -%FPPFLAGS -P -C -traditional +%FPPFLAGS -P -traditional %LDFLAGS %AR ar %ARFLAGS -r diff --git a/arch/arch-linux_pgf90.fcm b/arch/arch-linux_pgf90.fcm index 24d3cdca1395214bd0ec8e8df741f45af6455f3b..b06c01a09770874215bf0dd0e1af9e0b675c2403 100644 --- a/arch/arch-linux_pgf90.fcm +++ b/arch/arch-linux_pgf90.fcm @@ -21,7 +21,7 @@ %FFLAGS %FCFLAGS %LD pgf90 %LDFLAGS -%FPPFLAGS -P -C -traditional +%FPPFLAGS -P -traditional %AR ar %ARFLAGS -rs %MK gmake diff --git a/arch/arch-osx_gfortran.fcm b/arch/arch-osx_gfortran.fcm index 5fb2f2826f4dc4b93d67a5f9e9ea9d9a134a4644..3ce12293a13ecbb091d1f5a058dbd52369ea4576 100644 --- a/arch/arch-osx_gfortran.fcm +++ b/arch/arch-osx_gfortran.fcm @@ -35,7 +35,8 @@ %CPP cpp -Dkey_nosignedzero %FC mpif90 -%FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -fallow-argument-mismatch +%PROD_FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -fallow-argument-mismatch +%DEBUG_FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan %FFLAGS %FCFLAGS %LD %FC %LDFLAGS diff --git a/arch/arch-osx_gfortran_debug.fcm b/arch/arch-osx_gfortran_debug.fcm deleted file mode 100644 index 0d07730603e39e2c3a9f946de2254cef61d8b64f..0000000000000000000000000000000000000000 --- a/arch/arch-osx_gfortran_debug.fcm +++ /dev/null @@ -1,51 +0,0 @@ -# generic gfortran compiler options for OSX installed with macport, http://www.macports.org/ -# -# Prerequisite softwares installed with MacPorts : -# Prerequisite softwares installed with MacPorts : -# sudo port install gcc9 -# sudo port install gcc_select -# sudo port select --set gcc mp-gcc9 -# sudo port install mpich-gcc9 -# sudo port install mpi_select -# sudo port select --set mpi mpich-gcc9-fortran -# sudo port install hdf5 +gcc9 +mpich +szip -# sudo port install netcdf +gcc9 +mpich -# sudo port install netcdf-fortran +gcc9 +mpich -# sudo port install p5.30-uri -# -# $ port select --show mpi -# The currently selected version for 'mpi' is 'mpich-gcc9-fortran'. -# $ port select --show gcc -# The currently selected version for 'gcc' is 'mp-gcc9'. -# -# Note that: -# - unix variables "$..." are accpeted and will be evaluated before calling fcm. -# - fcm variables are starting with a % (and not a $) -# -%NCDF_HOME /opt/local -%HDF5_HOME /opt/local -%XIOS_HOME /Users/$( whoami )/xios-trunk -%OASIS_HOME /not/defined - -%NCDF_INC -I%NCDF_HOME/include -I%HDF5_HOME/include -%NCDF_LIB -L%NCDF_HOME/lib -lnetcdff -lnetcdf -%XIOS_INC -I%XIOS_HOME/inc -%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++ -%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1 -%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip - -%CPP cpp -Dkey_nosignedzero -%FC mpif90 -%FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan -%FFLAGS %FCFLAGS -%LD %FC -%LDFLAGS -%FPPFLAGS -P -traditional -%AR ar -%ARFLAGS rs -%MK make -%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC -%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB - -%CC cc -%CFLAGS -O0 diff --git a/arch/misc/arch-X64_BULL.fcm b/arch/misc/arch-X64_BULL.fcm index 1f5db75d2273c84aaabdd8f3c72eed5dcd70048a..7b94dc4d88c8618e8630b326e784eefe9e225a0e 100644 --- a/arch/misc/arch-X64_BULL.fcm +++ b/arch/misc/arch-X64_BULL.fcm @@ -20,7 +20,7 @@ %FFLAGS %FCFLAGS %LD scorep-mpiifort %LDFLAGS -lstdc++ -%FPPFLAGS -P -C -traditional -std=c99 +%FPPFLAGS -P -traditional -std=c99 %AR ar %ARFLAGS rs %MK gmake diff --git a/ext/DUMMY_NETCDF/netcdf.F90 b/ext/DUMMY_NETCDF/netcdf.F90 new file mode 100644 index 0000000000000000000000000000000000000000..cd8d316fabcb20f5b003135c063cb02ffb721134 --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf.F90 @@ -0,0 +1,59 @@ +! Description: +! +! Input Parameters: +! None. +! +! Output Parameters: +! Many public constants are defined in "netcdf_constants.f90". The names follow +! the Fortran 77 names, with nf90_ used as a prefix instead of nf_77. +! Functions are made accessable through PUBLIC:: statements in "netcdf_visibility.f90". +! Only the functions listed in this file are available in the interface. +! +! References and Credits: +! Written by +! Robert Pincus +! Cooperative Institue for Meteorological Satellite Studies +! University of Wisconsin - Madison +! 1225 W. Dayton St. +! Madison, Wisconsin 53706 +! Robert.Pincus@ssec.wisc.edu +! +! Design Notes: +! Module elements are private by default. +! Many functions have optional arguments. In order to keep the interface easy to use, +! we've reordered the arguments (relative to the F77 interface) in some functions. +! The external datatype of attributes is the same as the internal type. +! By default, data is read from or put into the lowest part of the netCDF array with stride 1. +! We've made heavy use of overloading, especially in the variable put and get routines. +! A single function exists for putting all variables; a single function exists for getting +! variables. +! Text variables must be treated somewhat differently. When a character variable is defined, the +! fastest-varying index (first index in Fortran) must be the maxiumu length of the character +! string. N dimensional arrays of strings passed to the put or get functions are written/read +! from dimensions 2:N+1. The number of values along the first dimension is determined by the +! length of the argument character string. +! + module netcdf + use typesizes, only: OneByteInt, TwoByteInt, FourByteInt, EightByteInt, & + FourByteReal, EightByteReal + implicit none + private + ! as of version 4.4, the following are merged: + ! - netcdf_constants.f90 and netcdf4_constants.f90 + ! + ! Update the dependencies in the Makefile.am when modifying the list of + ! included files. +#include "netcdf_constants.h90" +#include "netcdf_overloads.h90" +#include "netcdf_visibility.h90" +contains +#include "netcdf_file.h90" +#include "netcdf3_file.h90" +#include "netcdf_dims.h90" +#include "netcdf_attributes.h90" +#include "netcdf_variables.h90" +#include "netcdf_text_variables.h90" +#include "netcdf_expanded_subset.h90" +#include "netcdf_get_nd_expanded.h90" +#include "netcdf_eightbyte_subset.h90" +end module netcdf diff --git a/ext/DUMMY_NETCDF/netcdf3_file.h90 b/ext/DUMMY_NETCDF/netcdf3_file.h90 new file mode 100644 index 0000000000000000000000000000000000000000..c0f437c6798e4157ca78009591889c4813907804 --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf3_file.h90 @@ -0,0 +1,27 @@ +! This is part of the netCDF F90 API, or. Copyright 2006 UCAR. See COPYRIGHT file +! for details. + +! This file contains the netcdf-3 file open and create functions. + +! $Id: netcdf4_constants.f90,v 1.14 2010/05/25 13:53:00 ed Exp $ +! ------- +function nf90_open(path, mode, ncid, chunksize) + character (len = *), intent(in ) :: path + integer, intent(in ) :: mode + integer, intent( out) :: ncid + integer, optional, intent(inout) :: chunksize + integer :: nf90_open + + nf90_open = -1 +end function nf90_open +! ------- +function nf90_create(path, cmode, ncid, initialsize, chunksize) + character (len = *), intent(in ) :: path + integer, intent(in ) :: cmode + integer, intent( out) :: ncid + integer, optional, intent(in ) :: initialsize + integer, optional, intent(inout) :: chunksize + integer :: nf90_create + + nf90_create = -1 +end function nf90_create diff --git a/ext/DUMMY_NETCDF/netcdf_attributes.h90 b/ext/DUMMY_NETCDF/netcdf_attributes.h90 new file mode 100644 index 0000000000000000000000000000000000000000..4185cb9d3540412dc1558348c3102c80ddade61f --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_attributes.h90 @@ -0,0 +1,290 @@ + ! + ! Attribute routines: + ! + ! ------- + function nf90_copy_att(ncid_in, varid_in, name, ncid_out, varid_out) + integer, intent( in) :: ncid_in, varid_in + character (len = *), intent( in) :: name + integer, intent( in) :: ncid_out, varid_out + integer :: nf90_copy_att + + nf90_copy_att = -1 + end function nf90_copy_att + ! ------- + function nf90_rename_att(ncid, varid, curname, newname) + integer, intent( in) :: ncid, varid + character (len = *), intent( in) :: curname, newname + integer :: nf90_rename_att + + nf90_rename_att = -1 + end function nf90_rename_att + ! ------- + function nf90_del_att(ncid, varid, name) + integer, intent( in) :: ncid, varid + character (len = *), intent( in) :: name + integer :: nf90_del_att + + nf90_del_att = -1 + end function nf90_del_att + ! ------- + ! Attribute inquiry functions + ! ------- + function nf90_inq_attname(ncid, varid, attnum, name) + integer, intent( in) :: ncid, varid, attnum + character (len = *), intent(out) :: name + integer :: nf90_inq_attname + + nf90_inq_attname = -1 + end function nf90_inq_attname + ! ------- + function nf90_inquire_attribute(ncid, varid, name, xtype, len, attnum) + integer, intent( in) :: ncid, varid + character (len = *), intent( in) :: name + integer, intent(out), optional :: xtype, len, attnum + integer :: nf90_inquire_attribute + + nf90_inquire_attribute = -1 + end function nf90_inquire_attribute + ! ------- + ! Put and get functions; these will get overloaded + ! ------- + ! Text + ! ------- + function nf90_put_att_text(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + character(len = *), intent( in) :: values + integer :: nf90_put_att_text + + nf90_put_att_text = -1 + end function nf90_put_att_text + ! ------- + function nf90_get_att_text(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + character(len = *), intent(out) :: values + integer :: nf90_get_att_text + + nf90_get_att_text = -1 + end function nf90_get_att_text + ! ------- + ! Integer attributes + ! ------- + function nf90_put_att_OneByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = OneByteInt), dimension(:), intent( in) :: values + integer :: nf90_put_att_OneByteInt + + nf90_put_att_OneByteInt = -1 + end function nf90_put_att_OneByteInt + ! ------- + function nf90_put_att_one_OneByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = OneByteInt), intent( in) :: values + integer :: nf90_put_att_one_OneByteInt + + nf90_put_att_one_OneByteInt = -1 + end function nf90_put_att_one_OneByteInt + ! ------- + function nf90_get_att_OneByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = OneByteInt), dimension(:), intent(out) :: values + integer :: nf90_get_att_OneByteInt + + nf90_get_att_OneByteInt = -1 + end function nf90_get_att_OneByteInt + ! ------- + function nf90_get_att_one_OneByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = OneByteInt), intent(out) :: values + integer :: nf90_get_att_one_OneByteInt + + nf90_get_att_one_OneByteInt = -1 + end function nf90_get_att_one_OneByteInt + ! ------- + function nf90_put_att_TwoByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = TwoByteInt), dimension(:), intent( in) :: values + integer :: nf90_put_att_TwoByteInt + + nf90_put_att_TwoByteInt = -1 + end function nf90_put_att_TwoByteInt + ! ------- + function nf90_put_att_one_TwoByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = TwoByteInt), intent( in) :: values + integer :: nf90_put_att_one_TwoByteInt + + nf90_put_att_one_TwoByteInt = -1 + end function nf90_put_att_one_TwoByteInt + ! ------- + function nf90_get_att_TwoByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = TwoByteInt), dimension(:), intent(out) :: values + integer :: nf90_get_att_TwoByteInt + + nf90_get_att_TwoByteInt = -1 + end function nf90_get_att_TwoByteInt + ! ------- + function nf90_get_att_one_TwoByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = TwoByteInt), intent(out) :: values + integer :: nf90_get_att_one_TwoByteInt + + nf90_get_att_one_TwoByteInt = -1 + end function nf90_get_att_one_TwoByteInt + ! ------- + function nf90_put_att_FourByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = FourByteInt), dimension(:), intent( in) :: values + integer :: nf90_put_att_FourByteInt + + nf90_put_att_FourByteInt = -1 + end function nf90_put_att_FourByteInt + ! ------- + function nf90_put_att_one_FourByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = FourByteInt), intent( in) :: values + integer :: nf90_put_att_one_FourByteInt + + nf90_put_att_one_FourByteInt = -1 + end function nf90_put_att_one_FourByteInt + ! ------- + function nf90_get_att_FourByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = FourByteInt), dimension(:), intent(out) :: values + integer :: nf90_get_att_FourByteInt + + nf90_get_att_FourByteInt = -1 + end function nf90_get_att_FourByteInt + ! ------- + function nf90_get_att_one_FourByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = FourByteInt), intent(out) :: values + integer :: nf90_get_att_one_FourByteInt + + nf90_get_att_one_FourByteInt = -1 + end function nf90_get_att_one_FourByteInt + ! ------- + function nf90_put_att_EightByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = EightByteInt), dimension(:), intent( in) :: values + integer :: nf90_put_att_EightByteInt + + nf90_put_att_EightByteInt = -1 + end function nf90_put_att_EightByteInt + ! ------- + function nf90_put_att_one_EightByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = EightByteInt), intent( in) :: values + integer :: nf90_put_att_one_EightByteInt + + nf90_put_att_one_EightByteInt = -1 + end function nf90_put_att_one_EightByteInt + ! ------- + function nf90_get_att_EightByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = EightByteInt), dimension(:), intent(out) :: values + integer :: nf90_get_att_EightByteInt + + nf90_get_att_EightByteInt = -1 + end function nf90_get_att_EightByteInt + ! ------- + function nf90_get_att_one_EightByteInt(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + integer (kind = EightByteInt), intent(out) :: values + integer :: nf90_get_att_one_EightByteInt + + nf90_get_att_one_EightByteInt = -1 + end function nf90_get_att_one_EightByteInt + ! ------- + ! Real attributes + ! ------- + function nf90_put_att_FourByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = FourByteReal), dimension(:), intent( in) :: values + integer :: nf90_put_att_FourByteReal + + nf90_put_att_FourByteReal = -1 + end function nf90_put_att_FourByteReal + ! ------- + function nf90_put_att_one_FourByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = FourByteReal), intent( in) :: values + integer :: nf90_put_att_one_FourByteReal + + nf90_put_att_one_FourByteReal = -1 + end function nf90_put_att_one_FourByteReal + ! ------- + function nf90_get_att_FourByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = FourByteReal), dimension(:), intent(out) :: values + integer :: nf90_get_att_FourByteReal + + nf90_get_att_FourByteReal = -1 + end function nf90_get_att_FourByteReal + ! ------- + function nf90_get_att_one_FourByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = FourByteReal), intent(out) :: values + integer :: nf90_get_att_one_FourByteReal + + nf90_get_att_one_FourByteReal = -1 + end function nf90_get_att_one_FourByteReal + ! ------- + function nf90_put_att_EightByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = EightByteReal), dimension(:), intent( in) :: values + integer :: nf90_put_att_EightByteReal + + nf90_put_att_EightByteReal = -1 + end function nf90_put_att_EightByteReal + ! ------- + function nf90_put_att_one_EightByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = EightByteReal), intent( in) :: values + integer :: nf90_put_att_one_EightByteReal + + nf90_put_att_one_EightByteReal = -1 + end function nf90_put_att_one_EightByteReal + ! ------- + function nf90_get_att_EightByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = EightByteReal), dimension(:), intent(out) :: values + integer :: nf90_get_att_EightByteReal + + nf90_get_att_EightByteReal = -1 + end function nf90_get_att_EightByteReal + ! ------- + function nf90_get_att_one_EightByteReal(ncid, varid, name, values) + integer, intent( in) :: ncid, varid + character(len = *), intent( in) :: name + real (kind = EightByteReal), intent(out) :: values + integer :: nf90_get_att_one_EightByteReal + + nf90_get_att_one_EightByteReal = -1 + end function nf90_get_att_one_EightByteReal + ! ------- diff --git a/ext/DUMMY_NETCDF/netcdf_constants.h90 b/ext/DUMMY_NETCDF/netcdf_constants.h90 new file mode 100644 index 0000000000000000000000000000000000000000..3d18347110ac51203d4dc261d88a838abe25ae3c --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_constants.h90 @@ -0,0 +1,262 @@ + ! + ! external netcdf data types: + ! + integer, parameter, public :: & + nf90_byte = 1, & + nf90_int1 = nf90_byte, & + nf90_char = 2, & + nf90_short = 3, & + nf90_int2 = nf90_short, & + nf90_int = 4, & + nf90_int4 = nf90_int, & + nf90_float = 5, & + nf90_real = nf90_float, & + nf90_real4 = nf90_float, & + nf90_double = 6, & + nf90_real8 = nf90_double + + ! + ! default fill values: + ! + character (len = 1), parameter, public :: & + nf90_fill_char = achar(0) + integer (kind = OneByteInt), parameter, public :: & + nf90_fill_byte = -127, & + nf90_fill_int1 = nf90_fill_byte + integer (kind = TwoByteInt), parameter, public :: & + nf90_fill_short = -32767, & + nf90_fill_int2 = nf90_fill_short + integer (kind = FourByteInt), parameter, public :: & + nf90_fill_int = -2147483647 + real (kind = FourByteReal), parameter, public :: & + nf90_fill_float = 9.9692099683868690e+36, & + nf90_fill_real = nf90_fill_float, & + nf90_fill_real4 = nf90_fill_float + real (kind = EightByteReal), parameter, public :: & + nf90_fill_double = 9.9692099683868690e+36, & + nf90_fill_real8 = nf90_fill_double + + ! + ! mode flags for opening and creating a netcdf dataset: + ! + integer, parameter, public :: & + nf90_nowrite = 0, & + nf90_write = 1, & + nf90_clobber = 0, & + nf90_noclobber = 4, & + nf90_fill = 0, & + nf90_nofill = 256, & + nf90_64bit_offset = 512, & + nf90_64bit_data = 32, & + nf90_cdf5 = nf90_64bit_data, & + nf90_lock = 1024, & + nf90_share = 2048, & + nf90_diskless = 8, & + nf90_mmap = 16 + + integer, parameter, public :: & + nf90_sizehint_default = 0, & + nf90_align_chunk = -1 + + ! + ! size argument for defining an unlimited dimension: + ! + integer, parameter, public :: nf90_unlimited = 0 + + ! + ! global attribute id: + ! + integer, parameter, public :: nf90_global = 0 + + ! + ! implementation limits: + ! + integer, parameter, public :: & + nf90_max_dims = 1024, & + nf90_max_attrs = 8192, & + nf90_max_vars = 8192, & + nf90_max_name = 256, & + nf90_max_var_dims = 1024 + + ! + ! error codes: + ! + integer, parameter, public :: & + nf90_noerr = 0, & ! No Error + nf90_ebadid = -33, & ! Not a valid ID + nf90_eexist = -35, & ! netcdf file exists && NF90_NOCLOBBER + nf90_einval = -36, & ! Invalid Argument + nf90_eperm = -37, & ! Write to read only + nf90_enotindefine = -38, & ! Operation not allowed in data mode + nf90_eindefine = -39, & ! Operation not allowed in define mode + nf90_einvalcoords = -40, & ! Index exceeds dimension bound + nf90_emaxdims = -41, & ! nf90_max_dims exceeded + nf90_enameinuse = -42, & ! String match to name in use + nf90_enotatt = -43, & ! Attribute not found + nf90_emaxatts = -44, & ! nf90_max_attrs exceeded + nf90_ebadtype = -45, & ! Not a netcdf data type + nf90_ebaddim = -46, & ! Invalid dimension id or name + nf90_eunlimpos = -47, & ! nf90_unlimited in the wrong index + nf90_emaxvars = -48, & ! nf90_max_vars exceeded + nf90_enotvar = -49, & ! The variable ID is invalid for the specified netCDF dataset. + nf90_eglobal = -50, & ! Action prohibited on nf90_global varid + nf90_enotnc = -51, & ! Not a netcdf file + nf90_ests = -52, & ! In Fortran, string too short + nf90_emaxname = -53, & ! nf90_max_name exceeded + nf90_eunlimit = -54, & ! nf90_unlimited size already in use + nf90_enorecvars = -55, & ! nc_rec op when there are no record vars + nf90_echar = -56, & ! Attempt to convert between text & numbers + nf90_eedge = -57, & ! Start+count exceeds dimension bound + nf90_estride = -58, & ! Illegal stride + nf90_ebadname = -59, & ! Attribute or variable name contains illegal characters + nf90_erange = -60, & ! Math result not representable + nf90_enomem = -61, & ! Memory allocation (malloc) failure + nf90_evarsize = -62, & ! One or more variable sizes violate format constraints + nf90_edimsize = -63, & ! Invalid dimension size + nf90_etrunc = -64, & ! File likely truncated or possibly corrupted + nf90_eaxistype = -65 ! Unknown axis type. + ! + ! more error codes for DAP + ! + integer, parameter, public :: & + nf90_edap = -66, & ! Generic DAP error + nf90_ecurl = -67, & ! Generic libcurl error + nf90_eio = -68, & ! Generic IO error + nf90_enodata = -69, & ! Attempt to access variable with no data + nf90_edapsvc = -70, & ! DAP server error + nf90_edas = -71, & ! Malformed or inaccessible DAS + nf90_edds = -72, & ! Malformed or inaccessible DDS + nf90_edatadds = -73, & ! Malformed or inaccessible DATADDS + nf90_edapurl = -74, & ! Malformed DAP URL + nf90_edapconstraint = -75, & ! Malformed DAP Constrain + nf90_etranslation = -76, & ! Untranslatable construct + nf904_first_error = -100 + ! + ! error codes for netCDF-4 + ! +integer, parameter, public :: & + nf90_ehdferr = -101, & ! Error at HDF5 layer. + nf90_ecantread = -102, & ! Can't read. + nf90_ecantwrite = -103, & ! Can't write. + nf90_ecantcreate = -104, & ! Can't create. + nf90_efilemeta = -105, & ! Problem with file metadata. + nf90_edimmeta = -106, & ! Problem with dimension metadata. + nf90_eattmeta = -107, & ! Problem with attribute metadata. + nf90_evarmeta = -108, & ! Problem with variable metadata. + nf90_enocompound = -109, & ! Not a compound type. + nf90_eattexists = -110, & ! Attribute already exists. + nf90_enotnc4 = -111, & ! Attempting netcdf-4 operation on netcdf-3 file. + nf90_estrictnc3 = -112, & ! Attempting netcdf-4 operation on strict nc3 netcdf-4 file. + nf90_enotnc3 = -113, & ! Attempting netcdf-3 operation on netcdf-4 file. + nf90_enopar = -114, & ! Parallel operation on file opened for non-parallel access. + nf90_eparinit = -115, & ! Error initializing for parallel access. + nf90_ebadgrpid = -116, & ! Bad group ID. + nf90_ebadtypid = -117, & ! Bad type ID. + nf90_etypdefined = -118, & ! Type has already been defined and may not be edited. + nf90_ebadfield = -119, & ! Bad field ID. + nf90_ebadclass = -120, & ! Bad class. + nf90_emaptype = -121, & ! Mapped access for atomic types only. + nf90_elatefill = -122, & ! Attempt to define fill value when data already exists. + nf90_elatedef = -123, & ! Attempt to define var properties, like deflate, after enddef. + nf90_edimscale = -124, & ! Probem with HDF5 dimscales. + nf90_enogrp = -125, & ! No group found. + nf90_estorage = -126, & ! Can't specify both contiguous and chunking. + nf90_ebadchunk = -127, & ! Bad chunksize. + nf90_enotbuilt = -128, & ! Attempt to use feature that was not turned on when netCDF was built. + nf90_ediskless = -129, & ! Error in using diskless access. + nf90_ecantextend = -130, & ! Attempt to extend dataset during ind. I/O operation. + nf90_empi = -131, & ! MPI operation failed. + nf90_efilter = -132, & ! Filter operation failed. + nf90_ercfile = -133, & ! RC file failure + nf90_enullpad = -134, & ! Header Bytes not Null-Byte padded + nf90_einmemory = -135, & ! In-memory file error + nf90_enofilter = -136, & ! Filter not defined on variable. + nf90_enczarr = -137, & ! Error at NCZarr layer. + nf90_es3 = -138, & ! Generic S3 error + nf90_eempty = -139, & ! Attempt to read empty NCZarr map key + nf90_eobject = -140, & ! Some object exists when it should not + nf90_enoobject = -141, & ! Some object not found + nf90_eplugin = -142, & ! Unclassified failure in accessing a dynamically loaded plugin> + nf904_last_error = -142 + + ! + ! error handling modes: + ! + integer, parameter, public :: & + nf90_fatal = 1, & + nf90_verbose = 2 + + ! + ! format version numbers: + ! + integer, parameter, public :: & + nf90_format_classic = 1, & + nf90_format_64bit = 2, & + nf90_format_64bit_offset = nf90_format_64bit, & + nf90_format_64bit_data = 5, & + nf90_format_cdf5 = nf90_format_64bit_data, & + nf90_format_netcdf4 = 3, & + nf90_format_netcdf4_classic = 4 + +! extra data types: +integer, parameter, public :: & + nf90_ubyte = 7, & + nf90_ushort = 8, & + nf90_uint = 9, & + nf90_int64 = 10, & + nf90_uint64 = 11, & + nf90_string = 12, & + nf90_vlen = 13, & + nf90_opaque = 14, & + nf90_enum = 15, & + nf90_compound = 16 + + +! extra default fill values: +integer (kind = TwoByteInt), parameter, public :: & + nf90_fill_ubyte = 255, & + nf90_fill_uint1 = nf90_fill_ubyte +integer (kind = FourByteInt), parameter, public :: & + nf90_fill_ushort = 65535, & + nf90_fill_uint2 = nf90_fill_ushort +integer (kind = EightByteInt), parameter, public :: & + nf90_fill_uint = 4294967295_EightByteInt + +! Extra file create mode flags. +integer, parameter, public :: & + nf90_netcdf4 = 4096, & + nf90_hdf5 = 4096, & ! deprecated + nf90_classic_model = 256 + +! Flags for parallel access. +integer, parameter, public :: nf90_independent = 0, nf90_collective = 1 + +! Flags for parallel I/O. +integer, parameter, public :: nf90_mpiio = 8192, nf90_mpiposix = 16384, & + nf90_pnetcdf = 32768 + +! Extra variable flags. +integer, parameter, public :: & + nf90_chunk_seq = 0, & + nf90_chunk_sub = 1, & + nf90_chunk_sizes = 2, & + nf90_endian_native = 0, & + nf90_endian_little = 1, & + nf90_endian_big = 2, & + nf90_chunked = 0, & + nf90_notcontiguous = 0, & + nf90_contiguous = 1, & + nf90_compact = 2, & + nf90_nochecksum = 0, & + nf90_fletcher32 = 1, & + nf90_noshuffle = 0, & + nf90_shuffle = 1, & + nf90_szip_ec_option_mask = 4, & + nf90_szip_nn_option_mask = 32, & + nf90_noquantize = 0, & + nf90_quantize_bitgroom = 1 + +! This is the position of NC_NETCDF4 in cmode, counting from the +! right, starting (uncharacteristically for fortran) at 0. It's needed +! for the BTEST function calls. +integer, parameter, private :: NETCDF4_BIT = 12 diff --git a/ext/DUMMY_NETCDF/netcdf_dims.h90 b/ext/DUMMY_NETCDF/netcdf_dims.h90 new file mode 100644 index 0000000000000000000000000000000000000000..5221d7e65d12bcadf3ae2779891d2fb7cbee577c --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_dims.h90 @@ -0,0 +1,41 @@ + ! + ! Dimension routines: + ! + ! ----------- + function nf90_def_dim(ncid, name, len, dimid) + integer, intent( in) :: ncid + character (len = *), intent( in) :: name + integer, intent( in) :: len + integer, intent(out) :: dimid + integer :: nf90_def_dim + + nf90_def_dim = -1 + end function nf90_def_dim + ! ----------- + function nf90_inq_dimid(ncid, name, dimid) + integer, intent( in) :: ncid + character (len = *), intent( in) :: name + integer, intent(out) :: dimid + integer :: nf90_inq_dimid + + nf90_inq_dimid = -1 + end function nf90_inq_dimid + ! ----------- + function nf90_rename_dim(ncid, dimid, name) + integer, intent( in) :: ncid + character (len = *), intent( in) :: name + integer, intent( in) :: dimid + integer :: nf90_rename_dim + + nf90_rename_dim = -1 + end function nf90_rename_dim + ! ----------- + function nf90_inquire_dimension(ncid, dimid, name, len) + integer, intent( in) :: ncid, dimid + character (len = *), optional, intent(out) :: name + integer, optional, intent(out) :: len + integer :: nf90_inquire_dimension + + nf90_inquire_dimension = -1 + end function nf90_inquire_dimension + ! ----------- diff --git a/ext/DUMMY_NETCDF/netcdf_eightbyte_subset.h90 b/ext/DUMMY_NETCDF/netcdf_eightbyte_subset.h90 new file mode 100644 index 0000000000000000000000000000000000000000..771fcd1b0ff52034253abc4070394fb9949c0af3 --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_eightbyte_subset.h90 @@ -0,0 +1,96 @@ + function nf90_put_var_1D_EightByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), dimension(:), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_1D_EightByteInt + + nf90_put_var_1D_EightByteInt = -1 + end function nf90_put_var_1D_EightByteInt + + + function nf90_put_var_2D_EightByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), dimension(:, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_2D_EightByteInt + + nf90_put_var_2D_EightByteInt = -1 + end function nf90_put_var_2D_EightByteInt + + + function nf90_put_var_3D_EightByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), dimension(:, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_3D_EightByteInt + + nf90_put_var_3D_EightByteInt = -1 + end function nf90_put_var_3D_EightByteInt + + + function nf90_put_var_4D_EightByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), dimension(:, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_4D_EightByteInt + + nf90_put_var_4D_EightByteInt = -1 + end function nf90_put_var_4D_EightByteInt + + + function nf90_put_var_5D_EightByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), dimension(:, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_5D_EightByteInt + + nf90_put_var_5D_EightByteInt = -1 + end function nf90_put_var_5D_EightByteInt + + + function nf90_put_var_6D_EightByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), dimension(:, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_6D_EightByteInt + + nf90_put_var_6D_EightByteInt = -1 + end function nf90_put_var_6D_EightByteInt + + + function nf90_put_var_7D_EightByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), dimension(:, :, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_7D_EightByteInt + + nf90_put_var_7D_EightByteInt = -1 + end function nf90_put_var_7D_EightByteInt + + function nf90_put_var_EightByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), intent( in) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_put_var_EightByteInt + + nf90_put_var_EightByteInt = -1 + end function nf90_put_var_EightByteInt + + + function nf90_get_var_EightByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = EightByteInt), intent(out) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_get_var_EightByteInt + + nf90_get_var_EightByteInt = -1 + end function nf90_get_var_EightByteInt + + diff --git a/ext/DUMMY_NETCDF/netcdf_expanded_subset.h90 b/ext/DUMMY_NETCDF/netcdf_expanded_subset.h90 new file mode 100644 index 0000000000000000000000000000000000000000..535dd1ea64c50d25cbb03d45571556e97b6753f5 --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_expanded_subset.h90 @@ -0,0 +1,487 @@ + + function nf90_put_var_OneByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), intent( in) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_put_var_OneByteInt + + nf90_put_var_OneByteInt = -1 + end function nf90_put_var_OneByteInt + + + function nf90_put_var_TwoByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), intent( in) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_put_var_TwoByteInt + + nf90_put_var_TwoByteInt = -1 + end function nf90_put_var_TwoByteInt + + + function nf90_put_var_FourByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), intent( in) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_put_var_FourByteInt + + nf90_put_var_FourByteInt = -1 + end function nf90_put_var_FourByteInt + + + function nf90_put_var_FourByteReal(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), intent( in) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_put_var_FourByteReal + + nf90_put_var_FourByteReal = -1 + end function nf90_put_var_FourByteReal + + + function nf90_put_var_EightByteReal(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), intent( in) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_put_var_EightByteReal + + nf90_put_var_EightByteReal = -1 + end function nf90_put_var_EightByteReal + + + function nf90_get_var_OneByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), intent(out) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_get_var_OneByteInt + + nf90_get_var_OneByteInt = -1 + end function nf90_get_var_OneByteInt + + + function nf90_get_var_TwoByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), intent(out) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_get_var_TwoByteInt + + nf90_get_var_TwoByteInt = -1 + end function nf90_get_var_TwoByteInt + + + function nf90_get_var_FourByteInt(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), intent(out) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_get_var_FourByteInt + + nf90_get_var_FourByteInt = -1 + end function nf90_get_var_FourByteInt + + + function nf90_get_var_FourByteReal(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), intent(out) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_get_var_FourByteReal + + nf90_get_var_FourByteReal = -1 + end function nf90_get_var_FourByteReal + + + function nf90_get_var_EightByteReal(ncid, varid, values, start) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), intent(out) :: values + integer, dimension(:), optional, intent( in) :: start + integer :: nf90_get_var_EightByteReal + + nf90_get_var_EightByteReal = -1 + end function nf90_get_var_EightByteReal + + + + function nf90_put_var_1D_OneByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), dimension(:), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_1D_OneByteInt + + nf90_put_var_1D_OneByteInt = -1 + end function nf90_put_var_1D_OneByteInt + + + function nf90_put_var_2D_OneByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), dimension(:, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_2D_OneByteInt + + + nf90_put_var_2D_OneByteInt = -1 + end function nf90_put_var_2D_OneByteInt + + + function nf90_put_var_3D_OneByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), dimension(:, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_3D_OneByteInt + + nf90_put_var_3D_OneByteInt = -1 + end function nf90_put_var_3D_OneByteInt + + + function nf90_put_var_4D_OneByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), dimension(:, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_4D_OneByteInt + + nf90_put_var_4D_OneByteInt = -1 + end function nf90_put_var_4D_OneByteInt + + + function nf90_put_var_5D_OneByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), dimension(:, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_5D_OneByteInt + + nf90_put_var_5D_OneByteInt = -1 + end function nf90_put_var_5D_OneByteInt + + + function nf90_put_var_6D_OneByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), dimension(:, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_6D_OneByteInt + + nf90_put_var_6D_OneByteInt = -1 + end function nf90_put_var_6D_OneByteInt + + + function nf90_put_var_7D_OneByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = OneByteInt), dimension(:, :, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_7D_OneByteInt + + nf90_put_var_7D_OneByteInt = -1 + end function nf90_put_var_7D_OneByteInt + + + function nf90_put_var_1D_TwoByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), dimension(:), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_1D_TwoByteInt + + nf90_put_var_1D_TwoByteInt = -1 + end function nf90_put_var_1D_TwoByteInt + + + function nf90_put_var_2D_TwoByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), dimension(:, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_2D_TwoByteInt + + nf90_put_var_2D_TwoByteInt = -1 + end function nf90_put_var_2D_TwoByteInt + + + function nf90_put_var_3D_TwoByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), dimension(:, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_3D_TwoByteInt + + nf90_put_var_3D_TwoByteInt = -1 + end function nf90_put_var_3D_TwoByteInt + + + function nf90_put_var_4D_TwoByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), dimension(:, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_4D_TwoByteInt + + nf90_put_var_4D_TwoByteInt = -1 + end function nf90_put_var_4D_TwoByteInt + + + function nf90_put_var_5D_TwoByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), dimension(:, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_5D_TwoByteInt + + nf90_put_var_5D_TwoByteInt = -1 + end function nf90_put_var_5D_TwoByteInt + + + function nf90_put_var_6D_TwoByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), dimension(:, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_6D_TwoByteInt + + nf90_put_var_6D_TwoByteInt = -1 + end function nf90_put_var_6D_TwoByteInt + + + function nf90_put_var_7D_TwoByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = TwoByteInt), dimension(:, :, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_7D_TwoByteInt + + nf90_put_var_7D_TwoByteInt = -1 + end function nf90_put_var_7D_TwoByteInt + + + function nf90_put_var_1D_FourByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), dimension(:), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_1D_FourByteInt + + nf90_put_var_1D_FourByteInt = -1 + end function nf90_put_var_1D_FourByteInt + + + function nf90_put_var_2D_FourByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), dimension(:, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_2D_FourByteInt + + nf90_put_var_2D_FourByteInt = -1 + end function nf90_put_var_2D_FourByteInt + + + function nf90_put_var_3D_FourByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), dimension(:, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_3D_FourByteInt + + nf90_put_var_3D_FourByteInt = -1 + end function nf90_put_var_3D_FourByteInt + + + function nf90_put_var_4D_FourByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), dimension(:, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_4D_FourByteInt + + nf90_put_var_4D_FourByteInt = -1 + end function nf90_put_var_4D_FourByteInt + + + function nf90_put_var_5D_FourByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), dimension(:, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_5D_FourByteInt + + nf90_put_var_5D_FourByteInt = -1 + end function nf90_put_var_5D_FourByteInt + + + function nf90_put_var_6D_FourByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), dimension(:, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_6D_FourByteInt + + nf90_put_var_6D_FourByteInt = -1 + end function nf90_put_var_6D_FourByteInt + + + function nf90_put_var_7D_FourByteInt(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + integer (kind = FourByteInt), dimension(:, :, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_7D_FourByteInt + + nf90_put_var_7D_FourByteInt = -1 + end function nf90_put_var_7D_FourByteInt + + + function nf90_put_var_1D_FourByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), dimension(:), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_1D_FourByteReal + + nf90_put_var_1D_FourByteReal = -1 + end function nf90_put_var_1D_FourByteReal + + + function nf90_put_var_2D_FourByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), dimension(:, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_2D_FourByteReal + + nf90_put_var_2D_FourByteReal = -1 + end function nf90_put_var_2D_FourByteReal + + + function nf90_put_var_3D_FourByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), dimension(:, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_3D_FourByteReal + + nf90_put_var_3D_FourByteReal = -1 + end function nf90_put_var_3D_FourByteReal + + + function nf90_put_var_4D_FourByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), dimension(:, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_4D_FourByteReal + + nf90_put_var_4D_FourByteReal = -1 + end function nf90_put_var_4D_FourByteReal + + + function nf90_put_var_5D_FourByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), dimension(:, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_5D_FourByteReal + + nf90_put_var_5D_FourByteReal = -1 + end function nf90_put_var_5D_FourByteReal + + + function nf90_put_var_6D_FourByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), dimension(:, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_6D_FourByteReal + + nf90_put_var_6D_FourByteReal = -1 + end function nf90_put_var_6D_FourByteReal + + + function nf90_put_var_7D_FourByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = FourByteReal), dimension(:, :, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_7D_FourByteReal + + nf90_put_var_7D_FourByteReal = -1 + end function nf90_put_var_7D_FourByteReal + + + function nf90_put_var_1D_EightByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), dimension(:), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_1D_EightByteReal + + nf90_put_var_1D_EightByteReal = -1 + end function nf90_put_var_1D_EightByteReal + + + function nf90_put_var_2D_EightByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), dimension(:, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_2D_EightByteReal + + nf90_put_var_2D_EightByteReal = -1 + end function nf90_put_var_2D_EightByteReal + + + function nf90_put_var_3D_EightByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), dimension(:, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_3D_EightByteReal + + nf90_put_var_3D_EightByteReal = -1 + end function nf90_put_var_3D_EightByteReal + + + function nf90_put_var_4D_EightByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), dimension(:, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_4D_EightByteReal + + nf90_put_var_4D_EightByteReal = -1 + end function nf90_put_var_4D_EightByteReal + + + function nf90_put_var_5D_EightByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), dimension(:, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_5D_EightByteReal + + nf90_put_var_5D_EightByteReal = -1 + end function nf90_put_var_5D_EightByteReal + + + function nf90_put_var_6D_EightByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), dimension(:, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_6D_EightByteReal + + nf90_put_var_6D_EightByteReal = -1 + end function nf90_put_var_6D_EightByteReal + + + function nf90_put_var_7D_EightByteReal(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + real (kind = EightByteReal), dimension(:, :, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_7D_EightByteReal + + nf90_put_var_7D_EightByteReal = -1 + end function nf90_put_var_7D_EightByteReal + diff --git a/ext/DUMMY_NETCDF/netcdf_file.h90 b/ext/DUMMY_NETCDF/netcdf_file.h90 new file mode 100644 index 0000000000000000000000000000000000000000..27595be0460c5eb945a7e02b17f3f9f38b2aa36d --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_file.h90 @@ -0,0 +1,136 @@ +! This is part of the netCDF F90 API, or. Copyright 2006 UCAR. See COPYRIGHT file +! for details. + +! This file contains the netcdf file functions that are shared by +! netcdf-3 and netcdf-4. + +! Ed Hartnett, 2010 +! ------- +function nf90_inq_libvers() + character(len = 80) :: nf90_inq_libvers + + nf90_inq_libvers = "" +end function nf90_inq_libvers +! ------- +function nf90_strerror(ncerr) + integer, intent( in) :: ncerr + character(len = 80) :: nf90_strerror + + nf90_strerror = "" +end function nf90_strerror +! ------- +! +! File level control routines: +! +function nf90_inq_base_pe(ncid, pe) + integer, intent( in) :: ncid + integer, intent(out) :: pe + integer :: nf90_inq_base_pe + + nf90_inq_base_pe = -1 +end function nf90_inq_base_pe +! ------- +function nf90_set_base_pe(ncid, pe) + integer, intent( in) :: ncid, pe + integer :: nf90_set_base_pe + + nf90_set_base_pe = -1 +end function nf90_set_base_pe +! ------- +function nf90_create_mp(path, cmode, initalsz, basepe, chunksizehint, ncid) + character (len = *), intent( in) :: path + integer, intent( in) :: cmode, initalsz, basepe, chunksizehint + integer, intent(out) :: ncid + integer :: nf90_create_mp + + nf90_create_mp = -1 +end function nf90_create_mp +! ------- +function nf90_open_mp(path, mode, basepe, chunksizeint, ncid) + character (len = *), intent( in) :: path + integer, intent( in) :: mode, basepe, chunksizeint + integer, intent(out) :: ncid + integer :: nf90_open_mp + + nf90_open_mp = -1 +end function nf90_open_mp +! ------- +function nf90_set_fill(ncid, fillmode, old_mode) + integer, intent( in) :: ncid, fillmode + integer, intent(out) :: old_mode + integer :: nf90_set_fill + + nf90_set_fill = -1 +end function nf90_set_fill +! ------- +function nf90_redef(ncid) + integer, intent( in) :: ncid + integer :: nf90_redef + + nf90_redef = -1 +end function nf90_redef +! ------- +function nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align) + integer, intent( in) :: ncid + integer, optional, intent( in) :: h_minfree, v_align, v_minfree, r_align + integer :: nf90_enddef + + nf90_enddef = -1 +end function nf90_enddef +! ------- +function nf90_sync(ncid) + integer, intent( in) :: ncid + integer :: nf90_sync + + nf90_sync = -1 +end function nf90_sync +! ------- +function nf90_abort(ncid) + integer, intent( in) :: ncid + integer :: nf90_abort + + nf90_abort = -1 +end function nf90_abort +! ------- +function nf90_close(ncid) + integer, intent( in) :: ncid + integer :: nf90_close + + nf90_close = -1 +end function nf90_close +! ------- +function nf90_delete(name) + character(len = *), intent( in) :: name + integer :: nf90_delete + + nf90_delete = -1 +end function nf90_delete + +! +! A single file level inquiry routine +! +function nf90_inquire(ncid, nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum) + integer, intent( in) :: ncid + integer, optional, intent(out) :: nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum + integer :: nf90_inquire + + nf90_inquire = -1 +end function nf90_inquire + +function nf90_inq_path(ncid, pathlen, path) + integer, intent(in) :: ncid + integer, intent(inout) :: pathlen + character(len = *), intent(inout) :: path + integer :: nf90_inq_path + + nf90_inq_path = -1 +end function nf90_inq_path + +function nf90_inq_format(ncid, format_type) + integer, intent(in) :: ncid + integer, intent(out) :: format_type + integer :: nf90_inq_format + + nf90_inq_format = -1 +end function nf90_inq_format + diff --git a/ext/DUMMY_NETCDF/netcdf_get_nd_expanded.h90 b/ext/DUMMY_NETCDF/netcdf_get_nd_expanded.h90 new file mode 100644 index 0000000000000000000000000000000000000000..9c3153108d662e9f3b0b61b9e339b56e840fd1f3 --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_get_nd_expanded.h90 @@ -0,0 +1,672 @@ + +function nf90_get_var_1D_OneByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_1D_OneByteInt + + integer, intent(in) :: ncid, varid + integer(c_int8_t), target, dimension(:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_1D_OneByteInt = -1 + +end function nf90_get_var_1D_OneByteInt + +function nf90_get_var_2D_OneByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_2D_OneByteInt + + integer, intent(in) :: ncid, varid + integer(c_int8_t), target, dimension(:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_2D_OneByteInt = -1 + +end function nf90_get_var_2D_OneByteInt + +function nf90_get_var_3D_OneByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_3D_OneByteInt + + integer, intent(in) :: ncid, varid + integer(c_int8_t), target, dimension(:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_3D_OneByteInt = -1 + +end function nf90_get_var_3D_OneByteInt + +function nf90_get_var_4D_OneByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_4D_OneByteInt + + integer, intent(in) :: ncid, varid + integer(c_int8_t), target, dimension(:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_4D_OneByteInt = -1 + +end function nf90_get_var_4D_OneByteInt + +function nf90_get_var_5D_OneByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_5D_OneByteInt + + integer, intent(in) :: ncid, varid + integer(c_int8_t), target, dimension(:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_5D_OneByteInt = -1 + +end function nf90_get_var_5D_OneByteInt + +function nf90_get_var_6D_OneByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_6D_OneByteInt + + integer, intent(in) :: ncid, varid + integer(c_int8_t), target, dimension(:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_6D_OneByteInt = -1 + +end function nf90_get_var_6D_OneByteInt + +function nf90_get_var_7D_OneByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_7D_OneByteInt + + integer, intent(in) :: ncid, varid + integer(c_int8_t), target, dimension(:,:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_7D_OneByteInt = -1 + +end function nf90_get_var_7D_OneByteInt + +function nf90_get_var_1D_TwoByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_1D_TwoByteInt + + integer, intent(in) :: ncid, varid + integer(c_int16_t), target, dimension(:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_1D_TwoByteInt = -1 + +end function nf90_get_var_1D_TwoByteInt + +function nf90_get_var_2D_TwoByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_2D_TwoByteInt + + integer, intent(in) :: ncid, varid + integer(c_int16_t), target, dimension(:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_2D_TwoByteInt = -1 + +end function nf90_get_var_2D_TwoByteInt + +function nf90_get_var_3D_TwoByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_3D_TwoByteInt + + integer, intent(in) :: ncid, varid + integer(c_int16_t), target, dimension(:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_3D_TwoByteInt = -1 + +end function nf90_get_var_3D_TwoByteInt + +function nf90_get_var_4D_TwoByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_4D_TwoByteInt + + integer, intent(in) :: ncid, varid + integer(c_int16_t), target, dimension(:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_4D_TwoByteInt = -1 + +end function nf90_get_var_4D_TwoByteInt + +function nf90_get_var_5D_TwoByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_5D_TwoByteInt + + integer, intent(in) :: ncid, varid + integer(c_int16_t), target, dimension(:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_5D_TwoByteInt = -1 + +end function nf90_get_var_5D_TwoByteInt + +function nf90_get_var_6D_TwoByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_6D_TwoByteInt + + integer, intent(in) :: ncid, varid + integer(c_int16_t), target, dimension(:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_6D_TwoByteInt = -1 + +end function nf90_get_var_6D_TwoByteInt + +function nf90_get_var_7D_TwoByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_7D_TwoByteInt + + integer, intent(in) :: ncid, varid + integer(c_int16_t), target, dimension(:,:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_7D_TwoByteInt = -1 + +end function nf90_get_var_7D_TwoByteInt + +function nf90_get_var_1D_FourByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_1D_FourByteInt + + integer, intent(in) :: ncid, varid + integer(c_int32_t), target, dimension(:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_1D_FourByteInt = -1 + +end function nf90_get_var_1D_FourByteInt + +function nf90_get_var_2D_FourByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_2D_FourByteInt + + integer, intent(in) :: ncid, varid + integer(c_int32_t), target, dimension(:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_2D_FourByteInt = -1 + +end function nf90_get_var_2D_FourByteInt + +function nf90_get_var_3D_FourByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_3D_FourByteInt + + integer, intent(in) :: ncid, varid + integer(c_int32_t), target, dimension(:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_3D_FourByteInt = -1 + +end function nf90_get_var_3D_FourByteInt + +function nf90_get_var_4D_FourByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_4D_FourByteInt + + integer, intent(in) :: ncid, varid + integer(c_int32_t), target, dimension(:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_4D_FourByteInt = -1 + +end function nf90_get_var_4D_FourByteInt + +function nf90_get_var_5D_FourByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_5D_FourByteInt + + integer, intent(in) :: ncid, varid + integer(c_int32_t), target, dimension(:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_5D_FourByteInt = -1 + +end function nf90_get_var_5D_FourByteInt + +function nf90_get_var_6D_FourByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_6D_FourByteInt + + integer, intent(in) :: ncid, varid + integer(c_int32_t), target, dimension(:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_6D_FourByteInt = -1 + +end function nf90_get_var_6D_FourByteInt + +function nf90_get_var_7D_FourByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_7D_FourByteInt + + integer, intent(in) :: ncid, varid + integer(c_int32_t), target, dimension(:,:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_7D_FourByteInt = -1 + +end function nf90_get_var_7D_FourByteInt + +function nf90_get_var_1D_EightByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_1D_EightByteInt + + integer, intent(in) :: ncid, varid + integer(c_int64_t), target, dimension(:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_1D_EightByteInt = -1 + +end function nf90_get_var_1D_EightByteInt + +function nf90_get_var_2D_EightByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_2D_EightByteInt + + integer, intent(in) :: ncid, varid + integer(c_int64_t), target, dimension(:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_2D_EightByteInt = -1 + +end function nf90_get_var_2D_EightByteInt + +function nf90_get_var_3D_EightByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_3D_EightByteInt + + integer, intent(in) :: ncid, varid + integer(c_int64_t), target, dimension(:,:,:), intent(out) :: values + INTEGER, DIMENSION(:), OPTIONAL, INTENT(in) :: start, count, stride, map + + nf90_get_var_3D_EightByteInt = -1 + +end function nf90_get_var_3D_EightByteInt + +function nf90_get_var_4D_EightByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_4D_EightByteInt + + integer, intent(in) :: ncid, varid + integer(c_int64_t), target, dimension(:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_4D_EightByteInt = -1 + +end function nf90_get_var_4D_EightByteInt + +function nf90_get_var_5D_EightByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_5D_EightByteInt + + integer, intent(in) :: ncid, varid + integer(c_int64_t), target, dimension(:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_5D_EightByteInt = -1 + +end function nf90_get_var_5D_EightByteInt + +function nf90_get_var_6D_EightByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_6D_EightByteInt + + integer, intent(in) :: ncid, varid + integer(c_int64_t), target, dimension(:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_6D_EightByteInt = -1 + +end function nf90_get_var_6D_EightByteInt + +function nf90_get_var_7D_EightByteInt(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_7D_EightByteInt + + integer, intent(in) :: ncid, varid + integer(c_int64_t), target, dimension(:,:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_7D_EightByteInt = -1 + +end function nf90_get_var_7D_EightByteInt + +function nf90_get_var_1D_FourByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_1D_FourByteReal + + integer, intent(in) :: ncid, varid + real(c_float), target, dimension(:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_1D_FourByteReal = -1 + +end function nf90_get_var_1D_FourByteReal + +function nf90_get_var_2D_FourByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_2D_FourByteReal + + integer, intent(in) :: ncid, varid + real(c_float), target, dimension(:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_2D_FourByteReal = -1 + +end function nf90_get_var_2D_FourByteReal + +function nf90_get_var_3D_FourByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_3D_FourByteReal + + integer, intent(in) :: ncid, varid + real(c_float), target, dimension(:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_3D_FourByteReal = -1 + +end function nf90_get_var_3D_FourByteReal + +function nf90_get_var_4D_FourByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_4D_FourByteReal + + integer, intent(in) :: ncid, varid + real(c_float), target, dimension(:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_4D_FourByteReal = -1 + +end function nf90_get_var_4D_FourByteReal + +function nf90_get_var_5D_FourByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_5D_FourByteReal + + integer, intent(in) :: ncid, varid + real(c_float), target, dimension(:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_5D_FourByteReal = -1 + +end function nf90_get_var_5D_FourByteReal + +function nf90_get_var_6D_FourByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_6D_FourByteReal + + integer, intent(in) :: ncid, varid + real(c_float), target, dimension(:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_6D_FourByteReal = -1 + +end function nf90_get_var_6D_FourByteReal + +function nf90_get_var_7D_FourByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_7D_FourByteReal + + integer, intent(in) :: ncid, varid + real(c_float), target, dimension(:,:,:,:,:,:,:), intent(out) :: values + INTEGER, DIMENSION(:), OPTIONAL, INTENT(in) :: start, count, stride, map + + nf90_get_var_7D_FourByteReal = -1 + +end function nf90_get_var_7D_FourByteReal + +function nf90_get_var_1D_EightByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_1D_EightByteReal + + integer, intent(in) :: ncid, varid + real(c_double), target, dimension(:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_1D_EightByteReal = -1 + +end function nf90_get_var_1D_EightByteReal + +function nf90_get_var_2D_EightByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_2D_EightByteReal + + integer, intent(in) :: ncid, varid + real(c_double), target, dimension(:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_2D_EightByteReal = -1 + +end function nf90_get_var_2D_EightByteReal + +function nf90_get_var_3D_EightByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_3D_EightByteReal + + integer, intent(in) :: ncid, varid + real(c_double), target, dimension(:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_3D_EightByteReal = -1 + +end function nf90_get_var_3D_EightByteReal + +function nf90_get_var_4D_EightByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_4D_EightByteReal + + integer, intent(in) :: ncid, varid + real(c_double), target, dimension(:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_4D_EightByteReal = -1 + +end function nf90_get_var_4D_EightByteReal + +function nf90_get_var_5D_EightByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_5D_EightByteReal + + integer, intent(in) :: ncid, varid + real(c_double), target, dimension(:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_5D_EightByteReal = -1 + +end function nf90_get_var_5D_EightByteReal + +function nf90_get_var_6D_EightByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_6D_EightByteReal + + integer, intent(in) :: ncid, varid + real(c_double), target, dimension(:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_6D_EightByteReal = -1 + +end function nf90_get_var_6D_EightByteReal + +function nf90_get_var_7D_EightByteReal(ncid, varid, values, start, count, stride, map) + + use, intrinsic :: iso_c_binding + + implicit none + + integer :: nf90_get_var_7D_EightByteReal + + integer, intent(in) :: ncid, varid + real(c_double), target, dimension(:,:,:,:,:,:,:), intent(out) :: values + integer, dimension(:), optional, intent(in) :: start, count, stride, map + + nf90_get_var_7D_EightByteReal = -1 + +end function nf90_get_var_7D_EightByteReal diff --git a/ext/DUMMY_NETCDF/netcdf_overloads.h90 b/ext/DUMMY_NETCDF/netcdf_overloads.h90 new file mode 100644 index 0000000000000000000000000000000000000000..b4c852530bcde6b17610e2525ec98f49064b3e1d --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_overloads.h90 @@ -0,0 +1,95 @@ + ! Overloaded variable functions + interface nf90_def_var + module procedure nf90_def_var_Scalar, nf90_def_var_oneDim, nf90_def_var_ManyDims + end interface ! nf90_def_var + + ! Overloaded attribute functions + interface nf90_put_att + module procedure nf90_put_att_text, & + nf90_put_att_OneByteInt, nf90_put_att_TwoByteInt, & + nf90_put_att_FourByteInt, nf90_put_att_EightByteInt, & + nf90_put_att_FourByteReal, nf90_put_att_EightByteReal + module procedure nf90_put_att_one_OneByteInt, nf90_put_att_one_TwoByteInt, & + nf90_put_att_one_FourByteInt, nf90_put_att_one_EightByteInt, & + nf90_put_att_one_FourByteReal, nf90_put_att_one_EightByteReal + end interface !nf90_put_att + interface nf90_get_att + module procedure nf90_get_att_text, & + nf90_get_att_OneByteInt, nf90_get_att_TwoByteInt, & + nf90_get_att_FourByteInt, nf90_get_att_EightByteInt, & + nf90_get_att_FourByteReal, nf90_get_att_EightByteReal + module procedure nf90_get_att_one_OneByteInt, nf90_get_att_one_TwoByteInt, & + nf90_get_att_one_FourByteInt, nf90_get_att_one_EightByteInt, & + nf90_get_att_one_FourByteReal, nf90_get_att_one_EightByteReal + end interface ! nf90_get_att + + ! Overloaded variable functions + interface nf90_put_var + module procedure nf90_put_var_text, & + nf90_put_var_OneByteInt, nf90_put_var_TwoByteInt, & + nf90_put_var_FourByteInt, nf90_put_var_EightByteInt, & + nf90_put_var_FourByteReal, nf90_put_var_EightByteReal + module procedure nf90_put_var_1D_text, & + nf90_put_var_1D_OneByteInt, nf90_put_var_1D_TwoByteInt, & + nf90_put_var_1D_FourByteInt, nf90_put_var_1D_EightByteInt, & + nf90_put_var_1D_FourByteReal, nf90_put_var_1D_EightByteReal + module procedure nf90_put_var_2D_text, & + nf90_put_var_2D_OneByteInt, nf90_put_var_2D_TwoByteInt, & + nf90_put_var_2D_FourByteInt, nf90_put_var_2D_EightByteInt, & + nf90_put_var_2D_FourByteReal, nf90_put_var_2D_EightByteReal + module procedure nf90_put_var_3D_text, & + nf90_put_var_3D_OneByteInt, nf90_put_var_3D_TwoByteInt, & + nf90_put_var_3D_FourByteInt, nf90_put_var_3D_EightByteInt, & + nf90_put_var_3D_FourByteReal, nf90_put_var_3D_EightByteReal + module procedure nf90_put_var_4D_text, & + nf90_put_var_4D_OneByteInt, nf90_put_var_4D_TwoByteInt, & + nf90_put_var_4D_FourByteInt, nf90_put_var_4D_EightByteInt, & + nf90_put_var_4D_FourByteReal, nf90_put_var_4D_EightByteReal + module procedure nf90_put_var_5D_text, & + nf90_put_var_5D_OneByteInt, nf90_put_var_5D_TwoByteInt, & + nf90_put_var_5D_FourByteInt, nf90_put_var_5D_EightByteInt, & + nf90_put_var_5D_FourByteReal, nf90_put_var_5D_EightByteReal + module procedure nf90_put_var_6D_text, & + nf90_put_var_6D_OneByteInt, nf90_put_var_6D_TwoByteInt, & + nf90_put_var_6D_FourByteInt, nf90_put_var_6D_EightByteInt, & + nf90_put_var_6D_FourByteReal, nf90_put_var_6D_EightByteReal + module procedure nf90_put_var_7D_text, & + nf90_put_var_7D_OneByteInt, nf90_put_var_7D_TwoByteInt, & + nf90_put_var_7D_FourByteInt, nf90_put_var_7D_EightByteInt, & + nf90_put_var_7D_FourByteReal, nf90_put_var_7D_EightByteReal + end interface ! nf90_put_var + + interface nf90_get_var + module procedure nf90_get_var_text, & + nf90_get_var_OneByteInt, nf90_get_var_TwoByteInt, & + nf90_get_var_FourByteInt, nf90_get_var_EightByteInt, & + nf90_get_var_FourByteReal, nf90_get_var_EightByteReal + module procedure nf90_get_var_1D_text, & + nf90_get_var_1D_OneByteInt, nf90_get_var_1D_TwoByteInt, & + nf90_get_var_1D_FourByteInt, nf90_get_var_1D_EightByteInt, & + nf90_get_var_1D_FourByteReal, nf90_get_var_1D_EightByteReal + module procedure nf90_get_var_2D_text, & + nf90_get_var_2D_OneByteInt, nf90_get_var_2D_TwoByteInt, & + nf90_get_var_2D_FourByteInt, nf90_get_var_2D_EightByteInt, & + nf90_get_var_2D_FourByteReal, nf90_get_var_2D_EightByteReal + module procedure nf90_get_var_3D_text, & + nf90_get_var_3D_OneByteInt, nf90_get_var_3D_TwoByteInt, & + nf90_get_var_3D_FourByteInt, nf90_get_var_3D_EightByteInt, & + nf90_get_var_3D_FourByteReal, nf90_get_var_3D_EightByteReal + module procedure nf90_get_var_4D_text, & + nf90_get_var_4D_OneByteInt, nf90_get_var_4D_TwoByteInt, & + nf90_get_var_4D_FourByteInt, nf90_get_var_4D_EightByteInt, & + nf90_get_var_4D_FourByteReal, nf90_get_var_4D_EightByteReal + module procedure nf90_get_var_5D_text, & + nf90_get_var_5D_OneByteInt, nf90_get_var_5D_TwoByteInt, & + nf90_get_var_5D_FourByteInt, nf90_get_var_5D_EightByteInt, & + nf90_get_var_5D_FourByteReal, nf90_get_var_5D_EightByteReal + module procedure nf90_get_var_6D_text, & + nf90_get_var_6D_OneByteInt, nf90_get_var_6D_TwoByteInt, & + nf90_get_var_6D_FourByteInt, nf90_get_var_6D_EightByteInt, & + nf90_get_var_6D_FourByteReal, nf90_get_var_6D_EightByteReal + module procedure nf90_get_var_7D_text, & + nf90_get_var_7D_OneByteInt, nf90_get_var_7D_TwoByteInt, & + nf90_get_var_7D_FourByteInt, nf90_get_var_7D_EightByteInt, & + nf90_get_var_7D_FourByteReal, nf90_get_var_7D_EightByteReal + end interface ! nf90_get_var diff --git a/ext/DUMMY_NETCDF/netcdf_text_variables.h90 b/ext/DUMMY_NETCDF/netcdf_text_variables.h90 new file mode 100644 index 0000000000000000000000000000000000000000..884c6562b54f480ea30db96afd2870eb99a97bd5 --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_text_variables.h90 @@ -0,0 +1,171 @@ + function nf90_put_var_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_text + + nf90_put_var_text = -1 + end function nf90_put_var_text + + function nf90_get_var_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_text + + nf90_get_var_text = -1 + end function nf90_get_var_text + + + function nf90_put_var_1D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_1D_text + + nf90_put_var_1D_text = -1 + end function nf90_put_var_1D_text + + + function nf90_put_var_2D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_2D_text + + nf90_put_var_2D_text = -1 + end function nf90_put_var_2D_text + + + function nf90_put_var_3D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_3D_text + + nf90_put_var_3D_text = -1 + end function nf90_put_var_3D_text + + + function nf90_put_var_4D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_4D_text + + nf90_put_var_4D_text = -1 + end function nf90_put_var_4D_text + + + function nf90_put_var_5D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_5D_text + + nf90_put_var_5D_text = -1 + end function nf90_put_var_5D_text + + + function nf90_put_var_6D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_6D_text + + nf90_put_var_6D_text = -1 + end function nf90_put_var_6D_text + + + function nf90_put_var_7D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :, :, :, :), & + intent( in) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_put_var_7D_text + + nf90_put_var_7D_text = -1 + end function nf90_put_var_7D_text + + + function nf90_get_var_1D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:), & + intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_1D_text + + nf90_get_var_1D_text = -1 + end function nf90_get_var_1D_text + + + function nf90_get_var_2D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :), & + intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_2D_text + + nf90_get_var_2D_text = -1 + end function nf90_get_var_2D_text + + + function nf90_get_var_3D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :), & + intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_3D_text + + nf90_get_var_3D_text = -1 + end function nf90_get_var_3D_text + + + function nf90_get_var_4D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :), & + intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_4D_text + + nf90_get_var_4D_text = -1 + end function nf90_get_var_4D_text + + + function nf90_get_var_5D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :, :), & + intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_5D_text + + nf90_get_var_5D_text = -1 + end function nf90_get_var_5D_text + + + function nf90_get_var_6D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :, :, :), & + intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_6D_text + + nf90_get_var_6D_text = -1 + end function nf90_get_var_6D_text + + + function nf90_get_var_7D_text(ncid, varid, values, start, count, stride, map) + integer, intent( in) :: ncid, varid + character (len = *), dimension(:, :, :, :, :, :, :), & + intent(out) :: values + integer, dimension(:), optional, intent( in) :: start, count, stride, map + integer :: nf90_get_var_7D_text + + nf90_get_var_7D_text = -1 + end function nf90_get_var_7D_text diff --git a/ext/DUMMY_NETCDF/netcdf_variables.h90 b/ext/DUMMY_NETCDF/netcdf_variables.h90 new file mode 100644 index 0000000000000000000000000000000000000000..003e70f8c2e4e9a3ca831842373fc66e86101abd --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_variables.h90 @@ -0,0 +1,63 @@ + ! ----- + ! Variable definitions and inquiry + ! ----- + function nf90_def_var_Scalar(ncid, name, xtype, varid) + integer, intent( in) :: ncid + character (len = *), intent( in) :: name + integer, intent( in) :: xtype + integer, intent(out) :: varid + integer :: nf90_def_var_Scalar + + nf90_def_var_Scalar = -1 + end function nf90_def_var_Scalar + ! ----- + function nf90_def_var_oneDim(ncid, name, xtype, dimids, varid) + integer, intent( in) :: ncid + character (len = *), intent( in) :: name + integer, intent( in) :: xtype + integer, intent( in) :: dimids + integer, intent(out) :: varid + INTEGER :: nf90_def_var_oneDim + + nf90_def_var_oneDim = -1 + end function nf90_def_var_oneDim + ! ----- + function nf90_def_var_ManyDims(ncid, name, xtype, dimids, varid) + integer, intent( in) :: ncid + character (len = *), intent( in) :: name + integer, intent( in) :: xtype + integer, dimension(:), intent( in) :: dimids + integer, intent(out) :: varid + integer :: nf90_def_var_ManyDims + + nf90_def_var_ManyDims = -1 + end function nf90_def_var_ManyDims + ! ----- + function nf90_inq_varid(ncid, name, varid) + integer, intent( in) :: ncid + character (len = *), intent( in) :: name + integer, intent(out) :: varid + integer :: nf90_inq_varid + + nf90_inq_varid = -1 + end function nf90_inq_varid + ! ----- + function nf90_inquire_variable(ncid, varid, name, xtype, ndims, dimids, nAtts) + integer, intent( in) :: ncid, varid + character (len = *), optional, intent(out) :: name + integer, optional, intent(out) :: xtype, ndims + integer, dimension(:), optional, intent(out) :: dimids + integer, optional, intent(out) :: nAtts + integer :: nf90_inquire_variable + + nf90_inquire_variable = -1 + end function nf90_inquire_variable + ! ----- + function nf90_rename_var(ncid, varid, newname) + integer, intent( in) :: ncid, varid + character (len = *), intent( in) :: newname + integer :: nf90_rename_var + + nf90_rename_var = -1 + end function nf90_rename_var + ! ----- diff --git a/ext/DUMMY_NETCDF/netcdf_visibility.h90 b/ext/DUMMY_NETCDF/netcdf_visibility.h90 new file mode 100644 index 0000000000000000000000000000000000000000..819a9a3ea16a9d454a7415d831471c3f5b574dff --- /dev/null +++ b/ext/DUMMY_NETCDF/netcdf_visibility.h90 @@ -0,0 +1,25 @@ + ! Library version, error string + public :: nf90_inq_libvers, nf90_strerror + + ! Control routines + public :: nf90_create, nf90_open, nf90_set_base_pe, nf90_inq_base_pe, & + nf90_set_fill, nf90_redef, nf90_enddef, & + nf90_create_mp, nf90_open_mp, & + nf90_sync, nf90_abort, nf90_close, nf90_delete + + ! File level inquiry + public :: nf90_inquire, nf90_inq_path, nf90_inq_format + + ! Dimension routines + public :: nf90_def_dim, nf90_inq_dimid, nf90_rename_dim, nf90_inquire_dimension + + ! attribute routines + public :: nf90_copy_att, nf90_rename_att, nf90_del_att, nf90_inq_attname, & + nf90_inquire_attribute + ! overloaded functions + public :: nf90_put_att, nf90_get_att + + ! Variable routines + public :: nf90_def_var, nf90_inq_varid, nf90_rename_var, nf90_inquire_variable + ! overloaded functions + public :: nf90_put_var, nf90_get_var diff --git a/ext/DUMMY_NETCDF/typesizes.F90 b/ext/DUMMY_NETCDF/typesizes.F90 new file mode 100644 index 0000000000000000000000000000000000000000..84c7f4f77f175c22c68b259f0059ea0f3f663c6d --- /dev/null +++ b/ext/DUMMY_NETCDF/typesizes.F90 @@ -0,0 +1,65 @@ +! Description: +! Provide named kind parameters for use in declarations of real and integer +! variables with specific byte sizes (i.e. one, two, four, and eight byte +! integers; four and eight byte reals). The parameters can then be used +! in (KIND = XX) modifiers in declarations. +! A single function (byteSizesOK()) is provided to ensure that the selected +! kind parameters are correct. +! +! Input Parameters: +! None. +! +! Output Parameters: +! Public parameters, fixed at compile time: +! OneByteInt, TwoByteInt, FourByteInt, EightByteInt +! FourByteReal, EightByteRadl +! +! References and Credits: +! Written by +! Robert Pincus +! Cooperative Institue for Meteorological Satellite Studies +! University of Wisconsin - Madison +! 1225 W. Dayton St. +! Madison, Wisconsin 53706 +! Robert.Pincus@ssec.wisc.edu +! +! Design Notes: +! Fortran 90 doesn't allow one to check the number of bytes in a real variable; +! we check only that four byte and eight byte reals have different kind parameters. +! +module typesizes + implicit none + public + integer, parameter :: OneByteInt = selected_int_kind(2), & + TwoByteInt = selected_int_kind(4), & + FourByteInt = selected_int_kind(9), & + EightByteInt = selected_int_kind(18) + + integer, parameter :: & + FourByteReal = selected_real_kind(P = 6, R = 37), & + EightByteReal = selected_real_kind(P = 13, R = 307) +contains + logical function byteSizesOK() + ! Users may call this function once to ensure that the kind parameters + ! the module defines are available with the current compiler. + ! We can't ensure that the two REAL kinds are actually four and + ! eight bytes long, but we can ensure that they are distinct. + ! Early Fortran 90 compilers would sometimes report incorrect results for + ! the bit_size intrinsic, but I haven't seen this in a long time. + + ! Local variables + integer (kind = OneByteInt) :: One + integer (kind = TwoByteInt) :: Two + integer (kind = FourByteInt) :: Four + integer (kind = EightByteInt) :: Eight + + if (bit_size( One) == 8 .and. bit_size( Two) == 16 .and. & + bit_size(Four) == 32 .and. bit_size( Eight) == 64 .and. & + FourByteReal > 0 .and. EightByteReal > 0 .and. & + FourByteReal /= EightByteReal) then + byteSizesOK = .true. + else + byteSizesOK = .false. + end if + end function byteSizesOK +end module typeSizes diff --git a/makenemo b/makenemo index 14caf82a40cba5ceecd9f6882b8de87c67c7bdc4..fc190f8dc0c48b0de503f10485df1c3c0cce9200 100755 --- a/makenemo +++ b/makenemo @@ -40,7 +40,6 @@ set -o posix # - REF_CONF : reference configuration to build the new one from # - CMP_NAM : compiler name # - NBR_PRC : number of processes used to compile -# - RMT_CONF : unsupported (external) configuration to build the new one from # - NEM_SUBDIR : NEMO subdirectory used (specified) # # Locally defined : @@ -84,10 +83,11 @@ set -o posix #- ##- Initialization of the options --- -x_d=''; x_h=''; x_n=''; x_r=''; -x_u=''; x_a=''; x_m=''; x_t=''; -x_c=''; +x_d=''; x_h=''; x_n=''; x_r=''; x_c=''; +x_u=''; x_a=''; x_m=''; x_t=''; x_b=''; x_j='1'; x_e='none'; x_s='src'; x_v='1' +x_nocdf=0 +x_name='' ##- Local variables --- b_n=$(basename ${0}) @@ -96,15 +96,19 @@ MAIN_DIR=$(cd $(dirname "$0"); pwd) MAIN_DIR=${MAIN_DIR%/sette*} MAIN_DIR=${MAIN_DIR%/tools*} MAIN_DIR=${MAIN_DIR%/cfgs*} +MAIN_DIR=${MAIN_DIR%/tests*} +MAIN_DIR=${MAIN_DIR%/ext*} +MAIN_DIR=${MAIN_DIR%/arch*} export MAIN_DIR # export CONFIG_DIR=${MAIN_DIR}/cfgs +export TESTS_DIR=${MAIN_DIR}/tests export TOOLS_DIR=${MAIN_DIR}/tools export COMPIL_DIR=${MAIN_DIR}/mk export NEMO_DIR=${MAIN_DIR}/${x_s} export AGRIFUSE='10' list_key='0'; chk_key='1' -list_add_key=''; list_del_key=''; +list_add_key=''; list_def_key=''; list_del_key='' conf_file=ref_cfgs.txt #- #- FCM and functions location --- @@ -112,73 +116,120 @@ export PATH=${MAIN_DIR}/ext/FCM/bin:$PATH #- #- Choice of the options --- -while getopts :hd:n:r:u:a:m:j:e:s:v:t:k: option; do - - case $option in - ('h') cat <<EOF +## Get clean, clean_config options +while [ ${#1} -gt 0 ]; do + + case "$1" in + -h|--help) cat <<EOF Usage: ------ -./makenemo -[aru] CONFIG -m ARCH [-[dehjntv] ...] [{list_key,clean,clean_config}] - [{add_key,del_key} ...] +./makenemo -[arn] CONFIG -m ARCH [-[...] ...] [{list_key,clean,clean_config}] Mandatory - -m Computing architecture (./arch), FCM file describing the compilation settings + -m, --mach, --machine, --arch <machine_name> + Computing architecture, will use the file arch_<machine_name>.fcm located in ./arch (sub)directory(ies) - and one of the following option (use 'all' arg to list available items) + -n, --name <config_name> + Name of the configuration to compile - -r Reference configuration (./cfgs), proven with long-term support - -a Academic test case (./tests), ready-to-use configuration with no support over time - -u Scripted remote configuration (see ./tests/rmt_cfgs.txt) + and, if -n defines a new configuration, one of the following option (use 'all' arg to list available items): + + -r, --ref <ref_config_name> + To specify which reference configuration (./cfgs) must be used to buit the new configuration + -a, --test <test_config_name> + To specify which academic test case (./tests) must be used to buit the new configuration Optional - -d New set of sub-components (subfolders from ./src directory) - -e Path for alter patch location (default: 'MY_SRC' in configuration folder) - -h Print this help - -j Number of processes to compile (0: dry run with no build) - -n Name for new configuration - -s Path for alter source location (default: 'src' root directory) - -t Path for alter build location (default: 'BLD' in configuration folder) - -v Level of verbosity ([0-3]) + --add_key, key_add, add_key "<list of keys>" + list of cpp keys to be added in cpp_<config_name>.fcm file + -b, --dbg, --debug + add it to compile in debug mode + -d, --dirs, --comp <sub-components> + New set of sub-components (subfolders from ./src directory) to be used + --def_key, key_def, def_key "<list of keys>" + list of all cpp keys to be defined in cpp_<config_name>.fcm file + --del_key, key_del, del_key "<list of keys>" + list of cpp keys to be deleted in cpp_<config_name>.fcm file + -e, --my_srcpath, --my_src_path, --MY_SRCpath, --MY_SRC_path <path> + Path for alter patch location (default: 'MY_SRC' in configuration folder) + -h, --help + Print this help + -j, --jobs <nb_job> + Number of processes to compile (0: dry run with no build) + -k, --chkkey <O/1> + Set to 0 to bypass the check of the cpp keys (takes time at the beginning of makenemo). + Default is 1 + --nonc, --nocdf, --nonetcdf, --no_nc, --no_cdf, --no_netcdf + Compile without the NetCDF Library + -s, --srcpath, --src_path <path> + Path for alter source location (default: 'src' root directory) + -t, --bldpath, --bld_path, --BLDpath, --BLD_path <path> + Path for alter build location (default: 'BLD' in configuration folder) + -v, --verbose <0/1/2/3> + Level of verbosity ([0-3]) Examples ¤ Configuration creation - Build : ./makenemo -[aru] ... [...] - Copy : ./makenemo -n ... -[aru] ... [...] + Build : ./makenemo -[ar] ... [...] + Copy : ./makenemo -n ... -[ar] ... [...] ¤ Configuration management List CPP keys : ./makenemo -n ... list_key Add-Remove keys: ./makenemo -n ... add_key '...' del_key '...' Fresh start : ./makenemo -n ... clean Removal : ./makenemo -n ... clean_config -EOF - exit 0 ;; - ('d') x_d=${OPTARG};; ('n') x_n=${OPTARG};; ('r') x_r=${OPTARG};; ('u') x_u=${OPTARG};; - ('a') x_a=${OPTARG};; ('m') x_m=${OPTARG};; ('j') x_j=${OPTARG};; ('t') x_t=${OPTARG};; - ('e') x_e=(${OPTARG});; ('s') x_s=${OPTARG};; ('v') x_v=${OPTARG} ;; - ('k') chk_key=${OPTARG} ;; - (':') echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; exit 2 ;; - ('?') echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2; exit 2 ;; - esac - -done - -shift $(($OPTIND-1)); - -## Get clean, clean_config options -while [ ${#1} -gt 0 ]; do - case "$1" in - 'clean' ) x_c="--$1" ;; - 'clean_config') . ${COMPIL_DIR}/Fclean_config.sh; exit ;; - ## Checking if argument has anything other than whitespace - 'add_key' ) [[ ! "$2" =~ ^\ +$ ]] && list_add_key=$2; shift;; - 'del_key' ) [[ ! "$2" =~ ^\ +$ ]] && list_del_key=$2; shift;; - 'list_key' ) list_key='1' ;; - '*' ) echo " \"$1\" BAD OPTION"; exit 2 ;; - esac - - shift +EOF + exit 0 ;; + -b|--dbg|--debug) + x_b="True" ;; + -d|--dirs|--comp) + x_d=${2} ; shift ;; + -n|--name) + x_name=${2} ; shift ;; + -r|--ref) + x_r=${2} ; shift ;; + -a|--academic|--test) + x_a=${2} ; shift ;; + -m|--mach|--machine|--arch) + x_m=${2} ; shift ;; + -j) x_j=${2} ; shift ;; + -t|--bldpath|--bld_path|--BLDpath|--BLD_path) + x_t=${2} ; shift ;; + -e|--my_srcpath|--my_src_path|--MY_SRCpath|--MY_SRC_path) + x_e=${2} ; shift ;; + -s|--srcpath|--src_path) + x_s=${2} ; shift ;; + -v|--verbose) + x_v=${2} ; shift ;; + -k|--chkkey) + chk_key=${2} ; shift ;; + --nonc|--nocdf|--nonetcdf|--no_nc|--no_cdf|--no_netcdf) + x_nocdf=1 ;; + --clean|clean) + x_c="--$1" ;; + --clean_config|clean_config) + . ${COMPIL_DIR}/Fclean_config.sh; exit ;; + ## Checking if argument has anything other than whitespace + --add_key|--key_add|add_key ) [[ ! "$2" =~ ^\ +$ ]] && list_add_key=$2; shift;; + --def_key|--key_def|def_key ) [[ ! "$2" =~ ^\ +$ ]] && list_def_key=$2; shift;; + --del_key|--key_del|del_key ) [[ ! "$2" =~ ^\ +$ ]] && list_del_key=$2; shift;; + --list_key|list_key ) list_key='1' ;; + '*' ) echo " \"$1\" BAD OPTION"; exit 2 ;; + ':') echo ${b_n}" : -"${1}" option : missing value" 1>&2; exit 2 ;; + '?') echo ${b_n}" : -"${1}" option : not supported" 1>&2; exit 2 ;; + esac + + shift done +if [ -n "$x_name" ] # is the configuration existing in cfgs or tests? or is it a new conf? +then + incfg=$( find $CONFIG_DIR -type d -name $x_name | wc -l ) # this configuration exists in CONFIG_DIR + intst=$( find $TESTS_DIR -type d -name $x_name | wc -l ) # this configuration exists in TESTS_DIR + [[ $incfg -eq 0 && $intst -eq 0 ]] && x_n=$x_name # this is a new configuration -> dedine/overwrite x_n + [[ $incfg -eq 1 && -z "$x_r" ]] && x_r=$x_name # this is a reference configuration -> dedine/overwrite x_r + [[ $intst -eq 1 && -z "$x_a" ]] && x_a=$x_name # this is a test configuration -> dedine/overwrite x_a +fi export NEW_CONF=${x_n} NBR_PRC=${x_j} @@ -186,22 +237,22 @@ CMP_NAM=${x_m} NEM_SUBDIR=${x_d} REF_CONF=${x_r} DEMO_CONF=${x_a} -RMT_CONF=${x_u} TML_CONF=${REF_CONF} export NEMO_DIR=${MAIN_DIR}/${x_s} +NEMO_DBG=${x_b} [ "${CMP_NAM}" == 'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit ## No ref. cfg, demo case, nor remote cfg selected -if [[ -z "${REF_CONF}" && -z "${DEMO_CONF}" && -z "${RMT_CONF}" ]]; then +if [[ -z "${REF_CONF}" && -z "${DEMO_CONF}" ]]; then ## Reuse last configuration compiled if any (existing 'work_cfgs.txt') # if [[ $( find ./cfgs ./tests -name work_cfgs.txt ) ]]; then # CONFIG_DIR=${MAIN_DIR}/$( ls -rt */work_cfgs.txt | awk -F/ 'END{ print $1}' ) # TML_CONF=$( tail -1 ${CONFIG_DIR}/work_cfgs.txt | awk '{ print $1 }' ) # else - ## No ${REF_CONF}, ${DEMO_CONF}, ${RMT_CONF} nor ${NEM_SUBDIR} and 1st compilation => exit + ## No ${REF_CONF}, ${DEMO_CONF} nor ${NEM_SUBDIR} and 1st compilation => exit # echo -e "\033[0;33m\nNo previous build found!" echo -e "\033[0;31m\nAt least a reference configuration ('-r'), a test case ('-a'), " echo -e "a remote configuration ('-u') has to be choosen!!!\033[0m" @@ -213,7 +264,7 @@ if [[ -z "${REF_CONF}" && -z "${DEMO_CONF}" && -z "${RMT_CONF}" ]]; then else ## 'all' arg: list all available configurations - if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' || "${RMT_CONF}" == 'all' ]]; then + if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' ]]; then ${COMPIL_DIR}/Flist_cfgs.sh exit 2 ## Probably useless but who knows? @@ -224,27 +275,8 @@ else exit 2 fi - ## Remote cfg - if [ -n "${RMT_CONF}" ]; then - conf_file=rmt_cfgs.txt; CONFIG_DIR=${MAIN_DIR}/tests; - - if [[ ! $( grep ${RMT_CONF} ${CONFIG_DIR}/${conf_file} ) ]]; then - echo -e "\033[0;31m\nThe reference configuration ('-r'), test case ('-a') or " - echo -e "remote configuration ('-u') selected is not available!!!" - echo -e "Check the option used and the available items in .txt files\033[0m" - ${COMPIL_DIR}/Flist_cfgs.sh - exit 2 - fi - - ## Little tricky this one - for word in $( grep ${RMT_CONF} ${CONFIG_DIR}/${conf_file} ); do - words[${#words[@]}]=$word - done - - TML_CONF=${words[2]}; NEM_SUBDIR=${words[4]}; URL=${words[6]} - ## Demo case - elif [ -n "${DEMO_CONF}" ]; then + if [ -n "${DEMO_CONF}" ]; then conf_file=demo_cfgs.txt; CONFIG_DIR=${MAIN_DIR}/tests; TML_CONF=${DEMO_CONF} fi @@ -280,13 +312,17 @@ export NEM_SUBDIR="${NEM_SUBDIR}" NEW_CONF="${NEW_CONF}" ## Save new configuration with sub-components set in work_cfgs.txt [ -f ${CONFIG_DIR}/work_cfgs.txt ] && sed -i "/${NEW_CONF} /d" ${CONFIG_DIR}/work_cfgs.txt -echo ${NEW_CONF} "${NEM_SUBDIR}" \ - >> ${CONFIG_DIR}/work_cfgs.txt +echo ${NEW_CONF} "${NEM_SUBDIR}" >> ${CONFIG_DIR}/work_cfgs.txt cd ${CONFIG_DIR} -printf "\nYou are installing a new configuration %s from %s " ${NEW_CONF} ${TML_CONF} -printf "with sub-components: %s\n" "${NEM_SUBDIR}" +if [ -n "${NEW_CONF}" ] +then + echo + printf "\nYou are installing a new configuration %s from %s " ${NEW_CONF} ${TML_CONF} + printf "with sub-components: %s\n" "${NEM_SUBDIR}" + echo +fi ## Create new config even in existing one (mkdir with -p option, cp with -n) ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${TML_CONF} @@ -294,9 +330,6 @@ ${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${TML_CONF} ## create EXP00 if needed [ ! -d ${CONFIG_DIR}/${NEW_CONF}/EXP00 ] && \cp -R -n ${CONFIG_DIR}/${NEW_CONF}/EXPREF ${CONFIG_DIR}/${NEW_CONF}/EXP00 -## Get online script file for remote cfg -[ -n "${RMT_CONF}" ] && ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} $URL - #- Create the WORK --- #- Clean links and librairies --- #- Creating the good links, at first on OCE --- @@ -318,6 +351,7 @@ fi #- At this stage new configuration has been added, we add or remove keys [ ! -z "${list_add_key}" ] && { . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key}; } +[ ! -z "${list_def_key}" ] && { . ${COMPIL_DIR}/Fdef_keys.sh ${NEW_CONF} def_key ${list_def_key}; } [ ! -z "${list_del_key}" ] && { . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key}; } #- check that all keys are really existing... @@ -348,7 +382,7 @@ fi #- At this stage the configuration has beeen chosen #- We coose the default light file -export USEBLD=bldxag.cfg +[ $x_nocdf -eq 1 ] && export USEBLD=bldxagxcdf.cfg || export USEBLD=bldxag.cfg #- We look after agrif grep key_agrif ${COMPIL_DIR}/cpp.fcm && export AGRIFUSE=1 && export USEBLD=${USEBLD/xag/} @@ -385,7 +419,7 @@ if [ "${NBR_PRC}" -gt 0 ]; then echo 'Cleaning in '${NEW_CONF}' the building folders' - for dir in AGRIFLIB BLD EXP00 LONG NEMOFILES REPRO_* SHORT WORK; do + for dir in AGRIFLIB BLD LONG NEMOFILES REPRO_* SHORT WORK; do rm -rf ${NEMO_TDIR}/${NEW_CONF}/$dir done diff --git a/mk/Fcheck_archfile.sh b/mk/Fcheck_archfile.sh index 0fa3c884d01112d3de01784e7f35e6c9240cf2aa..b614513246e1a8ac8f7986a1ef5156f27c92d67e 100755 --- a/mk/Fcheck_archfile.sh +++ b/mk/Fcheck_archfile.sh @@ -74,7 +74,8 @@ EOF done < $1 } # cleaning related to the old version -rm -f $( find ${COMPIL_DIR} -type l -name $1 -print ) +rm -f $( find ${COMPIL_DIR} -type f -name $1 -print ) + # if [ ${#3} -eq 0 ]; then # arch not specified if [ ! -f ${COMPIL_DIR}/arch.history ]; then @@ -213,3 +214,18 @@ do fi done +# Nemo debug ? +if [ -n "${NEMO_DBG}" ]; then + if (! grep -q "^%DEBUG_FCFLAGS" ${COMPIL_DIR}/$1 ); then + echo "ERROR: You must defined '%DEBUG_FCFLAGS' in your arch file if you want to compile Nemo in debug mode using '-d' option" + exit 1 + fi + # duplicate the lines starting with %DEBUG_XXX and replace, in the duplicated line, %DEBUG_XXX by %XXX + sed -i "/^%DEBUG_/{p;s/^%DEBUG_\([^ ]*\)/%\1/;}" ${COMPIL_DIR}/$1 +else + if (! grep -q "^%PROD_FCFLAGS" ${COMPIL_DIR}/$1 ); then + echo "WARNING: '%PROD_FCFLAGS' not defined in your arch file, makenemo will use '%FCFLAGS' instead" + fi + # duplicate the lines starting with %PROD_XXX and replace, in the duplicated line, %PROD_XXX by %XXX + sed -i "/^%PROD_/{p;s/^%PROD_\([^ ]*\)/%\1/;}" ${COMPIL_DIR}/$1 +fi diff --git a/mk/Ffetch_extdir.sh b/mk/Ffetch_extdir.sh deleted file mode 100755 index 9726a5f4045c9fe2453f4d9288b2e7256ceaa914..0000000000000000000000000000000000000000 --- a/mk/Ffetch_extdir.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -#set -x -set -o posix -#set -u -#set -e -#+ -# =============== -# Ffetch_extdir.sh -# =============== -# --------------- -# Make the config -# --------------- -# SYNOPSIS -# ======== -# :: -# $ Ffetch_extdir.sh -# DESCRIPTION -# =========== -# - Make the config directory -# - Create repositories needed : -# -# - EXP00 for namelist -# - MY_SRC for user sources -# - BLD for compilation -# EXAMPLES -# ======== -# :: -# $ ./Ffetch_extdir.sh CONFIG_NAME REMOTE_CTL -# TODO -# ==== -# option debug -# EVOLUTIONS -# ========== -# $Id: Ffetch_extdir.sh 3715 2012-11-28 16:06:02Z acc $ -# * creation -#- -basedir=$(pwd) -cd ${1} -wget ${2} -O remote_file.list -# -if [ -f remote_file.list ] ; then - cat remote_file.list | grep -v '^#' | - while - read remfile locfile - do - if [ $remfile == 'create_directory' ] ;then - mkdir $locfile - else - wget $remfile -O $locfile - fi - done -fi -cd $basedir diff --git a/mk/bldxag.cfg b/mk/bldxag.cfg index 19ea847577665a653b1db9b57c60ec2ef623e33b..56b707aaae4efaa19fc210bd83c4e77d914ee553 100644 --- a/mk/bldxag.cfg +++ b/mk/bldxag.cfg @@ -14,7 +14,6 @@ search_src 1 src::ioipsl $MAIN_DIR/ext/IOIPSL/src src::nemo $CONFIG_DIR/$NEW_CONF/WORK -src::ppr_1d $MAIN_DIR/ext/PPR/src bld::target nemo.exe bld::exe_dep @@ -36,10 +35,8 @@ bld::tool::make %MK # Pre-process code before analysing dependencies bld::pp::ioipsl 1 bld::pp::nemo 1 -bld::pp::ppr_1d 1 bld::tool::fppflags::nemo %FPPFLAGS bld::tool::fppflags::ioipsl %FPPFLAGS -bld::tool::fppflags::ppr_1d %FPPFLAGS # Ignore the following dependencies bld::excl_dep inc::netcdf.inc diff --git a/mk/bldxagxcdf.cfg b/mk/bldxagxcdf.cfg new file mode 100644 index 0000000000000000000000000000000000000000..c3e85802ea35d1866e1dbf58228f1e4c1c985d7d --- /dev/null +++ b/mk/bldxagxcdf.cfg @@ -0,0 +1,66 @@ +# ----------------------- FCM extract configuration file ----------------------- +cfg::type bld +cfg::version 1.0 + + +# ------------------------------------------------------------------------------ +# Build information +# ------------------------------------------------------------------------------ + +inc $COMPIL_DIR/arch_nemo.fcm +inc $COMPIL_DIR/cpp.fcm + +search_src 1 + +src::nocdf $MAIN_DIR/ext/DUMMY_NETCDF +src::ioipsl $MAIN_DIR/ext/IOIPSL/src +src::nemo $CONFIG_DIR/$NEW_CONF/WORK + +bld::target nemo.exe +bld::exe_dep + + +dir::root $NEMO_TDIR/$NEW_CONF/BLD + + +bld::tool::cpp %CPP +bld::tool::fpp %CPP +bld::tool::fc %FC +bld::tool::fflags %FCFLAGS %USER_INC +bld::tool::ld %LD +bld::tool::ldflags %LDFLAGS %USER_LIB +bld::tool::ar %AR +bld::tool::arflags %ARFLAGS +bld::tool::make %MK + +# Pre-process code before analysing dependencies +bld::pp::nocdf 1 +bld::pp::ioipsl 1 +bld::pp::nemo 1 +bld::tool::fppflags::nemo %FPPFLAGS +bld::tool::fppflags::nocdf %FPPFLAGS +bld::tool::fppflags::ioipsl %FPPFLAGS + +# Ignore the following dependencies +bld::excl_dep inc::VT.inc +bld::excl_dep use::xios +bld::excl_dep h::mpif.h +bld::excl_dep inc::mpif.h +bld::excl_dep inc::mpe_logf.h +bld::excl_dep use::mpi +bld::excl_dep use::mod_oasis +bld::excl_dep use::mkl_dfti +bld::excl_dep use::cudafor +bld::excl_dep use::openacc +# Don't generate interface files +bld::tool::geninterface none + +# Allow ".h90" as an extension for CPP include files +bld::infile_ext::h90 CPP::INCLUDE + +# extension for module output +bld::outfile_ext::mod .mod + +# rename executable to nemo.exe +bld::exe_name::model nemo.exe + diff --git a/mk/bldxcdf.cfg b/mk/bldxcdf.cfg new file mode 100644 index 0000000000000000000000000000000000000000..0d752da9de872d551d4ce56322074c3e0d02ddd1 --- /dev/null +++ b/mk/bldxcdf.cfg @@ -0,0 +1,74 @@ +# ----------------------- FCM extract configuration file ----------------------- +cfg::type bld +cfg::version 1.0 + + +# ------------------------------------------------------------------------------ +# Build information +# ------------------------------------------------------------------------------ + +inc $COMPIL_DIR/arch_nemo.fcm +inc $COMPIL_DIR/cpp.fcm + +search_src 1 + +src::nocdf $MAIN_DIR/ext/DUMMY_NETCDF +src::ioipsl $MAIN_DIR/ext/IOIPSL/src +src::agrif $MAIN_DIR/ext/AGRIF/AGRIF_FILES +src::nemo $CONFIG_DIR/$NEW_CONF/NEMOFILES/obj +src::ppr_1d $MAIN_DIR/ext/PPR/src + + +bld::target nemo.exe +bld::exe_dep + + +dir::root $NEMO_TDIR/$NEW_CONF/BLD + + +bld::tool::cpp %CPP +bld::tool::fpp %CPP +bld::tool::fc %FC +bld::tool::fflags %FCFLAGS %USER_INC +bld::tool::fflags::agrif %FFLAGS %USER_INC +bld::tool::ld %LD +bld::tool::ldflags %LDFLAGS %USER_LIB +bld::tool::ar %AR +bld::tool::arflags %ARFLAGS +bld::tool::make %MK + +# Pre-process code before analysing dependencies +bld::pp::nocdf 1 +bld::pp::ioipsl 1 +bld::pp::nemo 1 +bld::pp::agrif 1 +bld::pp::ppr_1d 1 +bld::tool::fppflags::nemo %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/NEMOFILES/inc +bld::tool::fppflags::nocdf %FPPFLAGS +bld::tool::fppflags::ioipsl %FPPFLAGS +bld::tool::fppflags::agrif %FPPFLAGS -include ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h +bld::tool::fppflags::ppr_1d %FPPFLAGS + +# Ignore the following dependencies +bld::excl_dep inc::VT.inc +bld::excl_dep use::xios +bld::excl_dep h::mpif.h +bld::excl_dep inc::mpif.h +bld::excl_dep inc::mpe_logf.h +bld::excl_dep use::mpi +bld::excl_dep use::mod_oasis +bld::excl_dep use::mkl_dfti +bld::excl_dep use::cudafor +bld::excl_dep use::openacc +# Don't generate interface files +bld::tool::geninterface none + +# Allow ".h90" as an extension for CPP include files +bld::infile_ext::h90 CPP::INCLUDE +bld::infile_ext::f90 FPP::FPP9X::SOURCE + +# extension for module output +bld::outfile_ext::mod .mod + +# rename executable to nemo.exe +bld::exe_name::model nemo.exe diff --git a/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI_DEBUG b/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI_DEBUG deleted file mode 120000 index 11d73e632c3fff46278fd7367d64fc4e216659e4..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI_DEBUG +++ /dev/null @@ -1 +0,0 @@ -batch-X64_AA_INTEL_OMPI \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI_DEBUG b/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI_DEBUG deleted file mode 120000 index b77eb07f1ad8e5b65e52e3815c5df528fc70841c..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI_DEBUG +++ /dev/null @@ -1 +0,0 @@ -batch-X64_BELENOS_INTEL_IMPI \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-X64_IRENE_DEBUG b/sette/BATCH_TEMPLATE/batch-X64_IRENE_DEBUG deleted file mode 100644 index c9535d290a84d5795f75cd5bb1bb4088831f7298..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-X64_IRENE_DEBUG +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -#MSUB -T 1790 # elapsed time limit in seconds (60 minutes) -#MSUB -r SETTE_JOB # Job name -#MSUB -o sette.jobid_%I.txt # standard output -#MSUB -e sette.jobid_%I.txt # standard error -#MSUB -n NPROCS # Total number of mpi task to use -#MSUB -A gen7451 # project name -#MSUB -q skylake # (queue name) only for thin nodes -#MSUB -m store,work,scratch -########################################################################## -# -# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these -# (via sed operating on this template job file). -# - OCEANCORES=NPROCS - export SETTE_DIR=DEF_SETTE_DIR -# -# set up mpp computing environment -# -# Local settings for machine BULL (TITANE at CCRT France) -# -export MPIRUN="ccc_mprun -n $OCEANCORES" - -# -# load sette functions (only post_test_tidyup needed) -# - . ${SETTE_DIR}/all_functions.sh -# - -# modules to load - -# Don't remove neither change the following line -# BODY - -# -# These variables are needed by post_test_tidyup function in all_functions.sh -# - export EXE_DIR=DEF_EXE_DIR - export INPUT_DIR=DEF_INPUT_DIR - export CONFIG_DIR=DEF_CONFIG_DIR - export TOOLS_DIR=DEF_TOOLS_DIR - export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION - export NEW_CONF=DEF_NEW_CONF - export CMP_NAM=DEF_CMP_NAM - export TEST_NAME=DEF_TEST_NAME -# -# end of set up -############################################################### -# -# change to the working directory -# -cd ${EXE_DIR} - - echo Running on host `hostname` - echo Time is `date` - echo Directory is `pwd` -# -# Run the parallel MPI executable -# - echo "Running time ${MPIRUN} ./nemo" -# - if [ MPI_FLAG == "yes" ]; then - time ${MPIRUN} ./nemo - else - time ./nemo - fi - -# - post_test_tidyup - -# END_BODY -# Don't remove neither change the previous line - - - exit - diff --git a/sette/BATCH_TEMPLATE/batch-X64_IRENE_GCC_DEBUG b/sette/BATCH_TEMPLATE/batch-X64_IRENE_GCC_DEBUG deleted file mode 100644 index 9dd3bcc6af50ff962c960a51aa8ecc30664e843f..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-X64_IRENE_GCC_DEBUG +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash -#MSUB -T 1790 # elapsed time limit in seconds (60 minutes) -#MSUB -r SETTE_JOB # Job name -#MSUB -o sette.jobid_%I.txt # standard output -#MSUB -e sette.jobid_%I.txt # standard error -#MSUB -n NPROCS # Total number of mpi task to use -#MSUB -A gen7451 # project name -#MSUB -q skylake # (queue name) only for thin nodes -#MSUB -m store,work,scratch -########################################################################## -# -# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these -# (via sed operating on this template job file). -# - OCEANCORES=NPROCS - export SETTE_DIR=DEF_SETTE_DIR -# -# set up mpp computing environment -# - set +vx - module purge - module load gnu/8.3.0 - module load flavor/buildcompiler/gcc/8 - module load flavor/buildmpi/openmpi/2.0 - module load flavor/hdf5/parallel - module load mpi/openmpi/2.0.4 - module load hdf5/1.8.20 - module load netcdf-c/4.6.0 - module load netcdf-fortran/4.4.4 -# -# Local settings for machine BULL (TITANE at CCRT France) -# - export MPIRUN="ccc_mprun -n $OCEANCORES" - -# -# load sette functions (only post_test_tidyup needed) -# - . ${SETTE_DIR}/all_functions.sh -# - -# modules to load - -# Don't remove neither change the following line -# BODY - -# -# These variables are needed by post_test_tidyup function in all_functions.sh -# - export EXE_DIR=DEF_EXE_DIR - export INPUT_DIR=DEF_INPUT_DIR - export CONFIG_DIR=DEF_CONFIG_DIR - export TOOLS_DIR=DEF_TOOLS_DIR - export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION - export NEW_CONF=DEF_NEW_CONF - export CMP_NAM=DEF_CMP_NAM - export TEST_NAME=DEF_TEST_NAME -# -# end of set up -############################################################### -# -# change to the working directory -# -cd ${EXE_DIR} - - echo Running on host `hostname` - echo Time is `date` - echo Directory is `pwd` -# -# Run the parallel MPI executable -# - echo "Running time ${MPIRUN} ./nemo" -# - if [ MPI_FLAG == "yes" ]; then - time ${MPIRUN} ./nemo - else - time ./nemo - fi - -# - post_test_tidyup - -# END_BODY -# Don't remove neither change the previous line - - - exit - diff --git a/sette/BATCH_TEMPLATE/batch-X64_JEANZAY_DEBUG b/sette/BATCH_TEMPLATE/batch-X64_JEANZAY_DEBUG deleted file mode 100644 index a26c4b222a9f05c91264871c3d9527b560c20847..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-X64_JEANZAY_DEBUG +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -#SBATCH -A GROUP_IDRIS@cpu -#SBATCH --job-name=SETTE_JOB # nom du job -#SBATCH --partition=cpu_p1 # Nom de la partition d'exécution -#SBATCH --ntasks=NPROCS # Nombre total de processus MPI -#SBATCH --ntasks-per-node=40 # Nombre de processus MPI par noeud -# /!\ Attention, la ligne suivante est trompeuse mais dans le vocabulaire -# de Slurm "multithread" fait bien référence à l'hyperthreading. -#SBATCH --hint=nomultithread # 1 processus MPI par coeur physique (pas d'hyperthreading) -#SBATCH --time=00:29:00 # Temps d’exécution maximum demande (HH:MM:SS) -#SBATCH --output=sette.jobid_%j.out # Nom du fichier de sortie -#SBATCH --error=sette.jobid_%j.out # Nom du fichier d'erreur (ici commun avec la sortie) -########################################################################## -# -# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these -# (via sed operating on this template job file). -# - OCEANCORES=NPROCS - export SETTE_DIR=DEF_SETTE_DIR -# -# set up mpp computing environment -# -# Local settings for machine BULL (TITANE at CCRT France) -# -export MPIRUN="srun --mpi=pmi2 --cpu-bind=cores -K1" - -# -# load sette functions (only post_test_tidyup needed) -# - . ${SETTE_DIR}/all_functions.sh -# - -# modules to load - -# Don't remove neither change the following line -# BODY - -# -# These variables are needed by post_test_tidyup function in all_functions.sh -# - export EXE_DIR=DEF_EXE_DIR - export INPUT_DIR=DEF_INPUT_DIR - export CONFIG_DIR=DEF_CONFIG_DIR - export TOOLS_DIR=DEF_TOOLS_DIR - export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION - export NEW_CONF=DEF_NEW_CONF - export CMP_NAM=DEF_CMP_NAM - export TEST_NAME=DEF_TEST_NAME -# -# end of set up -############################################################### -# -# change to the working directory -# -cd ${EXE_DIR} - - echo Running on host `hostname` - echo Time is `date` - echo Directory is `pwd` -# -# Run the parallel MPI executable -# - echo "Running time ${MPIRUN} ./nemo" -# - if [ MPI_FLAG == "yes" ]; then - time ${MPIRUN} ./nemo - else - time ./nemo - fi - -# - post_test_tidyup - -# END_BODY -# Don't remove neither change the previous line - - - exit - diff --git a/sette/BATCH_TEMPLATE/batch-X64_KARA_GCC_OMPI_DEBUG b/sette/BATCH_TEMPLATE/batch-X64_KARA_GCC_OMPI_DEBUG deleted file mode 120000 index a2ec08987081cb561dc7c6f12d0482f00ed755a0..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-X64_KARA_GCC_OMPI_DEBUG +++ /dev/null @@ -1 +0,0 @@ -batch-X64_KARA_GCC_OMPI \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-mpmd-X64_AA_INTEL_OMPI b/sette/BATCH_TEMPLATE/batch-mpmd-X64_AA_INTEL_OMPI deleted file mode 120000 index 11d73e632c3fff46278fd7367d64fc4e216659e4..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-mpmd-X64_AA_INTEL_OMPI +++ /dev/null @@ -1 +0,0 @@ -batch-X64_AA_INTEL_OMPI \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-mpmd-X64_AA_INTEL_OMPI_DEBUG b/sette/BATCH_TEMPLATE/batch-mpmd-X64_AA_INTEL_OMPI_DEBUG deleted file mode 120000 index 178a7f6eabe69471382e8fb0df6d9c58be6d6fd3..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-mpmd-X64_AA_INTEL_OMPI_DEBUG +++ /dev/null @@ -1 +0,0 @@ -batch-X64_AA_INTEL_OMPI_DEBUG \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-mpmd-X64_BELENOS_INTEL_IMPI b/sette/BATCH_TEMPLATE/batch-mpmd-X64_BELENOS_INTEL_IMPI deleted file mode 120000 index b77eb07f1ad8e5b65e52e3815c5df528fc70841c..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-mpmd-X64_BELENOS_INTEL_IMPI +++ /dev/null @@ -1 +0,0 @@ -batch-X64_BELENOS_INTEL_IMPI \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-mpmd-X64_BELENOS_INTEL_IMPI_DEBUG b/sette/BATCH_TEMPLATE/batch-mpmd-X64_BELENOS_INTEL_IMPI_DEBUG deleted file mode 120000 index b77eb07f1ad8e5b65e52e3815c5df528fc70841c..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-mpmd-X64_BELENOS_INTEL_IMPI_DEBUG +++ /dev/null @@ -1 +0,0 @@ -batch-X64_BELENOS_INTEL_IMPI \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-mpmd-X64_KARA_GCC_OMPI b/sette/BATCH_TEMPLATE/batch-mpmd-X64_KARA_GCC_OMPI deleted file mode 120000 index a2ec08987081cb561dc7c6f12d0482f00ed755a0..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-mpmd-X64_KARA_GCC_OMPI +++ /dev/null @@ -1 +0,0 @@ -batch-X64_KARA_GCC_OMPI \ No newline at end of file diff --git a/sette/BATCH_TEMPLATE/batch-mpmd-X64_KARA_GCC_OMPI_DEBUG b/sette/BATCH_TEMPLATE/batch-mpmd-X64_KARA_GCC_OMPI_DEBUG deleted file mode 120000 index a2ec08987081cb561dc7c6f12d0482f00ed755a0..0000000000000000000000000000000000000000 --- a/sette/BATCH_TEMPLATE/batch-mpmd-X64_KARA_GCC_OMPI_DEBUG +++ /dev/null @@ -1 +0,0 @@ -batch-X64_KARA_GCC_OMPI \ No newline at end of file diff --git a/sette/all_functions.sh b/sette/all_functions.sh index c86feff15d2a4ba3894a70483f283d7d6a45cc6e..8bc6e975c89614583364b1080507f0794b3303e2 100755 --- a/sette/all_functions.sh +++ b/sette/all_functions.sh @@ -196,7 +196,11 @@ set_valid_dir () { fi # remove last _ST followed by zero or more alphanumeric characters NEW_CONF1=$( echo $NEW_CONF | sed -e 's/_ST\([0-9a-zA-Z]*\)$//' ) - export NEMO_VALID=${NEMO_VALIDATION_DIR}/${CMP_NAM}/${REVISION_NB}/${NEW_CONF1}/${TEST_NAME} + if [[ -n "${NEMO_DEBUG}" && ! ${CMP_NAM,,} =~ ("debug"|"dbg") ]]; then + export NEMO_VALID=${NEMO_VALIDATION_DIR}/${CMP_NAM}_DEBUG/${REVISION_NB}/${NEW_CONF1}/${TEST_NAME} + else + export NEMO_VALID=${NEMO_VALIDATION_DIR}/${CMP_NAM}/${REVISION_NB}/${NEW_CONF1}/${TEST_NAME} + fi } # clean valid dir (move old ocean_output/run.stat and tracer to avoid checking them in case something wrong happen. diff --git a/sette/prepare_exe_dir.sh b/sette/prepare_exe_dir.sh index 5e6b1a01153ad605471529ae4e740b58990ff551..47d5207fde514d9fd5907c4d3ef2b4a927522ac3 100755 --- a/sette/prepare_exe_dir.sh +++ b/sette/prepare_exe_dir.sh @@ -69,7 +69,11 @@ set -o posix if [ -z "${CUSTOM_DIR}" ]; then export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} else - export EXE_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}/${NEW_CONF}/${TEST_NAME} + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]]; then + export EXE_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}_DEBUG/${NEW_CONF}/${TEST_NAME} + else + export EXE_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}/${NEW_CONF}/${TEST_NAME} + fi fi mkdir -p ${EXE_DIR} diff --git a/sette/sette.sh b/sette/sette.sh index da7e291452053a16334fa77cc5e93e91362708cb..9c3e0a3a22c78cd518790c2a9bdae517f6b6f421 100755 --- a/sette/sette.sh +++ b/sette/sette.sh @@ -1,10 +1,12 @@ #!/bin/sh +#set -x # initialise user dependent variable export cmd=$0 ; export cmdargs=$@ SETTE_DIR=$(cd $(dirname "$0"); pwd) MAIN_DIR=$(dirname $SETTE_DIR) export CMPL_CORES=8 # Number of threads to use for compiling export SETTE_STG="_ST" # Base suffix to append to configuration name +NEMO_DEBUG="" dry_run=0 NO_REPORT=0 # @@ -65,13 +67,15 @@ fi # Parse command-line arguments if [ $# -gt 0 ]; then - while getopts n:x:v:g:cdrshTqQteiACFNXua option; do + while getopts n:x:v:g:cybrshTqQteiACFNXua option; do case $option in c) export SETTE_CLEAN_CONFIGS='yes' export SETTE_SYNC_CONFIGS='yes' echo "-c: Configuration ${SETTE_TEST_CONFIGS[@]} will be cleaned; this option enforces also synchronisation" echo "";; - d) dry_run=1 + y) dry_run=1 + echo "";; + b) NEMO_DEBUG="-b" echo "";; r) NO_REPORT=1 echo "";; @@ -161,7 +165,8 @@ if [ $# -gt 0 ]; then echo '-g "group_suffix" single character suffix to be appended to the standard _ST suffix used' echo ' for SETTE-built configurations (needed if sette.sh invocations may overlap)' echo '-r to execute without waiting to run sette_rpt.sh at the end (useful for chaining sette.sh invocations)' - echo '-d to perform a dryrun to simply report what settings will be used' + echo '-y to perform a dryrun to simply report what settings will be used' + echo '-d to compile Nemo with debug options (only if %DEBUG_FCFLAGS if defined in your arch file)' echo '-c to clean each configuration' echo '-s to synchronise the sette MY_SRC and EXP00 with the reference MY_SRC and EXPREF' echo '-u to run sette.sh without any user interaction. This means no checks on creating' @@ -328,7 +333,7 @@ while [[ $NRUN -ne 0 && $nit -le 1080 ]]; do printf "%-3d %s\r" $NRUN 'nemo_sette runs still in queue or running ...'; else printf "%-50s\n" " " - . ./sette_rpt.sh + ./sette_rpt.sh ${NEMO_DEBUG} exit fi sleep 10 diff --git a/sette/sette_reference-configurations.sh b/sette/sette_reference-configurations.sh index b79c4d79fb89accf7d09a6f8e9d1b62f6e7055f0..4d22ddff559587300be9cd52113dd9c65400fdde 100755 --- a/sette/sette_reference-configurations.sh +++ b/sette/sette_reference-configurations.sh @@ -112,7 +112,11 @@ CONFIG_DIR0=${MAIN_DIR}/cfgs TOOLS_DIR=${MAIN_DIR}/tools if [ -n "${CUSTOM_DIR}" ]; then NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null ) - CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV} + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]]; then + export CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}_DEBUG + else + export CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV} + fi fi CMP_NAM=${1:-$COMPILER} @@ -139,7 +143,7 @@ do # ----------- if [ ${config} == "GYRE_PISCES" ] ; then SETTE_CONFIG="GYRE_PISCES"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 # 1 day else @@ -153,7 +157,7 @@ if [ ${config} == "GYRE_PISCES" ] ; then clean_config GYRE_PISCES ${SETTE_CONFIG} 'cfgs' # # GYRE uses linssh so remove key_qco if added by default - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r GYRE_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r GYRE_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi if [ ${config} == "GYRE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for GYRE_PISCES @@ -286,7 +290,7 @@ fi # ----------------- if [ ${config} == "ORCA2_ICE_PISCES" ] ; then SETTE_CONFIG="ORCA2_ICE_PISCES"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=16 # 1 day else @@ -299,7 +303,7 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] ; then sync_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs' clean_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for ORCA2_ICE_PISCES @@ -573,7 +577,7 @@ fi # ---------------- if [ ${config} == "ORCA2_OFF_PISCES" ] ; then SETTE_CONFIG="ORCA2_OFF_PISCES"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=16 # 4 days else @@ -587,7 +591,7 @@ if [ ${config} == "ORCA2_OFF_PISCES" ] ; then clean_config ${SETTE_CONFIG} ORCA2_OFF_PISCES_ST 'cfgs' # # ORCA2_OFF_PISCES uses linssh so remove key_qco if added by default - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_OFF_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_OFF_PISCES -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi if [ ${config} == "ORCA2_OFF_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for ORCA2_OFF_PISCES @@ -750,7 +754,7 @@ fi # ----- if [ ${config} == "AMM12" ] ; then SETTE_CONFIG="AMM12"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 # 3 h else @@ -763,7 +767,7 @@ if [ ${config} == "AMM12" ] ; then sync_config AMM12 ${SETTE_CONFIG} 'cfgs' clean_config AMM12 ${SETTE_CONFIG} 'cfgs' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AMM12 -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AMM12 -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi if [ ${config} == "AMM12" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for AMM12 @@ -884,7 +888,7 @@ fi # --------- if [ ${config} == "SAS" ] ; then SETTE_CONFIG="ORCA2_SAS_ICE"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=16 # 1 day else @@ -898,7 +902,7 @@ if [ ${config} == "SAS" ] ; then clean_config ORCA2_SAS_ICE ${SETTE_CONFIG} 'cfgs' # # ORCA2_SAS_ICE uses linssh so remove key_qco if added by default - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_SAS_ICE -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_SAS_ICE -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi if [ ${config} == "SAS" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests @@ -965,7 +969,7 @@ fi if [ ${config} == "SAS" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=16 # 1 day else @@ -1033,7 +1037,7 @@ fi if [ ${config} == "ORCA2_ICE_OBS" ] ; then SETTE_CONFIG="ORCA2_ICE_OBS"${SETTE_STG} ## Reproducibility tests - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=16 # 1 day else @@ -1045,7 +1049,7 @@ if [ ${config} == "ORCA2_ICE_OBS" ] ; then sync_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs' clean_config ORCA2_ICE_PISCES ${SETTE_CONFIG} 'cfgs' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -d "OCE ICE" -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "key_asminc ${ADD_KEYS}" del_key "key_top ${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r ORCA2_ICE_PISCES -d "OCE ICE" -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "key_asminc ${ADD_KEYS}" del_key "key_top ${DEL_KEYS}" fi if [ ${config} == "ORCA2_ICE_OBS" ] && [ ${DO_RESTART} == "1" ] ; then ## Reproducibility tests @@ -1153,7 +1157,7 @@ fi # ----------- if [ ${config} == "AGRIF" ] ; then SETTE_CONFIG="AGRIF_DEMO"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=4 # 6h else @@ -1171,7 +1175,7 @@ if [ ${config} == "AGRIF" ] ; then # # AGRIF_DEMO does not yet support nn_hls=2 => key_loop_fusion can not be used # . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -j ${CMPL_CORES} add_key "${ADD_KEYS/key_loop_fusion}" del_key "${DEL_KEYS}" - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi if [ ${config} == "AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests @@ -1436,7 +1440,7 @@ fi if [ ${config} == "AGRIF" ] && [ ${DO_CORRUPT} == "1" ] ; then ## test code corruption with AGRIF (phase 1) ==> Compile with key_agrif but run with no zoom - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=16 # 1d else @@ -1487,7 +1491,7 @@ if [ ${config} == "AGRIF" ] && [ ${DO_CORRUPT} == "1" ] ; then clean_config AGRIF_DEMO ${SETTE_CONFIG} 'cfgs' # # AGRIF_DEMO does not yet support nn_hls=2 => key_loop_fusion can not be used - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_loop_fusion}" del_key "key_agrif ${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r AGRIF_DEMO -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_loop_fusion}" del_key "key_agrif ${DEL_KEYS}" cd ${SETTE_DIR} . ./prepare_exe_dir.sh set_valid_dir @@ -1521,7 +1525,7 @@ fi # ------- if [ ${config} == "WED025" ] ; then SETTE_CONFIG="WED025"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 # 4h else @@ -1535,7 +1539,7 @@ if [ ${config} == "WED025" ] ; then clean_config WED025 ${SETTE_CONFIG} 'cfgs' # # WED025 uses ln_hpg_isf so remove key_qco if added by default - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r WED025 -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -r WED025 -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi if [ ${config} == "WED025" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests diff --git a/sette/sette_rpt.sh b/sette/sette_rpt.sh index 1eae7889bf655d4c3caabea33ea437256f8e2f34..7db19cb1caae88750bd8ef8214813c818fcdcb26 100755 --- a/sette/sette_rpt.sh +++ b/sette/sette_rpt.sh @@ -1,5 +1,4 @@ #!/bin/bash -f -# set -vx # simple SETTE report generator. # # This version should be run in the SETTE directory. @@ -477,7 +476,7 @@ function identictest(){ mach=${COMPILER} # overwrite revision (later) or compiler if [ $# -gt 0 ]; then - while getopts r:R:c:v:V:uh option; do + while getopts r:R:c:v:V:ubh option; do case $option in c) mach=$OPTARG;; r) rev=$OPTARG;; @@ -491,6 +490,8 @@ function identictest(){ fi ;; u) USER_INPUT='no';; + b) mach=${mach//_DEBUG}_DEBUG + DEBUG="with DEBUG (-b) option";; h | *) echo '' echo 'sette_rpt.sh : ' echo ' display result for the latest change' @@ -506,6 +507,7 @@ function identictest(){ echo ' 2nd validation sub-directory below NEMO_VALIDATION_DIR' echo ' if set the comparison is between two subdirectory trees beneath NEMO_VALIDATION_DIR' echo ' -u to run sette_rpt.sh without any user interaction' + echo ' -b to check DEBUG directory of COMPILER_name' echo '' exit 42;; esac @@ -612,7 +614,7 @@ else echo " $branchname @ $revision" fi echo "" -echo " on $COMPILER arch file" +echo " on $COMPILER arch file $DEBUG" echo "" # diff --git a/sette/sette_test-cases.sh b/sette/sette_test-cases.sh index 629fa0def4c953b4e9b77140b27489f0813dcd65..db9c81dcf0fa7644a1564308910bca58eab44e84 100755 --- a/sette/sette_test-cases.sh +++ b/sette/sette_test-cases.sh @@ -113,7 +113,11 @@ TOOLS_DIR=${MAIN_DIR}/tools if [ -n "${CUSTOM_DIR}" ]; then NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null ) - CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV} + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]]; then + export CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV}_DEBUG + else + export CMP_DIR=${CUSTOM_DIR}/${SETTE_SUB_VAL}_${NEMO_REV} + fi fi CMP_NAM=${1:-$COMPILER} # Copy job_batch_COMPILER file for specific compiler into job_batch_template @@ -139,7 +143,7 @@ do # --------- if [ ${config} == "OVERFLOW" ] ; then SETTE_CONFIG="OVERFLOW"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -153,7 +157,7 @@ if [ ${config} == "OVERFLOW" ] ; then # sync_config OVERFLOW ${SETTE_CONFIG} 'tests' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a OVERFLOW -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a OVERFLOW -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi if [ ${config} == "OVERFLOW" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for OVERFLOW @@ -211,7 +215,7 @@ fi if [ ${config} == "OVERFLOW" ] && [ ${DO_PHYOPTS} == "1" ] ; then ## Test for all advection, vert. coordinates, vector form, flux form: test runability and complete all time steps ## Needed namelist-xxxx for every type of run tested - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -255,7 +259,7 @@ fi # -------------- if [ ${config} == "LOCK_EXCHANGE" ] ; then SETTE_CONFIG="LOCK_EXCHANGE"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -270,7 +274,7 @@ if [ ${config} == "LOCK_EXCHANGE" ] ; then # sync_config LOCK_EXCHANGE ${SETTE_CONFIG} 'tests' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a LOCK_EXCHANGE -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a LOCK_EXCHANGE -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for LOCK_EXCHANGE @@ -327,7 +331,7 @@ fi if [ ${config} == "LOCK_EXCHANGE" ] && [ ${DO_PHYOPTS} == "1" ] ; then ## Test for all advection, vector form, flux form: test runability and complete all time steps ## Needed namelist-xxxx for every type of run tested - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -373,7 +377,7 @@ fi # --------- if [ ${config} == "VORTEX" ] ; then SETTE_CONFIG="VORTEX"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -389,7 +393,7 @@ if [ ${config} == "VORTEX" ] ; then # sync_config VORTEX ${SETTE_CONFIG} 'tests' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a VORTEX -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a VORTEX -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi if [ ${config} == "VORTEX" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for VORTEX @@ -567,7 +571,7 @@ fi # --------- if [ ${config} == "ICE_AGRIF" ] ; then SETTE_CONFIG="ICE_AGRIF"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=10 else @@ -584,7 +588,7 @@ if [ ${config} == "ICE_AGRIF" ] ; then sync_config ICE_AGRIF ${SETTE_CONFIG} 'tests' # # ICE_AGRIF uses linssh so remove key_qco if added by default - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ICE_AGRIF -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ICE_AGRIF -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi if [ ${config} == "ICE_AGRIF" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests for ICE_AGRIF @@ -766,7 +770,7 @@ fi # ------ if [ ${config} == "ISOMIP+" ] ; then SETTE_CONFIG="ISOMIP+"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -782,7 +786,7 @@ if [ ${config} == "ISOMIP+" ] ; then sync_config ISOMIP+ ${SETTE_CONFIG} 'tests' # # ISOMIP+ uses ln_hpg_isf so remove key_qco if added by default - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ISOMIP+ -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a ISOMIP+ -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS/key_qco/}" del_key "${DEL_KEYS}" fi if [ ${config} == "ISOMIP+" ] && [ ${DO_RESTART} == "1" ] ; then ## Restartability tests @@ -846,7 +850,7 @@ fi if [ ${config} == "ISOMIP+" ] && [ ${DO_REPRO} == "1" ] ; then ## Reproducibility tests - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -911,7 +915,7 @@ fi # --------- if [ ${config} == "SWG" ] && [ ${USING_QCO} == "yes" ] ; then SETTE_CONFIG="SWG"${SETTE_STG} - if [ $( echo ${CMP_NAM} | grep -ic debug ) -eq 1 ] + if [[ -n "${NEMO_DEBUG}" || ${CMP_NAM,,} =~ ("debug"|"dbg") ]] then ITEND=12 else @@ -926,7 +930,7 @@ if [ ${config} == "SWG" ] && [ ${USING_QCO} == "yes" ] ; then # sync_config SWG ${SETTE_CONFIG} 'tests' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a SWG -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" + . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a SWG -t ${CMP_DIR:-${CONFIG_DIR0}} -k 0 ${NEMO_DEBUG} -j ${CMPL_CORES} add_key "${ADD_KEYS}" del_key "${DEL_KEYS}" fi if [ ${config} == "SWG" ] && [ ${DO_RESTART} == "1" ] && [ ${USING_QCO} == "yes" ] ; then ## Restartability tests for SWG diff --git a/src/OCE/SBC/cpl_oasis3.F90 b/src/OCE/SBC/cpl_oasis3.F90 index ab62c5a4d4ff9f6701da542833d2e96a764f0687..c64bfd2d5ef7492ddfbef4fb4a8d066c2611d3d8 100644 --- a/src/OCE/SBC/cpl_oasis3.F90 +++ b/src/OCE/SBC/cpl_oasis3.F90 @@ -25,6 +25,9 @@ MODULE cpl_oasis3 !!---------------------------------------------------------------------- #if defined key_oasis3 USE mod_oasis ! OASIS3-MCT module +#endif +#if defined key_xios + USE xios ! I/O server #endif USE par_oce ! ocean parameters USE dom_oce ! ocean space and time domain @@ -136,8 +139,9 @@ CONTAINS ! INTEGER :: id_part INTEGER :: paral(5) ! OASIS3 box partition - INTEGER :: ishape(4) ! shape of arrays passed to PSMILe + INTEGER :: ishape(4) ! shape of arrays passed to PSMILe INTEGER :: ji,jc,jm ! local loop indicees + LOGICAL :: llenddef ! should we call xios_oasis_enddef and oasis_enddef? CHARACTER(LEN=64) :: zclname CHARACTER(LEN=2) :: cli2 !!-------------------------------------------------------------------- @@ -282,14 +286,21 @@ CONTAINS !------------------------------------------------------------------ ! #if defined key_agrif - ! Warning: Agrif_Nb_Fine_Grids not yet defined at this stage for Agrif_Root -> must use Agrif_Root_Only() - IF( Agrif_Root_Only() .OR. agrif_fixed() == Agrif_Nb_Fine_Grids() ) THEN -#endif - CALL oasis_enddef(nerror) - IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') -#if defined key_agrif + IF( Agrif_Root() ) THEN ! Warning: Agrif_Nb_Fine_Grids not yet defined -> must use Agrif_Root_Only() + llenddef = Agrif_Root_Only() ! true of no nested grid + ELSE ! Is it the last nested grid? + llenddef = agrif_fixed() == Agrif_Nb_Fine_Grids() ENDIF +#else + llenddef = .TRUE. +#endif + IF( llenddef ) THEN +#if defined key_xios + CALL xios_oasis_enddef() ! see "Joint_usage_OASIS3-MCT_XIOS.pdf" on XIOS wiki page #endif + CALL oasis_enddef(nerror) + IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') + ENDIF ! END SUBROUTINE cpl_define diff --git a/tests/BENCH/EXPREF/namelist_cfg_orca025_like b/tests/BENCH/EXPREF/namelist_cfg_orca025_like index c7c25cae2c209d63b926b7cccba50ad415961cb1..76256b5ccf6a5d9e5875d66895ebee2dab20e1d0 100644 --- a/tests/BENCH/EXPREF/namelist_cfg_orca025_like +++ b/tests/BENCH/EXPREF/namelist_cfg_orca025_like @@ -37,8 +37,9 @@ !----------------------------------------------------------------------- &namdom ! time and space domain !----------------------------------------------------------------------- - rn_Dt = 900. ! time step for the dynamics (and tracer if nn_acc=0) + rn_Dt = 90. ! time step for the dynamics (and tracer if nn_acc=0) rn_atfp = 0.05 ! asselin time filter parameter + ln_meshmask = .false. ! =T create a mesh file / !!====================================================================== diff --git a/tests/BENCH/EXPREF/namelist_cfg_orca12_like b/tests/BENCH/EXPREF/namelist_cfg_orca12_like index ee0ae6c9dd7ac450104a769340b43493404a689d..131f5be6c6db843cfb61180c7dea4550dbae914f 100644 --- a/tests/BENCH/EXPREF/namelist_cfg_orca12_like +++ b/tests/BENCH/EXPREF/namelist_cfg_orca12_like @@ -37,8 +37,9 @@ !----------------------------------------------------------------------- &namdom ! time and space domain !----------------------------------------------------------------------- - rn_Dt = 300. ! time step for the dynamics (and tracer if nn_acc=0) + rn_Dt = 30. ! time step for the dynamics (and tracer if nn_acc=0) rn_atfp = 0.05 ! asselin time filter parameter + ln_meshmask = .false. ! =T create a mesh file / !!====================================================================== diff --git a/tests/BENCH/EXPREF/namelist_cfg_orca1_like b/tests/BENCH/EXPREF/namelist_cfg_orca1_like index c88cfc9a43f5bd4240a25bf6b131cf6af70cdaf8..0513cc17660fcd7ee2c9fb63d2e6bb7dd86046ab 100644 --- a/tests/BENCH/EXPREF/namelist_cfg_orca1_like +++ b/tests/BENCH/EXPREF/namelist_cfg_orca1_like @@ -37,8 +37,9 @@ !----------------------------------------------------------------------- &namdom ! time and space domain !----------------------------------------------------------------------- - rn_Dt = 3600. ! time step for the dynamics (and tracer if nn_acc=0) + rn_Dt = 360. ! time step for the dynamics (and tracer if nn_acc=0) rn_atfp = 0.05 ! asselin time filter parameter + ln_meshmask = .false. ! =T create a mesh file / !!====================================================================== diff --git a/tests/CPL_OASIS/EXPREF/iodef.xml b/tests/CPL_OASIS/EXPREF/iodef.xml index dda919bd7ac24d1d0e892e5bd6e3cb17ca357be4..a76b6d8115cff47796e6273ebfdff7a6ae4b0a79 100644 --- a/tests/CPL_OASIS/EXPREF/iodef.xml +++ b/tests/CPL_OASIS/EXPREF/iodef.xml @@ -13,7 +13,7 @@ <variable id="using_server" type="bool">true</variable> <variable id="using_oasis" type="bool">true</variable> <variable id="oasis_codes_id" type="string" >oceanx</variable> - <variable id="call_oasis_enddef" type="bool">false</variable> + <variable id="call_oasis_enddef" type="bool">true</variable> </variable_definition> </context>