Changeset 13082
- Timestamp:
- 2020-06-10T09:38:08+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/ticket2377/src/OCE/SBC/sbcfwb.F90
r12608 r13082 37 37 REAL(wp) :: a_fwb ! annual domain averaged freshwater budget from the 38 38 ! previous year 39 REAL(wp) :: fwfold ! fwfold to be suppressed40 39 REAL(wp) :: area ! global mean ocean surface (interior domain) 41 40 … … 112 111 ENDIF 113 112 ! 114 CASE ( 2 ) !== fw f budget adjusted fromthe previous year ==!113 CASE ( 2 ) !== fw adjustment based on fw budget at the end of the previous year ==! 115 114 ! 116 115 IF( kt == nit000 ) THEN ! initialisation 117 ! ! Read the corrective factor on precipitations (fwfold)116 ! ! read the fw adjustment (a_fwb) 118 117 IF ( ln_rstart .AND. iom_varid( numror, 'a_fwb', ldstop = .FALSE. ) > 0 ) THEN 119 118 IF(lwp) WRITE(numout,*) 'sbc_fwb : reading FW-budget adjustment from restart file' … … 124 123 CLOSE( inum ) 125 124 END IF 126 fwfold = a_fwb ! current year freshwater budget correction 127 ! ! estimate from the previous year budget 125 ! 128 126 IF(lwp)WRITE(numout,*) 129 IF(lwp)WRITE(numout,*)'sbc_fwb : year = ',iyear , ' freshwater budget correction = ', fwfold127 IF(lwp)WRITE(numout,*)'sbc_fwb : year = ',iyear , ' freshwater budget correction = ', a_fwb 130 128 IF(lwp)WRITE(numout,*)' year = ',iyear-1, ' freshwater budget read = ', a_fwb 131 129 ! … … 134 132 END IF 135 133 ENDIF 136 ! ! Update fwfoldif new year start134 ! ! Update a_fwb if new year start 137 135 ikty = 365 * 86400 / rn_Dt !!bug use of 365 days leap year or 360d year !!!!!!! 138 136 IF( MOD( kt, ikty ) == 0 ) THEN … … 142 140 a_fwb = a_fwb * 1.e+3 / ( area * rday * 365. ) ! convert in Kg/m3/s = mm/s 143 141 !!gm ! !!bug 365d year 144 fwfold = a_fwb ! current year freshwater budget correction145 ! ! estimate from the previous year budget146 142 ENDIF 147 143 ! 148 144 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN ! correct the freshwater fluxes 149 zcoef = fwfold* rcp150 emp(:,:) = emp(:,:) + fwfold* tmask(:,:,1)145 zcoef = a_fwb * rcp 146 emp(:,:) = emp(:,:) + a_fwb * tmask(:,:,1) 151 147 qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 152 148 ENDIF … … 161 157 END IF 162 158 ! 163 IF( kt == nitend .AND. lwm ) THEN ! save fwfoldvalue in a file (only one required)159 IF( kt == nitend .AND. lwm ) THEN ! save a_fwb value in a file (only one required) 164 160 CALL ctl_opn( inum, 'EMPave.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 165 161 WRITE( inum, "(24X,I8,2ES24.16)" ) nyear, a_fwb
Note: See TracChangeset
for help on using the changeset viewer.