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_BELENOS_INTEL_IMPI_DEBUG.fcm b/arch/MERCATOR/arch-X64_AA_INTEL_OMPI.fcm similarity index 70% rename from arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI_DEBUG.fcm rename to arch/MERCATOR/arch-X64_AA_INTEL_OMPI.fcm index 9ca5dcc091d181d8b1d6c2b1d393c2a3a68cc0a6..b30d157c4f8163b069cd6b6dfa8d4650412f33c0 100644 --- a/arch/MERCATOR/arch-X64_BELENOS_INTEL_IMPI_DEBUG.fcm +++ b/arch/MERCATOR/arch-X64_AA_INTEL_OMPI.fcm @@ -1,16 +1,8 @@ -# compiler options for BELENOS/TARANIS (using INTEL compiler) +# compiler options for AA (using INTEL compiler & OpenMPI) # -# -------------------------------- -# 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 +# 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 @@ -46,18 +38,19 @@ #--------------------------------------------------------------------------------------------- # # -%NCDF_INC -I${NETCDF_INC} -%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${PHDF5_LIB_DIR} -lhdf5_hl -lhdf5 +%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}/include +%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 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 +%FC mpifort -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 mpiifort +%LD mpifort %LDFLAGS %FPPFLAGS -P -traditional %AR ar @@ -66,5 +59,5 @@ %USER_INC %XIOS_INC %OASIS_INC %NCDF_INC %USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB -%CC mpiicc +%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_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_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..ece845b947a53e4e57d1057e8c11ef30488d1809 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 -fallow-argument-mismatch %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/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg b/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg index c8353d3ad6ea8628ec7d3748dc60578b8b9c2cd3..4b17c10299ec87c10936d1ed936390a783d0f3e3 100644 --- a/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg +++ b/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg @@ -117,6 +117,7 @@ !----------------------------------------------------------------------- &namsbc_abl ! Atmospheric Boundary Layer formulation (ln_abl = T) !----------------------------------------------------------------------- + cn_dom = 'dom_cfg_abl_L25Z10' / !----------------------------------------------------------------------- &namtra_qsr ! penetrative solar radiation (ln_traqsr =T) diff --git a/cfgs/SHARED/namelist_ref b/cfgs/SHARED/namelist_ref index f146b16f520b78980d840f0ff104ac0b37d56a4a..28a67e4d54a5df21cc92367afbd896ee85a385ab 100644 --- a/cfgs/SHARED/namelist_ref +++ b/cfgs/SHARED/namelist_ref @@ -326,6 +326,7 @@ nn_dyn_restore = 0 ! restoring option for dynamical ABL variables: = 0 no restoring ! = 1 equatorial restoring ! = 2 global restoring + rn_vfac = 0. rn_ldyn_min = 4.5 ! dynamics nudging magnitude inside the ABL [hour] (~3 rn_Dt) rn_ldyn_max = 1.5 ! dynamics nudging magnitude above the ABL [hour] (~1 rn_Dt) rn_ltra_min = 4.5 ! tracers nudging magnitude inside the ABL [hour] (~3 rn_Dt) diff --git a/ext/AGRIF/AGRIF_FILES/modtypes.F90 b/ext/AGRIF/AGRIF_FILES/modtypes.F90 index 3651d7bc1df1da5ec3049a94083f7414b5eda0b0..d00cd3e8fa4b4ecdd8d04bb961593a51993a3292 100644 --- a/ext/AGRIF/AGRIF_FILES/modtypes.F90 +++ b/ext/AGRIF/AGRIF_FILES/modtypes.F90 @@ -378,7 +378,7 @@ end type Agrif_Variables_List integer :: Agrif_Regridding = 10 integer :: Agrif_Minwidth real :: Agrif_Efficiency = 0.7 - integer :: MaxSearch = 10 + integer :: MaxSearch = 3 real(kind=8), dimension(3) :: Agrif_mind !> @} !> \name parameters for the interpolation of the child grids 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..7b20c3c317ac14527aec246aadba534f22db12de 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,89 +96,139 @@ 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 CFGS_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=''; -conf_file=ref_cfgs.txt +list_add_key=''; list_def_key=''; list_del_key='' #- #- FCM and functions location --- 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 +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 -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 -done - +if [ -n "$x_name" ] # is the configuration existing in cfgs or tests? or is it a new conf? +then + incfg=$( find $CFGS_DIR -type d -name $x_name | wc -l ) # this configuration exists in CFGS_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,93 +236,72 @@ 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 +## No ref. cfg or demo selected +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 }' ) +# CFGS_DIR=${MAIN_DIR}/$( ls -rt */work_cfgs.txt | awk -F/ 'END{ print $1}' ) +# TML_CONF=$( tail -1 ${CFGS_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" ${COMPIL_DIR}/Flist_cfgs.sh exit 2 # fi - +fi ## At least one config has been requested -else - - ## 'all' arg: list all available configurations - if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' || "${RMT_CONF}" == 'all' ]]; then - ${COMPIL_DIR}/Flist_cfgs.sh - exit 2 - ## Probably useless but who knows? - elif [[ -n "${REF_CONF}" && -n "${DEMO_CONF}" ]]; then - echo -e "\033[0;31m\nYou have to choose whether you work with:" - echo -e " - LTS configurations in ./cfgs ('-r') or" - echo -e " - Unsupported cases in ./tests ('-a')\033[0m\n" - 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 - conf_file=demo_cfgs.txt; CONFIG_DIR=${MAIN_DIR}/tests; TML_CONF=${DEMO_CONF} - fi +## 'all' arg: list all available configurations +if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' ]]; then + ${COMPIL_DIR}/Flist_cfgs.sh + exit 2 + ## Probably useless but who knows? +elif [[ -n "${REF_CONF}" && -n "${DEMO_CONF}" ]]; then + echo -e "\033[0;31m\nYou have to choose whether you work with:" + echo -e " - LTS configurations in ./cfgs ('-r') or" + echo -e " - Unsupported cases in ./tests ('-a')\033[0m\n" + exit 2 +elif [ -n "${REF_CONF}" ]; then + conf_file=ref_cfgs.txt ; export CONFIG_DIR=${CFGS_DIR} ; TML_CONF=${REF_CONF} +elif [ -n "${DEMO_CONF}" ]; then + conf_file=demo_cfgs.txt; export CONFIG_DIR=${TESTS_DIR}; TML_CONF=${DEMO_CONF} fi + +## Reuse a working cfg +grep -q "${TML_CONF} " ${CONFIG_DIR}/work_cfgs.txt 2>/dev/null && conf_file=work_cfgs.txt ## Test if ref. cfg or demo case does exist -if [[ ! $( grep "${TML_CONF} " ${CONFIG_DIR}/*_cfgs.txt ) ]]; then - echo -e "\033[0;31m\nThe reference configuration ('-r'), demonstration 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 +if (! grep -q "${TML_CONF} " ${CONFIG_DIR}/$conf_file ); then + echo -e "\033[0;31m\nThe reference configuration ('-r') or " + echo -e "demonstration case ('-a') 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 +## If new cfg exists, work in it +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 else + NEW_CONF=${TML_CONF} +fi - ## Reuse a working cfg - if [[ -f ${CONFIG_DIR}/work_cfgs.txt && $( grep "${TML_CONF} " ${CONFIG_DIR}/work_cfgs.txt ) ]]; then - conf_file=work_cfgs.txt - fi - - ## If new cfg exists, work in it - [ -z "${NEW_CONF}" ] && NEW_CONF=${TML_CONF} - - ## Update sub-comps if needed - if [ -z "${NEM_SUBDIR}" ]; then - NEM_SUBDIR=$( grep "${TML_CONF} " ${CONFIG_DIR}/${conf_file} | awk '{$1 = ""; print $0}' ) - fi - +## Update sub-comps if needed +if [ -z "${NEM_SUBDIR}" ]; then + NEM_SUBDIR=$( grep "${TML_CONF} " ${CONFIG_DIR}/${conf_file} | awk '{$1 = ""; print $0}' ) fi export NEMO_TDIR=${x_t:-$CONFIG_DIR} @@ -280,23 +309,16 @@ 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}" - ## Create new config even in existing one (mkdir with -p option, cp with -n) ${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 +340,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 +371,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 +408,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/agrifpp.sh b/mk/agrifpp.sh index 32f63a440bbc0e6c0588511b22856906183bb12c..308125ce8005c817aa0c3e0ad4223b5fa68e0f09 100755 --- a/mk/agrifpp.sh +++ b/mk/agrifpp.sh @@ -60,8 +60,8 @@ if [ "$MYFILE" == "agrif2model.f90" ];then if [ -d ${MYDIR}/${NEW_CONF}/WORK ]; then \cp ${MYDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${MYDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE else - \cp ${MYDIR}/${NEW_CONF}/src/${MYFILE/.f90/.F90} ${MYDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE + \cp ${CONFIG_DIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${MYDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE fi else cd ${MYDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${MYDIR}/${NEW_CONF}/NEMOFILES/conv ${MYDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${MYDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${MYDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null -fi \ No newline at end of file +fi diff --git a/mk/bld.cfg b/mk/bld.cfg index 1e596ae79a0f4df9e2917cd14a1825c9284b3280..67352be6cc9f0a0b9d8b098cbc89f15134996c13 100644 --- a/mk/bld.cfg +++ b/mk/bld.cfg @@ -14,7 +14,7 @@ search_src 1 src::ioipsl $MAIN_DIR/ext/IOIPSL/src src::agrif $MAIN_DIR/ext/AGRIF/AGRIF_FILES -src::nemo $CONFIG_DIR/$NEW_CONF/NEMOFILES/obj +src::nemo $NEMO_TDIR/$NEW_CONF/NEMOFILES/obj src::ppr_1d $MAIN_DIR/ext/PPR/src @@ -41,7 +41,7 @@ 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::nemo %FPPFLAGS -I$NEMO_TDIR/$NEW_CONF/NEMOFILES/inc bld::tool::fppflags::ioipsl %FPPFLAGS bld::tool::fppflags::agrif %FPPFLAGS -include ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h bld::tool::fppflags::ppr_1d %FPPFLAGS 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 b/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI new file mode 100644 index 0000000000000000000000000000000000000000..bdd075c6c25cfc14359dcc9eced3b355eed74968 --- /dev/null +++ b/sette/BATCH_TEMPLATE/batch-X64_AA_INTEL_OMPI @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + +#SBATCH -J sette +#SBATCH -o sette.%j.out +#SBATCH -e sette.%j.err +#SBATCH -N 1 +#SBATCH --time=0-00:20:00 +#SBATCH --account=frtomerc +#SBATCH --partition=par +#SBATCH --qos=np +##SBATCH --ntasks=NPROCS +#SBATCH --ntasks=TOTAL_NPROCS + +set -x + +# 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). +# + echo " "; + OCORES=NPROCS + XCORES=NXIOPROCS + O_PER_NODE=32 + X_PER_NODE=8 + if [ $XCORES -le $X_PER_NODE ]; then X_PER_NODE=$XCORES; fi + if [ $OCORES -le $O_PER_NODE ]; then O_PER_NODE=$OCORES; fi + export SETTE_DIR=DEF_SETTE_DIR + +############################################################### +# +export MPIRUN="srun" +# +# load sette functions (only post_test_tidyup needed) +# + . ${SETTE_DIR}/all_functions.sh +############################################################### +# +# modules to load +module purge &> /dev/null +module use /home/ar5/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/r2320_intel-ompi +module list + +# Don't remove neither change the following line +# BODY +# +# 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). Note that the number of compute nodes required +# is also set by the fcm_job.sh on the PBS select header line above. +# +# These variables are needed by post_test_tidyup function in all_functions.sh +# + export XIO_HOME=${XIOS_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 + export EXE_DIR=DEF_EXE_DIR + ulimit -a + ulimit -s unlimited +# +# 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` + sed -i "s/one_file/multiple_file/" file_def_nemo-*.xml +# +# Run the parallel MPI executable +# + echo "Running time ${MPIRUN} ./nemo" +# + if [ $XCORES -gt 0 ]; then +# +# Run MPMD case +# + #XIOS will run on a separate node so will run in parallel queue + if [ ! -f ./xios_server.exe ] && [ -f ${XIO_HOME}/bin/xios_server.exe ]; then + cp ${XIO_HOME}/bin/xios_server.exe . + fi + if [ ! -f ./xios_server.exe ]; then + echo "./xios_server.exe not found" + echo "run aborted" + exit + fi + cat > ./config.file <<-EOF +0-$((OCORES-1)) ./nemo +${OCORES}-$((TOTAL_NPROCS-1)) ./xios_server.exe +EOF + $MPIRUN --ntasks=TOTAL_NPROCS --multi-prog config.file + else +# +# Run SPMD case +# + 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_BELENOS_INTEL_IMPI b/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI index fb453c207cf8d8f2f4dce96e4125b9ed35820860..481b788c1d6ceee865d63bf757b61c42f2e367b2 100644 --- a/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI +++ b/sette/BATCH_TEMPLATE/batch-X64_BELENOS_INTEL_IMPI @@ -12,11 +12,11 @@ #SBATCH --time=01:00:00 ##SBATCH --time=00:15:00 -#SBATCH -A smer -##SBATCH -A cmems +##SBATCH -A smer +#SBATCH -A cmems -#SBATCH --qos=normal -##SBATCH --qos=coper +##SBATCH --qos=normal +#SBATCH --qos=coper # Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these @@ -43,7 +43,6 @@ module purge 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/rev2320-impi -#module load xios-2.5_rev1903 export XIO_HOME=${XIOS_DIR} # Don't remove neither change the following line @@ -76,61 +75,6 @@ export XIO_HOME=${XIOS_DIR} echo Running on host `hostname` echo Time is `date` echo Directory is `pwd` -# -# Run the parallel MPI executable -# - - # Comm/Fabric - # ----------- - export DAPL_ACK_RETRY=7 - export DAPL_ACK_TIMER=20 - export DAPL_IB_SL=0 - export DAPL_UCM_CQ_SIZE=8192 - export DAPL_UCM_DREQ_RETRY=4 - export DAPL_UCM_QP_SIZE=8192 - export DAPL_UCM_REP_TIME=8000 - export DAPL_UCM_RTU_TIME=8000 - export DAPL_UCM_WAIT_TIME=10000 - export I_MPI_CHECK_DAPL_PROVIDER_COMPATIBILITY=0 - export I_MPI_CHECK_DAPL_PROVIDER_MISMATCH=none - export I_MPI_DAPL_RDMA_MIXED=enable - export I_MPI_DAPL_SCALABLE_PROGRESS=1 - export I_MPI_DAPL_TRANSLATION_CACHE=1 - export I_MPI_DAPL_UD_DIRECT_COPY_THRESHOLD=65536 - export I_MPI_DAPL_UD=on - export I_MPI_FABRICS=shm:dapl - export I_MPI_DAPL_PROVIDER=ofa-v2-mlx5_0-1u - export I_MPI_FALLBACK=disable - export I_MPI_FALLBACK_DEVICE=disable - export I_MPI_DYNAMIC_CONNECTION=1 - export I_MPI_FAST_COLLECTIVES=1 - export I_MPI_LARGE_SCALE_THRESHOLD=8192 - # File system - # ----------- - export I_MPI_EXTRA_FILESYSTEM_LIST=lustre - export I_MPI_EXTRA_FILESYSTEM=on - # Slurm - # ----- - export I_MPI_HYDRA_BOOTSTRAP=slurm - export I_MPI_SLURM_EXT=0 - # Force kill job - # -------------- - export I_MPI_JOB_SIGNAL_PROPAGATION=on - export I_MPI_JOB_ABORT_SIGNAL=9 - # Extra - # ----- - export I_MPI_LIBRARY_KIND=release_mt - export EC_MPI_ATEXIT=0 - export EC_PROFILE_HEAP=0 - # Process placement (cyclic) - # -------------------------- - export I_MPI_JOB_RESPECT_PROCESS_PLACEMENT=off - export I_MPI_PERHOST=1 - # Process pinning - # --------------- - export I_MPI_PIN=enable - export I_MPI_PIN_PROCESSOR_LIST="allcores:map=scatter" # map=spread - if [ $XCORES -gt 0 ]; then # # Run MPMD case 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_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 d9f87067d7baef11909247a459e203179bcc5348..8bc6e975c89614583364b1080507f0794b3303e2 100755 --- a/sette/all_functions.sh +++ b/sette/all_functions.sh @@ -153,12 +153,12 @@ clean_config() { echo '-------------------------------------------------------------------------------' echo ' CLEANING CONFIGURATION ' echo '' - echo "./makenemo -n $lCFG -a/-r $lREF clean" + echo "./makenemo -n $lCFG -a/-r $lREF -t ${CMP_DIR:-${CONFIG_DIR0}} clean" echo '' if [ ${lTYP} == 'tests' ]; then - ./makenemo -n $lCFG -a $lREF clean + ./makenemo -n $lCFG -t ${CMP_DIR:-${CONFIG_DIR0}} -a $lREF clean elif [ ${lTYP} == 'cfgs' ]; then - ./makenemo -n $lCFG -r $lREF clean + ./makenemo -n $lCFG -t ${CMP_DIR:-${CONFIG_DIR0}} -r $lREF clean else echo 'ERROR in the cleaning process'; exit 42 fi @@ -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/input_ORCA2_ICE_PISCES.cfg b/sette/input_ORCA2_ICE_PISCES.cfg index 33408e69681d5afcf5d866425d24609f1145c717..55d14cd32c9a52a95cf4b6a56ff716f348683973 100644 --- a/sette/input_ORCA2_ICE_PISCES.cfg +++ b/sette/input_ORCA2_ICE_PISCES.cfg @@ -1 +1,2 @@ ORCA2_ICE_v4.2.0.tar.gz ORCA2_ICE_v4.2.0 +ORCA2_ABL_v4.2.0.tar.gz ORCA2_ABL_v4.2.0 diff --git a/sette/prepare_exe_dir.sh b/sette/prepare_exe_dir.sh index 1be9693fb337178140688848929f353fe14e1b6c..47d5207fde514d9fd5907c4d3ef2b4a927522ac3 100755 --- a/sette/prepare_exe_dir.sh +++ b/sette/prepare_exe_dir.sh @@ -69,8 +69,11 @@ set -o posix if [ -z "${CUSTOM_DIR}" ]; then export EXE_DIR=${CONFIG_DIR}/${NEW_CONF}/${TEST_NAME} else - NEMO_REV=$( git rev-parse --short HEAD 2> /dev/null ) - 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} @@ -86,6 +89,7 @@ echo "requested by the command : "$cmd $cmdargs >> ./sette_con echo "on branch : "$SETTE_THIS_BRANCH >> ./sette_config printf "%-33s : %s\n" USING_TIMING $USING_TIMING >> ./sette_config printf "%-33s : %s\n" USING_ICEBERGS $USING_ICEBERGS >> ./sette_config +printf "%-33s : %s\n" USING_ABL $USING_ABL >> ./sette_config printf "%-33s : %s\n" USING_EXTRA_HALO $USING_EXTRA_HALO >> ./sette_config printf "%-33s : %s\n" USING_TILING $USING_TILING >> ./sette_config printf "%-33s : %s\n" USING_COLLECTIVES $USING_COLLECTIVES >> ./sette_config diff --git a/sette/sette.sh b/sette/sette.sh index 4b816f34dea2998f181975f2c3c70e614a6a3be7..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 # @@ -12,6 +14,7 @@ NO_REPORT=0 # export USING_TIMING='yes' # Default: yes => set ln_timing=.true. ; use -T to disable export USING_ICEBERGS='yes' # Default: yes => set ln_icebergs=.true. ; use -i to disable +export USING_ABL='no' # Default: no => set ln_abl=.false. ; use -a to set ln_abl=.true. export USING_EXTRA_HALO='yes' # Default: yes => set nn_hls=2 ; use -e to set nn_hls=1 export USING_COLLECTIVES='yes' # Default: yes => set nn_comm=2 ; use -C to set nn_comm=1 export USING_NOGATHER='yes' # Default: yes => set ln_nnogather=.true.; use -N to set ln_nnogather=.false. @@ -64,13 +67,15 @@ fi # Parse command-line arguments if [ $# -gt 0 ]; then - while getopts n:x:v:g:cdrshTqQteiACFNXu 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 "";; @@ -112,6 +117,9 @@ if [ $# -gt 0 ]; then i) export USING_ICEBERGS='no' echo "-i: ln_icebergs will be set to false" echo "";; + a) export USING_ABL='yes' + echo "-a: ln_abl will be set to true" + echo "";; C) export USING_COLLECTIVES='no' echo "-C: nn_comm will be set to 1" echo "";; @@ -142,6 +150,7 @@ if [ $# -gt 0 ]; then echo '-t set ln_tile false in all tests that support it (default: true)' echo '-e set nn_hls=1 (default: nn_hls=2)' echo '-i set ln_icebergs false (default: true)' + echo '-a set ln_abl true (default: false)' echo '-C set nn_comm=1 (default: nn_comm=2 ==> use MPI3 collective comms)' echo '-N set ln_nnogather false for ORCA2 configurations (default: true)' echo '-q to remove the key_qco key (default: added)' @@ -156,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' @@ -262,6 +272,7 @@ echo "requested by the command : "$cmd $cmdargs echo "on branch : "$SETTE_THIS_BRANCH printf "%-33s : %s\n" USING_TIMING $USING_TIMING printf "%-33s : %s\n" USING_ICEBERGS $USING_ICEBERGS +printf "%-33s : %s\n" USING_ABL $USING_ABL printf "%-33s : %s\n" USING_EXTRA_HALO $USING_EXTRA_HALO printf "%-33s : %s\n" USING_TILING $USING_TILING printf "%-33s : %s\n" USING_COLLECTIVES $USING_COLLECTIVES @@ -322,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 9c10991568137f3cab0f78a4e5b56bedba8cfe57..4d22ddff559587300be9cd52113dd9c65400fdde 100755 --- a/sette/sette_reference-configurations.sh +++ b/sette/sette_reference-configurations.sh @@ -110,8 +110,16 @@ fi # Directory to run the tests 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 ) + 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 cd ${SETTE_DIR} cp BATCH_TEMPLATE/${JOB_PREFIX}-${COMPILER} job_batch_template || exit @@ -135,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 @@ -149,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 -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 @@ -282,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 @@ -295,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 -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 @@ -321,6 +329,20 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist namelist_cfg ln_cdgw .false. set_namelist namelist_cfg ln_sdw .true. set_namelist namelist_cfg ln_stcor .true. + if [ ${USING_ABL} == "yes" ]; then + set_namelist namelist_cfg nn_date0 20130101 + set_namelist namelist_cfg ln_blk .false. + set_namelist namelist_cfg ln_abl .true. + set_namelist namelist_cfg ln_tair_pot .true. + sed -i "/sn_wndi/s/u_10.15JUNE2009_fill/uwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndi/s/ 6./24./; /sn_wndi/s/U_10_MOD/uwnd/; \ + /sn_wndi/s/true/false/; /sn_wndi/s/yearly/monthly/; /sn_wndi/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_wndj/s/v_10.15JUNE2009_fill/vwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndj/s/ 6./24./; /sn_wndj/s/V_10_MOD/vwnd/; \ + /sn_wndj/s/true/false/; /sn_wndj/s/yearly/monthly/; /sn_wndj/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_tair/s/t_10.15JUNE2009_fill/tair_ERAI_L25Z10_ORCA2_ana1d/; /sn_tair/s/ 6./24./; /sn_tair/s/T_10_MOD/tair/; \ + /sn_tair/s/true/false/; /sn_tair/s/yearly/monthly/; /sn_tair/s/weights_core2_orca2_bilin//" namelist_cfg + sed -i "/sn_humi/s/q_10.15JUNE2009_fill/humi_ERAI_L25Z10_ORCA2_ana1d/; /sn_humi/s/ 6./24./; /sn_humi/s/Q_10_MOD/humi/; \ + /sn_humi/s/true/false/; /sn_humi/s/yearly/monthly/; /sn_humi/s/weights_core2_orca2_bilin//" namelist_cfg + fi # set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false. set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1 @@ -356,6 +378,7 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist namelist_cfg nn_itend ${ITEND} set_namelist namelist_cfg nn_stock $(( ${ITEND} / 2 )) set_namelist namelist_cfg ln_rstart .true. + set_namelist namelist_cfg ln_rstart_abl .true. set_namelist namelist_cfg nn_rstctl 2 set_namelist namelist_cfg jpni 4 set_namelist namelist_cfg jpnj 8 @@ -366,6 +389,20 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist namelist_cfg ln_cdgw .false. set_namelist namelist_cfg ln_sdw .true. set_namelist namelist_cfg ln_stcor .true. + if [ ${USING_ABL} == "yes" ]; then + set_namelist namelist_cfg nn_date0 20130101 + set_namelist namelist_cfg ln_blk .false. + set_namelist namelist_cfg ln_abl .true. + set_namelist namelist_cfg ln_tair_pot .true. + sed -i "/sn_wndi/s/u_10.15JUNE2009_fill/uwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndi/s/ 6./24./; /sn_wndi/s/U_10_MOD/uwnd/; \ + /sn_wndi/s/true/false/; /sn_wndi/s/yearly/monthly/; /sn_wndi/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_wndj/s/v_10.15JUNE2009_fill/vwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndj/s/ 6./24./; /sn_wndj/s/V_10_MOD/vwnd/; \ + /sn_wndj/s/true/false/; /sn_wndj/s/yearly/monthly/; /sn_wndj/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_tair/s/t_10.15JUNE2009_fill/tair_ERAI_L25Z10_ORCA2_ana1d/; /sn_tair/s/ 6./24./; /sn_tair/s/T_10_MOD/tair/; \ + /sn_tair/s/true/false/; /sn_tair/s/yearly/monthly/; /sn_tair/s/weights_core2_orca2_bilin//" namelist_cfg + sed -i "/sn_humi/s/q_10.15JUNE2009_fill/humi_ERAI_L25Z10_ORCA2_ana1d/; /sn_humi/s/ 6./24./; /sn_humi/s/Q_10_MOD/humi/; \ + /sn_humi/s/true/false/; /sn_humi/s/yearly/monthly/; /sn_humi/s/weights_core2_orca2_bilin//" namelist_cfg + fi # set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false. set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1 @@ -381,6 +418,7 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then set_namelist namelist_cfg cn_icbrst_in \"O2L3P_LONG_${ITRST}_restart_icb\" set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_${ITRST}_restart_trc\" set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_${ITRST}_restart_ice\" + set_namelist namelist_cfg cn_ablrst_in \"O2L3P_LONG_${ITRST}_restart_abl\" set_namelist namelist_top_cfg ln_trcbc .false. # put ln_ironsed, ln_hydrofe to false # if not you need input files, and for tests is not necessary @@ -396,6 +434,9 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_RESTART} == "1" ] ; then ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_${L_NPROC}.nc . ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_trc_${L_NPROC}.nc . ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_ice_${L_NPROC}.nc . + if [ ${USING_ABL} == "yes" ]; then + ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_abl_${L_NPROC}.nc . + fi if [ ${USING_ICEBERGS} == "yes" ] then ln -sf ../LONG/O2L3P_LONG_${ITRST}_restart_icb_${L_NPROC}.nc O2L3P_LONG_${ITRST}_restart_icb_${L_NPROC}.nc @@ -433,7 +474,20 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist namelist_cfg ln_cdgw .false. set_namelist namelist_cfg ln_sdw .true. set_namelist namelist_cfg ln_stcor .true. - + if [ ${USING_ABL} == "yes" ]; then + set_namelist namelist_cfg nn_date0 20130101 + set_namelist namelist_cfg ln_blk .false. + set_namelist namelist_cfg ln_abl .true. + set_namelist namelist_cfg ln_tair_pot .true. + sed -i "/sn_wndi/s/u_10.15JUNE2009_fill/uwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndi/s/ 6./24./; /sn_wndi/s/U_10_MOD/uwnd/; \ + /sn_wndi/s/true/false/; /sn_wndi/s/yearly/monthly/; /sn_wndi/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_wndj/s/v_10.15JUNE2009_fill/vwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndj/s/ 6./24./; /sn_wndj/s/V_10_MOD/vwnd/; \ + /sn_wndj/s/true/false/; /sn_wndj/s/yearly/monthly/; /sn_wndj/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_tair/s/t_10.15JUNE2009_fill/tair_ERAI_L25Z10_ORCA2_ana1d/; /sn_tair/s/ 6./24./; /sn_tair/s/T_10_MOD/tair/; \ + /sn_tair/s/true/false/; /sn_tair/s/yearly/monthly/; /sn_tair/s/weights_core2_orca2_bilin//" namelist_cfg + sed -i "/sn_humi/s/q_10.15JUNE2009_fill/humi_ERAI_L25Z10_ORCA2_ana1d/; /sn_humi/s/ 6./24./; /sn_humi/s/Q_10_MOD/humi/; \ + /sn_humi/s/true/false/; /sn_humi/s/yearly/monthly/; /sn_humi/s/weights_core2_orca2_bilin//" namelist_cfg + fi set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false. set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1 set_namelist_opt namelist_cfg nn_comm ${USING_COLLECTIVES} 2 1 @@ -478,6 +532,20 @@ if [ ${config} == "ORCA2_ICE_PISCES" ] && [ ${DO_REPRO} == "1" ] ; then set_namelist namelist_cfg ln_cdgw .false. set_namelist namelist_cfg ln_sdw .true. set_namelist namelist_cfg ln_stcor .true. + if [ ${USING_ABL} == "yes" ]; then + set_namelist namelist_cfg nn_date0 20130101 + set_namelist namelist_cfg ln_blk .false. + set_namelist namelist_cfg ln_abl .true. + set_namelist namelist_cfg ln_tair_pot .true. + sed -i "/sn_wndi/s/u_10.15JUNE2009_fill/uwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndi/s/ 6./24./; /sn_wndi/s/U_10_MOD/uwnd/; \ + /sn_wndi/s/true/false/; /sn_wndi/s/yearly/monthly/; /sn_wndi/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_wndj/s/v_10.15JUNE2009_fill/vwnd_ERAI_L25Z10_ORCA2_ana1d/; /sn_wndj/s/ 6./24./; /sn_wndj/s/V_10_MOD/vwnd/; \ + /sn_wndj/s/true/false/; /sn_wndj/s/yearly/monthly/; /sn_wndj/s/weights_core2_orca2_bicub//" namelist_cfg + sed -i "/sn_tair/s/t_10.15JUNE2009_fill/tair_ERAI_L25Z10_ORCA2_ana1d/; /sn_tair/s/ 6./24./; /sn_tair/s/T_10_MOD/tair/; \ + /sn_tair/s/true/false/; /sn_tair/s/yearly/monthly/; /sn_tair/s/weights_core2_orca2_bilin//" namelist_cfg + sed -i "/sn_humi/s/q_10.15JUNE2009_fill/humi_ERAI_L25Z10_ORCA2_ana1d/; /sn_humi/s/ 6./24./; /sn_humi/s/Q_10_MOD/humi/; \ + /sn_humi/s/true/false/; /sn_humi/s/yearly/monthly/; /sn_humi/s/weights_core2_orca2_bilin//" namelist_cfg + fi set_namelist_opt namelist_cfg ln_icebergs ${USING_ICEBERGS} .true. .false. set_namelist_opt namelist_cfg nn_hls ${USING_EXTRA_HALO} 2 1 @@ -509,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 @@ -523,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 -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 @@ -686,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 @@ -699,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 -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 @@ -820,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 @@ -834,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 -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 @@ -901,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 @@ -969,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 @@ -981,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" -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 @@ -1089,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 @@ -1107,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 -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 @@ -1372,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 @@ -1423,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 -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 @@ -1457,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 @@ -1471,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 -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 40073dca722168ab18dd7cf8fdc81ad7dad7b03c..db9c81dcf0fa7644a1564308910bca58eab44e84 100755 --- a/sette/sette_test-cases.sh +++ b/sette/sette_test-cases.sh @@ -111,6 +111,14 @@ fi 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 ) + 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 cd ${SETTE_DIR} @@ -135,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 @@ -149,7 +157,7 @@ if [ ${config} == "OVERFLOW" ] ; then # sync_config OVERFLOW ${SETTE_CONFIG} 'tests' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a OVERFLOW -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 @@ -207,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 @@ -251,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 @@ -266,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 -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 @@ -323,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 @@ -369,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 @@ -385,7 +393,7 @@ if [ ${config} == "VORTEX" ] ; then # sync_config VORTEX ${SETTE_CONFIG} 'tests' # - . ./makenemo -m ${CMP_NAM} -n ${SETTE_CONFIG} -a VORTEX -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 @@ -563,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 @@ -580,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 -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 @@ -762,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 @@ -778,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+ -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 @@ -842,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 @@ -907,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 @@ -922,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 -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/ABL/ablrst.F90 b/src/ABL/ablrst.F90 index 29445c5985be1e0fa186dc278f3aa465ca29da76..925234b3e73663d1aeeba26e750649f20f3ab062 100644 --- a/src/ABL/ablrst.F90 +++ b/src/ABL/ablrst.F90 @@ -200,15 +200,15 @@ CONTAINS & ' control of time parameter nrstdt' ) ! --- mandatory fields --- ! - CALL iom_get( numrar, jpdom_auto, 'u_abl', u_abl(:,:,:,nt_n ), cd_type = 'U', psgn = -1._wp ) - CALL iom_get( numrar, jpdom_auto, 'v_abl', v_abl(:,:,:,nt_n ), cd_type = 'V', psgn = -1._wp ) - CALL iom_get( numrar, jpdom_auto, 't_abl', tq_abl(:,:,:,nt_n,jp_ta) ) + CALL iom_get( numrar, jpdom_auto, 'u_abl', u_abl(:,:,:,nt_n ), cd_type = 'T', psgn = -1._wp ) + CALL iom_get( numrar, jpdom_auto, 'v_abl', v_abl(:,:,:,nt_n ), cd_type = 'T', psgn = -1._wp ) + CALL iom_get( numrar, jpdom_auto, 't_abl', tq_abl(:,:,:,nt_n,jp_ta), kfill = jpfillcopy ) CALL iom_get( numrar, jpdom_auto, 'q_abl', tq_abl(:,:,:,nt_n,jp_qa) ) CALL iom_get( numrar, jpdom_auto, 'tke_abl', tke_abl(:,:,:,nt_n ) ) - CALL iom_get( numrar, jpdom_auto, 'avm_abl', avm_abl(:,:,: ) ) + CALL iom_get( numrar, jpdom_auto, 'avm_abl', avm_abl(:,:,: ), kfill = jpfillcopy ) CALL iom_get( numrar, jpdom_auto, 'avt_abl', avt_abl(:,:,: ) ) - CALL iom_get( numrar, jpdom_auto,'mxld_abl',mxld_abl(:,:,: ) ) - CALL iom_get( numrar, jpdom_auto, 'pblh', pblh(:,: ) ) + CALL iom_get( numrar, jpdom_auto,'mxld_abl',mxld_abl(:,:,: ), kfill = jpfillcopy ) + CALL iom_get( numrar, jpdom_auto, 'pblh', pblh(:,: ), kfill = jpfillcopy ) IF(.NOT.lrxios) CALL iom_delay_rst( 'READ', 'ABL', numrar ) ! read only abl delayed global communication variables diff --git a/src/ABL/sbcabl.F90 b/src/ABL/sbcabl.F90 index cd771f978c5dc566915c866f214bbda24edda2d4..d0eac5483d1a9caeda3b34add824131d3b7d6b2e 100644 --- a/src/ABL/sbcabl.F90 +++ b/src/ABL/sbcabl.F90 @@ -272,6 +272,11 @@ CONTAINS nt_n = 1; nt_a = 2 ! initialize ABL from data or restart + u_abl (:,:,:,nt_a ) = 0._wp + v_abl (:,:,:,nt_a ) = 0._wp + tq_abl (:,:,:,nt_a,: ) = 0._wp + tke_abl(:,:,:,nt_a ) = 0._wp + IF( ln_rstart_abl ) THEN CALL abl_rst_read ELSE @@ -281,16 +286,10 @@ CONTAINS v_abl(:,:,:,nt_n ) = sf(jp_wndj)%fnow(:,:,:) tq_abl(:,:,:,nt_n,jp_ta) = sf(jp_tair)%fnow(:,:,:) tq_abl(:,:,:,nt_n,jp_qa) = sf(jp_humi)%fnow(:,:,:) - tke_abl(:,:,:,nt_n ) = tke_min avm_abl(:,:,: ) = avm_bak avt_abl(:,:,: ) = avt_bak pblh (:,: ) = ghw_abl( 3 ) !<-- assume that the pbl contains 3 grid points - u_abl (:,:,:,nt_a ) = 0._wp - v_abl (:,:,:,nt_a ) = 0._wp - tq_abl (:,:,:,nt_a,: ) = 0._wp - tke_abl(:,:,:,nt_a ) = 0._wp - mxlm_abl(:,:,: ) = mxl_min mxld_abl(:,:,: ) = mxl_min ENDIF diff --git a/src/ICE/icedyn_rhg_eap.F90 b/src/ICE/icedyn_rhg_eap.F90 index 59fb26ffddd9c8551fe710b7d88b1e59eed2f091..55b1392ac6a5e8ffeda9e8c44c516e5b2c009630 100644 --- a/src/ICE/icedyn_rhg_eap.F90 +++ b/src/ICE/icedyn_rhg_eap.F90 @@ -370,8 +370,6 @@ CONTAINS ! ! ==================== ! DO jter = 1 , nn_nevp ! loop over jter ! ! ! ==================== ! - l_full_nf_update = jter == nn_nevp ! false: disable full North fold update (performances) for iter = 1 to nn_nevp-1 - ! ! convergence test IF( nn_rhg_chkcvg == 1 .OR. nn_rhg_chkcvg == 2 ) THEN DO_2D( 0, 0, 0, 0 ) diff --git a/src/ICE/icedyn_rhg_evp.F90 b/src/ICE/icedyn_rhg_evp.F90 index 9e367e52a3888875f5d3df2171d46c000362f822..49e7753c2ae939a3c6a5a6a9a5ea74665ecdb7bf 100644 --- a/src/ICE/icedyn_rhg_evp.F90 +++ b/src/ICE/icedyn_rhg_evp.F90 @@ -356,8 +356,6 @@ CONTAINS ! ! ==================== ! DO jter = 1 , nn_nevp ! loop over jter ! ! ! ==================== ! - l_full_nf_update = jter == nn_nevp ! false: disable full North fold update (performances) for iter = 1 to nn_nevp-1 - ! ! convergence test IF( nn_rhg_chkcvg == 1 .OR. nn_rhg_chkcvg == 2 ) THEN DO_2D( 0, 0, 0, 0 ) diff --git a/src/ICE/icedyn_rhg_vp.F90 b/src/ICE/icedyn_rhg_vp.F90 index 300336ccb889921aa7898f852a37201fce2cf34b..b2c344993dbf9b471bc971d48c4bcf9301560228 100644 --- a/src/ICE/icedyn_rhg_vp.F90 +++ b/src/ICE/icedyn_rhg_vp.F90 @@ -733,7 +733,6 @@ CONTAINS !--- mitgcm computes initial value of residual here... i_inn_tot = i_inn_tot + 1 - ! l_full_nf_update = i_inn_tot == nn_nvp ! false: disable full North fold update (performances) for iter = 1 to nn_nevp-1 zu_b(:,:) = u_ice(:,:) ! velocity at previous inner-iterate zv_b(:,:) = v_ice(:,:) diff --git a/src/NST/agrif_ice_interp.F90 b/src/NST/agrif_ice_interp.F90 index e51c386844126ab8bf05acf41d9028d62d503124..5952bc8425cf105c426cd4fb403cfe0cf5802374 100644 --- a/src/NST/agrif_ice_interp.F90 +++ b/src/NST/agrif_ice_interp.F90 @@ -26,13 +26,17 @@ MODULE agrif_ice_interp USE phycst , ONLY: rt0 USE icevar USE sbc_ice, ONLY : tn_ice - USE lbclnk + USE lbclnk + USE iceistate, ONLY : rsshadj + USE traqsr, ONLY : ln_traqsr + USE lib_mpp IMPLICIT NONE PRIVATE - PUBLIC agrif_interp_ice ! called by agrif_user.F90 - PUBLIC agrif_istate_ice ! called by icerst.F90 + PUBLIC agrif_interp_ice ! called by agrif_user.F90 + PUBLIC agrif_istate_ice ! called by icerst.F90 + PUBLIC agrif_istate_icevol ! called by restart.F90 !!---------------------------------------------------------------------- !! NEMO/NST 4.0 , NEMO Consortium (2018) @@ -57,6 +61,7 @@ CONTAINS ! Set a_i, v_i, v_s, sv_i, oa_i, a_ip, v_ip, t_su, e_s, e_i: Agrif_SpecialValue = -9999. Agrif_UseSpecialValue = .TRUE. + CALL Agrif_Set_MaskMaxSearch(10) CALL Agrif_init_variable(tra_iceini_id,procname=interp_tra_ice) ! CALL lbc_lnk( 'agrif_istate_ice', a_i,'T',1._wp, v_i,'T',1._wp, & @@ -76,6 +81,7 @@ CONTAINS CALL Agrif_init_variable(v_iceini_id ,procname=interp_v_ice) use_sign_north = .FALSE. Agrif_UseSpecialValue = .FALSE. + CALL Agrif_Set_MaskMaxSearch(3) ! CALL lbc_lnk( 'agrif_istate_ice', u_ice, 'U', -1._wp, v_ice, 'V', -1._wp ) ! @@ -83,6 +89,60 @@ CONTAINS ! END SUBROUTINE agrif_istate_ice + + SUBROUTINE agrif_istate_icevol( Kbb, Kmm, Kaa ) + !!----------------------------------------------------------------------- + !! *** ROUTINE agrif_istate_icevol *** + !! + !! ** Method : Set initial ssh over child grids from the ice volume + !! computed over the parent grid. + !! This routine is call only if nn_ice/=2 (no ice), over + !! the child grid, hence it needs to know nn_ice + !! + !!----------------------------------------------------------------------- + INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices + ! + INTEGER :: ios + !! + NAMELIST/namsbc/ nn_fsbc , & + & ln_usr , ln_flx , ln_blk , ln_abl, & + & ln_cpl , ln_mixcpl, nn_components, & + & nn_ice , ln_ice_embd, & + & ln_traqsr, ln_dm2dc , & + & ln_rnf , nn_fwb , ln_ssr , ln_apr_dyn, & + & ln_wave , nn_lsm + !!---------------------------------------------------------------------- + ! + IF ( Agrif_Root() ) RETURN + ! + ! !** read Surface Module namelist + ! (we only need nn_ice actually which is unknown at the + ! time this subroutine is called) + READ ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901) +901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in reference namelist' ) + READ ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 ) +902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) + ! + IF ( (nn_ice/=2).AND.((Agrif_Parent(nn_ice)==2).AND. & + & (.NOT.(Agrif_Parent(ln_rstart) & + & .OR.(Agrif_Parent(nn_iceini_file)==2))).AND. & + & (.NOT.Agrif_Parent(ln_ice_embd)) & + & )) THEN + + IF(lwp) WRITE(numout,*) ' ' + IF(lwp) WRITE(numout,*) 'Agrif_istate_icevol : Add an ssh increment coming from the parent grid sea-ice volume' + IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~' + IF(lwp) WRITE(numout,*) ' ' + + WHERE( ssmask(:,:) == 1._wp ) + ssh(:,:,Kmm) = ssh(:,:,Kmm) - Agrif_Parent(rsshadj) + ssh(:,:,Kbb) = ssh(:,:,Kbb) - Agrif_Parent(rsshadj) + ENDWHERE + ENDIF + ! + END SUBROUTINE agrif_istate_icevol + + SUBROUTINE agrif_interp_ice( cd_type, kiter, kitermax ) !!----------------------------------------------------------------------- !! *** ROUTINE agrif_interp_ice *** diff --git a/src/NST/agrif_oce_interp.F90 b/src/NST/agrif_oce_interp.F90 index 6649f60b403db34975ffa60884974cbf69b2b8ca..d98bbe1d50045fa66db342b76ea0e4258cc51f5a 100644 --- a/src/NST/agrif_oce_interp.F90 +++ b/src/NST/agrif_oce_interp.F90 @@ -87,6 +87,7 @@ CONTAINS Agrif_SpecialValue = 0.0_wp Agrif_UseSpecialValue = .TRUE. l_vremap = ln_vert_remap + CALL Agrif_Set_MaskMaxSearch(10) ts(:,:,:,:,Kbb) = 0.0_wp uu(:,:,:,Kbb) = 0.0_wp @@ -106,6 +107,7 @@ CONTAINS Agrif_UseSpecialValue = .FALSE. l_ini_child = .FALSE. l_vremap = .FALSE. + CALL Agrif_Set_MaskMaxSearch(3) Krhs_a = Kaa ; Kmm_a = Kmm diff --git a/src/OCE/DOM/domain.F90 b/src/OCE/DOM/domain.F90 index 5288311db4074a8562c078b2621038823e97efd2..dbbe4a9031aa13452c7ef3a83f7ad708b72407d1 100644 --- a/src/OCE/DOM/domain.F90 +++ b/src/OCE/DOM/domain.F90 @@ -36,6 +36,9 @@ MODULE domain #endif #if defined key_agrif USE agrif_oce_interp, ONLY : Agrif_istate_ssh ! ssh interpolated from parent +#if defined key_si3 + USE agrif_ice_interp, ONLY : agrif_istate_icevol ! ssh increment from ice +#endif #endif USE sbc_oce ! surface boundary condition: ocean USE trc_oce ! shared ocean & passive tracers variab @@ -176,6 +179,11 @@ CONTAINS ELSEIF( .NOT.Agrif_root() .AND. & & ln_init_chfrpar ) THEN !* Interpolate initial ssh from parent CALL Agrif_istate_ssh( Kbb, Kmm, Kaa ) +#if defined key_si3 + ! Possibly add ssh increment from parent grid + ! only if there is no ice model in the child grid + CALL Agrif_istate_icevol( Kbb, Kmm, Kaa ) +#endif #endif ELSE !* Read in restart file or set by user CALL rst_read_ssh( Kbb, Kmm, Kaa ) diff --git a/src/OCE/DYN/dynspg_ts.F90 b/src/OCE/DYN/dynspg_ts.F90 index 16c2fcc1fa8e3244dc5b5c4a5741340ce0acf0fc..bd40bf5409e9d9b034118816df9ad6f59fc5cf35 100644 --- a/src/OCE/DYN/dynspg_ts.F90 +++ b/src/OCE/DYN/dynspg_ts.F90 @@ -459,8 +459,6 @@ CONTAINS DO jn = 1, icycle ! sub-time-step loop ! ! ! ==================== ! ! - l_full_nf_update = jn == icycle ! false: disable full North fold update (performances) for jn = 1 to icycle-1 - ! ! !== Update the forcing ==! (BDY and tides) ! IF( ln_bdy .AND. ln_tide ) CALL bdy_dta_tides( kt, kit=jn, pt_offset= REAL(noffset+1,wp) ) @@ -1249,16 +1247,16 @@ CONTAINS SELECT CASE( nn_e3f_typ ) !* ff_f/e3 at F-point CASE ( 0 ) ! original formulation (masked averaging of e3t divided by 4) DO_2D( 0, 0, 0, 0 ) - zwz(ji,jj) = ( ht(ji,jj+1) + ht(ji+1,jj+1) & - & + ht(ji,jj ) + ht(ji+1,jj ) ) * 0.25_wp + zwz(ji,jj) = ( ( ht(ji,jj+1) + ht(ji+1,jj+1) ) & ! need additional () for reproducibility around NP + & + ( ht(ji,jj ) + ht(ji+1,jj ) ) ) * 0.25_wp IF( zwz(ji,jj) /= 0._wp ) zwz(ji,jj) = ff_f(ji,jj) / zwz(ji,jj) END_2D CASE ( 1 ) ! new formulation (masked averaging of e3t divided by the sum of mask) DO_2D( 0, 0, 0, 0 ) - zwz(ji,jj) = ( ht(ji,jj+1) + ht(ji+1,jj+1) & - & + ht(ji,jj ) + ht(ji+1,jj ) ) & - & / ( MAX(ssmask(ji,jj+1) + ssmask(ji+1,jj+1) & - & + ssmask(ji,jj ) + ssmask(ji+1,jj ) , 1._wp ) ) + zwz(ji,jj) = ( ( ht(ji,jj+1) + ht(ji+1,jj+1) ) & ! need additional () for + & + ( ht(ji,jj ) + ht(ji+1,jj ) ) ) & ! reproducibility around NP + & / ( MAX( ssmask(ji,jj+1) + ssmask(ji+1,jj+1) & + & + ssmask(ji,jj ) + ssmask(ji+1,jj ), 1._wp ) ) IF( zwz(ji,jj) /= 0._wp ) zwz(ji,jj) = ff_f(ji,jj) / zwz(ji,jj) END_2D END SELECT @@ -1329,24 +1327,24 @@ CONTAINS ! CASE( np_ENS ) ! enstrophy conserving scheme (f-point) DO_2D( 0, 0, 0, 0 ) - zy1 = r1_8 * ( zhV(ji ,jj-1) + zhV(ji+1,jj-1) & - & + zhV(ji ,jj ) + zhV(ji+1,jj ) ) * r1_e1u(ji,jj) - zx1 = - r1_8 * ( zhU(ji-1,jj ) + zhU(ji-1,jj+1) & - & + zhU(ji ,jj ) + zhU(ji ,jj+1) ) * r1_e2v(ji,jj) + zy1 = r1_8 * ( ( zhV(ji ,jj-1) + zhV(ji+1,jj-1) ) & ! need additional () for + & + ( zhV(ji ,jj ) + zhV(ji+1,jj ) ) ) * r1_e1u(ji,jj) ! reproducibility around NP + zx1 = - r1_8 * ( ( zhU(ji-1,jj ) + zhU(ji-1,jj+1) ) & ! need additional () for + & + ( zhU(ji ,jj ) + zhU(ji ,jj+1) ) ) * r1_e2v(ji,jj) ! reproducibility around NP zu_trd(ji,jj) = zy1 * ( zwz(ji ,jj-1) + zwz(ji,jj) ) zv_trd(ji,jj) = zx1 * ( zwz(ji-1,jj ) + zwz(ji,jj) ) END_2D ! CASE( np_EET , np_EEN ) ! energy & enstrophy scheme (using e3t or e3f) DO_2D( 0, 0, 0, 0 ) - zu_trd(ji,jj) = + r1_12 * r1_e1u(ji,jj) * ( ftne(ji,jj ) * zhV(ji ,jj ) & - & + ftnw(ji+1,jj) * zhV(ji+1,jj ) & - & + ftse(ji,jj ) * zhV(ji ,jj-1) & - & + ftsw(ji+1,jj) * zhV(ji+1,jj-1) ) - zv_trd(ji,jj) = - r1_12 * r1_e2v(ji,jj) * ( ftsw(ji,jj+1) * zhU(ji-1,jj+1) & - & + ftse(ji,jj+1) * zhU(ji ,jj+1) & - & + ftnw(ji,jj ) * zhU(ji-1,jj ) & - & + ftne(ji,jj ) * zhU(ji ,jj ) ) + zu_trd(ji,jj) = + r1_12 * r1_e1u(ji,jj) * ( ( ftne(ji,jj ) * zhV(ji ,jj ) & ! need additional () for + & + ftnw(ji+1,jj) * zhV(ji+1,jj ) ) & ! reproducibility around NP + & + ( ftse(ji,jj ) * zhV(ji ,jj-1) & + & + ftsw(ji+1,jj) * zhV(ji+1,jj-1) ) ) + zv_trd(ji,jj) = - r1_12 * r1_e2v(ji,jj) * ( ( ftsw(ji,jj+1) * zhU(ji-1,jj+1) & + & + ftse(ji,jj+1) * zhU(ji ,jj+1) ) & + & + ( ftnw(ji,jj ) * zhU(ji-1,jj ) & + & + ftne(ji,jj ) * zhU(ji ,jj ) ) ) END_2D ! END SELECT diff --git a/src/OCE/DYN/dynvor.F90 b/src/OCE/DYN/dynvor.F90 index b90b4bc3e1aafee548fefd5bc7bb046e33825d53..0f43b4bd275ceeeb91202bb4c162a9c104604bed 100644 --- a/src/OCE/DYN/dynvor.F90 +++ b/src/OCE/DYN/dynvor.F90 @@ -361,8 +361,8 @@ CONTAINS CASE ( np_RVO , np_CRV ) !* relative vorticity at f-point is used ALLOCATE( zwz(A2D(1)) ) DO_2D( 1, 1, 1, 1 ) - zwz(ji,jj) = ( e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj) + zwz(ji,jj) = ( ( e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for + & - ( e1u(ji,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj) ! NP repro END_2D IF( ln_dynvor_msk ) THEN ! mask relative vorticity DO_2D( 1, 1, 1, 1 ) @@ -380,8 +380,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( 0, 1, 0, 1 ) - zwt(ji,jj) = r1_4 * ( zwz(ji-1,jj ) + zwz(ji,jj ) & - & + zwz(ji-1,jj-1) + zwz(ji,jj-1) ) & + zwt(ji,jj) = r1_4 * ( ( zwz(ji-1,jj ) + zwz(ji,jj ) ) & ! need additional () for + & + ( zwz(ji-1,jj-1) + zwz(ji,jj-1) ) ) & ! reproducibility around NP & * e1e2t(ji,jj)*e3t(ji,jj,jk,Kmm) END_2D CASE ( np_MET ) !* metric term @@ -392,8 +392,8 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( 0, 1, 0, 1 ) - zwt(ji,jj) = ( ff_t(ji,jj) + r1_4 * ( zwz(ji-1,jj ) + zwz(ji,jj ) & - & + zwz(ji-1,jj-1) + zwz(ji,jj-1) ) ) & + zwt(ji,jj) = ( ff_t(ji,jj) + r1_4 * ( ( zwz(ji-1,jj ) + zwz(ji,jj ) ) & ! need additional () for + & + ( zwz(ji-1,jj-1) + zwz(ji,jj-1) ) ) ) & ! reproducibility around NP & * e1e2t(ji,jj)*e3t(ji,jj,jk,Kmm) END_2D CASE ( np_CME ) !* Coriolis + metric @@ -473,8 +473,8 @@ CONTAINS ALLOCATE( zwz(A2D(1),jpk) ) DO jk = 1, jpkm1 ! Horizontal slab DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) - zwz(ji,jj,jk) = ( e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj) + zwz(ji,jj,jk) = ( ( e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! need additional () for NP repro + & - ( e1u(ji,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask relative vorticity DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) @@ -498,8 +498,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( 0, 1, 0, 1 ) - zwt(ji,jj) = r1_4 * ( zwz(ji-1,jj ,jk) + zwz(ji,jj ,jk) & - & + zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) ) & + zwt(ji,jj) = r1_4 * ( ( zwz(ji-1,jj ,jk) + zwz(ji,jj ,jk) ) & ! need additional () for + & + ( zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) ) ) & ! reproducibility around NP & * e1e2t(ji,jj)*e3t(ji,jj,jk,Kmm) END_2D CASE ( np_MET ) !* metric term @@ -510,8 +510,8 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( 0, 1, 0, 1 ) - zwt(ji,jj) = ( ff_t(ji,jj) + r1_4 * ( zwz(ji-1,jj ,jk) + zwz(ji,jj ,jk) & - & + zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) ) ) & + zwt(ji,jj) = ( ff_t(ji,jj) + r1_4 * ( ( zwz(ji-1,jj ,jk) + zwz(ji,jj ,jk) ) & ! need additional () for + & + ( zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) ) ) ) & ! reproducibility around NP & * e1e2t(ji,jj)*e3t(ji,jj,jk,Kmm) END_2D CASE ( np_CME ) !* Coriolis + metric @@ -596,8 +596,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( 1, 0, 1, 0 ) - zwz(ji,jj) = ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji ,jj+1) * pu(ji ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj) + zwz(ji,jj) = ( ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for + & - ( e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj) ! NP repro END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity DO_2D( 1, 0, 1, 0 ) @@ -611,8 +611,8 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( 1, 0, 1, 0 ) - zwz(ji,jj) = ff_f(ji,jj) + ( e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj) + zwz(ji,jj) = ff_f(ji,jj) + ( ( e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for NP repro + & - ( e1u(ji,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity (NOT the Coriolis term) DO_2D( 1, 0, 1, 0 ) @@ -636,22 +636,22 @@ CONTAINS SELECT CASE( nn_e3f_typ ) !== potential vorticity ==! CASE ( 0 ) ! original formulation (masked averaging of e3t divided by 4) DO_2D( 1, 0, 1, 0 ) - ze3f = ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) & - & + e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) IF( ze3f /= 0._wp ) THEN ; zwz(ji,jj) = zwz(ji,jj) * 4._wp / ze3f ELSE ; zwz(ji,jj) = 0._wp ENDIF END_2D CASE ( 1 ) ! new formulation (masked averaging of e3t divided by the sum of mask) DO_2D( 1, 0, 1, 0 ) - ze3f = ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) & - & + e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) - zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & - & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) + zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & + & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) IF( ze3f /= 0._wp ) THEN ; zwz(ji,jj) = zwz(ji,jj) * zmsk / ze3f ELSE ; zwz(ji,jj) = 0._wp ENDIF @@ -728,8 +728,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( 1, 0, 1, 0 ) - zwz(ji,jj) = ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji ,jj+1) * pu(ji ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj) + zwz(ji,jj) = ( ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for NP repro + & - ( e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity DO_2D( 1, 0, 1, 0 ) @@ -743,8 +743,8 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( 1, 0, 1, 0 ) - zwz(ji,jj) = ff_f(ji,jj) + ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji ,jj+1) * pu(ji ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj) + zwz(ji,jj) = ff_f(ji,jj) + ( ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) &! add () for NP repro + & -( e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity (NOT the Coriolis term) DO_2D( 1, 0, 1, 0 ) @@ -769,22 +769,22 @@ CONTAINS SELECT CASE( nn_e3f_typ ) !== potential vorticity ==! CASE ( 0 ) ! original formulation (masked averaging of e3t divided by 4) DO_2D( 1, 0, 1, 0 ) - ze3f = ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) & - & + e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) IF( ze3f /= 0._wp ) THEN ; zwz(ji,jj) = zwz(ji,jj) * 4._wp / ze3f ELSE ; zwz(ji,jj) = 0._wp ENDIF END_2D CASE ( 1 ) ! new formulation (masked averaging of e3t divided by the sum of mask) DO_2D( 1, 0, 1, 0 ) - ze3f = ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) & - & + e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) - zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & - & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) + zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & + & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) IF( ze3f /= 0._wp ) THEN ; zwz(ji,jj) = zwz(ji,jj) * zmsk / ze3f ELSE ; zwz(ji,jj) = 0._wp ENDIF @@ -799,10 +799,10 @@ CONTAINS ! ! !== compute and add the vorticity term trend =! DO_2D( 0, 0, 0, 0 ) - zuav = r1_8 * r1_e1u(ji,jj) * ( zwy(ji ,jj-1) + zwy(ji+1,jj-1) & - & + zwy(ji ,jj ) + zwy(ji+1,jj ) ) - zvau =-r1_8 * r1_e2v(ji,jj) * ( zwx(ji-1,jj ) + zwx(ji-1,jj+1) & - & + zwx(ji ,jj ) + zwx(ji ,jj+1) ) + zuav = r1_8 * r1_e1u(ji,jj) * ( ( zwy(ji ,jj-1) + zwy(ji+1,jj-1) ) & ! need additional () for + & + ( zwy(ji ,jj ) + zwy(ji+1,jj ) ) ) ! reproducibility around NP + zvau =-r1_8 * r1_e2v(ji,jj) * ( ( zwx(ji-1,jj ) + zwx(ji-1,jj+1) ) & + & + ( zwx(ji ,jj ) + zwx(ji ,jj+1) ) ) pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zuav * ( zwz(ji ,jj-1) + zwz(ji,jj) ) pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) + zvau * ( zwz(ji-1,jj ) + zwz(ji,jj) ) END_2D @@ -871,26 +871,22 @@ CONTAINS SELECT CASE( nn_e3f_typ ) ! == reciprocal of e3 at F-point CASE ( 0 ) ! original formulation (masked averaging of e3t divided by 4) DO_2D( 1, 1, 1, 1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - ze3f = ( (e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)) & - & + (e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk)) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) IF( ze3f /= 0._wp ) THEN ; z1_e3f(ji,jj) = 4._wp / ze3f ELSE ; z1_e3f(ji,jj) = 0._wp ENDIF END_2D CASE ( 1 ) ! new formulation (masked averaging of e3t divided by the sum of mask) DO_2D( 1, 1, 1, 1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - ze3f = ( (e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)) & - & + (e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk)) ) - zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & - & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) + zmsk = (tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & + & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) IF( ze3f /= 0._wp ) THEN ; z1_e3f(ji,jj) = zmsk / ze3f ELSE ; z1_e3f(ji,jj) = 0._wp ENDIF @@ -906,8 +902,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( 1, 1, 1, 1 ) - zwz(ji,jj) = ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji ,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj)*z1_e3f(ji,jj) + zwz(ji,jj) = ( ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for NP repro + & - ( e1u(ji ,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj)*z1_e3f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity DO_2D( 1, 1, 1, 1 ) @@ -921,12 +917,8 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( 1, 1, 1, 1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - zwz(ji,jj) = ( ff_f(ji,jj) + ( ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & ) & ! bracket for halo 1 - halo 2 compatibility - & - ( e1u(ji ,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) & - & ) & ! bracket for halo 1 - halo 2 compatibility + zwz(ji,jj) = ( ff_f(ji,jj) + ( ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for + & - ( e1u(ji ,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) & ! NP repro & ) * r1_e1e2f(ji,jj) ) * z1_e3f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity @@ -985,11 +977,11 @@ CONTAINS ztsw(ji,jj) = zwz(ji ,jj-1) + zwz(ji-1,jj-1) + zwz(ji-1,jj ) END_2D ! - DO_2D( 0, 0, 0, 0 ) - zua = + r1_12 * r1_e1u(ji,jj) * ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) & - & + ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) - zva = - r1_12 * r1_e2v(ji,jj) * ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) & - & + ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) + DO_2D( 0, 0, 0, 0 ) ! add () for NP repro + zua = + r1_12 * r1_e1u(ji,jj) * ( ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) ) & ! add () for + & + ( ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) ) ! NP repro + zva = - r1_12 * r1_e2v(ji,jj) * ( ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) ) & + & + ( ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) ) pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zua pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) + zva END_2D @@ -1054,26 +1046,22 @@ CONTAINS SELECT CASE( nn_e3f_typ ) ! == reciprocal of e3 at F-point CASE ( 0 ) ! original formulation (masked averaging of e3t divided by 4) DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - ze3f = ( (e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)) & - & + (e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk)) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) IF( ze3f /= 0._wp ) THEN ; z1_e3f(ji,jj) = 4._wp / ze3f ELSE ; z1_e3f(ji,jj) = 0._wp ENDIF END_2D CASE ( 1 ) ! new formulation (masked averaging of e3t divided by the sum of mask) DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - ze3f = ( (e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & - & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)) & - & + (e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & - & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk)) ) - zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & - & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) + ze3f = ( ( e3t(ji ,jj+1,jk,Kmm)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t(ji ,jj ,jk,Kmm)*tmask(ji ,jj ,jk) & + & + e3t(ji+1,jj ,jk,Kmm)*tmask(ji+1,jj ,jk) ) ) + zmsk = ( tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk) & + & + tmask(ji,jj ,jk) + tmask(ji+1,jj ,jk) ) IF( ze3f /= 0._wp ) THEN ; z1_e3f(ji,jj) = zmsk / ze3f ELSE ; z1_e3f(ji,jj) = 0._wp ENDIF @@ -1089,8 +1077,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) - zwz(ji,jj,jk) = ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & - e1u(ji ,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk) ) * r1_e1e2f(ji,jj)*z1_e3f(ji,jj) + zwz(ji,jj,jk) = ( ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for NP repro + & - ( e1u(ji ,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) * r1_e1e2f(ji,jj)*z1_e3f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) @@ -1104,12 +1092,8 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - zwz(ji,jj,jk) = ( ff_f(ji,jj) + ( ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) & - & ) & ! bracket for halo 1 - halo 2 compatibility - & - ( e1u(ji ,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) & - & ) & ! bracket for halo 1 - halo 2 compatibility + zwz(ji,jj,jk) = ( ff_f(ji,jj) + ( ( e2v(ji+1,jj ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for + & - ( e1u(ji ,jj+1) * pu(ji,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) & ! NP repro & ) * r1_e1e2f(ji,jj) ) * z1_e3f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity @@ -1151,10 +1135,10 @@ CONTAINS END_2D ! DO_2D( 0, 0, 0, 0 ) - zua = + r1_12 * r1_e1u(ji,jj) * ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) & - & + ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) - zva = - r1_12 * r1_e2v(ji,jj) * ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) & - & + ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) + zua = + r1_12 * r1_e1u(ji,jj) * ( ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) ) & ! add () for + & + ( ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) ) ! NP repro + zva = - r1_12 * r1_e2v(ji,jj) * ( ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) ) & + & + ( ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) ) pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zua pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) + zva END_2D @@ -1217,10 +1201,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( 1, 1, 1, 1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - zwz(ji,jj) = ( (e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk)) & - & - (e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk)) ) & + zwz(ji,jj) = ( ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for + & - ( e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) & ! NP reproducibility & * r1_e1e2f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity @@ -1235,10 +1217,8 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( 1, 1, 1, 1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - zwz(ji,jj) = ( ff_f(ji,jj) + ( (e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk)) & - & - (e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk)) ) & + zwz(ji,jj) = ( ff_f(ji,jj) + ( ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! add () for + & - ( e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) & ! NP repro & * r1_e1e2f(ji,jj) ) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity @@ -1272,10 +1252,10 @@ CONTAINS END_2D ! DO_2D( 0, 0, 0, 0 ) - zua = + r1_12 * r1_e1u(ji,jj) * ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) & - & + ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) - zva = - r1_12 * r1_e2v(ji,jj) * ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) & - & + ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) + zua = + r1_12 * r1_e1u(ji,jj) * ( ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) ) & ! add () for + & + ( ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) ) ! NP repro + zva = - r1_12 * r1_e2v(ji,jj) * ( ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) ) & + & + ( ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) ) pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zua pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) + zva END_2D @@ -1337,10 +1317,8 @@ CONTAINS END_2D CASE ( np_RVO ) !* relative vorticity DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - zwz(ji,jj,jk) = ( (e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk)) & - & - (e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk)) ) & + zwz(ji,jj,jk) = ( ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) & ! need additional () + & - ( e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) & ! for NP reproducibility & * r1_e1e2f(ji,jj) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity @@ -1355,11 +1333,9 @@ CONTAINS END_2D CASE ( np_CRV ) !* Coriolis + relative vorticity DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) - ! round brackets added to fix the order of floating point operations - ! needed to ensure halo 1 - halo 2 compatibility - zwz(ji,jj,jk) = ( ff_f(ji,jj) + ( (e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk)) & - & - (e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk)) ) & - & * r1_e1e2f(ji,jj) ) + zwz(ji,jj,jk) = ( ff_f(ji,jj) + ( ( e2v(ji+1,jj ) * pv(ji+1,jj ,jk) - e2v(ji,jj) * pv(ji,jj,jk) ) &! add () for + & - ( e1u(ji ,jj+1) * pu(ji ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk) ) ) &! NP repro + & * r1_e1e2f(ji,jj) ) END_2D IF( ln_dynvor_msk ) THEN ! mask the relative vorticity DO_2D( nn_hls-1, nn_hls-1, nn_hls-1, nn_hls-1 ) @@ -1401,10 +1377,10 @@ CONTAINS END_2D ! DO_2D( 0, 0, 0, 0 ) - zua = + r1_12 * r1_e1u(ji,jj) * ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) & - & + ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) - zva = - r1_12 * r1_e2v(ji,jj) * ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) & - & + ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) + zua = + r1_12 * r1_e1u(ji,jj) * ( ( ztne(ji,jj ) * zwy(ji ,jj ) + ztnw(ji+1,jj) * zwy(ji+1,jj ) ) & ! add () for + & + ( ztse(ji,jj ) * zwy(ji ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) ) ) ! NP repro + zva = - r1_12 * r1_e2v(ji,jj) * ( ( ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji ,jj+1) ) & + & + ( ztnw(ji,jj ) * zwx(ji-1,jj ) + ztne(ji,jj ) * zwx(ji ,jj ) ) ) pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zua pv_rhs(ji,jj,jk) = pv_rhs(ji,jj,jk) + zva END_2D @@ -1523,10 +1499,10 @@ CONTAINS SELECT CASE( nn_e3f_typ ) CASE ( 0 ) ! original formulation (masked averaging of e3t divided by 4) DO_3D( 0, 0, 0, 0, 1, jpk ) - e3f_0vor(ji,jj,jk) = ( e3t_0(ji ,jj+1,jk)*tmask(ji ,jj+1,jk) & - & + e3t_0(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk) & - & + e3t_0(ji ,jj ,jk)*tmask(ji ,jj ,jk) & - & + e3t_0(ji+1,jj ,jk)*tmask(ji+1,jj ,jk) ) * 0.25_wp + e3f_0vor(ji,jj,jk) = ( ( e3t_0(ji ,jj+1,jk)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t_0(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t_0(ji ,jj ,jk)*tmask(ji ,jj ,jk) & + & + e3t_0(ji+1,jj ,jk)*tmask(ji+1,jj ,jk) ) ) * 0.25_wp END_3D CASE ( 1 ) ! new formulation (masked averaging of e3t divided by the sum of mask) DO_3D( 0, 0, 0, 0, 1, jpk ) @@ -1534,10 +1510,10 @@ CONTAINS & + tmask(ji,jj ,jk) +tmask(ji+1,jj ,jk) ) ! IF( zmsk /= 0._wp ) THEN - e3f_0vor(ji,jj,jk) = ( e3t_0(ji ,jj+1,jk)*tmask(ji ,jj+1,jk) & - & + e3t_0(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk) & - & + e3t_0(ji ,jj ,jk)*tmask(ji ,jj ,jk) & - & + e3t_0(ji+1,jj ,jk)*tmask(ji+1,jj ,jk) ) / zmsk + e3f_0vor(ji,jj,jk) = ( ( e3t_0(ji ,jj+1,jk)*tmask(ji ,jj+1,jk) & ! need additional () for + & + e3t_0(ji+1,jj+1,jk)*tmask(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + ( e3t_0(ji ,jj ,jk)*tmask(ji ,jj ,jk) & + & + e3t_0(ji+1,jj ,jk)*tmask(ji+1,jj ,jk) ) ) / zmsk ELSE ; e3f_0vor(ji,jj,jk) = 0._wp ENDIF END_3D diff --git a/src/OCE/IOM/iom.F90 b/src/OCE/IOM/iom.F90 index 49433e40e524b91b51945c9ccf365502c1e1a0d9..9739f31418fab8ba9a4c9a2bcb313d7c65a9770c 100644 --- a/src/OCE/IOM/iom.F90 +++ b/src/OCE/IOM/iom.F90 @@ -1372,9 +1372,9 @@ CONTAINS zsgn = 1._wp IF( PRESENT(psgn ) ) zsgn = psgn IF( PRESENT(pv_r2d) ) THEN - CALL lbc_lnk( 'iom', pv_r2d, cl_type, zsgn, kfillmode = kfill ) + CALL lbc_lnk( 'iom', pv_r2d, cl_type, zsgn, kfillmode = kfill, ldfull = .TRUE. ) ELSEIF( PRESENT(pv_r3d) ) THEN - CALL lbc_lnk( 'iom', pv_r3d, cl_type, zsgn, kfillmode = kfill ) + CALL lbc_lnk( 'iom', pv_r3d, cl_type, zsgn, kfillmode = kfill, ldfull = .TRUE. ) ENDIF ENDIF ! @@ -1401,13 +1401,13 @@ CONTAINS IF(lwp) WRITE(numout,*) 'XIOS RST READ (3D): ',TRIM(cdvar) CALL xios_recv_field( trim(cdvar), pv_r3d(:, :, :)) IF(idom /= jpdom_unknown .AND. cl_type /= 'Z' ) THEN - CALL lbc_lnk( 'iom', pv_r3d, cl_type, zsgn, kfillmode = kfill) + CALL lbc_lnk( 'iom', pv_r3d, cl_type, zsgn, kfillmode = kfill, ldfull = .TRUE. ) ENDIF ELSEIF( PRESENT(pv_r2d) ) THEN IF(lwp) WRITE(numout,*) 'XIOS RST READ (2D): ', TRIM(cdvar) CALL xios_recv_field( trim(cdvar), pv_r2d(:, :)) IF(idom /= jpdom_unknown .AND. cl_type /= 'Z' ) THEN - CALL lbc_lnk('iom', pv_r2d, cl_type, zsgn, kfillmode = kfill) + CALL lbc_lnk('iom', pv_r2d, cl_type, zsgn, kfillmode = kfill, ldfull = .TRUE. ) ENDIF ELSEIF( PRESENT(pv_r1d) ) THEN IF(lwp) WRITE(numout,*) 'XIOS RST READ (1D): ', TRIM(cdvar) @@ -2416,7 +2416,7 @@ CONTAINS END SELECT ! z_fld(:,:) = 1._wp - CALL lbc_lnk( 'iom', z_fld, cdgrd, -1.0_wp ) ! Working array for location of northfold + CALL lbc_lnk( 'iom', z_fld, cdgrd, -1.0_wp, ldfull = .TRUE. ) ! Working array for location of northfold ! ! Cell vertices that can be defined DO_2D( 0, 0, 0, 0 ) diff --git a/src/OCE/IOM/restart.F90 b/src/OCE/IOM/restart.F90 index 32e23127996f4c17c31f755174c50a24875e7eb4..f39619ad225e08fc3ac32af8872370330c933db7 100644 --- a/src/OCE/IOM/restart.F90 +++ b/src/OCE/IOM/restart.F90 @@ -31,6 +31,9 @@ MODULE restart USE trdmxl_oce ! ocean active mixed layer tracers trends variables USE diu_bulk ! ??? #if defined key_agrif +#if defined key_si3 + USE agrif_ice_interp +#endif USE agrif_oce_interp #endif ! @@ -435,7 +438,15 @@ CONTAINS ENDIF #if defined key_agrif ! Set ghosts points from parent - IF (.NOT.Agrif_Root()) CALL Agrif_istate_ssh( Kbb, Kmm, Kaa, .true. ) + IF (.NOT.Agrif_Root()) THEN + ! Set ghosts points from parent + CALL Agrif_istate_ssh( Kbb, Kmm, Kaa, .true. ) +#if defined key_si3 + ! Possibly add ssh increment from parent grid + ! only if there is no ice model in the child grid + CALL Agrif_istate_icevol( Kbb, Kmm, Kaa ) +#endif + ENDIF #endif ! ssh(:,:,Kmm) = ssh(:,:,Kbb) !* set now values from to before ones diff --git a/src/OCE/LBC/lbc_lnk_call_generic.h90 b/src/OCE/LBC/lbc_lnk_call_generic.h90 index f735ac909d1380aac3eb38883cc77c4c5f815667..69765545a5cc176ef897d07ec62f45f7ef993466 100644 --- a/src/OCE/LBC/lbc_lnk_call_generic.h90 +++ b/src/OCE/LBC/lbc_lnk_call_generic.h90 @@ -27,7 +27,7 @@ & , pt21, cdna21, psgn21, pt22, cdna22, psgn22, pt23, cdna23, psgn23, pt24, cdna24, psgn24 & & , pt25, cdna25, psgn25, pt26, cdna26, psgn26, pt27, cdna27, psgn27, pt28, cdna28, psgn28 & & , pt29, cdna29, psgn29, pt30, cdna30, psgn30 & - & , kfillmode, pfillval, lsend, lrecv, ld4only ) + & , kfillmode, pfillval, lsend, lrecv, ld4only, ldfull ) !!--------------------------------------------------------------------- CHARACTER(len=*) , INTENT(in ) :: cdname ! name of the calling subroutine REAL(PRECISION), DIMENSION(DIMS) , TARGET, CONTIGUOUS, INTENT(inout) :: pt1 ! arrays on which the lbc is applied @@ -52,6 +52,7 @@ REAL(PRECISION) , OPTIONAL , INTENT(in ) :: pfillval ! background value (used at closed boundaries) LOGICAL, DIMENSION(8), OPTIONAL , INTENT(in ) :: lsend, lrecv ! indicate how communications are to be carried out LOGICAL , OPTIONAL , INTENT(in ) :: ld4only ! if .T., do only 4-neighbour comm (ignore corners) + LOGICAL , OPTIONAL , INTENT(in ) :: ldfull ! .true. if we also update the last line of the inner domain !! INTEGER :: kfld ! number of elements that will be attributed TYPE(PTR_4d_/**/PRECISION), DIMENSION(30) :: ptab_ptr ! pointer array @@ -96,9 +97,9 @@ IF( PRESENT(psgn30) ) CALL load_ptr_/**/XD/**/_/**/PRECISION( pt30, cdna30, psgn30, ptab_ptr, cdna_ptr, psgn_ptr, kfld ) ! IF( nn_comm == 1 ) THEN - CALL lbc_lnk_pt2pt( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, lsend, lrecv, ld4only ) + CALL lbc_lnk_pt2pt( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, lsend, lrecv, ld4only, ldfull ) ELSE - CALL lbc_lnk_neicoll( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, lsend, lrecv, ld4only ) + CALL lbc_lnk_neicoll( cdname, ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, lsend, lrecv, ld4only, ldfull ) ENDIF ! END SUBROUTINE lbc_lnk_call_/**/XD/**/_/**/PRECISION diff --git a/src/OCE/LBC/lbc_lnk_neicoll_generic.h90 b/src/OCE/LBC/lbc_lnk_neicoll_generic.h90 index d6bd3038066f876fd55231c89843f106bd7ceeac..9952ec29e06bae409338801bf7bf88174b2c666f 100644 --- a/src/OCE/LBC/lbc_lnk_neicoll_generic.h90 +++ b/src/OCE/LBC/lbc_lnk_neicoll_generic.h90 @@ -1,5 +1,5 @@ - SUBROUTINE lbc_lnk_neicoll_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, lsend, lrecv, ld4only ) + SUBROUTINE lbc_lnk_neicoll_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, lsend, lrecv, ld4only, ldfull ) CHARACTER(len=*) , INTENT(in ) :: cdname ! name of the calling subroutine TYPE(PTR_4d_/**/PRECISION), DIMENSION(:), INTENT(inout) :: ptab ! pointer of arrays on which apply the b.c. CHARACTER(len=1), DIMENSION(:), INTENT(in ) :: cd_nat ! nature of array grid-points @@ -9,6 +9,7 @@ REAL(PRECISION), OPTIONAL, INTENT(in ) :: pfillval ! background value (used at closed boundaries) LOGICAL, DIMENSION(8),OPTIONAL, INTENT(in ) :: lsend, lrecv ! communication with other 4 proc LOGICAL, OPTIONAL, INTENT(in ) :: ld4only ! if .T., do only 4-neighbour comm (ignore corners) + LOGICAL , OPTIONAL, INTENT(in ) :: ldfull ! .true. if we also update the last line of the inner domain ! INTEGER :: ji, jj, jk , jl, jf, jn ! dummy loop indices INTEGER :: ip0i, ip1i, im0i, im1i @@ -310,8 +311,8 @@ ! ------------------------------- ! ! IF( l_IdoNFold ) THEN - IF( jpni == 1 ) THEN ; CALL lbc_nfd( ptab, cd_nat, psgn , kfld ) ! self NFold - ELSE ; CALL mpp_nfd( ptab, cd_nat, psgn, ifill_nfd, zland, kfld ) ! mpi NFold + IF( jpni == 1 ) THEN ; CALL lbc_nfd( ptab, cd_nat, psgn , kfld ) ! self NFold + ELSE ; CALL mpp_nfd( ptab, cd_nat, psgn, ifill_nfd, zland, kfld, ldfull ) ! mpi NFold ENDIF ENDIF ! diff --git a/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90 b/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90 index 777c9913d19264ec77a32311bfdd74477f00714b..4da99f55070f836a87f65c7e896d92c16f1df26e 100644 --- a/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90 +++ b/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90 @@ -1,6 +1,6 @@ #if ! defined BLOCK_ISEND && ! defined BLOCK_FILL_nonMPI && ! defined BLOCK_FILL_MPI_RECV - SUBROUTINE lbc_lnk_pt2pt_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, lsend, lrecv, ld4only ) + SUBROUTINE lbc_lnk_pt2pt_/**/PRECISION( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, lsend, lrecv, ld4only, ldfull ) CHARACTER(len=*) , INTENT(in ) :: cdname ! name of the calling subroutine TYPE(PTR_4d_/**/PRECISION), DIMENSION(:), INTENT(inout) :: ptab ! pointer of arrays on which apply the b.c. CHARACTER(len=1), DIMENSION(:), INTENT(in ) :: cd_nat ! nature of array grid-points @@ -10,6 +10,7 @@ REAL(PRECISION), OPTIONAL, INTENT(in ) :: pfillval ! background value (used at closed boundaries) LOGICAL, DIMENSION(8),OPTIONAL, INTENT(in ) :: lsend, lrecv ! communication with other 4 proc LOGICAL, OPTIONAL, INTENT(in ) :: ld4only ! if .T., do only 4-neighbour comm (ignore corners) + LOGICAL , OPTIONAL, INTENT(in ) :: ldfull ! .true. if we also update the last line of the inner domain ! INTEGER :: ji, jj, jk, jl, jf, jn ! dummy loop indices INTEGER :: ip0i, ip1i, im0i, im1i @@ -236,8 +237,8 @@ ! Do if before MPI_Recv from south/north/corners neighbourgs so we will have more time to receive data ! IF( l_IdoNFold ) THEN - IF( jpni == 1 ) THEN ; CALL lbc_nfd( ptab, cd_nat, psgn , kfld ) ! self NFold - ELSE ; CALL mpp_nfd( ptab, cd_nat, psgn, ifill_nfd, zland, kfld ) ! mpi NFold + IF( jpni == 1 ) THEN ; CALL lbc_nfd( ptab, cd_nat, psgn , kfld ) ! self NFold + ELSE ; CALL mpp_nfd( ptab, cd_nat, psgn, ifill_nfd, zland, kfld, ldfull ) ! mpi NFold ENDIF ENDIF ! diff --git a/src/OCE/LBC/lbc_nfd_generic.h90 b/src/OCE/LBC/lbc_nfd_generic.h90 index fdfa8b62b54ade95f72f7bf33e49fe91adc0657e..fa20805f5944259e7349dbdc40ae49d54e695d9f 100644 --- a/src/OCE/LBC/lbc_nfd_generic.h90 +++ b/src/OCE/LBC/lbc_nfd_generic.h90 @@ -196,30 +196,7 @@ CASE ( 'T' , 'W' ) ! T-, W-point DO jl = 1, ipl ; DO jk = 1, ipk ! - ! first: line number ipj-ihls : 3 points - DO jj = 1, 1 - ij1 = ipj - ihls - ij2 = ij1 ! same line - ! - DO ji = 1, 1 ! points from ipi/2+1 - ii1 = ipi/2 + ji - ii2 = ipi/2 - ji + 1 - ptab(jf)%pt4d(ii1,ij1,jk,jl) = ptab(jf)%pt4d(ii2,ij2,jk,jl) ! Warning: pb with sign... - END DO - DO ji = 1, 1 ! points ipi - ihls - ii1 = ipi - ihls + ji - 1 - ii2 = ihls + ji - ptab(jf)%pt4d(ii1,ij1,jk,jl) = ptab(jf)%pt4d(ii2,ij2,jk,jl) ! Warning: pb with sign... - END DO - DO ji = 1, COUNT( (/ihls > 0/) ) ! point ihls: redo it just in case (if e-w periodocity already done) - ! ! as we just changed point ipi - ihls - ii1 = ihls + ji - 1 - ii2 = ihls + ji - ptab(jf)%pt4d(ii1,ij1,jk,jl) = ptab(jf)%pt4d(ii2,ij2,jk,jl) ! Warning: pb with sign... - END DO - END DO - ! - ! Second: last ihls lines (from ipj to ipj-ihls+1) : full + ! last ihls lines (from ipj to ipj-ihls+1) : full DO jj = 1, ihls ij1 = ipj + 1 - jj ! ends at: ipj + 1 - ihls ij2 = ipj - 2*ihls + jj ! ends at: ipj - 2*ihls + ihls = ipj - ihls diff --git a/src/OCE/LBC/lib_mpp.F90 b/src/OCE/LBC/lib_mpp.F90 index 3c4c955f9a253b8b902910eb75b907ea0c32b01f..3b4d1ab6486cea9272f1f662c32805956307d007 100644 --- a/src/OCE/LBC/lib_mpp.F90 +++ b/src/OCE/LBC/lib_mpp.F90 @@ -192,7 +192,6 @@ MODULE lib_mpp INTEGER, PUBLIC :: n_sequence_glb = 0 !: # of global communications INTEGER, PUBLIC :: n_sequence_dlg = 0 !: # of delayed global communications INTEGER, PUBLIC :: numcom = -1 !: logical unit for communicaton report - LOGICAL, PUBLIC :: l_full_nf_update = .TRUE. !: logical for a full (2lines) update of bc at North fold report INTEGER, PARAMETER, PUBLIC :: nbdelay = 2 !: number of delayed operations !: name (used as id) of allreduce-delayed operations ! Warning: we must use the same character length in an array constructor (at least for gcc compiler) diff --git a/src/OCE/LBC/mpp_nfd_generic.h90 b/src/OCE/LBC/mpp_nfd_generic.h90 index 237f9b311857c032259e3ae1ab28d68d68914d35..20ecf8ac22f8e4395fb246073a65a7a807affa76 100644 --- a/src/OCE/LBC/mpp_nfd_generic.h90 +++ b/src/OCE/LBC/mpp_nfd_generic.h90 @@ -1,18 +1,19 @@ - SUBROUTINE mpp_nfd_/**/PRECISION( ptab, cd_nat, psgn, kfillmode, pfillval, kfld ) + SUBROUTINE mpp_nfd_/**/PRECISION( ptab, cd_nat, psgn, kfillmode, pfillval, kfld, ldfull ) TYPE(PTR_4d_/**/PRECISION), DIMENSION(:), INTENT(inout) :: ptab ! pointer of arrays on which apply the b.c. CHARACTER(len=1), DIMENSION(kfld), INTENT(in ) :: cd_nat ! nature of array grid-points REAL(PRECISION), DIMENSION(kfld), INTENT(in ) :: psgn ! sign used across the north fold boundary INTEGER , INTENT(in ) :: kfillmode ! filling method for halo over land REAL(PRECISION) , INTENT(in ) :: pfillval ! background value (used at closed boundaries) INTEGER , INTENT(in ) :: kfld ! number of pt3d arrays + LOGICAL , OPTIONAL, INTENT(in ) :: ldfull ! .true. if we also update the last line of the inner domain ! - LOGICAL :: ll_add_line + LOGICAL :: llfull INTEGER :: ji, jj, jk, jl, jf, jr, jg, jn ! dummy loop indices INTEGER :: ierr, ibuffsize, impp, ipi0 INTEGER :: ii1, ii2, ij1, ij2, ij3, iig, inei INTEGER :: i0max, ilntot, iisht, ijsht, ihsz - INTEGER :: iproc, ijnr, ipjtot, iFT, iFU, i012 + INTEGER :: iproc, ijnr, ipjtot, iF_TU, i012 INTEGER, DIMENSION(kfld) :: ipi, ipj, ipj1, ipj2, ipk, ipl ! dimension of the input array INTEGER, DIMENSION(kfld) :: ihls ! halo size INTEGER, DIMENSION(:) , ALLOCATABLE :: ireq_s, ireq_r ! for mpi_isend when avoiding mpi_allgather @@ -46,7 +47,6 @@ ! - c_NFtype='T', grid=U : half of the last line (jpiglo/2+1:jpiglo-nn_hls) ! - c_NFtype='T', grid=V : all the last line nn_hls+1 and (nn_hls+2:jpiglo-nn_hls) ! - c_NFtype='T', grid=F : all the last line (nn_hls+1:jpiglo-nn_hls) - ! - c_NFtype='F', grid=T : 2 points of the last line (jpiglo/2+1 and jpglo-nn_hls) ! - c_NFtype='F', grid=U : no points are duplicated ! - c_NFtype='F', grid=V : half of the last line (jpiglo/2+1:jpiglo-nn_hls) ! - c_NFtype='F', grid=F : half of the last line (jpiglo/2+1:jpiglo-nn_hls-1) @@ -55,18 +55,15 @@ ! In consequence, we may want to force the folding on these points by setting l_full_nf_update = .TRUE. ! This is slightly slower but necessary to avoid different values on identical grid points!! ! - !!!!!!!!! temporary switch off this optimisation ==> force TRUE !!!!!!!! - !!!!!!!!! needed to get the same results without agrif and with agrif and no zoom !!!!!!!! - !!!!!!!!! I don't know why we must do that... !!!!!!!! - l_full_nf_update = .TRUE. - ! also force it if not restart during the first 2 steps (leap frog?) - ll_add_line = l_full_nf_update .OR. ( ncom_stp <= nit000+1 .AND. .NOT. ln_rstart ) + llfull = .FALSE. + IF ( PRESENT(ldfull) ) llfull = ldfull + ! also force during the first step to make sure all the init are ok + llfull = llfull .OR. ncom_stp <= nit000 ALLOCATE(ipjfld(kfld)) ! how many lines do we send for each field? - IF( ll_add_line ) THEN + IF( llfull ) THEN DO jf = 1, kfld ! Loop over the number of arrays to be processed - ipjfld(jf) = ihls(jf) + COUNT( (/ c_NFtype == 'T' .OR. cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) & - & + COUNT( (/ c_NFtype == 'F' .AND. cd_nat(jf) == 'T' .AND. ihls(jf) == 0 /) ) + ipjfld(jf) = ihls(jf) + COUNT( (/ c_NFtype == 'T' .OR. cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) END DO ELSE ipjfld(:) = ihls(:) @@ -81,8 +78,7 @@ ij1 = 0 DO jf = 1, kfld ! - i012 = COUNT( (/ c_NFtype == 'T' /) ) + COUNT( (/ cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) & - & + COUNT( (/ ihls(jf) == 0 .AND. cd_nat(jf) == 'T' .AND. c_NFtype == 'F' /) ) ! 0, 1 OR 2 + i012 = COUNT( (/ c_NFtype == 'T' /) ) + COUNT( (/ cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) ! 0, 1 OR 2 ijsht = ipj(jf) - 2*ihls(jf) - i012 ! j-position of the sent lines (from bottom of sent lines) ! DO jl = 1, ipl(jf) ; DO jk = 1, ipk(jf) @@ -172,7 +168,6 @@ ! ihsz = ihls(jf) ! shorter name iisht = nn_hls - ihsz - iFT = COUNT( (/ ihsz > 0 .AND. c_NFtype == 'F' .AND. cd_nat(jf) == 'T' /) ) ! F-folding and T grid ! DO jl = 1, ipl(jf) ; DO jk = 1, ipk(jf) ! @@ -188,9 +183,9 @@ ptab(jf)%pt4d(ji,ij1,jk,jl) = psgn(jf) * zbufr(ii2,ij2,inei) END DO END DO - DO jj = ihsz+1, ipjfld(jf)+iFT ! NP folding for line ipj-ihsz that can be partially modified + DO jj = ihsz+1, ipjfld(jf) ! NP folding for line ipj-ihsz that can be partially modified ij1 = ipj(jf) - jj + 1 ! j-index in the receiving array (from the top -> reverse order for jj) - ij2 = ij2 + 1 - iFT + ij2 = ij2 + 1 ij3 = 1 DO ji = 1, ipi(jf) ii1 = ji + iisht @@ -216,11 +211,9 @@ ! DO jf = 1, kfld ! how many lines do we send for each field? - ipj1(jf) = ihls(jf) + COUNT( (/ c_NFtype == 'T' .OR. cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) & - & + COUNT( (/ c_NFtype == 'F' .AND. cd_nat(jf) == 'T' .AND. ihls(jf) == 0 /) ) + ipj1(jf) = ihls(jf) + COUNT( (/ c_NFtype == 'T' .OR. cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) ! how many lines do we need for each field? - ipj2(jf) = 2 * ihls(jf) + COUNT( (/ c_NFtype == 'T' /) ) + COUNT( (/ cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) & - & + COUNT( (/ c_NFtype == 'F' .AND. cd_nat(jf) == 'T' .AND. ihls(jf) == 0 /) ) + ipj2(jf) = 2 * ihls(jf) + COUNT( (/ c_NFtype == 'T' /) ) + COUNT( (/ cd_nat(jf) == 'V' .OR. cd_nat(jf) == 'F' /) ) END DO ! i0max = MAXVAL( nfni_0, mask = nfproc /= -1 ) ! largest value of Ni_0 among processors (we are not sending halos) @@ -257,8 +250,8 @@ iisht = nn_hls - ihsz ALLOCATE( ztabglo(1)%pt4d(Ni0glo+2*ihsz,ipj2(jf),ipk(jf),ipl(jf)) ) ! - iFU = COUNT( (/ c_NFtype == 'F' .AND. cd_nat(jf) == 'U' /) ) ! F-folding and U grid - IF( iFU == 0 ) ztabglo(1)%pt4d(:,ipj2(jf)-ihsz,:,:) = zhuge ! flag off the line that is not fully modified + iF_TU = COUNT( (/ c_NFtype == 'F' .AND. ( cd_nat(jf) == 'U' .OR. cd_nat(jf) == 'T' ) /) ) ! F-folding and T or U grid + IF( iF_TU == 0 ) ztabglo(1)%pt4d(:,ipj2(jf)-ihsz,:,:) = zhuge ! flag off the line that is not fully modified ! ! need to fill only the first ipj1(j) lines of ztabglo as lbc_nfd don't use the last ihsz lines ijnr = 0 @@ -320,7 +313,7 @@ ptab(jf)%pt4d(ji,ij1,jk,jl) = ztabglo(1)%pt4d(ii2,ij2,jk,jl) END DO END DO - DO jj = ihsz, ihsz - iFU + DO jj = ihsz, ihsz - iF_TU ij1 = ipj( jf) - jj ! last ihsz+1 line ij2 = ipj2(jf) - jj ! last ihsz+1 line DO ji= 1, ipi(jf) diff --git a/src/OCE/LDF/ldfslp.F90 b/src/OCE/LDF/ldfslp.F90 index a4bd5ddeb8b759d948bcb4aff3adfe065c89a9be..f25ec900e5d8a13b8beefeb338ac1526f39fb5a5 100644 --- a/src/OCE/LDF/ldfslp.F90 +++ b/src/OCE/LDF/ldfslp.F90 @@ -233,19 +233,20 @@ CONTAINS ! ! !* horizontal Shapiro filter DO_3D( 0, 0, 0, 0, 2, jpkm1 ) ! rows jj=2 and =jpjm1 only - zuslp = z1_16 * ( zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk) & - & + zwz(ji-1,jj+1,jk) + zwz(ji+1,jj+1,jk) & - & + 2.*( zwz(ji ,jj-1,jk) + zwz(ji-1,jj ,jk) & - & + zwz(ji+1,jj ,jk) + zwz(ji ,jj+1,jk) ) & - & + 4.* zwz(ji ,jj ,jk) ) - zvslp = z1_16 * ( zww(ji-1,jj-1,jk) + zww(ji+1,jj-1,jk) & - & + zww(ji-1,jj+1,jk) + zww(ji+1,jj+1,jk) & - & + 2.*( zww(ji ,jj-1,jk) + zww(ji-1,jj ,jk) & - & + zww(ji+1,jj ,jk) + zww(ji ,jj+1,jk) ) & - & + 4.* zww(ji,jj ,jk) ) + zuslp = z1_16 * ( ( zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk) ) & ! need additional () for + & + ( zwz(ji-1,jj+1,jk) + zwz(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + 2.*( ( zwz(ji ,jj-1,jk) + zwz(ji-1,jj ,jk) ) & + & + ( zwz(ji+1,jj ,jk) + zwz(ji ,jj+1,jk) ) ) & + & + 4.* zwz(ji ,jj ,jk) ) + zvslp = z1_16 * ( ( zww(ji-1,jj-1,jk) + zww(ji+1,jj-1,jk) ) & ! need additional () for + & + ( zww(ji-1,jj+1,jk) + zww(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + 2.*( ( zww(ji ,jj-1,jk) + zww(ji-1,jj ,jk) ) & + & + ( zww(ji+1,jj ,jk) + zww(ji ,jj+1,jk) ) ) & + & + 4.* zww(ji,jj ,jk) ) + END_2D ! !* decrease along coastal boundaries uslp(ji,jj,jk) = zuslp * ( umask(ji,jj+1,jk) + umask(ji,jj-1,jk ) ) * 0.5_wp & - & * ( umask(ji,jj ,jk) + umask(ji,jj ,jk+1) ) * 0.5_wp + & * ( umask(ji,jj ,jk) + umask(ji,jj ,jk+1) ) * 0.5_wp vslp(ji,jj,jk) = zvslp * ( vmask(ji+1,jj,jk) + vmask(ji-1,jj,jk ) ) * 0.5_wp & & * ( vmask(ji ,jj,jk) + vmask(ji ,jj,jk+1) ) * 0.5_wp END_3D @@ -262,10 +263,10 @@ CONTAINS & + umask(ji-1,jj,jk-1) + umask(ji,jj,jk-1) , zeps ) * e1t(ji,jj) zcj = MAX( vmask(ji,jj-1,jk ) + vmask(ji,jj,jk-1) & & + vmask(ji,jj-1,jk-1) + vmask(ji,jj,jk ) , zeps ) * e2t(ji,jj) - zai = ( zgru (ji-1,jj,jk ) + zgru (ji,jj,jk-1) & - & + zgru (ji-1,jj,jk-1) + zgru (ji,jj,jk ) ) / zci * wmask (ji,jj,jk) - zaj = ( zgrv (ji,jj-1,jk ) + zgrv (ji,jj,jk-1) & - & + zgrv (ji,jj-1,jk-1) + zgrv (ji,jj,jk ) ) / zcj * wmask (ji,jj,jk) + zai = ( ( zgru (ji-1,jj,jk ) + zgru (ji,jj,jk-1) ) & ! need additional () for reproducibility around NP + & + ( zgru (ji-1,jj,jk-1) + zgru (ji,jj,jk ) ) ) / zci * wmask (ji,jj,jk) + zaj = ( ( zgrv (ji,jj-1,jk ) + zgrv (ji,jj,jk-1) ) & ! need additional () for reproducibility around NP + & + ( zgrv (ji,jj-1,jk-1) + zgrv (ji,jj,jk ) ) ) / zcj * wmask (ji,jj,jk) ! ! bound the slopes: abs(zw.)<= 1/100 and zb..<0. ! ! + kxz max= ah slope max =< e1 e3 /(pi**2 2 dt) zbi = MIN( zbw ,- 100._wp* ABS( zai ) , -7.e+3_wp/e3w(ji,jj,jk,Kmm)* ABS( zai ) ) @@ -288,23 +289,23 @@ CONTAINS ! ! !* horizontal Shapiro filter DO_3D( 0, 0, 0, 0, 2, jpkm1 ) ! rows jj=2 and =jpjm1 only - zcofw = wmask(ji,jj,jk) * z1_16 - zwslpi = ( zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk) & - & + zwz(ji-1,jj+1,jk) + zwz(ji+1,jj+1,jk) & - & + 2.*( zwz(ji ,jj-1,jk) + zwz(ji-1,jj ,jk) & - & + zwz(ji+1,jj ,jk) + zwz(ji ,jj+1,jk) ) & - & + 4.* zwz(ji ,jj ,jk) ) * zcofw - - zwslpj = ( zww(ji-1,jj-1,jk) + zww(ji+1,jj-1,jk) & - & + zww(ji-1,jj+1,jk) + zww(ji+1,jj+1,jk) & - & + 2.*( zww(ji ,jj-1,jk) + zww(ji-1,jj ,jk) & - & + zww(ji+1,jj ,jk) + zww(ji ,jj+1,jk) ) & - & + 4.* zww(ji ,jj ,jk) ) * zcofw - ! !* decrease in vicinity of topography - zck = ( umask(ji,jj,jk) + umask(ji-1,jj,jk) ) & - & * ( vmask(ji,jj,jk) + vmask(ji,jj-1,jk) ) * 0.25 - wslpi(ji,jj,jk) = zwslpi * zck - wslpj(ji,jj,jk) = zwslpj * zck + zcofw = wmask(ji,jj,jk) * z1_16 + zwslpi = ( ( zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk) ) & ! need additional () for + & + ( zwz(ji-1,jj+1,jk) + zwz(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + 2.*( ( zwz(ji ,jj-1,jk) + zwz(ji-1,jj ,jk) ) & + & + ( zwz(ji+1,jj ,jk) + zwz(ji ,jj+1,jk) ) ) & + & + 4.* zwz(ji ,jj ,jk) ) * zcofw + + zwslpj = ( ( zww(ji-1,jj-1,jk) + zww(ji+1,jj-1,jk) ) & ! need additional () for + & + ( zww(ji-1,jj+1,jk) + zww(ji+1,jj+1,jk) ) & ! reproducibility around NP + & + 2.*( ( zww(ji ,jj-1,jk) + zww(ji-1,jj ,jk) ) & + & + ( zww(ji+1,jj ,jk) + zww(ji ,jj+1,jk) ) ) & + & + 4.* zww(ji ,jj ,jk) ) * zcofw + ! !* decrease in vicinity of topography + zck = ( umask(ji,jj,jk) + umask(ji-1,jj,jk) ) & + & * ( vmask(ji,jj,jk) + vmask(ji,jj-1,jk) ) * 0.25 + wslpi(ji,jj,jk) = zwslpi * zck + wslpj(ji,jj,jk) = zwslpj * zck END_3D ! IV. Lateral boundary conditions @@ -632,10 +633,10 @@ CONTAINS & + umask(ji-1,jj,ikm1) + umask(ji,jj,ikm1) , zeps ) * e1t(ji,jj) zcj = MAX( vmask(ji,jj-1,ik ) + vmask(ji,jj,ik ) & & + vmask(ji,jj-1,ikm1) + vmask(ji,jj,ikm1) , zeps ) * e2t(ji,jj) - zai = ( p_gru(ji-1,jj,ik ) + p_gru(ji,jj,ik) & - & + p_gru(ji-1,jj,ikm1) + p_gru(ji,jj,ikm1 ) ) / zci * tmask(ji,jj,ik) - zaj = ( p_grv(ji,jj-1,ik ) + p_grv(ji,jj,ik ) & - & + p_grv(ji,jj-1,ikm1) + p_grv(ji,jj,ikm1) ) / zcj * tmask(ji,jj,ik) + zai = ( ( p_gru(ji-1,jj,ik ) + p_gru(ji,jj,ik ) ) & ! need additional () for reproducibility around NP + & + ( p_gru(ji-1,jj,ikm1) + p_gru(ji,jj,ikm1) ) ) / zci * tmask(ji,jj,ik) + zaj = ( ( p_grv(ji,jj-1,ik ) + p_grv(ji,jj,ik ) ) & ! need additional () for reproducibility around NP + & + ( p_grv(ji,jj-1,ikm1) + p_grv(ji,jj,ikm1) ) ) / zcj * tmask(ji,jj,ik) ! !- bound the slopes: abs(zw.)<= 1/100 and zb..<0. ! kxz max= ah slope max =< e1 e3 /(pi**2 2 dt) zbi = MIN( zbw , -100._wp* ABS( zai ) , -7.e+3_wp/e3w(ji,jj,ik,Kmm)* ABS( zai ) ) diff --git a/src/OCE/SBC/cpl_oasis3.F90 b/src/OCE/SBC/cpl_oasis3.F90 index b86deba5449834d308288480d3ab7b23ed8ff5c0..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 @@ -407,7 +418,7 @@ CONTAINS !--- we must call lbc_lnk to fill the halos that where not received. IF( .NOT. ll_1st ) THEN - CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn ) + CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn, ldfull = .TRUE. ) ENDIF !!clem: mettre T instead of clgrid diff --git a/src/OCE/SBC/sbcmod.F90 b/src/OCE/SBC/sbcmod.F90 index 78e2e3aeaaae7265949b30ced2b8bc29b0d0b2c9..82d0dd6e9e17f3fb0ff28639b74048c7b155ea78 100644 --- a/src/OCE/SBC/sbcmod.F90 +++ b/src/OCE/SBC/sbcmod.F90 @@ -418,31 +418,28 @@ CONTAINS ! ! !== sbc formulation ==! ! + IF( ln_blk .OR. ln_abl ) THEN + IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OCE-SAS coupling: SAS receiving fields from OCE + IF( ln_wave ) THEN + IF ( lk_oasis ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OCE-wave coupling + CALL sbc_wave ( kt, Kmm ) + ENDIF + ENDIF + ! SELECT CASE( nsbc ) ! Compute ocean surface boundary condition ! ! (i.e. utau,vtau, qns, qsr, emp, sfx) - CASE( jp_usr ) ; CALL usrdef_sbc_oce( kt, Kbb ) ! user defined formulation - CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation - CASE( jp_blk ) - IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OCE-SAS coupling: SAS receiving fields from OCE -!!!!!!!!!!! ATTENTION:ln_wave is not only used for oasis coupling !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - IF( ln_wave ) THEN - IF ( lk_oasis ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OCE-wave coupling - CALL sbc_wave ( kt, Kmm ) - ENDIF - CALL sbc_blk ( kt ) ! bulk formulation for the ocean - ! - CASE( jp_abl ) - IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OCE-SAS coupling: SAS receiving fields from OCE - CALL sbc_abl ( kt ) ! ABL formulation for the ocean - ! - CASE( jp_purecpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! pure coupled formulation + CASE( jp_usr ) ; CALL usrdef_sbc_oce( kt, Kbb ) ! user defined formulation + CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation + CASE( jp_blk ) ; CALL sbc_blk ( kt ) ! bulk formulation for the ocean + CASE( jp_abl ) ; CALL sbc_abl ( kt ) ! ABL formulation for the ocean + CASE( jp_purecpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! pure coupled formulation CASE( jp_none ) IF( ll_opa ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OCE-SAS coupling: OCE receiving fields from SAS END SELECT ! IF( ln_mixcpl ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! forced-coupled mixed formulation after forcing ! - IF( ln_wave .AND. ln_tauoc ) THEN ! Wave stress reduction + IF( ln_wave .AND. ln_tauoc ) THEN ! Wave stress reduction ! DO_2D( 0, 0, 0, 0 ) utau(ji,jj) = utau(ji,jj) * tauoc_wave(ji,jj) diff --git a/src/OFF/dtadyn.F90 b/src/OFF/dtadyn.F90 index 253d699db5d2b13d0e708af11cfb31d1515b4c69..3a68e3128e1e596f150662a3e74f17d1e957059d 100644 --- a/src/OFF/dtadyn.F90 +++ b/src/OFF/dtadyn.F90 @@ -24,7 +24,7 @@ MODULE dtadyn USE dom_oce ! ocean domain: variables #if defined key_qco USE domqco ! variable volume -#else +#elif ! defined key_linssh USE domvvl #endif USE zdf_oce ! ocean vertical physics: variables @@ -53,7 +53,7 @@ MODULE dtadyn PUBLIC dta_dyn_init ! called by nemo_init PUBLIC dta_dyn ! called by nemo_gcm PUBLIC dta_dyn_atf ! called by nemo_gcm -#if ! defined key_qco +#if ! defined key_qco && ! defined key_linssh PUBLIC dta_dyn_sf_interp ! called by nemo_gcm #endif #if defined key_sed_off @@ -345,6 +345,7 @@ CONTAINS CALL iom_close( inum ) ! close file ENDIF ! +#if ! defined key_linssh #if defined key_qco CALL dom_qco_r3c( ssh(:,:,Kbb), r3t(:,:,Kbb), r3u(:,:,Kbb), r3v(:,:,Kbb) ) CALL dom_qco_r3c( ssh(:,:,Kmm), r3t(:,:,Kmm), r3u(:,:,Kmm), r3v(:,:,Kmm) ) @@ -356,6 +357,7 @@ CONTAINS CALL dta_dyn_sf_interp( nit000, Kmm ) CALL dta_dyn_sf_interp( nit000, Kbb ) +#endif #endif ENDIF ! @@ -390,7 +392,7 @@ CONTAINS END SUBROUTINE dta_dyn_atf -#if ! defined key_qco +#if ! defined key_qco && ! defined key_linssh SUBROUTINE dta_dyn_sf_interp( kt, Kmm ) !!--------------------------------------------------------------------- diff --git a/src/OFF/nemogcm.F90 b/src/OFF/nemogcm.F90 index 9cffd0190d1a01528c6ce0c37503905e632353d2..9e83a72731fbf1f2ad7821634dbb064606b0e729 100644 --- a/src/OFF/nemogcm.F90 +++ b/src/OFF/nemogcm.F90 @@ -62,7 +62,7 @@ MODULE nemogcm USE prtctl ! Print control (prt_ctl_init routine) USE timing ! Timing USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) -#if defined key_qco +#if defined key_qco || defined key_linssh USE stpmlf , ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices #else USE step , ONLY : Nbb, Nnn, Naa, Nrhs ! time level indices @@ -150,7 +150,7 @@ CONTAINS Nnn = Naa Naa = Nrhs ! -# if ! defined key_qco +# if ! defined key_qco && ! defined key_linssh IF( .NOT.ln_linssh ) CALL dta_dyn_sf_interp( istp, Nnn ) ! calculate now grid parameters # endif 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/BENCH/MY_SRC/usrdef_sbc.F90 b/tests/BENCH/MY_SRC/usrdef_sbc.F90 index 9d7d2808d00c492a20bb9832892a8a4d96a0c515..fb690fe8e436f550a69bf82751ca49db6a1ef512 100644 --- a/tests/BENCH/MY_SRC/usrdef_sbc.F90 +++ b/tests/BENCH/MY_SRC/usrdef_sbc.F90 @@ -116,7 +116,7 @@ CONTAINS vtau_ice(mi0( nn_hls+1,nn_hls):mi1( nn_hls+1,nn_hls),mj0(jpjglo-nn_hls,nn_hls):mj1(jpjglo-nn_hls,nn_hls)) = 0._wp ENDIF - CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'T', -1., vtau_ice, 'T', -1. ) + CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'T', -1., vtau_ice, 'T', -1., ldfull = .TRUE. ) #endif ! END SUBROUTINE usrdef_sbc_ice_tau diff --git a/tests/BENCH/MY_SRC/usrdef_zgr.F90 b/tests/BENCH/MY_SRC/usrdef_zgr.F90 index fe5d7de8004ef26c20bff9bfeb13e5555249cfdd..3a3818bfe2d7806b69d421b118695d69b03f4578 100644 --- a/tests/BENCH/MY_SRC/usrdef_zgr.F90 +++ b/tests/BENCH/MY_SRC/usrdef_zgr.F90 @@ -202,10 +202,10 @@ CONTAINS !!$ z2d(mi0(jpiglo/2 ,nn_hls):mi1( jpiglo/2 +2 ,nn_hls),mj0(jpjglo-nn_hls-1,nn_hls):mj1(jpjglo-nn_hls+1,nn_hls)) = 0._wp !!$ ENDIF !!$ ! - IF( c_NFtype == 'F' ) THEN ! Must mask the 2 pivot-points - z2d(mi0(nn_hls+1,nn_hls):mi1(nn_hls+1,nn_hls),mj0(jpjglo-nn_hls,nn_hls):mj1(jpjglo-nn_hls,nn_hls)) = 0._wp - z2d(mi0(jpiglo/2,nn_hls):mi1(jpiglo/2,nn_hls),mj0(jpjglo-nn_hls,nn_hls):mj1(jpjglo-nn_hls,nn_hls)) = 0._wp - ENDIF +!!$ IF( c_NFtype == 'F' ) THEN ! Must mask the 2 pivot-points +!!$ z2d(mi0(nn_hls+1,nn_hls):mi1(nn_hls+1,nn_hls),mj0(jpjglo-nn_hls,nn_hls):mj1(jpjglo-nn_hls,nn_hls)) = 0._wp +!!$ z2d(mi0(jpiglo/2,nn_hls):mi1(jpiglo/2,nn_hls),mj0(jpjglo-nn_hls,nn_hls):mj1(jpjglo-nn_hls,nn_hls)) = 0._wp +!!$ ENDIF ! CALL lbc_lnk( 'usrdef_zgr', z2d, 'T', 1._wp ) ! set surrounding land to zero (closed boundaries) ! 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> diff --git a/tests/ICE_RHEO/MY_SRC/usrdef_sbc.F90 b/tests/ICE_RHEO/MY_SRC/usrdef_sbc.F90 index 603cb78a3d34b5009d3e20302978fceae1b392d9..0b4f020abb72d3849d89ea5be6bac204539047c2 100644 --- a/tests/ICE_RHEO/MY_SRC/usrdef_sbc.F90 +++ b/tests/ICE_RHEO/MY_SRC/usrdef_sbc.F90 @@ -140,7 +140,7 @@ CONTAINS utau_ice(ji,jj) = zrhoa * Cd_atm * wndm_ice(ji,jj) * zwndi_t vtau_ice(ji,jj) = zrhoa * Cd_atm * wndm_ice(ji,jj) * zwndj_t END_2D - CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'T', -1., vtau_ice, 'T', -1. ) + CALL lbc_lnk( 'usrdef_sbc', utau_ice, 'T', -1., vtau_ice, 'T', -1., ldfull = .TRUE. ) ! END SUBROUTINE usrdef_sbc_ice_tau diff --git a/tests/rmt_cfgs.txt b/tests/rmt_cfgs.txt deleted file mode 100644 index b365fbce43717c60c4f9e3d43022c65d40692311..0000000000000000000000000000000000000000 --- a/tests/rmt_cfgs.txt +++ /dev/null @@ -1,3 +0,0 @@ -ORCA1_CICE # ORCA2_LIM # OCE TOP # http://gws-access.ceda.ac.uk/public/nemo/uspconfigs/ORCA1_CICE/v3.6.0/ORCA1_CICE_ctl.txt -ISOMIP # GYRE # OCE # http://gws-access.ceda.ac.uk/public/nemo/uspconfigs/ISOMIP/trunk/ISOMIP_ctl.txt -IRISHSEA # GYRE # OCE # http://gws-access.ceda.ac.uk/public/nemo/uspconfigs/IRISHSEA/v3.7.0/IRISHSEA_ctl.txt