- Timestamp:
- 2020-09-14T17:40:34+02:00 (4 years ago)
- Location:
- NEMO/branches/2019/dev_r11351_fldread_with_XIOS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11351_fldread_with_XIOS
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEADext/AGRIF5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 9 # SETTE 10 ^/utils/CI/sette@13382 sette
-
- Property svn:externals
-
NEMO/branches/2019/dev_r11351_fldread_with_XIOS/src/TOP/TRP/trdmxl_trc.F90
r10425 r13463 16 16 !! trd_mxl_trc_init : initialization step 17 17 !!---------------------------------------------------------------------- 18 USE trc ! tracer definitions (trn, trb, tra, etc.) 19 USE trc_oce, ONLY : nn_dttrc ! frequency of step on passive tracers 18 USE trc ! tracer definitions (tr etc.) 20 19 USE dom_oce ! domain definition 21 20 USE zdfmxl , ONLY : nmln ! number of level in the mixed layer … … 50 49 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: ztmltrd2 ! 51 50 51 !! * Substitutions 52 # include "do_loop_substitute.h90" 53 # include "domzgr_substitute.h90" 52 54 !!---------------------------------------------------------------------- 53 55 !! NEMO/TOP 4.0 , NEMO Consortium (2018) … … 70 72 71 73 72 SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn )74 SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn, Kmm ) 73 75 !!---------------------------------------------------------------------- 74 76 !! *** ROUTINE trd_mxl_trc_zint *** … … 92 94 !! 93 95 INTEGER, INTENT( in ) :: ktrd, kjn ! ocean trend index and passive tracer rank 96 INTEGER, INTENT( in ) :: Kmm ! time level index 94 97 CHARACTER(len=2), INTENT( in ) :: ctype ! surface/bottom (2D) or interior (3D) physics 95 98 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) :: ptrc_trdmxl ! passive tracer trend … … 108 111 ! ... Set nmld(ji,jj) = index of first T point below control surf. or outside mixed-layer 109 112 SELECT CASE ( nn_ctls_trc ) ! choice of the control surface 110 CASE ( -2 ) ; STOP 'trdmxl_trc : not ready '! -> isopycnal surface (see ???)113 CASE ( -2 ) ; CALL ctl_stop( 'STOP', 'trdmxl_trc : not ready ' ) ! -> isopycnal surface (see ???) 111 114 CASE ( -1 ) ; nmld_trc(:,:) = neln(:,:) ! -> euphotic layer with light criterion 112 115 CASE ( 0 ) ; nmld_trc(:,:) = nmln(:,:) ! -> ML with density criterion (see zdfmxl) … … 122 125 123 126 IF( jpktrd_trc < jpk ) THEN ! description ??? 124 DO jj = 1, jpj 125 DO ji = 1, jpi 126 IF( nmld_trc(ji,jj) <= jpktrd_trc ) THEN 127 zvlmsk(ji,jj) = tmask(ji,jj,1) 128 ELSE 129 isum = isum + 1 130 zvlmsk(ji,jj) = 0.e0 131 ENDIF 132 END DO 133 END DO 127 DO_2D( 1, 1, 1, 1 ) 128 IF( nmld_trc(ji,jj) <= jpktrd_trc ) THEN 129 zvlmsk(ji,jj) = tmask(ji,jj,1) 130 ELSE 131 isum = isum + 1 132 zvlmsk(ji,jj) = 0.e0 133 ENDIF 134 END_2D 134 135 ENDIF 135 136 … … 147 148 ! ... Weights for vertical averaging 148 149 wkx_trc(:,:,:) = 0.e0 149 DO jk = 1, jpktrd_trc ! initialize wkx_trc with vertical scale factor in mixed-layer 150 DO jj = 1, jpj 151 DO ji = 1, jpi 152 IF( jk - nmld_trc(ji,jj) < 0 ) wkx_trc(ji,jj,jk) = e3t_n(ji,jj,jk) * tmask(ji,jj,jk) 153 END DO 154 END DO 155 END DO 150 DO_3D( 1, 1, 1, 1, 1, jpktrd_trc ) 151 IF( jk - nmld_trc(ji,jj) < 0 ) wkx_trc(ji,jj,jk) = e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk) 152 END_3D 156 153 157 154 rmld_trc(:,:) = 0.e0 … … 183 180 184 181 185 SUBROUTINE trd_mxl_trc( kt )182 SUBROUTINE trd_mxl_trc( kt, Kmm ) 186 183 !!---------------------------------------------------------------------- 187 184 !! *** ROUTINE trd_mxl_trc *** … … 232 229 ! 233 230 INTEGER, INTENT(in) :: kt ! ocean time-step index 231 INTEGER, INTENT(in) :: Kmm ! time level index 234 232 ! 235 233 INTEGER :: ji, jj, jk, jl, ik, it, itmod, jn … … 251 249 252 250 253 IF( nn_dttrc /= 1 ) CALL ctl_stop( " Be careful, trends diags never validated " )254 255 251 ! ====================================================================== 256 252 ! I. Diagnose the purely vertical (K_z) diffusion trend … … 263 259 ! 264 260 DO jn = 1, jptra 265 DO jj = 1, jpj 266 DO ji = 1, jpi 267 ik = nmld_trc(ji,jj) 268 IF( ln_trdtrc(jn) ) & 269 tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - avs(ji,jj,ik) / e3w_n(ji,jj,ik) * tmask(ji,jj,ik) & 270 & * ( trn(ji,jj,ik-1,jn) - trn(ji,jj,ik,jn) ) & 271 & / MAX( 1., rmld_trc(ji,jj) ) * tmask(ji,jj,1) 272 END DO 273 END DO 261 DO_2D( 1, 1, 1, 1 ) 262 ik = nmld_trc(ji,jj) 263 IF( ln_trdtrc(jn) ) & 264 tmltrd_trc(ji,jj,jpmxl_trc_zdf,jn) = - avs(ji,jj,ik) / e3w(ji,jj,ik,Kmm) * tmask(ji,jj,ik) & 265 & * ( tr(ji,jj,ik-1,jn,Kmm) - tr(ji,jj,ik,jn,Kmm) ) & 266 & / MAX( 1., rmld_trc(ji,jj) ) * tmask(ji,jj,1) 267 END_2D 274 268 END DO 275 269 … … 322 316 DO jn = 1, jptra 323 317 IF( ln_trdtrc(jn) ) & 324 tml_trc(:,:,jn) = tml_trc(:,:,jn) + wkx_trc(:,:,jk) * tr n(:,:,jk,jn)318 tml_trc(:,:,jn) = tml_trc(:,:,jn) + wkx_trc(:,:,jk) * tr(:,:,jk,jn,Kmm) 325 319 END DO 326 320 END DO … … 328 322 ! II.3 Initialize mixed-layer "before" arrays for the 1rst analysis window 329 323 ! ------------------------------------------------------------------------ 330 IF( kt == nittrc000 + nn_dttrc) THEN ! i.e. ( .NOT. ln_rstart ).AND.( kt == nit000 + 1) ???324 IF( kt == nittrc000 + 1 ) THEN ! i.e. ( .NOT. ln_rstart ).AND.( kt == nit000 + 1) ??? 331 325 ! 332 326 DO jn = 1, jptra … … 408 402 DO jn = 1, jptra 409 403 IF( ln_trdtrc(jn) ) THEN 410 !-- Compute total trends (use rdttrc instead of rdt ???)404 !-- Compute total trends 411 405 IF ( ln_trcadv_muscl .OR. ln_trcadv_muscl2 ) THEN ! EULER-FORWARD schemes 412 ztmltot(:,:,jn) = ( tml_trc(:,:,jn) - tmlbn_trc(:,:,jn) )/r dt406 ztmltot(:,:,jn) = ( tml_trc(:,:,jn) - tmlbn_trc(:,:,jn) )/rn_Dt 413 407 ELSE ! LEAP-FROG schemes 414 ztmltot(:,:,jn) = ( tml_trc(:,:,jn) - tmlbn_trc(:,:,jn) + tmlb_trc(:,:,jn) - tmlbb_trc(:,:,jn))/(2.*r dt)408 ztmltot(:,:,jn) = ( tml_trc(:,:,jn) - tmlbn_trc(:,:,jn) + tmlb_trc(:,:,jn) - tmlbb_trc(:,:,jn))/(2.*rn_Dt) 415 409 ENDIF 416 410 … … 431 425 432 426 #if defined key_diainstant 433 STOP 'tmltrd_trc : key_diainstant was never checked within trdmxl. Comment this to proceed.'427 CALL ctl_stop( 'STOP', 'tmltrd_trc : key_diainstant was never checked within trdmxl. Comment this to proceed.' ) 434 428 #endif 435 429 ENDIF … … 446 440 IF( ln_trdtrc(jn) ) THEN 447 441 tml_sum_trc(:,:,jn) = tmlbn_trc(:,:,jn) + 2 * ( tml_sum_trc(:,:,jn) - tml_trc(:,:,jn) ) + tml_trc(:,:,jn) 448 ztmltot2 (:,:,jn) = ( tml_sum_trc(:,:,jn) - tml_sumb_trc(:,:,jn) ) / ( 2.*r dt ) ! now tracer unit is /sec442 ztmltot2 (:,:,jn) = ( tml_sum_trc(:,:,jn) - tml_sumb_trc(:,:,jn) ) / ( 2.*rn_Dt ) ! now tracer unit is /sec 449 443 ENDIF 450 444 END DO … … 857 851 # if defined key_diainstant 858 852 IF( .NOT. ln_trdmxl_trc_instant ) THEN 859 STOP 'trd_mxl_trc : this was never checked. Comment this line to proceed...'860 ENDIF 861 zsto = nn_trd_trc * r dt853 CALL ctl_stop( 'STOP', 'trd_mxl_trc : this was never checked. Comment this line to proceed...' ) 854 ENDIF 855 zsto = nn_trd_trc * rn_Dt 862 856 clop = "inst("//TRIM(clop)//")" 863 857 # else 864 858 IF( ln_trdmxl_trc_instant ) THEN 865 zsto = r dt ! inst. diags : we use IOIPSL time averaging859 zsto = rn_Dt ! inst. diags : we use IOIPSL time averaging 866 860 ELSE 867 zsto = nn_trd_trc * r dt ! mean diags : we DO NOT use any IOIPSL time averaging861 zsto = nn_trd_trc * rn_Dt ! mean diags : we DO NOT use any IOIPSL time averaging 868 862 ENDIF 869 863 clop = "ave("//TRIM(clop)//")" 870 864 # endif 871 zout = nn_trd_trc * r dt872 iiter = ( nittrc000 - 1 ) / nn_dttrc865 zout = nn_trd_trc * rn_Dt 866 iiter = nittrc000 - 1 873 867 874 868 IF(lwp) WRITE (numout,*) ' netCDF initialization' … … 876 870 ! II.2 Compute julian date from starting date of the run 877 871 ! ------------------------------------------------------ 878 CALL ymds2ju( nyear, nmonth, nday, r dt, zjulian )872 CALL ymds2ju( nyear, nmonth, nday, rn_Dt, zjulian ) 879 873 zjulian = zjulian - adatrj ! set calendar origin to the beginning of the experiment 880 874 IF(lwp) WRITE(numout,*)' ' … … 908 902 CALL dia_nam( clhstnam, nn_trd_trc, csuff ) 909 903 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & 910 & 1, jpi, 1, jpj, iiter, zjulian, r dt, nh_t(jn), nidtrd(jn), domain_id=nidom, snc4chunks=snc4set )904 & 1, jpi, 1, jpj, iiter, zjulian, rn_Dt, nh_t(jn), nidtrd(jn), domain_id=nidom, snc4chunks=snc4set ) 911 905 912 906 !-- Define the ML depth variable … … 928 922 !-- Define miscellaneous passive tracer mixed-layer variables 929 923 IF( jpltrd_trc /= jpmxl_trc_atf .OR. jpltrd_trc - 1 /= jpmxl_trc_radb ) THEN 930 STOP 'Error : jpltrd_trc /= jpmxl_trc_atf .OR. jpltrd_trc - 1 /= jpmxl_trc_radb'! see below924 CALL ctl_stop( 'STOP', 'Error : jpltrd_trc /= jpmxl_trc_atf .OR. jpltrd_trc - 1 /= jpmxl_trc_radb' ) ! see below 931 925 ENDIF 932 926 … … 945 939 CALL histdef(nidtrd(jn), trim(clvar)//trim(ctrd_trc(jl,2)), clmxl//" "//clvar//ctrd_trc(jl,1), & 946 940 & cltrcu, jpi, jpj, nh_t(jn), 1 , 1, 1 , -99 , 32, clop, zsto, zout ) ! IOIPSL: time mean 947 END DO ! if zsto=r dt above941 END DO ! if zsto=rn_Dt above 948 942 949 943 CALL histdef(nidtrd(jn), trim(clvar)//trim(ctrd_trc(jpmxl_trc_radb,2)), clmxl//" "//clvar//ctrd_trc(jpmxl_trc_radb,1), & … … 970 964 !!---------------------------------------------------------------------- 971 965 CONTAINS 972 SUBROUTINE trd_mxl_trc( kt ) ! Empty routine966 SUBROUTINE trd_mxl_trc( kt, Kmm ) ! Empty routine 973 967 INTEGER, INTENT( in) :: kt 968 INTEGER, INTENT( in) :: Kmm ! time level index 974 969 WRITE(*,*) 'trd_mxl_trc: You should not have seen this print! error?', kt 975 970 END SUBROUTINE trd_mxl_trc 976 SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn )971 SUBROUTINE trd_mxl_trc_zint( ptrc_trdmxl, ktrd, ctype, kjn, Kmm ) 977 972 INTEGER , INTENT( in ) :: ktrd, kjn ! ocean trend index and passive tracer rank 973 INTEGER , INTENT( in ) :: Kmm ! time level index 978 974 CHARACTER(len=2) , INTENT( in ) :: ctype ! surface/bottom (2D) or interior (3D) physics 979 975 REAL, DIMENSION(:,:,:), INTENT( in ) :: ptrc_trdmxl ! passive trc trend
Note: See TracChangeset
for help on using the changeset viewer.