103 CHARACTER(LEN=3) :: donst
104 INTEGER :: idim, jdim, lsm, lsoil, lugb, iy, im, id, ih, ialb
105 INTEGER :: isot, ivegsrc, lensfc, zsea1_mm, zsea2_mm, ierr
106 INTEGER :: nprocs, myrank, num_threads,
num_parthds, max_tasks
107 REAL :: fh, deltsfc, zsea1, zsea2
108 LOGICAL :: use_ufo, do_nsst, do_lndinc, do_sfccycle
110 namelist/namcyc/ idim,jdim,lsm,lsoil,lugb,iy,im,id,ih,fh,&
111 deltsfc,ialb,use_ufo,donst, &
112 do_sfccycle,isot,ivegsrc,zsea1_mm, &
113 zsea2_mm, max_tasks, do_lndinc
115 DATA idim,jdim,lsm,lsoil/96,96,1,4/
116 DATA iy,im,id,ih,fh/1997,8,2,0,0./
117 DATA lugb/51/, deltsfc/0.0/, ialb/1/, max_tasks/99999/
118 DATA isot/1/, ivegsrc/2/, zsea1_mm/0/, zsea2_mm/0/
121 CALL mpi_comm_size(mpi_comm_world, nprocs, ierr)
122 CALL mpi_comm_rank(mpi_comm_world, myrank, ierr)
124 if (myrank==0) call w3tagb(
'GLOBAL_CYCLE',2018,0179,0055,
'NP20')
129 print*,
"STARTING CYCLE PROGRAM ON RANK ", myrank
130 print*,
"RUNNING WITH ", nprocs,
"TASKS"
131 print*,
"AND WITH ", num_threads,
" THREADS."
139 print*,
"READ NAMCYC NAMELIST."
141 CALL baopenr(36,
"fort.36", ierr)
143 IF (myrank==0)
WRITE(6,namcyc)
145 IF (max_tasks < 99999 .AND. myrank > (max_tasks - 1))
THEN
146 print*,
"USER SPECIFIED MAX NUMBER OF TASKS: ", max_tasks
147 print*,
"WILL NOT RUN CYCLE PROGRAM ON RANK: ", myrank
153 zsea1 = float(zsea1_mm) / 1000.0
154 zsea2 = float(zsea2_mm) / 1000.0
156 IF (donst ==
"YES")
THEN
163 IF (myrank==0) print*,
"LUGB,IDIM,JDIM,LSM,ISOT,IVEGSRC,LSOIL,DELTSFC,IY,IM,ID,IH,FH: ", &
164 lugb,idim,jdim,lsm,isot,ivegsrc,lsoil,deltsfc,iy,im,id,ih,fh
166 CALL
sfcdrv(lugb,idim,jdim,lsm,lensfc,lsoil,deltsfc, &
167 iy,im,id,ih,fh,ialb, &
168 use_ufo,do_nsst,do_sfccycle,do_lndinc, &
169 zsea1,zsea2,isot,ivegsrc,myrank)
172 print*,
'CYCLE PROGRAM COMPLETED NORMALLY ON RANK: ', myrank
176 CALL mpi_barrier(mpi_comm_world, ierr)
178 if (myrank==0) call w3tage(
'GLOBAL_CYCLE')
180 CALL mpi_finalize(ierr)
295 SUBROUTINE sfcdrv(LUGB, IDIM,JDIM,LSM,LENSFC,LSOIL,DELTSFC, &
296 iy,im,id,ih,fh,ialb, &
297 use_ufo,do_nsst,do_sfccycle,do_lndinc,&
298 zsea1,zsea2,isot,ivegsrc,myrank)
308 INTEGER,
INTENT(IN) :: idim, jdim, lsm,lensfc, lsoil, ialb
309 INTEGER,
INTENT(IN) :: lugb, iy, im, id, ih
310 INTEGER,
INTENT(IN) :: isot, ivegsrc, myrank
312 LOGICAL,
INTENT(IN) :: use_ufo, do_nsst,do_sfccycle
313 LOGICAL,
INTENT(IN) :: do_lndinc
315 REAL,
INTENT(IN) :: fh, deltsfc, zsea1, zsea2
317 INTEGER,
PARAMETER :: nlunit=35
318 INTEGER,
PARAMETER :: sz_nml=1
320 CHARACTER(LEN=5) :: tile_num
321 CHARACTER(LEN=500) :: nst_file
322 CHARACTER(LEN=500) :: lnd_soi_file
323 CHARACTER(LEN=4) :: input_nml_file(sz_nml)
326 INTEGER :: i_index(lensfc), j_index(lensfc)
327 INTEGER :: idum(idim,jdim)
329 REAL :: slmask(lensfc), orog(lensfc)
330 REAL :: sihfcs(lensfc), sicfcs(lensfc)
331 REAL :: sitfcs(lensfc), tsffcs(lensfc)
332 REAL :: snofcs(lensfc), zorfcs(lensfc)
333 REAL :: albfcs(lensfc,4), tg3fcs(lensfc)
334 REAL :: cnpfcs(lensfc), smcfcs(lensfc,lsoil)
335 REAL :: stcfcs(lensfc,lsoil), slifcs(lensfc)
336 REAL :: aisfcs(lensfc), f10m(lensfc)
337 REAL :: vegfcs(lensfc), vetfcs(lensfc)
338 REAL :: sotfcs(lensfc), alffcs(lensfc,2)
339 REAL :: cvfcs(lensfc), cvtfcs(lensfc)
340 REAL :: cvbfcs(lensfc), tprcp(lensfc)
341 REAL :: srflag(lensfc), swdfcs(lensfc)
342 REAL :: slcfcs(lensfc,lsoil), vmxfcs(lensfc)
343 REAL :: vmnfcs(lensfc), t2m(lensfc)
344 REAL :: q2m(lensfc), slpfcs(lensfc)
345 REAL :: absfcs(lensfc), orog_uf(lensfc)
346 REAL :: ustar(lensfc)
347 REAL :: fmm(lensfc), fhh(lensfc)
348 REAL :: rla(lensfc), rlo(lensfc)
349 REAL(KIND=4) :: zsoil(lsoil)
350 REAL :: sig1t(lensfc)
353 REAL,
ALLOCATABLE :: stc_bck(:,:), smc_bck(:,:), slc_bck(:,:)
354 REAL,
ALLOCATABLE :: slifcs_fg(:)
355 INTEGER,
ALLOCATABLE :: soilsnow_fg_mask(:), soilsnow_mask(:)
358 real,
dimension(idim,jdim) :: tf_clm,tf_trd,sal_clm
359 real,
dimension(lensfc) :: tf_clm_tile,tf_trd_tile,sal_clm_tile
361 logical :: file_exists
367 DATA nst_file/
'NULL'/
368 DATA lnd_soi_file/
'NULL'/
370 namelist/namsfcd/ nst_file, lnd_soi_file
374 input_nml_file =
"NULL"
376 CALL baopenr(37,
"fort.37", ierr)
377 READ (37, nml=namsfcd)
381 print*,
'IN ROUTINE SFCDRV,IDIM=',idim,
'JDIM=',jdim,
'FH=',fh
393 i_index = reshape(idum, (/lensfc/))
399 j_index = reshape(idum, (/lensfc/) )
403 print*,
"WILL PROCESS NSST RECORDS."
404 ALLOCATE(nsst%C_0(lensfc))
405 ALLOCATE(nsst%C_D(lensfc))
406 ALLOCATE(nsst%D_CONV(lensfc))
407 ALLOCATE(nsst%DT_COOL(lensfc))
408 ALLOCATE(nsst%IFD(lensfc))
409 ALLOCATE(nsst%QRAIN(lensfc))
410 ALLOCATE(nsst%TREF(lensfc))
411 ALLOCATE(nsst%TFINC(lensfc))
412 ALLOCATE(nsst%W_0(lensfc))
413 ALLOCATE(nsst%W_D(lensfc))
414 ALLOCATE(nsst%XS(lensfc))
415 ALLOCATE(nsst%XT(lensfc))
416 ALLOCATE(nsst%XTTS(lensfc))
417 ALLOCATE(nsst%XU(lensfc))
418 ALLOCATE(nsst%XV(lensfc))
419 ALLOCATE(nsst%XZ(lensfc))
420 ALLOCATE(nsst%XZTS(lensfc))
421 ALLOCATE(nsst%Z_C(lensfc))
422 ALLOCATE(nsst%ZM(lensfc))
423 ALLOCATE(slifcs_fg(lensfc))
429 print*,
" APPLYING LAND INCREMENTS FROM THE GSI"
430 ALLOCATE(soilsnow_fg_mask(lensfc))
431 ALLOCATE(soilsnow_mask(lensfc))
432 ALLOCATE(stc_bck(lensfc, lsoil), smc_bck(lensfc, lsoil), slc_bck(lensfc,lsoil))
439 CALL
read_data(tsffcs,smcfcs,snofcs,stcfcs,tg3fcs,zorfcs, &
440 cvfcs,cvbfcs,cvtfcs,albfcs,slifcs, &
441 vegfcs,cnpfcs,f10m,vetfcs,sotfcs, &
442 alffcs,ustar,fmm,fhh,sihfcs,sicfcs, &
443 sitfcs,tprcp,srflag,swdfcs,vmnfcs, &
444 vmxfcs,slcfcs,slpfcs,absfcs,t2m,q2m, &
445 slmask,zsoil,lsoil,lensfc,do_nsst,nsst)
449 print*,
'USE UNFILTERED OROGRAPHY.'
456 IF(nint(slifcs(i)).EQ.2) aisfcs(i) = 1.
460 IF (.NOT. do_sfccycle )
THEN
462 print*,
"FIRST GUESS MASK ADJUSTED BY IFD RECORD"
464 WHERE(nint(nsst%IFD) == 3) slifcs_fg = 2.0
467 print*,
"SAVE FIRST GUESS MASK"
480 IF (do_sfccycle)
THEN
482 print*,
"CALL SFCCYCLE TO UPDATE SURFACE FIELDS."
483 CALL
sfccycle(lugb,lensfc,lsoil,sig1t,deltsfc, &
484 iy,im,id,ih,fh,rla,rlo, &
485 slmask,orog, orog_uf, use_ufo, do_nsst, &
486 sihfcs,sicfcs,sitfcs,swdfcs,slcfcs, &
487 vmnfcs,vmxfcs,slpfcs,absfcs, &
488 tsffcs,snofcs,zorfcs,albfcs,tg3fcs, &
489 cnpfcs,smcfcs,stcfcs,slifcs,aisfcs, &
490 vegfcs,vetfcs,sotfcs,alffcs, &
491 cvfcs,cvbfcs,cvtfcs,myrank,nlunit, &
492 sz_nml, input_nml_file, &
493 ialb,isot,ivegsrc,tile_num,i_index,j_index)
503 IF (nst_file ==
"NULL")
THEN
505 print*,
"NO GSI FILE. ADJUST IFD FOR FORMER ICE POINTS."
507 IF (nint(slifcs_fg(i)) == 2 .AND. nint(slifcs(i)) == 0)
THEN
514 print*,
"ADJUST TREF FROM GSI INCREMENT"
518 call
get_tf_clm(rla,rlo,jdim,idim,iy,im,id,ih,tf_clm,tf_trd)
519 tf_clm_tile(:) = reshape(tf_clm, (/lensfc/) )
520 tf_trd_tile(:) = reshape(tf_trd, (/lensfc/) )
524 call
get_sal_clm(rla,rlo,jdim,idim,iy,im,id,ih,sal_clm)
525 sal_clm_tile(:) = reshape(sal_clm, (/lensfc/) )
533 CALL
adjust_nsst(rla,rlo,slifcs,slifcs_fg,tsffcs,sitfcs,sicfcs,stcfcs, &
534 nsst,lensfc,lsoil,idim,jdim,zsea1,zsea2,im,id,deltsfc, &
535 tf_clm_tile,tf_trd_tile,sal_clm_tile)
549 IF (do_sfccycle)
THEN
552 soilsnow_mask = soilsnow_fg_mask
559 INQUIRE(file=trim(lnd_soi_file), exist=file_exists)
560 IF (.not. file_exists)
then
561 print *,
'FATAL ERROR: land increment update requested, but file does not exist: ', &
563 call mpi_abort(mpi_comm_world, 10, ierr)
583 lensfc,lsoil,idim,jdim, myrank)
590 sotfcs,smc_bck, slc_bck,stc_bck, smcfcs, slcfcs,stcfcs)
597 DEALLOCATE(soilsnow_fg_mask, soilsnow_mask)
598 DEALLOCATE(stc_bck, smc_bck, slc_bck)
605 CALL
write_data(slifcs,tsffcs,snofcs,tg3fcs,zorfcs, &
606 albfcs,alffcs,vegfcs,cnpfcs,f10m, &
607 t2m,q2m,vetfcs,sotfcs,ustar,fmm,fhh, &
608 sicfcs,sihfcs,sitfcs, &
609 tprcp,srflag,swdfcs, &
610 vmnfcs,vmxfcs,slpfcs,absfcs, &
611 slcfcs,smcfcs,stcfcs, &
612 idim,jdim,lensfc,lsoil,do_nsst,nsst)
617 DEALLOCATE(nsst%D_CONV)
618 DEALLOCATE(nsst%DT_COOL)
620 DEALLOCATE(nsst%QRAIN)
621 DEALLOCATE(nsst%TREF)
622 DEALLOCATE(nsst%TFINC)
627 DEALLOCATE(nsst%XTTS)
631 DEALLOCATE(nsst%XZTS)
634 DEALLOCATE(slifcs_fg)
672 SUBROUTINE adjust_nsst(RLA,RLO,SLMSK_TILE,SLMSK_FG_TILE,SKINT_TILE,&
673 sicet_tile,sice_tile,soilt_tile,nsst,lensfc,lsoil, &
674 idim,jdim,zsea1,zsea2,mon,day,deltsfc, &
675 tf_clm_tile,tf_trd_tile,sal_clm_tile)
680 slmsk_gaus, dtref_gaus, &
687 INTEGER,
INTENT(IN) :: lensfc, lsoil, idim, jdim, mon, day
689 REAL,
INTENT(IN) :: slmsk_tile(lensfc), slmsk_fg_tile(lensfc)
690 real,
intent(in) :: tf_clm_tile(lensfc),tf_trd_tile(lensfc),sal_clm_tile(lensfc)
691 REAL,
INTENT(IN) :: zsea1, zsea2, deltsfc
692 REAL,
INTENT(INOUT) :: rla(lensfc), rlo(lensfc), skint_tile(lensfc)
693 REAL,
INTENT(INOUT) :: sicet_tile(lensfc),sice_tile(lensfc),soilt_tile(lensfc,lsoil)
697 REAL,
PARAMETER :: tmax=313.0,tzero=273.16
699 INTEGER :: iopt, nret, kgds_gaus(200)
700 INTEGER :: igaus, jgaus, ij, ii, jj, iii, jjj, krad
701 INTEGER :: istart, iend, jstart, jend
702 INTEGER :: mask_tile, mask_fg_tile
703 INTEGER :: itile, jtile
704 INTEGER :: max_search, j, ierr
705 INTEGER :: igausp1, jgausp1
706 integer :: nintp,nsearched,nice,nland
707 integer :: nfill,nfill_tice,nfill_clm
708 integer :: nset_thaw,nset_thaw_s,nset_thaw_i,nset_thaw_c
710 INTEGER,
ALLOCATABLE :: id1(:,:), id2(:,:), jdc(:,:)
715 REAL :: tref_save,wsum,tf_ice,tf_thaw
716 REAL :: fill, dtzm, gaus_res_km, dtref
717 REAL,
ALLOCATABLE :: xpts(:), ypts(:), lats(:), lons(:)
718 REAL,
ALLOCATABLE :: dum2d(:,:), lats_rad(:), lons_rad(:)
719 REAL,
ALLOCATABLE :: agrid(:,:,:), s2c(:,:,:)
723 kgds_gaus(2) = idim_gaus
724 kgds_gaus(3) = jdim_gaus
728 kgds_gaus(7) = -90000
729 kgds_gaus(8) = nint(-360000./float(idim_gaus))
730 kgds_gaus(9) = nint((360.0 / float(idim_gaus))*1000.0)
732 kgds_gaus(10) = jdim_gaus/2
737 print*,
'ADJUST NSST USING GSI INCREMENTS ON GAUSSIAN GRID'
745 ALLOCATE(xpts(idim_gaus*jdim_gaus))
746 ALLOCATE(ypts(idim_gaus*jdim_gaus))
747 ALLOCATE(lats(idim_gaus*jdim_gaus))
748 ALLOCATE(lons(idim_gaus*jdim_gaus))
754 CALL gdswzd(kgds_gaus,iopt,(idim_gaus*jdim_gaus),fill,xpts,ypts,lons,lats,nret)
756 IF (nret /= (idim_gaus*jdim_gaus))
THEN
757 print*,
'FATAL ERROR: PROBLEM IN GDSWZD. STOP.'
758 CALL mpi_abort(mpi_comm_world, 12, ierr)
761 DEALLOCATE (xpts, ypts)
763 ALLOCATE(dum2d(idim_gaus,jdim_gaus))
764 dum2d = reshape(lats, (/idim_gaus,jdim_gaus/) )
767 ALLOCATE(lats_rad(jdim_gaus))
769 lats_rad(j) = dum2d(1,jdim_gaus-j+1) * 3.1415926 / 180.0
772 dum2d = reshape(lons, (/idim_gaus,jdim_gaus/) )
774 ALLOCATE(lons_rad(idim_gaus))
775 lons_rad = dum2d(:,1) * 3.1415926 / 180.0
779 ALLOCATE(agrid(idim,jdim,2))
780 agrid(:,:,1) = reshape(rlo, (/idim,jdim/) )
781 agrid(:,:,2) = reshape(rla, (/idim,jdim/) )
782 agrid = agrid * 3.1415926 / 180.0
784 ALLOCATE(id1(idim,jdim))
785 ALLOCATE(id2(idim,jdim))
786 ALLOCATE(jdc(idim,jdim))
787 ALLOCATE(s2c(idim,jdim,4))
795 CALL
remap_coef( 1, idim, 1, jdim, idim_gaus, jdim_gaus, &
796 lons_rad, lats_rad, id1, id2, jdc, s2c, agrid )
798 DEALLOCATE(lons_rad, lats_rad, agrid)
805 gaus_res_km = 360.0 / idim_gaus * 111.0
806 max_search = ceiling(500.0/gaus_res_km)
809 print*,
'MAXIMUM SEARCH IS ',max_search,
' GAUSSIAN POINTS.'
832 ij_loop :
DO ij = 1, lensfc
834 mask_tile = nint(slmsk_tile(ij))
835 mask_fg_tile = nint(slmsk_fg_tile(ij))
840 tf_ice =
tfreez(sal_clm_tile(ij)) + tzero
845 IF (mask_tile == 1)
THEN
853 if (mask_tile == 2)
then
855 skint_tile(ij)=(1.0-sice_tile(ij))*nsst%tref(ij)+sice_tile(ij)*sicet_tile(ij)
863 jtile = (ij-1) / idim + 1
865 IF (itile==0) itile = idim
873 IF (mask_fg_tile == 2 .AND. mask_tile == 0)
THEN
877 call
tf_thaw_set(nsst%tref,nint(slmsk_fg_tile),itile,jtile,tf_ice,tf_clm_tile(ij),tf_thaw,idim,jdim, &
878 nset_thaw_s,nset_thaw_i,nset_thaw_c)
880 nset_thaw = nset_thaw + 1
896 igaus = id1(itile,jtile)
897 jgaus = jdc(itile,jtile)
898 igausp1 = id2(itile,jtile)
899 jgausp1 = jdc(itile,jtile)+1
901 IF (slmsk_gaus(igaus,jgaus) == 0 .OR. &
902 slmsk_gaus(igausp1,jgaus) == 0 .OR. &
903 slmsk_gaus(igausp1,jgausp1) == 0 .OR. &
904 slmsk_gaus(igaus,jgausp1) == 0)
THEN
909 IF (slmsk_gaus(igaus,jgaus) == 0)
THEN
910 dtref = dtref + (s2c(itile,jtile,1) * dtref_gaus(igaus,jgaus))
911 wsum = wsum + s2c(itile,jtile,1)
914 IF (slmsk_gaus(igausp1,jgaus) == 0)
THEN
915 dtref = dtref + (s2c(itile,jtile,2) * dtref_gaus(igausp1,jgaus))
916 wsum = wsum + s2c(itile,jtile,2)
919 IF (slmsk_gaus(igausp1,jgausp1) == 0)
THEN
920 dtref = dtref + (s2c(itile,jtile,3) * dtref_gaus(igausp1,jgausp1))
921 wsum = wsum + s2c(itile,jtile,3)
924 IF (slmsk_gaus(igaus,jgausp1) == 0)
THEN
925 dtref = dtref + (s2c(itile,jtile,4) * dtref_gaus(igaus,jgausp1))
926 wsum = wsum + s2c(itile,jtile,4)
932 tref_save = nsst%TREF(ij)
933 nsst%TREF(ij) = nsst%TREF(ij) + dtref
934 nsst%TREF(ij) = max(nsst%TREF(ij), tf_ice)
935 nsst%TREF(ij) = min(nsst%TREF(ij), tmax)
936 nsst%TFINC(ij) = nsst%TREF(ij) - tref_save
938 CALL
dtzm_point(nsst%XT(ij),nsst%XZ(ij),nsst%DT_COOL(ij), &
939 nsst%Z_C(ij),zsea1,zsea2,dtzm)
941 skint_tile(ij) = nsst%TREF(ij) + dtzm
942 skint_tile(ij) = max(skint_tile(ij), tf_ice)
943 skint_tile(ij) = min(skint_tile(ij), tmax)
945 sicet_tile(ij) = skint_tile(ij)
946 soilt_tile(ij,:) = skint_tile(ij)
957 DO krad = 1, max_search
959 istart = igaus - krad
961 jstart = jgaus - krad
967 IF((jj == jstart) .OR. (jj == jend) .OR. &
968 (ii == istart) .OR. (ii == iend))
THEN
970 IF ((jj >= 1) .AND. (jj <= jdim_gaus))
THEN
975 ELSE IF (ii >= (idim_gaus+1))
THEN
987 IF (krad <= 2 .AND. slmsk_gaus(iii,jjj) == 2) is_ice = .true.
989 IF (slmsk_gaus(iii,jjj) == 0)
THEN
993 nsearched = nsearched + 1
995 tref_save = nsst%TREF(ij)
996 nsst%TREF(ij ) = nsst%TREF(ij) + dtref_gaus(iii,jjj)
997 nsst%TREF(ij) = max(nsst%TREF(ij), tf_ice)
998 nsst%TREF(ij) = min(nsst%TREF(ij), tmax)
999 nsst%TFINC(ij) = nsst%TREF(ij) - tref_save
1001 CALL
dtzm_point(nsst%XT(ij),nsst%XZ(ij),nsst%DT_COOL(ij), &
1002 nsst%Z_C(ij),zsea1,zsea2,dtzm)
1004 skint_tile(ij) = nsst%TREF(ij) + dtzm
1005 skint_tile(ij) = max(skint_tile(ij), tf_ice)
1006 skint_tile(ij) = min(skint_tile(ij), tmax)
1008 sicet_tile(ij) = skint_tile(ij)
1009 soilt_tile(ij,:) = skint_tile(ij)
1032 nsst%TREF(ij) = tf_ice
1034 nfill_tice = nfill_tice + 1
1036 tref_save = nsst%TREF(ij)
1037 nsst%TREF(ij) = nsst%TREF(ij) + tf_trd_tile(ij)
1038 nsst%TREF(ij) = max(nsst%TREF(ij), tf_ice)
1039 nsst%TREF(ij) = min(nsst%TREF(ij), tmax)
1040 nsst%TFINC(ij) = nsst%TREF(ij) - tref_save
1042 nfill_clm = nfill_clm + 1
1045 CALL
dtzm_point(nsst%XT(ij),nsst%XZ(ij),nsst%DT_COOL(ij), &
1046 nsst%Z_C(ij),zsea1,zsea2,dtzm)
1048 skint_tile(ij) = nsst%TREF(ij) + dtzm
1049 skint_tile(ij) = max(skint_tile(ij), tf_ice)
1050 skint_tile(ij) = min(skint_tile(ij), tmax)
1052 sicet_tile(ij) = skint_tile(ij)
1053 soilt_tile(ij,:) = skint_tile(ij)
1059 write(*,
'(a)')
'statistics of grids number processed for tile : '
1060 write(*,
'(a,I8)')
' nintp = ',nintp
1061 write(*,
'(a,4I8)')
'nset_thaw,nset_thaw_s,nset_thaw_i,nset_thaw_c =',nset_thaw,nset_thaw_s,nset_thaw_i,nset_thaw_c
1062 write(*,
'(a,I8)')
' nsearched = ',nsearched
1063 write(*,
'(a,3I6)')
' nfill,nfill_tice,nfill_clm = ',nfill,nfill_tice,nfill_clm
1064 write(*,
'(a,I8)')
' nice = ',nice
1065 write(*,
'(a,I8)')
' nland = ',nland
1067 DEALLOCATE(id1, id2, jdc, s2c)
1084 INTEGER,
INTENT(IN) :: mon, day
1086 REAL,
INTENT(IN) :: latitude, deltsfc
1087 REAL,
INTENT(OUT) :: dtref
1089 INTEGER :: num_days(12), mon2, mon1
1091 REAL,
TARGET :: sst_80_90(12)
1092 REAL,
TARGET :: sst_70_80(12)
1093 REAL,
TARGET :: sst_60_70(12)
1094 REAL,
TARGET :: sst_50_60(12)
1095 REAL,
TARGET :: sst_40_50(12)
1096 REAL,
TARGET :: sst_30_40(12)
1097 REAL,
TARGET :: sst_20_30(12)
1098 REAL,
TARGET :: sst_10_20(12)
1099 REAL,
TARGET :: sst_00_10(12)
1100 REAL,
TARGET :: sst_m10_00(12)
1101 REAL,
TARGET :: sst_m20_m10(12)
1102 REAL,
TARGET :: sst_m30_m20(12)
1103 REAL,
TARGET :: sst_m40_m30(12)
1104 REAL,
TARGET :: sst_m50_m40(12)
1105 REAL,
TARGET :: sst_m60_m50(12)
1106 REAL,
TARGET :: sst_m70_m60(12)
1107 REAL,
TARGET :: sst_m80_m70(12)
1108 REAL,
TARGET :: sst_m90_m80(12)
1110 REAL,
POINTER :: sst(:)
1112 DATA num_days /31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/
1114 DATA sst_80_90 /271.466, 271.458, 271.448, 271.445, 271.519, 271.636, &
1115 272.023, 272.066, 272.001, 271.698, 271.510, 271.472/
1117 DATA sst_70_80 /272.149, 272.103, 272.095, 272.126, 272.360, 272.988, &
1118 274.061, 274.868, 274.415, 273.201, 272.468, 272.268/
1120 DATA sst_60_70 /274.240, 274.019, 273.988, 274.185, 275.104, 276.875, &
1121 279.005, 280.172, 279.396, 277.586, 275.818, 274.803/
1123 DATA sst_50_60 /277.277, 276.935, 277.021, 277.531, 279.100, 281.357, &
1124 283.735, 285.171, 284.399, 282.328, 279.918, 278.199/
1126 DATA sst_40_50 /281.321, 280.721, 280.850, 281.820, 283.958, 286.588, &
1127 289.195, 290.873, 290.014, 287.652, 284.898, 282.735/
1129 DATA sst_30_40 /289.189, 288.519, 288.687, 289.648, 291.547, 293.904, &
1130 296.110, 297.319, 296.816, 295.225, 292.908, 290.743/
1132 DATA sst_20_30 /294.807, 294.348, 294.710, 295.714, 297.224, 298.703, &
1133 299.682, 300.127, 300.099, 299.455, 297.953, 296.177/
1135 DATA sst_10_20 /298.878, 298.720, 299.033, 299.707, 300.431, 300.709, &
1136 300.814, 300.976, 301.174, 301.145, 300.587, 299.694/
1138 DATA sst_00_10 /300.415, 300.548, 300.939, 301.365, 301.505, 301.141, &
1139 300.779, 300.660, 300.818, 300.994, 300.941, 300.675/
1141 DATA sst_m10_00 /300.226, 300.558, 300.914, 301.047, 300.645, 299.870, &
1142 299.114, 298.751, 298.875, 299.294, 299.721, 299.989/
1144 DATA sst_m20_m10 /299.547, 299.985, 300.056, 299.676, 298.841, 297.788, &
1145 296.893, 296.491, 296.687, 297.355, 298.220, 298.964/
1147 DATA sst_m30_m20 /297.524, 298.073, 297.897, 297.088, 295.846, 294.520, &
1148 293.525, 293.087, 293.217, 293.951, 295.047, 296.363/
1150 DATA sst_m40_m30 /293.054, 293.765, 293.468, 292.447, 291.128, 289.781, &
1151 288.773, 288.239, 288.203, 288.794, 289.947, 291.553/
1153 DATA sst_m50_m40 /285.052, 285.599, 285.426, 284.681, 283.761, 282.826, &
1154 282.138, 281.730, 281.659, 281.965, 282.768, 283.961/
1156 DATA sst_m60_m50 /277.818, 278.174, 277.991, 277.455, 276.824, 276.229, &
1157 275.817, 275.585, 275.560, 275.687, 276.142, 276.968/
1159 DATA sst_m70_m60 /273.436, 273.793, 273.451, 272.813, 272.349, 272.048, &
1160 271.901, 271.838, 271.845, 271.889, 272.080, 272.607/
1162 DATA sst_m80_m70 /271.579, 271.578, 271.471, 271.407, 271.392, 271.391, &
1163 271.390, 271.391, 271.394, 271.401, 271.422, 271.486/
1165 DATA sst_m90_m80 /271.350, 271.350, 271.350, 271.350, 271.350, 271.350, &
1166 271.350, 271.350, 271.350, 271.350, 271.350, 271.350/
1169 IF (latitude > 80.0)
THEN
1171 ELSEIF (latitude > 70.0)
THEN
1173 ELSEIF (latitude > 60.0)
THEN
1175 ELSEIF (latitude > 50.0)
THEN
1177 ELSEIF (latitude > 40.0)
THEN
1179 ELSEIF (latitude > 30.0)
THEN
1181 ELSEIF (latitude > 20.0)
THEN
1183 ELSEIF (latitude > 10.0)
THEN
1185 ELSEIF (latitude > 0.0)
THEN
1187 ELSEIF (latitude > -10.0)
THEN
1189 ELSEIF (latitude > -20.0)
THEN
1191 ELSEIF (latitude > -30.0)
THEN
1193 ELSEIF (latitude > -40.0)
THEN
1195 ELSEIF (latitude > -50.0)
THEN
1197 ELSEIF (latitude > -60.0)
THEN
1199 ELSEIF (latitude > -70.0)
THEN
1201 ELSEIF (latitude > -80.0)
THEN
1209 IF(mon2 == 13) mon2 = 1
1211 dtref = (sst(mon2) - sst(mon1)) / num_days(mon1)
1214 IF (mon1 == 0) mon1=12
1216 dtref = (sst(mon2) - sst(mon1)) / num_days(mon1)
1219 dtref = dtref * (deltsfc / 24.0)
1237 real,
intent(in) :: xt,xz,dt_cool,zc,z1,z2
1238 real,
intent(out) :: dtzm
1240 real,
parameter :: zero = 0.0
1241 real,
parameter :: one = 1.0
1242 real,
parameter :: half = 0.5
1243 real :: dt_warm,dtw,dtc
1248 if ( xt > zero )
then
1249 dt_warm = (xt+xt)/xz
1252 dtw = dt_warm*(one-(z1+z2)/(xz+xz))
1253 elseif ( z1 < xz .and. z2 >= xz )
then
1254 dtw = half*(one-z1/xz)*dt_warm*(xz-z1)/(z2-z1)
1256 elseif ( z1 == z2 )
then
1258 dtw = dt_warm*(one-z1/xz)
1266 if ( zc > zero )
then
1269 dtc = dt_cool*(one-(z1+z2)/(zc+zc))
1270 elseif ( z1 < zc .and. z2 >= zc )
then
1271 dtc = half*(one-z1/zc)*dt_cool*(zc-z1)/(z2-z1)
1273 elseif ( z1 == z2 )
then
1275 dtc = dt_cool*(one-z1/zc)
1306 subroutine tf_thaw_set(tf_ij,mask_ij,itile,jtile,tice,tclm,tf_thaw,nx,ny, &
1307 nset_thaw_s,nset_thaw_i,nset_thaw_c)
1309 real,
dimension(nx*ny),
intent(in) :: tf_ij
1310 integer,
dimension(nx*ny),
intent(in) :: mask_ij
1311 real,
intent(in) :: tice,tclm
1312 integer,
intent(in) :: itile,jtile,nx,ny
1313 real,
intent(out) :: tf_thaw
1314 integer,
intent(inout) :: nset_thaw_s,nset_thaw_i,nset_thaw_c
1316 real,
parameter :: bmiss = -999.0
1317 real,
dimension(nx,ny) :: tf
1318 integer,
dimension(nx,ny) :: mask
1319 integer :: krad,max_search,istart,iend,jstart,jend
1320 integer :: ii,jj,iii,jjj
1325 mask(:,:) = reshape(mask_ij,(/nx,ny/) )
1326 tf(:,:) = reshape(tf_ij,(/nx,ny/) )
1330 do krad = 1, max_search
1332 istart = itile - krad
1334 jstart = jtile - krad
1337 do jj = jstart, jend
1338 do ii = istart, iend
1341 if ((jj == jstart) .or. (jj == jend) .or. &
1342 (ii == istart) .or. (ii == iend))
then
1344 if ((jj >= 1) .and. (jj <= ny))
then
1348 else if (ii >= (nx+1))
then
1359 if (krad <= 2 .and. mask(iii,jjj) == 2) is_ice = .true.
1361 if (mask(iii,jjj) == 0)
then
1362 tf_thaw = tf(iii,jjj)
1363 nset_thaw_s = nset_thaw_s + 1
1364 write(*,
'(a,I4,2F9.3)')
'nset_thaw_s,tf(iii,jjj),tclm : ',nset_thaw_s,tf(iii,jjj),tclm
1376 if ( tf_thaw == bmiss )
then
1379 nset_thaw_i = nset_thaw_i + 1
1380 write(*,
'(a,I4,F9.3)')
'nset_thaw_i,tf_ice : ',nset_thaw_i,tice
1382 tf_thaw = 0.8*tice+0.2*tclm
1383 nset_thaw_c = nset_thaw_c + 1
1384 write(*,
'(a,I4,2F9.3)')
'nset_thaw_c,tf_ice,tclm : ',nset_thaw_c,tice,tclm
1401 integer,
intent(in) :: ij
1403 real,
intent(in) :: tf_thaw
1409 nsst%d_conv(ij) = 0.0
1410 nsst%dt_cool(ij) = 0.0
1412 nsst%qrain(ij) = 0.0
1413 nsst%tref(ij) = tf_thaw
1443 subroutine get_tf_clm(xlats_ij,xlons_ij,ny,nx,iy,im,id,ih,tf_clm,tf_trd)
1448 real,
dimension(nx*ny),
intent(in) :: xlats_ij
1449 real,
dimension(nx*ny),
intent(in) :: xlons_ij
1450 real,
dimension(nx,ny),
intent(out) :: tf_clm
1451 real,
dimension(nx,ny),
intent(out) :: tf_trd
1452 integer,
intent(in) :: iy,im,id,ih,nx,ny
1454 real,
allocatable,
dimension(:,:) :: tf_clm0
1455 real,
allocatable,
dimension(:,:) :: tf_trd0
1456 real,
allocatable,
dimension(:) :: cxlats
1457 real,
allocatable,
dimension(:) :: cxlons
1459 real,
dimension(nx*ny) :: tf_clm_ij
1460 real,
dimension(nx*ny) :: tf_trd_ij
1462 integer :: nxc,nyc,mon1,mon2,i,j
1463 character (len=6),
parameter :: fin_tf_clm=
'sstclm'
1472 allocate( tf_clm0(nxc,nyc),tf_trd0(nxc,nyc),cxlats(nyc),cxlons(nxc) )
1476 call
get_tf_clm_ta(tf_clm0,tf_trd0,cxlats,cxlons,nyc,nxc,mon1,mon2,wei1,wei2)
1480 if ( nx == nxc .and. ny == nyc )
then
1481 tf_clm(:,:) = tf_clm0(:,:)
1482 tf_trd(:,:) = tf_trd0(:,:)
1486 call
intp_tile(tf_clm0, cxlats, cxlons, nyc, nxc, &
1487 tf_clm_ij,xlats_ij,xlons_ij,ny, nx)
1488 call
intp_tile(tf_trd0, cxlats, cxlons, nyc, nxc, &
1489 tf_trd_ij,xlats_ij,xlons_ij,ny, nx)
1492 tf_clm(:,:) = reshape(tf_clm_ij, (/nx,ny/) )
1493 tf_trd(:,:) = reshape(tf_trd_ij, (/nx,ny/) )
1512 subroutine get_tf_clm_ta(tf_clm_ta,tf_clm_trend,xlats,xlons,nlat,nlon,mon1,mon2,wei1,wei2)
1517 integer,
intent(in) :: nlat,nlon,mon1,mon2
1518 real,
intent(in) :: wei1,wei2
1520 real,
dimension(nlon,nlat),
intent(out) :: tf_clm_ta,tf_clm_trend
1521 real,
dimension(nlat),
intent(out) :: xlats
1522 real,
dimension(nlon),
intent(out) :: xlons
1525 character (len=6),
parameter :: fin_tf_clm=
'sstclm'
1528 real,
dimension(nlon,nlat) :: tf_clm1,tf_clm2
1538 tf_clm_ta(:,:) = wei1*tf_clm1(:,:)+wei2*tf_clm2(:,:)
1542 tf_clm_trend(:,:) = (tf_clm2(:,:)-tf_clm1(:,:))/120.0
1544 write(*,
'(a,2f9.3)')
'tf_clm_ta, min, max : ',minval(tf_clm_ta),maxval(tf_clm_ta)
1545 write(*,
'(a,2f9.3)')
'tf_clm_trend, min, max : ',minval(tf_clm_trend),maxval(tf_clm_trend)
1564 real,
dimension(nx*ny),
intent(in) :: xlats_ij
1565 real,
dimension(nx*ny),
intent(in) :: xlons_ij
1566 real,
dimension(nx,ny),
intent(out) :: sal_clm
1567 integer,
intent(in) :: iy,im,id,ih,nx,ny
1569 real,
allocatable,
dimension(:,:) :: sal_clm0
1570 real,
allocatable,
dimension(:) :: cxlats
1571 real,
allocatable,
dimension(:) :: cxlons
1573 real,
dimension(nx*ny) :: sal_clm_ij
1575 integer :: nxc,nyc,mon1,mon2,i,j
1576 character (len=6),
parameter :: fin_sal_clm=
'salclm'
1585 allocate( sal_clm0(nxc,nyc),cxlats(nyc),cxlons(nxc) )
1589 call
get_sal_clm_ta(sal_clm0,cxlats,cxlons,nyc,nxc,mon1,mon2,wei1,wei2)
1593 if ( nx == nxc .and. ny == nyc )
then
1594 sal_clm(:,:) = sal_clm0(:,:)
1598 call
intp_tile(sal_clm0, cxlats, cxlons, nyc, nxc, &
1599 sal_clm_ij,xlats_ij,xlons_ij,ny, nx)
1603 sal_clm(:,:) = reshape(sal_clm_ij, (/nx,ny/) )
1626 integer,
intent(in) :: nlat,nlon,mon1,mon2
1627 real,
intent(in) :: wei1,wei2
1629 real,
dimension(nlon,nlat),
intent(out) :: sal_clm_ta
1630 real,
dimension(nlat),
intent(out) :: xlats
1631 real,
dimension(nlon),
intent(out) :: xlons
1634 character (len=6),
parameter :: fin_sal_clm=
'salclm'
1637 real,
dimension(nlon,nlat) :: sal_clm1,sal_clm2
1647 sal_clm_ta(:,:) = wei1*sal_clm1(:,:)+wei2*sal_clm2(:,:)
1648 write(*,
'(a,2f9.3)')
'sal_clm_ta, min, max : ',minval(sal_clm_ta),maxval(sal_clm_ta)
1665 subroutine intp_tile(tf_lalo,dlats_lalo,dlons_lalo,jdim_lalo,idim_lalo, &
1666 tf_tile,xlats_tile,xlons_tile,jdim_tile,idim_tile)
1673 real,
dimension(idim_lalo,jdim_lalo),
intent(in) :: tf_lalo
1674 real,
dimension(jdim_lalo),
intent(in) :: dlats_lalo
1675 real,
dimension(idim_lalo),
intent(in) :: dlons_lalo
1676 real,
dimension(jdim_tile*idim_tile),
intent(in) :: xlats_tile
1677 real,
dimension(jdim_tile*idim_tile),
intent(in) :: xlons_tile
1678 integer,
intent(in) :: jdim_lalo,idim_lalo,jdim_tile,idim_tile
1679 real,
dimension(jdim_tile*idim_tile),
intent(out) :: tf_tile
1682 real,
parameter :: deg2rad=3.1415926/180.0
1683 real,
dimension(jdim_lalo) :: xlats_lalo
1684 real,
dimension(idim_lalo) :: xlons_lalo
1685 real :: tf,wsum,res_km
1686 integer :: itile,jtile
1687 integer :: ii,jj,ij,iii,jjj
1688 integer :: ilalo,jlalo,ilalop1,jlalop1
1689 integer :: istart,iend,jstart,jend,krad
1691 integer,
allocatable,
dimension(:,:) :: id1,id2,jdc
1692 real,
allocatable,
dimension(:,:,:) :: agrid,s2c
1695 print*,
'interpolate from lat/lon grids to any one grid with known lat/lon'
1697 xlats_lalo = dlats_lalo*deg2rad
1698 xlons_lalo = dlons_lalo*deg2rad
1700 allocate(agrid(idim_tile,jdim_tile,2))
1701 agrid(:,:,1) = reshape(xlons_tile, (/idim_tile,jdim_tile/) )
1702 agrid(:,:,2) = reshape(xlats_tile, (/idim_tile,jdim_tile/) )
1703 agrid = agrid*deg2rad
1705 allocate(id1(idim_tile,jdim_tile))
1706 allocate(id2(idim_tile,jdim_tile))
1707 allocate(jdc(idim_tile,jdim_tile))
1708 allocate(s2c(idim_tile,jdim_tile,4))
1716 call
remap_coef( 1, idim_tile, 1, jdim_tile, idim_lalo, jdim_lalo, &
1717 xlons_lalo, xlats_lalo, id1, id2, jdc, s2c, agrid )
1719 do ij = 1, jdim_tile*idim_tile
1721 jtile = (ij-1)/idim_tile + 1
1722 itile = mod(ij,idim_tile)
1723 if (itile==0) itile = idim_tile
1725 ilalo = id1(itile,jtile)
1726 ilalop1 = id2(itile,jtile)
1727 jlalo = jdc(itile,jtile)
1728 jlalop1 = jdc(itile,jtile) + 1
1730 wsum = s2c(itile,jtile,1) + s2c(itile,jtile,2) + &
1731 s2c(itile,jtile,3) + s2c(itile,jtile,4)
1733 tf_tile(ij) = ( s2c(itile,jtile,1)*tf_lalo(ilalo,jlalo) + &
1734 s2c(itile,jtile,2)*tf_lalo(ilalop1,jlalo) + &
1735 s2c(itile,jtile,3)*tf_lalo(ilalop1,jlalop1) + &
1736 s2c(itile,jtile,4)*tf_lalo(ilalo,jlalop1) )/wsum
1739 deallocate(id1, id2, jdc, s2c)
1759 integer,
intent(in) :: iy,im,id,ih
1761 integer,
intent(out) :: mon1,mon2
1762 real,
intent(out) :: wei1,wei2
1766 integer :: mon,monend,monm,monp,jdow,jdoy,jday
1771 real,
dimension(13) :: dayhf
1772 data dayhf/15.5,45.0,74.5,105.0,135.5,166.0,196.5,227.5,258.0,288.5,319.0,349.5,380.5/
1785 call w3doxdat(jda,jdow,jdoy,jday)
1786 rjday=jdoy+jda(5)/24.
1787 if(rjday.lt.dayhf(1)) rjday=rjday+365.
1793 if( rjday >= dayhf(monm) .and. rjday < dayhf(monp) )
then
1800 print *,
'FATAL ERROR in get_tim_wei, wrong rjday',rjday
1804 wei1 = (dayhf(mon2)-rjday)/(dayhf(mon2)-dayhf(mon1))
1805 wei2 = (rjday-dayhf(mon1))/(dayhf(mon2)-dayhf(mon1))
1807 if( mon2 == 13 ) mon2=1
1809 write(*,
'(a,2i4,3f9.3)')
'mon1,mon2,rjday,wei1,wei2=',mon1,mon2,rjday,wei1,wei2
1828 parameter(a1 = -0.0575)
1829 parameter(a2 = 1.710523e-3)
1830 parameter(a3 = -2.154996e-4)
1832 IF (salinity .LT. 0.)
THEN
1837 tfreez = sal*(a1+a2*sqrt(sal)+a3*sal)
integer function num_parthds()
Return the number of omp threads.
subroutine adjust_nsst(RLA, RLO, SLMSK_TILE, SLMSK_FG_TILE, SKINT_TILE, SICET_TILE, sice_tile, SOILT_TILE, NSST, LENSFC, LSOIL, IDIM, JDIM, ZSEA1, ZSEA2, MON, DAY, DELTSFC, tf_clm_tile, tf_trd_tile, sal_clm_tile)
Read in gsi file with the updated reference temperature increments (on the gaussian grid)...
subroutine, public calculate_soilsnowmask(smc, swe, lensfc, mask)
Calculate soil mask for land on model grid.
subroutine get_tf_clm(xlats_ij, xlons_ij, ny, nx, iy, im, id, ih, tf_clm, tf_trd)
Get the sst climatology at the valid time and on the target grid.
subroutine, public read_lat_lon_orog(RLA, RLO, OROG, OROG_UF, TILE_NUM, IDIM, JDIM, IJDIM)
Read latitude and longitude for the cubed-sphere tile from the 'grid' file.
subroutine, public read_data(TSFFCS, SMCFCS, SNOFCS, STCFCS, TG3FCS, ZORFCS, CVFCS, CVBFCS, CVTFCS, ALBFCS, SLIFCS, VEGFCS, CNPFCS, F10M, VETFCS, SOTFCS, ALFFCS, USTAR, FMM, FHH, SIHFCS, SICFCS, SITFCS, TPRCP, SRFLAG, SWDFCS, VMNFCS, VMXFCS, SLCFCS, SLPFCS, ABSFCS, T2M, Q2M, SLMASK, ZSOIL, LSOIL, LENSFC, DO_NSST, NSST)
Read the first guess surface records and nsst records (if selected) for a single cubed-sphere tile...
subroutine get_tf_clm_ta(tf_clm_ta, tf_clm_trend, xlats, xlons, nlat, nlon, mon1, mon2, wei1, wei2)
Get the reference temperature/sst climatology and its trend at analysis time.
subroutine sfcdrv(LUGB, IDIM, JDIM, LSM, LENSFC, LSOIL, DELTSFC, IY, IM, ID, IH, FH, IALB, USE_UFO, DO_NSST, DO_SFCCYCLE, DO_LNDINC, ZSEA1, ZSEA2, ISOT, IVEGSRC, MYRANK)
Driver routine for updating the surface fields.
subroutine dtzm_point(XT, XZ, DT_COOL, ZC, Z1, Z2, DTZM)
Compute the vertical mean of the NSST t-profile.
subroutine get_sal_clm_ta(sal_clm_ta, xlats, xlons, nlat, nlon, mon1, mon2, wei1, wei2)
Get climatological salinity at the analysis time.
subroutine tf_thaw_set(tf_ij, mask_ij, itile, jtile, tice, tclm, tf_thaw, nx, ny, nset_thaw_s, nset_thaw_i, nset_thaw_c)
Set the background reference temperature (tf) for points where the ice has just melted.
subroutine, public get_dim_nc(filename, nlat, nlon)
Get the i/j dimensions of the data from a NetCDF file.
subroutine, public add_increment_soil(rla, rlo, stc_state, soilsnow_tile, soilsnow_fg_tile, lensfc, lsoil, idim, jdim, myrank)
Read in gsi file with soil state increments (on the gaussian grid), interpolate increments to the cub...
subroutine, public read_salclm_gfs_nc(filename, sal, xlats, xlons, nlat, nlon, itime)
Read the woa05 salinity monthly climatology file.
subroutine intp_tile(tf_lalo, dlats_lalo, dlons_lalo, jdim_lalo, idim_lalo, tf_tile, xlats_tile, xlons_tile, jdim_tile, idim_tile)
Interpolate lon/lat grid data to the fv3 native grid (tf_lalo => tf_tile).
subroutine, public apply_land_da_adjustments(update_type, lsm, isot, ivegsrc, lensfc, lsoil, rsoiltype, smc_bck, slc_bck, stc_bck, smc_anl, slc_anl, stc_anl)
Make adjustments to dependent variables after applying land increments.
subroutine climo_trend(LATITUDE, MON, DAY, DELTSFC, DTREF)
If the tile point is an isolated water point that has no corresponding gsi water point, then tref is updated using the rtg sst climo trend.
subroutine, public remap_coef(is, ie, js, je, im, jm, lon, lat, id1, id2, jdc, s2c, agrid)
Generate the weights and index of the grids used in the bilinear interpolation.
subroutine, public get_tf_clm_dim(file_sst, mlat_sst, mlon_sst)
Get the i/j dimensions of RTG SST climatology file.
subroutine, public write_data(slifcs, tsffcs, snofcs, tg3fcs, zorfcs, albfcs, alffcs, vegfcs, cnpfcs, f10m, t2m, q2m, vetfcs, sotfcs, ustar, fmm, fhh, sicfcs, sihfcs, sitfcs, tprcp, srflag, swdfcs, vmnfcs, vmxfcs, slpfcs, absfcs, slcfcs, smcfcs, stcfcs, idim, jdim, lensfc, lsoil, do_nsst, nsst)
Write out all surface records - and nsst records if selected - on a single cubed-sphere tile to a mod...
program sfc_drv
Stand alone surface/NSST cycle driver for the cubed-sphere grid.
subroutine sfccycle(lugb, len, lsoil, sig1t, deltsfc, iy, im, id, ih, fh, rla, rlo, slmask, orog, orog_uf, use_ufo, nst_anl, sihfcs, sicfcs, sitfcs, swdfcs, slcfcs, vmnfcs, vmxfcs, slpfcs, absfcs, tsffcs, snofcs, zorfcs, albfcs, tg3fcs, cnpfcs, smcfcs, stcfcs, slifcs, aisfcs, vegfcs, vetfcs, sotfcs, alffcs, cvfcs, cvbfcs, cvtfcs, me, nlunit, sz_nml, input_nml_file, ialb, isot, ivegsrc, tile_num_ch, i_index, j_index)
Surface cycling driver routine.
subroutine, public read_gsi_data(GSI_FILE, FILE_TYPE, LSOIL)
Read increment file from the GSI containing either the foundation temperature increments and mask...
real function tfreez(salinity)
Compute the freezing point of water as a function of salinity.
This module contains routines that read and write data.
subroutine get_tim_wei(iy, im, id, ih, mon1, mon2, wei1, wei2)
For a given date, determine the bounding months and the linear time interpolation weights...
subroutine get_sal_clm(xlats_ij, xlons_ij, ny, nx, iy, im, id, ih, sal_clm)
Get salinity climatology at the valid time on the target grid.
subroutine nsst_water_reset(nsst, ij, tf_thaw)
If the first guess was sea ice, but the analysis is open water, reset all nsst variables.
Module containing utility routines.
subroutine, public read_tf_clim_grb(file_sst, sst, rlats_sst, rlons_sst, mlat_sst, mlon_sst, mon)
Read a GRIB1 sst climatological analysis file.