DOI-USGS / COAWST

COAWST modeling system git repository
Other
108 stars 51 forks source link

How to control the exchange of fluxes from WRF to ROMS #182

Open SPLahiri opened 1 year ago

SPLahiri commented 1 year ago

Hello everyone. I have configured the COAWST model (WRF + ROMS) over the Arabian Sea and would like to conduct sensitivity experiments. For example, I want to perturb the fluxes from WRF to ROMS over a small region while keeping the other places the same as it is. I was looking at the atm2ocn_flux.F file and wondering where to change it. It will be very helpful if someone can help me with this. Thank you in advance.

jcwarner-usgs commented 1 year ago

I think that would be a good place to perturb the fluxes, but you need to be careful with the tiling and the physics. DO j=JstrR,JendR DO i=IstrR,IendR ..... IF ( ((i.gt.100) .and.(i.lt.120)) && ((j.gt.10) .and.(j.lt.20)) ) then rain(i,j)=rain(i,j)*10.0_r8 END IF something like that? -j

SPLahiri commented 1 year ago

Thanks. Prof. Warner, for your quick reply, as usual. Yes, I intend to do this. However ,

  1. I am confused about where to change these values in the atm2ocn_flux.F, especially for radiation fluxes. For rain and wind stress, I can understand by looking at the script where these changes would be. For example, if I want to change for rainfall, then the corresponding lines would be something like this,

    cff=1.0_r8/rhow DO j=JstrR,JendR DO i=IstrR,IendR stflux(i,j,itemp)=(srflx(i,j)+lrflx(i,j)+ & & lhflx(i,j)+shflx(i,j))

    ifdef EMINUSP

      stflux(i,j,isalt)=cff*(evap(i,j)-rain(i,j))

    endif

    ifdef MASKING

      stflux(i,j,itemp)=stflux(i,j,itemp)*rmask(i,j)
      rain(i,j)=rain(i,j)*rmask(i,j)

ifdef EMINUSP

      evap(i,j)=evap(i,j)*rmask(i,j)
      stflux(i,j,isalt)=stflux(i,j,isalt)*rmask(i,j)

endif

endif

   IF ( ((i.gt.100) .and.(i.lt.120)) && ((j.gt.10) .and.(j.lt.20)) ) THEN
    rain(i,j)=rain(i,j)*10.0_r8
   END IF

    END DO
  END DO

. However, I need some help with the change in radiation values.

  1. Right now, I have three grids, of which two are for WRF, and one is for ROMS. Here, i and j correspond to which one?
jcwarner-usgs commented 1 year ago

maybe a better place would be in Master/mct_roms_wrf.h , sections like:

! Receive fields from atmosphere model. 40 FORMAT (a36,1x,2(1pe14.6)) ! ! Short wave radiation (from W/m^2 to Celsius m/s) ! CALL AttrVect_exportRAttr (AttrVect_G(ng)%atm2ocn_AV, "GSW", & & A, Asize) range(1)= Large range(2)=-Large fac=1.0_r8/(rho0Cp) ij=0 DO j=JstrR,JendR DO i=IstrR,IendR ij=ij+1 cff=A(ij) IF (ia.eq.1) THEN FORCES(ng)%srflx(i,j)=cfffac ELSE FORCES(ng)%srflx(i,j)=FORCES(ng)%srflx(i,j)+cff*fac END IF

this is called for each grid (ia) and you could modify the fields here, depending on which grid it is. At this location, all the data has been interpolated to the ROMS grid. It is being added up from each wrf grid. So the i - j 's are in roms world.

-j