adjoint model interpolates two snapshots maybe wrong.

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
xiaocongM
Posts: 12
Joined: Mon Mar 23, 2020 8:16 pm
Location: Xiamen University

adjoint model interpolates two snapshots maybe wrong.

#1 Unread post by xiaocongM »

Dear users
I am running an I4DVAR experiment, and NLM nudged to climatology u,v,temp,and salt field. my cycle_length is 365.25,and the climatology time sequence is (15, 345) with 30 intervels。my assimilation window is from 2015-12-1 to 2015-12-7. When the adjoint model set up the 3d field using set_3dfldr.F, the Tintrp(1,u,ng) and Tintrp(2,u,ng) are both smaller than time variable which makes interpolation failed. This happens because the get_cycle.F may be wrong in the job<0 case. As the following code shows, it gives the Tend minmum value 15, and Tstr=345, which may be not right. In case that the adjoint model read time backward, so the Tend should be 315 while Tstr=345,so i change the Tend value in the code. In addtion, I also comment out Tdelta=Tdelta+clength in get_3dfldr.F. Am i right?

Code: Select all

 IF (Lmulti) THEN
        IF (job.gt.0) THEN
          Tstr=Finfo(2,ifield,ng)      ! Tmax from previous file
        ELSE
          Tend=Finfo(1,ifield,ng)      ! Tmin from previous file
        END IF
      ELSE
        IF (Lcycle.and.(Tindex.eq.ntime)) THEN
!          Tend=Tmin               !comment out this line and give Tend and Tindex new value.
           Tend=Tval(i-1)
           Tindex=i-1
        ELSE
          IF (job.gt.0) THEN
            i=MIN(ntime,Tindex+1)
            Tend=Tval(i)
          ELSE
            i=MAX(1,Tindex-1)
            Tend=Tval(i)
          END IF
        END IF
      END IF

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: adjoint model interpolates two snapshots maybe wrong.

#2 Unread post by arango »

Why are you using time-cycling in 4D-Var and adjoint fields? Is this a forcing field? I don't see any reason to do so. There is a misunderstanding of the purposes of 4D-Var! You need to use actual observations and forcing. Get the appropriate forcing for your 4D-Var cycle.

xiaocongM
Posts: 12
Joined: Mon Mar 23, 2020 8:16 pm
Location: Xiamen University

Re: adjoint model interpolates two snapshots maybe wrong.

#3 Unread post by xiaocongM »

Thanks for your prompt reply!
Before doing assimilation, I run NLM for 6 years using Lm3CLM=T and LnudgeM3CLM=T. And the same configuration is set in my assimilation procedure.My forcing field is in blk file. I make a mistake in the get_cycle.F, I will change code back. I will delete the cycle_length and change the time in climatology file to be consistent with model time. I have one question which may be very simple:
if the total(all 4D-Var cycle) time window ranges from 2015-12-1 to 2016-1-10, will it need cycle_length attribute in my climatology file?
arango wrote: Mon Apr 11, 2022 2:56 pm Why are you using time-cycling in 4D-Var and adjoint fields? Is this a forcing field? I don't see any reason to do so. There is a misunderstanding of the purposes of 4D-Var! You need to use actual observations and forcing. Get the appropriate forcing for your 4D-Var cycle.
Add: After making a new climatology file without cycle_length, the model can run well. :D

Post Reply