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

Error when FreqUnits set to never in InitialState stream #181

Closed
xylar opened this issue Dec 5, 2024 · 5 comments · Fixed by #184
Closed

Error when FreqUnits set to never in InitialState stream #181

xylar opened this issue Dec 5, 2024 · 5 comments · Fixed by #184
Assignees
Labels
bug Something isn't working

Comments

@xylar
Copy link

xylar commented Dec 5, 2024

I am trying to do a restart run. When I have:

    InitialState:
      UsePointerFile: false
      Filename: init.nc
      Mode: read
      Precision: double
      Freq: 1
      FreqUnits: never
      UseStartEnd: false
      Contents:
      - State
      - Tracers

I am seeing:

$ cat omega.log

[* info] [TimeMgr.cpp:1218] Omega using calendar type: No Leap
[* warning] [IOStream.cpp:527] Stream InitialState has IO frequency of never and will be skipped
[* info] [Tracers.cpp:46] Tracers::init() called
[* error] [IOStream.cpp:252] Unable to read stream InitialState. Stream not defined
[* critical] [OceanInit.cpp:182] Error reading the initial state file
[* critical] [OceanInit.cpp:56] ocnInit: Error initializing Omega modules
[* error] [OceanDriver.cpp:32] Error initializing OMEGA
[* info] [Tracers.cpp:249] Tracers::clear() called
[* error] [OceanDriver.cpp:61] OMEGA terminating due to error

@xylar xylar added the bug Something isn't working label Dec 5, 2024
@xylar
Copy link
Author

xylar commented Dec 5, 2024

This is on Chrysalis (with Intel). My directory is:

/lcrc/group/e3sm/ac.xylar/polaris_0.5/chrysalis/test_20241205/omega_cosine_bell_restart/ocean/spherical/icos/cosine_bell/restart/restart_run

I'm using the latest develop.

My full YAML is:

Omega:
  TimeIntegration:
    CalendarType: No Leap
    TimeStepper: RungeKutta4
    TimeStep: 0000_00:24:00.000
    StartTime: 0001-01-01_00:24:00
    StopTime: none
    RunDuration: 0000_00:24:00.000
  Dimension:
    NVertLevels: 1
  Decomp:
    HaloWidth: 3
    DecompMethod: MetisKWay
  State:
    NTimeLevels: 2
  Advection:
    FluxThicknessType: Center
    FluxTracerType: Center
  Tendencies:
    ThicknessFluxTendencyEnable: false
    PVTendencyEnable: false
    KETendencyEnable: false
    SSHTendencyEnable: false
    VelDiffTendencyEnable: false
    ViscDel2: 1.0e3
    VelHyperDiffTendencyEnable: false
    ViscDel4: 1.2e11
    TracerHorzAdvTendencyEnable: true
    TracerDiffTendencyEnable: false
    EddyDiff2: 10.0
    TracerHyperDiffTendencyEnable: false
    EddyDiff4: 0.0
  Tracers:
    Base: [Temperature, Salinity]
    Debug: [Debug1, Debug2, Debug3]
  IOStreams:
    # InitialState should only be used when starting from scratch
    # After the simulations initial start, the frequency should be
    # changed to never so that the initial state file is not read.
    InitialState:
      UsePointerFile: false
      Filename: init.nc
      Mode: read
      Precision: double
      Freq: 1
      FreqUnits: never
      UseStartEnd: false
      Contents:
      - State
      - Tracers
    RestartRead:
      UsePointerFile: false
      PointerFilename: ocn.pointer
      Mode: read
      Precision: double
      Freq: 1
      FreqUnits: OnStartup
      UseStartEnd: true
      StartTime: 0001-01-01_00:24:00
      EndTime: 99999-12-31_00:00:00
      Contents:
      - Restart
      Filename: ../restarts/rst.$Y-$M-$D_$h.$m.$s
    RestartWrite:
      UsePointerFile: false
      PointerFilename: ocn.pointer
      Filename: ../restarts/rst.$Y-$M-$D_$h.$m.$s
      Mode: write
      IfExists: replace
      Precision: double
      Freq: 1
      FreqUnits: seconds
      UseStartEnd: false
      Contents:
      - Restart
    History:
      UsePointerFile: false
      Filename: output.nc
      Mode: write
      IfExists: replace
      Precision: double
      Freq: 1440
      FreqUnits: seconds
      UseStartEnd: false
      Contents:
      - Tracers
      - LayerThickness
      - NormalVelocity

@xylar
Copy link
Author

xylar commented Dec 5, 2024

@philipwjones, I'm afraid this might be another one for you.

@xylar
Copy link
Author

xylar commented Dec 5, 2024

A fix for this is needed for E3SM-Project/polaris#251

@philipwjones
Copy link

@xylar Streams is the gift that keeps on giving...this is actually the same base issue as the missing RestartRead since we don't bother creating the stream if the frequency is never and then Init tries to read the stream later. I'm working on a mod that should fix both. Sorry for the ongoing issues.

@xylar
Copy link
Author

xylar commented Dec 5, 2024

@philipwjones, absolutely no worries. I'm having a lot of fun figuring out how to make Polaris work with Omega. I'm making lots of mistakes along the way and then very occasionally discovering things that are actually bugs and not me messing things up. 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants