Generating an IC Data File
Procedure
- Use PuTTY to log in to the server as the root user.
- Go to the main program installation directory.
cd /path/to/POM
- Move the POM2K and GRID-DATA directories to the installation directory of the main program (other files can be deleted).
cd www.ccpo.odu.edu/POMWEB/ mv POM2K ../../ mv GRID-DATA ../../
- Go to the directory where the GRID-DATA test case is stored.
cd /path/to/POM/GRID-DATA
- Create the IC and include directories.
mkdir IC mkdir -p /path/to/POM/GRID-DATA/IC/include
- Copy the header files gridborder, gridcom, and params to the include directory.
cp gridborder /path/to/POM/GRID-DATA/IC/include cp gridcom /path/to/POM/GRID-DATA/IC/include cp params /path/to/POM/GRID-DATA/IC/include
- Modify the rungrid file.
- Open the rungrid file.
vi rungrid
- Press i to enter the edit mode and modify the file as follows:
Before the modification:
echo ' Start Compiling ...' g77 -O3 GRID.f #pgf77 GRID.f a.out > printout # # -------------- output files for POM2K ------------------------ /bin/mv fort.40 IC.dat # formatted IC,grid & constant wind # -------------- output files for MATLAB plotting ------------- /bin/mv fort.43 ijk.dat # IM, JM, KB, Z /bin/mv fort.44 plt.dat # formatted grid /bin/mv fort.45 bnd.dat # boundary points (gridborder) /bin/mv fort.46 wnd.dat # wind velocity /bin/mv fort.47 dxy.dat # dx,dx (km) # /bin/rm a.out /bin/rm fort.* echo ' *** END GRID ***'
After the modification:
echo ' Start Compiling ...' flang -O3 GRID.f -I/path/to/POM/GRID-DATA/IC/include #pgf77 GRID.f #./a.out > printout # # -------------- output files for POM2K ------------------------ #mv fort.40 IC.dat # formatted IC,grid & constant wind # -------------- output files for MATLAB plotting ------------- #mv fort.43 ijk.dat # IM, JM, KB, Z #mv fort.44 plt.dat # formatted grid #mv fort.45 bnd.dat # boundary points (gridborder) #mv fort.46 wnd.dat # wind velocity #mv fort.47 dxy.dat # dx,dx (km) # #/bin/rm a.out #/bin/rm fort.* echo ' *** END GRID ***'
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the rungrid file.
- Copy the data files to the IC directory.
cp /path/to/POM/GRID-DATA/TOPO.dat /path/to/POM/GRID-DATA/IC cp /path/to/POM/GRID-DATA/TS.dat /path/to/POM/GRID-DATA/IC cp /path/to/POM/GRID-DATA/WIND.dat /path/to/POM/GRID-DATA/IC cp /path/to/POM/GRID-DATA/GRID.f /path/to/POM/GRID-DATA/IC cp /path/to/POM/GRID-DATA/IC.dat /path/to/POM/GRID-DATA/IC
- Set the environment variables.
export CC=mpicc export CXX=mpicxx export FC=mpif90
- Grant the permission to rungrid and execute it.
chmod 755 rungrid ./rungrid
Parent topic: POM POM2K Porting Guide (openEuler 21.03)