possible bug with TCLIMATOLOGY

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
xiaozhu557
Posts: 62
Joined: Fri Sep 11, 2009 1:48 pm
Location: nmefc

possible bug with TCLIMATOLOGY

#1 Unread post by xiaozhu557 »

I found the defined settings for TCLIMATOLOGY in files tl_step3d_t.F, step3d_t.F, rp_step3d_t.F,nesting.F and so on, as follow

Code: Select all

# if defined TCLM_NUDGING && defined TCLIMATOLOGY
it means that the following code can be run only when both of them are defined, but in other files, such as get_data.F(899 line), set_data.F(1173 line), inp_par.F(884 line), read_phypar.F(889, 3516 lines), just need to define TCLIMATOLOGY, the code as follow,

Code: Select all

#if defined SOLVE3D && defined TCLIMATOLOGY

Code: Select all

# ifdef SOLVE3D
#  if !defined ANA_TCLIMA && defined TCLIMATOLOGY
I think they are inconsistent. In this case, if the user just defined TCLIMATOLOGY, but not defined TCLM_NUDGING, then ROMS would read in the climatology T/S data, but did not use them.

Am I correct?

Hopefully you can fix it. Thanks.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: possible bug with TCLIMATOLOGY

#2 Unread post by kate »

You are correct, but perhaps you (or someone else) comes up with another reason to use the TCLIMATOLOGY fields. I've used them in my "offline" options, reading climatology, then setting temperature to that climatology instead of recomputing temperature via physics.

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

Re: possible bug with TCLIMATOLOGY

#3 Unread post by arango »

Well, I have been reviewing all this logic lately. I need to remove all the CPP options for climatology and substituting them with logical switches because of nesting. We need to control if a nested grid needs climatology or not.

The code is correct as it is. This is done intentionally. The switches TCLIMATOLOGY, M2CLIMATOLOGY, M3CLIMATOLOGY, and ZCLIMATOLOGY are used for various capabilities. For example, TCLIMATOLOGY is used for boundary conditions, isopycnal mixing corrections, nudging, and adjoint sensitivity. If we need nudging in sponge areas or as a full Newtonian relaxation, we need to activate both TCLIMATOLOGY and TCLM_NUDGING. When the nudging term is added to the governing equations the users need to think about both CPP options. Therefore, it is more robust to only use TCLIMATOLOGY in the data processing routines. Otherwise, we will need a messy combination of CPP options when a climatology field is needed for various purposes. And like Kate said, we will find more uses for climatology that just nudging :!:

Notice that we can have analytical climatology, which also add a new layer of complexity.

xiaozhu557
Posts: 62
Joined: Fri Sep 11, 2009 1:48 pm
Location: nmefc

Re: possible bug with TCLIMATOLOGY

#4 Unread post by xiaozhu557 »

Thanks for your nice reply.

Dear Arango,
Can you show me the places in code where the TCLIMATOLOGY is used for isopycnal mixing corrections, nudging, and adjoint sensitivity? I have searched it in all the ROMS codes, just found it used for boundary conditions as pointed out in my last post, but not found any other one. Can you show me any details? Thanks.

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

Re: possible bug with TCLIMATOLOGY

#5 Unread post by arango »

Nope, that it is your homework. I just give you a clue CLIMA_TS_MIX

Post Reply