typo in ad_get_data

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
rtoste
Posts: 11
Joined: Wed Sep 26, 2012 4:20 pm
Location: UFRJ

typo in ad_get_data

#1 Unread post by rtoste »

Hi,
Just to report a typo in ad_get_data.F. There is a missing space on line 234.

Code: Select all

# if !defined ANA_PAIR       && \
     (defined ATM_PRESS      || defined BULK_FLUXES  || \
      defined ECOSIM)
#  if !(defined FRC_COUPLING || definedFORWARD_FLUXES)
!
!-----------------------------------------------------------------------
!  Surface air pressure from input FRC file.
!-----------------------------------------------------------------------
!
      CALL get_2dfldr (ng, iADM, idPair, FRCncid(idPair,ng),            &
#   if defined PIO_LIB && defined DISTRIBUTE
     &                 FRCpioFile(idPair,ng),                           &
#   endif
     &                 nFfiles(ng), FRC(1,ng), update(1),               &
     &                 LBi, UBi, LBj, UBj, 2, 1,                        &
#   ifdef MASKING
     &                 GRID(ng) % rmask,                                &
#   endif
     &                 FORCES(ng) % PairG)
      IF (FoundError(exit_flag, NoError, __LINE__, MyFile)) RETURN

#  else
!
!-----------------------------------------------------------------------
!  Surface air pressure from NLM forward file.
!-----------------------------------------------------------------------
!
      CALL get_2dfldr (ng, iADM, idPair, BLK(ng)%ncid,                  &
#   if defined PIO_LIB && defined DISTRIBUTE
     &                 BLK(ng)%pioFile,                                 &
#   endif
     &                 1, BLK(ng), update(1),                           &
     &                 LBi, UBi, LBj, UBj, 2, 1,                        &
#   ifdef MASKING
     &                 GRID(ng) % rmask,                                &
#   endif
     &                 FORCES(ng) % PairG)
      IF (FoundError(exit_flag, NoError, __LINE__, MyFile)) RETURN
#  endif
# endif
Then, even with FORWARD_FLUXES turned on, it looks for Pair in the forcing file.

Code: Select all

 AD ROMS: started time-stepping: (Grid: 1, Outer: 01, Inner: 000, TimeSteps: 865 - 1)

  GET_2DFLDR_NF90  - surface u-momentum stress,                           2021-01-02 21:00:00.00
                      (Grid=01, Rec=24, Index=2, File: libra_112_qck_outer0.nc)
                      (Tmin=       8765.0000 Tmax=       8768.0000)   t =       8767.8750
                      (Min = -1.16337893E-04 Max =  8.38323159E-05)   regrid = F
  GET_2DFLDR_NF90  - surface v-momentum stress,                           2021-01-02 21:00:00.00
                      (Grid=01, Rec=24, Index=2, File: libra_112_qck_outer0.nc)
                      (Tmin=       8765.0000 Tmax=       8768.0000)   t =       8767.8750
                      (Min = -1.91277119E-04 Max =  1.90605250E-04)   regrid = F
  GET_2DFLDR_NF90  - surface air pressure,                                2020-12-31 18:00:00.00
                      (Grid=01, Rec=247, Index=2, File: ROMS_Pair_wrf_2020-12_REFEITO.nc)
                      (Tmin=       8735.0000 Tmax=       8765.8750)   t =       8765.7500
                      (Min =  1.00667168E+03 Max =  1.02195167E+03)   regrid = T
  GET_2DFLDR_NF90  - solar shortwave radiation flux,                      2021-01-02 21:00:00.00
                      (Grid=01, Rec=24, Index=2, File: libra_112_qck_outer0.nc)
                      (Tmin=       8765.0000 Tmax=       8768.0000)   t =       8767.8750
                      (Min =  0.00000000E+00 Max =  5.52822406E-05)   regrid = F
It becomes a problem when multiple forcing files are needed for the same assimilation window:

Code: Select all

 SET_2DFLDR - current model time exceeds ending value for variable: Pair
              TDAYS     =       8768.0000
              Data Tmin =       8735.0000  Data Tmax =       8765.8750
              Data Tstr =       8765.8750  Data Tend =       8765.7500
              TINTRP1   =       8765.8750  TINTRP2   =       8765.7500
              FAC1      =          2.2500  FAC2      =         -2.1250
 Found Error: 02   Line: 560      Source: ROMS/Adjoint/ad_set_data.F, ad_set_data_tile
 Found Error: 02   Line: 215      Source: ROMS/Adjoint/ad_main3d.F
 Found Error: 02   Line: 1299     Source: ROMS/Drivers/rbl4dvar.F, increment
 Found Error: 02   Line: 298      Source: ROMS/Drivers/rbl4dvar_roms.h, ROMS_run
 Found Error: 02   Line: 174      Source: ROMS/Utility/stats_modobs.F, stats_modobs_nf90
 Found Error: 02   Line: 99       Source: ROMS/Utility/stats_modobs.F
Correcting this line solves the problem.

Code: Select all

# if !defined ANA_PAIR       && \
     (defined ATM_PRESS      || defined BULK_FLUXES  || \
      defined ECOSIM)
#  if !(defined FRC_COUPLING || defined FORWARD_FLUXES)
Cheers,
Raquel

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

Re: typo in ad_get_data

#2 Unread post by arango »

Yes, thank you. It is weird why I didn't catch that one before.

rtoste
Posts: 11
Joined: Wed Sep 26, 2012 4:20 pm
Location: UFRJ

Re: typo in ad_get_data

#3 Unread post by rtoste »

I've just noticed the same typo also occurs in tl_get_data.F (line 232)

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

Re: typo in ad_get_data

#4 Unread post by arango »

Yes, I noticed that early today. It also in rp_get_data.F.

Post Reply