cd /path/to/POM/POM2K
unzip POM2K.zip
cd POM2K
vi pom2k.f
iproblem=1
iproblem=3
cp /path/to/POM/GRID-DATA/IC/include/gridcom ./
vi runpom2k
# # 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
# # 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
chmod 755 runpom2k ./runpom2k
运行完后会在当前目录下生成“fort.71”文件,此文件为所需的nc文件。