Done. We are now passing bottom roughness as a 2D array. The coupling routine mct_roms_swan.h now has:
CASE ('ZO') ! bottom roughness
DO j=JstrR,JendR
DO i=IstrR,IendR
#ifdef BBL_MODEL
Awrk(i,j)=MAX(0.0001_r8, &
& OCEAN(ng)%bottom(i,j,izNik)*30.0_r8)
#else
Awrk(i,j)=MAX(0.0001_r8,rdrg2(ng))
#endif
END DO
END DO
CALL ROMS_export2d (ng, tile, &
& id, gtype, scale, add_offset, &
& LBi, UBi, LBj, UBj, &
& Awrk, &
& Fields(id)%ExpMin, Fields(id)%ExpMax, &
& Asize, A, &
& status)
CALL AttrVect_importRAttr (ocn2wav_AV, TRIM(code), A, Asize)
Iexport=Iexport+1
Notice that the input coupling script now has ZO:
! Field Export Import
!
! NONE - - No field to import or export
! Pair atmos ocean surface air pressure
! Tair atmos ocean surface air temperature
! Hair atmos ocean surface air relative humidity
! cloud atmos ocean cloud fraction
! SWrad atmos ocean shortwave radiation flux
! LWrad atmos ocean longwave radiation flux
! rain atmos ocean rain fall rate
! Uwind atmos ocean, waves surface U-wind component
! Vwind atmos ocean, waves surface V-wind component
! heat atmos ocean surface net heat flux
! Ustr atmos ocean surface U-momentum stress
! Vstr atmos ocean surface V-momentum stress
! SST ocean atmos sea surface temperature
! bath ocean waves bathymetry
! SSH ocean waves free-surface
! Ubar ocean waves vertically integrated U-momentum
! Vbar ocean waves vertically integrated V-momentum
! ZO ocean waves bottom roughness
! Wdir waves ocean wave direction
! Wamp waves ocean significant wave height
! Wlen waves ocean average wave length
! Wptop waves ocean surface wave relative peak period
! Wpbot waves ocean bottom wave period
! Wdiss waves ocean wave energy dissipation
! Wbrk waves ocean percent wave breaking
! Wubot waves ocean wave bottom orbital velocity
Many thanks to John Warner for helping coding the new export/import field.