Changeset 14789 for NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/SBC/sbcrnf.F90
- Timestamp:
- 2021-05-05T13:18:04+02:00 (3 years ago)
- Location:
- NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev _r12970_AGRIF_CMEMSext/AGRIF5 ^/vendors/AGRIF/dev@HEAD ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 ^/vendors/PPR@HEAD ext/PPR 8 9 9 10 # SETTE 10 ^/utils/CI/sette@1 3559sette11 ^/utils/CI/sette@14244 sette
-
- Property svn:externals
-
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/OCE/SBC/sbcrnf.F90
r13497 r14789 34 34 PUBLIC sbc_rnf_alloc ! called in sbcmod module 35 35 PUBLIC sbc_rnf_init ! called in sbcmod module 36 36 37 37 ! !!* namsbc_rnf namelist * 38 38 CHARACTER(len=100) :: cn_dir !: Root directory for location of rnf files … … 42 42 REAL(wp) :: rn_dep_max !: depth over which runoffs is spread (ln_rnf_depth_ini =T) 43 43 INTEGER :: nn_rnf_depth_file !: create (=1) a runoff depth file or not (=0) 44 LOGICAL 44 LOGICAL , PUBLIC :: ln_rnf_icb !: iceberg flux is specified in a file 45 45 LOGICAL :: ln_rnf_tem !: temperature river runoffs attribute specified in a file 46 46 LOGICAL , PUBLIC :: ln_rnf_sal !: salinity river runoffs attribute specified in a file … … 58 58 LOGICAL , PUBLIC :: l_rnfcpl = .false. !: runoffs recieved from oasis 59 59 INTEGER , PUBLIC :: nkrnf = 0 !: nb of levels over which Kz is increased at river mouths 60 60 61 61 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnfmsk !: river mouth mask (hori.) 62 62 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rnfmsk_z !: river mouth mask (vert.) 63 63 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: h_rnf !: depth of runoff in m 64 64 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: nk_rnf !: depth of runoff in model levels 65 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rnf_tsc_b, rnf_tsc !: before and now T & S runoff contents [K.m/s & PSU.m/s] 65 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rnf_tsc_b, rnf_tsc !: before and now T & S runoff contents [K.m/s & PSU.m/s] 66 66 67 67 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_rnf ! structure: river runoff (file information, fields read) 68 68 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_i_rnf ! structure: iceberg flux (file information, fields read) 69 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_s_rnf ! structure: river runoff salinity (file information, fields read) 70 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_t_rnf ! structure: river runoff temperature (file information, fields read) 71 69 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_s_rnf ! structure: river runoff salinity (file information, fields read) 70 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_t_rnf ! structure: river runoff temperature (file information, fields read) 71 72 72 !! * Substitutions 73 73 # include "do_loop_substitute.h90" … … 131 131 IF( ln_rnf_icb ) THEN 132 132 fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1) ! updated runoff value at time step kt 133 CALL iom_put( 'iceberg_cea' , fwficb(:,:) ) ! output iceberg flux 134 CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus ) ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 133 rnf(:,:) = rnf(:,:) + fwficb(:,:) 134 qns(:,:) = qns(:,:) - fwficb(:,:) * rLfus 135 !!qns_tot(:,:) = qns_tot(:,:) - fwficb(:,:) * rLfus 136 !!qns_oce(:,:) = qns_oce(:,:) - fwficb(:,:) * rLfus 137 CALL iom_put( 'iceberg_cea' , fwficb(:,:) ) ! output iceberg flux 138 CALL iom_put( 'hflx_icb_cea' , -fwficb(:,:) * rLfus ) ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 135 139 ENDIF 136 140 ENDIF … … 152 156 CALL iom_put( 'runoffs' , rnf(:,:) ) ! output runoff mass flux 153 157 IF( iom_use('hflx_rnf_cea') ) CALL iom_put( 'hflx_rnf_cea', rnf_tsc(:,:,jp_tem) * rho0 * rcp ) ! output runoff sensible heat (W/m2) 158 IF( iom_use('sflx_rnf_cea') ) CALL iom_put( 'sflx_rnf_cea', rnf_tsc(:,:,jp_sal) * rho0 ) ! output runoff salt flux (g/m2/s) 154 159 ENDIF 155 160 ! … … 157 162 IF( kt == nit000 ) THEN ! set the forcing field at nit000 - 1 ! 158 163 ! ! ---------------------------------------- ! 159 IF( ln_rstart .AND. & !* Restart: read in restart file 160 & iom_varid( numror, 'rnf_b', ldstop = .FALSE. ) > 0 ) THEN 164 IF( ln_rstart .AND. .NOT.l_1st_euler ) THEN !* Restart: read in restart file 161 165 IF(lwp) WRITE(numout,*) ' nit000-1 runoff forcing fields red in the restart file', lrxios 162 CALL iom_get( numror, jpdom_auto, 'rnf_b' , rnf_b, ldxios = lrxios )! before runoff163 CALL iom_get( numror, jpdom_auto, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem) , ldxios = lrxios) ! before heat content of runoff164 CALL iom_get( numror, jpdom_auto, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal) , ldxios = lrxios) ! before salinity content of runoff165 ELSE 166 CALL iom_get( numror, jpdom_auto, 'rnf_b' , rnf_b ) ! before runoff 167 CALL iom_get( numror, jpdom_auto, 'rnf_hc_b', rnf_tsc_b(:,:,jp_tem) ) ! before heat content of runoff 168 CALL iom_get( numror, jpdom_auto, 'rnf_sc_b', rnf_tsc_b(:,:,jp_sal) ) ! before salinity content of runoff 169 ELSE !* no restart: set from nit000 values 166 170 IF(lwp) WRITE(numout,*) ' nit000-1 runoff forcing fields set to nit000' 167 171 rnf_b (:,: ) = rnf (:,: ) … … 176 180 & 'at it= ', kt,' date= ', ndastp 177 181 IF(lwp) WRITE(numout,*) '~~~~' 178 IF( lwxios ) CALL iom_swap( cwxios_context ) 179 CALL iom_rstput( kt, nitrst, numrow, 'rnf_b' , rnf, ldxios = lwxios ) 180 CALL iom_rstput( kt, nitrst, numrow, 'rnf_hc_b', rnf_tsc(:,:,jp_tem), ldxios = lwxios ) 181 CALL iom_rstput( kt, nitrst, numrow, 'rnf_sc_b', rnf_tsc(:,:,jp_sal), ldxios = lwxios ) 182 IF( lwxios ) CALL iom_swap( cxios_context ) 182 CALL iom_rstput( kt, nitrst, numrow, 'rnf_b' , rnf ) 183 CALL iom_rstput( kt, nitrst, numrow, 'rnf_hc_b', rnf_tsc(:,:,jp_tem) ) 184 CALL iom_rstput( kt, nitrst, numrow, 'rnf_sc_b', rnf_tsc(:,:,jp_sal) ) 183 185 ENDIF 184 186 ! … … 250 252 INTEGER :: ios ! Local integer output status for namelist read 251 253 INTEGER :: nbrec ! temporary integer 252 REAL(wp) :: zacoef 253 REAL(wp), DIMENSION(jpi,jpj,2) :: zrnfcl 254 REAL(wp) :: zacoef 255 REAL(wp), DIMENSION(jpi,jpj,2) :: zrnfcl 254 256 !! 255 257 NAMELIST/namsbc_rnf/ cn_dir , ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, ln_rnf_icb, & … … 262 264 IF( sbc_rnf_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_rnf_alloc : unable to allocate arrays' ) 263 265 ! 264 IF( .NOT. ln_rnf ) THEN ! no specific treatment in vicinity of river mouths 266 IF( .NOT. ln_rnf ) THEN ! no specific treatment in vicinity of river mouths 265 267 ln_rnf_mouth = .FALSE. ! default definition needed for example by sbc_ssr or by tra_adv_muscl 266 268 nkrnf = 0 … … 298 300 ! ! ================== 299 301 ! 300 IF( .NOT. l_rnfcpl ) THEN 302 IF( .NOT. l_rnfcpl ) THEN 301 303 ALLOCATE( sf_rnf(1), STAT=ierror ) ! Create sf_rnf structure (runoff inflow) 302 304 IF(lwp) WRITE(numout,*) … … 353 355 IF(lwp) WRITE(numout,*) ' ==>>> runoffs depth read in a file' 354 356 rn_dep_file = TRIM( cn_dir )//TRIM( sn_dep_rnf%clname ) 355 IF( .NOT. sn_dep_rnf%ln_clim ) THEN ; WRITE(rn_dep_file, '(a,"_y",i4)' ) TRIM( rn_dep_file ), nyear ! add year 356 IF( sn_dep_rnf%clftyp == 'monthly' ) WRITE(rn_dep_file, '(a,"m",i2)' ) TRIM( rn_dep_file ), nmonth ! add month 357 IF( .NOT. sn_dep_rnf%ln_clim ) THEN ; WRITE(rn_dep_file, '(a,"_y",i4)' ) TRIM( rn_dep_file ), nyear ! add year 358 IF( sn_dep_rnf%clftyp == 'monthly' ) WRITE(rn_dep_file, '(a,"m",i2)' ) TRIM( rn_dep_file ), nmonth ! add month 357 359 ENDIF 358 360 CALL iom_open ( rn_dep_file, inum ) ! open file … … 480 482 ENDIF 481 483 ! 482 IF( lwxios ) THEN483 CALL iom_set_rstw_var_active('rnf_b')484 CALL iom_set_rstw_var_active('rnf_hc_b')485 CALL iom_set_rstw_var_active('rnf_sc_b')486 ENDIF487 488 484 END SUBROUTINE sbc_rnf_init 489 485
Note: See TracChangeset
for help on using the changeset viewer.