POM2K Model Running
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to switch to the POM installation directory:
cd /path/to/POM/POM2K
- Run the following command to decompress the POM2K installation package:
unzip POM2K.zip
- Run the following command to switch to the directory generated after the package is decompressed:
cd POM2K
- Run the following commands to modify the pom2k.f file:
- Open pom2k.f.
vi pom2k.f
- Press i to enter the insert mode and change mode 1 to mode 3.
Before the modification:
iproblem=1
After the modification:iproblem=3
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open pom2k.f.
- Run the following command to copy the header file gridcom of the installation package:
cp /path/to/POM/GRID-DATA/IC/include/gridcom ./
- Run the following commands to modify the runpom2k file:
- Open runpom2k.
vi runpom2k
- Press i to enter the insert mode and change mode 1 to mode 3.
Before the modification:
# # Runscript for pom2k with example of reading IC from file. # IC file generated by /GRID-DATA/GRID.f (T.E. Dec04) # # Note: if "grid" not created here you can put it in pom2k.c # "params" replaces default values set in pom2k.f # # # ------------------ PARAMETER FILES FOR EACH CASE ----------- # # -- SEAMOUNT TEST CASE (initial cond. calc. in pom2k.f) # echo ' parameter(im=65, jm=49, kb=21)' > grid echo ' iproblem= 1 ' > params echo ' days= 0.025 ' >> params echo ' prtd1= 0.0125 ' >> params echo ' dte= 6. ' >> params # # -- COAST TEST CASE (initial cond. from file) # #echo ' parameter(im=41, jm=61, kb=16)' > grid #echo ' iproblem= 3 ' > params #echo ' days= 0.50 ' >> params #echo ' prtd1= 0.25 ' >> params #echo ' dte= 12. ' >> params #cp IC.dat fort.40 # Initial Condition file # # ------------------ COMPILE & RUN ---------------------------- # # g77 -O3 pom2k.f /usr/local/lib/libnetcdf.a # ---- now netCDF output not used (see "CDF" in pom2k.f) gfortran -O3 pom2k.f # f90 -O3 pom2k.f # or any other compiler you wish to use # # ------------------ OUTPUT FILES ----------------------------- # a.out > pom2k.out # printout file # # pom2k.nc # netCDF file for MATLAB plotting
After the modification:# # Runscript for pom2k with example of reading IC from file. # IC file generated by /GRID-DATA/GRID.f (T.E. Dec04) # # Note: if "grid" not created here you can put it in pom2k.c # "params" replaces default values set in pom2k.f # # # ------------------ PARAMETER FILES FOR EACH CASE ----------- # # -- SEAMOUNT TEST CASE (initial cond. calc. in pom2k.f) # # echo ' parameter(im=65, jm=49, kb=21)' > grid # echo ' iproblem= 1 ' > params # echo ' days= 0.025 ' >> params # echo ' prtd1= 0.0125 ' >> params # echo ' dte= 6. ' >> params # # -- COAST TEST CASE (initial cond. from file) # echo ' parameter(im=41, jm=61, kb=16)' > grid echo ' iproblem= 3 ' > params echo ' days= 0.50 ' >> params echo ' prtd1= 0.25 ' >> params echo ' dte= 12. ' >> params cp IC.dat fort.40 # Initial Condition file # # ------------------ COMPILE & RUN ---------------------------- # # g77 -O3 pom2k.f /usr/local/lib/libnetcdf.a # ---- now netCDF output not used (see "CDF" in pom2k.f) gfortran -O3 pom2k.f /path/to/NETCDF/netcdf-4.4.1.1/lib/libnetcdf.a -I/path/to/NETCDF/netcdf-4.4.1.1/include # f90 -O3 pom2k.f # or any other compiler you wish to use # # ------------------ OUTPUT FILES ----------------------------- # ./a.out > pom2k.out # printout file # # pom2k.nc # netCDF file for MATLAB plotting
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open runpom2k.
- Run the following commands to grant the permissions to runpom2k and execute it:
chmod 755 runpom2k ./runpom2k
The following is an example of the command output.Figure 1 Result example
After the command is executed, the fort.71 file is generated in the current directory. This file is the required NC file.
Parent topic: POM POM2K Porting Guide (CentOS 7.6)