Closed linva7 closed 3 months ago
It should be added that in wrf2roms_mw script I converted the roms grid by reading the wrfout_d02.nc file, I changed the edit part of script to:
rho.lat=ncread('E:\lili_\COAWST\wrfout_d02_2023-07-25_00_0000','XLAT'); rho.lon=ncread('E:\lili\COAWST\wrfout_d02_2023-07-25_00_0000','XLONG'); rho.lat=rho.lat(:,:,1) %!!! rho.lon=rho.lon(:,:,1) %!!! rho.depth=zeros(size(rho.lon))+100; rho.mask=1.0-ncread('E:\lili\COAWST\pp1_2ways\wrf_only\2305\wrfout_d02_2023-07-25_00_00_00','LANDMASK'); rho.mask=rho.mask(:,:,1); spherical='T'; projection='lambert conformal conic'; %projection='mercator';
Which ran smoothly to get roms.nc, followed by roms2swan to get the swan file, and in the result of the scrip_coawst's error report I noticed "forrtl: severe (24): end-of-file during read, unit 0, file /public/home/202234281089/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_bathy.bot". not sure if it's my swan file or not there is a problem
not sure. you have SWAN_COORD(1)='/public/home/202234281089/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_coord.grd', SWAN_COORD(2)='../../Projects/Sandy/Sandy_swan_coord_ref3.grd', SWAN_BATH(1)='/public/home/202234281089/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_bathy.bot', SWAN_BATH(2)='../../Projects/Sandy/Sandy_swan_bathy_ref3.bot', SWAN_NUMX(1)=84, SWAN_NUMX(2)=116, SWAN_NUMY(1)=108, SWAN_NUMY(2)=79, CARTESIAN(1)=0, CARTESIAN(2)=0, comment out the swan grid (2) stuff and see if that might have caused some confusion.
Hi John, Thanks for your advise, I commented out the swan grid (2) stuff: ! 4) Enter SWAN information: ! -the name(s) of the SWAN grid file(s) for coords and bathy. ! -the size of the SWAN grids (full number of center points), and ! -if the swan grids are Spherical(set cartesian=0) or ! Cartesian(set cartesian=1). ! SWAN_COORD(1)='/public/home/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_coord.grd', !SWAN_COORD(2)='../../Projects/Sandy/Sandy_swan_coord_ref3.grd', SWAN_BATH(1)='/public/home/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_bathy.bot', !SWAN_BATH(2)='../../Projects/Sandy/Sandy_swan_bathy_ref3.bot', SWAN_NUMX(1)=84, !SWAN_NUMX(2)=116, SWAN_NUMY(1)=108, !SWAN_NUMY(2)=79, CARTESIAN(1)=0, !CARTESIAN(2)=0,
But it still do not work, the same error occurred:
Ngrid_roms= 0 Ngrid_swan= 1 Ngrid_ww3= 0 Ngrid_wrf = 3 Ngrid_hyd = 0 Common netcdf file is: scrip_pp1_doksuri.nc
Reading SWAN grids
forrtl: severe (24): end-of-file during read, unit 0, file /public/home/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_bathy.bot
Image PC Routine Line Source
scrip_coawst 0000000000491273 forio_return Unknown Unknown
scrip_coawst 00000000004AAE39 for_read_seq_lis Unknown Unknown
scrip_coawst 0000000000416C6E Unknown Unknown Unknown
scrip_coawst 0000000000483E31 Unknown Unknown Unknown
scrip_coawst 000000000040A79E Unknown Unknown Unknown
libc-2.17.so 00002B26ED91D445 libc_start_main Unknown Unknown
scrip_coawst 000000000040A6A9 Unknown Unknown Unknown
Do you have idea there about something else wrong that is causing the error? Thanks for your time again!
Hi John, Problem solved, thanks for the reply :)
nice !
Hi John, I am sorry to bother you again, there is still a error about my scrip_coawst. Today I tried one more thing: converting the wrfinputd02 file to roms_grid.nc by wrf2roms_mw, and importing roms_grid.nc into GridBuilder to add mask and depth, with the depth coming from https://download.gebco.net/. Finally use the roms2swan.m to get the input grid file of SWAN, where the size of the SWAN grids is (120, 130). Then I ran . /scrip_coawst.exe and got the same error as before, so I reduced the SWAN_NUMX(1) and SWAN_NUMY(1) in scrip.in to (110, 120), the ./scrip_coawst ran successfully, which is odd, but eventually Hwave is found to be a value of 0 for most of the region in the wrfout_d02 generated by .coawstM.
It should be emphasized that I'm trying to set up 3 nests of WRF, the innermost layer being moving nesting, and I have the domain image uploaded, is the root of all this a problem that I'm having trouble setting up the regions for both models? Does this setup make sense? I'm setting it up this way because I want to keep an eye on the d02 weather field and wave field while simulating a typhoon.
@jcwarner-usgs
Hello all, I am running the wrf-swan coupling case in coawst system, I want to set up 3 nests of WRF simulation area (2 static+1 moving) and 1 nest of SWAN simulation area, where the SWAN area is converted from the d02 of WRF area (by wrf2roms_mw then add mask and depth by GridBuilder), after a series of mesh variables processing, I input the files into the scrip_coawst.in, and I encountered the following error, is it because the 3 layers of wrf area + 1 layer of swan area are not supported in coawst? Please see the attached document for the relevant documents, please make suggestions for me and thank everyone who has helped me!
Error information:
Read input_file for SCRIP_COAWST Wrapper
================================================ Ngrid_roms= 0 Ngrid_swan= 1 Ngrid_ww3= 0 Ngrid_wrf = 3 Ngrid_hyd = 0 Common netcdf file is: scrip_pp1_doksuri.nc
Number of netcdf subgroups 6 Input SWAN grid 1 = /public/home/202234281089/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_coord.grd Input SWAN bath 1 = /public/home/202234281089/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_bathy.bot Cartesian input In meters= 0 Input WRF grid 1 = /public/home/202234281089/COAWST_WRFonly/WRF/test/em_real_2ways_2305Doksuri/wrfinput_d01 Input WRF grid 2 = /public/home/202234281089/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/wrfinput_d01 Input WRF grid 3 = moving
Reading SWAN grids forrtl: severe (24): end-of-file during read, unit 0, file /public/home/202234281089/COAWST_V3.8/Projects/PP1_MOV_2305DOKSURI/swan_bathy.bot Image PC Routine Line Source
scrip_coawst 0000000000491273 forio_return Unknown Unknown scrip_coawst 00000000004AAE39 for_read_seq_lis Unknown Unknown scrip_coawst 0000000000416C6E Unknown Unknown Unknown scrip_coawst 0000000000483E31 Unknown Unknown Unknown scrip_coawst 000000000040A79E Unknown Unknown Unknown libc-2.17.so 00002B18F0773445 libc_start_main Unknown Unknown scrip_coawst 000000000040A6A9 Unknown Unknown Unknown
files.zip