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

History Append Output is Broken on Develop #2487

Closed
mathomp4 opened this issue Dec 11, 2023 · 3 comments
Closed

History Append Output is Broken on Develop #2487

mathomp4 opened this issue Dec 11, 2023 · 3 comments
Assignees
Labels
🪲 Bug Something isn't working

Comments

@mathomp4
Copy link
Member

The nightly SCM tests have been going a bit wonky and I looked with @bena-nasa and it looks like the history append functionality is broken in develop. That is, if you run with duration: 000000 it no longer appends, but writes every frequency.

Something most likely happened in History GridComp:

main...develop#diff-0c9f15d29823f78a5dbd243a38a4d15479631b4143b114eba4bcbc095255b353

and most changes from @metdyn are protected by if blocks. But one:

         list(n)%currentFile = filename(n)

at line 3609 is not and maybe that is causing the issue?

I'll assign to @bena-nasa so he can take a look

@mathomp4 mathomp4 added the 🪲 Bug Something isn't working label Dec 11, 2023
@mathomp4
Copy link
Member Author

mathomp4 commented Dec 11, 2023

Here is how the SCM runs its history (see full file at /gpfsm/dnb44/mathomp4/SystemTests/runs/SCM_MAPLDEV/CURRENT/run/arm_97jul/HISTORY.rc)

GRID_LABELS: SCMGRID
::

SCMGRID.GRID_TYPE: LatLon
SCMGRID.LM: 72
SCMGRID.IM_WORLD: 1
SCMGRID.JM_WORLD: 1
SCMGRID.POLE: 'XY'
SCMGRID.DATELINE: 'XY'
SCMGRID.LON_RANGE: -100 -95
SCMGRID.LAT_RANGE: 34 38
...
  geosscm_multi.template:  '%y4%m2%d2%h2.nc4',
  geosscm_multi.archive:   '%c/Y%y4/M%m2',
  geosscm_multi.format:    'CFIO',
  geosscm_multi.mode:      'time-averaged',
  geosscm_multi.grid_label: SCMGRID,
  geosscm_multi.frequency:  003000,
  geosscm_multi.duration:   000000,
  geosscm_multi.ref_time:   233000,
  geosscm_multi.vscale:      100.0,
  geosscm_multi.vunit:     'hPa',
  geosscm_multi.vvars:     'log(PLE)' , 'DYN'          ,
  geosscm_multi.levels:     1000 975 950 925 900 875 850 825 800 775 750 725 700 650 600 550 500 450 400 350 300 250 200 150 100 70 50,
  geosscm_multi.fields:   'PL'      , 'DYN'         ,
                          'T'       , 'DYN'         ,
                          'TOBS'    , 'DYN'         ,
                          'QOBS'    , 'DYN'         ,
                          'Q'       , 'MOIST'       , 'QV',
                          'QL'      , 'MOIST'       ,
                          'FCLD'    , 'MOIST'       , 'CLOUD',
                          'CNV_MFC' , 'MOIST'       , 'MU' ,
                          'TIT'     , 'PHYSICS'     , 'TDT_TURB',
                          'TIM'     , 'PHYSICS'     , 'TDT_MOIST',
                          'RADLW'   , 'RADIATION'   , 'TDT_LW',
                          'RADSW'   , 'RADIATION'   , 'TDT_SW',
                          'DTDTDYN' , 'DYN'         , 'TDT_LS',
                          'QVIT'    , 'PHYSICS'     , 'QDT_TURB',
                          'DQDT'    , 'MOIST'       , 'QDT_MOIST',
                          'DQVDTDYN', 'DYN'         , 'QDT_LS',
                          'DQLDT'   , 'MOIST'       , 'WDT_MOIST',
                          ::

Obviously the grid is weird but I can duplicate the append issue even with, say, geosgcm_prog

@bena-nasa
Copy link
Collaborator

bena-nasa commented Dec 11, 2023

Looks like this line that recently came into develop:
https://github.com/GEOS-ESM/MAPL/blob/develop/gridcomps/History/MAPL_HistoryGridComp.F90#L3609
Is the problem, the current file is being set every step to whatever the file template evaluates to that step. Looks like @metdyn added this line. But it needs to protected for whatever sampler use case needed this or just removed

@metdyn
Copy link
Contributor

metdyn commented Dec 11, 2023

Thank you, @mathomp4 and @bena-nasa, the Line 3609 is introduced unprotected and it should not be there. Deleting it should not affect the sampler code, I think.

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

No branches or pull requests

3 participants