Changeset 11401
- Timestamp:
- 2019-08-05T14:36:23+02:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/cfgs/SHARED/namelist_ice_ref
r11397 r11401 188 188 ln_iceini = .true. ! activate ice initialization (T) or not (F) 189 189 ln_iceini_file = .false. ! netcdf file provided for initialization (T) or not (F) 190 rn_thres_sst = 2.0 ! max delta temp. above Tfreeze with initial ice = (sst - tfreeze) 191 rn_hts_ini_n = 0.3 ! initial real snow thickness (m), North 190 rn_thres_sst = 2.0 ! max temp. above Tfreeze with initial ice = (sst - tfreeze) 191 rn_hti_ini_n = 3.0 ! initial ice thickness (m), North 192 rn_hti_ini_s = 1.0 ! " " South 193 rn_hts_ini_n = 0.3 ! initial snow thickness (m), North 192 194 rn_hts_ini_s = 0.3 ! " " South 193 rn_hti_ini_n = 3.0 ! initial real ice thickness (m), North194 rn_hti_ini_s = 1.0 ! " " South195 195 rn_ati_ini_n = 0.9 ! initial ice concentration (-), North 196 196 rn_ati_ini_s = 0.9 ! " " South … … 199 199 rn_tmi_ini_n = 270. ! initial ice temperature (K), North 200 200 rn_tmi_ini_s = 270. ! " " South 201 rn_tsu_ini_n = 270. ! initial surface temperature (K), North 202 rn_tsu_ini_s = 270. ! " " South 201 203 rn_tms_ini_n = 270. ! initial snw temperature (K), North 202 204 rn_tms_ini_s = 270. ! " " South … … 205 207 rn_hpd_ini_n = 0.05 ! initial pond depth (m), North 206 208 rn_hpd_ini_s = 0.05 ! " " South 207 209 ! ! if ln_iceini_file=T 208 210 sn_hti = 'Ice_initialization' , -12 ,'hti' , .false. , .true., 'yearly' , '' , '', '' 209 211 sn_hts = 'Ice_initialization' , -12 ,'hts' , .false. , .true., 'yearly' , '' , '', '' 210 212 sn_ati = 'Ice_initialization' , -12 ,'ati' , .false. , .true., 'yearly' , '' , '', '' 213 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 214 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 211 215 sn_tsu = 'Ice_initialization' , -12 ,'tsu' , .false. , .true., 'yearly' , '' , '', '' 212 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', ''213 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', ''214 216 sn_tms = 'NOT USED' , -12 ,'tms' , .false. , .true., 'yearly' , '' , '', '' 215 217 sn_apd = 'NOT USED' , -12 ,'apd' , .false. , .true., 'yearly' , '' , '', '' -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/namelists/namini
r11397 r11401 4 4 ln_iceini = .true. ! activate ice initialization (T) or not (F) 5 5 ln_iceini_file = .false. ! netcdf file provided for initialization (T) or not (F) 6 rn_thres_sst = 2.0 ! max delta temp. above Tfreeze with initial ice = (sst - tfreeze) 7 rn_hts_ini_n = 0.3 ! initial real snow thickness (m), North 6 rn_thres_sst = 2.0 ! max temp. above Tfreeze with initial ice = (sst - tfreeze) 7 rn_hti_ini_n = 3.0 ! initial ice thickness (m), North 8 rn_hti_ini_s = 1.0 ! " " South 9 rn_hts_ini_n = 0.3 ! initial snow thickness (m), North 8 10 rn_hts_ini_s = 0.3 ! " " South 9 rn_hti_ini_n = 3.0 ! initial real ice thickness (m), North10 rn_hti_ini_s = 1.0 ! " " South11 11 rn_ati_ini_n = 0.9 ! initial ice concentration (-), North 12 12 rn_ati_ini_s = 0.9 ! " " South … … 15 15 rn_tmi_ini_n = 270. ! initial ice temperature (K), North 16 16 rn_tmi_ini_s = 270. ! " " South 17 rn_tsu_ini_n = 270. ! initial surface temperature (K), North 18 rn_tsu_ini_s = 270. ! " " South 17 19 rn_tms_ini_n = 270. ! initial snw temperature (K), North 18 20 rn_tms_ini_s = 270. ! " " South … … 21 23 rn_hpd_ini_n = 0.05 ! initial pond depth (m), North 22 24 rn_hpd_ini_s = 0.05 ! " " South 23 25 ! ! if ln_iceini_file=T 24 26 sn_hti = 'Ice_initialization' , -12 ,'hti' , .false. , .true., 'yearly' , '' , '', '' 25 27 sn_hts = 'Ice_initialization' , -12 ,'hts' , .false. , .true., 'yearly' , '' , '', '' 26 28 sn_ati = 'Ice_initialization' , -12 ,'ati' , .false. , .true., 'yearly' , '' , '', '' 29 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', '' 30 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', '' 27 31 sn_tsu = 'Ice_initialization' , -12 ,'tsu' , .false. , .true., 'yearly' , '' , '', '' 28 sn_tmi = 'Ice_initialization' , -12 ,'tmi' , .false. , .true., 'yearly' , '' , '', ''29 sn_smi = 'Ice_initialization' , -12 ,'smi' , .false. , .true., 'yearly' , '' , '', ''30 32 sn_tms = 'NOT USED' , -12 ,'tms' , .false. , .true., 'yearly' , '' , '', '' 31 33 sn_apd = 'NOT USED' , -12 ,'apd' , .false. , .true., 'yearly' , '' , '', '' -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/iceistate.F90
r11397 r11401 40 40 ! 41 41 ! !! ** namelist (namini) ** 42 LOGICAL :: ln_iceini ! Ice initialization or not 43 LOGICAL :: ln_iceini_file ! Ice initialization from 2D netcdf file 44 REAL(wp) :: rn_thres_sst ! threshold water temperature for initial sea ice 45 REAL(wp) :: rn_hts_ini_n ! initial snow thickness in the north 46 REAL(wp) :: rn_hts_ini_s ! initial snow thickness in the south 47 REAL(wp) :: rn_hti_ini_n ! initial ice thickness in the north 48 REAL(wp) :: rn_hti_ini_s ! initial ice thickness in the south 49 REAL(wp) :: rn_ati_ini_n ! initial concentration in the north 50 REAL(wp) :: rn_ati_ini_s ! initial concentration in the south 51 REAL(wp) :: rn_smi_ini_n ! initial salinity in the north 52 REAL(wp) :: rn_smi_ini_s ! initial salinity in the south 53 REAL(wp) :: rn_tmi_ini_n ! initial ice temperature in the north 54 REAL(wp) :: rn_tmi_ini_s ! initial ice temperature in the south 55 REAL(wp) :: rn_tms_ini_n ! initial snw temperature in the north 56 REAL(wp) :: rn_tms_ini_s ! initial swn temperature in the south 57 REAL(wp) :: rn_apd_ini_n ! initial pond fraction in the north 58 REAL(wp) :: rn_apd_ini_s ! initial pond fraction in the south 59 REAL(wp) :: rn_hpd_ini_n ! initial pond depth in the north 60 REAL(wp) :: rn_hpd_ini_s ! initial pond depth in the south 61 42 LOGICAL, PUBLIC :: ln_iceini !: Ice initialization or not 43 LOGICAL, PUBLIC :: ln_iceini_file !: Ice initialization from 2D netcdf file 44 REAL(wp) :: rn_thres_sst 45 REAL(wp) :: rn_hti_ini_n, rn_hts_ini_n, rn_ati_ini_n, rn_smi_ini_n, rn_tmi_ini_n, rn_tsu_ini_n, rn_tms_ini_n 46 REAL(wp) :: rn_hti_ini_s, rn_hts_ini_s, rn_ati_ini_s, rn_smi_ini_s, rn_tmi_ini_s, rn_tsu_ini_s, rn_tms_ini_s 47 REAL(wp) :: rn_apd_ini_n, rn_hpd_ini_n 48 REAL(wp) :: rn_apd_ini_s, rn_hpd_ini_s 49 ! 62 50 ! ! if ln_iceini_file = T 63 51 INTEGER , PARAMETER :: jpfldi = 9 ! maximum number of files to read … … 65 53 INTEGER , PARAMETER :: jp_hts = 2 ! index of snw thickness (m) 66 54 INTEGER , PARAMETER :: jp_ati = 3 ! index of ice fraction (-) 67 INTEGER , PARAMETER :: jp_ tsu = 4 ! index of ice surface temp (K)55 INTEGER , PARAMETER :: jp_smi = 4 ! index of ice salinity (g/kg) 68 56 INTEGER , PARAMETER :: jp_tmi = 5 ! index of ice temperature (K) 69 INTEGER , PARAMETER :: jp_ smi = 6 ! index of ice salinity (g/kg)57 INTEGER , PARAMETER :: jp_tsu = 6 ! index of ice surface temp (K) 70 58 INTEGER , PARAMETER :: jp_tms = 7 ! index of snw temperature (K) 71 59 INTEGER , PARAMETER :: jp_apd = 8 ! index of pnd fraction (-) … … 181 169 IF( ln_iceini_file )THEN ! Read a file ! 182 170 ! !---------------! 183 CALL fld_read( kt, 1, si ) ! input fields provided at the current time-step 184 ! 171 WHERE( ff_t(:,:) >= 0._wp ) ; zswitch(:,:) = 1._wp 172 ELSEWHERE ; zswitch(:,:) = 0._wp 173 END WHERE 174 ! 175 CALL fld_read( kt, 1, si ) ! input fields provided at the current time-step 176 ! 177 ! -- mandatory fields -- ! 185 178 zht_i_ini(:,:) = si(jp_hti)%fnow(:,:,1) 186 179 zht_s_ini(:,:) = si(jp_hts)%fnow(:,:,1) 187 180 zat_i_ini(:,:) = si(jp_ati)%fnow(:,:,1) 181 182 ! -- optional fields -- ! 183 ! if fields do not exist then set them to the values present in the namelist (except for snow and surface temperature) 184 ! 185 ! ice salinity 186 IF( TRIM(si(jp_smi)%clrootname) == 'NOT USED' ) & 187 & si(jp_smi)%fnow(:,:,1) = ( rn_smi_ini_n * zswitch + rn_smi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 188 zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 189 ! 190 ! ice temperature 191 IF( TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) & 192 & si(jp_tmi)%fnow(:,:,1) = ( rn_tmi_ini_n * zswitch + rn_tmi_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 193 ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 194 ! 195 ! surface temperature => set to ice temperature if it exists 196 IF ( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 197 si(jp_tsu)%fnow(:,:,1) = ( rn_tsu_ini_n * zswitch + rn_tsu_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 198 ELSEIF( TRIM(si(jp_tsu)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 199 si(jp_tsu)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 200 ENDIF 188 201 zt_su_ini(:,:) = si(jp_tsu)%fnow(:,:,1) 189 ztm_i_ini(:,:) = si(jp_tmi)%fnow(:,:,1) 190 zsm_i_ini(:,:) = si(jp_smi)%fnow(:,:,1) 191 ! snow temperature 192 IF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' ) si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 202 ! 203 ! snow temperature => set to ice temperature if it exists 204 IF ( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) == 'NOT USED' ) THEN 205 si(jp_tms)%fnow(:,:,1) = ( rn_tms_ini_n * zswitch + rn_tms_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 206 ELSEIF( TRIM(si(jp_tms)%clrootname) == 'NOT USED' .AND. TRIM(si(jp_tmi)%clrootname) /= 'NOT USED' ) THEN 207 si(jp_tms)%fnow(:,:,1) = si(jp_tmi)%fnow(:,:,1) 208 ENDIF 193 209 ztm_s_ini(:,:) = si(jp_tms)%fnow(:,:,1) 210 ! 194 211 ! ponds 195 IF( TRIM(si(jp_apd)%clrootname) == 'NOT USED' ) si(jp_apd)%fnow(:,:,1) = 0._wp196 IF( TRIM(si(jp_hpd)%clrootname) == 'NOT USED' ) si(jp_hpd)%fnow(:,:,1) = 0._wp212 IF( TRIM(si(jp_apd)%clrootname) == 'NOT USED' ) & 213 & si(jp_apd)%fnow(:,:,1) = ( rn_apd_ini_n * zswitch + rn_apd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 197 214 zapnd_ini(:,:) = si(jp_apd)%fnow(:,:,1) 215 IF( TRIM(si(jp_hpd)%clrootname) == 'NOT USED' ) & 216 & si(jp_hpd)%fnow(:,:,1) = ( rn_hpd_ini_n * zswitch + rn_hpd_ini_s * (1._wp - zswitch) ) * tmask(:,:,1) 198 217 zhpnd_ini(:,:) = si(jp_hpd)%fnow(:,:,1) 199 218 ! 200 WHERE( zat_i_ini(:,:) > 0._wp ) ; zswitch(:,:) = tmask(:,:,1) 201 ELSEWHERE ; zswitch(:,:) = 0._wp 219 ! change the switch for the following 220 WHERE( zat_i_ini(:,:) > 0._wp ) ; zswitch(:,:) = tmask(:,:,1) 221 ELSEWHERE ; zswitch(:,:) = 0._wp 202 222 END WHERE 203 223 ! !---------------! … … 214 234 zht_s_ini(:,:) = rn_hts_ini_n * zswitch(:,:) 215 235 zat_i_ini(:,:) = rn_ati_ini_n * zswitch(:,:) 216 zt_su_ini(:,:) = rn_tmi_ini_n * zswitch(:,:)217 236 zsm_i_ini(:,:) = rn_smi_ini_n * zswitch(:,:) 218 237 ztm_i_ini(:,:) = rn_tmi_ini_n * zswitch(:,:) 238 zt_su_ini(:,:) = rn_tsu_ini_n * zswitch(:,:) 219 239 ztm_s_ini(:,:) = rn_tms_ini_n * zswitch(:,:) 220 240 zapnd_ini(:,:) = rn_apd_ini_n * zswitch(:,:) … … 224 244 zht_s_ini(:,:) = rn_hts_ini_s * zswitch(:,:) 225 245 zat_i_ini(:,:) = rn_ati_ini_s * zswitch(:,:) 226 zt_su_ini(:,:) = rn_tmi_ini_s * zswitch(:,:)227 246 zsm_i_ini(:,:) = rn_smi_ini_s * zswitch(:,:) 228 247 ztm_i_ini(:,:) = rn_tmi_ini_s * zswitch(:,:) 248 zt_su_ini(:,:) = rn_tsu_ini_s * zswitch(:,:) 229 249 ztm_s_ini(:,:) = rn_tms_ini_s * zswitch(:,:) 230 250 zapnd_ini(:,:) = rn_apd_ini_s * zswitch(:,:) … … 296 316 DO jj = 1, jpj 297 317 DO ji = 1, jpi 298 v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl) ! ice volume299 v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl) ! snow volume318 v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl) 319 v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl) 300 320 sv_i(ji,jj,jl) = MIN( MAX( rn_simin , s_i(ji,jj,jl) ) , rn_simax ) * v_i(ji,jj,jl) 301 321 END DO … … 320 340 DO ji = 1, jpi 321 341 t_i (ji,jj,jk,jl) = zti_3d(ji,jj,jl) 322 ztmelts = - rTmlt * sz_i(ji,jj,jk,jl) + rt0 ! Melting temperature in K342 ztmelts = - rTmlt * sz_i(ji,jj,jk,jl) + rt0 ! melting temperature in K 323 343 e_i(ji,jj,jk,jl) = zswitch(ji,jj) * v_i(ji,jj,jl) * r1_nlay_i * & 324 344 & rhoi * ( rcpi * ( ztmelts - t_i(ji,jj,jk,jl) ) + & … … 429 449 ! 430 450 CHARACTER(len=256) :: cn_dir ! Root directory for location of ice files 431 TYPE(FLD_N) :: sn_hti, sn_hts, sn_ati, sn_ tsu, sn_tmi, sn_smi, sn_tms, sn_apd, sn_hpd451 TYPE(FLD_N) :: sn_hti, sn_hts, sn_ati, sn_smi, sn_tmi, sn_tsu, sn_tms, sn_apd, sn_hpd 432 452 TYPE(FLD_N), DIMENSION(jpfldi) :: slf_i ! array of namelist informations on the fields to read 433 453 ! 434 454 NAMELIST/namini/ ln_iceini, ln_iceini_file, rn_thres_sst, & 435 & rn_ht s_ini_n, rn_hts_ini_s, rn_hti_ini_n, rn_hti_ini_s, &455 & rn_hti_ini_n, rn_hti_ini_s, rn_hts_ini_n, rn_hts_ini_s, & 436 456 & rn_ati_ini_n, rn_ati_ini_s, rn_smi_ini_n, rn_smi_ini_s, & 437 & rn_tmi_ini_n, rn_tmi_ini_s, rn_t ms_ini_n, rn_tms_ini_s, &457 & rn_tmi_ini_n, rn_tmi_ini_s, rn_tsu_ini_n, rn_tsu_ini_s, rn_tms_ini_n, rn_tms_ini_s, & 438 458 & rn_apd_ini_n, rn_apd_ini_s, rn_hpd_ini_n, rn_hpd_ini_s, & 439 459 & sn_hti, sn_hts, sn_ati, sn_tsu, sn_tmi, sn_smi, sn_tms, sn_apd, sn_hpd, cn_dir … … 449 469 ! 450 470 slf_i(jp_hti) = sn_hti ; slf_i(jp_hts) = sn_hts 451 slf_i(jp_ati) = sn_ati ; slf_i(jp_tsu) = sn_tsu 452 slf_i(jp_tmi) = sn_tmi ; slf_i(jp_smi) = sn_smi 453 slf_i(jp_tms) = sn_tms ; 471 slf_i(jp_ati) = sn_ati ; slf_i(jp_smi) = sn_smi 472 slf_i(jp_tmi) = sn_tmi ; slf_i(jp_tsu) = sn_tsu ; slf_i(jp_tms) = sn_tms 454 473 slf_i(jp_apd) = sn_apd ; slf_i(jp_hpd) = sn_hpd 455 474 ! … … 459 478 WRITE(numout,*) '~~~~~~~~~~~~~~~' 460 479 WRITE(numout,*) ' Namelist namini:' 461 WRITE(numout,*) ' ice initialization (T) or not (F) ln_iceini = ', ln_iceini 462 WRITE(numout,*) ' ice initialization from a netcdf file ln_iceini_file = ', ln_iceini_file 463 WRITE(numout,*) ' max delta ocean temp. above Tfreeze with initial ice rn_thres_sst = ', rn_thres_sst 464 WRITE(numout,*) ' initial snw thickness in the north rn_hts_ini_n = ', rn_hts_ini_n 465 WRITE(numout,*) ' initial snw thickness in the south rn_hts_ini_s = ', rn_hts_ini_s 466 WRITE(numout,*) ' initial ice thickness in the north rn_hti_ini_n = ', rn_hti_ini_n 467 WRITE(numout,*) ' initial ice thickness in the south rn_hti_ini_s = ', rn_hti_ini_s 468 WRITE(numout,*) ' initial ice concentr in the north rn_ati_ini_n = ', rn_ati_ini_n 469 WRITE(numout,*) ' initial ice concentr in the north rn_ati_ini_s = ', rn_ati_ini_s 470 WRITE(numout,*) ' initial ice salinity in the north rn_smi_ini_n = ', rn_smi_ini_n 471 WRITE(numout,*) ' initial ice salinity in the south rn_smi_ini_s = ', rn_smi_ini_s 472 WRITE(numout,*) ' initial ice temperat in the north rn_tmi_ini_n = ', rn_tmi_ini_n 473 WRITE(numout,*) ' initial ice temperat in the south rn_tmi_ini_s = ', rn_tmi_ini_s 474 WRITE(numout,*) ' initial snw temperat in the north rn_tms_ini_n = ', rn_tms_ini_n 475 WRITE(numout,*) ' initial snw temperat in the south rn_tms_ini_s = ', rn_tms_ini_s 476 WRITE(numout,*) ' initial pnd fraction in the north rn_apd_ini_n = ', rn_apd_ini_n 477 WRITE(numout,*) ' initial pnd fraction in the south rn_apd_ini_s = ', rn_apd_ini_s 478 WRITE(numout,*) ' initial pnd depth in the north rn_hpd_ini_n = ', rn_hpd_ini_n 479 WRITE(numout,*) ' initial pnd depth in the south rn_hpd_ini_s = ', rn_hpd_ini_s 480 WRITE(numout,*) ' ice initialization (T) or not (F) ln_iceini = ', ln_iceini 481 WRITE(numout,*) ' ice initialization from a netcdf file ln_iceini_file = ', ln_iceini_file 482 WRITE(numout,*) ' max ocean temp. above Tfreeze with initial ice rn_thres_sst = ', rn_thres_sst 483 WRITE(numout,*) ' initial snw thickness in the north-south rn_hts_ini = ', rn_hts_ini_n,rn_hts_ini_s 484 WRITE(numout,*) ' initial ice thickness in the north-south rn_hti_ini = ', rn_hti_ini_n,rn_hti_ini_s 485 WRITE(numout,*) ' initial ice concentr in the north-south rn_ati_ini = ', rn_ati_ini_n,rn_ati_ini_s 486 WRITE(numout,*) ' initial ice salinity in the north-south rn_smi_ini = ', rn_smi_ini_n,rn_smi_ini_s 487 WRITE(numout,*) ' initial surf temperat in the north-south rn_tsu_ini = ', rn_tsu_ini_n,rn_tsu_ini_s 488 WRITE(numout,*) ' initial ice temperat in the north-south rn_tmi_ini = ', rn_tmi_ini_n,rn_tmi_ini_s 489 WRITE(numout,*) ' initial snw temperat in the north-south rn_tms_ini = ', rn_tms_ini_n,rn_tms_ini_s 490 WRITE(numout,*) ' initial pnd fraction in the north-south rn_apd_ini = ', rn_apd_ini_n,rn_apd_ini_s 491 WRITE(numout,*) ' initial pnd depth in the north-south rn_hpd_ini = ', rn_hpd_ini_n,rn_hpd_ini_s 480 492 ENDIF 481 493 ! -
NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/ICE/icerst.F90
r11385 r11401 14 14 !! ice_rst_read : read restart file 15 15 !!---------------------------------------------------------------------- 16 USE ice ! sea-ice variables16 USE ice ! sea-ice: variables 17 17 USE dom_oce ! ocean domain 18 18 USE sbc_oce , ONLY : nn_fsbc, ln_cpl 19 USE icectl 19 USE iceistate ! sea-ice: initial state 20 USE icectl ! sea-ice: control 20 21 ! 21 22 USE in_out_manager ! I/O manager … … 120 121 121 122 ! Prognostic variables 122 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i)123 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s)124 CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i)125 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i)126 CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su)127 ! ice age128 CALL iom_rstput( iter, nitrst, numriw, ' oa_i', oa_i)129 ! Melt ponds130 CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip)131 CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip)123 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i ) 124 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s ) 125 CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i ) 126 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i ) 127 CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su ) 128 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice ) 129 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice ) 130 CALL iom_rstput( iter, nitrst, numriw, 'oa_i' , oa_i ) 131 CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip ) 132 CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip ) 132 133 ! Snow enthalpy 133 134 DO jk = 1, nlay_s … … 144 145 CALL iom_rstput( iter, nitrst, numriw, znam , z3d ) 145 146 END DO 146 ! ice velocity147 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice )148 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice )149 147 ! fields needed for Met Office (Jules) coupling 150 148 IF( ln_cpl ) THEN … … 172 170 INTEGER :: jk 173 171 LOGICAL :: llok 174 INTEGER :: id 1, id2! local integer172 INTEGER :: id0, id1, id2, id3, id4 ! local integer 175 173 CHARACTER(len=25) :: znam 176 174 CHARACTER(len=2) :: zchar, zchar1 … … 187 185 CALL iom_open ( TRIM(cn_icerst_indir)//'/'//cn_icerst_in, numrir, kdlev = jpl ) 188 186 189 CALL iom_get( numrir, 'nn_fsbc', zfice ) 190 CALL iom_get( numrir, 'kt_ice' , ziter ) 191 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 192 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 193 194 ! Control of date 195 IF( ( nit000 - NINT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 ) & 196 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nit000 in ice restart', & 197 & ' verify the file or rerun with the value 0 for the', & 198 & ' control of time parameter nrstdt' ) 199 IF( NINT(zfice) /= nn_fsbc .AND. ABS( nrstdt ) == 1 ) & 200 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart', & 201 & ' verify the file or rerun with the value 0 for the', & 202 & ' control of time parameter nrstdt' ) 203 204 ! Prognostic variables 205 CALL iom_get( numrir, jpdom_autoglo, 'v_i' , v_i ) 206 CALL iom_get( numrir, jpdom_autoglo, 'v_s' , v_s ) 207 CALL iom_get( numrir, jpdom_autoglo, 'sv_i', sv_i ) 208 CALL iom_get( numrir, jpdom_autoglo, 'a_i' , a_i ) 209 CALL iom_get( numrir, jpdom_autoglo, 't_su', t_su ) 210 ! ice age 211 id1 = iom_varid( numrir, 'oa_i' , ldstop = .FALSE. ) 212 IF( id1 > 0 ) THEN ! fields exist 213 CALL iom_get( numrir, jpdom_autoglo, 'oa_i', oa_i ) 214 ELSE ! start from rest 215 IF(lwp) WRITE(numout,*) ' ==>> previous run without ice age output then set it to zero' 216 oa_i(:,:,:) = 0._wp 217 ENDIF 218 ! Melt ponds 219 id2 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 220 IF( id2 > 0 ) THEN ! fields exist 221 CALL iom_get( numrir, jpdom_autoglo, 'a_ip' , a_ip ) 222 CALL iom_get( numrir, jpdom_autoglo, 'v_ip' , v_ip ) 223 ELSE ! start from rest 224 IF(lwp) WRITE(numout,*) ' ==>> previous run without melt ponds output then set it to zero' 225 a_ip(:,:,:) = 0._wp 226 v_ip(:,:,:) = 0._wp 227 ENDIF 228 ! Snow enthalpy 229 DO jk = 1, nlay_s 230 WRITE(zchar1,'(I2.2)') jk 231 znam = 'e_s'//'_l'//zchar1 232 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 233 e_s(:,:,jk,:) = z3d(:,:,:) 234 END DO 235 ! Ice enthalpy 236 DO jk = 1, nlay_i 237 WRITE(zchar1,'(I2.2)') jk 238 znam = 'e_i'//'_l'//zchar1 239 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 240 e_i(:,:,jk,:) = z3d(:,:,:) 241 END DO 242 ! ice velocity 243 CALL iom_get( numrir, jpdom_autoglo, 'u_ice', u_ice ) 244 CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 245 246 CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables 247 248 ! fields needed for Met Office (Jules) coupling 249 IF( ln_cpl ) THEN 250 CALL iom_get( numrir, jpdom_autoglo, 'cnd_ice', cnd_ice ) 251 CALL iom_get( numrir, jpdom_autoglo, 't1_ice' , t1_ice ) 187 ! test if v_i exists 188 id0 = iom_varid( numrir, 'v_i' , ldstop = .FALSE. ) 189 190 ! ! ------------------------------ ! 191 IF( id0 > 0 ) THEN ! == case of a normal restart == ! 192 ! ! ------------------------------ ! 193 194 ! Time info 195 CALL iom_get( numrir, 'nn_fsbc', zfice ) 196 CALL iom_get( numrir, 'kt_ice' , ziter ) 197 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 198 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 199 200 ! Control of date 201 IF( ( nit000 - NINT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 ) & 202 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nit000 in ice restart', & 203 & ' verify the file or rerun with the value 0 for the', & 204 & ' control of time parameter nrstdt' ) 205 IF( NINT(zfice) /= nn_fsbc .AND. ABS( nrstdt ) == 1 ) & 206 & CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart', & 207 & ' verify the file or rerun with the value 0 for the', & 208 & ' control of time parameter nrstdt' ) 209 210 ! --- mandatory fields --- ! 211 CALL iom_get( numrir, jpdom_autoglo, 'v_i' , v_i ) 212 CALL iom_get( numrir, jpdom_autoglo, 'v_s' , v_s ) 213 CALL iom_get( numrir, jpdom_autoglo, 'sv_i' , sv_i ) 214 CALL iom_get( numrir, jpdom_autoglo, 'a_i' , a_i ) 215 CALL iom_get( numrir, jpdom_autoglo, 't_su' , t_su ) 216 CALL iom_get( numrir, jpdom_autoglo, 'u_ice', u_ice ) 217 CALL iom_get( numrir, jpdom_autoglo, 'v_ice', v_ice ) 218 ! Snow enthalpy 219 DO jk = 1, nlay_s 220 WRITE(zchar1,'(I2.2)') jk 221 znam = 'e_s'//'_l'//zchar1 222 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 223 e_s(:,:,jk,:) = z3d(:,:,:) 224 END DO 225 ! Ice enthalpy 226 DO jk = 1, nlay_i 227 WRITE(zchar1,'(I2.2)') jk 228 znam = 'e_i'//'_l'//zchar1 229 CALL iom_get( numrir, jpdom_autoglo, znam , z3d ) 230 e_i(:,:,jk,:) = z3d(:,:,:) 231 END DO 232 ! -- optional fields -- ! 233 ! ice age 234 id1 = iom_varid( numrir, 'oa_i' , ldstop = .FALSE. ) 235 IF( id1 > 0 ) THEN ! fields exist 236 CALL iom_get( numrir, jpdom_autoglo, 'oa_i', oa_i ) 237 ELSE ! start from rest 238 IF(lwp) WRITE(numout,*) ' ==>> previous run without ice age output then set it to zero' 239 oa_i(:,:,:) = 0._wp 240 ENDIF 241 ! melt ponds 242 id2 = iom_varid( numrir, 'a_ip' , ldstop = .FALSE. ) 243 IF( id2 > 0 ) THEN ! fields exist 244 CALL iom_get( numrir, jpdom_autoglo, 'a_ip' , a_ip ) 245 CALL iom_get( numrir, jpdom_autoglo, 'v_ip' , v_ip ) 246 ELSE ! start from rest 247 IF(lwp) WRITE(numout,*) ' ==>> previous run without melt ponds output then set it to zero' 248 a_ip(:,:,:) = 0._wp 249 v_ip(:,:,:) = 0._wp 250 ENDIF 251 ! fields needed for Met Office (Jules) coupling 252 IF( ln_cpl ) THEN 253 id3 = iom_varid( numrir, 'cnd_ice' , ldstop = .FALSE. ) 254 id4 = iom_varid( numrir, 't1_ice' , ldstop = .FALSE. ) 255 IF( id3 > 0 .AND. id4 > 0 ) THEN ! fields exist 256 CALL iom_get( numrir, jpdom_autoglo, 'cnd_ice', cnd_ice ) 257 CALL iom_get( numrir, jpdom_autoglo, 't1_ice' , t1_ice ) 258 ELSE ! start from rest 259 IF(lwp) WRITE(numout,*) ' ==>> previous run without conductivity output then set it to zero' 260 cnd_ice(:,:,:) = 0._wp 261 t1_ice (:,:,:) = rt0 262 ENDIF 263 ENDIF 264 265 CALL iom_delay_rst( 'READ', 'ICE', numrir ) ! read only ice delayed global communication variables 266 267 ! ! ---------------------------------- ! 268 ELSE ! == case of a simplified restart == ! 269 ! ! ---------------------------------- ! 270 CALL ctl_warn('ice_rst_read: you are using a simplified ice restart') 271 ! 272 CALL ice_istate_init 273 CALL ice_istate( nit000 ) 274 ! 275 IF( .NOT.ln_iceini .OR. .NOT.ln_iceini_file ) & 276 & CALL ctl_stop('STOP', 'ice_rst_read: you need ln_ice_ini=T and ln_iceini_file=T') 277 ! 252 278 ENDIF 253 279
Note: See TracChangeset
for help on using the changeset viewer.