Hi all
I am using the new tool mksurfdata in CTSM5.2 in Archer2 to generate regional surface data in high-resolution from raw data.
The workflow is
>ncl mkscripgrid.ncl
>${ESMF}/ESMF_Scrip2Unstruct ${GRID} lnd_mesh.nc 0
>ncap2 -s 'elementMask(:)=0' lnd_mesh.nc mask_mesh.nc
>ncdump -v grid_dims ${GRID} # to get nx and ny: grid_dims = 36, 25
>
./gen_mksurfdata_namelist --start-year ${START_YEAR} --end-year ${END_YEAR} --res ${RES} --model-mesh ${FORCE_MODEL_MESH_FILE} --model-mesh-nx ${FORCE_MODEL_MESH_NX} --model-mesh-ny ${FORCE_MODEL_MESH_NY} --res ${RES} --rawdata-dir ${INPUT_PATH}
>
./gen_mksurfdata_jobscript_single --debug --number-of-nodes ${NUMBER_OF_NODES} --tasks-per-node ${TASKS_PER_NODE} --namelist-file ${OUTPUT}/surfdata.namelist --bld-path ${BLD_PATH} --machine ${MACH} --walltime ${WALLTIME}
The job stopped after
mksrfdata writing LANDFRAC_MKSURFDATA.
The slurm log is:
Attempting to initialize control settings .....
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error is rather simple so I could not target any specific error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error is:
#0 0x151d06a4ed4f in ???
#0 0x14d795ac3d4f in ???
#1 0x435576 in __mkglcmecmod_MOD_mkglcmecinit
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mkglcmecMod.F90:103
#1 0x435576 in __mkglcmecmod_MOD_mkglcmecinit
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mkglcmecMod.F90:103
#2 0x496907 in mksurfdata
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:793
#3 0x49cc33 in main
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:88
#2 0x496907 in mksurfdata
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:793
#3 0x49cc33 in main
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:88
srun: error: nid002519: task 1: Segmentation fault
srun: launch/slurm: _step_signal: Terminating StepId=6535670.0
slurmstepd: error: *** STEP 6535670.0 ON nid002519 CANCELLED AT 2024-05-10T17:04:51 ***
srun: error: nid002519: task 0: Segmentation fault
When I check the source code, the next thing to do is:
! ----------------------------------------------------------------------
! Make glacier multiple elevation classes [pctglcmec,topoglcmec] from [fglacier] dataset
! ----------------------------------------------------------------------
! This call needs to occur after pctgla has been adjusted for the final time
if (fsurdat /= ' ') then
call mkglcmecInit (pioid)
call mkglcmec(mksrf_fglacier_mesh, mksrf_fglacier, mesh_model, pioid, rc=rc)
flush(ndiag)
if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkglcmec')
end if
Shall I generate a glacier mesh (actually I do not know how to generate)? I just had a lnd_mesh.nc and msk_mesh.nc now.
I am not sure if I did not build mksurfdata correctly or ant command step was wrong. Thanks for any comments.
Best,
Yuan
I am using the new tool mksurfdata in CTSM5.2 in Archer2 to generate regional surface data in high-resolution from raw data.
The workflow is
>ncl mkscripgrid.ncl
>${ESMF}/ESMF_Scrip2Unstruct ${GRID} lnd_mesh.nc 0
>ncap2 -s 'elementMask(:)=0' lnd_mesh.nc mask_mesh.nc
>ncdump -v grid_dims ${GRID} # to get nx and ny: grid_dims = 36, 25
>
./gen_mksurfdata_namelist --start-year ${START_YEAR} --end-year ${END_YEAR} --res ${RES} --model-mesh ${FORCE_MODEL_MESH_FILE} --model-mesh-nx ${FORCE_MODEL_MESH_NX} --model-mesh-ny ${FORCE_MODEL_MESH_NY} --res ${RES} --rawdata-dir ${INPUT_PATH}
>
./gen_mksurfdata_jobscript_single --debug --number-of-nodes ${NUMBER_OF_NODES} --tasks-per-node ${TASKS_PER_NODE} --namelist-file ${OUTPUT}/surfdata.namelist --bld-path ${BLD_PATH} --machine ${MACH} --walltime ${WALLTIME}
The job stopped after
mksrfdata writing LANDFRAC_MKSURFDATA.
The slurm log is:
Attempting to initialize control settings .....
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error is rather simple so I could not target any specific error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error is:
#0 0x151d06a4ed4f in ???
#0 0x14d795ac3d4f in ???
#1 0x435576 in __mkglcmecmod_MOD_mkglcmecinit
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mkglcmecMod.F90:103
#1 0x435576 in __mkglcmecmod_MOD_mkglcmecinit
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mkglcmecMod.F90:103
#2 0x496907 in mksurfdata
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:793
#3 0x49cc33 in main
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:88
#2 0x496907 in mksurfdata
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:793
#3 0x49cc33 in main
at /work/n02/n02/yuansun/cesm/my_cesm_sandbox_ctsm5.2/tools/mksurfdata_esmf/src/mksurfdata.F90:88
srun: error: nid002519: task 1: Segmentation fault
srun: launch/slurm: _step_signal: Terminating StepId=6535670.0
slurmstepd: error: *** STEP 6535670.0 ON nid002519 CANCELLED AT 2024-05-10T17:04:51 ***
srun: error: nid002519: task 0: Segmentation fault
When I check the source code, the next thing to do is:
! ----------------------------------------------------------------------
! Make glacier multiple elevation classes [pctglcmec,topoglcmec] from [fglacier] dataset
! ----------------------------------------------------------------------
! This call needs to occur after pctgla has been adjusted for the final time
if (fsurdat /= ' ') then
call mkglcmecInit (pioid)
call mkglcmec(mksrf_fglacier_mesh, mksrf_fglacier, mesh_model, pioid, rc=rc)
flush(ndiag)
if (ChkErr(rc,__LINE__,u_FILE_u)) call shr_sys_abort('error in calling mkglcmec')
end if
Shall I generate a glacier mesh (actually I do not know how to generate)? I just had a lnd_mesh.nc and msk_mesh.nc now.
I am not sure if I did not build mksurfdata correctly or ant command step was wrong. Thanks for any comments.
Best,
Yuan