General scientific issues regarding ROMS
Moderators: arango, robertson
- Posts: 2
- Joined: Wed Nov 30, 2016 11:18 pm
- Location: Duke University
I am using COAWST on an idealized application where I would like to prescribe an analytic diurnal shortwave and longwave radiation flux, but seem to be getting a compilation error from ROMS (so I hope this question is appropriate here). I am able to compile and successfully run the model with the cppdefs
Code: Select all
but when I try to include
the code will not compile, producing the following error
& FORCES(ng) % lrflx)
Error: ‘lrflx’ at (1) is not a member of the ‘t_forces’ structure
Is there a way around this error besides providing forcing via #BULK FLUXES? I've attached my header file for reference in case that is illuminating. Thanks in advance for the help!
- (1.85 KiB) Downloaded 62 times
- Posts: 1015
- Joined: Wed Dec 31, 2003 6:16 pm
- Location: USGS, USA
here is what's happening.
You defined solar_source, and in globaldefs there is :
#if defined LMD_SKPP || defined SOLAR_SOURCE || \
defined BULK_FLUXES || defined BIOLOGY
# define SHORTWAVE
so with shortwave now automatically defined, we go to mod_forces we have
# ifdef SHORTWAVE
real(r8), pointer :: srflx(:,:)
so the array srflx is active, all is good.
But for longwave the lrflx is not automatically set. In mod_forces we have
# ifdef BULK_FLUXES
real(r8), pointer :: lhflx(:,:)
real(r8), pointer :: lrflx(:,:)
# ifndef LONGWAVE
real(r8), pointer :: lrflxG(:,:,:)
this is the same in all the codes.
I am not sure the best way to solve the issue. Perhaps you could compute the total heat fluxes and use ana_stflux (itemp)??
- Posts: 3996
- Joined: Wed Jul 02, 2003 5:29 pm
- Location: CFOS/UAF, USA
In my code, I added the option to have an analytic longwave flux for the ICE_BOX test case. See if you can copy what I did into COAWST to make it work if that's what you need. The sea ice needs the separate longwave and shortwave fluxes to compute its own bulk fluxes (if you are using sea ice).