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

Support clm2 files #421

Merged
merged 2 commits into from
Apr 11, 2023
Merged

Support clm2 files #421

merged 2 commits into from
Apr 11, 2023

Conversation

chengzhuzhang
Copy link
Collaborator

@chengzhuzhang chengzhuzhang commented Apr 11, 2023

Add a second fix to this PR is to support clm2 files in zppy's ncclimo call.
Issue reported by @BunnyVon

ERROR: Invalid -P prc_typ option = clm2
HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs'

Notes from Charlie:
This issue occurs with output from EAM v1 and ELM v1, which use cam and clm2 , respectively, in the output filenames. For EAM v1, use -P cam (it seems like you tried this and it works fine). For ELM v1, use -P clm and ncclimo should automagically use clm2 in the filenames. The take-home message is that -P == --prc_typ actually specifies a "processing type" which is usually though not always the same as the associated string used in history file names. For --prc_typ=clm the string is clm2. In all other respects, -P elm and -P clm behave identically.

@chengzhuzhang chengzhuzhang requested a review from forsyth2 April 11, 2023 17:34
Copy link
Collaborator

@forsyth2 forsyth2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From visual inspection, this looks good. Thanks @chengzhuzhang!

@chengzhuzhang chengzhuzhang merged commit 51460d4 into main Apr 11, 2023
@chengzhuzhang chengzhuzhang deleted the support_clm2_files branch April 11, 2023 20:52
@BunnyVon
Copy link

@forsyth2 @chengzhuzhang , I ran into the same error when I was processing v1 land output clm2.h0. see the entire error messages below. I checked the file zppy/templates/ts.bash and found the changes in the PR is not in current latest e3sm_unified
ncclimo: WARNING ncclimo CLM/ELM output typically uses sub-gridscale (SGS) fractions that can only be properly renormalized if the SGS variable option to ncclimo is invoked, but that option was not invoked ncclimo: HINT Provide ncclimo with the SGS fraction variable using the "--sgs_frc=${sgs_frc_nm}" option, otherwise the regridded data will likely not be properly or conservatively regridded Climatology operations invoked with command: /lcrc/soft/climate/e3sm-unified/spack/e3sm_unified_1_10_0_chrysalis_gnu_openmpi/opt/spack/linux-rhel8-zen2/gcc-9.2.0/nco-5.2.4-gpymsbqu4mtxh6u2exxghiq6sgswi77c/bin/ncclimo --case=20181217.BDRD_CNPCTC20TR_OIBGC.ne30_oECv3.edison --jobs=4 --thr=1 --parallel=mpi --yr_srt=1850 --yr_end=2014 --input=/lcrc/globalscratch/ac.sfeng1/CBGCv1/BDRD_CNPCTC20TR_OIBGC.ne30_oECv3.edison/lnd/hist --map=/lcrc/group/e3sm/ac.sfeng1/maps/map_ne30np4_to_cmip6_180x360_aave.20181001.nc --output=trash --regrid=output --prc_typ=clm2 Started climatology generation at Fri Jun 14 17:51:20 CDT 2024 Running climatology script ncclimo from directory /lcrc/soft/climate/e3sm-unified/spack/e3sm_unified_1_10_0_chrysalis_gnu_openmpi/opt/spack/linux-rhel8-zen2/gcc-9.2.0/nco-5.2.4-gpymsbqu4mtxh6u2exxghiq6sgswi77c/bin NCO binaries version 5.2.4 from directory /lcrc/soft/climate/e3sm-unified/spack/e3sm_unified_1_10_0_chrysalis_gnu_openmpi/opt/spack/linux-rhel8-zen2/gcc-9.2.0/nco-5.2.4-gpymsbqu4mtxh6u2exxghiq6sgswi77c/bin Parallelism mode = mpi MPI parallelism processing monthly climos in 12/job_nbr = 12/4 = 3 sequential batches. Each batch is distributed to 4 nodes via round-robin scheduling and handles job_nbr = 4 months concurrently. Load-balancing occurs with unused nodes, if any. Producing standard climatology from raw input files in directory /lcrc/globalscratch/ac.sfeng1/CBGCv1/BDRD_CNPCTC20TR_OIBGC.ne30_oECv3.edison/lnd/hist Output files to directory trash Climatology from 165 years of contiguous raw data touching 165 calendar years from YYYYMM = 185001 to 201412 Input filenames will be constructed with CESM'ish or E3SM'ish conventions Each input file assumed to contain statistic for one month Winter statistics based on seasonally discontiguous December (jfd-mode): Means labeled as "DJF" are formed from JFD months from the same calendar year Annotation for CF climatology attribute and climatology_bounds variable will be performed This climatology will also be regridded Regridder will request 1 OpenMP threads to parallelize weight application across variables Generating climatology... Climatological monthly mean for month 1 ... Climatological monthly mean for month 2 ... Climatological monthly mean for month 3 ... Climatological monthly mean for month 4 ... Climatological monthly mean for month 5 ... Climatological monthly mean for month 6 ... Climatological monthly mean for month 7 ... Climatological monthly mean for month 8 ... Climatological monthly mean for month 9 ... Climatological monthly mean for month 10 ... Climatological monthly mean for month 11 ... Climatological monthly mean for month 12 ... Regrid monthly data... Climatological seasonal mean for MAM ... Climatological seasonal mean for JJA ... Climatological seasonal mean for SON ... Climatological seasonal mean for DJF ... ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' srun: error: chr-0498: task 0: Exited with exit code 1 srun: error: chr-0498: task 0: Exited with exit code 1 srun: error: chr-0498: task 0: Exited with exit code 1 srun: error: chr-0500: task 0: Exited with exit code 1 srun: error: chr-0500: task 0: Exited with exit code 1 srun: error: chr-0500: task 0: Exited with exit code 1 ERROR: Invalid -P prc_typ option = clm2 ERROR: Invalid -P prc_typ option = clm2 ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' srun: error: chr-0499: task 0: Exited with exit code 1 srun: error: chr-0499: task 0: Exited with exit code 1 srun: error: chr-0499: task 0: Exited with exit code 1 ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' ERROR: Invalid -P prc_typ option = clm2 HINT: Valid prc_typ arguments are 'airs', 'cam', 'clm', 'cice', 'cpl', 'ctsm', 'eam', 'eamxx', 'elm', 'hirdls', 'mali', 'mls', 'mod04', 'mpas', 'mpaso', 'mpasocean', 'mpascice', 'mpasseaice', 'mpassi', 'mwf', 'nil', 'rrg', and 'sgs' srun: error: chr-0497: task 0: Exited with exit code 1 srun: error: chr-0497: task 0: Exited with exit code 1 srun: error: chr-0497: task 0: Exited with exit code 1 ncclimo: ERROR monthly regrid cmd_rgr[1] failed. Debug this: srun --nodelist chr-0500 --nodes=1 ncremap -u .pid329718.climo.1.tmp --nco_opt="--no_tmp_fl --hdr_pad=10000" -t 1 -P clm2 --map=/lcrc/group/e3sm/ac.sfeng1/maps/map_ne30np4_to_cmip6_180x360_aave.20181001.nc trash/20181217.BDRD_CNPCTC20TR_OIBGC.ne30_oECv3.edison_01_185001_201401_climo.nc output/20181217.BDRD_CNPCTC20TR_OIBGC.ne30_oECv3.edison_01_185001_201401_climo.nc

@chengzhuzhang
Copy link
Collaborator Author

@BunnyVon thank you for troubleshooting. It does seem like this support was mistakenly dropped! I tried to track back and I think this change was accidentally reverted in this commit:a902549.

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

Successfully merging this pull request may close these issues.

3 participants