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

Pitfall using mksurdata_esmf options --model-mesh-nx NX --model-mesh-ny NY when using unstructured meshes #2847

Open
slevis-lmwg opened this issue Oct 25, 2024 · 0 comments
Assignees
Labels
bfb bit-for-bit next this should get some attention in the next week or two. Normally each Thursday SE meeting. size: small usability Improve or clarify user-facing options

Comments

@slevis-lmwg
Copy link
Contributor

This command creates a bad fsurdat file:
./gen_mksurfdata_namelist --start-year 1850 --end-year 1850 --res ne3np4 --model-mesh /glade/campaign/cesm/cesmdata/inputdata/share/meshes/ne3np4_ESMFmesh_c230714_cdf5.nc --model-mesh-nx 1 --model-mesh-ny 488
This command, where the mesh file's elementCount (here, 488) and the value 1 have been switched, creates a good fsurdat file:
./gen_mksurfdata_namelist --start-year 1850 --end-year 1850 --res ne3np4 --model-mesh /glade/campaign/cesm/cesmdata/inputdata/share/meshes/ne3np4_ESMFmesh_c230714_cdf5.nc --model-mesh-nx 488 --model-mesh-ny 1

The explanation is in this if-statement in subroutine check_namelist_input of the mksurfdata_esmf tool

    if (mksrf_fgrid_mesh_ny == 1) then
       outnc_1d = .true.
       outnc_dims = 1
    else
       outnc_1d = .false.
       outnc_dims = 2
    end if

We could come up with a series of checks to try to prevent users from experiencing this pitfall.

@slevis-lmwg slevis-lmwg self-assigned this Oct 25, 2024
@slevis-lmwg slevis-lmwg added next this should get some attention in the next week or two. Normally each Thursday SE meeting. bfb bit-for-bit usability Improve or clarify user-facing options size: small labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bfb bit-for-bit next this should get some attention in the next week or two. Normally each Thursday SE meeting. size: small usability Improve or clarify user-facing options
Projects
None yet
Development

No branches or pull requests

1 participant