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

Integrate run fcst #270

Draft
wants to merge 21 commits into
base: uwtools_integration
Choose a base branch
from

Conversation

NaureenBharwaniNOAA
Copy link

@NaureenBharwaniNOAA NaureenBharwaniNOAA commented Nov 7, 2024

DESCRIPTION OF CHANGES:

Status update run_fcst:

  • Fork from SRW on the branch integrate-run-fcst.

  • Run dir on Hera, /scratch1/BMC/zrtrr/Naureen.Bharwani/SRW_uwtools_integration/ufs-srweather-app

  • Currently I’ve been trying to get a single test to pass, which is the grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_RRFS_v1beta fundamental test.

  • The task that currently fails is run_fcst_mem000.

  • The error I’m seeing is relating to the config_defaults, task_run_fcst section of the YAML within the namelist.update_values, namelist.update_values.fv_core_nml and module_config.update_values blocks.

The error I’m encountering:

[2024-11-07T14:32:02]     INFO Validating config against internal schema: fv3
[2024-11-07T14:32:02]    ERROR 8 UW schema-validation errors found in fv3 config
[2024-11-07T14:32:02]    ERROR Error at fv3 -> model_configure -> update_values -> write_groups:
[2024-11-07T14:32:02]    ERROR   !int is not of type 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> model_configure -> update_values -> write_tasks_per_group:
[2024-11-07T14:32:02]    ERROR   !int is not of type 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> nam_sfcperts:
[2024-11-07T14:32:02]    ERROR   {} should be non-empty
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> nrows_blend:
[2024-11-07T14:32:02]    ERROR   !int {{ grid_params.HALO_BLEND }} is not of type 'array', 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> target_lon:
[2024-11-07T14:32:02]    ERROR   !int -97.5 is not of type 'array', 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> stretch_fac:
[2024-11-07T14:32:02]    ERROR   !int 0.999 is not of type 'array', 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> target_lat:
[2024-11-07T14:32:02]    ERROR   !int 38.5 is not of type 'array', 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> nam_sppperts:
[2024-11-07T14:32:02]    ERROR   {} should be non-empty

Ideas for a solution:
After looking into the JSON Schema for fv3 driver and the namelist. I believe that we need to adjust the schema to allow type number for the entries above in the namelist block. This will allow floating point values to be accepted. With just the integer type it does not accept floating point values, although it does accept negative values. We might also need to add the individual keys to the fv3 schema itself since the namelist schema is shared by all drivers and this could cause users to give inappropriate values for other keys in different drivers. I tested it by adding to the namelist schema the type number. That didn't seem to fix the schema issue. With the same error appearing.

Resource on JSON Schema type number.

Type of change

  • New feature (non-breaking change which adds functionality)

TESTS CONDUCTED:

  • hera.intel
  • fundamental test suite, single fundamental test see above

Comment on lines +1824 to +1825
write_groups: !int '{{ task_run_fcst.WRTCMP_write_groups }}'
write_tasks_per_group: !int '{{ task_run_fcst.WRTCMP_write_tasks_per_group }}'
Copy link
Author

Choose a reason for hiding this comment

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

UW schema-validation error

[2024-11-07T14:32:02]    ERROR Error at fv3 -> model_configure -> update_values -> write_groups:
[2024-11-07T14:32:02]    ERROR   !int is not of type 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> model_configure -> update_values -> write_tasks_per_group:

Comment on lines +1852 to +1853
nam_sfcperts: {}
nam_sppperts: {}
Copy link
Author

Choose a reason for hiding this comment

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

UW schema-validation error

[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> nam_sfcperts:
[2024-11-07T14:32:02]    ERROR   {} should be non-empty

Copy link
Author

Choose a reason for hiding this comment

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

I previously had a fail run where nam_sfcperts and nam_sppperts were missing, but were required arguments for the test. I added these into the config_defaults as empty dictionaries since I wasn’t sure what the key / value pairs would look like and if they would be a dict. The test is failing for both of these keys because the value cannot be an empty dict.

- !int '{{ task_run_fcst.LAYOUT_Y }}'
bc_update_interval: !int '{{ task_get_extrn_lbcs.LBC_SPEC_INTVL_HRS }}'
gfs_physics_nml:
kice: !int '{{ 9 if workflow.SDF_USES_RUC_LSM else 2 }}'
Copy link
Author

Choose a reason for hiding this comment

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

This seems odd and I noticed when looking into the schema errors. Possibly this error fits with the arbitrary schema-validation error message

[2024-11-07T14:32:02]    ERROR   !int is not of type 'boolean', 'number', 'string'

Comment on lines +1838 to +1847
fv_core_nml:
target_lon: !int '{{ grid_params.LON_CTR }}'
target_lat: !int '{{ grid_params.LAT_CTR }}'
nrows_blend: !int '{{ grid_params.HALO_BLEND }}'
stretch_fac: !int '{{ grid_params.STRETCH_FAC }}'
npx: !int '{{ grid_params.NX + 1 }}'
npy: !int '{{ grid_params.NY + 1 }}'
layout:
- !int '{{ task_run_fcst.LAYOUT_X }}'
- !int '{{ task_run_fcst.LAYOUT_Y }}'
Copy link
Author

Choose a reason for hiding this comment

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

UW schema-validation errors

[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> nrows_blend:
[2024-11-07T14:32:02]    ERROR   !int {{ grid_params.HALO_BLEND }} is not of type 'array', 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> target_lon:
[2024-11-07T14:32:02]    ERROR   !int -97.5 is not of type 'array', 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> stretch_fac:
[2024-11-07T14:32:02]    ERROR   !int 0.999 is not of type 'array', 'boolean', 'number', 'string'
[2024-11-07T14:32:02]    ERROR Error at fv3 -> namelist -> update_values -> fv_core_nml -> target_lat:
[2024-11-07T14:32:02]    ERROR   !int 38.5 is not of type 'array', 'boolean', 'number', 'string'

ISEED_LSM_SPP: [ 9 ]
LSM_SPP_VAR_LIST: [ "smc", "vgf", "alb", "sal", "emi", "zol", "stc" ]
LSM_SPP_MAG_LIST: [ 0.017, 0.001, 0.001, 0.001, 0.001, 0.001, 0.2 ]
DO_LSM_SPP: false
Copy link
Author

Choose a reason for hiding this comment

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

This also needed to be added back in. I set the value as false to mimic what the value was previously.

#
#-----------------------------------------------------------------------
#
DO_SPP: false
Copy link
Author

Choose a reason for hiding this comment

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

Again, needed to be added back in.

@christinaholtNOAA
Copy link
Collaborator

Thanks for adding this summary here. I think there are some early-in-the-process gaps in how/where the values are referenced that are leading to Jinja expressions not being rendered. I can certainly look into those more closely.

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.

2 participants