Changeset 5343
- Timestamp:
- 2015-06-04T09:48:48+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/SHARED/field_def.xml
r5220 r5343 185 185 <field id="isfgammat" long_name="transfert coefficient for isf (temperature) " unit="m/s" /> 186 186 <field id="isfgammas" long_name="transfert coefficient for isf (salinity) " unit="m/s" /> 187 188 187 <field id="stbl" long_name="salinity in the Losh tbl " unit="PSU" /> 188 <field id="ttbl" long_name="temperature in the Losh tbl " unit="C" /> 189 189 190 190 <!-- *_oce variables available with ln_blk_clio or ln_blk_core --> … … 340 340 <field id="hfxdhc" long_name="Heat content variation in snow and ice" unit="W/m2" /> 341 341 <field id="hfxtur" long_name="turbulent heat flux at the ice base" unit="W/m2" /> 342 343 <!-- sbcssm variables --> 344 <field id="sst_m" unit="degC" /> 345 <field id="sss_m" unit="psu" /> 346 <field id="ssu_m" unit="m/s" /> 347 <field id="ssv_m" unit="m/s" /> 348 <field id="ssh_m" unit="m" /> 349 <field id="e3t_m" unit="m" /> 342 350 343 351 </field_group> -
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/CONFIG/SHARED/namelist_ref
r5220 r5343 384 384 sn_sal = 'sas_grid_T' , 120 , 'sosaline' , .true. , .true. , 'yearly' , '' , '' , '' 385 385 sn_ssh = 'sas_grid_T' , 120 , 'sossheig' , .true. , .true. , 'yearly' , '' , '' , '' 386 387 ln_3d_uv = .true. ! specify whether we are supplying a 3D u,v field 386 sn_e3t = 'sas_grid_T' , 120 , 'e3t_m' , .true. , .true. , 'yearly' , '' , '' , '' 387 388 ln_3d_uve = .true. ! specify whether we are supplying a 3D u,v and e3 field 388 389 cn_dir = './' ! root directory for the location of the bulk files are 389 390 / -
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
r5202 r5343 117 117 118 118 ! basal temperature (considered at freezing point) 119 t_bo(:,:) = ( eos_fzp( tsn(:,:,1,jp_sal) ) + rt0 ) * tmask(:,:,1)119 t_bo(:,:) = ( eos_fzp( sss_m(:,:) ) + rt0 ) * tmask(:,:,1) 120 120 121 121 IF( ln_iceini ) THEN … … 127 127 DO jj = 1, jpj ! ice if sst <= t-freez + ttest 128 128 DO ji = 1, jpi 129 IF( ( tsn(ji,jj,1,jp_tem) - ( t_bo(ji,jj) - rt0 ) ) * tmask(ji,jj,1) >= rn_thres_sst ) THEN129 IF( ( sst_m(ji,jj) - ( t_bo(ji,jj) - rt0 ) ) * tmask(ji,jj,1) >= rn_thres_sst ) THEN 130 130 zswitch(ji,jj) = 0._wp * tmask(ji,jj,1) ! no ice 131 131 ELSE -
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r5305 r5343 485 485 srcv(jpr_otx1)%clgrid = 'U' ! oce components given at U-point 486 486 srcv(jpr_oty1)%clgrid = 'V' ! and V-point 487 ! Vectors: change of sign at north fold ONLY if on the local grid 488 srcv( (/jpr_otx1,jpr_oty1/) )%nsgn = -1. 487 489 sn_rcv_tau%clvgrd = 'U,V' 488 490 sn_rcv_tau%clvor = 'local grid' … … 981 983 ! (arrays no more filled at sbcssm stage) 982 984 ! ! ================== ! 983 ! ! SST !984 ! ! ================== !985 IF( srcv(jpr_toce)%laction ) THEN ! received by sas in case of opa <-> sas coupling986 sst_m(:,:) = frcv(jpr_toce)%z3(:,:,1)987 tsn(:,:,1,jp_tem) = sst_m(:,:)988 ENDIF989 ! ! ================== !990 985 ! ! SSS ! 991 986 ! ! ================== ! … … 993 988 sss_m(:,:) = frcv(jpr_soce)%z3(:,:,1) 994 989 tsn(:,:,1,jp_sal) = sss_m(:,:) 990 ENDIF 991 ! 992 ! ! ================== ! 993 ! ! SST ! 994 ! ! ================== ! 995 IF( srcv(jpr_toce)%laction ) THEN ! received by sas in case of opa <-> sas coupling 996 sst_m(:,:) = frcv(jpr_toce)%z3(:,:,1) 997 tsn(:,:,1,jp_tem) = sst_m(:,:) ! keep the received (potential or conservative) temperature in tsn 998 IF( srcv(jpr_soce)%laction .AND. ln_useCT ) THEN ! make sure that sst_m is the potential temperature 999 sst_m(:,:) = eos_pt_from_ct( sst_m(:,:), sss_m(:,:) ) 1000 ENDIF 995 1001 ENDIF 996 1002 ! ! ================== ! … … 1057 1063 END IF 1058 1064 ! update qns over the free ocean with: 1059 zqns(:,:) = zqns(:,:) - zemp(:,:) * sst_m(:,:) * rcp ! remove heat content due to mass flux (assumed to be at SST) 1060 IF( srcv(jpr_snow )%laction ) THEN 1061 zqns(:,:) = zqns(:,:) - frcv(jpr_snow)%z3(:,:,1) * lfus ! energy for melting solid precipitation over the free ocean 1065 IF( nn_components /= jp_iam_opa ) THEN 1066 zqns(:,:) = zqns(:,:) - zemp(:,:) * sst_m(:,:) * rcp ! remove heat content due to mass flux (assumed to be at SST) 1067 IF( srcv(jpr_snow )%laction ) THEN 1068 zqns(:,:) = zqns(:,:) - frcv(jpr_snow)%z3(:,:,1) * lfus ! energy for melting solid precipitation over the free ocean 1069 ENDIF 1062 1070 ENDIF 1063 1071 IF( ln_mixcpl ) THEN ; qns(:,:) = qns(:,:) * xcplmask(:,:,0) + zqns(:,:) * zmsk(:,:) … … 1070 1078 ELSE ; zqsr(:,:) = 0._wp 1071 1079 ENDIF 1072 IF( ln_dm2dc ) zqsr(:,:) = sbc_dcy( zqsr )! modify qsr to include the diurnal cycle1080 IF( ln_dm2dc .AND. nn_components /= jp_iam_opa ) zqsr(:,:) = sbc_dcy( zqsr ) ! modify qsr to include the diurnal cycle 1073 1081 IF( ln_mixcpl ) THEN ; qsr(:,:) = qsr(:,:) * xcplmask(:,:,0) + zqsr(:,:) * zmsk(:,:) 1074 1082 ELSE ; qsr(:,:) = zqsr(:,:) … … 1627 1635 ! ! ------------------------- ! 1628 1636 IF( ssnd(jps_toce)%laction .OR. ssnd(jps_tice)%laction .OR. ssnd(jps_tmix)%laction ) THEN 1637 1629 1638 IF ( nn_components == jp_iam_opa ) THEN 1630 ztmp1(:,:) = tsn(:,:,1,jp_tem) 1639 ztmp1(:,:) = tsn(:,:,1,jp_tem) ! send temperature as it is (potential or conservative) -> use of ln_useCT on the received part 1631 1640 ELSE 1641 ! we must send the surface potential temperature 1642 IF( ln_useCT ) THEN ; ztmp1(:,:) = eos_pt_from_ct( tsn(:,:,1,jp_tem), tsn(:,:,1,jp_sal) ) 1643 ELSE ; ztmp1(:,:) = tsn(:,:,1,jp_tem) 1644 ENDIF 1645 ! 1632 1646 SELECT CASE( sn_snd_temp%cldes) 1633 CASE( 'oce only' ) ; ztmp1(:,:) = tsn(:,:,1,jp_tem) + rt01634 CASE( 'weighted oce and ice' ) ; ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)1647 CASE( 'oce only' ) ; ztmp1(:,:) = ztmp1(:,:) + rt0 1648 CASE( 'weighted oce and ice' ) ; ztmp1(:,:) = ( ztmp1(:,:) + rt0 ) * zfr_l(:,:) 1635 1649 SELECT CASE( sn_snd_temp%clcat ) 1636 1650 CASE( 'yes' ) … … 1644 1658 END SELECT 1645 1659 CASE( 'mixed oce-ice' ) 1646 ztmp1(:,:) = ( tsn(:,:,1,jp_tem) + rt0 ) * zfr_l(:,:)1660 ztmp1(:,:) = ( ztmp1(:,:) + rt0 ) * zfr_l(:,:) 1647 1661 DO jl=1,jpl 1648 1662 ztmp1(:,:) = ztmp1(:,:) + tn_ice(:,:,jl) * a_i(:,:,jl) -
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
r5299 r5343 162 162 ENDIF 163 163 ! 164 IF( MOD( kt - 1 , nn_fsbc ) == 0 ) THEN ! Mean value at each nn_fsbc time-step ! 165 CALL iom_put( 'ssu_m', ssu_m ) 166 CALL iom_put( 'ssv_m', ssv_m ) 167 CALL iom_put( 'sst_m', sst_m ) 168 CALL iom_put( 'sss_m', sss_m ) 169 CALL iom_put( 'ssh_m', ssh_m ) 170 IF( lk_vvl ) CALL iom_put( 'e3t_m', fse3t_m(:,:) ) 171 ENDIF 172 ! 164 173 END SUBROUTINE sbc_ssm 165 174 … … 212 221 ENDIF 213 222 ENDIF 223 224 IF( .NOT. l_ssm_mean ) THEN ! default initialisation. needed by lim_istate 225 ! 226 IF(lwp) WRITE(numout,*) ' default initialisation of ss?_m arrays' 227 ssu_m(:,:) = ub(:,:,1) 228 ssv_m(:,:) = vb(:,:,1) 229 IF( ln_useCT ) THEN ; sst_m(:,:) = eos_pt_from_ct( tsn(:,:,1,jp_tem), tsn(:,:,1,jp_sal) ) 230 ELSE ; sst_m(:,:) = tsn(:,:,1,jp_tem) 231 ENDIF 232 sss_m(:,:) = tsn(:,:,1,jp_sal) 233 ssh_m(:,:) = sshn(:,:) 234 IF( lk_vvl ) fse3t_m(:,:) = fse3t_n(:,:,1) 235 ! 236 ENDIF 214 237 ! 215 238 END SUBROUTINE sbc_ssm_init -
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
r5147 r5343 72 72 PUBLIC eos_init ! called by istate module 73 73 74 ! 75 INTEGER , PUBLIC :: nn_eos = 0 !:= 0/1/2 type of eq. of state and Brunt-Vaisala frequ.76 LOGICAL , PUBLIC :: ln_useCT = .FALSE.! determine if eos_pt_from_ct is used to compute sst_m74 ! !!* Namelist (nameos) * 75 INTEGER , PUBLIC :: nn_eos ! = 0/1/2 type of eq. of state and Brunt-Vaisala frequ. 76 LOGICAL , PUBLIC :: ln_useCT ! determine if eos_pt_from_ct is used to compute sst_m 77 77 78 78 ! !!! simplified eos coefficients … … 1183 1183 WRITE(numout,*) ' model uses Conservative Temperature' 1184 1184 WRITE(numout,*) ' Important: model must be initialized with CT and SA fields' 1185 ELSE 1186 WRITE(numout,*) ' model does not use Conservative Temperature' 1185 1187 ENDIF 1186 1188 ENDIF -
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r5331 r5343 42 42 USE step_oce ! module used in the ocean time stepping module 43 43 USE sbc_oce ! surface boundary condition: ocean 44 USE cla ! cross land advection (tra_cla routine)45 44 USE domcfg ! domain configuration (dom_cfg routine) 46 45 USE daymod ! calendar … … 50 49 USE step ! NEMO time-stepping (stp routine) 51 50 USE lib_mpp ! distributed memory computing 51 #if defined key_nosignedzero 52 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 53 #endif 52 54 #if defined key_iomput 53 55 USE xios … … 182 184 ! 183 185 cltxt = '' 184 cxios_context = 'sas'185 186 ! 186 187 ! ! Open reference namelist and configuration namelist files … … 188 189 CALL ctl_opn( numnam_ref, 'namelist_sas_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 189 190 CALL ctl_opn( numnam_cfg, 'namelist_sas_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 191 cxios_context = 'sas' 190 192 ELSE 191 193 CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 192 194 CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 193 ENDIF 195 cxios_context = 'nemo' 196 ENDIF 194 197 ! 195 198 REWIND( numnam_ref ) ! Namelist namctl in reference namelist : Control prints & Benchmark … … 505 508 ierr = ierr + dom_oce_alloc () ! ocean domain 506 509 ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), & 507 & snwice_fmass(jpi,jpj), STAT= ierr 4)510 & snwice_fmass(jpi,jpj), STAT= ierr1 ) 508 511 ! 509 512 ! lim code currently uses surface temperature and salinity in tsn array for initialisation -
branches/2015/dev_r5218_CNRS17_coupling/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90
r5331 r5343 36 36 PUBLIC sbc_ssm ! called by sbc 37 37 38 CHARACTER(len=100) :: cn_dir = './' !: Root directory for location of ssm files 39 LOGICAL :: ln_3d_uv = .true. !: specify whether input velocity data is 3D 40 INTEGER , SAVE :: nfld_3d 41 INTEGER , SAVE :: nfld_2d 42 43 INTEGER , PARAMETER :: jpfld_3d = 4 ! maximum number of files to read 44 INTEGER , PARAMETER :: jpfld_2d = 1 ! maximum number of files to read 45 INTEGER , SAVE :: jf_tem ! index of temperature 46 INTEGER , SAVE :: jf_sal ! index of salinity 47 INTEGER , SAVE :: jf_usp ! index of u velocity component 48 INTEGER , SAVE :: jf_vsp ! index of v velocity component 49 INTEGER , SAVE :: jf_ssh ! index of sea surface height 38 CHARACTER(len=100) :: cn_dir !: Root directory for location of ssm files 39 LOGICAL :: ln_3d_uve !: specify whether input velocity data is 3D 40 INTEGER :: nfld_3d 41 INTEGER :: nfld_2d 42 43 INTEGER :: jf_tem ! index of temperature 44 INTEGER :: jf_sal ! index of salinity 45 INTEGER :: jf_usp ! index of u velocity component 46 INTEGER :: jf_vsp ! index of v velocity component 47 INTEGER :: jf_ssh ! index of sea surface height 48 INTEGER :: jf_e3t ! index of first T level thickness 50 49 51 50 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_ssm_3d ! structure of input fields (file information, fields read) 52 51 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_ssm_2d ! structure of input fields (file information, fields read) 53 52 54 !! * Substitutions55 # include "domzgr_substitute.h90"56 # include "vectopt_loop_substitute.h90"57 53 !!---------------------------------------------------------------------- 58 54 !! NEMO/OFF 3.3 , NEMO Consortium (2010) … … 86 82 IF( nfld_2d > 0 ) CALL fld_read( kt, 1, sf_ssm_2d ) !== read data at kt time step ==! 87 83 ! 88 IF( ln_3d_uv ) THEN84 IF( ln_3d_uve ) THEN 89 85 ssu_m(:,:) = sf_ssm_3d(jf_usp)%fnow(:,:,1) * umask(:,:,1) ! u-velocity 90 86 ssv_m(:,:) = sf_ssm_3d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 87 IF( lk_vvl ) e3t_m(:,:) = sf_ssm_3d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! v-velocity 91 88 ELSE 92 89 ssu_m(:,:) = sf_ssm_2d(jf_usp)%fnow(:,:,1) * umask(:,:,1) ! u-velocity 93 90 ssv_m(:,:) = sf_ssm_2d(jf_vsp)%fnow(:,:,1) * vmask(:,:,1) ! v-velocity 91 IF( lk_vvl ) e3t_m(:,:) = sf_ssm_2d(jf_e3t)%fnow(:,:,1) * tmask(:,:,1) ! v-velocity 94 92 ENDIF 95 93 ! … … 104 102 tsb(:,:,1,jp_sal) = sss_m(:,:) 105 103 ENDIF 106 ub (:,:,1 107 vb (:,:,1 104 ub (:,:,1) = ssu_m(:,:) 105 vb (:,:,1) = ssv_m(:,:) 108 106 109 107 IF(ln_ctl) THEN ! print control … … 113 111 CALL prt_ctl(tab2d_1=ssv_m, clinfo1=' ssv_m - : ', mask1=vmask, ovlap=1 ) 114 112 CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' ssh_m - : ', mask1=tmask, ovlap=1 ) 113 IF( lk_vvl ) CALL prt_ctl(tab2d_1=ssh_m, clinfo1=' e3t_m - : ', mask1=tmask, ovlap=1 ) 115 114 ENDIF 116 115 ! … … 138 137 TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) :: slf_2d ! array of namelist information on the fields to read 139 138 TYPE(FLD_N) :: sn_tem, sn_sal ! information about the fields to be read 140 TYPE(FLD_N) :: sn_usp, sn_vsp, sn_ssh 141 ! 142 NAMELIST/namsbc_sas/cn_dir, ln_3d_uv, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh 139 TYPE(FLD_N) :: sn_usp, sn_vsp 140 TYPE(FLD_N) :: sn_ssh, sn_e3t 141 ! 142 NAMELIST/namsbc_sas/cn_dir, ln_3d_uve, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh, sn_e3t 143 143 !!---------------------------------------------------------------------- 144 144 … … 195 195 !! when we have other 3d arrays that we need to read in 196 196 !! so if a new field is added i.e. jf_new, just give it the next integer in sequence 197 !! for the corresponding dimension (currently if ln_3d_uv is true, 4 for 2d and 3 for 3d,198 !! alternatively if ln_3d_uv is false, 6 for 2d and 1 for 3d), reset nfld_3d, nfld_2d,197 !! for the corresponding dimension (currently if ln_3d_uve is true, 4 for 2d and 3 for 3d, 198 !! alternatively if ln_3d_uve is false, 6 for 2d and 1 for 3d), reset nfld_3d, nfld_2d, 199 199 !! and the rest of the logic should still work 200 200 ! 201 201 jf_tem = 1 ; jf_sal = 2 ; jf_ssh = 3 202 202 ! 203 IF( ln_3d_uv ) THEN204 jf_usp = 1 ; jf_vsp = 2 205 nfld_3d = 2 203 IF( ln_3d_uve ) THEN 204 jf_usp = 1 ; jf_vsp = 2 ; jf_e3t = 3 205 nfld_3d = 2 + COUNT( (/lk_vvl/) ) 206 206 nfld_2d = 3 207 207 ELSE 208 jf_usp = 4 ; jf_vsp = 5 208 jf_usp = 4 ; jf_vsp = 5 ; jf_e3t = 6 209 209 nfld_3d = 0 210 nfld_2d = 5 210 nfld_2d = 5 + COUNT( (/lk_vvl/) ) 211 211 ENDIF 212 212 … … 216 216 CALL ctl_stop( 'sbc_ssm_init: unable to allocate slf 3d structure' ) ; RETURN 217 217 ENDIF 218 IF( ln_3d_uv ) THEN 219 slf_3d(jf_usp) = sn_usp 220 slf_3d(jf_vsp) = sn_vsp 221 ENDIF 218 slf_3d(jf_usp) = sn_usp 219 slf_3d(jf_vsp) = sn_vsp 220 IF( lk_vvl ) slf_3d(jf_e3t) = sn_e3t 222 221 ENDIF 223 222 … … 228 227 ENDIF 229 228 slf_2d(jf_tem) = sn_tem ; slf_2d(jf_sal) = sn_sal ; slf_2d(jf_ssh) = sn_ssh 230 IF( .NOT. ln_3d_uv ) THEN229 IF( .NOT. ln_3d_uve ) THEN 231 230 slf_2d(jf_usp) = sn_usp ; slf_2d(jf_vsp) = sn_vsp 232 ENDIF 233 ENDIF 234 ! 231 IF( lk_vvl ) slf_2d(jf_e3t) = sn_e3t 232 ENDIF 233 ENDIF 234 ! 235 ierr1 = 0 ! default definition if slf_?d(ifpr)%ln_tint = .false. 235 236 IF( nfld_3d > 0 ) THEN 236 237 ALLOCATE( sf_ssm_3d(nfld_3d), STAT=ierr ) ! set sf structure … … 269 270 IF( nfld_3d > 0 ) DEALLOCATE( slf_3d, STAT=ierr ) 270 271 IF( nfld_2d > 0 ) DEALLOCATE( slf_2d, STAT=ierr ) 272 273 call sbc_ssm( nit000 ) ! need to define ss?_m arrays used in limistate 271 274 ! 272 275 END SUBROUTINE sbc_ssm_init
Note: See TracChangeset
for help on using the changeset viewer.