Closed aekiss closed 5 years ago
@aekiss No, the namelist variable is private to the surface_flux module. I wouldn't think it would compile. I think it would be better to make the change here https://github.com/OceansAus/cice5/blob/6f8f1edf1b775b17067a11f6b4642d7cfdb6ca9c/drivers/auscom/surface_flux_mod.F90#L445-L446
Just make an if block to calculate udif as either the difference or -u_atm
or -v_atm
. Another way would be to multiply U_surf
by a 0/1
mask scalar as appropriate.
Ah yes that was dumb, I was wondering about the scope of the namelist variable.
I'd initially suggested we modify those lines in surface_flux_mod.F90 (445 to 446 in 6f8f1ed, 440-441 in master) but you suggested we set the surface velocities to zero in the atmospheric flux calculation instead https://github.com/OceansAus/cice5/blob/master/drivers/auscom/cpl_forcing_handler.F90#L976-L977 as this affects all the turbulent fluxes not just the wind stress.
Oops, I'll have to delete that comment from the record!
Actually, I think it's much better, in the MOM/CICE setup, to supply the correct surface velocities to the surface_flux module and let it decide what it wants to do with them. The same with CICE. If it wants the ocean velocity then it can choose whether to use it or not. MOM/SIS is a bit different since it uses the data_override
facility to do this sort of thing.
Don't worry, it will disappear from Slack soon enough... unlike my bad coding here. Does this update look any better?
Looks good to me. Having a quick test run (or at least compile) example would be nice. One for the TWG...
This didn't compile (can't have an IF inside a WHERE) so to avoid the IF I've reimplemented it in terms of a surface velocity scaling factor surf_vel_scale
instead of a logical. This now compiles and I'll try out a test run. Any comments on this approach?
I should have spotted that. You need to break the WHERE construct apart and have two branches.
I think a clearer approach would be to to use the logical but set the value of surf_vel_scale
in the code. It's trivial but makes it obvious to the user what needs to be set. I don't think there would ever be a reason for fractional values.
OK how's this? It compiles happily.
I've also updated the documentation on w_atm
- I think I got that right.
Looks good. Yeah, I think the documentation for w_atm
was incorrect. The original should have said relative
not absolute
.
Yes, that's what I thought. OK I'll give it a test run when I get a spare moment.
I've completed test runs - it seems fine. @russfiedler or @nichannah could you merge it please?
…lute (rather than relative) wind for all surface fluxes. https://github.com/OceansAus/access-om2/issues/137
@russfiedler, @nichannah does this look like it will work? I haven't checked that it will compile...