Opened 3 years ago
Closed 2 years ago
#2564 closed Bug (fixed)
ORCA2 tracer damping hand edits in dtatsd.F90 can be cumulatively applied
Reported by: | hadcv | Owned by: | hadcv |
---|---|---|---|
Priority: | low | Milestone: | Unscheduled |
Component: | DOM | Version: | trunk |
Severity: | minor | Keywords: | dtatsd, orca2, tra_dmp |
Cc: |
Description (last modified by nemo)
Issue
When running ORCA2 with tracer damping and without temporal interpolation, i.e.
[namelist:namtra_dmp] ln_tradmp=.true. [namelist:namtsd] sn_tem='data_1m_potential_temperature_nomask',-1.0,'votemper',.false.,.true.,'yearly','','',''
the model tends to blow up with near-freezing temperatures in the Alboran Sea.
Cause
The following ORCA2 hand edits in dtatsd.F90 seem to be applied on each timestep:
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
I gather that this is because sf_tsd(jp_tem)%fnow is only updated once per record when temporal interpolation is not used.
Solution
Check to see if the record number has changed (implying new data has been read in):
-
(a) before vs. (b) after
a b 1 1 IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN 2 2 IF( nn_cfg == 2 .AND. ln_tsd_dmp ) THEN ! some hand made alterations 3 irec_n(jp_tem) = sf_tsd(jp_tem)%nrec(2,sf_tsd(jp_tem)%naa) ! Determine if there is new data (ln_tint = F) 4 irec_n(jp_sal) = sf_tsd(jp_sal)%nrec(2,sf_tsd(jp_sal)%naa) ! If not, then do not apply the increments 5 IF( kt == nit000 ) irec_b(:) = -1 3 6 ! 4 7 ij0 = 101 + nn_hls ; ij1 = 109 + nn_hls ! Reduced T & S in the Alboran Sea 5 8 ii0 = 141 + nn_hls - 1 ; ii1 = 155 + nn_hls - 1 6 9 DO jj = mj0(ij0), mj1(ij1) 7 10 DO ji = mi0(ii0), mi1(ii1) 11 IF( sf_tsd(jp_tem)%ln_tint .OR. irec_n(jp_tem) /= irec_b(jp_tem) ) THEN 8 12 sf_tsd(jp_tem)%fnow(ji,jj,13:13) = sf_tsd(jp_tem)%fnow(ji,jj,13:13) - 0.20_wp 9 13 sf_tsd(jp_tem)%fnow(ji,jj,14:15) = sf_tsd(jp_tem)%fnow(ji,jj,14:15) - 0.35_wp 10 14 sf_tsd(jp_tem)%fnow(ji,jj,16:25) = sf_tsd(jp_tem)%fnow(ji,jj,16:25) - 0.40_wp 15 irec_b(jp_tem) = irec_n(jp_tem) 16 ENDIF 11 17 ! 18 IF( sf_tsd(jp_sal)%ln_tint .OR. irec_n(jp_sal) /= irec_b(jp_sal) ) THEN 12 19 sf_tsd(jp_sal)%fnow(ji,jj,13:13) = sf_tsd(jp_sal)%fnow(ji,jj,13:13) - 0.15_wp 13 20 sf_tsd(jp_sal)%fnow(ji,jj,14:15) = sf_tsd(jp_sal)%fnow(ji,jj,14:15) - 0.25_wp 14 21 sf_tsd(jp_sal)%fnow(ji,jj,16:17) = sf_tsd(jp_sal)%fnow(ji,jj,16:17) - 0.30_wp 15 22 sf_tsd(jp_sal)%fnow(ji,jj,18:25) = sf_tsd(jp_sal)%fnow(ji,jj,18:25) - 0.35_wp 23 irec_b(jp_sal) = irec_n(jp_sal) 24 ENDIF 16 25 END DO 17 26 END DO 18 27 ij0 = 87 + nn_hls ; ij1 = 96 + nn_hls ! Reduced temperature in Red Sea 19 28 ii0 = 148 + nn_hls - 1 ; ii1 = 160 + nn_hls - 1 20 29 sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 4:10 ) = 7.0_wp 21 30 sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 11:13 ) = 6.5_wp 22 31 sf_tsd(jp_tem)%fnow( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) , 14:20 ) = 6.0_wp 23 32 ENDIF
Commit History (2)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
14186 | hadcv | 2020-12-16T11:32:26+01:00 | #2564: Fix ORCA2 hand edits in dta_tsd being applied cumulatively |
14185 | hadcv | 2020-12-16T11:32:22+01:00 | #2564: Fix ORCA2 hand edits in dta_tsd being applied cumulatively |
Change History (8)
comment:1 Changed 2 years ago by hadcv
- Description modified (diff)
- Owner changed from systeam to hadcv
- Status changed from new to assigned
comment:2 Changed 2 years ago by hadcv
- Description modified (diff)
comment:3 Changed 2 years ago by hadcv
- Description modified (diff)
comment:4 Changed 2 years ago by hadcv
- Description modified (diff)
comment:5 Changed 2 years ago by nemo
- Description modified (diff)
comment:6 Changed 2 years ago by hadcv
comment:7 Changed 2 years ago by hadcv
In 14186:
comment:8 Changed 2 years ago by hadcv
- Resolution set to fixed
- Status changed from assigned to closed
In 14185: