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

Fix nuopc cap for radiation stress components #1272

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions model/src/w3iorsmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,7 @@ SUBROUTINE W3IORS ( INXOUT, NDSR, DUMFPI, IMOD, FLRSTRT )
TICE(1) = -1
TICE(2) = 0
TRHO(1) = -1
TRHO(2) = 0
TIC1(1) = -1
TIC1(2) = 0
TIC5(1) = -1
Expand Down
4 changes: 2 additions & 2 deletions model/src/wav_grdout.F90
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ subroutine initialize_gridout

! 6 Wave-ocean layer
gridoutdefs(6,1:25) = [ &
varatts( "SXY ", "SXX ", "Radiation stresses xx ", "N m-1 ", " ", .false.) , &
varatts( "SXY ", "SYY ", "Radiation stresses yy ", "N m-1 ", " ", .false.) , &
varatts( "SXX ", "SXX ", "Radiation stresses xx ", "N m-1 ", " ", .false.) , &
varatts( "SYY ", "SYY ", "Radiation stresses yy ", "N m-1 ", " ", .false.) , &
varatts( "SXY ", "SXY ", "Radiation stresses xy ", "N m-1 ", " ", .false.) , &
varatts( "TWO ", "TAUOX ", "Wave to ocean momentum flux x ", "m2 s-2 ", " ", .false.) , &
varatts( "TWO ", "TAUOY ", "Wave to ocean momentum flux y ", "m2 s-2 ", " ", .false.) , &
Expand Down
15 changes: 9 additions & 6 deletions model/src/wav_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ subroutine advertise_fields(importState, ExportState, flds_scalar_name, rc)
call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_vstokes')
else
call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_z0')
call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_wavsuu')
Copy link
Collaborator

Choose a reason for hiding this comment

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

@uturuncoglu should this be in the else for the cesm coupled? or should this be completely outside of this if/else statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@JessicaMeixner-NOAA I think those variables are not used by CESM but we are using under UFS Coastal. So, I did not want to change anything in CESM side by putting them outside of the if statement.

call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_wavsuv')
call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_wavsvv')
end if
call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_pstokes_x', ungridded_lbound=1, ungridded_ubound=3)
call fldlist_add(fldsFrWav_num, fldsFrWav, 'Sw_pstokes_y', ungridded_lbound=1, ungridded_ubound=3)
Expand Down Expand Up @@ -753,14 +756,14 @@ subroutine export_fields (gcomp, rc)
call CalcBotcur( va, wbcuru, wbcurv, wbcurp)
end if

if ( state_fldchk(exportState, 'wavsuu') .and. &
Copy link
Contributor Author

@uturuncoglu uturuncoglu Jul 16, 2024

Choose a reason for hiding this comment

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

@JessicaMeixner-NOAA @alperaltuntas I think this section is not working as it is since it is using different variable names in if statement and get field pointer part of the code. I am not sure this type coupling is tested under CESM or not but if it is running under CESM, I'll be surprised. So, I am not expecting any issue also in the CESM side.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@uturuncoglu okay let me know if you need anything from my side.

state_fldchk(exportState, 'wavsuv') .and. &
state_fldchk(exportState, 'wavsvv')) then
call state_getfldptr(exportState, 'sxxn', sxxn, rc=rc)
if ( state_fldchk(exportState, 'Sw_wavsuu') .and. &
state_fldchk(exportState, 'Sw_wavsuv') .and. &
state_fldchk(exportState, 'Sw_wavsvv')) then
call state_getfldptr(exportState, 'Sw_wavsuu', sxxn, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call state_getfldptr(exportState, 'sxyn', sxyn, rc=rc)
call state_getfldptr(exportState, 'Sw_wavsuv', sxyn, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call state_getfldptr(exportState, 'syyn', syyn, rc=rc)
call state_getfldptr(exportState, 'Sw_wavsvv', syyn, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call CalcRadstr2D( va, sxxn, sxyn, syyn)
end if
Expand Down
Loading