- Timestamp:
- 2020-06-26T10:26:32+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement
- Property svn:externals
-
old new 8 8 9 9 # SETTE 10 ^/utils/CI/sette@ HEADsette10 ^/utils/CI/sette@12931 sette
-
- Property svn:externals
-
NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/OCE/DIA/diaar5.F90
r12489 r13159 32 32 REAL(wp) :: vol0 ! ocean volume (interior domain) 33 33 REAL(wp) :: area_tot ! total ocean surface (interior domain) 34 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,: ) :: area ! cell surface (interior domain)35 34 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,: ) :: thick0 ! ocean thickness (interior domain) 36 35 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sn0 ! initial salinity … … 54 53 !!---------------------------------------------------------------------- 55 54 ! 56 ALLOCATE( area(jpi,jpj),thick0(jpi,jpj) , sn0(jpi,jpj,jpk) , STAT=dia_ar5_alloc )55 ALLOCATE( thick0(jpi,jpj) , sn0(jpi,jpj,jpk) , STAT=dia_ar5_alloc ) 57 56 ! 58 57 CALL mpp_sum ( 'diaar5', dia_ar5_alloc ) … … 78 77 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zarea_ssh , zbotpres ! 2D workspace 79 78 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zpe, z2d ! 2D workspace 80 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zrhd , z rhop, ztpot! 3D workspace79 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zrhd , ztpot ! 3D workspace 81 80 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: ztsn ! 4D workspace 82 81 … … 88 87 IF( l_ar5 ) THEN 89 88 ALLOCATE( zarea_ssh(jpi,jpj), zbotpres(jpi,jpj), z2d(jpi,jpj) ) 90 ALLOCATE( zrhd(jpi,jpj,jpk) , zrhop(jpi,jpj,jpk))89 ALLOCATE( zrhd(jpi,jpj,jpk) ) 91 90 ALLOCATE( ztsn(jpi,jpj,jpk,jpts) ) 92 zarea_ssh(:,:) = area(:,:) * ssh(:,:,Kmm)93 ENDIF 94 ! 95 CALL iom_put( 'e2u' , e2u (:,:) )96 CALL iom_put( 'e1v' , e1v (:,:) )97 CALL iom_put( 'areacello', area(:,:) )91 zarea_ssh(:,:) = e1e2t(:,:) * ssh(:,:,Kmm) 92 ENDIF 93 ! 94 CALL iom_put( 'e2u' , e2u (:,:) ) 95 CALL iom_put( 'e1v' , e1v (:,:) ) 96 CALL iom_put( 'areacello', e1e2t(:,:) ) 98 97 ! 99 98 IF( iom_use( 'volcello' ) .OR. iom_use( 'masscello' ) ) THEN 100 99 zrhd(:,:,jpk) = 0._wp ! ocean volume ; rhd is used as workspace 101 100 DO jk = 1, jpkm1 102 zrhd(:,:,jk) = area(:,:) * e3t(:,:,jk,Kmm) * tmask(:,:,jk)101 zrhd(:,:,jk) = e1e2t(:,:) * e3t(:,:,jk,Kmm) * tmask(:,:,jk) 103 102 END DO 104 103 CALL iom_put( 'volcello' , zrhd(:,:,:) ) ! WARNING not consistent with CMIP DR where volcello is at ca. 2000 … … 151 150 END IF 152 151 ! 153 zarho = glob_sum( 'diaar5', area(:,:) * zbotpres(:,:) )152 zarho = glob_sum( 'diaar5', e1e2t(:,:) * zbotpres(:,:) ) 154 153 zssh_steric = - zarho / area_tot 155 154 CALL iom_put( 'sshthster', zssh_steric ) 156 155 157 156 ! ! steric sea surface height 158 CALL eos( ts(:,:,:,:,Kmm), zrhd, zrhop, gdept(:,:,:,Kmm) ) ! now in situ and potential density159 zrhop(:,:,jpk) = 0._wp160 CALL iom_put( 'rhop', zrhop )161 !162 157 zbotpres(:,:) = 0._wp ! no atmospheric surface pressure, levitating sea-ice 163 158 DO jk = 1, jpkm1 164 zbotpres(:,:) = zbotpres(:,:) + e3t(:,:,jk,Kmm) * zrhd(:,:,jk)159 zbotpres(:,:) = zbotpres(:,:) + e3t(:,:,jk,Kmm) * rhd(:,:,jk) 165 160 END DO 166 161 IF( ln_linssh ) THEN … … 169 164 DO jj = 1,jpj 170 165 iks = mikt(ji,jj) 171 zbotpres(ji,jj) = zbotpres(ji,jj) + ssh(ji,jj,Kmm) * zrhd(ji,jj,iks) + riceload(ji,jj)166 zbotpres(ji,jj) = zbotpres(ji,jj) + ssh(ji,jj,Kmm) * rhd(ji,jj,iks) + riceload(ji,jj) 172 167 END DO 173 168 END DO 174 169 ELSE 175 zbotpres(:,:) = zbotpres(:,:) + ssh(:,:,Kmm) * zrhd(:,:,1)170 zbotpres(:,:) = zbotpres(:,:) + ssh(:,:,Kmm) * rhd(:,:,1) 176 171 END IF 177 172 END IF 178 173 ! 179 zarho = glob_sum( 'diaar5', area(:,:) * zbotpres(:,:) )174 zarho = glob_sum( 'diaar5', e1e2t(:,:) * zbotpres(:,:) ) 180 175 zssh_steric = - zarho / area_tot 181 176 CALL iom_put( 'sshsteric', zssh_steric ) … … 191 186 ztsn(:,:,:,:) = 0._wp ! ztsn(:,:,1,jp_tem/sal) is used here as 2D Workspace for temperature & salinity 192 187 DO_3D_11_11( 1, jpkm1 ) 193 zztmp = area(ji,jj) * e3t(ji,jj,jk,Kmm)188 zztmp = e1e2t(ji,jj) * e3t(ji,jj,jk,Kmm) 194 189 ztsn(ji,jj,1,jp_tem) = ztsn(ji,jj,1,jp_tem) + zztmp * ts(ji,jj,jk,jp_tem,Kmm) 195 190 ztsn(ji,jj,1,jp_sal) = ztsn(ji,jj,1,jp_sal) + zztmp * ts(ji,jj,jk,jp_sal,Kmm) … … 237 232 z2d(:,:) = 0._wp 238 233 DO jk = 1, jpkm1 239 z2d(:,:) = z2d(:,:) + area(:,:) * e3t(:,:,jk,Kmm) * ztpot(:,:,jk)234 z2d(:,:) = z2d(:,:) + e1e2t(:,:) * e3t(:,:,jk,Kmm) * ztpot(:,:,jk) 240 235 END DO 241 236 ztemp = glob_sum( 'diaar5', z2d(:,:) ) … … 244 239 ! 245 240 IF( iom_use( 'ssttot' ) ) THEN ! Output potential temperature in case we use TEOS-10 246 zsst = glob_sum( 'diaar5', area(:,:) * ztpot(:,:,1) )241 zsst = glob_sum( 'diaar5', e1e2t(:,:) * ztpot(:,:,1) ) 247 242 CALL iom_put( 'ssttot', zsst / area_tot ) 248 243 ENDIF … … 259 254 ELSE 260 255 IF( iom_use('ssttot') ) THEN ! Output sst in case we use EOS-80 261 zsst = glob_sum( 'diaar5', area(:,:) * ts(:,:,1,jp_tem,Kmm) )256 zsst = glob_sum( 'diaar5', e1e2t(:,:) * ts(:,:,1,jp_tem,Kmm) ) 262 257 CALL iom_put('ssttot', zsst / area_tot ) 263 258 ENDIF … … 294 289 IF( l_ar5 ) THEN 295 290 DEALLOCATE( zarea_ssh , zbotpres, z2d ) 296 DEALLOCATE( zrhd , zrhop )297 291 DEALLOCATE( ztsn ) 298 292 ENDIF … … 368 362 IF( iom_use( 'voltot' ) .OR. iom_use( 'sshtot' ) .OR. iom_use( 'sshdyn' ) .OR. & 369 363 & iom_use( 'masstot' ) .OR. iom_use( 'temptot' ) .OR. iom_use( 'saltot' ) .OR. & 370 & iom_use( 'botpres' ) .OR. iom_use( 'sshthster' ) .OR. iom_use( 'sshsteric' ) ) L_ar5 = .TRUE. 364 & iom_use( 'botpres' ) .OR. iom_use( 'sshthster' ) .OR. iom_use( 'sshsteric' ) .OR. & 365 & iom_use( 'rhop' ) ) L_ar5 = .TRUE. 371 366 372 367 IF( l_ar5 ) THEN … … 375 370 IF( dia_ar5_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'dia_ar5_init : unable to allocate arrays' ) 376 371 377 area(:,:) = e1e2t(:,:) 378 area_tot = glob_sum( 'diaar5', area(:,:) ) 372 area_tot = glob_sum( 'diaar5', e1e2t(:,:) ) 379 373 380 374 ALLOCATE( zvol0(jpi,jpj) ) … … 383 377 DO_3D_11_11( 1, jpkm1 ) 384 378 idep = tmask(ji,jj,jk) * e3t_0(ji,jj,jk) 385 zvol0 (ji,jj) = zvol0 (ji,jj) + idep * area(ji,jj)379 zvol0 (ji,jj) = zvol0 (ji,jj) + idep * e1e2t(ji,jj) 386 380 thick0(ji,jj) = thick0(ji,jj) + idep 387 381 END_3D -
NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/OCE/DIA/diamlr.F90
r12377 r13159 84 84 INTEGER :: itide ! Number of available tidal components 85 85 REAL(wp) :: ztide_phase ! Tidal-constituent phase at adatrj=0 86 CHARACTER (LEN=4), DIMENSION(jpmax_harmo) :: ctide_selected = ' 86 CHARACTER (LEN=4), DIMENSION(jpmax_harmo) :: ctide_selected = 'n/a ' 87 87 TYPE(tide_harmonic), DIMENSION(:), POINTER :: stideconst 88 88 … … 145 145 ! Retrieve information (frequency, phase, nodal correction) about all 146 146 ! available tidal constituents for placeholder substitution below 147 ctide_selected(1:34) = (/ 'Mf', 'Mm', 'Ssa', 'Mtm', 'Msf', & 148 & 'Msqm', 'Sa', 'K1', 'O1', 'P1', & 149 & 'Q1', 'J1', 'S1', 'M2', 'S2', 'N2', & 150 & 'K2', 'nu2', 'mu2', '2N2', 'L2', & 151 & 'T2', 'eps2', 'lam2', 'R2', 'M3', & 152 & 'MKS2', 'MN4', 'MS4', 'M4', 'N4', & 153 & 'S4', 'M6', 'M8' /) 147 ! Warning: we must use the same character length in an array constructor (at least for gcc compiler) 148 ctide_selected(1:34) = (/ 'Mf ', 'Mm ', 'Ssa ', 'Mtm ', 'Msf ', & 149 & 'Msqm', 'Sa ', 'K1 ', 'O1 ', 'P1 ', & 150 & 'Q1 ', 'J1 ', 'S1 ', 'M2 ', 'S2 ', 'N2 ', & 151 & 'K2 ', 'nu2 ', 'mu2 ', '2N2 ', 'L2 ', & 152 & 'T2 ', 'eps2', 'lam2', 'R2 ', 'M3 ', & 153 & 'MKS2', 'MN4 ', 'MS4 ', 'M4 ', 'N4 ', & 154 & 'S4 ', 'M6 ', 'M8 ' /) 154 155 CALL tide_init_harmonics(ctide_selected, stideconst) 155 156 itide = size(stideconst) -
NEMO/branches/2020/dev_r12563_ASINTER-06_ABL_improvement/src/OCE/DIA/diawri.F90
r12493 r13159 171 171 CALL iom_put( "sbs", z2d ) ! bottom salinity 172 172 ENDIF 173 174 CALL iom_put( "rhop", rhop(:,:,:) ) ! 3D potential density (sigma0) 173 175 174 176 IF ( iom_use("taubot") ) THEN ! bottom stress … … 924 926 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ and forcing fields file created ' 925 927 IF(lwp) WRITE(numout,*) ' and named :', cdfile_name, '...nc' 926 927 #if defined key_si3 928 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE., kdlev = jpl ) 929 #else 930 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. ) 931 #endif 932 928 ! 929 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. ) 930 ! 933 931 CALL iom_rstput( 0, 0, inum, 'votemper', ts(:,:,:,jp_tem,Kmm) ) ! now temperature 934 932 CALL iom_rstput( 0, 0, inum, 'vosaline', ts(:,:,:,jp_sal,Kmm) ) ! now salinity … … 943 941 CALL iom_rstput( 0, 0, inum, 'risfdep', risfdep ) ! now k-velocity 944 942 CALL iom_rstput( 0, 0, inum, 'ht' , ht ) ! now water column height 945 943 ! 946 944 IF ( ln_isf ) THEN 947 945 IF (ln_isfcav_mlt) THEN … … 949 947 CALL iom_rstput( 0, 0, inum, 'rhisf_cav_tbl', rhisf_tbl_cav ) ! now k-velocity 950 948 CALL iom_rstput( 0, 0, inum, 'rfrac_cav_tbl', rfrac_tbl_cav ) ! now k-velocity 951 CALL iom_rstput( 0, 0, inum, 'misfkb_cav', REAL(misfkb_cav, 8)) ! now k-velocity952 CALL iom_rstput( 0, 0, inum, 'misfkt_cav', REAL(misfkt_cav, 8)) ! now k-velocity953 CALL iom_rstput( 0, 0, inum, 'mskisf_cav', REAL(mskisf_cav, 8), ktype = jp_i1 )949 CALL iom_rstput( 0, 0, inum, 'misfkb_cav', REAL(misfkb_cav,wp) ) ! now k-velocity 950 CALL iom_rstput( 0, 0, inum, 'misfkt_cav', REAL(misfkt_cav,wp) ) ! now k-velocity 951 CALL iom_rstput( 0, 0, inum, 'mskisf_cav', REAL(mskisf_cav,wp), ktype = jp_i1 ) 954 952 END IF 955 953 IF (ln_isfpar_mlt) THEN 956 CALL iom_rstput( 0, 0, inum, 'isfmsk_par', REAL(mskisf_par, 8)) ! now k-velocity954 CALL iom_rstput( 0, 0, inum, 'isfmsk_par', REAL(mskisf_par,wp) ) ! now k-velocity 957 955 CALL iom_rstput( 0, 0, inum, 'fwfisf_par', fwfisf_par ) ! now k-velocity 958 956 CALL iom_rstput( 0, 0, inum, 'rhisf_par_tbl', rhisf_tbl_par ) ! now k-velocity 959 957 CALL iom_rstput( 0, 0, inum, 'rfrac_par_tbl', rfrac_tbl_par ) ! now k-velocity 960 CALL iom_rstput( 0, 0, inum, 'misfkb_par', REAL(misfkb_par, 8)) ! now k-velocity961 CALL iom_rstput( 0, 0, inum, 'misfkt_par', REAL(misfkt_par, 8)) ! now k-velocity962 CALL iom_rstput( 0, 0, inum, 'mskisf_par', REAL(mskisf_par, 8), ktype = jp_i1 )958 CALL iom_rstput( 0, 0, inum, 'misfkb_par', REAL(misfkb_par,wp) ) ! now k-velocity 959 CALL iom_rstput( 0, 0, inum, 'misfkt_par', REAL(misfkt_par,wp) ) ! now k-velocity 960 CALL iom_rstput( 0, 0, inum, 'mskisf_par', REAL(mskisf_par,wp), ktype = jp_i1 ) 963 961 END IF 964 962 END IF 965 963 ! 966 964 IF( ALLOCATED(ahtu) ) THEN 967 965 CALL iom_rstput( 0, 0, inum, 'ahtu', ahtu ) ! aht at u-point … … 993 991 CALL iom_rstput ( 0, 0, inum, "qz1_abl", tq_abl(:,:,2,nt_a,2) ) ! now first level humidity 994 992 ENDIF 995 993 ! 994 CALL iom_close( inum ) 995 ! 996 996 #if defined key_si3 997 997 IF( nn_ice == 2 ) THEN ! condition needed in case agrif + ice-model but no-ice in child grid 998 CALL iom_open( TRIM(cdfile_name)//'_ice', inum, ldwrt = .TRUE., kdlev = jpl, cdcomp = 'ICE' ) 998 999 CALL ice_wri_state( inum ) 999 ENDIF 1000 CALL iom_close( inum ) 1001 ENDIF 1002 ! 1000 1003 #endif 1001 !1002 CALL iom_close( inum )1003 !1004 1004 END SUBROUTINE dia_wri_state 1005 1005
Note: See TracChangeset
for help on using the changeset viewer.