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

trouble w/ the gust variables #448

Closed
jedwards4b opened this issue Apr 1, 2024 · 1 comment · Fixed by #452
Closed

trouble w/ the gust variables #448

jedwards4b opened this issue Apr 1, 2024 · 1 comment · Fixed by #452

Comments

@jedwards4b
Copy link
Collaborator

          @jedwards4b I'm having trouble w/ the gust variables again. I've made this change
index ad2eda90..1678238d 100644
--- a/mediator/med_phases_aofluxes_mod.F90
+++ b/mediator/med_phases_aofluxes_mod.F90
@@ -1717,10 +1717,6 @@ end subroutine med_aofluxes_map_ogrid2xgrid_input
     call fldbun_getfldptr(fldbun, 'So_duu10n', aoflux_out%duu10n, xgrid=xgrid, rc=rc)
     if (chkerr(rc,__LINE__,u_FILE_u)) return

-    call fldbun_getfldptr(fldbun, 'So_ugustOut', aoflux_out%ugust_out, xgrid=xgrid, rc=rc)
-    if (chkerr(rc,__LINE__,u_FILE_u)) return
-    call fldbun_getfldptr(fldbun, 'So_u10withGust', aoflux_out%u10_withGust, xgrid=xgrid, rc=rc)
-    if (chkerr(rc,__LINE__,u_FILE_u)) return
     call fldbun_getfldptr(fldbun, 'So_u10res', aoflux_out%u10res, xgrid=xgrid, rc=rc)
     if (chkerr(rc,__LINE__,u_FILE_u)) return
     call fldbun_getfldptr(fldbun, 'Faox_taux', aoflux_out%taux, xgrid=xgrid, rc=rc)
@@ -1752,8 +1748,12 @@ end subroutine med_aofluxes_map_ogrid2xgrid_input
     if (add_gusts) then
        call fldbun_getfldptr(fldbun, 'So_ugustOut', aoflux_out%ugust_out, xgrid=xgrid, rc=rc)
        if (chkerr(rc,__LINE__,u_FILE_u)) return
+       call fldbun_getfldptr(fldbun, 'So_u10withGust', aoflux_out%u10_withGust, xgrid=xgrid, rc=rc)
+       if (chkerr(rc,__LINE__,u_FILE_u)) return
+
     else
        allocate(aoflux_out%ugust_out(lsize)); aoflux_out%ugust_out(:) = 0._R8
+       allocate(aoflux_out%u10_withGust(lsize)); aoflux_out%u10_withGust(:) = 0._R8
     end if

   end subroutine set_aoflux_out_pointers

Which I think I can fix. It seems the last gust PR created a duplicate line for getting the So_ugustOut fldptr. But I think putting them both inside the use_gusts works.

I'm not sure what to do with the So_u10res pointer. Is that always used regardless of whether gusts are included or not?

Originally posted by @DeniseWorthen in #447 (comment)

@jedwards4b
Copy link
Collaborator Author

@DeniseWorthen I've opened a new issue for this - I really don't understand why you are posting it to #447 since that PR has nothing to do with wind gusts.

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 a pull request may close this issue.

1 participant