- Timestamp:
- 2017-03-27T10:50:24+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5785_SSS_obsoper/NEMOGCM/NEMO/OPA_SRC/OBS/obs_sstbias.F90
r7773 r7837 49 49 !! History : 50 50 !! ! : 2014-08 (J. While) Bias correction code for SST obs, 51 !! ! based on obs_rea_altbias51 !! ! based on obs_rea_altbias 52 52 !!---------------------------------------------------------------------- 53 53 !! * Modules used … … 69 69 INTEGER :: jpisstbias ! Number of grid point in latitude for the bias 70 70 INTEGER :: jpjsstbias ! Number of grid point in longitude for the bias 71 INTEGER :: iico ! Grid point indices72 INTEGER :: ijco73 71 INTEGER :: jt 74 72 INTEGER :: i_nx_id ! Index to read the NetCDF file … … 129 127 CALL iom_open( cl_bias_files(jtype), numsstbias, ldstop=.FALSE. ) 130 128 131 IF (numsstbias .GT.0) THEN129 IF (numsstbias > 0) THEN 132 130 133 131 !Read the bias type from the file … … 137 135 iret=NF90_OPEN(TRIM(cl_bias_files(jtype)), NF90_NOWRITE, incfile) 138 136 iret=NF90_GET_ATT( incfile, NF90_GLOBAL, "SST_source", & 139 ifile_source )137 ifile_source ) 140 138 ibiastypes(jtype) = ifile_source 141 139 iret=NF90_CLOSE(incfile) … … 151 149 ! Close the file 152 150 CALL iom_close(numsstbias) 153 151 IF ( lwp ) WRITE(numout,*) 'Read in bias for type: ',ibiastypes(jtype) 154 152 ELSE 155 153 CALL ctl_stop('obs_read_sstbias: File '// & … … 178 176 END DO 179 177 180 CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, &178 CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, & 181 179 & igrdi, igrdj, glamt, zglam ) 182 CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, &180 CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, & 183 181 & igrdi, igrdj, gphit, zgphi ) 184 CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, &182 CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, & 185 183 & igrdi, igrdj, tmask(:,:,1), zmask ) 186 184 187 185 DO jtype = 1, knumtypes 188 186 189 !Find the number observations of t ype190 !and all locate tempory arrays187 !Find the number observations of this type 188 !and allocate tempory arrays 191 189 inumtype = COUNT( sstdata%ntyp(:) == ibiastypes(jtype) ) 192 190 … … 199 197 & zbias( 2,2,inumtype ) ) 200 198 199 IF ( lwp ) WRITE(numout,*) 'Number of obs of type: ',ibiastypes(jtype),' is: ',inumtype 200 201 201 jt=1 202 202 DO jobs = 1, sstdata%nsurf … … 207 207 zglam_tmp(:,:,jt) = zglam(:,:,jobs) 208 208 zgphi_tmp(:,:,jt) = zgphi(:,:,jobs) 209 zgphi_tmp(:,:,jt) = zgphi(:,:,jobs)210 209 zmask_tmp(:,:,jt) = zmask(:,:,jobs) 211 210 … … 215 214 END DO 216 215 217 CALL obs_int_comm_2d( 2, 2, inumtype, &216 CALL obs_int_comm_2d( 2, 2, inumtype, jpi, jpj, & 218 217 & igrdi_tmp(:,:,:), igrdj_tmp(:,:,:), & 219 218 & z_sstbias(:,:,jtype), zbias(:,:,:) ) … … 225 224 zlam = sstdata%rlam(jobs) 226 225 zphi = sstdata%rphi(jobs) 227 iico = sstdata%mi(jobs) 228 ijco = sstdata%mj(jobs) 229 230 CALL obs_int_h2d_init( 1, 1, k2dint, zlam, zphi, & 231 & zglam_tmp(:,:,jt), & 232 & zgphi_tmp(:,:,jt), & 226 227 CALL obs_int_h2d_init( 1, 1, k2dint, zlam, zphi, & 228 & zglam_tmp(:,:,jt), zgphi_tmp(:,:,jt), & 233 229 & zmask_tmp(:,:,jt), zweig, zobsmask ) 234 230 … … 236 232 237 233 ! adjust sst with bias field 238 sstdata%robs(jobs,1) = & 239 & sstdata%robs(jobs,1) - zext(1) 234 sstdata%robs(jobs,1) = sstdata%robs(jobs,1) - zext(1) 240 235 241 236 jt=jt+1 … … 243 238 ENDIF 244 239 END DO 245 240 241 IF ( lwp ) THEN 242 WRITE(numout,*) 'Applied bias to obs of type: ',ibiastypes(jtype) 243 WRITE(numout,*) 'Max/min of bias: ', maxval(zbias(:,:,:)), minval(zbias(:,:,:)) 244 ENDIF 245 246 246 !Deallocate arrays 247 247 DEALLOCATE( &
Note: See TracChangeset
for help on using the changeset viewer.