- Timestamp:
- 2018-09-24T11:47:08+02:00 (6 years ago)
- Location:
- branches/UKMO/dev_r5518_GO6_package/NEMOGCM
- Files:
-
- 18 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/CONFIG/SHARED/namelist_medusa_ref
r9258 r10149 305 305 scl_chl = 1.0 !! (IF key_oasis) scaling the exported to UM chlorophyll field 306 306 !! 307 !! FOAM !! DAF 308 ln_foam_medusa = .false. !! Calculate and save diagnostics for data assimilation 309 !! 307 310 / 308 311 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' … … 319 322 !! = (119 / 106) = 1.1226 mol O2 / mol C 320 323 !! xo2min : oxygen minimum concentration 324 !! xobs_xco2a: observed atmospheric xCO2 (not used if <= 0) 321 325 ! 322 326 &natroam … … 326 330 xthetarem = 1.1226 327 331 xo2min = 4.0 332 xobs_xco2a= -999.0 328 333 / 329 334 !''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/CONFIG/SHARED/namelist_ref
r8447 r10149 1287 1287 &nam_asminc ! assimilation increments ('key_asminc') 1288 1288 !----------------------------------------------------------------------- 1289 ln_bkgwri = .false. ! Logical switch for writing out background state 1290 ln_trainc = .false. ! Logical switch for applying tracer increments 1291 ln_dyninc = .false. ! Logical switch for applying velocity increments 1292 ln_sshinc = .false. ! Logical switch for applying SSH increments 1293 ln_asmdin = .false. ! Logical switch for Direct Initialization (DI) 1294 ln_asmiau = .false. ! Logical switch for Incremental Analysis Updating (IAU) 1295 ln_seaiceinc = .false. ! Logical switch for applying sea ice increments 1289 ln_bkgwri = .false. ! Logical switch for writing out background state 1290 ln_balwri = .false. ! Logical switch for writing out balancing increments 1291 ln_trainc = .false. ! Logical switch for applying tracer increments 1292 ln_dyninc = .false. ! Logical switch for applying velocity increments 1293 ln_sshinc = .false. ! Logical switch for applying SSH increments 1294 ln_asmdin = .false. ! Logical switch for Direct Initialization (DI) 1295 ln_asmiau = .false. ! Logical switch for Incremental Analysis Updating (IAU) 1296 ln_seaiceinc = .false. ! Logical switch for applying sea ice increments 1297 ln_phytobal = .false. ! Logical switch for phytoplankton multivariate balancing 1298 ln_slchltotinc = .false. ! Logical switch for applying slchltot increments 1299 ln_slchldiainc = .false. ! Logical switch for applying slchldia increments 1300 ln_slchlnoninc = .false. ! Logical switch for applying slchlnon increments 1301 ln_schltotinc = .false. ! Logical switch for applying schltot increments 1302 ln_slphytotinc = .false. ! Logical switch for applying slphytot increments 1303 ln_slphydiainc = .false. ! Logical switch for applying slphydia increments 1304 ln_slphynoninc = .false. ! Logical switch for applying slphynon increments 1305 ln_sfco2inc = .false. ! Logical switch for applying sfCO2 increments 1306 ln_spco2inc = .false. ! Logical switch for applying spCO2 increments 1307 ln_plchltotinc = .false. ! Logical switch for applying plchltot increments 1308 ln_pchltotinc = .false. ! Logical switch for applying pchltot increments 1309 ln_pno3inc = .false. ! Logical switch for applying pno3 increments 1310 ln_psi4inc = .false. ! Logical switch for applying psi4 increments 1311 ln_pdicinc = .false. ! Logical switch for applying pdic increments 1312 ln_palkinc = .false. ! Logical switch for applying palk increments 1313 ln_pphinc = .false. ! Logical switch for applying pph increments 1314 ln_po2inc = .false. ! Logical switch for applying po2 increments 1296 1315 ln_temnofreeze = .false. ! Logical to not add increments if temperature would fall below freezing 1297 nitbkg = 0 ! Timestep of background in [0,nitend-nit000-1] 1298 nitdin = 0 ! Timestep of background for DI in [0,nitend-nit000-1] 1299 nitiaustr = 1 ! Timestep of start of IAU interval in [0,nitend-nit000-1] 1300 nitiaufin = 15 ! Timestep of end of IAU interval in [0,nitend-nit000-1] 1301 niaufn = 0 ! Type of IAU weighting function 1302 ln_salfix = .false. ! Logical switch for ensuring that the sa > salfixmin 1303 salfixmin = -9999 ! Minimum salinity after applying the increments 1304 nn_divdmp = 0 ! Number of iterations of divergence damping operator 1316 nitbkg = 0 ! Timestep of background in [0,nitend-nit000-1] 1317 nitdin = 0 ! Timestep of background for DI in [0,nitend-nit000-1] 1318 nitiaustr = 1 ! Timestep of start of IAU interval in [0,nitend-nit000-1] 1319 nitiaufin = 15 ! Timestep of end of IAU interval in [0,nitend-nit000-1] 1320 niaufn = 0 ! Type of IAU weighting function 1321 ln_salfix = .false. ! Logical switch for ensuring that the sa > salfixmin 1322 salfixmin = -9999 ! Minimum salinity after applying the increments 1323 nn_divdmp = 0 ! Number of iterations of divergence damping operator 1324 mld_choice_bgc = 1 ! MLD criterion to use for biogeochemistry assimilation 1325 rn_maxchlinc = -999.0 ! maximum absolute non-log chlorophyll increment from ocean colour assimilation 1326 ! <= 0 implies no maximum applied (switch turned off) 1327 ! > 0 implies maximum absolute chl increment capped at this value 1305 1328 / 1306 1329 !----------------------------------------------------------------------- -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90
r9321 r10149 49 49 #if defined key_lim3 50 50 USE ice 51 #endif 52 #if defined key_top 53 USE asmbgc, ONLY: asm_bgc_bkg_wri 51 54 #endif 52 55 USE timing … … 125 128 IF(nn_timing == 2) CALL timing_stop('iom_rstput') 126 129 ! 130 #if defined key_top 131 CALL asm_bgc_bkg_wri( kt, inum ) 132 ! 133 #endif 127 134 CALL iom_close( inum ) 128 135 ENDIF -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
r8400 r10149 44 44 #endif 45 45 USE sbc_oce ! Surface boundary condition variables. 46 USE asmbgc ! Biogeochemistry assimilation 46 47 47 48 IMPLICIT NONE … … 54 55 PUBLIC ssh_asm_inc !: Apply the SSH increment 55 56 PUBLIC seaice_asm_inc !: Apply the seaice increment 57 PUBLIC bgc_asm_inc !: Apply the biogeochemistry increments 56 58 57 59 #if defined key_asminc … … 67 69 LOGICAL, PUBLIC :: ln_sshinc = .FALSE. !: No sea surface height assimilation increment 68 70 LOGICAL, PUBLIC :: ln_seaiceinc !: No sea ice concentration increment 71 LOGICAL, PUBLIC :: lk_bgcinc = .FALSE. !: No biogeochemistry increments 69 72 LOGICAL, PUBLIC :: ln_salfix = .FALSE. !: Apply minimum salinity check 70 73 LOGICAL, PUBLIC :: ln_temnofreeze = .FALSE. !: Don't allow the temperature to drop below freezing … … 133 136 REAL(wp), POINTER, DIMENSION(:,:) :: hdiv ! 2D workspace 134 137 !! 135 NAMELIST/nam_asminc/ ln_bkgwri, 138 NAMELIST/nam_asminc/ ln_bkgwri, ln_balwri, & 136 139 & ln_trainc, ln_dyninc, ln_sshinc, & 140 & ln_phytobal, ln_slchltotinc, ln_slchldiainc, & 141 & ln_slchlnoninc, ln_schltotinc, ln_slphytotinc, & 142 & ln_slphydiainc, ln_slphynoninc, ln_spco2inc, & 143 & ln_sfco2inc, ln_plchltotinc, ln_pchltotinc, & 144 & ln_pno3inc, ln_psi4inc, ln_pdicinc, ln_palkinc, & 145 & ln_pphinc, ln_po2inc, & 137 146 & ln_asmdin, ln_asmiau, & 138 147 & nitbkg, nitdin, nitiaustr, nitiaufin, niaufn, & 139 148 & ln_salfix, salfixmin, nn_divdmp, & 140 & ln_seaiceinc, ln_temnofreeze 149 & ln_seaiceinc, ln_temnofreeze, & 150 & mld_choice_bgc, rn_maxchlinc 141 151 !!---------------------------------------------------------------------- 142 152 … … 161 171 WRITE(numout,*) 'asm_inc_init : Assimilation increment initialization :' 162 172 WRITE(numout,*) '~~~~~~~~~~~~' 163 WRITE(numout,*) ' Namelist nam asm: set assimilation increment parameters'173 WRITE(numout,*) ' Namelist nam_asminc : set assimilation increment parameters' 164 174 WRITE(numout,*) ' Logical switch for writing out background state ln_bkgwri = ', ln_bkgwri 175 WRITE(numout,*) ' Logical switch for writing out balancing increments ln_balwri = ', ln_balwri 165 176 WRITE(numout,*) ' Logical switch for applying tracer increments ln_trainc = ', ln_trainc 166 177 WRITE(numout,*) ' Logical switch for applying velocity increments ln_dyninc = ', ln_dyninc … … 168 179 WRITE(numout,*) ' Logical switch for Direct Initialization (DI) ln_asmdin = ', ln_asmdin 169 180 WRITE(numout,*) ' Logical switch for applying sea ice increments ln_seaiceinc = ', ln_seaiceinc 181 WRITE(numout,*) ' Logical switch for phytoplankton balancing ln_phytobal = ', ln_phytobal 182 WRITE(numout,*) ' Logical switch for applying slchltot increments ln_slchltotinc = ', ln_slchltotinc 183 WRITE(numout,*) ' Logical switch for applying slchldia increments ln_slchldiainc = ', ln_slchldiainc 184 WRITE(numout,*) ' Logical switch for applying slchlnon increments ln_slchlnoninc = ', ln_slchlnoninc 185 WRITE(numout,*) ' Logical switch for applying schltot increments ln_schltotinc = ', ln_schltotinc 186 WRITE(numout,*) ' Logical switch for applying slphytot increments ln_slphytotinc = ', ln_slphytotinc 187 WRITE(numout,*) ' Logical switch for applying slphydia increments ln_slphydiainc = ', ln_slphydiainc 188 WRITE(numout,*) ' Logical switch for applying slphynon increments ln_slphynoninc = ', ln_slphynoninc 189 WRITE(numout,*) ' Logical switch for applying spco2 increments ln_spco2inc = ', ln_spco2inc 190 WRITE(numout,*) ' Logical switch for applying sfco2 increments ln_sfco2inc = ', ln_sfco2inc 191 WRITE(numout,*) ' Logical switch for applying plchltot increments ln_plchltotinc = ', ln_plchltotinc 192 WRITE(numout,*) ' Logical switch for applying pchltot increments ln_pchltotinc = ', ln_pchltotinc 193 WRITE(numout,*) ' Logical switch for applying pno3 increments ln_pno3inc = ', ln_pno3inc 194 WRITE(numout,*) ' Logical switch for applying psi4 increments ln_psi4inc = ', ln_psi4inc 195 WRITE(numout,*) ' Logical switch for applying pdic increments ln_pdicinc = ', ln_pdicinc 196 WRITE(numout,*) ' Logical switch for applying palk increments ln_palkinc = ', ln_palkinc 197 WRITE(numout,*) ' Logical switch for applying pph increments ln_pphinc = ', ln_pphinc 198 WRITE(numout,*) ' Logical switch for applying po2 increments ln_po2inc = ', ln_po2inc 170 199 WRITE(numout,*) ' Logical switch for Incremental Analysis Updating (IAU) ln_asmiau = ', ln_asmiau 171 200 WRITE(numout,*) ' Timestep of background in [0,nitend-nit000-1] nitbkg = ', nitbkg … … 176 205 WRITE(numout,*) ' Logical switch for ensuring that the sa > salfixmin ln_salfix = ', ln_salfix 177 206 WRITE(numout,*) ' Minimum salinity after applying the increments salfixmin = ', salfixmin 207 WRITE(numout,*) ' Choice of MLD for BGC assimilation mld_choice_bgc = ', mld_choice_bgc 208 WRITE(numout,*) ' Maximum absolute chlorophyll increment (<=0 = off) rn_maxchlinc = ', rn_maxchlinc 178 209 ENDIF 179 210 … … 212 243 WRITE(numout,*) ' iitiaufin_date = ', iitiaufin_date 213 244 ENDIF 245 246 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 247 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 248 & ln_slphynoninc .OR. ln_spco2inc .OR. ln_sfco2inc .OR. & 249 & ln_plchltotinc .OR. ln_pchltotinc .OR. ln_pno3inc .OR. & 250 & ln_psi4inc .OR. ln_pdicinc .OR. ln_palkinc .OR. & 251 & ln_pphinc .OR. ln_po2inc ) THEN 252 lk_bgcinc = .TRUE. 253 ENDIF 214 254 215 255 IF ( nacc /= 0 ) & … … 223 263 224 264 IF ( ( ( .NOT. ln_asmdin ).AND.( .NOT. ln_asmiau ) ) & 225 .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ) .OR. ( ln_seaiceinc) )) & 226 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc is set to .true.', & 265 & .AND.( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ).OR. & 266 & ( lk_bgcinc ) )) & 267 & CALL ctl_stop( ' One or more of ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 268 & ' ln_(bgc-variable)inc is set to .true.', & 227 269 & ' but ln_asmdin and ln_asmiau are both set to .false. :', & 228 270 & ' Inconsistent options') … … 233 275 234 276 IF ( ( .NOT. ln_trainc ).AND.( .NOT. ln_dyninc ).AND.( .NOT. ln_sshinc ).AND.( .NOT. ln_seaiceinc ) & 235 & ) & 236 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc and ln_seaiceinc are set to .false. :', & 277 & .AND.( .NOT. lk_bgcinc ) ) & 278 & CALL ctl_warn( ' ln_trainc, ln_dyninc, ln_sshinc, ln_seaiceinc,', & 279 & ' ln_(bgc-variable)inc are set to .false. :', & 237 280 & ' The assimilation increments are not applied') 238 281 … … 254 297 & ' Background time step for Direct Initialization is outside', & 255 298 & ' the cycle interval') 299 300 IF ( lk_bgcinc ) CALL asm_bgc_check_options 256 301 257 302 IF ( nstop > 0 ) RETURN ! if there are any errors then go no further … … 350 395 ssh_iau(:,:) = 0.0 351 396 #endif 352 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) ) THEN 397 IF ( ( ln_trainc ).OR.( ln_dyninc ).OR.( ln_sshinc ).OR.( ln_seaiceinc ) & 398 & .OR.( lk_bgcinc ) ) THEN 353 399 354 400 !-------------------------------------------------------------------- … … 424 470 ENDIF 425 471 472 IF ( lk_bgcinc ) THEN 473 CALL asm_bgc_init_incs( inum ) 474 ENDIF 475 426 476 CALL iom_close( inum ) 427 477 … … 534 584 CALL iom_close( inum ) 535 585 586 ENDIF 587 588 IF ( lk_bgcinc ) THEN 589 CALL asm_bgc_init_bkg 536 590 ENDIF 537 591 ! … … 1155 1209 1156 1210 END SUBROUTINE seaice_asm_inc 1211 1212 1213 SUBROUTINE bgc_asm_inc( kt ) 1214 !!---------------------------------------------------------------------- 1215 !! *** ROUTINE bgc_asm_inc *** 1216 !! 1217 !! ** Purpose : Apply the biogeochemistry assimilation increments 1218 !! 1219 !! ** Method : Call relevant routines in asmbgc 1220 !! 1221 !! ** Action : Call relevant routines in asmbgc 1222 !! 1223 !!---------------------------------------------------------------------- 1224 !! 1225 INTEGER, INTENT(in ) :: kt ! Current time step 1226 ! 1227 INTEGER :: icycper ! Dimension of wgtiau 1228 !! 1229 !!---------------------------------------------------------------------- 1230 1231 icycper = SIZE( wgtiau ) 1232 1233 ! Ocean colour variables first 1234 IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. & 1235 & ln_schltotinc .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. & 1236 & ln_slphynoninc ) THEN 1237 CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1238 ENDIF 1239 1240 ! Surface pCO2/fCO2 next 1241 IF ( ln_sfco2inc .OR. ln_spco2inc ) THEN 1242 CALL pco2_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1243 & ln_trainc, t_bkginc, s_bkginc ) 1244 ENDIF 1245 1246 ! Profile pH next 1247 IF ( ln_pphinc ) THEN 1248 CALL ph_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau, & 1249 & ln_trainc, t_bkginc, s_bkginc ) 1250 ENDIF 1251 1252 ! Then chlorophyll profiles 1253 IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN 1254 CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1255 ENDIF 1256 1257 ! Remaining bgc profile variables 1258 IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. & 1259 & ln_palkinc .OR. ln_po2inc ) THEN 1260 CALL bgc3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau ) 1261 ENDIF 1262 1263 END SUBROUTINE bgc_asm_inc 1157 1264 1158 1265 !!====================================================================== -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ASM/asmpar.F90
r6486 r10149 20 20 & c_asmtrj = 'assim_trj', & !: Filename for storing the 21 21 !: reference trajectory 22 & c_asminc = 'assim_background_increments' 22 & c_asminc = 'assim_background_increments', & !: Filename for storing the 23 23 !: increments to the background 24 24 !: state 25 & c_asmbal = 'assim.balincs' !: Filename for storing the 26 !: balancing increments calculated 27 !: for biogeochemistry 25 28 26 29 INTEGER, PUBLIC :: nitbkg_r !: Background time step referenced to nit000 -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
r7179 r10149 38 38 LOGICAL, PUBLIC, PARAMETER :: lk_zdftmx = .TRUE. !: tidal mixing flag 39 39 40 ! !!* Namelist namzdf_tmx : tidal mixing *41 REAL(wp) :: rn_htmx ! vertical decay scale for turbulence (meters)42 REAL(wp) :: rn_n2min ! threshold of the Brunt-Vaisala frequency (s-1)43 REAL(wp) :: rn_tfe ! tidal dissipation efficiency (St Laurent et al. 2002)44 REAL(wp) :: rn_me ! mixing efficiency (Osborn 1980)45 LOGICAL 46 REAL(wp) :: rn_tfe_itf ! ITF tidal dissipation efficiency (St Laurent et al. 2002)47 48 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: en_tmx ! energy available for tidal mixing (W/m2)49 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) 50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: az_tmx ! coefficient used to evaluate the tidal induced Kz40 ! !!* Namelist namzdf_tmx : tidal mixing * 41 REAL(wp) :: rn_htmx ! vertical decay scale for turbulence (meters) 42 REAL(wp) :: rn_n2min ! threshold of the Brunt-Vaisala frequency (s-1) 43 REAL(wp) :: rn_tfe ! tidal dissipation efficiency (St Laurent et al. 2002) 44 REAL(wp) :: rn_me ! mixing efficiency (Osborn 1980) 45 LOGICAL, PUBLIC :: ln_tmx_itf ! Indonesian Through Flow (ITF): Koch-Larrouy et al. (2007) parameterization 46 REAL(wp) :: rn_tfe_itf ! ITF tidal dissipation efficiency (St Laurent et al. 2002) 47 48 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: en_tmx ! energy available for tidal mixing (W/m2) 49 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:), PUBLIC :: mask_itf ! mask to use over Indonesian area 50 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: az_tmx ! coefficient used to evaluate the tidal induced Kz 51 51 52 52 !! * Substitutions -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r9321 r10149 61 61 USE asminc ! assimilation increments 62 62 USE asmbkg ! writing out state trajectory 63 USE asmbgc ! biogeochemical assimilation increments 63 64 USE diaptr ! poleward transports (dia_ptr_init routine) 64 65 USE diadct ! sections transports (dia_dct_init routine) … … 160 161 IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 ) ! Dynamics 161 162 IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 ) ! SSH 163 IF( lk_bgcinc ) CALL bgc_asm_inc( nit000 - 1 ) ! BGC 162 164 ENDIF 163 165 ENDIF … … 191 193 192 194 IF( lk_diaobs ) CALL dia_obs_wri 195 ! 196 IF( ( lk_asminc ).AND.( ln_balwri ) ) CALL asm_bgc_bal_wri( nitend ) ! Output balancing increments 193 197 ! 194 198 IF( ln_icebergs ) CALL icb_end( nitend ) -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/step.F90
r8400 r10149 253 253 ! Passive Tracer Model 254 254 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 255 IF( lk_asminc .AND. ln_asmiau .AND. lk_bgcinc ) & 256 & CALL bgc_asm_inc( kstp ) ! biogeochemistry assimilation 255 257 CALL trc_stp( kstp ) ! time-stepping 256 258 #endif -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r10020 r10149 74 74 jriver_alk, jriver_c, & 75 75 jriver_n, jriver_si, & 76 ln_foam_medusa, & 76 77 riv_alk, riv_c, riv_n, riv_si, & 77 78 zn_dms_chd, zn_dms_chn, zn_dms_din, & 78 79 zn_dms_mld, zn_dms_qsr, & 80 f2_pco2w, f2_fco2w, & 79 81 xnln, xnld 80 82 USE trc, ONLY: med_diag … … 87 89 # else 88 90 USE trcco2_medusa, ONLY: trc_co2_medusa 91 USE mocsy_mainmod, ONLY: p2fCO2 89 92 # endif 90 93 USE trcdms_medusa, ONLY: trc_dms_medusa … … 327 330 iters, ' AT (', ji, ', ', jj, ', 1) AT ', kt 328 331 endif 332 IF ( ln_foam_medusa ) THEN 333 !! DAF (Aug 2017): calculate fCO2 for observation operator 334 CALL p2fCO2( f_pco2w, ztmp, f_pp0, 0.0, 1, f_fco2w ) 335 ENDIF 329 336 ENDIF 330 337 ENDDO … … 506 513 CO2flux_conv 507 514 !! ENDIF 515 IF ( ln_foam_medusa ) THEN 516 !! DAF (Aug 2017): Save pCO2 and fCO2 for observation operator 517 f2_pco2w(ji,jj) = f_pco2w(ji,jj) 518 f2_fco2w(ji,jj) = f_pco2w(ji,jj) 519 ENDIF 508 520 IF ( lk_iomput ) THEN 509 521 IF( med_diag%ATM_PCO2%dgsave ) THEN -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
r10020 r10149 46 46 f3_co3, f3_h2co3, f3_hco3, & 47 47 f3_omarg, f3_omcal, f3_pH, & 48 ln_foam_medusa, mld_max, pgrow_avg, & 49 ploss_avg, phyt_avg, & 48 50 za_sed_c, za_sed_ca, za_sed_fe, & 49 51 za_sed_n, za_sed_si, & … … 55 57 USE trc, ONLY: med_diag, nittrc000, trn 56 58 USE trcnam_trp, ONLY: ln_trcadv_cen2, ln_trcadv_tvd 59 USE zdfmxl, ONLY: hmld 57 60 58 61 !! time (integer timestep) … … 113 116 # endif 114 117 118 IF ( ln_foam_medusa ) THEN 119 !!---------------------------------------------------------------------- 120 !! Diagnostics required for ocean colour assimilation: 121 !! Mixed layer average phytoplankton growth, loss and concentration 122 !! Maximum mixed layer depth 123 !!---------------------------------------------------------------------- 124 !! 125 DO jj = 2,jpjm1 126 DO ji = 2,jpim1 127 IF ( hmld(ji,jj) .GT. 0.0 ) THEN 128 pgrow_avg(ji,jj) = pgrow_avg(ji,jj) / hmld(ji,jj) 129 ploss_avg(ji,jj) = ploss_avg(ji,jj) / hmld(ji,jj) 130 phyt_avg(ji,jj) = phyt_avg(ji,jj) / hmld(ji,jj) 131 IF ( hmld(ji,jj) .GT. mld_max(ji,jj) ) THEN 132 mld_max(ji,jj) = hmld(ji,jj) 133 ENDIF 134 ENDIF 135 END DO 136 END DO 137 ENDIF 138 115 139 # if defined key_debug_medusa 116 140 !! AXY (12/07/17) -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90
r10020 r10149 35 35 USE bio_medusa_mod 36 36 USE par_oce, ONLY: jpi, jpj, jpk 37 USE sms_medusa, ONLY: jdms 37 USE sms_medusa, ONLY: jdms, pgrow_avg, ploss_avg, phyt_avg, mld_max 38 38 USE trc, ONLY: ln_diatrc, med_diag, nittrc000 39 39 USE in_out_manager, ONLY: lwp, numout … … 195 195 fslowsinkc(:,:) = 0.0 196 196 # endif 197 !! 198 pgrow_avg(:,:) = 0.0 199 ploss_avg(:,:) = 0.0 200 phyt_avg(:,:) = 0.0 201 IF( kt == nittrc000 ) THEN 202 mld_max(:,:) = 0.0 203 ENDIF 197 204 !! 198 205 !! allocate and initiate 2D diag -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/plankton.F90
r8441 r10149 36 36 fdpn, fdpn2, fdzme, fdzme2, & 37 37 fdzmi, fdzmi2, fsdiss, fsin, & 38 fdep1, fprn, fprd, & 39 fgmepd, fgmepn, fgmipn, & 38 40 zphd, zphn, zpds, zzme, zzmi 39 USE dom_oce, ONLY: tmask 41 USE dom_oce, ONLY: e3t_0, e3t_n, gdepw_0, gdepw_n, tmask 42 USE par_kind, ONLY: wp 40 43 USE par_oce, ONLY: jpim1, jpjm1 41 44 USE phytoplankton_mod, ONLY: phytoplankton 42 45 USE sms_medusa, ONLY: jmpd, jmpn, jmzme, jmzmi, & 46 ln_foam_medusa, & 47 pgrow_avg, ploss_avg, phyt_avg, & 43 48 xkphd, xkphn, xkzme, xkzmi, & 44 49 xmetapd, xmetapn, xmetazme, xmetazmi, & 45 50 xmpd, xmpn, xmzme, xmzmi, xsdiss 51 USE zdfmxl, ONLY: hmld 46 52 USE zooplankton_mod, ONLY: zooplankton 53 54 !!* Substitution 55 # include "domzgr_substitute.h90" 47 56 48 57 !! Level … … 50 59 51 60 INTEGER :: ji, jj 61 62 REAL(wp) :: fq0 52 63 53 64 !!------------------------------------------------------------------- … … 188 199 ENDDO 189 200 201 IF ( ln_foam_medusa ) THEN 202 !! Mixed layer averages for ocean colour assimilation 203 !! 204 DO jj = 2,jpjm1 205 DO ji = 2,jpim1 206 IF (tmask(ji,jj,jk) == 1) THEN 207 if (fdep1(ji,jj).le.hmld(ji,jj)) then 208 !! this level is entirely in the mixed layer 209 fq0 = 1.0 210 elseif (fsdepw(ji,jj,jk).ge.hmld(ji,jj)) then 211 !! this level is entirely below the mixed layer 212 fq0 = 0.0 213 else 214 !! this level straddles the mixed layer 215 fq0 = (hmld(ji,jj) - fsdepw(ji,jj,jk)) / fse3t(ji,jj,jk) 216 endif 217 !! 218 pgrow_avg(ji,jj) = pgrow_avg(ji,jj) + & 219 (((fprn(ji,jj) * zphn(ji,jj)) + & 220 (fprd(ji,jj) * zphd(ji,jj)) ) * & 221 fse3t(ji,jj,jk) * fq0) 222 ploss_avg(ji,jj) = ploss_avg(ji,jj) + & 223 ((fgmepd(ji,jj) + fdpd(ji,jj) + & 224 fdpd2(ji,jj) + & 225 fgmepn(ji,jj) + fdpn(ji,jj) + & 226 fdpn2(ji,jj) + fgmipn(ji,jj) ) * & 227 fse3t(ji,jj,jk) * fq0) 228 phyt_avg(ji,jj) = phyt_avg(ji,jj) + & 229 ((zphn(ji,jj) + zphd(ji,jj)) * & 230 fse3t(ji,jj,jk) * fq0) 231 ENDIF 232 ENDDO 233 ENDDO 234 ENDIF 235 190 236 END SUBROUTINE plankton 191 237 -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/sms_medusa.F90
r9385 r10149 212 212 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_ccd_arg !: 2D aragonite CCD depth 213 213 !! 214 !! 2D fields of pCO2 and fCO2 for observation operator 215 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_pco2w !: 2D pCO2 216 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: f2_fco2w !: 2D fCO2 217 !! 214 218 !! 2D fields of organic and inorganic material sedimented on the seafloor 215 219 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: zb_sed_n !: 2D organic nitrogen (before) … … 289 293 INTEGER :: co2_rec 290 294 REAL(wp) :: co2_yinit, co2_yend !: First and Last year read in the xCO2.atm file 295 REAL(wp) :: xobs_xco2a !: Observed atmospheric xCO2, from namelist 291 296 #endif 292 297 … … 349 354 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: cmask !: ??? 350 355 356 !!---------------------------------------------------------------------- 357 !! Parameters required for ocean colour assimilation 358 !!---------------------------------------------------------------------- 359 !! 360 LOGICAL :: ln_foam_medusa !: Flag to calculate and save diagnostics 361 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: pgrow_avg !: Mixed layer average phytoplankton growth 362 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ploss_avg !: Mixed layer average phytoplankton loss 363 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: phyt_avg !: Mixed layer average phytoplankton 364 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: mld_max !: Maximum mixed layer depth 365 !! 366 351 367 !!---------------------------------------------------------------------- 352 368 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 361 377 !!---------------------------------------------------------------------- 362 378 USE lib_mpp , ONLY: ctl_warn 363 INTEGER :: ierr( 8) ! Local variables379 INTEGER :: ierr(9) ! Local variables 364 380 !!---------------------------------------------------------------------- 365 381 ierr(:) = 0 … … 371 387 !* 2D and 3D fields of carbonate system parameters 372 388 ALLOCATE( f2_ccd_cal(jpi,jpj) , f2_ccd_arg(jpi,jpj) , & 389 f2_pco2w(jpi,jpj) , f2_fco2w(jpi,jpj) , & 373 390 & f3_pH(jpi,jpj,jpk) , f3_h2co3(jpi,jpj,jpk), & 374 391 & f3_hco3(jpi,jpj,jpk) , f3_co3(jpi,jpj,jpk) , & … … 419 436 & ffln(jpi,jpj,jpk) , fflf(jpi,jpj,jpk) , & 420 437 & ffls(jpi,jpj,jpk) , cmask(jpi,jpj) , STAT=ierr(8) ) 438 !* Fields for ocean colour data assimilation 439 ALLOCATE( pgrow_avg(jpi,jpj) , ploss_avg(jpi,jpj) , & 440 & phyt_avg(jpi,jpj) , mld_max(jpi,jpj) , STAT=ierr(9) ) 421 441 #endif 422 442 ! -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r10020 r10149 105 105 USE sbc_oce, ONLY: lk_oasis 106 106 USE sms_medusa, ONLY: hist_pco2, co2_yinit, co2_yend, & 107 lk_pi_co2 107 # if defined key_roam 108 xobs_xco2a, & 109 # endif 110 pgrow_avg, & 111 ploss_avg, phyt_avg, mld_max, & 112 lk_pi_co2, ln_foam_medusa 108 113 USE trc, ONLY: ln_rsttr, nittrc000, trn 109 114 USE bio_medusa_init_mod, ONLY: bio_medusa_init … … 330 335 !! f_xco2a(:,:) = 284.725 !! CMIP5 pre-industrial pCO2 331 336 f_xco2a(:,:) = 284.317 !! CMIP6 pre-industrial pCO2 337 ELSEIF ( xobs_xco2a > 0.0 ) THEN 338 IF(lwp) WRITE(numout,*) ' using observed atm pCO2 = ', xobs_xco2a 339 f_xco2a(:,:) = xobs_xco2a 332 340 ELSE 333 341 !! xCO2 from file … … 418 426 !! now use the NEMO calendar tool : nsec_month to be sure to call 419 427 !! at the beginning of a new month . 428 !! DAF: For FOAM we want to run daily 420 429 IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR. & 421 ( nsec_month .LE. INT(rdt) ) ) THEN 430 ( nsec_month .LE. INT(rdt) ) .OR. & 431 ( nsec_day .LE. INT(rdt) .AND. ln_foam_medusa ) ) THEN 422 432 IF ( lwp ) WRITE(numout,*) & 423 433 ' *** 3D carb chem call *** -- kt:', kt, & -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90
r9385 r10149 330 330 !!---------------------------------------------------------------------- 331 331 !! 332 IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) ) THEN332 IF( ( .NOT.lk_oasis ) .AND. ( .NOT.lk_pi_co2 ) .AND. ( xobs_xco2a <= 0.0 ) ) THEN 333 333 IF(lwp) WRITE(numout,*) ' trc_ini_medusa: initialisating atm CO2 record' 334 334 CALL trc_ini_medusa_co2atm -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcnam_medusa.F90
r9258 r10149 87 87 & xsdiss, & 88 88 & sedlam,sedlostpoc,jpkb,jdms,jdms_input,jdms_model, & 89 & scl_chl, chl_out, dmsmin, dmscut, dmsslp 89 & scl_chl, chl_out, dmsmin, dmscut, dmsslp, & 90 & ln_foam_medusa 90 91 #if defined key_roam 91 92 NAMELIST/natroam/ xthetaphy,xthetazoo,xthetanit, & 93 & xobs_xco2a, & 92 94 & xthetarem,xo2min 93 95 #endif … … 255 257 dmscut = 1.72 !! Anderson DMS default 256 258 dmsslp = 8.24 !! Anderson DMS default 259 !! 260 ln_foam_medusa = .FALSE. 257 261 258 262 !REWIND(numnatm) … … 415 419 !! chl_out : select the chl field to send at the UM: 416 420 !! 1- Surf Chl ; 2- MLD Chl 421 !! 422 !! FOAM - observation operator and data assimilation 423 !! ln_foam_medusa : calculate required diagnostics 417 424 418 425 IF(lwp) THEN … … 975 982 ENDIF 976 983 ENDIF ! IF lk_oasis=true 984 !! FOAM 985 WRITE(numout,*) '=== FOAM-related parameters' 986 WRITE(numout,*) & 987 & ' calculate diagnostics for data assimilation, ln_foam_medusa = ', ln_foam_medusa 977 988 !! 978 989 ENDIF … … 1030 1041 xthetarem = 0. 1031 1042 xo2min = 0. 1043 xobs_xco2a = 0. 1032 1044 1033 1045 !READ(numnatm,natroam) … … 1049 1061 !! xthetarem : oxygen consumption by carbon remineralisation 1050 1062 !! xo2min : oxygen minimum concentration 1063 !! xobs_xco2a : observed atmospheric xCO2 (not used if <= 0) 1051 1064 1052 1065 IF(lwp) THEN … … 1066 1079 WRITE(numout,*) & 1067 1080 & ' oxygen minimum concentration xo2min = ', xo2min 1081 WRITE(numout,*) & 1082 & ' observed atmospheric xCO2 (not used if <= 0) xobs_xco2a = ', xobs_xco2a 1068 1083 ENDIF 1069 1084 -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r9262 r10149 36 36 USE sbc_oce 37 37 USE trcice ! tracers in sea ice 38 # if defined key_medusa 38 39 USE sms_medusa ! MEDUSA initialisation 40 # endif 39 41 IMPLICIT NONE 40 42 PRIVATE … … 107 109 ! ! total volume of the ocean 108 110 areatot = glob_sum( cvol(:,:,:) ) 111 # if defined key_medusa && defined key_roam 109 112 carea(:,:) = e1e2t(:,:) * tmask(:,:,1) 113 # endif 110 114 111 115 IF( lk_pisces ) CALL trc_ini_pisces ! PISCES bio-model -
branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r9975 r10149 45 45 USE oce, ONLY: CO2Flux_out_cpl, DMS_out_cpl, chloro_out_cpl !! Coupling variable 46 46 USE trcstat 47 USE obs_const, ONLY: obfillflt ! Observation operator fill value 47 48 48 49 IMPLICIT NONE … … 338 339 IF(lwp) WRITE(numout,*) 'Or don t start from uncomplete restart...' 339 340 ENDIF 341 ! 342 IF ( ln_foam_medusa ) THEN 343 !! 2D fields of pCO2 and fCO2 for observation operator on first timestep 344 IF( iom_varid( numrtr, 'PCO2W', ldstop = .FALSE. ) > 0 ) THEN 345 IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 present - reading in ...' 346 CALL iom_get( numrtr, jpdom_autoglo, 'PCO2W', f2_pco2w(:,:) ) 347 CALL iom_get( numrtr, jpdom_autoglo, 'FCO2W', f2_fco2w(:,:) ) 348 ELSE 349 IF(lwp) WRITE(numout,*) ' MEDUSA pCO2 absent - setting to fill ...' 350 f2_pco2w(:,:) = obfillflt * tmask(:,:,1) 351 f2_fco2w(:,:) = obfillflt * tmask(:,:,1) 352 ENDIF 353 ENDIF 340 354 # endif 341 355 IF ( ln_foam_medusa ) THEN 356 !! Fields for ocean colour assimilation on first timestep 357 IF( iom_varid( numrtr, 'pgrow_avg', ldstop = .FALSE. ) > 0 ) THEN 358 IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg present - reading in ...' 359 CALL iom_get( numrtr, jpdom_autoglo, 'pgrow_avg', pgrow_avg(:,:) ) 360 CALL iom_get( numrtr, jpdom_autoglo, 'ploss_avg', ploss_avg(:,:) ) 361 CALL iom_get( numrtr, jpdom_autoglo, 'phyt_avg', phyt_avg(:,:) ) 362 CALL iom_get( numrtr, jpdom_autoglo, 'mld_max', mld_max(:,:) ) 363 ELSE 364 IF(lwp) WRITE(numout,*) ' MEDUSA pgrow_avg absent - setting to zero ...' 365 pgrow_avg(:,:) = 0.0 366 ploss_avg(:,:) = 0.0 367 phyt_avg(:,:) = 0.0 368 mld_max(:,:) = 0.0 369 ENDIF 370 ENDIF 342 371 343 372 #endif … … 510 539 call trc_rst_dia_stat( f2_ccd_arg(:,:),'CCD_ARG') 511 540 !! 541 IF ( ln_foam_medusa ) THEN 542 !! Fields for observation operator on first timestep 543 IF(lwp) WRITE(numout,*) ' MEDUSA OBS fields - writing out ...' 544 CALL iom_rstput( kt, nitrst, numrtw, 'PCO2W', f2_pco2w(:,:) ) 545 CALL iom_rstput( kt, nitrst, numrtw, 'FCO2W', f2_fco2w(:,:) ) 546 ENDIF 512 547 # endif 548 IF ( ln_foam_medusa ) THEN 549 !! Fields for assimilation on first timestep 550 IF(lwp) WRITE(numout,*) ' MEDUSA ASM fields - writing out ...' 551 CALL iom_rstput( kt, nitrst, numrtw, 'pgrow_avg', pgrow_avg(:,:) ) 552 CALL iom_rstput( kt, nitrst, numrtw, 'ploss_avg', ploss_avg(:,:) ) 553 CALL iom_rstput( kt, nitrst, numrtw, 'phyt_avg', phyt_avg(:,:) ) 554 CALL iom_rstput( kt, nitrst, numrtw, 'mld_max', mld_max(:,:) ) 555 ENDIF 513 556 !! 514 557 #endif
Note: See TracChangeset
for help on using the changeset viewer.