Changeset 15227 for NEMO/branches/UKMO/NEMO_4.0.4_generic_obs
- Timestamp:
- 2021-09-03T16:02:35+02:00 (3 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/diaobs.F90
r15226 r15227 26 26 !! fin_date : Compute the final date YYYYMMDD.HHMMSS 27 27 !!---------------------------------------------------------------------- 28 USE par_kind ! Precision variables29 USE in_out_manager ! I/O manager30 USE timing ! Timing31 USE par_oce ! ocean parameter32 USE dom_oce ! Ocean space and time domain variables33 USE sbc_oce ! Sea-ice fraction28 USE par_kind ! Precision variables 29 USE in_out_manager ! I/O manager 30 USE timing ! Timing 31 USE par_oce ! ocean parameter 32 USE dom_oce ! Ocean space and time domain variables 33 USE sbc_oce ! Sea-ice fraction 34 34 ! 35 USE obs_read_prof ! Reading and allocation of profile obs 36 USE obs_read_surf ! Reading and allocation of surface obs 37 USE obs_bias ! Bias correction routine 38 USE obs_readmdt ! Reading and allocation of MDT for SLA. 39 USE obs_prep ! Preparation of obs. (grid search etc). 40 USE obs_oper ! Observation operators 41 USE obs_write ! Writing of observation related diagnostics 42 USE obs_grid ! Grid searching 43 USE obs_read_altbias ! Bias treatment for altimeter 44 USE obs_profiles_def ! Profile data definitions 45 USE obs_surf_def ! Surface data definitions 46 USE obs_types ! Definitions for observation types 47 USE obs_field ! Definitions for observation types 35 USE obs_read_prof ! Reading and allocation of profile obs 36 USE obs_read_surf ! Reading and allocation of surface obs 37 USE obs_bias ! Bias correction routine 38 USE obs_readmdt ! Reading and allocation of MDT for SLA. 39 USE obs_readsnowdepth ! Get model snow depth for conversion of freeboard to ice thickness 40 USE obs_prep ! Preparation of obs. (grid search etc). 41 USE obs_oper ! Observation operators 42 USE obs_write ! Writing of observation related diagnostics 43 USE obs_grid ! Grid searching 44 USE obs_read_altbias ! Bias treatment for altimeter 45 USE obs_profiles_def ! Profile data definitions 46 USE obs_surf_def ! Surface data definitions 47 USE obs_types ! Definitions for observation types 48 USE obs_field ! Definitions for observation types 48 49 ! 49 USE mpp_map ! MPP mapping50 USE lib_mpp ! For ctl_warn/stop50 USE mpp_map ! MPP mapping 51 USE lib_mpp ! For ctl_warn/stop 51 52 52 53 IMPLICIT NONE … … 82 83 !! 83 84 !!---------------------------------------------------------------------- 85 #if defined key_si3 86 USE ice, ONLY : & ! Sea ice variables 87 & hm_s ! Snow depth for freeboard conversion 88 #elif defined key_cice 89 USE sbc_oce, ONLY : & ! Sea ice variables 90 & thick_s ! Snow depth for freeboard conversion 91 #endif 92 93 IMPLICIT NONE 94 84 95 INTEGER, PARAMETER :: jpmaxngroups = 1000 ! Maximum number of obs groups 85 96 INTEGER :: ios ! Local integer output status for namelist read … … 260 271 sobsgroups(jgroup)%ssurfdata%caddlong(sobsgroups(jgroup)%nadd_ssh,jvar) = 'Model Sea surface height' 261 272 sobsgroups(jgroup)%ssurfdata%caddunit(sobsgroups(jgroup)%nadd_ssh,jvar) = 'Metres' 273 END DO 274 ENDIF 275 ! 276 IF( sobsgroups(jgroup)%lfbd ) THEN 277 sobsgroups(jgroup)%ssurfdata%cextvars(sobsgroups(jgroup)%next_snow) = 'SNOW' 278 sobsgroups(jgroup)%ssurfdata%cextlong(sobsgroups(jgroup)%next_snow) = 'Snow thickness' 279 sobsgroups(jgroup)%ssurfdata%cextunit(sobsgroups(jgroup)%next_snow) = 'Metres' 280 sobsgroups(jgroup)%ssurfdata%caddvars(sobsgroups(jgroup)%nadd_fbd) = 'FBD' 281 DO jvar = 1, sobsgroups(jgroup)%nobstypes 282 sobsgroups(jgroup)%ssurfdata%caddlong(sobsgroups(jgroup)%nadd_fbd,jvar) = 'Freeboard' 283 sobsgroups(jgroup)%ssurfdata%caddunit(sobsgroups(jgroup)%nadd_fbd,jvar) = 'Metres' 262 284 END DO 263 285 ENDIF … … 290 312 ENDIF 291 313 ! 314 #if defined key_si3 315 IF( sobsgroups(jgroup)%lfbd ) THEN 316 CALL obs_rea_snowdepth( sobsgroups(jgroup)%ssurfdataqc, & 317 & sobsgroups(jgroup)%n2dint, & 318 & sobsgroups(jgroup)%next_snow, & 319 & hm_s(:,:) ) 320 ENDIF 321 #elif defined key_cice 322 IF( sobsgroups(jgroup)%lfbd ) THEN 323 CALL obs_rea_snowdepth( sobsgroups(jgroup)%ssurfdataqc, & 324 & sobsgroups(jgroup)%n2dint, & 325 & sobsgroups(jgroup)%next_snow, & 326 & thick_s(:,:) ) 327 ENDIF 328 #endif 329 ! 292 330 IF( sobsgroups(jgroup)%lobsbias ) THEN 293 331 CALL obs_app_bias( sobsgroups(jgroup)%ssurfdataqc, & … … 323 361 USE oce , ONLY : tsn, un, vn, sshn ! Ocean dynamics and tracers variables 324 362 USE phycst , ONLY : rday ! Physical constants 325 #if defined key_si3 326 USE ice , ONLY : at_i ! SI3 Ice model variables 327 #endif 328 #if defined key_cice 329 USE sbc_oce, ONLY : fr_i ! ice fraction 363 #if defined key_si3 364 USE ice , ONLY : at_i, hm_i ! SI3 Ice model variables 365 #elif defined key_cice 366 USE sbc_oce, ONLY : fr_i, thick_i ! CICE Ice model variables 330 367 #endif 331 368 … … 423 460 lstp0 = .TRUE. 424 461 ELSE 425 #if defined key_cice || defined key_si3 462 #if defined key_si3 463 zsurfvar(:,:) = at_i(:,:) 464 #elif defined key_cice 426 465 zsurfvar(:,:) = fr_i(:,:) 466 #else 467 CALL ctl_stop( ' Trying to run sea-ice observation operator', & 468 & ' but no sea-ice model appears to have been defined' ) 469 #endif 470 ENDIF 471 CASE('SIT','FBD') 472 IF ( kstp == 0 ) THEN 473 lstp0 = .TRUE. 474 ELSE 475 #if defined key_si3 476 zsurfvar(:,:) = hm_i(:,:) 477 #elif defined key_cice 478 zsurfvar(:,:) = thick_i(:,:) 427 479 #else 428 480 CALL ctl_stop( ' Trying to run sea-ice observation operator', & … … 463 515 & sobsgroups(jgroup)%lfp_indegs, & 464 516 & kssh=sobsgroups(jgroup)%nadd_ssh, & 465 & kmdt=sobsgroups(jgroup)%next_mdt ) 517 & kmdt=sobsgroups(jgroup)%next_mdt, & 518 & kfbd=sobsgroups(jgroup)%nadd_fbd, & 519 & ksnow=sobsgroups(jgroup)%next_snow ) 466 520 ENDIF 467 521 … … 687 741 & sobsgroups(jgroup)%ssurfdata, .TRUE., numout ) 688 742 743 IF (sobsgroups(jgroup)%lfbd) THEN 744 ! Input observations were freeboard, but we're putputting ice thickness 745 DO jvar = 1, sobsgroups(jgroup)%nobstypes 746 IF ( sobsgroups(jgroup)%cobstypes(jvar) == cobsname_fbd ) THEN 747 sobsgroups(jgroup)%ssurfdata%cvars(jvar) = 'SIT' 748 sobsgroups(jgroup)%ssurfdata%clong(jvar) = 'Sea ice thickness' 749 sobsgroups(jgroup)%ssurfdata%cunit(jvar) = 'm' 750 EXIT 751 ENDIF 752 END DO 753 ENDIF 754 689 755 ! Put additional and extra variable information into obswriinfo structure 690 756 ! used by obs_write. -
NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_field.F90
r15225 r15227 15 15 USE par_kind, ONLY : & ! Precision variables 16 16 & wp 17 USE obs_oper, ONLY : & ! Max number of daily avgd obs types18 & imaxavtypes19 17 USE obs_surf_def ! Surface data definitions 20 18 USE obs_profiles_def ! Profile data definitions … … 35 33 INTEGER, PARAMETER :: jpmaxntypes = 1000 ! Maximum number of obs types for each obs group 36 34 INTEGER, PARAMETER :: jpmaxnfiles = 1000 ! Maximum number of files for each obs group 35 36 INTEGER, PARAMETER, PUBLIC :: imaxavtypes = 20 !: Max number of daily avgd obs types 37 37 38 38 ! Expected names for observation types with special behaviours (not needed for all observation types) 39 39 CHARACTER(LEN=8), PUBLIC :: cobsname_uvel = 'UVEL' ! Expected variable name for U velocity (2D or 3D) 40 40 CHARACTER(LEN=8), PUBLIC :: cobsname_vvel = 'VVEL' ! Expected variable name for V velocity (2D or 3D) 41 CHARACTER(LEN=8), PUBLIC :: cobsname_sla = 'SLA' ! Expected variable name for SLA 41 CHARACTER(LEN=8), PUBLIC :: cobsname_sla = 'SLA' ! Expected variable name for sea level anomaly 42 CHARACTER(LEN=8), PUBLIC :: cobsname_fbd = 'FBD' ! Expected variable name for sea ice freeboard 42 43 43 44 !! * Type definition for observation groups … … 65 66 INTEGER :: nadd_ssh !: Index of additional variable representing SSH 66 67 INTEGER :: next_mdt !: Index of extra variable representing MDT 68 INTEGER :: nadd_fbd !: Index of additional variable representing ice freeboard 69 INTEGER :: next_snow !: Index of extra variable representing snow thickness 67 70 ! 68 71 LOGICAL :: lenabled !: Logical switch for group being processed and not ignored … … 71 74 LOGICAL :: lvel !: Logical switch for velocity data 72 75 LOGICAL :: lsla !: Logical switch for SLA data 76 LOGICAL :: lfbd !: Logical switch for ice freeboard data 73 77 LOGICAL :: laltbias !: Logical switch for altimeter bias correction 74 78 LOGICAL :: lobsbias !: Logical switch for bias correction … … 233 237 sdobsgroup%lvel = .false. 234 238 sdobsgroup%lsla = .false. 239 sdobsgroup%lfbd = .false. 235 240 sdobsgroup%nadd_ssh = 0 236 241 sdobsgroup%next_mdt = 0 242 sdobsgroup%nadd_fbd = 0 243 sdobsgroup%next_snow = 0 237 244 238 245 DO jtype = 1, jpmaxntypes … … 274 281 sdobsgroup%nadd_ssh = sdobsgroup%naddvars 275 282 sdobsgroup%next_mdt = sdobsgroup%nextvars 276 ! DO THIS FOR FBD TOO 283 ELSEIF ( TRIM(sdobsgroup%cobstypes(itype)) == cobsname_fbd ) THEN 284 sdobsgroup%lfbd = .true. 285 ! freeboard=additional, snow thickness=extra 286 sdobsgroup%naddvars = sdobsgroup%naddvars + 1 287 sdobsgroup%nextvars = sdobsgroup%nextvars + 1 288 sdobsgroup%nadd_fbd = sdobsgroup%naddvars 289 sdobsgroup%next_snow = sdobsgroup%nextvars 277 290 ENDIF 278 291 ! -
NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_oper.F90
r15226 r15227 18 18 USE lib_mpp, ONLY : ctl_warn, ctl_stop ! Warning and stopping routines 19 19 USE sbcdcy, ONLY : sbc_dcy, nday_qsr ! For calculation of where it is night-time 20 USE obs_grid, ONLY : obs_level_search 20 USE obs_grid, ONLY : obs_level_search 21 USE obs_field, ONLY : cobsname_sla, cobsname_fbd, imaxavtypes 22 #if defined key_si3 || defined key_cice 23 USE phycst, ONLY : rhos, rhoi, rhow ! For conversion from sea ice freeboard to thickness 24 #endif 21 25 ! 22 26 USE par_kind , ONLY : wp ! Precision variables … … 28 32 PUBLIC obs_prof_opt !: Compute the model counterpart of profile obs 29 33 PUBLIC obs_surf_opt !: Compute the model counterpart of surface obs 30 31 INTEGER, PARAMETER, PUBLIC :: imaxavtypes = 20 !: Max number of daily avgd obs types32 34 33 35 !!---------------------------------------------------------------------- … … 453 455 & kit000, kdaystp, kvar, psurf, psurfmask, & 454 456 & k2dint, ldnightav, plamscl, pphiscl, & 455 & lindegrees, kssh, kmdt )457 & lindegrees, kssh, kmdt, kfbd, ksnow ) 456 458 457 459 !!----------------------------------------------------------------------- … … 514 516 INTEGER, OPTIONAL, INTENT(IN) :: & 515 517 & kmdt ! Index of extra variable representing MDT 518 INTEGER, OPTIONAL, INTENT(IN) :: & 519 & kfbd ! Index of additional variable representing ice freeboard 520 INTEGER, OPTIONAL, INTENT(IN) :: & 521 & ksnow ! Index of extra variable representing ice snow thickness 516 522 517 523 !! * Local declarations … … 756 762 ENDIF 757 763 758 IF ( TRIM(surfdataqc%cvars(kvar)) == 'SLA'.AND. PRESENT(kssh) .AND. PRESENT(kmdt) ) THEN764 IF ( TRIM(surfdataqc%cvars(kvar)) == cobsname_sla .AND. PRESENT(kssh) .AND. PRESENT(kmdt) ) THEN 759 765 ! ... Remove the MDT from the SSH at the observation point to get the SLA 760 766 surfdataqc%radd(jobs,kssh,kvar) = zext(1) 761 767 surfdataqc%rmod(jobs,kvar) = surfdataqc%radd(jobs,kssh,kvar) - surfdataqc%rext(jobs,kmdt) 768 #if defined key_si3 || defined key_cice 769 ELSE IF ( TRIM(surfdataqc%cvars(kvar)) == cobsname_fbd .AND. PRESENT(kfbd) .AND. PRESENT(ksnow) ) THEN 770 ! Convert radar freeboard to true freeboard 771 ! (add 1/4 snow depth; 1/4 based on ratio of speed of light in vacuum 772 ! compared to snow (3.0e8 vs 2.4e8 m/s)) 773 surfdataqc%radd(jobs,kfbd,kvar) = surfdataqc%robs(jobs,kvar) 774 surfdataqc%robs(jobs,kvar) = surfdataqc%radd(jobs,kfbd,kvar) + 0.25*surfdataqc%rext(jobs,ksnow) 775 ! If the corrected freeboard observation is outside -0.3 to 3.0 m (CPOM) then set the QC flag to bad 776 IF ((surfdataqc%robs(jobs,kvar) < -0.3) .OR. (surfdataqc%robs(jobs,kvar) > 3.0)) THEN 777 surfdataqc%nqc(jobs) = 4 778 ENDIF 779 ! Convert corrected freeboard to ice thickness following Tilling et al. (2016) 780 surfdataqc%robs(jobs,kvar) = (surfdataqc%robs(jobs,kvar)*rhow + surfdataqc%rext(jobs,ksnow)*rhos)/ & 781 & (rhow - rhoi) 782 #endif 762 783 ELSE 763 784 surfdataqc%rmod(jobs,kvar) = zext(1) 764 785 ENDIF 765 ! DO THIS FOR FBD TOO766 786 767 787 IF ( zext(1) == obfillflt ) THEN -
NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_prep.F90
r15225 r15227 24 24 USE obs_field, ONLY : & ! Velocity variable names 25 25 & cobsname_uvel, & 26 & cobsname_vvel 26 & cobsname_vvel, & 27 & imaxavtypes 27 28 USE lib_mpp, ONLY : ctl_warn, ctl_stop 28 29 USE bdy_oce, ONLY : & ! Boundary information -
NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_read_prof.F90
r15225 r15227 29 29 USE obs_field, ONLY : & ! Velocity variable names 30 30 & cobsname_uvel, & 31 & cobsname_vvel 31 & cobsname_vvel, & 32 & imaxavtypes 32 33 33 34 IMPLICIT NONE
Note: See TracChangeset
for help on using the changeset viewer.