Closed gnalbat closed 1 year ago
that is kinda strange. if you can put the grids somewhere, i can give it try. -j
that is kinda strange. if you can put the grids somewhere, i can give it try. -j
Hi, I have uploaded them here: https://drive.google.com/drive/folders/1B-632UPbBiHzPEJlt0mZMQS8iuG1odXL
ok i found the issue. when scrip is reading the roms child grid, it wants
ncstat=nf_get_att_int(nc_file_id,NF_GLOBAL, &
& 'parent_Imin',ngrd_rm(mo)%istr_o)
it actually needs: parent_Imin parent_Imax parent_Jmin parent_Jmax parent_refine_factor
I see your child grid has donor_Imin = 15 donor_Imax = 155 donor_Jmin = 50 donor_Jmax = 260 sampling_factor = 1
then i see in coarse2fine: if (Gfactor == 1) status = nc_attadd(Gout, 'donor_grid', Ginp); if (status ~= 0), return, end
status = nc_attadd(Gout, 'donor_Imin', int32(Imin)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'donor_Imax', int32(Imax)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'donor_Jmin', int32(Jmin)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'donor_Jmax', int32(Jmax)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'sampling_factor', int32(Gfactor)); if (status ~= 0), return, end else status = nc_attadd(Gout, 'parent_grid', Ginp); if (status ~= 0), return, end
status = nc_attadd(Gout, 'parent_Imin', int32(Imin)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'parent_Imax', int32(Imax)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'parent_Jmin', int32(Jmin)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'parent_Jmax', int32(Jmax)); if (status ~= 0), return, end
status = nc_attadd(Gout, 'refine_factor', int32(Gfactor)); if (status ~= 0), return, end end
I am not sure why it is set that way. But you have Gfactor = 1. so it is not really a refinement. I suppose you could change the child netcdf attirbutes to be the parent_*, or you could change the read_roms.f from
ncstat=nf_get_att_int(nc_file_id,NF_GLOBAL, &
& 'parent_Imin',ngrd_rm(mo)%istr_o)
ncstat=nf_get_att_int(nc_file_id,NF_GLOBAL, &
& 'parent_Imax',ngrd_rm(mo)%iend_o)
ncstat=nf_get_att_int(nc_file_id,NF_GLOBAL, &
& 'parent_Jmin',ngrd_rm(mo)%jstr_o)
ncstat=nf_get_att_int(nc_file_id,NF_GLOBAL, &
& 'parent_Jmax',ngrd_rm(mo)%jend_o)
ncstat=nf_get_att_int(nc_file_id,NF_GLOBAL, &
& 'refine_factor',ngrd_rm(mo)%ref_fac)
to use the donor_Imin, donor_Imax , donor_Jmin , donor_Jmax , and sampling_factor and recompile. do you know what i mean?
-j
Yes, I got it. Sorry about that, I was using another program to make the grids.
Thank you, closing the issue now.
Hi, I'm trying to run SCRIP for 2 nested ROMS grids and 1 WRF grid but I get the following error:
The
Attribute not found
error does not occur when only using one of the ROMS grid (either the coarse or the refinement grid), so I'm at loss to where the issue comes from. As expected running the coupled model with the incorrect weights leads toMCT::m_SparseMatrixPlus::initFromRoot_:: FATAL--length of vector y different from row count of sMat.Length of y = 96748 Number of rows in sMat = 30104
, so I would like to get any idea on why the attribute not found error occurs and a possible solution. Both the ROMS and WRF models work standalone.Here is my scrip.in:
And I can send my grid files if needed. Thank you for any help!