Changeset 8695
- Timestamp:
- 2017-11-10T16:31:19+01:00 (7 years ago)
- Location:
- branches/UKMO/dev_r5518_obs_oper_update_bgc3d/NEMOGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_obs_oper_update_bgc3d/NEMOGCM/CONFIG/SHARED/namelist_ref
r7992 r8695 1213 1213 ln_s_at_t = .false. ! Logical switch for computing model S at T obs if not there 1214 1214 ln_sstnight = .false. ! Logical switch for calculating night-time average for SST obs 1215 ln_sla_fp_indegs = .true. ! Logical: T=> averaging footpring is in degrees, F=> in metres 1215 ln_default_fp_indegs = .true. ! Logical: T=> averaging footprint is in degrees, F=> in metres 1216 ln_sla_fp_indegs = .true. ! Logical: T=> averaging footprint is in degrees, F=> in metres 1216 1217 ln_sst_fp_indegs = .true. 1217 1218 ln_sss_fp_indegs = .true. … … 1228 1229 cn_gridsearchfile = 'gridsearch.nc' ! Grid search file name 1229 1230 rn_gridsearchres = 0.5 ! Grid search resolution 1231 rn_default_avglamscl = 0. ! Default E/W diameter of observation footprint (metres/degrees) 1232 rn_default_avgphiscl = 0. ! Default N/S diameter of observation footprint (metres/degrees) 1230 1233 rn_sla_avglamscl = 0. ! E/W diameter of SLA observation footprint (metres/degrees) 1231 1234 rn_sla_avgphiscl = 0. ! N/S diameter of SLA observation footprint (metres/degrees) 1232 rn_sst_avglamscl = 0. 1233 rn_sst_avgphiscl = 0. 1234 rn_sss_avglamscl = 0. 1235 rn_sss_avgphiscl = 0. 1236 rn_sic_avglamscl = 0. 1237 rn_sic_avgphiscl = 0. 1235 rn_sst_avglamscl = 0. ! E/W diameter of SST observation footprint (metres/degrees) 1236 rn_sst_avgphiscl = 0. ! N/S diameter of SST observation footprint (metres/degrees) 1237 rn_sss_avglamscl = 0. ! E/W diameter of SSS observation footprint (metres/degrees) 1238 rn_sss_avgphiscl = 0. ! N/S diameter of SSS observation footprint (metres/degrees) 1239 rn_sic_avglamscl = 0. ! E/W diameter of SIC observation footprint (metres/degrees) 1240 rn_sic_avgphiscl = 0. ! N/S diameter of SIC observation footprint (metres/degrees) 1238 1241 nn_1dint = 0 ! Type of vertical interpolation method 1239 nn_2dint = 0! Default horizontal interpolation method1240 nn_2dint_sla = 0! Horizontal interpolation method for SLA1241 nn_2dint_sst = 0! Horizontal interpolation method for SST1242 nn_2dint_sss = 0! Horizontal interpolation method for SSS1243 nn_2dint_sic = 0! Horizontal interpolation method for SIC1242 nn_2dint_default = 0 ! Default horizontal interpolation method 1243 nn_2dint_sla = -1 ! Horizontal interpolation method for SLA 1244 nn_2dint_sst = -1 ! Horizontal interpolation method for SST 1245 nn_2dint_sss = -1 ! Horizontal interpolation method for SSS 1246 nn_2dint_sic = -1 ! Horizontal interpolation method for SIC 1244 1247 nn_msshc = 0 ! MSSH correction scheme 1245 1248 rn_mdtcorr = 1.61 ! MDT correction -
branches/UKMO/dev_r5518_obs_oper_update_bgc3d/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
r8687 r8695 45 45 !! * Module variables 46 46 LOGICAL, PUBLIC :: & 47 & lk_diaobs = .TRUE. !: Include this for backwards compatibility at NEMO 3.6. 48 LOGICAL :: ln_diaobs !: Logical switch for the obs operator 49 LOGICAL :: ln_sstnight !: Logical switch for night mean SST obs 50 LOGICAL :: ln_sla_fp_indegs !: T=> SLA obs footprint size specified in degrees, F=> in metres 51 LOGICAL :: ln_sst_fp_indegs !: T=> SST obs footprint size specified in degrees, F=> in metres 52 LOGICAL :: ln_sss_fp_indegs !: T=> SSS obs footprint size specified in degrees, F=> in metres 53 LOGICAL :: ln_sic_fp_indegs !: T=> sea-ice obs footprint size specified in degrees, F=> in metres 54 55 REAL(wp) :: rn_sla_avglamscl !: E/W diameter of SLA observation footprint (metres) 56 REAL(wp) :: rn_sla_avgphiscl !: N/S diameter of SLA observation footprint (metres) 57 REAL(wp) :: rn_sst_avglamscl !: E/W diameter of SST observation footprint (metres) 58 REAL(wp) :: rn_sst_avgphiscl !: N/S diameter of SST observation footprint (metres) 59 REAL(wp) :: rn_sss_avglamscl !: E/W diameter of SSS observation footprint (metres) 60 REAL(wp) :: rn_sss_avgphiscl !: N/S diameter of SSS observation footprint (metres) 61 REAL(wp) :: rn_sic_avglamscl !: E/W diameter of sea-ice observation footprint (metres) 62 REAL(wp) :: rn_sic_avgphiscl !: N/S diameter of sea-ice observation footprint (metres) 63 64 INTEGER :: nn_1dint !: Vertical interpolation method 65 INTEGER :: nn_2dint !: Default horizontal interpolation method 66 INTEGER :: nn_2dint_sla !: SLA horizontal interpolation method 67 INTEGER :: nn_2dint_sst !: SST horizontal interpolation method 68 INTEGER :: nn_2dint_sss !: SSS horizontal interpolation method 69 INTEGER :: nn_2dint_sic !: Seaice horizontal interpolation method 47 & lk_diaobs = .TRUE. !: Include this for backwards compatibility at NEMO 3.6. 48 LOGICAL :: ln_diaobs !: Logical switch for the obs operator 49 LOGICAL :: ln_sstnight !: Logical switch for night mean SST obs 50 LOGICAL :: ln_default_fp_indegs !: T=> Default obs footprint size specified in degrees, F=> in metres 51 LOGICAL :: ln_sla_fp_indegs !: T=> SLA obs footprint size specified in degrees, F=> in metres 52 LOGICAL :: ln_sst_fp_indegs !: T=> SST obs footprint size specified in degrees, F=> in metres 53 LOGICAL :: ln_sss_fp_indegs !: T=> SSS obs footprint size specified in degrees, F=> in metres 54 LOGICAL :: ln_sic_fp_indegs !: T=> sea-ice obs footprint size specified in degrees, F=> in metres 55 56 REAL(wp) :: rn_default_avglamscl !: Default E/W diameter of observation footprint 57 REAL(wp) :: rn_default_avgphiscl !: Default N/S diameter of observation footprint 58 REAL(wp) :: rn_sla_avglamscl !: E/W diameter of SLA observation footprint 59 REAL(wp) :: rn_sla_avgphiscl !: N/S diameter of SLA observation footprint 60 REAL(wp) :: rn_sst_avglamscl !: E/W diameter of SST observation footprint 61 REAL(wp) :: rn_sst_avgphiscl !: N/S diameter of SST observation footprint 62 REAL(wp) :: rn_sss_avglamscl !: E/W diameter of SSS observation footprint 63 REAL(wp) :: rn_sss_avgphiscl !: N/S diameter of SSS observation footprint 64 REAL(wp) :: rn_sic_avglamscl !: E/W diameter of sea-ice observation footprint 65 REAL(wp) :: rn_sic_avgphiscl !: N/S diameter of sea-ice observation footprint 66 67 INTEGER :: nn_1dint !: Vertical interpolation method 68 INTEGER :: nn_2dint_default !: Default horizontal interpolation method 69 INTEGER :: nn_2dint_sla !: SLA horizontal interpolation method (-1 = default) 70 INTEGER :: nn_2dint_sst !: SST horizontal interpolation method (-1 = default) 71 INTEGER :: nn_2dint_sss !: SSS horizontal interpolation method (-1 = default) 72 INTEGER :: nn_2dint_sic !: Seaice horizontal interpolation method (-1 = default) 70 73 71 74 INTEGER, DIMENSION(imaxavtypes) :: & … … 141 144 INTEGER :: jfile ! Counter for files 142 145 INTEGER :: jnumsstbias ! Number of SST bias files to read and apply 146 INTEGER :: n2dint_type ! Local version of nn_2dint* 143 147 144 148 CHARACTER(len=128), DIMENSION(jpmaxnfiles) :: & … … 194 198 REAL(dp) :: rn_dobsend ! Obs window end date YYYYMMDD.HHMMSS 195 199 200 REAL(wp) :: rtype_avglamscl ! Local version of rn_*_avglamscl 201 REAL(wp) :: rtype_avgphiscl ! Local version of rn_*_avgphiscl 202 196 203 CHARACTER(len=128), DIMENSION(:,:), ALLOCATABLE :: & 197 204 & clproffiles, & ! Profile filenames … … 200 207 LOGICAL :: llvar1 ! Logical for profile variable 1 201 208 LOGICAL :: llvar2 ! Logical for profile variable 1 209 LOGICAL :: ltype_fpindegs ! Local version of ln_*_fp_indegs 210 LOGICAL :: ltype_night ! Local version of ln_sstnight (false for other variables) 202 211 203 212 REAL(wp), POINTER, DIMENSION(:,:) :: & … … 222 231 & ln_grid_global, ln_grid_search_lookup, & 223 232 & ln_ignmis, ln_s_at_t, ln_bound_reject, & 224 & ln_sstnight, 233 & ln_sstnight, ln_default_fp_indegs, & 225 234 & ln_sla_fp_indegs, ln_sst_fp_indegs, & 226 235 & ln_sss_fp_indegs, ln_sic_fp_indegs, & … … 240 249 & cn_gridsearchfile, rn_gridsearchres, & 241 250 & rn_dobsini, rn_dobsend, & 251 & rn_default_avglamscl, rn_default_avgphiscl, & 242 252 & rn_sla_avglamscl, rn_sla_avgphiscl, & 243 253 & rn_sst_avglamscl, rn_sst_avgphiscl, & 244 254 & rn_sss_avglamscl, rn_sss_avgphiscl, & 245 255 & rn_sic_avglamscl, rn_sic_avgphiscl, & 246 & nn_1dint, nn_2dint ,&256 & nn_1dint, nn_2dint_default, & 247 257 & nn_2dint_sla, nn_2dint_sst, & 248 258 & nn_2dint_sss, nn_2dint_sic, & … … 336 346 WRITE(numout,*) ' Final date in window YYYYMMDD.HHMMSS rn_dobsend = ', rn_dobsend 337 347 WRITE(numout,*) ' Type of vertical interpolation method nn_1dint = ', nn_1dint 338 WRITE(numout,*) ' Type of horizontal interpolation method nn_2dint = ', nn_2dint 348 WRITE(numout,*) ' Default horizontal interpolation method nn_2dint_default = ', nn_2dint_default 349 WRITE(numout,*) ' Type of horizontal interpolation method for SLA nn_2dint_sla = ', nn_2dint_sla 350 WRITE(numout,*) ' Type of horizontal interpolation method for SST nn_2dint_sst = ', nn_2dint_sst 351 WRITE(numout,*) ' Type of horizontal interpolation method for SSS nn_2dint_sss = ', nn_2dint_sss 352 WRITE(numout,*) ' Type of horizontal interpolation method for SIC nn_2dint_sic = ', nn_2dint_sic 353 WRITE(numout,*) ' Default E/W diameter of obs footprint rn_default_avglamscl = ', rn_default_avglamscl 354 WRITE(numout,*) ' Default N/S diameter of obs footprint rn_default_avgphiscl = ', rn_default_avgphiscl 355 WRITE(numout,*) ' Default obs footprint in deg [T] or m [F] ln_default_fp_indegs = ', ln_default_fp_indegs 356 WRITE(numout,*) ' SLA E/W diameter of obs footprint rn_sla_avglamscl = ', rn_sla_avglamscl 357 WRITE(numout,*) ' SLA N/S diameter of obs footprint rn_sla_avgphiscl = ', rn_sla_avgphiscl 358 WRITE(numout,*) ' SLA obs footprint in deg [T] or m [F] ln_sla_fp_indegs = ', ln_sla_fp_indegs 359 WRITE(numout,*) ' SST E/W diameter of obs footprint rn_sst_avglamscl = ', rn_sst_avglamscl 360 WRITE(numout,*) ' SST N/S diameter of obs footprint rn_sst_avgphiscl = ', rn_sst_avgphiscl 361 WRITE(numout,*) ' SST obs footprint in deg [T] or m [F] ln_sst_fp_indegs = ', ln_sst_fp_indegs 362 WRITE(numout,*) ' SIC E/W diameter of obs footprint rn_sic_avglamscl = ', rn_sic_avglamscl 363 WRITE(numout,*) ' SIC N/S diameter of obs footprint rn_sic_avgphiscl = ', rn_sic_avgphiscl 364 WRITE(numout,*) ' SIC obs footprint in deg [T] or m [F] ln_sic_fp_indegs = ', ln_sic_fp_indegs 339 365 WRITE(numout,*) ' Rejection of observations near land switch ln_nea = ', ln_nea 340 366 WRITE(numout,*) ' Rejection of obs near open bdys ln_bound_reject = ', ln_bound_reject … … 408 434 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sla', & 409 435 & cn_slafbfiles, ifilessurf, cobstypessurf, clsurffiles ) 410 CALL obs_setinterpopts( nsurftypes, jtype, 'sla', &411 & nn_2dint, nn_2dint_sla, &412 & rn_sla_avglamscl, rn_sla_avgphiscl, &413 & ln_sla_fp_indegs, .FALSE., &414 & n2dintsurf, ravglamscl, ravgphiscl, &415 & lfpindegs, llnightav )416 436 ENDIF 417 437 IF (ln_sst) THEN … … 419 439 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sst', & 420 440 & cn_sstfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 421 CALL obs_setinterpopts( nsurftypes, jtype, 'sst', &422 & nn_2dint, nn_2dint_sst, &423 & rn_sst_avglamscl, rn_sst_avgphiscl, &424 & ln_sst_fp_indegs, ln_sstnight, &425 & n2dintsurf, ravglamscl, ravgphiscl, &426 & lfpindegs, llnightav )427 441 ENDIF 428 442 #if defined key_lim2 || defined key_lim3 || defined key_cice … … 431 445 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sic', & 432 446 & cn_sicfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 433 CALL obs_setinterpopts( nsurftypes, jtype, 'sic', &434 & nn_2dint, nn_2dint_sic, &435 & rn_sic_avglamscl, rn_sic_avgphiscl, &436 & ln_sic_fp_indegs, .FALSE., &437 & n2dintsurf, ravglamscl, ravgphiscl, &438 & lfpindegs, llnightav )439 447 ENDIF 440 448 #endif … … 443 451 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'sss', & 444 452 & cn_sssfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 445 CALL obs_setinterpopts( nsurftypes, jtype, 'sss', &446 & nn_2dint, nn_2dint_sss, &447 & rn_sss_avglamscl, rn_sss_avgphiscl, &448 & ln_sss_fp_indegs, .FALSE., &449 & n2dintsurf, ravglamscl, ravgphiscl, &450 & lfpindegs, llnightav )451 453 ENDIF 452 454 … … 454 456 jtype = jtype + 1 455 457 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_total', & 456 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 457 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_total', & 458 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 459 & n2dintsurf, ravglamscl, ravgphiscl, & 460 & lfpindegs, llnightav ) 458 & cn_surf_logchl_totalfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 461 459 ENDIF 462 460 … … 464 462 jtype = jtype + 1 465 463 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_diat', & 466 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 467 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_diat', & 468 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 469 & n2dintsurf, ravglamscl, ravgphiscl, & 470 & lfpindegs, llnightav ) 464 & cn_surf_logchl_diatfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 471 465 ENDIF 472 466 … … 474 468 jtype = jtype + 1 475 469 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_nondiat', & 476 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 477 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_nondiat', & 478 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 479 & n2dintsurf, ravglamscl, ravgphiscl, & 480 & lfpindegs, llnightav ) 470 & cn_surf_logchl_nondiatfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 481 471 ENDIF 482 472 … … 484 474 jtype = jtype + 1 485 475 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_dino', & 486 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 487 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_dino', & 488 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 489 & n2dintsurf, ravglamscl, ravgphiscl, & 490 & lfpindegs, llnightav ) 476 & cn_surf_logchl_dinofbfiles, ifilessurf, cobstypessurf, clsurffiles ) 491 477 ENDIF 492 478 … … 494 480 jtype = jtype + 1 495 481 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_micro', & 496 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 497 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_micro', & 498 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 499 & n2dintsurf, ravglamscl, ravgphiscl, & 500 & lfpindegs, llnightav ) 482 & cn_surf_logchl_microfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 501 483 ENDIF 502 484 … … 504 486 jtype = jtype + 1 505 487 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_nano', & 506 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 507 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_nano', & 508 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 509 & n2dintsurf, ravglamscl, ravgphiscl, & 510 & lfpindegs, llnightav ) 488 & cn_surf_logchl_nanofbfiles, ifilessurf, cobstypessurf, clsurffiles ) 511 489 ENDIF 512 490 … … 514 492 jtype = jtype + 1 515 493 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_logchl_pico', & 516 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 517 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_logchl_pico', & 518 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 519 & n2dintsurf, ravglamscl, ravgphiscl, & 520 & lfpindegs, llnightav ) 494 & cn_surf_logchl_picofbfiles, ifilessurf, cobstypessurf, clsurffiles ) 521 495 ENDIF 522 496 … … 524 498 jtype = jtype + 1 525 499 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_chl_total', & 526 & cn_logchlfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 527 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_chl_total', & 528 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 529 & n2dintsurf, ravglamscl, ravgphiscl, & 530 & lfpindegs, llnightav ) 500 & cn_surf_chl_totalfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 531 501 ENDIF 532 502 … … 534 504 jtype = jtype + 1 535 505 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_spm', & 536 & cn_spmfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 537 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_spm', & 538 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 539 & n2dintsurf, ravglamscl, ravgphiscl, & 540 & lfpindegs, llnightav ) 506 & cn_surf_spmfbfiles, ifilessurf, cobstypessurf, clsurffiles ) 541 507 ENDIF 542 508 … … 544 510 jtype = jtype + 1 545 511 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_fco2', & 546 & cn_fco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 547 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_fco2', & 548 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 549 & n2dintsurf, ravglamscl, ravgphiscl, & 550 & lfpindegs, llnightav ) 512 & cn_surf_fco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 551 513 ENDIF 552 514 … … 554 516 jtype = jtype + 1 555 517 CALL obs_settypefiles( nsurftypes, jpmaxnfiles, jtype, 'surf_pco2', & 556 & cn_pco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 557 CALL obs_setinterpopts( nsurftypes, jtype, 'surf_pco2', & 558 & nn_2dint, -1, 0., 0., .TRUE., .FALSE., & 559 & n2dintsurf, ravglamscl, ravgphiscl, & 518 & cn_surf_pco2fbfiles, ifilessurf, cobstypessurf, clsurffiles ) 519 ENDIF 520 521 DO jtype = 1, nsurftypes 522 523 IF ( TRIM(n2dintsurf(jtype)) == 'sla' ) THEN 524 IF ( nn_2dint_sla == -1 ) THEN 525 n2dint_type = nn_2dint_default 526 ELSE 527 n2dint_type = nn_2dint_sla 528 ENDIF 529 rtype_avglamscl = rn_sla_avglamscl 530 rtype_avgphiscl = rn_sla_avgphiscl 531 ltype_fpindegs = ln_sla_fpindegs 532 ltype_night = .FALSE. 533 ELSE IF ( TRIM(n2dintsurf(jtype)) == 'sst' ) THEN 534 IF ( nn_2dint_sst == -1 ) THEN 535 n2dint_type = nn_2dint_default 536 ELSE 537 n2dint_type = nn_2dint_sst 538 ENDIF 539 rtype_avglamscl = rn_sst_avglamscl 540 rtype_avgphiscl = rn_sst_avgphiscl 541 ltype_fpindegs = ln_sst_fpindegs 542 ltype_night = ln_sstnight 543 ELSE IF ( TRIM(n2dintsurf(jtype)) == 'sic' ) THEN 544 IF ( nn_2dint_sic == -1 ) THEN 545 n2dint_type = nn_2dint_default 546 ELSE 547 n2dint_type = nn_2dint_sic 548 ENDIF 549 rtype_avglamscl = rn_sic_avglamscl 550 rtype_avgphiscl = rn_sic_avgphiscl 551 ltype_fpindegs = ln_sic_fpindegs 552 ltype_night = .FALSE. 553 ELSE IF ( TRIM(n2dintsurf(jtype)) == 'sss' ) THEN 554 IF ( nn_2dint_sss == -1 ) THEN 555 n2dint_type = nn_2dint_default 556 ELSE 557 n2dint_type = nn_2dint_sss 558 ENDIF 559 rtype_avglamscl = rn_sss_avglamscl 560 rtype_avgphiscl = rn_sss_avgphiscl 561 ltype_fpindegs = ln_sss_fpindegs 562 ltype_night = .FALSE. 563 ELSE 564 n2dint_type = nn_2dint_default 565 rtype_avglamscl = rn_default_avglamscl 566 rtype_avgphiscl = rn_default_avgphiscl 567 ltype_fpindegs = ln_default_fpindegs 568 ltype_night = .FALSE. 569 ENDIF 570 571 CALL obs_setinterpopts( nsurftypes, jtype, TRIM(n2dintsurf(jtype)), & 572 & nn_2dint_default, n2dint_type, & 573 & rtype_avglamscl, rtype_avgphiscl, & 574 & ltype_fpindegs, ltype_night, & 575 & n2dintsurf, ravglamscl, ravgphiscl, & 560 576 & lfpindegs, llnightav ) 561 ENDIF 577 578 END DO 562 579 563 580 ENDIF … … 580 597 ENDIF 581 598 582 IF ( ( nn_2dint < 0 ) .OR. ( nn_2dint > 6 ) ) THEN583 CALL ctl_stop(' Choice of horizontal (2D) interpolation method', &599 IF ( ( nn_2dint_default < 0 ) .OR. ( nn_2dint_default > 6 ) ) THEN 600 CALL ctl_stop(' Choice of default horizontal (2D) interpolation method', & 584 601 & ' is not available') 585 602 ENDIF … … 863 880 & zprofmask1, zprofmask2, & 864 881 & zglam1, zglam2, zgphi1, zgphi2, & 865 & nn_1dint, nn_2dint ,&882 & nn_1dint, nn_2dint_default, & 866 883 & kdailyavtypes = nn_profdavtypes ) 867 884 … … 1240 1257 & ) 1241 1258 1242 CALL obs_rotvel( profdataqc(jtype), nn_2dint , zu, zv )1259 CALL obs_rotvel( profdataqc(jtype), nn_2dint_default, zu, zv ) 1243 1260 1244 1261 DO jo = 1, profdataqc(jtype)%nprof … … 1476 1493 & cfilestype, ifiles, cobstypes, cfiles ) 1477 1494 1478 INTEGER, INTENT(IN) :: ntypes ! Total number of obs types 1479 INTEGER, INTENT(IN) :: jpmaxnfiles ! Maximum number of files allowed for each type 1480 INTEGER, INTENT(IN) :: jtype ! Index of the current type of obs 1481 INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 1482 & ifiles ! Out appended number of files for this type 1483 1484 CHARACTER(len=25), INTENT(IN) :: ctypein 1485 CHARACTER(len=128), DIMENSION(jpmaxnfiles), INTENT(IN) :: & 1486 & cfilestype ! In list of files for this obs type 1487 CHARACTER(len=25), DIMENSION(ntypes), INTENT(INOUT) :: & 1488 & cobstypes ! Out appended list of obs types 1489 CHARACTER(len=128), DIMENSION(ntypes, jpmaxnfiles), INTENT(INOUT) :: & 1490 & cfiles ! Out appended list of files for all types 1491 1492 !Local variables 1493 INTEGER :: jfile 1494 1495 cfiles(jtype,:) = cfilestype(:) 1496 cobstypes(jtype) = ctypein 1497 ifiles(jtype) = 0 1498 DO jfile = 1, jpmaxnfiles 1499 IF ( trim(cfiles(jtype,jfile)) /= '' ) & 1500 ifiles(jtype) = ifiles(jtype) + 1 1501 END DO 1502 1503 IF ( ifiles(jtype) == 0 ) THEN 1504 CALL ctl_stop( 'Logical for observation type '//TRIM(ctypein)// & 1505 & ' set to true but no files available to read' ) 1506 ENDIF 1507 1508 IF(lwp) THEN 1509 WRITE(numout,*) ' '//cobstypes(jtype)//' input observation file names:' 1510 DO jfile = 1, ifiles(jtype) 1511 WRITE(numout,*) ' '//TRIM(cfiles(jtype,jfile)) 1495 INTEGER, INTENT(IN) :: ntypes ! Total number of obs types 1496 INTEGER, INTENT(IN) :: jpmaxnfiles ! Maximum number of files allowed for each type 1497 INTEGER, INTENT(IN) :: jtype ! Index of the current type of obs 1498 INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 1499 & ifiles ! Out appended number of files for this type 1500 1501 CHARACTER(len=25), INTENT(IN) :: ctypein 1502 CHARACTER(len=128), DIMENSION(jpmaxnfiles), INTENT(IN) :: & 1503 & cfilestype ! In list of files for this obs type 1504 CHARACTER(len=25), DIMENSION(ntypes), INTENT(INOUT) :: & 1505 & cobstypes ! Out appended list of obs types 1506 CHARACTER(len=128), DIMENSION(ntypes, jpmaxnfiles), INTENT(INOUT) :: & 1507 & cfiles ! Out appended list of files for all types 1508 1509 !Local variables 1510 INTEGER :: jfile 1511 1512 cfiles(jtype,:) = cfilestype(:) 1513 cobstypes(jtype) = ctypein 1514 ifiles(jtype) = 0 1515 DO jfile = 1, jpmaxnfiles 1516 IF ( trim(cfiles(jtype,jfile)) /= '' ) & 1517 ifiles(jtype) = ifiles(jtype) + 1 1512 1518 END DO 1513 ENDIF 1519 1520 IF ( ifiles(jtype) == 0 ) THEN 1521 CALL ctl_stop( 'Logical for observation type '//TRIM(ctypein)// & 1522 & ' set to true but no files available to read' ) 1523 ENDIF 1524 1525 IF(lwp) THEN 1526 WRITE(numout,*) ' '//cobstypes(jtype)//' input observation file names:' 1527 DO jfile = 1, ifiles(jtype) 1528 WRITE(numout,*) ' '//TRIM(cfiles(jtype,jfile)) 1529 END DO 1530 ENDIF 1514 1531 1515 1532 END SUBROUTINE obs_settypefiles … … 1522 1539 & lfpindegs, lavnight ) 1523 1540 1524 INTEGER, INTENT(IN) :: ntypes ! Total number of obs types 1525 INTEGER, INTENT(IN) :: jtype ! Index of the current type of obs 1526 INTEGER, INTENT(IN) :: n2dint_default ! Default option for interpolation type 1527 INTEGER, INTENT(IN) :: n2dint_type ! Option for interpolation type 1528 REAL(wp), INTENT(IN) :: & 1529 & ravglamscl_type, & !E/W diameter of obs footprint for this type 1530 & ravgphiscl_type !N/S diameter of obs footprint for this type 1531 LOGICAL, INTENT(IN) :: lfp_indegs_type !T=> footprint in degrees, F=> in metres 1532 LOGICAL, INTENT(IN) :: lavnight_type !T=> obs represent night time average 1533 CHARACTER(len=25), INTENT(IN) :: ctypein 1534 1535 INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 1536 & n2dint 1537 REAL(wp), DIMENSION(ntypes), INTENT(INOUT) :: & 1538 & ravglamscl, ravgphiscl 1539 LOGICAL, DIMENSION(ntypes), INTENT(INOUT) :: & 1540 & lfpindegs, lavnight 1541 1542 lavnight(jtype) = lavnight_type 1543 1544 IF ( (n2dint_type >= 1) .AND. (n2dint_type <= 6) ) THEN 1545 n2dint(jtype) = n2dint_type 1546 ELSE 1547 n2dint(jtype) = n2dint_default 1548 ENDIF 1549 1550 ! For averaging observation footprints set options for size of footprint 1551 IF ( (n2dint(jtype) > 4) .AND. (n2dint(jtype) <= 6) ) THEN 1552 IF ( ravglamscl_type > 0._wp ) THEN 1553 ravglamscl(jtype) = ravglamscl_type 1541 INTEGER, INTENT(IN) :: ntypes ! Total number of obs types 1542 INTEGER, INTENT(IN) :: jtype ! Index of the current type of obs 1543 INTEGER, INTENT(IN) :: n2dint_default ! Default option for interpolation type 1544 INTEGER, INTENT(IN) :: n2dint_type ! Option for interpolation type 1545 REAL(wp), INTENT(IN) :: & 1546 & ravglamscl_type, & !E/W diameter of obs footprint for this type 1547 & ravgphiscl_type !N/S diameter of obs footprint for this type 1548 LOGICAL, INTENT(IN) :: lfp_indegs_type !T=> footprint in degrees, F=> in metres 1549 LOGICAL, INTENT(IN) :: lavnight_type !T=> obs represent night time average 1550 CHARACTER(len=25), INTENT(IN) :: ctypein 1551 1552 INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: & 1553 & n2dint 1554 REAL(wp), DIMENSION(ntypes), INTENT(INOUT) :: & 1555 & ravglamscl, ravgphiscl 1556 LOGICAL, DIMENSION(ntypes), INTENT(INOUT) :: & 1557 & lfpindegs, lavnight 1558 1559 lavnight(jtype) = lavnight_type 1560 1561 IF ( (n2dint_type >= 1) .AND. (n2dint_type <= 6) ) THEN 1562 n2dint(jtype) = n2dint_type 1563 ELSE IF ( n2dint_type == -1 ) THEN 1564 n2dint(jtype) = n2dint_default 1554 1565 ELSE 1555 CALL ctl_stop( 'Incorrect value set for averaging footprint '//&1556 'scale (ravglamscl) for observation type '//TRIM(ctypein) )1566 CALL ctl_stop(' Choice of '//TRIM(ctypein)//' horizontal (2D) interpolation method', & 1567 & ' is not available') 1557 1568 ENDIF 1558 1569 1559 IF ( ravgphiscl_type > 0._wp ) THEN 1560 ravgphiscl(jtype) = ravgphiscl_type 1561 ELSE 1562 CALL ctl_stop( 'Incorrect value set for averaging footprint '// & 1563 'scale (ravgphiscl) for observation type '//TRIM(ctypein) ) 1570 ! For averaging observation footprints set options for size of footprint 1571 IF ( (n2dint(jtype) > 4) .AND. (n2dint(jtype) <= 6) ) THEN 1572 IF ( ravglamscl_type > 0._wp ) THEN 1573 ravglamscl(jtype) = ravglamscl_type 1574 ELSE 1575 CALL ctl_stop( 'Incorrect value set for averaging footprint '// & 1576 'scale (ravglamscl) for observation type '//TRIM(ctypein) ) 1577 ENDIF 1578 1579 IF ( ravgphiscl_type > 0._wp ) THEN 1580 ravgphiscl(jtype) = ravgphiscl_type 1581 ELSE 1582 CALL ctl_stop( 'Incorrect value set for averaging footprint '// & 1583 'scale (ravgphiscl) for observation type '//TRIM(ctypein) ) 1584 ENDIF 1585 1586 lfpindegs(jtype) = lfp_indegs_type 1587 1564 1588 ENDIF 1565 1589 1566 lfpindegs(jtype) = lfp_indegs_type 1567 1568 ENDIF 1569 1570 ! Write out info 1571 IF(lwp) THEN 1572 IF ( n2dint(jtype) <= 4 ) THEN 1573 WRITE(numout,*) ' '//TRIM(ctypein)// & 1574 & ' model counterparts will be interpolated horizontally' 1575 ELSE IF ( n2dint(jtype) <= 6 ) THEN 1576 WRITE(numout,*) ' '//TRIM(ctypein)// & 1577 & ' model counterparts will be averaged horizontally' 1578 WRITE(numout,*) ' '//' with E/W scale: ',ravglamscl(jtype) 1579 WRITE(numout,*) ' '//' with N/S scale: ',ravgphiscl(jtype) 1580 IF ( lfpindegs(jtype) ) THEN 1581 WRITE(numout,*) ' '//' (in degrees)' 1582 ELSE 1583 WRITE(numout,*) ' '//' (in metres)' 1590 ! Write out info 1591 IF(lwp) THEN 1592 IF ( n2dint(jtype) <= 4 ) THEN 1593 WRITE(numout,*) ' '//TRIM(ctypein)// & 1594 & ' model counterparts will be interpolated horizontally' 1595 ELSE IF ( n2dint(jtype) <= 6 ) THEN 1596 WRITE(numout,*) ' '//TRIM(ctypein)// & 1597 & ' model counterparts will be averaged horizontally' 1598 WRITE(numout,*) ' '//' with E/W scale: ',ravglamscl(jtype) 1599 WRITE(numout,*) ' '//' with N/S scale: ',ravgphiscl(jtype) 1600 IF ( lfpindegs(jtype) ) THEN 1601 WRITE(numout,*) ' '//' (in degrees)' 1602 ELSE 1603 WRITE(numout,*) ' '//' (in metres)' 1604 ENDIF 1584 1605 ENDIF 1585 1606 ENDIF 1586 ENDIF1587 1607 1588 1608 END SUBROUTINE obs_setinterpopts
Note: See TracChangeset
for help on using the changeset viewer.