Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make_quick_mosaic saves incorrect atmosXland grid file when creating a 1-dimension grid #281

Open
ceblanton opened this issue Mar 27, 2024 · 1 comment

Comments

@ceblanton
Copy link
Contributor

Describe the bug
Creating a 1-dimensional grid-spec (with make_hgrid appears to work, but the resulting output has no cells and cannot be read by a FMS-based model (Zetac).

To Reproduce

  1. make_hgrid --grid_type regular_lonlat_grid --nxbnds 2 --nybnds 2 --xbnd -3,3 --ybnd -3,3 --nlon 1200 --nlat 2
  2. make_solo_mosaic --num_tiles 1 --dir ./
  3. make_topog --mosaic solo_mosaic.nc --topog_type bowl --bottom_depth 0
  4. make_quick_mosaic --input_mosaic solo_mosaic.nc --mosaic_name grid_spec --ocean_topog /archive/fms/mom4/input_data/OCCAM_p2degree.nc

The atmos-land mosaic file has no cells,

ncdump -h atmos_mosaic_tile1Xland_mosaic_tile1.nc

netcdf atmos_mosaic_tile1Xland_mosaic_tile1 {
dimensions:
	string = 255 ;
	ncells = UNLIMITED ; // (0 currently)
	two = 2 

Expected behavior
The atmos x land mosaic file should have cells, and the grid-spec file should be able to be read by FMS shared code.

System Environment
any

Additional context
A previous workaround solution (from a former nctools developer) works,

https://github.com/ceblanton/FRE-NCtools/tree/sgarner

but the user has requested that the workaround be merged to the trunk.

@underwoo
Copy link
Member

underwoo commented Mar 28, 2024

The solution provided to the user CANNOT be merged to the trunk as is. The previous solution ensures a block of code (in an if block) always runs (using if (1 > 0)). We need to understand why the block is not getting executed in this user's instance, and ensure the user is running all tools in the workflow properly for what is desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants