New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#2539 (Better management of T/S file used for tradmp.) – NEMO

Opened 4 years ago

Last modified 3 years ago

#2539 new Request

Better management of T/S file used for tradmp.

Reported by: mathiot Owned by: systeam
Priority: low Milestone:
Component: TRA Version: trunk
Severity: minor Keywords: DMP,
Cc:

Description

Context

Some users feel the need to have more flexibility in the choice of TS file used for tradmp.

As it is, the same T/S data file is used for tradmp and intialisation and there is no possibility to specify a file for intialisation and an other file for tradmp. DRAKKAR has done something to enable this. ISOMIP+ has also in MY_SRC some code to do it.

For information, there are also some comments in the code about it in tradmp.F90:

200	         !!TG: Initialisation of dtatsd - Would it be better to have dmpdta routine
201	         !    so can damp to something other than intitial conditions files?
202	         !!gm: In principle yes. Nevertheless, we can't anticipate demands that have never been formulated.

Analysis

Code change by DRAKKAR available here: https://github.com/meom-group/DCM/tree/master/DCMTOOLS/DRAKKAR/NEMO4/src
Code change by ISOMIP+ in tests/ISOMIP+/MY_SRC

Comments on both solutions:

  • they don't get rid of ln_tsd_dmp defined in namtsd.
  • tradmp TS file still defined in namtsd file.

Suggestion of a third solution:

  • dta_tsd_init (ie print and definition/allocation of sf_tsdini or sf_tsddmp) split in tradmp_init and istate_init => no more *dmp* namelist variable in dtatsd and no more dta_tsd_init subroutine
  • dta_tsd with a new argument which is the sf_tsd structure (dmp one or init one) and the deallocation of T & S arrays used for the intialisation done at the end of dta_tsd moved to istate. => dta_tsd with this change should be universal as all reference to dmp case of ini case are removed.
  • rename namelist namtsd and associated variable to be clear it is intialisation ?

Benefits

  • more flexibility in NEMO configuration and behaviour in phase with other part of NEMO like namsbc_ssr for example (ie data used defined in the corresponding block).
  • tradmp variables are all in namtra_dmp block and initialisation variable in namtsd (or a new name) block.
  • dtatsd, istate and tradmp files out of ISOMIP+/MY_SRC (see #2536).

Commit History (0)

(No commits)

Change History (3)

comment:1 Changed 4 years ago by mathiot

BTW: This bits of code from dtatsd.F90 (r13497, last modification) should probably be remove or moved to usr_def_istate or even better included in the T/S input file (if still needed) as suggested in the comments:

148         !
149         !!gm  This should be removed from the code   ===>>>>  T & S files has to be changed
150         !
151         !                                   !==   ORCA_R2 configuration and T & S damping   ==!
152         IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN
153            IF( nn_cfg == 2 .AND. ln_tsd_dmp ) THEN    ! some hand made alterations
154               !
155               ij0 = 101 + nn_hls       ;   ij1 = 109 + nn_hls                       ! Reduced T & S in the Alboran Sea
156               ii0 = 141 + nn_hls - 1   ;   ii1 = 155 + nn_hls - 1
157               DO jj = mj0(ij0), mj1(ij1)
158                  DO ji = mi0(ii0), mi1(ii1)
159                     sf_tsd(jp_tem)%fnow(ji,jj,13:13) = sf_tsd(jp_tem)%fnow(ji,jj,13:13) - 0.20_wp
160                     sf_tsd(jp_tem)%fnow(ji,jj,14:15) = sf_tsd(jp_tem)%fnow(ji,jj,14:15) - 0.35_wp
161                     sf_tsd(jp_tem)%fnow(ji,jj,16:25) = sf_tsd(jp_tem)%fnow(ji,jj,16:25) - 0.40_wp
162                     !
163                     sf_tsd(jp_sal)%fnow(ji,jj,13:13) = sf_tsd(jp_sal)%fnow(ji,jj,13:13) - 0.15_wp
164                     sf_tsd(jp_sal)%fnow(ji,jj,14:15) = sf_tsd(jp_sal)%fnow(ji,jj,14:15) - 0.25_wp
165                     sf_tsd(jp_sal)%fnow(ji,jj,16:17) = sf_tsd(jp_sal)%fnow(ji,jj,16:17) - 0.30_wp
166                     sf_tsd(jp_sal)%fnow(ji,jj,18:25) = sf_tsd(jp_sal)%fnow(ji,jj,18:25) - 0.35_wp
167                  END DO
168               END DO
169               ij0 =  87 + nn_hls       ;   ij1 =  96 + nn_hls                       ! Reduced temperature in Red Sea
170               ii0 = 148 + nn_hls - 1   ;   ii1 = 160 + nn_hls - 1
171               sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ,  4:10 ) = 7.0_wp
172               sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 11:13 ) = 6.5_wp
173               sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 14:20 ) = 6.0_wp
174            ENDIF
175         ENDIF
176         !!gm end

comment:2 Changed 3 years ago by hadcv

#2564- further support for the removal of this code block!

comment:3 Changed 3 years ago by mathiot

  • Type changed from Defect to Feature request
Note: See TracTickets for help on using tickets.