From 8683a693b8d798b0aed45de8aee8b4293af55c86 Mon Sep 17 00:00:00 2001 From: junwang-noaa <37633869+junwang-noaa@users.noreply.github.com> Date: Tue, 18 Feb 2020 12:05:52 -0500 Subject: [PATCH] Iaudrymass coupledfield ww3 (#61) * add namelist variable iau_drymassfixer and use consistent coupled fields * dump out coupled fields in native grid for fv3 * add default(none) for openmp in post_gfs.F90 * update fv3 dycore with reproduce option in g_sum * change fv3 dycore to point to the NOAA-EMC dev/emc branch --- atmos_cubed_sphere | 2 +- atmos_model.F90 | 10 +- cpl/module_cap_cpl.F90 | 108 ++++++++- cpl/module_cplfields.F90 | 10 +- fv3_cap.F90 | 7 +- gfsphysics/GFS_layer/GFS_typedefs.F90 | 5 +- io/post_gfs.F90 | 326 +++++++++++++------------- 7 files changed, 293 insertions(+), 175 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index a56907a44..db3acfbec 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit a56907a44461c7151e0ba266e160c8f1a1685882 +Subproject commit db3acfbec2ca00d1795b72b7ebf0b1e308506ced diff --git a/atmos_model.F90 b/atmos_model.F90 index 9a73e0151..ea336a100 100644 --- a/atmos_model.F90 +++ b/atmos_model.F90 @@ -1740,7 +1740,7 @@ subroutine assign_importdata(rc) ! get upward LW flux: for sea ice covered area !---------------------------------------------- - fldname = 'mean_up_lw_flx' + fldname = 'mean_up_lw_flx_ice' if (trim(impfield_name) == trim(fldname)) then findex = QueryFieldList(ImportFieldsList,fldname) if (importFieldsValid(findex)) then @@ -1767,7 +1767,7 @@ subroutine assign_importdata(rc) ! get latent heat flux: for sea ice covered area !------------------------------------------------ - fldname = 'mean_laten_heat_flx' + fldname = 'mean_laten_heat_flx_atm_into_ice' if (trim(impfield_name) == trim(fldname)) then findex = QueryFieldList(ImportFieldsList,fldname) if (importFieldsValid(findex)) then @@ -1787,7 +1787,7 @@ subroutine assign_importdata(rc) ! get sensible heat flux: for sea ice covered area !-------------------------------------------------- - fldname = 'mean_sensi_heat_flx' + fldname = 'mean_sensi_heat_flx_atm_into_ice' if (trim(impfield_name) == trim(fldname)) then findex = QueryFieldList(ImportFieldsList,fldname) if (importFieldsValid(findex)) then @@ -1807,7 +1807,7 @@ subroutine assign_importdata(rc) ! get zonal compt of momentum flux: for sea ice covered area !------------------------------------------------------------ - fldname = 'mean_zonal_moment_flx' + fldname = 'stress_on_air_ice_zonal' if (trim(impfield_name) == trim(fldname)) then findex = QueryFieldList(ImportFieldsList,fldname) if (importFieldsValid(findex)) then @@ -1827,7 +1827,7 @@ subroutine assign_importdata(rc) ! get meridional compt of momentum flux: for sea ice covered area !----------------------------------------------------------------- - fldname = 'mean_merid_moment_flx' + fldname = 'stress_on_air_ice_merid' if (trim(impfield_name) == trim(fldname)) then findex = QueryFieldList(ImportFieldsList,fldname) if (importFieldsValid(findex)) then diff --git a/cpl/module_cap_cpl.F90 b/cpl/module_cap_cpl.F90 index 3e858c0e0..073f7defd 100644 --- a/cpl/module_cap_cpl.F90 +++ b/cpl/module_cap_cpl.F90 @@ -102,7 +102,8 @@ subroutine realizeConnectedCplFields(state, grid, numLevels, numSoilLayers, numTracers, & num_diag_sfc_emis_flux, num_diag_down_flux, & num_diag_type_down_flux, num_diag_burn_emis_flux, & - num_diag_cmass, fieldNames, fieldTypes, fieldList, rc) + num_diag_cmass, fieldNames, fieldTypes, state_tag,& + fieldList, rc) type(ESMF_State), intent(inout) :: state type(ESMF_Grid), intent(in) :: grid @@ -116,6 +117,7 @@ subroutine realizeConnectedCplFields(state, grid, integer, intent(in) :: num_diag_cmass character(len=*), dimension(:), intent(in) :: fieldNames character(len=*), dimension(:), intent(in) :: fieldTypes + character(len=*), intent(in) :: state_tag !< Import or export. type(ESMF_Field), dimension(:), intent(out) :: fieldList integer, intent(out) :: rc @@ -196,10 +198,14 @@ subroutine realizeConnectedCplFields(state, grid, if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! -- save field fieldList(item) = field + call ESMF_LogWrite('realizeConnectedCplFields '//trim(state_tag)//' Field '//trim(fieldNames(item)) & + // ' is connected ', ESMF_LOGMSG_INFO, line=__LINE__, file=__FILE__, rc=rc) else ! remove a not connected Field from State call ESMF_StateRemove(state, (/trim(fieldNames(item))/), rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + call ESMF_LogWrite('realizeConnectedCplFields '//trim(state_tag)//' Field '//trim(fieldNames(item)) & + // ' is not connected ', ESMF_LOGMSG_INFO, line=__LINE__, file=__FILE__, rc=rc) end if end do @@ -217,6 +223,7 @@ subroutine Dump_cplFields(gcomp, importState, exportstate, clock_fv3, & integer :: timeslice ! character(len=160) :: nuopcMsg + character(len=160) :: filename integer :: rc ! call ESMF_ClockPrint(clock_fv3, options="currTime", & @@ -237,12 +244,18 @@ subroutine Dump_cplFields(gcomp, importState, exportstate, clock_fv3, & timeslice = timeslice + 1 call ESMF_GridCompGet(gcomp, importState=importState, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - call ESMFPP_RegridWriteState(importState, "fv3_cap_import_", timeslice, rc=rc) + ! replace with tiled field dumps + !call ESMFPP_RegridWriteState(importState, "fv3_cap_import_", timeslice, rc=rc) + write(filename,'(a,i6.6)') 'fv3_cap_import_',timeslice + call State_RWFields_tiles(importState,trim(filename), timeslice, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return call ESMF_GridCompGet(gcomp, exportState=exportState, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return - call ESMFPP_RegridWriteState(exportState, "fv3_cap_export_", timeslice, rc=rc) + ! replace with tiled field dumps + !call ESMFPP_RegridWriteState(exportState, "fv3_cap_export_", timeslice, rc=rc) + write(filename,'(a,i6.6)') 'fv3_cap_export_',timeslice + call State_RWFields_tiles(exportState,trim(filename), timeslice, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return endif ! @@ -345,6 +358,95 @@ subroutine ESMFPP_RegridWrite(inField, outGrid, regridMethod, fileName, fieldNam end subroutine ESMFPP_RegridWrite + !----------------------------------------------------------------------------- + + ! This subroutine requires ESMFv8 - for coupled FV3 + subroutine State_RWFields_tiles(state,filename,timeslice,rc) + + type(ESMF_State), intent(in) :: state + character(len=*), intent(in) :: fileName + integer, intent(in) :: timeslice + integer, intent(out) :: rc + + ! local + type(ESMF_Field) :: firstESMFFLD + type(ESMF_Field),allocatable :: flds(:) + type(ESMF_GridComp) :: IOComp + type(ESMF_Grid) :: gridFv3 + + character(len=256) :: msgString + integer :: i, icount, ifld + integer :: fieldcount, firstfld + character(64), allocatable :: itemNameList(:), fldNameList(:) + type(ESMF_StateItem_Flag), allocatable :: typeList(:) + + character(len=*),parameter :: subname='(module_cap_cpl:State_RWFields_tiles)' + + ! local variables + + rc = ESMF_SUCCESS + !call ESMF_LogWrite(trim(subname)//trim(filename)//": called", + !ESMF_LOGMSG_INFO, rc=rc) + + call ESMF_StateGet(state, itemCount=icount, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + allocate(typeList(icount), itemNameList(icount)) + call ESMF_StateGet(state, itemTypeList=typeList, itemNameList=itemNameList, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + + ! find first stateitem that is a field and the count of fields + firstfld = 0; fieldcount = 0 + do i = icount,1,-1 + if(typeList(i) == ESMF_STATEITEM_FIELD) firstfld = i + if(typeList(i) == ESMF_STATEITEM_FIELD) fieldcount = fieldcount + 1 + enddo + !write(msgString,*) trim(subname)//' icount = ',icount," fieldcount = + !",fieldcount," firstfld = ",firstfld + !call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO, rc=rc) + + allocate(flds(fieldCount),fldNameList(fieldCount)) + ifld = 1 + do i = 1, icount + if(typeList(i) == ESMF_STATEITEM_FIELD) then + fldNameList(ifld) = itemNameList(i) + ifld = ifld + 1 + endif + enddo + + call ESMF_LogWrite(trim(subname)//": write "//trim(filename)//"tile1-tile6", ESMF_LOGMSG_INFO, rc=rc) + ! get first field + call ESMF_StateGet(state, itemName=itemNameList(firstfld), field=firstESMFFLD, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__)) return ! bail out + + call ESMF_FieldGet(firstESMFFLD, grid=gridFv3, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__)) return ! bail out + + IOComp = ESMFIO_Create(gridFv3, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__)) return ! bail out + call ESMF_LogWrite(trim(subname)//": write "//trim(filename), ESMF_LOGMSG_INFO, rc=rc) + + do ifld=1, fieldCount + call ESMF_StateGet(state, itemName=fldNameList(ifld), field=flds(ifld), rc=rc) + enddo + + call ESMFIO_Write(IOComp, filename, flds, filePath='./', rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__)) return ! bail out + +! -- Finalize ESMFIO + deallocate(flds) + deallocate(fldNameList) + call ESMFIO_Destroy(IOComp, rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, file=__FILE__)) call ESMF_Finalize() + + !call ESMF_LogWrite(trim(subname)//trim(filename)//": finished", + !ESMF_LOGMSG_INFO, rc=rc) + + end subroutine State_RWFields_tiles !----------------------------------------------------------------------------- diff --git a/cpl/module_cplfields.F90 b/cpl/module_cplfields.F90 index 48997ce4f..3b0b0be16 100644 --- a/cpl/module_cplfields.F90 +++ b/cpl/module_cplfields.F90 @@ -152,12 +152,12 @@ module module_cplfields ! "inst_ice_ir_dir_albedo ", & ! "inst_ice_vis_dif_albedo ", & ! "inst_ice_vis_dir_albedo ", & - "mean_up_lw_flx ", & - "mean_laten_heat_flx ", & - "mean_sensi_heat_flx ", & + "mean_up_lw_flx_ice ", & + "mean_laten_heat_flx_atm_into_ice ", & + "mean_sensi_heat_flx_atm_into_ice ", & ! "mean_evap_rate ", & - "mean_zonal_moment_flx ", & - "mean_merid_moment_flx ", & + "stress_on_air_ice_zonal ", & + "stress_on_air_ice_merid ", & "mean_ice_volume ", & "mean_snow_volume ", & "inst_tracer_up_surface_flx ", & diff --git a/fv3_cap.F90 b/fv3_cap.F90 index c211a9044..0a352846f 100644 --- a/fv3_cap.F90 +++ b/fv3_cap.F90 @@ -913,14 +913,17 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) call realizeConnectedCplFields(exportState, fcstGrid, & numLevels, numSoilLayers, numTracers, num_diag_sfc_emis_flux, & num_diag_down_flux, num_diag_type_down_flux, num_diag_burn_emis_flux, & - num_diag_cmass, exportFieldsList, exportFieldTypes, exportFields, rc) + num_diag_cmass, exportFieldsList, exportFieldTypes, 'FV3 Export', & + exportFields, rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return ! -- realize connected fields in importState call realizeConnectedCplFields(importState, fcstGrid, & numLevels, numSoilLayers, numTracers, num_diag_sfc_emis_flux, & num_diag_down_flux, num_diag_type_down_flux, num_diag_burn_emis_flux, & - num_diag_cmass, importFieldsList, importFieldTypes, importFields, rc) + num_diag_cmass, importFieldsList, importFieldTypes, 'FV3 Import', & + importFields, rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return end if endif diff --git a/gfsphysics/GFS_layer/GFS_typedefs.F90 b/gfsphysics/GFS_layer/GFS_typedefs.F90 index 09ab1da2d..8cef85314 100644 --- a/gfsphysics/GFS_layer/GFS_typedefs.F90 +++ b/gfsphysics/GFS_layer/GFS_typedefs.F90 @@ -1074,7 +1074,7 @@ module GFS_typedefs real(kind=kind_phys) :: iau_delthrs ! iau time interval (to scale increments) in hours character(len=240) :: iau_inc_files(7)! list of increment files real(kind=kind_phys) :: iaufhrs(7) ! forecast hours associated with increment files - logical :: iau_filter_increments + logical :: iau_filter_increments, iau_drymassfixer #ifdef CCPP ! From physcons.F90, updated/set in control_initialize @@ -3058,6 +3058,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & character(len=240) :: iau_inc_files(7) = '' !< list of increment files real(kind=kind_phys) :: iaufhrs(7) = -1 !< forecast hours associated with increment files logical :: iau_filter_increments = .false. !< filter IAU increments + logical :: iau_drymassfixer = .false. !< IAU dry mass fixer !--- debug flag logical :: debug = .false. @@ -3170,6 +3171,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ca_sgs, ca_global,iseed_ca,ca_smooth,isppt_deep,nspinup, & !--- IAU iau_delthrs,iaufhrs,iau_inc_files,iau_filter_increments, & + iau_drymassfixer, & !--- debug options debug, pre_rad, & !--- parameter range for critical relative humidity @@ -3650,6 +3652,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%iau_inc_files = iau_inc_files Model%iau_delthrs = iau_delthrs Model%iau_filter_increments = iau_filter_increments + Model%iau_drymassfixer = iau_drymassfixer if(Model%me==0) print *,' model init,iaufhrs=',Model%iaufhrs !--- tracer handling diff --git a/io/post_gfs.F90 b/io/post_gfs.F90 index daa6551bd..e9358ec91 100644 --- a/io/post_gfs.F90 +++ b/io/post_gfs.F90 @@ -183,7 +183,7 @@ subroutine post_run_gfs(wrt_int_state,mypei,mpicomp,lead_write, & call set_outflds(kth,th,kpv,pv) if(allocated(datapd))deallocate(datapd) allocate(datapd(wrt_int_state%im,jte-jts+1,nrecout+100)) -!$omp parallel do private(i,j,k) +!$omp parallel do default(none),private(i,j,k),shared(nrecout,jend,jsta,im,datapd) do k=1,nrecout+100 do j=1,jend+1-jsta do i=1,im @@ -433,7 +433,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! write(6,*) 'maptype and gridtype is ', maptype,gridtype ! -!$omp parallel do private(i,j,tem) +!$omp parallel do default(shared),private(i,j) do j=jsta,jend do i=1,im gdlat(i,j) = wrt_int_state%latPtr(i,j) @@ -448,7 +448,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! print*,'latstart,latlast B bcast= ',latstart,latlast ! print*,'lonstart,lonlast B bcast= ',lonstart,lonlast -!$omp parallel do private(i,j) +!$omp parallel do default(none),private(i,j,ip1), & +!$omp& shared(jsta,jend_m,im,dx,gdlat,gdlon,dy) do j = jsta, jend_m do i = 1, im ip1 = i + 1 @@ -459,13 +460,12 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & end do ! if(.not. allocated(ak5)) allocate(ak5(lm+1),bk5(lm+1)) -!$omp parallel do private(i) do i=1,lm+1 ak5(i) = wrt_int_state%ak(i) bk5(i) = wrt_int_state%bk(i) enddo -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,f,gdlat) do j=jsta,jend do i=1,im f(I,J) = 1.454441e-4*sin(gdlat(i,j)*dtr) ! 2*omeg*sin(phi) @@ -478,7 +478,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! GFS may not have model derived radar ref. ! TKE ! cloud amount -!$omp parallel do private(i,j,l) +!$omp parallel do default(none),private(i,j,l), & +!$omp& shared(lm,jsta,jend,im,spval,ref_10cm,q2,cfr) do l=1,lm do j=jsta,jend do i=1,im @@ -492,7 +493,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! GFS does not have surface specific humidity ! inst sensible heat flux ! inst latent heat flux -!$omp parallel do private(i,j) +!$omp parallel do default(none),private(i,j),shared(jsta,jend,im,spval,qs,twbs,qwbs,ths) do j=jsta,jend do i=1,im qs(i,j) = SPVAL @@ -512,7 +513,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! 10 m theta ! 10 m humidity ! snow free albedo -!$omp parallel do private(i,j) +!$omp parallel do default(none), private(i,j), shared(jsta,jend,im,spval), & +!$omp& shared(cldefi,lspa,th10,q10,albase) do j=jsta,jend do i=1,im cldefi(i,j) = SPVAL @@ -524,7 +526,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo ! GFS does not have convective precip -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,cprate) do j=jsta,jend do i=1,im cprate(i,j) = 0. @@ -536,7 +538,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst cloud fraction for high, middle, and low cloud, ! cfrach ! inst ground heat flux, grnflx -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,spval), & +!$omp& shared(czen,czmean,radot,cfrach,cfracl,cfracm,grnflx) do j=jsta,jend do i=1,im czen(i,j) = SPVAL @@ -566,7 +569,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst outgoing sfc shortwave, rswout ! snow phase change heat flux, snopcx ! GFS does not use total momentum flux,sfcuvx -!$omp parallel do private(i,j) +!$omp parallel do default(none),private(i,j),shared(jsta,jend,im,spval), & +!$omp& shared(acfrcv,ncfrcv,acfrst,ncfrst,bgroff,rlwin,rlwtoa,rswin,rswinc,rswout,snopcx,sfcuvx) do j=jsta,jend do i=1,im acfrcv(i,j) = spval @@ -596,6 +600,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! temperature tendency due to latent heating from convection ! temperature tendency due to latent heating from grid scale do l=1,lm +!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,spval,l), & +!$omp& shared(rlwtt,rswtt,tcucn,tcucns,train) do j=jsta_2l,jend_2u do i=1,im rlwtt(i,j,l) = spval @@ -624,7 +630,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! v at roughness length, vz0 ! shelter rh max, maxrhshltr ! shelter rh min, minrhshltr -!$omp parallel do private(i,j) +!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,spval), & +!$omp& shared(smstav,sfcevp,acsnow,acsnom,qz0,uz0,vz0,maxrhshltr,minrhshltr) do j=jsta_2l,jend_2u do i=1,im smstav(i,j) = spval @@ -642,7 +649,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! GFS does not have mixing length,el_pbl ! exchange coefficient, exch_h do l=1,lm -!$omp parallel do private(i,j) +!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,l,spval,el_pbl,exch_h) do j=jsta_2l,jend_2u do i=1,im el_pbl(i,j,l) = spval @@ -652,7 +659,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo ! GFS does not have deep convective cloud top and bottom fields -!$omp parallel do private(i,j) +!$omp parallel do default(none),private(i,j),shared(jsta_2l,jend_2u,im,spval), & +!$omp& shared(htopd,hbotd,htops,hbots,cuppt) do j=jsta_2l,jend_2u do i=1,im htopd(i,j) = SPVAL @@ -688,7 +696,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & tstart = 0. ! !** initialize cloud water and ice mixing ratio -!$omp parallel do private(i,j,l) +!$omp parallel do default(none),private(i,j,l),shared(lm,jsta,jend,im), & +!$omp& shared(qqw,qqr,qqs,qqi) do l = 1,lm do j = jsta, jend do i = 1,im @@ -723,7 +732,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & line=__LINE__, file=__FILE__)) return ! bail out ista = lbound(arrayr42d,1) iend = ubound(arrayr42d,1) -!$omp parallel do private(i,j) + !$omp parallel do default(none),private(i,j),shared(jsta,jend,ista,iend,spval,arrayr42d,sm) do j=jsta, jend do i=ista, iend if (arrayr42d(i,j) /= spval) sm(i,j) = 1.- arrayr42d(i,j) @@ -747,7 +756,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & line=__LINE__, file=__FILE__)) return ! bail out ista = lbound(arrayr42d,1) iend = ubound(arrayr42d,1) -!$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sice,arrayr42d,sm) do j=jsta, jend do i=ista, iend sice(i,j) = arrayr42d(i,j) @@ -806,7 +815,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, file=__FILE__)) return ! bail out allocate( arrayr42d(ista:iend,jsta:jend)) - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,arrayr42d,arrayr82d) do j=jsta, jend do i=ista, iend arrayr42d(i,j) = arrayr82d(i,j) @@ -816,7 +825,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! Terrain height (*G later) if(trim(fieldname)=='hgtsfc') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,fis,arrayr42d) do j=jsta,jend do i=ista, iend fis(i,j)=arrayr42d(i,j) @@ -836,7 +845,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! PBL height using nemsio if(trim(fieldname)=='hpbl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pblh,arrayr42d) do j=jsta,jend do i=ista, iend pblh(i,j)=arrayr42d(i,j) @@ -846,7 +855,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! frictional velocity if(trim(fieldname)=='fricv') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ustar,arrayr42d) do j=jsta,jend do i=ista, iend ustar(i,j)=arrayr42d(i,j) @@ -856,7 +865,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! roughness length if(trim(fieldname)=='sfcr') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,z0,arrayr42d) do j=jsta,jend do i=ista, iend z0(i,j)=arrayr42d(i,j) @@ -866,7 +875,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! sfc exchange coeff if(trim(fieldname)=='sfexc') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,sfcexc,arrayr42d) do j=jsta,jend do i=ista, iend sfcexc(i,j)=arrayr42d(i,j) @@ -876,7 +885,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! aerodynamic conductance if(trim(fieldname)=='acond') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,acond,arrayr42d) do j=jsta,jend do i=ista, iend acond(i,j)=arrayr42d(i,j) @@ -886,7 +895,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! surface potential T if(trim(fieldname)=='tmpsfc') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,ths) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) then @@ -898,7 +907,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! convective precip in m per physics time step if(trim(fieldname)=='cpratb_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgcprate) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) & @@ -909,7 +918,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! continuous bucket convective precip in m per physics time step if(trim(fieldname)=='cprat_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgcprate_cont) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) then @@ -921,7 +930,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged bucketed precip rate if(trim(fieldname)=='prateb_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgprec) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) then @@ -933,7 +942,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged continuous precip rate in m per physics time step if(trim(fieldname)=='prate_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,arrayr42d,avgprec_cont) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) then @@ -945,7 +954,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! precip rate in m per physics time step if(trim(fieldname)=='tprcp') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,dtp,arrayr42d,prec) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) then @@ -957,7 +966,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! convective precip rate in m per physics time step if(trim(fieldname)=='cnvprcp') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,dtq2,dtp,arrayr42d,cprate) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) then @@ -969,7 +978,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst snow water eqivalent if(trim(fieldname)=='weasd') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sno,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend sno(i,j) = arrayr42d(i,j) @@ -980,7 +989,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! ave snow cover if(trim(fieldname)=='snowc_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,snoavg,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend snoavg(i,j) = arrayr42d(i,j) @@ -992,7 +1001,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! snow depth in mm if(trim(fieldname)=='snod') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,si,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend si(i,j) = arrayr42d(i,j) @@ -1004,7 +1013,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! 2m potential T (computed later) if(trim(fieldname)=='tmp2m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,tshltr,arrayr42d) do j=jsta,jend do i=ista, iend tshltr(i,j) = arrayr42d(i,j) @@ -1014,7 +1023,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! surface potential T if(trim(fieldname)=='spfh2m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,qshltr,arrayr42d) do j=jsta,jend do i=ista, iend qshltr(i,j) = arrayr42d(i,j) @@ -1024,7 +1033,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! mid day avg albedo in fraction if(trim(fieldname)=='albdo_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgalbedo,arrayr42d) do j=jsta,jend do i=ista, iend avgalbedo(i,j) = arrayr42d(i,j) @@ -1037,7 +1046,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged column cloud fraction if(trim(fieldname)=='tcdc_aveclm') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgtcdc,arrayr42d) do j=jsta,jend do i=ista, iend avgtcdc(i,j) = arrayr42d(i,j) @@ -1050,7 +1059,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! maximum snow albedo in fraction if(trim(fieldname)=='snoalb') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,mxsnal,arrayr42d) do j=jsta,jend do i=ista, iend mxsnal(i,j) = arrayr42d(i,j) @@ -1063,7 +1072,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! ave high cloud fraction if(trim(fieldname)=='tcdc_avehcl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgcfrach,arrayr42d) do j=jsta,jend do i=ista, iend avgcfrach(i,j) = arrayr42d(i,j) @@ -1076,7 +1085,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! ave low cloud fraction if(trim(fieldname)=='tcdc_avelcl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgcfracl,arrayr42d) do j=jsta,jend do i=ista, iend avgcfracl(i,j) = arrayr42d(i,j) @@ -1089,7 +1098,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! ave middle cloud fraction if(trim(fieldname)=='tcdc_avemcl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgcfracm,arrayr42d) do j=jsta,jend do i=ista, iend avgcfracm(i,j) = arrayr42d(i,j) @@ -1102,7 +1111,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst convective cloud fraction if(trim(fieldname)=='tcdccnvcl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,cnvcfr,arrayr42d) do j=jsta,jend do i=ista, iend cnvcfr(i,j) = arrayr42d(i,j) @@ -1115,7 +1124,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! slope type if(trim(fieldname)=='sltyp') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,islope) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) < spval) then @@ -1129,7 +1138,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged column cloud fraction if(trim(fieldname)=='cnwat') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,cmc,arrayr42d,sm) do j=jsta,jend do i=ista, iend cmc(i,j) = arrayr42d(i,j) @@ -1141,7 +1150,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! frozen precip fraction if(trim(fieldname)=='cpofp') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,sr) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) /= spval) then @@ -1156,9 +1165,9 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! sea ice skin temperature if(trim(fieldname)=='tisfc') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sice,arrayr42d,ti) do j=jsta,jend - do i=1,im + do i=ista,iend if (arrayr42d(i,j) /= spval) then ti(i,j) = arrayr42d(i,j) if (sice(i,j) == spval .or. sice(i,j) == 0.) ti(i,j)=spval @@ -1172,7 +1181,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! vegetation fraction if(trim(fieldname)=='veg') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,vegfrc,arrayr42d,sm) do j=jsta,jend do i=ista, iend vegfrc(i,j) = arrayr42d(i,j) @@ -1188,7 +1197,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! liquid volumetric soil mpisture in fraction if(trim(fieldname)=='soill1') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) do j=jsta,jend do i=ista, iend sh2o(i,j,1) = arrayr42d(i,j) @@ -1199,7 +1208,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! liquid volumetric soil mpisture in fraction if(trim(fieldname)=='soill2') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) do j=jsta,jend do i=ista, iend sh2o(i,j,2) = arrayr42d(i,j) @@ -1210,7 +1219,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! liquid volumetric soil mpisture in fraction if(trim(fieldname)=='soill3') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) do j=jsta,jend do i=ista, iend sh2o(i,j,3) = arrayr42d(i,j) @@ -1221,7 +1230,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! liquid volumetric soil mpisture in fraction if(trim(fieldname)=='soill4') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sh2o,arrayr42d,sm) do j=jsta,jend do i=ista, iend sh2o(i,j,4) = arrayr42d(i,j) @@ -1232,7 +1241,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! volumetric soil moisture if(trim(fieldname)=='soilw1') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) do j=jsta,jend do i=ista, iend smc(i,j,1) = arrayr42d(i,j) @@ -1243,7 +1252,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! volumetric soil moisture if(trim(fieldname)=='soilw2') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) do j=jsta,jend do i=ista, iend smc(i,j,2) = arrayr42d(i,j) @@ -1254,7 +1263,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! volumetric soil moisture if(trim(fieldname)=='soilw3') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) do j=jsta,jend do i=ista, iend smc(i,j,3) = arrayr42d(i,j) @@ -1265,7 +1274,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! volumetric soil moisture if(trim(fieldname)=='soilw4') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smc,arrayr42d,sm) do j=jsta,jend do i=ista, iend smc(i,j,4) = arrayr42d(i,j) @@ -1276,7 +1285,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! soil temperature if(trim(fieldname)=='soilt1') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend stc(i,j,1) = arrayr42d(i,j) @@ -1288,7 +1297,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! soil temperature if(trim(fieldname)=='soilt2') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend stc(i,j,2) = arrayr42d(i,j) @@ -1300,7 +1309,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! soil temperature if(trim(fieldname)=='soilt3') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend stc(i,j,3) = arrayr42d(i,j) @@ -1312,7 +1321,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! soil temperature if(trim(fieldname)=='soilt4') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,stc,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend stc(i,j,4) = arrayr42d(i,j) @@ -1324,7 +1333,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged incoming sfc longwave if(trim(fieldname)=='dlwrf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwin,arrayr42d) do j=jsta,jend do i=ista, iend alwin(i,j) = arrayr42d(i,j) @@ -1334,7 +1343,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst incoming sfc longwave if(trim(fieldname)=='dlwrf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,rlwin,arrayr42d) do j=jsta,jend do i=ista, iend rlwin(i,j) = arrayr42d(i,j) @@ -1344,7 +1353,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged outgoing sfc longwave, CLDRAD puts a minus sign if(trim(fieldname)=='ulwrf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,alwout,arrayr42d) do j=jsta,jend do i=ista, iend alwout(i,j) = arrayr42d(i,j) @@ -1355,7 +1364,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst outgoing sfc longwave if(trim(fieldname)=='ulwrf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,radot,arrayr42d) do j=jsta,jend do i=ista, iend radot(i,j) = arrayr42d(i,j) @@ -1365,7 +1374,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged outgoing model top longwave if(trim(fieldname)=='ulwrf_avetoa') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwtoa,arrayr42d) do j=jsta,jend do i=ista, iend alwtoa(i,j) = arrayr42d(i,j) @@ -1375,7 +1384,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged incoming sfc shortwave if(trim(fieldname)=='dswrf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswin,arrayr42d) do j=jsta,jend do i=ista, iend aswin(i,j) = arrayr42d(i,j) @@ -1385,7 +1394,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst incoming sfc shortwave if(trim(fieldname)=='dswrf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,rswin,arrayr42d) do j=jsta,jend do i=ista, iend rswin(i,j) = arrayr42d(i,j) @@ -1395,7 +1404,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged incoming sfc uv-b if(trim(fieldname)=='duvb_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,auvbin,arrayr42d) do j=jsta,jend do i=ista, iend auvbin(i,j) = arrayr42d(i,j) @@ -1405,7 +1414,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged incoming sfc clear sky uv-b if(trim(fieldname)=='cduvb_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,auvbinc,arrayr42d) do j=jsta,jend do i=ista, iend auvbinc(i,j) = arrayr42d(i,j) @@ -1415,7 +1424,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged outgoing sfc shortwave,CLDRAD puts a minus sign if(trim(fieldname)=='uswrf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,aswout,arrayr42d) do j=jsta,jend do i=ista, iend aswout(i,j) = arrayr42d(i,j) @@ -1426,7 +1435,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst outgoing sfc shortwave if(trim(fieldname)=='uswrf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,rswout,arrayr42d) do j=jsta,jend do i=ista, iend rswout(i,j) = arrayr42d(i,j) @@ -1436,7 +1445,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged model top incoming shortwave if(trim(fieldname)=='dswrf_avetoa') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswintoa,arrayr42d) do j=jsta,jend do i=ista, iend aswintoa(i,j) = arrayr42d(i,j) @@ -1446,7 +1455,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! ime averaged model top outgoing shortwave if(trim(fieldname)=='uswrf_avetoa') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswtoa,arrayr42d) do j=jsta,jend do i=ista, iend aswtoa(i,j) = arrayr42d(i,j) @@ -1457,7 +1466,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface sensible heat flux, multiplied by -1 because ! wrf model fluxhas reversed sign convention using gfsio if(trim(fieldname)=='shtfl_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sfcshx,arrayr42d) do j=jsta,jend do i=ista, iend sfcshx(i,j) = arrayr42d(i,j) @@ -1468,7 +1477,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst surface sensible heat flux if(trim(fieldname)=='shtfl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,twbs,arrayr42d) do j=jsta,jend do i=ista, iend twbs(i,j) = arrayr42d(i,j) @@ -1480,7 +1489,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface latent heat flux, multiplied by -1 because ! wrf model flux has reversed sign vonvention using gfsio if(trim(fieldname)=='lhtfl_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,sfclhx,arrayr42d) do j=jsta,jend do i=ista, iend sfclhx(i,j) = arrayr42d(i,j) @@ -1491,7 +1500,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst surface latent heat flux if(trim(fieldname)=='lhtfl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,qwbs,arrayr42d) do j=jsta,jend do i=ista, iend qwbs(i,j) = arrayr42d(i,j) @@ -1502,7 +1511,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged ground heat flux if(trim(fieldname)=='gflux_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,subshx,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend subshx(i,j) = arrayr42d(i,j) @@ -1513,7 +1522,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst ground heat flux if(trim(fieldname)=='gflux') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,grnflx,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend grnflx(i,j) = arrayr42d(i,j) @@ -1524,7 +1533,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged zonal momentum flux if(trim(fieldname)=='uflx_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,sfcux,arrayr42d) do j=jsta,jend do i=ista, iend sfcux(i,j) = arrayr42d(i,j) @@ -1534,7 +1543,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged meridional momentum flux if(trim(fieldname)=='vflx_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,sfcvx,arrayr42d) do j=jsta,jend do i=ista, iend sfcvx(i,j) = arrayr42d(i,j) @@ -1544,7 +1553,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged zonal gravity wave stress if(trim(fieldname)=='u-gwd_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,gtaux,arrayr42d) do j=jsta,jend do i=ista, iend gtaux(i,j) = arrayr42d(i,j) @@ -1554,7 +1563,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged meridional gravity wave stress if(trim(fieldname)=='v-gwd_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,gtauy,arrayr42d) do j=jsta,jend do i=ista, iend gtauy(i,j) = arrayr42d(i,j) @@ -1564,7 +1573,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged accumulated potential evaporation if(trim(fieldname)=='pevpr_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgpotevp,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend avgpotevp(i,j) = arrayr42d(i,j) @@ -1575,7 +1584,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst potential evaporation if(trim(fieldname)=='pevpr') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,potevp,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend potevp(i,j) = arrayr42d(i,j) @@ -1586,7 +1595,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! 10 m u if(trim(fieldname)=='ugrd10m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,u10,arrayr42d,u10h) do j=jsta,jend do i=ista, iend u10(i,j) = arrayr42d(i,j) @@ -1597,7 +1606,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! 10 m v if(trim(fieldname)=='vgrd10m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,v10,arrayr42d,v10h) do j=jsta,jend do i=ista, iend v10(i,j) = arrayr42d(i,j) @@ -1608,7 +1617,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! vegetation type if(trim(fieldname)=='vtype') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,ivgtyp) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) < spval) then @@ -1622,7 +1631,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! soil type if(trim(fieldname)=='sotyp') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,arrayr42d,isltyp) do j=jsta,jend do i=ista, iend if (arrayr42d(i,j) < spval) then @@ -1636,7 +1645,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst cloud top pressure if(trim(fieldname)=='prescnvclt') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ptop,arrayr42d) do j=jsta,jend do i=ista, iend ptop(i,j) = arrayr42d(i,j) @@ -1647,7 +1656,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! inst cloud bottom pressure if(trim(fieldname)=='prescnvclb') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pbot,arrayr42d) do j=jsta,jend do i=ista, iend pbot(i,j) = arrayr42d(i,j) @@ -1658,7 +1667,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged low cloud top pressure if(trim(fieldname)=='pres_avelct') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ptopl,arrayr42d) do j=jsta,jend do i=ista, iend ptopl(i,j) = arrayr42d(i,j) @@ -1668,7 +1677,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged low cloud bottom pressure if(trim(fieldname)=='pres_avelcb') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pbotl,arrayr42d) do j=jsta,jend do i=ista, iend pbotl(i,j) = arrayr42d(i,j) @@ -1678,7 +1687,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged low cloud top temperature if(trim(fieldname)=='tmp_avelct') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ttopl,arrayr42d) do j=jsta,jend do i=ista, iend ttopl(i,j) = arrayr42d(i,j) @@ -1688,7 +1697,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged middle cloud top pressure if(trim(fieldname)=='pres_avemct') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ptopm,arrayr42d) do j=jsta,jend do i=ista, iend ptopm(i,j) = arrayr42d(i,j) @@ -1698,7 +1707,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged middle cloud bottom pressure if(trim(fieldname)=='pres_avemcb') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pbotm,arrayr42d) do j=jsta,jend do i=ista, iend pbotm(i,j) = arrayr42d(i,j) @@ -1708,7 +1717,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged middle cloud top temperature if(trim(fieldname)=='tmp_avemct') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ttopm,arrayr42d) do j=jsta,jend do i=ista, iend ttopm(i,j) = arrayr42d(i,j) @@ -1718,7 +1727,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged high cloud top pressure if(trim(fieldname)=='pres_avehct') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ptoph,arrayr42d) do j=jsta,jend do i=ista, iend ptoph(i,j) = arrayr42d(i,j) @@ -1728,7 +1737,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged high cloud bottom pressure if(trim(fieldname)=='pres_avehcb') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,pboth,arrayr42d) do j=jsta,jend do i=ista, iend pboth(i,j) = arrayr42d(i,j) @@ -1738,7 +1747,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged high cloud top temperature if(trim(fieldname)=='tmp_avehct') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,ttoph,arrayr42d) do j=jsta,jend do i=ista, iend ttoph(i,j) = arrayr42d(i,j) @@ -1748,7 +1757,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged boundary layer cloud cover if(trim(fieldname)=='tcdc_avebndcl') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,pblcfr,arrayr42d) do j=jsta,jend do i=ista, iend pblcfr(i,j) = arrayr42d(i,j) @@ -1759,7 +1768,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! cloud work function if(trim(fieldname)=='cwork_aveclm') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,cldwork,arrayr42d) do j=jsta,jend do i=ista, iend cldwork(i,j) = arrayr42d(i,j) @@ -1769,7 +1778,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! water runoff if(trim(fieldname)=='watr_acc') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,runoff,arrayr42d,sm) do j=jsta,jend do i=ista, iend runoff(i,j) = arrayr42d(i,j) @@ -1780,7 +1789,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! shelter max temperature if(trim(fieldname)=='tmax_max2m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,maxtshltr,arrayr42d) do j=jsta,jend do i=ista, iend maxtshltr(i,j) = arrayr42d(i,j) @@ -1790,7 +1799,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! shelter min temperature if(trim(fieldname)=='tmin_min2m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,mintshltr,arrayr42d) do j=jsta,jend do i=ista, iend mintshltr(i,j) = arrayr42d(i,j) @@ -1800,7 +1809,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! ice thickness if(trim(fieldname)=='icetk') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,dzice,arrayr42d) do j=jsta,jend do i=ista, iend dzice(i,j) = arrayr42d(i,j) @@ -1810,7 +1819,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! wilting point if(trim(fieldname)=='wilt') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend, spval,smcwlt,arrayr42d,sm) do j=jsta,jend do i=ista, iend smcwlt(i,j) = arrayr42d(i,j) @@ -1821,7 +1830,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! sunshine duration if(trim(fieldname)=='sunsd_acc') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,suntime,arrayr42d) do j=jsta,jend do i=ista, iend suntime(i,j) = arrayr42d(i,j) @@ -1831,7 +1840,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! field capacity if(trim(fieldname)=='fldcp') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,fieldcapa,arrayr42d,sm) do j=jsta,jend do i=ista, iend fieldcapa(i,j) = arrayr42d(i,j) @@ -1842,7 +1851,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface visible beam downward solar flux if(trim(fieldname)=='vbdsf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,avisbeamswin,arrayr42d) do j=jsta,jend do i=ista, iend avisbeamswin(i,j) = arrayr42d(i,j) @@ -1852,7 +1861,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface visible diffuse downward solar flux if(trim(fieldname)=='vddsf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,avisdiffswin,arrayr42d) do j=jsta,jend do i=ista, iend avisdiffswin(i,j) = arrayr42d(i,j) @@ -1862,7 +1871,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface near IR beam downward solar flux if(trim(fieldname)=='nbdsf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,airbeamswin,arrayr42d) do j=jsta,jend do i=ista, iend airbeamswin(i,j) = arrayr42d(i,j) @@ -1872,7 +1881,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface near IR diffuse downward solar flux if(trim(fieldname)=='nddsf_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,airdiffswin,arrayr42d) do j=jsta,jend do i=ista, iend airdiffswin(i,j) = arrayr42d(i,j) @@ -1882,7 +1891,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface clear sky outgoing LW if(trim(fieldname)=='csulf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwoutc,arrayr42d) do j=jsta,jend do i=ista, iend alwoutc(i,j) = arrayr42d(i,j) @@ -1892,7 +1901,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged TOA clear sky outgoing LW if(trim(fieldname)=='csulftoa') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwtoac,arrayr42d) do j=jsta,jend do i=ista, iend alwtoac(i,j) = arrayr42d(i,j) @@ -1902,7 +1911,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface clear sky outgoing SW if(trim(fieldname)=='csusf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswoutc,arrayr42d) do j=jsta,jend do i=ista, iend aswoutc(i,j) = arrayr42d(i,j) @@ -1912,7 +1921,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged TOA clear sky outgoing SW if(trim(fieldname)=='csusftoa') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswtoac,arrayr42d) do j=jsta,jend do i=ista, iend aswtoac(i,j) = arrayr42d(i,j) @@ -1922,7 +1931,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface clear sky incoming LW if(trim(fieldname)=='csdlf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,alwinc,arrayr42d) do j=jsta,jend do i=ista, iend alwinc(i,j) = arrayr42d(i,j) @@ -1932,7 +1941,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! time averaged surface clear sky incoming SW if(trim(fieldname)=='csdsf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,aswinc,arrayr42d) do j=jsta,jend do i=ista, iend aswinc(i,j) = arrayr42d(i,j) @@ -1942,7 +1951,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! shelter max specific humidity if(trim(fieldname)=='spfhmax_max2m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,maxqshltr,arrayr42d) do j=jsta,jend do i=ista, iend maxqshltr(i,j) = arrayr42d(i,j) @@ -1952,7 +1961,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! shelter min temperature if(trim(fieldname)=='spfhmin_min2m') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,minqshltr,arrayr42d) do j=jsta,jend do i=ista, iend minqshltr(i,j) = arrayr42d(i,j) @@ -1962,7 +1971,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! storm runoffs if(trim(fieldname)=='ssrun_acc') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,ssroff,arrayr42d,sm) do j=jsta,jend do i=ista, iend ssroff(i,j) = arrayr42d(i,j) @@ -1973,7 +1982,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! direct soil evaporation if(trim(fieldname)=='evbs_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgedir,arrayr42d,sm) do j=jsta,jend do i=ista, iend avgedir(i,j) = arrayr42d(i,j) @@ -1984,7 +1993,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! canopy water evap if(trim(fieldname)=='evcw_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgecan,arrayr42d,sm) do j=jsta,jend do i=ista, iend avgecan(i,j) = arrayr42d(i,j) @@ -1995,7 +2004,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! plant transpiration if(trim(fieldname)=='trans_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgetrans,arrayr42d,sm) do j=jsta,jend do i=ista, iend avgetrans(i,j) = arrayr42d(i,j) @@ -2006,7 +2015,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! snow sublimation if(trim(fieldname)=='sbsno_ave') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,avgesnow,arrayr42d,sm,sice) do j=jsta,jend do i=ista, iend avgesnow(i,j) = arrayr42d(i,j) @@ -2017,7 +2026,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! total soil moisture if(trim(fieldname)=='soilm') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,smstot,arrayr42d,sm) do j=jsta,jend do i=ista, iend smstot(i,j) = arrayr42d(i,j) @@ -2028,7 +2037,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! snow phase change heat flux if(trim(fieldname)=='snohf') then - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,snopcx,arrayr42d,sm) do j=jsta,jend do i=ista, iend snopcx(i,j) = arrayr42d(i,j) @@ -2050,7 +2059,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & allocate(arrayr43d(ista:iend,jsta:jend,kstart:kend)) arrayr43d = 0. do k=kstart,kend - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,k,arrayr43d,arrayr83d) do j=jsta,jend do i=ista,iend arrayr43d(i,j,k) = arrayr83d(i,j,k) @@ -2061,7 +2070,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level T if(trim(fieldname)=='tmp') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,t,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2071,7 +2080,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo !! sig4 - !$omp parallel do private(i,j) + !$omp parallel do default(none) private(i,j,tlmh) shared(lm,jsta,jend,ista,iend,t,sigt4) do j=jsta,jend do i=ista, iend tlmh = t(i,j,lm) * t(i,j,lm) @@ -2082,7 +2091,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level spfh if(trim(fieldname)=='spfh') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,q,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2094,7 +2103,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level u wind if(trim(fieldname)=='ugrd') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,uh,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2106,7 +2115,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level v wind if(trim(fieldname)=='vgrd') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,vh,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2118,7 +2127,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level pressure thinkness if(trim(fieldname)=='dpres') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,dpres,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2130,7 +2139,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level gh thinkness, model output negative delz if(trim(fieldname)=='delz') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,zint,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2142,7 +2151,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level w if(trim(fieldname)=='dzdt') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,wh,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2154,7 +2163,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level ozone mixing ratio if(trim(fieldname)=='o3mr') then - !$omp parallel do private(i,j,l) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,o3,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2168,7 +2177,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & if (imp_physics == 11) then ! model level cloud water mixing ratio if(trim(fieldname)=='clwmr') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqw,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2180,7 +2189,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level ice mixing ratio if(trim(fieldname)=='icmr') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqi,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2192,7 +2201,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level rain water mixing ratio if(trim(fieldname)=='rwmr') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqr,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2204,7 +2213,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level snow mixing ratio if(trim(fieldname)=='snmr') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqs,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2216,7 +2225,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level rain water mixing ratio if(trim(fieldname)=='grle') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqg,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2230,7 +2239,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level cloud amount if(trim(fieldname)=='cld_amt') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,cfr,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2242,7 +2251,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level ref3d if(trim(fieldname)=='ref3D') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,ref_10cm,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2255,7 +2264,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! model level ref3d if(trim(fieldname)=='tke') then - !$omp parallel do private(i,j,k) + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,q2,arrayr43d) do l=1,lm do j=jsta,jend do i=ista, iend @@ -2280,7 +2289,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo file_loop_all ! recompute full layer of zint -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,lp1,spval,zint,fis) do j=jsta,jend do i=1,im if (fis(i,j) /= spval) then @@ -2291,7 +2300,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo do l=lm,1,-1 -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,omga,wh,dpres,zint) do j=jsta,jend do i=1,im omga(i,j,l) = (-1.) * wh(i,j,l) * dpres(i,j,l)/zint(i,j,l) @@ -2301,7 +2310,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo ! compute pint from top down -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,ak5,pint) do j=jsta,jend do i=1,im pint(i,j,1) = ak5(1) @@ -2309,7 +2318,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & end do do l=2,lp1 -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,pint,dpres) do j=jsta,jend do i=1,im pint(i,j,l) = pint(i,j,l-1) + dpres(i,j,l-1) @@ -2319,6 +2328,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & !compute pmid from averaged two layer pint do l=lm,1,-1 +!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,pmid,pint) do j=jsta,jend do i=1,im pmid(i,j,l) = 0.5*(pint(i,j,l)+pint(i,j,l+1)) @@ -2326,7 +2336,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,im,spval,pt,pd,pint) do j=jsta,jend do i=1,im pd(i,j) = spval @@ -2337,7 +2347,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! compute alpint do l=lp1,1,-1 -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,alpint,pint) do j=jsta,jend do i=1,im alpint(i,j,l)=log(pint(i,j,l)) @@ -2347,7 +2357,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! compute zmid do l=lm,1,-1 -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,im,zmid,zint,pmid,alpint) do j=jsta,jend do i=1,im zmid(i,j,l)=zint(i,j,l+1)+(zint(i,j,l)-zint(i,j,l+1))* & @@ -2365,7 +2375,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! minval(alpint(1:im,jsta:jend,1)) ! surface potential T, and potential T at roughness length -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,lp1,sm,ths,sst,thz0,pint) do j=jsta,jend do i=ista, iend !assign sst @@ -2384,7 +2394,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & ! compute cwm for gfdlmp if( imp_physics == 11 ) then do l=1,lm -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(l,jsta,jend,ista,iend,cwm,qqg,qqs,qqr,qqi,qqw) do j=jsta,jend do i=ista,iend cwm(i,j,l)=qqg(i,j,l)+qqs(i,j,l)+qqr(i,j,l)+qqi(i,j,l)+qqw(i,j,l) @@ -2394,7 +2404,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & endif ! estimate 2m pres and convert t2m to theta -!$omp parallel do private(i,j) +!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,lm,pshltr,pint,tshltr) do j=jsta,jend do i=ista, iend pshltr(I,J)=pint(i,j,lm+1)*EXP(-0.068283/tshltr(i,j)) @@ -2448,7 +2458,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & 51 format(8(F8.1,1X)) endif ! -!$omp parallel do private(l) +!$omp parallel do default(none) private(l) shared(lsm,alsl,spl) do l = 1,lsm alsl(l) = log(spl(l)) end do