# WET\_DRY and temperature anomaly

**URL:** <https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529>\
**Category:** dynamics-numerics-params\
**Tags:** dynamics-numerics\
**Created:** [January 5, 2026, 2:57pm UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529 "2026-01-05T14:57:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hqcmax](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/hqcmax/32/760_2.png) [@hqcmax](https://forum.croco-ocean.org/u/hqcmax)\
**Post date:** [January 5, 2026, 2:57pm UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/1 "2026-01-05T14:57:16Z")

</div>

Dear scholars,

1. I plan to first adjust the parameters of the static approximation model to better carry out the non-static simulation plan. However, in the shallow coastal areas and the offshore regions, there is a problem of negative temperature.
2. In my cpp.h, it is defined as:

- define UV\_HADV\_TVD, UV\_VADV\_SPLINES, UV\_MIX\_S

- define TS\_HADV\_WENO5 (TS\_HADV\_UP3 was also tried), TS\_VADV\_WENO5 (TS\_VADV\_C2 and TS\_VADV\_AKIMA were also tried), TS\_MIX\_S

- define GLS\_MIXING, GLS\_KKL.

1. I also referred to the modifications suggested by other scholars on the forum to reduce the order of the table bottom in **compute\_vert\_tracer\_fluxes.h** , such as FC(i,1) and FC(i,N-1). However, I found that there was no improvement and the temperature would still become negative when the WET\_DRY area turned into a land area. This led to the gradual accumulation of temperature anomalies as the calculation progressed, spreading from the shallow areas to the river interior and the nearshore waters. The minimum value could reach -100°C.
2. I wonder if any scholar has relevant experience.  
Thank you for your reading!

---

<div class="post-metadata">

**Author:** ![hqcmax](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/hqcmax/32/760_2.png) [@hqcmax](https://forum.croco-ocean.org/u/hqcmax)\
**Post date:** [January 5, 2026, 3:44pm UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/2 "2026-01-05T15:44:01Z")

</div>

In winter, when the ebb tide coincides with darkness, the shallow areas that were dry become rapidly cooled. When the tide rises again, the seawater flowing through the previously dry areas cools down. Although the daily solar radiation causes the seawater to warm up, over the course of a day, the average temperature of these areas often drops by 3°C. Over three months, this results in a temperature drop of 100°C (though this is absurd). Could it be that my mixed diffusion scheme is too weak? This causes the cooled seawater to rapidly decrease in temperature over time, and eventually the entire coastal waters become negative values.

---

<div class="post-metadata">

**Author:** ![hook-hulk](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/hook-hulk/32/783_2.png) [@hook-hulk](https://forum.croco-ocean.org/u/hook-hulk)\
**Post date:** [January 12, 2026, 2:31pm UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/3 "2026-01-12T14:31:40Z")

</div>

can please share with me your cppdefs.h and cppdefs\_dev.h . actually I want to see where this temperature drops in WENO\_Z code. LIMIT\_STFLX\_COOLING 😃  
Thank you!

---

<div class="post-metadata">

**Author:** ![hqcmax](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/hqcmax/32/760_2.png) [@hqcmax](https://forum.croco-ocean.org/u/hqcmax)\
**Post date:** [January 12, 2026, 3:59pm UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/4 "2026-01-12T15:59:31Z")

</div>

> [@WET\_DRY and temperature anomaly](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/3):
>
> can please share with me your cppdefs.h and cppdefs\_dev.h . actually I want to see where this temperature drops in WENO\_Z code. LIMIT\_STFLX\_COOLING smiley Thank you!

Hello, I’m very glad to receive your reply.

- I will attach my cppdefs.h file and cppdefs\_dev.h file in the attachment. In the cppdefs.h file, I used the content within “define REGIONAL”. I will also attach my initial log file (croco1.txt), and attempt to turn off WET\_DRY and modify GLS\_MIX to LMD\_MIX (file croco\_1.txt). I found that after turning off the dry-wet grid, the speed would blow up very quickly. Moreover, since the cppdefs\_dev.h file was not used during compilation, I did not modify it.

- Now I will present my questions. The simulation starts on January 1, 2025. Due to the combined effect of tidal changes and night-time cooling, the area that becomes dry rapidly cools down at low tide, and it begins at 20:00 on January 2nd, 2025.  

Fig 1 Temperature display on January 2nd, 2025(The green area represents temperatures below 0 degrees Celsius)

 ![fig2](https://forum.croco-ocean.org/uploads/default/original/1X/ef10de9b5747cd2cdf0466f16dd693f99d6de32c.png)

Fig 2 U-directional flow velocity Display (It can be proved that the negative temperature region is the dew point (the blue area represents the dew point).)

- As the tide keeps receding and the temperature drops, the area of negative temperature becomes larger and larger, and the area of the negative temperature water mass gradually expands to the inner part of the estuary. At this point, the temperature dropped to -45℃.

 ![fig3](https://forum.croco-ocean.org/uploads/default/original/1X/0ca6a6d467c3cf5ee49f4904d395e0db13fc2056.png)

Fig 3 Temperature display on January 12th, 2025 (The green area represents temperatures below 0 degrees Celsius)

- When the simulation reached February 20th, 2025, the cold water mass had expanded throughout the entire coastal waters, and the temperature had dropped to an astonishing -100°C. Here, I have a question: In the Croco model, why didn’t it report an error for such an extreme temperature? This is already inconsistent with the physical properties of the water body.  
 ![fig4](https://forum.croco-ocean.org/uploads/default/original/1X/a71ebd037faa17005a27712fc2dc5c5877b5862b.png)

Fig 4 Temperature display on February 20th, 2025 (The green area represents temperatures below 0 degrees Celsius)

- The above are the simulated problems presented. At present, I still don’t know what the solution is. Such a temperature drop can be reduced to 2-3℃ within one day. Changing the vertical mixing schemes of GLS and LMD will provide a little improvement but not much.
- I hope this can be helpful to you. Thank you again.  
**Additional note: All the floor plans above are presented as the bottom floor**.  
[cppdefs.h](https://forum.croco-ocean.org/uploads/short-url/rqKGYRj7gOLkI3gZ2MKOkBYULek.h) (44.0 KB)  
[cppdefs\_dev.h](https://forum.croco-ocean.org/uploads/short-url/qmNixdWBzPJTtCHMVbnUOe50mqr.h) (32.2 KB)  
[croco\_1.txt](https://forum.croco-ocean.org/uploads/short-url/kLEnaTduijiwNuvRcnyxT9VFOK2.txt) (171.4 KB)  
[croco1.txt](https://forum.croco-ocean.org/uploads/short-url/3dcveVP3FiJMNGd81EUhr6gsSSP.txt) (1.8 MB)

---

<div class="post-metadata">

**Author:** ![hook-hulk](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/hook-hulk/32/783_2.png) [@hook-hulk](https://forum.croco-ocean.org/u/hook-hulk)\
**Post date:** [January 12, 2026, 5:46pm UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/5 "2026-01-12T17:46:04Z")

</div>

Hi,  
after this line add this and test it. (get\_vbc.F line-417)

```auto
# ifdef SOLVE3D
# ifdef TEMPERATURE
# ifdef LIMIT_STFLX_COOLING
      cff1=-2.0_r8 ! your threshold to cooling
      DO j=JstrR,JendR
        DO i=IstrR,IendR
          cff2=stflx(i,j,itemp)
          cff3=0.5_r8*(1.0_r8+SIGN(1.0_r8,cff1-t(i,j,N(ng),nrhs,itemp)))
          stflx(i,j,itemp)=cff2-cff3*0.5_r8*(cff2-ABS(cff2))
        END DO
      END DO
# endif
# endif
# endif
```

and add LIMIT\_STFLX\_COOLING key below the BULK\_FLUXES and TEMPERATURE in cppdefs.h

you may need to check below but above are just shortcut only.  
a) Temperature preservation in step3D\_t.F  
b) Heat flux masking with rmask\_wet  
c) Solar radiation masking etc

Actually i am very new in croco thats why.

Please let me know.  
Thank you.

---

<div class="post-metadata">

**Author:** ![hqcmax](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/hqcmax/32/760_2.png) [@hqcmax](https://forum.croco-ocean.org/u/hqcmax)\
**Post date:** [January 19, 2026, 7:13am UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/6 "2026-01-19T07:13:05Z")

</div>

- Hi, I tried the method you provided. The code you gave was quite familiar to me, so I checked the source code in my ROMS. I found that it had been added in the set\_vbc section. Thank you for your reminder. I immediately went to test it and added the code you gave at line 417 of get\_vbc.F.（Since Croco lacks the “set\_vbc” function and only has the “get\_vbc” file, it is unknown whether it will be effective.）
- However, I didn’t see much change. The temperature decreased significantly and accumulated every day. Finally, I thought that since I enabled ONLINE, the net heat flux would change. Could this be the cause of the problem? So, I added at line 640 of bulk\_flux.F. :  
#ifdef LIMIT\_STFLX\_COOLING  
cff1 = -2.0  
cff2 = stflx(i,j,itemp)  
SST = t(i,j,N,nrhs,itemp)  
If (SST \<= cff1 .and. cff2 \< 0.0) then  
stflx(i,j,itemp) = 0.0 endif  
#endif
- The test results showed that the lowest temperature did indeed remain at around -2℃. However, the problem that followed was that the cold water mass still expanded over a wide area, resulting in the near-shore water mass being all at -2℃. In contrast, the temperature simulated by ROMS during the same period was between 7-10℃. What could be the reason for this? Why didn’t the other warmer seawater heat up these areas? The temperature at the source of my river was also between 8-10℃.
- Apart from the operations mentioned above, I found that the previous setting of TNU2 was 0. When I changed it to 50\*10.d0, it had a slight effect.
- Thank you again for your enthusiastic response. Best wishes!
- Attention：I would like to correct one point. As mentioned earlier, after the conversion of the dry-wet point, the dry point cooled down. In fact, it was the wet point that cooled down significantly because the water was too shallow, with a very small specific heat capacity. When the heat flux was less than 0, the water body lost its temperature rapidly.

---

<div class="post-metadata">

**Author:** ![hook-hulk](https://forum.croco-ocean.org/user_avatar/forum.croco-ocean.org/hook-hulk/32/783_2.png) [@hook-hulk](https://forum.croco-ocean.org/u/hook-hulk)\
**Post date:** [January 19, 2026, 9:05am UTC](https://forum.croco-ocean.org/t/wet-dry-and-temperature-anomaly/7529/7 "2026-01-19T09:05:35Z")

</div>

Hi,  
Yes it was done by ROMS long back  
(but the solution provided by ROMS not perfect as per my understanding).  
`subroutine set_vbc` and others already there in get\_vbc .  
you already tried Nudging, its good (laplacian background diffusivity). 50-500 try.

1. Lateral Explicit Tracer Mixing (# define TS\_DIF2 )
2. and use # undef TS\_HADV\_RSUP3 # define TS\_HADV\_UP3
3. change Critical Depth for Drying cells as per your requarments:

> **[OCEAN/param.h · master · croco-ocean / croco · GitLab](https://gitlab.inria.fr/croco-ocean/croco/-/blob/master/OCEAN/param.h#L311)**
>
> Official repository for the CROCO model

after that we can try something in step3D\_t.F and other file

```auto

#ifdef WET_DRY
      DO k=1,N(ng)
        DO j=JstrR,JendR
          DO i=IstrR,IendR
            IF ((rmask_wet(i,j).eq.0).AND.(rmask(i,j).eq.1)) THEN
              t(i,j,k,nnew,itrc)=t(i,j,k,nstp,itrc)
            END IF
          END DO
        END DO
      END DO
#endif

```

can you share your croco src and input file in zip. and share the link.  
Then i can reproduce it.  
Thank you.
