What version of the code are you using?
CTSM5.2
Describe every step you took leading up to the problem:
I am preparing regional atmosphere data from external sources. The script to generate lnd_mesh and mask_mesh is below:
#!/bin/bash
# Yuan Sun, 2024-9-25, Manchester, UK
# This script is used for make surface region for manchester with esmf8.6.1
module load apps/binapps/anaconda3/2023.09
conda activate yuanenv
module load libs/gcc/nco/4.8.1
module load use.own
module load hdf5/1.12.3
export HOME=/mnt/iusers01/fatpou01/sees01/a16404ys
export CESM_ROOT=${HOME}/CESM
export TOOL_SCRIPT=$CESM_ROOT/my_cesm_sandbox_ctsm5.2/tools
export MACH=csf3
export ESMF=${HOME}/privatemodules_packages/${MACH}/apps/gcc/esmf/8.6.1/bin
export OUTPUT=${HOME}/scratch/output_analysis/project6/make_surface
export S_LAT=53.32
export N_LAT=53.69
export W_LON=-2.74
export E_LON=-1.9
export LOCATION=MCR
export CELL=0.01
export GRIDSIZE=001
export DATELABEL=c240925
export RES=${GRIDSIZE}x${GRIDSIZE}_${LOCATION}
export GRIDFILE=SCRIPgrid_${RES}_nomask_${DATELABEL}.nc
export NY=$(echo "(${N_LAT}-${S_LAT})/${CELL}" | bc)
export NX=$(echo "(${E_LON}-(${W_LON}))/(${CELL})" | bc)
cd ${TOOL_SCRIPT}/mkmapgrids
ncl mkscripgrid.ncl
export START_YEAR=2022
export END_YEAR=2022
export INPUT_PATH=${HOME}/scratch/Projects/inputdata
export FORCE_MODEL_MESH_FILE=${OUTPUT}/lnd_mesh_${LOCATION}.nc
export FORCE_MODEL_MESH_NX=${NX}
export FORCE_MODEL_MESH_NY=${NY}
export SCENARIO='SSP3-7.0'
${ESMF}/ESMF_Scrip2Unstruct ${GRIDFILE} lnd_mesh_${LOCATION}.nc 0
ncap2 -s 'elementMask(:)=0' lnd_mesh_${LOCATION}.nc mask_mesh_${LOCATION}.nc
Now I have three files 'lnd_mesh_MCR.nc', 'mask_mesh_MCR.nc', and 'SCRIPgrid_001x001_MCR_nomask_c240925.nc'. I have collected atmosphere data with seven required variables from regional simulations, then I am wondering how to make datm files.
It seems no tool is available to generate datm. Is making datm nc files with dimensions (time, lat, lon) and variables (time, lat, lon) enough?
Thanks for any suggestions.
Best,
Yuan
CTSM5.2
Describe every step you took leading up to the problem:
I am preparing regional atmosphere data from external sources. The script to generate lnd_mesh and mask_mesh is below:
#!/bin/bash
# Yuan Sun, 2024-9-25, Manchester, UK
# This script is used for make surface region for manchester with esmf8.6.1
module load apps/binapps/anaconda3/2023.09
conda activate yuanenv
module load libs/gcc/nco/4.8.1
module load use.own
module load hdf5/1.12.3
export HOME=/mnt/iusers01/fatpou01/sees01/a16404ys
export CESM_ROOT=${HOME}/CESM
export TOOL_SCRIPT=$CESM_ROOT/my_cesm_sandbox_ctsm5.2/tools
export MACH=csf3
export ESMF=${HOME}/privatemodules_packages/${MACH}/apps/gcc/esmf/8.6.1/bin
export OUTPUT=${HOME}/scratch/output_analysis/project6/make_surface
export S_LAT=53.32
export N_LAT=53.69
export W_LON=-2.74
export E_LON=-1.9
export LOCATION=MCR
export CELL=0.01
export GRIDSIZE=001
export DATELABEL=c240925
export RES=${GRIDSIZE}x${GRIDSIZE}_${LOCATION}
export GRIDFILE=SCRIPgrid_${RES}_nomask_${DATELABEL}.nc
export NY=$(echo "(${N_LAT}-${S_LAT})/${CELL}" | bc)
export NX=$(echo "(${E_LON}-(${W_LON}))/(${CELL})" | bc)
cd ${TOOL_SCRIPT}/mkmapgrids
ncl mkscripgrid.ncl
export START_YEAR=2022
export END_YEAR=2022
export INPUT_PATH=${HOME}/scratch/Projects/inputdata
export FORCE_MODEL_MESH_FILE=${OUTPUT}/lnd_mesh_${LOCATION}.nc
export FORCE_MODEL_MESH_NX=${NX}
export FORCE_MODEL_MESH_NY=${NY}
export SCENARIO='SSP3-7.0'
${ESMF}/ESMF_Scrip2Unstruct ${GRIDFILE} lnd_mesh_${LOCATION}.nc 0
ncap2 -s 'elementMask(:)=0' lnd_mesh_${LOCATION}.nc mask_mesh_${LOCATION}.nc
Now I have three files 'lnd_mesh_MCR.nc', 'mask_mesh_MCR.nc', and 'SCRIPgrid_001x001_MCR_nomask_c240925.nc'. I have collected atmosphere data with seven required variables from regional simulations, then I am wondering how to make datm files.
It seems no tool is available to generate datm. Is making datm nc files with dimensions (time, lat, lon) and variables (time, lat, lon) enough?
Thanks for any suggestions.
Best,
Yuan