mkdir -p /path/to/NEMO cd /path/to/NEMO
echo "export NETCDF_DIR=/path/to/NETCDF" >> nemo-env.sh echo "export HDF_DIR=/path/to/HDF5" >> nemo-env.sh echo "export XIOS_DIR=/path/to/XIOS/xios-1.0" >> nemo-env.sh source nemo-env.sh
unzip NEMO_releases_release-3.6-10083.zip
cd NEMO/releases/release-3.6/NEMOGCM
vi ARCH/arch-aarch64_gnu.fcm
#generic gfortran compiler options for linux #NCDF_INC netcdf include file #NCDF_LIB netcdf library #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 in a #FPPFLAGS pre-processing flags #AR assembler #ARFLAGS assembler flags #MK make #USER_INC additional include files for the compiler, e.g. -I<include dir> #USER_LIB additional libraries to pass to the linker, e.g. -l<library> #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 $) %NCDF_HOME $NETCDF_DIR %HDF5_HOME $HDF_DIR %XIOS_HOME $XIOS_DIR %NCDF_INC -I%NCDF_HOME/include -I%HDF5_HOME/include %NCDF_LIB -L%HDF5_HOME/lib -L/%NCDF_HOME/lib -lnetcdf -lnetcdff %XIOS_INC -I%XIOS_HOME/inc %XIOS_LIB -L%XIOS_HOME/lib -lxios %CPP cpp -Dkey_nosignedzero %FC mpif90 -c -cpp %FCFLAGS -mcpu=native -fdefault-real-8 -fdefault-double-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -g %FFLAGS %FCFLAGS %LD mpif90 %LDFLAGS -lstdc++ %FPPFLAGS -P -C -traditional %AR ar %ARFLAGS rs %MK gmake %USER_INC %XIOS_INC %NCDF_INC %USER_LIB %XIOS_LIB %NCDF_LIB %CC cc %CFLAGS -O0
行尾和空行不能有空格。
chmod 777 ./ -R cd ./CONFIG/ ./makenemo -m aarch64_gnu -j 32 -r AMM12 -n 'MY_AMM12' add_key "key_nosignedzero"