ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
310 stars 314 forks source link

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

Open slevis-lmwg opened 1 month ago

slevis-lmwg commented 1 month ago

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

Definition of Done:

slevis-lmwg commented 3 weeks ago

May help to revisit #1796?