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

Cannot write cpl aux hist files due to bug in format statement #2504

Closed
billsacks opened this issue Apr 26, 2018 · 3 comments · Fixed by #2530
Closed

Cannot write cpl aux hist files due to bug in format statement #2504

billsacks opened this issue Apr 26, 2018 · 3 comments · Fixed by #2530

Comments

@billsacks
Copy link
Member

When trying to write a coupler auxiliary history file, I got this death:

1:forrtl: severe (27): too many records in I/O statement, unit -5, file Internal Formatted Write
1:Image              PC                Routine            Line        Source
1:cesm.exe           000000000196C2EC  Unknown               Unknown  Unknown
1:cesm.exe           00000000019C4D0D  Unknown               Unknown  Unknown
1:cesm.exe           00000000004BFF0D  seq_hist_mod_mp_s        1153  seq_hist_mod.F90
1:cesm.exe           000000000040F671  cime_comp_mod_mp_        3761  cime_comp_mod.F90
1:cesm.exe           0000000000424942  MAIN__                    103  cime_driver.F90

The problem is that, in the following, a6 should be 6a:

write(hist_file(found), "(a6)") &
trim(case_name),'.cpl.h',trim(aname),'.',trim(date_str), '.nc'

I'll fix this in the course of fixing #2446 .

cc @jedwards4b

@rljacob
Copy link
Member

rljacob commented May 2, 2018

@bishtgautam does the land group use auxilary cpl hist files for land spinups?

@bishtgautam
Copy link
Contributor

Yes, ELM is using cpl history files for offline BGC spinup.

@billsacks
Copy link
Member Author

@bishtgautam you'll need billsacks@4cc4f2b in your release branch.

billsacks added a commit that referenced this issue May 4, 2018
Fix generation and use of forcing data for T compsets

Both the generation and use of forcing data for T compsets (glc-only,
typically forced by cplhist output) have been somewhat broken for a long
time. This PR fixes both the generation and use of this cplhist dlnd
forcing data.

I have confirmed that this is working properly by running companion I
and T compset cases, where I generate data from the I compset and then
use it in the T compset (making sure that the processor count is the
same for the T compset as for the I compset):

- Generating data from a 3-year run of I1850Clm50Sp at resolution
  f10_f10_musgs with histaux_l2x1yrg = .true. and
  histaux_double_precision = .true., then running 3 years of T1850G with
  `./xmlchange CISM_EVOLVE=FALSE`, I get bit-for-bit results.

- When I instead used I1850Clm50SpG (which has ice evolution turned on),
  and ran the T1850G compset with `glc_renormalize_smb = 'on'`, I got
  bit-for-bit results for the first 2 years, but then roundoff-level
  differences in qice forcing in many grid cells in year 3 (and thus
  small differences in many CISM fields in year 3). Since the
  differences were only roundoff-level, I did not pursue this further.

Test suite:
- scripts_regression_tests on hobart (ran from cdd1686)
- aux_cime_baselines from cesm2_0_alpha10e (compared this cime branch
  with the version of master on which it was based: 974839b)
  - Tests pass except for two that failed in the baseline:
    ERP_D_Ld10.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_decStart
    and SMS_N3_PM3_Ld2.f19_g17.BHISTWs.cheyenne_gnu.allactive-defaultio
  - NLCOMP failures as expected
  - BASELINE comparisons bit-for-bit except for
    SMS_Ly2.f09_g16_gl20.T1850G.cheyenne_intel, as expected
- SMS_Ly3.f09_g17_gl4.T1850G.hobart_intel from ESCOMP/CISM-wrapper@bc15238
- SMS_D_Ld3.f09_f09_mg17.A1850DLND.hobart_intel
  - Note: This out-of-the-box A1850DLND case passes. However, if I set
    GLC_NEC to 0 (as suggested by @mvertens), this fails (despite
    passing on master). I think this is because runs with GLC_NEC=0 now
    have no fields listed in the streams file. This seems okay to me:
    running A1850DLND with a manual setting of GLC_NEC=0 seems like a
    non-sensical thing to do in practice. (This was more important in
    the past when GLC_NEC=0 was the default; now GLC_NEC=10 is the
    default.)

Test baseline: N/A
Test namelist changes: Namelists will differ for cases with dlnd
Test status: climate changing for cases with dlnd (T compsets), should
  otherwise be bit-for-bit

Fixes #2446
Fixes #2504

User interface changes?:
- Renamed drv namelist variable histaux_l2x1yr to histaux_l2x1yrg to
  denote that it's just for glc fields (following the naming convention
  used for histaux_a2x3hrp)
- Added drv namelist variable histaux_double_precision: if true, use
  double-precision rather than single-precision for coupler auxiliary
  history files

Update gh-pages html (Y/N)?: Y

Code review: Mariana Vertenstein
rljacob pushed a commit to E3SM-Project/E3SM that referenced this issue Apr 12, 2021
rljacob pushed a commit to E3SM-Project/E3SM that referenced this issue Apr 12, 2021
Fix generation and use of forcing data for T compsets

Both the generation and use of forcing data for T compsets (glc-only,
typically forced by cplhist output) have been somewhat broken for a long
time. This PR fixes both the generation and use of this cplhist dlnd
forcing data.

I have confirmed that this is working properly by running companion I
and T compset cases, where I generate data from the I compset and then
use it in the T compset (making sure that the processor count is the
same for the T compset as for the I compset):

- Generating data from a 3-year run of I1850Clm50Sp at resolution
  f10_f10_musgs with histaux_l2x1yrg = .true. and
  histaux_double_precision = .true., then running 3 years of T1850G with
  `./xmlchange CISM_EVOLVE=FALSE`, I get bit-for-bit results.

- When I instead used I1850Clm50SpG (which has ice evolution turned on),
  and ran the T1850G compset with `glc_renormalize_smb = 'on'`, I got
  bit-for-bit results for the first 2 years, but then roundoff-level
  differences in qice forcing in many grid cells in year 3 (and thus
  small differences in many CISM fields in year 3). Since the
  differences were only roundoff-level, I did not pursue this further.

Test suite:
- scripts_regression_tests on hobart (ran from cdd1686)
- aux_cime_baselines from cesm2_0_alpha10e (compared this cime branch
  with the version of master on which it was based: 974839b)
  - Tests pass except for two that failed in the baseline:
    ERP_D_Ld10.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_decStart
    and SMS_N3_PM3_Ld2.f19_g17.BHISTWs.cheyenne_gnu.allactive-defaultio
  - NLCOMP failures as expected
  - BASELINE comparisons bit-for-bit except for
    SMS_Ly2.f09_g16_gl20.T1850G.cheyenne_intel, as expected
- SMS_Ly3.f09_g17_gl4.T1850G.hobart_intel from ESCOMP/CISM-wrapper@bc15238
- SMS_D_Ld3.f09_f09_mg17.A1850DLND.hobart_intel
  - Note: This out-of-the-box A1850DLND case passes. However, if I set
    GLC_NEC to 0 (as suggested by @mvertens), this fails (despite
    passing on master). I think this is because runs with GLC_NEC=0 now
    have no fields listed in the streams file. This seems okay to me:
    running A1850DLND with a manual setting of GLC_NEC=0 seems like a
    non-sensical thing to do in practice. (This was more important in
    the past when GLC_NEC=0 was the default; now GLC_NEC=10 is the
    default.)

Test baseline: N/A
Test namelist changes: Namelists will differ for cases with dlnd
Test status: climate changing for cases with dlnd (T compsets), should
  otherwise be bit-for-bit

Fixes ESMCI/cime#2446
Fixes ESMCI/cime#2504

User interface changes?:
- Renamed drv namelist variable histaux_l2x1yr to histaux_l2x1yrg to
  denote that it's just for glc fields (following the naming convention
  used for histaux_a2x3hrp)
- Added drv namelist variable histaux_double_precision: if true, use
  double-precision rather than single-precision for coupler auxiliary
  history files

Update gh-pages html (Y/N)?: Y

Code review: Mariana Vertenstein
rljacob pushed a commit to E3SM-Project/E3SM that referenced this issue Apr 21, 2021
rljacob pushed a commit to E3SM-Project/E3SM that referenced this issue Apr 21, 2021
Fix generation and use of forcing data for T compsets

Both the generation and use of forcing data for T compsets (glc-only,
typically forced by cplhist output) have been somewhat broken for a long
time. This PR fixes both the generation and use of this cplhist dlnd
forcing data.

I have confirmed that this is working properly by running companion I
and T compset cases, where I generate data from the I compset and then
use it in the T compset (making sure that the processor count is the
same for the T compset as for the I compset):

- Generating data from a 3-year run of I1850Clm50Sp at resolution
  f10_f10_musgs with histaux_l2x1yrg = .true. and
  histaux_double_precision = .true., then running 3 years of T1850G with
  `./xmlchange CISM_EVOLVE=FALSE`, I get bit-for-bit results.

- When I instead used I1850Clm50SpG (which has ice evolution turned on),
  and ran the T1850G compset with `glc_renormalize_smb = 'on'`, I got
  bit-for-bit results for the first 2 years, but then roundoff-level
  differences in qice forcing in many grid cells in year 3 (and thus
  small differences in many CISM fields in year 3). Since the
  differences were only roundoff-level, I did not pursue this further.

Test suite:
- scripts_regression_tests on hobart (ran from 024637618)
- aux_cime_baselines from cesm2_0_alpha10e (compared this cime branch
  with the version of master on which it was based: 4de3835)
  - Tests pass except for two that failed in the baseline:
    ERP_D_Ld10.f10_f10_musgs.IHistClm50BgcCrop.cheyenne_intel.clm-ciso_decStart
    and SMS_N3_PM3_Ld2.f19_g17.BHISTWs.cheyenne_gnu.allactive-defaultio
  - NLCOMP failures as expected
  - BASELINE comparisons bit-for-bit except for
    SMS_Ly2.f09_g16_gl20.T1850G.cheyenne_intel, as expected
- SMS_Ly3.f09_g17_gl4.T1850G.hobart_intel from ESCOMP/CISM-wrapper@bc15238
- SMS_D_Ld3.f09_f09_mg17.A1850DLND.hobart_intel
  - Note: This out-of-the-box A1850DLND case passes. However, if I set
    GLC_NEC to 0 (as suggested by @mvertens), this fails (despite
    passing on master). I think this is because runs with GLC_NEC=0 now
    have no fields listed in the streams file. This seems okay to me:
    running A1850DLND with a manual setting of GLC_NEC=0 seems like a
    non-sensical thing to do in practice. (This was more important in
    the past when GLC_NEC=0 was the default; now GLC_NEC=10 is the
    default.)

Test baseline: N/A
Test namelist changes: Namelists will differ for cases with dlnd
Test status: climate changing for cases with dlnd (T compsets), should
  otherwise be bit-for-bit

Fixes ESMCI/cime#2446
Fixes ESMCI/cime#2504

User interface changes?:
- Renamed drv namelist variable histaux_l2x1yr to histaux_l2x1yrg to
  denote that it's just for glc fields (following the naming convention
  used for histaux_a2x3hrp)
- Added drv namelist variable histaux_double_precision: if true, use
  double-precision rather than single-precision for coupler auxiliary
  history files

Update gh-pages html (Y/N)?: Y

Code review: Mariana Vertenstein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants