Opened 11 years ago

Closed 11 years ago

#152 closed bug (Fixed)

Wet/dry masks not initialized

Reported by: kate Owned by: arango
Priority: minor Milestone: Release ROMS/TOMS 3.2
Component: Nonlinear Version: 3.2
Keywords: Cc:

Description (last modified by arango)

On the very first time through step2d, all the mask_wet arrays are still zero from the initialization to IniVal. This results in all of the ubar velocities ending up in the ELSE on line 2377 and getting set to zero (since they are multiplied by the zero umask_wet). The masks could be set in ini_fields before zeta gets modified.

Attachments (1)

patch.wet (5.0 KB) - added by kate 11 years ago.
sample code

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by kate

sample code

comment:1 Changed 11 years ago by jcwarner

I have made major revisions to the wet_dry routines and I would like to submit these back to the Rutgers repository for inspection and incorporation to the public version. The following is a list of files for the forward model that require wet_dry information. Not all were modified, but this is (i believe) a comprehensive list of all files needed for the wet/dry. The changes are in my omlab branch.

comment:2 Changed 11 years ago by arango

  • Description modified (diff)
  • Resolution set to Fixed
  • Status changed from new to closed
  • Summary changed from *mask_wet not initialized to Wet/dry masks not initialized

Done. The wetting and drying algorithm was redesigned so it is more robust. A new routine wetdry.F was introduced to compute the wet/dry mask (rmask_wet, umask_wet, and vmask_wet), time-averaged mask over all barotropic steps (rmask_wet_avg), and full land/sea and wet/dry masks (rmask_full, umask_full, vmask_full). The full mask are only used for output purposes.

The barotropic velocities masking due to wetting and drying is somewhat tricky. For example, we now have:

# ifdef WET_DRY
            cff5=ABS(ABS(umask_wet(i,j))-1.0_r8)
            cff6=0.5_r8+DSIGN(0.5_r8,ubar(i,j,knew))*umask_wet(i,j)
            cff7=0.5_r8*umask_wet(i,j)*cff5+cff6*(1.0_r8-cff5)
            ubar(i,j,knew)=ubar(i,j,knew)*cff7
            fac1=cff2/cff
            rhs_ubar(i,j)=(ubar(i,j,knew)*(Dnew(i,j)+Dnew(i-1,j))-      &
     &                     ubar(i,j,kstp)*(Dstp(i,j)+Dstp(i-1,j)))*     &
     &                    fac1
# endif

The computation of the depths and level thicknesses are moved from step2d to main3d. This is done for clarity and to facilitate nesting in the future. A new internal cpp option is introduced (MOVE_SET_DEPTH) to avoid doing this in the adjoint-based algorithm. This is temporary and it will removed when the testing in several adjoint-based applications is completed. I tied few adjoint-based computations and I got identical sanity checks.

Many thanks to John Warner for his help in rewriting the wetting and drying option. We hope that this algorithm is more robust and eliminated the problem reported at the open boundaries.

Note: See TracTickets for help on using tickets.