Changeset 7927
- Timestamp:
- 2017-04-18T17:47:38+02:00 (7 years ago)
- Location:
- branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_mod.F90
r7912 r7927 27 27 28 28 !! Mortality/Remineralisation 29 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fslownflux, fslowcflux 29 30 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fregenfast,fregenfastsi 30 31 # if defined key_roam … … 173 174 ALLOCATE(fprn_ml(jpi,jpj),fprd_ml(jpi,jpj), & 174 175 xFree(jpi,jpj), & 176 fslownflux(jpi,jpj),fslowcflux(jpi,jpj), & 175 177 fregenfast(jpi,jpj),fregenfastsi(jpi,jpj), & 176 178 # if defined key_roam -
branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r7920 r7927 93 93 94 94 !! JPALM (27-06-2016): add lk_oasis for CO2 and DMS coupling with atm 95 USE sbc_oce, ONLY: lk_oasis96 USE oce, ONLY: CO2Flux_out_cpl, DMS_out_cpl,&97 PCO2a_in_cpl95 USE sbc_oce, ONLY: lk_oasis 96 USE oce, ONLY: CO2Flux_out_cpl, DMS_out_cpl, & 97 PCO2a_in_cpl 98 98 USE bio_medusa_mod 99 USE bio_medusa_init_mod, ONLY: bio_medusa_init 100 USE bio_medusa_fin_mod, ONLY: bio_medusa_fin 99 USE bio_medusa_init_mod, ONLY: bio_medusa_init 100 USE bio_medusa_fin_mod, ONLY: bio_medusa_fin 101 USE bio_medusa_diag_slice_mod, ONLY: bio_medusa_diag_slice 101 102 102 103 IMPLICIT NONE … … 233 234 REAL(wp), DIMENSION(jpi,jpj) :: fdpn2,fdpd2,fdpds2,fdzmi2,fdzme2 234 235 REAL(wp), DIMENSION(jpi,jpj) :: fslown, fslowc 235 REAL(wp), DIMENSION(jpi,jpj) :: fslownflux, fslowcflux236 ! REAL(wp), DIMENSION(jpi,jpj) :: fslownflux, fslowcflux 236 237 REAL(wp), DIMENSION(jpi,jpj) :: fregen,fregensi 237 238 ! REAL(wp), DIMENSION(jpi,jpj) :: fregenfast,fregenfastsi … … 3911 3912 !! 3912 3913 IF( lk_iomput .AND. .NOT. ln_diatrc ) THEN 3913 !! first - 2D diag implemented 3914 !! on every K level 3915 !!----------------------------------------- 3916 !! -- 3917 !!second - 2d specific k level diags 3918 !! 3919 !!----------------------------------------- 3920 IF (jk.eq.1) THEN 3921 # if defined key_debug_medusa 3922 IF (lwp) write (numout,*) 'trc_bio_medusa: diag jk = 1' 3923 CALL flush(numout) 3924 # endif 3925 IF( med_diag%MED_QSR%dgsave ) THEN 3926 CALL iom_put( "MED_QSR" , qsr ) ! 3927 ENDIF 3928 IF( med_diag%MED_XPAR%dgsave ) THEN 3929 CALL iom_put( "MED_XPAR" , xpar(:,:,jk) ) ! 3930 ENDIF 3931 IF( med_diag%OCAL_CCD%dgsave ) THEN 3932 CALL iom_put( "OCAL_CCD" , ocal_ccd ) ! 3933 ENDIF 3934 IF( med_diag%FE_0000%dgsave ) THEN 3935 CALL iom_put( "FE_0000" , xFree ) ! 3936 ENDIF 3937 IF( med_diag%MED_XZE%dgsave ) THEN 3938 CALL iom_put( "MED_XZE" , xze ) ! 3939 ENDIF 3940 # if defined key_roam 3941 IF( med_diag%WIND%dgsave ) THEN 3942 CALL iom_put( "WIND" , wndm ) 3943 ENDIF 3944 IF( med_diag%ATM_PCO2%dgsave ) THEN 3945 CALL iom_put( "ATM_PCO2" , f_pco2a2d ) 3946 CALL wrk_dealloc( jpi, jpj, f_pco2a2d ) 3947 ENDIF 3948 IF( med_diag%OCN_PH%dgsave ) THEN 3949 zw2d(:,:) = f3_pH(:,:,jk) 3950 CALL iom_put( "OCN_PH" , zw2d ) 3951 ENDIF 3952 IF( med_diag%OCN_PCO2%dgsave ) THEN 3953 CALL iom_put( "OCN_PCO2" , f_pco2w2d ) 3954 CALL wrk_dealloc( jpi, jpj, f_pco2w2d ) 3955 ENDIF 3956 IF( med_diag%OCNH2CO3%dgsave ) THEN 3957 zw2d(:,:) = f3_h2co3(:,:,jk) 3958 CALL iom_put( "OCNH2CO3" , zw2d ) 3959 ENDIF 3960 IF( med_diag%OCN_HCO3%dgsave ) THEN 3961 zw2d(:,:) = f3_hco3(:,:,jk) 3962 CALL iom_put( "OCN_HCO3" , zw2d ) 3963 ENDIF 3964 IF( med_diag%OCN_CO3%dgsave ) THEN 3965 zw2d(:,:) = f3_co3(:,:,jk) 3966 CALL iom_put( "OCN_CO3" , zw2d ) 3967 ENDIF 3968 IF( med_diag%CO2FLUX%dgsave ) THEN 3969 CALL iom_put( "CO2FLUX" , f_co2flux2d ) 3970 CALL wrk_dealloc( jpi, jpj, f_co2flux2d ) 3971 ENDIF 3972 !! 3973 !! AXY (10/11/16): repeat CO2 flux diagnostic in UKMO/CMIP6 units; this 3974 !! both outputs the CO2 flux in specified units and 3975 !! sends the resulting field to the coupler 3976 !! JPALM (17/11/16): put CO2 flux (fgco2) alloc/unalloc/pass to zn 3977 !! out of diag list request 3978 CALL lbc_lnk( fgco2(:,:),'T',1. ) 3979 IF( med_diag%FGCO2%dgsave ) THEN 3980 CALL iom_put( "FGCO2" , fgco2 ) 3981 ENDIF 3982 !! JPALM (17/11/16): should mv this fgco2 part 3983 !! out of lk_iomput loop 3984 zb_co2_flx = zn_co2_flx 3985 zn_co2_flx = fgco2 3986 IF (lk_oasis) THEN 3987 CO2Flux_out_cpl = zn_co2_flx 3988 ENDIF 3989 CALL wrk_dealloc( jpi, jpj, fgco2 ) 3990 !! --- 3991 IF( med_diag%OM_CAL%dgsave ) THEN 3992 CALL iom_put( "OM_CAL" , f_omcal ) 3993 ENDIF 3994 IF( med_diag%OM_ARG%dgsave ) THEN 3995 CALL iom_put( "OM_ARG" , f_omarg ) 3996 ENDIF 3997 IF( med_diag%TCO2%dgsave ) THEN 3998 CALL iom_put( "TCO2" , f_TDIC2d ) 3999 CALL wrk_dealloc( jpi, jpj, f_TDIC2d ) 4000 ENDIF 4001 IF( med_diag%TALK%dgsave ) THEN 4002 CALL iom_put( "TALK" , f_TALK2d ) 4003 CALL wrk_dealloc( jpi, jpj, f_TALK2d ) 4004 ENDIF 4005 IF( med_diag%KW660%dgsave ) THEN 4006 CALL iom_put( "KW660" , f_kw6602d ) 4007 CALL wrk_dealloc( jpi, jpj, f_kw6602d ) 4008 ENDIF 4009 IF( med_diag%ATM_PP0%dgsave ) THEN 4010 CALL iom_put( "ATM_PP0" , f_pp02d ) 4011 CALL wrk_dealloc( jpi, jpj, f_pp02d ) 4012 ENDIF 4013 IF( med_diag%O2FLUX%dgsave ) THEN 4014 CALL iom_put( "O2FLUX" , f_o2flux2d ) 4015 CALL wrk_dealloc( jpi, jpj, f_o2flux2d ) 4016 ENDIF 4017 IF( med_diag%O2SAT%dgsave ) THEN 4018 CALL iom_put( "O2SAT" , f_o2sat2d ) 4019 CALL wrk_dealloc( jpi, jpj, f_o2sat2d ) 4020 ENDIF 4021 IF( med_diag%CAL_CCD%dgsave ) THEN 4022 CALL iom_put( "CAL_CCD" , f2_ccd_cal ) 4023 ENDIF 4024 IF( med_diag%ARG_CCD%dgsave ) THEN 4025 CALL iom_put( "ARG_CCD" , f2_ccd_arg ) 4026 ENDIF 4027 IF (jdms .eq. 1) THEN 4028 IF( med_diag%DMS_SURF%dgsave ) THEN 4029 CALL lbc_lnk(dms_surf2d(:,:),'T',1. ) 4030 CALL iom_put( "DMS_SURF" , dms_surf2d ) 4031 zb_dms_srf = zn_dms_srf 4032 zn_dms_srf = dms_surf2d 4033 IF (lk_oasis) THEN 4034 DMS_out_cpl = zn_dms_srf 4035 ENDIF 4036 CALL wrk_dealloc( jpi, jpj, dms_surf2d ) 4037 ENDIF 4038 IF( med_diag%DMS_ANDR%dgsave ) THEN 4039 CALL iom_put( "DMS_ANDR" , dms_andr2d ) 4040 CALL wrk_dealloc( jpi, jpj, dms_andr2d ) 4041 ENDIF 4042 IF( med_diag%DMS_SIMO%dgsave ) THEN 4043 CALL iom_put( "DMS_SIMO" , dms_simo2d ) 4044 CALL wrk_dealloc( jpi, jpj, dms_simo2d ) 4045 ENDIF 4046 IF( med_diag%DMS_ARAN%dgsave ) THEN 4047 CALL iom_put( "DMS_ARAN" , dms_aran2d ) 4048 CALL wrk_dealloc( jpi, jpj, dms_aran2d ) 4049 ENDIF 4050 IF( med_diag%DMS_HALL%dgsave ) THEN 4051 CALL iom_put( "DMS_HALL" , dms_hall2d ) 4052 CALL wrk_dealloc( jpi, jpj, dms_hall2d ) 4053 ENDIF 4054 ENDIF 4055 !! AXY (24/11/16): extra MOCSY diagnostics 4056 IF( med_diag%ATM_XCO2%dgsave ) THEN 4057 CALL iom_put( "ATM_XCO2" , f_xco2a_2d ) 4058 CALL wrk_dealloc( jpi, jpj, f_xco2a_2d ) 4059 ENDIF 4060 IF( med_diag%OCN_FCO2%dgsave ) THEN 4061 CALL iom_put( "OCN_FCO2" , f_fco2w_2d ) 4062 CALL wrk_dealloc( jpi, jpj, f_fco2w_2d ) 4063 ENDIF 4064 IF( med_diag%ATM_FCO2%dgsave ) THEN 4065 CALL iom_put( "ATM_FCO2" , f_fco2a_2d ) 4066 CALL wrk_dealloc( jpi, jpj, f_fco2a_2d ) 4067 ENDIF 4068 IF( med_diag%OCN_RHOSW%dgsave ) THEN 4069 CALL iom_put( "OCN_RHOSW" , f_ocnrhosw_2d ) 4070 CALL wrk_dealloc( jpi, jpj, f_ocnrhosw_2d ) 4071 ENDIF 4072 IF( med_diag%OCN_SCHCO2%dgsave ) THEN 4073 CALL iom_put( "OCN_SCHCO2" , f_ocnschco2_2d ) 4074 CALL wrk_dealloc( jpi, jpj, f_ocnschco2_2d ) 4075 ENDIF 4076 IF( med_diag%OCN_KWCO2%dgsave ) THEN 4077 CALL iom_put( "OCN_KWCO2" , f_ocnkwco2_2d ) 4078 CALL wrk_dealloc( jpi, jpj, f_ocnkwco2_2d ) 4079 ENDIF 4080 IF( med_diag%OCN_K0%dgsave ) THEN 4081 CALL iom_put( "OCN_K0" , f_ocnk0_2d ) 4082 CALL wrk_dealloc( jpi, jpj, f_ocnk0_2d ) 4083 ENDIF 4084 IF( med_diag%CO2STARAIR%dgsave ) THEN 4085 CALL iom_put( "CO2STARAIR" , f_co2starair_2d ) 4086 CALL wrk_dealloc( jpi, jpj, f_co2starair_2d ) 4087 ENDIF 4088 IF( med_diag%OCN_DPCO2%dgsave ) THEN 4089 CALL iom_put( "OCN_DPCO2" , f_ocndpco2_2d ) 4090 CALL wrk_dealloc( jpi, jpj, f_ocndpco2_2d ) 4091 ENDIF 4092 # endif 4093 ELSE IF (jk.eq.i0100) THEN 4094 # if defined key_debug_medusa 4095 IF (lwp) write (numout,*) 'trc_bio_medusa: diag jk = 100' 4096 CALL flush(numout) 4097 # endif 4098 IF( med_diag%SDT__100%dgsave ) THEN 4099 zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk) 4100 CALL iom_put( "SDT__100" , zw2d ) 4101 ENDIF 4102 IF( med_diag%REG__100%dgsave ) THEN 4103 CALL iom_put( "REG__100" , fregen2d ) 4104 ENDIF 4105 IF( med_diag%FDT__100%dgsave ) THEN 4106 CALL iom_put( "FDT__100" , ffastn ) 4107 ENDIF 4108 IF( med_diag%RG__100F%dgsave ) THEN 4109 CALL iom_put( "RG__100F" , fregenfast ) 4110 ENDIF 4111 IF( med_diag%FDS__100%dgsave ) THEN 4112 CALL iom_put( "FDS__100" , ffastsi ) 4113 ENDIF 4114 IF( med_diag%RGS_100F%dgsave ) THEN 4115 CALL iom_put( "RGS_100F" , fregenfastsi ) 4116 ENDIF 4117 IF( med_diag%FE_0100%dgsave ) THEN 4118 CALL iom_put( "FE_0100" , xFree ) 4119 ENDIF 4120 # if defined key_roam 4121 IF( med_diag%RR_0100%dgsave ) THEN 4122 CALL iom_put( "RR_0100" , ffastca2d ) 4123 ENDIF 4124 IF( med_diag%SDC__100%dgsave ) THEN 4125 zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk) 4126 CALL iom_put( "SDC__100" , zw2d ) 4127 ENDIF 4128 IF( med_diag%epC100%dgsave ) THEN 4129 zw2d(:,:) = (fslowcflux + ffastc) * tmask(:,:,jk) 4130 CALL iom_put( "epC100" , zw2d ) 4131 ENDIF 4132 IF( med_diag%epCALC100%dgsave ) THEN 4133 CALL iom_put( "epCALC100" , ffastca ) 4134 ENDIF 4135 IF( med_diag%epN100%dgsave ) THEN 4136 zw2d(:,:) = (fslownflux + ffastn) * tmask(:,:,jk) 4137 CALL iom_put( "epN100" , zw2d ) 4138 ENDIF 4139 IF( med_diag%epSI100%dgsave ) THEN 4140 CALL iom_put( "epSI100" , ffastsi ) 4141 ENDIF 4142 ELSE IF (jk.eq.i0150) THEN 4143 # if defined key_debug_medusa 4144 IF (lwp) write (numout,*) 'trc_bio_medusa: diag jk = 150' 4145 CALL flush(numout) 4146 # endif 4147 # endif 4148 ELSE IF (jk.eq.i0200) THEN 4149 # if defined key_debug_medusa 4150 IF (lwp) write (numout,*) 'trc_bio_medusa: diag jk = 200' 4151 CALL flush(numout) 4152 # endif 4153 IF( med_diag%SDT__200%dgsave ) THEN 4154 zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk) 4155 CALL iom_put( "SDT__200" , zw2d ) 4156 ENDIF 4157 IF( med_diag%REG__200%dgsave ) THEN 4158 CALL iom_put( "REG__200" , fregen2d ) 4159 ENDIF 4160 IF( med_diag%FDT__200%dgsave ) THEN 4161 CALL iom_put( "FDT__200" , ffastn ) 4162 ENDIF 4163 IF( med_diag%RG__200F%dgsave ) THEN 4164 CALL iom_put( "RG__200F" , fregenfast ) 4165 ENDIF 4166 IF( med_diag%FDS__200%dgsave ) THEN 4167 CALL iom_put( "FDS__200" , ffastsi ) 4168 ENDIF 4169 IF( med_diag%RGS_200F%dgsave ) THEN 4170 CALL iom_put( "RGS_200F" , fregenfastsi ) 4171 ENDIF 4172 IF( med_diag%FE_0200%dgsave ) THEN 4173 CALL iom_put( "FE_0200" , xFree ) 4174 ENDIF 4175 # if defined key_roam 4176 IF( med_diag%SDC__200%dgsave ) THEN 4177 zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk) 4178 CALL iom_put( "SDC__200" , zw2d ) 4179 ENDIF 4180 # endif 4181 ELSE IF (jk.eq.i0500) THEN 4182 # if defined key_debug_medusa 4183 IF (lwp) write (numout,*) 'trc_bio_medusa: diag jk = 500' 4184 CALL flush(numout) 4185 # endif 4186 IF( med_diag%SDT__500%dgsave ) THEN 4187 zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk) 4188 CALL iom_put( "SDT__500" , zw2d ) 4189 ENDIF 4190 IF( med_diag%REG__500%dgsave ) THEN 4191 CALL iom_put( "REG__500" , fregen2d ) 4192 ENDIF 4193 IF( med_diag%FDT__500%dgsave ) THEN 4194 CALL iom_put( "FDT__500" , ffastn ) 4195 ENDIF 4196 IF( med_diag%RG__500F%dgsave ) THEN 4197 CALL iom_put( "RG__500F" , fregenfast ) 4198 ENDIF 4199 IF( med_diag%FDS__500%dgsave ) THEN 4200 CALL iom_put( "FDS__500" , ffastsi ) 4201 ENDIF 4202 IF( med_diag%RGS_500F%dgsave ) THEN 4203 CALL iom_put( "RGS_500F" , fregenfastsi ) 4204 ENDIF 4205 IF( med_diag%FE_0500%dgsave ) THEN 4206 CALL iom_put( "FE_0500" , xFree ) 4207 ENDIF 4208 # if defined key_roam 4209 IF( med_diag%RR_0500%dgsave ) THEN 4210 CALL iom_put( "RR_0500" , ffastca2d ) 4211 ENDIF 4212 IF( med_diag%SDC__500%dgsave ) THEN 4213 zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk) 4214 CALL iom_put( "SDC__500" , zw2d ) 4215 ENDIF 4216 # endif 4217 ELSE IF (jk.eq.i1000) THEN 4218 # if defined key_debug_medusa 4219 IF (lwp) write (numout,*) 'trc_bio_medusa: diag jk = 1000' 4220 CALL flush(numout) 4221 # endif 4222 IF( med_diag%SDT_1000%dgsave ) THEN 4223 zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk) 4224 CALL iom_put( "SDT_1000" , zw2d ) 4225 ENDIF 4226 IF( med_diag%REG_1000%dgsave ) THEN 4227 CALL iom_put( "REG_1000" , fregen2d ) 4228 ENDIF 4229 IF( med_diag%FDT_1000%dgsave ) THEN 4230 CALL iom_put( "FDT_1000" , ffastn ) 4231 ENDIF 4232 IF( med_diag%RG_1000F%dgsave ) THEN 4233 CALL iom_put( "RG_1000F" , fregenfast ) 4234 ENDIF 4235 IF( med_diag%FDS_1000%dgsave ) THEN 4236 CALL iom_put( "FDS_1000" , ffastsi ) 4237 ENDIF 4238 IF( med_diag%RGS1000F%dgsave ) THEN 4239 CALL iom_put( "RGS1000F" , fregenfastsi ) 4240 ENDIF 4241 IF( med_diag%FE_1000%dgsave ) THEN 4242 CALL iom_put( "FE_1000" , xFree ) 4243 ENDIF 4244 # if defined key_roam 4245 IF( med_diag%RR_1000%dgsave ) THEN 4246 CALL iom_put( "RR_1000" , ffastca2d ) 4247 CALL wrk_dealloc( jpi, jpj, ffastca2d ) 4248 ENDIF 4249 IF( med_diag%SDC_1000%dgsave ) THEN 4250 zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk) 4251 CALL iom_put( "SDC_1000" , zw2d ) 4252 ENDIF 4253 # endif 4254 ENDIF 4255 !! to do on every k loop : 4256 IF( med_diag%DETFLUX3%dgsave ) THEN 4257 detflux3d(:,:,jk) = (fslownflux(:,:) + ffastn(:,:)) * tmask(:,:,jk) !! detrital flux 4258 !CALL iom_put( "DETFLUX3" , ftot_n ) 4259 ENDIF 4260 # if defined key_roam 4261 IF( med_diag%EXPC3%dgsave ) THEN 4262 expc3(:,:,jk) = (fslowcflux(:,:) + ffastc(:,:)) * tmask(:,:,jk) 4263 ENDIF 4264 IF( med_diag%EXPN3%dgsave ) THEN 4265 expn3(:,:,jk) = (fslownflux(:,:) + ffastn(:,:)) * tmask(:,:,jk) 4266 ENDIF 4267 # endif 3914 3915 !!------------------------------------------------------- 3916 !! 2d specific k level diags 3917 !!------------------------------------------------------- 3918 CALL bio_medusa_diag_slice( jk ) 3919 4268 3920 ENDIF 4269 3921 !! CLOSE vertical loop
Note: See TracChangeset
for help on using the changeset viewer.