arango wrote:The WET_DRY option is not adjointed because it not fully differentiable, and because of every time-step of the forward trajectory need to be saved to have a consistent linearization of the tangent linear (TLM) and adjoint (ADM) models. You cannot use such time-depending land/sea masking in any ROMS TLM and ADM application. It actually doesn't make much sense from the discrete linearization problem. That's the reason that it is not available.
Thank you very much Arango!
I am not sure if I understand right. Are you meaning based on my header file, the land/sea masking become a time-depending variable? I used to undef WET_DRY but other errors happened:
Code: Select all
ad_set_vbc.f90:343.36:
ad_stflx(i,j,itemp)=0.0_r8
1
Error: Unexpected STATEMENT FUNCTION statement at (1)
ad_set_vbc.f90:349.30:
ad_stflx(i,j,itemp)=ad_stflx(i,j,itemp)+ad_cff2
1
Error: Statement function at (1) is recursive
ad_set_vbc.f90:334.15:
cff2=stflx(i,j,itemp)
1
Error: Function 'stflx' at (1) has no IMPLICIT type
ad_set_vbc.f90:335.48:
cff3=0.5_r8*(1.0_r8+SIGN(1.0_r8,cff1-t(i,j,N(ng),nrhs,itemp)))
1
Error: Function 't' at (1) has no IMPLICIT type
ad_set_vbc.f90:342.25:
& ad_stfx(i,j,itemp)
1
Error: Function 'ad_stfx' at (1) has no IMPLICIT type
make: *** [/home/ywang/roms/Projects/DOT/Build/ad_set_vbc.o] Error 1
I have the grid nc file with land/sea masking, created by GridBuilder. it seems MASKING and WET_DRY should be retained. The thing that confused me is which options in my header file cause this problem. Do you have any suggestion about how to modify it? Thank you again! Also, I would try to learn cppdefs.h more to find the answer.
Best regards
Yifan