Changeset 15264 for NEMO/branches/2020/ticket2487/src/OCE/SBC/sbcfwb.F90
- Timestamp:
- 2021-09-16T12:42:20+02:00 (3 years ago)
- Location:
- NEMO/branches/2020/ticket2487
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/ticket2487
- Property svn:externals
-
old new 1 ^/utils/build/arch@12130 arch2 ^/utils/build/makenemo@12191 makenemo3 ^/utils/build/mk@11662 mk4 ^/utils/tools_r4.0-HEAD@1 2672tools5 ^/vendors/AGRIF/ dev@10586ext/AGRIF6 ^/vendors/FCM@10134 ext/FCM7 ^/vendors/IOIPSL@9655 ext/IOIPSL1 ^/utils/build/arch@12130 arch 2 ^/utils/build/makenemo@12191 makenemo 3 ^/utils/build/mk@11662 mk 4 ^/utils/tools_r4.0-HEAD@14974 tools 5 ^/vendors/AGRIF/stable@14105 ext/AGRIF 6 ^/vendors/FCM@10134 ext/FCM 7 ^/vendors/IOIPSL@9655 ext/IOIPSL 8 8 9 9 # SETTE mapping (inactive)
-
- Property svn:externals
-
NEMO/branches/2020/ticket2487/src/OCE/SBC/sbcfwb.F90
r13301 r15264 24 24 ! 25 25 USE in_out_manager ! I/O manager 26 USE iom ! IOM 26 27 USE lib_mpp ! distribued memory computing library 27 28 USE timing ! Timing … … 101 102 snwice_mass_b(:,:) = 0.e0 ! no sea-ice model is being used : no snow+ice mass 102 103 snwice_mass (:,:) = 0.e0 104 snwice_fmass (:,:) = 0.e0 103 105 #endif 104 106 ! … … 116 118 emp(:,:) = emp(:,:) - z_fwfprv(1) * tmask(:,:,1) 117 119 qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 120 ! outputs 121 IF( iom_use('hflx_fwb_cea') ) CALL iom_put( 'hflx_fwb_cea', zcoef * sst_m(:,:) * tmask(:,:,1) ) 122 IF( iom_use('vflx_fwb_cea') ) CALL iom_put( 'vflx_fwb_cea', z_fwfprv(1) * tmask(:,:,1) ) 118 123 ENDIF 119 124 ! … … 122 127 IF( kt == nit000 ) THEN ! initialisation 123 128 ! ! Read the corrective factor on precipitations (fwfold) 124 CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 125 READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 126 CLOSE( inum ) 129 IF ( ln_rstart .AND. iom_varid( numror, 'a_fwb_b', ldstop = .FALSE. ) > 0 & 130 & .AND. iom_varid( numror, 'a_fwb', ldstop = .FALSE. ) > 0 ) THEN 131 IF(lwp) WRITE(numout,*) 'sbc_fwb : reading FW-budget adjustment from restart file' 132 CALL iom_get( numror, 'a_fwb_b', a_fwb_b, ldxios = lrxios ) 133 CALL iom_get( numror, 'a_fwb', a_fwb, ldxios = lrxios ) 134 ELSE 135 CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 136 READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 137 CLOSE( inum ) 138 END IF 127 139 fwfold = a_fwb ! current year freshwater budget correction 128 140 ! ! estimate from the previous year budget … … 131 143 IF(lwp)WRITE(numout,*)' year = ',iyear-1, ' freshwater budget read = ', a_fwb 132 144 IF(lwp)WRITE(numout,*)' year = ',iyear-2, ' freshwater budget read = ', a_fwb_b 145 ! 146 IF( lwxios ) THEN ! Activate output of restart variables 147 CALL iom_set_rstw_var_active( 'a_fwb_b' ) 148 CALL iom_set_rstw_var_active( 'a_fwb' ) 149 END IF 133 150 ELSEIF( ( nday_year == 1 ) .AND. ( nsec_day == NINT( 0.5_wp * rdt ) ) ) THEN ! Update fwfold at the start of 1 January 134 151 a_fwb_b = a_fwb ! mean sea level taking into account the ice+snow … … 144 161 emp(:,:) = emp(:,:) + fwfold * tmask(:,:,1) 145 162 qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction 146 ENDIF 163 ! outputs 164 IF( iom_use('hflx_fwb_cea') ) CALL iom_put( 'hflx_fwb_cea', -zcoef * sst_m(:,:) * tmask(:,:,1) ) 165 IF( iom_use('vflx_fwb_cea') ) CALL iom_put( 'vflx_fwb_cea', -fwfold * tmask(:,:,1) ) 166 ENDIF 167 ! Output restart information 168 IF( lrst_oce ) THEN 169 IF(lwp) WRITE(numout,*) 170 IF(lwp) WRITE(numout,*) 'sbc_fwb : writing FW-budget adjustment to ocean restart file at it = ', kt 171 IF(lwp) WRITE(numout,*) '~~~~' 172 IF( lwxios ) CALL iom_swap( cwxios_context ) 173 CALL iom_rstput( kt, nitrst, numrow, 'a_fwb_b', a_fwb_b, ldxios = lwxios ) 174 CALL iom_rstput( kt, nitrst, numrow, 'a_fwb', a_fwb, ldxios = lwxios ) 175 IF( lwxios ) CALL iom_swap( cxios_context ) 176 END IF 147 177 ! 148 178 IF( kt == nitend .AND. lwm ) THEN ! save fwfold value in a file (only one required) … … 188 218 qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:) ! account for change to the heat budget due to fw correction 189 219 erp(:,:) = erp(:,:) + zerp_cor(:,:) 220 ! outputs 221 IF( iom_use('hflx_fwb_cea') ) CALL iom_put( 'hflx_fwb_cea', -zerp_cor(:,:) * rcp * sst_m(:,:) ) 222 IF( iom_use('vflx_fwb_cea') ) CALL iom_put( 'vflx_fwb_cea', -zerp_cor(:,:) ) 190 223 ! 191 224 IF( nprint == 1 .AND. lwp ) THEN ! control print
Note: See TracChangeset
for help on using the changeset viewer.